• AI and decompilation?

    From gareth evans@3:770/3 to All on Mon Jan 4 11:00:29 2021
    XPost: alt.folklore.computers

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to gareth evans on Mon Jan 4 11:42:52 2021
    XPost: alt.folklore.computers

    On Mon, 4 Jan 2021 11:00:29 +0000
    gareth evans <headstone255@yahoo.com> wrote:

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    Now *that* would be an interesting AI project to see the results
    of. I'm pretty sure the answer to your question is "Nobody knows, please publish when you find out" or thereabouts.

    There's plenty of training material available in the form of open source compiled for all sorts of platforms you just need to decide on an
    AI architecture that's up to the job (hopefully something short of
    Alpha Go Zero), build it (or rent it in "the cloud") and train it. It would still be useful if you had to train one for each instruction set (or
    family).

    The biggest challenge would be comparing the source codes, but code that compiles to an equivalent binary would be good enough as long as it
    didn't cheat (create binary array and call it for example).

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to gareth evans on Mon Jan 4 13:08:10 2021
    XPost: alt.folklore.computers

    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Mon Jan 4 11:05:55 2021
    XPost: alt.folklore.computers

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com> declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    Actually, I think the use of disassemblers et al has fallen away. Modern processors have so many peephole optimizations and out-of-order execution streams that converting an executable back to assembly source is almost meaningless -- and getting back to a high-level language is near impossible. One would have to be an expert at the assembly for a processor
    to have any chance of understanding the result.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Dennis Lee Bieber on Mon Jan 4 17:07:35 2021
    XPost: alt.folklore.computers

    On Mon, 04 Jan 2021 11:05:55 -0500, Dennis Lee Bieber wrote:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com> declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC interpreter in order
    to enhance it, I guess that dis-assemblers and decompilers must now be >>ten-a-penny,
    especially for programs running under Windows where the structure of >>Windows programs is well-known with an assumption that C was the source >>language?

    Actually, I think the use of disassemblers et al has fallen away. Modern processors have so many peephole optimizations and out-of-order execution streams that converting an executable back to assembly source
    is almost meaningless -- and getting back to a high-level language is
    near impossible. One would have to be an expert at the assembly for a processor to have any chance of understanding the result.

    The retro-computing guys - those who are fans of the MC6800 and MC6809 microprocessors anyway, anyway, seem to be getting a rather good semi- interactive disassembler up and running. So far it understands
    executables that run under FLEX, FLEX09 for both 6800 and 6809 and under UniFlex and OS9/level 1 and 2 on a 6809 and can automatically detect
    which OS the binary was compiled for. This is quite impressive, since all
    four OSen have very different API call structures despite FLEX09,UniFlex
    and OS/9 all running on the same chip.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Dennis Lee Bieber on Mon Jan 4 17:47:06 2021
    XPost: alt.folklore.computers

    On 04/01/2021 16:05, Dennis Lee Bieber wrote:
    Actually, I think the use of disassemblers et al has fallen away. Modern processors have so many peephole optimizations and out-of-order execution streams that converting an executable back to assembly source is almost meaningless -- and getting back to a high-level language is near impossible. One would have to be an expert at the assembly for a processor
    to have any chance of understanding the result.



    AF6VN DE G4SDW

    But we Radio Hams thrive on such low level technicalities! :-)

    73.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Lurndal@3:770/3 to Martin Gregorie on Mon Jan 4 17:52:31 2021
    XPost: alt.folklore.computers

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Mon, 04 Jan 2021 11:05:55 -0500, Dennis Lee Bieber wrote:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com>
    declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC interpreter in order
    to enhance it, I guess that dis-assemblers and decompilers must now be >>>ten-a-penny,
    especially for programs running under Windows where the structure of >>>Windows programs is well-known with an assumption that C was the source >>>language?

    Actually, I think the use of disassemblers et al has fallen away.
    Modern processors have so many peephole optimizations and out-of-order
    execution streams that converting an executable back to assembly source
    is almost meaningless -- and getting back to a high-level language is
    near impossible. One would have to be an expert at the assembly for a
    processor to have any chance of understanding the result.

    The retro-computing guys - those who are fans of the MC6800 and MC6809 >microprocessors anyway, anyway, seem to be getting a rather good semi- >interactive disassembler up and running.

    Security experts have several very powerful disassemblers and decompilers
    they use for Intel/AMD/ARM processors.

    https://en.wikibooks.org/wiki/X86_Disassembly/Disassemblers_and_Decompilers

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Pancho on Mon Jan 4 17:51:14 2021
    XPost: alt.folklore.computers

    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dan Espen@3:770/3 to Dennis Lee Bieber on Mon Jan 4 14:18:47 2021
    XPost: alt.folklore.computers

    Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com> declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    Actually, I think the use of disassemblers et al has fallen away. Modern processors have so many peephole optimizations and out-of-order execution streams that converting an executable back to assembly source is almost meaningless -- and getting back to a high-level language is near impossible. One would have to be an expert at the assembly for a processor
    to have any chance of understanding the result.

    Well, in my last job I often used disassemblers.
    IBM z/OS.
    Very useful for understanding IBM code.

    I can't see what out of order execution has to do with a disassembler.
    You disassemble executables.

    Since I understand Assembler, I certainly got meaning out of it
    even if the original was an optimized HLL. You can see what services
    are being called.

    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Eli the Bearded@3:770/3 to headstone255@yahoo.com on Mon Jan 4 20:11:28 2021
    XPost: alt.folklore.computers

    In comp.sys.raspberry-pi, gareth evans <headstone255@yahoo.com> wrote:
    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I suspect AI could be trained to do that, perhaps better than being
    trained to read English. Not sure if anyone has ever tried.

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    The info-sec people use disassemblers all the time, and don't limit
    themselves to compiled from C and intended for Windows binaries. They
    try to extract passwords and locate flaws in firmware for all sorts
    of internet-connected things. I recall Cybergibbons creating some
    tutorials in November or December. It was linked from his twitter
    account, but I didn't pay that close attention to where it was. A
    quick look at his blog and youtube didn't find them, but he's got a
    robust web presence.

    Elijah
    ------
    have you searched if anyone else has reversed engineered it already?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to gareth evans on Mon Jan 4 21:57:32 2021
    XPost: alt.folklore.computers

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI to
    detect them. I remember decompiling in the early 80's but complex modern
    code can often be a challenge to naively reverse engineer a high level understanding from even if you do have source code. Take away sensible
    variable and function names and you are stuffed.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dan Espen@3:770/3 to Pancho on Mon Jan 4 17:50:16 2021
    XPost: alt.folklore.computers

    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Pancho on Mon Jan 4 22:23:14 2021
    XPost: alt.folklore.computers

    On 04/01/2021 21:57, Pancho wrote:
    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI to detect them. I remember decompiling in the early 80's but complex modern
    code can often be a challenge to naively reverse engineer a high level understanding from even if you do have source code. Take away sensible variable and function names and you are stuffed.

    Somehow I think that we're not singing from the same hymn sheet.

    Sorry.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Theo@3:770/3 to Dennis Lee Bieber on Mon Jan 4 23:01:05 2021
    XPost: alt.folklore.computers

    Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
    Actually, I think the use of disassemblers et al has fallen away. Modern processors have so many peephole optimizations and out-of-order execution streams that converting an executable back to assembly source is almost meaningless -- and getting back to a high-level language is near impossible. One would have to be an expert at the assembly for a processor
    to have any chance of understanding the result.

    Apple essentially do this for their Rosetta 2 x86-to-ARM converter. They
    take existing x86 executables, which are likely generated by their Xcode
    LLVM compiler. They convert the assembly back into LLVM's intermediate representation, which is the idealised-assembly representation most of the compiler stages work on. Then they push that IR through the regular ARM
    LLVM backend, including optimiser stages, to produce 64-bit ARM executables.

    It's not a language intended for humans to read, but it's high enough for
    the compiler stages to work on. Doing it this way avoids having to emulate
    any ARM instructions.

    Theo

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Dan Espen on Mon Jan 4 23:00:54 2021
    XPost: alt.folklore.computers

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    Without the source how do you know any meaningful variable names in the
    first place?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to gareth evans on Mon Jan 4 23:09:07 2021
    XPost: alt.folklore.computers

    On Mon, 04 Jan 2021 22:23:14 +0000, gareth evans wrote:


    Somehow I think that we're not singing from the same hymn sheet.

    There is an intermediate disassembler style that sits between a
    traditional disassembler and the mythical AI disassembler: that is the 'semi-interactive' type I mentioned. Since I know of at least one of
    these that is currently up and running I probably should have explained
    it better, so here goes:

    What I meant by this is a disassembler that initially generates an
    assembly source file but doesn't just save it. Instead it shows that to
    the user in an interactive, scrolling display which allows the user to
    assign names to branch destinations, call targets and addresses of
    variables, while simultaneously storing these in a symbol table, which is
    also viewable, editable on screen and can be saved and later reloaded at
    the start of a future session.

    Most importantly, at any point you can rerun the disassembly, but this
    time the disassembler will use the symbol table to include names in the
    symbol table in its output. IOW, after you've added one or more
    name/address pairs to the symbol table, rerunning the disassembler will incorporate these into the new version of the disassembled source.
    Working this way is obviously faster and less error-prone than saving the
    first pass disassembler output and manually editing it.

    For extra points the disassembler should be able to:

    - start by reading a predefined symbol set that contains the OS API names
    and names of OS public variables.

    - be configurable to search for and read in more than one symbol set.

    - use a modified version of the symbol table editor to add comments that
    will appear as comment blocks in front of a nominated address or after
    the address content as a trailing content.

    - generate a disassembled source file that can be assembled without
    needing further changes.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to Dan Espen on Mon Jan 4 16:54:04 2021
    XPost: alt.folklore.computers

    Dan Espen <dan1espen@gmail.com> wrote:
    Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com>
    declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    Actually, I think the use of disassemblers et al has fallen away.
    Modern processors have so many peephole optimizations and out-of-order
    execution streams that converting an executable back to assembly source is >> almost meaningless -- and getting back to a high-level language is near
    impossible. One would have to be an expert at the assembly for a processor >> to have any chance of understanding the result.

    Well, in my last job I often used disassemblers.
    IBM z/OS.
    Very useful for understanding IBM code.

    I was going to say that disassemblers for IBM seem to work fairly well.
    I’ve used them a few times.


    I can't see what out of order execution has to do with a disassembler.
    You disassemble executables.

    Since I understand Assembler, I certainly got meaning out of it
    even if the original was an optimized HLL. You can see what services
    are being called.


    I think, for example, that one disassembler might recognize the SVC
    number.i think it put the macro name in as a comment (LINK, GETMAIN, etc.)


    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to Pancho on Mon Jan 4 16:59:03 2021
    XPost: alt.folklore.computers

    Pancho <Pancho.Dontmaileme@outlook.com> wrote:
    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input
    record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    Without the source how do you know any meaningful variable names in the
    first place?


    I dis a fun side project a few years back. The source for one module of
    PL/I(F) was chooched on the distribution tape, about the last third was missing. I disassembled the object module, and was able to recognize
    variable names and standard compiler macros. I got my restored version back
    to identical to the original, and also a fairly readable source.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From J. Clarke@3:770/3 to Pancho.Dontmaileme@outlook.com on Mon Jan 4 20:42:04 2021
    XPost: alt.folklore.computers

    On Mon, 4 Jan 2021 23:00:54 +0000, Pancho
    <Pancho.Dontmaileme@outlook.com> wrote:

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input
    record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    Without the source how do you know any meaningful variable names in the
    first place?

    You start with the inputs and outputs and work into the algorithms and eventually maybe you can make sense of it.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From J. Clarke@3:770/3 to Pancho.Dontmaileme@outlook.com on Mon Jan 4 20:38:50 2021
    XPost: alt.folklore.computers

    On Mon, 4 Jan 2021 21:57:32 +0000, Pancho
    <Pancho.Dontmaileme@outlook.com> wrote:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing?

    The pieces of the hardware supported by the Blob.

    What is an instruction set,

    The list of binary codes that tell the procesor what to do.

    what is the Binary Blob?

    On the Raspberry Pi it is the non-Open-Source proprietary code that is
    provided by the chip manufacturer, including parts of the boot loader
    and the 3D drivers among other things.

    Why do you need an AI?

    Why not?

    Most compilers leave fingerprints on executables you don't need an AI to >detect them. I remember decompiling in the early 80's but complex modern
    code can often be a challenge to naively reverse engineer a high level >understanding from even if you do have source code. Take away sensible >variable and function names and you are stuffed.

    He's talking about something that you can give a pile of object code
    from an unknown source (I mean _really_ unknown--it could be for Z/OS
    or a VAX or Intel or Alpha or any other architecture, compiled from C
    or PL/I or Fortran or pick a language at random, with it figuring from
    there what the code does.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dan Espen@3:770/3 to Pancho on Mon Jan 4 20:55:36 2021
    XPost: alt.folklore.computers

    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.
    I've had more than one experience in putting those meaningful
    variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input
    record, you now have labels to many of the references to that input
    area.
    I think you can work out how to proceed.

    Without the source how do you know any meaningful variable names in
    the first place?

    The programs were reading our files.
    We already had record layouts for those files.

    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dan Espen@3:770/3 to J. Clarke on Mon Jan 4 20:59:35 2021
    XPost: alt.folklore.computers

    J. Clarke <jclarke.873638@gmail.com> writes:

    On Mon, 4 Jan 2021 23:00:54 +0000, Pancho
    <Pancho.Dontmaileme@outlook.com> wrote:

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input >>> record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    Without the source how do you know any meaningful variable names in the >>first place?

    You start with the inputs and outputs and work into the algorithms and eventually maybe you can make sense of it.

    Yep.

    One place I was working they had a lost source code program
    reconstructed from object code and they were complaining no one
    could work on it because of the variable and routine names.

    Seemed easy enough to me and I fixed it up in a day or 2.

    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Richard Kettlewell@3:770/3 to gareth evans on Tue Jan 5 09:07:21 2021
    XPost: alt.folklore.computers

    gareth evans <headstone255@yahoo.com> writes:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Richard Kettlewell on Tue Jan 5 09:47:47 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 09:07:21 +0000
    Richard Kettlewell <invalid@invalid.invalid> wrote:

    gareth evans <headstone255@yahoo.com> writes:

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    The documentation for the GPU on the RPi has not been published, he seeks to reverse engineer it from the binary code that implements a
    published API on it.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Tue Jan 5 10:29:12 2021
    XPost: alt.folklore.computers

    On 04/01/2021 21:57, Pancho wrote:
    Most compilers leave fingerprints on executables you don't need an AI to detect them. I remember decompiling in the early 80's but complex modern
    code can often be a challenge to naively reverse engineer a high level understanding from even if you do have source code. Take away sensible variable and function names and you are stuffed.
    +1001


    --
    "First, find out who are the people you can not criticise. They are your oppressors."
    - George Orwell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Scott Lurndal on Tue Jan 5 10:28:26 2021
    XPost: alt.folklore.computers

    On 04/01/2021 17:52, Scott Lurndal wrote:
    Martin Gregorie <martin@mydomain.invalid> writes:
    On Mon, 04 Jan 2021 11:05:55 -0500, Dennis Lee Bieber wrote:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com> >>> declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC interpreter in order >>>> to enhance it, I guess that dis-assemblers and decompilers must now be >>>> ten-a-penny,
    especially for programs running under Windows where the structure of
    Windows programs is well-known with an assumption that C was the source >>>> language?

    Actually, I think the use of disassemblers et al has fallen away.
    Modern processors have so many peephole optimizations and out-of-order
    execution streams that converting an executable back to assembly source
    is almost meaningless -- and getting back to a high-level language is
    near impossible. One would have to be an expert at the assembly for a
    processor to have any chance of understanding the result.

    The retro-computing guys - those who are fans of the MC6800 and MC6809
    microprocessors anyway, anyway, seem to be getting a rather good semi-
    interactive disassembler up and running.

    Security experts have several very powerful disassemblers and decompilers they use for Intel/AMD/ARM processors.

    https://en.wikibooks.org/wiki/X86_Disassembly/Disassemblers_and_Decompilers

    Yes. I am certain that certain compilers and certain languages leave a fingerprint, Always THAT resister, used to do THAT job, always that
    particular sequence of assembly to mimic that high level construct.
    I cut my teeth on microprocessor assembly. The C. Some things that are
    neat in assembler are ugly as sin in C. Take a call table. In assembler,
    you set up a range of memory whose contents contain the addresses of subroutines. You load the accumulator with a number, left shift it once,
    add it to the content of a register set to point to the base of that
    memory block, and use that register as pointing to an address whose
    contents are the address you want to 'call' Simple, efficient and
    provided you ensure nothing out of bounds is in the accumulator, bomb proof.

    Now try that in C, you need an array of pointers to functions, and a
    simple check on the index you engage, followed by a declaration to call
    the function whose address is in the array of pointers to functions. I
    never ever managed to get an 8 bit compiler to actually do that. People
    just don't call the contents of an array of pointers to functions.

    Its easier by far to set up a switch statement, which takes care of out
    of bounds defaults, and ends up producing a chain of if..else if.. else conditional calls to hardwired functions.

    That's how you write it, because its pretty much as fast on a pipelined processor, RAM is cheap and comprehensibility beats programming elegance
    hands down in the real world.

    I've examined a lot of compiled machine code and its pretty easy to tell
    what language it is, and what roughly it was written as. Stack based
    variables is a bit of a give away pointing to C or a similar langauge.
    highly optimised compilers of course automatically obfuscate things, but
    that's the fun isn't it?

    I gave up writing assembler for *86 CPUs when the Gnu compiler was
    patently doing a better job than I would in assembler, and the ability
    to write something long winded and easy to understand and have the
    compiler completely rearrange it and turn it into three lines of incomprehensible assembler, was to be respected.

    I think it is up to a limited point entirely possible to make an AI that
    could replace machine code with editable and compilable source code.
    But there will always be the Problem Of Induction. Many many possible constructs in source using an infinite number of random variable and
    function names, could compile to the same object code. And there is no
    way to reinstate the comments either, so it becomes an exercise
    ultimately in hand editing and reinstating the comments manually -
    almost as big a job as writing from scratch.

    I suspect this is how Linux writers write freeware drivers for
    proprietary hardware. Disassemble the manufacturers drivers, and at
    least mimic the program flow, if not the actual source code.


    --
    “I know that most men, including those at ease with problems of the greatest complexity, can seldom accept even the simplest and most
    obvious truth if it be such as would oblige them to admit the falsity of conclusions which they have delighted in explaining to colleagues, which
    they have proudly taught to others, and which they have woven, thread by thread, into the fabric of their lives.”

    ― Leo Tolstoy

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Richard Kettlewell@3:770/3 to Ahem A Rivet's Shot on Tue Jan 5 11:13:03 2021
    XPost: alt.folklore.computers

    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    gareth evans <headstone255@yahoo.com> writes:
    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    The documentation for the GPU on the RPi has not been published,
    he seeks to reverse engineer it from the binary code that implements a published API on it.

    I was under the impression it was a VideoCore IV, which appears to be sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Tue Jan 5 10:51:35 2021
    XPost: alt.folklore.computers

    On 04/01/2021 23:00, Pancho wrote:
    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back.  It's actually pretty easy, a somewhat rote process.
    Find the read input instruction.  Since you know the layout of the input
    record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.


    Without the source how do you know any meaningful variable names in the
    first place?

    Well you have hints. From what the code does...lets say you have code
    that loads data from two stack based memory locations adds them together
    and used then to access what is clearly an array, - that gives a strong
    hint that the original variables can be integers, and the index one is
    simply a temporary way to get a value into that array, so you call that
    'i' or 'arrayIndex' pro tem...

    Then once you have an idea as to what data that array holds, you can
    update it and the index to something more meaningful.

    The whole process is actually covered in philosophy: It is the problem
    of induction. How do you work back from results to causes?

    Given that the answer to Life The Universe and Everything was '42', what
    in fact was the question? (40+2)? (6x7)?

    There are an infinite number of expressions that give that answer, and
    an infinite number that don't.

    This is where Karl Poppers philosophy of science steps in. Instead of
    regarding there to be One True Reason why science works, namely that
    scientists are in the business of discovering the Truth, he pointed out
    that just because stuff worked (and 6x7 does indeed give 42) that was no
    reason to suppose that some other completely different construct might
    not work equally as well, and that had indeed happened with relativity
    and Newtonian gravity.

    The Problem of Induction is that many theories can give the same
    predicted result. Sherlock Holmes is a sham. The Dog That Didnt Bark in
    the Night didn't bark, allegedly, because it knew the thief. Why? It
    might have been abducted by aliens, drugged, actually out hunting
    rabbits, in a soundproof box, or the Russians did it using a robot. or
    just too plumb wore out with old age to care.

    The truth is not provable. All we have is stuff that works. Given
    running machine code, there are an infinite number of source codes that
    might have produced it, and an infinite number that did not.

    We aren't there, ultimately, to reproduce *the* exact source, but to
    arrive at *an* editable source, that we can use.
    Like science, and religion, it doesn't have to be true, to be useful,
    and like science, and religion, its ultimate content will be forever truth-indecidable.

    --
    "First, find out who are the people you can not criticise. They are your oppressors."
    - George Orwell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Dan Espen on Tue Jan 5 10:38:16 2021
    XPost: alt.folklore.computers

    On 05/01/2021 01:55, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?

    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing? What is an instruction set, what is the Binary
    Blob? Why do you need an AI?

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.
    I've had more than one experience in putting those meaningful
    variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input >>> record, you now have labels to many of the references to that input
    area.
    I think you can work out how to proceed.

    Without the source how do you know any meaningful variable names in
    the first place?

    The programs were reading our files.
    We already had record layouts for those files.


    Yes, I understand how you can disassemble a simple program. I did it
    myself in the 1980s.

    However modern programs are much more complex. They are built upon many
    levels of indirection, libraries, composition, inheritance, function
    pointers, events, etc, etc... We use structure, design patterns and such
    like to allow us to recognise complex ideas quickly. That gets lost in compilation.

    I just can't see how I would reverse engineer an understanding of
    anything but the most simple disassembly in any reasonable time frame.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Dan Espen on Tue Jan 5 11:45:43 2021
    XPost: alt.folklore.computers

    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.

    ISTR that my attack on the executable started by seeking out lines
    of code that might be subroutine calls, "JSR PC, address" in the
    PDP11 code. This served to create a number of identifiable and
    separate blocks from which to proceed.

    Of course, this was much easier as it was a stand-alone paper
    tape program with no operating system underneath to muddy the
    water.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to J. Clarke on Tue Jan 5 11:54:18 2021
    XPost: alt.folklore.computers

    On 05/01/2021 01:38, J. Clarke wrote:

    He's talking about something that you can give a pile of object code
    from an unknown source (I mean _really_ unknown--it could be for Z/OS
    or a VAX or Intel or Alpha or any other architecture, compiled from C
    or PL/I or Fortran or pick a language at random, with it figuring from
    there what the code does.


    Indeed!

    I've discussed this before (And probably too often according to
    my biographers and stalkers! but I'm interested in computers for
    themselves, as wonderful complex machines, and not interested in
    what you can use them for.

    My frustration lies with the Raspberry Pi series that come,
    for very little outlay of pennies, with a multi processor
    graphics chip which is believed to exceed the capabilities of
    the associated ARM processor but about which no detailed
    information is forthcoming.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Tue Jan 5 11:52:10 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 10:51:35 +0000, The Natural Philosopher wrote:

    We aren't there, ultimately, to reproduce *the* exact source, but to
    arrive at *an* editable source, that we can use.
    Like science, and religion, it doesn't have to be true, to be useful,
    and like science, and religion, its ultimate content will be forever truth-indecidable.

    +1


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Adrian Caspersz@3:770/3 to gareth evans on Tue Jan 5 11:26:13 2021
    XPost: alt.folklore.computers

    On 04/01/2021 11:00, gareth evans wrote:

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    If that became possible, it would not be a far step for an AI machine to self-analyse itself or another AI machine. It could make clones and
    unwittingly modify them.

    Who knows where that could lead, or what mutations could happen? Life?


    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    The Chinese would be very interested in you.

    I'm sure some of the architecture is provided in layers, some public
    like frame buffers and some not like acceleration features. So your
    machine code experiments could be done on the former, to learn to walk
    first. Or choose another more open graphics chipset if you need more documentation to get to first base. Perhaps there is on a low end mobile
    phone?

    Here's a manual way of reverse engineering random chinese hardware.

    [016] IT9919 Hacking - part 1 - Reading firmware with flashrom
    https://www.youtube.com/watch?v=j7JRosD_ua8

    Your AI solution would have to replicate the ability of the human.

    --
    Adrian C

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Richard Kettlewell on Tue Jan 5 11:56:23 2021
    XPost: alt.folklore.computers

    On 05/01/2021 09:07, Richard Kettlewell wrote:
    gareth evans <headstone255@yahoo.com> writes:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?


    Because no such manuals are available. The BroadCom GPUs are
    a closely guarded proprietary secret to hoi polloi.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to The Natural Philosopher on Tue Jan 5 12:06:29 2021
    XPost: alt.folklore.computers

    On 05/01/2021 10:51, The Natural Philosopher wrote:

    The whole process is actually covered in philosophy: It is the problem
    of induction. How do you work back from results to causes?

    Given that the answer to Life The Universe and Everything was '42', what
    in fact was the question? (40+2)? (6x7)?

    There are an infinite number of expressions that give that answer, and
    an infinite number that don't.

    This is where Karl Poppers philosophy of science steps in. Instead of regarding there to be One True Reason why science works, namely that scientists are in the business of discovering the Truth, he pointed out
    that just because stuff worked (and 6x7 does indeed give 42) that was no reason to suppose that some other completely different construct might
    not work equally as well, and that had indeed happened with relativity
    and Newtonian gravity.

    The Problem of Induction is that many theories can give the same
    predicted result. Sherlock Holmes is a sham. The Dog That Didnt Bark in
    the Night didn't bark, allegedly, because it knew the thief. Why? It
    might have been abducted by aliens, drugged, actually out hunting
    rabbits, in a soundproof box, or the Russians did it using a robot. or
    just too plumb wore out with old age to care.

    The truth is not provable. All we have is stuff that works. Given
    running machine code, there are an infinite number of source codes that
    might have produced it, and an infinite number that did not.

    We aren't there, ultimately, to reproduce *the* exact source, but to
    arrive at *an* editable source, that we can use.
    Like science, and religion, it doesn't have to be true, to be useful,
    and like science, and religion, its ultimate content will be forever truth-indecidable.


    That's an interesting and thought-provoking aside!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Richard Kettlewell on Tue Jan 5 12:12:11 2021
    XPost: alt.folklore.computers

    On 05/01/2021 11:13, Richard Kettlewell wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    gareth evans <headstone255@yahoo.com> writes:
    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    The documentation for the GPU on the RPi has not been published,
    he seeks to reverse engineer it from the binary code that implements a
    published API on it.

    I was under the impression it was a VideoCore IV, which appears to be sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545 https://github.com/itszor/vc4-toolchain


    The first of those does not produce anything.

    Does the second describe the GPU in some detail and describe
    the instruction set such that I might produce my own binary blob
    to do something completely different?

    Also, AIUI, a different GPU has been incorporated into the
    64-bit RPis.

    Anyway, thanks for your input.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From J. Clarke@3:770/3 to invalid@invalid.invalid on Tue Jan 5 07:32:38 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 09:07:21 +0000, Richard Kettlewell <invalid@invalid.invalid> wrote:

    gareth evans <headstone255@yahoo.com> writes:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    Because there are features not described in the reference manual.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Eager@3:770/3 to Pancho on Tue Jan 5 12:46:13 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 10:38:16 +0000, Pancho wrote:

    I just can't see how I would reverse engineer an understanding of
    anything but the most simple disassembly in any reasonable time frame.

    One of my former colleagues did a Ph.D. on it:

    https://kar.kent.ac.uk/61349/

    --
    Using UNIX since v6 (1975)...

    Use the BIG mirror service in the UK:
    http://www.mirrorservice.org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Thomas Koenig@3:770/3 to Adrian Caspersz on Tue Jan 5 13:07:22 2021
    XPost: alt.folklore.computers

    Adrian Caspersz <email@here.invalid> schrieb:

    If that became possible, it would not be a far step for an AI machine to self-analyse itself or another AI machine. It could make clones and unwittingly modify them.

    The solution to the halting problem :-)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Thomas Koenig@3:770/3 to The Natural Philosopher on Tue Jan 5 13:06:44 2021
    XPost: alt.folklore.computers

    The Natural Philosopher <tnp@invalid.invalid> schrieb:
    The C. Some things that are
    neat in assembler are ugly as sin in C.

    One thing that is hard to do with C is to have different entries
    to the same function, something like:

    bar:
    .cfi_startproc
    ... do something
    foo:
    ... do something else

    ret

    and then either call foo or bar.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Richard Kettlewell@3:770/3 to gareth evans on Tue Jan 5 13:39:07 2021
    XPost: alt.folklore.computers

    gareth evans <headstone255@yahoo.com> writes:
    On 05/01/2021 11:13, Richard Kettlewell wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    The documentation for the GPU on the RPi has not been published,
    he seeks to reverse engineer it from the binary code that implements a
    published API on it.

    I was under the impression it was a VideoCore IV, which appears to be
    sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain

    The first of those does not produce anything.

    It’s the VideoCore IV 3D Architecture Reference Guide.

    Does the second describe the GPU in some detail and describe
    the instruction set such that I might produce my own binary blob
    to do something completely different?

    It’s a toolchain port.

    --
    https://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Thomas Koenig on Tue Jan 5 13:42:14 2021
    XPost: alt.folklore.computers

    On 05/01/2021 13:07, Thomas Koenig wrote:
    Adrian Caspersz <email@here.invalid> schrieb:

    If that became possible, it would not be a far step for an AI machine to
    self-analyse itself or another AI machine. It could make clones and
    unwittingly modify them.

    The solution to the halting problem :-)

    I like it when you talk dirty...


    --
    In a Time of Universal Deceit, Telling the Truth Is a Revolutionary Act.

    - George Orwell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Bob Eager on Tue Jan 5 13:43:03 2021
    XPost: alt.folklore.computers

    On 05/01/2021 12:46, Bob Eager wrote:
    On Tue, 05 Jan 2021 10:38:16 +0000, Pancho wrote:

    I just can't see how I would reverse engineer an understanding of
    anything but the most simple disassembly in any reasonable time frame.

    One of my former colleagues did a Ph.D. on it:

    https://kar.kent.ac.uk/61349/


    That looks like a surprisingly good fit for my idle, poorly thought out, wonderings.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Thomas Koenig on Tue Jan 5 13:41:14 2021
    XPost: alt.folklore.computers

    On 05/01/2021 13:06, Thomas Koenig wrote:
    The Natural Philosopher <tnp@invalid.invalid> schrieb:
    The C. Some things that are
    neat in assembler are ugly as sin in C.

    One thing that is hard to do with C is to have different entries
    to the same function, something like:

    bar:
    .cfi_startproc
    ... do something
    foo:
    ... do something else

    ret

    and then either call foo or bar.

    Indeed.

    I had to write an extended but of assemble once to fit in 2K eprom - a
    bios for larger disks using larger sectors than standard msdos.

    I was frustratingly about 80 bytes short.
    I looked at the code for a long time trying to think what I could use in various places - and found something.
    The original cider was always in the habit of using the same two
    register - AX and BX, as scratch, (Sometimes he used DX as well)
    so every subroutine started with push AX, PUSH BX, and ended with POP
    BX, POP AX, RET. Sometimes he used DX as well

    that was three words or four . But JMP MY_EXIT (or DX_EXIT)was only two...

    DX_EXIT: POP DX
    MY_EXIT: POP BX
    POP AX
    RET

    But that is exactly the sort of things a compiler optimised for code
    size rather than speed, would be expected to do. Find common bits of
    code and jump to them



    --
    Climate Change: Socialism wearing a lab coat.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dan Espen@3:770/3 to Pancho on Tue Jan 5 09:05:56 2021
    XPost: alt.folklore.computers

    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    Yes, I understand how you can disassemble a simple program. I did it
    myself in the 1980s.

    The programs I remember were substantial.
    Otherwise someone would have just wrote a new one instead of trying
    to recover the source.

    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to gareth evans on Tue Jan 5 14:11:33 2021
    XPost: alt.folklore.computers

    gareth evans <headstone255@yahoo.com> wrote:
    Because no such manuals are available. The BroadCom GPUs are
    a closely guarded proprietary secret to hoi polloi.

    Thanks for not writing the hoi polloi :)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Eager@3:770/3 to Pancho on Tue Jan 5 14:23:20 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 13:43:03 +0000, Pancho wrote:

    On 05/01/2021 12:46, Bob Eager wrote:
    On Tue, 05 Jan 2021 10:38:16 +0000, Pancho wrote:

    I just can't see how I would reverse engineer an understanding of
    anything but the most simple disassembly in any reasonable time frame.

    One of my former colleagues did a Ph.D. on it:

    https://kar.kent.ac.uk/61349/


    That looks like a surprisingly good fit for my idle, poorly thought out, wonderings.

    If you have trouble getting a full copy (you shouldn't) let me know. I
    can ask him.



    --
    Using UNIX since v6 (1975)...

    Use the BIG mirror service in the UK:
    http://www.mirrorservice.org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From K. Krause@3:770/3 to gareth evans on Tue Jan 5 16:01:07 2021
    XPost: alt.folklore.computers

    On 04.01.21 12:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,


    I remember DCP16 and DCP24 under OS/8, which I used some years ago
    to disassemble PDP8-binarys.
    Very efficient tools, which didn't do the job automatically, but
    they used tables with symbols, comments and directives how to
    interprete different parts of the binary: code, tables, strings,
    variables and so on.
    Interesting, efficient, great fun. :-)

    Klemens

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Bob Eager@3:770/3 to A. Dumas on Tue Jan 5 14:22:00 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 14:11:33 +0000, A. Dumas wrote:

    gareth evans <headstone255@yahoo.com> wrote:
    Because no such manuals are available. The BroadCom GPUs are a closely
    guarded proprietary secret to hoi polloi.

    Thanks for not writing the hoi polloi :)

    Rare, but good!



    --
    Using UNIX since v6 (1975)...

    Use the BIG mirror service in the UK:
    http://www.mirrorservice.org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Thomas Koenig on Tue Jan 5 15:30:06 2021
    XPost: alt.folklore.computers

    On 05/01/2021 13:06, Thomas Koenig wrote:
    The Natural Philosopher <tnp@invalid.invalid> schrieb:
    The C. Some things that are
    neat in assembler are ugly as sin in C.

    One thing that is hard to do with C is to have different entries
    to the same function, something like:

    bar:
    .cfi_startproc
    ... do something
    foo:
    ... do something else

    ret

    and then either call foo or bar.


    Blimey, that takes me back over 40 years to a neat trick of mine to
    save a couple of bytes (but something today that might get
    you the sack in these times of the high cost of software maintenance!).

    It's a way of passing on the stack a zero / non zero value.

    In PDP11 (Octal!!!!!!!) opcodes ..

    012746
    5046


    the first word says Push the value 5046 onto the stack, but
    the second word, 5046 means clear the next stack entry.

    So, by jumping to the second word of the instruction, you
    push a zero value!

    That it warrants such an involved explanation is very good
    reason why such techniques should be avoided today! :-)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to A. Dumas on Tue Jan 5 15:35:26 2021
    XPost: alt.folklore.computers

    On 05/01/2021 14:11, A. Dumas wrote:
    gareth evans <headstone255@yahoo.com> wrote:
    Because no such manuals are available. The BroadCom GPUs are
    a closely guarded proprietary secret to hoi polloi.

    Thanks for not writing the hoi polloi :)


    ... and yet my multimeter will read AC current! :-)

    ... or, in the office, all electrical equipment has to
    be PAT tested.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Bob Eager on Tue Jan 5 15:22:35 2021
    XPost: alt.folklore.computers

    On 05/01/2021 12:46, Bob Eager wrote:
    On Tue, 05 Jan 2021 10:38:16 +0000, Pancho wrote:

    I just can't see how I would reverse engineer an understanding of
    anything but the most simple disassembly in any reasonable time frame.

    One of my former colleagues did a Ph.D. on it:

    https://kar.kent.ac.uk/61349/


    Thanks for the heads-up.

    Downloaded for off line perusing.

    This has been an interest of mine for some time, and, not
    really being in contact with either industry or acadaemia, I bethought
    me to be a lone wolf, a voice crying in the wilderness, to borrow
    a phrase from the Biblial religionists.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Richard Kettlewell on Tue Jan 5 15:32:08 2021
    XPost: alt.folklore.computers

    On 05/01/2021 13:39, Richard Kettlewell wrote:
    gareth evans <headstone255@yahoo.com> writes:
    On 05/01/2021 11:13, Richard Kettlewell wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    The documentation for the GPU on the RPi has not been published,
    he seeks to reverse engineer it from the binary code that implements a >>>> published API on it.

    I was under the impression it was a VideoCore IV, which appears to be
    sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain

    The first of those does not produce anything.

    It’s the VideoCore IV 3D Architecture Reference Guide.

    Perhaps not available to the Man On The Clapham Omnibus.

    Are you in a privileged position with Broadcom to have
    such access?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to gareth evans on Tue Jan 5 15:40:26 2021
    XPost: alt.folklore.computers

    On 05/01/2021 15:32, gareth evans wrote:
    On 05/01/2021 13:39, Richard Kettlewell wrote:
    gareth evans <headstone255@yahoo.com> writes:
    On 05/01/2021 11:13, Richard Kettlewell wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    The documentation for the GPU on the RPi has not been published, >>>>> he seeks to reverse engineer it from the binary code that implements a >>>>> published API on it.

    I was under the impression it was a VideoCore IV, which appears to be
    sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain

    The first of those does not produce anything.

    It’s the VideoCore IV 3D Architecture Reference Guide.

    Perhaps not available to the Man On The Clapham Omnibus.

    Are you in a privileged position with Broadcom to have
    such access?



    Mea Culpa !!!!!!!!

    Firefox did not display anything but was quietly downloading the PDF
    in the background without me realising!

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Lurndal@3:770/3 to Richard Kettlewell on Tue Jan 5 16:00:14 2021
    XPost: alt.folklore.computers

    Richard Kettlewell <invalid@invalid.invalid> writes:
    gareth evans <headstone255@yahoo.com> writes:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    Unfortunately, broadcom does not play well with others. There is no
    reference manual for their graphics on the SoC used by the RPi
    available without an NDA. Sure, documentation on the ARM core
    is available from arm, but the graphics are proprietary to broadcom.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Lurndal@3:770/3 to gareth evans on Tue Jan 5 16:02:05 2021
    XPost: alt.folklore.computers

    gareth evans <headstone255@yahoo.com> writes:
    On 05/01/2021 11:13, Richard Kettlewell wrote:
    Ahem A Rivet's Shot <steveo@eircom.net> writes:
    Richard Kettlewell <invalid@invalid.invalid> wrote:
    gareth evans <headstone255@yahoo.com> writes:
    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Why would you do that instead of reading a reference manual for the
    target architecture?

    The documentation for the GPU on the RPi has not been published,
    he seeks to reverse engineer it from the binary code that implements a
    published API on it.

    I was under the impression it was a VideoCore IV, which appears to be
    sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain


    The first of those does not produce anything.

    Except a PDF entitled "VideoCore IV 3d Architecture Reference Guide".

    Check your downloads directory.

    e.g.

    Fragment shaders are started automatically each time the FEP accumulates a vector of up to four quads (16
    pixels) to shade together. The quad input data from the FEP is automatically written into per-thread QPU
    registers when the fragment shader is started. The following data is written to these QPU registers, in addition
    to the normal PC address, uniforms base address, and uniforms size:

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to gareth evans on Tue Jan 5 16:42:57 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why
    such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both
    recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a stupid mistake.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Eli the Bearded@3:770/3 to tkoenig@netcologne.de on Tue Jan 5 18:31:09 2021
    XPost: alt.folklore.computers

    In comp.sys.raspberry-pi, Thomas Koenig <tkoenig@netcologne.de> wrote:
    Adrian Caspersz <email@here.invalid> schrieb:
    If that became possible, it would not be a far step for an AI machine to
    self-analyse itself or another AI machine. It could make clones and
    unwittingly modify them.
    The solution to the halting problem :-)

    That olcott fellow in comp.theory, comp.ai.philosophy, comp.lang.c (and
    who knows where else) would like you to believe he has solved that pesky halting problem _already_.

    Elijah
    ------
    suggested http://web.mst.edu/%7Elmhall/WhatToDoWhenTrisectorComes.pdf

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Richard Kettlewell on Tue Jan 5 18:27:45 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 11:13:03 +0000
    Richard Kettlewell <invalid@invalid.invalid> wrote:

    I was under the impression it was a VideoCore IV, which appears to be sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545

    Whoah there, that was proprietary and NDS only last time I looked. Seems Broadcom have been decent while I wasn't looking - good news!

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to gareth evans on Tue Jan 5 18:47:45 2021
    XPost: alt.folklore.computers

    On Tue, 5 Jan 2021 15:35:26 +0000
    gareth evans <headstone255@yahoo.com> wrote:

    On 05/01/2021 14:11, A. Dumas wrote:
    gareth evans <headstone255@yahoo.com> wrote:
    Because no such manuals are available. The BroadCom GPUs are
    a closely guarded proprietary secret to hoi polloi.

    Thanks for not writing the hoi polloi :)


    ... and yet my multimeter will read AC current! :-)

    ... or, in the office, all electrical equipment has to
    be PAT tested.

    Yes and you need your PIN number to use the ATM machine.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to Martin Gregorie on Tue Jan 5 20:12:41 2021
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why
    such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a stupid mistake.

    I avoid that technique - it invites other stupid mistakes.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to The Natural Philosopher on Tue Jan 5 20:12:39 2021
    XPost: alt.folklore.computers

    On 2021-01-05, The Natural Philosopher <tnp@invalid.invalid> wrote:

    Given that the answer to Life The Universe and Everything was '42',
    what in fact was the question? (40+2)? (6x7)?

    9x6 - if you're working in base 13.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to Ahem A Rivet's Shot on Tue Jan 5 20:15:49 2021
    XPost: alt.folklore.computers

    On 2021-01-05, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On Tue, 5 Jan 2021 15:35:26 +0000
    gareth evans <headstone255@yahoo.com> wrote:

    On 05/01/2021 14:11, A. Dumas wrote:

    gareth evans <headstone255@yahoo.com> wrote:

    Because no such manuals are available. The BroadCom GPUs are
    a closely guarded proprietary secret to hoi polloi.

    Thanks for not writing the hoi polloi :)

    ... and yet my multimeter will read AC current! :-)

    ... or, in the office, all electrical equipment has to
    be PAT tested.

    Yes and you need your PIN number to use the ATM machine.

    This message has been brought to you by the
    Department of Redundancy Department (just down
    the hall from the Department of Incomplete

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Charlie Gibbs on Tue Jan 5 20:20:27 2021
    On 05/01/2021 20:12, Charlie Gibbs wrote:
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why
    such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both
    recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a stupid
    mistake.

    I avoid that technique - it invites other stupid mistakes.


    +1

    Why any coder would want a procname with different calling lists is
    beyond me.

    To object to having x_procname and y_procname etc suggests a coder
    is not focussed on the matter in hand but is religiously adhering to
    some irrelevant convention.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to gareth evans on Tue Jan 5 20:51:33 2021
    XPost: alt.folklore.computers

    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    Modern compilers of any language output a structured executable file,
    such as Portable Execution format for Windows and ELF for Linux.

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    That's two separate problems. The first is taking any block of binary
    and identifying if it contains an executable format of a particular
    processor architecture and OS.

    The second is taking a known executable format, turning it in to a human readable form, such as a high level language - which doesn't have to be
    the same language it was written in.

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    That's a third problem. No matter how good your program is that
    identified and produces pseudo-source code, it needs someone to put in a
    huge amount of work to interpret and document the driver creating
    certain structures in memory and poking values in to registers.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to J. Clarke on Tue Jan 5 14:06:56 2021
    XPost: alt.folklore.computers

    J. Clarke <jclarke.873638@gmail.com> wrote:
    On Mon, 4 Jan 2021 21:57:32 +0000, Pancho
    <Pancho.Dontmaileme@outlook.com> wrote:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing?

    The pieces of the hardware supported by the Blob.

    What is an instruction set,

    The list of binary codes that tell the procesor what to do.

    what is the Binary Blob?

    On the Raspberry Pi it is the non-Open-Source proprietary code that is provided by the chip manufacturer, including parts of the boot loader
    and the 3D drivers among other things.

    Why do you need an AI?

    Why not?

    Most compilers leave fingerprints on executables you don't need an AI to
    detect them. I remember decompiling in the early 80's but complex modern
    code can often be a challenge to naively reverse engineer a high level
    understanding from even if you do have source code. Take away sensible
    variable and function names and you are stuffed.

    He's talking about something that you can give a pile of object code
    from an unknown source (I mean _really_ unknown--it could be for Z/OS
    or a VAX or Intel or Alpha or any other architecture, compiled from C
    or PL/I or Fortran or pick a language at random, with it figuring from
    there what the code does.


    The object code format would give you a clue, at least for most mainstream architectures.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to The Natural Philosopher on Tue Jan 5 14:06:57 2021
    XPost: alt.folklore.computers

    The Natural Philosopher <tnp@invalid.invalid> wrote:
    On 04/01/2021 17:52, Scott Lurndal wrote:
    Martin Gregorie <martin@mydomain.invalid> writes:
    On Mon, 04 Jan 2021 11:05:55 -0500, Dennis Lee Bieber wrote:

    On Mon, 4 Jan 2021 11:00:29 +0000, gareth evans <headstone255@yahoo.com> >>>> declaimed the following:

    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC interpreter in order >>>>> to enhance it, I guess that dis-assemblers and decompilers must now be >>>>> ten-a-penny,
    especially for programs running under Windows where the structure of >>>>> Windows programs is well-known with an assumption that C was the source >>>>> language?

    Actually, I think the use of disassemblers et al has fallen away.
    Modern processors have so many peephole optimizations and out-of-order >>>> execution streams that converting an executable back to assembly source >>>> is almost meaningless -- and getting back to a high-level language is
    near impossible. One would have to be an expert at the assembly for a
    processor to have any chance of understanding the result.

    The retro-computing guys - those who are fans of the MC6800 and MC6809
    microprocessors anyway, anyway, seem to be getting a rather good semi-
    interactive disassembler up and running.

    Security experts have several very powerful disassemblers and decompilers
    they use for Intel/AMD/ARM processors.

    https://en.wikibooks.org/wiki/X86_Disassembly/Disassemblers_and_Decompilers >>
    Yes. I am certain that certain compilers and certain languages leave a fingerprint, Always THAT resister, used to do THAT job, always that particular sequence of assembly to mimic that high level construct.
    I cut my teeth on microprocessor assembly. The C. Some things that are
    neat in assembler are ugly as sin in C. Take a call table. In assembler,
    you set up a range of memory whose contents contain the addresses of subroutines. You load the accumulator with a number, left shift it once,
    add it to the content of a register set to point to the base of that
    memory block, and use that register as pointing to an address whose
    contents are the address you want to 'call' Simple, efficient and
    provided you ensure nothing out of bounds is in the accumulator, bomb proof.

    Now try that in C, you need an array of pointers to functions, and a
    simple check on the index you engage, followed by a declaration to call
    the function whose address is in the array of pointers to functions. I
    never ever managed to get an 8 bit compiler to actually do that. People
    just don't call the contents of an array of pointers to functions.

    You still have to set up the arguments for each in assembler, unless they
    all take the same arguments (or a pointer to an argument list)

    You shouldn’t need declarations in C unless you’re using one of those new-fangled compilers that requires them. Old code should still be
    supported, though.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Vir Campestris@3:770/3 to Richard Kettlewell on Tue Jan 5 21:15:36 2021
    XPost: alt.folklore.computers

    On 05/01/2021 11:13, Richard Kettlewell wrote:
    I was under the impression it was a VideoCore IV, which appears to be sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545 https://github.com/itszor/vc4-toolchain

    I understand that the latest Pi is indeed a VC4.

    Be aware that as a SIMD processor it's ... odd. Very odd.

    That documentation ties up with what I remember about the device, and I
    wish I'd had it when I was working on it.

    Andy

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to The Natural Philosopher on Tue Jan 5 21:20:52 2021
    XPost: alt.folklore.computers

    On 05/01/2021 10:28, The Natural Philosopher wrote:
    Yes. I am certain that certain compilers and certain languages leave a fingerprint, Always THAT resister, used to do THAT job, always that particular sequence of assembly to mimic that high level construct.

    They certainly do, I wrote !ARMalyser to analyse RISC OS executables and
    to aid the conversion from the old 26 bit ARM mode to modern Aarch32. It
    was very obvious if Norcroft C, GCC or handwritten assembly had been
    used by looking at any chunk of the code, not just the obvious file headers.

    I think it is up to a limited point entirely possible to make an AI that could replace  machine code with editable and compilable  source code.
    But there will always be the Problem Of Induction. Many many possible constructs in source using an infinite number of random variable and function  names, could compile to the same object code. And there is no
    way to reinstate the comments either, so it becomes an exercise
    ultimately in hand editing and reinstating the comments manually -
    almost as big a job as writing from scratch.

    I was not attempting to turn the executable in to a high level language,
    but to give the user as much help understanding the assembler code as possible, to aid the conversion.

    At the lowest level identifying what was code and what was data, easy in
    well defined executable formats produced by compilers, but hard in
    handwritten assembler, which had often used every trick in the book to
    squeeze out performance on a 8MHz ARM2 with 512MB of RAM.

    The next step was using knowledge of the Standard C Library functions
    and SWI APIs to annotate the registers passed and returned from the APIs
    and where those registers contain static addresses, the data blocks they
    point to.

    To allow code to be modified with additional instructions to recreate
    flag preserving behaviour of the 26 bit code (in the few cases it is
    actually necessary) and data added to make the larger 32 bit file
    headers, all code and data addresses are identified and converted in to labels.

    ARMalyser outputs in the standard Object Assembler syntax so it can be reassembled to produce an identical executable, and subsequently
    modified. It can also add syntax colouring in various formats such as
    XML, HTML/CSS for viewing.

    If you were in marketing you could say the code which does this is 'AI',
    but its really a huge chunk of tangled heuristics, which works well most
    of the time, but occasionally miss-identifies code or data. Its a bit
    too eager to identify code, due to the tricks assembler programmers
    used, if I ripped all that out and only worked on compiler generated executables, it would be a lot more reliable.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to gareth evans on Tue Jan 5 14:25:36 2021
    XPost: alt.folklore.computers

    gareth evans <headstone255@yahoo.com> wrote:
    On 04/01/2021 22:50, Dan Espen wrote:
    Pancho <Pancho.Dontmaileme@outlook.com> writes:

    Most compilers leave fingerprints on executables you don't need an AI
    to detect them. I remember decompiling in the early 80's but complex
    modern code can often be a challenge to naively reverse engineer a
    high level understanding from even if you do have source code. Take
    away sensible variable and function names and you are stuffed.

    I've had more than one experience in putting those meaningful variable
    names right back. It's actually pretty easy, a somewhat rote process.
    Find the read input instruction. Since you know the layout of the input
    record, you now have labels to many of the references to that input
    area.

    I think you can work out how to proceed.

    ISTR that my attack on the executable started by seeking out lines
    of code that might be subroutine calls, "JSR PC, address" in the
    PDP11 code. This served to create a number of identifiable and
    separate blocks from which to proceed.

    Of course, this was much easier as it was a stand-alone paper
    tape program with no operating system underneath to muddy the
    water.


    Most architectures seem to be simpler than x86 with its mix of random instruction lengths. Start at almost any byte and a disassembler would
    probably be able to find a run of “instructions” that don’t make any sense
    when examined by a human. Disassemblers I have worked with allow for human input to mark constants, for example, and allow them to be skipped.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to Thomas Koenig on Tue Jan 5 14:25:37 2021
    XPost: alt.folklore.computers

    Thomas Koenig <tkoenig@netcologne.de> wrote:
    The Natural Philosopher <tnp@invalid.invalid> schrieb:
    The C. Some things that are
    neat in assembler are ugly as sin in C.

    One thing that is hard to do with C is to have different entries
    to the same function, something like:

    bar:
    .cfi_startproc
    ... do something
    foo:
    ... do something else

    ret

    and then either call foo or bar.


    Simple in PL/I, although it turns out there is more overhead than you’d think, particularly if foo and bar have different return types. I used
    multiple entries extensively in the Iron Spring PL/I compiler, but it turns
    out the “package” construct (once I implemented it) is much cleaner. Multiple entries is also error-prone if the entries have different
    parameters.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to gareth evans on Tue Jan 5 22:23:31 2021
    On Tue, 05 Jan 2021 20:20:27 +0000, gareth evans wrote:

    On 05/01/2021 20:12, Charlie Gibbs wrote:
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why
    such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both
    recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a
    stupid mistake.

    I avoid that technique - it invites other stupid mistakes.


    +1

    Why any coder would want a procname with different calling lists is
    beyond me.

    To object to having x_procname and y_procname etc suggests a coder is
    not focussed on the matter in hand but is religiously adhering to some irrelevant convention.

    Its very useful indeed in Java: its often helpful to use the same name
    with different parameter lists for constructors and also for methods that
    all do similar jobs, e.g for outputting values from a class its helpful
    to use the same method name, with different parameter lists say:

    getValue(String caption, int value);
    getValue(String caption, double value);
    getValue(String caption, boolean value);

    where inventing a set of different method names adds little clarity to
    the code and about the only likely mistake is to try to use it with an unsupported type of value - which will cause a compilation error as you
    might expect.

    Similarly, the ability to something similar in Algol 68, is equally
    convenient ana, IME anyway, doesn't make the code any more error prone or
    less readable.

    In both languages, context selects the appropriate method or proc and
    using an undefined variation gets you a compilation error, despite Algol
    68's tendency to widen numeric values to fit a parameter definition.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Peter Flass on Tue Jan 5 22:27:26 2021
    XPost: alt.folklore.computers

    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler
    accepts the old K&R C first edition procedure declaration syntax. I wish
    more compilers worked this way.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to druck on Tue Jan 5 22:51:12 2021
    XPost: alt.folklore.computers

    On 05/01/2021 20:51, druck wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    That's two separate problems. The first is taking any block of binary
    and identifying if it contains an executable format of a particular
    processor architecture and OS.

    The second is taking a known executable format, turning it in to a human readable form, such as a high level language - which doesn't have to be
    the same language it was written in.

    Sorry but neither. I'm positing the problem of analysing binary when it
    does not feature in any known published format.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Peter Flass on Tue Jan 5 22:52:42 2021
    XPost: alt.folklore.computers

    On 05/01/2021 21:06, Peter Flass wrote:
    J. Clarke <jclarke.873638@gmail.com> wrote:
    On Mon, 4 Jan 2021 21:57:32 +0000, Pancho
    <Pancho.Dontmaileme@outlook.com> wrote:

    On 04/01/2021 17:51, gareth evans wrote:
    On 04/01/2021 13:08, Pancho wrote:
    On 04/01/2021 11:00, gareth evans wrote:
    Thinking back to my first job, nearly 50 years ago now,
    when I had to dis-assemble DEC's paper tape BASIC
    interpreter in order to enhance it, I guess that
    dis-assemblers and decompilers must now be ten-a-penny,
    especially for programs running under Windows where
    the structure of Windows programs is well-known with
    an assumption that C was the source language?

    But I wonder if Artificial Intelligence could, after
    being fed with numerous instruction sets, take a
    block of binary, and analyse its source without
    any prior knowledge of the instruction set?

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    I think a lot of the problem is defining the question.

    What do you want it to do?


    I don't want it to do anything. I want to play at a low level
    with the thing ... large oaks from little acorns grow.


    Play with what thing?

    The pieces of the hardware supported by the Blob.

    What is an instruction set,

    The list of binary codes that tell the procesor what to do.

    what is the Binary Blob?

    On the Raspberry Pi it is the non-Open-Source proprietary code that is
    provided by the chip manufacturer, including parts of the boot loader
    and the 3D drivers among other things.

    Why do you need an AI?

    Why not?

    Most compilers leave fingerprints on executables you don't need an AI to >>> detect them. I remember decompiling in the early 80's but complex modern >>> code can often be a challenge to naively reverse engineer a high level
    understanding from even if you do have source code. Take away sensible
    variable and function names and you are stuffed.

    He's talking about something that you can give a pile of object code
    from an unknown source (I mean _really_ unknown--it could be for Z/OS
    or a VAX or Intel or Alpha or any other architecture, compiled from C
    or PL/I or Fortran or pick a language at random, with it figuring from
    there what the code does.


    The object code format would give you a clue, at least for most mainstream architectures.


    In the case of the RPi GPU the format is completley unknown.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From gareth evans@3:770/3 to Vir Campestris on Tue Jan 5 22:54:22 2021
    XPost: alt.folklore.computers

    On 05/01/2021 21:15, Vir Campestris wrote:
    On 05/01/2021 11:13, Richard Kettlewell wrote:
    I was under the impression it was a VideoCore IV, which appears to be
    sufficiently documented for GNU toolchain port.

    https://docs.broadcom.com/doc/12358545
    https://github.com/itszor/vc4-toolchain

    I understand that the latest Pi is indeed a VC4.

    Be aware that as a SIMD processor it's ... odd. Very odd.

    That documentation ties up with what I remember about the device, and I
    wish I'd had it when I was working on it.


    You were working on it? What can you tell us?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to Martin Gregorie on Wed Jan 6 00:14:31 2021
    XPost: alt.folklore.computers

    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those
    new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler accepts the old K&R C first edition procedure declaration syntax. I wish
    more compilers worked this way.

    I write functions this way:

    #ifdef PROTOTYPE
    char *foo(char *bar, int baz)
    #else
    char *foo(bar, baz) char *bar; int baz;
    #endif

    One #define in a header file adapts it to any old or new compiler.
    It works for declarations too.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to Martin Gregorie on Wed Jan 6 00:14:32 2021
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 20:20:27 +0000, gareth evans wrote:

    On 05/01/2021 20:12, Charlie Gibbs wrote:

    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why >>>>> such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both
    recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a
    stupid mistake.

    I avoid that technique - it invites other stupid mistakes.

    +1

    Why any coder would want a procname with different calling lists is
    beyond me.

    To object to having x_procname and y_procname etc suggests a coder is
    not focussed on the matter in hand but is religiously adhering to some
    irrelevant convention.

    Its very useful indeed in Java: its often helpful to use the same name
    with different parameter lists for constructors and also for methods that
    all do similar jobs, e.g for outputting values from a class its helpful
    to use the same method name, with different parameter lists say:

    getValue(String caption, int value);
    getValue(String caption, double value);
    getValue(String caption, boolean value);

    I find it easier to just cast "value" to a consistent type.
    But then, I'm a hidebound C weenie...

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Eli the Bearded@3:770/3 to cgibbs@kltpzyxm.invalid on Wed Jan 6 02:17:54 2021
    In comp.sys.raspberry-pi, Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:
    Its very useful indeed in Java: its often helpful to use the same name
    with different parameter lists for constructors and also for methods that
    all do similar jobs, e.g for outputting values from a class its helpful
    to use the same method name, with different parameter lists say:

    getValue(String caption, int value);
    getValue(String caption, double value);
    getValue(String caption, boolean value);

    Java gets that from C++ doesn't it?

    I find it easier to just cast "value" to a consistent type.
    But then, I'm a hidebound C weenie...

    Use a union type with an enum for which value in the value is
    the proper one. That can easily expand to new types that are not
    easily cast.

    enum caption_types {
    CAPTION_UNDEF = 0,
    CAPTION_INT,
    CAPTION_FLOAT,
    CAPTION_RETURN
    };

    struct int_value_t;
    struct float_value_t;
    struct return_value_t;

    typedef struct {
    enum caption_types here;
    int value;
    } int_value_t;

    typedef struct {
    enum caption_types here;
    float value;
    } float_value_t;

    /* try casting this one to something meaningful... */
    typedef struct {
    enum caption_types here;
    int (*value)();
    } return_value_t;

    typedef struct {
    enum caption_types here;
    } id_value_t;


    typedef union {
    id_value_t id_value;
    int_value_t int_value;
    float_value_t float_value;
    return_value_t return_value;
    } compare_value_t;

    typedef char String; /* unused here */

    int
    getCaption(String caption, compare_value_t value)
    {
    int rv = -1;
    if (CAPTION_INT == value.id_value.here) {
    rv = value.int_value.value;
    }
    if (CAPTION_FLOAT == value.id_value.here) {
    rv = value.float_value.value;
    }
    if (CAPTION_RETURN == value.id_value.here) {
    /* use the return value of the function provided */
    rv = (value.return_value.value)();
    }

    return rv;
    }

    Elijah
    ------
    should have used a swtich statement

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Charlie Gibbs on Wed Jan 6 08:25:33 2021
    XPost: alt.folklore.computers

    On Wed, 06 Jan 2021 00:14:31 +0000, Charlie Gibbs wrote:

    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those >>> new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler
    accepts the old K&R C first edition procedure declaration syntax. I
    wish more compilers worked this way.

    I write functions this way:

    #ifdef PROTOTYPE char *foo(char *bar, int baz)
    #else char *foo(bar, baz) char *bar; int baz;
    #endif

    One #define in a header file adapts it to any old or new compiler.
    It works for declarations too.

    That's safe but not necessary, for GNU C anyway.

    The GNU C compiler series maintains backward compatibility to the year
    dot. Dunno about other brands of C compiler, though. Just as well since I
    have some sources that were written under OS/9 v2.4, so use the syntax
    defined in the original K&R edition and I hate having to edit a source
    file just because a new compiler version dropped support for everything
    except the latest syntax.

    Thats one reason I don't like Python.

    COBOL is another language that historically tended to support only the
    latest syntax, which is a pain since source files can be huge. I've
    worked on COBOL program modules that ran to over 5000 lines back in the
    day, i.e before 1978, when COBOL didn't yet support writing separately
    compiled subroutines (no LINKAGE SECTION), though AFAIK COBOL has always supported calling subroutines written in other languages).


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Wed Jan 6 09:36:10 2021
    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox that
    turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a source of
    more bugs


    --
    A lie can travel halfway around the world while the truth is putting on
    its shoes.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Charlie Gibbs on Wed Jan 6 09:32:18 2021
    On 05/01/2021 20:12, Charlie Gibbs wrote:
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:

    On Tue, 05 Jan 2021 15:30:06 +0000, gareth evans wrote:

    That it warrants such an involved explanation is very good reason why
    such techniques should be avoided today! :-)

    Agreed.

    That sort of thing is so much easier in Java or Algol 68, which both
    recognise that methods/procedures with the same name but different
    parameter lists are indeed different pieces of code rather than a stupid
    mistake.

    I avoid that technique - it invites other stupid mistakes.

    +1. The smarter the language the stupider the coder in my experience.
    Same goes for smart phones.




    --
    A lie can travel halfway around the world while the truth is putting on
    its shoes.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Wed Jan 6 10:43:42 2021
    On Wed, 06 Jan 2021 09:36:10 +0000, The Natural Philosopher wrote:

    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox that turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a source of
    more bugs

    ... well, if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    I much prefer strongly typed languages, so the only language I use that
    isn't strongly typed is the bash shell script.



    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Thomas Koenig on Wed Jan 6 14:17:30 2021
    XPost: alt.folklore.computers

    On 5.1.21 15.06, Thomas Koenig wrote:
    The Natural Philosopher <tnp@invalid.invalid> schrieb:
    The C. Some things that are
    neat in assembler are ugly as sin in C.

    One thing that is hard to do with C is to have different entries
    to the same function, something like:

    bar:
    .cfi_startproc
    ... do something
    foo:
    ... do something else

    ret

    and then either call foo or bar.


    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    foo: .. do more ..
    ret

    If the functions have different stacks, there may be
    a need to adjust the stack first before entering the ¨
    second function.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Tauno Voipio on Wed Jan 6 12:42:05 2021
    XPost: alt.folklore.computers

    On Wed, 6 Jan 2021 14:17:30 +0200
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    I recall optimising things like that by changing the last two lines
    to:
    jmp foo

    foo: .. do more ..
    ret

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to Ahem A Rivet's Shot on Wed Jan 6 16:42:53 2021
    XPost: alt.folklore.computers

    On 6.1.21 14.42, Ahem A Rivet's Shot wrote:
    On Wed, 6 Jan 2021 14:17:30 +0200
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    I recall optimising things like that by changing the last two lines
    to:
    jmp foo

    foo: .. do more ..
    ret


    That's what I intended to say. Try the current release of
    GCC for ARM Cortex.

    There may be a register pop before the jump, to keep the
    stack correct.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Lurndal@3:770/3 to Martin Gregorie on Wed Jan 6 15:15:36 2021
    XPost: alt.folklore.computers

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those
    new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler >accepts the old K&R C first edition procedure declaration syntax. I wish
    more compilers worked this way.

    It will not, however, accept the original V6 C "a =+ b" ambiguous syntax,
    so older code may still need to be edited before compilation with a modern compiler.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Scott Lurndal on Wed Jan 6 16:09:40 2021
    XPost: alt.folklore.computers

    On Wed, 06 Jan 2021 15:15:36 +0000, Scott Lurndal wrote:

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those >>> new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler >>accepts the old K&R C first edition procedure declaration syntax. I wish >>more compilers worked this way.

    It will not, however, accept the original V6 C "a =+ b" ambiguous
    syntax, so older code may still need to be edited before compilation
    with a modern compiler.

    I don't *think* I've ever written that or even seen it in valid code.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Scott Lurndal@3:770/3 to Martin Gregorie on Wed Jan 6 17:07:35 2021
    XPost: alt.folklore.computers

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Wed, 06 Jan 2021 15:15:36 +0000, Scott Lurndal wrote:

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of those >>>> new-fangled compilers that requires them. Old code should still be
    supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler >>>accepts the old K&R C first edition procedure declaration syntax. I wish >>>more compilers worked this way.

    It will not, however, accept the original V6 C "a =+ b" ambiguous
    syntax, so older code may still need to be edited before compilation
    with a modern compiler.

    I don't *think* I've ever written that or even seen it in valid code.


    From the V6 C compiler source:

    /*
    * The hash table locations of the keywords
    * are marked; if an identifier hashes to one of
    * these locations, it is looked up in in the keyword
    * table first.
    */
    for (ip=kwtab; (sp = ip->kwname); ip++) {
    i = 0;
    while (*sp)
    i =+ *sp++;
    hshtab[i%hshsiz].hflag = FKEYW;
    }

    Note also that in that version of the compiler, MOS
    (member of structure) names were global and could be
    used with any pointer regardless of type.

    https://github.com/mortdeus/legacy-cc/blob/master/last1120c/c00.c

    This makes it difficult to build the original V6 c compiler using
    a modern compiler :-)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Scott Lurndal on Wed Jan 6 17:38:47 2021
    XPost: alt.folklore.computers

    On Wed, 06 Jan 2021 17:07:35 +0000, Scott Lurndal wrote:

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Wed, 06 Jan 2021 15:15:36 +0000, Scott Lurndal wrote:

    Martin Gregorie <martin@mydomain.invalid> writes:
    On Tue, 05 Jan 2021 14:06:57 -0700, Peter Flass wrote:

    You shouldn’t need declarations in C unless you’re using one of
    those new-fangled compilers that requires them. Old code should
    still be supported, though.

    Last time I tried it, (about 2 months ago), the current GNU C compiler >>>>accepts the old K&R C first edition procedure declaration syntax. I >>>>wish more compilers worked this way.

    It will not, however, accept the original V6 C "a =+ b" ambiguous
    syntax, so older code may still need to be edited before compilation
    with a modern compiler.

    I don't *think* I've ever written that or even seen it in valid code.


    From the V6 C compiler source:

    /*
    * The hash table locations of the keywords * are marked; if an
    identifier hashes to one of * these locations, it is looked up
    in in the keyword * table first.
    */
    for (ip=kwtab; (sp = ip->kwname); ip++) {
    i = 0;
    while (*sp)
    i =+ *sp++;
    hshtab[i%hshsiz].hflag = FKEYW;
    }

    Note also that in that version of the compiler, MOS (member of
    structure) names were global and could be used with any pointer
    regardless of type.

    https://github.com/mortdeus/legacy-cc/blob/master/last1120c/c00.c

    This makes it difficult to build the original V6 c compiler using a
    modern compiler :-)

    Quite!




    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Wed Jan 6 18:09:02 2021
    On 06/01/2021 10:43, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 09:36:10 +0000, The Natural Philosopher wrote:

    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox that
    turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a source of
    more bugs

    ... well, if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    I much prefer strongly typed languages, so the only language I use that
    isn't strongly typed is the bash shell script.


    So do I.




    --
    If I had all the money I've spent on drink...
    ..I'd spend it on drink.

    Sir Henry (at Rawlinson's End)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Wed Jan 6 18:29:33 2021
    On Wed, 06 Jan 2021 18:09:02 +0000, The Natural Philosopher wrote:

    On 06/01/2021 10:43, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 09:36:10 +0000, The Natural Philosopher wrote:

    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox
    that turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a source
    of more bugs

    ... well, if you use crappy interpreted languages with untyped
    variables then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    Fair comment. So far when I've needed dynamic web pages, which isn't
    often, PHP has done everything I've needed.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to The Natural Philosopher on Wed Jan 6 18:35:20 2021
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

    C
    C++
    C#
    Kotlin
    Rust etc

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to The Natural Philosopher on Wed Jan 6 18:37:40 2021
    On 06/01/2021 18:09, The Natural Philosopher wrote:
    On 06/01/2021 10:43, Martin Gregorie wrote:
    ... well, if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    Typescript has stronger typing and executes as standard javascript in
    the Browser.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Wed Jan 6 18:37:49 2021
    On 06/01/2021 18:29, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 18:09:02 +0000, The Natural Philosopher wrote:

    On 06/01/2021 10:43, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 09:36:10 +0000, The Natural Philosopher wrote:

    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox
    that turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a source
    of more bugs

    ... well, if you use crappy interpreted languages with untyped
    variables then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    Fair comment. So far when I've needed dynamic web pages, which isn't
    often, PHP has done everything I've needed.


    Php is fine server side, but to get speed with a decent interactive page
    you need JavaScript in the browser, even if its just Ajax.


    --
    The New Left are the people they warned you about.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Andy Burns on Wed Jan 6 18:39:09 2021
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

        C
        C++
        C#
        Kotlin
        Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    --
    The New Left are the people they warned you about.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to The Natural Philosopher on Wed Jan 6 19:03:08 2021
    On 06/01/2021 18:39, The Natural Philosopher wrote:
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

         C
         C++
         C#
         Kotlin
         Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    Use an intermediate language and a virtual machine, similar to Java JVM
    or .net runtime.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Wed Jan 6 19:08:14 2021
    On 06/01/2021 19:03, Pancho wrote:
    On 06/01/2021 18:39, The Natural Philosopher wrote:
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

         C
         C++
         C#
         Kotlin
         Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    Use an intermediate language and a virtual machine, similar to Java JVM
    or .net runtime.
    yeah. I looked it up...

    --
    Future generations will wonder in bemused amazement that the early
    twenty-first century’s developed world went into hysterical panic over a globally average temperature increase of a few tenths of a degree, and,
    on the basis of gross exaggerations of highly uncertain computer
    projections combined into implausible chains of inference, proceeded to contemplate a rollback of the industrial age.

    Richard Lindzen

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to The Natural Philosopher on Wed Jan 6 19:19:07 2021
    On 06/01/2021 19:08, The Natural Philosopher wrote:
    On 06/01/2021 19:03, Pancho wrote:
    On 06/01/2021 18:39, The Natural Philosopher wrote:
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

         C
         C++
         C#
         Kotlin
         Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    Use an intermediate language and a virtual machine, similar to Java
    JVM or .net runtime.
    yeah. I looked it up...


    So my looking it up was a waste of time ;-)

    I've always found web GUI work very difficult. I keep hoping someone
    will make it as simple a native GUI, but it still seems overly difficult.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Wed Jan 6 21:03:51 2021
    On Wed, 06 Jan 2021 18:37:49 +0000, The Natural Philosopher wrote:

    On 06/01/2021 18:29, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 18:09:02 +0000, The Natural Philosopher wrote:

    On 06/01/2021 10:43, Martin Gregorie wrote:
    On Wed, 06 Jan 2021 09:36:10 +0000, The Natural Philosopher wrote:

    On 05/01/2021 22:23, Martin Gregorie wrote:
    In both languages, context selects the appropriate method

    Until it doesn't.

    A day wasted debugging JavaScript to ascertain why IE was totally
    different to Firefox.

    There was an implicit cast happening in IE which wasn't in Firefox
    that turned a 1 into a "1"..

    Context dependency just adds another layer of complexity and a
    source of more bugs

    ... well, if you use crappy interpreted languages with untyped
    variables then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    Fair comment. So far when I've needed dynamic web pages, which isn't
    often, PHP has done everything I've needed.


    Php is fine server side, but to get speed with a decent interactive page
    you need JavaScript in the browser, even if its just Ajax.

    The last time, maybe six months ago, that I needed to use a PHP script
    was to grab data input through a form on the associated web page,
    reformat it into a fixed format e-mail and send that via my MTA to a
    chunk of JAVA that builds requested data files and e-mails them back to
    the requester. This turned out to be fairly simple once I'd thought up a reasonably bullet-proof way to sanitise the input sufficiently to keep
    trolls, scammers and other nuisances out without inconveniencing genuine
    users.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to The Natural Philosopher on Wed Jan 6 21:34:15 2021
    The Natural Philosopher wrote:

    Andy Burns wrote:

    The Natural Philosopher wrote:

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code

    How can you run code compiled for *86 on a ARM based browser?

    It's compiled to something like p-code

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Thu Jan 7 04:07:05 2021
    On 06/01/2021 19:19, Pancho wrote:
    On 06/01/2021 19:08, The Natural Philosopher wrote:
    On 06/01/2021 19:03, Pancho wrote:
    On 06/01/2021 18:39, The Natural Philosopher wrote:
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables
    then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

         C
         C++
         C#
         Kotlin
         Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    Use an intermediate language and a virtual machine, similar to Java
    JVM or .net runtime.
    yeah. I looked it up...


    So my looking it up was a waste of time ;-)

    I've always found web GUI work very difficult. I keep hoping someone
    will make it as simple a native GUI, but it still seems overly difficult.

    Oh. reverse for me. couldn't write an X window program to save my life.
    Quite happy to design stuff in html and javascript tho


    --
    “The fundamental cause of the trouble in the modern world today is that
    the stupid are cocksure while the intelligent are full of doubt."

    - Bertrand Russell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Thu Jan 7 12:59:03 2021
    On Thu, 07 Jan 2021 04:07:05 +0000, The Natural Philosopher wrote:

    On 06/01/2021 19:19, Pancho wrote:
    On 06/01/2021 19:08, The Natural Philosopher wrote:
    On 06/01/2021 19:03, Pancho wrote:
    On 06/01/2021 18:39, The Natural Philosopher wrote:
    On 06/01/2021 18:35, Andy Burns wrote:
    The Natural Philosopher wrote:

    Martin Gregorie wrote:

    if you use crappy interpreted languages with untyped variables >>>>>>>> then you've chosen to accept that sort of thing as normal.

    Sadly javaScript is all you get in a browser

    or wasm, which can run compiled code from

         C
         C++
         C# Kotlin Rust etc

    How can you run code compiled for *86 on a ARM based browser?


    Use an intermediate language and a virtual machine, similar to Java
    JVM or .net runtime.
    yeah. I looked it up...


    So my looking it up was a waste of time ;-)

    I've always found web GUI work very difficult. I keep hoping someone
    will make it as simple a native GUI, but it still seems overly
    difficult.

    Oh. reverse for me. couldn't write an X window program to save my life.
    Quite happy to design stuff in html and javascript tho

    Same, apart from the Javascript and X-Windows: I don't use either.

    However, implementing GUI windows in Java with AWT and Swing is easy
    enough, particularly if you use the 3rd party se.datadosen.riverlayout
    package to control object placement on windows and panels.

    PHP is quite easy to write too, though it can be a bit harder to debug
    than Java. The O'Reilly PHP book is pretty good.

    Curses works well if you just want to format a console screen and, in any
    case, its easy enough to re-implement if you you need its capabilities in
    a language that can't call functions from the C standard library.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Kerr-Mudd,John@3:770/3 to All on Fri Jan 8 09:48:44 2021
    XPost: alt.folklore.computers

    On Wed, 06 Jan 2021 12:42:05 GMT, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On Wed, 6 Jan 2021 14:17:30 +0200
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    I recall optimising things like that by changing the last two
    lines
    to:
    jmp foo

    foo: .. do more ..
    ret


    I'm naive; what's the problem with:


    bar: .cfi_startproc
    ... do something

    ;;; call foo
    ;;; ret
    ; just fallthru to execute foo and exit.

    foo: .. do more ..
    ret


    --
    Bah, and indeed, Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to John" on Fri Jan 8 10:27:51 2021
    XPost: alt.folklore.computers

    On Fri, 8 Jan 2021 09:48:44 -0000 (UTC)
    "Kerr-Mudd,John" <notsaying@127.0.0.1> wrote:

    On Wed, 06 Jan 2021 12:42:05 GMT, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On Wed, 6 Jan 2021 14:17:30 +0200
    Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:

    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    I recall optimising things like that by changing the last two
    lines
    to:
    jmp foo

    foo: .. do more ..
    ret


    I'm naive; what's the problem with:


    bar: .cfi_startproc
    ... do something

    ;;; call foo
    ;;; ret
    ; just fallthru to execute foo and exit.

    foo: .. do more ..
    ret

    Nothing as long as you only have one bar for your foo, often foo
    was common finishing for several bars.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Fri Jan 8 14:45:56 2021
    Den 2021-01-06 kl. 19:37, skrev The Natural Philosopher:

    Fair comment. So far when I've needed dynamic web pages, which isn't
    often, PHP has done everything I've needed.


    Php is fine server side, but to get speed with a decent interactive page
    you need JavaScript in  the browser, even if its just Ajax.


    an language that needs
    * 'loose comparison' ==
    * 'strict comparison' ===

    with accompanying truth tables that are not-so-obvious is just a bad joke.

    <https://www.php.net/manual/en/types.comparisons.php>


    true == 0 -> false
    true === 0 -> false

    true == 1 -> true
    true === 1 -> false



    WTF?

    --
    Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Fri Jan 8 14:39:53 2021
    Den 2021-01-06 kl. 03:17, skrev Eli the Bearded:
    In comp.sys.raspberry-pi, Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
    On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:
    Its very useful indeed in Java: its often helpful to use the same name
    with different parameter lists for constructors and also for methods that >>> all do similar jobs, e.g for outputting values from a class its helpful
    to use the same method name, with different parameter lists say:

    getValue(String caption, int value);
    getValue(String caption, double value);
    getValue(String caption, boolean value);

    Java gets that from C++ doesn't it?

    I find it easier to just cast "value" to a consistent type.
    But then, I'm a hidebound C weenie...

    Use a union type with an enum for which value in the value is
    the proper one. That can easily expand to new types that are not
    easily cast.


    easy ?
    <cut long list of c-statements/>


    How someone can object to the ease of overloading is just beyond me.


    --
    Bjrn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Fri Jan 8 14:56:51 2021
    Den 2021-01-06 kl. 10:32, skrev The Natural Philosopher:


    I avoid that technique - it invites other stupid mistakes.

    +1. The smarter the language the stupider the coder in my experience.
    Same goes for smart phones.


    Most coder are not smart. They do cut & paste with all error that comes
    from it.
    Having a language that compiles everything but fails at run-time is a
    sure way to the debugger and maintenance hell and high costs.

    Some say a good coder get by in any language - I say bullshit.
    The language is the coders tool -nothing else.

    A truck is the truck drivers tool.
    And If I want to move 50 tons of sand efficiently I use a truck - not a tuk-tuk. Even though I recognize that a tuk.tuk can be used. But it is
    the wrong tool for the job.

    And the job _most_ coders have is maintenance. And a stupid language is
    the wrong tool for that.

    Instead - a strongly typed langue is the right tool, since it gives _compile-time-errors_ that are cheap to fix, instead of run-time errors
    that are more expensive to fix. And deployed at customer - and crash ?
    downtime is very expensive - at least if the code does something
    significant for the customer. One of our customer says €150_000/hr for downtime.


    --
    Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to All on Fri Jan 8 15:07:54 2021
    On 08/01/2021 13:39, Björn Lundin wrote:
    Den 2021-01-06 kl. 03:17, skrev Eli the Bearded:
    In comp.sys.raspberry-pi, Charlie Gibbs  <cgibbs@kltpzyxm.invalid> wrote: >>> On 2021-01-05, Martin Gregorie <martin@mydomain.invalid> wrote:
    Its very useful indeed in Java: its often helpful to use the same name >>>> with different parameter lists for constructors and also for methods
    that
    all do similar jobs, e.g for outputting values from a class its helpful >>>> to use the same method name,  with different parameter lists say:

    getValue(String caption, int value);
    getValue(String caption, double value);
    getValue(String caption, boolean value);

    Java gets that from C++ doesn't it?

    I find it easier to just cast "value" to a consistent type.
    But then, I'm a hidebound C weenie...

    Use a union type with an enum for which value in the value is
    the proper one. That can easily expand to new types that are not
    easily cast.


    easy ?
    <cut long list of c-statements/>


    How someone can object to the ease of overloading is just beyond me.


    It's very simple. It makes things that behave very differently look
    exactly the same.

    which is a recipe for disaster

    --
    “But what a weak barrier is truth when it stands in the way of an hypothesis!”

    Mary Wollstonecraft

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Fri Jan 8 15:56:10 2021
    On Fri, 08 Jan 2021 15:07:54 +0000, The Natural Philosopher wrote:

    It's very simple. It makes things that behave very differently look
    exactly the same.

    which is a recipe for disaster

    If you use overloading that way, you're an idiot or a coder trying to
    lock in a job for life...

    To see overloading being used sensibly, look at the TreeMap constructors,
    the String constructors or String.indexOf() methods in the Java Standard Edition API Specification

    There are also some good examples of overloading in "A very Informal Introduction to Algol 68", which, by the way, is not only an excellent
    way to learn A68, but is the only serious programming language manual
    that has made me laugh out loud in places.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to The Natural Philosopher on Fri Jan 8 15:35:51 2021
    On Fri, 8 Jan 2021 15:07:54 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 08/01/2021 13:39, Björn Lundin wrote:

    How someone can object to the ease of overloading is just beyond me.


    It's very simple. It makes things that behave very differently look
    exactly the same.

    That can be a good thing, used well it simply puts irrelevant detail out of sight, used badly it creates as much confusion as #define ONE 2.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to b.f.lundin@gmail.com on Fri Jan 8 18:06:00 2021
    On 2021-01-08, Björn Lundin <b.f.lundin@gmail.com> wrote:

    Den 2021-01-06 kl. 19:37, skrev The Natural Philosopher:

    Fair comment. So far when I've needed dynamic web pages, which isn't
    often, PHP has done everything I've needed.

    Php is fine server side, but to get speed with a decent interactive page
    you need JavaScript in  the browser, even if its just Ajax.

    an language that needs
    * 'loose comparison' ==
    * 'strict comparison' ===

    with accompanying truth tables that are not-so-obvious is just a bad joke.

    <https://www.php.net/manual/en/types.comparisons.php>

    true == 0 -> false
    true === 0 -> false

    true == 1 -> true
    true === 1 -> false

    WTF?

    That sounds like a description of one of those bogus programming
    languages that pops up in humour columns from time to time.
    One of them proposed an operator meaning "is more equal than"
    (shades of Animal Farm).

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's a sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Charlie Gibbs on Fri Jan 8 18:44:44 2021
    On 8 Jan 2021 18:06:00 GMT
    Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:

    On 2021-01-08, Björn Lundin <b.f.lundin@gmail.com> wrote:

    an language that needs
    * 'loose comparison' ==

    Make that value comparison ...

    * 'strict comparison' ===

    ... and value and type comparison

    with accompanying truth tables that are not-so-obvious is just a bad
    joke.

    <https://www.php.net/manual/en/types.comparisons.php>

    true == 0 -> false

    Yep 0 is not a true value

    true === 0 -> false

    Yep 0 is not a boolean

    true == 1 -> true

    Yep 1 is a true value

    true === 1 -> false

    Yep 1 is not a boolean

    WTF?

    Seems fine to me, you just have to understand what it means like
    any other language construct.

    That sounds like a description of one of those bogus programming
    languages that pops up in humour columns from time to time.
    One of them proposed an operator meaning "is more equal than"
    (shades of Animal Farm).

    Nope just someone who doesn't understand the language and wants to complain.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Eli the Bearded@3:770/3 to b.f.lundin@gmail.com on Fri Jan 8 20:02:39 2021
    In comp.sys.raspberry-pi, Björn Lundin <b.f.lundin@gmail.com> wrote:
    Den 2021-01-06 kl. 03:17, skrev Eli the Bearded:
    Use a union type with an enum for which value in the value is
    the proper one. That can easily expand to new types that are not
    easily cast.

    easy ?
    <cut long list of c-statements/>

    It was a complete example with variable and function declarations. A
    similar complete example in another language is not likely to be
    _much_ more concise, unless you count shortening identifiers.

    How someone can object to the ease of overloading is just beyond me.

    Overloading can be a useful thing. I just don't think it is be-all,
    end-all for the problem space, and I wanted to provide a second way the
    task could be done in C besides Charlie Gibbs's "easier to just cast"
    method.

    I've been doing some Arduino programming recently, and while I'm writing
    C, it's clearly C++ overall because of the libraries I'm using, some of
    which are overloading stuff. One of those does things I find awkward
    because it tries to invoke the int method at times I don't want. Eg
    it wants zero to be the ASCII zero instead of ASCII null unless I write
    it as "byte(0)".

    Elijah
    ------
    has been tempted to rewrite the library

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Questor@3:770/3 to tauno.voipio@notused.fi.invalid on Fri Jan 8 21:40:40 2021
    XPost: alt.folklore.computers

    On Wed, 6 Jan 2021 14:17:30 +0200, Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote:
    This is a common construction in compiler-generated
    machine code, if the first function calls another
    just before return.

    bar: .cfi_startproc
    ... do something
    call foo
    ret

    foo: .. do more ..
    ret

    It's a common construction in human-generated assembly as well, at least on the PDP10.

    Instead of

    BAR: [do bar stuff]
    PUSHJ P, FOO
    POPJ, P

    One writes

    BAR: [do bar stuff]
    JRST FOO

    and lets the POPJ at the end of FOO return from the call to BAR. Saves an instruction. In PDP10 land, the mnemonic PJRST is defined to be the JRST instruction in order to alert the reader of this intention, so one would write

    BAR: [do bar stuff]
    PJRST FOO


    Similarly, routines will often pop (restore) saved registers off the stack before returning. Rather than duplicate that code, one uses a PJRST to a label in another routine that does the same thing.

    BAR: PUSH P, T1
    PUSH P, T2
    [do bar stuff]
    TPOPJ2: POP P, T2
    TPOPJ1: POP P, T1
    POPJ P,

    FOO: PUSH P, T1
    PUSH P, T2
    [do foo stuff]
    PJRST TPOPJ2

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Fri Jan 8 21:09:40 2021
    On Tue, 5 Jan 2021 20:20:27 +0000, gareth evans <headstone255@yahoo.com> declaimed the following:

    Why any coder would want a procname with different calling lists is
    beyond me.

    You haven't looked at Ada, which uses the return type and the argument types to determine which variant of a procedure is to be invoked. And may
    OOP languages may also support such when overloading/overriding a parent's method.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Fri Jan 8 21:41:19 2021
    On Thu, 7 Jan 2021 04:07:05 +0000, The Natural Philosopher <tnp@invalid.invalid> declaimed the following:

    Oh. reverse for me. couldn't write an X window program to save my life.
    Quite happy to design stuff in html and javascript tho

    I did X-Window some 30 years ago (DECWindows variant). I'm talking base X-Toolkit level, no such thing as KDE/GTK/wxWindow....

    Even worse, I had to have the X-Window code invoke Graphical Kernel System code for the actual data display (I needed a Display List capability
    as the application was replacing a Ramtek 9300 graphics engine, AND the controlling application(s) were run as separate processes -- one would be responsible for drawing the axes&labels, one would draw colored boxes based upon data read from a large file, one handled creation of rubber band
    regions for filtering said data... And screen refreshes had to be possible without rerunning the original data processes (could take 15-30 minutes
    just to read the data file for the colored boxes, and among refresh events
    was "turning layers on/off" -- like the axes could be hidden, the rubber
    band triggered a refresh each time a line segment was confirmed).


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Charlie Gibbs on Sat Jan 9 02:58:49 2021
    Charlie Gibbs <cgibbs@kltpzyxm.invalid> wrote:
    On 2021-01-08, Björn Lundin <b.f.lundin@gmail.com> wrote:
    with accompanying truth tables that are not-so-obvious is just a bad joke. >>
    <https://www.php.net/manual/en/types.comparisons.php>

    true == 0 -> false
    true === 0 -> false

    true == 1 -> true
    true === 1 -> false

    WTF?

    That sounds like a description of one of those bogus programming
    languages that pops up in humour columns from time to time.
    One of them proposed an operator meaning "is more equal than"
    (shades of Animal Farm).

    Looks entirely reasonable to me, once you accept that == means "evaluates
    to" and === means "is". That can be a useful distinction, and often a
    necessary one in loosely typed languages.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Fri Jan 8 21:52:39 2021
    XPost: alt.folklore.computers

    On Wed, 6 Jan 2021 08:25:33 -0000 (UTC), Martin Gregorie <martin@mydomain.invalid> declaimed the following:



    COBOL is another language that historically tended to support only the
    latest syntax, which is a pain since source files can be huge. I've
    worked on COBOL program modules that ran to over 5000 lines back in the
    day, i.e before 1978, when COBOL didn't yet support writing separately >compiled subroutines (no LINKAGE SECTION), though AFAIK COBOL has always >supported calling subroutines written in other languages).

    LINKAGE SECTION was part of the COBOL-74 standard, and I recall it existed on the Xerox Sigma-6 COBOL that was used at my college when I
    attended (76-80). Our assignments may not have used it -- or we only had a short intro to the concept.

    However, I'm fairly certain my college compiler did not support "copy books"... And since that time-frame meant 24x80 text terminals, and line
    mode text editors, one would have to manually duplicate the section from a listing... Or write the program on the IBM 029 card punch -- feeding the linkage section into it in duplicate mode, then inserting the copy into the second file...



    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Ahem A Rivet's Shot on Sat Jan 9 03:02:45 2021
    Ahem A Rivet's Shot <steveo@eircom.net> wrote:
    Make that value comparison ...
    ... and value and type comparison
    Seems fine to me, you just have to understand what it means like
    any other language construct.

    Ah right, you already covered what I said.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Fri Jan 8 22:23:13 2021
    XPost: alt.folklore.computers

    On Tue, 5 Jan 2021 22:51:12 +0000, gareth evans <headstone255@yahoo.com> declaimed the following:


    Sorry but neither. I'm positing the problem of analysing binary when it
    does not feature in any known published format.

    And no published instruction set either?


    Consider this (assembly source) structure... (I may have some mistakes in it, as my manuals are hiding in a storage facility).

    arg1 data 1
    arg2 data 2
    retval data 0
    ...

    bal,15 dostuff
    data arg1 ;arg1/arg2/retval are the addresses of the data
    data arg2
    data retval
    ...

    dostuff lw,14 *15 ;* is indirect access operator
    stw,14 param1 ;retrieve and save address of param1
    adi,15 1 ;increment link register
    lw,14 *15
    stw,14 param2
    adi,15 1
    ld,10 *param1 ;access param1 data
    mw,10 *param2
    stw,10 *15 ;save result return value
    adi,15 1
    b *15 ;return from routine param1 data 0
    param2 data 0



    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to The Natural Philosopher on Sat Jan 9 12:25:51 2021
    On 07/01/2021 04:07, The Natural Philosopher wrote:

    Oh. reverse for me. couldn't write an X window program to save my life.
    Quite happy to design stuff in html and javascript tho


    Yeah, I didn't mean X, or even rather comically Curses. I meant:
    WinForms, WPF, Swing as opposed to: Angular or React. Even Asp.Net was
    much harder than WinForms.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Pancho on Sat Jan 9 12:46:48 2021
    On 09/01/2021 12:25, Pancho wrote:
    On 07/01/2021 04:07, The Natural Philosopher wrote:

    Oh. reverse for me. couldn't write an X window program to save my
    life. Quite happy to design stuff in html and javascript tho


    Yeah, I didn't mean X, or even rather comically Curses. I meant:
    WinForms, WPF, Swing as opposed to: Angular or React. Even Asp.Net was
    much harder than WinForms.

    never heard of any of them. I guess they are Windows junk,


    --
    “The ultimate result of shielding men from the effects of folly is to
    fill the world with fools.”

    Herbert Spencer

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Sat Jan 9 15:49:44 2021
    On Sat, 09 Jan 2021 12:46:48 +0000, The Natural Philosopher wrote:

    On 09/01/2021 12:25, Pancho wrote:
    On 07/01/2021 04:07, The Natural Philosopher wrote:

    Oh. reverse for me. couldn't write an X window program to save my
    life. Quite happy to design stuff in html and javascript tho


    Yeah, I didn't mean X, or even rather comically Curses. I meant:
    WinForms, WPF, Swing as opposed to: Angular or React. Even Asp.Net was
    much harder than WinForms.

    never heard of any of them. I guess they are Windows junk,

    Curses is purest C - it sits on top of the termcap functions and adds capabilities like pop-up subwindows

    Swing (and AWT) are Java graphics packages included in the standard class library, available since at least Java 2. They are fairly high level
    classes, implementing buttons, menus, scrollable resizable windows etc.
    as well as a mouse interface.



    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Dennis Lee Bieber on Sat Jan 9 15:37:17 2021
    XPost: alt.folklore.computers

    On Fri, 08 Jan 2021 21:52:39 -0500, Dennis Lee Bieber wrote:

    On Wed, 6 Jan 2021 08:25:33 -0000 (UTC), Martin Gregorie <martin@mydomain.invalid> declaimed the following:



    COBOL is another language that historically tended to support only the >>latest syntax, which is a pain since source files can be huge. I've
    worked on COBOL program modules that ran to over 5000 lines back in the >>day, i.e before 1978, when COBOL didn't yet support writing separately >>compiled subroutines (no LINKAGE SECTION), though AFAIK COBOL has always >>supported calling subroutines written in other languages).

    LINKAGE SECTION was part of the COBOL-74 standard, and I recall it existed on the Xerox Sigma-6 COBOL that was used at my college when I attended (76-80). Our assignments may not have used it -- or we only had
    a short intro to the concept.

    However, I'm fairly certain my college compiler did not support
    "copy
    books"... And since that time-frame meant 24x80 text terminals, and line
    mode text editors, one would have to manually duplicate the section from
    a listing... Or write the program on the IBM 029 card punch -- feeding
    the linkage section into it in duplicate mode, then inserting the copy
    into the second file...

    Compiler features do vary: I don't recall seeing LINKAGE section in any
    version of the ICL 1900 COBOL compilers, which I was using 1968-1977. If LINKAGE sections had been available I'm sure I would have used them and
    coded subroutines in COBOL, but though our COBOL code regularly called subroutines, these were all written in PLAN (assembler). From 1978 onward
    I was programming ICL 2900s: 2900 COBOL implemented LINKAGE sections and
    we made extensive use of them to split large COBOL programs into modules.

    After 1984 I wrote very little COBOL, and that was for DEC and MicroFocus compilers. None of these projects used COBOL subroutines: the DEC RDB
    interface module was language agnostic and so LINKAGE sections weren't
    needed. The MicroFocus COBOL projects called C functions.

    COPY books were fairly common on ICL 1900 projects.

    The ICL 2900 world used COPY books too, though it implemented them as
    calls to the Advanced Data Dictionary) rather than as traditional copy libraries, and handled the IDMSX database interactions via a preprocessor
    that converted pseudo-COBOL statements COBOL programs into COBOL
    subroutine calls. The IDMSX schema processor converted schema definitions
    into the COBOL subroutines called by application programs. All quite
    neat, easy to use, and worked very well.



    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Sat Jan 9 18:33:04 2021
    On 09/01/2021 15:49, Martin Gregorie wrote:
    On Sat, 09 Jan 2021 12:46:48 +0000, The Natural Philosopher wrote:

    On 09/01/2021 12:25, Pancho wrote:
    On 07/01/2021 04:07, The Natural Philosopher wrote:

    Oh. reverse for me. couldn't write an X window program to save my
    life. Quite happy to design stuff in html and javascript tho


    Yeah, I didn't mean X, or even rather comically Curses. I meant:
    WinForms, WPF, Swing as opposed to: Angular or React. Even Asp.Net was
    much harder than WinForms.

    never heard of any of them. I guess they are Windows junk,

    Curses is purest C - it sits on top of the termcap functions and adds capabilities like pop-up subwindows

    Swing (and AWT) are Java graphics packages included in the standard class library, available since at least Java 2. They are fairly high level
    classes, implementing buttons, menus, scrollable resizable windows etc.
    as well as a mouse interface.



    Never used java. Runtime is enormous...I know curses.

    Looked at gtk toolkit and decided learning curve too big. And web and
    browser based was in fact more portable than native code


    --
    "In our post-modern world, climate science is not powerful because it is
    true: it is true because it is powerful."

    Lucas Bergkamp

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to Martin Gregorie on Sat Jan 9 18:36:00 2021
    On 09/01/2021 15:49, Martin Gregorie wrote:
    Curses is purest C - it sits on top of the termcap functions and adds capabilities like pop-up subwindows

    It also uses y,x coordinates which drives me up the wall!

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to The Natural Philosopher on Sat Jan 9 19:20:21 2021
    On Sat, 09 Jan 2021 18:33:04 +0000, The Natural Philosopher wrote:

    Never used java. Runtime is enormous...I know curses.

    Depends what the program is: Hello World in Java is 419 bytes (the C
    version is 19554 bytes and the source is smaller too (21 lines, 147 chars
    vs 26 lines, 282 chars) and anyway I like the WORA principle

    Looked at gtk toolkit and decided learning curve too big.

    Thats interesting - I've wondered about learning gtk, but so far have
    always used Java instead: once you grok MVC (message, view, controller)
    program structure) understand how keyboard and how keyboard and mouse
    listeners tie in its all pretty straight forward.

    browser based was in fact more portable than native code

    Yes, I'd well believe that:
    if your program is talking direct to the browser its organisation needn't
    be a lot different to a Java GUI program using the MVC structure:

    - Model contains data storage, input parser, and HTML assembly
    - Controller handles comms with the web browser
    - Viewer functions provided by the web browser.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to druck on Sat Jan 9 19:28:49 2021
    On Sat, 09 Jan 2021 18:36:00 +0000, druck wrote:

    On 09/01/2021 15:49, Martin Gregorie wrote:
    Curses is purest C - it sits on top of the termcap functions and adds
    capabilities like pop-up subwindows

    It also uses y,x coordinates which drives me up the wall!

    But so does termcap - no getting away from that if you want simple and formatted output direct to the console

    -unless you're going to follow TNP's lead and just spit HTML text at Lynx
    or the web browser of your choice.

    - or use PHP to do pretty much the same thing, though this will probably
    result in a more complex program structure if what it does is
    non-trivial.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Sat Jan 9 16:54:20 2021
    On Sat, 9 Jan 2021 19:20:21 -0000 (UTC), Martin Gregorie <martin@mydomain.invalid> declaimed the following:

    Depends what the program is: Hello World in Java is 419 bytes (the C
    version is 19554 bytes and the source is smaller too (21 lines, 147 chars
    vs 26 lines, 282 chars) and anyway I like the WORA principle


    And how big is the byte-code interpreter/JVM needed to /run/ that Java example? Vs the directly executable C program?


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Martin Gregorie on Sat Jan 9 21:05:37 2021
    On Sat, 9 Jan 2021 19:20:21 -0000 (UTC)
    Martin Gregorie <martin@mydomain.invalid> wrote:

    On Sat, 09 Jan 2021 18:33:04 +0000, The Natural Philosopher wrote:

    Never used java. Runtime is enormous...I know curses.

    Depends what the program is: Hello World in Java is 419 bytes (the C

    Of Java Byte Code.

    version is 19554 bytes and the source is smaller too (21 lines, 147 chars

    Of executable code, the Java Byte Code needs a JVM to run it and
    they tend to be memory hogs IME.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Ahem A Rivet's Shot on Sat Jan 9 23:19:26 2021
    On Sat, 09 Jan 2021 21:05:37 +0000, Ahem A Rivet's Shot wrote:

    Of executable code, the Java Byte Code needs a JVM to run it and
    they tend to be memory hogs IME.

    Its not that bad: everything I've written has run well on 32 bit
    hardware: in that environment under Linux the limit tends to be the
    process address space since I never set the swap partition to less that
    twice physical memory.

    In that environment the only time I've seen a Java program have memory
    problems is one of mine that loads potentially very large documents into
    a PostgreSQL DB. It pulls in a lot of library code too, including
    JavaMail, Mstor and the JDBC code needed to talk to PostgreSQL. In all
    cases failures due to running out of memory were the result of exceeding
    the -Xmm defined memory space, i.e. nothing to do with JVM or code size
    because every time that happened, the run was successful after I'd
    increased -Xmm. IIRC that box had around 500MB of RAM.

    Since moving it to a 64-bit system with 4GB RAM and explicitly setting -
    xmm in the shell script that launches it I haven't hit and OOM problems
    with it.

    This issue is no worse than running a large C++ program with dynamically
    loaded library code. In fact it might well be better since the JVM uses a
    JIT compiler to recompile frequently used Java classes to native code
    and, presumably, discards the P-code as soon as its been replaced by
    native code.

    Similarly, a Swing-based roster editor I wrote to support a club I belong
    to only occupies 1.3 MB of RAM with a little 4777 duty slots assigned:
    that's the complete roster of weekend duties over a six month season with
    14 duty assignments on each rostered day.

    So, bottom line: I've developed and run fairly substantial Java programs
    on relatively small Linux boxes and never had issues with running out of memory.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Dennis Lee Bieber on Sat Jan 9 23:48:25 2021
    On Sat, 09 Jan 2021 16:54:20 -0500, Dennis Lee Bieber wrote:

    On Sat, 9 Jan 2021 19:20:21 -0000 (UTC), Martin Gregorie <martin@mydomain.invalid> declaimed the following:

    Depends what the program is: Hello World in Java is 419 bytes (the C >>version is 19554 bytes and the source is smaller too (21 lines, 147
    chars vs 26 lines, 282 chars) and anyway I like the WORA principle


    And how big is the byte-code interpreter/JVM needed to /run/ that
    Java
    example? Vs the directly executable C program?

    The JVM loadable is 18376 bytes, so not exactly huge, but I don't know
    how much, if any, dynamically loaded support code it drags in. But note
    that this is smaller than the hello world program when compiled by the
    current GCC compiler and statically linked.

    But, as I said elsewhere a moderate sized graphical Java program (4000
    lines of source code, not counting comments) that I wrote using the Swing
    GUI occupies 1.3 GB after loading a typical working data set (6 6 month-
    long rosters with 14 rosterable duties per day.

    However, I should hardly need to remind you that C and C++ programs
    aren't always exactly economical when it comes to load size: I remember
    looking at this a long time back when Borland compilers were still a
    thing. IIRC 'hello world' in ANSI C compiled to several 10s of Kbytes and
    the C++ version compiled to 800Kb using the then current version of
    Borland's finest.





    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to Martin Gregorie on Sun Jan 10 02:00:56 2021
    Martin Gregorie <martin@mydomain.invalid> wrote:
    However, I should hardly need to remind you that C and C++ programs
    aren't always exactly economical when it comes to load size: I remember looking at this a long time back when Borland compilers were still a
    thing. IIRC 'hello world' in ANSI C compiled to several 10s of Kbytes and
    the C++ version compiled to 800Kb using the then current version of
    Borland's finest.

    pi@dev:~ $ uname -a
    Linux dev 5.4.79-v7l+ #1373 SMP Mon Nov 23 13:27:40 GMT 2020 armv7l
    GNU/Linux
    pi@dev:~ $ gcc --version
    gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
    pi@dev:~ $ clang --version
    clang version 9.0.1-6+rpi1~bpo10+1

    pi@dev:~ $ cat hello.c
    #include <stdio.h>
    int main(void) {
    printf("Hello, world.\n");
    return 0;
    }
    pi@dev:~ $ gcc -Os -s hello.c -o hello-gcc-dyn
    pi@dev:~ $ gcc -Os -s -static hello.c -o hello-gcc-stat
    pi@dev:~ $ clang -Os -s hello.c -o hello-clang-dyn
    pi@dev:~ $ clang -Os -s -static hello.c -o hello-clang-stat
    pi@dev:~ $ ls -l hello-*
    -rwxr-xr-x 1 pi pi 5624 jan 10 02:56 hello-clang-dyn
    -rwxr-xr-x 1 pi pi 414860 jan 10 02:56 hello-clang-stat
    -rwxr-xr-x 1 pi pi 5544 jan 10 02:55 hello-gcc-dyn
    -rwxr-xr-x 1 pi pi 414820 jan 10 02:56 hello-gcc-stat

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Sun Jan 10 12:17:43 2021
    On 09/01/2021 23:19, Martin Gregorie wrote:
    So, bottom line: I've developed and run fairly substantial Java programs
    on relatively small Linux boxes and never had issues with running out of memory.

    Plenty of code runs out of memory on browsers. In fact the current
    firefox is so bad it often locks up die to something javascipty



    --
    “it should be clear by now to everyone that activist environmentalism
    (or environmental activism) is becoming a general ideology about humans,
    about their freedom, about the relationship between the individual and
    the state, and about the manipulation of people under the guise of a
    'noble' idea. It is not an honest pursuit of 'sustainable development,'
    a matter of elementary environmental protection, or a search for
    rational mechanisms designed to achieve a healthy environment. Yet
    things do occur that make you shake your head and remind yourself that
    you live neither in Joseph Stalin’s Communist era, nor in the Orwellian utopia of 1984.”

    Vaclav Klaus

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Martin Gregorie on Sun Jan 10 12:15:58 2021
    On 09/01/2021 19:28, Martin Gregorie wrote:
    On Sat, 09 Jan 2021 18:36:00 +0000, druck wrote:

    On 09/01/2021 15:49, Martin Gregorie wrote:
    Curses is purest C - it sits on top of the termcap functions and adds
    capabilities like pop-up subwindows

    It also uses y,x coordinates which drives me up the wall!

    But so does termcap - no getting away from that if you want simple and formatted output direct to the console

    -unless you're going to follow TNP's lead and just spit HTML text at Lynx
    or the web browser of your choice.

    - or use PHP to do pretty much the same thing, though this will probably
    result in a more complex program structure if what it does is
    non-trivial.


    I think you don't seem to have grasped the issue with server side versus
    client side. The problem with server side is that it needs a page reload
    to register changes. If on the other hand you download loads of
    javascript then you can use that to make the page dynamic. Even if you
    use AJAX that's still some javascript needed to invoke the callback to
    the server.

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup dialogues
    and menus that expand you need Javascript.

    I once wrote code that downloaded the ENTIRE contents of a company stock
    a to allow it to be rapidly searched. It was not as big as some website background images....javascript is pretty fast, too.


    --
    “It is hard to imagine a more stupid decision or more dangerous way of
    making decisions than by putting those decisions in the hands of people
    who pay no price for being wrong.”

    Thomas Sowell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to The Natural Philosopher on Sun Jan 10 12:33:26 2021
    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating databases and doing a lot of server side stuff, but for popup dialogues
    and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to Ahem A Rivet's Shot on Sun Jan 10 13:18:42 2021
    Ahem A Rivet's Shot wrote:

    The Natural Philosopher wrote:

    for popup dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Yes, using selectors such as :focus, :checked or :target instead of
    event handlers such as onfocus() or onchange(), and if you can ignore
    older browsers.

    You can do a certain amount of form validation with pure html/css, but
    it generally doesn't take long to need *some* javascript, at which point
    you might as well make your life a bit easier and use it in more places
    for consistency.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Peter Flass@3:770/3 to Dennis Lee Bieber on Sun Jan 10 06:40:12 2021
    XPost: alt.folklore.computers

    Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote:
    On Wed, 6 Jan 2021 08:25:33 -0000 (UTC), Martin Gregorie <martin@mydomain.invalid> declaimed the following:



    COBOL is another language that historically tended to support only the
    latest syntax, which is a pain since source files can be huge. I've
    worked on COBOL program modules that ran to over 5000 lines back in the
    day, i.e before 1978, when COBOL didn't yet support writing separately
    compiled subroutines (no LINKAGE SECTION), though AFAIK COBOL has always
    supported calling subroutines written in other languages).

    LINKAGE SECTION was part of the COBOL-74 standard, and I recall it existed on the Xerox Sigma-6 COBOL that was used at my college when I attended (76-80). Our assignments may not have used it -- or we only had a short intro to the concept.

    However, I'm fairly certain my college compiler did not support "copy books"... And since that time-frame meant 24x80 text terminals, and line
    mode text editors, one would have to manually duplicate the section from a listing... Or write the program on the IBM 029 card punch -- feeding the linkage section into it in duplicate mode, then inserting the copy into the second file...


    Either your memory is off or this was some site restriction. I did a lot of COBOL on a Sigma 6, and I’m sure I would have remembered this. I’m trying to recall the dates, but the numbers won’t come - mid 70s maybe? We started using BPM/BTM and moved on to UTS when it was released.

    --
    Pete

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Ahem A Rivet's Shot on Sun Jan 10 13:59:19 2021
    On 10/01/2021 12:33, Ahem A Rivet's Shot wrote:
    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup dialogues
    and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    not really - unless you consider that e.g. onmouseover() or hover: is
    not Javascript and even then if you want to unhide some block, you need
    to be able to address it via the DOM. So you need a getElementbyId(x).style.display='block'; and so on.

    Cant see how to do that in css. willing to find out

    I cant really write a web page the way I want it without javascript
    these days. Ok its not a LOT of javascript.

    --
    “It is hard to imagine a more stupid decision or more dangerous way of
    making decisions than by putting those decisions in the hands of people
    who pay no price for being wrong.”

    Thomas Sowell

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Andy Burns on Sun Jan 10 14:01:23 2021
    On 10/01/2021 13:18, Andy Burns wrote:
    Ahem A Rivet's Shot wrote:

    The Natural Philosopher wrote:

    for popup dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Yes, using selectors such as :focus, :checked or :target instead of
    event handlers such as onfocus() or onchange(), and if you can ignore
    older browsers.

    You can do a certain amount of form validation with pure html/css, but
    it generally doesn't take long to need *some* javascript, at which point
    you might as well make your life a bit easier and use it in more places
    for consistency.


    I think that's pretty much my position. Once you realise you pretty much
    need it, you might as well use it where its simpler than complicated CSS
    or HTML constructions.




    --
    Climate is what you expect but weather is what you get.
    Mark Twain

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From =?UTF-8?Q?Bj=c3=b6rn_Lundin?=@3:770/3 to All on Sun Jan 10 15:12:06 2021
    Den 2021-01-08 kl. 21:02, skrev Eli the Bearded:
    I've been doing some Arduino programming recently, and while I'm writing
    C, it's clearly C++ overall because of the libraries I'm using, some of
    which are overloading stuff.

    And the compiler used is g++.
    So yes it is a kind of c++

    One of those does things I find awkward
    because it tries to invoke the int method at times I don't want. Eg
    it wants zero to be the ASCII zero instead of ASCII null unless I write
    it as "byte(0)".

    And that is of course since you are not used o a (more) strongly typed language. But in the end - it is much better to fight the compiler than
    to work with the debugger. Strongly typed and successful compilation
    usually means correct execution.
    But with strongly typed I do not mean c++ and Java - they are strong typed. Strongly - that is Ada - is where you can have numeric ranges like

    type latitude_type is new Float range -90.0 .. 90.0;
    type longitude_type is new Float range -180.0 .. 180.0;
    type country_type is (dk,uk,se,de,it,bu,sa,...);

    and get compile time error for the following

    function Where_Am_I(longitude : longitude_type;
    latitude : latitude_type) return Country_Type;

    longitude : longitude_type := 42.0;
    latitude : latitude_type := 25.0;
    country : country_type;

    in a not strongly types language

    country := Where_Am_I(latitude, longitude);

    would pass - even if arguments are reversed and, even worse - return
    sa (saudi arabia). which is just plain wrong compared to the declarations.

    In a strongly types language - the compiler would say no - you pass in
    the wrong types compared to the definition.

    a correct call
    country := Where_Am_I(longitude,latitude);
    will return bu (Bulgaria)


    The compiler would save you from
    * disaster if this was a plane and the code was about the destination
    and length there and how much fuel to put in.
    * it protects you against badly written unit tests where swapping
    coordinates would yield the same country
    * it makes it NOT to go to production
    * It makes it unnecessary to spend hours or days in the debugger.

    In short - a very strongly typed language is your best friend when
    programming anything having more than 1_000_000 locs.

    without it - it becomes a nightmare to maintain.


    --
    Björn

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to The Natural Philosopher on Sun Jan 10 15:05:08 2021
    The Natural Philosopher wrote:

    Cant see how to do that in css. willing to find out

    One way is to turn all elements you want to control into checkboxes (or
    radio buttons, maybe even sub-items in a droplist) so the browser
    maintains their GUI state, then style them so they don't look like
    checkboxes, then use css to modify the styles depending on whether their
    states are checked or not.

    Modifying the style might be used to hide/show elements, change their
    colour, make them enabled/disabled, reposition them, etc.

    <https://webdesign.tutsplus.com/tutorials/accordion-component-with-css-checkbox-hack--cms-34105>

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to The Natural Philosopher on Sun Jan 10 14:46:14 2021
    On Sun, 10 Jan 2021 13:59:19 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 10/01/2021 12:33, Ahem A Rivet's Shot wrote:
    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup dialogues
    and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    not really - unless you consider that e.g. onmouseover() or hover: is

    hver: is CSS onmouseover() is JavaScript.

    not Javascript and even then if you want to unhide some block, you need
    to be able to address it via the DOM. So you need a getElementbyId(x).style.display='block'; and so on.

    I've seen hide/unhide done without JavaScript. Admittedly it looks clearer and easier in JavaSript.

    Cant see how to do that in css. willing to find out

    I get the impression that there's a lot that can be done in pure
    CSS but ingenuity tends to be needed and it's sometimes far from obvious
    how things work (based on looking at some examples).

    I cant really write a web page the way I want it without javascript
    these days. Ok its not a LOT of javascript.

    Fair enough, the original intent of JavaScript was simple additions rather than client side applications so it's nice to hear it being treated
    that way.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From TimS@3:770/3 to All on Sun Jan 10 15:13:39 2021
    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net>
    wrote:

    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup dialogues
    and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one depends on the choice made in the previous one. And the choices in them, or even whether they are presented at all, depends on what you read out of your databases server-side.

    --
    Tim

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From TimS@3:770/3 to Andy Burns on Sun Jan 10 15:14:38 2021
    On 10 Jan 2021 at 13:18:42 GMT, Andy Burns <usenet@andyburns.uk> wrote:

    Ahem A Rivet's Shot wrote:

    The Natural Philosopher wrote:

    for popup dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Yes, using selectors such as :focus, :checked or :target instead of
    event handlers such as onfocus() or onchange(), and if you can ignore
    older browsers.

    Just ignore any browser that isn't HTML5 compliant.

    --
    Tim

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to TimS on Sun Jan 10 15:35:08 2021
    TimS wrote:

    Ahem A Rivet's Shot wrote:

    I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one depends on the choice made in the previous one.

    I think you could, but the nesting of container elements that end up
    modifying the lower elements based on the combined pseudo selectors
    would multiply horribly ... perhaps if you were using sass to "compile"
    your css instead of writing it by hand?

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Ahem A Rivet's Shot on Sun Jan 10 15:34:37 2021
    On 10/01/2021 14:46, Ahem A Rivet's Shot wrote:
    On Sun, 10 Jan 2021 13:59:19 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 10/01/2021 12:33, Ahem A Rivet's Shot wrote:
    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup dialogues >>>> and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    not really - unless you consider that e.g. onmouseover() or hover: is

    hver: is CSS onmouseover() is JavaScript.

    not Javascript and even then if you want to unhide some block, you need
    to be able to address it via the DOM. So you need a
    getElementbyId(x).style.display='block'; and so on.

    I've seen hide/unhide done without JavaScript. Admittedly it looks clearer and easier in JavaSript.

    Cant see how to do that in css. willing to find out

    I get the impression that there's a lot that can be done in pure
    CSS but ingenuity tends to be needed and it's sometimes far from obvious
    how things work (based on looking at some examples).

    I cant really write a web page the way I want it without javascript
    these days. Ok its not a LOT of javascript.

    Fair enough, the original intent of JavaScript was simple additions rather than client side applications so it's nice to hear it being treated that way.

    well that's if you are running a web site to provide information, but in
    fact I've seen complex engineering calculators written in it.

    It's an awful language, like PHP, but it is sadly ubiquitous.



    --
    "It is an established fact to 97% confidence limits that left wing
    conspirators see right wing conspiracies everywhere"

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to TimS on Sun Jan 10 15:35:20 2021
    On 10 Jan 2021 15:13:39 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup
    dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one depends on the choice made in the previous one. And the choices in them,
    or even whether they are presented at all, depends on what you read out
    of your databases server-side.

    I'd think sending the whole decision tree up front should work, it worked fine back when I was doing directory trees in early JavaScript on Netscape 2.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Axel Berger@3:770/3 to Andy Burns on Sun Jan 10 17:28:31 2021
    Andy Burns wrote:
    then use css to modify the styles depending on whether their
    states are checked or not.

    CSS is strictly for design not content. If suppressing CSS (for whatever reason, sensible or not) loses content it's stricly wrong. Highlighting
    content and making it more visible is another thing, but checked vs.
    unchecked *must* be discernible to everybody under all circumstances.

    I routinely suppress colours and backgrounds -- most sites become so
    much more easily legible and no longer hide the distinction between visited/unvisited links from me (not to mention links at all - most uses
    are not meant to be but are similar to games where you have click
    arbitrary items to find the hidden door) but in some very bad ones I
    lose important content that way.

    This is neither taste nor choice, it's simply wrong.


    --
    /\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
    \ / HTML | Roald-Amundsen-Strae 2a Fax: +49/ 221/ 7771 8069
    X in | D-50829 Kln-Ossendorf http://berger-odenthal.de
    / \ Mail | -- No unannounced, large, binary attachments, please! --

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From TimS@3:770/3 to All on Sun Jan 10 17:23:48 2021
    On 10 Jan 2021 at 15:35:20 GMT, Ahem A Rivet's Shot <steveo@eircom.net>
    wrote:

    On 10 Jan 2021 15:13:39 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net>
    wrote:

    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    databases and doing a lot of server side stuff, but for popup
    dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one >> depends on the choice made in the previous one. And the choices in them,
    or even whether they are presented at all, depends on what you read out
    of your databases server-side.

    I'd think sending the whole decision tree up front should work, it worked fine back when I was doing directory trees in early JavaScript on Netscape 2.

    Er no. It will get out of hand when you have 30 in the first popup, 40 in the second, and 30 again in the third. When I did the front end to an assets database at my last job, that's how I started it. I could see it wasn't going to scale.

    --
    Tim

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to TimS on Sun Jan 10 18:17:51 2021
    On 10 Jan 2021 17:23:48 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 15:35:20 GMT, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    I'd think sending the whole decision tree up front should work,
    it worked fine back when I was doing directory trees in early
    JavaScript on Netscape 2.

    Er no. It will get out of hand when you have 30 in the first popup, 40 in
    the second, and 30 again in the third. When I did the front end to an

    That's around 36K elements, perhaps doable but definitely on the overlarge side (perhaps a well structured megabyte or so of data), another level would blow it totally.

    assets database at my last job, that's how I started it. I could see it wasn't going to scale.

    Sure, but when the tree is small enough it's probably the way to go.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to TimS on Mon Jan 11 03:44:11 2021
    On 10/01/2021 17:23, TimS wrote:
    On 10 Jan 2021 at 15:35:20 GMT, Ahem A Rivet's Shot <steveo@eircom.net> wrote:

    On 10 Jan 2021 15:13:39 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net> >>> wrote:

    > On Sun, 10 Jan 2021 12:15:58 +0000
    > The Natural Philosopher <tnp@invalid.invalid> wrote:
    >
    >> So PHP is not equivalent to JavaScript. PHP is fine at interrogating >>> >> databases and doing a lot of server side stuff, but for popup
    >> dialogues and menus that expand you need Javascript.
    >
    > I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one
    depends on the choice made in the previous one. And the choices in them, >>> or even whether they are presented at all, depends on what you read out >>> of your databases server-side.

    I'd think sending the whole decision tree up front should work, it
    worked fine back when I was doing directory trees in early JavaScript on
    Netscape 2.

    Er no. It will get out of hand when you have 30 in the first popup, 40 in the second, and 30 again in the third. When I did the front end to an assets database at my last job, that's how I started it. I could see it wasn't going to scale.

    Actually it doesn't get out of hand,
    As I said in order to have a rapidly navigable store inventory I sent
    the whole bloody stock list down sorted by category as a giant series of
    hidden <divs> and used javascript to open up the parts of the tree the
    user wanted to view.

    And to invoke a page load for an individual stock item.

    The whole thing was only about 50kB. And worked perfectly reasonably
    over a 48k modem, too.

    Loaded far faster than my banking software does these days.

    --
    WOKE is an acronym... Without Originality, Knowledge or Education.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Ahem A Rivet's Shot on Mon Jan 11 03:36:46 2021
    On 10/01/2021 15:35, Ahem A Rivet's Shot wrote:
    On 10 Jan 2021 15:13:39 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net>
    wrote:

    On Sun, 10 Jan 2021 12:15:58 +0000
    The Natural Philosopher <tnp@invalid.invalid> wrote:

    So PHP is not equivalent to JavaScript. PHP is fine at interrogating >>>> databases and doing a lot of server side stuff, but for popup
    dialogues and menus that expand you need Javascript.

    I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one >> depends on the choice made in the previous one. And the choices in them,
    or even whether they are presented at all, depends on what you read out
    of your databases server-side.

    I'd think sending the whole decision tree up front should work, it worked fine back when I was doing directory trees in early JavaScript on Netscape 2.

    Yes, that is often the case. Ajax is also not a bad way to build things
    that are almost i-frames: small active regions within bigger static pages.

    --
    Gun Control: The law that ensures that only criminals have guns.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From TimS@3:770/3 to All on Mon Jan 11 11:00:07 2021
    On 11 Jan 2021 at 03:44:11 GMT, The Natural Philosopher <tnp@invalid.invalid> wrote:

    On 10/01/2021 17:23, TimS wrote:
    On 10 Jan 2021 at 15:35:20 GMT, Ahem A Rivet's Shot <steveo@eircom.net>
    wrote:

    On 10 Jan 2021 15:13:39 GMT
    TimS <timstreater@greenbee.net> wrote:

    On 10 Jan 2021 at 12:33:26 GMT, Ahem A Rivet's Shot <steveo@eircom.net> >>>> wrote:

    > On Sun, 10 Jan 2021 12:15:58 +0000
    > The Natural Philosopher <tnp@invalid.invalid> wrote:
    >
    >> So PHP is not equivalent to JavaScript. PHP is fine at interrogating
    >> databases and doing a lot of server side stuff, but for popup
    >> dialogues and menus that expand you need Javascript.
    >
    > I thought those could be done in HTML and CSS these days.

    Not if you have a sequence of popups, where the content of a subsquent one
    depends on the choice made in the previous one. And the choices in them,
    or even whether they are presented at all, depends on what you read out >>>> of your databases server-side.

    I'd think sending the whole decision tree up front should work, it
    worked fine back when I was doing directory trees in early JavaScript on >>> Netscape 2.

    Er no. It will get out of hand when you have 30 in the first popup, 40 in the
    second, and 30 again in the third. When I did the front end to an assets
    database at my last job, that's how I started it. I could see it wasn't going
    to scale.

    Actually it doesn't get out of hand,
    As I said in order to have a rapidly navigable store inventory I sent
    the whole bloody stock list down sorted by category as a giant series of hidden <divs> and used javascript to open up the parts of the tree the
    user wanted to view.

    In my case it *did* get out of hand. This was the inventory for a Europe-wide network. 30 Pops, a dozen bits of kit in each, many with a dozen interface boards, each with 8 or 16 ports. That gets you down to the individual port
    with its cable to another bit of kit (typically, Juniper router port to
    Alcatel optical port). Before I knew enough about javascript and PHP, I was downloading all 34000 options down as one block, something over half a meg of stuff, and links were slower 20 years ago. Using iFrames helped a lot.

    Today I'd do it rather differently, but then the guy who was at that time just starting this project resigned with half a day's notice, so I got half an hour of his time to get up to speed. Not easy at first as at that point I'd heard
    of javascript but never used it, and never heard of PHP at all.

    If you wonder wny that might be so, given I'd been writing software since
    1965, I got switched to Operations in the early 90's and essentially stopped being involved in any software development.

    Loaded far faster than my banking software does these days.

    That's because they use that Jquery bollox instead of insisting on strict
    HTML5 compliance.

    --
    Tim

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to Axel Berger on Mon Jan 11 17:25:06 2021
    Axel Berger wrote:

    Andy Burns wrote:

    then use css to modify the styles depending on whether their
    states are checked or not.

    CSS is strictly for design not content.

    Well, it is described as a css hack ...

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Andy Burns@3:770/3 to gareth evans on Fri Feb 12 15:40:36 2021
    XPost: alt.folklore.computers

    gareth evans wrote:

    I am particularly interested in the Binary Blob
    provided for Raspberry Pi computers, with a view to
    getting detailed knowledge of the video processors
    employed therein.

    Here's something for you, a C64 emulator that runs baremetal on Pi
    hardware (no Linux involved) so you can see exactly how it talks to the GPU

    <https://github.com/randyrossi/bmc64>

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)