HNHacker News
TopNewBestAskShowJobs

nrdvana

270 karma · joined January 30, 2018

submissionscomments
nrdvana··on I want a better shell (2019)
The next evolution of the terminal (text array of characters with positioning drawing escape codes) was the graphics array of pixels with drawing API calls. The problem with graphics arrays is when you try to run them over a remote connection. For low bandwidth situations, you end up with hacks like downgrading to 8 bit color or disabling mouse-move events, both of which make some interfaces less usable. Then you also get the problem of scripting, where there isn’t a consistent way to deliver input to the applications. HTML and HTTP can be seen as yet another implementation of portable networkable user interfaces, and they are easier to script than graphical apps, but in the end, writing a web app or client is still a hundred times more effort than printing text on a terminal.

Many people have thought of many ideas more advanced than terminals, but the terminals persist due to their superiority at just being simple, flexible, and fast.

It is absolutely possible to “make a better terminal” though. But anyone who does has an uphill battle for adoption.

(context: I was bound and determined to make a better terminal 20 years ago, but eventually gave up on the idea after getting familiar with existing tech and deciding it was good enough for me. Same with Bash, though I still think it’s a horrible language and should be replaced eventually)

nrdvana··on Mosquito saliva alone has profound effects on the human immune system (2018)
Every cell in your entire body (on average) gets replaced over a 7 year span. If you figure that you stopped growing around 18, and your body has been slowly replicating itself since then, it completed the first full replication at 25, the second at 32, the third at 39, the fourth at 46, etc. Each time you accumulate some chaos. As the chaos grows, the cell groups decline in performance. The decline in performance makes it more likely that the next replication will be even worse.

While that makes it really unlikely that aging can be reversed, it certainly isn’t logically impossible. All you need to do is expell the chaos, and get one good quality regeneration (possibly taking about 7 years) and then you’d be right back to 18 years old again. That might make it worthwhile enough to be willing to have your body burned by a billion laser shots and float in a vat of liquid for 7 years. We might get to find out in our lifetimes? who knows.

nrdvana··on Mosquito saliva alone has profound effects on the human immune system (2018)
I’ve never heard anyone have that experience before. Maybe you should share this phenomenon with some relevant scientists?
nrdvana··on Ohio GOP ends attempt to ban municipal broadband after protest from residents
Looking at it a different way, it’s entirely possible that those grants are the same ones that the companies would have applied for to roll out broadband to rural areas. In that sense, it doesn’t spend tax dollars in excess of what would have been spent anyway if they got the cable company to do it for them.
nrdvana··on Peter Thiel turned a Roth IRA into a $5B tax-free piggy bank
> The IRA was marketed as a way for lower and middle class people to build retirement investments.

The pessimist in me FTFY

nrdvana··on Ask HN: I was hit with a patent troll lawsuit, how do I deal with it?
> “The disclosure is supposed to drive innovation”

And that is the grand joke of the patent system.

nrdvana··on Ask HN: I was hit with a patent troll lawsuit, how do I deal with it?
I think it stalls more innovation than it encourages, and generally prevents new entry into a technology space, because the existing players have all the patents that a new player would need to get started. The fewer players you have in a technology space, the less innovation there will be, because “necessity is the mother of invention” and people don’t generally start working on an idea unless they are exposed to the problems of that field. In theory, a non-player could start a research shop and then sell the results of their research in the form of a patent, and this happens sometimes, but just as often the industry decides they don’t want to pay, and leaves the idea dead until the patent expires.

My pet example is the mosquito laser. They invented it at MIT, and showed that it could effectively shoot down mosquitos that pass between posts. The hardware costs were a bit high, but would come down drastically if someone mass-produced custom chips for it. But, the overall idea is patented, and currently held by a “think tank” licensing company, and no product has emerged. I can only assume that it is because their licensing demands are too high. I’d be happy to start my own company to build mosquito lasers, but I’m sure that their licensing costs would kill any profit from it, so I don’t. And so the world is left with no mosquito lasers for more than a decade.

If you want another extreme example, the 3D printer craze was kicked off by the expiration of a patent on the FDM process: https://www.fabbaloo.com/blog/2020/3/2/the-challenge-and-opp... The innovation in the 3D printer space probably lost 10 years due to that patent.

One possible solution to the problem, without throwing out the entire patent system, would be to create a mandatory licensing system with fixed rates. For example, if you know that your design is about 60% patented, and there is a law that says 20% of your profits have to be given to the patent holder, then you might be able to go ahead and make the product and still turn a reasonable profit. The patent holders would get paid something and the products would continue being innovated without these stupid wait-17-years delays. Also it would put less severe stake on the patents, so people could just argue out the details in court about who gets how much money without worrying that it was going to bankrupt a company or kill the product line.

