Computer Science (intelligence Central)

Discussion in 'Taylor's Tittle-Tattle - General Banter' started by SkylaRose, Apr 25, 2023.

  1. SkylaRose

    SkylaRose Administrator Staff Member

    Excellent points Moose and well made. Personal documents and privacy should be on the same level as safety. It is pretty alarming how easy it would be for any well coded AI to do the simplest jobs a human currently does. Sorting and packing is one example, As you already know, a computer's database is vast, and depending on the operation it needs to carry out, it can fetch and execute these commands in a mili-second. I personally feel that we are not quite at the level of stupidity as a species to put an AI in charge of peronal files and identity, but we still need to keep tabs on how much scientists are filling their memory banks with. They have their uses for sure, and some great advancements in technology have shown if treated in tandam, they can be a useful tool. However, they should never be at the level to overtake us in our day to day workings completely. That, as you rightly say, is where an element of control needs to be established and monitored.
     
    Moose likes this.
  2. hornmeister

    hornmeister Tired

    Dunno but the operating system is deffo Vista.
     
    cyaninternetdog and SkylaRose like this.
  3. SkylaRose

    SkylaRose Administrator Staff Member

    After all the patches and updates, Vista was actually pretty good, but by then 7 was out and was akin to a newer version of XP so Vista was dead and gone by the time Microsoft fixed it. It didn't help matters that Windows "Longhorn" which was the codename for Vista had to be completely coded from scratch in C/C++/ASM because some bright spark thought it would be a brilliant idea to code an entire operating system in a managed language, C#. .NET was relatively new then, and due to it handling it's own memory (freeing and releasing it) it would of been painfully slow as the programmers of any applications for Vista had no control over the size of the memory pool (sharing, virtual or shadowed). I quite liked Vista but had it pretty late in it's life span. Although the UCI was still a mess despite numerous updates.
     
    hornmeister likes this.
  4. GarbeliaHornet

    GarbeliaHornet Academy Graduate

    Hate to embrace the stereotype by making it the first thing I say on this thread, but Vista was the point I switched to Arch Linux, which was just infinitely more customisable and a far superior workflow for development. Took about a few months to get the hang of it though.
     
  5. SkylaRose

    SkylaRose Administrator Staff Member

    Ironic how most people are put off by Linux due to it's steep learning curve of how it's OS works, yet anyone can work Windows after a day or so with little to no problem. I have no problem with Linux personally, great OS and very, very stable. Windows has so many updates due to the bugs that need fixing. OSX (Mac) on the other hand - not my cup of tea. Never really been an "Apple" gal. :)
     
  6. GarbeliaHornet

    GarbeliaHornet Academy Graduate

    Especially with how it is actually easier to get some of the more beginner friendly distros up and running quicker than windows these days. Even slightly more powerful ones like Manjaro aren't too bad, although the rolling release can be dodgy with folks that can't fix issues from the terminal.
     
    SkylaRose likes this.
  7. SkylaRose

    SkylaRose Administrator Staff Member

    How does a player character fire a weapon in a game? This is a very rough and ready version of how it's done in general. Language and Game Engine will differ.

    This is C++ (I hate this language with a passion)

    Code:
    class Player : GameEngine
    {
    public:
        Player();
        ~Player();
    
        GameEngine::fireGun(long);
    
    private:
        long totalBullets;
    };
    
    Player::GameEngine::fireGun(long totalBullets)
    {
          if (totalBullets > 0)
              fireGun.aimAtEnemy();
    }
     
    GarbeliaHornet likes this.
  8. Ilkley

    Ilkley Formerly known as An Ilkley Orn Baht 'at

    That's fascinating. What's the code for two forum members having a slanging match?
     
    GarbeliaHornet likes this.
  9. SkylaRose

    SkylaRose Administrator Staff Member

    I can write a better example, but this is the jist of it.

    Code:
    --
    -- two forum members having a slanging match
    -- Rose, Skyla Apr'23
    --
    
    with Ada.Text_IO;
    with Ada.Strings;
    with Ada.Integer_Text_IO;
    with Ada.Numerics.Discrete_Random;
    
    procedure Main is
       
       function Random_Outcome return Integer; -- specifications do not work in Ada'95? why?
       
       function Random_Outcome return Integer is
          type Number_Range is new Positive range 1 .. 10;
          package The_Number is Ada.Numerics.Discrete_Random(Number_Range);
          use The_Number;
          Gen : Generator;
          Number : Number_Range;
         
        begin
             Reset(G);
             Number := random(Gen);
             return Integer(Number);
        end Random_Outcome;
       
       Member_One : Constant String := "wfcmemberone";
       Member_Two : constant String := "wfcmembertwo";
       Argument_Level : Positive range 1 .. Integer'Last;
       
    begin
       Ada.Text_IO.Put(Item => "WFC Forums member: ");
       Ada.Text_IO.Put(Item => Member_One);
       Ada.Text_IO.Put_Line(Item => "Has an argument level of " & Random_Outcome());
       Ada.Text_IO.Put(Item => WFC Forums Member: ");
          Ada.Text_IO.Put(Item => Member_Two);
          Ada.Text_IO.Put_Line(Item => "Has an argument level of " & Random_Outcome());
    
          with Command_Line;
         
          if &Arg1 > &Arg2 then
             &Arg1 = True;
          else
             &Arg2 = True;
          end if;   
    end Main;
     
    Bwood_Horn, GarbeliaHornet and Ilkley like this.
  10. Ilkley

    Ilkley Formerly known as An Ilkley Orn Baht 'at

    Marvellous! Thank you Skyla. That really made me chuckle.
     
  11. SkylaRose

    SkylaRose Administrator Staff Member

  12. GarbeliaHornet

    GarbeliaHornet Academy Graduate

    Code:
    ++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>.<---.>+++++++++++.-----------.+.<<++.>+++++++++++++++++.>++++++++++++++++++.--------.<<.>>---------.+++++++++.+++.+++.--------.<<.>>.--------.++++++++.-----------.+++.+++++++++++++.+.<<.>>-----------.-------.+++++++++++++++++++++.-------------.+++++.-------.<<.>>------.<<.>>++++++++++++++++++.-------.-----------.+++++++++++++.-------.++.+++++.-------.<<.>>++++++.------------.+++++++++++++++++++.<+++++++++++++++.+++++.
    This is entirely useless and inferior to Skyla's example, but here is the phrase printed in Brainf*ck. Might be some mistakes.
     
  13. SkylaRose

    SkylaRose Administrator Staff Member

    I've heard of that language. It was created as a joke but the schematics for the interpreter are really, really complex. It's probably easier to write in pure binary than that actually. Kudos to anyone who can actually understand and write full applications using it. I've not seen the actual DLL code for the Interpreter it uses, but I would imagine the amount of ++ and << etc. correspond to "if" "else" "for" "while" etc. Really clever how it's written.
     
    GarbeliaHornet likes this.
  14. GarbeliaHornet

    GarbeliaHornet Academy Graduate

    Yeah, it has been said that it's worse than binary, and it serves no actual purpose at all.

    And it is even more complicated than the ++ and << numbers being common bits and bobs from other languages. They actually manipulate individual values of memory cells. [] is a loop, < and > move between cells, + and - change the values within the cells, and . reads from the current cell, with the numerical value being read to an ASCII table to write text.

    It is in no way functional, of course.
     
    SkylaRose likes this.
  15. Bwood_Horn

    Bwood_Horn Squad Player

    Where's the 'flounce' sub-routine?
     
    Ilkley, SkylaRose and GarbeliaHornet like this.
  16. SkylaRose

    SkylaRose Administrator Staff Member

    I'll work on a better one today as I have more time, I'll post it later so keep an eye out. ;)
     
  17. SkylaRose

    SkylaRose Administrator Staff Member

    Ever wondered what a computer is doing when your video game is "loading"?

    When a game is created, all default assetts are frontloaded into files that the Game Engine can access. One of the first things your system does when it begins to load the game is to fetch all these files, which are contained in files known as PAK and all DLL's listed with them and places them into it's RAM (Random Access Memory) that the Game Engine has instructed it to set aside for. Depending on the game in question, the frontloaded objects and files will contain information about basic setup, title screen splashes and company logo's. All this is pushed to back to the top of what is called a "stack", which is fancy term for how memory is orgnaised when a game runs. Whichever file is required in the loading squence is "popped" off the top of stack and placed into the primary memory location. When the file has been read, it is removed from the RAM and discarded. Several other PAK files will contain player data, enemy AI, graphics, sound and so on. Files that cannot be manipulated during the course of game are placed into the computer's ROM (Read Only Memory) which the CPU can only access but not change at any point, if it does, the game will usuaally throw a "seg fault" (memory failure) and crash the game back to the desktop. Several placeholders are put into the design of a game to ensure no file is read more than once, and files that remain unpacked (non read files) are removed from ROM when the game is switched off.

    In the case of game saving, all files are WORO, which stands for "Write Once, Read Once". Such a file will allow the game to write the current data to it and then only access it when the player continues their game. At no point can any other file iteract with this file whilst the game is running. Autosave uses a similar file system, where only pre programmed segments are allowed access to save only partial data such as player progress etc.
     
    GarbeliaHornet likes this.
  18. Ybotcoombes

    Ybotcoombes Justworkedouthowtochange

    I kind of naively assumed that all forum members were probably IT bods of one type or another (but I think that harks back to my days of dialup and builtin boards)

    have programmed evert since I got my zx81 and been through a whole variety of languages in that time but now mainly work with php / JavaScript / sql

    I am just writing a presentation on AI and ChatGPT and been reflecting on how far things have come , I studied AI for my MSc 20 years ago and back then the idea of something like ChatGPT was fanciful , it was assumed that natural language processing would require so much power it would not be possible.

    in terms of languages I never learnt it but understand a detailed knowledge of COBOL is a licence to print money.
     
    GarbeliaHornet and SkylaRose like this.
  19. Arakel

    Arakel First Team

    That's because plenty of places still use it but hardly anyone knows it.

    They'll likely end up raiding retirement homes for talent at the current rate.
     
    GarbeliaHornet and Ybotcoombes like this.
  20. SkylaRose

    SkylaRose Administrator Staff Member

    COBOL is still used today and you are correct in the area - work in Banking, want to maintain their legacy systems? Learn COBOL. It's not used anywhere else nowasdays, and hasn't been taught as a teaching language for over 40 years. COBOL was replaced largely by FORTRAN which transisted eventually to R in modern day technologies. Ada, the language I code in, is a mixture of Pascal and Algol 69, is also used in a very niche' field. SpaceX, Air Traffic Control, Train signal systems and some smaller aviation software.

    Trying to remember the code the Spectrum used - might of been 81x Assembley code to be fair.

    Never used any of those languages as Internet and scripting languages have sort of been almost an anomoly to me personally. I understand they are useful, heck half of the Internet is coded in PHP and HTML. Never really considered SQL a language, it's more of a database query script. I know C pretty well, a some Java and a tiny bit of Visual Basic.NET. However in my work I code exclusively in Ada with a little SPARK when needed. Think C++ but easier to read and ten times more safe. :)
     
    Ybotcoombes likes this.
  21. SkylaRose

    SkylaRose Administrator Staff Member

    If you can find a competent COBOL programmer now, it's one of highest paid earners in the job scope. A COBOL programmer who can maintain old (1970's) banking system front ends would be massivly in demand. But, they are a very rare breed as you say.
     
  22. I Blame Pozzo

    I Blame Pozzo First Team

  23. SkylaRose

    SkylaRose Administrator Staff Member

    To Err is to Error. A typical computer term for us all. Welcome to the club @I Blame Bassett :)
     
  24. Ybotcoombes

    Ybotcoombes Justworkedouthowtochange

    The technical side of my job is all about database and web Integration. SQL is interesting to learn and you can do a lot with it if you start writing you own functions and procedures , along time ago I wrote a processes that uses a few thousand lines of SQL(organised through SSIS packages) that would analyses student application to courses and then rearrange them so that each class has the optimum number of students, something that used to take hundreds of hours of work now done automatically. Php is like any other high level language once you know the syntax it’s as easy as basic.

    use to program iPhone applications in swift (I think it was) code version rather than visual - always hated visual languages
     
    SkylaRose likes this.
  25. Ybotcoombes

    Ybotcoombes Justworkedouthowtochange

    The spectrum use basic (z80 assembly language) .

    if I remember correctly at the same time , another home PC used Fortran , can’t remember what it was but remember it looked a bit like the zx81 with a big bump on , however as most home PC adopted Basic this became the sort of default language to learn.

    Edit. it was the Jupiter ace but It ran forth not fortran
     
    SkylaRose likes this.
  26. SkylaRose

    SkylaRose Administrator Staff Member

    Oh I do see the benefit of SQL and like you said it certainly has its uses. Php to most is being overtaken by JavaScript (if you believe the coders possy on Tiobe Index. False - Php has and will always be king in the domain it's strongest in. Swift has always interested me but Mobile Phone development is a world away from what I code now, but it is something that peaks my interest now and then. Count yourself lucky you never learnt Objectiv-C. One of the most poorly designed languages ever created, and that was Apple's goto (see what I did there :p) language for years.

    Aww I was close then :). I could never invision a PC on pure BASIC even back then, but it was probably the main stay because Bill Gates help develop the language. Press F12 on any old Acorn Computer and it goes straight into BBC BASIC where your brain turns to mush after reading "Syntax Error" with not a single clue where it is. I started learning Visual Basic 6.0 before Microsoft got all Dot Net with everything. Dropped it as "drag and drop" languages that do half the work for you seem lazy to me anyway.
     
    Ybotcoombes likes this.
  27. SkylaRose

    SkylaRose Administrator Staff Member

    Hello World in mutliple languages.

    Python:


    Code:
    print ("hello world")
    C:

    Code:
    int main (void) {
        printf("Hello World!");
        return 0;
    }
    C++:

    Code:
    int main (int argc, char* argv[])
    {
        std::cout << "Hello World!" << endl;
        return EXIT_SUCCESS;
    }
    Java:

    Code:
    class HelloWorld
    {
        public static void main(String[] args)
        {
            System.out.println("Hello World!");
        }
    }
    Ada:

    Code:
    procedure Main is
    begin
        Ada.Text_IO.Put(Item => "Hello World!");
    end Main;

    BBC BASIC:


    Code:
    >: F12 'READ'
    >: BBC BASIC (c)1984 British Broadcasting Corp. This software is free to use on BBC Micro Computers.
    >: AUTO
    >1 PRINT "HELLO WORLD"
    >2 ENDPROC
    >3 END
     
  28. Sting

    Sting Squad Player

    My brain hurts
     
  29. SkylaRose

    SkylaRose Administrator Staff Member

    So does mine a lot of the time believe me. :D
     
  30. sydney_horn

    sydney_horn Squad Player

    All this "new" coding goes over my head.

    I was an old school COBOL (later COBOL 2) programmer that moved over to Teradata SQL.

    Too old to (want to) learn anything new now!
     
    SkylaRose likes this.
  31. SkylaRose

    SkylaRose Administrator Staff Member

    Nice to see the legacy of COBOL is still alive and well. I get what you mean though, there are way, way to many programming languages and some are just clones of others. C# and Java is a very good example. I get some are pretty vital to the ecosystem (C for example) and Python is becoming more and more dominant but even that has it's problems. It's slow as anything so can never be relied on for embedded software systems or Operating Systems. .NET was the "new thing" in 2000 and Microsoft have barely been able to port it to platforms outside of the Windows ecosystem. Give me a old fart language like COBOL, FORTRAN, C and Ada anyday. :)
     
    sydney_horn likes this.
  32. Bwood_Horn

    Bwood_Horn Squad Player

    Cheeky young whipper-snapper....

    20230619_141108.jpg

    20230619_141123.jpg

    When in 1998 I started my doctoral work - we were shocked to discover that the, very cutting edge, Gausssian 98 for Windows (G98w) suite of ab initio modelling programs were just series of FORTRAN 77 routines - my first task (in the closing year of the 20th century) was to modify some of the routines using a language that came out when I was eight years old. Also many of the cutting edge programs that were used to generate the various matrices used for the normal coordinate analysis calculations I had to do were also written in FORTRAN 77 ...
     
    SkylaRose likes this.
  33. SkylaRose

    SkylaRose Administrator Staff Member

    Like I said before there is nothing wrong with older languges. Every language goes through specifications for this exact reason. C++ for example began life as a C with Classes before it was creditied by the ISO. Microsoft did not offically accept C++ until 1996 (Visual Studio 6.0) and even then provided a very outdated standard of the core language. FORTRAN (which as I am sure you aware is an acronym for FORMULA TRANSLATION even identifies what the language was designed to do. Matrix and scientific calculations. If your good at mathematics, you can learn most of FORTRAN easily within a year or so. Like you, I am bit of a hoader of old books. I have a shelf full of programming books and standards. When I first learnt Ada, I was learning Ada '83, which was 'non-standard' even then, and some of the literature was owned by the DoD. When Ada '95 was released it became much more readily available for mainstream. If either of us walked into a job interview today for a modern programming career, we would be laughed out the building if FORTRAN and Ada were our only vices. Today a modern coder needs to know at least three languages to even get into the field.

    This, is worthless to most newbies.

    [​IMG]
     
    Bwood_Horn likes this.
  34. hornmeister

    hornmeister Tired

    Anyone else know Modula2. Learned it at Uni and never heard of it since.
     
    SkylaRose likes this.
  35. SkylaRose

    SkylaRose Administrator Staff Member

    Hmmm I think it's a systems and general purpose language which is based off Pascal/Ada with some of more complex stuff removed from it. It's not very widely used but it's one of those languages that fits inbetween two others. A bit like C# fits between C and C++, Modula2 would sit between Pascal and Ada. Not a terrible language by any means and it runs mainly on embeded software (can Interface with C) so it has it's uses.

    Here's a small snippet.

    upload_2023-6-21_17-6-52.png

    I could probably re-write that in Ada and the difference would be minimal. I love procedural langauges though, leave the classes and objects for when it's needed. :p
     

Share This Page