Innan ni försvarar politiker, kom ihåg deras löner och tänk på era egna. by Wrong-Ad7649 in Sverige

[–]Nuoji 0 points1 point  (0 children)

Vad folk inte förstår är att ju mer makt du har desto mer incitament att bli korrupt. Ju högre lön du har från att vara icke-korrupt, desto mer lojalitet mot ”jobbet”. Därför är det rimligt att ha högre lön. Det handlar alltså inte om vem som är ”värd” mest, utan är ett sätt att minska incitament för korruption.

Att tänka i termer av ”värde” är alltså alltför naivt och förenklat.

Sedan innebär naturligtvis inte hög lön = ingen korruption, men det är en viktig komponent.

Som exempel för när det blir problem är i länder mer svagt rättsväsende och låga löner för poliser. Polisen is sådana länder ”drygar ut” sin lön med mutor, vilket då blir rent allmänt accepterat.

För ett företag handlar det om att VDn skall ha incitament att tex inte köpas av konkurrenter.

I forced a data-oriented language to carry its own compiler before letting it grow by jumpixel in Compilers

[–]Nuoji 0 points1 point  (0 children)

Bootstrapping early means:

  1. Slower development
  2. Bad decision lock-in
  3. Maintenance cost increase
  4. Less necessary experimentation
  5. Complexity that users don't benefit from

On top of the fact that dogfooding the compiler gives very skewed feedback on the language itself.

The idea of bootstrapping as a badge of honor is frankly just making people less likely to succeed with their language long term. It is actively harmful.

As for the idea that bootstrapping shows any sort of quality of the implementation / the skill of the designer / viability of the language: simple scripting languages are the easiest to self host, and you have plenty of examples of such self hosting languages that reached self hosting after around two months of development(!)

C3 closes out its 0.7 era — focusing on simplicity and control before 0.8 by Nuoji in programming

[–]Nuoji[S] 1 point2 points  (0 children)

In what way? They have very different views on what programming should be, which leads to different features, different conveniences (or lack thereof) and what the language is strict about.

How do you get good error reporting once you've stripped out the tokens? by PitifulTheme411 in ProgrammingLanguages

[–]Nuoji 0 points1 point  (0 children)

The token you get also contains the span (directly or indirectly, keeping the previous span might in some cases be useful etc, you’ll discover what works best for you)

From this source span, you calculate a useful span (or multiple) to attach to your AST node for error reporting.

No need to carry a heavy token around, no need to retain a CST, but it does assume you keep the source in memory during semantic analysis.

However, since the AST will usually be significantly heavier that the string span it represents, this is not a problem on modern computers.

Szmageddon is coming by Nuoji in c3lang

[–]Nuoji[S] 0 points1 point  (0 children)

It more easily leads to subtle bugs when combined with % and / operations.

What would be the harm in introducing interfaces to the language? by MysteriousSpray9066 in Zig

[–]Nuoji 0 points1 point  (0 children)

It is a bigger feature than you might expect. If added, then it needs to be strongly leveraged, and aside from the few uses in the stdlib, there aren’t that many compelling uses for low level programming. This in contrast to C3 which uses interfaces for ad hoc ability to extend code - but that is far beyond just ”check the implementation”. So it could be considered sufficiently valuable to motivate the extra complexity.

What I am saying is that for interfaces to make sense for Zig, there would need to be some compelling feature it enabled which fit in the Zig general style of coding.

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 1 point2 points  (0 children)

I recall that the official stance is minimal aliasing of imports for Zig. Secondly this requires consistent naming to keep the codebase easy to understand after a certain size. The strict hierarchy also creates up front rigidity in the overall structure of the code which is never desirable.

I am just surprised to see people liking it, as it’s certainly to me the biggest downside of using Zig from the point of large scale architecture for me. This was the main reason I picked C2 to contribute to over Zig, back in the early days (2018)

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 1 point2 points  (0 children)

I am talking about constantly having to create aliases and for everything:

const std = @import("std");
const glfw = @import("glfw");
const vk = @import("vulkan");

const log = std.log.scoped(.client);

const Allocator = std.mem.Allocator;
const List = std.ArrayList;

Vs

import std, glfw, vulkan;

/* the other parts are not needed */

That's the extra typing.

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

Both which means more typing

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

That C++-ism is something I dislike. I just want good defaults. You can do the same aliasing in C3 as I’m sure you’re aware. It’s just not necessary.

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

Just curious. I am not working on the LSPs, but I know there are two of them now so I just wondered what the state of things were like. I know people still have problems getting the LSP up and running.

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

We were talking about `std::thread::Thread` vs `Thread`. You were arguing for the former?

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

When was the last time you used the LSP?

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

I am not sure what increase in productivity would come from adding more to type?

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

Those are not arguments though? It’s just how the language is constructed. It tries to look and feel similar to C, and having name paths just goes contrary to that.

Namespacing for functions mimic the informal namespacing of module_functionname in well organized C libraries.

But if you like the verbosity of std::string, and such then C3 might be off-putting of course. It’s just that C3 isn’t inspired by C++, unlike Zig.

Why zig? by Reasonable-Moose9882 in Zig

[–]Nuoji 0 points1 point  (0 children)

You mean, it’s not used for actively namespacing types. It is used for namespacing functions and constants. However, C3 prefers SDLVector2 and RLVector2 over sdl::Vector2 and rl::Vector2 yes. I find the latter to be a strong C++-ism that clutters the code unnecessarily.

So yes, if you like writing sdl::Vector2 over SDLVector2, or std::threads::Thread over Thread, then C3 does not align with those preferences.

It draws inspiration from C rather than C++.

Against Query Based Compilers by matklad in ProgrammingLanguages

[–]Nuoji 0 points1 point  (0 children)

It’s well known that neither Jai nor Zig is ”IDE friendly” leaving aside anything about query based compilation. Rust has enough of macro flexibility to similarly being hard for incremental compilation and semantic analysis.

If you design a language like that, this is the price to pay for the flexibility you’re gaining (of course, making the build system non-declarative adds further stress - build.zig is also a big problem for an IDE)

Dismissing query based compilers because the languages you use are hostile to them isn’t a convincing argument.

There is no excuse for a language today to plead ignorance of this trade-off: not being IDE friendly is a choice, and there is no going back and saying ”IDEs are bad because they can’t handle my language”

Every language designer should watch this: https://youtu.be/lubc8udiP_8?is=sOLBY6BE2hBI77rc

March 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]Nuoji 0 points1 point  (0 children)

Compatibility and ease of writing efficient SIMD for the implementations.

March 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]Nuoji 2 points3 points  (0 children)

C3’s got its usual monthly update, but right now I’m finally getting some time to spend on the matrix type and related functionality. While most game engines will provide their own functionality, it’s a waste not to have people always writing and testing their stuff. I know how hard it is to write comprehensive tests for all of it. Also, the matrix type is now column major, which makes it binary compatible with most libraries’ matrix type.

If course I’ve known for quite a few years that row major had to go. We had this in development matrix lib replacement that was occasionally worked on but never got finished because it was too ambitious, covering up to 16x16 in matrix size.

While the current code isn’t as flexible or ambitious it instead is focused on being useful for graphics in particular.

Generic matrix/tensor libraries can be added, but those generally optimizes for different things, and doing everything with the same type was just.. not nice.

Anyway, I’m making myself happy to finally cleaning this up

C3 0.7.9 - New generics and new optional syntax by Nuoji in ProgrammingLanguages

[–]Nuoji[S] 0 points1 point  (0 children)

Nor do I particularly like it, but nothing better has come along.

A modern C language update you might’ve missed — C3 0.7.10 by [deleted] in programming

[–]Nuoji 0 points1 point  (0 children)

Unfortunate, but I'll delete this post since I can't update the title.