Lily Programming Language
25 points
3 days ago
| 4 comments
| lily-lang.org
| HN
roxolotl
20 minutes ago
[-]
I’m a sucker for little embeddable languages but I’m even more of a sucker for rpn. Wonderful little example shows how simple of a math scheme it is.
reply
pansa2
46 minutes ago
[-]
> statically-typed

> Embed/extend in C

Is Lily intended to be (or could it be used as) a statically-typed alternative to Lua?

Personally I'm happy with dynamic typing for scripting - but I suspect many people would welcome a statically-typed option, and there don't seem to be many available.

reply
oneseven
2 hours ago
[-]
What I really want to see from a "*-programming-language" post on HN is _why_. Why Lily?
reply
keychera
51 minutes ago
[-]
I 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/d3ace2907747106...

this have "How Lily stands out from other languages:" section https://gitlab.com/FascinatedBox/lily/-/blob/785a88534cced53...

reply
andyferris
2 hours ago
[-]
The README on gitlab at least has a sentence or two on that: 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.

reply
keyle
1 hour ago
[-]
Why 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.

reply
nine_k
57 minutes ago
[-]
Isn'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.

reply
nofriend
1 hour ago
[-]
a statically typed aot compiled scripting language is... not
reply
nine_k
51 minutes 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.)

reply
LoganDark
30 minutes ago
[-]
Luau 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.

reply
paulddraper
1 hour ago
[-]
From 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).

reply
andsoitis
1 hour ago
[-]
That’s what. Not why.
reply
nine_k
49 minutes ago
[-]
The 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.
reply
paulddraper
1 hour ago
[-]
The reason it exists is to provide those features when programming computers.
reply
7e
9 minutes ago
[-]
Has anyone yet designed a language with the explicit goal of being cheapest/easiest to use by an AI coding agent?
reply