HNHacker News
TopNewBestAskShowJobs

edwintorok

5,779 karma · joined February 19, 2013

Mastodon: https://discuss.systems/@edwintorok
submissionscomments
edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
Not my project, but the source code seems to be here https://github.com/ardov/huetone

If it seems useful to you try reaching out to them on a GitHub issue and see whether they'd be willing to implement the missing features or collaborate with you in another way.

edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
Colorbrewer2.org has a colourblind safe version. https://peterkovesi.com/papers/ColourMapsForColourBlindIAMG2... talk about designing colormaps in the colorspace of a particular colorblindness (instead of checking whether it is safe after the fact which is non-optimal). My very basic understanding of that is that it'd replace sRGB with a colorspace that represents a particular colorblindess and then uses the same algorithm it'd use on sRGB to obtain a nice scheme in the colourblind space (or at least as much as it is possible given the constraints/reduced gamut).

I am not colourblind though, so I can't vouch for how good these are in practice, but at least there is some systematic thought that went into the process instead of ad-hoc rules.

edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
You can use OKLch and APCA with that huetone website. See the gear icon in top right.

I don't think your efforts are obsolete though, the 2 approaches could be combined IIUC your approach is based on computing values based on color science, and the tool/website is a more visual approach, it won't design the colorscheme for you, but you can use it to validate the colorscheme, or tweak it after the fact.

edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
Zenbones allows to define custom color schemes by providing just a few base colours and overrides. You could try creating one based on penumbra to have both lightness contrast and distinct hue.

However note that it is quite difficult to get Zenbones work with existing colorschemes, I tried creating/tweaking one based on Zenburn, but in the end I had to go back to the original Zenburn because Zenbones just wasn't distinguishing enough for the various treesitter highlighting groups.

But perhaps some of the zenbones concepts could be combined with Penumbra in penumbra itself to have another variant in addition to the contrast++ one.

And as mentioned elsewhere there are scientific ways to produce colormaps that work for people with color vision deficiency too, so it'd be nice if that was addressed.

edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
Try https://huetone.ardov.me/ for a tool based on vision science guidance.
edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
I like that this uses OKLab instead of hsv/HSL that some colormaps use (which are not based on color theory).

It would be nice if this used the upcoming WCAG3 contrast algorithm https://www.myndex.com/APCA/ and ensured it's minimum contrast meets the recommended values there for body text, etc.

There is a tool that can assist in designing color maps taking APCA into account https://huetone.ardov.me/

For perceptually uniform colormaps see also https://colorcet.com/

edwintorok··on Show HN: Penumbra, a perceptually optimized color palette based on natural light
FWIW comments are quite an important part of reading code, it should not be hidden, at least when comments are used for documentation purposes. It shouldn't be as prominent as the main code, but should be pretty close to it. Very few color themes get this right.
edwintorok··on A Tiny Grammar of Graphics
You can also generate Vega(lite) JSON: https://vega.github.io/vega-lite/ And then pick your favourite language/library that generates that : https://vega.github.io/vega-lite/ecosystem.html If needed you can switch to a different library/language while keeping the end result the same (or use different libraries/languages for different parts of your visualization, depending on which is best at a particular task)
edwintorok··on How to pick the least wrong colors
Would BPCA[0] be a good compromise? If you pick color combinations that pass both the APCA defined level and the WCAG2 level then it should be "compliant on paper" with WCAG2, and actually readable in practice thanks to also being compliant with the new APCA levels.

[0] https://www.myndex.com/BPCA/

edwintorok··on PR to Merge Multicore OCaml
* exceptions for error handling: you can also use the 'result' type (an OK of 'a|Error of 'b type in the stdlib) if you don't like exceptions. At least the function's signatures will give more details in how it can fail and force you to handle the failures (or pass them through to your caller). Unfortunately you lose backtraces that way (though you can use wrappers like reword_error, or logging to give more details on what goes wrong, but backtraces can be convenient in locating the source of an error sometimes). A compromise is to use a wrapper like trap_exn (from Bos) that puts the exception with its backtrace in the Error type and then you propagate that...
edwintorok··on PR to Merge Multicore OCaml
In that case interoperability with Go libraries might be better: just running on the same runtime wouldn't bring many advantages (other than having a single GC instead of 2) without being able to easily call libraries written in another language. (Although TBH I'd run them as 2 separate processes and have them communicate via some form of RPC, OCaml would just need good integration with <insert-favourite-GO-rpc> protocol)
edwintorok··on PR to Merge Multicore OCaml
I think the challenge will be how to convert existing C FFI/stubs to work correctly with code that wants to take advantage of multicore(domain) capabilities.

