HackerTrans
トップ新着トレンドコメント過去質問紹介求人

ManBeardPc

683 カルマ登録 3 年前
Software Engineer

コメント

ManBeardPc
·3 日前·議論
Don‘t know any other runtimes that have that by default. Probably kind of possible in Erlang or so by transferring the state, but stopping and moving a green thread in the middle of execution I’ve not seen elsewhere.
ManBeardPc
·3 日前·議論
Last I checked (and remember right) they used Stackless Python. Very interesting, it can serialize tasklets and send them to another machine to continue executing. Seems no longer maintained though.
ManBeardPc
·2 か月前·議論
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.
ManBeardPc
·6 か月前·議論
News in general. Also works well in sales, see how often financial "advisors" try to convince people the market is crashing soon and everything except their product is unsafe and how they try to mitigate downsides (active funds, low/zero interest savings accounts).
ManBeardPc
·7 か月前·議論
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.
ManBeardPc
·7 か月前·議論
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.
ManBeardPc
·9 か月前·議論
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.
ManBeardPc
·9 か月前·議論
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.
ManBeardPc
·9 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
You can ofc use the *alloc from libc if you want. Otherwise there are different ones in the standard library, ArenaAllocator wraps another allocator, FixedBufferAllocator uses a given byte slice. I recommend to take a look at https://ziglang.org/documentation/master/std/#std.heap to get an overview.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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.
ManBeardPc
·10 か月前·議論
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)"?