Skip Navigation

Posts
31
Comments
343
Joined
2 yr. ago

  • I'm rather spoiled by python, so I feel like it could be more elegant. xD

    But yeah, I do like how this one turned out, and nim runs a whole lot faster than python does. I really like nim's "method call syntax". Instead of having methods associated with an individual type, you can just call any procedure as x.f(remaining_args) to call f with x as its first argument. Makes it easy to chain procedures. Since nim is strongly typed, it'll know which procedure you mean to use by the signature.

  • Nim

    This one was pretty simple, just parse the numbers into sets and check the size of the intersection. Part 2 just made the scoring mechanism a little more complicated.

  • My solution for day 1 part 1 was simple and to the point. The other ones are getting increasingly less so. You're right that sometimes it's best not to get too fancy, but I think soon I may have to break out such advanced programming techniques as "functions" and maybe "objects", instead of writing increasingly convoluted piles of nested loops. xD

  • I actually just learned about scanf while writing this. Only ended up using it in the one spot, since split worked well enough for the other bits. I really wanted to be able to use python-style unpacking, but in nim it only works for tuples. At least without writing macros, which I still haven't been able to wrap my head around.

  • I'm not doing anything too fancy here, just the first stuff that comes to mind and gets the job done. The filterIt template was pretty handy for part 1, though. I assume at some point in these puzzles I'll have to actually write some types and procedures instead of just using nested loops for everything.

    I think it's a pretty cool language overall. I've only used it for one project so far, so there's a bunch that I still don't know. Haven't been able to wrap my head around how macros work, for example, though I've sort of figured out how to write really basic templates.

  • Oh wow, I guess it doesn't take too much. I copied your survey post over to r/nim with a "cross-posted from nim@programming.dev" link, and also invited the author of Enu to post here. I'll keep at it.

  • Alright, not a bad idea.

  • I imagine they'd also want to have something you can click that shows how many votes were local, how many were from other instances, how many were blocked, etc.

    Actually, that would be really cool and worth doing regardless. Have a voting statistics view for each post where upvotes and downvotes are broken down per instance, and maybe by other criteria too. @ernest

  • Least active communities

    • !nim

    qq

    I haven't been working on my nim project lately, so I haven't had much to say. I've been missing using the language, though.

    I resubscribed to r/nim on reddit just now, so if I see anything particularly interesting there I'll cross-post it.

  • Might be interesting to have per-instance weighted voting. So local votes would count as 1x, votes from other instances could count as 0.5x, and votes from that one instance that has a lot of vote brigading would count as 0x. Would be useful for smaller, specialized instances that tend to get harassed by outsiders.

  • Back in the day facebook only had a like button and people demanded a dislike button. I don't know what facebook thought internally.

    😆

  • Microsoft-chan, you're such a tsundere. I know all about your "Windows Subsystem for Linux". ¬‿¬

  • Interesting. I was thinking more of gray area stuff than outright lying, like playing up the importance of facts that support one's position and downplaying those that don't.

  • I read somewhere a while back that it's supposedly an evolutionary thing. In a social competition for resource allocation, confidently arguing your position regardless of its correctness is more beneficial than admitting you may be wrong.

    It's probably exacerbated by the internet, where the relative anonymity and psychological disconnection further reduces any benefits to admitting to an error.

  • Did you ever get this working? I set up 23.05 recently on one of my machines, and my Dualsense controllers worked fine though the KDE bluetooth app once I enabled bluetooth in configuration.nix.