HNHacker News
TopNewBestAskShowJobs

codebje

1,255 karma · joined June 19, 2017

submissionscomments
codebje··on Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?
I call an electrician to change a wall switch since an unlicensed handyman making a mistake that starts an electrical fire voids my home insurance.

Plumbing is fractionally less regulated where I am and I am allowed to change my own taps washers, but a whole tap assembly falls under similar issues as a power switch.

codebje··on Xbox wants you to pay 24 to 40 cents per hour to stream games you bought
I tried #2 from here in Australia, but the experience was incredibly poor despite fibre to the home at 500mb/s. You'd be better off buying one of the gaming mini-PCs with 32GB DDR5 and a 760/780M iGPU for ~3-4yrs worth of monthly costs, but the Vimes theory of economics might prevent that.

(I wound up building a gaming PC, much more capable but much more than the cost of streaming over an equivalent lifetime - IF streaming services don't enshittify to cost more and deliver less over time, which we all know they will.)

codebje··on Woman faces six years in prison over Cash App account she never opened
How often do you get that sort of crime attended to and resolved satisfactorily?
codebje··on Today's PHP security release, and how we're strengthening security
Quantity is a form of quality.

There's a vast number of operators who won't even look at their site when its performance craters due to a scrum of crypto miners all competing for resources. Why waste time on sophisticated attacks trying to fly under the radar of competent admins who will detect you by your egress traffic anyway?

codebje··on Parser Combinators
The list represents the possible parses and the remaining input for each. In most cases you might prefer an unambiguous grammar, so a successful parse is a singleton list of a pair of the full parsed result with an empty input sequence.

But parser combinators build your final parser out of little bits, and sometimes those little bits might be something potentially ambiguous, like "any number of leading zeros followed by a number" which needs to parse "0" as no leading zeros and the number 0, but "00" as one leading zero and the number 0.

Non-deterministic parsers can easily blow out with backtracking much like careless recursive descent parsers, though.

codebje··on Parser Combinators
You’re going to write a monad and alternative instance for whatever structure you use. A list is a Cartesian product, but that’s just the join of parser B over each remaining input of parser A, it’s still a one-liner.

The question is capabilities. Either gives you an error result that might be useful. List gives you backtracking and, depending on your grammar, multiple parses. Maybe is like a weaker Either. Other monads might do other interesting things, but from the perspective of accepting strings satisfying a grammar, List is the choice that supports non-determinism.

(Laziness strongly recommended.)

The poem is not mine, I believe it is Conor McBride’s.

codebje··on Parser Combinators

    A parser for a thing
    Is a function from a string
    To a list of pairs
    Of strings and things.
codebje··on Steam Client is now faster than Epic's new vibe coded launcher
I think these days it's easier to run Steam in Wine than it is to run Wine in the first place. If you're running a commercial packaging of Wine for gaming, both things are trivial.

(Successfully running Windows games is its own issue: I think "Steam Deck" compatibility badging is a pretty reliable tell for Linux gaming, but on a Mac, having the game be playable is a gamble on install and again with every patch.)

codebje··on I know why the mathematicians weep
It seems like, once the IPO is done, this flood of papers will dry right up: the inherent value of the papers themselves is unlikely to justify the cost to churn them out. It makes as much sense as OpenAI churning out hundreds of slopped programs no-one wants to run, or hundreds of novellas no-one wants to read: it's just showing they can.
codebje··on Show HN: Pulse Local, a Mac budgeting app whose AI models run on your machine
I gave it a go and imported a transaction CSV from my bank - National Australia Bank. 150 row CSV. The Description import column was assigned to the Merchant Name CSV column (the Merchant import column was also assigned to this CSV column) and as a result 25 rows were going to be ignored. Here's the CSV header row:

    Date,Amount,Account Number,,Transaction Type,Transaction Details,Balance,Category,Merchant Name,Processed On
Hand-picking the Description column to be assigned to the details column sorted it out; not sure how you're auto-selecting column mappings but maybe 'details' should be recognised as closer to 'description' than 'merchant name' is.
codebje··on Making a GTK application in Haskell, part 1
It's a native desktop app, so none of the above.
codebje··on Why do we need human mathematicians anymore?
If some LLM somewhere managed to produce a coherent and _correct_ explanation of how it worked inside, but no human ever saw it, would it matter?

We know how to apply LLms to problems, which is a subtly different thing to understanding how they do what they do. It's similar to fire: I can cook using fire, but I don't really understand how fire _works_. Heat+oxygen+fuel, sure, but what goes on chemically? I dunno. Doesn't stop me using it. (Pretty sure _humanity_ knows how fire works, though).

codebje··on Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint
Bonsai Dai ?
codebje··on Training a 4B model to produce 81% faster query plans than Postgres
There's a good number of heuristic choices in compilation where, maybe, you could get more optimal outcomes with machine learning - but at the cost of compilation resources, both time and space, and possibly determinism too.

As an example, register allocation is graph colouring, and thus NP complete; a model for producing an allocation plan is learning heuristics that might look at more features in combination than the ones hand-crafted into the compiler. An LLM for the job might do better than a more focused model like a GNN, due to sheer size, the effectiveness of transformers, or magic. But it probably won't do an overall better job than the handcrafted heuristics, because those handcrafted heuristics also tend to compile very, very fast with a small memory footprint, and can be debugged (more) easily when they go wrong.

codebje··on Social media use on the rise among Australian under-16s after ban: data
Source: Australian, with teenager.

1. It's not a ban on using social media, it's a requirement for age verification to create an account. This only limits usage on the few platforms that force an account to do anything.

2. The technical controls platforms implement are, unsurprisingly, generally quite weak. Kids are crafty enough to circumvent them, and share how freely.

3. Wannabe-influencer parents just create accounts for their kids, making the circumvention trivial.

4. There are no consequences for using a social media account while under 16.

I think the final point is the main one, though. By design there's no mechanism in place for the government to take any action if a kid gets onto social media, only if a platform fails to implement age checks that satisfy the legislation's criteria. So platforms all implemented tokenistic age checks. Platforms don't care, or need to care, if they get bypassed. The government doesn't care.

If I were a more suspicious man I'd say that either the point was never to reduce the use of social media by kids in the first place, or it was well intentioned but railroaded into toothlessness by lobbyists.

codebje··on New Mac mini, featuring M6 and M5 Pro
Chinese mini PCs are also affected: they're shipping with less RAM, at higher prices, or both.
codebje··on Anthropic's best AI model struggles to attract users as cheaper tools thrive
I pay for my tokens for my own projects, at least when the ones Google seems willing to keep throwing at me for free don't cut it. I'd think that's not too uncommon, especially here where there's likely a high ratio of hobby coders (whether also professionals or otherwise).
codebje··on Quake Shareware, a CD-ROM just a little too full
If the phone support issued the decrypt code, you could just replay that same code for every CD stamped from the same master.

If phone support issued an encrypted decrypt code that could only be used with your challenge code to decrypt the decrypt code, replay wouldn't be as trivial.

Every CD is identical, so no matter how iD went about this there's only ever one decryption key (per title, I assume) and those keys must either have been encoded in iD support's response, or already stored on the CD. TestDrive sold iD on the notion that the process was too hard for hacker groups to reverse engineer, and it wasn't.

codebje··on A third world engineer responds to “RISC-V: They should have known better”
Maybe. There's less wiggle room though. You can't make a clone of a WCH, ESP32, GD32V, or RP2040 at a low enough price point to really profit from the gap.

If Quintauris successfully makes a RISC-V range for automotive use, there'd probably be margin to clone those and sell at a profit, but skirting automotive certification regulations is a high-risk game that (hopefully!) doesn't have many buyers.

If they make an IoT line, again, there might be margin in it, but you'd be trying to fit in between buyers willing and able to engage with Chinese sellers but for some reason unwilling or unable to engage with existing Chinese sellers of existing IoT RISC-V parts. Quintauris is a very, very long way away from being a "household name" along the lines of STM32 or FTDI.

codebje··on Donkey.bas is 45 Years Old – 131 line of Glory
You used to be able to do surprising things with those old speakers using a timer interrupt: on an IBM XT it was possible to get 8kHz quality out of it, enough to make 4-channel MOD playback sound about as good as hearing it over a phone.

But your more typical use case was to play a single tone for some significant fraction of a second.

codebje··on Don't stop early: Case-folding source code at memory speed
Codebases written by native English speakers are almost exclusively ASCII, but codebases written by speakers of languages other than English frequently have non-ASCII content, even if only in the comments, but languages which support it often wind up with non-ASCII identifiers, too.

I do not believe that emoji like crosses and ticks are particularly common at all, for any language, but LLMs seem to have picked up heavy use of them from somewhere and inserted them into code (and everything else) they generate.

LLM training sets will very likely include the massive corpos of non-English open source code from sites like Gitee, but would be unlikely to generate responses heavily influenced by them unless you've done specific things to make that happen - prompt in Chinese, try to make use of a library only available with Chinese source and/or documentation, perhaps. I've not seen it happen, but I am a light user of LLMs.

codebje··on Show HN: Fuse – statically typed functional programming language
Thanks for the link to SPJ's notes, I'll read that tomorrow.

Equivalence of terms is an efficient tool for verification; I suspect that isn't really in the set of goals for Fuse, though.

codebje··on CP/M-386 – CP/M for 386 protected mode, derived from CP/M‑68K
Also, it was super common practice to just go direct to undocumented internals. You didn't have a clean API to duplicate, you had all the untamed glory of a CPU with no MMU to deal with, and all the programs that did shonky things because they worked.
codebje··on CP/M-386 – CP/M for 386 protected mode, derived from CP/M‑68K
CP/M-86 was definitely a thing, but CP/M-386 was not. By the time the 386 existed, DRI had dropped the CP/M name in favour of Concurrent DOS - though they had MS-DOS compatibility in Concurrent CP/M - and, as you say, eventually renamed it to DR-DOS.

Much as I loved DR-DOS, it did have occasional compatibility hiccups.

codebje··on Show HN: Fuse – statically typed functional programming language
Can you expand on your understanding of GRIN doing parts of supercompilation? As I understand it, GRIN doesn't do any supercompilation; it's a structural transformation optimiser built for functional languages, analyzing program flow across function calls for the whole program at once.

As I understand supercompilation, it's an extension of partial evaluation - optimisation is done on a graph of possible execution traces. The downsides should be obvious: execution traces rapidly grow massive, compilation resources grow superlinearly, and there are many cases in which the result is worse than the original.

What value would Fuse get from equivalence of terms, do you think?

codebje··on Show HN: Fuse – statically typed functional programming language
It's nice to see a GRIN backend in the wild!

It looks like a tidy little functional language - a small, easily grasped syntax surface and generally clear semantics. That you've got it to the point that it can compile and run proper programs is a great achievement for a solo dev project!

The string type in the standard library isn't Unicode-aware, might be worth just noting that. Unicode support can be a big undertaking, but considering whether you'll add it later or not might affect your library design now.

I don't really understand why you have an IO monad. The language isn't pure - `.exec()` means any function can perform IO actions no matter its type signature - so what's IO really for?

Do `impl` additions export? What happens when two libraries add the same function name with different signatures (or just bodies!) to a type's `impl` ?

Is currying automatic? It doesn't seem to be, but, eg, the `sum(x: i32, y: i32)` function theoretically could be called as `sum(5)` to create a closure, but this isn't a documented feature if so.

The website's font is using ligatures, not unicode operator symbols - I'd personally find it much clearer to use a non-ligature font to show what's really there, but that's immaterial to the language.

codebje··on We have proof automation now
IMO the biggest issue was always not knowing what correct is in the first place. The vast majority of software we use, the stuff that's riddled with errors, has those errors largely because what it's supposed to do is vague and never, ever deals with edge cases. You can't formally verify your application works correctly under transient network error conditions if you never thought about what your application should do under those conditions.

Perhaps that's the same thing as what you're saying, though: we don't specify these things in detail because it's expensive to spend that much time thinking through it all, when users are largely trained to just accept crashes, glitches, inconsistencies, and the occasional sprinkle of data loss.

codebje··on Bonsai 27B: A 27B-Class model that runs on a phone
If it can give me the recipe without 14 pages of backstory about how Nonna used to make it, it'd be satisfying a real need.
codebje··on What can you confidently guarantee about your software?
Formal verification should definitely be about the software you're verifying exhibiting the properties you desire under the conditions you specify.

Formal verification at the undergraduate level, if you even see it, would be about running software on a spherical cow, though.

codebje··on What can you confidently guarantee about your software?
You shouldn't have been able to formally verify the algorithm fails to protect the critical section. Wrapping ticket numbers can lead to starvation (literally, if we follow the baker analogy), but the algorithm protects the critical section so long as thread IDs are unique.

The sort of environments in which this is a problem would be extremely uncommon. For a start, you need continuous contention. If you ever get a break in contention you no longer have starvation, and you 'reset' the ticket number monotonicity - to zero, if you actually take a maximum of entering thread ticket numbers instead of a cheap global counter.

If you do actually have an environment in which you expect to have continuous contention over a critical section, some quick napkin math can tell you if it's something to worry about based on the running time of your critical section. If it's over, say, 10ms, you've got a few years of runtime before it's a problem. If it's under 1ms, maybe you want to use 64-bit arithmetic for your ticket number so you can run your system until long after the human species is extinct.

You probably got a 'B' because you didn't give the professor the answer they expected, though, not because of any technical reasons.

Page 1 of 19Next →