HNHacker News
TopNewBestAskShowJobs

carry_bit

570 karma · joined June 25, 2012

submissionscomments
carry_bit··on Microfeatures I'd like to see in more languages
It's usually used with the formatting functions, so you have something like:

<Some big expression here> // Column

Useful where the function in question is an "afterthought".

carry_bit··on NYC officials say they can't find EV garbage trucks powerful enough to plow snow
Not fossil fuels, but rather hydrocarbon fuels. You can technically synthesize fuel for those use cases in a carbon-neutral manner.
carry_bit··on French startup unveils new residential thermo-acoustic heat pump
It's only 2.8 at -8C though. The best heat pump on https://ashp.neep.org/ [1] has a COP at Max Capacity @5F (-15C) of 3.7

[1] https://ashp.neep.org/#!/product/56885/7/25000///0

carry_bit··on Class switch towards non-inflammatory IgG4 antibodies after vaccination
To the degree it's news, it's not "good" news, but further research is needed to see just how "bad" it is.

The concern here is if the worse-case scenario turns out to be true: that the mRNA-based vaccines, and especially the boosters, end up training the immune system to tolerate the infection rather than clear it. That would mean a significant fraction of the population are at risk of outcomes ranging from persistent COVID to death, and becoming breeding grounds for more variants in the process.

Hopefully further research rules out that scenario.

carry_bit··on A bug fix in the 8086 microprocessor, revealed in the die's silicon
I have a textbook on processor design from 1979, and microcode was the go-to technique described in it.
carry_bit··on Adversarial Policies Beat Professional-Level Go AIs
Thanks for the update!
carry_bit··on Adversarial Policies Beat Professional-Level Go AIs
From a tweet of one of the authors [1]: "KataGo was trained on Tromp-Taylor rules so we evaluate our attack using this too."

This is incorrect. According to the KataGo paper [2], KataGo is trained using modified Tromp-Taylor rules (as pointed out by [3]):

"Self play games used Tromp-Taylor rules modified to not require capturing stones within pass-aliveterritory [...] In Go, a version of Benson's algorithm [1] can prove areas safe even given unboundedly many consecutive opponent moves ("pass-alive"), enabling this minor optimization."

It would be more interesting if they beat KataGo using the rules it was trained on. You could write a bot to beat KataGo in chess, but KataGo wasn't trained on chess...

[1] https://twitter.com/ARGleave/status/1587875104578359296 [2] https://arxiv.org/pdf/1902.10565.pdf [3] https://www.reddit.com/r/baduk/comments/yl2mpr/ai_can_beat_s...

carry_bit··on It’s time to repeal the Jones Act
According to this article, New England is risking winter blackouts due to strong LNG demand in Europe and the Jones Act making delivery of domestic supplies nearly impossible: https://www.wsj.com/articles/new-england-risks-winter-blacko...
carry_bit··on Never trust a system that seems to be working
Full thread unroll: https://threadreaderapp.com/thread/1581643197427523584.html
carry_bit··on The Google plasma globe affair of 2012
I wonder if it flopped for anyone because they had a different keyboard layout (like Dvorak) set.
carry_bit··on How the SQLite virtual machine works
If you use EXPLAIN QUERY PLAN rather than just EXPLAIN, you get a high level description of the plan rather than the bytecode.
carry_bit··on Reference count, don't garbage collect
You can optimize reference counting: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.23...

With allocating as dead, you're basically turning it into a tracing collector for the young generation.

