havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
jenrzzz_ has joined #ruby
hwrd has joined #ruby
rvalue has quit [Ping timeout: 268 seconds]
eax_ has joined #ruby
whereiseveryone has joined #ruby
graemefawcett has joined #ruby
rvalue has joined #ruby
jenrzzz_ has quit [Ping timeout: 276 seconds]
meimei has quit [Remote host closed the connection]
pounce has quit [Remote host closed the connection]
meimei has joined #ruby
pounce has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
Vonter has quit [Ping timeout: 260 seconds]
reset has joined #ruby
Vonter has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
grenierm has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ruby
marlasinger has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
finsternis has quit [Remote host closed the connection]
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
reset has quit [Quit: reset]
_ht has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
___nick___ has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 268 seconds]
osc4rpt has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 268 seconds]
___nick___ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
dalan038228335 has quit [Quit: dalan038228335]
nmollerup has joined #ruby
dalan038228335 has joined #ruby
jenrzzz has joined #ruby
ua__ has quit [Ping timeout: 252 seconds]
Vonter has quit [Ping timeout: 256 seconds]
Vonter has joined #ruby
ua_ has joined #ruby
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
ollysmith_ has quit [Quit: ZNC 1.8.2+deb4+b1 - https://znc.in]
ollysmith has joined #ruby
gemmaro has joined #ruby
ollysmith has quit [Client Quit]
ollysmith has joined #ruby
grenierm has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 264 seconds]
osc4rpt has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
johnjaye has quit [Ping timeout: 256 seconds]
johnjaye has joined #ruby
johnjaye has quit [Ping timeout: 260 seconds]
johnjaye has joined #ruby
jenrzzz has joined #ruby
hightower2 has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
gemmaro has quit [Remote host closed the connection]
jenrzzz has joined #ruby
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
user71 has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Goodbye_Vincent has quit [Quit: ]
Goodbye_Vincent has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
infinityfye has joined #ruby
jenrzzz has joined #ruby
reset has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
hightower2 has joined #ruby
jenrzzz has joined #ruby
victori has quit [Ping timeout: 272 seconds]
victori has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jas-maelstrom has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jas-maelstrom has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
the9ine has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
desnudopenguino has quit [Read error: Connection reset by peer]
desnudopenguino has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
rvalue has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
pkal has joined #ruby
rvalue has joined #ruby
<pkal> Hi, is it true that Ruby has some map-like functionality that applies a function as many times as the depth of an element in a list?
<pkal> So [a, b, c, ...] maps to [a, f(b), f(f(c)), ...]
osc4rpt has quit [Ping timeout: 240 seconds]
<adam12> pkal: That doesn't look super familiar.
jenrzzz has joined #ruby
osc4rpt has joined #ruby
<adam12> pkal: You could probably make something your self by chanining some enumerable methods.
<pkal> I can imagine, but the reason I am asking is that some lecture notes I am reading are referencing this feature in Ruby (a language I barley ever used) and calling it a "generalised Horner's scheme", and I am wondering what this is supposed to be.
<leftylink> yeah that's like... a mix of Enumerator.produce and Enumerable#map
<adam12> ary.map.with_index { |el, idx| idx.times.reduce(el) { |obj, memo| f(memo) } } or something.
<adam12> Maybe someone else recognizes it
<adam12> bbl
<pkal> The name "tri" is used, but I couldn't find anything with that hint.
osc4rpt has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
osc4rpt has joined #ruby
<leftylink> another thing that is lacking that would make that ergonomic is a composition operator or something. the composition would have to be manually done
<leftylink> by making a function that calls the previous + the original once more
<leftylink> so I guess you take that, put it in Enumerator.produce, and zip the result with the list of elements
jenrzzz has joined #ruby
<leftylink> the operation seems pretty rare. even Haskell iterate only takes a single starting element. iterate f x == [x, f x, f (f x), ...]
<leftylink> so to do this in Haskell you'd have to do some weird shit like zipWith ($) (iterate (f .) id) [a, b, c]
<leftylink> well now you see why I say in Ruby this would involve Enumerator.produce and zip, since iterate is just Enumerator.produce
jenrzzz has quit [Ping timeout: 255 seconds]
barak has joined #ruby
barak has quit [Remote host closed the connection]
jenrzzz has joined #ruby
joako has quit [Quit: quit]
joako has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
crankharder has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
johnjaye has quit [Remote host closed the connection]
johnjaye has joined #ruby
jenrzzz has joined #ruby
crankharder has quit [Ping timeout: 276 seconds]
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
crankharder has joined #ruby
___nick___ has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
crankharder has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby
jenrzzz has joined #ruby
user71 has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 268 seconds]
szkl has quit [Quit: Connection closed for inactivity]
_ht has quit [Remote host closed the connection]
jenrzzz has joined #ruby
crankharder has quit [Ping timeout: 268 seconds]
johnjaye has quit [Ping timeout: 255 seconds]
johnjaye has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
crankharder has joined #ruby
crankharder has quit [Quit: Lost terminal]
FetidToot has quit [Ping timeout: 272 seconds]
FetidToot has joined #ruby
reset has quit [Quit: reset]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
gramps has quit [Ping timeout: 264 seconds]
hightower2 has quit [Remote host closed the connection]
gramps has joined #ruby