Valtan: Common Lisp to JavaScript Compiler
github.com
github.com
https://tailrecursion.com/~alan/documents/jacl-els-2020-draf...
- Is fully featured and has a conditions and restarts system that works on JS, and has CLOS, multimethods, etc
- Has great interop with the existing JS ecosystem. No painful conversions to and from CL, works/is documented well with existing JS tooling like parcel, webpack, mocha, etc
- Is close to being fully featured and not just implementing <50% (usually <30%) of the features of the language - Is production ready -- no weird compiler bugs, I can use this with real business
- Has a powerful linting tool -- A linting tool that can blacklist/whitelist a subset of common lisp macros and expressions that can be used in a project. You would need something like this for a real company to prevent the team from shooting themselves in the foot. Could probably be done in CL, sblint comes to mind but it's not well documented (like most lisp libraries) so I'm not sure.
- Culture changes: specifically the community needs to document things much better and be more pro-social instead of living on an island. Backend workflow needs good docs. Ex: I think fukamachi's web frameworks supersede weblocks afaict? not sure, but he has like half a dozen or so web frameworks and it's not obvious which one to choose. Ningle? utopian? caveman? clack + woo? documentation in most CL libraries are really lacking and you need to dig into the source
- Run CL programs without opening a debugger. Modern day workflows have CI pipelines and automation out the wazoo. CL expects you to run the debugger manually. There's a way to run asdf projects like a script but it's not well-documented
- The debugger needs to be more user friendly. Don't get me wrong, the debugger is one of the coolest features of CL, but asking a plain old JS dev to try to understand those low level stack traces is a form of torture. It's roots come from lower level programming, but newer devs want to use it for web app dev (like this to-js compiler posted here). A nicer, easier to understand layer like ReasonML's BetterErrors would be needed or an update to CL itself
- A real package manager. Not quicklisp -- that's a curated package list where you need to talk with a single person who approves it to get your package published
Lisp is probably more popular among those that read HN than the general developer public. It also depends on what you mean by "Lisp" (i.e Common Lisp or "the Lisp-derived languages")
Some examples:
• Clojure which runs on the JVM enjoys considerable popularity.
• Common Lisp seems to be popular amongst Quantum Computing researchers.
• Racket enjoys popularity by way of the Pollen Typesetting Engine.
• Emacs Lisp is used for all Emacs scripting.
• AutoLisp is used to script code for AutoCAD
• HackerNews is written in ArcLisp.
• Square Enix employs a proprietary dialect as a scripting language.
[0] https://www.sourceware.org/gdb/onlinedocs/gdb.html#Guile
2. https://lispjobs.wordpress.com/2014/10/22/senior-software-en...
Neither of them is Rigetti.
The design of LISP makes eval() and LISP's very syntax as first-class citizens which adheres to the code is data/data is code pragma. It makes LISP homoiconic [3]. It's an interesting and incredibly powerful property. Often too powerful for inexperienced programmers.
[1] https://en.wikipedia.org/wiki/Reification_(computer_science)
It's not complete or up to date.
https://stat.ethz.ch/R-manual/R-patched/library/codetools/ht...
Most R users don't realize everything in R can be written as a function, due to its Scheme roots. Example:
if (3 > 2) { print("hello") }
can be rewritten with backticks on the if:
`if`(3 > 2, print("hello"))
If the first argument is false, you need a third argument
`if`(3 < 2, print("hello"), print("go away"))
Essentially, the backticks replace some parens you'd use in Scheme, and then you can add some alternative syntactic sugar to write in Algol style.
If you look in the source for R (in C), you will note that all of the data structure names end with Sexp.
Basically using Clojure(Script) because it's a way faster way of developing software and frontends in particular. What you see inside of the platform (the frontend), is all built by one person since the start of the project.
But yeah, Bravo Studios frontend had it's initial commit May 27th so coming up to be about a year soon. Bunch of work mixed in on a Figma Plugin that didn't go anywhere as well, so I haven't been 100% focused on the frontend all the time but think we've made good progress so far.
It's great for prototyping and trying out new ideas.
(1) started in around 1986 when I had to write a neural network product in C++ (SAIC ANSim). I did all my prototyping in Coral Common Lisp, and converted to C++ once I had Art2, Hopfield, Boltzmann, backdrop, recurrent networks, etc. figured out.
[1] https://github.com/fukamachi/caveman [2] https://github.com/fukamachi/woo [3] https://github.com/fukamachi/dexador [4] https://github.com/fukamachi/websocket-driver [5] https://github.com/lmj/lparallel [6] https://github.com/cbaggers/rtg-math
Personally I also use nginx as reverse proxy a lot, but that's more because there's a ready to use Ingress Controller for kubernetes that uses it internally.
Use a regular "functional" language, like Haskell or scala and you get the best of all worlds
* https://github.com/Cirru/calcit-editor * https://github.com/Respo/respo
Previous discussion: https://news.ycombinator.com/item?id=21604850
But I guess it's closer to Common Lisp than what WASM's text format is, so might be helpful for some.
Is it too hard? Is there something that makes everyone give up? Or is lisp just too academic for most people to care?
lein new re-frame myapp
lein run
or git clone https://github.com/jacekschae/shadow-reagent.git && cd shadow-reagent
yarn install
yarn dev
It is very much fire and go in a way that a typical JavaScript developer might grok[1] http://hop.inria.fr/home/index.html [2] http://www-sop.inria.fr/mimosa/fp/Bigloo/
Not why you don't like or use it.
Clojure, currently is the most widely used Lisp dialect in the industry. Lots of people trying it and find it massively productive. Just because some lispers "don't like it", doesn't make it less valuable technological choice.
Citation needed.
I would bet money that this isn't true. There are a lot of places using proper Lisps that stay out of the public eye.
- Every PL ranking from RedMonk to TIOBE index indicates that what I'm saying is true;
- Clojure today has more conferences, books, podcasts, jobs and meetups. More than any of other language in its category of languages with strong FP emphasis. It is more popular than Haskell, Elm, Purescript, F#, Elixir, OCaml. Latest JVM survey indicates that it surpassed Scala and has become third most popular JVM language after Java and Kotlin;
- Clojurescript is the most popular alt-js choice (if you don't count Typescript as alt-js). Elm and ReasonML are far less popular;
- If you count by lines of code on Github and Gitlab, Clojure potentially may come second after Emacs Lisp (which is almost four times older than Clojure). Other Lisps wouldn't even be near their numbers.
- And please stop calling it an "improper Lisp." None of the authoritative Lisp scholars have ever indicated this even remotely to be true, in fact many have endorsed Clojure. Clojure can be viewed as a next evolutionary step in development of Lisp. Whether you like it or not, it is slowly spreading wide and beyond JVM (the platform it was initially intended to run on)
Why? TypeScript, for example, is used pretty much everywhere these days; all the other languages are completely niche. I dislike the language (mutability everywhere, no standard lib), but it's dominating the frontend world ATM.
I've been using Scala.js in production apps for around 3 years now. Curious in your experience what advantages Clojurescript has over Scala.js. I ask because you often hear things like "best in class" when Clojure devs talk about the frontend development experience.
- "oh, we can probably do this and that and get the same experience...", or
- "give [their favorite language] five to ten years, it'll get the same..."
It's been over six decades. Non-homoiconic languages still don't have "true" REPLs.
On the topic of tooling, I found the tooling to be slow as well. However, a lot of my pain points were alleviated when I really embraced using the REPL for developing. Tools like figwheel make developing fairly painless although startup times are still slow.
Whenever I go back to using Common Lisp I'm always surprised how fast the startup time is by comparison.
But one problem that ClojureScript avoids by virtue of being a 'hosted language' and not having a spec is having to implement its own numeric tower. Numbers can just be floats and move on.
CL mandates integers. Not just fixnums, like WebASM provides, but bignums. As well as rationals. That is a lot of code your run-time will have to provide.
iirc Whalesong (the Racket to JS implementation) bundled a numeric tower that implemented integers using strings).
2. People doing webdev in lisp have solutions that work "well enough" for them.
3. It's not obvious how to compile a lot of commonly used CL constructs into efficient javascript. Discarded multiple values, for example, are extremely efficient on bare-metal implementations, but will have measurable overhead when not inlined in any javascript implementation.
IMO, Babeljs could be leveraged to create one much faster.
Closure is a Lisp-1, as is Scheme, and (despite it being at least as “academic” as CL) there are lots of Scheme-in-JS implementations.
These are both false. This site is just one example. Here is another: https://wigflip.com/signbot/. And another: https://wigflip.com/roflbot/. (Base domain is https://wigflip.com/).
Grammarly is Lisp.