Login
You're viewing the mastodon.tn public feed.
  • Oct 25, 2026, 6:31 PM

    This last bit of debugging would be going so much easier if I could just figure out why there is a documented module named "Libraries.Utils.Octal" which doesn't actually exist in the standard library. mastodon.social/@mcc/117471914

    Maybe I should give up and write my own int-to-octal-string function.

    💬 2🔄 0⭐ 0

Replies

  • Oct 25, 2026, 7:34 PM

    So functional programming likes linked lists, and the standard way to build a list in ML derivatives (which includes Idris) is not a ".append" like in C, JS, Rust but newelement::list, i.e., a prepend operation. This means functional programming involves a lot of generating a list then reversing it.

    Anyway, what I've figured out is my automated solution search, now that it's finished, *actually* finds solutions which print *the target output, but backward*.

    Sigh.

    💬 2🔄 0⭐ 0
  • Oct 25, 2026, 11:38 PM

    Okay. Yes. Straightfoward. I intentionally left my output reversed because I needed to compare it to the target string rightmost-value-first, but then I forgot to reverse the target string. Pretty quick to find.

    This project is officially a

    FAILURE

    Because it took 12 days instead of the planned 7. If I'd finished it yesterday I'd have complained "that's 7 days, it's just dealing with PHP and '4' left me unable to work on it tuesday through friday" but it still took me two days once I resumed.

    AOC 2024 victory message. I have 22 "gold stars".
    💬 2🔄 0⭐ 0
  • Oct 25, 2026, 11:48 PM

    There turned out to be exactly 16 different integers that were correct solutions to my problem, and then one I found by hand was not the lowest. It appears I made a mistake on digit 3.

    I am now at 11/25 puzzles completed, 9/11 completed in the time limit. I think I am going to put this project down for a while, this one puzzle was brutal. Especially the second half.

    Pity, because my next two languages were Zig and MIR ( github.com/rust-lang/rustc_pub ) and I was legit really excited about those.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Oct 26, 2026, 12:00 AM

    It is my hope this is not the last time I use Idris. I feel I'm closer to Actually Getting the functor/applicative/monad distinction than ever before, and Idris is a good place to explore it, better than Haskell. However, as it is I think I'm only writing small "learning FP" programs in this language, as writing moment-to-moment practical code is just too metal-on-metal grinding painful.

    💬 1🔄 0⭐ 1
  • Oct 26, 2026, 12:03 AM

    The design of Idris is smart. The package ecosystem is good. This could be a good, useful language. But the base documentation and the error messages are just too lacking. The former is fixable (especially if the devs/community leaned less heavily on "make it work like Haskell, then assume everyone already knows Haskell") but the latter is more of an open question. In general, making a language with good compiler diagnostics is a harder problem than the rest of "making a language" combined.

    💬 3🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Oct 25, 2026, 7:43 PM

    @pkhuong @mcc unsure if it's in the prelude but idris does come with a snoclist implementation yeah

    alternatively, snoclists are a pretty good candidate for learning how to define a type in idris

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Oct 26, 2026, 12:57 AM

    @mcc I’ve always wanted to figure out the crazy functional stuff; it’s really interesting to see you tackle it. I wonder if Elixir or Gleam is any more do-able.

    💬 1🔄 0⭐ 0
  • Oct 26, 2026, 1:26 AM

    @noodlenog I would like to try Elixir or Gleam, and given their target audiences, I'm certain they're massively more approachable.

    💬 0🔄 0⭐ 0
  • Oct 26, 2026, 1:16 AM

    @mcc
    Rust would never have gotten all this traction if they hadn't done the work from the very star to get truly useful, informative error messages at every turn.

    Shows how even a very complex language becomes usable when it tells you what's going wrong and how you (probably) want to fix it.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0