baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview1: https://www.ruby-lang.org || Paste 4+ lines of text to https://gist.github.com || Rails questions? Ask in #RubyOnRails || Books: https://goo.gl/wpGhoQ || Logs: https://irclog.whitequark.org/ruby
jcarl43 has quit [Quit: WeeChat 2.1]
justinfaler has quit [Ping timeout: 256 seconds]
cthulchu_ has quit [Ping timeout: 265 seconds]
<chaos95> mroutis: I have done for a few of the individual checks but the checks used by each method differ slightly. Where there is some commonality I've abstracted them appropriately but I feel like there's got to be a better way to do it - coming from C# I would have previously done it with decorators
<chaos95> (or, you know, static typing)
<mroutis> sorry, chaos95, it's far from my knowledge, maybe if you throw in a code example I can understand your issue better
erlend has quit [Ping timeout: 265 seconds]
erlend has joined #ruby
n0m4d1c has quit [Read error: Connection reset by peer]
<chaos95> mroutis: no worries :) it's a pretty minor concern in an otherwise quite messy codebase :)
<mroutis> sure
<mroutis> :)
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
lupine has quit [Ping timeout: 255 seconds]
kapil___ has joined #ruby
arescorpio has joined #ruby
cagomez has quit [Remote host closed the connection]
cliluw has quit [Ping timeout: 256 seconds]
cagomez has joined #ruby
cliluw has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
cagomez has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
Yxhuvud has joined #ruby
whathappens has quit [Remote host closed the connection]
lupine has joined #ruby
mlkkk has joined #ruby
jready has joined #ruby
whathappens has joined #ruby
whathappens has quit [Remote host closed the connection]
Guest9502 has joined #ruby
n0m4d1c has joined #ruby
Guest9502 is now known as whathappens
jottr has joined #ruby
justinfaler has joined #ruby
ResidentBiscuit has joined #ruby
justinfaler has quit [Client Quit]
jready has quit [Ping timeout: 265 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
marr has quit [Ping timeout: 256 seconds]
Yxhuvud has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 276 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
amar has joined #ruby
netherwolfe has joined #ruby
duderonomy has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
ResidentBiscuit has quit []
Yxhuvud has joined #ruby
amar has quit [Ping timeout: 256 seconds]
netherwolfe has quit [Ping timeout: 265 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
RougeR has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
whathappens has quit [Remote host closed the connection]
whathapp_ has joined #ruby
whathapp_ has quit [Remote host closed the connection]
VladGh has quit [Ping timeout: 265 seconds]
Psybur has quit [Ping timeout: 256 seconds]
jalcine has quit [Quit: ZNC - http://znc.in]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
gizmore|2 has joined #ruby
lupine has quit [Ping timeout: 265 seconds]
jalcine has joined #ruby
jalcine has joined #ruby
jalcine has quit [Changing host]
shinnya has quit [Ping timeout: 264 seconds]
whathappens has joined #ruby
Yxhuvud has joined #ruby
gizmore has quit [Ping timeout: 264 seconds]
cthulchu_ has joined #ruby
whathapp_ has joined #ruby
pastorinni has quit [Ping timeout: 264 seconds]
linetrac1 has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
cthu| has quit [Read error: Connection reset by peer]
linetrace has quit [Read error: Connection reset by peer]
whathappens has quit [Ping timeout: 256 seconds]
Yxhuvud has quit [Client Quit]
bmurt has joined #ruby
Yxhuvud has joined #ruby
herbmillerjr has joined #ruby
banisterfiend has joined #ruby
jnollette has quit [Ping timeout: 268 seconds]
jnollette has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
bmurt has quit [Remote host closed the connection]
bmurt has joined #ruby
ramfjord has joined #ruby
lupine has joined #ruby
lupine has quit [Client Quit]
white_lilies has joined #ruby
noobineer has joined #ruby
workmad3 has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
dinfuehr_ has joined #ruby
pilne has quit [Quit: Leaving]
dinfuehr has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
Janky has joined #ruby
nowhereman_ has joined #ruby
jcarl43 has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
lupine has joined #ruby
<Radar> chaos95: Take a look at using dry-transaction. You could use `Failure("msg")` as a way of bailing out early.
cthulchu_ has quit [Ping timeout: 268 seconds]
m27frogy has quit [Quit: ZNC - http://znc.in]
<Radar> chaos95: here's an example from a codebase that I have: https://gist.github.com/radar/ab9c9be144474ba8a6be4a04b004b425
alfiemax has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
mroutis has quit [Ping timeout: 264 seconds]
whathapp_ has quit [Remote host closed the connection]
whathappens has joined #ruby
alfiemax has joined #ruby
n0m4d1c has quit [Ping timeout: 265 seconds]
cagmz has joined #ruby
cagmz has quit [Remote host closed the connection]
erlend has quit [Ping timeout: 246 seconds]
cagomez has joined #ruby
<cagomez> how do I apply some transformation to a hash value before setting it as a value? is it possible to set this behavior on the hash itself (ie subclass Hash and define my own setter?)
GodFather has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
<baweaver> cagomez: why?
haraoka has joined #ruby
<baweaver> What problem are you trying to solve?
<cagomez> for example, I'd like to do this: hash[1] = 'a' => hash[1] = 'A'
erlend has joined #ruby
cyberg has quit [Remote host closed the connection]
alfiemax has joined #ruby
<Radar> cagomez: Is this behaviour the same for all keys? Capitalise their values?
<cagomez> yup! I just want to call a method on these objects before setting them as the value for a key
m27frogy has joined #ruby
<baweaver> I'd also loop back to what problem exactly are you trying to solve for?
<baweaver> because the answer may vary a bit depending
<chaos95> Radar: interesting, thanks!
<baweaver> whoopsie, train arriving, off I go for a few
arescorpio has quit [Quit: Leaving.]
<cagomez> I currently have to call the .as_json (for example) on these objects after accessing them from my_hash. I'd rather call .as_json before storing them in the hash, but I was wondering if Hash could do that
konsolebox has quit [Ping timeout: 240 seconds]
whathappens has quit [Remote host closed the connection]
konsolebox has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
alfiemax has quit [Remote host closed the connection]
GodFather has joined #ruby
Yxhuvud has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
meadmoon has joined #ruby
jeffreylevesque has quit [Ping timeout: 268 seconds]
whathappens has joined #ruby
jordanm has joined #ruby
jordanm has quit [Changing host]
jordanm has joined #ruby
jordanm has quit [Client Quit]
jordanm has joined #ruby
alfiemax has joined #ruby
noobineer has quit [Ping timeout: 260 seconds]
lele has quit [Ping timeout: 256 seconds]
AJA4350 has quit [Quit: AJA4350]
lele has joined #ruby
jottr has joined #ruby
jamesaxl has quit [Ping timeout: 240 seconds]
Azure has quit [Read error: Connection reset by peer]
whathappens has quit [Remote host closed the connection]
Azure has joined #ruby
whathappens has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
NewbiePat has joined #ruby
whathappens has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<NewbiePat> I'm fairly new to coding and ruby. I'm working on a simple program just to see what I can make it into. I seem to be having trouble with the OR operator in if statements and while loops. Would anyone be able to lend a guiding hand?
<mozzarella> what's the problem?
jordanm has quit [Quit: Konversation terminated!]
<NewbiePat> im setting a variable called fifty50, and then I'm writing a while loop to make sure that the user entered either a "y" or "no" for that variable, however I my while loop keeps repeating even if what I think is correct is entered.
<NewbiePat> for example: fifty50 = gets.chomp.downcase.to_s
<NewbiePat> while fifty50 != "y" || "n"
<NewbiePat> i'm assuming its some syntax i'm not fully grasping but i've been playing with it for a little while and getting nowhere
jordanm has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
<mozzarella> yeah, it doesn't do what you think it does
<mozzarella> while fifty50 != 'y' && fifty50 != 'n'
alfiemax has quit [Remote host closed the connection]
<NewbiePat> got it and now my program is proceding, thank you very much. I'm sure that will be very useful, i didn't realize I would have to declare the fifty50 again after the operator.
orbyt_ has joined #ruby
<mozzarella> just remember that && and || are boolean operators, and that they expect a true/false value on each side
gix- has joined #ruby
gix has quit [Disconnected by services]
<mozzarella> though you can pass anything you want
<NewbiePat> i will keep that in mind, and thank you again for the lesson and assistance :)
<mozzarella> strings will always be "true", so that's your problem right here
<konsolebox> || has lower precedence than &&
<NewbiePat> thanks again :) that helped a lot and will learn from this :)
meadmoon has quit [Quit: ZZZzzz…]
<mozzarella> only false and nil are "falsey", everything else is "truthy", IIRC
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
BTRE has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
p0p0pr37 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
minimalism has quit [Quit: minimalism]
kapil___ has quit [Quit: Connection closed for inactivity]
claw has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
workmad3 has joined #ruby
claw has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
nowhereman_ has quit [Ping timeout: 246 seconds]
nowhereman_ has joined #ruby
ramfjord has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryzokuken has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
MyMind has joined #ruby
jalcine has quit [Quit: ZNC - http://znc.in]
Sembei has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
DTZUZO has quit [Read error: Connection reset by peer]
DTZUZO has joined #ruby
n3b has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
n3b has joined #ruby
mlkkk has quit [Remote host closed the connection]
jottr has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
jeffreylevesque has joined #ruby
d_kam has joined #ruby
erlend has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
erlend has joined #ruby
mlkkk has joined #ruby
mlkkk has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
mlkkk has joined #ruby
mlkkk has quit [Ping timeout: 248 seconds]
mlkkk has joined #ruby
chmuri has quit [Excess Flood]
VladGh has joined #ruby
papua has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chmurifree has joined #ruby
venmx has joined #ruby
mlkkk has quit [Ping timeout: 264 seconds]
samort7 has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
d_kam_ has joined #ruby
n008f4g_ has joined #ruby
amar has joined #ruby
ur5us__ has quit [Remote host closed the connection]
ur5us has joined #ruby
d_kam has quit [Ping timeout: 264 seconds]
jalcine has joined #ruby
jalcine has joined #ruby
jalcine has quit [Changing host]
amar has quit [Ping timeout: 248 seconds]
n008f4g_ has quit [Ping timeout: 248 seconds]
white_lilies has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 248 seconds]
alfiemax has quit [Remote host closed the connection]
mlkkk has joined #ruby
reber has joined #ruby
kapil___ has joined #ruby
mlkkk has quit [Ping timeout: 260 seconds]
jalcine has quit [Quit: ZNC - http://znc.in]
jalcine has joined #ruby
jalcine has quit [Changing host]
jalcine has joined #ruby
camonz has joined #ruby
alfiemax has joined #ruby
sauvin has joined #ruby
mlkkk has joined #ruby
anisha has joined #ruby
jeen has joined #ruby
mlkkk has quit [Ping timeout: 248 seconds]
d_kam_ has quit [Quit: Be back later ...]
mlkkk has joined #ruby
d_kam_ has joined #ruby
workmad3 has joined #ruby
d_kam__ has joined #ruby
d_kam_ has quit [Read error: Connection reset by peer]
sidx64 has joined #ruby
jeen has quit [Quit: This computer has gone to sleep]
d_kam__ has quit [Read error: Connection reset by peer]
d_kam___ has joined #ruby
aupadhye has joined #ruby
d_kam____ has joined #ruby
d_kam___ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
d_kam_____ has joined #ruby
d_kam____ has quit [Read error: Connection reset by peer]
d_kam______ has joined #ruby
d_kam_____ has quit [Read error: Connection reset by peer]
sundhell is now known as sundhell_away
d_kam_______ has joined #ruby
d_kam______ has quit [Read error: Connection reset by peer]
venmx has quit [Ping timeout: 256 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d_kam________ has joined #ruby
schneider has joined #ruby
d_kam_______ has quit [Ping timeout: 240 seconds]
d_kam________ has quit [Read error: Connection reset by peer]
d_kam________ has joined #ruby
jeen has joined #ruby
schneider has quit [Ping timeout: 268 seconds]
d_kam________ has quit [Read error: Connection reset by peer]
d_kam_________ has joined #ruby
d_kam__________ has joined #ruby
d_kam_________ has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
synstack_ has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
shiroeni has joined #ruby
d_kam__________ has quit [Ping timeout: 256 seconds]
d_kam__________ has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.1]
jottr has joined #ruby
shiroeni has quit [Ping timeout: 248 seconds]
d_kam___________ has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
jeen has quit [Quit: This computer has gone to sleep]
d_kam__________ has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeen has joined #ruby
samort7 has quit [Quit: Bye]
schneider has joined #ruby
shiroeni has joined #ruby
venmx has joined #ruby
karapetyan has joined #ruby
ryzokuken has quit [Remote host closed the connection]
erlend has quit [Ping timeout: 256 seconds]
schneider has quit [Ping timeout: 248 seconds]
erlend has joined #ruby
karapetyan has quit [Ping timeout: 248 seconds]
sidx64_ has joined #ruby
sidx64 has quit [Read error: Connection reset by peer]
shiroeni_ has joined #ruby
apeiros has joined #ruby
roshanavand has joined #ruby
sidx64 has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
sidx64_ has quit [Ping timeout: 256 seconds]
shiroeni has quit [Ping timeout: 256 seconds]
ta_ has joined #ruby
shiroeni_ has quit [Ping timeout: 248 seconds]
nadir has quit [Quit: Connection closed for inactivity]
phaul has joined #ruby
trautwein has quit [Quit: ZNC 1.6.6 - http://znc.in]
trautwein has joined #ruby
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
mikhael_k33hl has joined #ruby
<mikhael_k33hl> Why am I getting an error: No live threads left. Deadlock? (fatal) when trying to wait(join) for a thread: https://gist.github.com/marzdgzmn/19e7bed23a86c95bf9a47f0202bd877b
<dminuoso> mikhael_k33hl: because you have been naughty.
schneider has joined #ruby
<mikhael_k33hl> dminuoso: what do you mean?
NL3limin4t0r_afk has quit [Ping timeout: 264 seconds]
NL3limin4t0r_afk has joined #ruby
Naeblis has left #ruby ["Textual IRC Client: www.textualapp.com"]
amar has joined #ruby
ramfjord has joined #ruby
<phaul> concurency is hard. It's very difficult to see if your program is deadlock free, and when it's not there is no guarantee that you can cath the bug either. In haskell world they thought transactional memory was the answer. Im not sure what happened to that idea
<dminuoso> phaul: concurrency is not hard.
<dminuoso> manual mutex lockery is just hard.
_aeris_ has quit [Remote host closed the connection]
amar has quit [Ping timeout: 264 seconds]
alex`` has quit [Ping timeout: 256 seconds]
suukim has joined #ruby
<phaul> I stand corrected :) manual mutex lockery is hard...
_aeris_ has joined #ruby
<phaul> there is concurrent-ruby ... that can do STM.
Bish has quit [Ping timeout: 264 seconds]
<phaul> mikhael_k33hl: it might be worth taking a look^. No locks, no deadlocks.
<mikhael_k33hl> phaul: Yeah, I was using that before, I was thinking of doing this manually since this is just a bit simple script, and just to dirty my hands with concurrency :)
Bish has joined #ruby
metalmouth has joined #ruby
metalmouth has left #ruby [#ruby]
<dminuoso> mikhael_k33hl: get them dirty with stm.
<dminuoso> stm is easier and less painful
donofrio has quit [Remote host closed the connection]
aufi has joined #ruby
Burgestrand has joined #ruby
<mikhael_k33hl> dminuoso: what's stm? software transactional memory?
sidx64 has quit [Read error: Connection reset by peer]
sidx64_ has joined #ruby
clemens3_ has joined #ruby
claudiuinberlin has joined #ruby
<phaul> mikhael_k33hl: yes
alfiemax has quit [Remote host closed the connection]
<dminuoso> phaul: I wonder, the stm doesnt look very complete though
minimalism has joined #ruby
<phaul> you mean STM in concurrent-ruby? They need 3 things iirc. atomically do ; end, tvar, retry. I've found atomically, and tvar. Looking for retry..
Burgestrand has quit [Quit: Closing time!]
<dminuoso> phaul: I was talking about retry
<dminuoso> ;)
<dminuoso> Without retry the whole thing becomes a bit.. lackluster..
<mikhael_k33hl> just a bit tempting to make this code work though hehe
amar has joined #ruby
Burgestrand has joined #ruby
<dminuoso> phaul: it looks as if you are supposed to use a loop yourself..
jottr has joined #ruby
totimkopf has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
jeen has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
alfiemax has joined #ruby
amar has quit [Remote host closed the connection]
physicist__ has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
schneider has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
<phaul> I'm trying to understand their model by reading the STM implementation... It's quite short and conciese...
totimkopf has quit [Quit: Leaving]
schneider has joined #ruby
ryzokuken has joined #ruby
<phaul> retry is as simple as raise Transaction::AbortError. I have no idea why they didn't expose it on the API
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 240 seconds]
<phaul> oh they did. abort_transaction is retry!
<phaul> bad naming...
* dminuoso sighs
<dminuoso> I see
hkais has joined #ruby
sundhell_away is now known as sundhell
<apeiros> and there I thought "rollback" was established terminology wrt transactions 😅
<dminuoso> apeiros: not rollback. it should be "retry"
<apeiros> though retry and abort_transaction imply two different things?
<apeiros> I mean one is "do it again" and the other is "undo"
<dminuoso> apeiros: abort_transaction means retry.
<dminuoso> leave_transaction means abort..
<apeiros> dminuoso: if it in fact re-tries, that's a terrible misnomer :-O
<dminuoso> just check it out :D
mikecmpbll has joined #ruby
<dminuoso> the hilarious thing is is that if clause at the end
* apeiros no like `Transaction::current`
<apeiros> (code style)
<dminuoso> apeiros: using concurrent-ruby is painful too
<apeiros> that's sad to hear
<dminuoso> apeiros: https://gist.github.com/dminuoso/11982e915db178db5b06514e5c223d12 here's some naive STM code from Haskell. So from outside I can just do `withToken "apeiros" doStuff` and I can atomically handle the "apeiros" resource. =)
<apeiros> https://github.com/ruby-concurrency/concurrent-ruby/blob/master/lib/concurrent/tvar.rb#L113 - I now wonder about the code backing transaction=
<apeiros> omg, something I never wanted to read in ruby: "It is undefined behaviour to"
<apeiros> (though I can imagine it'd be incredibly hard to have the behavior defined in the case they mention)
<dminuoso> apeiros: Honestly in concurrency there are certain contracts.
<dminuoso> Some things are simply honor bound.
<apeiros> sure. but breaking the contract should not result in undefined behavior. just like real contracts. but as said, I understand that there's cases where that's probably unreasonably hard, if not even impossible.
<apeiros> at least I have no idea how I'd handle "rogue" callcc
<dminuoso> well callcc I get at least.
<dminuoso> Right.
<livcd> we will get parallelism with graal! get excited
<mr-robert> don't we have that with jruby already
<apeiros> 𝄞 I'm so excited ♫ I just can't hide it ♬
<apeiros> mr-robert: yes, we do :)
NL3limin4t0r_afk has quit [Remote host closed the connection]
NL3limin4t0r_afk has joined #ruby
amar has joined #ruby
sanscoeur has quit [Ping timeout: 240 seconds]
ReusedSalt has joined #ruby
karapetyan has joined #ruby
TomyWork has joined #ruby
alfiemax has quit [Remote host closed the connection]
<livcd> well it looks like much more performant
guille-moe has joined #ruby
amar has quit [Ping timeout: 248 seconds]
amar has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
sidx64_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
tomphp has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fumck is now known as fumk
erlend has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
erlend has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has joined #ruby
tomphp has joined #ruby
Beams has joined #ruby
alfiemax has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has joined #ruby
meinside has joined #ruby
rabajaj has quit [Ping timeout: 268 seconds]
tomphp has joined #ruby
amar has quit [Ping timeout: 248 seconds]
tomphp has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
rabajaj has joined #ruby
mikhael_k33hl has quit [Ping timeout: 260 seconds]
anisha has quit [Quit: This computer has gone to sleep]
tomphp has joined #ruby
tomphp has quit [Client Quit]
zautomata2 has joined #ruby
tomphp has joined #ruby
RougeR has quit [Ping timeout: 248 seconds]
tomphp has quit [Client Quit]
banisterfiend has joined #ruby
tomphp has joined #ruby
alfiemax has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
tomphp has joined #ruby
karapetyan has joined #ruby
workmad3 has joined #ruby
ur5us has joined #ruby
zautomata2 has quit [Quit: WeeChat 1.9.1]
alfiemax has joined #ruby
tvw has joined #ruby
zautomata has joined #ruby
nowhereman_ has quit [Remote host closed the connection]
camilasan_ has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #ruby
UncleCid__ has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
Burgestrand has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwnd_nsfw` has quit [Ping timeout: 265 seconds]
schneider has quit [Ping timeout: 248 seconds]
Burgestrand has quit [Quit: Closing time!]
<dminuoso> >> [true, false, false, false].reduce(&:|)
<ruby[bot]> dminuoso: # => true (https://eval.in/991040)
ramfjord has quit [Ping timeout: 264 seconds]
<apeiros> >> [true, false, false, false].reduce(&:^)
<ruby[bot]> apeiros: # => true (https://eval.in/991042)
SynSynack has joined #ruby
ferr1 has joined #ruby
ferr1 has left #ruby [#ruby]
<dminuoso> Man I wish we could just do
<dminuoso> >> or = -> a, b { a || b }; [true, false, false, false].reduce(or)
<ruby[bot]> dminuoso: # => /tmp/execpad-e8189fcb9637/source-e8189fcb9637:2: syntax error, unexpected keyword_or ...check link for more (https://eval.in/991048)
<dminuoso> >> or_ = -> a, b { a || b }; [true, false, false, false].reduce(or_)
<ruby[bot]> dminuoso: # => #<Proc:0x420fda10@/tmp/execpad-d6bebbf373c4/source-d6bebbf373c4:2 (lambda)> is not a symbol nor a st ...check link for more (https://eval.in/991049)
shinnya has joined #ruby
<dminuoso> Maybe Ill just make the necessary change
<dminuoso> Most HOFs should take a proc..
haraoka has quit [Ping timeout: 240 seconds]
Ltem has joined #ruby
c0ncealed1 has quit [Remote host closed the connection]
<apeiros> dminuoso: hm? that almost works. all it costs you is an & more
<phaul> I have a weird feeling in the message sending model. To me it feels like that the receiver is special not like the rest of the arguments. So the whole thing is a bit clunky in the functional world. Like Array#zip shows that the best.
<phaul> should it be Array.zip(*arrays) ?!
c0ncealed1 has joined #ruby
anisha has joined #ruby
<apeiros> phaul: heh, I have wondered about this too and never came to a good answer. Array.zip certainly makes some sense as it's in a the construction of an array.
<apeiros> and iirc I had Hash::zip(keys, values) in my 1.8 monkey patches
amar has joined #ruby
amar has quit [Remote host closed the connection]
<dminuoso> apeiros: It does not really work in stdlib/core much
sanscoeur has joined #ruby
<dminuoso> apeiros: The & adds too much noise and it's annoying if you want to do
<dminuoso> foo.map(bar * quux)
<dminuoso> Suddenly you not only need & but extra noise for parens
<dminuoso> foo.map(&(bar * quux))
<apeiros> ah, good old "we need -> instead of *(foo.bar)". yeah, I see what you mean.
<dminuoso> apeiros: Just consider that symbols are accepted
<dminuoso> foo.map(:bar) is fine
<dminuoso> great, so why not foo.map(someProc)
<dminuoso> ruby could just unconditionally to_proc whatever it gets
<dminuoso> apeiros: (*foo).bar =P
<apeiros> are you saying all my C code is broken?!?
<dminuoso> Haha
<apeiros> (yeah, goes to show how little C I code)
<dminuoso> apeiros: I think Ill make my case with Proc#* on the bug tracker soon.
<dminuoso> We already have #curry, might as well complete the set of functional tools.
ta_ has quit [Quit: Leaving...]
rabajaj has quit [Ping timeout: 268 seconds]
cadillac_ has quit [Ping timeout: 268 seconds]
rabajaj has joined #ruby
workmad3 has joined #ruby
cadillac_ has joined #ruby
schneider has joined #ruby
rahul_bajaj has joined #ruby
karapetyan has joined #ruby
rabajaj has quit [Ping timeout: 265 seconds]
rahul_bajaj has quit [Client Quit]
tomphp has joined #ruby
rabajaj has joined #ruby
tomphp has quit [Client Quit]
nadir has joined #ruby
tomphp has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
Burgestrand has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pb122 has joined #ruby
pb122 has quit [Remote host closed the connection]
pb122 has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
ta_ has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
psychicist__ has joined #ruby
tomphp has joined #ruby
apparition has joined #ruby
meadmoon has joined #ruby
meadmoon has quit [Client Quit]
karapetyan has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
meadmoon has joined #ruby
ellcs has joined #ruby
erlend has quit [Ping timeout: 248 seconds]
roshanavand1 has joined #ruby
roshanavand has quit [Read error: No route to host]
dang`r`us has joined #ruby
<dang`r`us> hey hey
roshanavand1 has quit [Client Quit]
<dang`r`us> what does "reduced accuracy" here mean? https://apidock.com/ruby/DateTime/strftime
roshanavand has joined #ruby
kurko_ has joined #ruby
erlend has joined #ruby
<canton7> dang`r`us, from looking at that table, looks like "X, reduced accuracy" means "X, but with the most accurate portion removed"
<canton7> so if X is a year-month-date, the "reduced accuracy" removes the date component, leaving just year-month
<Radar> 👆🏻
<canton7> likewise if X is hours-mins-secs, the "reduced accuracy" removes the secs, leaving hours-mins
jeffreylevesque has quit [Ping timeout: 264 seconds]
clemens3_ has quit [Ping timeout: 256 seconds]
aufi_ has joined #ruby
dr3w_ has joined #ruby
aufi has quit [Ping timeout: 256 seconds]
donofrio has joined #ruby
ur5us has quit [Remote host closed the connection]
sundhell is now known as sundhell_away
amelliaa has joined #ruby
rabajaj has quit [Ping timeout: 276 seconds]
noobineer has joined #ruby
AJA4350 has joined #ruby
amatas has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
SynSynack has quit [Quit: Не разучиться мечтать... любить...]
cadillac__ has joined #ruby
banisterfiend has joined #ruby
zeffy has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cadillac_ has quit [Ping timeout: 276 seconds]
cadillac__ is now known as cadillac_
amar has joined #ruby
amatas has quit [Quit: amatas]
rabajaj has joined #ruby
Cavallari has joined #ruby
amar has quit [Ping timeout: 248 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
Burgestrand has quit [Quit: Closing time!]
Emmanuel_Chanel has joined #ruby
<dang`r`us> canton7, thx!
alfiemax has quit [Remote host closed the connection]
supergeek has joined #ruby
supergeek has quit [Client Quit]
rabajaj has quit [Ping timeout: 276 seconds]
apparition has joined #ruby
ldnunes has joined #ruby
dang`r`us has left #ruby ["WeeChat 2.0.1"]
sundhell_away is now known as sundhell
giraffe has quit [Remote host closed the connection]
tpendragon has quit [Remote host closed the connection]
em has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has joined #ruby
em has quit [Client Quit]
em has joined #ruby
em has quit [Client Quit]
sidx64 has joined #ruby
samwheel has joined #ruby
samwheel has quit [Client Quit]
samwheel has joined #ruby
alex`` has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
synthroid has joined #ruby
jerematic has joined #ruby
clemens3_ has joined #ruby
samwheel has quit [Client Quit]
samwheel has joined #ruby
samwheel has quit [Client Quit]
giraffe has joined #ruby
samwheel has joined #ruby
tpendragon has joined #ruby
amar has joined #ruby
RougeR has quit [Ping timeout: 248 seconds]
karapety_ has joined #ruby
bmurt has joined #ruby
amar has quit [Ping timeout: 248 seconds]
Burgestrand has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
karapet__ has joined #ruby
Cavallari1 has joined #ruby
karapety_ has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 256 seconds]
Cavallari has quit [Ping timeout: 265 seconds]
Cavallari1 is now known as Cavallari
bmurt has quit [Ping timeout: 256 seconds]
shtirlic_ has quit [Quit: ZNC - http://znc.in]
shtirlic_ has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
Ltem has quit [Ping timeout: 256 seconds]
Psybur has joined #ruby
alex`` has quit [Ping timeout: 248 seconds]
phaul has quit [Ping timeout: 240 seconds]
samwheel has quit [Quit: Leaving]
maufart__ has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
aufi_ has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
Burgestrand has quit [Quit: Closing time!]
shtirlic_ has quit [Quit: ZNC - http://znc.in]
shtirlic_ has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
ElFerna has joined #ruby
camilasan has joined #ruby
Guest75029 has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Quit: dionysus69]
vondruch_ has joined #ruby
ReusedSalt has quit [Read error: Connection reset by peer]
Ltem has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
ellcs has quit [Ping timeout: 240 seconds]
ElFerna has quit [Quit: WeeChat 1.9]
suukim has quit [Quit: Konversation terminated!]
camilasan has quit [Read error: Connection reset by peer]
zautomata has quit [Changing host]
zautomata has joined #ruby
camilasan has joined #ruby
erlend has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lele has quit [Ping timeout: 265 seconds]
GodFather has joined #ruby
lele has joined #ruby
erlend has joined #ruby
andikr has quit [Remote host closed the connection]
pb122 has quit [Read error: Connection reset by peer]
kn-928 has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
kn-928 has quit [Client Quit]
kn-928 has joined #ruby
nowhereman_ has joined #ruby
duderonomy has joined #ruby
kn-928 has quit [Client Quit]
kn-928 has joined #ruby
kn-928 has quit [Client Quit]
dr3w_ has joined #ruby
zacts has quit [Quit: WeeChat 1.9.1]
zacts has joined #ruby
k0mpa has joined #ruby
ryzokuken has quit [Remote host closed the connection]
Burgestrand has joined #ruby
bmurt has joined #ruby
amatas has joined #ruby
amatas has quit [Remote host closed the connection]
ellcs has joined #ruby
sundhell is now known as sundhell_away
NL3limin4t0r_afk has quit [Ping timeout: 268 seconds]
karapet__ has quit [Remote host closed the connection]
NL3limin4t0r_afk has joined #ruby
apeiros__ has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Ping timeout: 256 seconds]
grilix_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
GodFather has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
aufi_ has joined #ruby
GodFather has joined #ruby
maufart__ has quit [Ping timeout: 246 seconds]
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
chouhoulis has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
duderonomy has joined #ruby
phaul has joined #ruby
rabajaj has quit [Ping timeout: 256 seconds]
Rapture has joined #ruby
nowhereman_ has quit [Ping timeout: 256 seconds]
yeticry has quit [Read error: Connection reset by peer]
asio has quit [Ping timeout: 240 seconds]
duderonomy has quit [Client Quit]
yeticry has joined #ruby
pastorinni has joined #ruby
meadmoon has quit [Quit: ZZZzzz…]
Mikasi has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 264 seconds]
nowhereman_ has joined #ruby
Esa_ has joined #ruby
pb122 has joined #ruby
GodFather_ has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
dr3w_ has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
netherwolfe has joined #ruby
schneider has joined #ruby
stormpack has joined #ruby
apeiros__ has quit [Ping timeout: 240 seconds]
beremenushka3 is now known as HappyHappyFunFun
suukim has joined #ruby
ellcs has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cyberg has joined #ruby
troulouliou_div2 has joined #ruby
minimalism has quit [Quit: minimalism]
AJA4350 has quit [Remote host closed the connection]
Ltem has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
apeiros has joined #ruby
minimalism has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
Cavallari has quit [Quit: Cavallari]
NewbiePat has quit []
konsolebox has quit [Max SendQ exceeded]
vondruch has quit [Quit: vondruch]
sanscoeur has quit [Remote host closed the connection]
cschneid_ has joined #ruby
erlend has quit [Ping timeout: 248 seconds]
jeremati_ has joined #ruby
erlend has joined #ruby
jeremati_ has quit [Read error: Connection reset by peer]
rippa has joined #ruby
jeremati_ has joined #ruby
whathappens has joined #ruby
jerematic has quit [Ping timeout: 264 seconds]
aufi_ has quit [Quit: Leaving]
dcunit3d has joined #ruby
whathappens has quit [Ping timeout: 256 seconds]
jeffreylevesque has joined #ruby
schneider has quit [Ping timeout: 260 seconds]
roshanavand has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
<troulouliou_div2> hi i have a file of few line; how can i select strings that match a certain regexp
whathappens has joined #ruby
<troulouliou_div2> i mean while gets and regexp or lines.find regexp ?
apparition has quit [Quit: Bye]
karapetyan has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
guacamole has quit [Client Quit]
n008f4g_ has quit [Ping timeout: 240 seconds]
aupadhye has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 256 seconds]
PsionTheory has joined #ruby
roshanavand has joined #ruby
guacamole has quit [Client Quit]
synthroid has quit [Remote host closed the connection]
Vaevictus has left #ruby [#ruby]
dionysus69 has joined #ruby
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
karapetyan has joined #ruby
GodFather_ has quit [Ping timeout: 240 seconds]
clemens3_ has quit [Ping timeout: 240 seconds]
jcarl43 has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
tolerablyjake has joined #ruby
jeremati_ has quit [Remote host closed the connection]
jerematic has joined #ruby
suukim has quit [Quit: Konversation terminated!]
cagomez_ has joined #ruby
workmad3 has joined #ruby
suukim has joined #ruby
amar has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
amar_ has joined #ruby
grilix_ has quit [Ping timeout: 256 seconds]
cthulchu has joined #ruby
Ltem has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amar has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
amar_ has quit [Ping timeout: 248 seconds]
darkhanb has joined #ruby
nicesignal has quit [Read error: Connection reset by peer]
nicesignal has joined #ruby
oleo has joined #ruby
grilix_ has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
wilbert has joined #ruby
mlkkk has quit [Remote host closed the connection]
nowhereman_ has quit [Ping timeout: 256 seconds]
mkaito has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 276 seconds]
mkaito has joined #ruby
mkaito has quit [Changing host]
mkaito has joined #ruby
dr3w_ has quit [Read error: Connection reset by peer]
dr3w__ has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
troulouliou_div2 has joined #ruby
bmurt has quit [Ping timeout: 264 seconds]
orbyt_ has joined #ruby
stormpack has quit [Quit: Leaving]
mikecmpbll has quit [Ping timeout: 260 seconds]
suukim has quit [Quit: Konversation terminated!]
inerthia_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
inerthia has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
noobineer has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
guille-moe has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 240 seconds]
sanscoeur has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
ramfjord has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
Beams has quit [Quit: .]
dionysus69 has joined #ruby
marxarelli has joined #ruby
dr3w_ has joined #ruby
marxarelli has quit [Client Quit]
alfiemax has joined #ruby
marxarelli has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
clemens3_ has joined #ruby
pilne has joined #ruby
tvw has quit [Remote host closed the connection]
erlend has quit [Ping timeout: 248 seconds]
amar has joined #ruby
erlend has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
GodFather_ has joined #ruby
nb_bez________ has joined #ruby
claudiuinberlin has joined #ruby
karapetyan has quit [Remote host closed the connection]
ryzokuken has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
pb122 has quit [Read error: Connection reset by peer]
pb122 has joined #ruby
kapil___ has joined #ruby
karapetyan has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has quit [Remote host closed the connection]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
venmx has quit [Ping timeout: 265 seconds]
troulouliou_div2 has joined #ruby
<troulouliou_div2> hi whi does this function output an array : "[test]".scan(/\[(.*?)\]/).first.class
<troulouliou_div2> to get the first math i need to do "[test]".scan(/\[(.*?)\]/).first.first
<phaul> scan gives a sequence (array) of matches that's what its for
<phaul> &ri scan
<phaul> ri String#scan
<phaul> &ri String#scan
chouhoul_ has joined #ruby
<phaul> you can use String#[] with regexp to get a match
<phaul> >> "blah"[/a./]
<ruby[bot]> phaul: # => "ah" (https://eval.in/991411)
<apeiros> troulouliou_div2: scan yields an array if you have capturing groups in your regex
<apeiros> and since you have one -> array of arrays
chouhoulis has quit [Ping timeout: 268 seconds]
<troulouliou_div2> phaul, apeiros ok thanks
dinfuehr_ is now known as dinfuehr
<apeiros> >> "[test]".scan(/\[.*?\]/).first.class
<ruby[bot]> apeiros: # => String (https://eval.in/991412)
<apeiros> also, [^\]] is usually better than .*?
<apeiros> errr, lacks a quantifier
lightstalker has quit [Ping timeout: 264 seconds]
troulouliou_div2 has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
Orxata_ has joined #ruby
<Orxata_> hi
Rr4sT has joined #ruby
<Orxata_> I get this error when I'm trying to execute a rake:
<Orxata_> TypeError: can't convert Fixnum into String
<Orxata_> the line is:
<Orxata_> end_date = Date.parse(format("%04d-%02d-%02d",y,m,Date.civil(y,m,-1).day.to_s))
<Orxata_> where y and m are both numbers
<Orxata_> e,g: end_date = Date.parse(format("%04d-%02d-%02d",2018,4,Date.civil(2018,4,-1).day.to_s))
vutral|kali has joined #ruby
<Orxata_> however that same line is used in another rake and it does not cause any problem
<vutral|kali> in which variable is the version of ruby?
alex`` has joined #ruby
<Orxata_> what do you mean?
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Orxata_> ah, ok
<apeiros> what the heck?
<apeiros> that line is ridiculous
<apeiros> rube goldberg style date creation
<apeiros> >> y = 2018; m = 1; Date.parse(format("%04d-%02d-%02d",y,m,Date.civil(y,m,-1).day.to_s)) == Date.civil(y,m,-1)
<ruby[bot]> apeiros: # => uninitialized constant Date ...check link for more (https://eval.in/991417)
<apeiros> >> require 'date'; y = 2018; m = 1; Date.parse(format("%04d-%02d-%02d",y,m,Date.civil(y,m,-1).day.to_s)) == Date.civil(y,m,-1)
<ruby[bot]> apeiros: # => true (https://eval.in/991418)
<apeiros> Orxata_: ^
<apeiros> most of the code in that line is superfluous
mikecmpbll has joined #ruby
ramfjord has joined #ruby
n008f4g_ has joined #ruby
unreal_ has joined #ruby
<havenwood> vutral|kali: RUBY_VERSION
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
unreal has quit [Ping timeout: 256 seconds]
pastorinni has quit [Remote host closed the connection]
<Orxata_> ok : )
shmoon has joined #ruby
shmoon has left #ruby [#ruby]
<Orxata_> ArgumentError: wrong number of arguments (2 for 1)
<Orxata_> /usr/lib/ruby/1.8/date.rb:751:in `civil'
<Orxata_> /usr/lib/ruby/1.8/date.rb:632:in `valid_civil?'
<Orxata_> /usr/lib/ruby/1.8/date.rb:398:in `civil_to_jd'
<Orxata_> /usr/lib/ruby/1.8/date.rb:398:in `method_missing'
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<Orxata_> apeiros: what I'm doing here is (2017..2018.each do |y| (1..12).each do |m| end_date = Date.civil(y,m,-11)
<apeiros> ruby 1.8 is *ancient*. use a ruby which is not EOL.
millerti has joined #ruby
tolerablyjake has quit [Ping timeout: 276 seconds]
<Orxata_> Date.civil(y,m,-1)
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<apeiros> `(2017..2018).each do |y| (1..12).each do |m| Date.civil(y,m,-1) end end` runs fine in ruby 2.5, and I can't help you with problems in ruby <2.3
<Orxata_> ok
<apeiros> if you can make a snippet which reproduces your problem in 2.3+, I can try to help
<apeiros> though, later. afk for ~50min
jeremati_ has joined #ruby
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
duderonomy has joined #ruby
jerematic has quit [Ping timeout: 240 seconds]
jeremati_ has quit [Ping timeout: 240 seconds]
ciscam has quit [Ping timeout: 276 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
venmx has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
sauvin has quit [Ping timeout: 256 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Orxata_ has quit [Quit: Lost terminal]
dc1 has joined #ruby
dcunit3d has quit [Ping timeout: 276 seconds]
synthroid has joined #ruby
jeffreylevesque has quit [Ping timeout: 268 seconds]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
hkais has quit [Ping timeout: 248 seconds]
bungfish has joined #ruby
karapety_ has joined #ruby
sameerynho has joined #ruby
SeepingN has joined #ruby
guacamole has quit [Client Quit]
mistergibson has joined #ruby
karapet__ has joined #ruby
bungfish has quit []
karapetyan has quit [Ping timeout: 256 seconds]
karapety_ has quit [Ping timeout: 268 seconds]
eckhardt has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
duderonomy has joined #ruby
ron___ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ron___ has quit []
<apeiros> wow, accurate estimation :D
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
<Bish> depepnds on what you did
<Bish> have been watching the clock for 50 minutes ⇒ not so impressive
* Bish sees himself out
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sameerynho has quit [Ping timeout: 260 seconds]
marxarelli is now known as marxarelli|afk
dc1 has quit [Ping timeout: 240 seconds]
AJA4350 has joined #ruby
whathappens has quit []
nowhereman_ has joined #ruby
<apeiros> Bish: been jogging
<Bish> wish i did that
<Bish> but i am lazy
cagomez_ has quit [Remote host closed the connection]
<dionysus69> whats up with <2.3, just curious
cagomez_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
<apeiros> dionysus69: what do you mean?
<dionysus69> you said you couldn't help with problems in ruby <2.3, in regards to Date.civil
cadillac_ has joined #ruby
<dionysus69> just wonder why wouldnt that work in <2.3 :D
<apeiros> no, I said I can't help with problems which don't reproduce in 2.3+
<apeiros> and the reason is that <2.3 is *old* and I'm not going to install ancient rubies just to help some people who can't be arsed to upgrade.
n3b has quit [Ping timeout: 240 seconds]
<dionysus69> haha, I see :)
cagomez_ has quit [Ping timeout: 276 seconds]
<dionysus69> I didn't consider 2.3 to be that old though, that was source of my wonder x)
n3b has joined #ruby
<apeiros> I need to add a ruboto command `!age 2.1` -> "Ruby 2.1 was released 2013-12-25, more than 4 years and 3 months ago."
erlend has quit [Ping timeout: 264 seconds]
<Eiam> oh dear 2.3 is old? I think i just updated a project to it =(
<apeiros> hm, maybe + " and is no longer maintained" / " and is still maintained" / "and end of maintenance is planned for …"
<Eiam> 2.5.1. damn.
erlend has joined #ruby
Bored1238 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
n0m4d1c has joined #ruby
cagomez_ has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
<apeiros> Eiam: 2.3 is still supported and IMHO fine
hkais has joined #ruby
cagomez_ has quit [Ping timeout: 248 seconds]
n0m4d1c has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
ta_ has quit [Remote host closed the connection]
troulouliou_dev has quit [Quit: Leaving]
cagomez_ has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
yosafbridge has quit [Quit: Leaving]
alfiemax has joined #ruby
synthroid has quit [Remote host closed the connection]
ta_ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
cagomez_ has quit [Ping timeout: 240 seconds]
Rr4sT has quit [Quit: Connection closed for inactivity]
yosafbridge has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
cagomez_ has joined #ruby
sidx64 has joined #ruby
grilix has joined #ruby
grilix_ has quit [Read error: Connection reset by peer]
sidx64_ has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
ta_ has quit [Remote host closed the connection]
sidx64 has quit [Ping timeout: 256 seconds]
nadir has joined #ruby
ta_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
millerti has quit [Read error: Connection reset by peer]
marxarelli|afk is now known as marxarelli
Bored1238 has quit []
venmx has quit [Ping timeout: 248 seconds]
ellcs has joined #ruby
dr3w_ has joined #ruby
synthroid has joined #ruby
pastorinni has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Psybur has quit [Ping timeout: 260 seconds]
nb_bez________ has quit [Quit: Connection closed for inactivity]
tomphp has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
phaul has quit [Ping timeout: 256 seconds]
psychicist__ has quit [Ping timeout: 256 seconds]
nightman has joined #ruby
alfiemax has joined #ruby
roshanavand has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
ellcs has quit [Ping timeout: 260 seconds]
nightman has quit [Quit: WeeChat 2.1]
alfiemax has quit [Ping timeout: 260 seconds]
synthroid has quit []
tomphp has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
konsolebox has joined #ruby
jeffreylevesque has joined #ruby
Mikasi has quit [Read error: Connection reset by peer]
coderphive has joined #ruby
ciscam has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
\void has joined #ruby
tomphp_ has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
tomphp has quit [Ping timeout: 264 seconds]
jeffreylevesque has quit [Ping timeout: 256 seconds]
konsolebox has quit [Quit: .]
orbyt_ has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
ldnunes has quit [Quit: Leaving]
hkais has quit [Quit: Leaving.]
cschnei__ has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
d3mon has joined #ruby
sameerynho has joined #ruby
d3mon has left #ruby [#ruby]
cschneid_ has joined #ruby
Ltem has quit [Quit: gn]
dr3w_ has joined #ruby
cschnei__ has quit [Ping timeout: 248 seconds]
pastorinni has quit []
grilix has quit [Ping timeout: 248 seconds]
amar has quit [Remote host closed the connection]
sidx64_ has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
reber has left #ruby ["Leaving"]
ur5us has joined #ruby
erlend has quit [Ping timeout: 246 seconds]
pabloh has quit [Quit: Alwyzon, cloud-powered IRC client and bouncer - http://alwyzon.com/]
erlend has joined #ruby
pabs has quit [Ping timeout: 260 seconds]
pabs has joined #ruby
ramfjord has joined #ruby
dgarstang has joined #ruby
<dgarstang> Ruby makes me sad. Trying to get response from rest-client gem. If I use puts resp.body I see it but if I do puts ">>> #{resp.body} <<<" i don't. Why?
konsolebox has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
<dgarstang> and why does puts.resp show me {"modified":"EA7SNK"} whereas puts.resp['modified'] shows me nothing. How can that be!?
RougeR has quit [Ping timeout: 248 seconds]
chongtxtx has quit [Ping timeout: 256 seconds]
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<konsolebox> what's puts.resp.class
kapil___ has quit [Quit: Connection closed for inactivity]
<dgarstang> konsolebox: RestClient::Response
<konsolebox> maybe it has a modified []
<dgarstang> It looks like I have to JSON.parse(resp) ...
<dgarstang> i guess
tdy has quit [Ping timeout: 256 seconds]
<konsolebox> puts.resp.class.instance_method[:[]].owner
<konsolebox> the output of that is the class/module you might have to examine
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dgarstang has quit [Quit: WeeChat 1.8]
tdy has joined #ruby
MoskitoHero has joined #ruby
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
gregf_ has quit [Ping timeout: 260 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
chouhoul_ has quit [Ping timeout: 256 seconds]
SynSynack has joined #ruby
sameerynho has quit [Ping timeout: 248 seconds]
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
quobo has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
k0mpa has quit [Remote host closed the connection]
amelliaa has quit [Quit: -]
cagomez_ has quit [Remote host closed the connection]
cagomez_ has joined #ruby
sanscoeur has quit [Ping timeout: 256 seconds]
cagomez_ has quit [Remote host closed the connection]
cagomez_ has joined #ruby
ramfjord has joined #ruby
bambanx has joined #ruby
bambanx_ has joined #ruby
dr3w_ has joined #ruby
netherwolfe has quit [Ping timeout: 260 seconds]
bambanx_ has quit [Remote host closed the connection]
<baweaver> 2.6 > (1..)
<baweaver> :D
ta_ has quit [Remote host closed the connection]
<baweaver> dminuoso ^
n0m4d1c has joined #ruby
bambanx has quit [Ping timeout: 248 seconds]
n008f4g_ has joined #ruby
alex`` has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
marxarelli is now known as marxarelli|afk
cschneid_ has quit [Remote host closed the connection]
n008f4g_ has quit [Ping timeout: 268 seconds]
venmx has joined #ruby
cschneid_ has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
n008f4g_ has joined #ruby
d_kam___________ has quit [Quit: Be back later ...]
ramfjord has joined #ruby
d_kam___________ has joined #ruby
rwb has joined #ruby
clemens3_ has quit [Ping timeout: 240 seconds]
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
John_Ivan has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
ryzokuken has quit [Remote host closed the connection]
d_kam___________ has quit [Ping timeout: 256 seconds]
xt233 has joined #ruby
n008f4g_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bzb has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
cschneid_ has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jeffreylevesque has joined #ruby
<havenwood> 2.7 > (..)
<havenwood> No ends!
<baweaver> Viva la revolution!
alfiemax has quit [Ping timeout: 240 seconds]
wilbert has quit [Ping timeout: 248 seconds]
cschneid_ has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
karapet__ has quit [Remote host closed the connection]
physicist__ has quit [Quit: Lost terminal]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
jeen has joined #ruby
banisterfiend has quit [Ping timeout: 248 seconds]
dc1 has joined #ruby
ta_ has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
d_kam___________ has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.1]
Azure has quit [Read error: Connection reset by peer]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
d_kam___________ has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
pb122 has quit [Ping timeout: 256 seconds]
n0m4d1c has quit [Remote host closed the connection]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
jeen has quit [Quit: This computer has gone to sleep]
amar has joined #ruby
Yxhuvud has joined #ruby
<arooni> question Could not find gem 'capistrano (~> 2.15.9)' in any of the gem sources listed in your Gemfile. ;; even when i have specifically tried specifying both https:http versions of rubygems
coderphive has quit [Quit: coderphive]
ramfjord has quit [Ping timeout: 256 seconds]
jerematic has joined #ruby
amar has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
schneider has joined #ruby
xt233 has quit [Quit: This computer has gone to sleep]
Mrgoose- has quit [Quit: ZNC 1.7.x-nightly-20170908-e86efb08 - https://znc.in]
Mrgoose has joined #ruby
jeen has joined #ruby
d_kam___________ has joined #ruby
duderonomy has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
wilbert has joined #ruby
d_kam___________ has quit [Ping timeout: 240 seconds]
dc1 has quit [Ping timeout: 276 seconds]
erlend has quit [Ping timeout: 256 seconds]
cagomez_ has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 256 seconds]
aarkerio has joined #ruby
cagomez_ has joined #ruby
erlend has joined #ruby
jerematic has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 264 seconds]
jerematic has joined #ruby
<aarkerio> quick question, I see: 13975487002892.to_s(36) = "4yc904i6k"
<aarkerio> where I can see all possible .to_s parameters?
<aarkerio> what's "36"?
cagomez__ has joined #ruby
jerematic has quit [Ping timeout: 240 seconds]
cagomez_ has quit [Ping timeout: 240 seconds]
xt233 has joined #ruby
xt233 has quit [Client Quit]
<headius> aarkerio: base
<headius> so 36 is 0-9a-z for digits
cagomez__ has quit [Ping timeout: 240 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
<aarkerio> hmmm, I see, thanks headius!
aarkerio has quit [Quit: Leaving]
n0m4d1c has joined #ruby