370 karma · joined August 27, 2023
https://aalbacetef.io
https://github.com/aalbacetef
---
Views do not represent any of my past or present employers (nor even myself at a given moment, as my opinion could have evolved).
Would still like it as a first-class language construct.
Re: safety guarantees, much digital ink has been spilled on how Zig can give Rust a run for its money when it comes to safety.
When people say: Rust <=> C++, Zig <=> C; they forget that C++ was precisely meant to be an enhanced C, which is what Zig is trying to accomplish. They simply eschewed chasing complexity as the holiest of holy grails, which in turn leads to the cognitive load of writing/reading Zig code to be MUCH smaller than C++ or other langs in that space.
All that said, I'd never recommend a company build their product on Zig just yet, at least not with some kind of red telephone to the Zig team or a dedicated Zig developer, given it's still not fully mature.
Re: managing memory yourself, Zig's defer makes this much, much more straightforward than you would think, and feeding in your own allocators can simplify this in many cases (and make testing for leaks much easier).
I have no idea how you can accuse me of this when I made a big disclaimer in my original comment:
>Before anyone gets triggered and starts typing up a reply: "SUBSET" is the word I used.
- the build system is constantly changing in a breaking way (between releases some of the repos I have on GH no longer build and need their build.zig to be updated).
- the comptime section of the docs needs to be heavily expanded, I'd love to see them take common Go interfaces and redo them in Zig (like io.Writer, io.Reader), breaking down the process step-by-step. It took me a little bit longer than it should've to efficiently use comptime.
- a whole section dedicated to things like using WaitGroup and multithreading, for those coming from langs like Go. Also, higher-level concurrency primitives like channels would be fantastic.
- a better import system for external zig libraries, the zig fetch => .dependency => .root_module.addImport stuff is not as straightforward as it should be although for someone coming from C it definitely does feel like using meson
None of these are critical and again, all signs of Zig's "youth".
But that subset of devs has largely disappeared/moved on to other langs.
Somehow in the past 3-4 years it's only been that subset of Rust devs that have been wailing about: "WHY NOT REWRITE IT IN RUST?".
Often they're mostly the same type: anime pfp, walls of text of pompous technobabble as if they were some elite caste of arcane cyberpriests preaching the gospel of Rust, etc.
There's a reason "just rewrite it in Rust" has become such a meme.
Give it a few years and it will be a very strong contender.
The true C successor.
Before anyone gets triggered and starts typing up a reply: "SUBSET" is the word I used.
For political stuff, I avoid wikipedia and just search engines in general and ask Grok/ChatGPT, specifying the specific biases I want it to filter out and know pieces of misinformation for it to ignore.
Example: WeatherConfig, WeatherService, WeatherPollInterval => weather.*
Just have a 1 hour or 2 hour call with candidate where you guys go through the project.
Some years ago there were job posts left and right, salaries were high and hiring was smooth - now there are comparatively fewer jobs posted, salaries are almost half of what it was before, and many don't even write back.
Many companies are even turning away from remote work. It used to be very doable to find a job in the US from Europe, now everyone is demanding you have work authorization and can be in the US.
It's a minimal amount of extra work and would mean you cross browser isolation in a very controlled manner.
In all seriousness, it is a bit tiresome when you come back to the python world and see a completely fragmented ecosystem (poetry, pdm, pip-tools, uv, and the older ways).
type Thing = string | boolean;
const arr: string[] = [];
function add(item: Thing, dst: Thing[]): void {
dst.push(item);
}
add(false, arr);
Is valid typescript.>Its type checker and build toolchain are so abysmally bad and bug-riddled that I run into new bugs and limitations on the daily.
This seems like a setup issue.
Mine catches everything just fine. Both in-editor (I use neovim) and with a make step (just calls vue-tsc) + a precommit hook as a sanity check.
>React is basically pure TS and the only bugs I run into are the occasional limitations of TSC.
React is obscene. It always seemed to me the Java of the FE world, made worse in recent years. By that I mean grotesquely verbose and full of ceremonious value passing through multiple functions just for the tiniest of things. I've had to work with React codebases and these days I outright refuse to do that/turn down jobs with that requirement. I'd rather use angular.
Svelte and Vue are ergonomic and straightforward and they sanely default to SFCs instead of that woeful chimera of languages called JSX/TSX - you can still use it if you so desire though.
Also, I regularly hop between 3 machines + a personal phone and a work phone, and I love being able to have access to my logins + secure notes across all 5 devices.
All for the cost of a coffee/month.
Personally for me the issue with all these new project management platforms is that the target demographic is either: - they're so small they can't afford to self-host - they're big enough they can afford the pro plans of more established tools
Small companies can get by perfectly with the free/cheap plans of other tools, like Trello+Google Workspace. Heck if you're a one-man team with occasional collaborators free Trello + Google Workspace (~$6/mo) is enough.
A box to provision the Huly stack might come out at more per month...
Was thinking of hitting up recruiters with my rates.
This seems to be a scenario where switch/case blocks could make the elif-trees a bit easier to read.
Also, the code could use some care about not going so deep into the Vs:
// request headers
if (requestAttrValues.noHeaders) {
// ignore all headers
} else {
for (const header in headers) {
if (headers.hasOwnProperty(header)) {
const headerValue = headers[header]
safelySetHeaderValue(xhr, header, headerValue)
}
}
}
could just be: // request headers
if (!requestAttrValues.noHeaders) {
Object.keys(headers)
.filter(hdr => headers.hasOwnProperty(hdr))
.forEach(hdr => safelySetHeaderValue(xhr, hdr, headers[hdr]));
}
Not even sure if that hasOwnProp check is needed, unless header keys are explicitly set to undef.A distro is the appropriate comparison in this scenario, and Pop_OS! or Ubuntu are about as easy as can be.
EDIT: /facepalm, just realized the Stallman meme hehe
I had to install it to have it run a command on ctrl + alt + t.