HN user

ManBeardPc

683 karma

Software Engineer

Posts0
Comments122
View on HN
No posts found.

It was an improvement in some regards, but a pita most of the time. Before I had to work on an Angular project React was my least favorite frontend library. Solid.js gave me back my sanity (also Svelte 5). Fast, small, includes what I need and feels like just writing JS/TS. Sadly businesses love to torture their developers, themselves and users too much, so React/Angular it is.

The endgame is to normalize punishing groups/individuals for any reason on a whim of the ones in charge. Start with minorities and people who can’t defend themselves, then later you can do easier to anyone who gets inconvenient. Despotism 101.

My next company‘s boss was pretty much Windows only (server and desktops/laptops, some Linux servers). Linux on the server was already replacing more and more machines. Now I am even allowed to use MacBooks or Linux laptops. Current company is already using the Google suite, MS Office was an exception if required for some reason. I saw the same shift with Oracle. Previously nearly everyone wanted Oracle as a DB, then the price increases got too much and everyone who could switched to alternatives like MySQL or Postgres.

It will be a big one for people living near the coast. Basically all port infrastructure will need to be moved. Of course there a things like extreme heat waves, cold snaps, lack of rain or floods that will make a lot of land unlivable too. Lack of food will be another thing. But land being under water is not a lesser thing at all, as it makes the land unavailable.

Yes, that is exactly what is happening. 2000W solar panels feed the battery, up to 800W are allowed to be fed back into the grid/house network. Keep in mind you could also plug a 3000W device directly into the battery, meaning you could power a lot more than that if it is not connected to the grid. If you have devices that need little power for a long duration or high power for a short duration they can be fed with 100% solar that way. Depending on your use case that can save further money.

The awesome part is you can circumvent the 800W. First you can legally install 2000W solar panels, making 800W output much more likely. The 800W is only how much you can feed back into the grid. Second you can install one or more batteries and feed devices from them, further increasing the usable energy.

Huge barrier of entry. It requires a lot of integration and investment. Getting another supplier to move usually involves handing over big bills. Even then it is not guaranteed that the change is (fast) enough. I see it all the time, nobody gets their ass up unless it’s on fire. Still some companies will claim „at least it’s warm now“. „This is fine“-meme is real. Resist change at all costs.

I’ve seen companies losing their by far biggest customer because they refuse to hire real engineers instead of juniors to fix their software. The customer tried YEARS of complaining before.

Another customer: different suppliers use different barcode patterns for deliveries, some including nasty stuff like NULL as separators (but only sometimes, can be space, tab, whatever) or non-unique IDs. They rather spent the effort to fix everything else with workarounds than change the contract and demand proper barcodes/delivery data.

Regarding async I kind of agree with you right now, but the new design is there and currently getting implemented. If you don’t believe it will work out or need to use async right now sure, use something else. It is not a stable language yet and very much WIP. I don’t think it’s dishonest to write about something that has a design and is worked on right now with a realistic chance of working out.

The point is the code is on another type. Any variable could by of a type that implements some Drop logic. It is mostly called implicitly where it is used, wether you as a programmer are aware of it or not. You would need to check.

In Zig you need to call everything explicitly, meaning in the function you need to call what you want to be executed, no other code will run. The decision if you want some cleanup logic is made at the point of usage, not by the type itself.

That is the point of it, you look at a function and directly see what happens right there, not in other files/packages.

Drop yes. Thanks for the correction.

It is clear when it is called, but you have to check in code you are not currently seeing as any type could implement it. May seem like a minor thing, but is not explicit at the point of usage. In Zig only code you call explicitly runs, meaning if there is no defer nothing happens at the end of the scope.

Not only being text based but also having another separate language is problematic. Rust also has powerful declarative macros but it is it’s own language. Procedural macros and crabtime are imho a bit better for more complex cases as you write Rust.

It has proper arrays and slices, even being able to define a sentinel value in the type system, so you know when it is a C string or a slice with a specific size with arbitrary values. Strings can become a problem if you need another encoding than the chosen one. Then you start to use byte slices anyway. You need to allocate a new one if you want to change just a part of it. Safer yes, but can produce unwanted overhead and you have to duplicate many APIs for strings and byte arrays as it is the case in Go.

Comptime is very nice but certainly more limited then Lisp. You can't generate arbitrary code with it. But good enough to implement something like JSON serialization or Struct-of-Arrays in normal code that is readable.

Custom allocators are very nice. We are very much in manual memory management + optimization territory here. Having things like arena allocators makes a lot of difference in specific use-cases when you want/need every bit of performance. Also nice being able to switch the allocator for tests that is able to report leaks for example.

Yes, hidden control flow I mean something like exceptions, RAII or Rust's Dispose. So more a comparison to other languages than C.

The explanation I would refer to the talks "Don't forget to flush" or "Zig Roadmap 2026" from Andrew Kelley. Also the blog post "Zig's New Async I/O". I think it has something to do with being able to infer the required size of the stack, but already forgot the details.

https://kristoff.it/blog/zig-new-async-io/ https://youtu.be/f30PceqQWko?si=g2nLTE4ubWD14Zvn https://youtu.be/x3hOiOcbgeA?si=SUntYOYNOaxCRagc&t=3653

As to compared to Rust. The fast compile times are nice. Having a small language that you actually can understand helps to be productive. Not being restricted by the borrow checker makes it easier to implement some low-level things. Just being able to import most C code without wrapper makes the smaller ecosystem a much smaller problem. Rust is nice and certainly a good pick for many cases, but personally I often feel overwhelmed by the complexity and tons of tons of types for everything.

Like a modern C with lessons learned. Instead of macros it uses Zig itself to execute code at runtime (comptime). Custom allocators are the norm. No hidden control flow, everything is very explicit and easy to follow.

But it’s not only the language itself, it is also the tooling around it. Single unit of compilation has some nice properties, allowing to support colorless async. Fast compile times. Being able to use existing C code easily and having optimization across language boundaries. Cross compilation out of the box. Generally caring for performance in all aspects.

So for me it is a better C, low-level but still approachable and not having so much cruft.

Maybe on the condition that the law was struck down by courts. Otherwise it would block iterations on any controversial topics that need time to reach consensus.

Some others here asked how would we decide what is the same law. That’s pretty easy: same as with many other not so clear things, if some sues a judge/jury hears both sides and makes a decision.

It would probably be toppled by courts, yes. Anyway, meanwhile they already start implementing it, developing the technology and infrastructure they can base on the next time where they basically reintroduce the same illegal laws in a new name. So companies and governments already have to spent huge sums of resources to introduce it and may fall into the sunken-cost fallacy. "If we now already have it we can also use it (for something else)"?

iPhone Air 11 months ago

A battery case would work too. Was just hoping for a model that is trimmed and optimized for longer trips outside the city/with absence of reliable power sources. Cut some of the performance, only efficiency cores, bigger antenna and optimize hardware aggressively for low battery usage. Maybe use some of the bigger case for repairability…

iPhone Air 11 months ago

The way it is currently yes. But hardware is way more efficient now. Why not sacrifice performance and optimize a bit more in that direction? It is plenty fast already for everyday life. I don’t like that we only focus on performance and we don’t see longer battery life that we could have based on advances in battery technology + more efficient processors.

iPhone Air 11 months ago

I want an extra thick model instead, let’s call it iPhone Travel (or Ultra?). Just thick enough so the cameras are no longer sticking out. Give me an all-week battery instead of an all-day one. Slim down the power usage and give a power saver mode that actually does make a difference. Let me go on a weekend trip in nature or festival without having to carry extra hardware or having to look for public charging stations.

iPhone Air 11 months ago

But hey, at least the battery is (partially) replaceable that way.

It’s true for me. I need a portable workstation more than a mobile laptop, as long as it survives train travels (most have power outlets now), moving between buildings/rooms or the occasional meeting with a customer +presentation it is enough for me.

But I can imagine some people have different needs and may not have access to (enough) power outlets. Some meeting/conference rooms had only a handful outlets for dozens of people. Definitely nice to survive light office work for a full working day.

No it hasn’t become so dangerous and surveillance doesn’t help. Neither cameras nor real-name accounts actually helped to prevent crimes. Same with databases, lists or other surveillance tools. Many criminals who committed terrorism were known to the police before and they chose not to act or processes were not in place. All it does is lead to less freedom and security. The government itself is the security threat. There are always black sheep working there. They sell private details, enforce their own agenda or fail to secure sensitive information. Also extreme political parties can and did/will use it to silence undesired persons. Ask anyone who knows a bit of German history for many good examples.

The US matters, it has a big influence and could force companies around the globe to hurry up the transition. Just because the emissions may have peaked a lot of it is just outsourced. Also just reducing is not enough. We already missed important goals.

Fossil fuels losing economic viability is a small light at the end of the tunnel. But even that may not help if politic is making bad enough laws.

Ironically climate will also rewrite the US and the rest of the world in return. More so that we are losing several important years because the US as a big contributor is now governed by complete climate deniers. Currently having the hottest summer so far, but coolest summer we will see at the same time is something I hoped to never experience.