adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
drincruz_ has joined #ruby
gggp has quit [Remote host closed the connection]
gggp has joined #ruby
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmcgnh has quit [Read error: Connection reset by peer]
orbyt has joined #ruby
jmcgnh has joined #ruby
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz_ has quit [Ping timeout: 258 seconds]
shokohsc has quit [Read error: Connection reset by peer]
shokohsc has joined #ruby
Rounin has quit [Ping timeout: 255 seconds]
mewfree[m] has joined #ruby
neshpion has joined #ruby
lad has quit [Ping timeout: 240 seconds]
drincruz_ has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
qunzhong_luxian has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
qunzhong_luxian has quit [Ping timeout: 256 seconds]
<nakilon> rg do you think ractor would be faster?
<nakilon> honestly idk why his snippet was slow
mrkz_c has joined #ruby
drincruz_ has quit [Ping timeout: 256 seconds]
drincruz_ has joined #ruby
ur5us has joined #ruby
gggp_ has joined #ruby
gggp__ has joined #ruby
gggp has quit [Ping timeout: 258 seconds]
AriT93 has joined #ruby
gggp_ has quit [Ping timeout: 276 seconds]
<nakilon> speaking about the inability to apply the line-profiler to my "scheme validator" scheme part, it appeared that the bottleneck is HDD anyway
<nakilon> or not, nvm
goepsilongo has quit [Quit: Konversation terminated!]
gggp_ has joined #ruby
gggp__ has quit [Ping timeout: 245 seconds]
AriT93 has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<rg> i don't have much experience with Ractor but isn't it suppose to run code outside the GVL?
<nakilon> I thought Thread is already not GIL in 3.0?
<rg> afaik only with Ractor or IO bound threads
* nakilon is still using 2.3, because no one still fixed 2.4
<rg> i have 2.7 and 3.0.1
<nakilon> ran -rprofile, the bottleneck is JSON, but that's weird that when I switch to Oj it gets only 5% clower
<nakilon> *slower
<rg> i thought i wouldn't like it but i like the implicit args (_1, _2, etc) feature
<nakilon> ..\
<rg> it saves you the effort of thinking up meaningful names :D
<nakilon> that's why I just use { |_|
<rg> you could do it without the explicit block arg: [1,2,3].each { p _1 }
<rg> not sure when it was added maybe 2.7
<nakilon> what was the method that makes %w{ a ab abc abd } from "abcd"?
<nakilon> *abcd
<rg> not sure
<nakilon> rg it sucks that the code now will have the magic "1" digit in it
<nakilon> I thought it's String#abbrev but there is no such method and Abbrev module is doing something els
gggp_ is now known as gggp
<rg> i wasn't a fan before using it a few times
drincruz_ has quit [Ping timeout: 258 seconds]
gggp_ has joined #ruby
gggp has quit [Ping timeout: 268 seconds]
hexreel has joined #ruby
<nakilon> that's how ugly practices essentially work -- people get used to them
gggp__ has joined #ruby
* neshpion sighs in stockholm syndrome
<nakilon> there are at least two obvious wrong things about it
<leftylink> well it's https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-List.html#v:inits but this answer is unhelpful because it's not Ruby. maybe I should take it to #ruby-offtopic
hexreel has quit [Quit: nyaa~]
gggp_ has quit [Ping timeout: 272 seconds]
gggp has joined #ruby
gggp__ has quit [Ping timeout: 268 seconds]
Rounin has joined #ruby
<nakilon> or actually the main issue is one and the rest are too obvious derivative, but: when you change the structure of the vector you call to a block how do you edit the code? you simply look at the |...| thing and when args are normally named it's pretty clear to see "aha, they are now in another order" or "there is now this one added in between..." --
<nakilon> and you do edit just in this one place; now when they are just numbers you have do edit the whole block, replacing _1 with _2, _3, with _1, etc. -- it's error-prone and it's absolutely not obvious which part of the block you've already fixed, it's all just literally obfuscated
<nakilon> when they are named at any point of time you can just check if args are passed correctly without even knowing what the code does (it can be not your code for example), but when you have to check if the external edit of the structure of passed vector complies the numbered args you have to reread the block and understand what it's doing that is just
<nakilon> a waste of time
<nakilon> basically the named args are a FEATURE, and using indexes instead of names is a STEP BACK to some low level stone age where language does not support it and you just pass args as arrays like in some ASM or idk, not even C
gggp_ has joined #ruby
<neshpion> kwargs best args
<nakilon> so it's literally more like codegolf obfuscation rather than a useful addition to Ruby that is supposed to be the most understandable language
gggp has quit [Ping timeout: 252 seconds]
xall has quit [Quit: Client closed]
gggp__ has joined #ruby
gggp_ has quit [Ping timeout: 240 seconds]
gggp_ has joined #ruby
moo has quit [Quit: moo]
moo has joined #ruby
gggp__ has quit [Ping timeout: 258 seconds]
gggp_ has quit [Ping timeout: 268 seconds]
drincruz_ has joined #ruby
drincruz_ has quit [Ping timeout: 265 seconds]
reset has quit [Quit: reset]
psb is now known as tree
reset has joined #ruby
neshpion has quit [Quit: neshpion]
ur5us has quit [Ping timeout: 268 seconds]
gggp has joined #ruby
llua has quit [Ping timeout: 240 seconds]
Oxfuxxx has quit [Quit: leaving]
Oxfuxxx has joined #ruby
Oxfuxxx has quit [Client Quit]
llua has joined #ruby
Oxfuxxx has joined #ruby
Oxfuxxx has quit [Client Quit]
Oxfuxxx has joined #ruby
reset has quit [Quit: reset]
gggp_ has joined #ruby
gggp has quit [Ping timeout: 256 seconds]
teclator has joined #ruby
gggp__ has joined #ruby
gggp_ has quit [Ping timeout: 258 seconds]
gggp__ is now known as gggp
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby
gggp has quit [Read error: Connection reset by peer]
Oxfuxxx_ has joined #ruby
Oxfuxxx_ has quit [Client Quit]
jetchisel has joined #ruby
Oxfuxxx_ has joined #ruby
Oxfuxxx has quit [Ping timeout: 276 seconds]
marahin- is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp has joined #ruby
gggp_ has joined #ruby
fandre1986 has joined #ruby
gggp has quit [Ping timeout: 272 seconds]
Bounga has joined #ruby
goldfish has joined #ruby
ur5us has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
goldfish has quit [Ping timeout: 265 seconds]
gggp_ has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
jhass[m] has quit [Quit: Bridge terminating on SIGTERM]
ckrailo has quit [Quit: Bridge terminating on SIGTERM]
mewfree[m] has quit [Quit: Bridge terminating on SIGTERM]
jhass[m] has joined #ruby
mewfree[m] has joined #ruby
ckrailo has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
shokohsc has quit [Quit: The Lounge - https://thelounge.chat]
gggp has joined #ruby
shokohsc has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp_ has joined #ruby
gggp has quit [Ping timeout: 245 seconds]
Oxfuxxx_ has quit [Quit: leaving]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
drincruz_ has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
motherr has joined #ruby
gggp__ has joined #ruby
gggp__ is now known as gggp
Oxfuxxx has joined #ruby
gggp_ has quit [Ping timeout: 245 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp_ has joined #ruby
gggp__ has joined #ruby
gggp has quit [Killed (NickServ (GHOST command used by gggp__!~gggp@60.10.194.43))]
gggp__ is now known as gggp
gggp_ has quit [Ping timeout: 252 seconds]
gggp_ has joined #ruby
gggp has quit [Ping timeout: 250 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fandre1986 has quit [Quit: Connection closed]
dviola has quit [Ping timeout: 268 seconds]
gggp has joined #ruby
gggp_ has quit [Ping timeout: 265 seconds]
TomyWork has joined #ruby
dviola has joined #ruby
postmodern has quit [Remote host closed the connection]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp_ has joined #ruby
tree is now known as psb
gggp has quit [Ping timeout: 272 seconds]
dviola has quit [Ping timeout: 272 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp_ is now known as gggp
qunzhong_luxian has joined #ruby
qunzhong_luxian has quit [Client Quit]
qunzhong_luxian has joined #ruby
dviola has joined #ruby
gggp_ has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp has quit [Ping timeout: 265 seconds]
jetchisel has quit [Ping timeout: 245 seconds]
gggp__ has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
dviola has joined #ruby
dviola has quit [Changing host]
gggp_ has quit [Ping timeout: 250 seconds]
mister_hai has joined #ruby
mister_hai has quit [Client Quit]
gggp__ is now known as gggp
wei1 has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp_ has joined #ruby
ua_ has quit [Ping timeout: 258 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
gggp has quit [Ping timeout: 276 seconds]
ua_ has joined #ruby
Oxfuxxx has quit [Ping timeout: 256 seconds]
Oxfuxxx has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
gggp__ has joined #ruby
fossdd has joined #ruby
gggp_ has quit [Ping timeout: 276 seconds]
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 245 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
doma has quit [Quit: WeeChat 2.8]
sweater2 has quit [Quit: WeeChat 2.8]
gggp__ has quit [Read error: Connection reset by peer]
<rapha> hmm, y'alls
fossdd has quit [Ping timeout: 240 seconds]
<rapha> does ruby have something that is like a Hash but where the key can be an Array?
fossdd has joined #ruby
<weaksauce> rapha yeah a hash?
<weaksauce> >> x = {[:a, :b] => "hello"}
<ruby[bot]> weaksauce: # => {[:a, :b]=>"hello"} (https://carc.in/#/r/bnu0)
<rapha> but {[1,2,3]: 4} errors out
<rapha> oooh
<rapha> the colon is the problem
<rapha> thx weaksauce
<weaksauce> np rapha
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
drincruz_ has joined #ruby
drincruz has quit [Read error: Connection reset by peer]
<adam12> rapha: Technically _anything_ can be a key in a Hash, fyi.
dviola has quit [Quit: WeeChat 3.2]
lad has joined #ruby
drincruz_ has quit [Ping timeout: 240 seconds]
drincruz_ has joined #ruby
reset has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
TomyWork has quit [Quit: Leaving]
<rapha> yeah, as usually, the problem is me doing things slightly wrong and then not seeing the forest for the trees :-/
crankharder has joined #ruby
<crankharder> given a string="FooBar" and a klass=Namespace how do I dynamically define the class Namespace::FooBar<StandardError ?
<adam12> crankharder: Module.const_set
<adam12> crankharder: klass.const_set(string, Class.new(StandardError))
<crankharder> boom. cheers
<weaksauce> rapha well anything can be a key if it supplies an eql? and hash method
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
<rapha> hmm, okay, now in search of a one-liner that will make h={"foo":{1:2,3:4}, "bar":{2:3,4:5}} into a=[["foo",1,2], ["foo",3,4], ["bar",2,3], ["bar",4,5]] ... is that possible? can't get it done in less than three lines :(
wei1 has quit [Ping timeout: 258 seconds]
<rapha> hmm, down to 1 but only with ; ... bagh
<rapha> :w
<rapha> whoops
Bounga has quit [Ping timeout: 240 seconds]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
<leftylink> that is very possible.
<leftylink> flat_map.
nemesit has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
orbyt has joined #ruby
easbarbosa has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
Guest6189 has joined #ruby
Guest6189 has quit [Client Quit]
pgib has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
lunarkitty has joined #ruby
wei1 has joined #ruby
rhe has quit [Ping timeout: 245 seconds]
jetchisel has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
easbarbosa has quit [Remote host closed the connection]
rhe has joined #ruby
goldfish has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
tv- has quit [Quit: WeeChat 2.9]
Oxfuxxx has quit [Ping timeout: 240 seconds]
Oxfuxxx has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
finsternis has quit [Remote host closed the connection]
qunzhong_luxian has quit [Quit: leaving]
fossdd has quit [Ping timeout: 240 seconds]
fossdd has joined #ruby
weyhmueller has quit [Quit: ZNC 1.8.2 - https://znc.in]
weyhmueller has joined #ruby
Oxfuxxx has quit [Ping timeout: 272 seconds]
dviola has joined #ruby
goldfish has quit [Ping timeout: 258 seconds]
finsternis has joined #ruby
rg has quit [Quit: Leaving]
tv- has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
Oxfuxxx has joined #ruby
Quentincestino has joined #ruby
<Quentincestino> Hello ! I'm starting to learn Ruby and I wanted to know what project manager I should use if there is some ?
<newton> Quentincestino, project manager?
rg has joined #ruby
rg has quit [Client Quit]
rg has joined #ruby
<Quentincestino> Depenndency manager* my bad, I found bundler it works fine
<weaksauce> oh yeah bundler is the defacto standard
<Quentincestino> Ah I see
<Quentincestino> Though there was something like cargo but for Ruby lmao
<weaksauce> yeah bundler... part of ruby now
<weaksauce> well since 2.6
wei1 has quit [Ping timeout: 256 seconds]
easbarbosa has joined #ruby
Quentincestino has quit [Quit: Client closed]
dviola has quit [Ping timeout: 265 seconds]
dviola has joined #ruby
ur5us has joined #ruby
dviola has quit [Ping timeout: 268 seconds]
dviola has joined #ruby
pwnd_sfw has quit [Ping timeout: 265 seconds]
pwnd_sfw has joined #ruby
crankharder has quit [Ping timeout: 240 seconds]
motherr has quit [Quit: zzz]
dviola has joined #ruby
dviola has quit [Changing host]
MalkbabY has joined #ruby
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
<newton> cargo was built by the people who made bundler lol
<weaksauce> hah didn't know that
<weaksauce> no wonder it's generally considered awesome
orbyt has joined #ruby
wei1 has joined #ruby
nemesit has quit [Ping timeout: 252 seconds]
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 250 seconds]
drincruz has quit [Ping timeout: 256 seconds]
crankharder has joined #ruby