HNHacker News
TopNewBestAskShowJobs

motiejus

1,813 karma · joined February 13, 2012

See https://jakstys.lt for contact info.
submissionscomments
motiejus··on Syncthing: Syncing All the Things
I've been doing this with an rpi+ usb3-attached ssd for years (kept upgrading rpis). Syncing across my laptop, phone and server (server backing it up nightly). Worked well for years.

Now moved to a more powerful machine, but the concept is still the same.

This setup allowed me to conveniently stop using google drive.

motiejus··on [dead]
I braced myself and carried a small spider to my 3yo kid and showed it to him. I was extremely uncomfortable, but he didn't notice. Same with a frog (though I was comfortable).

From that time he is playing with and carrying spiders, frogs and various insects, small and large, without thinking about it. I guess it's about early experiences.

motiejus··on A Short Guide to Iraq (1943)
I read the whole thing and saved it for future reference, in case I ever go there.

I wish therenwere a class of travel books written in this style. This seems particularly helpful, which I didn't know before:

-3 teas/coffees is ok, 4th is a sign to leave. - quick language reference. The amount there can be learned in a few weeks prior the trip. I also like the suggested vocabulary. - a bit of history and context on why people live the way they live.

Thanks for sharing!

motiejus··on FreeBSD from a NetBSD developer’s perspective
> On the other hand, QEMU is this huge piece of software with documentation scattered all over the web and no man pages.

My frequent resource: https://manpages.debian.org/jessie/qemu-system-x86/qemu-syst...

Not available for BSDs? Maybe that's a mishap by the distro?

motiejus··on GitHub was having issues
Plug: after almost a full year of hosting alone (for $50) I recently started using srht's builds, somewhat equivalent to github actions. It's been awesome so far. Look at the downloadable coverage.html: super easy to set up!

https://builds.sr.ht/~motiejus/job/517389

And unlike any megacorp, Drew is approachable. I recommend having a look at it for anyone re-evaluating their software forge.

motiejus··on Cosmopolitan Libc 1.0
I am a bit worried about this:

> Please note that your APE binary will assimilate itself as a conventional resident of your platform after the first run, so it can be fast and efficient for subsequent executions.

I understand there may be no real way out, but this defeats part of the promise/purpose of PAE: assume I use a pae binary, know it's pae, and implicitly share it or copy it to a different machine. But once I have copied it from ~/bin/ it's not pae any more, it's optimized for my OS/arch!

Assuming the first-run optimization step is necessary, would it make sense to provide `--deoptimize` or `--paeize` flag to the same binary, so it's easy to return to the original, without recompiling it from source? Does it lose information when it optimizes? Can that information be tucked away (with an optional flag or env variable) for this step?

What happens if the binary is read-only?

motiejus··on Cosmopolitan Libc 1.0
I have been working with Bazel in my personal monorepo (~6 months now), and the fact that Justine, someone I believe knows Bazel/Blaze well, uses GNU Make, makes me re-think my decision: perhaps I should re-consider it. I have quite a few issues with Bazel, which require significant engineering hours to overcome, whereas I could just use gnu make and solve it quickly.

Let's see if I can get some inspiration of how things can be built from this repo?

