HNHacker News
TopNewBestAskShowJobs

gnulinux

6,378 karma · joined October 22, 2017

submissionscomments
gnulinux··on You can use C-Reduce for any language
Isn't that potentially unsafe though? Random permutations can reduce arbitrary programs to destructive programs, in particular any program can be mutated to `rm -rf /` given enough time. Also even the problem of finding syntactically valid programs is combinatoric, it's pretty surprising that it can go toward a local optima in such a short time without having any understanding of the function or its derivatives.
gnulinux··on You can use C-Reduce for any language
I read this paper and I still feel lost as to how can this even be possible. It seems to understand how to tokenize, merge lines, remove tokens etc for arbitrary programming languages. Is there another paper that explains this algorithm alone?
gnulinux··on Premature Graying of Hair: Review with Updates
In our world today it seems impossible to complain about stress. Everyone around me from boss to family to even therapist keep telling me to remind myself of how great of a life I have and that I should know better than to complain. But it feels to me like I'm drowning in an ocean stress everyday with no way to escape it. I keep being compared to others who can seemingly take the stress well and am questioned why I can't take similar level of high-stakes, indeterministic responsibilities with severe dangers that are beyond my control, and little to no positive pay-off for me. Some people around me are extremely health conscious, they avoid all kinds of chemicals, eat religiously well, work-out regularly, sleep well etc yet when they show obvious signs of stress because they're working 12 hours a day in their torturous FAANG job, I'm treated like an antivaxxer for pointing it out. In this world of hustle culture, it seems like a taboo to talk about how unhealthy stress is. Stress today is like 70s cigarettes, everybody is doing it, so no need to worry about its health effects.

And yes I have graying hair at mid-late 20s. Sometimes I'm astonished how people don't complain about their stress levels. I feel weak, child-like, immature, and feeble being unable to tolerate maybe 10% of what my wife can.

gnulinux··on New York City Council Votes to End Broker Fees Squeezing Renters
Oh that's very good to know, I stand corrected. I last moved late 2023 (Boston) and I was interested in market in a few cities around that times. It's always great to hear local governments can make progress for the people.
gnulinux··on Porygon Was Innocent: An epileptic perspective on the infamous Pokémon episode
> Just today i’ve read that Costco called back all their butter to destroy it because they forgot to print that butter contains milk.

Oh no! What will these multi-billion dollar companies do? Who is there to protect them? I think maybe we should create a foundation of sorts that we can all invest our money in to advocate for the rights of Costco et al. It seems like otherwise the evil government will cause too much damage on them while trying not to kill people due to allergy attacks or medical insensitivities. I can't ever imagine a situation where saving at most one or perhaps two hypothetical human lives being worth the risk of causing a butter recall. Someone should protect shareholder profits no matter the consequences, and especially if the consequences are so minor (just a few possible deaths) compared to thousands of dollars in profits shareholders can make.

gnulinux··on New York City Council Votes to End Broker Fees Squeezing Renters
In very expensive cities like NYC, Boston, SF it'll be $4k+ for 1 to 2 bedrooms, $5k+ for 2 to 3 bedrooms.

If you have 2 buddies and going on a $5500 3 bedroom in Boston, you'll likely be requested first rent + last rent + deposit + broker fee (=1 rent) = 4 * rent = $22k just to get the keys. That's $7300 per person. This is only to get the key, the next month you pay rent #2.

If you're going on a $4k 1 bedroom by yourself (or with your partner) you'll be hit with 4 * 4=$16k upfront cost, or $8k if you're lucky and have a partner.

Renting is extraordinarily expensive in big cities in the US right now. I'm sometimes surprised people can survive this market. I make ~$150k a year in a lucrative software engineering role, and rent is still too expensive for me. It's very difficult for e.g. teachers, researchers etc making ~$70k a year etc.

Some cities will be cheaper, some will be more expensive. E.g. I know that Philadelphia is particularly cheap when it comes to cost of living. Chicago is expensive, but seems to be slightly cheaper than NYC/Boston etc...

gnulinux··on What I wish someone told me about Postgres
I'm curious about this for DuckDB [1]. In the last couple months or so I've been using DuckDB as a one-step solution to all problems I solve. In fact my development environment rarely requires anything other than Python and DuckDB (and some Rust if native code is necessary). DuckDB is an insanely fast and featureful analytic db. It'd be nice to have a linter, formatter etc specifically for DuckDB.

There is sqlfluff etc but I'm curious what people use.

[1] DuckDB SQL dialect is very close to Postgres, it's compatible in many ways but has some extra QOL features related to analytics, and lacks a few features like `vacuum full`;

gnulinux··on Defining Statistical Models in Jax?
Reading this post, and reviewing the documentation of NumPyro/Pyro, I think I'm not following the crucial difference between NumPyro/Pyro. I understand that Pyro uses PyTorch as backend, and NumPyro uses JAX as backend, but other than that I'm not sure about the critical differences. If their frontend is about the same (which seems to be the case here) why is JAX mentioned in this post? Could we simply not replace Pyro with Stan for statistical modelling (whether with PyTorch or JAX backend)?
gnulinux··on Can logic programming be liberated from predicates and backtracking? [pdf]
I strongly recommend checking Souffle programming language. It's a dialect of Datalog that can output bulk CSV data that can be easily imported into other databases (like Duckdb or Excel etc). It creates an extremely intuitive framework for logical programming. I.e. you can visualize logical programming as each relation being a giant table of elements, "or" operation being akin to SQL `union all`, "and" operation being akin to SQL `join`, "not" operation being akin to `outer join ... where joined isnull` etc...
gnulinux··on PEP 760: No more bare excepts
Python ecosystem is a disaster for certain reasons but there is simply no ecosystem better than Python for other reasons. It's a trade-off. For literally any niche problem you can find out there there will be a Python library somewhere in the annals of the internet. I use many many many programming languages and everything starts out as a Python script in my flow, because by the time you start half the code is already written.
gnulinux··on Show HN: Compiling C in the browser using WebAssembly
I see thanks, that's great.
gnulinux··on Show HN: Compiling C in the browser using WebAssembly
I recently wanted to use tcc for a homebaked programming sideproject and was surprised to find it's no longer supported anymore, at least not by Fabrice Bellard. Upstream git still has some light activity but no releases. I wasn't sure how good of an idea it is to rely on it as a code generator.
gnulinux··on Whence '\n'?
This is a fascinating post. It reads to me like some kind of cross between literate-programming and poetry. It's really trying to explain the idea that when you run `just foo` the very 0x0A byte comes from possibly hundreds of cycles of code generation. Back in the day, someone encoded this information into OCaml compiler -- somehow -- and years later here in my computer 0x0A information is stored due to this history.

But the way in which this phenomena is explained is via actual code. The code itself is besides the point of course, it's not like anyone will ever run or compile this specific code, but it's put there for humans to follow the discussion.

gnulinux··on Wikidata as a Giant Crosswalk File
Duckdb is amazing, I've been using it in the last few weeks to analyze data I generate with datalog/souffle and I was completely blown away by the performance and QOL features. I seriously don't understand how it can be this fast...
gnulinux··on NumPy QuadDType: Quadruple Precision for Everyone
Especially if you need 128-bit float precision. It's very well known and understood that quad float is much slower in most platforms, extremely slow in some. If you're using quad float, it's because you absolutely need need all 128 bits, so why even reduce it to 80 bits for "performance"? Seems like an irrelevant design choice. Programmer can choose between f128 vs f80 if performance is intractable in the target platform.
gnulinux··on NumPy QuadDType: Quadruple Precision for Everyone
I use it for generating music through physical models. If the model requires a very numeric-sensitive algorithm like a differential equation solver, it's nice to have the extra precision, and usually performance doesn't matter too much in these sort of things (because ultimately, I just click "render" and wait anyway). To be very honest, I don't even know if I need 128bits, maybe a 32bit float would do... I never ran a comparative analysis. It just gives me more room for error, so that I can focus on the music/sound and not too much on the numerical analysis/programming. Working on hobby music+programming projects is the ultimate freedom.
gnulinux··on Essential node in global semiconductor supply chain hit by Hurricane Helene
@hn_throwaway_99 wrote in that thread:

> These types of articles/pronouncement always tend to make a connection that is nearly never warranted. That is, the article quotes this tweet that says "The modern economy rests on a single road in Spruce Pine, North Carolina. The road runs to the two mines that is the sole supplier of the quartz required to make the crucibles needed to refine silicon wafers." But the first sentence doesn't really follow from the second.

> That is, even if all the silicon wafers are made from this quartz from NC today, it's not really because that is the only possible option, it's because that quartz is the highest quality that can be procured at a relatively low price. But if that factory and quarry went away tomorrow, I have no doubt that the worldwide semiconductor industry would quickly adjust to a different quartz supplier.

> I think it's still a very cool factoid, but the subtext that "the whole world economy 'hinges' on a teeny NC town" is false.

We'll see if they're right...

gnulinux··on Dead Internet (2023)
Random one off forums. They were alive.
gnulinux··on Dead Internet (2023)
> However, by now I think we've found our places where the internet is still fun. There's still some forums and chat rooms that keep things interesting without the constant barrage of advertising.

I haven't. Internet is nothing more than an addiction for me. Internet is dead and misanthropic nowadays. It's soulless and corporate. It used to be fun, artistic, creative, and educational. Now it's neither of those, with extremely few exceptions like Wikipedia.

> This site is one of them, but there are a bunch of federated platforms out there now too that are fun to explore.

I read reddit and HN constantly because I seem to have an unhealthy compulsion to keep up with the news, politics, tech, and the world, but other than that I wouldn't say I like either site, or that they're fun.

gnulinux··on Show HN: Iceoryx2 – Fast IPC Library for Rust, C++, and C
> Shared memory works as a transport if you either assume that all parties are trusted (in which case why do IPC in the first place? Just put them in a monolith), or you do hardcore capturing (make a copy of each message in the framework before handing it off). Their web page mentions zero copy, so it's probably not the second one.

This is an extremely puzzling comment. I can think of thousands of such cases.

First, there are many reasons to split your program into processes instead of threads (e.g. look at browsers) so even if you have a monolith, you may need IPC between trusted parties simply because of software engineering practices. As a more extreme example, if you're writing code in a language like Python, where multi-threading is a huge liability due to GIL and the standard solution is to just use multi-processing, you'll need a channel between your processes (even if they're just fork()'d) and so you need to use something like filesystem, unix pipe, postgresql, redis, some ipc lib (e.g. TFA)... whatever as a way to communicate.

Second, your comment implies there is no scenario where implementing two separate programs is preferable to building a monolith. Even though you believe in general monoliths are better, it doesn't follow that they have to always be the right approach for every software. You may have a program that requires extremely different computational techniques, e.g. one part written in Prolog because it needs logical constraint satisfaction solving, or one part needs X language because you have to use a specialized library only available in language X, or you may need one part of your program to be in C/C++/Go/Rust for improved latency, or you may need part of your program in "slow" Y language because every other codebase in your company is written in Y. This language barrier is simply one reason. I can come up with many others. For example, parts of the software may be developed by two separate teams and the IPC is decided as the interface between them.

Long story short, it's pretty normal to have a monolithic codebase, but N processes running at the same. In such cases since all N processes are written by you, running in hopefully-trusted hardware, using an IPC framework like this is a good idea. This is not necessarily the most common problem in software engineering, but if you do enough systems programming you'll see that a need for IPC between trusted processes is hardly niche. I personally reach for tools like iceoryx quite frequently.

gnulinux··on Mira Murati leaves OpenAI
> One thing it's not likely to be, is a neo-classical capitalist system based on the value of human labor.

I'm finding it difficult to believe this. For me, your comment is accurate (and very insightful) except even a mostly vanilla continuation of the neoliberal capitalist system seems possible. I think we're literally talking about a "singularity" where by definition our fate is not dependent on our actions, and of something we don't have the full capacity to understand, and next to no capacity to influence. It needs tremendous amount of evidence to claim anything in such an indeterminate system. Maybe 100 rich people will own all the AI and the rest will be fixing bullshit that AI doesn't even bother fixing like roads, rusty farms etc, similar to Kurt Vonnegut's first novel "Player Piano". Not that the world described in that novel is particularly neoliberal capitalist (I suppose it's a bit more "socialistic" (whatever it means)) than that, but I don't think such a future can be ruled out.

My bias is that, of course, it's going to be a bleak future. Because when humanity loses all control, it seems unlikely to me a system that protects the interests of individual or collective humans will take place. So whether it's extinction, cyberpunk, techno-socialism, techno-capitalist libertarian anarchy, neoclassical capitalism... whatever it is, it will be something that'll protect the interest of something inhuman, so much more so than the current system. It goes without saying, I'm an extreme AI pessimist: just making my biases clear. AGI -- while it's unclear if it's technically feasible -- will be the death of humanity as we know it now, but perhaps something else humanity-like, something worse and more painful will follow.

gnulinux··on T-Mobile cites SCOTUS Chevron ruling to argue FCC can't mandate phone unlocking
It was only a matter of time.

I have a feeling -- not being a lawyer and not intimately knowing the US Law -- that the whole legal structure of the Federal Government will soon experience a tremendous shift. Alphabet agencies will stop having any kind of authority that the Judicial Branch never approved of. It will completely shatter everything we know about the feds, from drug regulations (FDA et al), to communications (FCC et al), to stock market (SEC et al), to worker/consumer rights (FTC et al), to immigration (USCIS et al)... There will be a period in the US history where no lawyer will be sure how anything can be relied on anymore because there will be this giant free real estate the Judiciary Branch can make precedents on whenever they want.

When congress passed laws to create these alphabet agencies, they thought they're assigning some amount of authority to them to "regulate", and they thoughts these unelected bureaucrats making up laws -- instead of the glacier slow Congress -- will let Congress off the hook. But they didn't realize that the Judicial Branch would ultimately see it as an existential threat to them -- because the authority to "interpret" law belongs to the Judicial Branch and not the Executive Branch -- and thus by doing so, they actually wrote a blank check to the Judicial Branch (ruled by another set of 9 unelected High Priests) to eventually determine all these things for the Congress. It's gonna take the Congress an unprecedented megaproject to take these powers from the Judiciary and exactly define each law as elected Congress sees fit.

I hope I'm tremendously wrong, but I'm expecting Armageddon-level legal change to soon follow in this country.

gnulinux··on CuPy: NumPy and SciPy for GPU
> surprisingly

This is the problem with these kind of methods. It works, until it doesn't in an unknown way.

gnulinux··on Docker Desktop Alternative
I'm sorry but this doesn't work. Over the last 10 years so I was fucked over by countless "software that includes all its dependencies" that stopped working when I upgraded some other totally irrelevant software because "well duh it obviously uses system libC" or whatever. Examples: critical .AppImage binaries stopping working after random system upgrades. Nothing runs on my computer is ever fully isolated, not even Docker. So, any isolation guarantee I get is guarantee I'll take. You claim today that your software is isolated, but I don't know if 3 years down the road I'll upgrade my freaking text editor and your program will stop working because that one library from 1987 has to be exactly version A.X but my text editor upgraded it to A.Y. Thanks but no thanks.
gnulinux··on Show HN: Container Desktop – Podman Desktop Companion
Last I checked podman's support of docker-compose.yml was very limited to say the least. Has it changed?
gnulinux··on CuPy: NumPy and SciPy for GPU
There is but then you're using two separate libraries, that seems like a fragile point of failure compared to just using jax. But regardless since jax will use different backends anyway, it's arguably not any worse (but it ends up being your responsibility to ensure correctness as opposed to the jax team).
gnulinux··on CuPy: NumPy and SciPy for GPU
What about CPU-only loads? If one wants to write code that'll eventually run in both CPU and GPU but in the short-to-mid term will only be used in CPU? Since JAX natively support CPU (with numpy backend), but CuPy doesn't, this seems like a potential problem for some.
gnulinux··on Papermill: Parameterizing, executing, and analyzing Jupyter Notebooks
No it supports less actually. Obsidian is only a markdown editor, it does allow you to edit code fragments like code (so there is basic code highlighting, auto-tabbing etc) but that's it. I personally find this a lot easier in some cases. I find that sometimes if the code is too complicated that you need anything more than just "seeing" you probably need to break it further down to its atomic elements. For certain kinds of development, I do find myself needing to be in "programming groove" then I use Emacs. But other times, I accompany the code with a story and/or technical description so it feels like the end goal is to write the document, and not the code. Executable code is just a artifact that comes with it. It's definitely a niche application as far e.g. the industry goes.
gnulinux··on Papermill: Parameterizing, executing, and analyzing Jupyter Notebooks
Literate programming is not just "documentation + code" any more than a textbook you read about Calculus is "documentation + CalculusCode" or a novel is "documentation + plot". It goes way beyond that, using literate programming you can attach an arbitrary text that accompanies the code such that fragments of your code is simply one part of the whole text. Literate programming is not just commenting (or supercommenting), if it were, you could use comments, it's a practice of simply attaching fragments of code in a separate text such that you can then later utilize that separate text the same way you utilize code. When you write a literate program, your end goal is the text and the program, not just the program. You can write a literate program, and publish it as is as a textbook, poem, blog post, documentation, website, fiction, musical notation etc... Unless you think that all human writing is documentation then literate programming is not just documentation.
gnulinux··on Papermill: Parameterizing, executing, and analyzing Jupyter Notebooks
It's a literate programming tool. If you find literate programming useful (such as Donald Knuth's Latex) then you can write a Jupyter notebook, add text, add latex, titles, paragraphs, explanations, stories and attach code too. Then, you can just run it. I know that this sounds pretty rare but this is mostly how I write code (not in Jupyter notebook, I use Markdown instead and write code in a combination of Obsidian and Emacs). To me, code is just writing, there is no difference between prose, poetry, musical notation, or computer programming. They're just different languages that mean something to human beings and I think they're done best when they're treated like writing.
← PreviousPage 4 of 34Next →