HNHacker News
TopNewBestAskShowJobs

osmsucks

387 karma · joined September 30, 2022

submissionscomments
osmsucks··on 16th Century Irish Hipsters
It's up, but HTTP only. Your browser may be forcing HTTPS and showing you an error page, but you should be able to bypass that.
osmsucks··on Pnut: A C to POSIX shell compiler you can trust
> We haven't found this to be an issue for Pnut. One of the metric we use for performance is how much time it takes to bootstrap Pnut, and dash takes around a minute which is about the time taken by bash. This is with Pnut allocating around 150KB of memory when compiling itself, showing that Dash can still be useful even when hundreds of KBs are allocated.

Interesting. When you say "even when hundreds of KBs are allocated", do you mean this is allocating variables with large values, or tons of small variables? My case was the latter, and with that I saw a noticeable slowdown on Dash.

Simplest repro case:

  $ cat many_vars_bench.sh
  #!/bin/sh
  
  _side=500
  
  i=0
  while [ "${i}" -lt "${_side}" ]; do
    j=0
    while [ "${j}" -lt "${_side}" ]; do
      eval "matrix_${i}_${j}=$((i+j))" || exit 1
      : $(( j+=1 ))
    done
    i=$((i+1))
  done
  
  $ time bash many_vars_bench.sh
  5.60user 0.12system 0:05.78elapsed 99%CPU (0avgtext+0avgdata 57636maxresident)k
  0inputs+0outputs (0major+13020minor)pagefaults 0swaps
  
  $ time dash many_vars_bench.sh
  40.75user 0.14system 0:41.22elapsed 99%CPU (0avgtext+0avgdata 19972maxresident)k
  0inputs+0outputs (0major+4951minor)pagefaults 0swaps
Dash was ~8 times slower. Increase the side of the square "matrix" for a proportionally bigger slowdown (this one uses 250003 variables).

> One thing we did notice is that subshells can be a bottleneck when the environment is large, and so we avoided subshells as much as possible in the runtime library. Did you observe the same in your testing?

Yes, launching a new process is generally expensive and so is spawning a subshell. If the shell is something like Bash (with a lot of startup/environment setup cost) then you'll feel this more than something like Dash, where the whole point was to make the shell small and snappy for init scripts: https://wiki.ubuntu.com/DashAsBinSh#Why_was_this_change_made...

In my limited testing, Bash generally came out on top for single-process performance, while Dash came out on top for scripts with more use of subshells.

osmsucks··on Pnut: A C to POSIX shell compiler you can trust
It's not about performance, it's about viability. If the result is so slow that it's unusable, it doesn't matter how portable it ends up being.
osmsucks··on Pnut: A C to POSIX shell compiler you can trust
Since I experimented with something similar in the past to mimick multidimensional arrays: depending on the implementation this can absolutely _kill_ performance. IIRC, Dash does a linear lookup of variable names, so when you create tons of variables each lookup starts taking longer and longer.
osmsucks··on Pnut: A C to POSIX shell compiler you can trust
I'm writing something similar, but it's based on its own scripting language. The idea of transpiling C sounds appealing but impractical: how do they plan to compile, say, things using mmap, setjmp, pthreads, ...? It would be better to clearly promise only a restricted subset of C.
osmsucks··on Fungus breaks down ocean plastic
One train can move many people at once (especially for peak commute times when people would be driving single-occupancy cars just to get to an office). It suffer from similar problems, but it's much more efficient at the same task.
osmsucks··on Microsoft Paint's new AI image generator builds on your brushstrokes
Sssh! Don't give them ideas...
osmsucks··on Leaked deck reveals how OpenAI is pitching publisher partnerships
It's one thing to "interact with a brand" by directly using their products, it's another thing to "interact with a brand" by receiving unsolicited advertisements which get in the way of whatever you were trying to accomplish.
osmsucks··on Low-tech Magazine underscores the potential of past technologies
Yes? That's the whole point.

100 years ago it was unthinkable for common people to eat red meat every day, they just couldn't afford it. Today, we are privileged enough that we can afford to do so, but just because we can it doesn't mean we should. It's not good for you.

Same happens in the tech world: we can afford to buy new tech devices to keep up with the bloat that inevitably envelops most things, but should we?

osmsucks··on Debloat non-rooted Android devices
I had a similarly appalling experience with a Samsung smartphone in, I think, 2012? Since then, I swore to never but anything Samsung again.
osmsucks··on Why time seems to pass faster as we age
Came here to write the same thing :)
osmsucks··on Lapce
They rewrote the UI recently in their own toolkit, Floem [^1], and that broke all scaling under X11 for me (now the UI and fonts are rendered so large that it's unusable). It works fine in Wayland though...

Here's some issues that were filed for this same problem:

  - https://github.com/lapce/lapce/issues/2732
  - https://github.com/lapce/lapce/issues/2773
  - https://github.com/lapce/lapce/issues/2737
[^1]: https://github.com/lapce/floem
osmsucks··on An Open Letter to Sam Altman
https://www.reuters.com/technology/openais-altman-talks-rais...
osmsucks··on Niagara Launcher
I think it worked fine for me with basically no setup, so I'm curious: what kind of setup did it require for you?
osmsucks··on Oh My Zsh
I've been using it for years and most things I need nowadays just work (i.e. have Fish support out of the box).

For all the rest, perhaps give https://github.com/edc/bass a try.

osmsucks··on Mourning Google
This was a while back so I can't recall precisely. Yes, I think I was travelling at the time, but I don't think the changes happened just before stepping on the plane, and I did have connectivity.
osmsucks··on Mourning Google
Be careful when using StreetComplete. It's by far the most user-friendly OSM editor out there, but it bundles edits together in one big changeset. I didn't know that, so I used it on occasion to fill in information about places I was visiting, and right after to fill in information about places far away that I know intimately (where I live). This created a very geographically large changeset which got reviewers to shout at me multiple times about it (https://wiki.openstreetmap.org/wiki/Changeset#Geographical_s...).
osmsucks··on GoatCounter creator is hoping to raise at least €1k for basic living expense
Free software is generally considered "free as in free speech". Doesn't always imply gratis, as people still need to pay their bills.
osmsucks··on Google Cuts Jobs in Engineering and Other Divisions
> third, not every employee is exchangeable, you cant just shuffle everyone around the company. You cant just take someone from the google maps team and have them start working on nexus phones.

True, but even so, you can train the employee for the new role. You need to do the same anyway for a new, external candidate (and it's even worse because they will need to familiarise themselves with internal tools and processes that the Maps employee would already be familiar with).

osmsucks··on This guidance on man pages for the GNU project is wild
Writing man pages by hand is indeed something that makes you lose the will to live. For anything beyond the trivial case I just write Markdown and convert it to a man page using pandoc.
osmsucks··on Find bilingual baby names
Beats me how "Andrea" became a female name. The name literally means "manly".
osmsucks··on I accidentally saved my company half a million dollars
This is called the Tall Poppy Syndrome.
osmsucks··on Making Hard Things Easy
`grep` should terminate with an empty output on `stdout` and an error message on `stderr`, then `sort` will successfully sort the empty contents of `stdout`
osmsucks··on Flatpak is not the future (2021)
I had to stop using elementary OS when they doubled down on Flatpak because I ran out of disk space. Those runtimes add up. :-/
osmsucks··on Petition to stop France from forcing browsers like Firefox to censor websites
This is why computers should only be able to run government-approved software acquired from government-approved repositories. :)
osmsucks··on Semantic Code Reviews – Simple and direct comments without drama
Argh, I meant "however don't underestimate". I blame mobile keyboards and their autocorrect features.
osmsucks··on Semantic Code Reviews – Simple and direct comments without drama
I tend to agree with that, however don't understand the language barrier. Labeling comments makes the intent unambiguous.

I also enjoy a tactical use of smileys and other emojis where applicable :)

osmsucks··on Codelite
I've recently started using Lapce (https://lapce.dev/) as a sort of barebones VSCode alternative and I find it nice for the hobbyist use case. It integrates with all the things I need, and other less mature features I bypass completely (I prefer to do Git from the terminal anyway).
osmsucks··on Pure Bash Bible (2018)
One of my current hobby projects is a scripting language which compiles to POSIX sh (for maximum portability). However, it's far from complete, the output is not exactly readable and POSIX sh is so limited that I might need to change course and target something else.

EDIT: I didn't know of Bish, but from its code samples we seem to have converged on similar syntax :)

osmsucks··on Ask HN: Has Google search switched to infinite scrolling for you too now?
I found the OsmAnd+ user experience quite irritating, and OpenStreetMap is just a fancy database and not a competing product to Google Maps for the user who wants live directions/navigation.

That said, for mobile use Organic Maps is pretty good: https://organicmaps.app/

← PreviousPage 3 of 4Next →