Hacker Newsnew | past | comments | ask | show | jobs | submit | mr_00ff00's commentslogin

Having dabbled with both Zig and Rust, they do things so fundamentally differently, it isn’t possible to do exact lines like that.

the rust they've written (so far) is highly unidiomatic (and with a ton of unsafe). I can't speak to the zig part, but it seems plausible to me it is line-by-line, horrendous rust.

Whether or not they can clean it up is an interesting question.


zig can do some things wrt. compiler time compute which sits somewhere in between rust const expr and proc macro usage. This isn't something rust (or most languages) have. So even if we are generous and interpret line by line as expression by expression this isn't fully doable

but also telling a LLM to do a line-by-line translation and giving it a file _is guaranteed to never truly be a line-by-line translation_ due to how LLMs work. But thats fine you don't tell it to do line-by-line to actually make it work line by line but to try to "convince" it to not do any of the things which are the opposite (like moving things largely around, completely rewriting components based on it "guessing" what it is supposed to do etc.). Or in other words it makes the result more likely to be behavior (incl. logic bug) compatible even through it doesn't do line-by-line. And that then allow you to fuzz the behavior for discrepancies in the initial step before doing any larger refactoring which may include bug fixes.

Through tbh. I would prefer if any zip -> terrible rust part where done with a deterministic, reproducible, debug-able program instead of a LLM. The LLM then can be used to support incremental refactoring. But the initial "bad" transpilation is so much code that using an LLM there seems like an horror story, wrt. subtle hallucinations and similarr.


If anyone can do it, it's Anthropic. The question is more how long it will take and how many tokens it will burn/how much groundwater.

care to attempt a top 3 differences that someone doing this kind of rewrite should know?

(would teach me a little about Zig, about which i know 0)


Wouldn’t call myself an expert in either, but I think 2 things stand out far more than anything else: 1. Rust is effectively as strict as can be in terms of ownership. In Zig you can just allocate some memory and then start slinging pointers (or slices) all over. If you’re doing this then you’re presumably doing it for mutability and you don’t strictly know where that pointer ends up once you’ve passed it on. 2. Rust’s metaprogramming is split among a couple different things (e.g. traits, macros), whereas Zig’s is unified (comptime). comptime is (at least advertised as) “just normal Zig code” and Rust macros are a great example of “this doesn’t work at all like the base language”.

#1 boils down to “can the LLM solve the pointer aliasing here?” and #2 is translating between metaprogramming paradigms. Could work but a line-by-line translation is a pipe dream.


great answers! exp the recap last line

Zig doesn't have a borrow checker. It's basically C, if C had been much better designed.

Line-by-line ports to idiomatic Rust are usually not possible because of the borrow checker and Rust's ownership rules. That's the reason the Typescript compiler was ported to Go instead of Rust.


You can do this with a bunch of clones. But this will make your software slower and kind of defeats the entire purpose.

Saving energy is something we are biologically trained to prefer.

Computers won’t necessarily have the same drivers.

If evolution wanted us to always prefer to spend energy, we would prefer it. Same way you wouldn’t expect us to get to AGI, and have AGI desperately want to drink water or fly south for the winter.


Who's energy? Turning off the lights when you leave the room isn't innate.

Because you are worried about bills or are concerned about waste.

If we design an AI to do work, it won’t innately care about not working to preserve power.


Not saying you are wrong, but you could argue they made their big move with the Metaverse. Then again with those crazy AI contracts to ML people.

Maybe Meta missed on those big plays and now there’s too much pressure to make another.

I don’t know if I believe that, but worth considering


Pressure from whom? Mark Zuckerberg personally controls the majority of voting shares. He can do whatever he wants.

> But traders weren’t just active on Polymarket: there were similar surges of oil futures trading activity just hours before Trump announced updates to the conflict that would lower oil prices.

Prediction markets are all the buzz, but banning them isn’t fixing the problem. This has happened forever. Let’s not forget there was an unusual amount of put option buying right before 9/11: https://ideas.repec.org/a/ucp/jnlbus/v79y2006i4p1703-1726.ht...


I don’t know if just one instance means direct democracy is bad. For example, in the US referendums have been used a lot for issues that are popular for voters, but politicians won’t touch.

(Weed legalization in many states, Abortion protection in Missouri I believe)

You could also argue Brexit. Ultimately, most of the UK was okay with shooting themselves in the foot to feel more independent like the good olds days. Maybe was wrong long-term, but if it’s what the people wanted, then maybe it’s good. Politicians never would have done it despite the people wanting it.


I'm anti-Brexit (not that it matters, not British) but also pro-referendum in general. One modification I'd like to see is higher thresholds for more significant actions, especially ones that are difficult to reverse like this was. I don't think something as huge as Brexit should be decided on the basis of 50%+1. There should be a bias towards the status quo, and this should require maybe 60% or 2/3rds to overcome.


I'm afraid that could lead to political instability. Maybe not, but I imagine if 59% of people vote "X" but 60% were needed, people could revolt or at least drastic and unpredictable changes in voting in the next elections could happen - "how can this political regime ignore the voice of the majority?!".

You'd need most of the people to understand why 60 or 66.(6)% of people are needed to decide something and really believe in this threshold. And Y% of the populace is different psychologically than Y% of elected officials (in cases where a supermajority of officials are needed to pass Z in a forum like parliament/house/senate).


Layoffs.fyi maybe? Not sure if that’s the data you are asking for


Untrue for polymarket. True for kalshi. No bookie fees on polymarket


Wow that's news to me. How does polymarket make money if not from fees?


It doesn't seem like it's strictly true that they don't charge trading fees.

From their docs, it looks like they charge fees to bet "takers" (as opposed to makers), but exclude the geopolitical and world-events markets where they don't charge fees.

I have to imagine that may be related to some of the blow-back towards prediction markets about profiting on topics like war & their potential for manipulation.

Given it sounds like the bot bets everywhere other than sports, many of those categories would likely have fees in this case.


Polymarket charges “taker” fees (people removing liquidity by matching listed orders) on most markets. Geopolitics markets are exempt. A portion of the collected fees then get redistributed to “makers” (people who provide liquidity by listing orders for others to match). Presumably the rest of these fees make up polymarket’s revenue.


Which is essentially also providing a platform for making the book for the other platform, on which 'bookie fees' are charged, but Polymarket itself only keeps a certain cut of it, for facilitating but not actually book-making.


They emit new (crypto) tokens which they can sell


trying to become bloomberg by selling to institutions


> 12 trading ships from Black Sea ports made desperately incompetent efforts to dock alongside the harbour walls. Then the reason became devastatingly clear; very few of their crews were still alive. The living were emaciated skeletons, covered with black boils that oozed blood and pus.

Can’t imagine what that must have been like to witness in medieval Italy.


That’s like having your security on the frontend.

If someone owns the keyboard then they can fake those metrics and tell the server it is happening when it isn’t.

That will be easy to beat.


My understanding of vibe coding is when someone doesn’t look at the code and just uses prompts until the app “looks and acts” correct.

I doubt you are making regex and not looking at it, even if it was AI generated.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: