10 ms·
Dale – A Lisp-flavoured C
- pcwalton 10y agoAt a glance, the compiler looks solid, with full LLVM integration instead of compiling to C. That'll pay dividends down the road. Really great job :)
- tromp 10y agoWonder how hard it is to write a quine in Dale...
- jaccarmac 10y agoPrevious discussion: https://news.ycombinator.com/item?id=9226260 https://news.ycombinator.com/item?id=9226260
- taeric 10y agoIt saddens me that one of the main comment threads there is complaining about parentheses. :( Some of the shouts out to thinlisp and other systems that did similar to this before are interesting. Very interesting.
- lispm 10y agoWhy isn't it written in Lisp? It would be so much easier... See for example C-MERA: https://github.com/kiselgra/c-mera https://github.com/kiselgra/c-mera
- brandonbloom 10y agoC-MERA's default code generator is textual C. This project uses LLVM's API, which is sadly difficult to utilize outside of C++.
- lispm 10y agohttps://github.com/drmeister/clasp https://github.com/drmeister/clasp From the CLASP page: > Clasp is a new Common Lisp implementation that seamlessly interoperates with C++ libraries and programs using LLVM for compilation to native code. This allows Clasp to take advantage of a vast array of preexisting libraries and programs, such as out of the scientific computing ecosystem. Embedding them in a Common Lisp environment allows you to make use of rapid prototyping, incremental development, and other capabilities that make it a powerful language. you wrote: > This project uses LLVM's API, which is sadly difficult to utilize outside of C++. I would guess that you could use LLVM's API via CLASP. The author initially wrote ( https://drmeister.wordpress.com/2014/09/18/announcing-clasp/ https://drmeister.wordpress.com/2014/09/18/announcing-clasp/) : > Clasp exposes the LLVM C++ library within Common Lisp providing a rich, dynamic, programming environment for exploring the LLVM library and for writing new compilers that generate LLVM-IR. Then you could write the parser/compiler in Lisp, which supports manipulating s-expressions on a simpler level than C++ does.
- brandonbloom 10y ago1) That's an interesting project. Worthy of discussion on its own. 2) "Why isn't it written in Lisp?" It's 42% C++ according to GitHub. 3) Based on a hunch and past experiences, I'm going to ignore any follow ups on this thread. EDIT: And now I look like a jerk because lispm replaced his terse comment with a fuller comment. My apologies for even engaging in the first place. Should have known better.
- lispm 10y agoI'm just wondering if there isn't already some large infrastructure in the Lisp world, which could have been reused. Something like CLASP was especially written to seamlessly interoperate with LLVM. Sometimes working with an existing system is difficult, but sometimes it can help both projects. Anyway, Dale looks like a cool project.
- monkpit 10y agoProgrammed by Mr Worldwide himself?!
- nonsince 10y agoOh hey, I posted this on /r/lisp just earlier today. I discovered it because of a Google rabbit hole triggered by a rediscovery of this article[0] on Naughty Dog's GOAL (Game-Oriented Assembly Lisp). It looks really interesting, although I can't imagine doing serious programming in it (as much as I'd love to). [0]: http://www.codersnotes.com/notes/disassembling-jak/ http://www.codersnotes.com/notes/disassembling-jak/
- hermitdev 10y agoI would love to see announcements of new languages include a rationale. Why was this created? What problem was the author trying to solve that they thought the solution was a new language? What short comings did existing languages have that this new language overcomes? This is not a critique; I'm just curious.
- ppereira 10y agoWhy don't you just read the readme? The additional features are at the top, and examples in the body.
- hermitdev 10y agoI did. I saw lots of examples, but no answers to the questions I posed. The one source of rationale I saw was Lisp-like with no GC. Additionally, my comment was not directed solely at Dale, but new language announcements in general.
- deleted 10y ago[deleted]
- nickpsecurity 10y agoI created one a long time ago for reasons that seem to show up in others. Those included: Lisp-style macros are raw productivity/power; incremental, per-function compilation plus REPL = blazing, iteration speed; if using LCD of features, I can synthesize to more than one language/VM target; I can automate safety checks for C pitfalls without looking at cluttered code; way cleaner way to handle errors with similar benefit. Sadly, I lost that tool in a triple, HD crash along with most work. Loved it, though. I never even fully learned LISP or C but the subsets let me crank out tons functionality really fast then run it through optimizing C compilers.
- andrewshadura 10y agoYou should have put it up on GitHub.
- coldtea 10y agoCan we have a C-flavored C with the extra features of Dale?
- nickpsecurity 10y agoI used one that almost did what you ask. I refused to work with C++ codebases. Better to start with a language actually designed for metaprogramming, etc that thrn synthesizes C. If it has IDE & ecosystem, you get its language-level benefits then C's on tooling side. Win, win.
- piokuc 10y agoThis looks really nice. A low level Lisp as a system programming language - a C replacement - is an interesting idea. First thought after going through the readme: does it try to provide stable ABI? This is an important feature for a C replacement; for example, C++ has not managed to get it right, although the idea was to provide a better, object oriented C... What worries me in particular is that Dale has overloaded functions, that makes things harder as far as stable API is concerned, but maybe I'm wrong. Nice stuff, anyway. I can see a little PLT trend of new high level languages that want to be good in doing low level stuff and don't use GC. I like that!
- appleflaxen 10y agoisn't this a C-flavored lisp? I mean, it's not C. And it is a lisp. So doesn't it make sense to call it "lisp with a flavor of C" rather than the other way around? Cool project!
- yellowapple 10y agoIt might've been named in the same vein as Lisp-Flavoured Erlang, which is indeed (last I checked) a Lisp and very much not Erlang (at least language-wise; it still uses the Erlang VM and OTP). On another note, the lack of garbage collection at the very least would make Dale very abnormal in terms of being a Lisp v. some other language that happens to embrace s-expressions for its syntax.
- muyuu 10y agoHow do you pronounce it? Like Pitbull in "dale!"?
- jbeja 10y agoLooks amazing! Very clean, I love the arguments notation.
- iLemming 10y agoHow does this compare with Chicken Scheme?
- spraak 10y agoI want this for Go!
- eatonphil 10y agoVery neat! Looks like this is an even older language than the one I'm familiar with: bone-lisp. Bone-lisp is interpreted but ops for "explicit regions instead of garbage collection". There is also an awesome list of similar projects on the bone-lisp README (on which I now see Dale included) which I'll quote from: > Somewhat related Free Software projects: > * Pre-Scheme is a GC-free (LIFO) subset of Scheme > * Carp is "a statically typed lisp, without a GC" > * newLISP uses "One Reference Only" memory management > * MLKit uses region inference (and a GC) > * Linear Lisp produces no garbage > * Dale is basically C in S-Exprs (but with macros) > * ThinLisp is a subset of Common Lisp that can be used without GC [1] https://github.com/wolfgangj/bone-lisp https://github.com/wolfgangj/bone-lisp
- lngnmn 10y agoAny high-order functions, TCO? Is there an implementation of Everything Is An Expression and Everything Is A First-class Value principles? Type-tagging, which implements Values Has A Type, Not Variables principle, which gives The Numerical Tower and other nice things for free? Proper lexical scoping based on Environments which makes every lambda a closure? I am not asking about homogeneity and the possibility of the First-class Macros it provides. No? So what then makes it Lisp-flavored? CONS CAR CDR and parentheses?
- eschaton 10y agoA systems programming language need not eschew GC. Zetalisp and Common Lisp are perfectly fine for Lisp Machine operating system implementation, without falling back to a language other than assembly for isolated bits of the very lowest-level code. Mezzano reaffirms this on x86-64 too.
- lisper 10y agoAnother Lisp implemented in C++, but with a GC: https://github.com/rongarret/Ciel/ https://github.com/rongarret/Ciel/
- catnaroek 10y agoC's syntax is horrible, but we can live with it. Where are the attempts to fix C's semantics, dammit? This project is as if a mechanic were given a broken car, and the first thing he did were repainting it.