skysight-inc/HackerNews huggingface dataset:
OCaml has been pretty common tool to write parsers for many years. Not a bad choice.

I've written parsers professionally with Rust for two companies now. I have to say the issues you had with the borrow checker are just in the beginning. After working with Rust a bit you realize it works miracles for parsers. Especially if you need to do runtime parsing in a network service serving large traffic. There are some good strategies we've found out to keep the borrow checker happy and at the same time writing the fastest possible code to serve our customers.

I highly recommend taking a look how flat vectors for the AST and using typed vector indices work. E.g. you have vector for types as `Vec<Type>` and fields in types as `Vec<(TypeId, Field)>`. Keep these sorted, so you can implement lookups with a binary search, which works quite well with CPU caches and is definitely faster than a hashmap lookup.

The other cool thing with writing parsers with Rust is how there are great high level libraries for things like lexing:

https://crates.io/crates/logos

The cool thing with Logos is it keeps the source data as a string under the surface, and just refers to a specific locations in it. Now use these tokens as a basis for your AST tree, which is all flat data structures and IDs. Simplify the usage with a type:

#[Clone, Copy]
struct Walker<'a, Id> {
pub id: Id,
pub ast: &'a Ast,
}

impl<'a, Id> Walker<'a, Id> {
pub fn walk<T>(self, other_id: T) -> Walker<'a, T> {
Walker { id: other_id, ast: self.ast }
}
}

Now you can specialize these with type aliases:

type TypeWalker<'a> = Walker<'a, TypeId>;

And implement methods:

impl<'a> TypeWalker<'a> {
fn as_ref(&self) -> &'a Type {
&self.ast[self.id]
}

fn name(&self) -> &'a str {
&self.as_ref().name
}
}

From here you can introduce string interning if needed, it's easy to extend. What I like about this design is how all the IDs and Walkers are Copy, so you can pass them around as you like. There's also no reference counting needed anywhere, so you don't need to play the dance with Arc/Weak.

I understand Rust feels hard especially in the beginning. You need to program more like you write C++, but with Rust you are enforced to play safe. I would say an amazing strategy is to first write a prototype with Ocaml, it's really good for that. Then, if you need to be faster, do a rewrite in Rust.
What do you mean 2028? People haven't voted for a president but for a king, there won't be any election.
> Worse, the symptoms gets worse after you stop using it,

Very tangentially, "iatrogenic" is a nice niche vocabulary word: Something unintentionally caused by a medical activity, usually undesirable.
Love the name, "Wild Ball"
I had a student once from Sofia (capital and largest city of Bulgaria), she told me her mother mailed her all sort of antibiotics because they were not available here (western Europe) and "what if she'd catch a cold or the flu?" (Both are viruses so antibiotics don't even do anything other than kill the useful bacteria in your body!)
changed the title, thanks
>I think you missed the word “before” in their comment.

Nope. Didn't miss that at all. What is it that the kids call it these days? "Adulting?" It really ain't that hard.

Then again, perhaps I'm some sort of superman, or maybe paying my bills on time is my super power.

Somehow I've managed to pay all my bills, keep up my house and renew multiple domains for decades. And it wasn't even hard to do. I have a whole bunch of payments I need to make that aren't simply monthly payments of equal size -- and yet I manage to do so without issue.

Do you think that's unusual or uncanny and folks shouldn't be expected to manage their financial affairs competently? Is that your point?

Then again, millions of others seem to do that just fine too. As I said previously: If it's important to you, you tend to make sure it gets done.

If you (or anyone else) is unwilling or unable to do so, then you should hire an accountant to take care of it for you. Or not.

Regardless, I take care of myself without issue. If you and/or others cannot or will not, that's a you problem.
My company merged with another company. Both had a monolith. Together we now have 2.
For a more fair comparison you should discount highway miles from the car stats. That's the safest form of driving there is, and accounts for a very large fraction of miles, but doesn't represent the kind of journey you would be cycling, anyway. Comparing just car journeys you could make with a bike would be a better comparison.
In this book, you will learn how to create your own AI applications using simple, real-world examples.

This book does not focus on one provider, language, or framework. This way, you can use what you learn in different situations. We will use free models to learn how to build real-world AI applications. By the end of the book, you will understand how to work with large language models, no matter which model, provider, or programming language you use.

25% off - Coupon Code: HACKERNEWS
How we knew space is a vacuum (2021)
I remember being really excited about QNX for a few months after BeOS closed up. It had a cool desktop environment and was mostly posix so it was more or less familiar coming from Be or Linux.
Thrill of the fight is such a great game for excercise. You want to knock down your opponent so you can get really into it.
When a vehicle would have to cross other paths (bike lanes etc), the priority is: pedestrian > cyclist > car. A bike lane crossing the road always has priority over cars unless signs say otherwise. At least that's how it works in Europe.

> who do you think those long stretches of roads are designed for if not cars?

The roads are usually intended for cars, yes. But they often aren't designed for safe, efficient travel with cars. Or anyone else, really. It's possible to design roads to be safe for everyone, but they often are the opposite. Just like planners still think that adding more lanes makes travel by car faster, when in reality it's long been known that it actually has the opposite effect.
Would love to buy one of these to run as a server, but I really don’t need it. :)

