havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
prion has quit [Ping timeout: 265 seconds]
ur5us_ has quit [Ping timeout: 264 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
bsdbandit-01 has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
dfucci has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
thinkpad has joined #ruby
bsdbandit-01 has joined #ruby
iNs has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
coniptor has quit [Read error: Connection reset by peer]
coniptor has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
rzjian has joined #ruby
noboruma has quit [Ping timeout: 246 seconds]
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #ruby
noboruma has joined #ruby
somazero has quit [Remote host closed the connection]
Guest56536 has joined #ruby
ur5us has joined #ruby
bsdbandit-01 has joined #ruby
GodFather has quit [Ping timeout: 272 seconds]
ur5us_ has quit [Ping timeout: 264 seconds]
bsdbandit-01 has quit [Read error: Connection reset by peer]
reaVer has quit [Ping timeout: 240 seconds]
FrankyCyborg has quit [Quit: The Sleep Monster got me!]
reaVer has joined #ruby
baojg has joined #ruby
Guest56536 is now known as Pip
Pip is now known as Guest23574
Guest23574 has quit [Changing host]
Guest23574 has joined #ruby
coniptor has quit [Ping timeout: 264 seconds]
noboruma has quit [Ping timeout: 265 seconds]
GodFather has joined #ruby
coniptor has joined #ruby
noboruma has joined #ruby
rzjian has quit [Quit: WeeChat 3.0]
duderonomy has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
mroulston has joined #ruby
bsdbandit-01 has joined #ruby
helpa has quit [Remote host closed the connection]
yxhuvud has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Read error: Connection reset by peer]
helpa has joined #ruby
yxhuvud has joined #ruby
duderonomy has joined #ruby
dfucci has joined #ruby
gix has quit [Ping timeout: 260 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
dilated_dinosaur has quit [Ping timeout: 256 seconds]
sphex has quit [Ping timeout: 260 seconds]
dilated_dinosaur has joined #ruby
thinkpad has quit [Ping timeout: 256 seconds]
dfucci has quit [Ping timeout: 256 seconds]
sphex has joined #ruby
thinkpad has joined #ruby
ChmEarl has quit [Quit: Leaving]
mroulston has quit [Quit: Textual IRC Client: www.textualapp.com]
coniptor has quit [Ping timeout: 265 seconds]
ur5us_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 256 seconds]
coniptor has joined #ruby
Technodrome has joined #ruby
ur5us_ has quit [Ping timeout: 256 seconds]
duderonomy has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
orbyt_ has joined #ruby
prion has joined #ruby
sagax has quit [Quit: Konversation terminated!]
mroulston has joined #ruby
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
mroulston has quit [Quit: Textual IRC Client: www.textualapp.com]
naftilos76 has joined #ruby
coniptor has joined #ruby
naftilos76 has quit [Client Quit]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prion has quit [Ping timeout: 272 seconds]
m27frogy has quit [Ping timeout: 272 seconds]
apotheon_ has joined #ruby
dfucci has joined #ruby
apotheon has quit [Ping timeout: 260 seconds]
titanbiscuit has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
pwnd_sfw0 has joined #ruby
pwnd_sfw has quit [Ping timeout: 240 seconds]
pwnd_sfw0 is now known as pwnd_sfw
postmodern has joined #ruby
thinkpad has quit [Ping timeout: 246 seconds]
apotheon_ is now known as apotheon
thinkpad has joined #ruby
Rudd0^ has quit [Ping timeout: 246 seconds]
apotheon has joined #ruby
apotheon has quit [Changing host]
adu has joined #ruby
cowgomoo has quit [Ping timeout: 240 seconds]
Rudd0 has joined #ruby
meimeix has quit [Quit: Bye bye! <3]
meimeix has joined #ruby
powerhouse has quit [Read error: No route to host]
adu has quit [Quit: adu]
powerhouse has joined #ruby
cowgomoo has joined #ruby
thinkpad has quit [Ping timeout: 264 seconds]
thinkpad has joined #ruby
coniptor has quit [Ping timeout: 265 seconds]
coniptor has joined #ruby
<leftylink> any docs on how to change irb's colours? examples I find reference wirble which isn't installed for me, and https://docs.ruby-lang.org/en/2.7.0/IRB.html#module-IRB-label-Configuration is completely silent on the matter. the blue they use for numbers is completely unreadable for me and I must change it or my eyes are going to give out
<baweaver> I did something fun with pattern matching :D
meinside has joined #ruby
my_dude has joined #ruby
my_dude has quit [Client Quit]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prion has joined #ruby
al2o3-cr has joined #ruby
woorn has joined #ruby
wornt has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
<havenwood> leftylink: This isn't documented, and modifies a private constant, but... here ya go https://gist.github.com/havenwood/5409cbd4f2538accbb9c1a8c1f1329d3
<havenwood> leftylink: Gotta be a nicer way, but my stab at it from just looking at IRB::Color ^ works for changing default colors ¯\_(ツ)_/¯
<havenwood> leftylink: At least works throwing it in the .irbrc on my machine!
<havenwood> baweaver: Those pins...! So good! :D
<havenwood> I like full house the most. \o/
schaerli has joined #ruby
nofxx_ has quit [Read error: Connection reset by peer]
nofxx_ has joined #ruby
Technodrome has joined #ruby
prion has quit [Ping timeout: 272 seconds]
<havenwood> leftylink: Dunno why I didn't just reassign colors in the first each pass. I'm tired. :)
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
schaerli has quit [Ping timeout: 272 seconds]
cuerbot has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
<baweaver> VICTORY!
<baweaver> havenwood
Rudd0 has quit [Remote host closed the connection]
coniptor has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
<havenwood> baweaver: Hooah!
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
coniptor has joined #ruby
schne1der has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
thinkpad has joined #ruby
ur5us_ has joined #ruby
TomyWork has joined #ruby
s2013 has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
cnsvc has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jl4 has joined #ruby
akem has quit [Ping timeout: 246 seconds]
phaul has quit [Ping timeout: 264 seconds]
rubydoc has quit [Ping timeout: 240 seconds]
coniptor has quit [Ping timeout: 260 seconds]
rubydoc has joined #ruby
coniptor has joined #ruby
rubydoc has quit [Ping timeout: 256 seconds]
rubydoc has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
Guest23574 has quit [Quit: Ex-Chat]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jl4 has quit [Ping timeout: 256 seconds]
cnsvc has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
rubydoc has quit [Excess Flood]
rubydoc has joined #ruby
s2013 has joined #ruby
sagax has joined #ruby
blackmesa has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
phage has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
s2013 has quit [Client Quit]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
vondruch has joined #ruby
ur5us__ has joined #ruby
Rudd0 has joined #ruby
akem has joined #ruby
TzilTzal has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
jl4 has joined #ruby
ur5us__ has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
Technodrome has joined #ruby
coniptor has quit [Read error: Connection reset by peer]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
BSaboia has joined #ruby
<leftylink> havenwood: very good thank you, working. I will do that thing you mention where I reassign on the first pass
<leftylink> perfect
coniptor has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
akem has quit [Ping timeout: 272 seconds]
TzilTzal has quit [Ping timeout: 265 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rounin has quit [Ping timeout: 260 seconds]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
schaerli has joined #ruby
al2o3-cr has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
linoge has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
m27frogy has joined #ruby
akem has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
ZeroFux has joined #ruby
akem has quit [Ping timeout: 272 seconds]
coniptor has quit [Ping timeout: 264 seconds]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
somazero has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lachezar has joined #ruby
coniptor has joined #ruby
<Lachezar> Hey all. I have the unfriendly task to replicate the process of password resetting and invitation sending that is realised in the devise/password_controller etc. I'm not using Ruby, so I have to understand what it does.
<Lachezar> It seems to generate a random-ish unique-ish token, and then store its HMAC into the database, but I am lost there. Any pointers?
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
<Lachezar> Like who initialises the TokenGenerator and what is the key_generator?
fandre1986 has joined #ruby
<adam12> Lachezar: Do you have code examples?
BSaboia has joined #ruby
schaerli has quit [Ping timeout: 246 seconds]
cloud69 has quit [Quit: Connection closed for inactivity]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
dviola has quit [Quit: WeeChat 3.0]
Technodrome has joined #ruby
vondruch has joined #ruby
rzjian has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
adu has joined #ruby
blackmesa has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
somazero has quit [Quit: Leaving]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coniptor has quit [Ping timeout: 264 seconds]
* jl4 wonders about 'bundle exec ...
* jl4 e.g. .. 'jekyll build' vs 'bundle exec jekyll build' ?
<jl4> Umh... What are the differences ^^ (if there are) ? Pros and cons ?
Technodrome has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
TCZ has joined #ruby
phage has joined #ruby
phage has quit [Client Quit]
fandre1986 has quit [Quit: Connection closed]
vondruch has quit [Ping timeout: 240 seconds]
thinkpad has quit [Ping timeout: 272 seconds]
coniptor has joined #ruby
thinkpad has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
phage has joined #ruby
<c355e3b> bundle exec sets up the $LOAD_PATH before it runs jekyll
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
blackmesa has joined #ruby
cliluw has quit [Ping timeout: 256 seconds]
rzjian has quit [Ping timeout: 260 seconds]
phage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
wornt has joined #ruby
prion has joined #ruby
Lachezar has quit [Quit: leaving]
ZeroFux has quit [Remote host closed the connection]
woorn has quit [Ping timeout: 246 seconds]
ZeroFux has joined #ruby
BTRE has quit [Remote host closed the connection]
teclator has quit [Remote host closed the connection]
BTRE has joined #ruby
SeepingN has joined #ruby
schaerli has joined #ruby
teclator has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
woorn has joined #ruby
hsmath has joined #ruby
phage has joined #ruby
joast has quit [Quit: Leaving.]
wornt has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
phage has quit [Client Quit]
schaerli has quit [Ping timeout: 246 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
phage has joined #ruby
TCZ has quit [Quit: Confide In Me]
phage has quit [Client Quit]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
SeepingN has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
ChmEarl has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
thinkpad has quit [Ping timeout: 256 seconds]
thinkpad has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
dviola has joined #ruby
jl4 has quit [Ping timeout: 240 seconds]
cthulchu_ has joined #ruby
chamunks has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
moldorcoder7 has quit [Ping timeout: 256 seconds]
ZeroFux has quit [Ping timeout: 265 seconds]
bvdw has quit [Quit: Ping timeout (120 seconds)]
bvdw has joined #ruby
eddof13 has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
coniptor has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc_ has joined #ruby
moldorcoder7 has joined #ruby
adu has quit [Quit: adu]
TomyWork has quit [Remote host closed the connection]
jeromelanteri has joined #ruby
jeromelanteri has quit [Max SendQ exceeded]
jeromelanteri has joined #ruby
thinkpad has quit [Ping timeout: 256 seconds]
thinkpad has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
al2o3-cr-tmp has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
glaucio has joined #ruby
glaucio has quit [Client Quit]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
blackmesa1 has quit [Ping timeout: 264 seconds]
weaksauce has joined #ruby
schne1der has quit [Quit: schne1der]
croberts has joined #ruby
adu has joined #ruby
blackmesa1 has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
baojg has quit [Remote host closed the connection]
adu has quit [Quit: adu]
baojg has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
thinkpad has quit [Ping timeout: 240 seconds]
thinkpad has joined #ruby
jl4 has joined #ruby
venmx has joined #ruby
akem has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
howaboutyes has joined #ruby
<havenwood> jl4: Put another way, the `bundle exec` version uses the exact versions of gems from your Gemfile.lock and without will typically be the latest versions available globally, which may not work depending on the gems installed.
<jl4> nice to know , havenwood , c355e3b
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
baojg has quit [Remote host closed the connection]
gray-_-wolf has quit [Quit: WeeChat 3.0]
baojg has joined #ruby
howaboutyes has quit [Quit: Leaving]
BSaboia has joined #ruby
ChmEarl has quit [Read error: Connection reset by peer]
jl4 has quit [Ping timeout: 272 seconds]
Rounin has joined #ruby
jl4 has joined #ruby
Rounin has quit [Ping timeout: 272 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
cnsvc has joined #ruby
BSaboia has joined #ruby
noboruma has quit [Quit: Lost terminal]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lucasb has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
Rounin has joined #ruby
thinkpad has quit [Ping timeout: 260 seconds]
thinkpad has joined #ruby
cloud69 has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
thinkpad has quit [Ping timeout: 240 seconds]
thinkpad has joined #ruby
dfucci has joined #ruby
gix has joined #ruby
SeepingN has quit [Read error: Connection reset by peer]
dfucci has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
dfucci has joined #ruby
jl4 has quit [Ping timeout: 260 seconds]
queip has joined #ruby
dfucci has quit [Ping timeout: 272 seconds]
coniptor has quit [Ping timeout: 264 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
coniptor has joined #ruby
JanHebler[m] has joined #ruby
thinkpad has quit [Ping timeout: 256 seconds]
thinkpad has joined #ruby
ur5us__ has joined #ruby
ChmEarl has joined #ruby
dfucci has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 246 seconds]
al2o3-cr-tmp has quit [Ping timeout: 256 seconds]
romanlevin333236 has quit [Ping timeout: 264 seconds]
blackmesa1 has quit [Ping timeout: 272 seconds]
jwr has joined #ruby
<cloud69> Is it just me or could ruby-lang.org use a little facelift
* cloud69 ponders
<havenwood> cloud69: It's been that way a looong time!
<havenwood> cloud69: RubyGems has gotten a new look since.
<cloud69> Ah yes, looks slightly better that one :D
<cloud69> Although I get the feeling it tries to be a bit too futuristic for its own good. I like ruby-lang.org better in that regard - imho it looks more down to earth
al2o3-cr-tmp has joined #ruby
<cloud69> Also - I think both those sites should be identical
<havenwood> cloud69: Heh, my RubyGems page is certainly not down to Earth. You'd think I must have written at least one popular gem with 200M downloads, but nope, I'm apparently some sort of gem maintaining lurker. ¯\_(ツ)_/¯
<havenwood> cloud69: Yeah, I could see unifying the look, for sure.
<cloud69> hehe :D
ur5us__ has quit [Ping timeout: 264 seconds]
linoge has quit [Remote host closed the connection]
linoge has joined #ruby
ur5us has joined #ruby
TCZ has joined #ruby
linoge has quit [Ping timeout: 256 seconds]
<jwr> I'm building a docker container where I run `bundle install` in one stage, and then run COPY --from and copy the installed gems into a subsequent stage. And the expected files are all there, but bundler can't find them for some reason. Anybody know what I'm missing here? https://pastebin.com/raw/vxD6psBx
<ruby[bot]> jwr: as I told you already, please use https://gist.github.com
blackmesa1 has joined #ruby
kaleido has left #ruby [#ruby]
blackmesa1 has quit [Ping timeout: 240 seconds]
<scriptonaut> could someone explain to me why my map method isn't mapping the values? https://dpaste.com/ENBBA4HQK
<scriptonaut> oh wait
<scriptonaut> I'm passing x
<scriptonaut> I wrote an "each" method for a tree structure datatype I built. I am trying to now write a "breadth first" each method, however to do that I need to know the depth of the tree (right?). So I was planning on writing a map method for my tree, then I could map the leaves of the tree and call "max" on each of their depths
<scriptonaut> is the ruby array map method written from the each method? Or were they written completely separately
<havenwood> scriptonaut: Array mixes in Enumerable, which just requires that #each is defined for its methods to work.
<havenwood> scriptonaut: Array provides additional methods on top of Enumerable for ones that can be optimized or are Array specific.
<havenwood> scriptonaut: It's a normal practice to implement #each yourself then: include Enumerable
<scriptonaut> I implemented each, I'm not wondering if for most datatypes, people build map from each
<havenwood> scriptonaut: Enumerable would provide #map and #max for you, but you may need to also mixin Comparable for #max.
<scriptonaut> or is it the other way around?
<scriptonaut> ah, well the nodes on each tree are hashes
<havenwood> scriptonaut: Normally you implement #each yourself.
<scriptonaut> ok, so I've implemented each, my issue is I now want to implement map using each
<havenwood> scriptonaut: For #map, it most often suffices to include Enumerable and use the provided #map.
<scriptonaut> hmm maybe I'll try that
<scriptonaut> just include Enumberable in my class?
<havenwood> &>> class Foo; include Enumerable; include Comparable; def each; yield :foo; yield :bar end; def <=
<havenwood> >(other); 1 end; end; Foo.new.max
<rubydoc_> stderr: -e:6: syntax error, unexpected end-of-input, expecting `end'... check link for more (https://carc.in/#/r/a9ek)
<havenwood> oops
<havenwood> #=> :foo
<havenwood> scriptonaut: Yup
<havenwood> scriptonaut: And Comparable too for #max
<havenwood> "If Enumerable#max, min, or sort is used, the objects in the collection must also implement a meaningful <=> operator, as these methods rely on an ordering between members of the collection."
<scriptonaut> There's no de facto way of ordering the results
<scriptonaut> on the tree nodes
<havenwood> scriptonaut: Then how can there be a max?
<scriptonaut> the tree nodes can hold anything
<scriptonaut> well, in my case, I wanted to pass it a block that would have a comparison in it
<havenwood> scriptonaut: Ahh, you may want Enumerable#max_by
baojg has quit [Remote host closed the connection]
<scriptonaut> like: max(tree.leaves.map { |l| l.depth })
dviola has quit [Ping timeout: 260 seconds]
<scriptonaut> ah ok
<havenwood> &>> %w(albatross dog horse).max_by(&:size)
<rubydoc_> # => "albatross" (https://carc.in/#/r/a9el)
rapha has joined #ruby
<rapha> hi all!
<havenwood> scriptonaut: The return value of the block just then needs to be itself comparable.
<havenwood> rapha: hey!
baojg has joined #ruby
<rapha> hey havenwood :)
<rapha> how's it going, everybody getting through the pandemic alright?
<havenwood> rapha: I'm sick. :(
<rapha> oh :(
* rapha sends some herbal tea havenwood's way
<havenwood> rapha: Hopefully I don't have the plague. I wear a mask to even look outside. :P
al2o3-cr-tmp is now known as al2o3-cr
<rapha> well much more likely is you got a cold or ate something wrong
<havenwood> rapha: Yeah, getting through well. How about you? Any good Ruby?
<rapha> we had the same scare a few weeks ago
<rapha> hmm, Ruby stuff has been a little slow since a week or so before xmas
<rapha> some good C++ between the years tho :-D
<rapha> also, surprisingly, i'm taking a liking to Python ... gf has been learning how to program with it, and so i've been learning quite a bit about it, too
<rapha> but don't worry, it'll never dethrone Ruby
dviola has joined #ruby
<havenwood> rapha: I've been doing morning Elixir with my partner and now I'm accidentally typing `iex` instead of `irb` again. >.>
<rapha> Elixir? was that the "aka compiled Ruby" thing?
<rapha> oh interesting ... and looks much more approachable than Haskell
<havenwood> rapha: I find it really nicely done.
<havenwood> rapha: Here's my old stab at implementing its stdlib in Ruby just to learn https://github.com/havenwood/elixir.rb#elixirrb
<rapha> o_O
<rapha> ... and here i'm struggling to figure out how to have bundler install stuff by default into `gem install --user-install`'s dir ...
<rapha> there, take the star!
<havenwood> rapha: that bundler problem is harder, to be fair :P
<rapha> seems that way... inexplicably ... i mean, the do system installs. they do current-directory-installs. one does wonder, why not user-gem-dir-installs?
<havenwood> Elixir has some interesting new Enum and Stream functions that Ruby doesn't have. Ruby did borrow back some though since Matz seems fairly fond of Elixir.
<rapha> plot twist: he's only doing Elexir now in his free time, not telling anyone
<rapha> what's an "Atom", as per Elixir, havenwood?
<havenwood> rapha: Symbol would be the rough equivalent in Ruby.
<havenwood> Actually, quite similar.
<rapha> oic
<havenwood> rapha: In `iex` you can type like `Enum` then hit tab.
<havenwood> rapha: For docs: h Enum
<havenwood> rapha: h Enum.scan/2
dviola has left #ruby ["WeeChat 3.0"]
<havenwood> etc
<havenwood> rapha: To see all modules: Elixir.<tab>
<scriptonaut> havenwood: including enumerable gave me a map method, and I have NO idea how they managed to do that
<scriptonaut> with my each method
<havenwood> scriptonaut: Yup!
dviola has joined #ruby
<havenwood> scriptonaut: That's what Enumerable does and its common use.
<scriptonaut> I don't understand how they did it though
<scriptonaut> my each doesn't return the whole list of things
<scriptonaut> my tree has like 10 nodes, and calling each only returns the first 3 children
<scriptonaut> wonder if they used closures
<rapha> "All Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages" ... this'd be so awesome to program a microcontroller.
<havenwood> rapha: An Elixir Process isn't too dissimilar to a Ruby Ractor.
<rapha> more the "that are isolated and exchange information via messages" part, less the "whatever overhead that may incur" part
<scriptonaut> havenwood: do you know how enumberable uses the each method to create a map method?
<rapha> btw, we had this here tonight: https://en.wikipedia.org/wiki/Thundersnow ... first time in my life i ever got to experience such a thing. even had lightning!
blackmesa1 has joined #ruby
<scriptonaut> do they use clojures? Like: x = []; my_custom_datatype.each { |item| x << our_map_block.call(item) }
<havenwood> scriptonaut: I'd suggest looking at TruffleRuby's implementation, since the CRuby one is... C.
<havenwood> scriptonaut: But yes, you're on the right track.
<havenwood> rapha: Oh, wow -- yeah that is a profound feeling. Thor...
<rapha> but with SNOW!!!
<havenwood> oh, what?
<rapha> hence, thunderSNOW
saijanai has joined #ruby
<havenwood> rapha: Does the snow move with the thunder?
hsmath has quit [Quit: leaving]
<havenwood> I don't think I've seen that, actually.
<scriptonaut> my boss is getting mad that I'm spending so much time implementing maps from scratch and stuff because I really want to understand it
<scriptonaut> and I can't stand writing code like this when I'm not sure if it's the best way to do it
<rapha> havenwood: see the wikipedia article. there's thought to be 3 ways thundersnow can form, and all three are quite rare. if you happen to live in the US and there around the great lakes, it'd be a little more common.
<havenwood> scriptonaut: I'd suggest trying to implement all other Enumerable methods you're interested in with #reduce. See baweaver's talks for ideas. :)
<scriptonaut> do all each methods *always* return an array of items?
<scriptonaut> like I'm calling each on a tree, it's not really an array
<havenwood> rapha: I lived in Minnesota for a year, but don't recall seeing it ever.
<scriptonaut> should I be returning the original tree, or an array of all the nodes
<saijanai> Announcement: Dan Ingalls on interactive youtube tonight: https://www.youtube.com/watch?v=FpaTBoIwiBI
<havenwood> scriptonaut: You can reimplement them with #reduce to do that, but most return Arrays by default.
<scriptonaut> ok I suppose I'll try returning an array
<havenwood> saijanai: Neat!
<saijanai> Dan Ingals is recipient of the Grace Hopper Award for his work on the Smalltalk virtual machine and his invention of the bitblit (bitmapped graphics) protocol
<havenwood> That makes me miss MagLev...
Rudd0 has joined #ruby
blackmesa1 has quit [Ping timeout: 260 seconds]
dfucci has joined #ruby
<saijanai> Ingalls is currently part of the 2nd Generation Croquet project: https://www.croquet.io
<saijanai> meant to provide limitless scaling for FREE for collaborative 2D/3D/VR systems, eventually meant to become the new standard for the world wide web (3D internet)
<rapha> havenwood: apparently even to metereologists it's a special thing. i bet half of them in Germany are freaking out rn.
<saijanai> There's a fun video of a entwork metereologist in the middle of a storm with thundersnow. By the fourth or 5th strike he's literally jumping around screaming
<saijanai> OMGOMGOMGOMG etc
<saijanai> first time it was ever captured on camera, apparently
dfucci has quit [Ping timeout: 256 seconds]
saijanai is now known as YourNick
YourNick is now known as Guest31289
<phaul> &renick
rubydoc_ is now known as rubydoc
<rubydoc> okay
Guest31289 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest84 has joined #ruby
Guest84 has left #ruby ["Textual IRC Client: www.textualapp.com"]
prion has quit [Ping timeout: 246 seconds]
Technodrome has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
coniptor has joined #ruby
Lyubo1 has quit [Ping timeout: 256 seconds]
TCZ has quit [Quit: Confide In Me]
Lyubo1 has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
banisterfiend is now known as twinkytoes
<twinkytoes> f
twinkytoes is now known as banisterfiend
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
harlin has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
TCZ has joined #ruby
blender_ has quit [Quit: WeeChat 2.3]
cthulchu_ has quit [Ping timeout: 246 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]