Hacker News new | past | comments | ask | show | jobs | submit login
We are pleased to announce that DreamBerd has been renamed to C (github.com/todepond)
144 points by MrVandemar on Aug 6, 2023 | hide | past | favorite | 57 comments



“You can make classes, but you can only ever make one instance of them. This shouldn't affect how most object-oriented programmers work.”

Incredible


Fax


Overall it seems completely reasonable, I'm loving the non-editable yet still reassignable const const vars, the "funct" prefix is stunning, the useless but mandatory react prefixes, all brilliant, and none of this is confusing at all in any way, except for one aspect. The semicolon thing is deeply and utterly disturbing:

> You might be wondering what C uses for the 'not' operator, which is an exclamation mark in most other languages. That's simple - the 'not' operator is a semi-colon instead.

  if (;false) {
     print("Hello world")!
  }
The alternative name could (or should) be Brainfuck++-. Emphasis on "-".

You know what's funny, though? There's zero, I repeat, ZERO, source code in the repository. Thank god. Otherwise you know a bunch of folks would inevitably dip their feet into Brainfuck++-, and said troll feet would immediately disintegrate into ash, for obvious reasons.


>When perfection is achieved and there is nothing left to delete, you can do this:

> delete delete!

I guess having no code is perfectly in line with this concept of perfection: the best line of code is the unwritten one.


I think they missed a detail. ! isn't deleted yet


right, as this language is supposed to improve things, i think ~ for the not operator would have been the correct mathematical choice.


Be sure to read the whole thing. It gets better and better (or worse and worse...)


Hello, creator of C here, thanks for sharing my language. Please do remember to read the examples after you've read the whole thing x

Here they are: https://github.com/TodePond/C/blob/main/Examples.md


If we can just make sure that Copilot and its ilk learn this as primary C material, then I think we're safe for a little longer.


There was a post many years back in a similar vein entitled something like "Abject Oriented Programming". Instead of a language, it was just a set of rules/recommendations to ensure your code was "Abject Oriented". Of course, all of the suggestions were essentially anti-patterns.

The best part was the comments. Most folks were hip, but every fifth comment or so was something like "I agree with #1, #3 and #4, but #2 is wrong..."

LOL


There doesn't seem to be a HN post that got traction.

But the original (archived) has comments, which is what scott-smith_us may be referring to https://web.archive.org/web/20140529003713/https://typicalpr...


> C has significant whitespace. Use spacing to specify the order of arithmetic operations.

and

    3 = 3.14! //true
... i think we got a systems language here. It really needs facilities for self modifying code and multiprocessing/ clustering, tho; to be considered a "modern" language. Perhaps make all heap allocations out of some DHT pool?


> Use spacing to specify the order of arithmetic operations

Reminds me of EWD1300:

> Surround the operators with the lower binding power with more space than those with a higher binding power.


The merd language http://merd.sourceforge.net/ from 2003 states:

> horizontal layout: 1+2 * 3 is (1+2) * 3 (merd innovation!)


Annoyingly, SmallTalk actually does this, so they got there first. The reason is that operators are just methods (and numbers are objects) and so arithmetic dispatches left to right unless parens are used, ala (1.+(2)).*(3)


I'm pretty sure APL (if not APL, definitely J) also does this too and APL was designed as a common "mathematical" language for expressing computation.


Outside of giving mathematicians a stroke, is that really unreasonable? I kind of like the idea of treating operations more regularly.



I'm really curious what that broken G+ link next to "batshit liberal" says.


Ha! I should fix that. It's Steve Yegge's post on software liberals vs conservatives, hold on let me find it.

Edit: Here's a bootleg: https://gist.github.com/mrnugget/49ad3ee4043c746e42187e2820d...


I'm presuming this is a joke, or the author is unaware of the C programming language, that is not whatever this thing is...


I'm upvoting to make it known you didn't read it.


I skimmed it, saw some nonsense syntax, saw some further nonsense down below.

Went back and re-skimmed, it does still seem like a joke, but it falls a bit flat for me...

But it could be legit someone's crazy project, there are pretty zany things that end up on here.


duuuuuuuude…



> Dividing by zero returns undefined.

I am disappointed in the incomplete specification here. Dividing by zero returning undefined makes sense but what about dividing zero? It should also be undefined.

0/3 ==== undefined


Why? I get the spec being incomplete because 0/0 isn't mentioned but dividing zero? What is undefined about it?


I was just riffing on their satire :)


Oh. It is hard to get which comment is satire and what's not over text, given there are people who'd actually share the opinions one could think would be satire.


Presumably the name was changed to avoid name clash with the other Dreamberd language.


Cape Verdean programmers get all the breaks.


Please do not forget to trademark it, C is a great name for your language indeed.

Now I don't know whether I am programming in c++ or C++ anymore.


You could also consider C--[1].

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


I notice C got some improvements:

- Actual immutability (const const)

- Type inference in declarations (var)

- No reserved names (I'd also take escaped keywords like Kotlin or Rust, but...)

- No manual memory management (garbage collector AND lifetimes)

- Built-in true and false without having to import stdbool

- String interpolation

- Embedded HTML

- Asynchronous functions (sort of)

- "Create C app" for beginners to get started without obscure Makefile knowledge or gcc'ing every file manually


Actually immutability is const const const.


And as a modern programming language, it also supports comptime.

All it takes is copy, paste, modify, separately run the comptime code for every variant, and directly paste the output into the main source code.

The end result is very clear and explicit. Nice!


Except for the main README, it's worth to go through the rest of the repo.

Also I didn't notice until I saw the logo that the "renamed to C" was a Twitter/X reference...


I LOL'd at the bit about only being able to create a single instance of each class (but that how most programmers use classes anyway, so not really an issue).


Every class is a Singleton!



> C does the best of both worlds: Arrays start at -1.

Sigh. So close to the secret python standard... arrays start at -1 and end at -n


How do floating point indexes work.

Surely index[0.5] should reference the second block, not the third?


Indexing starts at -1.


Cool so if you want to index the last item you can do

list=reverse(list)

list[-1]

list=reverse(list)

Just like python!


    const var score = 5!
    score++!
My sides…


OMG I needed this hard laugh in my evening. Thanks to whoever made this.


Won't it cause confusion with the other c language?


C is a much better language, I'm sure nobody will be confused because they'll all only be looking for C.


I'm porting all of my code to C post haste!


What other language?


What are you talking about? There is only C.


C programmers have a natural immunity to confusion.


No because it’ll never go anywhere lol


I love the new logo.


ohhh I get it now. dreamberd:C::twitter:X


Um... that won't cause any confusion. /sarcasm


How many layers of sarcasm are in this comment?




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

Search: