Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Naalaa 6 - Linux Installer
#3
(01-05-2024, 07:42 AM)johnno56 Wrote: Downloaded and extracted the folder. Ran a sample demo. "could not fetch the compiler result."

The dependencies, zenity and xclip, are already part of my system.

Hi Johnno56,

hmm...it's a bit strange.... Sad
on my linux, it's working successfully.
I tested Naalaa6 on Linux : Ubuntu 22.04.1 LTS 64-bit.

Herewith my step by step on a linux terminal :
1. compile [ hello.nala ]  
    $ ./ned hello.nala
2. the result will have two files [ hello ], and [ hello.sbe
3. run the result
    $ ./hello
4. On your linux there will be some dancing lines  Big Grin

Herewith what inside [ hello.nala ]
Code:
rem ============================================================================
rem Moving lines, found on an old USB stick from Marcus. This may have been one
rem of the first test programs ever written in naalaa.
rem
rem By Marcus Johansson.
rem ============================================================================

set redraw off

randomize time()

x0 = rnd(640)
y0 = rnd(480)
x1 = rnd(640)
y1 = rnd(480)
x0spd = rnd(8) + 1
y0spd = rnd(8) + 1
x1spd = rnd(8) + 1
y1spd = rnd(8) + 1



r = 255
rspd = 1
g = 255
gspd = 2
b = 255
bspd = 3
do
    set color r/3, g/3, b/3, 4
    cls
    set color r, g, b
    draw line x0, y0, x1, y1
    x0 = x0 + x0spd
    y0 = y0 + y0spd
    x1 = x1 + x1spd
    y1 = y1 + y1spd
    if x0 > 639
        x0spd = -(rnd(8) + 1)
    endif
    if y0 > 479
        y0spd = -(rnd(8) + 1)
    endif
    if x1 > 639
        x1spd = -(rnd(8) + 1)
    endif
    if y1 > 479
        y1spd = -(rnd(8) + 1)
    endif

    if x0 < 0
        x0spd = rnd(8) + 1
    endif
    if y0 < 0
        y0spd = rnd(8) + 1
    endif
    if x1 < 0
        x1spd = rnd(8) + 1
    endif
    if y1 < 0
        y1spd = rnd(8) + 1
    endif
   
    r = r + rspd
    if r >= 255
        r = 255
        rspd = -abs(rspd)
    endif
    if r <= 0
        r = 0
        rspd = abs(rspd)
    endif

    g = g + gspd
    if g >= 255
        g = 255
        gspd = -abs(gspd)
    endif
    if g <= 0
        g = 0
        gspd = abs(gspd)
    endif

    b = b + bspd
    if b >= 255
        b = 255
        bspd = -abs(bspd)
    endif
    if b <= 0
        b = 0
        bspd = abs(bspd)
    endif

       
    redraw
    wait 10
loop
Reply


Messages In This Thread
Naalaa 6 - Linux Installer - by 1micha.elok - 01-05-2024, 12:50 AM
RE: Naalaa 6 - Linux Installer - by johnno56 - 01-05-2024, 07:42 AM
RE: Naalaa 6 - Linux Installer - by 1micha.elok - 01-05-2024, 09:45 AM
RE: Naalaa 6 - Linux Installer - by johnno56 - 01-05-2024, 12:07 PM
RE: Naalaa 6 - Linux Installer - by 1micha.elok - 01-05-2024, 01:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)