Better HN
topnewbestaskshowjobs
Log inSign up

vbrandl

343 karma · joined Jul 5, 2017 (9y ago) · 92 submissions

Submissions

comment 2y ago · link · parent

I would guess OSM uses optimizations for eucledian graphs, where the path a->c is always shorter than a->b->c. This restriction makes e.g. TSP solvable. But this property does not hold for any generic graph. I don't know if this makes visualisation also easier.

comment 3y ago · link · parent

There is a virus written in awk that infects other awk scripts[0]. And according to wikipedia, the language is Turing complete.

[0]: https://github.com/SPTHvx/ezines/tree/main/dc5/CODES/Perfori...

comment 3y ago · link · parent

That's the point of EurKey. Special characters are the same as on the US layout with additional, language specific letters available. At least for writing English and German it has been great for me.

comment 3y ago · link · parent

Could you give some links or pointers (which city/building/year)? I know of the band but not that story.

comment 3y ago · link · parent

Sounds like a botnet with extra steps

comment 3y ago · link · parent

The linked paper is not my thesis but one of the foundational works, I based my thesis on. Mine can be found here: https://git.vbrandl.net/vbrandl/masterthesis/raw/branch/mast...

comment 3y ago · link · parent

PageRank and similar ranking algorithms on graphs can be used to detect monitoring attempts in P2P botnets [0] (a botmaster can detect when researchers/law enforcement start monitoring a botnet).

For my master's thesis, I evaluated these algorithms and tried to find ways to prevent detection and came to the conclusion that it is hard if you don't want to deploy about as much sensor nodes as the botnet has active peers. Those algorithms are working really well and are hard do work around.

[0]: https://doi.org/10.1145/3098954.3098991

comment 3y ago · link · parent

Maybe I did not use it as intended, but I have an app running on fly.io that exposed the metrics endpoint on another port as the webapp itself, so it is not publicly reachable. This app suddenly broke and I had to disable the metrics endpoint to get it running again. Since it is a toy project, I didn't investigate further but internally everything worked fine (the healthcheck got the expected 200 response) but the routing of external requests just broke.

