News for hackers. Stuff that matters.

anardil

  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-

Re:Ask HN: Could you share your personal website here? on Wednesday January 14, 2026 @04:16PM (#46623582)
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

Re:Unix core utilities implemented in Haskell on Monday November 04, 2024 @03:01PM (#42045476)
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
Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @02:45PM (#42035593)
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.
Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @11:46AM (#42034111)
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.
Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @11:27AM (#42033961)
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.

Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @11:14AM (#42033871)
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.

Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @11:00AM (#42033776)
I'll have to give this a try, thank you for the suggestion!
Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @11:00AM (#42033774)
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.

Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @10:53AM (#42033734)
Thank you! This is one of my favorites. User declared variables are next on the todo list, when I get back to it.
Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @10:52AM (#42033731)
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.

Re:Unix core utilities implemented in Haskell on Sunday November 03, 2024 @07:41AM (#42032718)
Wow, hello! This is my repository. I'm happy to answer any questions.

Show HN: Configurable Pirate Insult Generator

https://pirates.anardil.net/

Arr HN! I had a need for pirate themed insults for a D&D campaign last year and put together a generator using recursive templating. Generations are scored on a couple axes (vulgarity, viciousness, intelligence) so the output can be tailored to a particular situation. There isn't any AI at work here.I have a new blog post with a lot more detail on how it...

( Read More... | 1 comment | on HN )
Re:Ask HN: Could you share your personal blog here? on Tuesday July 04, 2023 @05:45PM (#36592903)
https://anardil.net

D&D, tech, and scuba diving!

Re:Weird Ones: 30 years of Brainfuck on Saturday January 14, 2023 @06:28PM (#34385153)
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

Re:Ask HN: Share your personal site on Wednesday April 06, 2022 @07:05PM (#30938556)
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

Re:Ask HN: Recommended Domain Registrars? on Tuesday December 21, 2021 @01:10AM (#29634512)
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
Re:Bash functions are better than I thought on Sunday October 31, 2021 @04:32PM (#29060130)
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)

Re:Web page that crashes the Chrome renderer on Saturday April 24, 2021 @10:46PM (#26929959)
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
Re:Show HN: Pacific Northwest Diving Gallery on Thursday April 01, 2021 @11:57AM (#26662204)
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

Re:Against Testing on Friday July 10, 2020 @12:57AM (#23788284)
Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests
Re:Show HN: I built a poker site with Haskell on Friday August 09, 2019 @02:35PM (#20657126)
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-
Re:Show HN: I built a poker site with Haskell on Friday August 09, 2019 @10:29AM (#20654659)
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?

Hyperscale Network Attached Storage!

Disclaimer: I work on Isilon

Older »