News for hackers. Stuff that matters.
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by codygman on Tuesday March 31, 2015 @04:04PM (#9299483)
Put this in my "watch later" queue. I'm very interested in a Lisp whose type system is on par with that of Haskell/Ocaml.

EDIT: Especially since Shen is now BSD licensed.

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by AnimalMuppet on Tuesday March 31, 2015 @04:58PM (#9299833)
To me, it seems impossible to have both macros and a type system on par with Haskell. Either your macros can no longer do arbitrary textural transformations, or your type system can't reason about macro cases. (Or, I suppose, your type system has to run after the macro transformations, and you could get a type error then just like you could get a syntax error then. But that means your IDE/development environment can't give you any type assistance on macro calls - you have to compile it to find out if it works. (Or, I suppose, your IDE has to run the macro for you and then do the type checking on the resulting post-macro code.))

I am open to being proven wrong, though...

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by necubi on Tuesday March 31, 2015 @05:31PM (#9300043)
Scala has macros [0], and as you reasoned the type checker has to run after the macro expansion. That's not a huge downside; to the user it still appears to be a single pipeline (parsing -> macro expansion -> type checking -> compilation).

Haskell also has very powerful metaprogramming facilities, like template haskell [1].

[0] http://scalamacros.org/ [1] https://wiki.haskell.org/Template_Haskell

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by doublec on Tuesday March 31, 2015 @05:14PM (#9299944)
ATS had macros: http://ats-lang.sourceforge.net/htdocs-old/TUTORIAL/contents...

I'm not sure if these made it into ATS2 though.

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by deech on Tuesday March 31, 2015 @07:04PM (#9300485)
The second half of the talk (http://www.youtube.com/watch?v=lMcRBdSdO_U&t=17m30s) is about turning a JSON object into a type using macros and meta-programming.
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by gmfawcett on Tuesday March 31, 2015 @07:14PM (#9300528)
MetaOcaml's type-safe staged metaprogramming is not strictly a macro system, but it is morally equivalent: http://okmij.org/ftp/ML/MetaOCaml.html
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by sordina on Tuesday March 31, 2015 @06:22PM (#9300310)
> it seems impossible to have both macros and a type system on par with Haskell

You should check out the work being done on typed template Haskell then.

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by andrewchambers on Tuesday March 31, 2015 @06:26PM (#9300326)
You can have a language which has to be parsed top down, then you can have both complete type info, and arbitrary macros.
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by 616c on Tuesday March 31, 2015 @05:01PM (#9299859)
Now, I understand that is BSD licensed, but I am bothered by their proud "we support OSI, but never GPL" attitude. I wonder what happened to the original developer, but does anyone know why he has GPL issues? Yes, I know he is not unique in the industry at large, but I rarely see project download pages with GPL with a red line through it.

http://www.shenlanguage.org/download_form.html

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by doublec on Tuesday March 31, 2015 @05:04PM (#9299880)
The original developers thoughts on GPL have been discussed at length on the Shen mailing list during the BSD licensing donation period. If you look through the archives you'll be able to read their thoughts.

This link may be a start: https://groups.google.com/d/msg/qilang/mVSJIyp-OhM/FjcAOAWUi...

It's unfortunate that the original authors views on licensing takes so much discussion away from Shen itself as it's an interesting language.

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by 616c on Tuesday March 31, 2015 @05:18PM (#9299963)
So true. I am watching this video and I am very impressed. I am a novice programmer, but from what I read on HN the Shen system hits all cylinders a lot of the more powerful advanced programming paradigms. I am a Shen outsider and there seems to be some much overhead that is not technical when I read about it and it upsets me bc, well, it is a work of art.

I just started studying Java, and found the yet to be certified Java implementation. I am afraid to look at it, lest brains come of my nose.

https://github.com/hraberg/Shen.java

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by tluyben2 on Tuesday March 31, 2015 @05:57PM (#9300178)
One of the great advantages of Shen is that it is built on top of a very simple Lisp called KL of which you can (at least basically working) implement an interpreter or compiler in any language in a day. And when you did that, Shen will run on it. That's why there are so many targets and that's why most targets are not mature. I find it a great advantage though; you can make a compiler or runtime embedded in whatever you are doing really fast and then optimise it as you go.

Edit: I would say, if you want to practice on implementing a compiler & runtime (or VM with JIT or LLVM frontend etc) KL is a good place to start. It's so easy (again, to get something working; to optimise etc is obviously just as painful as with any other language implementation) that it is a lot of fun and you learn a lot if you never did it before.

Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by 616c on Tuesday March 31, 2015 @06:30PM (#9300355)
Is there any good introductory info on K lambda? I did some quick Googling and Wikipedia searching, I did not find a singular article about this, not general lamdba calculus or something useful to a complete novice like me.
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by doublec on Tuesday March 31, 2015 @07:00PM (#9300469)
I think this from the Shen site describes it: http://www.shenlanguage.org/learn-shen/shendoc.htm#Kl
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by tluyben2 on Wednesday April 01, 2015 @03:10AM (#9302070)
Yes, you would use that doc to implement it and then the Shen distribution to test if it works as expected. Unlike Shen, K lambda is quite a simple Lisp implementation, if you know a bit of Lisp it should all look pretty straight forward. It doesn't have any advanced stuff built in; that's all done on top.
Re:Shen: A Sufficiently Advanced Lisp [video] (2014) by e12e on Tuesday March 31, 2015 @11:06PM (#9301271)
Thanks for that link. I might not agree with all views presented, but the question about re-licensing as framed there was new to me. I'm very much pro GPL/FSF -- but when leveraging copyright to achive copyleft, it is important to understand the inner workings of copyright, and as this thread highlights the nitty-gritty of "derived work" and the difference between a liberal license to (re)distribute, versus the right to assert copyright, and thereby re-license.