Page 2 of 8 FirstFirst 1234 ... LastLast
Results 11 to 20 of 72

Thread: Land of Lisp

  1. #11
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    This stuff is new to my experience.

    So far, Factor seems like an RPN calculator to me.

    According to what I read, you can put any kind of object on the stack. If for instance, you PUSH an array, it only takes one stack position, i.e., an array of 1000 elements would not use 1000 stack places, as I'm sure you know.

    I guess, to call a function, you first put its parameters on the stack, and then you enter only the function's name, I think that's why functions are referred to as words.

    Just like on an RPN calculator, if I want cos(x), first I put x on the stack, and then I press the cos button.

    So far, what is gained by doing things this way, is not clear to me. Hopefully, there are substantial advantages. Otherwise, why change the method of parameter passing, only for the sake of changing it?

    Like I said before, for new languages, you have to do a lot of digging to get an idea of their capabilities. Maybe a language escapes from obscurity, when the the first book is written about it.

    If I am not mistaken, I also read that Factor can make compiled executables - Factor is not required to be installed on a machine in order to run a Factor executable on it.
    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  2. #12
    Forth, one of the notorious predecessors of stack based languages was often described as a "write-only" language because its code was so difficult to understand once written.

    I suppose the main advantage is brevity and ease of compiling. There are very few syntax rules and you can generate machine code in a single pass - just about.

    These are good characteristics for an intermediate language but needs very good commentary to explain what each procedure is doing if it is to be understood by human programmers.

    Charles

  3. #13
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    Slava Pestov writes about how Factor is different from Forth. I don't know what to make of it. The only things I know about Forth, is what you wrote, and what I just read on Wikipedia.

    Forth is untyped, not garbage collected, and close to the machine. For flow control, Forth code tends to use immediate words. Variables and arrays tend to be global, and programs aren't usually written in a functional manner. Factor is very different from this. It is dynamically typed, offering a high degree of reflection. Unreferenced objects are garbage collected with a generational garbage collector. Factor code is a little bit more distant from the machine, though the C FFI allows using words like malloc and mmap. For flow control, Factor generally uses quotations, allowing flexible higher order functions; parsing words are used mostly for definitions and data literals. Variables are dynamically or statically scoped (see below), and arrays are just objects which don't need to be treated specially.




    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  4. #14
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404
    I felt like watching a programming video tonight and came upon this one of Factor.
    I like that he goes into examples instead of detailed language syntax in the video.


  5. #15
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    My connection is too slow to watch it.

    I wish I could.

    I'm trying to understand the language.

    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  6. #16
    I dont know what is so interesing in LISP...
    And for what kind of application this language is good?
    For me far interesting languages are Clipper(harbour) compiler,
    Euphoria,seed7...

  7. #17
    I remember watching this video some time ago. I like the idea of the stack based language that is so flexible and integrates so many paradigms but I just can't see it being adopted outside academia. It is too far removed from Basic C Java Pascal or even Assembler (which is a very natural and easy to understand stack language :whatever the processor )

    If a non-programmer is able to read the script and make some sense of it then the programming language has some chance of success.

    Charles

  8. #18
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404
    I would actually recommend this language to someone who has never programmed before. If you come in with a clear mind and void of any programming concepts and had to learn everything from scratch, then I think learning it would be much easier.

    I love how concise and well thought out the language is. The interactivity, support for various programming styles and the optimized compilation.

    Also it seems like it would be great for creating your own language and have it be cross platform. If you see the part where he shows the javascript interpreter it is just a couple of pages of code, if that even.

    I am glad he showed also how much documentation there is for the language and the wonderful tracing system called the walker.

  9. #19
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    I am trying to determine why some people say Lisp is so great. I haven't yet.

    -----------------------------

    Since I am finding it difficult to begin in Factor, I looked for a book about Forth.

    There is a free one online.

    http://www.forth.com/starting-forth/

    Also there, but for sale, is SwiftForth. It is $395. That is too much for me, but, maybe you feel you just must have a Forth system!



    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  10. #20
    Singing the praises of LISP...

    If Lisp is so great
    2003
    short article
    http://www.paulgraham.com/iflisp.html

    Beating the Averages
    2003
    long article

    http://www.paulgraham.com/avg.html

Page 2 of 8 FirstFirst 1234 ... LastLast

Similar Threads

  1. BEE Lisp
    By danbaron in forum Shout Box Area
    Replies: 0
    Last Post: 30-04-2010, 21:41

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •