HNHacker News
TopNewBestAskShowJobs

anardil

123 karma · joined April 7, 2015

https://goto.anardil.net
submissionscomments
anardil··on GitFut – Your GitHub stats turned into a World-Cup-style player card

  No file found
  “gandalf-” isn't a valid GitHub username.
Not anymore you mean. It was 12 years ago and those accounts still exist

https://github.com/gandalf-

anardil··on Ask HN: Share your personal website
https://goto.anardil.net/ - Launchpad for all my other (16!) sites.

The main ones are:

https://diving.anardil.net/ - Scuba diving picture gallery; organized by timeline, common name, taxonomy, and more

https://dnd.anardil.net/ - Artifacts from my groups' D&D games

https://pirates.anardil.net/ - Pirate insult generator

https://alchemy.anardil.net/ - Morrowind (TES 3) alchemy calculator

anardil··on Unix core utilities implemented in Haskell
I'll admit it's mostly this way because I thought ExistentialQuantification sounded cool and wanted to give a try with classes - this could definitely be tidied up
anardil··on Unix core utilities implemented in Haskell
The rules were different in 2014 when I made my account! It's actually quite annoying because lots of 3rd party GitHub integrations puke immediately saying I have an invalid username.
anardil··on Unix core utilities implemented in Haskell
Thank you for the suggestion, I'll give this a whirl! I've fussed around with `--ghc-options '-optl-static -fPIC'` and the like in years past without success.
anardil··on Unix core utilities implemented in Haskell
You're right! Data.ByteString.Lazy is Word8 under the covers, so wide characters are truncated. tr takes a similar short cut. Swapping to Data.Text would fix that.

Where simplicity conflicted with compatibility, I've chosen the former so far. Targeting the BSD options and behavior is another example of that. The primary goal is to feel out the data flow for each utility, rather than dig into all the edges.

anardil··on Unix core utilities implemented in Haskell
Definitely. Depending on how long you've spent staring at the contents of /bin/ and /usr/bin/ you'll notice there are definitely some array or matrix oriented utils (or options) missing like column.

cut comes to mind as a difficult one. In C, you can just hop around the char buffer[] and drop nulls in place for fields, etc before printing. You could go that way a Data.Array Char, but that's hard to justify as functional.

anardil··on Unix core utilities implemented in Haskell
I'll have to give this a try, thank you for the suggestion!
anardil··on Unix core utilities implemented in Haskell
It definitely has some sharp edges. One advantage is skipping computations (and the IO they'd need) that don't end up getting used, which let's you do some clever looking things/ ignore some details. That's hard to take advantage of in practice, I think.

The other advantage is just deferring IO. For instance in split or tee, you could decide that you need 500 output files and open all the handles together in order to pass them to another function that will consume them. I'd squint at someone who wrote `void process_fds(int fds[500]);`, but here it doesn't matter.

anardil··on Unix core utilities implemented in Haskell
Thank you! This is one of my favorites. User declared variables are next on the todo list, when I get back to it.
anardil··on Unix core utilities implemented in Haskell
Performance (execution, memory) is generally in the same ballpark as the BSD versions, with some caveats specific to utils that do lots of in place data manipulation.

cut comes to mind as an example, slicing and dicing lines into fields quickly without a ton of copies isn't easy. Using Streaming.ByteString generally makes a huge difference, but it's extremely difficult to use unless you get can your mind to meld with the types it wants. Picking it up again months later takes some serious effort.

anardil··on Unix core utilities implemented in Haskell
Wow, hello! This is my repository. I'm happy to answer any questions.
anardil··on Ask HN: Could you share your personal blog here?
https://anardil.net

D&D, tech, and scuba diving!

anardil··on 30 years of Brainfuck
It's an interesting/challenging exercise to work through implementing some basic functions in BF, ie thinking only in loops.

I implemented an optimizing interpreter in Bash[1] on a plane ride, and it's still one of my favorite pet projects.

[1]: https://github.com/Gandalf-/BrainBash

anardil··on Ask HN: Share your personal site
https://goto.anardil.net/ My root dashboard, links to all other sites!

Some interesting sub-sites

https://www.anardil.net/ My blog on programming and CS projects

https://diving.anardil.net/ Scuba diving pictures + taxonomy + game

https://timelapse.anardil.net/ Raspberry Pi timelapse videos since 2019

https://sensors.anardil.net/ Raspberry Pi temperature sensor plotting

anardil··on Ask HN: Recommended Domain Registrars?
I can second this; I've been with them for 8 years without complaints and really appreciate the record detail masking for my .net domain
anardil··on Bash functions are better than I thought
You can take this even further by rewriting bash functions at runtime if you like. `declare` gives you direct access to the function body

https://www.anardil.net/2018/dynamic-shell-scripting.html (self plug)

anardil··on Web page that crashes the Chrome renderer
Strange that IE can handle it, no console errors or warnings. The head and body tags are empty on the page, so a blank render is expected
anardil··on Show HN: Pacific Northwest Diving Gallery
All the source is here - https://public.anardil.net/code/diving/

The site is completely static, served from a Nginx reverse proxy to Digital Ocean Spaces

anardil··on Against Testing
Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests
anardil··on Show HN: I built a poker site with Haskell
That'd be great! I saw some todos, but you'll have the best perspective on what's important. I'm https://github.com/Gandalf-
anardil··on Show HN: I built a poker site with Haskell
Very neat! I've been working on a network application in Haskell too; this is a great reference.

Is this project still active? Are there some features you'd like help developing?

anardil··on When setting an environment variable gives you a 40x speedup
Hyperscale Network Attached Storage!

Disclaimer: I work on Isilon

anardil··on Planet Shadertoy
60 FPS + negligible CPU on Chrome OS with Haswell though, interesting.
anardil··on ZFS 128 bit storage: Are you high? (2004)
A fully decked out Isilon cluster supports 68PB on a single file system.

https://www.emc.com/collateral/hardware/white-papers/h10719-...

anardil··on How many reversible integer operations do you know?
Reversible functions are important for cryptographic ciphers (encrypt, decrypt), as opposed to hashes which are one way functions.
anardil··on Show HN: A fast Brainfuck interpreter in pure Bash
I'm the author, feel free to questions!
anardil··on MedleyText
Vim, vimwiki and markdown accomplishes everything their homepage says Medley can do.

You decide the structure and the files, so you can throw it all in git to make it accessible anywhere.

anardil··on China tightens Great Firewall by declaring unauthorised VPN services illegal
It'll be interesting to see what new technologies develop to counteract these measures. Adversity fosters growth right?
anardil··on Usenet, what have you become? (2012)
A script like that would be completely feasible, but wouldn't that make it more popular? Isn't it's difficulty to set up what's keeping it under the radar?
Page 1 of 2Next →