9 ms·
Valtan: Common Lisp to JavaScript Compiler
- _threads 7y agoI see a lot of Lisp stuff on HN : do a lot of people use it ?
- hvs 7y agoYou're using it right now :) https://en.wikipedia.org/wiki/Arc_(programming_language) https://en.wikipedia.org/wiki/Arc_(programming_language) 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")
- iddan 7y agoHacker News is built with it
- throwanem 7y agoNot really, but Paul Graham likes it, and narrowly speaking, he's not wrong about its unique power and flexibility. I think those traits meant a lot more in the late 90s and early 00s, when powerful and flexible programming environments and engineers skilled in their use were much thinner on the ground than today, but I like it too, especially in the form of Emacs.
- bloopernova 7y agoI use it every day in the form of Emacs, and I'm slowly learning it because I find it a fascinating language. (I'm a sysadmin/devops by trade/experience, moving into team lead territory, so I'm not a coder by any stretch of the imagination)
- tester89 7y agoIt’s not super common anymore but it is used. 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.
- eatonphil 7y agoMany GNU programs come with a builtin Scheme interpreter (gdb, for example).
- leethargo 7y agoYou mean GNU Guile?
- eatonphil 7y agoYep [0]. However GIMP does not use Guile, it uses TinyScheme for it's Script-Fu [1]. [0] https://www.sourceware.org/gdb/onlinedocs/gdb.html#Guile https://www.sourceware.org/gdb/onlinedocs/gdb.html#Guile [1] https://en.wikipedia.org/wiki/TinyScheme https://en.wikipedia.org/wiki/TinyScheme
- gaze 7y agoIt’s not popular among quantum computing groups. We largely use python. It’s popular in a group inside rigetti.
- mike_ivanov 7y ago1. https://www.schloerconsulting.com/quantum-computer-q-lisp-programming-language https://www.schloerconsulting.com/quantum-computer-q-lisp-pr... 2. https://lispjobs.wordpress.com/2014/10/22/senior-software-engineer-d-wave-burnaby-british-columbia-canada/ https://lispjobs.wordpress.com/2014/10/22/senior-software-en... Neither of them is Rigetti.
- gaze 7y agoThe first seems like a nonserious thing and D-Wave is a crank company.
- mike_ivanov 7y agoAye, no TRUE quantum computing company (except for Rigetti) wid dae that!
- _bxg1 7y agoI think it's more accurate to say a lot of people like it. Especially for personal projects. Double-especially for compiler/interpreter personal projects (one of its key features is being extremely simple to parse).
- daeken 7y agoLisp ends up in nearly every project I work on. For instance, I'm using a custom Lisp for defining CPU behavior right now: https://github.com/daeken/libmoonage/blob/master/Generator/aarch64.isa https://github.com/daeken/libmoonage/blob/master/Generator/a...
- marcrosoft 7y agoNot really, but you should learn it anyways. I bought a bunch of lisp books and have been working through them. It is not really objective but I already feel like I'm a better programmer after learning lisp. It has also been a great history lesson in programming languages. I see pieces of lisp in nearly all other languages.
- ukj 7y agoTo understand why LISP matters (in theory anyway) is to understand the concept of reification [1]. What you choose to reify (make explicit) in a particular language is a design decision. It's directly related to point 0 in Wadler's law [2] - semantics. 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) https://en.wikipedia.org/wiki/Reification_(computer_science) [2] https://wiki.haskell.org/Wadler's_Law https://wiki.haskell.org/Wadler's_Law [3] https://en.wikipedia.org/wiki/Homoiconicity https://en.wikipedia.org/wiki/Homoiconicity
- pjmlp 7y agoThis company does, https://www.siscog.pt/en/ https://www.siscog.pt/en/
- frompdx 7y agoI use Common Lisp and Clojure(Script) for personal projects. Lisp can be a tough sell in a corporate setting, however, some large companies do use Lisp. To my knowledge both Walmart Labs and Cigna use ClojureScript for at least some of their products.
- ilikehurdles 7y agoYou can find a partial list of companies that use some clojure on clojure.org: https://clojure.org/community/companies https://clojure.org/community/companies It's not complete or up to date.
- fxj 7y agoThere is uLisp for IoT Arduino, ESP8266 and MicroBit http://www.ulisp.com/show?3J http://www.ulisp.com/show?3J
- fxj 7y agoThe R engine began life as a very simple Lisp interpreter. There is also an R package which gives the Lisp-style representation of an R expression. You can even use it as a R to Lisp Compiler. https://stat.ethz.ch/R-manual/R-patched/library/codetools/html/showTree.html https://stat.ethz.ch/R-manual/R-patched/library/codetools/ht... http://dan.corlan.net/R_to_common_lisp_translator/ http://dan.corlan.net/R_to_common_lisp_translator/
- bachmeier 7y agoThanks. I wasn't aware of showTree. 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.
- disgruntledphd2 7y agoYup. If you look in the source for R (in C), you will note that all of the data structure names end with Sexp.
- zelly 7y agoMore like Lisp stuff gets guaranteed upvotes and visibility. HN does a lot of Lisp service. This is Paul Graham's site after all.
- ballpark 7y agoClojure (not Common Lisp, but a lisp) is more prominent than many people think. I use it, and it's a primary language in a R&D area at the fortune 50 company where I work.
- diggan 7y agoOh yeah! I'm not using Common Lisp but ClojureScript to build the entire frontend for https://bravostudio.app https://bravostudio.app 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.
- nudpiedo 7y agodo you mean the landing page or also the bravo studio featured on the video? how long did it take? because to create such editors is like a good deal of work and planning.
- diggan 7y agoNo, landing page is made in webflow by not-the-frontend-team, talking about the Bravo Studio featured in the video (accessible here: https://projects.bravostudio.app https://projects.bravostudio.app). We're a young startup so been doing less planning and more doing, maybe to a fault, as what we lacked in planning would have to be covered up by spending more time working on it. 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.
- codr7 7y agoCommon Lisp keeps me sane, most of my paid work is in more primitive and constrained languages. It's great for prototyping and trying out new ideas.
- mark_l_watson 7y agoCommon Lisp also has a good story for application bundling and deployment. It has almost always been my prototyping language (1) but is great for other purposes. (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.
- gibsonf1 7y agoWe use it for the core of our AGI and our in-memory graph db in full production - very very fast. The web libraries for lisp are very good as well with Fukamachi libraries, such as [1] caveman and [2] woo (fastest web server), [3] dexador, [4] websockets, also [5] parallel processing, [6] rtg-math incredibly fast math library including quaternion support, etc. [1] https://github.com/fukamachi/caveman https://github.com/fukamachi/caveman [2] https://github.com/fukamachi/woo https://github.com/fukamachi/woo [3] https://github.com/fukamachi/dexador https://github.com/fukamachi/dexador [4] https://github.com/fukamachi/websocket-driver https://github.com/fukamachi/websocket-driver [5] https://github.com/lmj/lparallel https://github.com/lmj/lparallel [6] https://github.com/cbaggers/rtg-math https://github.com/cbaggers/rtg-math
- dreamcompiler 7y agoLast time I checked, woo doesn't support TLS. Has that changed?
- p_l 7y agoGiven present day approach of using reverse proxies for TLS termination, that's not much of a limitation.
- dreamcompiler 7y agoThat's the solution I use with mod_lisp running behind Apache too, but I'd like to get away from Apache. I'll try haproxy.
- p_l 7y agoHAproxy is really, really good. 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.
- gibsonf1 7y agoWe took the simple solution of running haproxy to handle ssl, and then using a woo server behind that. This is that setup: https://graphmetrix.com https://graphmetrix.com
- dreamcompiler 7y agoITA Software, which became Google Flights, was written in Common Lisp. I had heard stories about Google trying to reimplement it in another language, but don't know if that's true or whether it succeeded. Can anyone comment?
- animalnewbie 7y agoJust mutual admiration society. It's a parentheses hell and good only for self flagellation. It does have a sense of elegance and can be fun but again, the parentheses hell would be enough of a turn off once you start writing long programs. Use a regular "functional" language, like Haskell or scala and you get the best of all worlds
- jiyinyiyong 7y agoI do, in ClojureScript. Here are two of my main projects: * https://github.com/Cirru/calcit-editor https://github.com/Cirru/calcit-editor * https://github.com/Respo/respo https://github.com/Respo/respo
- hashkb 7y agoThere are too many incomplete lisp-on-js solutions. No, CLJS doesn't count. It would be so awesome if one ever made it to actual usable maturity. Is it too hard? Is there something that makes everyone give up? Or is lisp just too academic for most people to care?
- Turing_Machine 7y agoIf you include Scheme under the heading of Lisp, BiwaScheme is pretty darned good. https://www.biwascheme.org/ https://www.biwascheme.org/
- hashkb 7y agoI do. Checking it out.
- aidenn0 7y agoI find it somewhat arbitrary that you accept scheme but not clojure as a lisp.
- hashkb 7y agoI accept Clojure as a lisp. Didn't mean to start a holy war. I just don't personally want to deal with it and its ecosystem, which includes Java. I need your average web developer to be able to clone the repo, run yarn, and go.
- slifin 7y agoI understand your point, CLJS is a superset so it's ideal to understand the substrate that it's based on, it's more complex than just JS from that point of view but usability wise: 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
- 7y ago
- threatofrain 7y agoAlso potentially coming down the line is JACL (Javascript-Assisted Common Lisp), a web-app focused dialect of Common Lisp. https://tailrecursion.com/~alan/documents/jacl-els-2020-draft.pdf https://tailrecursion.com/~alan/documents/jacl-els-2020-draf...
- zelly 7y agoNow do WebAssembly.
- shrimp_emoji 7y agoBetter than JavaScript.
- diggan 7y agoNot CL but still lisp > WASM: https://github.com/roman01la/clj-wasm https://github.com/roman01la/clj-wasm Previous discussion: https://news.ycombinator.com/item?id=21604850 https://news.ycombinator.com/item?id=21604850
- _wdoa 7y agoI'd hold off on getting too excited about this. Until it: - 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