4 ms·
What I really want to see from a "*-programming-language" post on HN is _why_. Why Lily?
by oneseven 8mo ago
What I really want to see from a "*-programming-language" post on HN is _why_. Why Lily?
- EagnaIonat 8mo ago> why Building a program language is like poetry. Everyone does it at some point, just most of us know never to share it.
- saghm 8mo agoThat just moves the question to "why is this one being shared" then. I don't think "because the authors didn't know better than to avoid sharing it like 'most of us'" is a particularly good answer.
- andyferris 8mo agoThe README on gitlab at least has a sentence or two on that: https://gitlab.com/FascinatedBox/lily https://gitlab.com/FascinatedBox/lily > An interpreted language with a focus on expressiveness and type safety Personally I think typed scripting languages could be the future. They should support AOT compilation where necessary.
- keyle 8mo agoWhy do you think that's the future? Isn't a waste to essentially reinterpret an entire program that may be run 5000 times a day? AOT compilation, how is that different than make && run? At some point, you have a compiled language, if it's quick to compile, you're doing the AOT yourself, the scripting is an illusion. Pun intended.
- nine_k 8mo agoIsn't it a waste to run a test suite for a program that would run 1M times a day in production? The key adjective here is successfully run. You want to detect any errors as early as possible. Ideally even at the early stages of writing the script, when a typechecker is already able to point at certain errors, and thus help avoid missteps in further design.
- Syzygies 8mo ago> Isn't a waste to essentially reinterpret an entire program that may be run 5000 times a day? This is a dated prejudice that I shared. To get started coding with AI I made a dozen language comparison project for a toy math problem. F# floored me with how fast it was, nearly edging out C and Rust on my leaderboard, twice as fast as OCaml, and faster than various compiled languages. Compiling could in principle be fastest, if we had compilers that profiled hours of execution before optimizing code, and only then for "stable" problems. No one writes a compiler like this. In practice, Just In Time interpreters are getting all the love, and it shows. They adapt to the computation. My dated prejudice did not allow for this.
- nofriend 8mo agoa statically typed aot compiled scripting language is... not
- nine_k 8mo ago"Scripting" is a role: an embedded, human-friendly, compact language, also suitable for interactive work / REPL. (Laugh all you want, but Haskell has a rather nice REPL, and can work as a scripting language.)
- LoganDark 8mo agoLuau gets pretty close to statically typed and AOT compiled now. It's still a scripting language. Even C or Rust can be a scripting language. You just integrate the toolchain to your app, same as every other scripting language.
- mastermage 8mo ago+1 for Luau which is just realy good.
- satvikpendem 8mo agoI script with Rust via cargo-script, it works great. Scripting is a task for when you want to achieve something in one file instead of a full blown application. It is not about the language, you can script in C or assembly if you so chose.
- bonesss 8mo agoF# and C# are typed scripting languages. F# is quite similar to python in script form (.fsx), and has OCamls expressiveness, exhaustive pattern matching, and type inference. That results in highly expressive, terse, and ergonomic domain code. The .Net VM now supports AOT compilation. The future is now-ish :)
- paulddraper 8mo agoFrom the link: > Key features of Lily: > Built-in template mode > Embed/extend in C > Single-inheritance classes > Exceptions > Generics > Algebraic data types (with Option and Result predefined).
- andsoitis 8mo agoThat’s what. Not why.
- paulddraper 8mo agoThe reason it exists is to provide those features when programming computers.
- nine_k 8mo agoThe why: because Lua, Python, JavaScript, Janet, etc lack many or all these features. And each of these features is known to make life easier for a human programmer.
- dismalaf 8mo agoLooking through that list of features, Ruby (the dynamic language I know best) has all but 1 built-in (and the other can be added with Gems). I'm guessing Python probably has them all too (but I don't know Python that well). They're pretty common. So the why still isn't clear.
- keychera 8mo agoI am curious as well. some past readme has Why sections and I am not sure why they are removed/changed this have "Why" section https://gitlab.com/FascinatedBox/lily/-/blob/d3ace2907747106d9d75e22c4963aa09de14835a/README.md https://gitlab.com/FascinatedBox/lily/-/blob/d3ace2907747106... this have "How Lily stands out from other languages:" section https://gitlab.com/FascinatedBox/lily/-/blob/785a88534cced5331cd226460dc958a528ac3ccf/README.md https://gitlab.com/FascinatedBox/lily/-/blob/785a88534cced53...
- Nevermark 8mo ago> More importantly, this design makes it easy to compose whole programs that will never be paused by a garbage collection by avoiding cyclical structures. Or by "breaking" cycles, which will trigger the reference count deallocation.
- poulpy123 8mo ago99.9% of the time it will be "just because"