HNHacker News
TopNewBestAskShowJobs

edwintorok

5,779 karma · joined February 19, 2013

Mastodon: https://discuss.systems/@edwintorok
submissionscomments
edwintorok··on Deprecating scp
IIUC the `scp` cmdline will still exist it'll just use the sftp protocol behind the scenes instead of the eco protocol. Note that the deprecation is about the protocol not the cli.
edwintorok··on Using TLA+ in the Real World to Understand a Glibc Bug
Worth pointing out that the bug is still present in latest glibcs (I can reproduce it on Fedora 33), and affects programs that use pthread_cond_signal, in particular language runtimes like OCaml, Python and .NET that have a global runtime lock.

Bugreports:

* Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1889892

* Ubuntu: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1899800

Also see https://github.com/mratsim/weave/pull/58/files

edwintorok··on The database I wish I had
I think it is a common misconception that banks use database transactions the old fashioned way. They seem to be more like eventual consistency. I initiate a transfer and there is some check about available balance (although with various overdrafts, etc. it is unclear how strict), then it is marked pending and eventually the transaction succeeds or fails days later (an international transaction).
edwintorok··on Malloc Geiger Counter
As mentioned below it can deteriorate over time. A while ago I had a RAM stick fail. I noticed because GCC started segfaulting randomly and I haven't upgraded GCC recently. Sure enough a memtest revealed the fault. I think it didn't have enough cooling.

I only purchased RAM with heatsinks since then, and I didn't have such problems anymore (also my latest case has much better airflow)

edwintorok··on Recursive, a free variable font for code and UI, now on Google Fonts
Since we're onto recommendations, I've been using 'Go Mono' for a while: https://fontlibrary.org/en/font/go-mono https://blog.golang.org/go-fonts

Wish the 'Recursive' font had a 'Slab-Serif' slider too, would've been interesting to compare.

edwintorok··on What’s New in Thunderbird 78
Gnome's Evolution is quite good as well and the built-in exchange support for both email and calendar via EWS works better than the thunderbird plugin. I used to use thunderbird, but after several troubles with the exchange plugin (e.g. meetings on Fridays disappearing) and calendar not working properly I switched to Evolution where it just works.
edwintorok··on Stealing secrets from developers using WebSockets
DNS rebinding can be fixed at the DNS server level. OpenWRT has an option for it. But this websocket thing in browsers can't easily be turned off/mitigated AFAICT.
edwintorok··on Why does musl make my Rust code so slow?
If both sides of the comparison run inside Docker that is still a valid comparison. With Docker the benchmark should be a bit more reproducible by anyone.
edwintorok··on Why does musl make my Rust code so slow?
I had the opposite experience. Jemalloc uses a lot less (virtual) memory, especially with multithreaded applications. The glibc allocator wastes quite a lot of memory mappings from a thread and never cleans them up even if a thread only had a burst of allocations (there is an upstream bug open about, they don't consider it a leak)
edwintorok··on Would You Have Fallen for This Phone Scam?
One day almost all the phones started ringing in the office one by one. Turns out someone/some automated system started dialing our phone numbers one by one with the above Chinese message scam. At that time I realized I never needed my office phone before and unplugged it. Problem solved.
edwintorok··on Khronos Announces OpenCL 3.0
Mesa still hasn't implemented OpenCL 2.x ... now they don't have to. Although applications like Folding@home don't really work with OpenCL as provided by Mesa, so it'll likely have to be updated to work with the 3.0 ~= 1.2 version.
edwintorok··on Monorepoize – Bash scripts for creating a monorepo out of smaller repos
Once your code grows and you end up with too many repos you'll be yearning to get back to monorepos. It allows to make changes in one go instead of having 3-4 PRs that all have to be merged at same time or otherwise the build breaks.

Having separate repos only makes sense if they are maintained by separate teams with a well defined API in-between that doesn't change often. If the same team maintains all repos then it is just overhead, especially if you end up with a 100 repos and you have significantly less than 100 engineers in your team.

There are also potential build time savings when having a monorepo since you can do parallel builds across different subdirs without serialising at package boundaries.

edwintorok··on Disabling Snaps in Ubuntu 20.04
It used to work, with the latest update audio doesn't work anymore in Chromium (although it does see the device), I'll have to report a bug. (snap connections does show audio-record connected)
edwintorok··on A possible new back end for Rust
Worth mentioning other alternative small backends: http://c9x.me/compile/
edwintorok··on A possible new back end for Rust
The semantics of C aren't very well defined, there is a lot of ambiguity in the form of undefined and implementation defined behaviour. This ambiguity is often needed to build an efficient optimizing compiler.

When you have a higher level language with more accurately defined semantics, running it all through C would risk introducing undefined behaviour.

With an IR you can control and define the semantics more closely to what your language needs.

edwintorok··on SYN cookies ate my dog – breaking TCP on Linux (2018)
I've noticed some issues a while ago with TCP syn cookies breaking DLM cluster setup of 64 hosts. (63 hosts all trying to join the same cluster generate enough TCP traffic that the kernel thinks it is a flood and starts sending syn cookies, but then the DLM join of some hosts doesn't actually complete). This can be worked around by increasing the backlog (one of the mitigations listed in this article):

  --- a/fs/dlm/lowcomms.c
  +++ b/fs/dlm/lowcomms.c
  @@ -1209,7 +1209,7 @@ static struct socket   *tcp_create_listen_sock(struct connection *con,
   log_print("Set keepalive failed: %d", result);
  }
 
  - result = sock->ops->listen(sock, 5);
  + result = sock->ops->listen(sock, 128);
