Better HN
topnewbestaskshowjobs
Log inSign up

simpaticoder

2,816 karma · joined Apr 3, 2023 (3y ago) · 658 submissions

Distributed programming Java and Node expert. Email me at hello@simpatico.io.
Submissions

comment 2y ago · link · parent

Very few people ever even attempt to write "lean software". The definition is a little nebulous, but "software without bloat" is a good one. This means that you have few dependencies, and the ones you have themselves have few dependencies, for a starter. But right there you have the first problem, which is that dependencies grow stronger with the number of users, and the number of users grows with applicability, hence the rise of dependencies that no-one uses more than 20% of, but everyone uses a different 20%. Even if you do tree-shaking or something so that you at least don't pass on the complexity you're not using, it still doesn't feel lean, because you're cognitively bloated, so to speak. Then, if you rewrite the library (because extracting your 20% is going to be very painful) you can make it simple and small, but no-one is going to use it but you and so it will remain weak, tightly coupled to the one project that uses it, because it doesn't offer the breadth of features people need.

The other reason software bloat persists is because knowing enough about the runtime of your software to even be offended by the presence of bloat is exceedingly rare. Repetitious and pointless tasks abound in modern software, where work is done at one layer and then thrown away and redone by another, repeated N times. But to even know about this requires that you understand your runtime and what its doing in your case, and in our industry, ignorance is (economic) bliss, where "go along get along" is richly rewarded and any aesthetic or moral objection to how things are done is harshly punished.

Strong and real social and economic forces drive bloat and punish the individual that would combat it. Which is why those who make the (at some level, doomed) attempt to fight bloat deserve at least our respect and some honor, since they will not only not receive thanks, they will be actively attacked by those who (correctly) perceive their work as a challenge to the status quo, and hence dangerous, unwanted, and a target.

comment 2y ago · link · parent

I felt a great disturbance in the Force, as if millions of animators suddenly cried out in terror and were suddenly silenced.

comment 2y ago · link · parent

I think "brice" already won. Sorry.

comment 2y ago · link · parent

It would be nice for Tesla to add a "serration option" to the cybertruck where every edge is sharpened and serrated - just in case you need to cut a tomato and can't find a knife. Or in case there's an apocalypse.

comment 2y ago · link · parent

I like Matt Holt and Caddy. My feedback here is that it would be useful to do profiling in a language-agnostic way so that other servers can participate and publish results! In general I think what users want to see is a timeseries of mem/cpu usage given an easy-to-characterize workload. The workload could be something like 'traffic hits a noop GET endpoint and who's rate doubles every 5 seconds'. Plenty of tools exist to do this kind of testing (e.g. ab for generating traffic, htop for measuring resource load; I'm sure many other options exist on linux).

It's tempting to use language specific profilers because they give you so much "for free" - they are particularly useful for the devs of the server itself, since they give great insight into the inner workings, can help identify bottlenecks. But in a world where everyone is comparison shopping, black box, language agnostic profiling would be more useful to consumers. Heck you might even go in with other server vendors to build something! A nice opportunity for collaboration!

comment 2y ago · link · parent

I recently thought through this problem and came up with the concept of building of a list of "candidates" for a given URL. Then the caller loops through and returns the first candidate that actually exists. It's a nice boundary between functions. I wrote up my solution in literate markdown (and javascript) here [0].

(Apart from supporting optional extensions, this code also supports throwing an error if someone prepends dots into the url - which, for me, indicates someone probing the server for weaknesses and is not a legit request.)

The funny thing is that I still often use file extensions since IntelliJ can only let me easily navigate/check existence if I use the extension.

Eventually I'll support slugs in the filename by just ignoring everything after the first dash.

0 - https://simpatico.io/reflector#urltofilename

comment 2y ago · link · parent

One quip: this piece is not "as slow as possible". One could write a piece of "music" that is one note to be played at the heat death of the universe, or a piece that is silence forever. It's fun to play with the definition of "music" like John Cage did his whole career, but the title of his piece is technically incorrect, the worst kind of incorrect.

comment 2y ago · link · parent

There is a class of tools that have high demand but also high supply - for example, online json formatters, or doc-to-pdf conversion tools. Occasionally very useful but not a daily tool, and not something to subscribe to etc. Suppliers often struggle to make money and more often than not don't make much, either with something like adwords or gray/black data brokering.

On the good side, AI logo design has strong demand, but I think it probably fits with the many other high but infrequently demanded tools that are (relatively) easy to construct by a modern programmer and deployed on a cheap VPS for fun. Maybe you wish to become a "secret weapon" for fiverr logo designers, who very well might pay a monthly subscription and consider it money well spent?

comment 2y ago · link · parent

Quora is a good example of how artificial scarcity goes wrong. If you're not restrictive enough, you can't make a profit. But if too restrictive, then the business will starve itself. When it becomes too restrictive/extractive over time you have enshittification.

comment 2y ago · link · parent

The only Star Trek splitting story-line that I recall [1] was not actually resolved! Lt. Riker just sort of disappeared into the background at the end of the episode, with Cdr. Riker and the writers never mentioning him again.

EDIT: apparently Lt. Riker showed up in a DS9 episode[2]!

1 - https://en.wikipedia.org/wiki/Second_Chances_(Star_Trek:_The...

2 - https://en.wikipedia.org/wiki/Defiant_(Star_Trek:_Deep_Space...

comment 2y ago · link · parent

>Those arcs were split every other episode. I think they did a stellar job despite those constraints but no doubt the production took a hit.

As a casual viewer, I didn't catch every episode in order, and so it was very confusing for me. No doubt it would have been a lot better if I had done. Not being able to follow the story-lines, I definitely started checking out at that point. Another commented mentioned that the whole series is being sold on iTunes for $20, perhaps it's worth a purchase and rewatch for this reason alone.

comment 2y ago · link · parent

>While Scorpius is fantastic, he doesn't belong on the ship ...

I agree, and so did the maker of the YouTube video I linked to. Interestingly, Wayne Pilgrim, the actor who plays Scorpius, mentions in an interview how difficult it was for him to play the character, since his motivation became, how shall I say, conflicted. It's an interesting case of the story-tellers putting an actor in a very tough spot.

comment 2y ago · link · parent

For anyone looking for a nostalgic, but honest, revisit, check out "Farscape(1999) Retrospective/Review" on YouTube[1]. It is comprehensive and I think picks out the strengths and weaknesses of the show very honestly as a fan. My personal belief is that the show peaked in Season 2 (the heist arc is pretty epic) and then started going downhill after Crichton split, and the introduction of some legitimately annoying crew, but they regained some glory with the Peacekeeper Wars mini-series/movie. The chemistry between the two leads (Ben Browder and Claudia Black) was always a particular strength of the show. Highly recommended but, like with so many series (The Walking Dead, GOT, etc) if you skip the last season(s) you'll be fine.

1 - https://www.youtube.com/watch?v=m0POJFs5PUM

comment 2y ago · link · parent

By "bothering with me" I mean "add my IP to the long list of IPs they are scanning".

By the way, I find it annoying that my logs get filled with this kind of trash. It has the perverse effect of making me long for something like Google Analytics since they rarely if ever bother running a javascript runtime.

comment 2y ago · link · parent

Thank you! I've been self-hosting for about a year running a 400-line http/s server of my own design, and it's remarkable all the attacker traffic my 3 open ports (22, 80, 443) get, although I've never taken the time to analyze what the attackers are actually trying to do! This post fills in a LOT of blanks.

Would be cool to do the same thing for the weird stuff I see in /var/log/auth.log!

It's crazy that attackers would bother with me since the code is entirely open source and there is no server-side state. The best outcome for an attacker would be root access on a $5/mo VPS, and perhaps some (temporary) defacement of the domain. A domain no-one visits!

comment 2y ago · link · parent

That is a bit odd, I agree, especially regarding the vehicle and DL requirement. It may actually be a mistake - I'll contact HR about it. Thanks for the feedback!

comment 3y ago · link · parent

There is a quote from LOTR that has always stuck with me:

“I thought Fangorn was dangerous.

'Dangerous!' cried Gandalf. 'And so am I, very dangerous: more dangerous than anything you will ever meet, unless you are brought alive before the seat of the Dark Lord. And Aragorn is dangerous, and Legolas is dangerous. You are beset with dangers, Gimli son of Glóin; for you are dangerous yourself, in your own fashion. Certainly the forest of Fangorn is perilous — not least to those that are too ready with their axes; and Fangorn himself, he is perilous too; yet he is wise and kindly nonetheless.”

The children correctly assess you as "dangerous". They then assess whether you are wise and kindly, and find you so, making a good ally or friend. Merely wise and kindly people do not make as good of an ally or friend.

comment 3y ago · link · parent

For commuting, you're better off with a powered paraglider: https://en.wikipedia.org/wiki/Powered_paragliding

comment 3y ago · link · parent

>The most meaningful application for airships is to carry blades, nacelles, and towers for wind turbines off-shore

It seems like a boat would be better to bring cargo to offshore applications. Especially factoring in weather.

comment 3y ago · link · parent

>Indeed, it is doubtful that these mega-sized websites were intended by the original architects of the www. More likely, they may have imagined the web as a whole would grow (scale) as more people gained internet access.

This, I think, is roughly true but the issue is nuanced. The history of the web can be characterized by ever-decreasing barriers to entry. At first you needed a physical host and apache. Then, you could have a shared host and put html files in your user directory. Then, you could run wordpress. Then, you could sign up for myspace and never have to run anything. The 'like' is the smallest unit of content that can be captured by such systems. TikTok, Facebook, Instagram, wikipedia, etc are what you get from this evolution.

The unexpected downside is that with reduced friction to content-creation, the content has become quite awful. In part because people are awful, but also because of money and how effective it is to hire people to say things using these systems. If the friction to create content remained high, it may have been a "better" internet in some measures. It would certainly be a much smaller one.

Who knows how it will turn out? I suspect that AI will have a significant impact on all these systems, to wit, injecting massive amounts of noise that will reduce their utility significantly, if not to zero. No empire lasts forever.

comment 3y ago · link · parent

I didn't take the GP seriously because of this. Papyrus and clay and stone carvings do not equal operating a network of brittle, bespoke devices across the scale of a solar system. The existence of language, or writing, or even cathedrals or pyramids, do not eclipse this accomplishment. The odds of losing control of a system is proportional to both time and complexity of the system, and the GP ignores the latter factor.

comment 3y ago · link · parent

>Half a century of operation.

The stability of society (specifically American, specifically California/Caltech/JPL/Pasadena) must also be marveled at. That's 2 or 3 generations of engineers and scientists that were trained well enough to actually get things done. This is a marvel of teaching, technical communication, and societal infrastructure. Notably, NASA/JPL has maintained its prestige and funding for that entire time, as has Caltech.

There are many institutions (Sears), and world superpowers (USSR) from 50 years ago that seemed like they would dominate forever, but are gone.

comment 3y ago · link · parent

Most of the "meat" of this toy implementation of Dilithium can be found at https://github.com/mthiim/dilithium-java/blob/main/src/main/...

comment 3y ago · link · parent

Strictly speaking you only need books enough to teach the reader to build up to an optical 100x microscope and then use that to access the rest. Eventually you teach them how to build blue lasers and rockets to scan the silica bricks you engraved and stashed in a moon cave for "everything else".

comment 3y ago · link · parent

The correct solution is a synthesis: generate the boxes and arrows from code. Then let a human hide, move, and style those objects. When the code changes, the boxes and arrows will change, and perhaps the style will want to change, but at least the diagram will remain correct. This is precisely the distinction between semantic markup and css, btw. Implying that the html would be auto generated, the css would be hand crafted.

comment 3y ago · link · parent

Maybe try adding spaces between the letters and then mechanically remove those spaces when rendering.

comment 3y ago · link · parent

Okay, but the part I don't understand is why do it this way? If the hosting provider is a threat, they don't need new certs. They can just read your private keys off your disk and MITM with that.

comment 3y ago · link · parent

>The attacker managed to issue multiple SSL/TLS certificates via Let’s Encrypt

This implies that the attacker was able to validate domain ownership of jabber.ru and xmpp.ru by either a) being able to respond to the ACME protocol on domain(s) hosted http OR b) being able to write to a DNS TXT file for the domain(s). This implies that the victim already lost control of their process server and/or their nameserver.

comment 3y ago · link · parent

Wow, Nota looks good. I created something similar I call "Literate Markdown"[1], a play on Knuth's "Literate programming" concept. My focus from the beginning was interleaving computation with explaination. It's been a lot of fun to work with for the last few months, for example to explore ideas around SVG animation[2] or flesh out a novel datastructure/algorithm[3]. Also, its about 500 lines of legible node code that is the entire server and markdown processor with very few dependencies, no transitive dependencies and it does not require a compilation step. By default the server allows no 3rd party resources, or cookies, of any kind because why not. It's MIT licensed on github. I want to move it to an organization repo instead of my personal repo and clean up the repo in the process, which is happening today.

1 - https://simpatico.io/lit Literate markdown reference.

2 - https://simpatico.io/svg svg animation using object to elt scattering and a RAF pump

3 - https://simpatico.io/stree3 A navigable n-arry representation of diverging, deterministic state

1
1819202122