Besides that, my 16in MacBook Pro with M2 Max and 32gb RAM still does everything I need. I’m still so impressed with the raw performance and long battery life that Apple Silicon has brought to the laptop space.
Well back in my day we had to walk to school in the snow uphill, downhill, work on the farm, raise a family, survive in a capitalist dystopia and stay sane

You youngins' just don't get it
That is factually incorrect.

It is 1. A deterrent and 2. Accidents are just a result of poor training and 3. The amount of defensive gun use is exceptional, it does not get reported on purpose due to state propaganda in Canada, America, and so on.

Also all concealed carry holders regularly train, much of it is for fun, and their skills rival or surpass law enforcement.
I love The Rise of Worse is better, and this sounds just like that:

https://www.dreamsongs.com/RiseOfWorseIsBetter.html

It doesn't explain _why_ simple implementation is more important than having a simple interface, but it just makes an observation that simple implementation usually wins.

In my experiments simple implementation won for velocity, because quite often I need to change small parts in all the implementation no matter how modular / reusable code I'm trying to write.

As my velocity increases testing becomes more important as well (especially integration testing), as there are more features interacting in a small amount of code.
Show HN: I asked ~100 founders for their book recommendations
Equinix to sunset Metal (formerly Packet)
I think it was SMBC that pointed out how in medieval times, aristocrats would pay huge[0] sums to have oil paintings of marriageable sons and daughters made and sent[1] to suitors, and so if we were to judge progress merely by the decline in time and cost of sending images of people to multiple recipients around the world, we'd all be relative "trillionaires" now.

[0] as in, multiples of skilled labour annual salaries

[1] the period equivalent of bubble wrap was probably packing in loose straw, so there's a miniscule but non-zero chance some of these aristos were asking each other to "plz send streweds"?
A "worshiper" he is not, per what the sibling commenter said.

But he's definitely quite naive, and is inadvertently serving Putin's interests.
> this should probably do what you'd want

If you have to specify N, no, it doesn't
Much of this has, I think, to do with mutuality. If person A and person B need to work together both need to change their preferred way of working to accommodate each other. In larger groups there is a problem if one person gets to decide on too much and does not have to take other people seriously.
The amount of deuterium contained in a planet is a very small fraction of its hydrogen content.

The amount of hydrogen contained in a medium-sized planet like Earth is extremely small in comparison with the amount of hydrogen contained in a star.

The amount of energy that can be produced by fusion per deuteron is smaller than the amount of energy that is produced in stars per proton.

With all these factors multiplied, the amount of energy that could be obtained from all the deuterium contained in Earth is many orders of magnitude smaller than the energy produced by the Sun or by any other star.

Moreover, the energy obtained from fusion could never exceed a very small fraction of the energy received by Earth from the Sun as light, otherwise it would lead to a catastrophic warming of the Earth.