Also when building and deploying an image, some non-obvious and undocumented changes are made. My app generates version information based on the git repository state. The build process deletes (or ignores, I don't know, never got an answer to my issue) the fly.toml file in the docker build context, which resulted in uncommitted changes and a "dirty" repository when building the app. My dirty workaround is to `git checkout fly.toml` in my dockerfile. It works but it isn't pretty...

comment 4y ago · link · parent

Since I have no use for it, I like to globally (not just in vim) map caps to ESC.

comment 4y ago · link · parent

I also applaud their user-respecting design choices. E.g. if your browser sets the DNT (do not track) header, they won't show a cookie consent banner and just assume you selected "reject all"

comment 4y ago · link · parent

Maybe cargo2nix? https://github.com/cargo2nix/cargo2nix

comment 4y ago · link · parent

In the end you could use nix to build docker/VM images and use the same, reproducible environment in prod/test/CI/dev/...

comment 4y ago · link · parent

One thing that differentiates nix from things like virtualenv is that each (package + version) tuple exists at most once in your local nix store and is then linked into your project environments, while virtualenv will install new copies of the packages. On the other hand you have to run the nix garbage collector to get rid of unused packages.

As for Windows support: It seems to be possible to use nix in WSL [0] but I've never tried that. I have used nix alongside apt and pacman on Ubuntu/Arch before I decided to go all the way and install the NixOS distribution. Using it alongside other package managers worked really well.

[0]: https://nixos.org/download.html#nix-install-windows

comment 4y ago · link · parent

If you are looking for a language agnostic version manager, the nix package manager [0] might be worth a try. In combination with lorri [1] you will be dropped into a shell with all required development dependencies available, when you enter the project directory. This does not only include the interpreter/compiler versions but also any other dependency you can think of, like specific libraries the project links against (well almost any, it has to be available as a nix expression, best case directly in upstream nixpkgs).

For me, it has come so far that I don't have any interpreters or compilers in my main OS environment and even for one off REPL sessions, I'll use `nix shell nixpkgs#python3 -c python3`.

[0]: https://nixos.org/

[1]: https://github.com/nix-community/lorri/

comment 4y ago · link · parent

Private feedback via email is always possible and you can chose to publish specific feedback you deem important. It's the same for printed literature. There is no comment section in books. As for sharing: you can always share the URL

comment 4y ago · link · parent

I learned typing on German QWERTZ, too. I started using eurkey [0] a few years ago. For me it hits the sweet spot between good position of special characters used for programming (it's effectively QWERTY in that regard) but with common European special characters easily available. So instead of dedicated keys for ä/ö/ü, it became AltGr+a/o/u.

The switch was not to hard and in the beginning I kept using my QWERTZ keyboard. After about a year I decided to stick with it and bought a QWERTY keyboard.

Having to switch back to the QWERTZ layout of coworkers is a little awkward but it's not too bad.

[0]: https://eurkey.steffen.bruentjen.eu/

comment 4y ago · link · parent

Fear and Loathing in Las Vegas, by Hunter Thompson if anyone is wondering

comment 4y ago · link · parent

Maybe by releasing often (every 6 weeks or out of band for bug fixes like this), they make it easier to use a current version of the compiler, in comparison to the old Java release cycle of multiple years.

Also testing the compiler against the whole ecosystem on crates.io before releasing a new version helps building trust in the backwards compatibility of new compiler versions.

So they are doing something to establish a culture where updating your compiler regularly is encouraged. I don't have actual numbers and I don't know how enterprise Rust shops handle their compiler versions, but they are doing things to encourage (not force) users to keep their compilers up to date.

comment 4y ago · link · parent

If the vessel was started at day, the earth was also pushed away from the sun

comment 4y ago · link · parent

~I'm not sure about the semantics, but the type would allow that, yes.~

Edit:

    fn scatter(&self, ray: &Ray, hit_record: &HitRecord) -> Option<(Option<Ray>, Srgb)>
The function takes a `Ray` as input, so you cannot render light without a ray. The return value might be one of the cases listed above.

The `None` case might be something like a black hole: a ray hits the object and nothing happens.

The `Some((None, Srgb))` case would be a non-reflective surface, it changes the color if hit by a ray but does not reflect the ray further.

The `Some((Some(Ray), Srgb))` case would be a reflective surface, that changes the color and reflects the ray.

Again not sure about the exact semantics and I didn't read the blog post yet, but that would be my guess.

comment 4y ago · link · parent

Option<(Option<Ray>, Srgb)> can be one of

- None

- Some((None, Srgb))

- Some((Some(Ray), Srgb))

Only the last one is equivalent to the struct you described

comment 5y ago · link · parent

Here is a small back of the envelope calculation. Websters dictionary includes 470.000 words [0]. 52 lower and uppercase letters + 10 digits + ~20 special chars = 82 possibilities. There are are 82^20 = 1.89 * 10^38 possible combinations for passwords consisting of 20 random characters. Picking 7 random words from Websters dictionary has 470.000^7 = 5.07 * 10^39 possible combinations. I'd argue that remembering 7 words is easier for most people, than remembering 20 random characters.

[0]: https://www.merriam-webster.com/help/faq-how-many-english-wo...

comment 5y ago · link · parent

I think that's intentional and meant as an example of the issue at hand.

comment 5y ago · link · parent

FYI:

> a meme is an idea, behavior, or style that spreads by means of imitation from person to person within a culture and often carries symbolic meaning representing a particular phenomenon or theme

From https://en.wikipedia.org/wiki/Meme

The concept of a meme is in no way limited to images.

comment 5y ago · link · parent

Best would actually be

#!/usr/bin/env sh

Since this binary is required by the POSIX standard to exist at that location.

comment 5y ago · link · parent

here's an example I had a few month ago: Password Requirements, merging of requirements and generating passwords that fulfill the requirements:

- merging/combining of requirements is a monoid operation with an "empty requirement" (e.g. one that accepts every password) as the neutral element. Finding this requirement, I could write properties for the monoid properties (a + b = b+ a, a + 0 = a, and so on) - when generating a password from a requirement, the same requirement must accept the generated password (`requirement.accept(requirement.generate()`)

In general: if you find mathematical rules to your code (commutativity, associativity,. ..), these make a great starting point for property tests.

comment 5y ago · link · parent

Not sure if there is any special LDAP functionality, I don't know of, but we use Gitlab CE with LDAP at work. Also looking at the feature comparison [0], I can't find any LDAP related features in the paid versions, that aren't available in the free version. Maybe the feature you are using has been moved to Gitlab CE. Then you can move to the free version.

[0]: https://about.gitlab.com/pricing/gitlab-com/feature-comparis...

comment 5y ago · link · parent

y2iw should copy without enclosing spaces. My mnemonic is "inner word" vs. "a word".

comment 5y ago · link · parent

More often than you'd think. There's a paper from black hat 2011 [0] where bit flips and domains with a small hamming distance were used. Take google.com and woogle.com which in their ASCII representation only differ by one bit. The paper showed that these domains will receive traffic for their intended counterparts because of bit flips in the RAM in DNS servers.

[0]: https://media.blackhat.com/bh-us-11/Dinaburg/BH_US_11_Dinabu...

comment 5y ago · link · parent

That might be the nail in the coffin for me, where I will stop using WhatsApp
1234