Nп/п : 58 из 93
 От   : none) (albert                       2:5075/128        01 сен 23 15:01:05
 К    : Spiros Bousbouras                                     01 сен 23 16:02:02
 Тема : Re: MAL : closures and recursion
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
4c515e80
@REPLY: <prm+jxSUkmfDZ+qjv@bongo-ra.co> 33de88b2
@REPLYADDR none) (albert
@REPLYTO 2:5075/128 none) (albert
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<e1jFR1e0dJXio6H8+@bongo-ra.co>
<prm+jxSUkmfDZ+qjv@bongo-ra.co>
@RFC-Message-ID:

@TZUTC: 0200
@TID: FIDOGATE-5.12-ge4e8b94
In article <prm+jxSUkmfDZ+qjv@bongo-ra.co>,
Spiros Bousbouras  <spibou@gmail.com> wrote:
>On Thu, 31 Aug 2023 11:37:50 +0200
>albert@cherry.(none) (albert) wrote:
>> In article <e1jFR1e0dJXio6H8+@bongo-ra.co>,
>
>[...]
>
>> I have no requirements for lisp. The MAL challenge is not to
>> implement a lisp, but use a particular language (Forth FORTRAN C
>> python go list-this lisp-that) to investigate the strong and weak
>> side of the implementation language for implementing it.
>> The attraction of the MAL side is that it has step-by-step
>> test driven development. Skipping MAL features is just cheating.
>
>[...]
>
>> I have done a lisp in Forth
>>     https://github.com/albertvanderhorst/forthlisp
>
>Then what`s the point of doing MAL ? Just to compare your code with that
>by other people in other languages ?

That is correct. The challenge is to build MAL using
as many languages you can think of.

The languages are:
ada awk bash basic c chuck clojure coffee common-lisp cpp crystal cs d
dart docs elisp elixir elm erlang es6 examples factor fantom forth
fsharp gnu-smalltalk go groovy guile haskell haxe hy io java js julia
kotlin livescript logo lua make mal matlab miniMAL nasm nim objc
objpascal ocaml perl perl6 php picolisp plpgsql plsql powershell
process ps python r racket rexx rpython ruby rust scala scheme skew
swift swift3 swift4 tcl ts vb vhdl vimscript wasm yorick

Obviously a lisp in vimscript or make or bash, are an implementation
challenge rather than an attempt to make usable lisp.
It is the intent to start from scratch, use idiomatic solutions for
your language and look as little to other implementations as possible.

My goal is to gain experience using Forth to implement other languages.
Also implementing a language gives a different perspective that
merely using the language.
Forth programming is extending the language Forth. I had no need to
define a class, structure or object for implementing MAL,
only using constructs that are present in Forth itself.
E.g. building a list is creating a Forth header, and filling in the
tag and the data field:
: build-list #list LHEADER >R   R@ >DFA ! R> ;
Binding an object to a name in an environment is
: set >R $, 0 R@ >LFA ! R@ >NFA ! R> ENVIR @ LINK ;
Only #list and ENVIR are lisp-specific.
INTERPRET is the read evaluate loop of Forth and it is used to
read lisp code, admittedly tweaking token delimiters (Forth only
knows blank space as token delimiters.)

Groetjes Albert
-- 
Don`t praise the day before the evening. One swallow doesn`t make spring.
You must not say "hey" before you have crossed the bridge. Don`t sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning.            - the Wise from Antrim -
--- trn 4.0-test77 (Sep 1, 2010)
 * Origin: KPN B.V. (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх