havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: 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
alveric has quit [Ping timeout: 240 seconds]
nankyokusei has joined #ruby
jrafanie has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
patr0clus has quit [Quit: tempusfugit]
ascarter has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Client Quit]
blackmesa has quit [Ping timeout: 268 seconds]
postmodern has quit [Remote host closed the connection]
postmodern has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
itarato has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
itarato has quit [Client Quit]
itarato has joined #ruby
charliesome has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
hndk has quit [Quit: Leaving]
swills has quit [Ping timeout: 272 seconds]
swills has joined #ruby
jrafanie has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BillyTheKid has joined #ruby
gusrub has quit [Remote host closed the connection]
nitric has quit [Ping timeout: 240 seconds]
jusa has joined #ruby
BillyTheKid has quit [Read error: Connection reset by peer]
brent__ has quit [Remote host closed the connection]
DLSteve has joined #ruby
jusa has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Lucky_ABA has joined #ruby
cam27 has quit [Quit: cam27]
Trynemjoel has quit [Ping timeout: 245 seconds]
Trynemjoel has joined #ruby
dviola has joined #ruby
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
chouhoulis has joined #ruby
spheric has quit [Remote host closed the connection]
apparition has joined #ruby
pifon has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
t-recx has quit [Quit: t-recx]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
Trynemjoel has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
JeanCarloMachado has joined #ruby
skweek has joined #ruby
raspado has quit [Remote host closed the connection]
raspado has joined #ruby
gusrub has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
mentok has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xiani has joined #ruby
xiani has quit [Client Quit]
milardovich has quit [Remote host closed the connection]
ur5us_ has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
gothicsouth has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
Trynemjoel has joined #ruby
JeanCarl1Machado has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
raul782 has joined #ruby
jrafanie has joined #ruby
raul782 has quit [Ping timeout: 246 seconds]
mim1k has joined #ruby
newbs has joined #ruby
<newbs> Hello. What is samba?
mim1k has quit [Ping timeout: 240 seconds]
<michael_mbp> hi all how can I open a Tempfile in binmode as a block?
<michael_mbp> from what I've seen it's a case of Tempfil.new(..).binmode
KeyJoo has joined #ruby
raul782 has joined #ruby
milardovich has quit []
spheric has joined #ruby
pb122-two has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
mikecmpbll has quit [Quit: inabit. zz.]
raul782 has quit []
pb122 has quit [Ping timeout: 268 seconds]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
GinoMan has quit [Quit: Leaving]
bruno-_ has quit [Ping timeout: 246 seconds]
gothicsouth has joined #ruby
raul782 has joined #ruby
d^sh has quit [Ping timeout: 260 seconds]
d^sh has joined #ruby
milardovich has joined #ruby
nankyokusei has joined #ruby
hahuang65 has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
JeanCarl1Machado has quit [Ping timeout: 246 seconds]
JeanCarl1Machado has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.5]
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
genpaku has quit [Remote host closed the connection]
genpaku has joined #ruby
jameser has joined #ruby
jhack has quit [Quit: Leaving]
raspado has quit [Remote host closed the connection]
raspado has joined #ruby
raspado has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
jusa has joined #ruby
perniciouscaffei has joined #ruby
<havenwood> newbs: It's not Ruby-related so it's offtopic for this channel. See: https://orktes.github.io/atom-react/
<havenwood> newbs: Oops, wrong link, see: https://github.com/samba-team/samba
jusa has quit [Ping timeout: 240 seconds]
raul782 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
<havenwood> >> Tempfile.create { |file| file.binmode; file.binmode? } # michael_mbp
<ruby[bot]> havenwood: # => uninitialized constant Tempfile (NameError) ...check link for more (https://eval.in/795870)
<havenwood> #=> true
<havenwood> (if i remembered to require it)
<havenwood> and if the bot was 2.4
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
xall has joined #ruby
<havenwood> michael_mbp: you can also bas :binmode option on create
<havenwood> pass*
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
<havenwood> michael_mbp: Tempfile.create(binmode: true) { |file| file.binmode? } #=> true
hahuang65 has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
JeanCarl1Machado has joined #ruby
<havenwood> michael_mbp: See options from IO::new: https://ruby-doc.org/core/IO.html#method-c-new
gnufied has quit [Quit: Leaving]
TechMonger has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Tempesta has quit [Quit: See ya!]
agent_white has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
spiette_ has quit [Ping timeout: 260 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
tgragnato has quit [Quit: Sto andando via]
JeanCarl1Machado has quit [Ping timeout: 268 seconds]
JeanCarl1Machado has joined #ruby
JeanCarloMachado has quit [Ping timeout: 246 seconds]
hndk has joined #ruby
itarato has joined #ruby
JeanCarloMachado has joined #ruby
raul782 has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
JeanCarl1Machado has joined #ruby
raul782 has quit [Client Quit]
jenrzzz has joined #ruby
apparition has quit [Quit: Bye]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
JeanCarloMachado has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Tempesta has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
brent__ has joined #ruby
claw has quit [Ping timeout: 245 seconds]
apparition has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
nickjj_ has joined #ruby
brent__ has quit [Ping timeout: 268 seconds]
KeyJoo has quit [Remote host closed the connection]
nickjj has quit [Ping timeout: 255 seconds]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
perniciouscaffei has joined #ruby
gix has quit [Ping timeout: 240 seconds]
claw has joined #ruby
gix has joined #ruby
hndk has quit [Quit: Leaving]
gothicsouth has joined #ruby
nankyokusei has joined #ruby
newbz has joined #ruby
newbz has quit [Client Quit]
jenrzzz has joined #ruby
raul782 has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
newbs has quit [Ping timeout: 272 seconds]
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bipul has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
perniciouscaffei has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
dviola has quit [Quit: WeeChat 1.8]
hahuang65 has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
brent__ has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
auzty has joined #ruby
renchan has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cyphase has quit [Ping timeout: 240 seconds]
cyphase has joined #ruby
perniciouscaffei has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
cfec0b8d has joined #ruby
apparition has joined #ruby
brent__ has quit [Remote host closed the connection]
apparition has quit [Ping timeout: 246 seconds]
Seenox has quit [Ping timeout: 260 seconds]
AnoHito_ has joined #ruby
JoshS has quit [Read error: Connection reset by peer]
JoshS has joined #ruby
AnoHito has quit [Ping timeout: 240 seconds]
borodin has quit [Ping timeout: 246 seconds]
AnoHito has joined #ruby
apparition has joined #ruby
tildes has joined #ruby
igniting has quit [Ping timeout: 240 seconds]
AnoHito_ has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
redaudit has quit [Quit: Cya]
quobo has quit [Quit: Connection closed for inactivity]
rkazak has quit [Quit: Sleep.....ing....]
hahuang65 has joined #ruby
anisha has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Ping timeout: 240 seconds]
TechMonger has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
xall has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
tildes has quit [Ping timeout: 268 seconds]
oleo has quit [Quit: irc client terminated!]
Cohedrin has joined #ruby
tildes has joined #ruby
grymmjack has quit [Remote host closed the connection]
igniting has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
timredd has joined #ruby
timredd has quit [Client Quit]
dionysus69 has joined #ruby
Bock has joined #ruby
Bock has quit [Max SendQ exceeded]
Bock has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.7.1]
nankyokusei has joined #ruby
DeeJayh has joined #ruby
bigkevmcd has quit [Ping timeout: 240 seconds]
<DeeJayh> What's the best way to do multiple things in ruby at the same time. Example, I have a class named game. Then I have classes that inherit that with specific names like bingo and roullette. Now I want to run both together. As in, I don't want to do bingo and then roulette, I want them to run side by side at the same time so those enjoying one don't have to wait on the other to finish.
p0p0pr37_ has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
tildes has quit [Ping timeout: 260 seconds]
PaulCape_ has joined #ruby
<foxmask> bonjello
nankyokusei has quit [Ping timeout: 255 seconds]
<DeeJayh> ?
bigkevmcd has joined #ruby
PaulCapestany has quit [Ping timeout: 255 seconds]
p0p0pr37 has quit [Ping timeout: 272 seconds]
p0p0pr37_ is now known as p0p0pr37
aufi has joined #ruby
al2o3-cr has joined #ruby
Mortomes|Work has joined #ruby
<eam> DeeJayh: you can use a thread
<DeeJayh> Specifically, for clients connecting to a server. This server will accept connections, but also run the games and send the results to the currently connected clients
<DeeJayh> if I try to setup the client connections, even in a thread, it sits and waits for a client to connect before running the rest of the program
<DeeJayh> I guess I could just set up the calls to the classes to make the games start running in threads first, and then wait for connections from clients... would make sense
<DeeJayh> just thought maybe there would be a better way to do this
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<eam> there are frameworks for this sort of thing
<eam> you can also use separate processes per-connection
raspado has joined #ruby
bambanx has joined #ruby
djbkd_ has joined #ruby
blackwind_123 has quit [Quit: ASCII a stupid question, get a stupid ANSI!]
raspado has quit [Ping timeout: 240 seconds]
Seenox has joined #ruby
Burgestrand has joined #ruby
conta has joined #ruby
ta_ has quit [Remote host closed the connection]
vuoto has joined #ruby
Hunter1 has quit [Remote host closed the connection]
conta has quit [Remote host closed the connection]
Hunter1 has joined #ruby
conta has joined #ruby
vuoto has quit [Client Quit]
vuoto has joined #ruby
vuoto has quit [Client Quit]
vuoto has joined #ruby
somerandomteen has joined #ruby
minimalism has quit [Quit: minimalism]
<Seenox> Hello. I am trying to use json.parse and json.dump but I think I am stuck... Can someone please check this for me and tell me what I am doing wrong? Thanks => https://gist.github.com/anonymous/61cd20b063d57dd5c04a70ae3b5affc7
<Burgestrand> Seenox JSON.dump("#{body}") ===> JSON.dump(body)
<Burgestrand> Seenox when you do "#{body}", Ruby will do (kind of): "" + body.to_s + "", which takes whatever is inside body and turns it into a string representation
<Seenox> Burgestrand: It worked! Thanks for the explanation.
<Burgestrand> Seenox doing JSON.dump("some string representation of body") is not really what you want :)
blackmesa has joined #ruby
<Seenox> Now I know why it used to convert my hash to string...
<Burgestrand> Yup :)
bipul has quit [Ping timeout: 240 seconds]
<Seenox> Burgestrand: Thank you. One more quick question regarding this: Is it also the same for other functions? For example: puts #{body} vs. puts body?
jenrzzz has quit [Ping timeout: 268 seconds]
bambanx has quit [Quit: Leaving]
<Burgestrand> Seenox so the case with "something #{body} something else}", Ruby will always convert `body` in there to a string using the method #to_s on body
<Burgestrand> Seenox in the case with a string, doing "some string".to_s just returns the same string, since it's always a string
<Burgestrand> Seenox and I think (not sure) the case with puts, is that it'll call #to_s whatever you give it
<Burgestrand> Seenox et voila: https://eval.in/795955
<Seenox> Burgestrand: No matter if it's a hash or array or object or anything else?
<Burgestrand> Seenox yep
<Burgestrand> Seenox if you want to see some more structure, I recommend using `p` instead of `print`, it'll call #inspect instead of #to_s, and #inspect typically gives more debug-friendly output
<Seenox> Burgestrand: https://eval.in/795957 ?
<Burgestrand> Seenox yep
<Seenox> Burgestrand: Thanks a lot as always you're so helpful with great explanations.
Burgestrand has quit [Quit: Closing time!]
user128 has joined #ruby
<user128> hi, on the https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/57660 page, I don't see the diff / code changes. where can I see the actual code change for a particular svn revision?
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jamesaxl has quit [Read error: Connection reset by peer]
<herwin> there are `diff' links in the files-tree
<herwin> or use the link `view differences' to see the complete commit
jamesaxl has joined #ruby
user128__ has joined #ruby
user128__ is now known as user128_
paradisaeidae__ has joined #ruby
paradisaeidae___ has joined #ruby
<user128_> herwin, clicking "view differences" takes me to a login screen. I will find the commit on github; should be easier.
paradisaeidae has quit [Ping timeout: 240 seconds]
paradisaeidae__ is now known as paradisaeidae
selim has joined #ruby
<selim> good morning
<selim> can someone tell me how I can instruct gem to prevent searching for sources online?
paradisaeidae_ has quit [Ping timeout: 268 seconds]
djbkd_ has quit [Remote host closed the connection]
<selim> if I do the gem install -l/--local ./gem.file.gem I still get a timeout and afterwards this message
<selim> ERROR: Could not find a valid gem 'chef-ruby-lvm-attrib' (~> 0.0.28), here is why:
user128 has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
cschneid_ has joined #ruby
mark_66 has joined #ruby
rgr has joined #ruby
vuoto has quit [Remote host closed the connection]
cevett has quit [Read error: Connection reset by peer]
Burgestrand has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 240 seconds]
Vingador has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
xall has joined #ruby
stoffus has joined #ruby
raul782 has quit [Remote host closed the connection]
gothicsouth has joined #ruby
ur5us has joined #ruby
raul782 has joined #ruby
raul782 has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 240 seconds]
^jud has joined #ruby
blackmesa has joined #ruby
jud^ has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
Aloy has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504175505]]
paradisaeidae___ has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504175505]]
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
im0nde has joined #ruby
Luna_Moonfang is now known as Aloy
sonicmagister has joined #ruby
mikecmpbll has joined #ruby
nankyokusei has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
otherj has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
Dimik has quit [Ping timeout: 246 seconds]
TreyG_ has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
quobo has joined #ruby
<DaniG2k> hello all. I am trying to set up Cancancan abilities with a namespaced controller.
nankyokusei has quit [Ping timeout: 272 seconds]
<DaniG2k> any help much appreciated!
Silthias has joined #ruby
faces has joined #ruby
<ljarvis> DaniG2k: pretty sure that's not how cancancan works. You don't specify particular controllers or actions. You just say `can :manage, :listings` and then whenever you want to check, you just do `user.can?(:manage, :listings)` in your controller/views
<ljarvis> or maybe add to `authorize_resource`
<ljarvis> ah right maybe it doesn't work like that anymore.. hmm
<ljarvis> cancancan is weird
tvw has joined #ruby
<DaniG2k> it is :/
<DaniG2k> wish I could use Pundit instead hehe
<ljarvis> why can't you?
ur5us has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user128_ has quit [Quit: Leaving]
jaruga has joined #ruby
lipoqil has joined #ruby
<DaniG2k> cause this project is already using Cancancan. Working on it with a team of fools
<DaniG2k> help haha
marr has joined #ruby
<DaniG2k> nah it's ok
<DaniG2k> will figure it out
blackmesa has quit [Ping timeout: 240 seconds]
enterprisey has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Beams has joined #ruby
DaniG2k has quit [Quit: leaving]
rgr has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
MrBusiness3 has joined #ruby
TreyG has joined #ruby
MrBismuth has quit [Ping timeout: 246 seconds]
xall has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
Surver has joined #ruby
<Surver> Hi
xall has joined #ruby
User458764 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
xall has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
otherj has quit [Quit: .]
rgr has joined #ruby
Surver has quit [Quit: Leaving...]
xall has joined #ruby
leitz has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
sonic_m has joined #ruby
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
romank has joined #ruby
sonicmagister has quit [Ping timeout: 260 seconds]
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
sonicmagister has joined #ruby
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
sonic_m has quit [Ping timeout: 246 seconds]
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
sonic_m has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
sonicmagister has quit [Ping timeout: 260 seconds]
aupadhye has joined #ruby
sonicmagister has joined #ruby
Kug3lis has joined #ruby
sonic_m has quit [Ping timeout: 240 seconds]
CrazyEddy has joined #ruby
biberu has joined #ruby
<zenspider> rawr
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
<ljarvis> go to bed it's late
<zenspider> selim: that "here is why" part seems important
<zenspider> ljarvis: it's only 2am
<ljarvis> so it's.. early?
<zenspider> I have 1-3 hours left. :)
somerandomteen has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<ljarvis> I can't remember the last time i stayed up that late.. I used to love it, not so much nowadays
rgr has quit [Remote host closed the connection]
mim1k has joined #ruby
rgr has joined #ruby
<zenspider> it's just the way I'm wired
<DeeJayh> Why, when I call a thread, does my program not advance until the thread is completed? Even in JRuby... so frustrating.
rgr has quit [Remote host closed the connection]
<DeeJayh> Is the point of threads not concurrency...
rgr has joined #ruby
<ljarvis> DeeJayh: what do you mean when you call it?
lxsameer has joined #ruby
ferr has joined #ruby
rgr has quit [Remote host closed the connection]
<ljarvis> DeeJayh: what's happening vs what you expect? I would expect that problem to exit almost immediately due to the main thread exiting
<ljarvis> program*
rgr has joined #ruby
<DeeJayh> ok so add a loop{} on the end of it
<DeeJayh> actually forget the loop
<DeeJayh> you're right
workmad3 has joined #ruby
<DeeJayh> I'd expect it to end
<DeeJayh> but it doesnt
<DeeJayh> it just keeps looping inside roulette
<ljarvis> the program that you pasted in its entirety does not end?
xall has quit [Ping timeout: 240 seconds]
<ljarvis> also, your program should cause a stack level error
<DeeJayh> no
<ljarvis> you can't do what you're doing
<DeeJayh> I've updated it as shown in the gist
jenrzzz has joined #ruby
<DeeJayh> if you refresh the page
<DeeJayh> and it just does betting1roll1betting1roll1 infinitely
<ljarvis> it exits immediately because there's nothing blocking the main thread. What Ruby version and OS are you on?
<DeeJayh> that's the problem the rest of the main thread is never called! it gets stuck on roulette infinitely, Thread.new { crash.betting } never gets called, the main thread never exits
<DeeJayh> version is irrelevent, I tried ruby 2.3.3, jruby (mine uses 2.3.1) both on windows
<ljarvis> right, hence me asking what Ruby version and OS you're on, because that's not the behaviour I would expect
<DeeJayh> see, what you're saying it should do, is what I EXPECT it to do
<DeeJayh> but it isnt...
<DeeJayh> repl.it does the same thing
nemish- has quit [Ping timeout: 240 seconds]
sonicmagister has quit [Ping timeout: 260 seconds]
<DeeJayh> it uses 2.3.1p112
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
sonicmagister has joined #ruby
<ljarvis> Thread.new on repl.it does not block the main thread..
<DeeJayh> I'm seeing this now with my new test
<DeeJayh> that's how it's supposed to work right?
rgr has quit [Remote host closed the connection]
<DeeJayh> Threads are non-blocking
rgr has joined #ruby
<ljarvis> yes
xall has joined #ruby
<DeeJayh> one thing is, it seems like the roulette thread eventually dies on it's own on REPL
jenrzzz has quit [Ping timeout: 272 seconds]
<DeeJayh> if you run that in repl.it, the roll1betting1 will eventually die out and it will just print TEST every 5 seconds
nowhere_man has joined #ruby
<DeeJayh> also, why does it never print the crash? there's never any roll2 or betting 2
<ljarvis> DeeJayh: as I mentioned, there's a stack level error in your code. set
<ljarvis> Thread.abort_on_exception = true
<ljarvis> to see it
nadir has quit [Quit: Connection closed for inactivity]
<DeeJayh> I'm afraid I don't understand how to implement that, let me search google
<ljarvis> DeeJayh: just add Thread.abort_on_exception = true to the top of your script
jenrzzz has joined #ruby
<DeeJayh> stack level too deep
<ljarvis> correct
<ljarvis> >> class A; def foo; bar; end; def bar; foo; end; end; A.new.foo
<ruby[bot]> ljarvis: # => stack level too deep (SystemStackError) ...check link for more (https://eval.in/796349)
<ljarvis> you can't do that
xall has quit [Ping timeout: 258 seconds]
<DeeJayh> ok so you cannot use method calls to create an infinite thread is what that's telling me
<DeeJayh> cant call b from a then a from b etc etc
rgr has quit [Remote host closed the connection]
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
rgr has joined #ruby
<ljarvis> you'd need to use a loop
<DeeJayh> what about Thread.new { loop { roulette.betting } }
<ljarvis> loop { foo; bar; }
<ljarvis> right
<DeeJayh> can I JUST call betting, then have betting call roll, then when there's no instructions left in roll the thread will just die on it's own?
rgr has quit [Remote host closed the connection]
<DeeJayh> or rather start over, because of the loop?
SaschaVoid has joined #ruby
rgr has joined #ruby
<DeeJayh> well I guess there's one way to find out lol
ferr has quit [Quit: WeeChat 1.7]
<DeeJayh> thank you for the assistance
cfec0b8d has quit [Quit: Leaving]
<ljarvis> yes, the stack level won't be insane in that case (infinite in your prev example)
<DeeJayh> going to play around with it, I'll come back if I'm too dense to comprehend it
<DeeJayh> ljarvis, thank you very much
<ljarvis> no worries, have fun
flying has joined #ruby
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
rikkipitt has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<DeeJayh> Yup, nailed it, my journey continues!
ferr has joined #ruby
User458764 has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
<DeeJayh> does anyone know why jruby refuses to take a range for a random number?
<DeeJayh> In regular ruby I can do SecureRandom.random_number(50..100)In regular ruby I can do SecureRandom.random_number(50..100)
<DeeJayh> but in JRuby it throws an error stating I'm using a Range for a fixnum
rgr has quit [Remote host closed the connection]
rgr has joined #ruby
<ljarvis> DeeJayh: current jruby targets an older version of ruby, perhaps old enough that random_number did not accept a range
<ljarvis> ah right, latest targets 2.3, so maybe it's a bug. I'm not sure
<DeeJayh> jruby uses 2.3.1 if I'm not mistaken, repl.it, too, uses 2.3.1 and it works fine.
<DeeJayh> Probably a bug
<ljarvis> headius: ^
<DeeJayh> any alternative tricky way beat it for now?
<DeeJayh> I'm stumped :(
mim1k has quit [Ping timeout: 260 seconds]
<ljarvis> DeeJayh: write your own implementation based on https://github.com/jruby/jruby/blob/master/lib/ruby/stdlib/securerandom.rb#L147
<DeeJayh> I should probably also open an issue there then while I'm at it
<DeeJayh> About the bug
psychicist__ has joined #ruby
<ljarvis> yes I think that'd be helpful to the jruby folks
mim1k has joined #ruby
Mortomes|Work has joined #ruby
ur5us has quit [Remote host closed the connection]
rgr has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<DeeJayh> yup I just compared it against the stdlib/securerandom copy included in my current version of ruby and I see exactly what is missing. I'll fork it, fix it, and submit a pull request
rgr has joined #ruby
awille has joined #ruby
User458764 has joined #ruby
dasher00 has quit [Quit: Leaving]
nankyokusei has joined #ruby
sonicmagister has quit [Read error: Connection reset by peer]
sonicmagister has joined #ruby
rgr has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 268 seconds]
sonicmagister has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 240 seconds]
sonicmagister has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pifon has quit [Quit: Connection closed for inactivity]
nobitanobi has joined #ruby
raspado has joined #ruby
xall has joined #ruby
raspado has quit [Ping timeout: 246 seconds]
zapata has quit [Quit: WeeChat 1.8]
Burgestrand has quit [Quit: Closing time!]
leitz has quit [Quit: Nappy time]
Burgestrand has joined #ruby
zapata has joined #ruby
jaruga has quit [Quit: jaruga]
itarato has joined #ruby
Hunter1 has quit [Remote host closed the connection]
Hunter1 has joined #ruby
psychicist__ has quit [Quit: Lost terminal]
itarato has quit [Ping timeout: 260 seconds]
sleetdrop has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jameser has quit [Ping timeout: 255 seconds]
Burgestrand has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
DeeJayh has quit [Ping timeout: 246 seconds]
sonicmagister has quit [Read error: Connection reset by peer]
itarato has joined #ruby
auzty has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
mim1k has joined #ruby
Burgestrand has quit [Quit: Closing time!]
pankaj_ has joined #ruby
Burgestrand has joined #ruby
genpaku has quit [Ping timeout: 240 seconds]
genpaku has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
rikkipitt has quit [Quit: Leaving...]
mim1k has quit [Ping timeout: 268 seconds]
antgel has joined #ruby
Hunter1 has quit [Remote host closed the connection]
auzty has joined #ruby
Hunter1 has joined #ruby
cfec0b8d has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
DoubleMalt has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
lipoqil has quit [Quit: Connection closed for inactivity]
<kke> hmm what's this: def border(options=(not_set=true)
Burgestrand has quit [Quit: Closing time!]
<kke> +)
<kke> keyword argument defaulting?
Burgestrand has joined #ruby
itarato has quit [Ping timeout: 255 seconds]
<kke> no. something even more exotic.
mentok has quit [Ping timeout: 246 seconds]
tlaxkit has joined #ruby
bonhoeffer has joined #ruby
<kke> border('foo') --> options == 'foo', not_set = nil border() --> options = true, not_set = true.
TechMonger has joined #ruby
jameser has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
7IZAAJZLL has joined #ruby
7ITAA4DK1 has joined #ruby
jameser has quit [Client Quit]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
ldnunes has joined #ruby
pankaj_ has quit [Ping timeout: 246 seconds]
Vingador has joined #ruby
pankaj_ has joined #ruby
shinnya has joined #ruby
tgragnato has joined #ruby
synthroid has joined #ruby
xall has quit [Ping timeout: 260 seconds]
TechMonger has quit [Quit: Leaving]
blackmesa has joined #ruby
fmcgeough has joined #ruby
rtjh has joined #ruby
apparition has joined #ruby
nankyokusei has joined #ruby
rtjh has quit [Remote host closed the connection]
maattdd has joined #ruby
bonhoeffer has quit [Ping timeout: 255 seconds]
fmcgeough_ has joined #ruby
fmcgeough has quit [Ping timeout: 246 seconds]
fmcgeough_ is now known as fmcgeough
bonhoeffer has joined #ruby
nadir has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
flyingX has joined #ruby
auzty has quit [Remote host closed the connection]
sepp2k has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
flying has quit [Ping timeout: 255 seconds]
AlexRussia has quit [Ping timeout: 255 seconds]
Mortomes|Train has joined #ruby
gnufied has joined #ruby
uZiel has joined #ruby
AlexRussia has joined #ruby
flyingX has quit []
pupsicle has quit [Remote host closed the connection]
cschneid_ has joined #ruby
stoffus_ has joined #ruby
<uZiel> what would be the best way to xor each byte of a given hex with a given byte?
<uZiel> aah, got it .bytes
nemish has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
stoffus has quit [Ping timeout: 268 seconds]
pupsicle has joined #ruby
<uZiel> no that didn't work actually, because the hex is given as string, like "2785d9e4"
kristoff_ has joined #ruby
kristofferR has quit [Ping timeout: 255 seconds]
<uZiel> how do I return 27^x 85^x d9^x e4^x ?
<matthewd> uZiel: Try unpack
flying has joined #ruby
BSab has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BSAlb has quit [Ping timeout: 246 seconds]
Mortomes|Train has quit [Ping timeout: 260 seconds]
synthroid has quit []
nobitanobi has joined #ruby
Xiti` has joined #ruby
Xiti` has quit [Changing host]
Xiti` has joined #ruby
bonhoeffer has quit [Ping timeout: 260 seconds]
bonhoeffer has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
ldnunes has quit [Ping timeout: 272 seconds]
skweek has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
mahlon has quit [Read error: Connection reset by peer]
olivi____ has joined #ruby
ged has quit [Read error: Connection reset by peer]
ged has joined #ruby
mahlon has joined #ruby
psychicist__ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
itarato has joined #ruby
devyn_ has quit [Ping timeout: 240 seconds]
nickjj_ is now known as nickjj
devyn has joined #ruby
maattdd has quit [Quit: WeeChat 1.8]
anisha has quit [Quit: This computer has gone to sleep]
cdg has joined #ruby
bonhoeffer has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
itarato has quit [Ping timeout: 268 seconds]
skweek has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 272 seconds]
User458764 has joined #ruby
itarato has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
redaudit has joined #ruby
itarato has quit [Ping timeout: 260 seconds]
workmad3 has quit [Quit: Lost terminal]
shinnya has quit [Ping timeout: 240 seconds]
hanmac has joined #ruby
romank has quit [Ping timeout: 240 seconds]
xall has joined #ruby
charliesome has joined #ruby
etehtsea has joined #ruby
romank has joined #ruby
dviola has joined #ruby
skweek has joined #ruby
awille has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504105526]]
flying has quit [Remote host closed the connection]
awille has joined #ruby
flying has joined #ruby
DoubleMalt has quit [Quit: Leaving]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
DLSteve has joined #ruby
olivi____ has quit [Remote host closed the connection]
workmad3 has joined #ruby
itarato has joined #ruby
arooni has quit [Quit: ZNC - http://znc.in]
t-recx has joined #ruby
im0nde has quit [Ping timeout: 255 seconds]
arooni has joined #ruby
nobitano_ has joined #ruby
olivi____ has joined #ruby
fuzzyhorns1 has joined #ruby
fuzzyhorns1 has quit [Quit: Leaving.]
fuzzyhorns1 has joined #ruby
nobitanobi has quit [Ping timeout: 260 seconds]
NeoMalachi has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
olivi____ has quit [Ping timeout: 246 seconds]
igniting has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
AlexRussia has quit [Ping timeout: 268 seconds]
ta_ has quit [Remote host closed the connection]
AlexRussia has joined #ruby
andrew9184 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SaschaVoid has quit [Quit: die();]
SaschaVoid has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
ahrs has quit [Remote host closed the connection]
jaruga has joined #ruby
mim1k has joined #ruby
ahrs has joined #ruby
jrafanie has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
etehtsea has quit [Ping timeout: 272 seconds]
xenops has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
MrSparkle has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
nankyokusei has joined #ruby
romank has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
pankaj_ has quit [Ping timeout: 245 seconds]
theunraveler has joined #ruby
Asher has quit [Ping timeout: 260 seconds]
oliv_____ has quit [Ping timeout: 260 seconds]
itarato has quit [Ping timeout: 268 seconds]
Asher has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
dlitvak has joined #ruby
DoubleMalt has joined #ruby
oliv_____ has joined #ruby
cdg has quit [Remote host closed the connection]
pankaj_ has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
Emmanuel_Chanel has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
tlaxkit has quit [Ping timeout: 260 seconds]
igniting has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
tlaxkit has joined #ruby
GodFather has joined #ruby
kaspergrubbe has quit [Ping timeout: 240 seconds]
spheric has quit [Read error: Connection reset by peer]
bigkevmc_ has joined #ruby
SuperTux88 has quit [Ping timeout: 240 seconds]
kaspergrubbe has joined #ruby
GodFather has quit [Client Quit]
skweek has quit [Ping timeout: 255 seconds]
ben_____ has quit []
SuperTux88 has joined #ruby
haylon has joined #ruby
ben_____ has joined #ruby
mikecmpb_ has joined #ruby
tlaxkit has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
fuzzyhorns1 has quit [Read error: No route to host]
fuzzyhorns1 has joined #ruby
tlaxkit has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexRussia has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
blackmesa has joined #ruby
chouhoulis has joined #ruby
itarato has joined #ruby
cahoots has joined #ruby
<manveru> >> 'hello world'.bytes.to_a.map{|b| b ^ 100 }
<ruby[bot]> manveru: # => [12, 1, 8, 8, 11, 68, 19, 11, 22, 8, 0] (https://eval.in/798451)
<manveru> >> 'hello world'.bytes.map{|b| b ^ 100 }
<ruby[bot]> manveru: # => [12, 1, 8, 8, 11, 68, 19, 11, 22, 8, 0] (https://eval.in/798452)
<manveru> or that :)
<cahoots> hi, so i want to refer to relative paths in my ruby script easily, and to do so i was doing Dir.chdir(__dir__). but then i have to have one at the start of my require statements and at the end of them, so that i can do relative requires that might change the cwd. is there a better way of doing this?
<dminuoso> cahoots: You usually use the File helper methods to construct paths together with __FILE__
NeoMalachi has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> And avoid chdir entirely
<dminuoso> i.e. File.dirname(__FILE__) is something you see an awful lot in Ruby programs
<dminuoso> It's an established pattern I guess.
<dminuoso> That avoids messing with the pwd entirely.
<dminuoso> *cwd
shadeslayer_ is now known as shadeslayer
<cahoots> dminuoso, hmm, i like mine more i guess
<cahoots> it seems cleaner in the long run
<dminuoso> cahoots: Except File.dirname(__FILE__) gives you precise semantics. chdir has some nasty side-effects
<dminuoso> cahoots: Imagine your application crashes at some point.
<elomatreb> IIRC chdir has a block form that automatically changes back, if you're OK with wrapping your whole program in a block
<elomatreb> But yeah, I agree with dminuoso
raul782 has joined #ruby
<dminuoso> cahoots: And as I mentioned, it's an established pattern in the Ruby community. :)
<cahoots> i don't understand what the side effecs are, certainly my shell doesn't get its pwd changed
<cahoots> and wouldn't __dir__ be more concise?
ahrs has quit [Remote host closed the connection]
kyeeh has joined #ruby
<dminuoso> cahoots: __dir__ is a method, __FILE__ is a constant.
ahrs has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
<cahoots> i don't see the significance
<dminuoso> cahoots: Mmm, But actually you are right __dir__ is actually more elegant.
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> Guess old habits die hard.
chouhoul_ has joined #ruby
<dminuoso> File.expand_path(__dir__, '../foo') is the way to go
chouhoul_ has quit [Remote host closed the connection]
<cahoots> it seems like properness is correlated with verboseness
chouhoul_ has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso> cahoots: Writing code is not about trying to save as much characters as possible. chdir gives you state machine semantics.
<dminuoso> Which is that much more difficult to reason about.
<dminuoso> cahoots: Let's say you call some code. Do you know whether that code did a ninja change to the cwd?
itarato has quit [Ping timeout: 246 seconds]
<cahoots> it doesn't matter if my project adopts a consistent structure
<dminuoso> cahoots: Can you say the same about any library you use.
<dminuoso> ?
<cahoots> dminuoso, i don't think any third-party libs care which directory is current. even if i didn't change dir from within the script, it's inherited from the shell
chouhoulis has quit [Ping timeout: 240 seconds]
Kug3lis has joined #ruby
<dminuoso> The problem about relying on mutable globals (and cwd for all intends is a global) is that you have to prove that *all* code respects proper semantics
<dminuoso> It's much more difficult to just using File.expand_path(__dir__, 'foo')
<dminuoso> Because any code can mutate it.
cfec0b8d has joined #ruby
<dminuoso> Mutable globals are bad. Always.
<dminuoso> They stink of poor code design.
<dminuoso> They are also downright impossible to test.
<cahoots> the great thing about ruby is you can do it lots of ways, so i'll stick with mine
rippa has joined #ruby
zapata has quit [Ping timeout: 272 seconds]
<dminuoso> That does not mean that most ways are sensible.
<dminuoso> But luckily I dont car.e
itarato has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<elomatreb> Did you see that block form of chdir I mentioned? Might at least help with the cleaning up part
__Yiota has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
raspado has joined #ruby
<cahoots> yeah i'll check it out
<cahoots> thanks for the advice dminuoso elomatreb
raul782 has joined #ruby
dellavg has left #ruby ["Ex-Chat"]
cdg has joined #ruby
Silthias1 has joined #ruby
Beams has quit [Quit: .]
cschneid_ has joined #ruby
LuckyABA has joined #ruby
Silthias has quit [Ping timeout: 272 seconds]
Beams has joined #ruby
BSab has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
zapata has joined #ruby
etehtsea has joined #ruby
bkxd has joined #ruby
xall has quit [Ping timeout: 240 seconds]
gothicsouth has joined #ruby
xychix has quit [Ping timeout: 240 seconds]
pankaj_ has quit [Ping timeout: 268 seconds]
bmgoog has joined #ruby
kyeeh has quit []
haylon has quit [Ping timeout: 246 seconds]
itarato has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 240 seconds]
mikecmpb_ has quit [Quit: inabit. zz.]
bkxd has quit [Ping timeout: 260 seconds]
jespada has joined #ruby
mikecmpbll has joined #ruby
mrgrieves has joined #ruby
hobodave has joined #ruby
itarato has joined #ruby
pankaj_ has joined #ruby
<mrgrieves> hi, how can I export bash env vars from a .rb script i.e. I want the script to do the same as doing export in the shell
mim1k has joined #ruby
<mrgrieves> ?
cam27 has joined #ruby
mattp__ has quit [Remote host closed the connection]
<matthewd> mrgrieves: A process can't affect its parent's environment
Beams has quit [Quit: .]
conta has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
Beams has joined #ruby
rkazak has joined #ruby
<mrgrieves> matthewd: so I guess my best option is to do this from within a bash script?
pratch has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
<matthewd> A bash script run as a new process can't do it either -- but a bash script can be sourced, which will do what you want
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
<mrgrieves> matthewd: cheers!
<matthewd> The only other option is to do something like `eval "$(ruby your_script.rb)"`, and have it output the shell commands to set the exports
pankaj_ has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
xychix has joined #ruby
pandaant has quit [Remote host closed the connection]
mdw has joined #ruby
ascarter has joined #ruby
pankaj_ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
ascarter has quit [Client Quit]
haylon has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
mas886 has joined #ruby
<mas886> I have a problem with hashes, when I do: hash[key]="hello" it grabs the object key instead of it's value. So once I modify the key to use it again on a loop, the first value key also changes. How can I have hash key to use the key value as a key instead of the object as a key?
bruno- has joined #ruby
User458764 has joined #ruby
ascarter has joined #ruby
<elomatreb> mas886: Could demo what you mean with a small snippet? I'm not really sure I understand
<mas886> elomatreb: Okay I will do a little example.
<mas886> elomatreb: https://pastebin.com/pwNYWZ54
<ruby[bot]> mas886: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/b9e42271b7a853f9421a10e0c100e88a
<ruby[bot]> mas886: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mas886> Thanks there mr bot
bigkevmc_ has quit [Quit: Outta here...]
<baweaver> you clipped some of the code there.
bigkevmcd has joined #ruby
<baweaver> (well, a lot of the code there)
<mas886> baweaver: clipped?
<baweaver> You do know hashes and arrays are different
<baweaver> right?
Toledo-afk is now known as Toledo
Toledo is now known as croberts
juggler has joined #ruby
<mas886> baweaver: Of course, but I'm new to ruby. I want to use something like php arrays.
<baweaver> hash = {key: value}; array = [list, of, items]
<baweaver> a hash is basically a dictionary of KV pairs
<mas886> I know
<baweaver> are you trying to get a wordcount?
xall has joined #ruby
<mas886> I'm trying to do exactly what the code does. But when I modify the key value, I want the hash key to remain as it was when I introduced it.
<baweaver> what's the actual task you're trying to accomplish here?
amclain has joined #ruby
<mas886> Get a key assoc list where the a key have a value.
<mas886> The key is created that way.
itarato has quit [Ping timeout: 246 seconds]
<baweaver> but what's the buffer?
haylon has quit [Remote host closed the connection]
<mas886> baweaver: Sorry if I cannot give you more information. I'm trying to reverse engeneering some code.
<baweaver> you're not telling me the task, you're telling me how a hash works
ferr has quit [Quit: WeeChat 1.7]
<mas886> The buffer is those \n things * for a number
DoubleMalt has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
<baweaver> ...
<mas886> And then I add the things.
<baweaver> I can see that
<mas886> So you know the same I do.
<baweaver> You have a lot of extra code context
<baweaver> It makes no real sense
<mas886> Haha I know.
<elomatreb> The Hash key is the same object, if you modify it you modify the Hash key too. You could clone it to avoid that, but that's messy
<mas886> Isn't there a way to assign the object value as the key instead of the object itself?
[Butch] has joined #ruby
patarr has joined #ruby
Pumukel has joined #ruby
<elomatreb> Now we're getting philosophical, what is an object besides its value? :P
awille has quit [Ping timeout: 240 seconds]
andrew9184 has quit [Ping timeout: 240 seconds]
<elomatreb> To answer your question: Cloning the array by calling #dup will probably achieve what you want, but I urge you to maybe design your code so that you don't rely on arrays as Hash keys
oliv_____ has joined #ruby
<elomatreb> I.e. `$hash[buf.dup]=chr`
gusrub has joined #ruby
flying has quit []
davidmichaelkarr has joined #ruby
andrew9184 has joined #ruby
hosas has joined #ruby
aufi has quit [Quit: Leaving]
<havenwood> mas886: Don't assign your own global variables.
<havenwood> mas886: I'd suggest taking a step back to look at more Rubyish ways to achieve your goal.
<baweaver> havenwood: not their code it seems
<havenwood> baweaver: aha
hosas has left #ruby [#ruby]
<baweaver> more of a wtf is this question
Pumukel has quit []
oliv_____ has quit [Ping timeout: 246 seconds]
<mas886> Haha, sorry.
<mas886> Anyways thanks people.
oleo has joined #ruby
Vingador_ has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
skweek has joined #ruby
olivi____ has joined #ruby
Vingador has quit [Ping timeout: 246 seconds]
nitric has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
fuzzyhorns1 has quit [Quit: Leaving.]
<guardian> hello, does ruby have something builtin that would allow me to tell whether a string corresponds to a language tag as defined by RFC 4646? e.g. en_US, fr_FR ...
bkxd has joined #ruby
tlaxkit has quit [Quit: tlaxkit]
jespada has quit [Quit: WeeChat 1.7]
<elomatreb> guardian: You can certainly validate the format, but I don't think Ruby ships with a table. Your OS might though
<guardian> ok a regex it is then :) thanks
kobain has joined #ruby
im0nde has joined #ruby
pankaj_ has quit [Quit: Leaving]
uZiel has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 255 seconds]
mark_66 has quit [Remote host closed the connection]
_sfiguser has joined #ruby
patr0clus has joined #ruby
milardovich has quit [Remote host closed the connection]
rakm has joined #ruby
tildes has joined #ruby
milardovich has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackrandom has joined #ruby
vuoto has joined #ruby
__Yiota has joined #ruby
olivi____ has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 245 seconds]
milardovich has quit [Ping timeout: 272 seconds]
itarato has joined #ruby
oleo has quit [Remote host closed the connection]
alazred has quit [Ping timeout: 258 seconds]
AlexRussia has joined #ruby
jackrandom has quit [Remote host closed the connection]
nankyokusei has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
oliv_____ has joined #ruby
jackrandom has joined #ruby
redaudit has quit [Ping timeout: 258 seconds]
jpleau has quit [Read error: Connection reset by peer]
Kug3lis has quit [Ping timeout: 255 seconds]
fuzzyhorns1 has joined #ruby
Asher has quit [Quit: Leaving.]
rgr has joined #ruby
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
rgr has quit [Remote host closed the connection]
minimalism has joined #ruby
oliv_____ has quit [Remote host closed the connection]
fuzzyhorns1 has quit [Client Quit]
etehtsea has joined #ruby
skweek has joined #ruby
Burgestrand has quit [Quit: Closing time!]
jeffreylevesque has joined #ruby
nankyokusei has quit [Remote host closed the connection]
<jeffreylevesque> is this valid syntax for multiline string in ruby - https://bpaste.net/show/eb5cb3aa4ed2?
tvw has quit []
nemish has left #ruby [#ruby]
rkazak has joined #ruby
anisha has joined #ruby
<baweaver> Does it run?
<baweaver> If it does, it's valid. If not...
synthroid has joined #ruby
synthroi_ has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
nowhere_man has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby
oliv_____ has joined #ruby
jgt has joined #ruby
Beams has quit [Quit: .]
duderonomy has quit [Ping timeout: 240 seconds]
gusrub has quit []
synthroid has quit [Ping timeout: 268 seconds]
majuk has joined #ruby
fuzzyhorns1 has joined #ruby
<majuk> Hello friends. I have an issue. I am trying to use gem/rake to install a new gem. Unfortunately, it's having trouble finding headers [stdio.h, features.h, et al]. I have confirmed gcc/cpp have the proper paths for these libs set up and compiled a quick test program that worked without issue.
<majuk> Any questions or comments appreciated.
<majuk> The specific gem is 'mmap'
<majuk> ruby 2.2.2
<fuzzyhorns1> majuk: looks like that gem has trouble with rubies of 2 and over? https://github.com/tenderlove/mmap/issues/6
<fuzzyhorns1> majuk: see the bottom of the second link: it appears you need to source from git not rubygems
<majuk> fuzzyhorns1: I found that, the git link is dead.
zachk has joined #ruby
<majuk> nevermind
anisha has quit [Read error: Connection reset by peer]
anisha has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
Asher has joined #ruby
Cohedrin has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
olivi____ has quit [Remote host closed the connection]
bkxd has joined #ruby
olivi____ has joined #ruby
<ljarvis> s
<ljarvis> whoops
anisha has quit [Ping timeout: 260 seconds]
drcode has quit [Quit: ZNC 1.6.5 - http://znc.in]
renchan has quit [Quit: Leaving...]
gil__ is now known as gil_
gil_ has quit [Changing host]
gil_ has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
Guest8715 is now known as julian
bkxd has quit [Ping timeout: 268 seconds]
im0nde has quit [Ping timeout: 260 seconds]
jaruga has quit [Quit: jaruga]
vuoto has quit [Remote host closed the connection]
swills has quit [Ping timeout: 246 seconds]
whathappens has joined #ruby
swills has joined #ruby
jrafanie has joined #ruby
whathappens has quit [Remote host closed the connection]
anisha has joined #ruby
rickumali has joined #ruby
whathappens has joined #ruby
antgel has quit [Ping timeout: 260 seconds]
zacts has quit [Ping timeout: 255 seconds]
muelleme has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
griffindy has joined #ruby
majuk has quit [Remote host closed the connection]
rickumali has quit [Quit: leaving]
_sfiguser has joined #ruby
cam27 has quit [Quit: cam27]
nowhere_man has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.7.1]
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
griffindy has quit [Client Quit]
hahuang65 has joined #ruby
whathapp_ has joined #ruby
cahoots_ has joined #ruby
<jeffreylevesque> got it fixed
nobitano_ has quit [Remote host closed the connection]
<jeffreylevesque> just needed to escape quotes
mim1k has quit [Ping timeout: 255 seconds]
drcode has joined #ruby
cahoots has quit [Ping timeout: 246 seconds]
whathappens has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
TomyLobo has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Asher has quit [Quit: Leaving.]
jrafanie has joined #ruby
drcode has quit [Quit: ZNC 1.6.5 - http://znc.in]
milardovich has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
Cohedrin has joined #ruby
dunk has quit [Ping timeout: 246 seconds]
swgillespie has quit [Ping timeout: 260 seconds]
jcp___ has quit [Ping timeout: 260 seconds]
uZiel has joined #ruby
graingert has quit [Ping timeout: 240 seconds]
knowtheory has quit [Ping timeout: 246 seconds]
drcode has joined #ruby
jackrandom has quit [Ping timeout: 246 seconds]
swills has quit [Ping timeout: 272 seconds]
dunk has joined #ruby
Majost has quit [Ping timeout: 258 seconds]
graingert has joined #ruby
swgillespie has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
enterprisey has joined #ruby
knowtheory has joined #ruby
cfec0b8d has joined #ruby
jcp___ has joined #ruby
AlexRussia has joined #ruby
swills has joined #ruby
Majost has joined #ruby
milardovich has joined #ruby
swills has quit [Max SendQ exceeded]
duderonomy has joined #ruby
swills has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zacts has joined #ruby
dasher00 has joined #ruby
im0nde has joined #ruby
milardovich has quit [Remote host closed the connection]
TvL2386_ has joined #ruby
milardovich has joined #ruby
TvL2386 has quit [Ping timeout: 240 seconds]
jokke has quit [Ping timeout: 258 seconds]
__Yiota has joined #ruby
gusrub has joined #ruby
mas886 has quit [Ping timeout: 240 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
romank has quit [Ping timeout: 260 seconds]
umdstu has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 246 seconds]
alazred has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
Burgestrand has joined #ruby
synthroi_ has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 268 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
anisha has quit [Ping timeout: 260 seconds]
gothicsouth has joined #ruby
kobain has quit [Ping timeout: 246 seconds]
uZiel has quit [Ping timeout: 240 seconds]
ForeignBiscuit has joined #ruby
ldnunes has joined #ruby
Bock has quit [Read error: Connection reset by peer]
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
Burgestrand has quit [Quit: Closing time!]
haylon has joined #ruby
ResidentBiscuit has quit [Ping timeout: 268 seconds]
xtsee has quit [Read error: Connection reset by peer]
Cohedrin has quit [Read error: Connection reset by peer]
AlexRussia has quit [Ping timeout: 246 seconds]
ForeignBiscuit has quit [Ping timeout: 268 seconds]
Cohedrin has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
jokke has joined #ruby
Asher has joined #ruby
mim1k has quit [Ping timeout: 245 seconds]
tildes has joined #ruby
olivi____ has quit [Remote host closed the connection]
redaudit has joined #ruby
oliv_____ has joined #ruby
jgt has quit [Ping timeout: 246 seconds]
mim1k has joined #ruby
cdg has quit [Remote host closed the connection]
majuk has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alazred has joined #ruby
__Yiota has joined #ruby
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
im0nde_ has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
im0nde has quit [Ping timeout: 255 seconds]
ResidentBiscuit has joined #ruby
MrBusiness3 has quit [Ping timeout: 258 seconds]
aupadhye has quit [Ping timeout: 260 seconds]
im0nde_ is now known as im0nde
ascarter has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
blackmesa has joined #ruby
bkxd has joined #ruby
SeepingN has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
whathapp_ has quit [Remote host closed the connection]
cabraturgo has joined #ruby
Burgestrand has joined #ruby
synthroid has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
alazred has quit [Ping timeout: 260 seconds]
cabraturgo has left #ruby [#ruby]
tildes has joined #ruby
<majuk> Can someone recommend a guide for compiling ruby? Thanks in advance.
ltem has joined #ruby
whathapp_ has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
trampi has quit [Quit: Ping timeout (120 seconds)]
whathapp_ has quit [Remote host closed the connection]
MrBusiness3 has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
<havenwood> majuk: Here are some basics: https://github.com/postmodern/chruby/wiki/Ruby
ascarter has joined #ruby
<majuk> havenwood: Thanks.
whathappens has joined #ruby
<havenwood> majuk: This is a good place to ask if you have related questions.
<majuk> So many questions, but none are very constructive. :D
<majuk> I am pretty far down a rabbit hole at this point. It's dark down here, I don't recommend anyone join me.
tildes has quit [Ping timeout: 268 seconds]
<majuk> Aaaaand I just filled my SDCard. -.-
milardovich has joined #ruby
anisha_ has quit [Quit: Leaving]
xall has quit [Ping timeout: 240 seconds]
romank has joined #ruby
marlinc has quit [Ping timeout: 246 seconds]
whathappens has quit [Remote host closed the connection]
enterprisey has joined #ruby
whathappens has joined #ruby
oleo has joined #ruby
bambanx has joined #ruby
brent__ has quit [Remote host closed the connection]
armyriad has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
xall has joined #ruby
armyriad has joined #ruby
whathappens has quit [Ping timeout: 246 seconds]
jgt has joined #ruby
nobitanobi has joined #ruby
olivi____ has joined #ruby
LukyCZ has joined #ruby
whathappens has joined #ruby
`derpy has quit [Read error: Connection reset by peer]
adaedra has quit [Read error: Connection reset by peer]
Cohedrin has quit [Read error: Connection reset by peer]
nobitanobi has quit [Ping timeout: 246 seconds]
jgt has quit [Ping timeout: 246 seconds]
nobitanobi has joined #ruby
redaudit has quit [Quit: Cya]
whathappens has quit [Client Quit]
jusa has joined #ruby
cam27 has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
andrew9184 has quit [Quit: andrew9184]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
t-recx has quit [Ping timeout: 268 seconds]
t-recx has joined #ruby
jenrzzz has joined #ruby
d5sx43 has joined #ruby
milardovich has quit [Remote host closed the connection]
muelleme has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
whathappens has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Vingador_ has quit [Ping timeout: 246 seconds]
<SeepingN> gross
<majuk> Amen
<majuk> Almost done making the new file system to try building ruby to try to fix the problem I ran into compiling the mmap gem to get my friggin SPI interface functional.
nobitanobi has quit [Ping timeout: 246 seconds]
<majuk> Maybe I should just drown myself instead. Probably be more fun.
tildes has joined #ruby
mrconfused has joined #ruby
tristanp has quit [Ping timeout: 260 seconds]
milardovich has quit [Remote host closed the connection]
gusrub has quit [Read error: Connection reset by peer]
rgr has joined #ruby
haylon has quit [Ping timeout: 268 seconds]
gusrub has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
latemus has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
haylon has joined #ruby
biberu has quit []
mrmax has joined #ruby
MichaelBurge has joined #ruby
cdg has joined #ruby
SaschaVoid has quit [Ping timeout: 246 seconds]
ta_ has joined #ruby
gusrub has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<MichaelBurge> Hey all. I'm trying to add extra logging to my unit tests and am having a bit of trouble understanding the semantics of &block
<MichaelBurge> What are the differences in how these two blocks are called? https://hastebin.com/tofececaga.rb
<baweaver> What's blocking you?
gusrub has joined #ruby
SaschaVoid has joined #ruby
nicesignal has quit [Remote host closed the connection]
psychicist__ has quit [Quit: Lost terminal]
nicesignal has joined #ruby
<baweaver> &block is how you pass a block (as an argument) or capture one (as a method param)
<baweaver> block.call is just invoking the block
<MichaelBurge> That's true, but when you wrap it inside of another do..end block it should be equivalent, right?
<mrmax> Hi! I need some help with string parsing to hash. The string is: <div style="style"><b>First Name</b> Michael<br /><b>Last Name</b> Smith<br /></div> <div style=“another style”><b>Username</b> Michael123<br /><b>Join</b> ,<br /><b>Email:</b> ,<br \></div>. I want to get hash where key is word from <b></b> and value the word after</b> If There is no value after </b> - just “”. What is the best way to do it
<baweaver> mrmax: Nokogiri
olivi____ has quit [Remote host closed the connection]
<baweaver> MichaelBurge: How so?
oliv_____ has joined #ruby
tristanp has joined #ruby
<baweaver> Ah
<baweaver> example
* baweaver stares at coffee and starts suspecting decaf
marlinc has joined #ruby
<baweaver> It's basically like using that with map
<baweaver> do you _just_ want to pass the block, or do you want to do other things?
<baweaver> it's basically shorthand
<MichaelBurge> I'm going to wrap it in an exception-catching block and print the exception
<MichaelBurge> They're not equivalent, because my fixtures aren't initialized in the first example but are in the second
<baweaver> arguments
<MichaelBurge> I did 'p block.arity' and it shows 0
<mrmax> thanks - will check nokogiri
<MichaelBurge> So there aren't any arguments
<baweaver> Hrm.
<MichaelBurge> The block in question are also my unit tests, so I know they aren't using the arguments
gusrub has quit [Ping timeout: 268 seconds]
mim1k has quit [Ping timeout: 240 seconds]
<baweaver> what's the super method look like?
rkazak has quit [Quit: Sleep.....ing....]
tildes has quit [Ping timeout: 260 seconds]
<MichaelBurge> That would be ActiveSupport::TestCase's test method. I'll go dig it up
<baweaver> RSpec does have options to handle exception raising tests
brent__ has joined #ruby
mrmax has quit [Quit: Page closed]
rkazak has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
jenrzzz has quit [Ping timeout: 255 seconds]
antgel has joined #ruby
<baweaver> Something with define_me.....
<baweaver> wait
<baweaver> module_eval or class_eval is being used somewhere
ur5us has joined #ruby
<baweaver> which means that it goes and does odd things to the binding context
<MichaelBurge> Are you suggesting that self gets rebound to the parent class rather than the module holding my unit tests, so that the instance variables are looked up on the parent class?
ujjain has quit [Read error: Connection reset by peer]
<baweaver> yeah, shenanigans
<MichaelBurge> Within the 'do' block, I can see that self is the child class, not the parent
<baweaver> so &block will keep the context
<baweaver> block.call in a new block won't
n1299 has joined #ruby
<MichaelBurge> Okay. Is there a way to preserve the context when invoking it?
<baweaver> Honestly not entirely sure. You could try local variables but this gets dirty fast.
<baweaver> Hrm. Not sure I have a really good answer for this one
<matthewd> instance_exec
<MichaelBurge> self.instance_eval(&block) inside of the do..end seems to do the trick
mdw has joined #ruby
<baweaver> yeah, so many levels of meta down and I lose track of what goes where :/
n1299 has quit [Quit: TurboIRC for Android. Available @ Google Play.]
* baweaver wanders off for coffee
jusa has quit [Ping timeout: 240 seconds]
gusrub has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ascarter has joined #ruby
ur5us has quit [Remote host closed the connection]
muelleme has joined #ruby
whathappens has left #ruby ["Bless bless..."]
bkxd has joined #ruby
muelleme has quit [Ping timeout: 268 seconds]
jeffreylevesque has quit [Ping timeout: 268 seconds]
synthroid has quit []
blackmesa has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 246 seconds]
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
milardovich has quit []
jamesaxl has quit [Quit: WeeChat 1.7.1]
ur5us has joined #ruby
juggler has quit [Quit: Leaving]
patarr has joined #ruby
oliv_____ has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 1.8]
milardovich has joined #ruby
jgt has joined #ruby
xall has quit [Quit: xall]
milardovich has quit [Remote host closed the connection]
d5sx43 has joined #ruby
milardovich has joined #ruby
7ITAA4DK1 has quit [Ping timeout: 240 seconds]
7IZAAJZLL has quit [Ping timeout: 258 seconds]
patarr has quit [Ping timeout: 255 seconds]
olivi____ has joined #ruby
patarr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Quit: Leaving...]
haylon has quit [Quit: WeeChat 1.5]
raspado has quit [Remote host closed the connection]
Burgestrand has joined #ruby
raspado has joined #ruby
romank has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
majuk_ has joined #ruby
dcluna has quit [Ping timeout: 240 seconds]
SaschaVoid has quit [Quit: die();]
fuzzyhorns1 has quit [Ping timeout: 240 seconds]
mrconfused has quit [Ping timeout: 255 seconds]
dcluna has joined #ruby
jeffreylevesque has joined #ruby
romank has joined #ruby
patarr has joined #ruby
majuk has quit [Ping timeout: 245 seconds]
romank has quit [Read error: Connection reset by peer]
Guest53408 has quit [Quit: LayerBNC - https://LayerBNC.org/]
romank has joined #ruby
silentoxygen has quit []
patarr has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
Pumukel has joined #ruby
<michael_mbp> havenwood: what's strange is docs for Tempfile do not go into such detail.
enterprisey has quit [Quit: Leaving]
patarr has quit [Ping timeout: 240 seconds]
majuk_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 240 seconds]
SenpaiSilver has quit [Quit: Leaving]
bkxd has joined #ruby
gothicsouth has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
ResidentBiscuit has joined #ruby
skweek has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
patarr has joined #ruby
GodFather has joined #ruby
LukyCZ has quit [Quit: Connection closed for inactivity]
theunraveler has quit []
mattp_ has joined #ruby
milardovich has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
kobain has joined #ruby
kobain has quit [Excess Flood]
kobain has joined #ruby
kobain has quit [Excess Flood]
kobain has joined #ruby
t-recx has quit [Quit: t-recx]
t-recx has joined #ruby
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MichaelBurge has quit [Remote host closed the connection]
<havenwood> michael_mbp: They do kinda leave a trail of cookie crumbs. Tempfile::new points to File::open for options, which in turn points to IO::new, where the docs lie.
patarr has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> michael_mbp: Fair to say it's not easy to find.
MichaelBurge has joined #ruby
olivi____ has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
patarr has joined #ruby
itarato has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ltem has quit [Quit: Leaving]
TomyLobo has quit [Ping timeout: 246 seconds]
Pumukel has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504105526]]
<zenspider> rawr
<t-recx> rawr
<zenspider> MichaelBurge: did you get things figured out? also, why are you adding logging to your unit tests?
<zenspider> curious wtf was going on... that seems way overly complex
gothicsouth has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
itarato has joined #ruby
<MichaelBurge> zenspider: self.instance_eval(&block) was enough to resolve the issue. The logging was because my exception objects had additional parameters that I wanted to see, but StandardError's inspect method only gives the message.
<MichaelBurge> I could've probably overridden inspect to get the information I needed, but I didn't realize it until after
cagomez has joined #ruby
<zenspider> MichaelBurge: if you're using minitest, assert_raises returns the exception object so you can test anything extra that should be on it
<michael_mbp> havenwood: gotcha!
<zenspider> eg e = assert_raises { ...}; assert_equal 42, e.something
cahoots_ has quit [Ping timeout: 255 seconds]
<MichaelBurge> zenspider: The exception was unexpected, so I wouldn't need an assert.
<MichaelBurge> Though, maybe you meant for debugging that one test you could add the assert
Burgestrand has quit [Quit: Closing time!]
<zenspider> either way... if it is unexpected... yeah. I'd go ahead and define inspect on it, or use `pp` after capturing it
mrconfused has joined #ruby
cahoots has joined #ruby
Pumukel has joined #ruby
Guest95673 has joined #ruby
oliv_____ has quit [Remote host closed the connection]
Guest95673 has left #ruby [#ruby]
<zenspider> ljarvis: wtf was that shit about the infinite loop last night? that roulette code. works fine here. like, completely as you'd expect it to.
<zenspider> Is this threading on windows being wonky?
ozcanesen has joined #ruby
milardovich has joined #ruby
<matthewd> zenspider: I think it (the original code) was an infinite loop via tail call recursion
davidmichaelkarr has quit [Quit: Connection closed for inactivity]
<zenspider> matthewd: I ran his code as-is. works fine (so far). I have notoriously high call stack, but not infinitely high (man that'd be fun to fuck with)
mitt3ns has joined #ruby
<zenspider> their claim was that the second thread doesn't even start because it gets stuck on the first one. It starts fine.
JeanCarloMachado has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
JeanCarl1Machado has quit [Ping timeout: 260 seconds]
<zenspider> I did have to turn off the prints because it was obnoxious... but you could see both running fine
JeanCarloMachado has joined #ruby
<matthewd> Ah, yeah.. maybe just misreading the output. The second thread dies first for me, so the last screenful of output is all "1".
agent_white has quit [Ping timeout: 255 seconds]
JeanCarl1Machado has joined #ruby
mrconfused has quit [Ping timeout: 255 seconds]
* zenspider shrugs
gnufied has quit [Ping timeout: 240 seconds]
Pumukel has quit [Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504105526]]
majuk has joined #ruby
<majuk> So I'm on Linux and I'd like to install a recent version of ruby-dev without going through package management.
<zenspider> go for it
mrconfused has joined #ruby
<majuk> for realz
ResidentBiscuit has quit [Quit: Critical Miss]
volty has joined #ruby
zachk has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
enterprisey has joined #ruby
jusa has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
zachk has joined #ruby
zachk has quit [Changing host]
zachk has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
patarr has quit [Ping timeout: 268 seconds]
jusa has quit [Ping timeout: 246 seconds]
bruno-_ has joined #ruby
milardovich has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
mdw has quit [Quit: Sleeping Zzzzz]
mrconfused has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
jgt has quit [Ping timeout: 246 seconds]
mrconfused has joined #ruby
jgt has joined #ruby
bkxd has joined #ruby
jane_booty_doe has joined #ruby
olivi____ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 246 seconds]
bilal has joined #ruby
mrconfused has quit [Ping timeout: 246 seconds]
mrconfused has joined #ruby
<cam27> Am I alone in thinking that learning programing through College was tough, because of the vocabulary? I mean, I’m reading this Ruby book now and everything is so much clearer. Take a class method - I am jsut finding out that it is a singleton method that is acted upon by a instance.
<cam27> Never knew they were linked like that
<majuk> 60% of most college degrees is vocabulary.
Dimik has quit [Ping timeout: 260 seconds]
<majuk> Some are closer to 95%
<cam27> I feel like it was just an intro to programing, but to actually understand it, one has to read it for themselves and get out of that teacher student enviornment
<cam27> Some courses were too fast and some were too slow in my case, both of which hurt my development. I mean I did learn a lot, but not so much in programing, I really feel like it is the worst taught subject out of all of the courses I took.
olivi____ has quit [Remote host closed the connection]
charliesome has joined #ruby
majuk has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
_sfiguser has quit [Quit: Leaving]
<zenspider> cam27: a call method isn't acted upon by an instance... unless you count the class as the instance (which technically it is, but nobody thinks of it that way)
<zenspider> grr.. "a CLASS method" ... my fingers aren't cooperating today
milardovich has joined #ruby
nofxx has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
<cam27> zenspider: Good catch on my mistake. Correct, I wrote it wrong. Here is where I just read it from: The idea of a class
<cam27> method is that you send a message to the object that’s the class rather than to one of
<cam27> the class’s instances. The message most_expensive goes to the class Ticket, not to a
<cam27> particular ticket.
istrasci has joined #ruby
<cam27> So highest mustbe an instance of class? highest = Ticket.most_expensive(th,cc,fg)
<cam27> puts "The highest-priced ticket is the one for #{highest.venue}."
oliv_____ has joined #ruby
antgel has quit [Ping timeout: 246 seconds]
<istrasci> HEREDOCs implicitly have a newline at the end that is often undesirable. Is there a way to auto chomp! it in the syntax, or you just have to do it manually?
nowhere_man has quit [Remote host closed the connection]
DLSteve has joined #ruby
im0nde has quit [Ping timeout: 260 seconds]
oliv_____ has quit [Ping timeout: 246 seconds]
itarato has quit [Ping timeout: 246 seconds]
dhollinger has quit [Ping timeout: 240 seconds]
redaudit has joined #ruby
marr has quit [Ping timeout: 246 seconds]
cdg has quit [Remote host closed the connection]
itarato has joined #ruby
jphase has quit [Read error: Connection reset by peer]
nicesignal has quit [Remote host closed the connection]
quiller has quit [Quit: I out! ::mic drop::]
nicesignal has joined #ruby
xenops has quit [Ping timeout: 240 seconds]
jphase has joined #ruby
quiller has joined #ruby
minimalism has quit [Quit: minimalism]
cschneid_ has joined #ruby
BSaboia has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
boombox_ has joined #ruby
Fysicus has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 246 seconds]
mrconfused has quit [Ping timeout: 246 seconds]
raspado has quit [Remote host closed the connection]
raspado has joined #ruby
brent__ has quit [Remote host closed the connection]
cagomez has quit [Remote host closed the connection]
raspado has quit [Ping timeout: 246 seconds]
cagomez has joined #ruby
Fysicus has joined #ruby
KeyJoo has joined #ruby
GodFather has quit [Ping timeout: 272 seconds]
snockerton has joined #ruby
cagomez has quit [Ping timeout: 255 seconds]
boombox_ has quit [Remote host closed the connection]
chouhoul_ has quit [Ping timeout: 240 seconds]
AnoHito_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
alveric2 has joined #ruby
AnoHito has quit [Ping timeout: 260 seconds]
alveric1 has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
ascarter_ has joined #ruby