i.e. previously some code could've in theory assumed it only ever gets called by one thread at a time due to the global lock (and that lock would get dropped in a controlled manner by the usual released/acquire). I don't necessarily mean just global state in the C stubs (I don't recall seeing many of those), but implicit global/shared state in the C functions called. Reading manpages will usually tell whether a given function is safe to be called (or when not there are sometimes _r variants that are). This is no different than when writing regular multithreaded C code, one has to be more careful about what functions they can safely call. (and in fact current OCaml code can already be multithreaded, so if the C stub was meant to work correctly with multithreaded OCaml code with C->OCaml callbacks then it should've already taken necessary precautions).

I like the approach taken wrt to backward compatibility of sequential code though: only code that wants to take advantage of multicore will need to audit its C stubs for safety, if you don't use multicore everything will work as before.

How do you recommend to find these kinds of multicore-specific bugs in existing (or newly written) OCaml-C stubs? Would tools like parafuzz help here?

edwintorok··on Exa - A Modern Replacement for ls
It would be better if it used fstatat instead of regular stat calls. On a deeply nested directory it can make a difference (e.g. a single-threaded 'find' easily beats a parallel 'fd' with warm caches on my machine, 'exa' could similarly benefit)
edwintorok··on SQLite Archive Files (2018)
Actually looks like if you pass multiple files to zstd it'll compress them individually, it won't create an archive, so tar or sqlite format would still be useful there.
edwintorok··on SQLite Archive Files (2018)
`zstd` and `zlib` as the only 2 supported formats would be enough for me (zstd for state of the art, fast compression and decompression, with choice of high compression ratios if needed; and zlib for backward compatibility/portability), but others may disagree and want their own favourite compression format there. OTOH if you use zstd that already has multiple file capability built-in, so you don't gain much by using sqlite (unless zstd were to adopt sqlite as.its storage format...).
edwintorok··on SQLite Archive Files (2018)
Would be interesting if this was expanded to support more compression formats. E.g. zstd. Gzip is quite an old format and zstd is a lot quicker to decompress.
edwintorok··on HiFive Unmatched – A RISC-V Linux development platform
Yeah I was sort of expecting to have accelerated crypto, given the EAR export declaratioj I had to sign in order.l to buy this. If the CPU doesn't have any crypto implemented, what does? Some signature checking in the firmware?
edwintorok··on HiFive Unmatched – A RISC-V Linux development platform
I have the Hifive Unmatched board with an AMD GPU and anything graphics related is extremely slow, to the point that launching and using a browser is unusably slow (I mostly use it via SSH). Might be related to the low amount of PCIe bandwidth available (AFAICT everything PCIe so both graphics and NVMe share a single x8 PCIe bus). Also there is a recent patch for the kernel that removes some unaligned memory accesses in copy_to/from_user which should speed things up, but I haven't tried the new kernel yet [1]

Nevertheless it is a useful board for testing software on RISC-V, e.g. I mostly use it to test the OCaml compiler and related programs on it.

[1] https://lore.kernel.org/lkml/mhng-423e8bdb-977e-4b99-a1bb-b8...

edwintorok··on Intel C/C++ compilers complete adoption of LLVM
https://ispc.github.io/ it is interesting that ispc is also LLVM based.
edwintorok··on Ask HN: Who is hiring? (August 2021)
Citrix | Senior Hypervisor Engineer, Software Engineer - Functional Programming, Lead Software Quality Engineer | Cambridge UK | Full-time | Hybrid ONSITE/Remote

Citrix's goal is to enable everyone to work from anywhere, any time, and on any device. Citrix Hypervisor (formerly XenServer) is a virtualization product built on top of the open-source Xen hypervisor and XAPI toolstack.

Tech stack: * C (hypervisor, kernel, userspace) * OCaml * Python * CentOS 7.x

For the "hypervisor engineer" role prior experience with a hypervisor is not necessary, we also welcome developers who have experience with kernel-level development. OCaml experience is not required for this role.

You'll have the opportunity to actively contribute to various open-source projects that are part of the product.

For more details and to apply see the job descriptions:

