Jekyll


10 points by Jekyll over 2 years ago | link | parent | top
cached 3 days ago
One of the things I don't like about newlisp is that from their site, they appear intentionally misleading about what they can and can't do.

They don't have hash tables, this they openly admit and they make do with self balancing trees.

They don't have macros, they have f-expressions. F-exprs are strictly more powerful, but execute at run time not at definition time. This means every abstraction you use incurs a penalty fee each time it is executed, rather than just once when it is compiled. They call what them macros anyway.

They don't have garbage collection at all. The whole language is basically allocated on the stack, and objects are deleted or copied and returned when a function ends. This means they can't have true closures, or pass by reference with indefinite extent for the objects.

As far as I can tell, the hacks they suggest to get round the lack of closures won't work if you want to create and destroy many anonymous fns. bound to data with indefinite extent. They still refer to these hacks as `closures'.

Their pass by reference work around, amounts to passing symbol names from different contexts and can't do the right thing when you(for example) want to merge existing lists and then rebind one the original symbols.

Having said all that, if one of the newLisp guys wants to prove me wrong, and show something like partial application code to demonstrate that it really does have true closures, it'd be great to see, and I'd probably go back to the language and have another go with it.


7 points by Jekyll over 2 years ago | link | parent | top
cached 3 days ago
>No, first you have to prove yourself right.

Can't prove a negative, but I've already explained why I think I'm right.

>Intentionally? How so?

When they claim to fake closures with contexts, they're wrong. Now they're either confused or trying to confuse other people.

>Cite please.

"In newLISP lexical state-full closures are not realized using lambda closures but using lexical namespaces." http://www.newlisp.org/ExpressionEvaluation.html

It's the first hit on google for `newlisp closure'.

>What if I called you a jerk?

I would be immediately converted to newlisp by the strength of your arguments and the size of your e-penis.


6 points by Jekyll over 2 years ago | link | parent | top
cached 2 days ago
Kenny's right.

Pattern matching is completely orthogonal to hygiene.

You could add in another operator, %, that performs exactly the same as ` but hygienically. Personally I'd settle for just being able embed procedures in code trees like you can in common lisp. Being able to write.

  (let this (fn (x) x)
     (mac na-na-na(y)
      `(,this ,y))) ;Can't touch "this". It's lexically bound.
Allows you to fake hygiene in the common cases where it's needed most often.

6 points by Jekyll over 2 years ago | link | top
cached 2 days ago
Scheme has arrays. Arc doesn't yet. Arc has a generic setter = . Scheme doesn't.

5 points by Jekyll over 2 years ago | link | parent | top
cached 5 days ago
Qi is completely type inferring, so it proves the type correctness of the code at compile time from a minimum number of declarations, like the ML family of languages.

However, as this is optional, it can also be switched off in places to handle code that the type system can not prove correct.

To make a similar system work, you'd have to label the inputs and return type of each function, and enforce the consistency of this, all at compile time. There is a complete prolog system buried in QI allowing the types to self reference and be turing complete in terms of complexity.

Having said that, the whole of QI is only meant to be 4k lines of common lisp and under an MIT license, so it'd be quite easy to port the interesting bits of it once the core of arc has stabilised.


4 points by Jekyll over 2 years ago | link
cached 7 days ago

4 points by Jekyll over 2 years ago | link | top
cached 2 days ago
I can't vote down initial posts in threads, so this isn't going to be much of a poll.

(I'm not saying I want to, it's just that it's not going to tell you anything about what proportion of people like your idea.)


3 points by Jekyll over 2 years ago | link | top
cached 6 days ago
Typically, people optimise for speed and not terseness in the shootout. If you look at how the languages perform in terms of terseness you find:

Dynamic languages with no possibility of optimal type declarations come first, followed by statically typed type inferring languages, then a ragbag of stuff including dynamic languages with optional type declarations like SBCL.

Then Java and Ada at the back.

You want the lisp to be shorter? Try taking out the type declarations. They're optional.


3 points by Jekyll over 2 years ago | link | top
cached 3 days ago
>So what am I missing?

Well last time I looked at newLisp you were missing:

1)closures

2)callcc

3)pass by reference

4)macros (you've only got f-exprs)

5)argument checking for functions at run time

6)a compiler

7)Garbage collection

8)hash tables

I stopped looking after that but I'm sure other people can keep the list going...

It'd be great if I'm wrong about these things and newLisp can be taken seriously, but right now, based on the little I know, I'm not using newlisp.


2 points by Jekyll over 2 years ago | link | parent | top
cached 13 days ago

  (def $ (x . lists)
         (if lists
             (apply map x lists)
             (fn (lists) (apply map x lists)))) 
More or less does what you want, without special syntax. ($$car... would have to be written ($($ car)... though.

To me this looks like a specific case of wanting currying/partial application built in for functions of semi-fixed arity, rather than a need for new syntax.