• Re: AI and decompilation?

    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)