HNHacker News
TopNewBestAskShowJobs

jackcviers3

437 karma · joined February 29, 2012

submissionscomments
jackcviers3··on Algorithms we develop software by
The last comprehensive study I read indicates that they improve internal and external code quality by 76% and 88% respectively while reducing productivity some[1]. If you have papers that indicate your claim I'd be interested in reading them or in ones that refute the metastudy linked below.

1. https://doi.org/10.1016/j.infsof.2016.02.004

jackcviers3··on Pin
I take it Pin is a fixpoint-type that allows for recursive reference?
jackcviers3··on Software galaxies
No maven central?

I imagine it would be pretty large, too.

jackcviers3··on California Senate Passes SB 1047
This is awful.
jackcviers3··on My VM is lighter (and safer) than your container (2017)
This. It's why vagrant was popular before the container revolution.

The killer app of Docker isn't the container, it's the depth and uniformity of the UX surrounding the container system. When that is broken by something on the host (non x86 cpu was a major pain for a while before popular images were x-built) and emulation gets in the way and is not as easy, or just mildly different (windows behind corporate firewalls that assign ips used by the docker engine for example), the ease of use falls away for non-power users and it's all painful again.

Tech like Docker for windows and Rancher Desktop and lima has largely matured at this point, but somebody could make a new machine and then the process of gradual improvement starts all over again.

jackcviers3··on The Emacs Window Management Almanac
golden-ratio works for this as well.
jackcviers3··on What contributing to Open-source is, and what it isn't
Gatekeeping is part of running a project -- you have the right to refuse the contributions for any reason you'd like. They, likewise, have the right to fork your project and run a new one how they see fit. Do it too much though, and you'll drive the popularity of your project way down and nobody will use it.

Even with free (in both senses of the word) products, the market will always work itself out.

jackcviers3··on I love programming but I hate the programming industry
When consumer software still came on physical media, nearly everything advertised the amount of ram and minimum system and cpu requirements necessary to run the software.

That just isn't the case nowadays, so you don't know there will be trouble until it occurs at runtime.

I can limit the memory available to ALL the tools I use every day (I only do it for docker and jvm stuff), set priority levels, etc., but it feels very weird for a brand new laptop to hit swap after a few days of uptime.

jackcviers3··on I love programming but I hate the programming industry
Copying isn't free though. Every front-end application built on Electron or running in a container that duplicates half of the OS stack burns more memory on my computer, forcing earlier upgrades of either the entire machine or RAM with each year that passes.

It's free to produce, but the cost of running more copied software always increases.

jackcviers3··on Why fuzzing over formal verification?
Browsers have been grown, not designed. The competitive pressures exuded on browsers to render ill-specified things and hacks has resulted in something essentially where what it does is what it does. That's the case with a lot of software,because we made the choice as a community of programmers to not formally verify the things that we build. Thunk of the origin of the blink tag [1]. We decided to be hackers, and doers, not thinkers.

Just as testing changes the way you structure your software, designing via formal methods changes the code that you produce as well, and it will attract a different set of people than traditional software dev, just as architecture attracts a different set of people than carpentry.

1. https://danq.me/2020/11/11/blink-and-marquee/#:~:text=Invent....

jackcviers3··on macOS Sonoma 14.4 might break Java on your machine
The only thing I prefer the mac M3 PRO (work), hardware wise, to my MSI w/4060 and 64GB ram, is the battery life. Everything runs slower on my mac. There are some niceties (the color filter for my color-blindness, for example, and the keychain), but not a fan of

* lack of usb ports necessitating dongles * lack of hdmi/dvi outs * No camera lens cover * Uncomfortable chiclet keyboard * oversized touchpad * overheating * lack of power cores leads to slower parallel compilations

I do appreciate the ease of use of (especially) the network utilities of mac, but it's definitely not my preferred machine.

jackcviers3··on Don't upgrade to macOS Sonoma 14.4 yet: plug-in compatibility issues
It's not a bug. It's a feature.
jackcviers3··on I'm excited about Darklang
Seems a lot like https://www.unison-lang.org/ especially the versioned functions as the package manager.

Can anyone expand on the differences between the projects (beyond the license)?

jackcviers3··on Billionaire-Fueled Lobbying Group Behind the State Bills to Ban UBI Experiments
How does UBI avoid encouraging excessive inflation on basic goods? If there are more people to afford them, then surely demand will rise and supply will decrease, driving prices up until UBI must rise to compensate.
jackcviers3··on Testcontainers
Testcontainers can use docker-compose: https://java.testcontainers.org/modules/docker_compose/.

Really, you use testcontainers so that you can manage everything for your test with a single build command, instead of running something extra, then running your tests, then shutting down your docker containers. Plus, with it integrated into your test suites, you can run code against your docker containers on setup/teardown, before/after container start, before/after each test, etc.

jackcviers3··on Testcontainers
Testcontainers integrates with docker-compose [1]. Now you can run your tests through a single build-tool task without having to run something else and your build. You can even run separate compose files for just the parts your test touches.

1. https://java.testcontainers.org/modules/docker_compose/

jackcviers3··on Testcontainers
Yes [1].

1. https://www.atomicjar.com/2023/06/running-testcontainers-tes...

jackcviers3··on Testcontainers
Yes [1].

1. https://www.atomicjar.com/2023/06/running-testcontainers-tes...

jackcviers3··on Testcontainers
Many of the Mac networking specifics have become less of a problem. I use Rancher Desktop, which uses the correct virtualization framework based on OSX versions and allows you to customize the lima and virtual machine provisioning scripts so that you don't have cross-platform headaches like this (for the most part). Also runs kubernetes locally out of the box so you can test app deployments without waiting around for resources to free up on your shared dev cluster. Newest versions have almost everything Docker Desktop has. Highly recommend if you are on mac.
jackcviers3··on Testcontainers
I see a lot of people commenting to use docker-compose instead.

Testcontainers does have a docker compose integration [1].

1. https://java.testcontainers.org/modules/docker_compose/

jackcviers3··on Write Dumb Code (2018)
There are metrics for complexity that nobody who writes these articles ever mentions: Halstead complexity [1], LCOM4 [2], cyclomatic complexity [3] (and others) that directly measure how complex a given piece of code is.

Halstead complexity measures the complexity of the "vocabulary" of code and the code "size". It uses the number of unique terms (arguments, variables), the number of unique operations (functions/methods/symbolic operators), and the total number of terms and operators to calculate difficulty and effort to produce. Lower is better. Obviously, more things and aliases and combinations of things are harder to understand than fewer things.

LCOM4 measures how many different responsibilities a module of code has. It measures whether or not two things in a module belong together by treating the code as a graph of nodes and counting the unique connected components in the graph. Greater than 2 means there is too much going on in the module, and it should be split to enhance understanding and reduce churn during maintenance. Obviously, if you are reading parts of the code that end up being irrelevant to the task at hand, you are going to be slower to accomplish whatever you are trying to accomplish.

Cyclomatic complexity measures how many execution paths there are in a given piece of code. Obviously, the fewer the better.

There are others - the counting complexity of the number of possible inhabitants of a given interface is a favorite of mine as well (is your interface a product, or a sum? Do you need strings or will an enum work? Do you need Long or can you get away with something smaller like Short or Int? Sum interfaces are smaller than product interfaces, and smaller ranged sum types - Short/int vs. Long - are better than larger ones because they reduce the number of possible satisfying implementations of the interface).

But the point is that all good simplicity metrics are static analysis metrics that are quantitative and not qualitative. Most are automated checks that can be performed given an abstract syntax tree of a program.

1. https://en.wikipedia.org/wiki/Halstead_complexity_measures 2. https://www.researchgate.net/publication/238729882_Measuring... 3. https://en.wikipedia.org/wiki/Cyclomatic_complexity