`o/$(MODE)/depend`, a makefile-looking file with the full dependency tree. It is compiled using tool/build/mkdeps.c. So we have a Makefile generator (Justine, you mentioned elsewhere in this thread you didn't want to invent a build system? :)) The Makefile generator is very specific to this project: parses C files and creates that tree.

It is damn fast and, so far, beautifully documented (at least the build parts I looked). Hell, even documentation lines in file preambles are 72 characters wide, and justified. Crazy. Do you manually justify those?

You are also vendoring statically-built GCC, and the folder with executables is <10MB. LLVM C/C++ toolchain is hundreds of megs, compressed.

I am certainly taking inspiration of being in tight control of the compiler toolchain, and beautiful documentation. Not sure I will write my Makefile generator, since my project is also not that big.

Thanks. Cosmopolitan is giving me much more to look at than an αcτµαlly pδrταblε εxεcµταblε.

motiejus··on Framework Laptop pre-orders are open, starting at $999
Same here, I am looking for something that does have rj45.

Some dell latitude laptops have a connector that "packs" itself, making it slim enough to be buit-in, without bumps. Is this an option for you folks?

How much do you think it will bump out? Will the laptop be stable on an even surface?

motiejus··on Praise for Alpine Linux
This is stopping me from installing me on my laptop:

> OpenRC is not as good, but thankfully it's slated to be replaced in the foreseeable future.

I am really curious and couldn't find information on the web. Change to what?

motiejus··on Rufus: Reliable USB Formatting Utility
Yes.
motiejus··on Directory of Open Access Journals
I am a non-academic software engineer who wrote something that might interest academic cartographers[1], and am contemplating to write an article about it.

This will be a helpful to limit the choices to where it should be published.

Thanks, noted!

[1]: https://github.com/motiejus/stud/tree/master/IV

motiejus··on Rufus: Reliable USB Formatting Utility
Are you referring to grub2iso[1]? If so, I was never able to make it work: either the ISO is too large (IIRC, in the old days it needed to load the full ISO to memory), or, if it did boot, the kernel wouldn't find the ISO ("virtual drive") itself.

I only got it to work with simple things that load fully from RAM -- say, debian-installer, which only requires kernel+initrd.

It has to be simple and reliable. If it's only one of them, I would rather carry an extra USB stick which I can always format (I do).

[1]: https://help.ubuntu.com/community/Grub2/ISOBoot

motiejus··on Rufus: Reliable USB Formatting Utility
From wikipedia[1]:

> Multiple installs on the same device are not supported.

If one is limited to a single usb-stick per ISO, it's just easier to dd the installation image: run it the way it's (hopefully[x]) been tested by the vendors.

Ventoy is a different ballgame: drag & drop ISO file and boot from it. I tested it this morning with 3 things I carry around myself (debian-live, debian-installer, freebsd release installer), and it worked. 1 stick instead of 3, and I still have the remaining exFAT partition for other things. And a spare encrypted partition if I wanted to (I don't).

Regarding bugs -- it works or it doesn't for your distribution. I think it's remarkable what this, seemingly single developer, has achieved over a bit more than a year[2].

[1]: https://en.wikipedia.org/wiki/UNetbootin

[2]: https://github.com/ventoy/Ventoy/commit/2090c6fa978999d4ef1e...

[x]: don't get me started with Intel SSD firmware "bootable" images.

motiejus··on Rufus: Reliable USB Formatting Utility
I just wrote Ventoy to my megastick, wrote FreeBSD and Debian Install images, and it works. Debian Bullseye install image complains about low-memory mode, but the booted machine had >500MB still available. Abstraction breaks somewhere, I would love to know why/how.

Without diving into the source code. :) Has anyone seen architecture/design documents on how it actually mounts the ISO file and "boots" from it? What does prevent "the other 10%" from not working?

I looked through the docs, found these so far:

Memdisk[1] section mentions:

> In normal mode, Ventoy will only read the iso file at booting time, and only read the content needed for boot.

Ventoy Compatible?[2] mentions a hook. What does this mean?

> Once Ventoy treats the iso file as Ventoy Compatible, it will just make the virtual disk and will not do the hook.

[1]: https://www.ventoy.net/en/doc_memdisk.html

[2]: https://www.ventoy.net/en/doc_compatible_mark.html

motiejus··on Cars are about to be a software platform, subscriptions and all
I am one of them.

I can still start my engine if the battery is dead.

When I rent cars in Europe, I usually get 50/50 manual/automatic.

motiejus··on Signald: Unofficial daemon for interacting with Signal
I am running my own home server, everyone in my family has an account they use there (the domain is our last name). Non-techy people use it and like it (past the initial setup, since setting up a custom domain requires a few more clicks than :matrix.org account). I am not waiting for the day, though, when they will need to set up a new device without access to the old one because of E2E setup. I would like Matrix to provide a setting to advise UIs to not use e2e encryption for the same domain -- that's useless if you trust the home server (my family do trust my home server).

> I personally haven't met any "real" people who are even aware of Matrix. When I broached it with a non-IT friend, they were actively uninterested in unifying messaging applications as they had "facebook friends" and "whatsapp friends" and interacted with them differently.

I tried to sell it too with the "unify your messaging apps", but this is a wrong selling point to new users. First they need to start using matrix as their messaging app, realize that it works well, including VoIP and video calls. Once trust is there, only then start thinking about using bridges. Because there will be rough edges (e.g. federated voice/video calls do not work).

Because of the way bridges integrate to third-parties, they are not bug-free. Reliability is just not great yet. Maybe except a hosted service, Beeper[1], which is run by people who know most about these bridges and can provide support.

To sum up, I am using Matrix for my family network, and some bridges personally; I am not yet planning to spread the use of bridges beyond myself. Besides the encryption setup, I like the UI a lot. I also use gomuks[2] from time to time, which is a terminal matrix application. I have not stumped into server-side problems.

I am donating monthly to Tulir[3], the most prolific Matrix bridge developer (and, to my knowledge, co-founder of beeper). Because I started using Matrix thanks to his bridges.

Oh, and I love the Matrix sms bridge[4]. I set it up to see if it works, and I am not going back. It's great.

[1]: https://www.beeper.com/

[2]: https://github.com/tulir/gomuks

[3]: https://github.com/tulir

[4]: https://github.com/tijder/SmsMatrix

motiejus··on Feynman: I am burned out and I'll never accomplish anything (1985)
I do have small children, and, for like many others, I get to do my things when everyone are asleep. You seem to have interest (which means you have energy), but the problem seems to be finishing. I have the same issue.

I am maintaining a list of them in a notebook, and am trying to limit the number of them to not more than 8-10 at the same time. And I can only start a new one if I finish an old one.

Everything in that list is a task with a clear Definition Of Done, so I know when I can cross them out. Realistically, each of them would take from 4 hours to a week (assuming full-time). Over the years, many things got done. Slower than I'd like, surely, but I think a SaaS business will come out of those TODOs in a few years.

This way, things are moving forward (since I must complete something), but I am allowing myself freedom to switch effortlessly. That motivates to do *something* when the hour comes. :)

