Hacker Newsnew | past | comments | ask | show | jobs | submit | hgs3's commentslogin

It supports C99 minus VLAs. Worth noting that only C99 mandates VLAs. They are optional in C11, C17, and C23.

> The ability to edit it using the CLI

This perplexes me. Lua was conceived as a configuration language and the whole point of a configuration language is you edit a config file. Trying to abstract this away behind a CLI seems like it misses the ethos of Lua.

It’s also a tad strange that a package manager designed for Lua isn’t written in Lua. Presumably Lua developers already have Lua installed, know Lua, and would more likely contribute to a project written in Lua.


> Lua was conceived as a configuration language

That alone is a pretty weak argument.

> Trying to abstract this away behind a CLI seems like it misses the ethos of Lua.

With `lx add <package>`, you can install the package and add it to und config file in one step. And do things like fail if the package or version doesn't exist or isn't compatible with your system.

You can provide editor plugins or use LSP to give users hints if there's an update available, and use code actions to update them, etc.

> It’s also a tad strange that a package manager designed for Lua isn’t written in Lua.

Again, the fact that Lux relates to Lua is a pretty weak argument for choosing Lua as a language to write or configure it in.

Lots of Lua libraries and packages aren't written in Lua, but are built with Lua bindings. Lua (which as you yourself just mentioned was conceived as a configuration language) is a pretty poor choice for something with the scope of Lux. In fact, luarocks was recently rewritten in Teal. Lux has a Lua API (lux-lua) which means it can be embedded or used as a Lua library.

> Presumably Lua developers already have Lua installed, know Lua, and would more likely contribute to a project written in Lua.

We're not worried about finding contributors. If anything, what we need are high quality contributions. Lua developers who only know Lua are not what we're looking for.


> It would be much more interesting to see a language which experiments with what is fundamentally representable

You might checkout my project, Confetti [1]. I conceived of it as Unix configuration files with the flexibility of S-expressions. I think the examples page on the website shows interesting use cases. It doesn't have a formal execution model, however, for that you might checkout Tcl or Lua.

[1] https://confetti.hgs3.me/


Why is typeless a positive trait? Just due to the simplicity of the matter? What are the sharp edges?


In practice, there are still types, they are just validated by your application. I didn’t want Confetti itself to make assumptions. I wanted to give you the freedom to define your own custom types and keywords, like “on” and “off”, or even tri-states like “yes”, “no”, “maybe”.

The problem with mandatory keywords, like “true” and “false”, is they box you into the English language. And which data types should be intrinsic is arbitrary, for example, TOML has data types for date and time, but JSON does not [1]. Where do you draw the line? Confetti let’s you decide.

You might enjoy reading this take on the subject [2].

[1] https://toml.io/en/v1.0.0#offset-date-time

[2] https://github.com/madmurphy/libconfini/wiki/An-INI-critique...


I don't see how predefined keywords are a bad thing. True/false is near universal


That makes a lot of sense to me. These files aren't just read by programmers either.


The code is very readable and well organized. My only major critique is that there's very little error checking, e.g. there are many calls to snprintf and malloc without checking the result. There is also an unused loop here [1].

As an aside, I don't see any support for parallelization. That's fine for an initial implementation, but web servers do benefit from threading off requests. If you go that route (pun intended) you might consider using something like libuv [2].

[1] https://github.com/ashtonjamesd/lavandula/blob/51d86a284dc7d...

[2] https://github.com/libuv/libuv


Thank you for the feedback, it is appreciated!

I did intend to implement parallelization as a later feature so it's good to bring it up.


> It goes through the history of OOP

Unfortunately, the "history" omits prototype-based OO (Self, Io, Lua, etc.) which doesn't suffer from many of the "issues" cited by the speaker.


So to be clear, I love all of those languages and wish the design space of prototype-based inheritance was explored more.

Having said that: why would he though? In this particular talk he's trying to argue to people who program in C++ why the historical C++ architectures are limiting it, he's not trying to convince anyone to switch languages. So those languages aren't his audience.


This is interesting, but aren't "coding competitions" about writing small leetcode programs from a prompt? I would expect the AI to excel at that.


I'm curious what a hashmap looks like with this approach. It's one thing to pass through or hold onto a generic value, but another to perform operations on it. Think computing the hash value or comparing equality of generic keys in a generic hashmap.


I first would question what a user wants to do with a hashmap that uses polymorphic key-values of unknowable type at compile-time.

As a thought experiment, you could certainly have users define their own hash and equality functions and attach them to the table-entries themselves. On first thought, that sounds like it would be rife with memory safety issues.

At the end of the day, it is all just bytes. You could simply say that you will only key based on raw memory sequences.


> I first would question what a user wants to do with a hashmap that uses polymorphic key-values of unknowable type at compile-time.

All of Apple's modern platforms use this concept pervasively, because the Objective-C Foundation framework has a common primitive data structure for it (NSDictionary).


Just be respectful and not snarky. And be clear about your boundaries.

What I do is I add the following notice to my GitHub issue template: "X is a passion project and issues are triaged based on my personal availability. If you need immediate or ongoing support, then please purchase a support contract through my software company: [link to company webpage]".


I would expect a shading language to provide specialized features for working with GPU resources and intrinsic operations.


> Since then Microsoft has had no real answer for "how do I write desktop applications for Windows?" other than "use Electron".

Microsoft has been pushing WinUI the past few years, with WinUI 3 being the latest recommended UI toolkit [1]. I think what's interesting about WinUI 3 is it's not built into Windows - you have to ship the whole toolkit with your app, just as you would GTK or Qt on Windows. I find that a perplexing direction for a "native" toolkit.

[1] https://learn.microsoft.com/en-us/windows/apps/winui/winui3/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: