Live data from Hacker News

The Chaos Programming Language

chaos-lang.org

61–70 of 87 posts

Re: The Chaos Programming Language

#61

Earlier quoted context omitted.

No, it only means that you can reassign the name `a` to a different value (i.e. it is a variable, not a constant). It would be mutable if it allowed something like this: > a = 5 > a.add(1) > print a 6 Note that numbers are immutable in most languages anyway. Arrays, hashmaps, and sometimes strings are the data types that are frequently mutable.

Numbers are literally never immutable in any language that isn't designed intentionally for comedy. Variables of a number type may be mutable, but the numbers themselves never mutate. Strings are typically immutable in most languages, but that does vary some (generally surprising people who expect primitives to be immutable).

For a moment I started imagining what a mutable number would be like:

> 3 = 5

> print 3

5

The end

Re: The Chaos Programming Language

#62

I started going through the docs. This language starts off with some heft sells - prevent errors, increase test coverage, etc. Then the docs mostly cover things like "you can call an array an array or a list" and stuff that isn't very interesting to me. It doesn't even show methods or things like that. I think 90% of the docs I've read so far should have just been a single page with one liners one after the other, an…

Since there are no if's (except at the end), every line is executed. Since all if's at the end can be placed on a single line, you have 100% line coverage. I don't think this language is very serious.

Re: The Chaos Programming Language

#63

Earlier quoted context omitted.

I agree with the other commenter about the comma in this sentence. But I'd also like to point out that 100% error-free code is possible. There's a whole branch of computer science dedicated to it: formal verification. I personally have used Coq to write certified code in the past, and I'm quite confident that my code was 100% error-free. Of course, there are some qualifications one should make regarding such a claim:…

I really can't trust myself to write a specification. I know this because I have written errors in tests before - even when all I'm doing is trying to work out some properties that the answer ought to have, I can still make a mistake. It's just usually less likely that I would make a mistake, because the specification is simpler than the algorithm. So, it is not really fair to downplay the chance that you could have…

WPA2 is a formally verified protocol. It lasted 14 years: https://www.krackattacks.com/. Now it's partially formally verified.

Re: The Chaos Programming Language

#64

Did anyone else think this was a joke language at first? My initial impression was that it was an esoteric language which was tongue-in-cheek passing of its oddities as language features. Firstly, there's the name: chaos, which evokes the opposite of what my code to look like. Secondly, the first three "features" all come across as deliberately goofy to me. The first two promise seeming implausible things: zero cyclo…

Dude you got it wrong, this is actually a joke language.

Re: The Chaos Programming Language

#66

Earlier quoted context omitted.

I really can't trust myself to write a specification. I know this because I have written errors in tests before - even when all I'm doing is trying to work out some properties that the answer ought to have, I can still make a mistake. It's just usually less likely that I would make a mistake, because the specification is simpler than the algorithm. So, it is not really fair to downplay the chance that you could have…

WPA2 is a formally verified protocol. It lasted 14 years: https://www.krackattacks.com/ . Now it's partially formally verified.

You can't prove that something is secure, because to be applicable in mathematics/computer science there has to exist a precise definition.

If someone is just saying "This is a formally verified protocol" without what they actually checked for, they are salespeople not mathematicians.

"The authors of the KRA paper were able to understand what the proofs were about, and why they don’t cover the KRACK vulnerability. Even though the original proofs didn’t reveal security flaws, a principled approach would use these proofs in order to discover where to look."

https://galois.com/blog/2017/10/formal-methods-krack-vulnera...

Re: The Chaos Programming Language

#68
Extremely simple and powerful. Functional languages are really superior.

The only thing I dislike are the blinking colored messages.

And maybe the list alias for array is extremely confusing, esp. when he wants to add real lists later. Or lazy lists. json for dict maybe, why not.

Re: The Chaos Programming Language

#69

Did anyone else think this was a joke language at first? My initial impression was that it was an esoteric language which was tongue-in-cheek passing of its oddities as language features. Firstly, there's the name: chaos, which evokes the opposite of what my code to look like. Secondly, the first three "features" all come across as deliberately goofy to me. The first two promise seeming implausible things: zero cyclo…

> Firstly, there's the name: chaos, which evokes the opposite of what my code to look like.

The full name is "The Chaos Programming Language", which I understand as "the language to program chaos". It's in line with the motto "Turn chaos into magic!", as you program to turn an arbitrary state (chaos) into what you want (order / magic).

I still think it's a joke language, but this part is well-thought.

Re: The Chaos Programming Language

#70

I started going through the docs. This language starts off with some heft sells - prevent errors, increase test coverage, etc. Then the docs mostly cover things like "you can call an array an array or a list" and stuff that isn't very interesting to me. It doesn't even show methods or things like that. I think 90% of the docs I've read so far should have just been a single page with one liners one after the other, an…

Since there are no if's (except at the end), every line is executed. Since all if's at the end can be placed on a single line, you have 100% line coverage. I don't think this language is very serious.

As you say, this doesn't sound right. If you force the programmer to write branch-free code (this appears to be the founding principle of the language [0]), that doesn't mean your boundary-value analysis [1] problems go away, it means you've made them less explicit.

As you say, there's full line coverage for tests, but no guarantee of full equivalence-partition coverage. It's quite possible for branch-free code to fail on certain values. ctrl-f for overflow in [2]

The 'Showcase' link is broken, the GitHub repo seems to show no examples, and the linked StackOverflow chaos tag is never used in relation to this language, so as you say, I'm not sure how serious this language really is. Fun idea though.

(It's entirely possible I'm misusing the term boundary-value analysis. Corrections welcome.)

[0] https://chaos-lang.org/docs/11_decision_making

[1] https://en.wikipedia.org/wiki/Boundary-value_analysis

[2] https://graphics.stanford.edu/~seander/bithacks.html

Post reply on HN