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

I agree, but in my experience arena allocation in Rust leaves something to be desired. I wrote something about this here: https://blog.reverberate.org/2021/12/19/arenas-and-rust.html

I was previously excited about this project which proposed to support arena allocation in the language in a more fundamental way: https://www.sophiajt.com/search-for-easier-safe-systems-prog...

That effort was focused primarily on learnability and teachability, but it seems like more fundamental arena support could help even for experienced devs if it made patterns like linked lists fundamentally easier to work with.


Thanks for those links. Have you tried using arenas that give out handles (sometimes indexes) instead of mutable references? It's less convenient and you're not leveraging borrow checking but I would imagine it supports Send well.


Do any of these tests measure the new experimental tail call interpreter (https://docs.python.org/3.14/using/configure.html#cmdoption-...)?

I couldn't find any note of it, so I would assume not.

It would be interesting to see how the tail call interpreter compares to the other variants.


The build of Python that I used has tail calls enabled (option --with-tail-call-interp). So that was in place for the results I published. I'm not sure if this optimization applies to recursive tail calls, but if it does, my Fibonacci test should have taken advantage of the optimization.


The tail calls in question are C tail calls inside the inner interpreter loop. They have nothing to do with Python function calls.


That tells you how much I know about the feature. :) But in any case, I'm positive that the flag was enabled, so my results are with tail calls. I suppose part of the difference between 3.13 and 3.14 could be thanks to this.


Good to know! Thanks for confirming. Yes, I would guess that the tail call interpreter explains part of the difference between 3.13 and 3.14. Previously the overall improvement to the interpreter has been measured at 1-5%, or even 10-15% depending on the compiler version you are using: https://blog.nelhage.com/post/cpython-tail-call/

If your benchmark setup is easy to re-run, it would be awesome to see numbers that compare the tail call interpreter to the build where it is disabled, to isolate how much improvement is due to that.


It wouldn’t have, since

    fib(n-1) + fib(n-2)
isn’t a tail call—there’s work left after the recursive calls, so the tail call interpreter can’t optimize it.


The article says exactly this in bold at the bottom:

> If you can break up a task into many parts, each of which is highly local, then memory access in each part will be O(1). GPUs are already often very good at getting precisely these kinds of efficiencies. But if the task requires a lot of memory interdependencies, then you will get lots of O(N^⅓) terms. An open problem is coming up with mathematical models of computation that are simple but do a good job of capturing these nuances.


LuaJIT bucks the trend of slow-warmup JITs. It is extremely quick to compile and load, and its interpreter is very fast -- faster than the JIT-compiled code from LuaJIT v1 IIRC, and certainly faster than the interpreter of Lua.

It wasn't until LuaJIT that I realized that JIT didn't inherently have to be these slow lumbering beasts that take hundreds of milliseconds just to wake from their slumber.


Yet I've witnessed Lua 5.1 launching faster than luajit for some of my use cases.

My point still stands though. Don't just use LuaJIT thinking it will magically make things faster in all cases. If you are embedding, LuaJIT is a no-brainer. If you are using a stand-alone interpreter, measure if you care about reality.


> If you are embedding, LuaJIT is a no-brainer. If you are using a stand-alone interpreter, measure if you care about reality.

This seems backwards. Lua is easier to embed and luajit is just as easy to install standalone and has zero downsides.


> zero downsides

I just said that I have measured it being slower in at least some use cases.

JIT gains better when already compiled paths run repeatedly. Most long running programs embedding Lua will choose luajit for this reason.

I don't care what people use, the point is that JIT compilation isn't magic that makes everything faster. The way to know is measure.


This was an interesting article, but it made me even more interested in the author's larger take on R as a language:

> In the years since, my discomfort has given away to fascination. I’ve come to respect R’s bold choices, its clarity of focus, and the R community’s continued confidence to ‘do their own thing’.

I would love to see a follow-up article about the key insights that the author took away from diving more deeply into R.


These features look compelling. When will they all be available in mainstream browsers?


I advocated for PrefixVarint (which seems equivalent to vint64 ) for WebAssembly, but it was decided against, in favor of LEB128: https://github.com/WebAssembly/design/issues/601

