Live data from Hacker News

The Rune Programming Language

github.com

111–120 of 203 posts

Re: The Rune Programming Language

#111
post #101

x^2 means x squared, orphaning the XOR operator. Rune is for crypto, so math comes first. Isn't XOR used very heavily in crypto? (As is exponentiation of course)

It looks like Rune still has a bitwise XOR operator: @ https://github.com/google/rune/blob/main/bootstrap/database/... That innovation does seem like a potential footgun.

Here's my hot take: if you're designing a new programming language in the modern era, even a systems language, ignore the precedent of C and don't use &|^~ as bitwise operators. You can still have infix bitwise operators, but spell them out as bitand/bitor/bitxor/bitnot. Then you can just use &| for logical and/or, which are 1000x more common than bitwise and/or, and you can reclaim ^ for exponentiation as well. And don't forget to fix C's broken bitwise operator precedence while you're at it.

Re: The Rune Programming Language

#112

Implicit nullability of all values, a very dubious design decision in a new language.

Given that they mention SQL more than other things, and stress SoA and memory intensive applications, I think this makes more sense than it would otherwise

Even if you want to allow nullability, you can make it both explicit and opt-in rather than implicit and opt-out.

Re: The Rune Programming Language

#113
post #78

Is there any reason the `secret` type can't be implemented in, say, Rust, or is it just Google getting really excited to reinvent the wheel again?

You can have a Secret type in Rust where the Eq, Add, etc. traits are overloaded with constant-time versions. I'm unclear if there are any semantics that operator overloading doesn't address.

Re: The Rune Programming Language

#114
post #9

There already exists Rune programming language and that one was earlier: https://rune-rs.github.io/ They should be more careful picking the name.

Who is the rightful owner of a name or similarly, a piece of land, or an idea, patent?

The first settler? The first settler that held it for at least a year, 10 or 100? The most powerful entity claiming it?

In the modern western mind there is the notion that whoever grabs it first rightfully owns it. Which is a simple rule, but encourages squatting and holding but not using. The squatter can then hold ransom against somebody who would be the rightful owner.

At least with patents or electromagnetic spectrum there is a time of expiration. You come first and claim it for a few years after which it becomes public domain. Or we hold an auction each 5 years to maintain stable and efficient allocation of a finite and scarce resource.

With concepts like programming languages, the case with stronger base wins, like in the example of Go. People associate the Go label with Pike's Golang, not with the previous Go!.

Re: The Rune Programming Language

#115
post #90
post #9

There already exists Rune programming language and that one was earlier: https://rune-rs.github.io/ They should be more careful picking the name.

Let's be real for a minute. A couple of hobbyists have named their pet project "rune". Should the name be then forsaken for all eternity?

Let's be real for a minute. What you're actually saying is these hobbyists don't really matter and they don't even deserve to name their projects. Only Real Projects created by Real Programmers at Real Big Tech corporations get the cool names.

This is the kind of disrespect that pushed people to create trademark laws.

Re: The Rune Programming Language

#116
post #111
post #101

Earlier quoted context omitted.

It looks like Rune still has a bitwise XOR operator: @ https://github.com/google/rune/blob/main/bootstrap/database/... That innovation does seem like a potential footgun.

Here's my hot take: if you're designing a new programming language in the modern era, even a systems language, ignore the precedent of C and don't use &|^~ as bitwise operators. You can still have infix bitwise operators, but spell them out as bitand/bitor/bitxor/bitnot. Then you can just use &| for logical and/or, which are 1000x more common than bitwise and/or, and you can reclaim ^ for exponentiation as well. And…

Hard disagree on single characters for logic and exponentiation. ASCII has too few special characters and you'd want to use those elsewhere, without creating ambiguity. Elixir got it right.

Re: The Rune Programming Language

#117

First example seems weak. Any language can use separate data type for secrets and corresponding operator for constant-time comparison. Second example is very neat. Actually I thought about using sqlite with tmpfs database for application state. That could be useful for some kinds of applications. That said, using functional API over traditional data structures seems like a traditional and widely accepted approach. In…

But it's not just operator overloading, there seems to be a monad-like "secret" that makes calls to func(a, ...) -> b with secret(a) return secret(b). The example doesn't spell this out explicitly, but I think those are the semantics of secret.

What makes that different from creating a Secret class that's just a container class and defines its own methods? I just don't see what it is that requires a new language to accomplish and couldn't just be implemented as a library in many of the pre-existing languages (including popular ones like C++).

Re: The Rune Programming Language

#118
post #110
post #76

Earlier quoted context omitted.

As some other comments have pointed out, this seems to be a one-person project. FWIW, Go also started as a project by 3 people who happened to be working for Google (Robert Griesemer, Rob Pike and Ken Thompson), so it wasn't Google consciously choosing the name. Perhaps Google as an employer shouldn't allow employees to choose any name they like, and do some diligence to avoid name clashes. This may sound quite reaso…

It shouldn’t need to be a company policy, you’d think a competent engineer would simply do due diligence in naming their project. I remember searching for name clashes for a project I wrote solo when I was ~13 years old in the early 2000s.

Unfortunately Rob Pike, Ken Thompson, and Robert Griesemer are not competent engineers by this standard. I’m sure they’ll be sad to hear it.

Re: The Rune Programming Language

#119
post #54

It's got some novel ideas: better than many new languages! Don't quite grok why it eliminates the need for ref counting though. Tree structures are fine when you have them, but frequently you don't. The docs claim Rune programmers never write destructors even though there's no GC, so is there no equivalent of RAII? How do you model graphs? The constant time stuff doesn't matter. Virtually nothing needs to be constant…

I think the point behind "constant time" here is that the comparison always takes the same amount of time, and not based on how many characters in the two strings are equal, to prevent a timing attack. "Constant time" isn't very accurate here because given a choice of hashing algorithm, the hash is a fixed-length string and therefore even a trivial string comparison technically "runs in constant time", at least if we…

Yes, but my point is that there are only a few use cases for this, mostly in cryptography, and to ensure something is genuinely constant time you have to write in assembly. The routines needed are small enough and compilers hard enough to trust that you just bypass them in practice, so it's an odd choice for something to build into a language syntax.

Re: The Rune Programming Language

#120
post #90

Earlier quoted context omitted.

Let's be real for a minute. A couple of hobbyists have named their pet project "rune". Should the name be then forsaken for all eternity?

Let's be real for a minute. What you're actually saying is these hobbyists don't really matter and they don't even deserve to name their projects. Only Real Projects created by Real Programmers at Real Big Tech corporations get the cool names. This is the kind of disrespect that pushed people to create trademark laws.

Hobbyists do deserve to name their projects. And other people can name their projects the same thing. Not a big deal.

(By the way, the reverse scenario here should be okay, too. If Google makes a project with with a common noun name, then others should be able to use that noun to name their projects.)

Post reply on HN