* https://jobs.citrix.com/job/R25636/Senior-Hypervisor-Enginee... * https://jobs.citrix.com/job/R27481/Software-Engineer-Functio... * https://jobs.citrix.com/job/R26236/Lead-Software-Quality-Eng...

Note: due to COVID-19 the interview and work will be remote, with a gradual return to office, see https://jobs.citrix.com/covid

edwintorok··on Yggdrasil – Early-stage implementation of an end-to-end encrypted IPv6 network
https://unsat.cs.washington.edu/projects/yggdrasil/ also the name of this tool.
edwintorok··on Orbit: an experimental platform for small tasks repeated over time
So this is the system described in [0], which I've been curious about for a while, but wasn't readily available. It'll be interesting to see how this compares or complements tools like Dendron. The style also reminds me of the fedwiki.

[0] https://notes.andymatuschak.org/About_these_notes

edwintorok··on Deliveroo shares drop 30% on UK IPO listing
Deliveroo takes a very high commission (54% in one case [0]), and that is a commission on the total order value, not the delivery charge! I was not aware that Deliveroo takes so much away from restaurants, had I known I would've used it less and preferred to order more directly from restaurants where possible.

I wouldn't have invested in Deliveroo anyway: the best possible scenario for Deliveroo was the pandemic, once it is over it can only go downhill from there, there isn't more room to grow than that. [0] https://www.facebook.com/the.olive.grove.cambridge/photos/a....

edwintorok··on My bank sent me 64 copies of the same debit card
Not just the US, the UK has credit scoring too, there I think 3 credit scoring agencies. When I moved here from Europe the entire notion of credit card and credit scoring was new to me. I still use my debit card whenever possible though, just spending enough on the credit card to avoid getting it cancelled due to not using it.
edwintorok··on Podman: A Daemonless Container Engine
I think FUSE limitations: fuse is served by a single userspace process, which is limited the same way as any other userspace process by ulimit. It is not a fundamental limitation of podman, just of podman's default rootless behaviour.
edwintorok··on Podman: A Daemonless Container Engine
If you run it as non-root it is significantly slower than docker as root. Docker can us the overlay2 kernel driver, whereas podkan would use fuse-overlayfs in userspace. This has a high CPU overhead (e.g. don't try to run AFL inside podman), and a 1024 FD limit for the entire container (so a 'make -j40' usually dies).

There are ways around it: raise the ulimit for your user and run new enough podman to raise limit for fuse-overlayfs, use the 'vfs' driver (it has other perf issues). I heard (but haven't tested yet) that the 'btrfs' driver avoids all these problems and works from userspace. Obviously requires an FS formatted as btrfs...

There are also compatibility issues with Docker. E.g. one container was running sshfs inside Docker just fine, but fails with a permission error on /dev/fuse with podman.

edwintorok··on FOSDEM 2021
I don't know what is with all the negativity here in the toplevel comments. I've downloaded the Android app and bookmarked quite a few talks that I'm looking forward to.
edwintorok··on RDRAND on AMD Ryzen 9 5900X is flakey
A better test is to use dieharder, see here: https://github.com/systemd/systemd/issues/18184#issuecomment...
edwintorok··on Zero-click, wormable, cross-platform remote code execution in Microsoft Teams
Could you clarify the "one of five" statement please? Are the other 4 vulnerabilities still unfixed, or they are fixed but a write-up is still pending? If there are still 4 unfixed RCE bugs in Teams I'd rather people uninstall Teams than wait for the fix...
edwintorok··on Transitioning from Docker to Podman
If you are running podman rootless it will use the fuse-overlayfs driver which comes with various limitations and is much slower than Docker:

* you are limited to 1024 FDs for your entire container. So running make -j40 usually ends up with various errors due to running out of file descriptors. You can of course raise the limit for your own user, but this may not be trivial on a shared system.

* getting podman to obey a raised user FD limit is non-trivial on CentOS 8. podman is not well supported on CentOS, you need latest Fedora if you want the various bugs/limitations fixed.

* fuse-overlayfs is a single process for the entire container and quickly becomes the bottleneck for any IO intensive operation (e.g. don't try running AFL inside podman, it'll be way too slow and peg the CPU at 99% running fuse-overlayfs).

Fuse shouldn't be necessary though if I could just give it access to the files that my user has access to (of course you'd loose the snapshotting/committing ability), perhaps using -v would improve performance?

Using docker on CentOS 7 was a lot easier (and faster) than using podman on CentOS 8.

← PreviousPage 2 of 26Next →