isti115

joined 2 years ago
 

I wasn't able to find any up-to-date information about tail call optimization support in Ruby, so I decided to post this hoping that it will pop up next time someone might also be searching for this topic...

What I was able to figure out is that TCO can be enabled in Ruby 3.4 via a compile option like so:

RubyVM::InstructionSequence.compile_option = {tailcall_optimization: true}

def tailSumUntil(n, m)
  n == 0 ? m : tailSumUntil(n - 1, n + m)
end

tailSumUntil(100_000_000, 0)
# => 5000000050000000
 

So, 10am PT instead of 8am PT. Here's a countdown, hopefully I managed to set it to the correct time: https://www.timeanddate.com/countdown/generic?iso=20250409T10&p0=137&msg=Framework+Laptop+12+Pre-order

[–] [email protected] 2 points 4 months ago* (last edited 4 months ago) (1 children)

I also like them (not as much as the originals, but there are some good ones among the new batch as well), luckily they seem to have returned back to normal!

[–] [email protected] 3 points 4 months ago* (last edited 4 months ago)

You mean it's only included in the Plus Max Ultra Platinum VIP Extra™ plan? 😀

10
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/[email protected]
 

I just logged in today and found that all stories seem to be gone from my path and the practice hub as well. 🙁 I really hope that this is only something temporary!


Edit: I just checked after about ~10 hours and they seem to have returned!

1
submitted 6 months ago* (last edited 6 months ago) by [email protected] to c/[email protected]
 

Feel free to share your solutions or browse others' for inspiration! Please tag your comments with the language you solved in to make it easier to search for specific languages in case we happen to get more comments than expected. 😀 I really hope that we can create some discussion here to liven up this community!

 

In preparation for this year's event I started to create a utility library and realized that I might not even need to care about decimal, or even fractional numbers, as I don't remember ever encountering them while solving a problem so far. Does anyone have any examples for problems which required using floating point calculations? Is it maybe even explicitly stated that they are not needed? (I remember that Google Code Jam had some statistical problems where the solution didn't have to be exact, just within an acceptable error margin, but that isn't likely to happen here, right?)

10
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

We're getting really close, which is great to see, as I'm going be teaching about graphics tools (GIMP for raster [maybe a tiny little bit of Krita as well], Inkscape for vector) at a workshop in November, and will be more than happy to show off the new non-destructive editing capabilities! :)

 

I remember that way back around 2015 the double XP boost used to stack, so you could get a 4x multiplier, but I don't think that I've ever got a triple.

 

It seems that they have accidentally posted the announcement earlier than intended, but it will probably show up later during the day.

[–] [email protected] 1 points 1 year ago (1 children)

Thanks for your input! To me it seems like Nemo only counts the direct descendants and doesn't recurse, which makes it less useful for this purpose, but still nice to know!

[–] [email protected] 3 points 1 year ago

Thank you for the idea! I didn't know about the --inodes flag before, this seems like a viable solution for systems where I can't / don't want to install additional software!

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Oh, wow, thank you! I had ncdu installed, but it was an older version, which didn't yet have this feature. Now that I updated to the newest (Zig based 🎉) release this looks perfect for my needs!

 

There are plenty of utilities (GUI, such as filelight and TUI, such as dua as well) for analyzing disk usage by space, but I would like to view my folders based on the count of files, as I'm making backups, and folders with lots of small files (e.g. node_modules) take very long to move around, so I guess that I'd be better of compressing those into a single file before archiving, as it's already highly unlikely that I'll need to access them anyway. Thanks for any pointers in advance!

[–] [email protected] 2 points 1 year ago (1 children)

Thanks! 😀 I've been meaning to post about that as well in order to keep feeding Lemmy with content, but couldn't find either an active alternative to ErgoMechKeyboards or Battlestations. 🤔

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Well, I'd suggest asking around your nearest toddler, that's how I managed to borrow this one. 😀 Probably it has been inherited through several generations, that might explain it's wisdom!

[–] [email protected] 7 points 1 year ago* (last edited 1 year ago)

Thanks for the advice, but lo and behold, the issue was actually caused by a newly introduced generic parameter not being defined after a dependency update. 🙃 Oh, the wonders of the JS/TS ecosystem...

[–] [email protected] 3 points 1 year ago

Whoa, I just checked out some images, that one is on another level as well for sure. 😀 If he's as good at fighting bugs as criminals, you're in good ~~hands~~ wings!

 

If the rolling wooden variant still turns out not to be enough, I might need to source a real live duck. 🦆 Not sure how patient that would be at listening to me explaining code though. 🤔

[–] [email protected] 2 points 1 year ago (1 children)

Let me preface this by clarifying that I don't claim to have the one and only right explanation that everyone should accept, I'd just like to point out that this theory also exists: https://hermeneutics.stackexchange.com/a/43799

[–] [email protected] 6 points 2 years ago* (last edited 2 years ago)

Yepp, "Lateral with Tom Scott, Episode 58: Straight-line sports" in case anyone's looking for it. https://lateralcast.com/

[–] [email protected] 2 points 2 years ago* (last edited 2 years ago) (1 children)

River is actually really nice! I have been a Sway user for multiple years before, but as it reached parity with i3, it was deemed "feature complete" (which is reasonable, as it was made to be a drop-in replacement), so I switched to Hyprland, but after making a small contribution I found the development too chaotic, so I started looking for something else.

I have been really happy with River. It still has some small shortcomings (e.g. minor visual glitches with fullscreening, and some less used options still missing), but the developers are very responsive on IRC (which I'm actually not a huge fan of, this was the first time I had to use it, but it's OK for what it is) and it being written in Zig is a huge selling point for me, as I don't have to write any C or C++ to extend it (my first PR is already on the way) when something I'd like to do is not yet possible.

If you're willing to spend a while getting to know it and setting up the environment (it relies on external programs for some functionality that is built-in in other compositors, such as monitor management), then I'd definitely say that it's worth a shot!

 

After getting a comment from the creator of kanata (an awesome piece of software by the way) that he found my story amusing, I figured that I'd also post it here, partly as fun, partly as a cautionary tale. Also, I'd appreciate any tips as to what to check for in my system, it's a weird feeling to know that some stuff might have been messed up under the hood.

 
view more: next ›