motiejus··on A new way to make maps with OpenStreetMap
It worked! Thanks for a swift turnaround.
motiejus··on A new way to make maps with OpenStreetMap
Is the author around?

Curiously, the editor does not render (well, it renders a black screen) in Firefox 78.9.0. I see this error in devtools:

    Uncaught SyntaxError: expected expression, got '=' protomaps.min.js:1:52669
    On props update af913d4d.0fa8ea22.js:1:7975 ReferenceError: protomaps is not defined

(Chromium is fine)
motiejus··on Why Lichess will always be free
Lwn.net does this right: the ads are non-intrusive, and are designed for the audience. Most frequently - hosting or datacenter space.
motiejus··on Neighbour manages to pollute the 2.4 ghz spectrum with his 120 IoT devices
Thanks! I will be much more explicit next time and avoid handwaving when offering "solutions". Will go read about zigbee.
motiejus··on Neighbour manages to pollute the 2.4 ghz spectrum with his 120 IoT devices
It has with proprietary protocols :)
motiejus··on Neighbour manages to pollute the 2.4 ghz spectrum with his 120 IoT devices
You may want to consider mqtt-based devices like tasmota or shelly, if you prefer off-the-shelf products.

I have a few dozen stock shellies in my apt., all controlled via mqtt. All of them are disconnected from the internet. Works well.

motiejus··on Surface Laptop 4
Is there a non-video technical description? Specs and connector placement pictures. :)
motiejus··on PostGIS – Spatial and Geographic Objects for PostgreSQL
If it is C or plpgsql, my algorithm has a chance to be included to upstream postgis. If it's rust, not a chance.
motiejus··on Butterick’s Practical Typography 2º Edition
I spent an evening reading this, it was enjoyable. It was more enjoyable than an "average" pre-covid entertainment I could get for $19. So I sent $19 for the author, all for a very enjoyable evening.

My favourites:

1. https://practicaltypography.com/system-fonts.html strong thoughts on Arial font.

2. https://practicaltypography.com/the-cowardice-of-brave.html very strong thoughts on Brave browser.

3. https://practicaltypography.com/websites.html author bashing hamburger menu (and some other current-day fashions). Although I disagree with custom fonts for websites -- fonts for that page alone are a whopping 713KB compressed. See https://danluu.com/web-bloat/

4. https://practicaltypography.com/why-you-should-pay.html meta: about paying for a free book.

There is also good educated advice on font recommendations. I also like his fonts, but don't have a use for them yet.

motiejus··on PostGIS – Spatial and Geographic Objects for PostgreSQL
I am writing an open-source line simplification algorithm[1] with PostGIS. So far it's a few hundred lines of SQL-like code[2], but it will grow.

I have never written anything serious in plpgsql, so this is my first non-trivial project. Writing in PostGIS is a strange mix of SQL (fully declarative) and a "real" programming language with variables, arrays, functions and loops. The mix is very interesting and requires getting used to. But doable.

Things I like so far:

- geometric functions are very robust and well documented. Reference manual[3] is amazing. Creating/editing/iterating over lines and polygons, detecting their features, is a breeze.

- good integration with QGIS -- I can see the result graphically on my desktop system very easily.

- I can even write tests[4].

Things I am worried about or don't like as much:

- The SQL/procedural mix requires a lot of getting used to, and sometimes "simple" things in a "real" programming language becomes complex here. E.g. I would love to have mutable linked-lists. Or moving data between "sql-world" (rows) to "plpgsql-world" (arrays and data structures) is non-obvious, and best references are, unfortunately, stackoverflow and scripts of others'.

- My program will run on a large data set (e.g. all rivers in a country or a continent). I will want to optimize it. There is an out-of-tree profiler[5], but "unofficial, out of tree" always adds risk.

- Biggest one: deep copies everywhere. Since plpgsql does not do any memory management, it is deep-copying everything. Sometimes (often in this algorithm!) I want to add a vertex to a line (=river bend); that always requires a full copy of the whole bend. When I know it will not be used and will be safe, I would like to say "I am mutating this geometry and I don't want a deep copy".

In general, I like it for algorithms. Though the moment it needs to hit performance-sensitive production, I believe I will re-do it in C (which, looking at the postgis source code, is quite write-able too).

[1]: https://www.tandfonline.com/doi/abs/10.1559/1523040987824417...

[2]: https://github.com/motiejus/stud/blob/master/IV/wm.sql

[3]: https://postgis.net/docs/reference.html

[4]: https://github.com/motiejus/stud/blob/master/IV/tests.sql

[5]: https://github.com/okbob/plpgsql_check

Edit: formatting

motiejus··on OpenBSD adds support for Coordinated Mars Time
(where/how) can I see the actual patch set, not only summary of modified files?

I have not worked with cvs, so it's non trivial to figure out.

motiejus··on Whistleblower: Ubiquiti Breach “Catastrophic”
Turris series.
motiejus··on We found and fixed a rare race condition in our session handling
That way I'd lose the GDPR opt-outs from the number of sites I've gone through the process.

Perhaps I should just accept the consent and remove cookies regularly, instead of being careful with the consent forms... Hmm, good idea.

← PreviousPage 3 of 5Next →