nrdvana··on Japan's government plans to encourage 4-day workweek, but experts split
I can do 60s in bursts, and the bursts have lasted as long as 2 months before. I usually burn out as soon as we hit the finish line, and work 10-20 hour weeks for a while until all the comp-time is used up. But I can really do a fantastic amount of programming when I dedicate my entire brain to the project and completely exclude all other thoughts. OTOH I have to admit that both of the biggest production screwups I ever made happened in those crunch times. But seeing myself hit those levels of productivity actually gives me a ton of satisfaction. Some of my normal 40 hour weeks when my head isn’t in the game are so un-productive that it depresses me.

You asked about objective measures, but I’m not sure how programming can really be quantified. All I can say is my “hyper-mode” has caused projects to reach deadlines that others on the team thought were unlikely.

nrdvana··on SNES – Super Mario World Widescreen
Most games have all the assets loaded onto every client, and they just synchronize over the server like a glorified IRC channel. People reverse-engineered WoW servers, and then ran their own WoW communities for a decade until Blizzard finally decided to get back into the game. (but then Blizzard re-implemented the old content into the new engine, rather than starting up the old server code, so ended up being a lot more effort for them than just flipping a switch)
nrdvana··on Perverse Downstream Consequences of Debunking
How about this one: https://www.snopes.com/fact-check/clinton-body-bags/

There’s nothing factually wrong with that article at all, but the entire article is loaded full of opinion and unnecessary adjectives. If someone posted that to Wikipedia they would get rejected for “lacks encyclopedic tone”.

And why does it matter? because if I try forwarding this to anyone who actually believes or sort-of-believes in the Clinton conspiracy theories, the first message they get from reading it is “I’m a democrat and I think this is the stupidest of stupid conspiracy theories and you’d have to be stupid to entertain it” and then they dismiss the whole article before they ever make it down to the useful case-by-case analysis.

If a fact checking website wants to be taken seriously by both sides, they need to refrain from attacking the people they are arguing against.

nrdvana··on Hatetris – Tetris which always gives you the worst piece
Tetrinet. I haven’t played it in 20 years or have any idea if the code is maintained, but that’s what you’re looking for.
nrdvana··on Ask HN: Cheapest Maps APIs
Are you aware of OpenStreetMap.org ? They have an entire ecosystem of APIs and services and download-data-and-serve-it-yourself options.
nrdvana··on Things I hate about PostgreSQL (2020)
My favorite killer feature is jsonb_agg / jsonb_object_agg which let me pull trees of data in a single query without the exponential waste you’s get from cartesian products, and even deliver it to the frontend without needing to assemble the json myself.
nrdvana··on Things I hate about PostgreSQL (2020)
(not the OP but...) I have had 3 cases in the last year where a postgres instance with less than millions of rows per table has decided to join with fancy hash algorithms that result in tens of seconds per query instead of the 5ms that it would take when it uses nested loops (i.e. literally start with the table in the from clause, apply some where clause, join to next table, apply more where clause, join to next table, and so on)

I do believe the planner was coming up with vast mis-estimates in some of those cases. 2 of the 3 were cases where the fully joined query would have been massive, but we were displaying it in a paged interface and only wanted 100 rows at a time.

One was a case where I was running a “value IN (select ...)” subquery where the subquery was very fast and returned a very small number of rows, but postgres decided to be clever and merge that subquery into the parent. I fixed that one by running two separate queries, plugging the result of the first into the second.

For one of the others, we actually had to re-structure the table and use a different primary key that matched the auto-inc id column of its peer instead of using the symbolic identifier (which was equally indexed). In that case we were basically just throwing stuff at the wall to see what sticks.

I have no idea what we’d do if one of these problems just showed up suddenly in production, which is kind of scary.

I’m sure the postgres optimizer is doing nice things for us in places of the system that we don’t even realize, but I’m sorely tempted to just find some way to disable it entirely and live with whatever performance we get from nested loops. Our data is already structured in a way that matches our access patterns.

The most frustrating part of it all is how much time we can waste fighting the query planner when the solution is so obvious that even sqlite could handle it faster.

For context, I’ve only been using postgres professionally for about a year, having come from mysql, sql server, and sqlite, and I’m certainly still on the learning curve to figure out how the planner works and how to live with it. Meanwhile, postgres feature set is so much better than mysql or sql server I’d never consider going back.

nrdvana··on Git's list of banned C functions
In the Pascal that I remember, strings were always 256 bytes and the first byte tracked the length, meaning they were always safe, though might get truncated. The LongString just did allocations whenever it needed, and was also safe, as long as you weren’t rolling your own pointer math.
nrdvana··on Ray Tracing in pure CMake
Actually, thinking back, the primary reason I did that was that bash can’t dereference a variable by its name stored in another variable without an eval, and calling eval on each access of the variable was slow. By eval-ing the whole method ahead of time, I could access all the object attributes at runtime without any further evals. It looks like cmake has a getter/setter function that takes a name, so that wouldn’t be a problem here.
nrdvana··on Ray Tracing in pure CMake
Btw, one of the things I came up with in bash was an “object oriented” pattern (antipattern?) where a “constructor” function would declare variables for “attributes” and functions for “methods”, like for example declaring an object named Vector1 whose fields are Vector1_x Vector1_y Vector1_z and methods like Vector1_Normalize and Vector1_SetMagnitude. The functions would be eval’d for each instance of the object during the constructor to reference the attributes and methods of that named object instance. Is this possible in cmake? (I don’t know cmake at all)
nrdvana··on Ray Tracing in pure CMake
Feel free to use my bash 3d geometry library

https://github.com/nrdvana/CmdlineGL/blob/master/share/lib-b...

nrdvana··on Ray Tracing in pure CMake
The OpenGL interpreter was a lot of effort, but the bash scripts that feed it were basically the same problem you worked out: how to implement 3d vector math in a language of integers, array variables, and functions without references or return values.
nrdvana··on Ray Tracing in pure CMake
High-five from the opengl-bash guy!

http://www.nrdvana.net/cmdlinegl/

nrdvana··on U.S. faculty job market tanks
Dunno... an english professor where I went to college listed his primary research on his faculty website as “determining from the writings of Mark Twain whether he was gay”. I often wonder how much of my tax dollars went toward that. On the whole I have a low opinion of the “english” department, since they get to study a blend of communication, philosophy, psychology, history and so on without ever contributing concrete advancements to any of those fields. For instance, it took all of one month of my first job before I realized that the essay format was a completely ineffective way to communicate (tl;dr) and learned a completely new bullet-point-driven style that would actually deliver ideas to the intended recipient. I taught myself; it would have been nice if the people who study communication for a living actually knew the best way to communicate ideas to others and could have taught me that. Instead they basically taught me the most artistically pleasing way to communicate with other english majors. I’m also generally irked by the english major attitude that there are no wrong answers and every interpretation is equally valid. This attitude prevents them from ever making useful advances at anything.
nrdvana··on ICQ New
Chief, shouldn’t we be using the Cone of Silence for this?

https://youtu.be/vsNR9FnxOdY

nrdvana··on This Video Has X Views
Replacing the battery isn’t hard. There are plenty of youtube instructional videos on it.
nrdvana··on Stock buybacks are dangerous for the economy
So I think your description is in agreement with mine, but I consider the first action of the borrower to be withdrawing the money and giving it to e.g. someone selling a house. If the person selling the house uses the same bank, then yes the bank really did just create the money for the loan, but if it wasn’t the same bank then I consider them to have created money for the previous investors while handing out the real money to a borrower. Mostly a matter of perception I guess.
nrdvana··on Stock buybacks are dangerous for the economy
> The money banks loan you is created from nothing as a fiction inside their computers and destroyed again when you pay it back. The only money that continues to exist is the interest you paid them, which they get to keep.

Care to cite a link for this? My understanding is that the money they loan you is physical and real, but the money “held” for savers is a fiction that could be lost if the bank went under, thus the reason that the federal government offers FDIC insurance for money deposited in banks, and why the feds are allowed to dictate interest rates and tell banks what overall percentage of their holdings they are allowed to loan out.

nrdvana··on Perlwm – a window manager written entirely in Perl
You forgot my favorite one! Xlib is written so badly that there is no graceful way to deal with a connection error to the server - the library gives you one callback to clean up and then it forcibly aborts the process. I looked into why, and its basically because they have no provision for cleanup of failed function calls. If a function can’t return the expected result it would either leave behind a broken internal state of the library or segfault, so they call abort() as a workaround.

If not for this glaring design disaster, it would be possible for a program to attempt re-connecting to a new display server after the previous one crashed. No X11 program has ever done this only because Xlib made it impossible.

nrdvana··on Jeffrey Epstein and MIT: FAQs
I’ve seen numerous accounts that the prison is understaffed and under budgeted. I’m not surprised at all that they would lose footage if they’re out of drive space and don’t have enough eyes to keep up with the error logs.

Also if you missed the latest news stories, they did save the footage for one of them but were given the wrong cell number so they had footage for the wrong floor.

This is just the general level of disorder and incompetence you can expect when you decide not to give a thing the level of funding it needs.

nrdvana··on Perl is dying
Says the pointy-haired boss type of person
nrdvana··on Perl is dying
It's also the only example that could possibly make PHP look good, because it's the problem domain PHP was invented for. Nobody is innovating on Perl's CGI so it's not going to make use of any improved language features from the last 20 years.
nrdvana··on A Conversation with the Team That Made Bread with Ancient Egyptian Yeast
It sounded like he already had experience with that. He said that flour always turns out like a “puck”, where this was fluffly. So, not exactly science-grade analysis there, but certainly a strong indicator.
← PreviousPage 5 of 6Next →