Better HN
topnewbestaskshowjobs
Log inSign up

anardil

123 karma · joined Apr 7, 2015 (11y ago) · 40 submissions

https://goto.anardil.net
Submissions

comment 4mo ago · link · parent

  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-

comment 10mo ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

I'll have to give this a try, thank you for the suggestion!

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Thank you! This is one of my favorites. User declared variables are next on the todo list, when I get back to it.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Wow, hello! This is my repository. I'm happy to answer any questions.

13.

Show HN: Configurable Pirate Insult Generator(pirates.anardil.net ↗)

3 points · by anardil · 3y ago · 1 comment

comment 3y ago · link · parent

https://anardil.net

D&D, tech, and scuba diving!

comment 3y ago · link · parent

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

comment 4y ago · link · parent

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

17.

Exploring scuba diving pictures with Matplotlib(anardil.net ↗)

1 points · by anardil · 4y ago · discuss

comment 4y ago · link · parent

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

comment 5y ago · link · parent

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)

comment 5y ago · link · parent

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

comment 5y ago · link · parent

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

22.

Show HN: Pacific Northwest Diving Gallery(diving.anardil.net ↗)

1 points · by anardil · 5y ago · 2 comments

23.

Tee in Haskell using streaming-bytestring(anardil.net ↗)

5 points · by anardil · 5y ago · discuss

comment 6y ago · link · parent

Shellcheck https://github.com/koalaman/shellcheck has excellent functional unit tests

25.

Implementing split in Haskell(anardil.net ↗)

2 points · by anardil · 6y ago · discuss

comment 7y ago · link · parent

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-

comment 7y ago · link · parent

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?

comment 7y ago · link · parent

Hyperscale Network Attached Storage!

Disclaimer: I work on Isilon

29.

AutoCLI: generate CLI menus for scripts(anardil.net ↗)

2 points · by anardil · 8y ago · discuss

30.

Dynamic Shell Scripting(anardil.net ↗)

16 points · by anardil · 8y ago · discuss

12