The recent CREL format for ELF also uses the more established LEB128: https://news.ycombinator.com/item?id=41222021

At this point I don't feel like I have a clear opinion about whether PrefixVarint is worth it, compared with LEB128.


Just remember that XML was more established than JSON for a long time.


Varint encoding is something I've peeked at in various contexts. My personal bias is towards the prefix-style, as it feels faster to decode and the segregation of the meta-data from the payload data is nice.

But, the thing that tends to tip the scales is the fact that in almost all real world cases, small numbers dominate - as the github thread you linked relates in a comment.

The LEB128 fast-path is a single conditional with no data-dependencies:

  if ! (x & 0x80) { x }
Modern CPUs will characterize that branch really well and you'll pay almost zero cost for the fastpath which also happens to be the dominant path.

It's hard to beat.


SQLite format equivalent:

  if x <= 240 { x }
while strictly improving all other aspects (at least IMHO)

https://sqlite.org/src4/doc/trunk/www/varint.wiki


For me, that was a moment when I realized that the received wisdom about military things can be just completely wrong.

I had considered myself to be reasonably informed about the F-35, and how "everyone knows" it's a boondoggle. I think this started with a long-form article I read in 2013, "How the U.S. and Its Allies Got Stuck with the World’s Worst New Warplane": https://medium.com/war-is-boring/fd-how-the-u-s-and-its-alli...

Here is the HN discussion at the time, full of confident assertions that the F-35 is useless: https://news.ycombinator.com/item?id=6211029

Fast forward to this year, when Israel's F-35s operated over Iran with total impunity. Not a single plane lost AFAIK.


Quick googling shows that the Internet is succumbing to the propaganda machines. MSN mindlessly reproduces Iranian article about 2 shot down F-35s but I was unable to find any credible source to confirm that.


One of the crashed ones was larger than Antonov An-225 Mriya and was surrounded by people larger than 2 storey house.

The other had wings backwards, didn't look like f35 and had engine still running after crashing into pieces.


Searching in Persian?

The expectation that there would be 'fair and honest' reporting about aircraft losses on the part of an aggressor is not reasonable. Why on Earth would Western powers allow themselves to be so easily embarrassed?


Iran isn’t really a near peer adversary, however. But I guess that is the F35’s target market?

Do you expect it would do as well over Ukraine? Or if there was a spat with China over Taiwan (for example)?

It is possible for both things to be true.


Iran runs russian S300 and S400 air defence systems - the best non Nato countries have.


They had some pretty advanced anti aircraft systems. Also they are invisible to radar so they were truly surprised attacks coming out of the blue. So yes, it would be.


They said the same thing about the F-117 in 1999. It was shot down by a Soviet era AA. It was said once, "Don't be too proud of this technological terror you've constructed". The same applies here. Comparing bombing Iran to a conflict with China is delusional, put plainly the capabilities of the aircraft have never actually been tested against a competent peer - when it actually matters.


That F-117 was because it was flying every day for months on the same route at the same time and they lucked out with radar catching the plane during the couple seconds it's bomb doors were open.


Yes, and they did that because of the same arrogance alluded to in my quote.


If the worst we have to worry about is China getting similarly lucky a few times, we'll win handily.


You're missing the point entirely. The adversary in 1999 was not remotely near peer. So say arrogance there costs you only one plane, which nonetheless becomes infamous as a cautionary tale about superpower hubris. The same against China will be far more fatal. Also, fwiw conflict with China is routinely simulated by American war planners, and to put it plainly there is no longer any plausible scenario where America "wins handily" in the Taiwan strait. Your suggestion that this is even possible is therefore vaguely amusing. Maybe also look to the past decades of American war fighting. When was the last time we felt like we outright "won" a war? When against a peer or near peer? Mission accomplished?


The west has been in a very negative mood for a few years now. I'd generally discount the "We're losing the x race to y" kind of talk.

The f22 is more elegant though


>received wisdom about military things can be just completely wrong.

Consider that what you thought was "received wisdom" was literally Russian propaganda. However, the actual reality was always there, always being patiently insisted by people who knew what they were talking about, who were in fact still discussing actual boondoggles with the program, like the portion of the program that built the tailhook and was terribly run and ineffective at points.

People like Pierre Sprey have been shouting the same lies for decades, and credulous people with zero domain knowledge have been repeating his horse shit forever. He was the same guy who insisted that we should be building really stripped down planes without radar, without missiles, without anything.

He was very much the originator of a lot of anti-F35 FUD, on Russia Today no less. Western media was literally quoting the Russian propaganda firm to tell people how the F35 sucked. He helped push the utter BS that is "Oh, Russia's long wave radar makes stealth not work" which if you don't understand how that's irrelevant and untrue, don't ever have an opinion on modern warplanes.

There's a famous article talking about how terrible the F35 was by interviewing an F16 pilot who had faced it in dogfight training. The article talked at length about how the pilot of the F16 was able to out dogfight the F35. Now, it's sufficient to mention that gun range dogfights are not a thing in modern air combat, or at the very least are not designed for, because as long as your enemy has a single radar or IR missile left, you've already lost. However, beyond that, the F35 wasn't terrible, it's just very unlikely to match the literal king of dogfights. More importantly, the article mentioned something that I'm sure they didn't even realize the importance of.

Even at knife fighting range, the F16 radar assisted gunsight was unable to lock on to the F35. Go look at early jet aircraft gunnery statistics for an idea of how laughably bad dogfighting an F35 would be.

Oh, and that entire test was done with an F35 that wasn't allowed or capable of flying it's full envelope. It was an F35 with a hand tied behind it's back.


Do you have any reason to attribute this to the fact they were F-35s? For comparison, how many jets were lost during "shock and awe"? Israel operates with impunity in Iran all the time, often on the ground. I'm not sure the fact they used F-35s is actually relevant here but if you have a source on that it would be interesting to read. Given the state of Iran it is hard to imagine the same could not be achieved with a last generation aircraft... it would not be surprising if by the time a peer power conflict starts manned aircraft like the F-35 will already be obsolete...


If you look at the Ukraine war the planes are operating from a distance to the frontlines on both sides. The ones close the the front fly in low and then climb and drop their guided distance munitions.


Read F-35: The Inside Story of the Lightning II. The book sets the record straight on a lot of these issues.


Sounds like an interesting book, though far too many pages for a subject I have only a passing interest in. I would note given the authors affiliations I'm not sure I would ever consider it something that could "set the record straight". If there's a controversy about the program the authors backgrounds don't exactly suggest one will be getting a balanced view. Perhaps I'm wrong, but I appreciate the suggestion anyway.


It’s not at all unbiased, in a journalistic sense, and doesn’t present itself as such (for others: it is written by the now retired program manager of the F-35 development program). But the relevant facts about the performance and cost effectiveness of the plane are a matter of public record, and the book is interesting for providing the inside view on the politics which resulted in the unfair propaganda campaign against it.

You are free to draw your own conclusions of course. I worked for Lockheed previously in my career, and some in my family still do. Though I hold no stock or other ties now (different career, different industry), my experience does lead me to take the authors at face value. There are many issues with Lockheed leadership, but professional integrity is not one of them.


Landed on target in the Indian Ocean! Engines relit successfully and it touched down vertically (and then promptly exploded, which I guess was the plan :)


I thought it exploded after it landed?


Well, yes, it landed in the ocean by design and toppled over because that's what happens when you land a 50m tall spaceship vertically in water.


This sequence of events (even though expected!) reminds me a lot of the Monty Python and the Holy Grail speech:

> Listen, lad. I built this kingdom up from nothing. When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands.

(although I suppose this ship fell over, then burned down, and then sank into the ocean)


It’s basically a direct description of the reusable booster tests.


That was expected. It’s not meant to land on water.


It is, for the purpose of this test. Don't want it coming back down on land somewhere unexpected :)


That's the expected result for this test flight.


There wa supposed to be an earth shattering kaboom. And there was.


> I thought it exploded after it landed?

It landed on the sea, there was no barge afaik.


I completely agree that one-per-part singing really brings out the beauty in 16th century choral music. I sing in a choir that specializes in music of this period, and while our live performances usually use two singers per part to fill a room, our recordings are more often one-per-part with relatively close micing.

We do record in churches because we like the reverb, so it's not quite the dry studio sound you're describing, but we do prioritize a clear sound stage where all of the parts can be clearly heard.

We've found that a Blumlein mic configuration (two figure-8 pattern microphones placed at a 90 degree angle from each other) helps to create this clarity of texture, where all the parts can be heard individually across the stereo image, especially when listening with headphones. I can't take credit for this idea though: we learned it from the sound engineer who records the Tallis Scholars, who told us that they record in this configuration.

Here are a couple examples of tracks recorded using this style:

https://www.youtube.com/watch?v=IZgo2Z17nNQ

https://www.youtube.com/watch?v=6r0iyq7AvaU


That Byrd is very nice! The individual voices came across very well on my IEMs.

I'm used to reverb as well, and the complete lack of reverb in these recordings still sound a little weird to me, as if they are singing in a closet. But even in the 15th and 16th century vocal polyphony was likely performed (often?) in places other than the resonant nave or choir of a large church. I read that aristocratic (or ecclesial) patrons would have singers perform in private chambers, and performance of votive masses at a private chapel to the side of main space in the church would have very different (and quite dry) acoustics.


Please, please, please do this! https://news.ycombinator.com/item?id=45011044

I do realise that's a monumental undertaking, though :-D


Ha, I don't know much about Dolby Atmos and spacial placement. But from prior experience I'm somewhat skeptical about what this kind of clever DSP can do for choral music.

For example, when I learned about convolution reverb, and how it should theoretically be able to simulate the unique reverb pattern of any room, I was initially excited about the possibilities. But after trying it I was underwhelmed.

That said, I'm open to being convinced. If you know of any compelling demos of this kind of spatial placement, I'd be interested to see.

I had not heard of Nonsuch Palace, despite having a passing interest in Henry VIII and certainly a large interest in Tallis! Is it thought that Spem was performed there?


Atmos on earphones is done by manipulating the waveform that reaches the eardrum to reproduce the distinctive impulse response due to the sound bouncing off different parts of the ear as it arrives. (Come to think of it I guess that's really also a form of convolutional reverb.) I think it's cool that it can be done on earphones at all, and with head tracking the effect can be noticeable at least, but I don't think it really adds much. I find earphone listening sort of envelopingly directionless in a special way of its own that I enjoy anyway.

On a multi-speaker separates system, though, I think it's done simply by attenuating the signal to each speaker. Whether it's just that or something more sophisticated, the effect is much stronger and adds a lot more to the experience. A good system can place sounds clearly anywhere within a full dome enclosing the listener. The problem is that very few people have such a system, so the audience isn't huge. (That said, Apple Music heavily promotes spatial audio, so an Atmos Spem in Alium might reach more people just from search placement...)

What Atmos adds beyond surround sound (which itself offers untapped opportunities for Spem in Alium) is:

* It carries independent position data for up to 100 tracks, which can be edited (so you could experiment with the placement).

* It adapts to the set of speakers available at playback, rather than having a fixed track per speaker.

* It works on earphones, to some extent at least.

* It has vertical as well as planar positioning, so the "balconies" would work.

If you want to hear the results, a listening room would be the place. If you're in London, maybe here: https://tileyard.co.uk/stories/tileyard-london-dolby-atmos-s...

I don't know of any renaissance choral music available in Atmos. Most of Deutsche Gramaphon's new recordings use it, so there might be some good classical examples there. A listening room should have general demos that would show the effect off.

I think the Nonsuch Palace thing is just a suggestion rather than anything strongly historical. Wikipedia mentions it [1]:

> This account is consistent with the catalogue entry at Nonsuch Palace: Arundel House was the London home of Henry FitzAlan, 19th Earl of Arundel; Nonsuch Palace was his country residence. Nonsuch had an octagonal banqueting hall, which in turn had four first-floor balconies above the ground floor; on this supposition it could have been the case that Tallis designed the music to be sung not only in the round, but with four of the eight five-part choirs singing from the balconies.

[1] https://en.m.wikipedia.org/wiki/Spem_in_alium


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

Search: