Author Topic: Lisp in Basic  (Read 208072 times)

0 Members and 2 Guests are viewing this topic.

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #945 on: October 12, 2014, 08:06:23 PM »
See my current screenshots below. Timings taken with a Windows scriba.exe dated 01/28/2005 available at the time of the challenge.

Many of your comparison methods and conclusions could in fact have been questioned at that time but somehow weren't. Why? I don't know, really. :)

Attached is also your original script with my launcher that would allow you to adjust the size of Windows console at its first "Press any key to continue..." pause to a width of 132 chars that ensures a coherent picture of the app output. Just unzip scriba.exe from its original zip into the same folder and double click RunTimedMandel.exe.

BF IDE is also included. Unzip it anywhere you like and enjoy. I can supply a few other BF scripts if needed.

Original BCX, OxygenBasic, thinBasic, FreeBASIC, PowerBASIC, and FBSL scripts and exes are available on demand. Free of charge, of course. As in "free beer". :D

.

JRS

  • Guest
Re: Lisp in Basic
« Reply #946 on: October 12, 2014, 08:16:48 PM »
Please use the tdef.sb version or use the converter on your BF code. I optimized the original converter which seem to help.

Mandelbrot BF Facts:

686 nested WHILE/WEND loops (SB translated)
10,521,107,970 instructions (.bf interpreted)

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #947 on: October 12, 2014, 08:20:38 PM »
Doesn't help you any against the BF IDE tho. :D

JRS

  • Guest
Re: Lisp in Basic
« Reply #948 on: October 12, 2014, 08:25:56 PM »
The converter was meant to make the BF interpreter faster in SB. I will try to dig up the original SB .bf file interpreter.


Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #949 on: October 12, 2014, 08:30:13 PM »
Please DO NOT bother. It will be an interpreter within an interpreter. You already know by SBLisp what it means. Use BF IDE to have a BF interpreter that is powered by C compiled to machine code the same way as your SB or my FBSL are, and therefore compatible with them in its true speed.
« Last Edit: October 12, 2014, 08:45:37 PM by Mike Lobanovsky »

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #950 on: October 12, 2014, 08:33:42 PM »
Sorry gents, the RunTimedMandel launcher I posted has my PC filepaths hardcoded in the original script. It won't run for you on your PC's.

Please use the one from the attached zip.

.

JRS

  • Guest
Re: Lisp in Basic
« Reply #951 on: October 12, 2014, 08:37:58 PM »
Quote
That was the first one of your obvious shoot-and-misses way back then, John.

Hey Mike,

Take a break and chill out. You're starting to sound like Aurel.  ???

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #952 on: October 12, 2014, 08:42:12 PM »
Sorry John, it wasn't my intention. My English must be slipping me this 7:40 Monday morning with 2 bottles of porto behind. (Offending line deleted)
« Last Edit: October 12, 2014, 09:20:08 PM by Mike Lobanovsky »

RobbeK

  • Guest
Re: Lisp in Basic
« Reply #953 on: October 24, 2014, 08:35:52 AM »
Hi Mike, (all)

Still working on your Scheme ??

...  coded the Brownian motion in Lisp , it's nice to see it only takes 3 lines of code  8)   -- variadic, any size of area, any number of particles ....
added something --  frames give : the particles -- the history (trajects of the particles) and a simulation of objects moved by those particles ,,,,      interpreted newLISP , non-buffered graphics ..

the core =

(define (mutate L M)
 (if (null? L) M
   (mutate (rest L) (cons (map (curry + (-- (rand 3))) (first L)) M))))               ;;;  (everything is calculated here )


best, Rob

(use the batch file, it will remove the hanging javaw.exe task)  -- to close the main window, first use stop / start ...

.

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #954 on: November 01, 2014, 08:47:38 PM »
Hi Rob,

Sorry for being late with my answer; I somehow missed your message here.

Thanks for this spectacular boiling kettle -- looks very viral. :)

