News for hackers. Stuff that matters.
Re:Owl Lisp – A purely functional Scheme that compiles to C by rubiquity on Saturday September 10, 2016 @02:01PM (#12470252)
Very cool! By purely functional I'm guessing they mean immutable by default? Aside from Clojure, what other Scheme/Lisp implementations are immutable by default? I know Lisp-flavoured Erlang is due to being on the BEAM but I'm curious what else is out there.
Re:Owl Lisp – A purely functional Scheme that compiles to C by sparkie on Saturday September 10, 2016 @02:11PM (#12470282)
I'm looking through the tests, and there's side effects everywhere. I'm confused as to what the author implies by "purely functional", so it would be nice to have some additional information.
Re:Owl Lisp – A purely functional Scheme that compiles to C by kr7 on Saturday September 10, 2016 @03:09PM (#12470485)
There are definitely I/O side effects, but it looks like functions for mutating data structures (like set-cdr!) are intentionally unimplemented: https://github.com/aoh/owl-lisp/blob/master/scheme/base.scm#...

That must be what they mean by "purely functional".

Re:Owl Lisp – A purely functional Scheme that compiles to C by qwertyuiop924 on Saturday September 10, 2016 @04:03PM (#12470668)
....soo, it's racket, but without all the shiny libraries and mcons.

It sounded like it was going to be general-purpose DSSSL. That would have been so much more cool.

Re:Owl Lisp – A purely functional Scheme that compiles to C by amalcon on Saturday September 10, 2016 @05:05PM (#12470878)
Scheme is immutable to at least the same degree as Clojure (which is to say, there are mutable values, but their use is discouraged by convention).
Re:Owl Lisp – A purely functional Scheme that compiles to C by charlesetc on Saturday September 10, 2016 @03:39PM (#12470592)
Purely functional doesn't mean immutable by default - it means immutable, period.

A function called with the same arguments will always have the same result.

Re:Owl Lisp – A purely functional Scheme that compiles to C by 35bge57dtjku on Saturday September 10, 2016 @03:02PM (#12470467)
If I understand what you mean by "immutable by default", then it's all Scheme implementations, and probably all Lisp as well.
Re:Owl Lisp – A purely functional Scheme that compiles to C by nialo on Saturday September 10, 2016 @03:12PM (#12470493)
Common Lisp variables are not even a little bit immutable by default. setf is the opposite of immutable values, you can mutate any place in a way that's visible everywhere regardless of any sort of scoping.

Immutable by default might be what you'd get if CL only had let to introduce/"change" variables.

Re:Owl Lisp – A purely functional Scheme that compiles to C by qwertyuiop924 on Saturday September 10, 2016 @04:04PM (#12470671)
Scheme is always mutable, all the time, it just has separate functions for defining and mutating a variable.
Re:Owl Lisp – A purely functional Scheme that compiles to C by bakul on Saturday September 10, 2016 @03:47PM (#12470611)
What about set-car! set-cdr! vector-set! string-set!
Re:Owl Lisp – A purely functional Scheme that compiles to C by 35bge57dtjku on Saturday September 10, 2016 @07:05PM (#12471285)
If you can't easily avoid those, you're not going to be capable of doing much else anyway.
Re:Owl Lisp – A purely functional Scheme that compiles to C by bakul on Saturday September 10, 2016 @07:27PM (#12471370)
I was responding to "If I understand what you mean by "immutable by default", then it's all Scheme implementations"; not whether one should or should not use mutating operations!
Re:Owl Lisp – A purely functional Scheme that compiles to C by 35bge57dtjku on Saturday September 10, 2016 @08:44PM (#12471557)
So what does "immutable by default" mean??? Is there even an agreed upon definition? Because you certainly didn't explain / explain clearly if that's what you were attempting to do... Clojure has mutable vars and set!, so it seems Scheme is no worse and fits that guy's definition of IbD.
Re:Owl Lisp – A purely functional Scheme that compiles to C by bakul on Saturday September 10, 2016 @10:41PM (#12471795)
Consider:

  (define x (vector 1 2 3 4))
  (define y x)
  (vector-set! x 0 100)
Should y[0] be 100 or 1?
Re:Owl Lisp – A purely functional Scheme that compiles to C by 35bge57dtjku on Sunday September 11, 2016 @11:49PM (#12477063)
That's not really relevant. According to the guy's own definition, Scheme is as immutable as Clojure, which is what he was specifically asking. They both have something like set!. If you want to wank off about Scheme not being 100% immutable, go right ahead, but it's clearly not what was being discussed.
Re:Owl Lisp – A purely functional Scheme that compiles to C by dleslie on Saturday September 10, 2016 @05:16PM (#12470910)
They are discouraged by convention.