• Console vs GUI

    From Shawn Highfield@618:618/12 to All on Friday, November 08, 2024 07:57:34

    Hello everybody!

    So out of a combination of being bored and trying to keep my brain active,
    I wrote a program in pascal.

    Wanting to learn modern stuff, I am converting it to run as a GUI app in Lazarus.

    One line of code in pascal becomes a 35 line procedure. Why is this better then console?

    Pascal exe size: 59.5kb
    Lazarus exe size: 24MB.

    Plus the lazarus one doesn't work right yet. Just amazing to me the pure bloat in modern GUI programming languages.

    Shawn

    ... I wonder if we ccan speak through rose-tinted spectacles.
    --- GoldED+/W32-MSVC 1.1.5-b20240306
    * Origin: Dirty Ole Town (618:618/12)
  • From digimaus@618:618/1 to Shawn Highfield on Friday, November 08, 2024 18:23:38
    Shawn Highfield wrote to All <=-

    One line of code in pascal becomes a 35 line procedure. Why is this better then console?

    You need to turn on optimization, "release" mode, and stripping debugging symbols. FP. by default, compiled is debug mode and adds a lot of extra
    crap.

    Plus the lazarus one doesn't work right yet. Just amazing to me the
    pure bloat in modern GUI programming languages.

    You can trim the fat but it's all in the compiler settings. I use FPC
    direct from the command line.

    Here what I use in a bash script to compile a regular program (last line is wrapped):

    #!/bin/sh
    export HOME=/opt/mbse/code
    fpc -B -Fo$HOME/out/object -FU$HOME/out/ppu -FE$HOME/out -Fu/usr/lib64/fpc/3.2.2/units/x86_64-linux -Fu$HOME/source/ -So -O2 -Tlinux
    -Xs -XX -v0 -k"-z noexecstack" $HOME/source/$1.pas

    I don't use Lazarus yet though I have been thinking about writing a GUI
    version of NODECONV.

    -- Sean

    ... Programming Department: mistakes made while you wait.
    --- MultiMail/Linux
    * Origin: Outpost BBS * Johnson City, TN (618:618/1)
  • From Tiny@618:618/12 to Digimaus on Saturday, November 09, 2024 07:32:00
    Hi digimaus,
    On <Sat, 08 Nov 24>, you wrote me:

    I don't use Lazarus yet though I have been thinking about writing a
    GUI version of NODECONV.

    I'm specifically talking about GUI apps in it. :) Even removing the debugger stuff which made hello world 20mb....

    I'm just grumping... I am just wanting to learn how to do it, but at the end
    of the day I can't see using the GUI apps over the console one I wrote.

    Shawn

    --- Grumble
    * Origin: I think you understand that you've got it (618:618/12)
  • From digimaus@618:618/1 to Tiny on Sunday, November 10, 2024 16:40:59
    Tiny wrote to Digimaus <=-

    I'm just grumping... I am just wanting to learn how to do it, but at
    the end of the day I can't see using the GUI apps over the console one
    I wrote.

    You use the best tool for the job.

    -- Sean


    ... WinErr 01D: Keyboard error: press F12 to continue.
    --- MultiMail/Linux
    * Origin: Outpost BBS * Johnson City, TN (618:618/1)
  • From Tiny@618:618/12 to Digimaus on Friday, November 15, 2024 07:44:00
    Hi digimaus,
    On <Mon, 10 Nov 24>, you wrote me:

    at the end of the day I can't see using the GUI apps over the
    console one I wrote.
    You use the best tool for the job.

    I just want to do it for the sake of doing it. I'm going to keep working
    at it but as I said, I can't see it being "better" just cause it's GUI.

    Shawn

    --- Grumble
    * Origin: REALITY.SYS Corrupted: Re-boot universe? (Y/N/Q) (618:618/12)