Author Topic: Lisp in Basic  (Read 208203 times)

0 Members and 2 Guests are viewing this topic.

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #255 on: August 08, 2014, 08:26:19 PM »
Quote
I just don't see the need for it to be displayed every time at startup.
That's correct.

But the order of credits still isn't strictly canonical. You should move the two trailing commented lines to the very top of the page and leave a blank line beneath them so that all the old stuff goes right down the page. If this CCA license is GNU compatible (needs special investigation) then you can even add your own GPL prayer beneath the two topmost lines thus moving your predecessors yet further down. :)


JRS

  • Guest
Re: Lisp in Basic
« Reply #256 on: August 08, 2014, 08:47:03 PM »
I tried getting SBLisp to run multi-threaded and it worked. (sort of) Both threads were sharing the same console.  :-\ Charles designed this multi-threaded environment for IUP. Maybe he has an idea how we can used it with SBLisp.

I'm seriously looking at sbhttpd as a SBLisp multi-threaded server. I would need to pass simple CGI headers but everything else can be standard SB code and it doesn't care if it's not talking to a browser. I think I'm going play in this sandbox for awhile as it would work on both Windows and Linux. (DLLC is Windows only)

OR

Do a web browser version of SBLisp with sbhttpd. Libraries of functions could be readily available to use with your uploaded scripts.


« Last Edit: August 08, 2014, 09:09:26 PM by John »

JRS

  • Guest
Re: Lisp in Basic
« Reply #257 on: August 08, 2014, 09:46:35 PM »
Code: [Select]
jrs@laptop:~/sb/sb22/sblisp$ scriba lisp.sb
SBLisp - Scheme BASIC Lisp

0]

Quote
' SBLisp version by John Spikowski and Mike Lobanovsky - Aug. 8th, 2014
' Bitbucket Repository: https://bitbucket.org/ScriptBasic/sblisp
'
' This work is licensed under the Creative Commons
' Attribution-NonCommercial-ShareAlike License. To view a copy of this
' license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or
' send a letter to Creative Commons, 171 Second St, Suite 300
' San Francisco, CA 94105, USA.
'
' The original author of this code is Arthur Nunes-Harwitt

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #258 on: August 08, 2014, 10:50:36 PM »
Hmmm not bad, not bad... :)

( the "-" bug has been fixed, the "/" one is on its last legs 8) )

JRS

  • Guest
Re: Lisp in Basic
« Reply #259 on: August 08, 2014, 10:59:58 PM »
I think more people will contribute if its not a Script BASIC only project. SB just happens to be what it's being developed in. (traditional BASIC) There is very little SB specific code here.

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #260 on: August 08, 2014, 11:15:32 PM »
While you were preoccupied with that wishful thinking, the both bugs were killed with utmost brutality and died in terrible agony shrieking uselessly for mercy.

Exorcism over, I'm off to bed a little tired of my righteous works. 8)

JRS

  • Guest
Re: Lisp in Basic
« Reply #261 on: August 09, 2014, 06:56:44 AM »
Good morning.

FYI - Site slowness was due to external access attempts to log into the MySQL server by hackers. External MySQL access has been disabled and we should no longer see slow downs here at OxygenBasic.


Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #262 on: August 09, 2014, 09:36:28 AM »
G'morning John,

Here comes the latest SBLisp with the - and / bugs fixed and a ; comment character added. 8)

Enjoy! :)

.

JRS

  • Guest
Re: Lisp in Basic
« Reply #263 on: August 09, 2014, 09:41:43 AM »
Charles, move over, we have a contending wizard in the mist.   8)

Thanks Mike!

I'll do a quick scan for format (spaces between vars and operators, arg lists, ...) and push it to the SBLisp repository.

Should I spend some time testing or do you have that already covered?


Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #264 on: August 09, 2014, 09:50:01 AM »
The fixes work perfectly in both SB and FBSL under Windows. Please have a try in Linux too before uploading to the repo.

JRS

  • Guest
Re: Lisp in Basic
« Reply #265 on: August 09, 2014, 10:02:48 AM »
No T response anymore?

Code: [Select]
jrs@laptop:~/sb/sb22/sblisp$ scriba lisp.sb
SBLisp - Scheme BASIC Lisp

0](/ 12 2 3)
2
0]; Works under Linux
0](quit)
Bye!
jrs@laptop:~/sb/sb22/sblisp$

SBLisp repository code updated.

Oh. I guess T is a loaded script response message?

Code: [Select]
jrs@laptop:~/sb/sb22/sblisp$ scriba lisp.sb Ave.scm
SBLisp - Scheme BASIC Lisp

(define average
  (lambda (input)
    (print (/ (apply + input) (length input))) (newline)
  )
)
AVERAGE
(average (list 0 1 2 3 4 5 6 7 8 9))
4.500000
T
0]

« Last Edit: August 09, 2014, 01:28:35 PM by John »

JRS

  • Guest
Re: Lisp in Basic
« Reply #266 on: August 09, 2014, 11:02:36 AM »
What's next?

It would be nice to have a help feature in SBLisp.

Can we eliminate the limitations (MAX settings) on arrays so we can deal with larger / more complex scripts?

I would like to have a tutorial/instructions on adding new symbols to SBLisp.

What is the format you plan to use for external resources (SDL, SQLite, Scheme library sets (pkg), ...)

P.S. I would like to see the current FBSL version of SBLisp if you have time to post or point us to a link to download.

« Last Edit: August 09, 2014, 11:31:30 AM by John »

JRS

  • Guest
Re: Lisp in Basic
« Reply #267 on: August 09, 2014, 02:19:00 PM »
I'm going to take the lead on the web browser version of SBLisp. Hope to have something to show soon.

@Mike - Let me know when you think SBLisp is solid and I create a SBLisp.apk for Android.

Mike Lobanovsky

  • Guest
Re: Lisp in Basic
« Reply #268 on: August 09, 2014, 02:50:05 PM »
What's next?
It seems reasonable to make BASIC LISP look more like standard Scheme. E.g. (print) isn't Scheme while (display) is. A list of missing functionality and keywords would be welcome.

Quote
It would be nice to have a help feature in SBLisp.
Not feasible. The 19-page PDF is the absolute minimum to allow a BASIC-er to write the simplest LISP lambda. Been there, done that.

Quote
Can we eliminate the limitations (MAX settings) on arrays so we can deal with larger / more complex scripts?
Something's telling me this problem is non-existent in SB with its dynamic-only arrays. Once the initial arrays are created and initialized, they may grow on and on automatically as their newer elements are referred to for the first time.

FBSL currently uses static Variant arrays that may grow with REDIM PRESERVE when necessary. Alternatively, slight changes may be added to the code in order to use dynamically growable Variant arrays exactly like those in SB.

Quote
I would like to have a tutorial/instructions on adding new symbols to SBLisp.
Let's have a list of missing keywords first (see above) -- that's what postage stamp collectors would call a manque-liste a-la francais -- and then try to implement the simplest ones that have very close correspondence to the existing ones, e.g. trigonometric functions. This will develop a "feeling" for the source code structure and teach us what is what in it and why. Then more complicated cases may be tackled as our experience grows.

Quote
What is the format you plan to use for external resources (SDL, SQLite, Scheme library sets (pkg), ...)
I don't have any particular plans for now. Frankly, I'm not interested in that language very much as it is. It's more about that sort of a drive that I'm feeling while cracking all these brainteasers in a piece of alien code.

Perhaps Charles can give you some ideas unless he's building his LispishLisp out of similar curiosity. :)

Quote
P.S. I would like to see the current FBSL version of SBLisp if you have time to post or point us to a link to download.
You can download raw source code and a precompiled executable from the FBSL site.

Quote
Let me know when you think SBLisp is solid...
Time and tests will show. AS IS ==> no warranties given, no responsibility assumed. This isn't my own code after all. I would have never written it in this style in the first place, or I would've rewritten it a hundred times since the 90s.

JRS

  • Guest
Re: Lisp in Basic
« Reply #269 on: August 09, 2014, 03:12:07 PM »
Quote
I don't have any particular plans for now.

Quote
It seems reasonable to make BASIC LISP look more like standard Scheme.

What that tells me is I should follow the path of MIT/GNU Scheme with external resource syntax but don't expect any guidance in this area from you. Correct?