News for hackers. Stuff that matters.
Re:Lisp: it's not about macros, it's about READ (2012) by wtbob on Sunday July 17, 2016 @10:32PM (#12112958)
> Sure, when Lisp came out it was "advanced". Garbage collection, AST parsing and manipulation, macros, packages, a standard library, modules, homoiconic data structures, etc.

The big advantage of Lisp is that is has homoiconic code, and that it's easy to work with that code, and that's it's easy to extend that code.

Lisp doesn't actually have a very good module system: but ASDF extends it so that it does. Lisp didn't actually have any OO features, but CLOS extended it so that it does.

That's the advantage of Lisp (and Lisp-like languages) which I've never encountered elsewhere: you can grow and expand the language. You don't have to wait for some committee or gatekeeper: you can do it, right now. Your way may not be the best, but you can do it.

I really miss that in other languages.

Re:Lisp: it's not about macros, it's about READ (2012) by wtetzner on Sunday July 17, 2016 @11:41PM (#12113124)
> I really miss that in other languages.

Elixir has a pretty good lisp-inspired macro system. And it's hygienic by default, too.

And Elixir's pattern matching actually makes manipulating the forms even easier.

Re:Lisp: it's not about macros, it's about READ (2012) by eggy on Monday July 18, 2016 @06:27AM (#12114196)
LFE, Lisp Flavored Erlang, is much closer to Lisp, and not just in name. And, LFE is compatible with both Elixir and Erlang. [1]

To quote, Robert Virding, one of Erlang's creators and the creator of LFE:

I would say that one restriction with the type of macros that elixir has, irrespective of whether we call it homoiconic or not, is that they can only manipulate existing forms in the AST, they can't define new syntactic forms. In elixir this means that you basically work with function calls. There is syntactic support for making the function calls look less like function calls but the macros you define are basically function calls. In Lisp you are free to create completely new syntactic forms. Whether this is a feature of the homoiconicity of Lisp or of Lisp itself is another question as the Lisp syntax is very simple and everything basically has the same structure anyway. Some people say Lisp has no syntax. [2]

[1] http://stackoverflow.com/questions/35060080/erlang-vs-elixir... [2] https://news.ycombinator.com/item?id=7623991

Re:Lisp: it's not about macros, it's about READ (2012) by wtetzner on Monday July 18, 2016 @11:12AM (#12115503)
Yes, that's true, but they were saying they wanted macros in non-lisp languages. I gave an example of a non-lisp language that has lisp-like macros.
Re:Lisp: it's not about macros, it's about READ (2012) by eggy on Monday July 18, 2016 @05:42PM (#12118221)
Granted. I guess it boils down to degree of 'Lisp-like' when talking macros. Another article on HN today about Racket, Template Haskell and macros. I think the whole idea is that Haskell doesn't really need them, since it has other ways of achieving similar ends thereby making TH macros a bad fit for Haskell.

I like Elixir a lot, but I have the luxury of not depending on coding for a living, so I am learning LFE because I like how it is as much a Lisp as it can be when constrained by the BEAM. Truthfully, I could stay away from all of the distributed languages like Erlang, Elixir, LFE, Pony and others, since I don't really have a use for them (yet - looking at ABM Agent-Based Modeling).

But I keep at LFE by trying to duplicate the book 'The Handbook of Neuroevolution Through Erlang'. There are at least a couple of other people who have started it in LFE and the other in Elixir. A good fit for ANNs.

Re:Lisp: it's not about macros, it's about READ (2012) by wtbob on Monday July 18, 2016 @07:26PM (#12118584)
> they were saying they wanted macros in non-lisp languages.

He; I don't have multiple personalities

Re:Lisp: it's not about macros, it's about READ (2012) by wtetzner on Tuesday July 19, 2016 @11:11AM (#12122215)
Yes, I didn't mean to suggest you do :)

I was using the singular they: https://en.wikipedia.org/wiki/Singular_they

Re:Lisp: it's not about macros, it's about READ (2012) by wtbob on Tuesday July 19, 2016 @01:48AM (#12120011)
Ouch, HN stripped the smiley face I appended to that. So I'll add a textual one now: grin
Re:Lisp: it's not about macros, it's about READ (2012) by xuejie on Monday July 18, 2016 @02:32AM (#12113514)
This is actually one example I'd like to refer to when people are talking that alternative languages with macros can achieve Lisp's flexibility: https://www.pvk.ca/Blog/2014/08/16/how-to-define-new-intrins...

Till this point I haven't seen anything similar in languages other than Lisp. Maybe Elixir can do this but I lack enough knowledge to judge.

BTW: that does not mean I'm a Lisp zealot, been there but has been away for quite some time.

Re:Lisp: it's not about macros, it's about READ (2012) by gpderetta on Monday July 18, 2016 @06:37AM (#12114233)
How's that better than inline assembler? It seems to me that it is highly compiler (i.e. SBCL) dependent.
Re:Lisp: it's not about macros, it's about READ (2012) by xuejie on Monday July 18, 2016 @10:11AM (#12115105)
I agree, it's essentially an inline assembler, but the fact that it integrates so well with SBCL tells us that the SBCL team really did an awesome job here.
Re:Lisp: it's not about macros, it's about READ (2012) by youjiuzhifeng on Monday July 18, 2016 @03:05AM (#12113585)
Clojure has a pattern matching library https://github.com/clojure/core.match. And I think clojure is the most widely used Lisp dialect now.
Re:Lisp: it's not about macros, it's about READ (2012) by kiiski on Monday July 18, 2016 @07:14AM (#12114369)
There is one for Common Lisp too https://github.com/m2ym/optima
Re:Lisp: it's not about macros, it's about READ (2012) by wtetzner on Monday July 18, 2016 @11:16AM (#12115539)
Yes, I've used it, and it's quite nice. But it's not quite the same. In Elixir (and of course Erlang), pattern matching is pervasive. You use it when defining functions by defining multiple heads, each with a different patter. You can also use it when binding variables. For example:

{:ok, result} = compute_data(some_value, another_value)

If compute_data doesn't return a pair where the first value is :ok, it will throw an error.

Re:Lisp: it's not about macros, it's about READ (2012) by armitron on Monday July 18, 2016 @09:48AM (#12114981)
Not by a long shot, Emacs Lisp is the most widely used Lisp dialect, by far. Clojure isn't even close.
Re:Lisp: it's not about macros, it's about READ (2012) by sitkack on Monday July 18, 2016 @10:25AM (#12115193)
Maybe if used means, "to create web applications".
Re:Lisp: it's not about macros, it's about READ (2012) by wcummings on Monday July 18, 2016 @12:33AM (#12113231)
You can implement pattern matching in lisp