Viewing 20 posts - 81 through 100 (of 134 total)
  • Author
    Posts
  • #27702
    Wheels-Of-FireWheels-Of-Fire
    Participant
      @grahamdearsley
      Forumite Points: 4

      One thing I like about Visual Studio as a development tool is that it does on the fly compilation in the background as you type. This capability was originally developed for Visual Basic but it has now been extended to C++ and Java. Visual Studio will highlight errors in your syntax AND your logic  with a squiggly line as you type. Even better than an interpreted language in many ways.

      You still have to build your project before you can run it though.

      #27716
      Ed PEd P
      Participant
        @edps
        Forumite Points: 39

        The M$ development platform was complete rubbish until they poached Anders Hejlsberg from Borland’s Delphi/C++. At the time Object Pascal Delphi was the absolutely best hackers programming language and introduced the concept of RAD (rapid application development) allowing widgets to be dragged/dropped and at the same time built a code template procedure for each widget. In fact Delphi is reportedly still the language of choice amongst many Russian hackers.

        M$ appropriated all that technology for itself and incorporated it in the first releases of Visual Studio.

        Delphi is still around, but unfortunately outrageously expensive. If you want to just use something very similar for a quick hack  take a look at Lazarus the cross-platform FOSS equivalent. I personally prefer object Pascal to C++ any day of the week!

        #27717
        Wheels-Of-FireWheels-Of-Fire
        Participant
          @grahamdearsley
          Forumite Points: 4

          I can’t personally comment on Pascal because of my very limited knowlage of it but Lazarus looks like a top notch IDE. I would not set out to learn Pascal from scratch now though. Existing Pascal programmers can reportedly earn good money maintaining code that was originally written to run on 1970s main frames but it is not a language of the future.

          #27718
          Ed PEd P
          Participant
            @edps
            Forumite Points: 39

            Pascal was actually written as a teaching language. It was also one that was stable and well structured, producing light-weight compiled code. It was amongst the first languages to encompass Object Programming. The compiled code was also well defined with few surprises. This latter is of vital importance as quirky behaviour by the compiler is very hard to either detect or correct, and one of the main reasons that fuzing a computer kernel turns up bugs. However, there is probably little reason to learn Pascal unless you want to emulate a Russian/Ukrainian hacker.

            In fact afaik only ADA and the OTOH, CompCert for C are certified for use in the Aerospace industry and other critical duty software programs. I do not know of any C++ compilers that are similarly certified and my guess is that its quirky run-time behaviour and overloading probably precludes its use! (Its all very well having maintainable code, but useless if it compiles into a pile of flakey pastry.)

            #27722
            Wheels-Of-FireWheels-Of-Fire
            Participant
              @grahamdearsley
              Forumite Points: 4

              I am not a great fan of C++ myself. In fact the more I learn about it the more overly complex it appears. The main push is towards encapsulating everything into objects that can be seen as stand alone building blocks.

              The thing is though I am increasingly reading texts that assume I have some knowlage of C++ methods so I thought I should give it a go. About 95% of Windows is written in C with 3% in C++ and 2% in assembly. Microsoft has stated that it will be increasing the use of C++ in the future though. Stand by for some bugs ?

              #27725
              TipponTippon
              Participant
                @tippon
                Forumite Points: 0

                Just one caution, I’m not sure which Python the book uses.

                The free first edition uses 2.x, but that’s obviously not the current book. It says it uses it because it’s what’s going to be in your Linux distro though, and the Ubuntu variants I’ve used still use 2.x. The only downside is, the book is geared towards using a Pi, which I don’t have. I’m downloading a VirtualBox VM and the Raspbian ISO file now though to see if that’s any good.

                #27726
                Ed PEd P
                Participant
                  @edps
                  Forumite Points: 39

                  As usual it is a trade-off. Provided that M$ somehow produces a C++ compiler that churns out certifiable code then there are great benefits in moving to an object oriented language like C++. e.g. better stability, fewer bugs, and a reduced attack surface.

                  Although I like C, it is one of those languages with big health warnings. Code has to be rigorously tested to ensure that none strays outside defined behaviour. As a simple and well documented example if a signed integer number overflows then the behaviour in the compiler is undefined. It MIGHT wrap around or even change sign. wiki link  It will however, and most dangerously, run with no error messages!

                  #27728
                  Ed PEd P
                  Participant
                    @edps
                    Forumite Points: 39

                    Tippon, unless the code uses the GPIO pins then it will run without issue on a PC (best under Linux as M$ Python has a few quirks). The latest book uses 2.7 – which is a very usable version.

                    The Raspberry Pi runs under fairly standard Debian. I routinely develop within Mint Linux (because I can use my big monitor) and just copy the *.py file and any dependencies to the Pi. I see no reason why the converse (Pi code on a PC) will not work without issue as I doubt the book uses the Pi’s *GPIO (introduces too many additional complexities).

                    *GPIO = General Purpose Input/Output which uses interrupts on the Broadcom chip, and is used by wiring up things to the GPIO pins.

                    #27731
                    TipponTippon
                    Participant
                      @tippon
                      Forumite Points: 0

                      Most of it does seem to be normal programming. There are some GPIO examples, but they look like stand alone examples.

                      I didn’t think about using a Linux VM for some reason. I may transfer my Ubuntu Studio VM to this machine and use that for programming too. I realised this week that I haven’t actually played a game properly for a couple of years, so that’s one less reason to stick with Windows. Using the VM will help me get used to a distro before I switch.

                      #27756
                      Ed PEd P
                      Participant
                        @edps
                        Forumite Points: 39

                        Steam is in the process of introducing a compatibility fix that they claim allows over 1000 games to run under Linux. I think you should probably preface games with ‘old’ as the Wine fix this uses will not fully cover DX11 or DX12 games. Even VMware is unable to handle DX11 which is really annoying as a lot of graphics software now uses DX11/12.

                        #27758
                        Wheels-Of-FireWheels-Of-Fire
                        Participant
                          @grahamdearsley
                          Forumite Points: 4

                          Reading you link about overflows turned up another unexpected thing about Atari BASIC Ed. If I do a calculation on a variable and the result won’t fit in 8 bytes of signed floating point then I get a strange number with an E in it as the result. It turns out that this is scientific notation and in this case it is 10 to the power of n and the E stands for exponent. I have been aware of scientific notation since my collage days but I never made the connection before.p

                          #27759
                          Ed PEd P
                          Participant
                            @edps
                            Forumite Points: 39

                            If you think Atari basic formats are odd, you should have been born in the days of COBOL 60.

                            Despite computers having very limited capability to handle large values and being essentially integer only they soon took over the business and financial sectors. However, commercial and banking transactions had to be capable of handling tens of millions of pounds (shillings) and pence without any rounding errors.

                            Programmers ingenuity was stretched to the limits, and many non-standard ways of manipulating data were used (including self-modifying code!). Despite COBOL now being most definitely obsolete a survey showed that 43% of banking systems are still built on COBOL, and programmers are still very much in demand. In fact one very venerable ex-colleague in his late 80s still makes a handsome amount of money as a part-time consultant/programmer.

                             

                            #27763
                            Wheels-Of-FireWheels-Of-Fire
                            Participant
                              @grahamdearsley
                              Forumite Points: 4

                              You can break any sort of programming rules in Atari Basic. Self modifying is a good one. Just use the ENTER command in your program and it will pull in new code from a file, tokenise it and go on as before.

                               

                              #27764
                              Wheels-Of-FireWheels-Of-Fire
                              Participant
                                @grahamdearsley
                                Forumite Points: 4

                                <p style=”text-align: left;”>The point is that memory and line numbers and variables will stay the same with enter but not with LOAD.</p>

                                #27795
                                Ed PEd P
                                Participant
                                  @edps
                                  Forumite Points: 39

                                  Most programming languages of that period allowed the programmer to use so-called in-line code. Some such as Pascal allowed Assembler and calls to imported files, while venerable ones like the Commodore Pet used Peek and Poke etc. They built in this facility to allow programs to directly access the underlying hardware or speed up critical sections of code (early primitive Basics were not compiled but interpreted scripts just like today’s Python). The modern equivalent can now be seen with programming languages such as Vulkan that allow direct access to the inner workings of a GPU.

                                  #27799
                                  Wheels-Of-FireWheels-Of-Fire
                                  Participant
                                    @grahamdearsley
                                    Forumite Points: 4

                                    <p style=”text-align: left;”>Oh yucky Commodore basic. Made in 1977 from an M$ lisence. It was rubbish on the Pet and then they put it on the C64.</p>

                                    #27800
                                    Wheels-Of-FireWheels-Of-Fire
                                    Participant
                                      @grahamdearsley
                                      Forumite Points: 4

                                      What is with the HTML mark up ?

                                      #27813
                                      Ed PEd P
                                      Participant
                                        @edps
                                        Forumite Points: 39

                                        What is with the HTML mark up ?

                                        Are you drafting your replies, or using an email link. No problem here afaik.

                                        #27870
                                        Wheels-Of-FireWheels-Of-Fire
                                        Participant
                                          @grahamdearsley
                                          Forumite Points: 4

                                          No i’m not writing drafts. I am writing on my phone though. Don’t matter much cos my opinion of Commodore Basic is still clear ?. Every Commodore basic listing is full of pokes because it didn’t even try to support the hardware. They had another go on the C128 with V2.0 but it was still rubbish. Dont matter now but it was dire.

                                          #27872
                                          Wheels-Of-FireWheels-Of-Fire
                                          Participant
                                            @grahamdearsley
                                            Forumite Points: 4

                                            Maybe I should start a new Retro programming thread like MM Retro Mart ?

                                          Viewing 20 posts - 81 through 100 (of 134 total)
                                          • You must be logged in to reply to this topic.