carry_bit··on Coding Mistake Made Intel GPUs 100X Slower in Ray Tracing
It was announced that the pricing would be based on the performance of tier-3 titles (the ones not receiving special attention), so it could be a good deal before the drivers improve.
carry_bit··on Launching Version 13.1 of Wolfram Language and Mathematica
Scoping: Symbols belong to "contexts" (namespaces). You get lexical scope using With and Module, and dynamic scope with Block. The variables in Module are replaced with a uniquely named temporary symbol (removed when all references go away), so they can be returned from the Module expression and acted upon (though they'll appear ugly).

Data structures: you have special syntax for lists and "associations" (dictionaries/maps/hashtables). Those are immutable objects, but in at least some cases the implementation has an optimization where it'll directly mutate the object if there is only one reference to it. There are other data structures with no special syntax in the language, for example numeric and sparse arrays. A number of mutable data structures have also been recently introduced: https://reference.wolfram.com/language/guide/DataStructures....

One thing that you might expect to be a special data structure but actually isn't are "pure functions" (anonymous functions). There are actually just the unevaluated expression, so you could programmatically inspect the body if you so wanted to.

Deferred values: You can apply the HoldFirst/HoldRest/HoldAll/HoldAllComplete attributes so during evaluation they receive the corresponding arguments unevaluated. You might think this would make metaprogramming be easy, but it's actually tricky because of the "infinite evaluation" (it keeps evaluating until a fixed point is reached) of the language.

Derivatives: It's a term rewriting language, so you just provide the rewrite rules like you would with any other user function. f /: D[f[x_]] := x^2 will define the derivative of f(x) to be x^2, and associates that definition with f so that rule won't have to be checked for all usages of D (this also saves you from having to unprotect D to add the rule).

carry_bit··on Nuclear is back on the table for a green future
And capital isn't free. With physical goods, there is already a number of existing roads, train tracks, and ports.

Capital costs is why Hawaii has traditionally imported oil versus having an undersea power connection to the continental US.

carry_bit··on Nuclear is back on the table for a green future
As we're seeing from Russia and Europe, depending on someone else means you can find yourself being threatened or actually being cut off.
carry_bit··on Nuclear is back on the table for a green future
It's not though; that's one of the reasons all of the grids aren't interconnected yet.

"Don't underestimate the bandwidth of a station wagon filled with tapes" also applies here. The amount of energy you can deliver by transporting fuel rods by truck/train/ship is immense.

carry_bit··on Rust: A Critical Retrospective
You could have bigger arrays, what was missing were the trait implementations. Originally the traits were implemented using a macro, and the macro only generated implementations for up to length 32.
carry_bit··on I'm all-in on server-side SQLite
It's exciting to see Datomic's architecture realized using more conventional technology.
carry_bit··on I'm all-in on server-side SQLite
That's another trait it would share with SQLite + litestream, until SQLite's BEGIN CONCURRENT is released.
carry_bit··on Goldilocks Zone Finder – Find your ideal climate
-10F isn't that cold. Maybe extend the bottom of the range (or provide a number input) for those of us who like the cold?
carry_bit··on DuckDuckGo “down-rank sites associated with Russian disinformation”
With search taken as a whole, the search results a person gets varies depending on a personal factor (namely, their go-to search engine) and not just the query. That's similar to a filter bubble, even if it isn't precisely one.
carry_bit··on Spotify deletes 70 Joe Rogan episodes
His blog posts are reposted on multiple other platforms. If you can already see all of those posts on your favorite platform, what incentive do you have to visit the actual website?
carry_bit··on Europe Is Losing Nuclear Power Just When It Needs Energy
Meanwhile nuclear plants come with months worth of energy storage, as fuel is storage.

For long term (like seasonal) variations in wind/solar output, you're probably not going to be building enough batteries to bridge that gap, so to stick with just wind/solar you would need to either overbuild (perhaps massively) your generation capacity, or build a global grid.

A global grid introduces geopolitical risks (your neighbor becomes not-so friendly and cuts the link when you don't have sufficient generation), whereas massive overbuilding would be expensive. Having some nuclear plants may be cheaper route.

carry_bit··on Royal Society cautions against censorship of scientific misinformation online
Overall life expectancy was low due to massive childhood mortality. If you survived to adulthood your life expectancy was much higher.
carry_bit··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
In Wolfram Language, a "pure function" is what others would call an "anonymous function" or a "lambda". It doesn't actually imply the lack of side-effects.

The older Compile function also does the same thing when there's an error.

Given the difficulties of doing something fancier, I think it's a reasonable strategy. Mutating state that doesn't originate in a function isn't too common, and less so with the kinds of functions you'd compile. If the compiled function fails, you probably have some other bug in your code anyways.

carry_bit··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
The effects are how I tested this out; I used FunctionCompile on a function that uses first uses KernelFunction to call a user-defined function that increments a counter, and then calls Sqrt on the function's argument.

When you give it a non-negative argument, the counter increases by one; when you give it a negative argument you get the message of it reverting to the uncompiled evaluation and the counter increases by two.

carry_bit··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
By GC info in my post I mean tracking which registers and stack slots at each safepoint contain object references so the tracing GC can precisely identify all of the GC roots.

Since Wolfram Language uses referencing counting instead, it doesn't need all of that complexity; it just has to insert MemoryAcquire/MemoryRelease at the appropriate spots in the IR.

carry_bit··on The Design and Implementation of the Wolfram Language Compiler (2020) [pdf]
I wouldn't really classify "soft failure mode" as OSR; from my experimentation it reinvokes the entire function when there's a failure rather than migrating over the execution state.

In terms of tests, I get the impression that this compiler doesn't (yet) have to deal with much of the complexity a modern JavaScript one has to (OSR, GC info, inline caches, probably even most ISA-level details), so there are whole classes of tests that just don't need to exist.

carry_bit··on Solving Wordle in 3.64 guesses on average, 99.4% of the time
I also implemented essentially this algorithm. For guesses I always consider the full list of possible words, not just the list of possible answers. Doing so requires a check so words that have been excluded are only used if they're better than words that haven't been.
← PreviousPage 2 of 8Next →