havenwood 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-preview2: 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
shinnya has joined #ruby
sytherax has joined #ruby
ciscam has quit [Ping timeout: 260 seconds]
ciscam has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
sytherax has quit [Remote host closed the connection]
orbyt_ has joined #ruby
cagomez has quit [Remote host closed the connection]
rgiscard has quit [Quit: Gone fishing]
cagomez has joined #ruby
<zenspider> the main confusion comes from `=` being in between `&&` and `and`.
<zenspider> >> a = :b and :c
<ruby[bot]> zenspider: # => :c (https://eval.in/1020957)
<zenspider> >> a = :b and :c ; a
<ruby[bot]> zenspider: # => :b (https://eval.in/1020958)
cagomez has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
dendazen has joined #ruby
BlopMonster has joined #ruby
whowantstolivefo has quit []
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
duderonomy has joined #ruby
roamingdog has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
zlogan2003 has quit [Ping timeout: 256 seconds]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
mjolnird has joined #ruby
pankaj has quit [Quit: leaving]
shinnya has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wontruefree has quit [Quit: bye]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BlopMonster has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
orbyt_ has joined #ruby
mjolnird has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
shinnya has joined #ruby
Azure has quit [Ping timeout: 264 seconds]
Azure has joined #ruby
eckhardt has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thebetrayer has quit [Ping timeout: 264 seconds]
raynold has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sylario has quit [Quit: Connection closed for inactivity]
Purplex has joined #ruby
<Purplex> Hi. Could someone help me with a gemfile problem?
<Purplex> whenever I run "bundle install" I get the following message
<Purplex> bundle install --deployment --without development test postgres aws
<Purplex> sorry not that one
<Purplex> this one
<Purplex> Ignoring ffi-1.9.23 because its extensions are not built. Try: gem pristine ffi --version 1.9.23
<Purplex> Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
<Purplex> Ignoring gem-wrappers-1.3.2 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.2
elomatreb has quit [Quit: ZNC - https://znc.in]
<Purplex> Ignoring openssl-2.1.1 because its extensions are not built. Try: gem pristine openssl --version 2.1.1
<Purplex> Could not locate Gemfile
<Purplex> Could somebody help me please?
elomatreb has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
<Purplex> what a bunch of idle cocksuckers...
Purplex has left #ruby [#ruby]
<eam> guilty
BlopMonster has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
theRoUS has joined #ruby
cagomez has joined #ruby
sytherax has joined #ruby
BlopMonster has quit [Ping timeout: 264 seconds]
jrafanie has joined #ruby
cagomez has quit [Ping timeout: 260 seconds]
white_lilies has joined #ruby
Vivekananda has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
gizmore has quit [Remote host closed the connection]
\void has quit [Quit: So long, and thanks for all the fish.]
wontruefree has joined #ruby
<Radar> !ban Purplex
ciscam has quit [Ping timeout: 240 seconds]
ciscam has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
gigetoo has quit [Ping timeout: 256 seconds]
yokel has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
yokel has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thebetrayer has joined #ruby
wontruefree has quit [Quit: bye]
Tempesta has joined #ruby
jrafanie has joined #ruby
karapetyan has joined #ruby
dogweather has quit [Remote host closed the connection]
agent_white has quit [Quit: bbl]
karapetyan has quit [Ping timeout: 256 seconds]
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
dogweather has joined #ruby
cass_j has joined #ruby
white_lilies has quit [Ping timeout: 264 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sytherax has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 265 seconds]
sytherax has joined #ruby
Mia has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
konsolebox has quit [Ping timeout: 276 seconds]
gigetoo has joined #ruby
cyberg has quit [Quit: Leaving]
konsolebox has joined #ruby
gnufied has quit [Ping timeout: 264 seconds]
<cjohnson> 3 minutes!!!
<cjohnson> that escalated extremely quickly
<cjohnson> lol
thebetrayer has quit [Ping timeout: 260 seconds]
dogweather has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
t0xik has joined #ruby
dogweather has joined #ruby
BlopMonster has joined #ruby
nicht has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
BlopMonster has quit [Ping timeout: 260 seconds]
nicht has quit [Remote host closed the connection]
nicht has joined #ruby
cstrahan_ has quit [Ping timeout: 256 seconds]
pwillard has quit [Ping timeout: 256 seconds]
boxrick_ has quit [Ping timeout: 256 seconds]
rflot has quit [Ping timeout: 256 seconds]
esObe has quit [Ping timeout: 256 seconds]
sparc has quit [Ping timeout: 256 seconds]
esObe has joined #ruby
kireevco_ has quit [Ping timeout: 256 seconds]
dogweather has joined #ruby
caw________ has quit [Ping timeout: 256 seconds]
sparc has joined #ruby
rflot has joined #ruby
<desnudopenguino> wow. that guy was somethin else
pwillard has joined #ruby
caw________ has joined #ruby
cstrahan_ has joined #ruby
kireevco_ has joined #ruby
boxrick_ has joined #ruby
darkhanb has joined #ruby
BlopMonster has joined #ruby
ciscam has quit [Ping timeout: 256 seconds]
ciscam has joined #ruby
SanguineAnomaly has quit [Ping timeout: 240 seconds]
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
SanguineAnomaly has joined #ruby
wontruefree has joined #ruby
thebetrayer has joined #ruby
sytherax has quit [Remote host closed the connection]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
BlopMonster has quit [Ping timeout: 248 seconds]
braincrash has quit [Quit: bye bye]
kmurphy4 has quit [Quit: kmurphy4]
gix has joined #ruby
gix- has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
kmurphy4 has joined #ruby
garyserj has quit [Ping timeout: 264 seconds]
garyserj has joined #ruby
levifig has quit [Quit: Farewell]
levifig has joined #ruby
AJA4350 has quit [Quit: AJA4350]
dendazen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wontruef_ has joined #ruby
rgiscard has joined #ruby
dogweather has quit [Remote host closed the connection]
thebetrayer has quit [Ping timeout: 276 seconds]
wontruefree has quit [Ping timeout: 265 seconds]
ciscam has quit [Ping timeout: 264 seconds]
sytherax has joined #ruby
dogweather has joined #ruby
dviola has quit [Quit: WeeChat 2.1]
BlopMonster has joined #ruby
ciscam has joined #ruby
thebetrayer has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
BlopMonster has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
nadir has joined #ruby
shinnya has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
gigetoo has quit [Ping timeout: 248 seconds]
gigetoo has joined #ruby
lytol has quit [Remote host closed the connection]
sytherax has quit [Ping timeout: 264 seconds]
subroot has quit [Read error: Connection reset by peer]
hfp_work has quit [Ping timeout: 245 seconds]
johnny56 has joined #ruby
johnny56_ has quit [Ping timeout: 276 seconds]
hfp_work has joined #ruby
BloopMonster has joined #ruby
thebetrayer has quit [Ping timeout: 276 seconds]
zlogan2003 has joined #ruby
nicht has quit [Ping timeout: 256 seconds]
sshock has joined #ruby
machinewar has joined #ruby
<machinewar> helllo
SeepingN has joined #ruby
BloopMonster has quit [Ping timeout: 260 seconds]
tty has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
BlopMonster has joined #ruby
BlopMonster has quit [Ping timeout: 276 seconds]
tty has quit [Quit: tty]
tty has joined #ruby
tty has quit [Client Quit]
metalbot has joined #ruby
tty has joined #ruby
roamingdog has joined #ruby
shakes has joined #ruby
shakes has quit [Read error: Connection reset by peer]
WAFFLEMAKER3000 has joined #ruby
jamesaxl has quit [Quit: WeeChat 2.1]
rgiscard has quit [Quit: Gone fishing]
WAFFLEMAKER3000 has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
machinewar has quit [Remote host closed the connection]
PixeLInc has quit [Ping timeout: 255 seconds]
PixeLInc has joined #ruby
justinmrkva has quit [Ping timeout: 240 seconds]
justinmrkva has joined #ruby
sshock has quit [Ping timeout: 248 seconds]
sshock has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dogweather has quit [Remote host closed the connection]
Eiam has quit [Ping timeout: 255 seconds]
sauvin has joined #ruby
dogweather has joined #ruby
jcarl43 has joined #ruby
UncleCid__ has joined #ruby
thinkpad has quit [Quit: lawl]
pwnd_nsfw` has quit [Ping timeout: 276 seconds]
thinkpad has joined #ruby
chat has joined #ruby
RougeR has quit [Ping timeout: 260 seconds]
chat_ has quit [Ping timeout: 260 seconds]
Inline has joined #ruby
wontruef_ has quit [Quit: bye]
reber has joined #ruby
zapata has joined #ruby
Puffball has joined #ruby
zapata has quit [Client Quit]
terces has joined #ruby
kmurphy4 has quit [Quit: kmurphy4]
SeepingN has joined #ruby
Inline has quit [Quit: Leaving]
terces has quit [Quit: Page closed]
dogweather has quit [Ping timeout: 256 seconds]
sshock has left #ruby [#ruby]
dogweather has joined #ruby
metalbot has quit [Ping timeout: 240 seconds]
metalbot has joined #ruby
conta has joined #ruby
dogweather has quit [Read error: Connection timed out]
dogweather has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
donofrio has quit [Remote host closed the connection]
bathtub_shark has quit [Quit: WeeChat 2.1]
Zarthus has quit [Ping timeout: 255 seconds]
pwnd_nsfw` has joined #ruby
aupadhye has joined #ruby
dionysus69 has quit [Quit: dionysus69]
UncleCid__ has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has quit [Ping timeout: 260 seconds]
amelliaa has joined #ruby
BTRE has quit [Ping timeout: 245 seconds]
biberu has joined #ruby
Zarthus has joined #ruby
mtkd has joined #ruby
BTRE has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
schleppel has joined #ruby
mtkd has quit [Remote host closed the connection]
conta has quit [Quit: conta]
mtkd has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has joined #ruby
amar has joined #ruby
karapetyan has joined #ruby
<bijan_> Hi, I already posted this to the rails channel but maybe it is fileutils related: I get several warnings on rails s command complaining about fileutils.rb and "warning: already initialized constant" for some constants. Same on two machines with latest rails gem, ruby 2.5.1 via rbenv. Log: https://gist.github.com/gobijan/cff23d11c0a5b779fde22fa099ed8a39
<bijan_> Anyone has an idea what is wrong here?
yohji has joined #ruby
andikr has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
DarkUnicorn has joined #ruby
akaiiro has quit [Ping timeout: 240 seconds]
arekushi has quit [Read error: Connection reset by peer]
sysvalve has joined #ruby
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
BlopMonster has joined #ruby
TomyWork has joined #ruby
BlopMonster has quit [Ping timeout: 265 seconds]
amelliaa has quit [Ping timeout: 256 seconds]
mostly-h1rmless has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
tvw has quit [Client Quit]
tvw has joined #ruby
n3b has quit [Ping timeout: 240 seconds]
n3b has joined #ruby
bijan_ has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
fmccann has quit [Ping timeout: 248 seconds]
mostly-harmless has joined #ruby
zmo has quit [Ping timeout: 256 seconds]
RougeR has joined #ruby
boo has joined #ruby
Dabo has quit [Ping timeout: 264 seconds]
boo is now known as Guest86156
RougeR has quit [Ping timeout: 245 seconds]
Guest86156 is now known as rr4
rr4 is now known as rr-4
cabotto has joined #ruby
<rr-4> hello why rubygems stored gems with name '_' etc?
<rr-4> how do it?
Dabo has joined #ruby
zmo has joined #ruby
hurricanehrndz_ has quit [Quit: Goodbye]
fmccann has joined #ruby
bathtub_shark has joined #ruby
Burgestrand has joined #ruby
vovs03 has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
dogweather has quit [Read error: Connection timed out]
hurricanehrndz has joined #ruby
riceandbeans has quit [Quit: leaving]
jcarl43 has quit [Quit: WeeChat 2.1]
mikecmpbll has joined #ruby
dogweather has joined #ruby
conta has joined #ruby
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
subroot has joined #ruby
conta has quit [Remote host closed the connection]
ams__ has joined #ruby
arekushi has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
rr-4 has quit [Quit: Leaving]
sphenxes has joined #ruby
dogweather has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
WAFFLEMAKER3000 has joined #ruby
WAFFLEMAKER3000 has quit [Ping timeout: 264 seconds]
dogweather has quit [Ping timeout: 268 seconds]
schleppel has quit [Quit: Konversation terminated!]
BlopMonster has joined #ruby
Guest26473 has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
jud^ has joined #ruby
Nicmavr has joined #ruby
karapetyan has joined #ruby
Nicmavr is now known as Guest16618
BlopMonster has quit [Ping timeout: 245 seconds]
jud has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
nowhereman_ has quit [Ping timeout: 245 seconds]
alex`` has joined #ruby
dogweather has quit [Read error: Connection timed out]
dogweather has joined #ruby
GeorgesLeYeti has quit [Quit: Leaving]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi (again)
zapata has joined #ruby
ellcs has joined #ruby
rblasucci_ has joined #ruby
<GeorgesLeYeti> I'm trying to make a function which convert 2 text into 1. These text can be pretty long. My question is, is it preferable to pass in parametre of my fucntion directly the text or a path of file (containing my text)
<dminuoso> GeorgesLeYeti: you can use lazy enumerators =)
<dminuoso> (Which is much more elegnat than passing paths around)
<dminuoso> GeorgesLeYeti: What kind of conversion is it?
<GeorgesLeYeti> Don't really know how to explain
<dminuoso> You can use the English language if you like. Or maybe some sample data
<GeorgesLeYeti> My 2 text are really close. So it compare the 2 text and try to align the 1st text with the 2nd
<dminuoso> GeorgesLeYeti: Use lazy file enumerators I'd say
rblasucci_ has quit [Client Quit]
<GeorgesLeYeti> dminuoso, Ok ty you. Don't know what it is but i ll check
aupadhye_ has joined #ruby
<dminuoso> GeorgesLeYeti: lazy enumerators enable efficient stream processing
<GeorgesLeYeti> ok
<GeorgesLeYeti> ty. I'll try this
rblasucci_ has joined #ruby
aupadhye has quit [Read error: Connection reset by peer]
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
boxrick_ is now known as boxrick
aupadhye_ has quit [Ping timeout: 268 seconds]
dogweather has quit [Ping timeout: 248 seconds]
vovs03 has quit [Read error: Connection reset by peer]
rblasucci_ has quit [Ping timeout: 260 seconds]
dogweather has joined #ruby
chat_ has joined #ruby
aupadhye_ has joined #ruby
chat has quit [Ping timeout: 260 seconds]
regedit has quit [Quit: Connection closed for inactivity]
ciscam has quit [Ping timeout: 240 seconds]
dogweather has quit [Ping timeout: 248 seconds]
ciscam has joined #ruby
dogweath_ has joined #ruby
biberu has quit [Ping timeout: 256 seconds]
cadillac_ has quit [Ping timeout: 276 seconds]
cadillac_ has joined #ruby
subroot has quit [Read error: Connection reset by peer]
conta has joined #ruby
bbobb has joined #ruby
bbobb has left #ruby [#ruby]
dogweath_ has quit [Ping timeout: 276 seconds]
cabotto has quit [Remote host closed the connection]
clemens31 has joined #ruby
hfp_work has quit [Quit: bye]
cabotto has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dogweath_ has joined #ruby
hfp_work has joined #ruby
dogweath_ has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
dogweather has joined #ruby
NL3limin4t0r has joined #ruby
<NL3limin4t0r> Is there a cleaner way to write this line? `new_value = value1.nil? && value2.nil? ? nil : !(value1 == false || value2 == false)`
<NL3limin4t0r> where values can be either `nil`, `true` or `false`.
<dminuoso> Haha this is funny.
<NL3limin4t0r> The intention is that if one of the 2 values is false the new value is set to false
leitz has joined #ruby
<NL3limin4t0r> if both are nil it is set to nil
<NL3limin4t0r> otherwise set to true
<dminuoso> NL3limin4t0r: Okay lets address this with some boolean algebra first
venmx has joined #ruby
<dminuoso> Assume for a second they cant be nil
<dminuoso> (... == true) and (... == false) are antipatterns
<NL3limin4t0r> I know, but nil is also falsey so.
<NL3limin4t0r> normaly you would just `value` or `!value`
<dminuoso> 12:33 dminuoso | Assume for a second they cant be nil
cabotto has quit [Remote host closed the connection]
<NL3limin4t0r> yy
<dminuoso> !(!v || !b)
<dminuoso> Does this look sane to you?
jamesaxl has joined #ruby
<cdunklau> isn't that just !(v && b)
<dminuoso> No. it's (v && b)
cabotto has joined #ruby
<cdunklau> right that's modus ponens
<cdunklau> derp
<NL3limin4t0r> oops, I'm so dump sometimes
<cdunklau> err wait no, modus ponens is with if/then
<NL3limin4t0r> its indeed v && b
<leitz> if you have a hash with string keys, is there an easy way to convert the keys to symbols?
<dminuoso> NL3limin4t0r: Now if this was haskell I'd just say `liftA2 (&&)` and kick back =P
<dminuoso> NL3limin4t0r: Anyway. So now think about the first part of that
<dminuoso> new_value = value1.nil? && value2.nil? ? nil : ...
<dminuoso> Why do you care that *both* are nil?
schleppel has joined #ruby
<NL3limin4t0r> If both are nil the value should stay nil because than the default is used.
<dminuoso> NL3limin4t0r: and what if one of them is nil?
<NL3limin4t0r> if one of the values is nil the new value should become the other value
<dminuoso> NL3limin4t0r: the most expressive way I can think of is: (v1.nil? || v2.nil?) ? (v1 || v2) : (v1 && v2)
<dminuoso> For the simple reason it's compact and provides clarity to the reader.
<NL3limin4t0r> I agree that it's more clear, but doesn't handle the case that v1 is `false` and v2 is `nil`
<NL3limin4t0r> than `nil` is returned
<dminuoso> Of course it does.
<dminuoso> Oh.
<dminuoso> wait
<dminuoso> NL3limin4t0r: I'd say you are abusing nil too much.
<NL3limin4t0r> You got a point there
jottr has quit [Ping timeout: 260 seconds]
Burgestrand has joined #ruby
<NL3limin4t0r> I guess I'll keep `(v1.nil? && v2.nil?) ? nil !(v1 == false || v2 == false)` for now
donofrio has joined #ruby
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
jrafanie has joined #ruby
<apeiros> NL3limin4t0r: (v1 == v2 && !v1) ? v1 : true
* dminuoso slaps apeiros
<apeiros> ouch!
<apeiros> why'd you do that?!?
* apeiros stares at dminuoso
<dminuoso> Don't support this nastyness!
<apeiros> why? logic reduction is fun.
<dminuoso> Is it?
<dminuoso> Im gonna show you the coolest thing
<apeiros> sure. at least I liked it at uni.
<apeiros> but then again, back then I knew how, now I just "wing" it :-/
<NL3limin4t0r> apeiros: That's pretty small, but doesn't handle a `nil` and `false` input.
<apeiros> it handles it exactly the way you described
<dminuoso> NL3limin4t0r: I suggest you fix your logic.
<apeiros> it'll be true in that case.
<dminuoso> It's things like that that make ruby code downright unreadable
<apeiros> or did you update your initial spec? I only read that one.
karapetyan has joined #ruby
<apeiros> 12:32 NL3limin4t0r: The intention is that if one of the 2 values is false the new value is set to false
<dminuoso> It forces a reader to sit in front of that line of code for 2 minutes and write down truth tables
<apeiros> 12:32 NL3limin4t0r: if both are nil it is set to nil
<dminuoso> It's time wasted.
<apeiros> 12:32 NL3limin4t0r: otherwise set to true
<apeiros> so false & nil => true
<apeiros> >> v1 = nil; v2 = false; (v1 == v2 && !v1) ? v1 : true
<ruby[bot]> apeiros: # => true (https://eval.in/1021237)
<NL3limin4t0r> 12:41:10 NL3limin4t0r | if one of the values is nil the new value should become the other value
zapata has quit [Read error: Connection reset by peer]
<apeiros> ok, so you did update your original spec.
zapata has joined #ruby
<apeiros> in that case, I'd go for readability and use case/when
workmad3 has quit [Ping timeout: 260 seconds]
<dminuoso> apeiros: Time travelling monads: https://gist.github.com/paf31/9d84ecf6a6a9b69cdb597a390f25764d
<apeiros> o0
<NL3limin4t0r> This is the output I expect: nil + nil = nil ; nil + fasle = false ; nil + true = true ; true + true = true ; true + false = false
<tbuehlmann> > :{
<dminuoso> NL3limin4t0r: Fix your design.
<dminuoso> You do not want this.
<dminuoso> This gross misusage of `nil` contributes to the billion dollar mistake.
karapetyan has quit [Ping timeout: 255 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<NL3limin4t0r> dminuoso: yeah, yeah, I know the design is broken but I'm not fixing that for now. That's something for the future.
<apeiros> note: future is an euphemism for "never" 😂
<dminuoso> apeiros: https://chrisdone.com/posts/twitter-problem-loeb there's some context for the problem (with a slightly worse written version of that)
<dminuoso> apeiros: It's an interesting problem to consider thats for sure :)
<apeiros> well, I've got a different problem to solve now. got to find a power cord for a foreign power supply :-S
<apeiros> it's a standard plug, but I don't know the name.
BloopMonster has joined #ruby
mtkd has quit []
<apeiros> NL3limin4t0r: hm, not on it
<apeiros> it's similar to the power plug you find in old cassette recorder, just 3 connectors instead of 2
<apeiros> I think it's an IEC C6
mtkd has joined #ruby
<cdunklau> apeiros: is it a laptop psu?
<apeiros> cdunklau: correct
<apeiros> and it's definitively an IEC C6 :)
<cdunklau> almost certainly C6
<apeiros> now to the joy of finding a cord for that in a shop around here :-S
chat has joined #ruby
cabotto has quit []
<cdunklau> apeiros: do you not have any cord for it?
<apeiros> nope. none that fits our power plugs :)
<apeiros> (it's not for my laptop, got a visitor who stays a couple of weeks)
conta has quit [Quit: conta]
<cdunklau> apeiros: right but they have a cord, right?
<cdunklau> apeiros: it might be easier to find a pin adapter for the plug side of their cord, assuming the PSU is a switching supply, which it most likely is if it has a C6 inlet
chat_ has quit [Ping timeout: 276 seconds]
biberu has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
zapata_ has joined #ruby
jrafanie has joined #ruby
zapata has quit [Ping timeout: 256 seconds]
sinduck has quit [Read error: Connection reset by peer]
chat_ has joined #ruby
donofrio has quit [Remote host closed the connection]
bijan_ has joined #ruby
chat has quit [Ping timeout: 240 seconds]
donofrio has joined #ruby
clemens31 has quit [Ping timeout: 240 seconds]
dogweather has quit [Ping timeout: 264 seconds]
BlopMonster has joined #ruby
ldnunes has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dogweather has joined #ruby
BlopMonster has quit [Ping timeout: 256 seconds]
sytherax has joined #ruby
AJA4350 has joined #ruby
Es0teric has joined #ruby
dendazen has joined #ruby
biberu has quit []
biberu has joined #ruby
zapata_ is now known as zapata
karapetyan has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
Burgestrand has quit [Quit: Closing time!]
dogweather has joined #ruby
Burgestrand has joined #ruby
gheegh has joined #ruby
cyberg has joined #ruby
rgiscard has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
apparition47 has joined #ruby
dogweather has quit [Ping timeout: 260 seconds]
dogweather has joined #ruby
rgiscard has quit [Remote host closed the connection]
dionysus70 has joined #ruby
cagomez has joined #ruby
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
<apeiros> nice, found one :D first shop, not even a minute. didn't expect that.
t0xik has quit [Quit: Connection closed for inactivity]
cagomez has quit [Ping timeout: 248 seconds]
_insomniac has quit [Quit: WeeChat 2.1]
dogweather has quit [Ping timeout: 240 seconds]
gray_-_wolf has joined #ruby
yohji has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
<cdunklau> \o/
jcalla has quit [Ping timeout: 268 seconds]
gray_-_wolf has quit [Quit: WeeChat 2.1]
amatas has joined #ruby
omth_ has quit [Ping timeout: 248 seconds]
za1b1tsu has joined #ruby
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
sytherax has quit [Quit: Leaving...]
dogweather has quit [Ping timeout: 245 seconds]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
za1b1tsu has quit [Quit: WeeChat 2.1]
Cthulu201 has joined #ruby
aufi has joined #ruby
Asher has quit [Ping timeout: 268 seconds]
bijan_ has joined #ruby
dogweather has joined #ruby
conta1 has joined #ruby
Inline has joined #ruby
fmcgeough has joined #ruby
mr_rich101 has joined #ruby
deathwishdave has joined #ruby
dogweather has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
amatas has quit [Ping timeout: 245 seconds]
za1b1tsu has joined #ruby
dogweather has joined #ruby
Asher has joined #ruby
psychicist__ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
jrafanie has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
RougeR has joined #ruby
RougeR has joined #ruby
gnufied has joined #ruby
subroot has joined #ruby
potatoe_ has joined #ruby
potatoe_ has quit []
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dogweather has quit [Ping timeout: 268 seconds]
jcalla has joined #ruby
dogweather has joined #ruby
<leitz> if you have a hash with string keys, is there an easy way to convert the keys to symbols?
<apeiros> leitz: Hash#transform_keys
<leitz> apeiros, thanks!
vondruch has quit [Ping timeout: 240 seconds]
<apeiros> though, only in newer rubies
<apeiros> map + to_h in older versions.
<NL3limin4t0r> leitz: Introduced in 2.5.0 to be exact.
<Zarthus> Nice. That's a good feature
<Zarthus> I remember having to need this all too often.
<NL3limin4t0r> If you'll use it with the RoR framework you can also use Hash#symbolize_keys
<leitz> Should work in 2.6 then.
<Zarthus> NL3limin4t0r: I imagine #symbolize_keys is only one-way.
<leitz> Cool.
<NL3limin4t0r> Zarthus: I don't exactly know what you mean with one-way, documentation can be found here: http://api.rubyonrails.org/classes/Hash.html#method-i-symbolize_keys
<NL3limin4t0r> I have to go though, got a meeting
<Zarthus> it doesn't convert symbols to strings :P
<Zarthus> stringify_keys() exists, though.
<NL3limin4t0r> Ah, nope, it doesn't
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
dogweather has quit [Ping timeout: 248 seconds]
arne_ has quit [Remote host closed the connection]
dogweather has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
ciscam has quit [Ping timeout: 276 seconds]
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ciscam has joined #ruby
lbracher has joined #ruby
workmad3 has joined #ruby
<lbracher> Hi there! I'm having a bad time trying to install passenger extension for apache using rvm. I'm not able to call gem binary directly from command line, although I'm able to do `rvm all do gem install passenger`. But this doesn't work with step by step provided by https://www.phusionpassenger.com/library/install/apache/install/oss/rubygems_rvm/ . Any ideas?
Asher has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
dionysus70 has joined #ruby
bmurt has joined #ruby
dionysus70 is now known as dionysus69
Asher has quit [Ping timeout: 245 seconds]
amelliaa has joined #ruby
conta1 has quit [Quit: conta1]
konsolebox has quit [Ping timeout: 264 seconds]
dogweather has quit [Ping timeout: 260 seconds]
<havenwood> lbracher: Do you get `command not found` with?: gem
<havenwood> lbracher: Or how does it not work?
za1b1tsu has joined #ruby
Rapture has joined #ruby
<havenwood> lbracher: What do you get for?: which -a gem
<havenwood> lbracher: printenv PATH
konsolebox has joined #ruby
<havenwood> lbracher: rvm current
<havenwood> lbracher: Show us those? ^
<lbracher> havenwood, I get command not found. which -a gem gives me nothing.
<lbracher> printenv PATH: /home/ubuntu/.rvm/gems/ruby-2.3.3/bin:/home/ubuntu/.rvm/gems/ruby-2.3.3@global/bin:/home/ubuntu/.rvm/gems/ruby-2.4.1/bin:/home/ubuntu/.rvm/gems/ruby-2.4.1@global/bin:/home/ubuntu/.rvm/gems/ruby-2.3.3/bin:/home/ubuntu/.rvm/gems/ruby-2.3.3@global/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin
<lbracher> rvm current -> system
dogweather has joined #ruby
<havenwood> lbracher: What RVM Ruby version are you trying to use?
<havenwood> lbracher: I'd suggest: rvm --default use ruby
<lbracher> ruby-2.3.3
<havenwood> lbracher: rvm --default use ruby-2.3.3
<havenwood> lbracher: An aside, but 2.3.7 is the latest 2.3.
bijan_ has joined #ruby
<havenwood> lbracher: rvm get head && rvm upgrade 2.3.3 2.3.7
<havenwood> (If you want to bump to 2.3.7.)
<havenwood> lbracher: It seems you don't have a default RVM Ruby set. In absence of a default, RVM defaults to system.
<lbracher> I know, but unfortunately I'm not able to upgrade it due to an incompatibility with gem devise.
<lbracher> So I'm using this version for now.
<havenwood> lbracher: If 2.3.3 works, 2.3.7 ought work.
<havenwood> lbracher: They're both Ruby 2.3.
<lbracher> havenwood, it worked! :)
<lbracher> Thanks a lot! :)
<havenwood> You're welcome.
<lbracher> But just to understand, what happened exactly?
<lbracher> What I missed?
<havenwood> lbracher: Installing RVM and then installing a Ruby with RVM doesn't make that Ruby the default Ruby.
<lbracher> Oh, I see
<lbracher> Well, thank you a lot! This is my third day on ruby. :)
safetypin has joined #ruby
<havenwood> lbracher: Welcome!
<lbracher> :)
WAFFLEMAKER3000 has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
tomeaton17 has quit [Quit: ZNC 1.7.0 - https://znc.in]
aupadhye_ has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 264 seconds]
tomeaton17 has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
venmx has joined #ruby
dogweather has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
amar has quit [Ping timeout: 248 seconds]
safetypin has joined #ruby
clemens31 has joined #ruby
deathwishdave has joined #ruby
gizmore has joined #ruby
dogweather has quit [Ping timeout: 268 seconds]
Mia has quit [Read error: Connection reset by peer]
tvw has quit [Read error: Connection reset by peer]
dogweather has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
karapetyan has quit [Remote host closed the connection]
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
amatas has joined #ruby
apparition47 has quit [Quit: Bye]
dogweather has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
dogweather has joined #ruby
BlopMonster has joined #ruby
karapetyan has joined #ruby
BlopMonster has quit [Ping timeout: 260 seconds]
rippa has joined #ruby
dogweather has quit [Ping timeout: 248 seconds]
kmurphy4 has joined #ruby
akaiiro has joined #ruby
Burgestrand has quit [Quit: Closing time!]
nowhereman_ has joined #ruby
dogweather has joined #ruby
nowhereman_ has quit [Ping timeout: 260 seconds]
kmurphy4 has quit [Quit: kmurphy4]
dogweather has quit [Ping timeout: 260 seconds]
tcopeland has joined #ruby
dogweather has joined #ruby
tcopeland has quit [Client Quit]
beefjoe has joined #ruby
alex`` has quit [Quit: WeeChat 2.1]
alex`` has joined #ruby
weird_error has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dogweather has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 268 seconds]
dogweather has joined #ruby
yokel has joined #ruby
ciscam has quit [Ping timeout: 255 seconds]
ciscam has joined #ruby
Asher has joined #ruby
dbugger_ has joined #ruby
cagomez has joined #ruby
ellcs has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
cagomez has joined #ruby
mtkd has quit []
cagomez has quit [Remote host closed the connection]
dogweather has quit [Ping timeout: 240 seconds]
sysvalve has quit [Quit: Leaving]
GeorgesLeYeti has quit [Remote host closed the connection]
dogweather has joined #ruby
mtkd has joined #ruby
KeyJoo has joined #ruby
BlopMonster has joined #ruby
DarkUnicorn has quit [Quit: Connection closed for inactivity]
BlopMonster has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
za1b1tsu has quit [Ping timeout: 245 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
sanscoeur has joined #ruby
cagomez has joined #ruby
karapetyan has quit [Remote host closed the connection]
jcarl43 has joined #ruby
darkhanb has joined #ruby
andikr has quit [Remote host closed the connection]
weird_error has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
wontruefree has joined #ruby
FernandoBasso has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
za1b1tsu has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
Muz has quit [Ping timeout: 256 seconds]
<cthulchu> ruuuby!
Muz has joined #ruby
[Butch] has joined #ruby
za1b1tsu has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
dbugger_ is now known as Dbugger
dogweather has quit [Ping timeout: 268 seconds]
workmad3 has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
Zaab1t has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
dogweather has joined #ruby
leitz has quit [Quit: Nappy time]
bijan_ has joined #ruby
orbyt_ has joined #ruby
nowhereman_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 264 seconds]
Beams has quit [Quit: .]
desperek has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
priodev has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
kapil___ has joined #ruby
dogweather has joined #ruby
ltp has quit [Read error: Connection reset by peer]
wontruefree has quit [Quit: bye]
synthroid has joined #ruby
priodev has joined #ruby
wontruefree has joined #ruby
ltp has joined #ruby
quobo has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
WAFFLEMAKER3000 has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
dogweather has joined #ruby
WAFFLEMAKER3000 has joined #ruby
solocshaw has joined #ruby
millerti has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lytol has joined #ruby
weird_error has joined #ruby
Eiam has joined #ruby
shah^ has joined #ruby
spiette has quit [Quit: ZNC 1.7.0 - https://znc.in]
lxsameer has joined #ruby
spiette has joined #ruby
Guest16618 has quit [Quit: ZNC 1.7.0 - https://znc.in]
Mike11 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
solocshaw has quit [Quit: solocshaw]
dogweather has quit [Read error: Connection timed out]
spiette has quit [Quit: ZNC 1.7.0 - https://znc.in]
Guest39541 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
lxsameer has joined #ruby
Guest39541 has quit [Changing host]
Guest39541 has joined #ruby
Guest39541 is now known as Kestrel-029
priodev has quit [Ping timeout: 256 seconds]
priodev has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
sameerynho has joined #ruby
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
weird_error has quit [Quit: weird_error]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
dogweather has quit [Read error: Connection timed out]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
karapetyan has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
dogweather has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
clemens31 has quit [Ping timeout: 264 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
wontruefree has quit [Quit: bye]
omth has joined #ruby
conta1 has joined #ruby
omth_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
cagomez has quit [Remote host closed the connection]
omth has quit [Ping timeout: 256 seconds]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
DarkUnicorn has joined #ruby
camilasan has quit [Changing host]
camilasan has joined #ruby
spiette has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
sauvin has quit [Remote host closed the connection]
zlogan2003 has quit [Quit: Leaving]
zachk has joined #ruby
zachk has quit [Changing host]
zachk has joined #ruby
phenom has joined #ruby
desperek has quit [Quit: xoxo]
<cthulchu> a has access to @ivar. a creates ab object of b. Can I use @ivar seemlessly in b without explicitly passing it in?
<cthulchu> I can't
<cthulchu> I have to pass it
dogweather has quit [Ping timeout: 264 seconds]
<cthulchu> folks
<cthulchu> so .new() calls a constructor
<cthulchu> or rather creates an object and calls the constructor
lxsameer has joined #ruby
<cthulchu> It's not quite clear if its arguments are getting passed to the constructor
<WAFFLEMAKER3000> exit
WAFFLEMAKER3000 has quit [Quit: WeeChat 2.1]
WAFFLEMAKER3000 has joined #ruby
dogweather has joined #ruby
priodev has quit [Ping timeout: 240 seconds]
aruns has joined #ruby
nowhereman_ has quit [Ping timeout: 276 seconds]
conta1 has quit [Quit: conta1]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
aufi has quit [Quit: Leaving]
ltp has quit [Remote host closed the connection]
ltp has joined #ruby
priodev has joined #ruby
<aruns> Hey guys, quick question, I was playing around with Ruby's CGI module last week, are CGI sessions supposed to be similar to cookies?
<aruns> Could I persist the user state in a single CGI session?
Rapture has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
lxsameer has joined #ruby
sanscoeu_ has joined #ruby
sanscoeur has quit [Ping timeout: 260 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
wontruefree has joined #ruby
lxsameer has joined #ruby
dogweather has quit [Read error: Connection timed out]
BloopMonster has quit [Ping timeout: 276 seconds]
<gizmore> aruns: Cookies are a feature of http. You set cookies via server response header "Set-Cookie: ...." ..... you resend cookies via client request header "Cookie: "
cagomez has quit [Remote host closed the connection]
BloopMonster has joined #ruby
cagomez has joined #ruby
<gizmore> aruns: you can try to solve this "hacking challenge" to learn about cookies: https://www.wechall.net/challenge/training/programming1/index.php
<gizmore> meh... seems like the challenge needs signup :/
schneider has joined #ruby
amatas has quit [Ping timeout: 264 seconds]
cagomez has quit [Ping timeout: 240 seconds]
dogweather has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
anisha has joined #ruby
<cdunklau> yikes CGI
dionysus69 has quit [Ping timeout: 260 seconds]
<cdunklau> does ruby have some kind of standardized HTTP application interface?
<cdunklau> like, say, WSGI for python?
<cdunklau> Rack looks similarish
roamingdog has joined #ruby
Kestrel-029 has quit [Read error: Connection reset by peer]
dogweather has quit [Ping timeout: 265 seconds]
bijan_ has joined #ruby
Nicmavr has joined #ruby
<cthulchu> what's a hash?
dogweather has joined #ruby
<cthulchu> I mean, I know what a hash is, but what is it as Ruby's data structure?
Nicmavr is now known as Guest89529
<cthulchu> I'm getting no implicit conversion of Hash into String
<cthulchu> I expected it
<gizmore> cthulchu: a hash is a dictionary in most other langs.... in php its an assoc array
<cthulchu> interesting
<gizmore> in js it's "Object" {}
<cthulchu> oh
<gizmore> in ruby it's "Hash" {}
<cthulchu> now I see
<cthulchu> Ruby calls objects hashes!
<cthulchu> ha!
<cthulchu> cool
<cthulchu> awkward
<gizmore> most people here will cry over your definition but... if you like to say so.... Ruby calls (js) objects hashes!
<gizmore> in ruby, everything is Object :)
<gizmore> in ruby there are no primitives
<gizmore> Hash < Object
<gizmore> class Hash < Object
<cthulchu> ok, cool
<gizmore> (i assume)
<gizmore> i once wrote a tut if you come from php to ruby
<cthulchu> so in JS we have stringify in objects
<cthulchu> in Hashes
<cthulchu> what's ruby way to get json version of an object?
<gizmore> in ruby you would implement your own or use a gem like "json"
<gizmore> let me google it
<cthulchu> ehhhh...
<cdunklau> wellll
<cthulchu> I mean, if it has JSON.parse
<cdunklau> cthulchu: js objects have string (or symbol) keys
<cthulchu> I would expect it to have the opposite
<cthulchu> and Ruby doesn't?
<cdunklau> ruby's hashes can have anything as a key
<cthulchu> Ruby has it too
<cthulchu> ah
<cthulchu> very cool
<cthulchu> I see now
<cdunklau> (modulo i don't know if hashability matters in ruby)
<cthulchu> so now everything has to have a .toString
<cthulchu> to stringify it properly
<cthulchu> what a mess...
<gizmore> cdunklau: i recently did @hash[self.class] = self.class.new ....... and self.class turned into a string?
<cdunklau> cthulchu: JS does have a Map thing in recent versions
<mozzarella> wtf am I reading
<cthulchu> why would you use an image as a key? :)
<cdunklau> gizmore: really?
<cthulchu> wooooooow
<cdunklau> i'm a totally off?
<cdunklau> *am i totally off*
<gizmore> cdunklau: not sure.... i pondered... let me check
<cthulchu> no no
<cthulchu> I want something more... simple
<gizmore> this is what you want, i think :)
<cthulchu> okay
<cthulchu> interesting
<cthulchu> I'll try
<cthulchu> many thanks
<gizmore> you could also, for fun, monkeypatch some core datatypes with your own def own_json
<cthulchu> nono
<cthulchu> I'll try ruby as it should be first
<gizmore> you could class Numeric; def own_json; self; end; end
<cthulchu> wanna get that authentic taste first
<cdunklau> gizmore: i don't know what that @hash thing does
<gizmore> oh in ruby you have to think different
amelliaa has quit [Quit: -]
<gizmore> @hash means "instance variable"
<cdunklau> oh wait that's just the instance attribute sigel
<gizmore> @@hash would be a class variable
<cdunklau> ok
<cthulchu> so json is a default... gem?
<cthulchu> package
<cthulchu> why renaming packages. everyone has packages, ruby calls them gems
<cthulchu> hehe
<gizmore> cthulchu: it seems like #to_json is part of Kernel? (the main object) or Object?
<cthulchu> neat!!!
<cthulchu> as it should be
<gizmore> ah no... you need to require "json"
<cdunklau> cthulchu: it's worse with python. a python "package" is a dir with python modules in it, not something you can really install (that would technically be a "distribution")
cagomez has joined #ruby
lbracher has quit [Ping timeout: 260 seconds]
<cthulchu> hehe
<cthulchu> so I have this weird thing
<cthulchu> in my superclass that calls my class
<cthulchu> require 'require_all'
<cthulchu> I assume json will be there
<gizmore> mozzarella: thanks for that msg ;P
<cthulchu> gonna test
<cdunklau> cthulchu: ...what?
<cthulchu> what what?
<mozzarella> what message?
<cthulchu> that wasn't me
<cdunklau> cthulchu: you mean you have class A, and class B that inherits from A, but class A calls B?
<gizmore> the force you were reading... just let us amateurs get used to ruby! ^^
<cthulchu> not quite... I have class A that creates an object of class B. Class A has all the requires. Class B has none. I'm in B.
<cthulchu> I think B will be able to use A's requires
<cthulchu> hell I have never coded as dirty as this
<cthulchu> nothing is reusable and everything is bootstraps
<cdunklau> gizmore: hmm classes work fine as keys...
<cthulchu> but why would you make a class a key
<cthulchu> unless you're hacking
<gizmore> cdunklau: thanks.... then i have a bug/problem in my code ... thx :)
sanscoeu_ has quit [Remote host closed the connection]
<gizmore> hmm
<cthulchu> it's ruby! it has no bugs. Only features!
<cdunklau> cthulchu: it might be reasonable, say you need to dispatch behavior based on the type of the thing you get
<gizmore> << {Module: 1}.inspect
<gizmore> >> {Module: 1}.inspect
<cthulchu> oh, interesting
<gizmore> how does the bot works again?
cagomez has quit [Ping timeout: 264 seconds]
DTZUZU has quit [Quit: WeeChat 1.9]
<cdunklau> gizmore: >> should do it
<cdunklau> >> puts 123
<ruby[bot]> cdunklau: # => 123 ...check link for more (https://eval.in/1021560)
<gizmore> cthulchu: i came a long way from an own php framework to rails to an own php7 framework back to pure ruby without dependencies
<cthulchu> woah
<gizmore> now my current project is https://github.com/gizmore/gdo
<cthulchu> I settled on Node
<gizmore> clone && bundle exec rake
<cdunklau> cthulchu: yeah that sounds really bad
<cdunklau> oh wait nm
<cthulchu> yes, .to_json works without require
lxsameer has joined #ruby
<cthulchu> because it's Ruby
<cthulchu> it's soooooo weird
nowhereman_ has joined #ruby
\void has joined #ruby
<cdunklau> does ruby have a module cache?
<cdunklau> like, in python, when you do `import foo`, and then in another file also `import foo`, the second time it happens it just does a hash table lookup, it doesn't reexecute
t0xik has joined #ruby
<gizmore> cdunklau: if you do passenger or maybe most other stacks there is no clean on every request.... your caches will be way different compared to mod_php
<gizmore> how does cgi work?
<gizmore> process => code => kill=
<gizmore> ?
<cdunklau> gizmore: ...what?
<gizmore> what do you mean with "module cache"?
<cdunklau> i'm having trouble understanding how that's relevant at all :)
<cdunklau> gizmore: like, you require a thing. the next time you require it, does it get reexecuted?
<gizmore> no, you will use "load" then
<gizmore> include is the equivalent to extend (btw) ... you include or extend a module
dogweather has quit [Read error: Connection timed out]
<gizmore> require is like load
<cdunklau> oh wait
<cdunklau> terminology collisions :)
<gizmore> yeah
<gizmore> and i might not be 100% right as well
<gizmore> also interesting:
<cdunklau> in python a module is the object you get when you import a file
<apeiros> gizmore: in JS, it's Map
<apeiros> Object in JS aren't really hashtables, though you can use them similar to one
roamingdog has quit [Remote host closed the connection]
<cdunklau> apeiros: can Map have arbitrary keys?
<apeiros> (and Map still lacks a proper equality protocol)
<apeiros> cdunklau: afaik yes, but ^
roamingdog has joined #ruby
<cdunklau> apeiros: i'm pretty sure everything in JS lacks a proper equality protocol :)
<apeiros> it's not as nice as in ruby where you can define #hash and #eql?
<gizmore> apeiros: may i query you for 30 seconds?
roamingdog has quit [Remote host closed the connection]
<apeiros> you mean pm? you can, but most questions I only answer in public :)
roamingdog has joined #ruby
<gizmore> i will do here then.... i need an excurse in bundler and gems. i want your time for 1-2h and i would pay like €20-€40 for your guidance
DTZUZU has joined #ruby
roamingdog has quit [Remote host closed the connection]
<gizmore> basically i need guidance and help in my gem layout for my little hobby project :)
<apeiros> oh honey, my fee is *slightly* above 40€ for an hour ;-) but I appreciate it. just ask, and if I can I'll answer for free.
roamingdog has joined #ruby
<cthulchu> folks, I have an array of hashes. I know I need an object that has in it a .name == "asd".
<cthulchu> should I iterate through them with a loop?
roamingdog has quit [Remote host closed the connection]
<cthulchu> or is there a more elegant way?
roamingdog has joined #ruby
<apeiros> cthulchu: I'm not sure I follow your question. you mean you need a hash which has hash["name"] == "asd"?
<cdunklau> cthulchu: do you mean a hash with the key "name" that refers to the value "asd"?
dogweather has joined #ruby
<apeiros> or do you need to turn your hashes into a different type of object?
roamingdog has quit [Remote host closed the connection]
<gizmore> apeiros: so i am working on a framework.... there will also be a bin/ provided in the main gem, that should know about own plugin gems.... like gem gdo knows about gem gdo-networking
bijan_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
<cthulchu> yes
<cthulchu> you both are right
lbracher has joined #ruby
<apeiros> cthulchu: Array#find
<cthulchu> what is #?
<apeiros> and yes, that's essentially looping through
<apeiros> # denotes instance methods
roamingdog has quit [Remote host closed the connection]
<apeiros> :: denotes class methods
<cthulchu> wow
<cthulchu> and .?
<apeiros> it's "documentation lingo"
<cthulchu> would Array.find work?
<cthulchu> [].find
<apeiros> . is either when you use ri to search, but I avoid it as it's ambiguous
<apeiros> yes, [].find { |hash| hash[key] == value }
<cthulchu> >>[1,2,3,4]#find(1)
<ruby[bot]> cthulchu: # => [1, 2, 3, 4] (https://eval.in/1021566)
<apeiros> gizmore: I assume there's a "and I have issues with X" coming?
<apeiros> cthulchu: na, you always invoke methods with .
<cthulchu> errr
<cthulchu> ok
<cthulchu> >>[1,2,3,4].find(1)
<ruby[bot]> cthulchu: # => #<Enumerator: [1, 2, 3, 4]:find(1)> (https://eval.in/1021567)
<gizmore> apeiros: no... i did package mask >=x11-base/xorg-server-1.12
<apeiros> the # and :: are for documentation
<cthulchu> ah
<cdunklau> !class method
<cthulchu> ok
<apeiros> Array#find means "do foo.find where foo is an instance of Array"
reber has quit [Remote host closed the connection]
<cthulchu> oooh
<cthulchu> so find accepts an array as an attribute?
<gizmore> could also use [[],{}].select{|item|item.is_a?(Array)}
<cthulchu> >>1.find([1,2,3])
<ruby[bot]> cthulchu: # => undefined method `find' for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/1021568)
<apeiros> wherease Time::at means "call it literally on Time itself"
<gizmore> >>[[],{}].select{|item|item.is_a?(Array)}
<apeiros> yeah, 1 is not an instance of Array :-)
karapetyan has joined #ruby
<gizmore> >>[[],{}].select{|item|item.is_a?(Array)}[0] rescue nil
duderonomy has quit [Ping timeout: 276 seconds]
<cthulchu> what's wrong with this? >>[1,2,3,4].find(1)
<cdunklau> hmm. can someone point me to the doc that discusses class vs. instance method?
<apeiros> cthulchu: you probably should read the docs of find ;-)
<cthulchu> ok
<apeiros> gizmore: ok, I'm not sure where you need help
<apeiros> cthulchu: also this
<apeiros> 22:00 apeiros: yes, [].find { |hash| hash[key] == value }
<cthulchu> I don't get the {} after find
<cthulchu> are you talking documentation or code?
<cthulchu> confusing af
<cthulchu> can we just use code
<apeiros> that one was an actual code example
<cdunklau> apeiros: is that the proc thing
<apeiros> the {} is a block passed to find. basically a piece of code.
<cthulchu> omg
<cdunklau> right ok
<gizmore> apeiros: https://github.com/gizmore/gdo/blob/master/bin/gdo .... why i need require mysql2.... also how does gem gdo binary know about other gem plugin gdo-networking
<cthulchu> so find accepts an anonymous function as an argument
<gizmore> apeiros: thank you very very much :)
<apeiros> cthulchu: yes. your "finding" strategy.
lxsameer has quit [Ping timeout: 256 seconds]
<cthulchu> will that "block" be executed on each element?
<cthulchu> how do we return success?
<cthulchu> so .find is almost .forEach?
lxsameer has joined #ruby
sanscoeur has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 256 seconds]
<apeiros> gizmore: hm, interesting. I'd expect Bundler.require(:default) to load mysql2 since it's in the gemspec
<apeiros> so don't know about that
<gizmore> thank you :)
<apeiros> I assume you tested without require and it didn't work?
<gizmore> correct
<gizmore> got missing constant MySQL2
<apeiros> ok, that's something I'd have to look up myself
<cthulchu> actually I don't need find
<apeiros> so, good thing you didn't pay me money ;-D
<cthulchu> cuz it's boolean
<cthulchu> I need to return a hash that satisfied the search paeams
<cthulchu> *params
<gizmore> apeiros: btw.... "gdo" is a great new approach for a framework .... i would be happy if someone would run my rspec
<apeiros> cthulchu: find uses each, but unlike each, it stops once it found what you're looking for and returns that
BlopMonster has joined #ruby
<apeiros> cthulchu: and it returns nil if it doesn't find anything
nicht has joined #ruby
<gizmore> apeiros: i am currently writing README.MD
<apeiros> cthulchu: but all of that you can learn from reading find's docs ;-p
ski4x7 has quit [Ping timeout: 256 seconds]
<cthulchu> they're confusing
psychicist__ has quit [Quit: Lost terminal]
<cthulchu> but I'll try again
<cdunklau> is Class... a metaclass?
<apeiros> gizmore: as for "how can it know about gdo-someplugin" - it can't if you use bundler. because you literally tell your code to ignore every gem which is not in the gemfile.
<cthulchu> `Passes each entry in enum to block. `
<cthulchu> what is in enum?
<apeiros> i.e. you'd have to list all plugins in the gemfile, but since you probably only want to install plugins when needed, that's a bit problematic. so either you circumvent bundler for that, or you don't use bundler at all. I'm not sure what a good approach would be.
<gizmore> apeiros: what is very unclear.... if someone would gem install gdo && gem install gdo-net ....... then he would $gdo --foo bar but how does gdo binary know about gdo-net without any gemfile?
workmad3 has joined #ruby
<gizmore> apeiros: thank you very much!
dogweather has joined #ruby
<gizmore> btw.... gdo6(PHP) is very great... ten times better than laravel
<gizmore> also on github/gizmore/gdo6
<apeiros> I don't know laravel :)
<gizmore> but PHP is so.... argh
<gizmore> laravel is like rails in php
<gizmore> but they totally failed
<gizmore> code completion like <50%
<apeiros> I thought symphony was the big rails clone?
lbracher has quit [Ping timeout: 256 seconds]
<gizmore> should try symphony :)
BlopMonster has quit [Ping timeout: 240 seconds]
<cthulchu> this is crazy
<gizmore> everything good is a bit like rails
<cthulchu> why do they put .detect in manuals about .find
<cthulchu> so confusing
<cthulchu> I never ask about .detect and yet I see it more often than .find
<gizmore> cthulchu: an enum is a class that features #next and some other methods
<cthulchu> no sense
<gizmore> it is iteratable
<cthulchu> it says it passes each element in enum
<gizmore> yeah
<gizmore> for each enum value (all)
<gizmore> pass to a &block
<gizmore> sounds like a bad idea
<apeiros> cthulchu: find & detect are aliases
<cthulchu> omg
<gizmore> sounds like a bad idea unless it iterates with #next.... i love ruby :P
<apeiros> basically if you do `ri Foo#somemethod` and you get `othermethod works like X`, it means othermethod and somemethod are aliases
<cthulchu> why not saying that they are the same?
<cthulchu> it's confusing af when we talk about find but examples are detect
<cthulchu> so in the block i is my item?
<cthulchu> again, why is it so subtle?
<cthulchu> how would I know
<apeiros> cthulchu: hm, I think that's supposed to be enum.find() { … }
lxsameer has quit [Ping timeout: 256 seconds]
<cthulchu> no
wontruefree has quit [Quit: bye]
<cthulchu> enum.find(i) { … }
kapil___ has quit [Quit: Connection closed for inactivity]
<apeiros> no, not enum.find(i)
<cthulchu> ok then
lxsameer has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
<cthulchu> enum.find(function(i){...})
<apeiros> I mean, yes, if you want another value than nil for "no item found"
<cthulchu> aha
<cthulchu> but Ruby decided to make function(i) implicit
<apeiros> yes, that's what it essentially is. but blocks are a core syntax feature. and blocks are not passed that way.
<cthulchu> awesome
cagomez has joined #ruby
<cthulchu> ok
amatas has joined #ruby
<cthulchu> so I can expect every block to use i?
<apeiros> and you really should read some book or intro :-p
<cthulchu> it's like untold truth?
<cthulchu> ok ok
<cthulchu> I will eventually :)
<apeiros> { |arg1, arg2, …| …code… }
<apeiros> you name the arguments. it's not untold truth. it's explicit truth you decide on your own.
* apeiros afk for a bit now
anisha has quit [Quit: This computer has gone to sleep]
Dabo has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<cthulchu> aaaah
<cthulchu> wow
<cthulchu> I prefer functions
blackmesa has joined #ruby
<cthulchu> but ok
<cthulchu> event = dataLayer.find{|object|object.event=="gtm.timer"}
<cthulchu> cool
<cthulchu> thanks, apeiros
Dabo has joined #ruby
SeepingN has joined #ruby
wontruefree has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
ellcs has joined #ruby
lxsameer has joined #ruby
alex`` has quit [Ping timeout: 245 seconds]
DarkUnicorn has quit [Quit: Connection closed for inactivity]
lbracher has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
alex`` has joined #ruby
Mike11 has quit [Quit: Leaving.]
dendazen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
nicht has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
sanscoeu_ has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
sanscoeur has quit [Ping timeout: 256 seconds]
mtkd has joined #ruby
clemens31 has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
BloopMonster has quit [Quit: WeeChat 1.9.1]
za1b1tsu has quit [Ping timeout: 264 seconds]
unreal has joined #ruby
Dbugger has quit [Quit: Leaving]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
synthroid has quit []
BloopMonster has joined #ruby
akaiiro has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
jcalla has quit [Quit: Leaving]
karapetyan has joined #ruby
sanscoeu_ has quit [Remote host closed the connection]
z3uS has quit [Ping timeout: 265 seconds]
<cthulchu> how do we check if a hash has a key
fmcgeough has quit [Quit: fmcgeough]
z3uS has joined #ruby
sanscoeur has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
<apeiros> cthulchu: you need to learn how to use the docs :)
<apeiros> I'm sure you'll find something ;-)
karapetyan has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
fmcgeough has joined #ruby
<cthulchu> right
<cthulchu> we can't refer to values via dots like in JS
fmcgeough has quit [Client Quit]
<cthulchu> it's uncomfortable, but ok
<cthulchu> we actually probably could
<cthulchu> it the key was a method
<cthulchu> woah
lxsameer has quit [Ping timeout: 256 seconds]
sylario has joined #ruby
lxsameer has joined #ruby
weaksauce has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<SeepingN> ..
<apeiros> cthulchu: take a look at OpenStruct
quobo has quit [Quit: Connection closed for inactivity]
<cthulchu> why doesn't pry give me the output?
ldnunes has quit [Quit: Leaving]
<SeepingN> why can't you be more vague?
<cthulchu> wait for it
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cthulchu> aha
<cthulchu> it's cuz it was in a wrong state
<cthulchu> or not
wget has quit [Read error: Connection reset by peer]
<cthulchu> yeah
<cthulchu> works
<cthulchu> just have to puts
wget has joined #ruby
akaiiro has joined #ruby
roamingdog has joined #ruby
wontruefree has quit [Quit: this is not the client you are looking for]
alex`` has quit [Quit: WeeChat 2.1]
wontruefree has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<cthulchu> also puts is a weird word
<cthulchu> I wonder if we have a shortcut
<apeiros> I'd say it's taken from other languages
<apeiros> and is short already, for put string
<apeiros> vs. e.g. putc, put char
<cthulchu> omg
lxsameer has quit [Ping timeout: 256 seconds]
<cthulchu> why do we need different methods for putting char and string?
lxsameer has joined #ruby
<cthulchu> I mean, I always use just one... printer
<cthulchu> method for logging into console
<cthulchu> do we have puti?
<cthulchu> because casting integer into string requires an explicit method
<cthulchu> ok, ok, no rumbling
roamingdog has quit [Remote host closed the connection]
<apeiros> puts invokes to_s
<cthulchu> I guess I'll just make a p() method that would do puts
<apeiros> and almost all ruby classes respond to to_s already. so no puti necessary
<apeiros> maybe you should check before you do that :-p
<cthulchu> ahahahah
<apeiros> note, p is not puts
<cthulchu> oh
<cthulchu> okay
<apeiros> but p is actually what you usually should use when debugging
sphenxes has quit [Read error: Connection reset by peer]
<cthulchu> hm
<apeiros> p uses #inspect, instead of #to_s
<cthulchu> oh so cool!
<apeiros> and #inspect is a lot better in most cases.
<cthulchu> it probably shows the .class
<cthulchu> and .keys
<cthulchu> or whatever
<apeiros> also it means you can conveniently use it with a hash to have labeled stuff: `p foo: foo, bar: bar, …`
<cthulchu> oh that's a relief
roamingd_ has joined #ruby
KaitoDaumoto has joined #ruby
<cthulchu> I keep doing puts and .to_json
safetypin has quit [Quit: ZZZzzz…]
amatas has quit [Quit: amatas]
Dabo has quit [Quit: Disconnected]
zululee has quit [Quit: ZNC 1.6.6 - http://znc.in]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
WAFFLEMAKER3000 has quit [Quit: WeeChat 2.1]
weaksauce has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
BlopMonster has joined #ruby
BloopMonster has quit [Ping timeout: 264 seconds]
<zenspider> fanfuckingtastic. I'm slowly working on an rspec compatibility layer and I finally got dots today... Despite having some failures my runs are still 65% the time of rspec.
jenrzzz has joined #ruby
<SeepingN> I like ap
<SeepingN> (awesomeprint)
<SeepingN> when debugging arrays and hashes and objects
<SeepingN> omy
duderonomy has joined #ruby
BlopMonster has quit [Ping timeout: 265 seconds]
<zenspider> SeepingN: in your tests or elsewhere?
BloopMonster has joined #ruby
<SeepingN> my own
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
chouhoul_ has joined #ruby
Zarthus has joined #ruby
cyberg has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 265 seconds]
mmattice has quit [Ping timeout: 248 seconds]
cyberg has joined #ruby
chouhoul_ has quit [Ping timeout: 264 seconds]
mmattice has joined #ruby
KaitoDaumoto has quit [Remote host closed the connection]
BloopMonster has quit [Read error: Connection reset by peer]
cadillac_ has quit [Read error: Connection reset by peer]
BloopMonster has joined #ruby
dogweather has quit [Ping timeout: 256 seconds]
<Eiam> time to step into containerizing my ruby projects
Zaab1t has quit [Quit: Zaab1t]
* Eiam sighs and gives into the future
mtkd has quit []
Dabo has joined #ruby
<zenspider> wow! 504 specs. All passing now. Roughly the same time for the dots 0.2414s (minitest) vs 0.2535s (rspec)... but overall runtime is 1.046s vs 2.065s
roamingd_ has quit [Remote host closed the connection]
dogweather has joined #ruby
<zenspider> Eiam: and now you have 8 problems
wald0 has joined #ruby
<apeiros> if it's only 8 problems, they did a really good job!
cadillac_ has joined #ruby
roamingd_ has joined #ruby
<cthulchu> do you guys write blocks in one line?
<cthulchu> or do you treat them as actual code blocks?
<apeiros> whatever fits the situation
<cthulchu> do you smoke weed?
<zenspider> cthulchu: either stay on topic or go away
<cthulchu> I've learned ruby enough to know that this question is not out of context on the channel ;)
<cthulchu> ok, ok, I thought you'd appreciate a joke
aruns has quit [Quit: leaving]
<cthulchu> looks like this channel is stricter than the language itself :)
<zenspider> and yet here you are sticking with shitty signal:noise...
workmad3 has joined #ruby
<cthulchu> the reason of that is your definition of signal:noise
<cthulchu> so blame yourself
<zenspider> you're about to be banned. The amount of time is up to you.
jottr has joined #ruby
biberu has quit []
<jrich523> <insert that escalated quickly meme>
lxsameer has quit [Ping timeout: 276 seconds]
dogweather has quit [Ping timeout: 260 seconds]
<cthulchu> it always does with arrogant ops :)
<cthulchu> what array function would you suggest for finding all matching elements of an array rather than first
lxsameer has joined #ruby
<cthulchu> I use .find for the first one
workmad3 has quit [Ping timeout: 260 seconds]
<jrich523> select?
roamingd_ has quit [Remote host closed the connection]
<jrich523> i thought thats what that one was for?
<cthulchu> will it return an array?
<jrich523> hmm yeah think so
<cthulchu> cool, thanks
<jrich523> cuz there is select vs select! (assuming there is anyways)
<jrich523> return a new array vs modify inline
<jrich523> im only like one or two days ahead of you lol
<cthulchu> oh, okay :)
roamingdog has joined #ruby
BloopMonster has quit [Ping timeout: 248 seconds]
<cthulchu> actually, I don't need it. I just need a foreach, I guess
<jrich523> yeah i mean technically the foreach will do basically anything you need
<cthulchu> indeed
<jrich523> i used it a LOT (a tad stupidly) at first... now im using map and select for those stupid things lol
<cthulchu> I'm gonna just use it instead of all these weird shortcuts
<cthulchu> just have to find it
<cthulchu> .each Calls block once for each element in self, passing that element as a parameter, converting multiple values from yield to an array.
<cthulchu> why in self?
<cthulchu> not in enum
<cthulchu> find does it in enum and this one does it in self
dogweather has joined #ruby
<cthulchu> I suspect it's the same thing
<cthulchu> is it?
cliluw has quit [Read error: Connection reset by peer]
<jrich523> because its .each
<jrich523> so it has to be self
<jrich523> but self IS the enum (hash/array)
<cthulchu> omg
<cthulchu> they use them interchangeably.
<cthulchu> confusing
<zenspider> grep or find_all
<jrich523> grep?
<zenspider> grep
<cthulchu> yep
<jrich523> i obviously know what grep is, but how does it apply to ruby?
<jrich523> is there a grep method i've overlooked?!
cliluw has joined #ruby
<zenspider> jrich523: try `ri grep` in your terminal
<jrich523> im windows.. but lets see what happens
<zenspider> if that doesn't work, you're missing out on a very useful tool
<zenspider> should still work
<zenspider> but some ruby setups bypass setting up the doco data
<jrich523> HA!
<jrich523> powershell prompts
<jrich523> ri - remove-itemn :)
<zenspider> ri.exe maybe?
<zenspider> or your pathing needs tweaking?
<zenspider> but if you can run irb, you should be able to run ri
<jrich523> oh, irb works fine
<zenspider> there's also grep_v, finally
<jrich523> there we go
<jrich523> hmm seems to be part of pry?
schneider has quit [Ping timeout: 256 seconds]
<jrich523> neat
<zenspider> jrich523: part of rdoc and as a result, part of ruby
<jrich523> weird, so wouldnt ri show that? it listed a few... instances.. all from pry
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
<zenspider> might not have the core ruby data installed, but it also searches through gems. Maybe pry has their own grep method
BloopMonster has joined #ruby
<zenspider> I thought you meant `ri` was part of pry, not `grep`
<jrich523> i guess while we're chatting about gems, is there any easy way to know what a gem exports?
<jrich523> sorry, yeah the grep return is telling me its part of pry, (from gem pry-0.11.3)
schneider has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
<zenspider> jrich523: if you have things set up correctly, you should (also) see that grep is defined on Enumerable
<jrich523> seems to only be from pry
blackmesa has joined #ruby
<jrich523> kinda odd
bmurt has quit [Client Quit]
<zenspider> jrich523: "what a gem exports" -- no. That phrase has some expectations from other languages that ruby doesn't really live up to.
<zenspider> jrich523: do this: `ri Array`
<jrich523> oh
dogweather has quit [Ping timeout: 260 seconds]
<zenspider> I'm gessing you don't get anything
<cthulchu> oh my!
<cthulchu> we actually have the grep!
<cthulchu> that's it!
<jrich523> weird, from parser-2.5.1.0
<jrich523> lol looks like it can touch everything but core
schneider has quit [Ping timeout: 264 seconds]
<cthulchu> but can we do some actual work in the block to then return true or false?
<cthulchu> in other words, can we make blocks a little bit more functional?
kmurphy4 has joined #ruby
<zenspider> jrich523: yeah. you're missing rdoc data...
<cthulchu> I don't mind having a non-instance method that would do that and return it into the block, I guess
<cthulchu> just don't know what is the best way
<cthulchu> will try the latter
<zenspider> I don't know how to fix that on windows... it depends on how you installed I think
kmurphy4 has quit [Client Quit]
lxsameer has quit [Ping timeout: 264 seconds]
icy` has quit [Quit: .: ciao :.]
dogweather has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
roamingdog has quit [Remote host closed the connection]
schneider has joined #ruby
<Eiam> foreach is a little odd and it might be a good use case for inject or each_with_object
dendazen has joined #ruby
<cthulchu> I don't think there's foreach
<cthulchu> there are a bunch of stuff that is similar
<cthulchu> I decided to try .select
<zenspider> there's many foreach's
schneider has quit [Ping timeout: 240 seconds]
jud^ has quit [Quit: Leaving]
BloopMonster has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
schneider has joined #ruby
<jrich523> yeah im pretty sure what you want is select (to filter/trim the set)
GodFather has quit [Ping timeout: 276 seconds]
<zenspider> rspec must be explicitly turning warnings off... horrible
schneider has quit [Ping timeout: 256 seconds]
<cthulchu> I'm not sure if I'm doing this right
<cthulchu> but it works
<jrich523> then it must be right!
<zenspider> I don't think that follows...
<cthulchu> it doesn't feel right cuz it becomes more syntax than JS's ,forEach
<cthulchu> I don't trust blocks
<jrich523> i did similar stuff at first too
<cthulchu> they're not anonymous functions, are they?
<zenspider> different languages are different. expecting one to act like another is a recipe for disaster
<cthulchu> yeah
schneider has joined #ruby
<zenspider> you need to unlearn your JS to properly learn ruby
<cthulchu> I'm gonna finish this piece and show you to get some constructive criticism
<apeiros> array.select { |x| x > 2 } # ruby
<apeiros> array.filter(function(x) { return x > 2 }) # js
<apeiros> ruby wins :)
<apeiros> unless you use ES6 syntax
<cthulchu> well not quite
<cthulchu> I'll show you what I did
<jrich523> lol
<jrich523> i do agree with you on that one, ruby is way better than JS :D
<apeiros> and in ruby, almost everything which has each also includes Enumerable. JS is a lot worse there.
* apeiros remembers Array.from(document.querySelectorAll(cssExpression)).filter(…)
<apeiros> because of course, NodeList does not implement filter.
<apeiros> (querySelectorAll returns a NodeList)
jottr has quit [Ping timeout: 256 seconds]
<cthulchu> ok, please take a look at this: https://paste.ofcode.org/zuRDgGBwEuk2cDfAebJ6vS
sanscoeur has quit [Ping timeout: 264 seconds]
<jrich523> ruby bother me with its excessive ways of doing things.. however... i dont find anything "wrong" with it... JS just makes me angry to code... like... omg did we really need to turn this horrible/light script lang in to something so extensive?
<cthulchu> yeah
<jrich523> puts is probably angry about the ()
<cthulchu> I feel the same
<jrich523> does get_driver() need the ()?
<cthulchu> oh yeah
schneider has quit [Ping timeout: 248 seconds]
<cthulchu> in JS you get the function intself if you don't use ()
<cthulchu> () is the envoker
<cthulchu> *invoker
<cthulchu> very comfortable
<jrich523> i like to use the interperted string stuff #{} vs +
GodFather has joined #ruby
<cthulchu> I would appreciate {} instead of def ends and in ifs too
<jrich523> thats most languages... and honestly, i like the use of () on methods
<jrich523> i think you CAN do that
<cthulchu> not with defs
<cthulchu> maybe with ifs
<apeiros> no
<cthulchu> can we use {} with ifs?
<apeiros> only do/end (blocks) can use {}
<cthulchu> ehhh
<apeiros> as said earlier btw. ;-)
<jrich523> yes, and now that yo usay it, i do recall it
<cthulchu> :)
<jrich523> so many little details, trying to pack them in as best as possible :)
<jrich523> oh, line 24
<jrich523> i bet a linter would be grumpy
<cthulchu> yes
<jrich523> .nil? it would likely want?
<apeiros> cthulchu: note that `puts ("foo")`, ruby does not interpret the parens to mean "delimits arguments"
<apeiros> it considers puts an unparenthesized method which has an argument `("foo")`
karapetyan has joined #ruby
<cthulchu> yes
<cthulchu> I know
<cthulchu> I just use them with all methods
schneider has joined #ruby
<apeiros> you don't understand
<jrich523> so you could get nutty and do: method ('p1') 'p2'
<cthulchu> wow
<apeiros> well, maybe showing you why it matters will make you understand:
<apeiros> >> def foo(x); "hi #{x}"; end; foo ("ho").upcase
<apeiros> eval-in dead or ruboto slow? o0
lxsameer has joined #ruby
* jrich523 pokes bot
<apeiros> ?ping
<cthulchu> you didn't end it
<cthulchu> see?
<apeiros> ok, ruboto dead…
<cthulchu> ah, no, you did
<cthulchu> why do you have semicolons?
<cthulchu> ah, they replace newlines
ruby[bot] has joined #ruby
<apeiros> >> def foo(x); "hi #{x}"; end; foo ("ho").upcase
<jrich523> i guess that works as i would expect
<ruby[bot]> apeiros: # => "hi HO" (https://eval.in/1021708)
<cthulchu> like what?
<apeiros> >> def foo(x); "hi #{x}"; end; foo("ho").upcase
<ruby[bot]> apeiros: # => "HI HO" (https://eval.in/1021709)
<apeiros> jrich523: really?
<jrich523> like, as in, i expect it to upper case the HO
<cthulchu> I thought so too
<apeiros> did you expect "hi HO" and not "HI HO"?
<jrich523> powershell is a little... funky.. with () too
<jrich523> hi HO
paraxial has quit [Ping timeout: 264 seconds]
<cthulchu> I expected hi HO
<cthulchu> oh
<jrich523> i expected, and got, hi HO
<cthulchu> actually no
<cthulchu> it should be HI HO
<cthulchu> wow
<apeiros> you get HI HO (and should expect it) if the parens delimit arguments
<cthulchu> indeed
<jrich523> lol
<apeiros> and that's what I'm telling you. if you put a space in front, it does *not* delimit arguments.
<jrich523> well
sameerynho has quit [Ping timeout: 245 seconds]
<jrich523> i had to modify it due to a shell change
<cthulchu> aaah
<jrich523> i had to slap a puts in the method
<cthulchu> dangerous
<jrich523> because, echo is off
<jrich523> and i forget the toggle method it had me create to switch it
<apeiros> in `foo("bar")`, `"bar"` is the argument. in `foo ("bar")`, `("bar")` is the argument
<cthulchu> >> def foo(x); "hi #{x}"; end; (foo("ho")).upcase
<ruby[bot]> cthulchu: # => "HI HO" (https://eval.in/1021710)
<cthulchu> I won!
<cthulchu> haha
schneider has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
<apeiros> yes, of course, you can always make everything entirely unambiguous by adding more parens :) it also becomes more noisy
<cthulchu> how would you do it?
<cthulchu> I don't see any other way
<apeiros> I'd not put a space before the paren :D
<apeiros> or just not use parens at all with a single argument and no chaining.
<cthulchu> right
<apeiros> `puts "hi"` is fine. `puts("hi")` is fine, even though it is a bit noisy. and `puts ("hi")` is almost always just wrong :)
<cthulchu> spaces
<jrich523> hmm
<cthulchu> >>puts ("hi")
<ruby[bot]> cthulchu: # => hi ...check link for more (https://eval.in/1021711)
<apeiros> it "works".
<cthulchu> >>puts("hi")
<ruby[bot]> cthulchu: # => hi ...check link for more (https://eval.in/1021712)
<cthulchu> yeah, I guess it concatenates a nill?
<apeiros> as said, you'll mostly notice when chaining.
<jrich523> it works, but can have uninteneded consequences
<cthulchu> okay, I understood
<apeiros> no, it does not. it's how I said. it considers the parens part of the argument.
<cthulchu> oooooh
<cthulchu> okay, now I see
paraxial has joined #ruby
<cthulchu> weird that it doesn't throw an exception
<cthulchu> I would
<apeiros> *raise ;-p
<jrich523> lol
<apeiros> well, any expression is a valid argument
<apeiros> and expressions may have an arbitrary number of parens
<cthulchu> right
<apeiros> >> puts (((((("wow"))))))
cajone has joined #ruby
<ruby[bot]> apeiros: # => wow ...check link for more (https://eval.in/1021713)
<cthulchu> nice syntax adds some interesting complications
<cthulchu> okay, so what about line 24?
Guest95546 has quit [Quit: Connection closed for inactivity]
<cthulchu> is it a normal usage for what I'm doing?
schneider has joined #ruby
<cthulchu> see how it's overcomplicated comparing to normal JS's .forEach()
lxsameer has quit [Ping timeout: 240 seconds]
<jrich523> i think it would tell you to use the if/unless format
<jrich523> it=lint
<cthulchu> what's lint"
<cthulchu> ?
lxsameer has joined #ruby
<jrich523> rubocop
<jrich523> sorry
<jrich523> debug.push object unless object[dataLayerVarName].nil?
DTZUZO has quit [Ping timeout: 256 seconds]
<cthulchu> yed
<jrich523> guess it would want you to do it more like that?
<cthulchu> what is it?
<cthulchu> "it"
<jrich523> rubocop
<cthulchu> I don't know what that is
<jrich523> lol didnt we have a huge chat about this, and its rules, and how some think those rules are too much
<cthulchu> probably not with me?
<jrich523> i could have sworn it was with you, yesterday
<jrich523> but i barely remember my name
<jrich523> so who knows
<cthulchu> maybe
<cthulchu> what is rubocop?
<cthulchu> wow
<cthulchu> interesting
<jrich523> it calls itself a "code analyzer"
<jrich523> which is just a linter
<apeiros> cthulchu: what about line 24?
<cthulchu> is it a way you'd do this?
<jrich523> apeiros do my comments stand about line 24? ^^
<apeiros> I assume still of this? https://paste.ofcode.org/zuRDgGBwEuk2cDfAebJ6vS
<cthulchu> oh
<cthulchu> it's different there
<cthulchu> sorry
<cthulchu> it's line 7
schneider has quit [Ping timeout: 256 seconds]
<apeiros> event = dataLayer.select{|object|mainTesterForEach(object,dataLayerVarName,dataLayerVarVal,debug)}
<apeiros> that?
<cthulchu> yes
lxsameer has quit [Ping timeout: 240 seconds]
<cthulchu> see how I have a separate function instead of having it here
<cthulchu> anonymously
<cthulchu> I would prefer the anonymous way
lxsameer has joined #ruby
<cthulchu> but I'm not sure I could put that in a block
<apeiros> I mean the stuff which adds up is your debug code
<cthulchu> wow, you can do << instead?!
<cthulchu> the same thing that concats strings?
<apeiros> sure. << is a valid method name.
<cthulchu> that's cool
<jrich523> thats one area i have yet to dig in to
<apeiros> and as a method, its meaning depends on the receiver (the thing you send the method to)
<jrich523> the assignement stuff << <= etc
<cthulchu> oh
<cthulchu> yes
<apeiros> and for Array, Array#<< is push, yes.
<cthulchu> should rename it
<zenspider> jrich523: << and <= are just method calls/names. not implying assignment
<jrich523> not sure i follow
<zenspider> myarray << obj is just myarray.<<(obj)
<apeiros> jrich523: `foo << bar` is just nice for `foo.<<(bar)`
<jrich523> sorta like a lambda?
<cthulchu> why no camelCase?
<jrich523> yeah those are all cryptic to me :)
<apeiros> cthulchu: ruby convention is snake_case
<jrich523> i didnt realize there was a method "<<"
<apeiros> and PascalCase for constants
<zenspider> there's only one assignment "=" (and some crafty helpers like +=)
<apeiros> jrich523: a lot of symbolic stuff is actually "just" methods.
schneider has joined #ruby
<apeiros> +, -, &, **, ~=
<apeiros> to name a few
<apeiros> [] and []= too
<jrich523> .... those are methods? geesh
<jrich523> lol
<cthulchu> wow
<apeiros> >> 1.+(2)
<ruby[bot]> apeiros: # => 3 (https://eval.in/1021714)
<cthulchu> []= is cool
<apeiros> >> 1.send(:+, 2)
<ruby[bot]> apeiros: # => 3 (https://eval.in/1021715)
<jrich523> i did read something, in regards to properties and method, that basically made it sound like properties were methods
<apeiros> they are.
<zenspider> jrich523: nearly everything in ruby is done via message sends
<zenspider> (method calls)
<apeiros> you can't access an @instance_variable from outside an object. you always have to go through a method.
<apeiros> either by having one of a matching name (attr_* generates those), or by one of a different name, or by introspection via instance_variable_get
<jrich523> and the attr_* map that for you?
<jrich523> create get/set methods for the internal/private member?
<cthulchu> apeiros, in your solution you have two lines in the block. the first one doesn't return anything and the second one does?
<apeiros> i.e., all `attr_accessor :foo` does is write the following code for you: `def foo; @foo; end; def foo=(value); @foo = value; end`
<jrich523> @var is that sort of like a field then?
<apeiros> cthulchu: all lines do. but the last statement matters.
<jrich523> field vs property (C#)
<cthulchu> ooooh
<cthulchu> but still, there are functions that can't be expressed in blocks?
<apeiros> >> def foo; yield; end; foo { 1; 2; 3 }
<ruby[bot]> apeiros: # => 3 (https://eval.in/1021716)
<apeiros> cthulchu: not really.
<cthulchu> so block is a function?
<jrich523> apeiros i appreciate you letting the two of us pick your brain at the same time.. lol thanks :)
<apeiros> it's a bit more than an anonymous function, yes.
<apeiros> it's additionally a closure (but JS does that too)
<cthulchu> oh, very cool
<cthulchu> I like it. okay.
<apeiros> jrich523: I'm not familiar with C# terminology, sorry
<apeiros> and since nuances matter :)
dogweather has quit [Remote host closed the connection]
schneider has quit [Ping timeout: 256 seconds]
<jrich523> field/property seems to be common in compiled langs
dogweather has joined #ruby
<jrich523> fields are internal values, properties ahve get/set that allow you to control how it is pushed to the field
<apeiros> point is: @ivars are internal state. not externally accessible. you have to "grant" access through methods.
<jrich523> properties are almost always backed by fields (not always shown that tho)
DTZUZO has joined #ruby
<jrich523> yeah so i think the analogy works..
<apeiros> then yes, that sounds like @ivars match fields
<apeiros> they are probably still different in that @ivars are not allocated when the object is created.
<apeiros> they start to exist on first assignment.
<jrich523> oh man, what about first read?
<apeiros> and if they don't exist, reading them evaluates to nil.
<apeiros> (and causes a warning)
<jrich523> oh... hmm
Azure|dc has joined #ruby
<cthulchu> will an empty array cast into false?
<apeiros> there's no casting in ruby :)
<cthulchu> implicitly
Azure has quit [Ping timeout: 264 seconds]
<cthulchu> well I don't know how to call it
<apeiros> but ruby considers everything except nil/false to be truthy
<cthulchu> then this doesn't make sense: if event
<apeiros> so yes, `if []` will go into the branch
<cthulchu> ok, I'll do the length
Mia has quit [Read error: Connection reset by peer]
<cthulchu> so 0 is true too?>
<cthulchu> and ""?
<apeiros> cthulchu: can event be 'false'?
<apeiros> yes, yes.
<cthulchu> I suspect .select will return nil if there's nothing to return
<cthulchu> let me check
<apeiros> `if event != nil` is only different from `if event` if event can be false, and that should be treated differently from nil.
<cthulchu> no
<cthulchu> it won't
<jrich523> yes it will :(
<apeiros> no, select will return an empty array.
<jrich523> learned that today
<jrich523> lol
<apeiros> but in that case, your event != nil was wrong too :)
bambanx has joined #ruby
bambanx has quit [Max SendQ exceeded]
schneider has joined #ruby
<apeiros> so I guess you want: if !event.empty?
<cthulchu> yes
<cthulchu> indeed
bambanx has joined #ruby
bambanx has quit [Max SendQ exceeded]
<cthulchu> I'll rewrite it to do .length
<apeiros> we usually prefer .size in ruby. but Array#length is an alias.
<jrich523> i think size is prefered? i dont know, iread something a couple days back about length/count/size, and it seemed like length was not much loved
<apeiros> count you should usually only use if you use it with an argument or block. else .size.
<jrich523> size was flexible in that array count vs str length are both returned for size, but count only returns array size? something like that?
lxsameer has quit [Ping timeout: 256 seconds]
<apeiros> na, count without arg is also the same as size/length
<apeiros> but count can take an argument, to count specific things in an array.
<apeiros> >> [1,2,3,1,2,1,2,2,3,1].count(1)
<ruby[bot]> apeiros: # => 4 (https://eval.in/1021717)
<jrich523> oh neat
lxsameer has joined #ruby
<apeiros> >> [1,2,3,1,2,1,2,2,3,1].count { |x| x > 1 }
<ruby[bot]> apeiros: # => 6 (https://eval.in/1021718)
<cthulchu> I'm trying to use mot popular method names
dviola has joined #ruby
<jrich523> thats pretty spiffy... i might have a place for that :)
<cthulchu> I switch languages rather often
<jrich523> same here
<apeiros> btw., all those things which have to iterate through your collection *usually* come from Enumerable
<cthulchu> it can come from something else?
<apeiros> so if your class has #each, you can include Enumerable and get all those nice methods for free.
<cthulchu> ah, I guess datastructures
<cthulchu> like lists
<apeiros> Array defines its own variants for some, because it can do it more efficiently.
<apeiros> Hash defines its own variants for select/reject, so they return a Hash instead of an Array
schneider has quit [Ping timeout: 264 seconds]
wontruefree has quit [Quit: bye]
<jrich523> well, i think i'll call it a day.. apeiros and zenspider apprecaite the time and info!
FernandoBasso has quit [Ping timeout: 245 seconds]
<apeiros> yw
<cthulchu> most text editors don't highlight ends
schneider has joined #ruby
<cthulchu> I hope they get rid of this nonsense and switch to {}
<cthulchu> or to python's block syntax
<apeiros> oooor you could switch to a decent editor :-p
<apeiros> at least in sublime, I can even fold those things
<cthulchu> I can too
<cthulchu> I use Atom
<cthulchu> errr... I can fold defs
<cthulchu> weird... I can fold if-elses too
<cthulchu> but it doesn't highlight them
<apeiros> get a better theme then?
jcarl43 has quit [Quit: WeeChat 2.1]
<cthulchu> if doesn't need an end when there's else?
clemens31 has quit [Ping timeout: 240 seconds]
<apeiros> what do you mean?
<cthulchu> if else end
<apeiros> I don't follow :(
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
schleppel has quit [Quit: Konversation terminated!]
schneider has quit [Ping timeout: 264 seconds]
DTZUZO has quit [Quit: WeeChat 2.0]
lxsameer has quit [Ping timeout: 276 seconds]
<zenspider> apeiros: they want to code in python... maybe they should
<apeiros> 😂
<cthulchu> I do
lxsameer has joined #ruby
<cthulchu> oh this is beautiful
<cthulchu> I injected Analytics tests in our QA's testing framework
<cthulchu> they automate Selenium with Ruby
<cthulchu> wanted to do it for a while now
schneider has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
bobdobbs has joined #ruby
cagomez has quit [Remote host closed the connection]
weird_error has joined #ruby
schneider has quit [Ping timeout: 264 seconds]
roamingdog has joined #ruby