10 ms·
Julia and the Reincarnation of Lisp (2020)
- vindarel 5y ago> anyone uses it in industry we just don't get the news. Now we have some pointers: https://github.com/azzamsa/awesome-lisp-companies/ https://github.com/azzamsa/awesome-lisp-companies/ There are big names and companies in a diversity of areas. > lack of intuitiveness towards Julia syntax that's a great thing about Lisp > Lisp could never break out into the mainstream. yes it did in the 80s, it has been on top 3 of the Tiobe index for many years. It's ranked 25 this month, before Rust, Julia, Haskell, Scala, Lua, Elixir, Clojure… funny right? Yes the Tiobe index doesn't measure very meaningful stuff. Why not Julia and why Lisp? I collected some feedback: https://gist.github.com/vindarel/15f4021baad4d22d334cb5ce2bec088a https://gist.github.com/vindarel/15f4021baad4d22d334cb5ce2be... The REPL, the static checks, the binaries/deployment options, the stability, the load times, the ecosystem… are weaker in Julia. This quote makes me wonder: > This means there is an upper bound to how good the editing and refactoring tooling will be. I suspect the best will be a little below Pythong's tooling, because Python's class helps in disambiguating methods.
- jmercouris 5y agoJulia has nothing to do with Lisp. Also a language is neither fast nor slow, the implementation of said language is.
- Rusky 5y ago> Also a language is neither fast nor slow, the implementation of said language is. I don't like how much this simplification gets used. Of course there is more than one way to implement a given language. But there is also more than one way to design a language, and that can have big effects on its implementation(s), and that's usually what people mean when they speak of "fast languages." Not to mention that many languages only have one implementation, or else many that have all converged to the same performance characteristics. And on top of that, it's rarely a question of how fast or slow an entire implementation is, either! Individual codebases or problem spaces need different things from their languages.
- User23 5y agoIt’s not a simplification, it’s observing a basic category error. It’s confusing the procedure and the process. Consider for example how the same procedure executing in the same runtime on different processor families will result in highly divergent executing processes. And practically speaking even then they may not even be equivalent up to the explicitly or implicitly specified behavior. Nevertheless ideally when we talk about a language we are talking about a set of semantics that is independent of whatever mechanism executes the processes specified by procedures written in that language.
- oscardssmith 5y agoSome semantics are inherently slow though. If you are allowed to add fields to a class at runtime, you have to box all your objects. If you can eval in local scopes, you need to check to make sure you're running the right code. There are many types of semantic decisions with inevitable performance impact.
- jhgb 5y ago> If you are allowed to add fields to a class at runtime, you have to box all your objects. Do you? You could restructure your data in memory if you wanted to, at least if the assumption is that adding a field is a rare operation.
- lispm 5y agoI would not expect that such features are added under the assumption that it is rarely used. Common Lisp for example has the assumption in the standard, that the object system is fully dynamic and supports a wide variety of live changes (adding/removing/changing of methods, classes, slots, superclasses, ...).
- jhgb 5y ago"Rarely" meaning compared to other elementary operations, such as function or method calls. So it makes sense to make function or method calls faster at the expense of making restructuring slower. That's basically the same principle as with Smalltalk and Lisp structures/objects being vectors as opposed to hash tables (like in Ruby or Python), even if it means that adding a field necessitates having to change the layout of existing instances. This way you'd need to also change the layout of other types that use the unboxed representation of the type being altered but the basic principle is the same and you already have the mechanism for updating your existing heap anyway -- so it should be possible and mere possibility of altering a type shouldn't necessitate boxing everything. "If you are allowed to add fields to a class at runtime, you have to box all your objects" should be no more correct than "if you are allowed to add fields to a class at runtime, all your object instances have to be hash tables".
- remram 5y agoOf course they are, what do you call a language that does not permit a fast implementation, or a language that exposes low-level primitives specifically for performance work?
- mark_l_watson 5y agoJulia does support REPL style development, and the little I have used it, it was effective for deep learning, text processing, and SPARQL/linked data clients.
- Sanguinaire 5y agoI would say that Julia not only supports a REPL, but is heavily biased towards its usage - enough to be detrimental IMO.
- vindarel 5y agobut its REPL is slow and not as interactive.
- hpcjoe 5y agoMy biggest complaint is static compilation. There are things you can do with PackageCompiler, but they don't work for some of the code I write. This makes deployment of artefacts harder than it needs to be. Most of the infrastructure is there in the code, it just needs to be tied together, in such a way that juliac file.jl -o file.x results in a deployable (preferably static) binary.
- the__alchemist 5y agoTo clarify (Correct me if this isn't what you mean), Julia compiles not only program code, but dependency code each time you run a program. This can make simple programs and scripts take a long time to start. A common response is "Use the REPL", where it compiles the dependencies once at load.
- borodi 5y agoJulia has a JIT compiler but it doesn't store the compiled code between sessions. This can add a delay on the first time you call a function. By keeping the REPL open you can avoid having these delays multiple times.
- hpcjoe 5y ago
- mtreis86 5y ago"The strongest legacy of Lisp in the Julia language is its metaprogramming support. Like Lisp, Julia represents its own code as a data structure of the language itself." From https://docs.julialang.org/en/v1/manual/metaprogramming/ https://docs.julialang.org/en/v1/manual/metaprogramming/
- ralphc 5y agoMultiple dispatch is a pretty strong legacy of CLOS as well.
- ArchieMaclean 5y agoJulia has a fair amount in common with Lisp, especially with macros. You can use metaprogramming to edit the AST of a Julia program, like Lisp. See https://docs.julialang.org/en/v1/manual/metaprogramming/ https://docs.julialang.org/en/v1/manual/metaprogramming/
- jazzyjackson 5y agoIt’s fast as C and has a REPL.
- lolinder 5y ago> Julia has nothing to do with Lisp. From the article, quoting the makers of Julia: > We want a language that’s homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. In this case, the makers of the language clearly give a nod to Lisp as an inspiration, but even were that not the case, it's basically nonsense to say that any language "has nothing to do with lisp". Lisp has been a driving force in PL for a generation, and its influences are everywhere.
- zerr 5y agoOne would say the target audience of Julia - matlab converts, would barely use that feature (macros) directly.
- Recurecur 5y ago>One would say the target audience of Julia - matlab converts, would barely use that feature (macros) directly. The 'target audience of Julia' is everyone, not just 'Matlab converts'. It is most focused on high performance numerics, but is a true general purpose programming language. I expect its use to grow explosively as more and more people recognize its elegance and power. My perspective is that of a senior engineer with decades of experience with dozens of programming languages.
- rezq 5y agotry $ julia --lisp
- markkitti 5y ago$ julia --lisp ; _ ; |_ _ _ |_ _ | . _ _ ; | (-||||_(_)|__|_)|_) ;-------------------|------------------------------------ ---------------------- > (+ 1 2) 3 > (exit) https://github.com/JeffBezanson/femtolisp https://github.com/JeffBezanson/femtolisp
- clcaev 5y ago> Julia has nothing to do with Lisp Julia's surface syntax, among other parts of the core, are implemented in their own lisp dialect. https://github.com/JuliaLang/julia/blob/master/src/julia-parser.scm https://github.com/JuliaLang/julia/blob/master/src/julia-par...
- leoc 5y agoI know hardly anything about either language, but 'Julia' does sound suspiciously like 'Dylan', and Dylan https://en.wikipedia.org/wiki/Dylan_(programming_language) https://en.wikipedia.org/wiki/Dylan_(programming_language) is usually described as a successor to Common Lisp in heavy disguise.
- kumarvvr 5y agoOffTopic One look at that parser code makes me, a seasoned web and desktop app developer with cocky high minded "architectural" thinking, shrivel with insignificance and embarrassment. Mad respect to the process and people that makes this possible.
- gizmo385 5y agoAs someone who focuses almost exclusively on backend development, I look at complex ui code similarly. Mad respect to the people who have the vision and skill to design and write well incredible UIs.
- 5y ago
- hpcjoe 5y agoTry building from the source sometime, and reflect upon your statement.
- pfdietz 5y agoSBCL builds from source on my laptop in just over a minute.
- jhgb 5y ago> Julia has nothing to do with Lisp. Riiight... https://github.com/JuliaLang/julia/blob/master/src/ast.scm https://github.com/JuliaLang/julia/blob/master/src/ast.scm
- linguae 5y agoFrom the article: “My heart was broken because Common Lisp is such a fine fine language and it is a joy to work in and hardly anyone uses it in industry. The industry has a lot of code in Java even when it takes much less time to write code in Lisp. What happened to the programmer’s time is more important than the machine’s?” I think one issue that Common Lisp and many other programming languages face is that while a programmer’s time is more valuable than a machine’s, there are dynamics at play when maintaining commercial software projects that favor coding in more popular languages, such as the ability to easily hire developers knowledgeable in the language and/or paradigm. For example, imagine being a manager of a project written in Haskell that liberally uses functional programming concepts such as monads. It’s easier to hire developers knowledgeable in standard procedural or object-oriented programming languages than it is to find developers knowledgeable in functional programming, and getting a non-FP programmer up to speed on functional programming requires training, which takes time and money. I love languages like Common Lisp, Scheme, and Smalltalk. However, if I’m working on a team project and my teammates don’t know these languages, then I choose a more common language like Python. Programming is more than just expressing computation; it’s also about communication, and one major purpose of language is to communicate with others.
- didibus 5y agoIsn't that a chicken and egg problem though? The question is how do you bootstrap?
- chongli 5y agoThe best way to bootstrap language adoption is to get a big tech company to push it. Java (Sun, Oracle, Google Android), C# (Microsoft), JavaScript (all browser vendors, Facebook React), Rust (Mozilla/Microsoft), Swift (Apple), Go (Google). Most of the popular languages are backed by one or more large tech companies. This gives managers the confidence to adopt them without reservation. It's the old "nobody ever got fired for choosing IBM" line, broadened.
- vindarel 5y ago
- reikonomusha 5y agoSpeaking impersonally, and not directly to OP, you can program in Common Lisp in industry, you just don’t want to that badly, and then you justify why you can’t by making up reasons about not being able to hire, not being mainstream, not finding jobs, etc. etc. Somehow, I’ve been able to keep stable employment as a programmer that writes Lisp for over a decade. I’ve written Lisp at startups. I’ve written Lisp at Facebook. No, I haven’t been a consultant on some weird legacy Lisp project either. The difference between me and someone who doesn’t have a career in Lisp is: - I choose Lisp for projects that benefit from Lisp; - I make the case to technical and non-technical people that I can solve their problem cheaply and efficiently, often with a concrete demo and without any of the vague promises of Lisp’s power; - I put in extra effort to make sure we can hire for Lisp, train for Lisp, and integrate with Lisp. If you want to write Lisp in industry, and if you’re a senior-or-greater engineer (whatever that means), then get some buy-in and write it. Learn the language backwards and forwards, and be responsible and accountable for your choice. Unless you’re writing the world’s most boring software that needs 5,000 Java programmers all working on it at the same time, I can assure you, there is no issue with writing and maintaining Lisp, unless everybody you work with, including yourself, likes to pass the buck.
- bitwize 5y agoHow about if your company decides the approved languages are X, Y, and Z, and Lisp is not among them? Such companies exist. I work for one. (They are currently discussing removing JavaScript from the approved languages list because its dynamic typing makes it unsafe at any speed. TypeScript is the approved substitute.) If you cannot get higher-up buy-in to support your chosen language and train new programmers in it, then it doesn't matter how much of a practical advantage your solution in that language provides -- continuing to code in that language is a fast track to getting PIP'd.
- reikonomusha 5y agoIf you can’t get buy-in, you can’t get buy-in. Some companies won’t allow you to write whatever you want, Lisp or otherwise. I don’t suggest writing Lisp is possible anywhere, just that it’s perfectly attainable and within one’s power to have a career of which Lisp is a significant part if you decide that should be a priority. If working at $COOL_COMPANY that only allows Python due to CTO-mandated policy is your priority, then there’s not much that can be done to accomplish that and writing Lisp. Sometimes, also, you have to be more persuasive than “let’s use lisp it’s cool”. Implement a piece of code as a side project that solves a real problem that people care about at your company. Don’t shove it in people’s faces or rogue commit it to production. Ask people about it and have a plan to integrate it and support it. Sometimes it works. Sometimes it doesn’t. As professional software engineers, our job is to solve technical software problems in exchange for a wage. Some of these technical problems come in the form of giant pieces of software that you’re asked to chip away at. Others come in the form of greenfield implementation work. Some are somewhere in between. Some of these projects have 2 programmers, and others 2,000. Where on these spectra you’re being paid to contribute makes a lot of difference in how much sway you have for foundational technological choices on specific projects.
- Mustangdudu69 5y agohttps://coincircle.com/l/I3VxB2MqAi https://coincircle.com/l/I3VxB2MqAi
- dukeofdoom 5y agoHas there been a reincarnation of Prolog?
- User23 5y agoSQL
- parafactual 5y agoWhat?
- blihp 5y agoSQL and Prolog have a large area of functional overlap as they are both based on predicate logic. However, SQL more naturally aligned with the database-centric worldview of many business systems and offered a more natural way (for business users) to ask business questions. So when SQL took off, it was adopted for many solutions where Prolog might have been used previously.
- YeGoblynQueenne 5y agoUgh, no. SQL is a special-purpose database language. I've tried to look at Prolog from a databases point of view and it makes no sense that way. Even datalog (a decidable subset of Prolog without functions and negation) doesn't make that much sense from a databases point of view and it was specifically designed as a database language from the start, far as I can tell. In practical terms, SQL is like one third of Prolog. Prolog programs are stored in a database as sets of Horn clauses that can be conditionally true (definite clauses or "rules"), unconditionally true (unit clauses or "facts") or unconditionally false (Horn goals, or "queries"). A Prolog program is executed by trying to refute a Horn goal by proving it false in the context of the program with an automated theorem prover and binding the variables in the goal in the process. Unit clauses correspond to database rows in SQL, so a SQL database is basically a set of "facts", seen from the Prolog point of view. But there are no "rules" and "queries" in the database - instead the program is written in an altogether different language that sits on top of the "facts" in the database. So from the point of view of Prolog, SQL is two languages only one of which bears some resemblance with Prolog. From the point of view of SQL also, Prolog is proabably quite alien - you can write recursive loops with your database rows O.o They're just two very different languages anyway you look at them.
- AzzieElbab 5y agoEarlier JavaScript was basically bad Lisp. Still like it better than Java and c++
- andai 5y agoI've heard it described as "Scheme in C's clothing." I remember reading something about how that's a misconception, but I can't recall where. On that note, does anyone have any resources or stories about Self? [0] (The language from which JS inherited prototypal inheritance.) [0] https://youtube.com/watch?v=Ox5P7QyL774 https://youtube.com/watch?v=Ox5P7QyL774
- goatlover 5y agoIO was closer to Self as a language than JS, since JS combined the prototypal inheritance with Java-like syntax, making things confusing. But Self was an evolution of Smalltalk (replace classes with prototypes), so the live programming using a GUI running inside the Self VM was part of the deal, instead of writing to files in your editor of choice.
- Zababa 5y agoYou may be referring to "JavaScript isn't Scheme" http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt-scheme/ http://journal.stuffwithstuff.com/2013/07/18/javascript-isnt..., discussions on HN: https://hn.algolia.com/?query=JavaScript%20Isn%27t%20Scheme&type=story&dateRange=all&sort=byDate&storyText=false&prefix&page=0 https://hn.algolia.com/?query=JavaScript%20Isn%27t%20Scheme&...
- andai 5y agoI found Brendan Eich's article: > Ok, back to JavaScript popularity. We know certain Ajax libraries are popular. Is JavaScript popular? It’s hard to say. Some Ajax developers profess (and demonstrate) love for it. Yet many curse it, including me. I still think of it as a quickie love-child of C and Self. Dr. Johnson‘s words come to mind: “the part that is good is not original, and the part that is original is not good.” https://brendaneich.com/2008/04/popularity/ https://brendaneich.com/2008/04/popularity/
- deleted 5y ago
- courtf 5y ago> What happened to the programmer’s time is more important than the machine’s? I've never thought this way, primarily because I sympathize with and love computers, and don't like to watch them suffer. But there's more than that even, because there's more to software than just finding the most expressive language. Someone has to package, deploy, verify, monitor, scale, debug and optimize the software and do all of these things with as little money and as little CPU/RAM as possible. It's often a matter of worse being better when it comes to these types of concerns. Simplicity is exactly what is needed when performance starts to matter, and "clever" men often seem to be conspicuously absent when it comes time to take out the trash. Sure, it's fun to gather up your little clique of ivory tower CS nerds and get into a DSL measuring contest, but I've never seen the value in it myself, other than as defining one extreme end of the overton programming window.
- KingOfCoders 5y ago"The industry has a lot of code in Java even when it takes much less time to write code in Lisp." There are those in our industry to whom it is important to write code fast, and those who think focus should be on reading and understanding code.
- cestith 5y agoI won't pretend this is a universal truth, but often code that is quicker and easier to design is quicker and easier to read and understand. A language with less necessary boilerplate can take less reading to understand. Maybe you have a clever IDE that folds away boilerplate code for your chosen language, so that may not always apply. Lisp originated as an intermediate code. It's basically an s-expression encoding of an AST. There was at one time a frontend planned, but people started writing all sorts of code directly in Lisp. If your developers don't understand any layers of the stack below their own input, that's a bad thing. Lisp's interpretation or compilation is largely tied more or less directly to the input syntax. It's a language made powerful by the interactions of a handful of first-class concepts being allowed to interact with few artificial limits. Once your developers understand those concepts, it's pretty easily read except perhaps deeply nested constructs.