jackcviers3··on Tacit programming
Point free when done with _andThen_ instead of _compose_ isn't that much different from reading basic statement oriented programs delimited by semicolons:

    (
      f andThen 
      g
    )(x)
vs a = f(x); g(a);

_andThen_ is of course just compose with the arguments flipped such that you can compose from left to right instead of right to left.

In FP languages, and languages that use FP combinators, it is usually more efficient to use composed functions with combinators that do iteration and copying like _map(list, f):List_, because the iteration and copying happens during each map application:

    map(map(l, f), g)

and

   map(l, f andThen g)
produce equivalent results, but the second is faster and has fewer allocations.

For determining the arguments to f and g and map, typed fp languages usually have ide features which can show you the inferred type of each expression, or you can jump to the definition and see it, usually by hovering or key chord while the cursor is over it.

    map[A, B](
      fa: List[A], 
      f: A => B
    ): List[B]
and etc.

This allows you to read things easily and avoid cluttering the code with types where they can be easily inferred.

Point-free style is important to make the usage of such combinators acceptable but experienced devs do extract and name a composition when it becomes difficult to understand. Of course, the treatment of functions as effect-free black box transformers for equational reasoning also makes these refactoring extractions to variables safe to do.

You get a feeling for what is too much over time, and settle on when to use point free style and when not to.

On efficiency - good compilers can often identify nested/chained map applications and rewrite them as a single map application during compilation, but map fusion isn't guaranteed by all compilers or all _map_ instances. The evaluation strategy (lazy/eager) of the language and/data structure also plays a role in whether or not map fusion with point-free style is more efficient or optimisable.

jackcviers3··on Freenginx: Core Nginx developer announces fork
It's not that scary. If a project everyone depends on is broken and unmaintained, someone else will manufacture a replacement fairly quickly and people will vote with their feet.

NGINX is the de facto standard today, but I can remember running servers off apache when I began professionally programming. I remember writing basic cross-broweser spas with script.aculous, and prototypejs in 2005, before bundlers and react and node.

Everything gets gradually replaced, eventually.

jackcviers3··on Show HN: Tweening web visualisation, in Rust – (WASM)
On mobile, the twees perform at different frame rates each time, and stutter, and it makes observing the effect of the curves difficult.
jackcviers3··on Tell HN: GitHub no longer readable without JavaScript
I don't want to leave my editor to read an HTML page that has content that does not require javascript to display. I have no problem with js in a full-on web-browser, but up until 4 hours ago, Github displayed readmes and code listings without the need for javascript, so I could run it in the editor's web browser, which doesn't have a js engine.

I can do that via more complicated emacs web browsers that essentially render chrome in a buffer. But I shouldn't have to for things that are only text in the first place.

jackcviers3··on Tell HN: GitHub no longer readable without JavaScript
Yep. Can't read readmes from the emacs eww browser anymore or browse individual code listings. This is ridiculous. I get it for their code editor, but it should at least SHOW the code and line numbers and allow text search via form submission like it used to from text-only browsers.
jackcviers3··on The Rust project has a burnout problem
Github marketplace has a close pull request action[1].

You also need to close issues after a set amount of inactivity[2].

If there is a bug without a CVE, or a feature someone wants fixed that users don't want to submit a fix for themselves AFTER it has been discussed with the maintainer in an issue with a replication or strawman proposal and the owner has created a draft pr and asked you to work on it, it probably needs to come with a Patreon donation[3]. This can help alleviate maintainer burnout by allowing the maintainer to hire someone to make the contribution.

A software shop wouldn't operate without some kind of iterative plan. Large open source projects with single maintainers shouldn't either. Scheduling 1 or 2 hours a week for issue triage, hosted in an online meeting, and limiting WIP in terms of open PRs to be discussed during this triage meeting should allow for both community interaction and strong governance for the project and prevent burnout for the maintainer.

All of this can be placed into the Readme or Contributor guide and a CLA that contributors have to sign.

Otherwise, people can fork and maintain the project themselves.

If you want to prevent flame wars, or demotivating comments, something like a comment sentiment analysis app[4] might even be a good idea to add to your project. There are plenty of models available that you can delegate to for this in the wild, and it's worth automating moderation to prevent burnout.

Finally, really toxic users can and should be banned[5]. It's not worth it to deal with anonymous negative contributors all the time.

1. https://github.com/marketplace/actions/close-pull-request

2. https://github.com/marketplace/actions/issue-triage

3. https://github.blog/changelog/2023-10-03-sponsor-projects-th...

4. https://github.com/marketplace/comment-sentiment-analyzer

5. https://docs.github.com/en/communities/maintaining-your-safe...

jackcviers3··on New nuclear deflection simulations advance planetary defense against asteroids
The problem with the dark forest hypothesis is that there's already no way to hide from the techinically advanced malignant actors that could execute a Dark Forest strike in the first place.

If your civilization is technically advanced enough to be a potential threat to such an actor, the highly energetic actions you are undertaking for interstellar travel will be visible to all of space via radio and infrared telescopes. Given that it will be economically infeasible to launch all of the payloads required to produce interstellar spaceships from within the gravity well of a planet, the orbital infrastructure required itself will lkely be visible as a periodic dimming of the planet's sun. It too, will give off infrared radiation detectable by a far-off technically advanced malignant actor.

There is no hiding in space. Your only hope for species and evolutionary survival in a dark forest is to aggressively disperse to uninhabited target systems. However, this also increases the likelihood that one of those systems will go rogue and eliminate the other ones it knows about.

Given this, the best strategy seems to be first avoidance of contact, then diplomacy, then detente, and finally alliance and assimilation in a Dark Forest universe. The allied powers can ensure that any bad actors that attempt elimination strikes are outnumbered and eliminated themselves.

On top of that, space is infinitely large. There are an enormous amount of finite resources within a planetary solar system which are way more energetically economic to exploit than ones in other systems. Once a civilization is forced to expand for survival beyond its local system, it is likewise economically cheaper to avoid warfare to claim one particular planetary system for its resources than to fight an interstellar war that risks the annihilation of the conflict participants' civilizations. There are literally an infinite number of systems to choose from.

There's no reason to destroy other competitors when the resources you are competing for are infinite. In such a scenario, which our universe seems to be an example, the only reason for conflict is malignant choice.

The prisoner's dilemma between two or more civilizations presented in the series would never need to occur.

The philosophy behind Three Body is just terribly cynical and illogical in the face of what we know of the existing universe. It makes for a great story, but the type of aggression posited in technical species doesn't provide an evolutionary advantage.

It should be noted that the entire Dark Forest philosophy presented in the book came from an unstable, traumatized, suicidal, xenophobic, nihilistic genius. Not the sort of person who you want forming the zeitgeist for existing in a much larger ecosystem of other civilizations.

If you accept the premise, then the series is great. But the premise assumptions are fundamentally flawed.

jackcviers3··on Could we stop Yellowstone from erupting with a geothermal power plant?
This is more like insurance. If you move to the mountains, you have to pay for special fire insurance because mountains have forest fires.

The U.S. is an extremely productive economy with at least one enormous cyclical natural catastrophe attached to it. If this natural catastrophe is preventable, and the costs of prevention are outweighed by the costs of losing the US economy, then it's probably worth doing.

I just assumed that it was one of those things that isn't economically or technically feasible.

jackcviers3··on Goodbye, clean code (2020)
The advantage, if the abstraction is wrong, of using the abstraction is that you can use tool automation too look up all the uses of the abstraction and replace them with a new one at need without needing to memorize the codebase.

Hodgepodge copy-template code that has minor context-sensitive structural differences is relatively difficult to find all instances of in a codebase without tracing execution paths unless you were the original author and you have the uses memorized. In contrast most IDEs have a find all references and even grep can find all the common names of something in a codebase.

← PreviousPage 2 of 9Next →