Nuclear fusion reactors are not really useful for solving Earth's energy problems. They could have a crucial importance only for the exploration of the Solar System and for providing energy for human bases established on Moon, Mars or other outer planets.

For Earth the only problems worth solving are how to make better batteries, including very large capacity stationary batteries, how to make other large capacity energy storage devices, e.g. thermal devices, and how to improve the energy efficiency of the methods used to synthesize hydrocarbons from carbon dioxide and water.

Making hydrocarbons at large scale from carbon dioxide would be the best way to sequester carbon dioxide, offering the choice between just storing the carbon in safe products (paraffin like) and using a part of the synthesized hydrocarbons for generating energy in a carbon-neutral way.
I hope it was as fun to build as it is to play with.
Nit: I keep fat fingering the controls. Every 2 out of 3 times I touch a control, it collapsed the controls section instead.

Also - I thought the lines beneath the color controls were titles (> etc) and not buttons. I couldn’t figure out how someone shared a link where it played notes from left to right
It's nothing to do with money, everything to do with violence, that the state expressly allows by prohibiting self defense.
Show HN: Drawing Board
status: early prototype testing with users. Building it with what features that I (& friends) need to build memes & artworks fast
It's not about back then, but about when you write comments
> calling out inexperience is unnecessary IMO

I don't know the author, so it's useful for me to see in the comments that some people think they are not so experienced.

Doesn't mean I won't respect the author at all, it's great that they write about what they do!
Homeopathic too - water allergy is a thing.
In principle, it should work with more than two people, but I haven't tested it thoroughly.

Btw, I have added an Android wait list [0]

[0] https://whatdinner.com/ (second button)
Reductio ad Hitlerum doesn't have anything to do with what those words mean, either.

Or have any bearing otherwise on what Harris said in that context.
Wow you reminded me of this game I played as a teenager: Marble Blast

Looks like somebody made a web version that is very similar to the version I played: https://marbleblast.vaniverse.io/

Thanks for the unexpected hit of nostalgia!
How to track file descriptors with Valgrind
That feature is on the roadmap for Pest 3: https://github.com/pest-parser/pest/issues/882
Thanks for your comment, you've given me a lot to chew on and I think I'll need to bookmark this page.

> I've written parsers professionally with Rust for two companies now

If you don't mind me asking, which companies? Or how do you get into this industry within an industry? I'd really love to work on some programming language implementations professionally (although maybe that's just because I've built them non-professionally until now),

> Especially if you need to do runtime parsing in a network service serving large traffic.

I almost expected something like this, it just makes sense with how the language is positioned. I'm not sure if you've been following cloudflare's pingora blogs but I've found them very interesting because of how they are able to really optimise parts of their networking without looking like a fast-inverse-sqrt.

> There's also no reference counting needed anywhere, so you don't need to play the dance with Arc/Weak.

I really like the sound of this, it wasn't necessarily confusing to work with Rc and Weak but more I had to put in a lot of extra thought up front (which is also valuable don't get me wrong).

> I would say an amazing strategy is to first write a prototype with Ocaml, it's really good for that.

Thanks! Maybe then the Rust code I have so far won't be thrown in the bin just yet.
That's fair, the concurrency features are very handy though optional of course.

The ecosystem and tooling are great, probably the best I've worked with. But the main reason I reach for Go is that it's got tiny mental overhead. There's a handful of language features so it becomes obvious what to use, so you can focus on the actual goal of the project.

There are some warts of course. Heavy IO code can be riddled with err checks (actually, why I find it a bit awkward for servers). Similarly the stdlib is quite verbose when doing file system manipulation, I may try https://github.com/chigopher/pathlib because Python's pathlib is by far my favourite interface.
just been banned in the UK. was the only thing that worked on my allergies.

edit: my bad, no it's codeine linctus that was banned, there was talk of making pseudoephedrine prescription only but that hasn't gone through.
It's a drawing web canvas sandbox in it's current form but evolving almost daily :)
i'm more interested in the mini pc's running AMD iGPU's like those found in the steam deck

to run triple AAA games at 40-60fps on a cold and quiet device is amazing and feels like a real progression. likewise with proton

something like beelink ser8 you can open it and add RAM and extra SSD for cheap too.

these mac mini are restricted by the OS. macOS is a boring system to me.

what can you do with this that you can't with the previous models. generate genmojis faster or render 4k videos faster, useful but boring
Agile and Scrum was great when it was introduced bottom-up and then accepted top-down.

"We're all adults here, we don't need these rules" was a wide spread sentiment, yet work was horribly inefficient. I remember projects where we would discover every 3 weeks, during a Jour Fixe, that the pieces we built did not fit together.

The Daily was fantastic because it was lightweight and short, but very frequent, so that communication flowed freely.
The Retro was the catch-all meeting to bring up stuff (People forgot just how big the obstacles were back then - I remember having to wait 12 weeks for a config change that allowed my app to connect to the database).
Recognising that one person who always tried to bring everyone together, calling them a Scrum Master and making room for them to do these tasks was a no-brainer.

The top-down recognition was useful - not only did projects go noticeably better, managers could also boast that they, too, are now doing this new Agile thing! And they didn't even need to do something!

That was all before Scrum of Scrums, SAFe, LeSS, you name it.

As you said, we've come full circle in many aspects. It's ironic.
I believe you're talking about straw mushrooms (volvariella sp.) vs death caps (amanita phalloides). They are very similar to the untrained eye (and both can vary in appearance a lot from one spot to the next). One of the tells for amanitas it that they have an egg-like "volva" that you can find in the dirt just underneath the mushroom's stem if you dig a little. But volvariella species have this too... spore prints are one way to differentiate if you're patient.

But yeah, second that you can handle toxic mushrooms with no problems unless you swallow them.
What happens after age 5 that zinc no longer helps?
https://timesofindia.indiatimes.com/world/us/us-presidential...

I have no idea whether the Times of India is an acceptable source or not, but here is a quote from them on what happened last time.

"Immigration attorney Kripa Upadhyay told TOI, “During the last Trump administration, there was significant disruption due to the introduction of ‘extreme vetting’ for visa interviews. Certain job categories, such as ‘Computer Occupations, All Other,’ may no longer be an option, as they may require applicants to demonstrate specific technical skills and knowledge.”"

So, likely more tightly vetted candidates who are paid more under Trump 47 but not necessarily fewer.
> Pay vendors to do it

Generally I agree with this for 90% of startups. If it's a solved problem, you should not be doing it. Don't reinvent wheels just pick wheels off the street and use them. Then an axel then a frame, etc etc until you've got something that moves because it's literally held together by zipties.

The key is that a number of people are willing to pay you for the moving ziptie vehicle because it solves their particular problem - whatever it is.

Most recently I tried Cursor app. it helps me be a faster coder and uses something i already know - i really like it (except that they shit all over the hotkey bindings).
Opened an issue to see if this could maybe be documented on the fair.io website: https://github.com/fairsource/fair.io/issues/58
Parent wrote (emphasis mine):

> the idea that they’re randomly networking and intentionally rebooting to thwart this specific law enforcement attack seems pretty unlikely.

So there is partial evidence for it at least.
The more magic AI makes, the less magical the world becomes.
> e.g. which of 1000 web frameworks should we use?

This is fuzzy, but that's because it's not a technical question! It's isomorphic to "what three blog posts on web frameworks did I last read?" (-:
i wondered how it worked in rust but the guest entrypoint>init>main is wrapped in unsafeblock as is a lot of other low level operations it does. interesting stuff
Sure but they did by the 80s and 90s. I had a cad/cam class in the 90s and the pen plotter we used, not sure which model but HP 7090 from the 80s is similar, had all the technology necessary to build a 3d printer. Hell you could build a 3d printer from essentially first principles using old broken tech and stuff from a hardware store. The first time I saw a 3d printer years ago, my first thoughts was why it took so long for them to happen because the technology was really basic.
Sorry, what is the rule I think they should dictate?
The steam deck has a fan which can be quite noticeable, same for these AMD mini pcs, cold and quiet is a stretch. I have one running as a proxmox server though, 64gb ram and expandable storage, the Mac mini can't compete with that.
Hhhm, no not really unless you are in the bottom 30% of earners in the US.

You can get US-like outcomes (or worse) on the NHS with the waiting list, or you can get good health care on time with private health insurance. However, you have to pay for the NHS (via National Insurance and higher income taxes) either way on top of private health insurance.

Quality of life and life expectancy/hospital outcomes like Cancer 5 years survival rate, stage of diagnosis are generally worse or equal in the UK to the healthcare the majority of Americans receive. The UK stats are on paper equal or only slightly better on a population basis, but strip out people in the UK with private healthcare or look at it regionally and you will see the sad truth that the NHS has pretty bad outcomes. As in our left wing politicians in power are calling it broken. It is very bad. Really really bad.

If you take out people on private healthcare, there is little difference in outcomes, and you'll be paying the same at the end of the day, just in the UK, without sufficient coverage, options to pay massive sums for the top treatments are often not available in the first place.
My son is into vintage computers and I'm pretty sure I could make a 3d printer from the old c64s, disk drives, and printers in my basement. The hot end would be the only issue and I'm pretty sure you could rig one up from a glue gun or soldering iron.
What is BS is a fixed, one size fits all methodology. As fast as you write it down and proclaim „this is out procces”, it starts to be BS.
> LLVM and clang specifically started eating its lunch

I don't know how you can eat GCC's lunch. I feel like in this analogy GCC eats from a communal trough and is very happy to share. A company that sells licenses can lose customers, the GNU project just wants the world to benefit. GCC is still ubiquitous and has plenty of developers and mindshare, what more could they want?
Tbh I have steam deck oled and I never once noticed the fan running on any game. So ymmv.
> The Go compiler is written in Go, for example!

Do you know how they avoid the GC in the Go implementation of the Go compiler? If I understand correctly they need to implement the Go garbage collector in their Go implementation of the Go compiler. But Go already has a garbage collector. So how do they avoid invoking Go's garbage collector so that they can implement the garbage collector of the Go language they are implementing?

Not sure if I'm making sense but I'd like to know more about this from those who understand this more than I do.
You're right that decisions regarding frameworks are often made for largely arational reasons, but I'm baffled by the claim that these are not technical decisions (unless you're just joking?). If they're not, does that mean that in your model it's the PM who decides which web framework and database the team uses?

In any case, even if my example were a bad example for some reason, there are definitely lots of technical decisions that are fuzzy. How could there not be?
>An offtopic question: how do you manage to write all the years consistently with 0 at the start (I know why, but how), when everyone around you uses a different standard.

Never underestimate what lengths someone will go through to appear to be unique.
I feel like it will play games very well my m1 MacBook Pro seems quite capable. So as a steam machine maybe it’s rather capable.
LoRA vs. Full Fine-Tuning: An Illusion of Equivalence
What kind of prices for private health care are we talking about? For me, single, in California, the price for good insurance without any subsidies would be around $800/month. And that doesn't include the deductible (~$3000) or copays.
Show HN: Artifacts now can by used on any LLM
Hey HN,

After many hours of coding and testing, I’m excited to share that I’ve successfully brought the Artifacts experience to any other models on the AI playground I built!

It is simple to use: just enable Artifacts option on the sidebar, and chat with any model about topics like "Build an H5 Tetris game.", the o1-mini model even outperforms Claude-3.5-Sonnet for this!

Demo: https://www.youtube.com/watch?v=5ygGutjfCYY
Try it yourself: https://consolex.ai
The “acceptable by the seller” wording only applies if the ID is not issued by “the State” or “the Federal Government”. Wouldn’t the latter option mean that a US passport, a green card, a Global Entry card, or a NEXUS card must be accepted as suitable ID by any seller in any state? All of those are issued by the feds.
Most certainly not. The modularity was not great, but BIG chunks of code could be copied. I did that myself.