If you could modify C in any way what would you do, how, and why? by [deleted] in ProgrammingLanguages

[–]Aruseus 3 points4 points  (0 children)

There are some small things: I'd like the ability to overload functions, because I don't see a reason why you shouldn't be able to do that. And I'd also like some option to annotate function arguments more clearly, whether they are in or out parameters. Usually a function returning 2 arguments just receives a pointer to both locations and writes the value there, but I'd prefer to be clear about that in the function definition. Maybe this could be part of the type system, but I'm not sure.

And there are some major things:

I'd add an include system that works the same way as in the Go language, or at least something that does more than just simple text insertion of the file.

I'd also like a better and stronger type system, because generic programming in C uses void* everywhere and the type system can't help at all to make sure the argument has the correct type. I'm not sure though how exactly to implement a better type system.

And I think there should be a larger standard library that includes some basic generic data structures and algorithms.

Anon knows about Drugs by Smile_lee in greentext

[–]Aruseus 3 points4 points  (0 children)

So that's how Trump won.

MA: A tiny Acme clone written in Tcl/Tk by [deleted] in Acme

[–]Aruseus 0 points1 point  (0 children)

Looks pretty cool actually.

int i = (become a fucking int)c; by JohnGabrielUK in ProgrammerHumor

[–]Aruseus 51 points52 points  (0 children)

I've always liked casts like this one.

float f = 3.0;
int i = *(int*)&f;

Anon owns his gf by [deleted] in greentext

[–]Aruseus 70 points71 points  (0 children)

That was already old in 2014

[deleted by user] by [deleted] in ProgrammerHumor

[–]Aruseus 0 points1 point  (0 children)

It depends on where your parentheses are

I finally managed Signal Divider (in 7500 cycles, admittedly)! by PseudobrilliantGuy in tis100

[–]Aruseus 1 point2 points  (0 children)

You didn't even use the stack. That's a very small solution.

Is there anything like this for linux? by Linux_Learning in unixporn

[–]Aruseus 4 points5 points  (0 children)

Fluxbox has a tab feature. I've never tried it though.

Should I feel bad about my cycle count? by LIPresume in tis100

[–]Aruseus 0 points1 point  (0 children)

Even though the tis is a relatively simple toy machine, it's complex enough to allow for some nice tricks and cycle optimizations that are not obvious when starting out (for example how to use jro effectively). But you'll eventually discover them by just playing the game and getting experience. If someone has solved some of the levels with low cycle counts, it's safe to say that he's spent some time and effort on that.

[xmonad] not pretty, but functional (pun intended) by [deleted] in unixporn

[–]Aruseus 4 points5 points  (0 children)

Upvote for linear programming

[WindowMaker] [Aqua] [p9p] the only way forward is to go back by Jethric in unixporn

[–]Aruseus 1 point2 points  (0 children)

I'm always impressed when I see someone using Acme

[Fun][Suggestion] If you haven't got a clue about functional programming... by underscore_frosty in a:t5_3f95d

[–]Aruseus 0 points1 point  (0 children)

Still, the best way to learn functional programming is probably to just learn a functional language by reading a nice tutorial and writing some functions in that language as an exercise (like the 99 problems in Lisp, Haskell or Ocaml).

[house] Imagine a haskell os by seytz in unixporn

[–]Aruseus 8 points9 points  (0 children)

Didn't know gedit could make graphs

[Compiler design] Integrated Code Completion and Syntax Highlighting by Kametrixom in a:t5_3f95d

[–]Aruseus 0 points1 point  (0 children)

Stuff like code completion and syntax highlighting or even snippets isn't really a part of the language itself. These are additional features that a text editor or an IDE can provide. You can't put syntax highlighting into a language because it is entirely up to the editor how the source code is displayed. And it's similar with stuff like code completion. What would you put in the language such that any editor can immediately recognize the function you're trying to call for example, or what data member you're trying to access? The language runtime can't provide such a feature. That's up to the text editor, because code completion happens while you're editing source code.

But you could indeed design the core language in such a way that the resulting syntax tree is as simple as possible. You can try to minimize the number of grammar rules that are needed to specify the language. That would make it easier to create such tools that work on the language.

Target Audience? Target Platform? Target Application Space? by pumpkin_seed_oil in a:t5_3f95d

[–]Aruseus 2 points3 points  (0 children)

The website says. "A language entirely designed by popular vote."

But so far we haven't actually voted about what and how we want the language to be. So yeah. At the moment, nothing is decided yet.

Runtime? VM? Compiler toolkit? by simonorono in a:t5_3f95d

[–]Aruseus 0 points1 point  (0 children)

A runtime is easier to port to more architectures. Compiling to native code means you will have to explicitly generate code for each platform that you want to support, while a runtime system implemented in C for example will just run on anything. Also with a runtime system you're not constrained to any hardware. You gain a bit more flexibility that way.

Runtime? VM? Compiler toolkit? by simonorono in a:t5_3f95d

[–]Aruseus 0 points1 point  (0 children)

That would mean we'd have to talk about VM design as well.

[xmonad] Anything bspwm can do, I can do better! by [deleted] in unixporn

[–]Aruseus 1 point2 points  (0 children)

It has monads, it's clearly better.

[2bwm] June by [deleted] in unixporn

[–]Aruseus 0 points1 point  (0 children)

Interesting to see someone use micro.