havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
Guest29 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski has joined #ruby
arashb has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 248 seconds]
rrutkowski has joined #ruby
apeiros_ has joined #ruby
jottr_ has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
Sina has quit [Quit: Connection closed for inactivity]
_aeris_ has quit [Remote host closed the connection]
nowhereman_ has quit [Ping timeout: 260 seconds]
_aeris_ has joined #ruby
nowhereman_ has joined #ruby
Guest29 has joined #ruby
hahuang61 has quit [Quit: WeeChat 2.0.1]
alfiemax has joined #ruby
jottr_ has quit [Ping timeout: 248 seconds]
PaulCape_ has quit [Ping timeout: 268 seconds]
alfiemax has quit [Ping timeout: 248 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
arashb has quit [Ping timeout: 248 seconds]
guacamole has quit [Client Quit]
jnollette has joined #ruby
bmurt has joined #ruby
war_pigs_ has joined #ruby
war_pigs has quit [Ping timeout: 248 seconds]
jtdoncas_ has joined #ruby
PaulCapestany has joined #ruby
arashb has joined #ruby
bronson has joined #ruby
jtdoncas_ has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pastorin_ has quit [Remote host closed the connection]
war_pigs_ has quit [Quit: later... computer is sleeping]
bronson has quit [Ping timeout: 256 seconds]
rrutkowski has quit [Ping timeout: 240 seconds]
jtdoncas_ has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
cdg has joined #ruby
Guest29 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Quit: WeeChat 2.0.1]
cdg_ has quit [Ping timeout: 248 seconds]
cdg__ has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
Xiti has quit [Quit: Xiti]
workmad3 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
cdg__ has quit [Ping timeout: 248 seconds]
leitz has quit [Quit: Nappy time]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
nahra has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ardivaba has joined #ruby
<Ardivaba> Hi.
Neptu_ has quit [Ping timeout: 268 seconds]
<havenwood> Ardivaba: hi
<havenwood> Welcome!
<Ardivaba> Thanks.
arashb has quit [Ping timeout: 256 seconds]
Neptu has joined #ruby
jottr_ has joined #ruby
<Ardivaba> As a former C# developer i just want to say that Ruby is absolutely amazing and i wish i'd known it 10 years ago. Also the community around Ruby seems to be very vibrant, so here i am.
<baweaver> Alo
<Ardivaba> Anyone knows if there any tools to help with code reading like SourceTrail for Ruby?
jenrzzz has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
cdg has joined #ruby
randomstrangerb has quit [Ping timeout: 264 seconds]
randomstrangerb has joined #ruby
bmurt has joined #ruby
arashb has joined #ruby
<Ardivaba> code-explorer gem seems to be close enough.
cdg has quit [Ping timeout: 240 seconds]
osvico has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has quit [Ping timeout: 240 seconds]
zigzig has quit [Ping timeout: 255 seconds]
Chronocity has joined #ruby
kies has quit [Ping timeout: 240 seconds]
zigzig has joined #ruby
thinkpad has quit [Quit: lawl]
osvico has quit [Ping timeout: 240 seconds]
<Success> lols sass wants ffi and ffi requires < 2.5; but i have 2.5.0
<Success> what should i do?
cdg has joined #ruby
thinkpad has joined #ruby
bronson has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
vutral|kali_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Ping timeout: 264 seconds]
cagmz has quit [Quit: Leaving]
drewmcmillan has joined #ruby
vutral|kali_ has quit [Ping timeout: 240 seconds]
arashb has quit [Ping timeout: 240 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
jottr_ has joined #ruby
exchgr has joined #ruby
x77686d has quit [Quit: x77686d]
jottr_ has quit [Ping timeout: 240 seconds]
Failure has joined #ruby
arashb has joined #ruby
cdg has joined #ruby
Psybur has quit [Ping timeout: 256 seconds]
SeepingN has quit [Remote host closed the connection]
x77686d has joined #ruby
jottr_ has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
Success has quit [Ping timeout: 240 seconds]
nertzy has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 256 seconds]
randomstrangerb has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
randomstrangerb has joined #ruby
John_Ivan has joined #ruby
jottr_ has quit [Ping timeout: 264 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
yaiyaichu has joined #ruby
dman777 has joined #ruby
<dman777> has anyone ever mixed rvm with n or nvm in the same shell enviroment? would there be any issues?
bmurt has joined #ruby
<havenwood> dman777: I'm not sure why there'd be any issue.
<havenwood> dman777: They shouldn't conflict in any way.
<dman777> there's alot going on the shell with all that
elphe has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
kies has joined #ruby
CrazyEddy has joined #ruby
nowhere_man has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
x77686d has quit [Quit: x77686d]
nowhereman_ has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 268 seconds]
elphe has joined #ruby
garyserj has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mistym has joined #ruby
Lyubo1 has joined #ruby
bmurt has joined #ruby
gizmore has joined #ruby
meesles has quit [Ping timeout: 256 seconds]
arashb has quit [Ping timeout: 240 seconds]
bmurt has quit [Client Quit]
Psybur has joined #ruby
gizmore|2 has quit [Ping timeout: 260 seconds]
x77686d has joined #ruby
arescorpio has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
jtdoncas_ has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
Psybur has quit [Ping timeout: 256 seconds]
Freshnuts has quit [Quit: Leaving]
ikopico has quit [Ping timeout: 265 seconds]
elphe has joined #ruby
ldv__ has joined #ruby
ldv has quit [Read error: Connection reset by peer]
ikopico has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneide_ has joined #ruby
ldv__ has quit [Remote host closed the connection]
jottr_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
schneide_ has quit [Ping timeout: 256 seconds]
arashb has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
cadillac_ has quit [Quit: I quit]
Chronocity has quit [Remote host closed the connection]
cadillac_ has joined #ruby
workmad3 has joined #ruby
sspreitz has quit [Ping timeout: 240 seconds]
sspreitz has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
osvico has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
yaiyaichu has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
orbyt_ has joined #ruby
Defenestrate has joined #ruby
mistym has quit [Ping timeout: 240 seconds]
mistym has joined #ruby
mistym has joined #ruby
mistym has quit [Changing host]
uptime has quit [Ping timeout: 255 seconds]
dogweather has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
arashb has quit [Ping timeout: 248 seconds]
Defenestrate has quit [Quit: Leaving]
dogweather has joined #ruby
uptime has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
nathani has quit [Quit: WeeChat 1.8]
drowze has joined #ruby
arashb has joined #ruby
ta_ has joined #ruby
drowze has quit [Client Quit]
drowze has joined #ruby
drowze has quit [Client Quit]
darkhanb has joined #ruby
govg has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
jottr_ has joined #ruby
nathani has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
arescorpio has quit [Excess Flood]
konsolebox has joined #ruby
jottr_ has quit [Ping timeout: 248 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
exchgr has quit [Ping timeout: 256 seconds]
konsolebox has quit [Ping timeout: 256 seconds]
Ardivaba has quit [Quit: Page closed]
konsolebox has joined #ruby
AJA4350 has quit [Quit: AJA4350]
cdg has quit [Ping timeout: 240 seconds]
exchgr has joined #ruby
arashb has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
segy has quit [Ping timeout: 248 seconds]
arashb has joined #ruby
ta_ has joined #ruby
segy has joined #ruby
alex`` has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
gix- has joined #ruby
gix has quit [Disconnected by services]
trautwein has joined #ruby
jerryskye has quit [Quit: The Lounge - https://thelounge.github.io]
bronson has joined #ruby
hahuang65 has quit [Client Quit]
jerryskye has joined #ruby
arashb has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 264 seconds]
aintno_sunshine has joined #ruby
Azure has quit [Read error: Connection reset by peer]
jottr_ has joined #ruby
ephemera_ has quit [Quit: No Ping reply in 180 seconds.]
ephemera_ has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
Azure has joined #ruby
oleo has joined #ruby
<dogweather> Anyone use RubyMine? Does it really work for you?
<dogweather> I've never gotten it to fully function as promised. Thinking about trying again
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
gothicsouth has joined #ruby
rrichardsr3 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
rrichard_ has joined #ruby
elphe has joined #ruby
mjolnird has quit [Ping timeout: 252 seconds]
avocadotoast has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
<avocadotoast> hey all, I'm a bit confused about something. I tried doing something like "a = 1; a++" in irb, and that works. a = 2 after that code runs
rrichardsr3 has quit [Ping timeout: 248 seconds]
ldv has joined #ruby
<avocadotoast> but if I try to do this inside a ruby function, I get an error
<avocadotoast> why is that?
jenrzzz has joined #ruby
oleo has quit [Remote host closed the connection]
mjolnird has joined #ruby
ldv has quit [Remote host closed the connection]
Failure has quit [Ping timeout: 240 seconds]
ldv has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
<havenwood> avocadotoast: Ruby doesn't have the ++ operator.
workmad3 has joined #ruby
<havenwood> avocadotoast: That second plus is being treated as a unary operator.
<havenwood> >> require 'ripper'; Ripper.sexp("a = 1\na ++\na = 2").last
<ruby[bot]> havenwood: # => [[:assign, [:var_field, [:@ident, "a", [1, 0]]], [:@int, "1", [1, 4]]], [:binary, [:var_ref, [:@iden ...check link for more (https://eval.in/945573)
<eam> this is why ruby ought to have the semicolon
jenrzzz has joined #ruby
<havenwood> avocadotoast: So what you're writing with whitespace added is: a = 1; a + +a = 2
<havenwood> avocadotoast: With parens added it might make more sense: a = 1; a + (+a = 2)
<baweaver> eam: blasphemy
<eam> ikr
<baweaver> though I totally use them in JS
<havenwood> eam: baweaver: Which is better, #converge or #unfold or both?: https://bugs.ruby-lang.org/issues/14423?next_issue_id=14422&prev_issue_id=14424
<avocadotoast> havenwood hmm, ok. I get why it doesn't work now. But why does it behave like that instead of throwing an error?
<havenwood> avocadotoast: Obviously you don't mean to be doing what it's interpreting, but it just happens to be valid, albeit strange, syntax.
<avocadotoast> havenwood fair enough. thanks for the explanation :)
<havenwood> avocadotoast: a = 1; a += 1
<havenwood> avocadotoast: No prob, happy coding!
workmad3 has quit [Ping timeout: 268 seconds]
<eam> the two major concepts there are probably that = returns a value, and so does the unary method +
rrichard_ has quit [Quit: He who dares .... wins.]
<baweaver> Honestly trying to think of a case where I'd use it
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> Also can't you just use cycle?
cadillac_ has quit [Ping timeout: 240 seconds]
<eam> I'm still rtfm'ing because I don't ruby enough
<havenwood> baweaver: Projected OKRs goals: 2.converge(&:abs2)
<havenwood> baweaver: I don't think #cycle would do these, but maybe I'm just missing it.
rwb has quit [Remote host closed the connection]
<havenwood> #step is similar, but just not the same since it'd #succ iteration built-in.
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldv has quit [Ping timeout: 255 seconds]
rwb has joined #ruby
<havenwood> I don't think the proposer is right that iterate in Clojure and Scala (Elixir has it too) are the same beast.
r3kz has joined #ruby
agrecascino has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
<havenwood> It's really just Ramda converge.
xpt has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
<havenwood> Having iterate might make more sense.
ta_ has joined #ruby
<havenwood> Fold and converge seem more like specialty items.
<havenwood> I think I might use fold more personally.
cdg has joined #ruby
agrecascino has joined #ruby
war_pigs has joined #ruby
TvL2386 has quit [Ping timeout: 252 seconds]
jottr_ has quit [Ping timeout: 248 seconds]
rabajaj has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
<eam> just go whole hog and implement perl6 ...
cdg has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
ta_ has joined #ruby
bronson has joined #ruby
drew_adams has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
druonysus has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
pb122 has joined #ruby
nso95 has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
TvL2386 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
xpt has joined #ruby
dman777 has quit [Quit: Lost terminal]
jenrzzz has quit [Ping timeout: 248 seconds]
<baweaver> eam: how early in teaching do you think is too early to mention methods?
ta_ has joined #ruby
ramfjord has joined #ruby
alfiemax has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
ta_ has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
ramfjord has joined #ruby
<havenwood> baweaver: I think classes-first is taught way too commonly. Nobody seems to understand what’s going on. It breaks brains.
<havenwood> I’m tempted to argue for modules-first, with function via module_function before any methods.
<havenwood> Modules as namespaces for functions isn't too hard to explain.
<havenwood> The handy thing there is that starting point is exactly where I like to start with creating a gem - presuming no state.
<havenwood> At least until some state comes up, unless it's immediately apparent.
sammi` has quit [Ping timeout: 240 seconds]
sammi` has joined #ruby
<havenwood> Then functions don't segue into methods until classes come up, where there're meaningful receivers for methods.
ramfjord has quit [Ping timeout: 240 seconds]
<havenwood> Which also introduces instance variables.
nso95 has quit [Read error: Connection reset by peer]
nso95 has joined #ruby
<havenwood> Maybe it's extreme, but I'm even tempted to say 1) module with module_function, 2) singleton class, 3) class - in order of complexity.
<havenwood> I can see why Singleton isn't usually taught up front, but I'm not convinced.
war_pigs has quit [Quit: laters.. I'm out.]
mtkd has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
aintno_sunshine has quit [Ping timeout: 256 seconds]
<havenwood> I see classes used where modules are appropriate way more than the other way around.
mtkd has joined #ruby
jottr_ has quit [Ping timeout: 248 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naprimer2 has joined #ruby
ta_ has joined #ruby
naprimer3 has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
WA9ACE has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
WA9ACE has joined #ruby
WA9ACE is now known as Guest59303
avocadotoast has quit [Quit: Textual IRC Client: www.textualapp.com]
ivanskie has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax_ has joined #ruby
LocaMocha has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
jamesaxl has joined #ruby
ahrs has quit [Remote host closed the connection]
ta_ has joined #ruby
ahrs has joined #ruby
claudiuinberlin has joined #ruby
pb122 has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Client Quit]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
<baweaver> What I might do is favor early methods and use modules before classes
ta_ has joined #ruby
<baweaver> such as I get into methods in the first chapter even
<baweaver> The real pain of a chapter is the install
Ishido has joined #ruby
<baweaver> ironically Windows is the easiest
<baweaver> I almost wonder why Mac cou.... waitasecond
<baweaver> havenwood: remember that prepackaged pry?
Dimik has joined #ruby
<havenwood> aye! :-)
<baweaver> What if we took a fairly modern version of Ruby, self contained it with Pry, and shipped that?
<havenwood> ~13MB
<baweaver> compared to the alternative
<baweaver> trying to explain away console and brew and other tools on mac is a developers ground
<baweaver> not that it can't be taught, but that it'd be dang cruel to expect a complete novice to grok them
<baweaver> though we could also very easily point them at REPL.it
<havenwood> srsly
ta_ has quit [Ping timeout: 240 seconds]
apeiros_ has quit [Ping timeout: 260 seconds]
<baweaver> Honestly I think I may well do that to start and have an advanced section
alfiemax has joined #ruby
Guest59303 is now known as WA9ACE
tildes has joined #ruby
<baweaver> oooooooo
steveh7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has quit [Read error: Connection reset by peer]
<nso95> baweaver: are you writing a book or something?
<baweaver> Indeed.
<nso95> cool
<baweaver> "An Illustrated Guide to Ruby"
riceandbeans has quit [Quit: leaving]
<nso95> i'll skim it later
<baweaver> hasn't been updated since November, but there's a good reason for that one that I'll announce later :)
nicesignal has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
milardovich has quit []
jottr_ has joined #ruby
milardovich has joined #ruby
jenrzzz has joined #ruby
ta_ has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
eckhardt has joined #ruby
<baweaver> Contacted the REPL.it folks, we'll see if they're willing to play ball on a classroom option :)
danguita has quit [Ping timeout: 260 seconds]
venmx has quit [Ping timeout: 264 seconds]
nicesignal has joined #ruby
conta has joined #ruby
mozzarella has quit [Remote host closed the connection]
andikr has joined #ruby
mozzarella has joined #ruby
bronson has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
amatas has joined #ruby
elphe has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 240 seconds]
elphe has joined #ruby
soniya29 has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
ta_ has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
sundhell_away is now known as sundhell
KevinSjoberg has joined #ruby
Burgestrand has quit [Quit: Closing time!]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KevinSjoberg has quit [Client Quit]
za1b1tsu has joined #ruby
KevinSjoberg has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
modin has quit [Ping timeout: 256 seconds]
mark_66 has joined #ruby
venmx has joined #ruby
jottr_ has joined #ruby
alfiemax_ has joined #ruby
ramfjord has joined #ruby
milardovich has quit []
troys has quit [Quit: Bye]
milardovich has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
jottr_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
clemens3 has joined #ruby
modin has joined #ruby
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 240 seconds]
venmx has quit [Ping timeout: 252 seconds]
yohji has joined #ruby
devil_tu1 has joined #ruby
devil_tu1 has quit [Client Quit]
devil_tu1 has joined #ruby
devil_tu1 has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
devil_tux has joined #ruby
ta_ has joined #ruby
TomyWork has joined #ruby
Barrt has quit [Ping timeout: 260 seconds]
schneide_ has joined #ruby
bronson has joined #ruby
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
Burgestrand has joined #ruby
faces has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
steveh7 has joined #ruby
ur5us has joined #ruby
claudiuinberlin has joined #ruby
Barrt has joined #ruby
vutral|kali_ has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
aupadhye has joined #ruby
Barrt has quit [Max SendQ exceeded]
Barrt has joined #ruby
vutral|kali_ has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Snowy has joined #ruby
jottr_ has joined #ruby
KevinSjo_ has joined #ruby
KevinSjo_ has quit [Client Quit]
cdg has joined #ruby
drewmcmillan has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 252 seconds]
VladGh has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
VladGh_ has quit [Ping timeout: 256 seconds]
r3kz has quit [Quit: Connection closed for inactivity]
workmad3 has joined #ruby
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
x77686d has quit [Quit: x77686d]
axsuul has quit [Ping timeout: 268 seconds]
axsuul has joined #ruby
drewmcmi_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
drewmcmillan has quit [Ping timeout: 256 seconds]
jottr_ has joined #ruby
soniya29 has quit [Quit: Leaving]
jottr_ has quit [Ping timeout: 268 seconds]
roshanavand has quit [Quit: Leaving.]
conta has quit [Quit: conta]
milardovich has quit [Remote host closed the connection]
roshanavand has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
desperek has joined #ruby
drewmcmillan has joined #ruby
drewmcmi_ has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
vutral|kali has quit [Read error: Connection reset by peer]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
marr has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
guille-moe has joined #ruby
mikecmpbll has joined #ruby
venmx has quit [Remote host closed the connection]
venmx has joined #ruby
Barrt has quit [Quit: Leaving]
KevinSjoberg has joined #ruby
jottr_ has joined #ruby
jottr_ has quit [Ping timeout: 268 seconds]
tomphp has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
tomphp has quit [Client Quit]
tomphp has joined #ruby
mtkd has joined #ruby
tomphp has quit [Client Quit]
RougeR has quit [Remote host closed the connection]
tomphp has joined #ruby
Beams has joined #ruby
steveh7 has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has joined #ruby
ur5us has quit [Remote host closed the connection]
ramfjord has joined #ruby
tvw has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
randomstrangerb has quit [Ping timeout: 260 seconds]
randomstrangerb has joined #ruby
goatish has joined #ruby
kapil___ has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
venmx has joined #ruby
BlackPioter has quit [Quit: Peace.]
nicesignal has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
nicesignal has joined #ruby
Azure has joined #ruby
qba73 has joined #ruby
deadnull has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
jaruga has joined #ruby
alfiemax has joined #ruby
qba73 has quit [Remote host closed the connection]
deadnull has quit [Quit: deadnull]
schneide_ has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
Snowy_ has joined #ruby
terens has joined #ruby
<terens> how to convince coworker to not do this
<terens> data: JSON.parse(data.to_json) ?
Snowy has quit [Read error: Connection reset by peer]
<Burgestrand> terens why are they doing it?
jnyw has quit [Quit: WeeChat 2.0.1]
<terens> I dont know
<al2o3-cr> terens: can you not ask them?
InfinityFye has joined #ruby
jottr_ has joined #ruby
<terens> I will ask again
<adaedra> Maybe because they come from JS where this is the way to clone objects?
<terens> I don't know what is the answer now but the last answer I got is to ensure validity.
<terens> however data is going to be converted again to json automatically
InfinityFye has left #ruby [#ruby]
<terens> data -> json -> hash -> json
Ishido has quit [Ping timeout: 246 seconds]
qba73 has joined #ruby
Psybur has joined #ruby
jottr_ has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
cadillac_ has joined #ruby
tomphp has quit [Client Quit]
qba73 has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
qba73 has joined #ruby
tomphp has joined #ruby
Ishido has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
schneide_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
Psybur has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
mozzarel1 has joined #ruby
mozzarella has quit [Ping timeout: 248 seconds]
mozzarel1 is now known as mozzarella
apparition has joined #ruby
quobo has joined #ruby
yohji has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
yohji has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
wsmoak has quit [Quit: Connection closed for inactivity]
Ishido has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
<heftig> sounds like it shouldn't be converted automatically
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
workmad3 has joined #ruby
tcopeland has quit [Quit: tcopeland]
mjolnird has quit [Quit: Leaving]
mjolnird has joined #ruby
Psybur_ has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
Psybur has quit [Ping timeout: 240 seconds]
Gnukpd has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
dinfuehr has joined #ruby
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
amatas_ has joined #ruby
mtkd has joined #ruby
Ishido has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aces1up has joined #ruby
<aces1up> why does a Datetime object return weird years like -4713 ?
jottr_ has joined #ruby
apparition has joined #ruby
shinnya has joined #ruby
Guest29 has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
cdg has quit [Ping timeout: 252 seconds]
Gnukpd has quit [Quit: Leaving]
<apeiros_> aces1up: because you constructed the instance with that year
apeiros_ is now known as apeiros
* apeiros guesses Date.new instead of Date.today
k0mpa has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
locsmif has joined #ruby
Mike11 has joined #ruby
Dimik has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
govg has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
roshanavand has left #ruby [#ruby]
govg has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
InfinityFye has joined #ruby
govg has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
amatas_ has quit [Quit: amatas_]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
InfinityFye has quit [Ping timeout: 256 seconds]
jeffreylevesque has quit [Ping timeout: 268 seconds]
Guest29 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
sundhell is now known as sundhell_away
sundhell_away is now known as sundhell
jottr_ has quit [Ping timeout: 268 seconds]
vondruch has quit [Ping timeout: 248 seconds]
tomphp has quit [Client Quit]
qba73 has quit [Ping timeout: 240 seconds]
drakko has joined #ruby
elphe has joined #ruby
jottr_ has joined #ruby
desperek has quit [Ping timeout: 276 seconds]
martin__ has joined #ruby
Doow has joined #ruby
InfinityFye has joined #ruby
martin__ is now known as mongag
mongag has quit [Changing host]
mongag has joined #ruby
synthroid has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
jottr_ has quit [Quit: WeeChat 2.0.1]
zautomata1 has joined #ruby
rwb has quit [Ping timeout: 240 seconds]
zautomata has quit [Ping timeout: 264 seconds]
goatish has quit [Quit: Hibernating]
goatish has joined #ruby
guille-moe has quit [Ping timeout: 255 seconds]
jeffreylevesque has joined #ruby
roshanavand has joined #ruby
AJA4350 has joined #ruby
jeffreylevesque_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
bmurt has joined #ruby
govg has joined #ruby
guille-moe has joined #ruby
elphe has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sylario has joined #ruby
amatas_ has joined #ruby
alfiemax has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
andikr has quit [Remote host closed the connection]
qba73 has joined #ruby
aces1up has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tcopeland has joined #ruby
bmurt has joined #ruby
cdg has joined #ruby
konos5 has joined #ruby
konos5 has quit [Client Quit]
devil_tux has quit [Quit: leaving]
elphe has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
terens has quit [Remote host closed the connection]
drewmcmillan has joined #ruby
Ishido has quit [Ping timeout: 256 seconds]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 256 seconds]
stormpack has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
nowhereman_ has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 248 seconds]
vondruch has joined #ruby
<Doow> I'm having a problem with reading stdout and stderr from a process that I'm launching from inside ruby. I'm using the following code https://gist.github.com/KarlWerf/d3d08c67235b105841706871c049aa71 and sometimes the other process gets stuck trying to flush at the same time that ruby gets stuck in either out.eof?() or err.eof?(). Is there a better way to write this?
elphe has quit [Ping timeout: 256 seconds]
<apeiros> Doow: IO.select to test where data is ready to be read
<apeiros> also some low hanging fruits: name your gists with .rb to get syntax highlight, use 2 spaces for indent, use `until` instead of `while not`, don't use double negation (not != in line 28)
<apeiros> oh, there's an and. I blame lack of highlight :-p
<apeiros> also not sure throw is a good idea to transport error messages.
<apeiros> (raise is ruby's way to raise an exception, throw is not meant for exceptions)
<Doow> Wow, lots of good feedback at once :)
Mike11 has quit [Quit: Leaving.]
<Doow> unfortunately I think I got all except the select part. Should I use select instead of the eof?()'s or is that for reading as well? (never used select, except in c for a socket about 16 years ago..)
elphe has joined #ruby
TomyLobo has joined #ruby
<apeiros> select only tells you that data is ready. it's instead of .eof?. that way you ensure that you only read from where data is actually ready. using readline() it may still get stuck, though. you may want to read nonblocking (i.e. as much as is available without waiting for a specific character to appear)
<apeiros> quite possible that there are better techniques.
<Doow> reading nonblocking sounds like a really good idea :)
apparition has quit [Quit: Bye]
<Doow> to tell the truth I'm getting pretty confused by ruby, there seems to be many different ways of doing the same thing and no good overview of when to use what.
jrafanie has joined #ruby
<apeiros> if you still want to emit line by line it means you have to do your own buffering, though
<Doow> I think I can handle that.
<apeiros> regarding IO that's certainly the case. I remember having been confused by that too and I'm still not always entirely sure what's the proper way and why.
<apeiros> (and I do use ruby for quite some time now… way over a decade…)
arne has joined #ruby
randomstrangerb has quit [Ping timeout: 260 seconds]
<arne> if i want some sort of "supercheap" oauth
<arne> could i sign a link with a timestamp with a private key?
<arne> or is that somehow insecure
randomstrangerb has joined #ruby
<apeiros> cheap and security usually doesn't mix
karapetyan has quit [Remote host closed the connection]
<Doow> apeiros, a silly thing is that it's also pretty hard to google since many of the function names are less than 3 characters or the characters are non-alphabetic
sundhell is now known as sundhell_away
<adaedra> if you want cheap oauth, you use a library which implements it already
<arne> well i don't want to invest that much time :/
<adaedra> what is it you want to do?
drakko has quit [Quit: xoxo]
<apeiros> Doow: browsing the docs helps more than googling IMO
<apeiros> &ri IO Doow
desperek has joined #ruby
<Doow> apeiros, I'll give it a try and see what I understand :)
Snowy_ has quit [Remote host closed the connection]
<apeiros> generally you'll want read_nonblock I think ;-)
<arne> apeiros: give someone a link which is valid for 10 minutes
<arne> without writing anything to the database
<apeiros> s/apeiros/adaedra/
karapetyan has joined #ruby
<arne> same thing :p
<arne> sorry
<apeiros> signing a link with a key might blow max url length
<adaedra> well you can have a link with just an id, and in the database an expiration timestamp
<adaedra> i don't see where oauth comes into play
<adaedra> ah, without writing to the db
tomphp has joined #ruby
<adaedra> well yeah, you can just encrypt the timestamp + link to make a new link, but as apeiros said, you may get a too long link
karapetyan has quit [Remote host closed the connection]
<arne> okay
<adaedra> but that seems overkill imo
pastorinni has joined #ruby
* arne agress
<adaedra> i'd just have a db with expiration times, easier to manage
<adaedra> security-wise, I guess it's as secure as your encription algorith is
<adaedra> encryption
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Client Quit]
<apeiros> you can do some kind of crypto signature of the link which is shorter. but hand-rolled crypto is usually broken in at least one way.
<Doow> I agree, database is probably both easier and more secure.
<apeiros> and I lack the expertise to see in which ways it would be broken
<arne> what's a good password generator in rubygems?
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
<c-c> Sharing links for access? You want a table with entries pointing to the access credinteals, with ids pointing to another table, which contains salted public, world-shared hashes
<c-c> But unless you understand exactly why and what each word means, your secu will fail
dionysus69 has joined #ruby
rippa has joined #ruby
<arne> i don't see how a cryptographicially link wouldn't be as secure
schneide_ has quit [Remote host closed the connection]
<arne> but simply signing with rsa.. won't do the trick
<c-c> arne: maybe you can google rainbow tables
<apeiros> the big issue with crypto is - you usually don't see how your stuff is broken :-|
schneide_ has joined #ruby
<arne> maybe google prime factorization
<arne> has nothing to do with rainbowtables
<apeiros> else I'd say something like a shared secret + hashing the link including the timestamp & shared secret and then add that hash to the link would suffice.
<c-c> seems experience has yet to teach many
<apeiros> but as said - it's easy enough to fuck up and never know.
<c-c> 8)
schneide_ has quit [Read error: Connection reset by peer]
<arne> ... i take random data + timestamp + sign
<c-c> Ah well, even the best systems get broken in sometimes
<arne> you gotta explain to me, how a rainbowtable would help there
<arne> or even if a timestamp that is only signed by me
schneide_ has joined #ruby
<c-c> It wouldn't "help", it is what you have to work "around"
vondruch has quit [Ping timeout: 248 seconds]
<arne> bs
<c-c> Also, random isn't random. Even that enables an attack
<arne> ...
<c-c> Seems to me you'd benefit from reading a basic book on this topic.
<c-c> Good luck!
<arne> seems you'd benefit from talking less
<c-c> thats what people often say, before getting pwned
<apeiros> arne: that's been uncalled for. please refrain from that kind of behavior.
<arne> like the subtext of his arrogance was more polite
<apeiros> yeah, pointing fingers saying "he first" doesn't make it better.
<c-c> So because I shared with you these commonly known professional details, I'm now "arrogant"
<arne> apeiros: true
John_Ivan has quit [Ping timeout: 240 seconds]
<apeiros> arne: but yes, I agree, c-c could have phrased the book part in a less condescending way.
<arne> c-c: putting out not helpful facts like "random isn't secure" while i was talking about randonmly signed data
<arne> doesn't help at all
<arne> even if the random isn't random because there is no random.. as you would like to say, while there is sufficently random, you would still not be able to crack my rsa key from that
<WA9ACE> what is the use case for the password generator?
schneide_ has quit [Ping timeout: 240 seconds]
<arne> WA9ACE: generating passwords :o
<WA9ACE> that can help us determine attack vector and answer appropriately
<Doow> It all depends on the entire usecase, I'm still not sure exactly what you're trying to do.
<WA9ACE> I mean the end goal
<arne> no, the password-gen was for a different topic
<arne> Doow: basicially i want an answer to the question is a link created with "randomdata+timestamp+rsa-sign"
<arne> practiable for sort of a login token
<arne> that isn't a word, deosn't matter u catch my drift
<arne> but it's most likely a link that's too long.. too bad.
oleo has joined #ruby
<c-c> arne: you must be a young guy
<Doow> arne, ok, I still thing the randomdata part is enough and then keep the timestamp in a local db, but I'm no security expert (and I can't help with the other part)
<apeiros> c-c: really, you too. please don't go ad-hominem.
cschneid has quit [Remote host closed the connection]
<WA9ACE> Is there a reason not to use vetted security related gems already out there for authentication?
<c-c> young guys often cut corners, when it comes to secu. One thinks one knows, because one cannot know all the things invented to circumvent stuff.
<apeiros> you've arguments, present them. it's up to arne to put them to good use or ignore them.
<WA9ACE> Omniauth which implements oauth2 is certainly safer and faster than rolling your own
<arne> c-c: try to be helpful
<arne> instead
soniya29_ has quit [Ping timeout: 246 seconds]
soniya29 has quit [Ping timeout: 256 seconds]
<c-c> well I tried, since you asked why a link wouldn't be as secure.
<arne> you didn't say why it isn't
<c-c> I did, because things like predictable pseudorandomness and attacks like rainbow tables.
Burgestrand has quit [Quit: Closing time!]
<c-c> started to, anyway.
<arne> .. that doesn't explain how you crack my rsa-sign
<arne> and also assume my randomness is background noise from big bang
<c-c> I know it isn't.
elphe has quit [Ping timeout: 256 seconds]
<c-c> I can also tell I'd have to do a lecture and I am not a secu lecturer. In fact, I'll just ignore the rest of this convo, now.
* apeiros thinks SecureRandom should provide sensible enough randomness
<arne> apeiros: it does.. but it wouldn't help
<WA9ACE> ^
<arne> c-c: please do so
schneide_ has joined #ruby
<apeiros> (and if it doesn't, it's a bug in securerandom and not your code - misusing it not withstanding of course)
k0mpa has quit [Ping timeout: 255 seconds]
<c-c> Well, its not necessarily a bug, but in the premise about securerandom
conta has joined #ruby
InfinityFye has quit [Ping timeout: 246 seconds]
soniya29 has joined #ruby
soniya29_ has joined #ruby
InfinityFye has joined #ruby
<al2o3-cr> when requiring securerandom in pry it lets you call a private_method a one off?
<al2o3-cr> namely SecureRandom.gen_random
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> that's not due to pry
jrafanie has joined #ruby
<apeiros> do `$ SecureRandom.gen_random` in pry before calling it
<apeiros> then call it and do it again :)
<apeiros> that's weird…
<al2o3-cr> whats happening?
<apeiros> well, it redefines itself on the first call
<al2o3-cr> oic, but why do this
mongag has quit [Quit: BitchX-1.2.1 -- just do it.]
<apeiros> not sure where the "turns private" comes from
<al2o3-cr> yeah, weird, me neither.
<apeiros> oh
<apeiros> I see
k0mpa has joined #ruby
<apeiros> because it replaces the original with an alias to a method which is private
<al2o3-cr> ah, yes.
<apeiros> so first call works because it happens in the public method (it calls it for you after doing the replacement), and after that, it no longer works
<apeiros> IMO a bug
<apeiros> #bytes will always work
<apeiros> or ::bytes rather
<al2o3-cr> does seem like it.
mtkd has quit [Ping timeout: 265 seconds]
mtkd has joined #ruby
<c-c> Is the ruby implementation of securerandom a specific rng implementation or is it like in java, a kind of wrapper?
<apeiros> it's a wrapper afais
<apeiros> openssl, /dev/urandom and (no idea what specifically that is) win32
drakko has joined #ruby
qba73 has quit [Remote host closed the connection]
<c-c> I've never used the ruby one, but the java one needs special instantiation and seeding implementation to be random, too
qba73 has joined #ruby
marr123 has joined #ruby
<apeiros> unlike Kernel#rand, I don't know how to seed SecureRandom. it's not necessary to do so, but I don't know how I'd do it to create reproducible examples.
<al2o3-cr> apeiros: invoking Process.argv0 in pry either segfaults or returns random memory junk. is this a fault of pry?
marr has quit [Ping timeout: 240 seconds]
<apeiros> al2o3-cr: no idea
<al2o3-cr> apeiros: are you using 2.5?
<apeiros> yes
desperek has quit [Ping timeout: 260 seconds]
<al2o3-cr> could you just check please?
jtdoncas_ has joined #ruby
<apeiros> works for me™
<al2o3-cr> hmm.. you on linux, windows or osx?
<apeiros> osx, high sierra
<al2o3-cr> hmm..
<al2o3-cr> must be just linux then.
<apeiros> I'd put my money on it being a ruby bug. I don't see why pry would meddle with Process.argv0
drakko has quit [Quit: xoxo]
<al2o3-cr> well it works in irb and ruby from the command line. just not in pry.
desperek has joined #ruby
<al2o3-cr> i think havenwood said he was seeing this same behaviour (not sure what he uses though)
<elomatreb> It returns a raw call to the format method for me Oo
<elomatreb> As in, a string
<al2o3-cr> elomatreb: yeah, it get be a random anything.
<elomatreb> It seems to be history lines
<apeiros> oh
<apeiros> al2o3-cr: it *looked* correct. it's not.
<apeiros> random string here too
<al2o3-cr> ah.
tomphp has joined #ruby
<elomatreb> Seems to be something pry is doing because both irb and ruby -e don't do it
<al2o3-cr> aye, i agree.
<al2o3-cr> /usr/lib/ruby/2.5.0/pp.rb:152: [BUG] Segmentation fault at 0x0000000000000018 that's what i get sometimes.
tomphp has quit [Read error: Connection reset by peer]
tomphp_ has joined #ruby
<al2o3-cr> have to ping banister to take a look at this.
quobo has quit [Quit: Connection closed for inactivity]
<elomatreb> Yep got a segfault too (but at 0x0)
cschneid has joined #ruby
tomphp_ has quit [Client Quit]
DaniG2k has joined #ruby
schneide_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
* al2o3-cr is afk for 10
schneide_ has joined #ruby
k0mpa has quit [Remote host closed the connection]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has joined #ruby
DaniG2k has quit [Quit: leaving]
drakko has joined #ruby
karapetyan has quit [Ping timeout: 268 seconds]
jrafanie has joined #ruby
InfinityFye has left #ruby ["Leaving"]
desperek has quit [Ping timeout: 256 seconds]
mostlybadfly has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
<c-c> Who is this arne -guy anyway? Is he cool? Seems like he is here for trolling https://pastebin.com/Nhq4RwhS
<ruby[bot]> c-c: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
soniya29 has quit [Ping timeout: 240 seconds]
soniya29_ has quit [Ping timeout: 240 seconds]
jtdoncas_ has quit [Ping timeout: 248 seconds]
mordof has quit [Remote host closed the connection]
s2013 has joined #ruby
sepp2k has joined #ruby
marr123 has quit [Remote host closed the connection]
marr has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
apeiros__ has joined #ruby
John_Ivan has joined #ruby
apeiros__ has quit [Remote host closed the connection]
mark_66 has quit [Remote host closed the connection]
schneide_ has quit [Remote host closed the connection]
schneide_ has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
apeiros has quit [Read error: Connection reset by peer]
Success has joined #ruby
synthroid has quit [Remote host closed the connection]
schneide_ has quit [Ping timeout: 240 seconds]
qba73 has quit [Remote host closed the connection]
aufi has quit [Quit: Leaving]
qba73 has joined #ruby
conta has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
naftilos76 has joined #ruby
stormpack has quit [Quit: Leaving]
Fusselgesicht has joined #ruby
synthroid has joined #ruby
soniya29_ has quit [Remote host closed the connection]
soniya29 has quit [Remote host closed the connection]
soniya29 has joined #ruby
soniya29_ has joined #ruby
euge has joined #ruby
x77686d has joined #ruby
alveric has joined #ruby
euge has left #ruby [#ruby]
schneide_ has joined #ruby
gnufied has joined #ruby
ivanskie has joined #ruby
ivanskie has quit [Remote host closed the connection]
konsolebox has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
Fusselgesicht has quit [Quit: leaving]
konsolebox has joined #ruby
apeiros has joined #ruby
tomphp has joined #ruby
sammi` has quit [Quit: Changing server]
soniya29_ has quit [Ping timeout: 240 seconds]
soniya29 has quit [Ping timeout: 240 seconds]
schneide_ has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
<adaedra> c-c: stop throwing oil on the fire, please.
<Success> i love throwwing oil on the fire tho
Fusselgesicht has joined #ruby
sammi` has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yohji has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
jaruga has quit [Quit: jaruga]
qba73 has joined #ruby
<za1b1tsu> Any way I can access an instance variable without a setter? Like instance_of_class.send :@instance_var?
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
<apeiros> za1b1tsu: see Object's instance_variable_* methods
<adaedra> there's instance_variable_get/set
conta has joined #ruby
<adaedra> too slow
sammi` has quit [Quit: Changing server]
sammi` has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sammi` has quit [Client Quit]
krystianbajno has joined #ruby
drakko has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 240 seconds]
krystianbajno has left #ruby ["Leaving"]
ldv has joined #ruby
gothicsouth has quit [Ping timeout: 240 seconds]
moei has joined #ruby
s2013 has joined #ruby
kapil___ has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
<kapil___> i cannot call method defined in require(' ...rb') file. plz help
ldv has quit [Remote host closed the connection]
<apeiros> what do you mean you can't call?
soniya29_ has quit [Remote host closed the connection]
soniya29 has quit [Remote host closed the connection]
ciscam has joined #ruby
<apeiros> kapil___: ^
randomstrangerb has quit [Ping timeout: 260 seconds]
randomstrangerb has joined #ruby
dionysus69 has joined #ruby
<ruby[bot]> kapil___: as I told you already, please use https://gist.github.com
darkhanb has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
<apeiros> that doesn't really make things clearer. what happens when you try to call the method? how is the method defined in commonQuery.rb? also, please use gist.
ClearsTheScreen has left #ruby [#ruby]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
troys has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
willamin has joined #ruby
<apeiros> so we're at 2/4 puzzle pieces.
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
alfiemax has joined #ruby
<kapil___> Its simple function
aintno_sunshine has joined #ruby
armyriad has quit [Quit: Leaving]
<apeiros> I'll repeat: what happens when you try to call the method?
mtkd has quit [Ping timeout: 240 seconds]
ldv has joined #ruby
kies has quit [Ping timeout: 264 seconds]
<kapil___> apeiros: now it works. i have second question. how to pass current @yamlConfig variable to class when creating new class Query
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> classes are not callable, hence you can't "pass" things to classes.
<apeiros> do you mean when you create a new instance of class Query? as in: new_query = Query.new?
<kapil___> yes
<apeiros> you write an initialize method
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
mtkd has joined #ruby
<apeiros> class Query; def initialize(config); @config = config; end; end; Query.new(@yaml_config)
<kapil___> thanks I am using rails generator: when i give the Query Class Module Name. it gives me errors. I want to use same modules in a generator.
<za1b1tsu> thanks aperios
Vapez has joined #ruby
<apeiros> ?tabnick za1b1tsu
<ruby[bot]> za1b1tsu: pro-tip - use tab completion for nicks. avoids typos in nicks.
<apeiros> kapil___: "when i give the Query Class Module Name" I don't know what that means
cek has joined #ruby
<kapil___> apeiros: doing this not working: class AllmodelsGenerator::Query
<apeiros> "not working" is not a useful problem description
<apeiros> again, *what happens*?
<apeiros> and potentially, *what did you expect instead*?
resnik has joined #ruby
vutral|kali has quit [Ping timeout: 255 seconds]
<kapil___> then it can't give proper error. instead tells : `Could not find generator 'allmodels'. Maybe you meant 'model', 'assets' or 'channel' so entire generator not runs.
<resnik> How do I supply custom LDFLAGS to an extension being built via gem install? I see the build flags option, but I'm not sure how to use it.
<kapil___> I want to define subclass in current class. so all method of parent class are available to subclass.
<apeiros> kapil___: I'm sorry, I don't understand what you're doing
<kapil___> apeiros I have : class AllmodelsGenerator < Rails::Generators::NamedBase ....
<kapil___> I want Query class below AllmodelsGenerator
<apeiros> ok. variant 1: ensure your allmodelsgenerator is loaded when executing `class AllmodelsGenerator::Query`
<apeiros> variant 2: be explicit by defining it fully `class AllmodelsGenerator < Rails::Generators::NamedBase; class Query; …; end; end`
<kapil___> apeiros: do i write require_relative('commonQuery.rb') inside class AllmodelsGenerator::Query
<apeiros> note that variant 2 can cause issues with rails' autoloading
sanscoeur has joined #ruby
sanscoeur has quit [Remote host closed the connection]
qba73 has quit [Ping timeout: 256 seconds]
<kapil___> sorry inside class AllmodelsGenerator < ...
<apeiros> kapil___: if that's where you defined AllmodelsGenerator, then yes. but that means you're badly violating naming conventions
sanscoeur has joined #ruby
<apeiros> kapil___: you should have a file allmodels_generator.rb, which defineds the class AllmodelsGenerator
<apeiros> you then should have a file allmodels_generator/query.rb, which defines class AllmodelsGenerator::Query
<apeiros> and in that file (allmodels_generator/query.rb) you should require 'allmodels_generator'
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
nc_ has joined #ruby
<kapil___> apeiros: trying it
Beams has quit [Quit: .]
drcode has quit [Ping timeout: 248 seconds]
<kapil___> its not working. tell that entire generator is not availble. i should move class in the file allmodels_generator.rb and in class AllmodelsGenerator < Rails::Generators::NamedBase class. i think
<kapil___> apeiros: thanks your variant 2 is working. thanks
Azure|dc has joined #ruby
Azure has quit [Read error: Connection reset by peer]
synthroid has quit [Remote host closed the connection]
guille-moe has quit [Remote host closed the connection]
qba73 has joined #ruby
guille-moe has joined #ruby
<kapil___> apeiros: I still not able to access @yamlConfig variable from class AllmodelsGenerator . how to access methods and variables from parent class?
karapetyan has joined #ruby
chouhoulis has joined #ruby
<apeiros> kapil___: @instance_variables don't belong to a class. they belong to an object. only the same object can access the same instance variables.
synthroid has joined #ruby
<kapil___> apeiros: thanks.
<apeiros> a = Foo.new; b = Foo.new # a and b will have a separate set of instance variables. all methods invoked on a will use a's instance variables
<ciscam> Can somebody help me end this decade-long trial and error to find the right regex? I have an input string like ")word {abbr.eviation.))" and want to split it to [), word, {, abbr.eviation., ), )], matching \s and [^\w\.] as a zero-width assertion but i neither want to lookahead, nor lookbehind
<ciscam> with my best attempt /(?=[^\w\.])\s*/ I get [)word, {abbr.eviation., ), )]
rabajaj has quit [Quit: Leaving]
qba73 has quit [Ping timeout: 252 seconds]
<kapil___> apeiros: how i use a's methods in b when b < a
vutral|kali has quit [Ping timeout: 248 seconds]
<apeiros> you just call them
karapetyan has quit [Ping timeout: 248 seconds]
<apeiros> honestly, this is introduction level stuff and you should IMO read a book / online learning material and come here for things you don't understand about it
<adaedra> ciscam: tried with #scan and two groups, one for \w and one for [^\w\s]?
<kapil___> apeiros: ok thanks
<ciscam> will do adaedra , brb:)
_aeris_ has quit [Remote host closed the connection]
amatas_ has quit [Remote host closed the connection]
<apeiros> >> ")word {abbr.eviation.))".scan(/[(){}]|[^(){}]+/)
<ruby[bot]> apeiros: # => [")", "word ", "{", "abbr.eviation.", ")", ")"] (https://eval.in/946414)
_aeris_ has joined #ruby
alex`` has quit [Ping timeout: 256 seconds]
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
quobo has joined #ruby
dumblonde has joined #ruby
<dumblonde> hi guys
Joeb12 has joined #ruby
blasian has joined #ruby
BigToe has joined #ruby
<blasian> hello
lilfedz has joined #ruby
<BigToe> anyone in a chatty mood?
<Joeb12> my dogs named ruby
<Joeb12> im one of you now
<lilfedz> hello
ChristinaFedullo has joined #ruby
<ChristinaFedullo> hey
lilfedz has quit [Client Quit]
ChristinaFedullo has quit [Client Quit]
<ciscam> That's rocket science to me apeiros , chapeau.. How does it include the non-matched character string
blasian has quit [Client Quit]
BigToe is now known as ElianasBigToe
nc_ has quit [Ping timeout: 240 seconds]
<ciscam> >> ")word {abbr.eviation.))".scan(/[^\w\.][\w\.]+/)
<ruby[bot]> ciscam: # => [")word", "{abbr.eviation."] (https://eval.in/946415)
<ciscam> would seem more logical to me
<dumblonde> hi guys
<Joeb12> hello
<apeiros> hi dumblonde, Joeb12
<apeiros> ciscam: I'm slightly tied up atm, adaedra can probably explain
<Joeb12> adaedra whats going on
<ciscam> As far as I understand i tell scan to match single special characters (though that should actually include whitespaces) and groups made out of alphanumeric characters and dots
<ciscam> Thanks apeiros, you're the best
<adaedra> ciscam: well no, you tell here to match everything except alphanums and . (`[^\w\.]`) _then_ any number of alphanum/dot (`[\w\.]+`). If you want to test _either_, you need a `|`.
guille-moe has quit [Ping timeout: 248 seconds]
<adaedra> ciscam: Even if it doesn't do ruby specifics, I think https://www.debuggex.com/ is wonderful to see what's really happening, give it a try
nadir has joined #ruby
<adaedra> Compare yours and apeiros's
<dumblonde> how long
<ciscam> >> ")word {abbr.eviation.))".scan(/[^\s\w\.]|[\w\.]+/)
Joeb12 has quit [Quit: Leaving]
<ruby[bot]> ciscam: # => [")", "word", "{", "abbr.eviation.", ")", ")"] (https://eval.in/946416)
venmx has quit [Ping timeout: 246 seconds]
schneide_ has joined #ruby
<ciscam> yessss! you're very helpful, thanks for the advice. I've been on this for hours with no end in sight<3
<adaedra> you're welcome
<adaedra> for Ruby specific regexps, you can also play with http://rubular.com/ , but it's less visual
alfiemax has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
<ciscam> thanks, will do
<resnik> How do I get path of binary exts installation dir(via rubygems)?
marxarelli has joined #ruby
<adaedra> what are you looking for, exact paths to binary extensions? for a specific gem? just the path, or a way to get the file from Ruby?
conceivably has joined #ruby
<resnik> approx. Gem.dir + extensions/$arch/2.4.0-static/$gem-$gem_version/
mikecmpbll has joined #ruby
schneide_ has quit [Ping timeout: 268 seconds]
<resnik> I can get the file by a simple find, but there should be some what to craft that path precisely.
<resnik> some *way
<adaedra> If you're from the context of the gem you're looking the extension for, you can probably craft the path from __dir__
<adaedra> Otherwise I don't know, didn't really go this way in Ruby
alfiemax has joined #ruby
clemens3 has quit [Ping timeout: 265 seconds]
dumblonde has quit [Quit: Leaving]
ElianasBigToe has quit [Quit: Leaving]
<resnik> I see rubygem code is probing that location when looking for a gem, allegedly tyring to load a binary ext, so there should be some code that crafts it.
Mike11 has joined #ruby
nc_ has joined #ruby
claudiuinberlin has joined #ruby
ldv__ has joined #ruby
ldv__ has quit [Remote host closed the connection]
venmx has quit [Ping timeout: 268 seconds]
eckhardt has joined #ruby
<resnik> File.join(Gem.dir, 'extensions', Gem::Platform.local.to_s, Gem.extension_api_version)
Lyubo1 has quit [Ping timeout: 248 seconds]
schneide_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
jtdoncas_ has joined #ruby
ldv has quit [Quit: ldv]
elphe has joined #ruby
schneide_ has quit [Ping timeout: 240 seconds]
za1b1tsu has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
x77686d has quit [Quit: x77686d]
elphe has quit [Ping timeout: 240 seconds]
schneide_ has joined #ruby
aguestuser has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 248 seconds]
aguestuser has joined #ruby
kith has quit [Ping timeout: 260 seconds]
schneide_ has quit [Ping timeout: 240 seconds]
<guardian> hello, I have a beginner question please: given a method that returns 2 values, how can I ignore the second one?
<havenwood> guardian: return_value.first
<apeiros> val1, _ = *your_method
<apeiros> or even: val1, * = *your_method
<guardian> ok thanks
<apeiros> also technically a method can't return multiple values. it returns an array.
<guardian> I see
<guardian> thanks
karapetyan has joined #ruby
<guardian> out of curiosity, is it possible to define a method in an erb template?
aintno_sunshine has quit [Quit: Ping timeout (120 seconds)]
<apeiros> because erb does not restrict the ruby code you write in it in any way
clemens3 has joined #ruby
Lyubo1 has joined #ruby
aguestuser has quit [Remote host closed the connection]
<Success> so triggered
aguestuser has joined #ruby
<Success> uru said it's bad to have a system ruby; but to build it it needs a system ruby
<Success> and they offer no bootstrap
karapetyan has quit [Ping timeout: 240 seconds]
venmx has joined #ruby
hahuang65 has joined #ruby
bmurt has quit [Ping timeout: 268 seconds]
sameerynho has joined #ruby
ltt has joined #ruby
ltt is now known as group
group is now known as avocadotoast
nowhere_man has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman_ has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Lyubo1 has quit [Ping timeout: 252 seconds]
resnik has quit [Quit: Leaving]
avocadotoast has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Success has quit [Read error: Connection reset by peer]
LocaMocha has quit [Ping timeout: 240 seconds]
ltt has joined #ruby
rrichardsr3 has joined #ruby
Success has joined #ruby
Oclairi has joined #ruby
jtdoncas_ has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
Lyubo1 has joined #ruby
hahuang61 has joined #ruby
cdg has quit [Remote host closed the connection]
x77686d has joined #ruby
<baweaver> Success: ???
<Success> nvm i got it
goatish has quit [Quit: Hibernating]
drcode has joined #ruby
tvw has quit [Remote host closed the connection]
hahuang65 has quit [Quit: WeeChat 2.0.1]
drcode has quit [Ping timeout: 240 seconds]
pastorinni has quit [Remote host closed the connection]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Vapez has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
karapetyan has joined #ruby
aguestuser has quit [Ping timeout: 255 seconds]
<ruby[bot]> kapil___: as I told you already, please use https://gist.github.com
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
aguestuser has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Doow> Hope this is asked too often..., but why do you insist on https://gist.github.com over other pastebins?
<Doow> not asked to often*
mtkd has joined #ruby
nc_ has quit [Remote host closed the connection]
<baweaver> They tend to have ads
<baweaver> Some of which do malicious things and not everyone has a blocker on
<adaedra> some are just slow or have terrible formatting
<baweaver> kapil___: What's the real code?
<baweaver> you can't get a variable before it exists
naftilos76 has quit [Quit: Αποχώρησε]
vutral|kali has quit [Ping timeout: 268 seconds]
mjolnird has quit [Remote host closed the connection]
<kapil___> gist updated
x77686d has quit [Quit: x77686d]
mjolnird has joined #ruby
FrostCandy has joined #ruby
jenrzzz has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
alex`` has joined #ruby
justicefries has joined #ruby
x77686d has joined #ruby
aintno_sunshine has joined #ruby
jordanm has quit [Remote host closed the connection]
vutral|kali has quit [Ping timeout: 240 seconds]
Vapez has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<kapil___> please reply i must have to do this
randomstrangerb has quit [Ping timeout: 248 seconds]
randomstrangerb has joined #ruby
ur5us has joined #ruby
aintno_sunshine has quit [Remote host closed the connection]
<adaedra> You never called `a_method`, so @a and @b are never set
<adaedra> maybe you're wishing to make an initializer?
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
<adaedra> also, just passing through, for best results when asking a question, provide a real code example, an example of expected and actual results, and be patient as people are not always behind their computer
<kapil___> gist updated
matz_no_I_wish has joined #ruby
matz_no_I_wish has left #ruby [#ruby]
vutral|kali has quit [Ping timeout: 260 seconds]
matz_no_I_wish has joined #ruby
matz_no_I_wish has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 248 seconds]
<adaedra> yeah, please make it a real, runnable example which does something when executed.
Vapez has quit [Read error: Connection reset by peer]
<adaedra> ah, got reupdated
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<adaedra> so you have two instances here, one where you call `a_method` on it, so it will have @a and @b, and one where you don't, so you don't have instance variables
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra> @variables are not shared between different instances
jenrzzz has joined #ruby
<kapil___> do i use @@
<adaedra> no, avoid that
<adaedra> i feel like you're just throwing things at random until it works instead of understanding what is happening here
<adaedra> can you explain the code you wrote here?
Slinky_Pete has joined #ruby
<kapil___> whats the solution? i have 15 instance variables . the ParentClass has only one object. I am making a rails generator. its so big so i have to write some code in its own class
<Slinky_Pete> question about rspec, in my spec_helper.rb i set config.order = :random but even after it still always runs in order and produces no seed data
<adaedra> kapil___: the solution is to step back and try to understand what you're doing here
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
vutral|kali has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
goatish has joined #ruby
ltt has joined #ruby
<kapil___> adaedra: I am setting some global setting variables when first time generator run. and use it in all methods and want to use in subclasses
<adaedra> kapil___: here it seems that you're confused about classes, instances, and @variables. Maybe look again about these?
rrichardsr3 has joined #ruby
ePolice has joined #ruby
ePolice has left #ruby [#ruby]
<kapil___> adaedra: sure. thanks
<sparr> if $versionlocks {clabs::template { '/etc/yum/pluginconf.d/versionlock.list': } }
ldv has joined #ruby
x77686d has quit [Quit: x77686d]
<sparr> I have that code. It works. I want to insert before the template call a call to notify{} similar to the `notify{"The value is: ${yourvar}": }` except that I want to see the nicely formatted $versionlocks.inspect
<sparr> I cannot figure out the appropriate syntax :/
venmx has quit [Ping timeout: 252 seconds]
<adaedra> tbf that syntax looks already incorrect. What is this from?
<adaedra> ah, puppet
<adaedra> ?puppet
<ruby[bot]> Please join #puppet for help with it.
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
alfiemax has joined #ruby
jenrzzz has joined #ruby
<sparr> thanks
ldv has quit [Remote host closed the connection]
ldv has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
roshanavand has quit [Read error: No route to host]
jaequery has joined #ruby
roshanavand has joined #ruby
<Slinky_Pete> question about rspec, in my spec_helper.rb i set config.order = :random but even after it still always runs in order and produces no seed data
plujon has joined #ruby
venmx has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
vutral|kali has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
marxarelli has quit [Ping timeout: 255 seconds]
elphe has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Psybur_ has quit [Ping timeout: 265 seconds]
knight33 has joined #ruby
vutral|kali has quit [Ping timeout: 248 seconds]
x77686d has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
dionysus69 has quit [Ping timeout: 268 seconds]
guacamole has quit [Client Quit]
ltt has quit [Quit: Textual IRC Client: www.textualapp.com]
ldv has quit [Remote host closed the connection]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
elphe has quit [Ping timeout: 248 seconds]
ldv has joined #ruby
Guest29 has joined #ruby
desperek has joined #ruby
vutral|kali has quit [Ping timeout: 256 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Guest65222 has quit [Ping timeout: 252 seconds]
Guest29 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
<Mike11> hello all :)
cek has quit [Quit: Connection closed for inactivity]
<Mike11> I am using bundler to create a gem, by default it creates a Rakefile that contains "task :default => :spec" . I don't know what does that actually mean
<Mike11> but rubocop complains about it using the old hash syntax
<lupine> it means when you run `rake` with no arguments, it will run the specs for you
<lupine> you can change it to `task default: :spec` or remove it entirely
<Mike11> lupine: so, is task a Hash?
<lupine> no, task is a method that takes a hash
<lupine> rake messes with the toplevel namespace quite horribly
<Mike11> if it was a method, shouldn't it be written like task {:default => :spec}
<Mike11> >
<Mike11> ?*
jenrzzz has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
drcode has joined #ruby
Tristan-Speccy has joined #ruby
<Mike11> lupine: or is okay to omit braces in this case?
knight33 has quit [Ping timeout: 240 seconds]
drcode has quit [Remote host closed the connection]
Tristan-Speccy is now known as Guest70560
<baweaver> Mike11: task default: :spec
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
drcode has joined #ruby
<lupine> you can omit the parens and the braces
<lupine> it could be send(:task, {:default => :spec})
<Mike11> lupine: thank you very much, that was really helpful :)
<lupine> ruby doesn't care much :)
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
schneide_ has joined #ruby
Mike11 has quit [Ping timeout: 240 seconds]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
pastorinni has joined #ruby
elphe has joined #ruby
pastorinni has quit [Remote host closed the connection]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jeffreylevesque has joined #ruby
nowhere_man has joined #ruby
jeffreylevesque_ has quit [Ping timeout: 256 seconds]
guacamole has quit [Client Quit]
nowhereman_ has quit [Ping timeout: 256 seconds]
<Doow> What does IO.select() actually return? From the documentation it seems to be the streams that are actually readable. But when I try it, it seems to be something else.
Slinky_Pete has quit []
karapetyan has quit [Remote host closed the connection]
hujduralen has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
hujduralen has left #ruby [#ruby]
karapetyan has joined #ruby
chouhoulis has quit []
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
sameerynho has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
guacamole has quit [Client Quit]
pastorin_ has joined #ruby
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
x77686d has quit [Quit: x77686d]
milardovich has joined #ruby
knight33 has joined #ruby
vichib has joined #ruby
Liothen has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
Liothen has quit [Client Quit]
mtkd has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
chouhoulis has joined #ruby
mrBen2k2k2k has quit [Ping timeout: 256 seconds]
synthroid has quit []
Oclairi has quit [Quit: Bye Bye]
ltt has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
chouhoul_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has joined #ruby
x77686d has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
cdg has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
lele has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 264 seconds]
vutral|kali has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
chouhoul_ has quit [Ping timeout: 265 seconds]
x77686d_ has joined #ruby
schneide_ has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 265 seconds]
x77686d has quit [Ping timeout: 265 seconds]
x77686d_ is now known as x77686d
lele has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Psybur has joined #ruby
Psybur has joined #ruby
Psybur has quit [Changing host]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeffreylevesque has quit [Ping timeout: 256 seconds]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
ltt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtdoncas_ has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
desperek has quit [Quit: xoxo]
knight33 has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
jaequery has quit [Client Quit]
dogweather has quit []
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Failure has joined #ruby
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
Failure has quit [Max SendQ exceeded]
Failure has joined #ruby
Failure has quit [Max SendQ exceeded]
Success has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
gothicsouth has joined #ruby
mikecmpbll has joined #ruby
jenrzzz has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<guardian> what's an elegant way of doing: condition && "foo" || nil ?
Press10 has quit [Remote host closed the connection]
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
drewmcmillan has joined #ruby
<llua> condition ? 'foo' : nil
jenrzzz has quit [Ping timeout: 268 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
vutral|kali has quit [Ping timeout: 265 seconds]
<guardian> indeed thanks :)
<baweaver> guardian: either that or omit the || nil
<baweaver> >> false && 'foo'
<ruby[bot]> baweaver: # => false (https://eval.in/946657)
<baweaver> ah, thought that'd nil
* baweaver needs coffee
cadillac_ has quit [Read error: Connection reset by peer]
schneide_ has joined #ruby
dencarlsson has joined #ruby
dencarlsson has quit [Client Quit]
jeffreylevesque has joined #ruby
shinnya has joined #ruby
alex`` has quit [Ping timeout: 240 seconds]
sanscoeu_ has joined #ruby
oleo has quit [Ping timeout: 265 seconds]
alex`` has joined #ruby
cadillac_ has joined #ruby
schneide_ has quit [Ping timeout: 248 seconds]
eckhardt has joined #ruby
sanscoeur has quit [Ping timeout: 248 seconds]
sanscoeu_ has quit [Ping timeout: 240 seconds]
ruby[bot] has joined #ruby
jenrzzz has joined #ruby
QualityAddict has quit [Quit: Leaving]
amatas has quit [Quit: amatas]
FrostCandy has quit []
tcopeland has quit [Quit: tcopeland]
John_Ivan has quit [Read error: Connection reset by peer]
schneide_ has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ltt has joined #ruby
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ldv has quit [Quit: ldv]
cdg_ has joined #ruby
schneide_ has quit [Ping timeout: 256 seconds]
raynold has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has left #ruby ["Textual IRC Client: www.textualapp.com"]
nowhere_man has joined #ruby
schneide_ has joined #ruby
jtdoncas_ has quit [Ping timeout: 256 seconds]
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
schneide_ has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
<sparr> How can foo.class be "Hash" while foo.is_a?(Hash) is false?
shinnya has quit [Ping timeout: 240 seconds]
<baweaver> "Returns true if class is the class of obj, or if class is one of the superclasses of obj or modules included in obj."
<baweaver> probably that superclass bit
<sparr> the first part is true... isn't it?
<baweaver> Well what is foo?
Psybur has quit [Remote host closed the connection]
Psybur has joined #ruby
schneide_ has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aintno_sunshine has joined #ruby
<apeiros> sparr: couple of reasons
<apeiros> >> x = ""; def x.class; Hash; end; [x.class, x.is_a?(Hash)]
<ruby[bot]> apeiros: # => [Hash, false] (https://eval.in/946679)
<apeiros> f.ex.
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
<apeiros> (e.g. in badly implemented proxy/delegate patterns)
mikecmpbll has quit [Quit: inabit. zz.]
schneide_ has quit [Ping timeout: 240 seconds]
<apeiros> also namespacing:
<apeiros> >> module X; class Hash; end; def self.x; a = ::Hash.new; [a.class, a.is_a?(Hash)]; end; end; X.x
<ruby[bot]> apeiros: # => [Hash, false] (https://eval.in/946680)
* apeiros afk
drewmcmillan has joined #ruby
x77686d_ has joined #ruby
Fusselgesicht has quit [Quit: leaving]
guacamole has quit [Client Quit]
x77686d has quit [Ping timeout: 265 seconds]
x77686d_ is now known as x77686d
alex`` has quit [Quit: WeeChat 1.9]
mtkd has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
jtdoncas_ has joined #ruby
mtkd has joined #ruby
x77686d has quit [Quit: x77686d]
<sparr> baweaver: I think foo is a hash
alfiemax has joined #ruby
<sparr> foo.inspect and foo.to_json both look like it's a hash
<nchambers> https://asciinema.org/a/97qVms1535dLdijbidiit7DDX what is the &: doing here, and what is it called?
<baweaver> you think or you know?
<sparr> foo.class is Hash
<baweaver> Looks like and is a are very different things
<sparr> every indication is that it's a hash... except foo.is_a?(Hash)
<sparr> the function that's producing foo is supposed to return a hash
<baweaver> nchambers: symbol to proc
<nchambers> thanks
<nchambers> that makes sense
<baweaver> & :symbol => :symbol.to_proc => Proc.new { |obj| obj.public_send(symbol) }
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nchambers> yeah a buddy of mine just explained it to me in another channel as well