HNHacker News
TopNewBestAskShowJobs

millstone

6,895 karma · joined November 23, 2012

submissionscomments
millstone··on A Superoptimizer for LLVM IR
The trophy case is here: https://www.cs.utah.edu/~regehr/souper/

Example program 6: https://www.cs.utah.edu/~regehr/souper/output_6.html

    int a, b;
    void fn1() { b = a * ~1 == 1; }
Here we multiply an int by -2. LLVM emitted the multiply and compare, but Souper proved that no int multiplied by -2 can equal 1, so this could be optimized to 0.

By its nature Souper becomes less effective over time as its findings are incorporated into LLVM, so most of the trophies are old!

millstone··on Parler CEO says he was fired by board
I think Parler's angle was to become the home for popular conservative commentators. Parler continually suggested Hannity, Levin, D'Souza, etc as accounts to follow, even if you blocked those accounts.
millstone··on A Superoptimizer for LLVM IR
Superoptimizers attempt to find shorter instruction sequences. This may or may not produce faster code - sometimes you can make code faster by inserting nops!

The idea of superoptimization is to find missed optimizations, which a human can review and then implement directly.

millstone··on Google’s approach to replacing the cookie is drawing antitrust scrutiny
The linked article has five trackers from Google-owned domains. You don't have to use Google products for Google to track and profile you.
millstone··on Chrome 89 Beta: advanced hardware interactions, web sharing on desktop
If Google removes support for Manifest v2 from Chromium, is Brave prepared to maintain it? Honest question.
millstone··on Spotify patent would suggest songs based on users' emotions
I think Spotify envisions a speaker which always plays exactly the right music at all times, reflecting the current mood and anticipating what's next, like a film score. That would indeed be incredible if it worked.
millstone··on Spotify patent would suggest songs based on users' emotions
Here is the referenced July paper [1].

Spotify has a very cool feature called Community [2] where users can talk about what they want Spotify to do. The most upvoted ideas are things like "change my username" or "filter explicit songs." My personal wishlist is a "don't play this song again" button [3] and native Homepod support [4].

The point is that users aren't asking for Spotify to interpret their emotional state, they just want comparatively basic features.

1: https://www.researchgate.net/publication/342854806_Just_the_...

2: https://community.spotify.com/t5/Ideas/ct-p/newideas

3: https://tinyurl.com/y52qtavt

4: https://tinyurl.com/y3hlw6ky

millstone··on Safe dead code removal in a pure functional language
In Elm pure functions may allocate memory. How does D handle this?
millstone··on Safe dead code removal in a pure functional language
The post says "there is no observable difference between calling a function and not using the result, and not calling it at all." But you just described an important difference!

In Haskell one must use the assertion's result to trip the assertion, which can be awkward. But Elm is strict; I wonder how assertions are treated in this sort of DCE.

millstone··on Safe dead code removal in a pure functional language
I think this was meant to have read as "provably always pure", not "probably always pure."
millstone··on Safe dead code removal in a pure functional language
Consider atomically incrementing a variable. You need to both perform the increment, and get the value.
millstone··on Safe dead code removal in a pure functional language
How do fatal errors (like asserts) work in Elm? Are assertions considered to have side effects?

What if the removed function call would have produced an important error?

millstone··on Frugal Web Browser: A Design Experiment
GP's critique is not that web browsers render SVG and PDF in addition to HTML. It's the outsized role of JavaScript specifically: our browsers execute arbitrary (possibly user-hostile) code while simultaneously trying to protect us from its effects.
millstone··on Sales of electric cars up by 43% in 2020
Wait really? I live in NorCal, I lost power twice last week. That was unusual, but PG&E's safety outages are a fact of life of living in California.

That said I also remember a hurricane (Harvey?) which shut down refineries, making gasoline scarce. So it's pick your poison.

millstone··on VSCode, Dev Containers and Docker
You have an increasingly rarefied perspective, and you should hang onto it.

Docker is a treadmill. Docker leads to Docker Compose leads to Kubernetes leads to whatever. It's a lot of noise and motion; you will increasingly encounter engineers who grew up on this stuff and assume it as a prerequisite, and are eager to climb the treadmill, thinking it's a ladder. You know about other options, and can decide when to stop.

millstone··on VSCode, Dev Containers and Docker
No thanks. Apps like Firefox should use the libraries - windows, menus, etc. - installed on my system. Please don't ship your own libraries for this stuff.

Containers are an even more insane approach, so maybe we are in violent agreement.

millstone··on VSCode, Dev Containers and Docker
"3 versions of a framework" is quite vague. Are those versions Linux/Windows/Mac? Because then Docker is not very useful.

Docker is not a general solution to this problem because it ties you intimately to Linux, whether directly, or through VMs, or compat layers.

millstone··on California’s container-ship traffic jam
I doubt it. The article observes that Americans are buying a lot of stuff, but it's just redirected purchasing. We're buying more tech, and less clothes and cars and travel. Overall the savings rate is still very high, so spending is down.

There's a risk of (temporary) inflation when the economy opens back up. There is major pent-up demand for travel, but nobody will build more airports, or buy more airplanes, because it's clearly temporary. So expect some crazy prices then.

millstone··on Have We Already Been Visited by Aliens?
The article freely mixes "alien civilization" with "alien life." But these are very different! It would be spectacular to find an alien civilization of intelligent robots, even though they would not be alive.

We are alive so we know life is possible. We don't know what other things are possible. But why should the universe need to repeat itself?

millstone··on CMake and the Future of C++ Package Management
Makefiles are actually great! Just not as a build system.

If you have a project where you need to do a thing, you can instead make a Makefile to do the thing:

    thing:
        some shell command
that's it, now you get to type `make thing`.

The power is the generality: it can wrap any command, from jq to curl to whatever. It's perfect for small, weird workflows which don't naturally fit into other build systems.

But don't use it for C++!

millstone··on CMake and the Future of C++ Package Management
CMake quietly lifts heavy things behind the curtains. Cargo uses Rust, which uses LLVM, which builds with CMake.
millstone··on CMake and the Future of C++ Package Management
CMake tackles the unsexy challenge of cataloging every compiler on every platform. If things seem easier in Go, it's in part because Go mostly stays in its sandbox. Where Go interoperates, it's worse than CMake.

For example, Go's build system for C (cgo) is configured by stitching together environment variables and magical comments:

    // #cgo CFLAGS: -DPNG_DEBUG=1
    // #cgo amd64 386 CFLAGS: -DX86=1
    // #cgo LDFLAGS: -lpng
    // #include <png.h>
    import "C"
As bad as CMake is, that is even worse. Imagine making that stuff portable!

CMake has major problems (package management and language, as you say) but I don't know of any other tool that solves the problem that CMake solves.

https://golang.org/cmd/cgo/

millstone··on Distributing Mac apps outside the App Store, a quick start guide
Completely agree, especially because a signing key is $100 a year. Feels like the church selling indulgences.

That said, it's not quite as bad as your link. The secret is to right click or control click on the app, and choose Open. The warning dialog will have an Open button to bypass the Security pref pane. (Though maybe that doesn't work for you since you're making a CLI tool?)

millstone··on Why Apple Chose Clang (2008)
LLVM does indeed use known suboptimal algorithms for increased speed. Its register allocator is an example: a "perfect" register allocator is NP complete, and LLVM uses a relatively simple greedy algorithm instead.
millstone··on Is the Schrödinger Equation True?
Please elaborate on why you find it to be clear, simple, obvious!
millstone··on Is the Schrödinger Equation True?
Neutrons are fermions, and are subject to the Pauli Exclusion Principle. Photons are bosons, and so are not.

Composite fermion systems may act as bosons and be "squeezed." Bose-Einstein condensates are an example of this.

millstone··on Is the Schrödinger Equation True?
A free neutron does not have quantized energy.
millstone··on Is the Schrödinger Equation True?
Physical theories often go beyond just predictions, and attempt to specify a correspondence between a formalism and physical reality.

Quarks are an example. Quarks were conceptualized as a mathematical simplification, and only later were recognized as real physical things - or at least as real as protons.

In QM we have physical quantities (an electron's mass) and unphysical quantities (an electron's phase). But there's open questions, like the wavefunction - can that be placed in correspondence with reality? We don't really know. This is the "ontic" vs "epistemic" debate.

millstone··on Facebook Says It Is Removing All Content Mentioning 'Stop the Steal'
Because Republicans really have moved to the center on economic issues. The ideological "movement" strain of conservatism no longer has much sway.

You no longer hear Republicans talk about Medicare or Social Security privatization, Obamacare repeal, Dodd-Frank repeal, etc because they've moderated on the free market idealism.

millstone··on How Tail Call Optimization Works
They don't. The whole point of TCO is to discard stack frames, which means local variables cannot be recovered. Optimize or debug, pick one.
← PreviousPage 4 of 34Next →