This is mostly a theoretical issue, because upstream RHEL used to support only up to 16 hosts in a cluster.
edwintorok··on Kick the Shit Out of Procrastination
There is an alternative method called Flowtime: https://zapier.com/blog/flowtime-technique/ where you focus on a task until you feel you need a break (I think it is still crucial that you don't let yourself get distracted during this).

Another alternative is to treat the 25m as a minimum time in Pomodoro: if you are tired or have reached a natural break point for your task then stop. If you're in the flow continue.

You may want to enforce a maximum amount of time for health reasons (e.g. to get up from your chain every now and then).

edwintorok··on “C is how the computer works” is a dangerous mindset for C programmers
Wouldn't something like Rust meet your performance concerns?
edwintorok··on OpenSilver – a plugin-free, open-source reimplementation of Silverlight
At least you can sandbox and run webassembly everywhere with an open interpreter/JIT. With plugins you have to trust and install some binary code on your system, no sandboxing, no idea what it does and what it can access, etc. Much worse.
edwintorok··on Securing Firefox with WebAssembly
Exactly my thoughts when I first read of WASI: conceptually you could now have a WASI runtime ("OS") and an HTML.wasm potentially independently developed and swappable. And since WASI is a lot smaller surface, it is easier to audit, test, reimplement, etc.
edwintorok··on The first chosen-prefix collision for SHA-1
> security level 2 (defined as 112-bit security) in the latest release (Debian Buster); this already prevents dangerous usage of SHA-1

FWIW this doesn't apply to Fedora currently, because it has a patch that re-enables SHA-1 in security level 2 in non-FIPS mode: https://src.fedoraproject.org/rpms/openssl/blob/master/f/ope...

edwintorok··on Measuring mutexes, spinlocks and how bad the Linux scheduler is
Note that by default kernel.sched_rt_runtime_us limits RT usage to 95% of the whole system, not an individual core. If you have 1 RT process using 100% of a core on a multicore system it won't trigger the limiting, which can cause all sorts of problems (like network interrupts not getting serviced if your process happened to hog the core used by network interrupts). This can be worked around by writing NO_RT_RUNTIME_SHARE to /sys/kernel/debug/sched_features, which then makes the 95% limit apply on each logical core, not the system as a whole.

See here for more details: https://access.redhat.com/documentation/en-us/red_hat_enterp...

edwintorok··on A Desperate Plea for a Free Software Alternative to Aspera (2018)
Would QUIC or TCP with BBR congestion control help?
edwintorok··on Category Theory for Programmers (2014) [pdf]
Another interesting one about databases and category theory: Relational algebra by way of adjunctions: https://dl.acm.org/citation.cfm?id=3236781
edwintorok··on Category Theory for Programmers (2014) [pdf]
You linked to the 1166.pdf twice, did you mean to link to http://math.mit.edu/~dspivak/informatics/notes/unorganized/P... for "Category Theory as Unifying Database Formalism"?
edwintorok··on Just Delete Me – A directory of direct links to delete your account
It could be that they store your data all encrypted, and when you want it deleted they just delete the encryption key from a few well defined places. That way there is less need to mess with backups, etc.
edwintorok··on Show HN: Dat-keyserver: a distributed PGP keyserver based on the Dat protocol
GnuPG generates a revocation certificate when you're creating a new key, import that and it requires no interaction from you or the keyserver operator. And it works even if you've forgotten the passphrase of your GPG key. Obviously you don't want to put that file anywhere public, and if it gets compromised you can just publish the file to the keyservers yourself and generate a new key.
edwintorok··on My Home Lab Server with 20 Cores / 40 Threads and 128 GB Memory
Unfortunately it is quite common that servers are slower to boot than desktops if it has a lot of CPUs, or a lot of memory, or just a very slow BIOS impl that spends a lot of time probing and initializing everything. Servers with hundreds of cores are a lot slower to boot than my laptop too.
edwintorok··on Side channel that leaked data from Intel CPUs patched by silent Windows update
Meltdown rate was quite a bit higher than the other exploits.
edwintorok··on Side channel that leaked data from Intel CPUs patched by silent Windows update
JavaScript can run code on your computer, and used to be possible to get accurate timings out of it.
← PreviousPage 3 of 26Next →