Lispsyntax.jl: A Clojure-like Lisp syntax for julia
github.com
github.com
My take on "Lisp in Julia" using deprecated-but-still-parseable syntax instead of a string macro: https://github.com/christopher-dG/jlisp
I should probably put some examples in the readme.
A better example would be Java/Clojure.
The main ones I am aware of are:
JavaScript: you basically got to if you want to run in a browser.
And C Because it's available on every piece of hardware, it was there before llvm and it doesn't change across hardware (unlike assembly), and most people writing languages know C.
JVM, the .Net CLR etc are not languages. They are intermidate representations like LLVM is. (Approximately). They were designed to be compilation targets. Julia wasn't.
Most of Julia's intersting compiler features are unusual because they need to solve problems Julia has in general other languages wouldn't,or that would not transfer across language boundaries.
The macro stuff is awesome for DSLs. Messing with compiler passed is cool for adding capacities. But I think much more in the sense of implementing a micro language that is closely related to Julia, rather than a full on language that has its own goals and identity (I want to write one for codegolf called Jules that is just Julia except on an error it tries some other lexically nearby code)
Running 'julia --lisp' launches a femtolisp (https://github.com/JeffBezanson/femtolisp) interpreter.
https://github.com/JuliaLang/julia/blob/master/src/julia-par...
Jesus H Christ could the whole FP world stop this? You're either going to prioritize static types or you're going to blow them off. Either front-and-center your type system, or stop mentioning how you blew it off. Those of us who want Clojure's syntax and semantics and a decent type system would like to stop being taunted.
When the notes say "optional typing - currently not implemented", all they're saying is that this syntax doesn't allow you to tap into that feature, because a syntax for type declarations has not been provided.
When this gets typing, it will be with Julia’s very powerful and expressive type system (which is dynamic by the way), and it just needs someone to modify the LispSyatax.jl parser to properly represent the type annotations.
Calm down.
You’re the second person to say so, and it’s entirely possible I’ve misunderstood the language I quoted that’s nearly verbatim in almost every new lisp that addresses static types at all.
> When this gets typing
I’m not entirely clear that there’s any intention of it getting typing. Am I missing some statement that “not implemented” is temporary?
> Calm down.
I’m sorry I took my exasperation out on this project which I’m sure is awesome. It’s just a very general frustration I feel about the priorities of the FP+lisp community generally. Like I expressed, it’s exceptionally common to announce a new lisp (language or syntax) where static types are explicitly called out as a headline non-feature.
It’s disappointing because every time I see “lisp”, especially “Clojure like”, and I see types addressed explicitly... I keep hoping someone’s come along and married a syntax and (hopefully) state management approach I adore with a static analysis DX I also adore. And 100% of the time so far it’s been... “Types? Glad I got your attention, this isn’t for you!”
I’m well aware I’m not entitled to other people building the language I want. I’m even well aware I could build it myself, probably on top of these existing lisps.
I’m just disappointed to see so many projects explicitly identify something I want in a way that feels hopeful and bury the “nope we didn’t actually bring a type system to something like clojure” behind the headline.
I’m not losing sleep over it (other than to type this between falling asleep on the couch and proper bedtime), but can you understand how that messaging is a disappointing thing?
[1] Yes, there's optional type declarations in CL, as an add-on feature. But I'd guess most CL programs don't elect to use them.
$ grep 'static type' txr-web/*.html txr/txr.1
$
No hit for "static type" in the web pages or reference manual. Dynamic type ditto: $ grep 'dynamic type' txr-web/*.html txr/txr.1
$
I don't think Common Lisp has a "prominent headline" about static types anywhere, either. There are no hits for any of those terms in the draft ANSI standard:https://franz.com/support/documentation/cl-ansi-standard-dra...
Scheme's R7RS explicitly talks about dynamic typing in two places:
Introduction:
Scheme was one of the first programming languages to incorporate first-class procedures as in the lambda calculus, thereby proving the usefulness of static scope rules and block structure in a dynamically typed language.
1.1 Semantics:
Scheme is a dynamically typed language. Types are associated with values (also called objects) rather than with variables. Statically typed languages, by contrast, associate types with variables and expressions as well as with values.
That's also the only mention of "static type" or "statically typed".
> It’s so much a general expectation that a lisp will have a dynamic type system that it’s safe to assume and could go without saying.
A language reference manual has to document the type system so that someone knowing nothing about language type systems can understand it. This can be done without using dynamic type terminology or mentioning static type checking, but it has to be done.
There is a lot of detail there; no two dynamic type systems are exactly alike.
The only thing that needs implementing is a syntactic form.
If it were not mentioned, the implication would by that it was available.
Is it that the Lisp language exposes the Abstract Syntax Tree (AST) of the code, so that you can reformulate it into your domain-specific macros, thereby helping you encapsulate complex logic into more succinct constructs?
Is this why they say that Lisp is fantastic for small groups of programmers, that share similar groupthink, and uses all the same macros, but it becomes a horrendous mess when multiple teams are involved.
I'd say yes, this, though you don't actually manipulate a proper AST, but a list (tree) of program instructions. An AST would be given by a "code walker". Plus, the syntax is small and coherent, the language is stable, the syntax makes it straightforward to add new language constructs that would need a language release for another classical language. With most implementations of Common Lisp, you code against a live image, so you get instant feedback: compile a function with a keybinding, see compiler warnings or errors instantly, try it right away in the REPL (no process had to restart), get an interactive debugger on an error, fix it and resume the execution from a chosen frame (no stack unbinding), inspect objects, change a class definition and have existing objects being (lazely) updated, given rules in the standard that you can control… when ready, build a binary, and deploy. Today, SBCL's compile-time type-inference warnings are very helpful.
Of course, some companies use CL in a million-sized codebase (if that helps as a counter example): Google (ITA software), SISCOG (underground and rail transport optimisation), ACL2 (industry-strength theorem prover)…
https://lisp-lang.org/success/
https://github.com/azzamsa/awesome-lisp-companies (disclaimer: these resources are not complete)
Others know better the limitations of Lisp systems of the 80s or 90s. The compilers also improved (SBCL; there is CLASP in development to interface with C++ code, and more)
TLDR; it's catching up :D
No, why they say is because they have zero experience with Lisp, in any size project.
And there exists no tool using which some people have not made big, huge mess. We can easily lob this criticism at anything, quite randomly.
Imagine a tool which has the property that a team of doofuses, no matter how large (in head count and doofiness), cannot make any sort of "horrendous mess". What sort of limitations does that entail, and could any of us here live with them?
It would also only take a couple of hundred lines to write a parser for a C compiler that would allow that.
Add all that up, and you're no longer looking at alternative syntax, you're looking at a transpiler.
You would be harder-pressed to create an alternative parenthesis syntax for C, because C is so syntactically complex.
The three most popular Lisps today are C.L., Clojure, and Scheme, and I don't see these three having unified semantics at all and they are often further from each other than they are to many other languages.
You're probably right though that we wouldn't be tempted to group them together nowadays if it weren't for their syntactic similarities.
Particularly Rich... Hickey?