Yes, I'm still working on porting nanoscheme to O2 in my spare time. I did about 1,300 lines which is roughly half of the file. The original C code works faultlessly in my FBSL DynC if only a trifle slower than when statically compiled with GCC. I think the resultant O2 equivalent will be as fast as the original. I'll revive this thread when I'm through with porting. Stay tuned! :)

RobbeK

  • Guest
Re: Lisp in Basic
« Reply #955 on: November 07, 2014, 04:50:12 AM »
Thanks Mike,

(rather busy on a job now )


best Rob

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #956 on: November 09, 2014, 12:37:20 AM »
Hi Rob,

Sorry to keep you waiting but O2 pointers and casts are so, uhm, unusual that debugging string operations while trying to keep the sources more or less C style is going to take considerable time. So far I've debugged nanoscheme initialization only and am stuck with reading in the init.scm file. Still a long way to go till I can see the ">" prompt on my screen. :)

RobbeK

  • Guest
Re: Lisp in Basic -- Lisp and BASIC
« Reply #957 on: January 05, 2015, 01:53:43 PM »
Hi all,

GFA + NewLISP  -- works very well imho  ---      let it snow :
3 layers of stars?/flakes? with their own size and brownian motion up/down/left/right
Using the GFA GDI connection, but can be a lot faster when using bitmaps (shared bitmaps between lisp and gfa are possible - already tested).
Now I can use the Timers from GFA (those from NewLISP only work in Linux (idem for semaphores and some other things).

Why the Lisp is used : because it's much much simpler to write such code -  i do not have to care about numbers of stars/flakes - size of the grid - I just map a brownian motion and the gravity effect on a variadic list.   -- when a particle reaches "ground zero" it starts again from the top.
Lisp code is included as "REM's" , but I already set up an editor from within GFA

Well, finally  :D  i"m getting somewhere ..

NewLISP is not a compiler , it does not have the full numeric tower (but bignumbers) -- but it is a great tool and capable of macro's ....

(ah, it has callback functions too and an excellent FFI )

best Rob   (i named the lisp files to feed GFA  *.lxp)  -- no screen cap / could not catch them (they are in a timer cycle)



.
« Last Edit: January 05, 2015, 02:28:34 PM by RobbeK »

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #958 on: January 05, 2015, 11:04:34 PM »
Hi Rob,

I'm glad you're finally coming closer to the toolchain that can meet your specs.

Just wanted to note that:
  • Your latest Buddhabrot is still at least 2 times slower than the one in my recent RBB.7z archive submission; and
  • Your snow flickers like hell on my screen so that I can hardly see more than some 200 snowflakes at any one time. :(
Exclusively for your reference, please have a look at how FBSL's pure interpreted BASIC (not a single JIT C or asm line in the entire project) would deal with 500 snowflake sprites that keep on falling while the game remains totally responsive to the user interaction with other animated objects in the scene -- the Xmas tree and roof lights, home owner, and bouncing snowman. And all this in a single thread of execution with 6 simultaneously mixable channels of non-DirectAudio .MID and .MP3 music and sounds! :)

The maximum number of snowflake sprites that would still let the game keep on running interactively is nine thousand discrete visible pieces. That many would however prevent me from recording smoothly the .AVI attached below.

Please note that you'll be able to watch the .AVI only if you have an Xvid MPEG4 codec installed on your PC. If not, you should find one on the net and install it. It yields the smoothest, fastest and tiniest high-quality bitstreams for streaming video recording and playback.




You can download the zip with the .AVI file here.

« Last Edit: January 06, 2015, 12:10:44 AM by Mike Lobanovsky »

JRS

  • Guest
Re: Lisp in Basic
« Reply #959 on: January 05, 2015, 11:29:41 PM »
That is a Charles thing and I only deal with hosting issues. This is not my site or forum. My hosting and direct support to Charles is my contribution to the OxygenBasic project. Other than that, I'm just a user here like everyone else.