12 ms·
Zygomys – An embedded scripting language for Go
- grabcocque 10y agoHuh no. You may have parens but that's it. It's not not predominantly a functional programming language and has no rich set of immutable, persistent data structures. So, it's no Clojure. But it is young. It may become a clojure but it seems presumptuous at this stage..
- Lazare 10y ago> it's not a lisp Why do you say that? > no powerful macro system It has macros that...look pretty powerful to me? What's your issue with them? > doesn't share with Lisp the code-as-data philosophy Can you flesh out your objections a bit more? Edit: For the sake of anyone reading this later, the comment I was replying to originally said Zygomys wasn't a lisp, which seemed a bit odd. It has since been edited to say Zygomys isn't Clojure, which is quite correct.
- deleted 10y ago[deleted]
- keymone 10y agoi think the largest issue is that their first example is this monstrosity: zygo> x := 3; y := 5; if x + y == 8 { (println "we add up") } else { (println "wat?" ) } still something being lisp is not really sufficient to claim it is clojure. clojure is much more.
- Lazare 10y agoAgreed. The comment I replied to was (at the time) disputing Zygomys's status as a lisp; it's since been changed to questioning Zygomys's claim to be a Clojure-equivalent, which I quite agree with. Perhaps a better analogy would be Groovy, rather than Clojure? (Of course, Groovy isn't "cool" these days, so I guess there's not much marketing juice in comparing your new language to it...)
- vorg 10y ago> Groovy isn't "cool" these days, so I guess there's not much marketing juice in comparing your new language to it I think of Apache Groovy as being to the JVM what bash is to Linux. You could compare it to bash.
- Lazare 10y agoWell, at one time it aimed to be quite a bit more. As I recall there was a lot of envy of dynamic language in general and Ruby in particular when Groovy first got popular. There was even a Groovy on Rails framework, just to make the longing more obvious. From memory, Groovy only reinvented itself as a scripting language some years later.
- iagooar 10y agoCalling itself a Clojure is a pretty bold statement. Clojure is one of the most revolutionary programming languages of the last decade, I can't see how this mini-toy-language packaged as a Go library can be compared to the mighty Clojure with a straight face.
- mapcars 10y agoWhat revolutionary exactly? Transducers?
- grabcocque 10y agoTransducers and Spec are two great examples of what Clojure's community is best at. There's a practicality of purpose and single mindedness of philosophy at play in the language's evolution here. Making simple easy. To my mind though, Clojure brought clarity to the JVM on issues of concurrency, state, mutability, object orientation and persistence and for that I will always love it.
- fnordsensei 10y agoIt's also spawned the recent interest in immutability. Via Om it's had a considerable effect on how Facebook has developed React and its ecosystem, for example.
- pjmlp 10y agoTransducers were already in Common Lisp in 1989, https://www.reddit.com/r/Clojure/comments/3tha86/transducers_in_1989/ https://www.reddit.com/r/Clojure/comments/3tha86/transducers... Likewise Spec ideas are not new to old timer Lispers, many forms of Lisp type annotations are similar to it. What Clojure has brought was making those ideas "modern" again.
- pron 10y agoIsn't the idea that all mutation must either be local or transactional rather revolutionary? In a sense, Erlang is like that, too, but Clojure took the idea much further. It is pretty clear that that's Clojure's the main idea.
- coldtea 10y ago>and has no rich set of immutable, persistent data structures. Lisp doesn't either. Functional programming >> immutability.
- omni 10y agoBut Clojure does, which was his point. zygomys is explicitly comparing itself to Clojure.
- coldtea 10y agoIn the sense that "Clojure is the de facto JVM Lisp" --> this aims to be the de facto Go environment Lisp. Not in the sense that it is more like Clojure than another Lisp in syntax and semantics.
- deleted 10y ago[deleted]
- lobster_johnson 10y agoThe way I understood it, the mention of Clojure was by analogy — Zygomys is to Go as Clojure is to Java (based on the same runtime, tight integration, but altogether different languages). I didn't interpret this to mean that Zygomys is anything like Clojure.
- delegate 10y agoI don't think Clojure is .. that .. to Java. Clojure is a language which compiles to JVM byte code, which is also the platform that java compiles to, so (as consequence of that) they can interoperate. But I don't think Clojure was meant as a replacement for Java or some kind of extension of the Java language or some sort of CoffeeScript for Java. Clojure is a powerful functional programming language with lots of new paradigms and original ideas - quite at the opposite spectrum of the object-oriented Java. Although I don't program in it, my C++ coding skills and more importantly architectural skills, improved dramatically after learning Clojure. So the title of the article is incorrect (and click-bait-y).
- mapcars 10y agoIt's too late guys, you should have try to popularize lisp like 10-20 years ago. Now we have much more powerful things, while you are still trying to catch up with lisps.
- kaoD 10y agoNot sure why I'm taking the bait but here I go: > Now we have much more powerful things Like what? Off the top of my head, Rust, Haskell and F# are probably the only ones that come close, and they're about as popular as the Lisps (i.e. not). > you should have try to popularize lisp like 10-20 years ago. Programmers want familiar syntax and infix notation while Lisps want homoiconicity. It's never going to happen. It's funny because people fear and loathe Lisp's parenthesis, while after a month of using Lisp, you don't see parens anymore (they're mostly for the parser).
- mapcars 10y ago>Like what? Like Rebol/Red. >Programmers want familiar syntax and infix notation Programmers wanted batch punchcards processing over timesharing interactive terminals, programmers wanted legacy and compatibility over innovation and modernization. Programmers wanted ugly write-compile-run-test in 70s terminal emulator stuff over live interactive graphical in-place debuggers. Face it, programmers are stupid and can't learn new technologies.
- nnq 10y agomore like Hy is to Python I'd say: http://docs.hylang.org/en/latest/quickstart.html http://docs.hylang.org/en/latest/quickstart.html
- camus2 10y agoNice project. > x := 3; y := 5; if x + y == 8 { (println "we add up") } else { (println "wat?" ) } though mixing C like syntax and LISP is a bit confusing. Why such choice ?
- jaten 10y agoThank you. I tend to do interactive mathy things, and find the infix being the default at the repl cuts down on keystrokes and speeds up the interaction. Anything within {} curly braces is treated as infix, and infix is the starting mode at the repl. You can freely mix (prefix) and {infix} as you wish. For longer math expressions this does tend to help readability.
- unwind 10y agoCode like if x + y == 8 { (println "we add up") } else { (println "wat?" ) } really seems to combine syntaxes in a super-confusing manner ... The "if" is not in an s-expression, but the println call is? And there are blocks denoted using C-style braces mixed in ... I think this would take a while to get used to. :)
- jaten 10y agoThe infix is optional, but I do find it nice for interaction.
- lacampbell 10y agoYou get used to real s-expressions very quickly. People have a big hangup about it bit if you have an open mind it becomes a non-issue.
- lacampbell 10y agoactually much nicer (and shorter) with a real s-expression: (println (if (== (+ x y) 8) "we add up" "wat"))
- TeeWEE 10y agoI like this, this allows me to build a complex application in go, but pluggable business logic in lisp.
- mrcactu5 10y agoi think this is really cool. Can anyone remind me (on formal grounds) why a programmer might be interested in a compiler LISP --> GO-lang I am a huge fan / user of Python (which is an interface to C) but that also did take some time to justify itself, no?