jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
uglybandersnatch has joined #ruby
cd-rum has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> mykeura: Here's a nice setup on Arch with chruby: https://gist.github.com/jhass/8839655bb038e829fba1
<toretore> shevy: i'd say module, if it is purely to act as a namespace
Uber|Dragon has quit [Ping timeout: 246 seconds]
<mykeura> Thanks havenwood.
wldcordeiro has quit [Ping timeout: 248 seconds]
cjbottaro has joined #ruby
Ox0dea has quit [Ping timeout: 240 seconds]
firstdayonthejob has quit [Ping timeout: 276 seconds]
JoshGlzBrk has joined #ruby
Breaking_Pitt has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
ascarter has joined #ruby
mistermocha has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
agentmeerkat has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
skweek has joined #ruby
jjturner has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
jeffreylevesque has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
cdg_ has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
n008f4g_ has joined #ruby
mykeura has quit [Quit: Konversation terminated!]
cdg has quit [Ping timeout: 244 seconds]
agentmeerkat has joined #ruby
cdg_ has quit [Ping timeout: 276 seconds]
wldcordeiro has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
northfurr has joined #ruby
diegoaguilar has quit [Ping timeout: 246 seconds]
A124 has joined #ruby
mistermocha has joined #ruby
idefine has quit [Remote host closed the connection]
bob434 has joined #ruby
idefine has joined #ruby
baweaver has quit [Remote host closed the connection]
drewo has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
BtcBen has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
bob434 has quit [Quit: This computer has gone to sleep]
someish has joined #ruby
mleung has quit [Quit: mleung]
intrigueD has quit [Remote host closed the connection]
<someish> I’m just getting back into ruby after being away for a few years. I wanted to refresh my memory and learn some new tricks by reading someone elses code. Is there a gem that I would want to look at that is considered canon?
drewo has quit [Ping timeout: 240 seconds]
<someish> Radar: Looks concise. Thanks!
tubuliferous has quit [Ping timeout: 250 seconds]
diegoaguilar has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
pawnbox has joined #ruby
Musashi007 has joined #ruby
hightower3 has quit [Ping timeout: 248 seconds]
toretore has quit [Ping timeout: 240 seconds]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> someish you could have a look at the source code of rack
<someish> shevy: Thanks. I’ll take a look at that after.
Cohedrin has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
fevrbd has quit [Quit: Lost terminal]
diprotic is now known as monoprotic
Devalo has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
rkazak has joined #ruby
jdawgaz has joined #ruby
benlieb has quit [Quit: benlieb]
Devalo has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
elifoster has quit [Ping timeout: 276 seconds]
lessless has joined #ruby
jjturner has quit [Ping timeout: 276 seconds]
cjbottaro has joined #ruby
toretore has joined #ruby
<havenwood> someish: Here's a Ruby quick ref as well: http://www.zenspider.com/Languages/Ruby/QuickRef.html
barajasfab has joined #ruby
sneakerhax has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
Salve has joined #ruby
bob434 has joined #ruby
blackgoat has quit [Ping timeout: 240 seconds]
rcvalle has quit [Quit: rcvalle]
Alayde has quit [Quit: WeeChat 1.1.1]
chipotle has quit [Quit: cheerio]
<havenwood> someish: As for code here's a good read: https://github.com/jeremyevans/roda
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<clorisu> anyone know whats going on here https://ghostbin.com/paste/nadh4
<Radar> ?rails clorisu
<ruby[bot]> clorisu: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<clorisu> kk
<Radar> clorisu: What's that on line 3 of your model?
<clorisu> hm
<clorisu> looks like a hashed password
htmldrum has joined #ruby
htmldrum_ has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
ledestin has joined #ruby
BtcBen has quit [Ping timeout: 252 seconds]
patrick-sartent has joined #ruby
jottr has joined #ruby
bob434 has quit [Quit: Leaving]
freerobby has joined #ruby
hotpancakes has joined #ruby
kfpratt has quit []
yoshie902a has joined #ruby
quakephil has quit [Ping timeout: 244 seconds]
Guest84748 is now known as olspookishmagus
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
baweaver has quit [Remote host closed the connection]
halfamind has joined #ruby
symm- has quit [Ping timeout: 268 seconds]
rbennacer has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
blackgoat has joined #ruby
yeoh has joined #ruby
northfurr has quit [Quit: northfurr]
djbkd has quit [Quit: My people need me...]
blackmesa has quit [Ping timeout: 244 seconds]
avenj has joined #ruby
Musashi007 has quit [Quit: Musashi007]
northfurr has joined #ruby
chrisja has quit [Quit: leaving]
nchambers has quit [Ping timeout: 260 seconds]
kam270 has joined #ruby
baweaver has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 244 seconds]
kam270 has quit [Client Quit]
drewo has joined #ruby
nchambers has joined #ruby
<bougyman> ok, why have I never had to do this before?
<bougyman> how do subtract a time (from a timer, not from wall time) from another? google just shows me DateTime/Time stuff.
<bougyman> but that doesn't help for "this took 1:27.16, that took 4:31.12", what's the difference in seconds?
yoshie902a has left #ruby [#ruby]
<bougyman> I've used postgres ::interval math for this before, but never ruby
marr has quit [Ping timeout: 268 seconds]
<bougyman> manveru: ^ ?
Snowy has quit [Read error: Connection reset by peer]
<bougyman> oh hell it's early in the morning hours for him.
baweaver has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
mistermocha has joined #ruby
tref has joined #ruby
<monoprotic> bougyman cant you subtract Time objects
<bougyman> yes but this is 1 minute, 27.16 seconds
drewo has quit [Ping timeout: 240 seconds]
<bougyman> from 4 minutes, 31.22 seconds
<bougyman> I guess I could coerce them into full Time objects.
<monoprotic> you could use math to represent the time in seconds if you'd rather do that
<monoprotic> then subtract
patrick-sartent has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mallu has joined #ruby
idefine has quit [Remote host closed the connection]
vikas027 has joined #ruby
<bougyman> Time.parse('0:4:03.21') - Time.parse('0:1:47.22')
<bougyman> => 135.99
<bougyman> it's the right answer
<bougyman> just looks so wrong
tpendragon has quit [Ping timeout: 268 seconds]
<monoprotic> why
<monoprotic> add 0s in the string ot make it look more normal if you want
uglybandersnatch has quit [Ping timeout: 276 seconds]
patrick-sartent has joined #ruby
fn2187___ has quit [Remote host closed the connection]
chipotle has joined #ruby
finisherr has quit [Quit: finisherr]
mistermocha has quit [Ping timeout: 248 seconds]
patrick-sartent has quit [Max SendQ exceeded]
uglybandersnatch has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
stannard has quit [Remote host closed the connection]
tpendragon has joined #ruby
<shevy> bougyman don't you have wrong formatting there?
nchambers has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
smathy is now known as smathy_afk
Es0teric has joined #ruby
nchambers has joined #ruby
Musashi007 has joined #ruby
jdawgaz has joined #ruby
idefine has quit [Ping timeout: 250 seconds]
Queitsch has quit [Quit: queitsch]
maletor has quit [Quit: Computer has gone to sleep.]
elifoster has joined #ruby
Snowy has quit [Quit: ragequit]
hotpancakes has joined #ruby
uglybandersnatch has quit [Ping timeout: 268 seconds]
Dimik has quit [Ping timeout: 246 seconds]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
nchambers has quit [Ping timeout: 240 seconds]
tref has quit [Read error: No route to host]
kam270 has joined #ruby
hotpancakes has quit [Ping timeout: 264 seconds]
nchambers has joined #ruby
maletor has joined #ruby
graffix has joined #ruby
sneakerhax has joined #ruby
hotpancakes has joined #ruby
Gasher has quit [Quit: Leaving]
pabs has quit [Ping timeout: 244 seconds]
pabs has joined #ruby
cjheath has joined #ruby
<cjheath> Upgraded to Ruby 2.2.2, seeing strange issues with class << self (exception “wrong argument type nil (expected Symbol)”). Fixed it in my code by calling singleton_class, but now it’s biting in RSpec. Anyone else seen this?
Inside has quit [Ping timeout: 260 seconds]
htmldrum_ has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
freerobby has quit [Quit: Leaving.]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kam270 has quit [Quit: Leaving]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
watersoul has quit [Remote host closed the connection]
watersoul has joined #ruby
patrick-sartent has joined #ruby
leon_e has joined #ruby
patrick-sartent has quit [Max SendQ exceeded]
BtcBen has joined #ruby
stannard has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
tref has joined #ruby
northfurr has quit [Quit: northfurr]
Gasher has joined #ruby
Regulati_ has joined #ruby
stannard has quit [Ping timeout: 248 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
maletor has quit [Quit: Computer has gone to sleep.]
kobain has joined #ruby
northfurr has joined #ruby
dc2 has joined #ruby
Snowy has joined #ruby
aspiers has quit [Ping timeout: 264 seconds]
ur5us has quit [Remote host closed the connection]
Uber|Dragon has joined #ruby
htmldrum_ has quit [Ping timeout: 252 seconds]
htmldrum has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 268 seconds]
Gasher has quit [Ping timeout: 244 seconds]
mank has joined #ruby
razer_ has joined #ruby
User458764 has joined #ruby
<razer_> Has anyone made a program for mac that can package a ruby file in a .app folder structure?
<razer_> I found a general purpose program that could do any scripts, but it didn't work.
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<razer_> I also tried replacing other folder with my ruby file and fixing things and it would tell me my app was powerpc
User458764 has quit [Client Quit]
<razer_> That is cool there is a ruby image in the background somehow. I didn't know IRC could do that.
`tim` has joined #ruby
jeffreylevesque has joined #ruby
rbennacer has quit [Remote host closed the connection]
jeffreylevesque has left #ruby [#ruby]
Musashi007 has joined #ruby
devbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
andywojo has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
KnownSyntax has quit [Ping timeout: 264 seconds]
diegoaguilar has quit [Ping timeout: 244 seconds]
cdg has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
halfamind has quit [Quit: Leaving.]
tjohnson has quit [Quit: Connection closed for inactivity]
andywojo has quit [Ping timeout: 260 seconds]
Ox0dea has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
halfamind has joined #ruby
northfurr has quit [Quit: northfurr]
devbug has joined #ruby
Devalo has joined #ruby
htmldrum_ has quit [Ping timeout: 240 seconds]
htmldrum has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
moei has quit [Quit: Leaving...]
Devalo has quit [Ping timeout: 240 seconds]
Melpaws has joined #ruby
nanoz has joined #ruby
<Melpaws> hi. Can i get schooled in some regex matching for a string ? Gist of the code and content i'm attempting https://gist.github.com/dylnnlsn/fd2a47ad95b1e59b93cd .
silentpost has joined #ruby
<Melpaws> cannot seem to get what i'm looking for :(
<Ox0dea> Melpaws: You've got unescaped *s in your values.
<Radar> TIL: Tempfile.new in Ruby 2.3 accepts no args, but in 2.2 it must be supplied with at least 1.
jcdesimp has joined #ruby
<Melpaws> would i escape those in the variables (value1 and value2) ?
<Ox0dea> Radar: Can't confirm?
<Radar> ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
diegoaguilar has joined #ruby
<Radar> Or maybe I did 2.2.2?
<Radar> Nope, 2.2.4 requires Tempfile.new to be passed one arg.
<Ox0dea> Well, Tempfile.new still takes an argument on 2.3.
<Radar> Indeed.
yeoh has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0/20160304115216]]
<Radar> I had a test pass on my machine (running 2.3) but fail on CI (running 2.2)
<Ox0dea> Ah, I misinterpreted "accepts no args".
<Ox0dea> Melpaws: Probably best to use Regexp.escape where you're interpolating them.
patrick-sartent has joined #ruby
<Melpaws> cool cool
<Melpaws> ty
<toretore> Melpaws: https://eval.in/541604
patrick-sartent has quit [Max SendQ exceeded]
<Melpaws> ah . Beautiful
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Ox0dea> Melpaws: Regexp.union(value1, '(.+?)', value2) is a little less noisy, but the principle's the same.
<Ox0dea> Er, ignore that.
Es0teric has quit [Quit: Computer has gone to sleep.]
<Melpaws> lol k
vikas027 has quit [Read error: Connection reset by peer]
blackgoat has quit [Ping timeout: 244 seconds]
<Ox0dea> It does do the escaping, but you just want concatenation here, which isn't quite what that method does.
<Melpaws> thanks . I will further into it . Regex makes my head spin sometimes ^>^
<Ox0dea> It's really a programming language all its own.
halfamind has quit [Quit: Leaving.]
<Ox0dea> >> :!@ == '!@'.to_sym
<ruby[bot]> Ox0dea: # => false (https://eval.in/541605)
Es0teric has joined #ruby
djbkd has joined #ruby
drewo has joined #ruby
David27 has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
uglybandersnatch has joined #ruby
duncannz has joined #ruby
duncannz has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
statelesscode has joined #ruby
patrick-sartent has joined #ruby
safe has joined #ruby
mondok has joined #ruby
Eiam has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
baweaver has joined #ruby
idefine has joined #ruby
halfamind has joined #ruby
northfurr has quit [Quit: northfurr]
SenpaiSilver has joined #ruby
SenpaiSilver_ has quit [Read error: Connection reset by peer]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
baweaver has quit [Ping timeout: 250 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
mank has quit [Quit: Textual IRC Client: www.textualapp.com]
xlegoman has quit [Quit: xlegoman]
Yzguy has joined #ruby
Caerus has joined #ruby
patrick-sartent has quit [Quit: Textual IRC Client: www.textualapp.com]
patrick-sartent has joined #ruby
fedexo has joined #ruby
Caerus is now known as Caerus
graffix has left #ruby [#ruby]
patrick-sartent has quit [Max SendQ exceeded]
BrunoSaboia has joined #ruby
Vile` has quit [Ping timeout: 250 seconds]
statelesscode has quit [Quit: statelesscode]
wilbert has joined #ruby
cdg has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
bopr has joined #ruby
BSaboia has quit [Ping timeout: 244 seconds]
<bopr> i'm having the strangest behavior in my "gets"
freerobby has joined #ruby
<bopr> when i print something to the screen followed by a gets, the console is blank, but after the next instruction comes in, then the program continues
arescorpio has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
blackgoat has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
halfamind has quit [Quit: Leaving.]
SenpaiSilver has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
kinduff has joined #ruby
<Ox0dea> bopr: Could you post a minimal example which doesn't behave as you expect?
rubynewbie has joined #ruby
<bopr> Ox0dea: basically I have a puts statement before a gets, and when i run the program i don't see the puts statement until i hit return. really weird. https://gyazo.com/25dd0d640f95a45dc8c48bd2a471c446
<rubynewbie> I need help with control flow on this guessing game that I am building. Even if you guess the proper number, it will continue to play the game and ask you to guess again. Here is my source code: http://pastebin.com/hdZA0hUN
<ruby[bot]> rubynewbie: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/bb1cce633d9f58973c9f
<ruby[bot]> rubynewbie: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Yzguy has quit [Quit: Zzz...]
codecop has joined #ruby
mank has joined #ruby
valetudo has quit [Ping timeout: 244 seconds]
<bopr> Ox0dea: i've narrowed it down to the puts that is causing issues. Working on something more complex with a prompt right now, and i can't see any puts "results" until i quit the program. infuriating.
<shevy> rubynewbie I tried your code. it exited when I input the right number
<rubynewbie> shevy: Did you run it from the command line?
<bopr> i have ruby 2.2.4p230 on windows 10 x64
<shevy> rubynewbie yeah always
<shevy> rubynewbie what I do not understand is why you add +1 to the number
<rubynewbie> I ran the program on command prompt. Windows 10
<rubynewbie> shevy: I actually made a dice rolling program right before and deleted it.
<rubynewbie> shevy: It is made in the same file
<rubynewbie> So I had a rolling method
kalimotxo has joined #ruby
agentmeerkat has quit [Read error: Connection reset by peer]
<rubynewbie> 1 = rand(6)
<rubynewbie> 1+ rand(6)*
<rubynewbie> I just didn't erase that part. Thanks for catching it
<shevy> yeah that one works because rand(6) will also return 0 sometimes
<rubynewbie> Oh yeah! I gotta add the rand in there for this program still
<rubynewbie> So it should look like this: number_to_guess = 1 + (max_number)
<rubynewbie> Right?
<rubynewbie> number_to_guess = 1 + rand(max_number)
<rubynewbie> I mean
<rubynewbie> shevy:
ericn81 has joined #ruby
<shevy> I don't understand you
<shevy> you ask the user for a number, then you add +1 to it
<shevy> why
<Ox0dea> bopr: Post code.
<bopr> Ox0dea: I've narrowed down the problem to the command prompt. basically "Git bash" which i'm using now for some reason likes the "gets" to execute before "puts" but it works fine in command prompt
<rubynewbie> Because it is going to generate a number between 1 and the max number
maletor has joined #ruby
<rubynewbie> shevy: The max number part is to make the program easier/harder, depending on the difficulty the user wants.
<rubynewbie> So they can make it a random number between 1-10 or 1-10000 if they wanted
patrick-sartent has joined #ruby
kalimotxo has quit [Ping timeout: 248 seconds]
patrick-sartent has quit [Quit: Textual IRC Client: www.textualapp.com]
<bopr> Ox0dea: the window on the right is waiting for input, the one on the left first printed "what is your name" and is waiting for input. window on the right isn't displaying the "what is your name":
Snowy has quit [Remote host closed the connection]
patrick-sartent has joined #ruby
abort has joined #ruby
patrick-sartent has quit [Client Quit]
<Ox0dea> bopr: The problem is either your environment or the code on the lines you didn't show in that image.
ramfjord has quit [Ping timeout: 252 seconds]
<bopr> Ox0dea: it's definitely the environment that's messing it up. Can you recommend me a better command prompt for windows? I like to be able to resize text size easily
fullofca_ has joined #ruby
someish has quit [Quit: someish]
<Ox0dea> bopr: Are you sure? If you posted the full program that's giving you trouble, I could help you check that assumption.
wilbert has quit [Ping timeout: 244 seconds]
<Ox0dea> rubynewbie: Yes, you'll want to use something like `rand(1..max_number)`, but your loop logic is way off.
<bopr> Ox0dea: the other lines were just debug that i 100% commented out. The program is literally 3 lines. After i did the side by side comparison i am confident the prompt that i was using was messing with the input
dikaio has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> rubynewbie: For starters, you're checking the guess against `max_number` rather than `number_to_guess`.
abort has quit [Quit: leaving]
<bopr> really appreciate your help though! I'm totally in love with ruby. When i learned hash tables can be created with one line I was in love
fullofcaffeine has quit [Ping timeout: 260 seconds]
dc2 has quit [Ping timeout: 246 seconds]
<bopr> everything is working perfectly in cmd!
abort has joined #ruby
<Ox0dea> bopr: Try putting a `STDOUT.flush` in after the first #puts call.
binaryplease2 has joined #ruby
patrick-sartent has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
<bopr> wow Ox0dea that actaully worked!
<Ox0dea> Yay! Your terminal's buffering semantics are weird.
sleeptime is now known as uptime
abort has quit [Client Quit]
<bopr> Ox0dea: what terminal are you using? I wanna be pro like you
abort has joined #ruby
fullofcaffeine has joined #ruby
<Ox0dea> bopr: I use st, but that's largely irrelevant. Most terminals are line-buffered by default, but maybe yours has a setting or something.
leon_e has quit [Remote host closed the connection]
binaryplease1 has quit [Ping timeout: 244 seconds]
Spami has quit [Quit: This computer has gone to sleep]
TheNet has joined #ruby
leon_e has joined #ruby
<bopr> Ox0dea: it's an "xterm" terminal on MINGW64 and i don't see any buffer options unfortunately
drewo has joined #ruby
silentpost has quit [Ping timeout: 240 seconds]
barajasfab has quit [Quit: Leaving]
joneshf-laptop has joined #ruby
fullofca_ has quit [Ping timeout: 260 seconds]
<bopr> Ox0dea: thank you so much for your help, i won't forget :)
<Ox0dea> bopr: The "real" xterm is pretty sane, but it does observe various escape sequences which change the mode it's in; maybe that's what happened? Hard to say from here.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> Anyhow, glad you got it sorted. :) Probably figure out how to get your terminal to be line-buffered before proceeding; having to preemptively flush stdout after every write "just in case" is full of suck.
braincra- has quit [Quit: bye bye]
DonOtreply has joined #ruby
vqrs has quit [Ping timeout: 248 seconds]
<bopr> Ox0dea: i'm gonna fix my vagrant lubuntu environment and go full linux in the future. can't stand the stupid "automatic updates need a restart" of w10
baweaver has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
<Ox0dea> bopr: I think that's a great idea.
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abort has quit [Quit: leaving]
abort has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
yqt has quit [Ping timeout: 240 seconds]
dexteryy has joined #ruby
dexteryy has quit [Max SendQ exceeded]
dexteryy has joined #ruby
cjbottaro has joined #ruby
safe has quit [Quit: Leaving]
crowell has quit [Ping timeout: 268 seconds]
uglybandersnatch has quit [Ping timeout: 244 seconds]
Musashi007 has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moei has joined #ruby
Tempesta is now known as ChoiKyuSang
dexteryy has quit [Max SendQ exceeded]
braincrash has joined #ruby
dexteryy has joined #ruby
abort has quit [Quit: leaving]
leon_e has quit [Quit: Konversation terminated!]
abort has joined #ruby
dexteryy has left #ruby [#ruby]
nando293921 has quit [Ping timeout: 244 seconds]
ChoiKyuSang is now known as Tempesta
maletor has quit [Quit: Computer has gone to sleep.]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> w10 is a good starter for linux!
nhhc has joined #ruby
leon_e has joined #ruby
treaki__ has joined #ruby
treaki_ has quit [Ping timeout: 260 seconds]
agentmeerkat has joined #ruby
mistermocha has joined #ruby
crowell has joined #ruby
andywojo has joined #ruby
abort has quit [Quit: leaving]
abort has joined #ruby
aspiers has joined #ruby
brent_ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brent_> Hi, had a question regarding accessing an instance variable from one class, inside another class
mistermocha has quit [Ping timeout: 268 seconds]
kinduff has quit [Quit: Textual IRC Client: www.textualapp.com]
andywojo has quit [Ping timeout: 240 seconds]
<brent_> I have a board class w/ an @grid to represent the board. I want to access @grid in a method in another class to make a list of all the possible [row, col] combinations
Hue_ has joined #ruby
<shevy> you access through a method
<Hue_> Anyone online rn?
pawnbox has joined #ruby
weaksauce has quit [Remote host closed the connection]
Hue_ has quit [Client Quit]
<brent_> can you elaborate
<brent_> @grid is an attr_accesor
pawnbox has quit [Remote host closed the connection]
<shevy> attr_accessor is still a method
<brent_> right
pawnbox has joined #ruby
<shevy> brent_ good explanation here http://stackoverflow.com/a/4371458/722915
<brent_> so both the board and player class are initialized as parameters when you initialize the game class
<shevy> yes that is one way
Yzguy has joined #ruby
<brent_> shevy http://hastebin.com/wuratuhaqa.rb this is the player class and how the game glass is created with it and board
gix has quit [Ping timeout: 248 seconds]
<brent_> how do i reference the board instance in the player class?
<brent_> is how i did workable, 'board.grid'
idefine has quit []
merida has joined #ruby
tref has quit [Quit: tref]
fedexo has quit [Ping timeout: 248 seconds]
howdoi has joined #ruby
stannard has joined #ruby
<shevy> yes you invoke the method called .grid there
<brent_> i understand that part
<shevy> ok but you have no method called board there
<shevy> so board.grid will evaluate to nil.grid
<brent_> right
codecop has quit [Remote host closed the connection]
<brent_> in my mind board should be the instance of the Board class it's calling .grid on
gix has joined #ruby
<shevy> yes you try that via @board = board
<shevy> but then you don't make use of @board
<shevy> you probably forgot a attr_accessor :board
<brent_> so my question is, if i added :board to attr_accessor
<brent_> and left the rest as is
<shevy> brent_ it may be easier if you write a class called Game that will handle all the different classes
<brent_> would it reference the correct board, even though I"m not passing a board instance as an argument to ComputerPLayer?
<shevy> you only need one instance of the game board
<shevy> you are not passing the board to ComputerPlayer
<shevy> so how can it know about it?
<brent_> exactly
dc2 has joined #ruby
<brent_> so i'm only initializing ComputerPLayer inside the game class, which has attr_accessor :player :board
<shevy> store @board as class level instance variable on class Game and call to it
stannard has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
<shevy> you can then access to it via Game.board, then you no longer need to use @board elsewhere
pawnbox has quit [Remote host closed the connection]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<brent_> so what if i did inside Game: def self.board_grid; @board.grid;end
<Ox0dea> Well, that's exactly what #attr_reader is for.
<shevy> brent_ yes that will work but you have to make sure that @board is initialized too
<brent_> then I could call Game.board_grid.each_with_index
<brent_> so board is initialized at the when you initialize Game
<shevy> yes
hotpancakes has quit [Remote host closed the connection]
yatish27 has joined #ruby
pawnbox has joined #ruby
ericn81 has quit [Remote host closed the connection]
DiCablo has joined #ruby
arescorpio has quit [Remote host closed the connection]
codecop has joined #ruby
freerobby has quit [Quit: Leaving.]
Musashi007 has quit [Quit: Musashi007]
saneax is now known as saneax_AFK
nocontrol has joined #ruby
Musashi007 has joined #ruby
krz has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
<brent_> appreciate your help shevy
<brent_> so the fact that Board and PLayer are being initialized at the same time within game, should allow the Player to access Game.board_grid within it's methods w/out having been passed any instance of Game/Board
abort has quit [Quit: leaving]
abort has joined #ruby
aspiers_ has joined #ruby
abort has quit [Client Quit]
aspiers has quit [Ping timeout: 268 seconds]
sauvin has joined #ruby
ixti has quit [Quit: WeeChat 1.4]
BtcBen has quit [Quit: ChatZilla 0.9.92 [Firefox 44.0.2/20160210153822]]
<shevy> yeah that is one way
<shevy> you could also pass the instance to each player when you invoke .new
<shevy> and there are probably more ways still
<shevy> you could even use $vars!
abort has joined #ruby
TheNet has joined #ruby
<shevy> or @@vars ... but these I hate
rrrepsaj has joined #ruby
pawnbox has quit []
dionysus69 has joined #ruby
tildes has joined #ruby
sneakerhax has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
krz has quit [Ping timeout: 264 seconds]
abort has quit [Client Quit]
ascarter has joined #ruby
pawnbox has joined #ruby
abort has joined #ruby
mleung has joined #ruby
<brent_> so the reason i didn't want to pass an instance of board to player is because they're being initialized at the same time as arguments to another method
solocshaw has quit [Ping timeout: 246 seconds]
LoneHermit has joined #ruby
<brent_> so Game.new(Player.new, Board.new)
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Inside has quit [Ping timeout: 260 seconds]
abort has quit [Client Quit]
jam_ has joined #ruby
abort has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
<brent_> @@vars are class variables, right? and $var global?
abort has quit [Client Quit]
abort has joined #ruby
Don_John has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
rrrepsaj has quit [Remote host closed the connection]
Yzguy has quit [Quit: Zzz...]
fullofcaffeine has joined #ruby
Yzguy has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
Yzguy has quit [Client Quit]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubynewbie has quit [Ping timeout: 250 seconds]
guatajuk has joined #ruby
leon_e has quit [Read error: Connection reset by peer]
leon_e has joined #ruby
hotpancakes has joined #ruby
fullofcaffeine has quit [Ping timeout: 260 seconds]
ascarter has joined #ruby
<Ox0dea> brent_: Player shouldn't have to know anything about Board; use Game to coordinate them.
ascarter has quit [Client Quit]
<brent_> thats what i'm going for
<brent_> 0x0dea
<brent_> so is my above Game class method to return @board.grid the best solution?
pwnd_nsfw has quit [Ping timeout: 248 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> brent_: Board just needs an `attr_reader :grid`, unless I've missed some nuance.
yfeldblum has quit [Ping timeout: 250 seconds]
hk238 has joined #ruby
<brent_> it does have that
elifoster has quit [Ping timeout: 240 seconds]
<brent_> so how would reference that inside another class?
<brent_> i'm just struggling to get my head around this concept
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
krz has joined #ruby
ninjaaron has joined #ruby
<ninjaaron> Is there an easy way to unpack array items for printf()?
<ninjaaron> kind of like str.format(*mylist) would do in python.
<brent_> 0x0dea http://hastebin.com/ililobolem.rb Has the different classes in 1 file
<brent_> i split the files by a hash line
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> >> '%d %f' % [42, 3.14] # ninjaaron
<ruby[bot]> Ox0dea: # => "42 3.140000" (https://eval.in/541629)
<ninjaaron> Ox0dea: thanks. great.
<Ox0dea> Sure thing.
aeterne has quit [Read error: Connection reset by peer]
fdisc has quit [Ping timeout: 248 seconds]
LoneHermit has quit [Read error: Connection reset by peer]
ericli has joined #ruby
<Ox0dea> brent_: A simpler game for demonstration purposes: https://eval.in/541630
finisherr has joined #ruby
<ericli> Hi, which class is to run command and capture output/check return value etc.. ?
ur5us has joined #ruby
ascarter has joined #ruby
<Ox0dea> Structuring it such that the computer is just a subclass of Player with custom logic for making a move keeps things pretty clean.
<Ox0dea> &ri Open3 ericli
ascarter has quit [Client Quit]
<ninjaaron> Ox0dea: I'm always trying to use perl idioms in ruby, because people always talk about the influence of perl syntax on ruby (which is significant), but a lot of things are at lot more like python. Maybe I should just do a tutorial and learn ruby for real...
<Ox0dea> ninjaaron: Yeah, that seems like a good idea. :)
Musashi007 has joined #ruby
<ericli> I saw someone is using Mixlib::ShellOut
<ericli>
ramfjord has joined #ruby
LoneHermit has joined #ruby
<Ox0dea> ninjaaron: Ruby is quite the hodge-podge, but *good* Ruby code tends to let the Smalltalk and Lisp influences shine through over the Perl one.
<Ox0dea> ericli: If you want an external dependency for what a standard library can do just as well, that's entirely your prerogative. Mixlib does provide various conveniences, but are you sure you need them?
<ericli> Ox0dea, I need to run a command then print out the output also check the return value
<Ox0dea> ericli: Yep, I read that part.
<ninjaaron> Ox0dea: I kind of like perl. I know that makes me a bad person, but I can't help it. I started programming with BASH, and perl is sort of like bash+sed+awk with more helpful types.
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<Ox0dea> ninjaaron: No, I don't see why that should make you a bad person. It's a tool like any other, and I'm sure the strengths and weaknesses balance, give or take.
<brent_> 0x0dea, i appreaciate your help, i have to go, but may try and bug you about this again next time i see you on
DonOtreply has quit [Quit: DonOtreply]
<Ox0dea> brent_: No worries. I'll see you around. :)
drewo has joined #ruby
<brent_> have a good night
<ninjaaron> Ox0dea: yeah. Perl doesn't scale super well, but for short scripts, it's pretty great. It's almost like the shorter the script is, the more awesome perl becomes, especially if the task is related to text transformation.
uglybandersnatch has joined #ruby
<Ropeney> ninjaaron, untill you need to remember how it does what it does
<Ox0dea> ninjaaron: Ruby was rather explicitly designed to ensure it met that niche, and I think it does so quite well.
Xiti has quit [Quit: Xiti]
drewo has quit [Ping timeout: 248 seconds]
Salve has quit [Remote host closed the connection]
th0m_ has quit [Remote host closed the connection]
WhoLettem has quit [Ping timeout: 250 seconds]
mgorbach has quit [Ping timeout: 248 seconds]
amclain has quit [Quit: Leaving]
BrunoSaboia has quit [Ping timeout: 268 seconds]
jam_ has quit [Remote host closed the connection]
Salve has joined #ruby
vqrs has joined #ruby
Disavowed has joined #ruby
ninjaaron has quit [Quit: WeeChat 1.4]
dionysus69 has quit [Ping timeout: 244 seconds]
<ericli> hi, how do I know what external Modules do I have in my ruby env?
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
mgorbach has joined #ruby
astrobun_ has joined #ruby
the_drow has joined #ruby
valetudo has joined #ruby
fdisc has joined #ruby
<ericli> Ox0dea, seems I cannot use open3
<ericli> Open3.capture2("factor", :stdin_data=>"42") , uninitialized constant Open3 (NameError)
<ericli> is that a standard module or I have to install it?
<Ox0dea> ericli: It's part of the standard library; you have to `require` it.
dionysus69 has joined #ruby
<ericli> oh okay
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<ericli> Ox0dea, how do I know what modules do I have in my env?
Musashi007 has quit [Quit: Musashi007]
<Ox0dea> ericli: You want the list of all instances of the Module class in your currently running program?
jam_ has joined #ruby
<ericli> Ox0dea, well, I would like to know what modules I have installed in my ruby env
blackmesa has joined #ruby
<Ox0dea> ericli: I think you want `gem list`?
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andywojo has joined #ruby
pablo has joined #ruby
valetudo has quit [Ping timeout: 244 seconds]
<pablo> which is the simplest active representer gem, these days?
agentmeerkat has quit [Ping timeout: 248 seconds]
Musashi007 has joined #ruby
<Ox0dea> pablo: Roar seems to fit the bill.
agentmeerkat has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Ping timeout: 246 seconds]
<pablo> Roar, seems like a serializing/deserializing gem to me
cjbottaro has joined #ruby
Es0teric has joined #ruby
<pablo> 0xdea, so far I have found this: https://github.com/neighborland/pres
<pablo> Ox0dea
LoneHermit has quit [Remote host closed the connection]
andywojo has quit [Ping timeout: 268 seconds]
rmulligan has joined #ruby
htmldrum_ has quit [Ping timeout: 276 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
<ericli> Ox0dea, I am using ruby 1.8.7 and I can do require 'open3' but could don't use any method: http://fpaste.org/344481/88006961/
<Ox0dea> pablo: Ah, you meant "presenter", then. Have you found that one to be deficient, or?
<Ox0dea> ericli: Why 1.8.7?
fullofcaffeine has joined #ruby
<Radar> ericli: Capital O.
<ericli> Radar, no, even Open3 still does not work.
nocontrol has quit [Remote host closed the connection]
<ericli> Ox0dea, it'a RHEL machine and just using 1.8.7
<ericli> any idea why this does not work?
merida_ has joined #ruby
<Radar> What happens when you try capital o
<ericli> NoMethodError: undefined method `capture2e' for Open3:Module
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> Likely that the method was only added in a recent version of Ruby
<Ox0dea> ericli: It's called `poutput2e` on 1.8.7.
<Radar> Upgrade your Ruby version
jcdesimp has quit [Remote host closed the connection]
<Radar> And with that, goodnight.
Macaveli has joined #ruby
patrick-sartent has quit [Quit: .]
<ericli> Ox0dea, where can I find poutput2e doc?
<Ox0dea> ericli: It's the same method as `capture2e`, it's just been renamed since 1.8.7.
cd-rum has joined #ruby
merida has quit [Ping timeout: 248 seconds]
<Ox0dea> You really should consider upgrading unless you're a masochist.
<Ox0dea> And even then, there are better hurts to be had.
<ericli> Ox0dea, okay.. so what about other methods in open3? I think it would be better to get a doc.
fullofcaffeine has quit [Ping timeout: 276 seconds]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheNet has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
mleung has quit [Quit: mleung]
Dimik has joined #ruby
yfeldblum has joined #ruby
patrick-sartent has joined #ruby
tildes has quit [Ping timeout: 248 seconds]
<ericli> thanks, I updated
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Es0teric has quit [Quit: Computer has gone to sleep.]
<pablo> Ox0dea, seems underdocumented also, uses method missing, which I don't like.
haraoka has joined #ruby
LoneHerm_ has joined #ruby
djbkd has quit [Remote host closed the connection]
<toretore> why don't you like method_missing?
djbkd has joined #ruby
blackgoat has quit [Ping timeout: 260 seconds]
yatish27 has quit [Remote host closed the connection]
<pablo> I rather have the least possible magic, although you probably end up using indirectly somewhere...
htmldrum has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
htmldrum_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<Dimik> hey guyze
the_drow has quit [Quit: This computer has gone to sleep]
LoneHerm_ has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
JohnBat26 has joined #ruby
<Dimik> maybe some one awake i'm thinking of how to convert basketball time string "3rd 9:59" to seconds integer
ayonkhan has joined #ruby
<Dimik> where "3rd" is 3rd quater of the game
djbkd has quit [Ping timeout: 244 seconds]
<Dimik> so that'd be something like 12(60) + 12(60) + 9(60) + 59
<Ox0dea> Seems like you've got everything you need?
Salve has quit [Remote host closed the connection]
<Dimik> pretty much exept for not a clue on how to put it together
UKn0Me has joined #ruby
<Dimik> for instance how to let ruby know thar "3rd" means 12(60) + 12(60)
djbkd has joined #ruby
<Ox0dea> >> p, m, s = '3rd 9:59'.scan(/\d+/).map(&:to_i); p.pred * 720 + m * 60 + s # Dimik
<ruby[bot]> Ox0dea: # => 2039 (https://eval.in/541655)
uglybandersnatch has quit [Ping timeout: 276 seconds]
<Dimik> <3
<toretore> so you can have a string that starts with "1st", "2nd", "3rd" or "4th"
<Ox0dea> Dimik: But, er, what exactly does that represent?
<Dimik> yes
<Ox0dea> That's neither elapsed time nor time remaining.
<Dimik> those are the quarters of the game, each quarter is 12 minutes
<toretore> then a space, and then two numbers representing minutes and seconds separated by a :
<hk238> :o
hightower3 has joined #ruby
<Dimik> you guys are genius, i want to be just like you when i grow up
<toretore> to simplify, you can say that the "quarter" and "elapsed time" parts are separated by a string
<toretore> by a space, i mean
<Ox0dea> Alternatively, just pluck out the numbers...
<Dimik> yeah that'd be great
<toretore> which is like using Time.parse, crossing your fingers and hoping for the best ;)
mr_robot_ has joined #ruby
<Dimik> :D
<toretore> to be successful at computer you must think like computer
uglybandersnatch has joined #ruby
<toretore> computer think only concrete, discrete thing, human think abstract and vague
<ericli> how do I check if a string matches a regexp pattern? seems if str =~ /exp/ does not work.
<Ox0dea> ericli: Like that.
<toretore> >> "string" =~ /str/
<ruby[bot]> toretore: # => 0 (https://eval.in/541657)
<ericli> >> "pid 7702 exit 0" =~ /exit 0/
Disavowed has quit [Quit: leaving]
<ericli> O_o
<ericli> does not work?
<toretore> >> "pid 7702 exit 0" =~ /exit 0/
<ruby[bot]> toretore: # => 9 (https://eval.in/541658)
<ericli> so what I'm trying to do is to get the exit status by using Open3.capture2e
<ericli> but the doc does not mention how to get exit status
jorum has joined #ruby
<toretore> gist your code
<ericli> toretore, fixed already, using .to_i == 0 to check
<ericli> but I'm confused that the doc does not mention that
jam_ has quit [Remote host closed the connection]
<ericli> I googled some then I know.
chipotle has quit [Quit: cheerio]
Guest-ru has quit [Read error: Connection reset by peer]
nocontrol has joined #ruby
<Ox0dea> ericli: Process::Status has #success?, for what that's worth.
pawnbox has joined #ruby
poguez_ has joined #ruby
<Ox0dea> >> ['.success?', '.to_i == 0'].map(&:size)
<ruby[bot]> Ox0dea: # => [9, 10] (https://eval.in/541665)
<Ox0dea> And it's even shorter!
<Ox0dea> Ruby loves you and wants you to be happy.
Devalo has joined #ruby
rmulligan has quit [Ping timeout: 240 seconds]
<ericli> Ox0dea, I am using .to_i to check the exit code, is that reliable?
<ericli> rollback_msg, ollback_status = Open3.capture2e("#{rollback_cmd}")
<ericli> if yinst_rollback_status.to_i == 0
<Ox0dea> ericli: If you want the actual exit code, sure, but you're just checking whether or not the command succeeded.
<ericli> is that okay?
<ericli> Ox0dea, yes, just wanna know if it is succeeded.
<Ox0dea> ericli: There's a method for that. :P
moeabdol has quit [Quit: WeeChat 1.4]
hotpancakes has joined #ruby
<ericli> Ox0dea, you mean to_i == 0 ?
cdikny has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
leon_e has quit [Quit: Konversation terminated!]
nocontrol has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
mr_robot_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has joined #ruby
hotpancakes has quit [Ping timeout: 268 seconds]
nocontrol has joined #ruby
leon_e has joined #ruby
Musashi007 has quit [Quit: Musashi007]
ta_ has quit [Remote host closed the connection]
jam_ has joined #ruby
hotpancakes has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stardiviner has joined #ruby
Guest67598 has joined #ruby
PaulCape_ has joined #ruby
<Guest67598> sup
Guest67598 is now known as [Tyrant]
<[Tyrant]> sup
guatajuk has quit [Quit: guatajuk]
PaulCapestany has quit [Ping timeout: 276 seconds]
<[Tyrant]> anyone in charge awake?
ericli has quit [Ping timeout: 240 seconds]
rrrepsaj has joined #ruby
<UKn0Me> happy easter
solars has quit [Ping timeout: 250 seconds]
lurch_ has joined #ruby
devbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
rrrepsaj has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
AlexRussia has quit [Ping timeout: 246 seconds]
Guest61911 has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
Disavowed has joined #ruby
Mon_Ouie has joined #ruby
<Disavowed> How would I access a module level variable from another class? I've declared like this? module A @var = 'test' but I can't get to it with A.var or A::var and now I'm questioning what little I know about scoping in Ruby.
scepticulous has joined #ruby
<toretore> `module A; @var = 'test'; end` doesn't make any sense. what are you trying to do?
firstdayonthejob has joined #ruby
<Ox0dea> Sure it does.
PaulCapestany has joined #ruby
<Ox0dea> Module-level instance variables are a perfectly reasonable thing to use.
kp666 has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
<Disavowed> toretore: 0x0dea if it's not idiomatic I guess I could put it in a class, but that feels boilerplate-y
<Ox0dea> It's not unidiomatic, but it still might not be the right thing.
PaulCape_ has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Read error: Connection reset by peer]
<Ox0dea> Disavowed: Here's a couple ways to do it: https://eval.in/541670
<toretore> Ox0dea: you're right, for some cases it would make sense
JohnBat26 has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
<toretore> but it's not something i've ever done
<Disavowed> 0x0dea: Fantastic! TIL singleton_class and attr_reader!
<Ox0dea> \o/
uglybandersnatch has quit [Ping timeout: 264 seconds]
solars has joined #ruby
<Disavowed> Thank you both
<Disavowed> Although it sounds like I'm doing it wrong!
daniel_ has joined #ruby
<Disavowed> I'm going to reevaluate my approach. Thank you both again
<Ox0dea> You may well be. Say more about what you're trying to do?
noname has quit [Ping timeout: 240 seconds]
<Ox0dea> I only ever use module-level ivars as a way to avoid using globals.
leon_e has quit [Quit: Konversation terminated!]
<Ox0dea> `MyNamespace.thing_which_needs_to_be_assignable_from_wherever = foo`
ramfjord has quit [Ping timeout: 260 seconds]
<Dimik> :]
<Disavowed> 0x0dea: That seems like a good use case. My one does not. Let me knock up a pastebin explaining it better.
finisherr has quit [Quit: finisherr]
<[Tyrant]> can someone remind me of Radar’s other ROR chan, i dont log...
<Ox0dea> [Tyrant]: #RubyOnRails?
<[Tyrant]> or JR’s
<Disavowed> Here's an undoubtedly awful approach to what I was trying to do: https://eval.in/541672
Cohedrin has joined #ruby
<[Tyrant]> who goes by pipework these days
rmulligan has joined #ruby
<Ox0dea> pipework still goes by pipework.
kp666 has joined #ruby
<Ox0dea> Disavowed: I'm intrigued. ^_^
<Disavowed> 0x0dea: That can't be a good sign!
<[Tyrant]> im banned from #rubyonrails because of radar
<[Tyrant]> he is dramatic
ta_ has joined #ruby
Rahul_Roy has joined #ruby
<[Tyrant]> so i was invited to another chan
<[Tyrant]> i cant remember it this late
<Ox0dea> Disavowed: I reckon the most idiomatic approach here would be to keep track of subclasses of Algorithm.
<Ox0dea> But, well, MergeSort shouldn't really be a class, so that'd be a little egregious.
mark4 has joined #ruby
<Disavowed> 0x0dea: If it helps, it's just to show code on a front end; there's no plans to run it (yet!)
skade has quit [Read error: Connection reset by peer]
<toretore> i usually use constants for this purpose
skade has joined #ruby
<toretore> Algorithms::MERGESORT
merida_ has quit [Remote host closed the connection]
aufi has joined #ruby
<Disavowed> toretore: I think that's what I was hopelessly trying to do. It feels more natural. Then again, I'm new to Ruby, so take that with a pinch of salt.
devbug has joined #ruby
modin has quit [Ping timeout: 264 seconds]
<Disavowed> 0x0dea: Would keeping track of subclasses just require me to use .ancestors and .descendants, or is there something more logical?
noname has joined #ruby
<toretore> Algorithms.mergesort "looks nicer", but it is still effectively a constant
modin has joined #ruby
Ropeney has joined #ruby
flughafen has quit [Ping timeout: 268 seconds]
<Ox0dea> Disavowed: The #inherited hook fires during subclassing.
JohnBat26 has quit [Read error: Connection reset by peer]
<Disavowed> 0x0dea: Nice. I'll look into that now.
rmulligan has quit [Ping timeout: 268 seconds]
jorum has quit [Ping timeout: 268 seconds]
andikr has joined #ruby
JohnBat26 has joined #ruby
<Ox0dea> Disavowed: This "works", but the necessity of the `this` there should let you know that it's pretty not great: https://eval.in/541673
noname has quit [Ping timeout: 244 seconds]
bricker has quit [Ping timeout: 260 seconds]
andywojo has joined #ruby
djellemah has quit [Ping timeout: 276 seconds]
<Disavowed> 0x0dea: TIL define_singleton_method and p; I should come here more often!
* TheGreatGudsby has quit (K-Lined)
aganov has joined #ruby
Blue_Ice has joined #ruby
Blue_Ice has joined #ruby
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
andywojo has quit [Ping timeout: 260 seconds]
flughafen has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
A124 has quit [Quit: '']
<Disavowed> Alright, off to work to half-heartedly sling Python :( Thanks for all your help 0x0dea and toretore, appreciate you both taking the time.
jam_ has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
n008f4g_ has joined #ruby
A124 has joined #ruby
<Ox0dea> Disavowed: Python has the vast majority of Ruby's goodness hiding under the covers, but I'm fine with that being kept a secret. :P
pablo has quit [Quit: Leaving]
TheGreatGudsby has quit [Quit: You had my curiosity. But now you have my attention]
brent_ has quit [Quit: Connection closed for inactivity]
<Disavowed> 0x0dea: Have you tried metaprogramming in Python?! I've only been doing Ruby about 3 weeks now but I'm consistently impressed with the thought that has gone into designing it. I think I'm leaving Python!
noname has joined #ruby
<Dimik> gnite
<Disavowed> 0x0dea: Also I don't think we have method_missing, which looks pretty incredible
<Ox0dea> Disavowed: I freely concede that metaprogramming is *significantly* more pleasant in Ruby.
<Disavowed> 0x0dea: or dynamic dispatch, unless you bully a dict lookup I guess
<Ox0dea> Disavowed: You'd be surprised just how much of Ruby and Python is "dict bullying".
blackmesa has joined #ruby
<Disavowed> 0x0dea: I'm reading metaprogramming Ruby currently and I feel like I didn't know what metaprogramming was, coming from Python!
<Disavowed> 0x0dea: You're probably right.
<Ox0dea> Ha! That's a fair assessment, I think; it's not really the done thing there.
<Ox0dea> It's not hidden either, mind, you just have to dig a little past the surface.
<Ox0dea> Well, it's not hidden *well*. :P
<Ox0dea> __sore_thumb__
<Disavowed> 0x0dea: Even the Google Python Style Guide discourages using it in any form, which should tell you something.
hotpancakes has joined #ruby
<Disavowed> I don't miss __this_thing__ at all.
<Disavowed> Alright, later. Thanks again!
<Ox0dea> Au revoir!
_blizzy_ has quit [Quit: Leaving]
[Tyrant] has quit [Quit: [Tyrant]]
tvw has joined #ruby
Dimik has quit [Ping timeout: 244 seconds]
cd-rum has joined #ruby
Disavowed has quit [Quit: leaving]
blackmesa has quit [Ping timeout: 268 seconds]
leon_e has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
jaruga has joined #ruby
benlieb has joined #ruby
jaruga is now known as jaruga_
symm- has joined #ruby
Tyrant has joined #ruby
Tyrant has quit [Client Quit]
Guest61911 has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
gh has joined #ruby
<adaedra> Hello
the_drow has joined #ruby
firstdayonthejob has quit [Ping timeout: 264 seconds]
RalfJ has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
merida has joined #ruby
hotpancakes has joined #ruby
davee_ has joined #ruby
leon_e has quit [Quit: Konversation terminated!]
mfaeh has joined #ruby
jorum has joined #ruby
leon_e has joined #ruby
Queitsch has joined #ruby
DoubleMalt has joined #ruby
futilegames has quit [Quit: futilegames]
hotpancakes has quit [Ping timeout: 264 seconds]
<Ropeney> hello adaedra
ReK2 has quit [Ping timeout: 260 seconds]
Couch has joined #ruby
finisherr has joined #ruby
lxsameer has joined #ruby
rmulligan has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
jaruga has joined #ruby
astrobun_ has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
astrobun_ has joined #ruby
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
skade has joined #ruby
yosafbridge has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 240 seconds]
tenderlove has quit [Ping timeout: 260 seconds]
rmulligan has quit [Ping timeout: 248 seconds]
MonsterMunch has joined #ruby
n008f4g_ has quit [Ping timeout: 248 seconds]
Pumukel has joined #ruby
ReK2 has joined #ruby
ledestin has joined #ruby
djbkd has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 244 seconds]
sergey_makagon has joined #ruby
madhatter has quit [Ping timeout: 252 seconds]
astrobun_ has quit [Remote host closed the connection]
madhatter has joined #ruby
futilegames has joined #ruby
patrick-sartent has quit [Quit: .]
pandaant has joined #ruby
patrick-sartent has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
mank has joined #ruby
cpup has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #ruby
mank has quit [Max SendQ exceeded]
TheNet has quit [Quit: Textual IRC Client: www.textualapp.com]
cpup has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
lurch_ has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
daniel_ has quit [Remote host closed the connection]
cjheath has quit [Ping timeout: 250 seconds]
cjheath_ has joined #ruby
SCHAAP137 has joined #ruby
marr has joined #ruby
terminalrecluse has joined #ruby
tenderlove has joined #ruby
uglybandersnatch has joined #ruby
joonty has joined #ruby
hotpancakes has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
terminalrecluse has quit [Ping timeout: 260 seconds]
the_drow has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
tristanp has joined #ruby
Snowy has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
TheNet has quit [Client Quit]
joonty has quit [Quit: Leaving]
joonty has joined #ruby
ferr has joined #ruby
nanoz has quit [Ping timeout: 240 seconds]
pandaant has quit [Remote host closed the connection]
djellemah has joined #ruby
pandaant has joined #ruby
yfeldblum has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
mrgrieves has joined #ruby
bluOxigen has joined #ruby
JohnBat26 has joined #ruby
hotpancakes has joined #ruby
bluOxigen_ has quit [Ping timeout: 244 seconds]
nettoweb has joined #ruby
mank has joined #ruby
tenderlove has quit [Ping timeout: 276 seconds]
mank has quit [Client Quit]
kam270 has joined #ruby
blackmesa has joined #ruby
astrobunny has quit [Quit: Leaving...]
lkba has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Ping timeout: 252 seconds]
kam270 has quit [Max SendQ exceeded]
mdw has joined #ruby
FooMunki has joined #ruby
kam270 has joined #ruby
mdw has quit [Client Quit]
tenderlove has joined #ruby
benlieb has quit [Quit: benlieb]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
gh has quit [Quit: Leaving]
yfeldblum has quit [Ping timeout: 250 seconds]
mondok has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
<stardiviner> I found DCI paradigm in this link: http://www.sitepoint.com/dci-the-evolution-of-the-object-oriented-paradigm/ , I found it has "include Context", I don't know where the "Context" from?
parduse has joined #ruby
JohnBat26 has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
JohnBat26 has joined #ruby
mfaeh has quit [Remote host closed the connection]
haraoka has quit [Ping timeout: 240 seconds]
aspiers_ is now known as aspiers
toretore has quit [Ping timeout: 244 seconds]
andywojo has joined #ruby
f4cl3y has joined #ruby
dsivia has joined #ruby
scepticulous has quit [Quit: Konversation terminated!]
dsivia is now known as scepticulous
GreyHands has joined #ruby
<apeiros> what the heck?
mfaeh has joined #ruby
<apeiros> >> nil[:x] = 1
<ruby[bot]> apeiros: # => nil (https://eval.in/541747)
<apeiros> >> nil.method(:[]=)
<ruby[bot]> apeiros: # => undefined method `[]=' for class `NilClass' (NameError) ...check link for more (https://eval.in/541748)
yfeldblum has joined #ruby
* apeiros wonders whether this is a parser oddity…
mfaeh has quit [Remote host closed the connection]
mfaeh has joined #ruby
<apeiros> though… no. it's the same with a variable
andywojo has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
JohnBat26 has quit [Read error: Connection reset by peer]
<apeiros> maybe a bug introduced with the save navigation operator?
JohnBat26 has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
bricker has joined #ruby
yosafbridge has joined #ruby
skade has joined #ruby
jorum has quit [Quit: Lost terminal]
tenderlove has quit [Ping timeout: 252 seconds]
Snowy has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
<hightower3> Hey, what's some good OAuth2.0 server in Ruby?
stardiviner has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
workmad3 has joined #ruby
bricker has quit [Ping timeout: 248 seconds]
chihhsin has quit [Quit: leaving]
Lomex has quit [Quit: Leaving...]
jam_ has joined #ruby
chipotle has joined #ruby
Gasher has quit [Quit: Leaving]
Devalo has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
sepp2k has joined #ruby
jam_ has quit [Ping timeout: 244 seconds]
futilegames has quit [Quit: futilegames]
evidex has joined #ruby
fexilal has joined #ruby
beatdown has quit [Ping timeout: 240 seconds]
<apeiros> Ox0dea: why am I not surprised that I get an answer from you on that :D
futilegames has joined #ruby
<Ox0dea> You know me to be a creature of curiosity?
User458764 has joined #ruby
Bugboy1028 has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
stardiviner has joined #ruby
Bugboy1028 has joined #ruby
<apeiros> do I read that correctly as being a bugfix?
<apeiros> curiosity is an understatement
<Ox0dea> I remembered seeing it on the issue tracker. `git blame ChangeLog` + /aset == mystery solved.
beatdown has joined #ruby
yosafbridge has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 264 seconds]
<Ox0dea> Well, it's certainly not intended behavior.
MonsterMunch has left #ruby [#ruby]
uglybandersnatch has quit [Ping timeout: 246 seconds]
araujo has joined #ruby
araujo has joined #ruby
<Ox0dea> >> :!@ == '!@'.to_sym # What the heck? ;)
<ruby[bot]> Ox0dea: # => false (https://eval.in/541795)
<adaedra> You already got this one yesterday iirc
araujo has quit [Max SendQ exceeded]
<Ox0dea> I hadn't shown apeiros yet.
ta_ has quit [Remote host closed the connection]
araujo has joined #ruby
<apeiros> >> :!@
<ruby[bot]> apeiros: # => :! (https://eval.in/541800)
<apeiros> ast>> :!@
<ruby[bot]> apeiros: I have parsed your code, the result is at https://eval.in/541801
<apeiros> what's the @ in there?
<Ox0dea> Unary operator.
<Ox0dea> >> %i[+@ -@ !@ ~@]
<ruby[bot]> Ox0dea: # => [:+@, :-@, :"!@", :"~@"] (https://eval.in/541804)
<apeiros> no I mean, why does ruby parse it as :!, and omit the @
<Ox0dea> It's done quite deliberately in the parser in order to prevent #! and #~ being defined as binary operators.
<apeiros> I'd understand it if you have to quote it, but how come a trailing plain @ is not giving a syntax error?
<Ox0dea> I think it's a bad move, but there's surely some historical rationale.
<apeiros> >> :"!@"
<ruby[bot]> apeiros: # => :"!@" (https://eval.in/541805)
<apeiros> vs
<apeiros> >> :!@
<ruby[bot]> apeiros: # => :! (https://eval.in/541806)
<apeiros> look at the return value. the @ is dropped. but if it's not considered to be part of the symbol literal, then how come it's not a syntax error?
<adaedra> !@ and ! is the same for ruby, apparently
<Ox0dea> Just so.
<Ox0dea> Lemme find the spot in parse.y.
<bhaak> has anybody tried to mock/overwrite I18n.translate?
moeabdol has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<apeiros> bhaak: anybody is corrently not online. maybe just ask your question?
<adaedra> ?anybody
<ruby[bot]> jhass is anybody
<apeiros> though, potentially you'd be better of asking in #rubyonrails
<adaedra> L8k+
<adaedra> NOPE
<bhaak> I wanted to do that for a test but ran into problems as it is implemented as "module I18n; extend(Module.new {def translate; ...; end } ... "
<bhaak> apeiros: nope, I mean the ruby gem, not the stuff used by rails.
<Ox0dea> bhaak: You want to get hold of an anonymous Module?
saneax is now known as saneax_AFK
<apeiros> I don't see why it'd matter from where a method is coming in order to mock it
<apeiros> and you can always get hold of the owner of a method easily: I18n.method(:translate).owner
yosafbridge has joined #ruby
hotpancakes has joined #ruby
<bhaak> apeiros: yeah, I got as far but it didn't work when I tried to overwrite the translate method for this module, it didn't stick. the original one was still being called
elcontrastador has quit [Ping timeout: 264 seconds]
<apeiros> then maybe it's not called via I18n.translate
DenSchub_ is now known as DenSchub
<bhaak> maybe, I'd have to test again if I checked every case because of the alias :t :translate
<bhaak> in the end I did I18n.extend(Module.new { def t!(key, options={}); ...; end }) in the before and redefining it back in the after block. but that feels dirty and I don't have a clue why it didn't work the other way
<Ox0dea> bhaak: Maybe look into Module#prepend.
hotpancakes has quit [Ping timeout: 264 seconds]
tenderlove has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<bhaak> Ox0dea: prepend always gives me headaches. every time I read it up I think I understand and then run into problems using it. :-/
<bhaak> but I'll have to do a proper minimal example first. I just wanted to be sure that I didn't overlook something obvious and simple.
<gregf_> hello. is there a limit on how many thread can be running at the same time?
<gregf_> *threads
<gregf_> i've got a 16 cpu machine. if i start 100 threads .. they launch.. but if i start 200 .. nothing moves forward :|
yfeldblum has quit [Ping timeout: 268 seconds]
mark4 has left #ruby ["PART #jquery :PART ##javascript :PONG :sendak.freenode.net"]
yfeldblum has joined #ruby
waxxy has joined #ruby
<bhaak> gregf_: how does the load of your machine look like?
<Ox0dea> bhaak: It's pretty straightforward, really; the prepended Module goes at the front of the ancestor chain and is thus first in line for deciding whether or not to respond to a given method.
<Ox0dea> You can `super` up into the original, and use #remove_method to get out of the way entirely.
<apeiros> gregf_: threads use filehandles, so if your OS limits a process' number of filehandles, then that'd be an issue.
saneax_AFK is now known as saneax
<apeiros> also since ruby now backs threads with OS native threads, the OS might directly limit the number of threads too
Snowy has joined #ruby
<gregf_> oh, nevrmind. problem with my coe :|
<gregf_> *doce
<gregf_> *cries*
<gregf_> s/doce/code/
User458764 has joined #ruby
<gregf_> apeiros: bhaak thanks anyways!
<bhaak> Ox0dea: that's how I think it should work but I seem to more often than not get it wrong anyway. but the idea with #remove_method could be handy sometimes. thanks
<Ox0dea> bhaak: No worries. It's usually much better than mucking about with alias chains and the like.
<Ox0dea> #unprepend would be nice, but that'd pave the way for full-on ancestor modification.
noname has quit [Ping timeout: 260 seconds]
<scepticulous> I am using bundle install --deployment to create a production ready version of my app locally (for building a docker image) and all gems are written to vendor/bundle correctly but, using bundle exec always complains about the executable not being there. So bundle exec rails s fails because it does not find rails
lq has joined #ruby
<lq> Website Address Views Money Earned Action Earned Today
lq has left #ruby [#ruby]
<yorickpeterse> such spam
<yorickpeterse> wow
devbug has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<scepticulous> I think my question is ruby related, since it seems to be a bundler question and less rails related. Just as a note
<yorickpeterse> scepticulous: make sure you also include the .bundle/.bundler (can't remember which one it was) directory
<yorickpeterse> since that actually tells bundler to use vendor/...
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jam_ has joined #ruby
<scepticulous> yorickpeterse: I will try that, thanks.
cd-rum has joined #ruby
Devalo has joined #ruby
finisherr has quit [Quit: finisherr]
minimalism has quit [Quit: minimalism]
finisherr has joined #ruby
finisherr has quit [Client Quit]
mfaeh has quit [Remote host closed the connection]
jam_ has quit [Ping timeout: 240 seconds]
mrgrieves has quit [Ping timeout: 250 seconds]
noname has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Salve has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
ceej has quit [Ping timeout: 248 seconds]
bakedb has quit [Read error: Connection reset by peer]
ceej has joined #ruby
bakedb has joined #ruby
Salve has quit [Ping timeout: 268 seconds]
mrgrieves has joined #ruby
hotpancakes has joined #ruby
ramfjord has joined #ruby
valetudo has joined #ruby
waxxy has quit [Quit: Textual IRC Client: www.textualapp.com]
JohnBat26 has quit [Read error: Connection reset by peer]
mprelude_ is now known as mprelude
hotpancakes has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
n008f4g_ has joined #ruby
lkba has joined #ruby
biberu has joined #ruby
tvw has quit []
weckl has joined #ruby
Snowy is now known as Pray4PotionSelle
htmldrum_ has quit [Ping timeout: 268 seconds]
htmldrum has quit [Ping timeout: 268 seconds]
diegoaguilar has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
hotpancakes has joined #ruby
User458764 has joined #ruby
jorum has joined #ruby
ayonkhan has quit [Ping timeout: 240 seconds]
Pray4PotionSelle is now known as Snowy
hotpancakes has quit [Ping timeout: 252 seconds]
liquid-silence has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MonsterMunch_ has joined #ruby
blackgoat has joined #ruby
ldnunes has joined #ruby
codebeef has joined #ruby
tristanp_ has joined #ruby
MonsterMunch_ has quit [Ping timeout: 244 seconds]
trinaldi has joined #ruby
stardiviner has quit [Ping timeout: 244 seconds]
mrgrieves has quit [Read error: Connection reset by peer]
tristanp has quit [Ping timeout: 248 seconds]
MonsterMunch has joined #ruby
sdothum has joined #ruby
but3k4 has joined #ruby
B4daBing73 has joined #ruby
mrgrieves has joined #ruby
chridal_ is now known as chridal
chridal has quit [Changing host]
chridal has joined #ruby
elaptics`away is now known as elaptics
MonsterMunch_ has joined #ruby
blackgoat has quit [Read error: Connection reset by peer]
MonsterMunch has quit [Ping timeout: 268 seconds]
MonsterMunch_ is now known as MonsterMunch
blackmesa has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
stardiviner has joined #ruby
MonsterMunch has quit [Ping timeout: 246 seconds]
andikr has quit [Remote host closed the connection]
Synthead has quit [Ping timeout: 252 seconds]
MonsterMunch_ has joined #ruby
davee_ has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
tristanp_ has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
Gasher has joined #ruby
pandaant has quit [Remote host closed the connection]
merida has quit [Remote host closed the connection]
dionysus69 has joined #ruby
bricker has quit [Ping timeout: 240 seconds]
LoganG has quit [Ping timeout: 246 seconds]
nirakara has joined #ruby
nirakara has left #ruby ["Leaving"]
skade has joined #ruby
Synthead has joined #ruby
krz has quit [Ping timeout: 264 seconds]
nhhc has quit [Ping timeout: 240 seconds]
djellemah has quit [Ping timeout: 268 seconds]
<shevy> is something awesome going on right now
hotpancakes has joined #ruby
Vile` has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
B4daBing73 has quit [Quit: Leaving]
hotpancakes has quit [Ping timeout: 260 seconds]
ayonkhan has joined #ruby
Pip has joined #ruby
<Pip> So how is Ruby today?
leon_e has quit [Quit: Konversation terminated!]
wethu has quit [Quit: This computer has gone to sleep]
araujo_ has joined #ruby
jorum has quit [Ping timeout: 276 seconds]
wethu has joined #ruby
araujo_ has quit [Max SendQ exceeded]
dc2 has quit [Ping timeout: 248 seconds]
araujo_ has joined #ruby
<shevy> I dunno, I am still trying to wake up
<Pip> okay
araujo has quit [Ping timeout: 248 seconds]
araujo_ has quit [Max SendQ exceeded]
trifling-jest has joined #ruby
trifling-jest has quit [Client Quit]
abort has quit [Quit: leaving]
lkba_ has joined #ruby
merida has joined #ruby
hs366 has quit [Quit: Leaving]
lkba has quit [Ping timeout: 240 seconds]
chihhsin has joined #ruby
CloCkWeRX has quit [Ping timeout: 244 seconds]
abort has joined #ruby
halfamind has joined #ruby
ruby-lang959 has joined #ruby
TvL2386 has joined #ruby
xpt has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
oliver___ has joined #ruby
jgpawletko has quit [Ping timeout: 244 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-lang959> looking for a way to encrypt an html file using ruby... any pointers?
mistermocha has quit [Ping timeout: 244 seconds]
mfaeh has joined #ruby
mondok has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
<Pip> ruby-lang959, No, I know almost nothing about ruby
but3k4 has joined #ruby
<shevy> ruby-lang959 lol
abort has quit [Quit: leaving]
abort has joined #ruby
deuterium has joined #ruby
Mon_Ouie has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
davedev24 has joined #ruby
evidex has quit [Read error: Connection reset by peer]
ruby-lang959 has quit [Quit: Page closed]
tvw has joined #ruby
CloCkWeRX has joined #ruby
kobain has joined #ruby
Vile` has quit [Ping timeout: 264 seconds]
mank has joined #ruby
nfk|laptop has joined #ruby
krz has joined #ruby
abort has quit [Client Quit]
abort has joined #ruby
mank has quit [Max SendQ exceeded]
mank has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
waxxy has joined #ruby
mank has quit [Max SendQ exceeded]
waxxy is now known as waxjar
someish has joined #ruby
mank has joined #ruby
jgpawletko has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
halfamind has quit [Quit: Leaving.]
mank has quit [Max SendQ exceeded]
cpup has joined #ruby
mank has joined #ruby
stardiviner has quit [Ping timeout: 246 seconds]
mank has quit [Max SendQ exceeded]
evidex has joined #ruby
mank has joined #ruby
mank has quit [Max SendQ exceeded]
mank has joined #ruby
abort has quit [Quit: leaving]
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
abort has joined #ruby
blackmesa has joined #ruby
<Pip> shevy, what's funny?
<shevy> Pip how anyone could come up with something as random as "encrypt a .html file using ruby"
halfamind has joined #ruby
<olspookishmagus> how does one run ruby in interpreter fashion like that? http://pastie.org/pastes/10772326/text
merida has quit [Remote host closed the connection]
<olspookishmagus> ah, "irb" it is
davedev2_ has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
stannard has joined #ruby
Mon_Ouie has quit [Ping timeout: 244 seconds]
MonsterMunch_ has left #ruby [#ruby]
hotpancakes has joined #ruby
<olspookishmagus> Well it does not look exactly like what I showcased, but seems to be working as expected.
blackmesa has quit [Ping timeout: 244 seconds]
j3r0 has joined #ruby
ChiefAlexander has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
davedev2_ has quit [Read error: Connection reset by peer]
<shevy> olspookishmagus you can redefine the IRB prompt to have the same output
moos3 has joined #ruby
davedev24 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
artmann has quit [Quit: No Ping reply in 180 seconds.]
artmann has joined #ruby
<shevy> in particular the entry for IRB.conf[:PROMPT]
cpup has quit [Ping timeout: 244 seconds]
edwinvdgraaf has joined #ruby
<olspookishmagus> ok, thanks shevy
jam_ has joined #ruby
plonk has quit [Read error: Connection reset by peer]
cpup has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
johnmilton has joined #ruby
marr has quit [Ping timeout: 240 seconds]
skade has joined #ruby
stannard has quit [Remote host closed the connection]
plonk has joined #ruby
plonk has quit [Changing host]
plonk has joined #ruby
joonty has quit [Ping timeout: 244 seconds]
JakFrist has joined #ruby
<Pip> shevy, I don't see that's funny at all, but serious
andywojo has joined #ruby
<shevy> Pip lol was it you?
jam_ has quit [Ping timeout: 276 seconds]
<Pip> No, of course not
cpup has quit [Ping timeout: 264 seconds]
Uber|Dragon has quit [Ping timeout: 244 seconds]
<shevy> ;)
cpup has joined #ruby
rodfersou has joined #ruby
<Pip> shevy, I'm a ruby newbie that wouldn't ask such a professional question like that
<shevy> Pip now you are winging it
DexterLB has left #ruby ["Leaving"]
jolts has quit [Quit: changing servers]
jolts has joined #ruby
anisha has joined #ruby
jolts has quit [Max SendQ exceeded]
anisha has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
<Pip> shevy, I thought Ruby 4.0 has been out
<Pip> That's why I came here to take a look today
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
<shevy> Pip come on man
<adaedra> Ruby 4 is not planned out before a long time iirc
stardiviner has joined #ruby
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
joonty has joined #ruby
jolts has joined #ruby
Melpaws has quit [Ping timeout: 248 seconds]
gmas has quit [Ping timeout: 244 seconds]
terminalrecluse has joined #ruby
<Pip> So the goddamn forum lied to me
<Pip> Maybe it was Rails
<adaedra> People do that, go to the internet and tell lies!?
<adaedra> Rails is on 4.2.6 right now, and 5 is supposed to be coming soon
nanoz has joined #ruby
tjvc has quit [Quit: Leaving]
terminalrecluse has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
scepticulous has quit [Ping timeout: 240 seconds]
futilegames has quit [Quit: futilegames]
deuterium has quit [Ping timeout: 250 seconds]
gmas has joined #ruby
jolts has quit [Ping timeout: 252 seconds]
nando293921 has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
lkba_ has quit [Ping timeout: 244 seconds]
fmcgeough has joined #ruby
CloCkWeRX has left #ruby [#ruby]
ta_ has joined #ruby
fmcgeough_ has joined #ruby
<shevy> ruby 5!
<shevy> php jumped over one version, ruby can jump over two!
Devalo has quit [Remote host closed the connection]
<adaedra> php is not a model.
fmcgeough has quit [Ping timeout: 244 seconds]
fmcgeough_ is now known as fmcgeough
<Pip> Ruby 6
<Pip> I bet Ruby 6 will be more powerful than C++2020
deuterium has joined #ruby
but3k4 has quit [Ping timeout: 240 seconds]
binaryplease2 has quit [Quit: WeeChat 1.4]
binaryplease has joined #ruby
skislak has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
<shevy> yeah
<shevy> then ruby will be at perl version
kies has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
hotpancakes has joined #ruby
but3k4 has joined #ruby
oliver___ has quit []
swills has joined #ruby
marr has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
skislak_ has joined #ruby
skislak_ has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
`tim` has joined #ruby
sarbs has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
ferr has quit [Quit: WeeChat 1.4]
malconis has joined #ruby
mleung has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
hgl has joined #ruby
hgl has quit [Max SendQ exceeded]
JohnBat26 has joined #ruby
hgl has joined #ruby
malconis has joined #ruby
stannard has joined #ruby
vdamewood has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 244 seconds]
clorisu has quit [Ping timeout: 244 seconds]
linux99x has joined #ruby
vdamewood has quit [Max SendQ exceeded]
stannard has joined #ruby
floatingpoint has joined #ruby
codecop has quit [Remote host closed the connection]
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has joined #ruby
ChiefAlexander has joined #ruby
Pip has quit [Ping timeout: 244 seconds]
Pip has joined #ruby
chouhoulis has quit [Remote host closed the connection]
heinrich5991 has quit [Ping timeout: 276 seconds]
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
hotpancakes has joined #ruby
rbennacer has joined #ruby
Uber|Dragon has joined #ruby
heinrich5991 has joined #ruby
dravine has quit [Quit: dravine]
Pip has quit [Ping timeout: 252 seconds]
clorisu has joined #ruby
zotherstupidguy has joined #ruby
fullofcaffeine has joined #ruby
polysics has quit []
lkba has joined #ruby
wilbert has joined #ruby
idletask has quit [Ping timeout: 260 seconds]
cpruitt has joined #ruby
bricker has joined #ruby
lessless has joined #ruby
bricker has quit [Ping timeout: 244 seconds]
lessless has quit [Client Quit]
idletask has joined #ruby
JakFrist has joined #ruby
callen92 has joined #ruby
moeabdol has joined #ruby
Karix has joined #ruby
haraoka has joined #ruby
whippythellama has joined #ruby
wilbert has quit [Ping timeout: 244 seconds]
zotherstupidguy has quit [Ping timeout: 248 seconds]
Guest-ru has joined #ruby
perlgod has joined #ruby
Vile` has joined #ruby
hotpancakes has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 276 seconds]
wilbert has joined #ruby
bry4n has joined #ruby
uglybandersnatch has joined #ruby
clorisu has quit [Ping timeout: 260 seconds]
cwenner has joined #ruby
freerobby has joined #ruby
<zacts> hello rubyists
ChiefAlexander has quit [Remote host closed the connection]
blandflakes has joined #ruby
<shevy> yo zacts
<zacts> yo yo
uglybandersnatch has quit [Ping timeout: 244 seconds]
marr has quit [Ping timeout: 246 seconds]
scepticulous has joined #ruby
mbff has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
ixti has joined #ruby
blandflakes has quit [Client Quit]
fullofcaffeine has joined #ruby
<mbff> What am I doing wrong here: https://gist.github.com/marshallford/16fd8a40d7793f4795ea This is a route in my Sinatra app. I get the error: ArgumentError at /api/v1/links wrong number of arguments (given 1, expected 2..4)
<mbff> In all the guides I have seen know one passes other args
LoneHerm_ has joined #ruby
blandflakes has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofca_ has joined #ruby
wilbert has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
hotpancakes has joined #ruby
mistermocha has joined #ruby
_stu_ has joined #ruby
dfas has joined #ruby
nando293921 has quit [Ping timeout: 268 seconds]
iwmrby has joined #ruby
LoneHerm_ has quit [Ping timeout: 252 seconds]
<dfas> has anyone here read Practical Object-Oriented Design in Ruby by Metz?
smathy has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bricker has quit [Ping timeout: 260 seconds]
rbennace_ has joined #ruby
rbennace_ has quit [Remote host closed the connection]
RegulationD has joined #ruby
rbennacer has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 240 seconds]
rbennace_ has joined #ruby
hotpancakes has quit [Ping timeout: 268 seconds]
ascarter has joined #ruby
blandflakes has joined #ruby
mary5030 has joined #ruby
roshanavand_ has joined #ruby
cpup has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
ascarter has quit [Client Quit]
andikr has joined #ruby
mary5030 has joined #ruby
Blaze_Boy has joined #ruby
kies has joined #ruby
cpup has joined #ruby
Regulati_ has quit [Ping timeout: 244 seconds]
weemsledeux has joined #ruby
alexherbo2 has quit [Ping timeout: 244 seconds]
haylon has joined #ruby
neilhwatson has joined #ruby
clorisu has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
diegoaguilar has quit [Read error: Connection reset by peer]
cjbottaro has joined #ruby
mbff has quit [Remote host closed the connection]
rodfersou is now known as rodfersou|lunch
<abort> dfas: great, great book
diegoaguilar has joined #ruby
mrgrieves has quit [Ping timeout: 264 seconds]
crazydiamond has joined #ruby
mrgrieves has joined #ruby
haraoka has quit [Ping timeout: 240 seconds]
acosonic has joined #ruby
<acosonic> Hi all, how in code should I access following variable: http://prntscr.com/aje40q
ChiefAlexander has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
<apeiros> ?crosspost acosonic
<ruby[bot]> acosonic: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
<acosonic> ok
scepticulous has quit [Ping timeout: 248 seconds]
bricker has joined #ruby
<gregf_> class/static/globals variables can really mess up threads :|
<apeiros> no. improperly accessing them otoh can.
klaas has quit [Max SendQ exceeded]
hotpancakes has joined #ruby
klaas has joined #ruby
jam_ has joined #ruby
<gregf_> apeiros: yes
astrobunny has joined #ruby
stannard has quit [Remote host closed the connection]
<gregf_> i've written a client that uses Net::HTTP for making 1000 requests in 1000 threads with a sleep. and the sleep always ended up as 1000 save for some few
<gregf_> *i'd
<gregf_> stress testing a Java conversion service
prestorium has joined #ruby
jam_ has quit [Ping timeout: 260 seconds]
yorickpeterse1 has joined #ruby
console has joined #ruby
hotpancakes has quit []
Es0teric has joined #ruby
rippa has joined #ruby
dionysus69 has joined #ruby
dn` has quit [Quit: dn`]
connor_g1odwolf has joined #ruby
dn` has joined #ruby
lkba has quit [Remote host closed the connection]
Gasher has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
kenichi_ has joined #ruby
nocontro_ has joined #ruby
j416_ has joined #ruby
hyperdri- has joined #ruby
pjaspers has joined #ruby
df- has joined #ruby
D9- has joined #ruby
dfas has quit [*.net *.split]
floatingpoint has quit [*.net *.split]
abort has quit [*.net *.split]
mfaeh has quit [*.net *.split]
DoubleMalt has quit [*.net *.split]
joneshf-laptop has quit [*.net *.split]
skweek has quit [*.net *.split]
nofxx has quit [*.net *.split]
kenichi has quit [*.net *.split]
ozzloy_ has quit [*.net *.split]
duderonomy has quit [*.net *.split]
alnewkirk has quit [*.net *.split]
RTG` has quit [*.net *.split]
edwardly has quit [*.net *.split]
axisys has quit [*.net *.split]
e has quit [*.net *.split]
D9 has quit [*.net *.split]
tw1sted has quit [*.net *.split]
berserk_ren has quit [*.net *.split]
hyperdrive has quit [*.net *.split]
reaVer has quit [*.net *.split]
callumacrae has quit [*.net *.split]
df has quit [*.net *.split]
jrod has quit [*.net *.split]
pjaspers_ has quit [*.net *.split]
Cyrus has quit [*.net *.split]
linduxed has quit [*.net *.split]
skakri has quit [*.net *.split]
bitemyapp has quit [*.net *.split]
m4rCsi_ has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
Brando753 has quit [*.net *.split]
Kim^J has quit [*.net *.split]
j416 has quit [*.net *.split]
z3uS has quit [*.net *.split]
yorickpeterse has quit [*.net *.split]
j416_ is now known as j416
<waxjar> gregf_ stress-testing using ruby?
chouhoulis has joined #ruby
<gregf_> well, yeah. so i used threads
Brando753 has joined #ruby
<gregf_> just making http requests
jrod has joined #ruby
griffindy has joined #ruby
scepticulous has joined #ruby
console is now known as e
nocontrol has quit [Ping timeout: 252 seconds]
davedev24 has quit [Ping timeout: 268 seconds]
acosonic has quit [Quit: acosonic]
riceandbeans has quit [Ping timeout: 244 seconds]
nocontro_ has quit [Ping timeout: 240 seconds]
riceandbeans has joined #ruby
riceandbeans has quit [Changing host]
riceandbeans has joined #ruby
lkba has joined #ruby
cdg has joined #ruby
Es0teric has quit [Read error: Connection reset by peer]
nocontrol has joined #ruby
Es0teric has joined #ruby
David27 has joined #ruby
dikaio has joined #ruby
drale2k has quit [Ping timeout: 264 seconds]
acosonic has joined #ruby
Blaze_Boy has quit [Ping timeout: 276 seconds]
Sammichmaker has quit [Quit: Leaving]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Es0teric has quit [Read error: No route to host]
Es0teric has joined #ruby
AlexRussia has joined #ruby
Cyrus has joined #ruby
<shevy> global variables mess up threads as well gregf_?
floatingpoint has joined #ruby
duderonomy has joined #ruby
skweek has joined #ruby
Cyrus is now known as Guest36566
<dopie> how do i update my system ruby to the most recent version?
rodfersou|lunch is now known as rodfersou
<j2k> dopie Depends on your system
<dopie> mac osx 10
mary5030_ has joined #ruby
<dopie> yosemite
<lagweezle> homebrew! <3
perlgod_ has joined #ruby
<dopie> lagweezle: im trying to update the system one because vim keeps on using it...
<shevy> dopie come to linux!
Trynemjoel has quit [Quit: Quitting]
<dopie> shevy: I did... I prefer mac osx better honestly
<dopie> i actually switched from linux to mac
Devalo has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
* neilhwatson is going to be assigned a mac book next week and will miss linux :(
jhn has joined #ruby
Kim^J has joined #ruby
skakri has joined #ruby
reaVer has joined #ruby
berserk_ren has joined #ruby
DoubleMalt has joined #ruby
callumacrae has joined #ruby
alnewkirk has joined #ruby
bitemyapp has joined #ruby
edwardly has joined #ruby
axisys has joined #ruby
joneshf-laptop has joined #ruby
RTG` has joined #ruby
linduxed has joined #ruby
z3uS has joined #ruby
abort has joined #ruby
mfaeh has joined #ruby
ozzloy_ has joined #ruby
nofxx has joined #ruby
tw1sted has joined #ruby
m4rCsi_ has joined #ruby
merida has joined #ruby
poguez_ has joined #ruby
callumacrae has quit [Max SendQ exceeded]
<dopie> sooo
Trynemjoel has joined #ruby
Es0teric has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
perlgod has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 276 seconds]
JakFrist has joined #ruby
workmad3_ has joined #ruby
ijij has quit [Ping timeout: 248 seconds]
audiodude has quit [Ping timeout: 248 seconds]
kam270 has quit [Ping timeout: 260 seconds]
Devalo has quit [Ping timeout: 276 seconds]
Norrin has quit [Ping timeout: 248 seconds]
cdg has quit [Remote host closed the connection]
mary5030_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
audiodude has joined #ruby
Blaze_Boy has joined #ruby
ijij has joined #ruby
mary5030 has joined #ruby
JakFrist has quit [Client Quit]
mank has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> "If you want to install a more recent version of Ruby, you can:"
<shevy> "Buy the latest version of Mac OS X, which may have a more recent version of Ruby."
<shevy> :D
cdg_ has joined #ruby
<Canar> wow, the documentation for to_yaml options is really bad
<Canar> seems to be known but unfixed for years
hgl has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Read error: Connection reset by peer]
sadin has joined #ruby
<shevy> here is the way to improve on it: file a request at https://bugs.ruby-lang.org/projects/ruby-trunk/issues?set_filter=1&tracker_id=2
callumacrae has joined #ruby
JohnBat26 has joined #ruby
armyriad has joined #ruby
acosonic has quit [Quit: acosonic]
polishdub has joined #ruby
Norrin has joined #ruby
<gregf_> neilhwatson: doesn't a mac use a linux kernel?
<Canar> not linux
<neilhwatson> BSD
<Canar> bsd-based
<gregf_> just that the keyboard is messed up
<n1colas> o/
GreyHands has quit [Quit: Textual IRC Client: www.textualapp.com]
<gregf_> *cares very little about microsoft, apple and oracle* :|
acosonic has joined #ruby
<bougyman> anyone know of a lib that adds stopwatch times?
nocontrol has quit [Remote host closed the connection]
<Canar> "stopwatch" times?
<bougyman> 1:33.44 + 7:42.12 where that''s Minutes:Seconds.Precision
<bougyman> yes
<bougyman> I can't google for it cause I just get Time operations
<bougyman> I don't know what else to call it
<Canar> yeah well it's pretty easy to transform a Time object to that format
dionysus69 has quit [Ping timeout: 276 seconds]
<bougyman> this seems like it wouldn't be uncommon
amargherio has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<bougyman> I know when I've done it before I converted to seconds first then did math then converted back.
TvL2386 has quit [Ping timeout: 268 seconds]
<Ox0dea> That's the right approach.
<bougyman> just figured someone would have made an EasyButton lib for it at some point
chouhoulis has joined #ruby
<Canar> lists a few gems
dionysus69 has joined #ruby
<Canar> as well as good discussion on how to diy
<bougyman> Canar: that's not quite it.
<bougyman> I can't make a time object out of just intervals
drale2k has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
<Canar> ...
<Canar> if you say so
<bougyman> Canar: how could I?
<Canar> Did you even read the replies?
<bougyman> there's no 'Time' in : it took an hour and 40 minutes and 12.21 seconds.
<bougyman> yes
rattatmatt has joined #ruby
<Canar> Well then, I'm sorry, I don't have the time to explain further.
User458764 has joined #ruby
workmad3_ is now known as workmad3
nando293921 has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
vasilakisfil has joined #ruby
<vasilakisfil> a closure in Ruby (and other languages) encapsulates the environment that is defined on.. how can I achieve the opposite? I want do define something in place A, call it in place B and reference variables from place B
Trynemjoel has joined #ruby
stardiviner has quit [Ping timeout: 244 seconds]
<adaedra> vasilakisfil: you can change the context of a lambda with instance_exec
kfpratt has joined #ruby
<adaedra> but it won't work with variables, only instance variables/methods/self
marxarelli has joined #ruby
<adaedra> there may be something in binding tho
dikaio_ has joined #ruby
Shaboum has joined #ruby
dikaio has quit [Ping timeout: 252 seconds]
Salve has joined #ruby
amclain has joined #ruby
moeabdol has joined #ruby
aufi has quit [Quit: Konversation terminated!]
mondok has quit [Ping timeout: 240 seconds]
halfamind has quit [Read error: Connection reset by peer]
KINGSABRI has joined #ruby
halfamind has joined #ruby
ascarter has joined #ruby
<lagweezle> bougyman: could try using the word 'interval' maybe?
<KINGSABRI> Hello! I'm using Fiddle importer to interact with some Windows API and it works well but I cant parse with it's retrun which is something line that #<Fiddle::Pointer:0x1e87fb0 ptr=0x7678ea71 size=0 free=0x000000>
<KINGSABRI> I need the ptr value
<KINGSABRI> so if I but prt method it gives me another value
moeabdol has quit [Ping timeout: 268 seconds]
<KINGSABRI> is there any parser or a way to parse that Fiddle::Pointer object ?
nfk|laptop has quit [Quit: yawn]
Karix has quit [Read error: Connection reset by peer]
<hanmac> did you guys hear that story from that AI from Microsoft? it was a chatbot which was programmed to learn, but after the Bot does say that it hates feminists, she got "reprogrammed" ;P
rattatmatt has quit [Remote host closed the connection]
rattatmatt has joined #ruby
<Ox0dea> KINGSABRI: It's not perfectly clear what you're asking. If you're trying to go from that Fiddle::Pointer to a Ruby object, you want #to_value.
<Canar> hanmac: They found a loophole that they could use to get it to repeat content verbatim.
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<KINGSABRI> @0x0dea I'm asking if I can parse the returned Fiddle::Pointer object
<shevy> an AI with a loophole! fear skynet 3.0!!!
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
<KINGSABRI> 0x0dea so I can have an access to "ptr=0x7678ea71" value
<Ox0dea> KINGSABRI: You can just call #ptr on it...
<KINGSABRI> I don't want to convert it to string using inspect then parse it as string and use regex
howdoi has joined #ruby
<Ox0dea> Yeah, don't do that.
araujo has joined #ruby
d0nn1e has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
rattatmatt has quit [Ping timeout: 276 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind1 has joined #ruby
<KINGSABRI> if I use .ptr it returns me another object #<Fiddle::Pointer:0x12bff68 ptr=0x77d8050b size=0 free=0x000000> with a new ptr value
LoneHermit has joined #ruby
d0nn1e has joined #ruby
nobitanobi has joined #ruby
JoshGlzBrk has joined #ruby
JoshGlzBrk has quit [Client Quit]
<KINGSABRI> 0xdea so the same issue remains
Shaboum has quit [Quit: WeeChat 1.4]
<Ox0dea> KINGSABRI: Right, sorry. `ptr.to_value.object_id` should do the trick.
rbennace_ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<KINGSABRI> 0x0dea I tried it and it returns wrong value
<Ox0dea> KINGSABRI: Are you sure?
the_drow has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
LoneHermit has quit [Ping timeout: 268 seconds]
maletor has quit [Client Quit]
ascarter has joined #ruby
<Ox0dea> KINGSABRI: Whoops. You'll need to double it as well. https://eval.in/541942
zapata has quit [Quit: WeeChat 1.4]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has joined #ruby
blandflakes has joined #ruby
<vasilakisfil> interesting! thanks adaedra. it worked like a charm! Changing the context of a lambda is not an expensive operation, is it ?
<adaedra> dunno.
<PaulePanter> Hi. Do you know of a current article comparing rescue use in Ruby 2.1 or 2.2?
zapata has joined #ruby
<PaulePanter> … showed that if the exception is the exception, that it’s faster than if.
mostlybadfly has quit [Quit: Connection closed for inactivity]
blandflakes has quit [Client Quit]
blandflakes has joined #ruby
baweaver has joined #ruby
<KINGSABRI> that's is the core idea
<KINGSABRI> it's windows base example, ofcourse
pawnbox has quit [Ping timeout: 252 seconds]
<lagweezle> PaulePanter: Good! I hate Python's use of exceptions as standard flow control mechanisms.
deuterium has quit [Ping timeout: 244 seconds]
sergey_makagon has quit []
<PaulePanter> lagweezle: What is good? It looks like, if it’s really an exception, then that should be also used with Ruby.
merida has quit [Remote host closed the connection]
tjohnson has joined #ruby
halfamind1 has quit [Read error: Connection reset by peer]
hightower2 has joined #ruby
<PaulePanter> … and still the same with Ruby 2.2.
halfamind has joined #ruby
<ytti> lagweezle, python and ruby code idiomatically use exceptions in very similar manner
maletor has joined #ruby
<smathy> PaulePanter, if you're worried about tenths of a second over millions of iterations, Ruby's the wrong language for you.
Apocalypse has quit [Ping timeout: 264 seconds]
DarkBushido has quit [Ping timeout: 246 seconds]
<PaulePanter> smathy: Very true. ;-)
rubie has joined #ruby
scepticulous has quit [Ping timeout: 276 seconds]
<havenwood> PaulePanter: A quick benchmark-ips shows the lonely person operator from Ruby 2.3 is faster than rescue.
<lagweezle> PaulePanter: I like that the article is saying that the use of exception handling as a flow-control mechanism is bad(-ish), because I dislike the idiom of try/except (or rescue) in place of if-statements, and such.
<smathy> ...and also, nodes&.first ftw - yay 2.3
ericli has joined #ruby
scepticulous has joined #ruby
<lagweezle> ytti: I've not encountered that in Ruby yet. Lucky me? ;)
<smathy> lagweezle, yeah, they're called "exceptions" for a reason.
mistermocha has joined #ruby
<PaulePanter> Thank you everyone! As always you helped me quite a lot!
<lagweezle> They take it a step (or many?) towards worse at work, too, and wrap a ton of lines in the 'try' part, with 'except Exception' at the end of the entire mess... -.-
snockerton has joined #ruby
* PaulePanter unfortunately still uses Ruby 2.1.5.
hightower3 has quit [Ping timeout: 260 seconds]
sadin has quit [Ping timeout: 264 seconds]
<havenwood> PaulePanter: Anyways, don't use exceptions for flow control!: https://gist.github.com/havenwood/6e21d98015aab10dcb8a
saneax is now known as saneax_AFK
<PaulePanter> havenwood: I won’t.
M-shine has joined #ruby
<havenwood> PaulePanter: It's a good idea to at least bump to the latest teeny 2.1.8 if you're on 2.1.
SCHAAP137 has quit [Remote host closed the connection]
nocontrol has joined #ruby
<havenwood> "We are planning to release Ruby 2.1.9 by the end of March. After the release, we will end the normal maintenance phase of 2.1, and start the security maintenance phase of it."
<PaulePanter> havenwood: I use the Debian stable package, which carries the security fixes.
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<havenwood> PaulePanter: Ah, good. :)
mistermocha has quit [Ping timeout: 250 seconds]
<PaulePanter> havenwood: Your example only tried the case, when the exception occurs, right?
<PaulePanter> The standard case should be, when no exception occurs.
aganov has quit [Remote host closed the connection]
<lagweezle> ytti: Just to make sure, did you mean they both use them for if-else flow control, or the general "do things that might blow up then rescue when they do blow up" ?
DarkBushido has joined #ruby
DarkBushido has joined #ruby
weemsledeux has quit [Quit: Textual IRC Client: www.textualapp.com]
<ytti> lagweezle, idiomatic python and ruby code does not use it for if-else
<ytti> (i must confess, i sometimes do, but my says girls like bad boys)
<havenwood> PaulePanter: Same speed in that case.
baweaver has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
<floatingpoint> yo. I should see the string printed when I use: case some_string; when /.+\(3\),$/; puts some_string; if some_string = "beep (3),", right?
joonty has quit [Ping timeout: 240 seconds]
<havenwood> PaulePanter: Though a better warmup for rescue.
rkazak has quit [Ping timeout: 240 seconds]
KensoDev has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
<havenwood> PaulePanter: Here's an Array versus nil: https://gist.github.com/havenwood/6e21d98015aab10dcb8a
<lagweezle> ytti: Er, https://docs.python.org/2/glossary.html entry for EAFP suggests otherwise.
cjbottaro has joined #ruby
rcvalle has joined #ruby
pawnbox has joined #ruby
iwmrby has quit [Quit: WeeChat 1.4]
rbennacer has joined #ruby
scepticulous has quit [Ping timeout: 244 seconds]
alexherbo2 has joined #ruby
M-Kodo has joined #ruby
<PaulePanter> havenwood: http://paste.debian.net/418587/
Pumukel has quit [Ping timeout: 276 seconds]
Apocalypse has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
nanoz has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
akp has joined #ruby
silentpost has joined #ruby
<akp> hello. this is probably a stupid question, but how does one install jruby?
perlgod_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ytti> lagweezle, my python exposure is thin, so maybe i'm wrong, but i've not seen that used more commonly in python than in ruby
mr_blue has joined #ruby
<mr_blue> hi all
perlgod has joined #ruby
<PaulePanter> akp: You can use a Ruby manager like RVM.
<ytti> lagweezle, but the example of existance of keys is good point, python does not return false value when accessing non-existing keys
<havenwood> akp: Through your package manager, install it yourself or use a tool like ruby-install or RVM.
<lagweezle> ytti: Sadly it seems to be somewhat common practice in Python. It makes my skin crawl.
<havenwood> akp: The #jruby channel is helpful as well.
<PaulePanter> akp: Depending on your needs it might be packaged in your distribution.
nocontrol has quit [Remote host closed the connection]
perlgod has quit [Max SendQ exceeded]
cpup has quit [Ping timeout: 244 seconds]
<PaulePanter> akp: apt install jruby
nobitanobi has joined #ruby
snockerton has quit [Quit: Leaving.]
<ytti> generally that's huge complaint i have in python, it just does not feel high level language
<ytti> heck, rust has more convenience methods/functions in standard
<ytti> in python you need to reimplement super common stuff yourself
Cone3 has joined #ruby
perlgod has joined #ruby
Gasher has quit [Quit: Konversation terminated!]
<akp> is there an rvm package for centos?
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scepticulous has joined #ruby
<ytti> i'm not sure why python maintains this, rich high quality methods in standard objects in ruby is huge selling point to me
<havenwood> akp: If there is, don't use it.
<akp> or can i do gem install rvm?
cpup has joined #ruby
wldcordeiro has quit [Ping timeout: 276 seconds]
<havenwood> akp: The typical install these days is from a shell script: \curl -sSL https://get.rvm.io | bash
<mr_blue> I'am wondering if there is a way to fetch value from a hash with a key that can be a String or a Symbole ?
<mr_blue> for now I have to check to h['k'] and h[:k]
cjbottaro has joined #ruby
pfg__ has quit [Ping timeout: 240 seconds]
iamvery has quit [Ping timeout: 240 seconds]
<havenwood> akp: If you just need one Ruby, ruby-install is simpler: https://github.com/postmodern/ruby-install#readme
<havenwood> akp: sudo ruby-install --latest --system jruby
<akp> wow
<havenwood> akp: ^ install latest JRuby to /usr/local
<lagweezle> I'm with you there. Things like len() being a global, except not really, because you need to implement __len__ for your class ... bleah.
mrgrieves has quit [Ping timeout: 260 seconds]
<akp> package managers on top of package managers on top of package manageres
<lagweezle> I'm with you there. Things like len() being a global, except not really, because you need to implement __len__ for your class ... bleah. (meant as reply to ytti)
drewo has joined #ruby
<havenwood> akp: ruby-install and chruby are simple shell scripts that each do one thing, and one thing well
pfg__ has joined #ruby
iamvery has joined #ruby
freerobby has quit [Quit: Leaving.]
Cone3 has quit []
scepticulous has quit [Ping timeout: 252 seconds]
weckl has quit [Remote host closed the connection]
JakFrist has joined #ruby
finisherr has joined #ruby
David27_ has joined #ruby
nocontrol has joined #ruby
David27 has quit [Ping timeout: 248 seconds]
David27_ is now known as David27
jam_ has joined #ruby
Don_John has joined #ruby
<akp> well ruby-install seems to fail to download anything....
choke has joined #ruby
rubie has quit []
<shevy> wget ftp://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.xz
<akp> → ruby-install jruby JOBS: 0
<akp> >>> Updating jruby versions ...
<akp> !!! Failed to download https://raw.githubusercontent.com/postmodern/ruby-versions/master/jruby/versions.txt to /home/apatel/.cache/ruby-install/jruby/versions.txt!
<havenwood> akp: What command are you running and what's the error?
<akp> !!! Failed to download jruby versions!
<headius> that file downloads ok for me
<havenwood> akp: sudo ruby-install --latest
Eiam has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<akp> it fails to download the txt files for all of them
Don_John has quit [Max SendQ exceeded]
<akp> is there away to force it to use curl?
Don_John has joined #ruby
<akp> !!! Failed to download https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt to /root/.cache/ruby-install/ruby/versions.txt!
<akp> and the same for jruby, rbx, maglev, and mruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra> akp: and if you curl the file it downloads fine?
<havenwood> akp: Can you not wget or curl those same files?
ramfjord has joined #ruby
LoganG has joined #ruby
<akp> i can with wget, but i need to use the --no-check-cert option
<akp> curl doesn't seemt o care
<havenwood> akp: ahhh
jam_ has quit [Ping timeout: 244 seconds]
<havenwood> akp: Can you install the ca-certificates package with your package manager?
benlieb has joined #ruby
nettoweb has joined #ruby
axl__ has joined #ruby
Couch has quit [Ping timeout: 260 seconds]
weaksauce has joined #ruby
wldcordeiro has joined #ruby
<akp> yeah i can install them
<akp> but it still doesn't help
axl_ has quit [Ping timeout: 276 seconds]
axl__ is now known as axl_
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<havenwood> akp: Eek, no up-to-date certs? Hard to check authenticity of SSL connections that way!
nocontrol has quit [Remote host closed the connection]
<akp> havenwood: i've installed the certs
<akp> but wget still doesn't seem to car
<akp> e
<akp> ERROR: certificate common name “www.github.com” doesn’t match requested host name “raw.githubusercontent.com”.
<akp> has to do with that
dopie has quit [Quit: Lost terminal]
<havenwood> akp: I have to relocate now, I'm late, but I'll look into it!
<havenwood> akp: If you have time you might start an Issue ticket on the Githubs but understood if you just want to move on. ;)
Balzrael has joined #ruby
<akp> i'm just going to add the -no-check-certificate option in right now to the ruby-install.sh
symm- has joined #ruby
ChiefAlexander has joined #ruby
<akp> gonna have to hack and move, spent to much time mucking around trying to install jruby =/
wldcordeiro has quit [Ping timeout: 240 seconds]
cjbottaro has joined #ruby
cjbottaro has quit [Max SendQ exceeded]
<headius> akp: maybe you should just download the JRuby tarball and install it that way
ramfjord has quit [Ping timeout: 260 seconds]
<headius> your environment seems to be having problems
M-mistake has joined #ruby
<havenwood> akp: ^ that's a nice thing about JRuby!
<headius> download, unpacke, put bin in PATH, that's about it
<akp> i just added the no-check-certficate option to the ruby-install.sh script
<akp> it work and jruby is now installed.
<akp> ....
<havenwood> akp: \o/
nocontrol has joined #ruby
mdw has joined #ruby
kenichi_ is now known as kenichi
acosonic has quit [Quit: acosonic]
jam_ has joined #ruby
ruby-lang106 has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
sadin has joined #ruby
andikr has quit [Remote host closed the connection]
silentpost has quit [Ping timeout: 248 seconds]
JohnBat26 has quit [Read error: Connection reset by peer]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JohnBat26 has joined #ruby
snockerton has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdw has quit [Client Quit]
lsmola has quit [Ping timeout: 248 seconds]
theRoUS is now known as GenghisKen
nocontrol has quit [Ping timeout: 264 seconds]
GenghisKen is now known as theRoUS
jottr has joined #ruby
polyidus has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
kobain has joined #ruby
ascarter has joined #ruby
kobain has quit [Max SendQ exceeded]
nocontrol has joined #ruby
kobain has joined #ruby
<KINGSABRI> is Win32API is deprecated and will be removed ?
SCHAAP137 has joined #ruby
<KINGSABRI> because I can't find any good documentation for it but still exist in Ruby 2.2.3p173
M-Technic has quit [Ping timeout: 260 seconds]
<shevy> ^^^ exists
<shevy> ^^^ does not exist
KensoDev has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> ah
<shevy> might be dl to fiddle?
M-Technic has joined #ruby
<KINGSABRI> shevy, yeah I found many poeple talking about Win32 and DL and moving to Fiddle
wldcordeiro has joined #ruby
<KINGSABRI> Win32API
KensoDev has joined #ruby
<KINGSABRI> yea it's almost zero documentation
nocontrol has quit [Ping timeout: 240 seconds]
<KINGSABRI> and it doesn't exist in 2.2.x
acosonic has joined #ruby
djellemah has joined #ruby
<smathy> KINGSABRI, you looked at the gem, it's meant to be better: https://rubygems.org/gems/win32-api/
<KINGSABRI> but I've ran an example using Win32API on ruby 2.2.3p173
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
User458764 has joined #ruby
<shevy> guess it died
Blaze_Boy has quit [Ping timeout: 246 seconds]
snockerton has quit [Quit: Leaving.]
<KINGSABRI> smath, I heard about Win32-api but I needed to write 50-lines script form very small task and avoiding external libs was important
ascarter has joined #ruby
<ericli> in ruby, which var to show the first/second/third parameter in command line?
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
JohnBat26 has quit [Read error: Connection reset by peer]
<KINGSABRI> ericli, do you mean, ARGV ?
f4cl3y has quit [Ping timeout: 260 seconds]
JohnBat26|2 has joined #ruby
<KINGSABRI> ericli, like : var1, var2, var3 = ARGV
blandflakes has joined #ruby
<smathy> KINGSABRI, it's one C file, just vendor it if necessary.
roshanavand_ has quit [Quit: This computer has gone to sleep]
<ericli> KINGSABRI, yes
Devalo has quit [Ping timeout: 252 seconds]
<KINGSABRI> ericli that was my answer if I understand your question
wreet has joined #ruby
mistermocha has joined #ruby
wreet has left #ruby [#ruby]
<ericli> KINGSABRI, that's right, thanks
<ericli> KINGSABRI, is there doc about the ruby internal var list?
skade has joined #ruby
<Ox0dea> ?quickref ericli
<Ox0dea> ericli: Loads of good stuff in here: http://www.zenspider.com/Languages/Ruby/QuickRef.html
ruby-lang106 has quit [Ping timeout: 250 seconds]
sneakerhax has joined #ruby
jenrzzz has joined #ruby
<ericli> nice, thanks Ox0dea KINGSABRI
acosonic has quit [Quit: acosonic]
mdw has joined #ruby
joonty has joined #ruby
acosonic has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
nocontrol has joined #ruby
JohnBat26|2 has quit [Read error: Connection reset by peer]
callen92 has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
slawrence00 has joined #ruby
JohnBat26|2 has joined #ruby
halfamind1 has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
dopie has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
n008f4g_ has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
nocontrol has quit [Ping timeout: 276 seconds]
johnny56 has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
dopie has quit [Quit: Leaving]
moeabdol has joined #ruby
davedev24 has joined #ruby
cdikny has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
dopie has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
acosonic has quit [Quit: acosonic]
baweaver has quit [Ping timeout: 250 seconds]
nocontrol has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
Salve has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
kobain has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
acosonic has joined #ruby
sadin has quit [Quit: Leaving]
nocontrol has quit [Ping timeout: 248 seconds]
joonty has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
codebeef has quit [Remote host closed the connection]
stannard has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
baweaver has quit [Remote host closed the connection]
nocontrol has joined #ruby
ljames has quit []
ChiefAlexander has joined #ruby
evidex has quit [Ping timeout: 268 seconds]
polyidus has quit [Quit: Later]
halfamind1 has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
speakingcode is now known as dpritchett
polyidus has joined #ruby
dpritchett is now known as Guest50590
nocontrol has quit [Ping timeout: 244 seconds]
Guest50590 is now known as boze
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
nanoz has quit [Read error: Connection reset by peer]
LoneHermit has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
halfamind1 has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
boze is now known as syliddar
syliddar is now known as vongrippen
joonty has quit [Ping timeout: 260 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JakFrist has joined #ruby
drewo has quit [Ping timeout: 268 seconds]
mfaeh has quit []
LoneHermit has quit [Ping timeout: 276 seconds]
intrigueD has joined #ruby
baweaver has joined #ruby
Musashi007 has joined #ruby
jaruga has quit [Quit: jaruga]
jaruga_ has quit [Quit: jaruga_]
vongrippen is now known as memtechimposter
mr_robot_ has joined #ruby
replay has joined #ruby
mr_robot_ has quit [Client Quit]
evidex has joined #ruby
tildes has joined #ruby
snockerton has joined #ruby
dvinciguerra has joined #ruby
polyidus has quit [Quit: Later]
B1n4r10 has joined #ruby
rehat has joined #ruby
memtechimposter is now known as syliddar2
nocontrol has joined #ruby
htmldrum_ has quit [Ping timeout: 268 seconds]
htmldrum has quit [Ping timeout: 268 seconds]
Karix has joined #ruby
joneshf-laptop has quit [Remote host closed the connection]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg_ has quit [Remote host closed the connection]
stunder001 has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
uglybandersnatch has joined #ruby
syliddar2 is now known as speakingcode
nocontrol has quit [Ping timeout: 268 seconds]
baweaver has quit [Remote host closed the connection]
cgfbee has quit [Excess Flood]
jobewan has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
cgfbee has joined #ruby
Es0teric has joined #ruby
TheGreatGudsby has joined #ruby
dvinciguerra_ has joined #ruby
JakFrist has joined #ruby
dvinciguerra has quit [Quit: Leaving]
skade has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
drewo has joined #ruby
User458764 has joined #ruby
babblebre has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
dvinciguerra_ has quit [Client Quit]
dvinciguerra has joined #ruby
linux99x has quit [Ping timeout: 244 seconds]
yeticry has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
nocontrol has joined #ruby
B1n4r10 has quit [Ping timeout: 244 seconds]
DoubleMalt has joined #ruby
shinnya has joined #ruby
ethe has joined #ruby
acosonic has quit [Quit: acosonic]
<ethe> I'm trying to use ruby to automate a trivial task, however Dir.glob doesnt seem to be able to handle whitespace within the strings very well https://gist.github.com/anonymous/79c841421b5145761393
codecop_ has quit [Quit: Išeinu]
acosonic has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<shevy> ethe chop up the task and split it up
<shevy> 1) first obtain the array with your entries 2) sanitize them if necessary 3) build up the command for ffmpeg 4) output it to verify that it is correct 5) use system() or ``
nocontrol has quit [Ping timeout: 244 seconds]
<shevy> if the name of the file has a ' ' one workaround is to pad the whole name into a ""
<eam> ethe: your problem is actually in the backticks -- you're constructing bad shell
<ethe> eam: it never gets there
edwinvdgraaf has quit [Ping timeout: 248 seconds]
<eam> ethe: what happens when you run your code? Include the error
B1n4r10 has joined #ruby
<eam> Dir.glob will handle spaces fine -- the only potential for error here is in your backticks
dhollinger has joined #ruby
<ethe> it doesnt error, it just doesnt find any files, because there isnt a directory with the name 'Arctic', 'Monkeys', '-', 'AM', '(2013)', or '[FLAC]', the folder is called 'Arctic Monkeys - AM (2013) [FLAC]' which is what I am passing as ARGV[0]]
<eam> are you quoting it?
<ethe> If I manually input 'Arctic\ Monkeys\ \-\ AM\ \(2013\)\ \[FLAC\]/**.flac' as the dir string it works fine
<ethe> eam: I'm escaping the spaces, and characters
<eam> aacify.rb "Arctic Monkeys - and so on "
djbkd has quit [Remote host closed the connection]
<eam> ethe: in any event, glob() doesn't care about spaces
<ericli> any ruby function works like die(); in perl?
<ericli> encounter the error then throw out exceptions and exit
<eam> ethe: raise
<eam> ericli: ^^
<ethe> running: ruby aacify.rb "Arctic\ Monkeys\ \-\ AM\ \(2013\)\ \[FLAC\]/" works just fine
djbkd has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
cgfbee has quit [Excess Flood]
<ericli> eam, thanls
<eam> ethe: well, [] is a glob metacharacter
<eam> just like *
<ethe> hmm that's a good point
B1n4r10 has quit [Ping timeout: 268 seconds]
Snowy has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 248 seconds]
rattatmatt has joined #ruby
cgfbee has joined #ruby
fexilal has quit [Ping timeout: 268 seconds]
krz has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
rmulligan has joined #ruby
df- is now known as df
last_staff has joined #ruby
jenrzzz has joined #ruby
djbkd has quit [Ping timeout: 248 seconds]
DoubleMalt has quit [Remote host closed the connection]
djbkd has joined #ruby
nocontrol has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ok has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
ok has left #ruby [#ruby]
freerobby has joined #ruby
nocontrol has quit [Ping timeout: 244 seconds]
tref has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
spaceghost|work is now known as pipework
acosonic has quit [Quit: acosonic]
yfeldblum has joined #ruby
acosonic has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
User458764 has joined #ruby
<ethe> thanks
ethe has left #ruby ["WeeChat 1.0.1"]
joonty has joined #ruby
jackjackdripper has joined #ruby
shredding has joined #ruby
B1n4r10 has joined #ruby
threh has joined #ruby
jorum has joined #ruby
acosonic has quit [Quit: acosonic]
nocontrol has joined #ruby
jorum has quit [Client Quit]
rehat has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
Dimik has joined #ruby
minimalism has joined #ruby
nocontrol has quit [Ping timeout: 248 seconds]
Breaking_Pitt has joined #ruby
<ericli> Ox0dea, yesterday we discussed that using open3 to capture stdout/stderr, however, seems the capture content is buffered, so is there any way I can see the output unbuffered?
<manveru> ericli: you mean like IO#sync ?
<manveru> you can set that to true to disable buffering
Es0teric has quit [Ping timeout: 248 seconds]
<ericli> manveru, I don;t know what it is but I would like to see the unbuffered contents.
<manveru> do that for your open3 si/so/se and your normal $stdout to see it in realtime
<ericli> so any setting I can use?
sergey_makagon has joined #ruby
rodfersou is now known as rodfersou|afk
Breaking_Pitt has quit [Read error: Connection reset by peer]
smathy is now known as smathy_afk
Es0teric has joined #ruby
smathy_afk is now known as smathy
Es0teric has quit [Max SendQ exceeded]
<ericli> and one more thing, when I use open3 to capture the output: Open3.capture2e("#{restore_cmd}") if the cmd needs my input and when I input something, seems the terminal is blocked
evidex has quit [Remote host closed the connection]
<ericli> manveru, so is there any way that I can input something during the procedure and still see unbuffered contents?
baweaver has joined #ruby
elifoster has joined #ruby
andywojo has joined #ruby
<manveru> well, you have to link the stdin of your terminal to the stdin of capture2e
<manveru> otherwise you will fall on deaf ears
halfamind1 has quit [Read error: Connection reset by peer]
<ericli> I just hope run the command and maybe I need to type something when the command prompts some to me.
halfamind has joined #ruby
rbennacer has quit []
nettoweb has quit [Read error: Connection reset by peer]
intrigueD has quit [Remote host closed the connection]
jschoolcraft has joined #ruby
<ericli> manveru, okay, seems I can use system() to do that, correct?
<ericli> btw, system() is also buffered for the output?
<manveru> but you still want to capture the output of the command?
patrick-sartent has quit [Quit: .]
nettoweb has joined #ruby
Breaking_Pitt has joined #ruby
<ericli> manveru, yes
<manveru> system is buffered too by default
nocontrol has joined #ruby
<manveru> it outputs on every newline
patrick-sartent has joined #ruby
chouhoul_ has joined #ruby
<ericli> manveru, but when I use system() by default I should get the contents on my screen, right?
<manveru> ruby -e 'system("read hi; echo hi = $hi")'
andywojo has quit [Ping timeout: 244 seconds]
<manveru> try that for example
baweaver has quit [Ping timeout: 276 seconds]
<manveru> ruby -e 'system("echo -n enter hi: ; read hi; echo hi = $hi")'
<manveru> even nicer :)
rodfersou|afk is now known as rodfersou
chouhou__ has joined #ruby
rbennacer has joined #ruby
_blizzy_ has joined #ruby
<ericli> yeah, let me try
<manveru> in ruby you do it like: ruby -e 'print "enter hi: "; hi = gets; puts "hi = #{hi}"'
chouhoulis has quit [Ping timeout: 260 seconds]
joonty has quit [Ping timeout: 240 seconds]
<ericli> manveru, right, so which one is for unbuffered settings?
<manveru> but system basically spawns a new shell which has its own stdout/stderr/stdin
TheGreatGudsby has quit [Quit: You had my curiosity. But now you have my attention]
<manveru> neither one
<manveru> i highly doubt your issue is with buffering
TheGreatGudsby has joined #ruby
<manveru> because even if it's buffered, it would display after a newline
<ericli> manveru, you mentioned there's one setting I can change buffered to unbuffered.
<manveru> yes, there is
nocontrol has quit [Ping timeout: 276 seconds]
JohnBat26|2 has quit [Read error: Connection reset by peer]
<manveru> but maybe you can show the code first so i can see if that's the right approach?
<ericli> manveru, that would be great
chouhoul_ has quit [Ping timeout: 260 seconds]
mistermocha has joined #ruby
JohnBat26|2 has joined #ruby
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
smathy is now known as smathy_afk
smathy_afk is now known as smathy
mondok has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
araujo has quit [Ping timeout: 260 seconds]
mary5030_ has joined #ruby
<manveru> yeah, just use system for that
<manveru> you don't use the captured output anyway
polyidus has joined #ruby
Breaking_Pitt has quit [Read error: Connection reset by peer]
<ericli> manveru, during foo_restore() it will prompts some thing to input
<ericli> okay
mary5030_ has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 260 seconds]
<manveru> also "#{fetch_cmd}" == fetch_cmd
skade has quit [Quit: Computer has gone to sleep.]
mary5030 has quit [Read error: Connection reset by peer]
Queitsch has quit [Quit: queitsch]
<manveru> oh, and another tip
mary5030 has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
andywojo has joined #ruby
baweaver has joined #ruby
Breaking_Pitt has joined #ruby
<manveru> `if restore_status.to_i == 0 then return true else return false end` == `return restore_status.success?`
sergey_makagon has quit [Remote host closed the connection]
<manveru> and one more, if you want to be lazy, use: require "rake"; sh()
Cohedrin has joined #ruby
<manveru> sh("foo", "restore", "-file", "sf")
<manveru> for example
<manveru> that'll make sure to raise when the return status is not 0
<manveru> err
<manveru> sh("foo", "restore", "-file", sf)
<manveru> sorry, that's the one :)
<manveru> also takes care that you don't have to escape things for the shell
<manveru> because right now your script will fail with special characters or spaces in filenames
amargherio has quit [Remote host closed the connection]
Musashi007 has joined #ruby
<manveru> anyway, your script can be about half the size and twice the functionality :)
hxegon has joined #ruby
<manveru> brb, haven't figured out how to script my laundry yet :(
Queitsch has joined #ruby
Queitsch has quit [Client Quit]
kirun has joined #ruby
<ericli> haha
<ericli> so I can use $? to check status, right?
davedev24 has quit [Remote host closed the connection]
rbennacer has quit []
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
davedev24 has joined #ruby
nocontrol has joined #ruby
Musashi007 has quit [Quit: Musashi007]
araujo has joined #ruby
hxegon has quit [Quit: PEACE OUT]
<manveru> system already returns true/false too
hxegon has joined #ruby
<manveru> you use $? for `` mostly
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<manveru> but it also works with system, it's just redundant if all you care about is zero/non-zero
edwinvdgraaf has joined #ruby
Breaking_Pitt has quit [Read error: Connection reset by peer]
<manveru> and if you use sh instead, it'll raise on non-zero, like you do right now
rattatmatt has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
rattatmatt has joined #ruby
dc2 has joined #ruby
User458764 has joined #ruby
Es0teric has joined #ruby
tref has quit [Quit: tref]
Es0teric has quit [Max SendQ exceeded]
trinaldi has quit [Quit: WeeChat 1.5-dev]
Musashi007 has joined #ruby
rbennacer has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
baweaver has joined #ruby
rattatmatt has quit [Ping timeout: 244 seconds]
Es0teric has joined #ruby
Breaking_Pitt has joined #ruby
baweaver has quit [Remote host closed the connection]
rattatmatt has joined #ruby
mondok has quit [Ping timeout: 264 seconds]
sergey_makagon has joined #ruby
sergey_makagon has quit [Client Quit]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
cdg has joined #ruby
baweaver has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
JohnBat26|2 has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
rodfersou has quit [Quit: leaving]
bluOxigen has joined #ruby
vdamewood has quit [Quit: Life beckons.]
jenrzzz has quit [Ping timeout: 248 seconds]
Musashi007 has quit [Quit: Musashi007]
tvw has quit [Remote host closed the connection]
chouhou__ has quit [Ping timeout: 244 seconds]
polyidus has quit [Quit: Later]
drewo has quit [Ping timeout: 268 seconds]
rattatmatt has quit [Remote host closed the connection]
drewo has joined #ruby
Melpaws has joined #ruby
dikaio_ has quit [Quit: Textual IRC Client: www.textualapp.com]
dagda1 has joined #ruby
polyidus has joined #ruby
tildes has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
rodfersou has joined #ruby
johnmilton has joined #ruby
skade has joined #ruby
Pumukel has joined #ruby
rattatmatt has joined #ruby
Emmanuel_Chanel has joined #ruby
fullofca_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
yqt has joined #ruby
Breaking_Pitt has quit [Read error: Connection reset by peer]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mozzarella> how do I launch a web server with ruby
johnmilton has quit [Ping timeout: 248 seconds]
<mozzarella> I don't remember
dvinciguerra has quit [Ping timeout: 250 seconds]
fullofcaffeine has quit [Ping timeout: 248 seconds]
Breaking_Pitt has joined #ruby
<mozzarella> found it
djbkd has quit [Remote host closed the connection]
Devalo has joined #ruby
blackgoat has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
huddy has quit [Quit: Connection closed for inactivity]
prestorium has quit [Quit: Leaving]
polyidus has quit [Quit: Later]
Devalo has quit [Ping timeout: 240 seconds]
Es0teric has quit [Read error: Connection reset by peer]
polyidus has joined #ruby
Es0teric has joined #ruby
djbkd has joined #ruby
darkf has joined #ruby
pawnbox has quit [Remote host closed the connection]
<smathy> I blame you Ox0dea that I had to see that.
moeabdol has joined #ruby
swills has quit [Ping timeout: 240 seconds]
futilegames has joined #ruby
futilegames has quit [Client Quit]
Cohedrin has joined #ruby
jschoolcraft has quit [Quit: peace]
djbkd has quit [Ping timeout: 260 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Eiam has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
cd-rum has joined #ruby
fullofcaffeine has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
neilhwatson has quit [Quit: leaving]
djbkd has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
elifoster has quit [Ping timeout: 244 seconds]
halfamind has quit [Read error: Connection reset by peer]
halfamind1 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
threh has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 250 seconds]
Melpaws has quit [Quit: Leaving.]
fullofcaffeine has quit [Ping timeout: 268 seconds]
chouhoulis has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
<Ox0dea> smathy: Not the greatest showing.
acosonic has joined #ruby
infernix has quit [Ping timeout: 244 seconds]
Breaking_Pitt has quit [Read error: Connection reset by peer]
<smathy> :)
davedev24 has quit []
agentmeerkat has quit [Ping timeout: 250 seconds]
stannard has quit [Remote host closed the connection]
rmulligan has quit [Remote host closed the connection]
chouhoulis has joined #ruby
cd-rum_ has joined #ruby
Breaking_Pitt has joined #ruby
cd-rum has quit [Ping timeout: 260 seconds]
hxegon is now known as hxegon_AFK
nando293921 has quit [Ping timeout: 248 seconds]
hxegon_AFK is now known as hxegon
<riceandbeans> anyone ever loaded IRB and done rand(12) in place of rolling 1d12?
rodfersou has quit [Quit: leaving]
<riceandbeans> I guess rand(1..12) would be more accurate
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
babblebre has quit [Quit: Connection closed for inactivity]
<Ox0dea> riceandbeans: A while back, I was in the habit of rolling ObjectSpace to decide whether or not to grab something to eat.
intrigueD has joined #ruby
nobitanobi has joined #ruby
<riceandbeans> Ox0dea: I was using it for D&D
<Ox0dea> Anything but three Strings == food.
<Ox0dea> >> [*ObjectSpace.each_object].sample 3
<riceandbeans> >> rand(1..12).3times
blandflakes has joined #ruby
<Ox0dea> Bot is kill.
ericli has quit [Ping timeout: 240 seconds]
ericli has joined #ruby
perlgod has quit [Ping timeout: 248 seconds]
<baweaver> >> 1
<Dimik> hi boyze
<baweaver> yep, dead
<Ox0dea> Absent, more like.
camilasan has quit [Ping timeout: 240 seconds]
jpfuentes2 has joined #ruby
mary5030 has quit [Remote host closed the connection]
dmnd has quit [Ping timeout: 240 seconds]
<riceandbeans> anyway, yeah
dmnd has joined #ruby
mary5030 has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
camilasan has joined #ruby
dvinciguerra has joined #ruby
baweaver has quit [Remote host closed the connection]
johnmilton has joined #ruby
halfamind1 has quit [Quit: Leaving.]
nettoweb has joined #ruby
Breaking_Pitt has quit [Ping timeout: 252 seconds]
Pumukel has quit [Ping timeout: 246 seconds]
loechel has joined #ruby
DiCablo has joined #ruby
loechel is now known as Pumukel
dionysus69 has quit [Ping timeout: 248 seconds]
mary5030 has quit [Ping timeout: 244 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous has joined #ruby
ldnunes has quit [Quit: Leaving]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
naftilos76 has joined #ruby
cd-rum_ has quit [Quit: Textual IRC Client: www.textualapp.com]
hxegon is now known as hxegon_AFK
acosonic has quit [Quit: acosonic]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ericli> Hi, i saw some methods ends with "?", is there any rule to use "?" in a method name?
ReK2 has quit [Remote host closed the connection]
<riceandbeans> ericli: no, but it's called a predicate method
<riceandbeans> ericli: it usually means it returns a boolean
naftilos76 has quit [Client Quit]
<ericli> riceandbeans, oh okay
djbkd has quit [Remote host closed the connection]
<ericli> riceandbeans, so just an indicator
<riceandbeans> ericli: there is no hard requirement to though, but it's sylistic
<ericli> understand.
<ericli> thanks
_stu_ has quit [Ping timeout: 244 seconds]
slawrence00 has joined #ruby
choke has joined #ruby
acosonic has joined #ruby
acosonic has quit [Client Quit]
CloCkWeRX has joined #ruby
polyidus has quit [Quit: Later]
yfeldblum has joined #ruby
freerobby has quit [Quit: Leaving.]
hxegon_AFK has quit [Quit: BRB]
hxegon has joined #ruby
devbug has joined #ruby
Guest61911 has joined #ruby
polyidus has joined #ruby
jam_ has quit [Remote host closed the connection]
qubit_ has quit [Ping timeout: 276 seconds]
xpt has joined #ruby
Gues_____ has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
ascarter has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
dn`_ has joined #ruby
infernix has joined #ruby
bollullera has joined #ruby
Karix has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
bluOxigen_ has joined #ruby
djbkd has joined #ruby
kobain has joined #ruby
snockerton has quit [Quit: Leaving.]
Gues_____ has quit [Client Quit]
dn` has quit [Ping timeout: 250 seconds]
dn`_ is now known as dn`
bihi has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 244 seconds]
LoganG_ has joined #ruby
[spoiler] has quit [Ping timeout: 240 seconds]
tommd has quit [Ping timeout: 240 seconds]
vircung has joined #ruby
jcp has quit [Ping timeout: 240 seconds]
pizzaops has quit [Ping timeout: 240 seconds]
mjc_ has quit [Ping timeout: 240 seconds]
tonini has quit [Ping timeout: 240 seconds]
Eleeleth has quit [Ping timeout: 240 seconds]
jpinnix_______ has quit [Ping timeout: 240 seconds]
cbetta has quit [Ping timeout: 240 seconds]
adambeynon_ has joined #ruby
zzak____ has joined #ruby
Pupeno has quit [Remote host closed the connection]
TheNet has joined #ruby
LoganG has quit [Quit: robots are cool]
LoganG_ is now known as LoganG
Eleeleth has joined #ruby
zzak___ has quit [Ping timeout: 240 seconds]
jlyndon has quit [Ping timeout: 240 seconds]
lipoqil has quit [Ping timeout: 240 seconds]
adambeynon has quit [Ping timeout: 240 seconds]
podman has quit [Ping timeout: 240 seconds]
adambeynon_ is now known as adambeynon
zzak____ is now known as zzak___
cbetta has joined #ruby
baweaver has joined #ruby
pizzaops_ has joined #ruby
kspencer has quit [Ping timeout: 240 seconds]
melter has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 240 seconds]
podman has joined #ruby
tobiasvl has quit [Ping timeout: 240 seconds]
Riviera- has quit [Ping timeout: 240 seconds]
jlyndon has joined #ruby
JoshL has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
chipotle has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 246 seconds]
mjc_ has joined #ruby
tvl has joined #ruby
tvl is now known as tobiasvl
blackmesa has quit [Ping timeout: 244 seconds]
chipotle_ has joined #ruby
jpinnix_______ has joined #ruby
lipoqil has joined #ruby
bollullera has left #ruby [#ruby]
ta_ has quit [Remote host closed the connection]
<smathy> Wait til he sees ! and =
tonini has joined #ruby
jcp has joined #ruby
threh has joined #ruby
drewo has joined #ruby
blackmesa has joined #ruby
<Ox0dea> Don't forget @.
_stu_ has joined #ruby
<smathy> Heh, I always do.
Melpaws has joined #ruby
<smathy> Infix is too magical to even think of.
marr123 has joined #ruby
JoshL has joined #ruby
FooMunki has quit [Quit: FooMunki]
<zacts> I'm trying to find an opensource ruby project to contribute to to learn ruby
fullofcaffeine has joined #ruby
_kfpratt has joined #ruby
bihi has joined #ruby
[spoiler] has joined #ruby
x0f has joined #ruby
Pupeno has joined #ruby
rbennace_ has joined #ruby
DiCablo has quit [Read error: Connection reset by peer]
kfpratt has quit [Ping timeout: 240 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Riviera- has joined #ruby
stunder001 has quit [Read error: Connection reset by peer]
melter has joined #ruby
kspencer has joined #ruby
kspencer has quit [Changing host]
kspencer has joined #ruby
stunder001 has joined #ruby
LoneHermit has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupeno has quit [Remote host closed the connection]
<smathy> zacts, have you read all this stuff: https://www.ruby-lang.org/en/documentation/
_stu_ has quit [Ping timeout: 260 seconds]
rbennacer has quit [Ping timeout: 246 seconds]
fullofcaffeine has quit [Ping timeout: 268 seconds]
ChiefAlexander has quit [*.net *.split]
marr has quit [*.net *.split]
workmad3 has quit [*.net *.split]
abort has quit [*.net *.split]
nofxx has quit [*.net *.split]
ozzloy_ has quit [*.net *.split]
alnewkirk has quit [*.net *.split]
RTG` has quit [*.net *.split]
edwardly has quit [*.net *.split]
axisys has quit [*.net *.split]
tw1sted has quit [*.net *.split]
berserk_ren has quit [*.net *.split]
reaVer has quit [*.net *.split]
linduxed has quit [*.net *.split]
skakri has quit [*.net *.split]
bitemyapp has quit [*.net *.split]
m4rCsi_ has quit [*.net *.split]
Kim^J has quit [*.net *.split]
z3uS has quit [*.net *.split]
swills has joined #ruby
<zacts> smathy: I've skimmed it, but I'm utilizing a few books right now too
Pupeno has joined #ruby
<zacts> namely: The Well Grounded Rubyist, Eloquent Ruby, Metaprogramming Ruby2 (pragprog), and poodr
rbennace_ has quit [Ping timeout: 264 seconds]
<zacts> I like the Ruby koans
<zacts> but I want to get my feet wet with a real project
FooMunki has joined #ruby
<smathy> zacts, ok, so maybe browse here https://www.ruby-toolbox.com/ and find something you like the sound of, see what issues you can tackle...
coffeecupp has joined #ruby
<zacts> cool thanks
LoneHermit has quit [Ping timeout: 264 seconds]
James1 has joined #ruby
Xiti has joined #ruby
Guest61911 has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: Leaving]
ascarter has joined #ruby
moeabdol has joined #ruby
threh has quit [Quit: 'Til next time]
threh has joined #ruby
akp has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
threh has quit [Client Quit]
Breaking_Pitt has joined #ruby
threh has joined #ruby
threh has quit [Client Quit]
htmldrum_ has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
coffeecupp has quit [Quit: Lingo: www.lingoirc.com]
haylon has quit [Quit: WeeChat 1.4]
threh has joined #ruby
nettoweb has joined #ruby
RTG` has joined #ruby
edwardly has joined #ruby
m4rCsi_ has joined #ruby
z3uS has joined #ruby
axisys has joined #ruby
reaVer has joined #ruby
skakri has joined #ruby
ChiefAlexander has joined #ruby
bitemyapp has joined #ruby
Kim^J has joined #ruby
ozzloy_ has joined #ruby
alnewkirk has joined #ruby
berserk_ren has joined #ruby
nofxx has joined #ruby
linduxed has joined #ruby
abort has joined #ruby
tw1sted has joined #ruby
hahuang65 has joined #ruby
axisys has quit [Max SendQ exceeded]
Breaking_Pitt has quit [Ping timeout: 244 seconds]
axisys has joined #ruby
nettoweb has quit [Max SendQ exceeded]
chipotle_ has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
shredding has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
jabreity has quit [Ping timeout: 248 seconds]
tjohnson has quit [Ping timeout: 248 seconds]
alem0lars has quit [Ping timeout: 248 seconds]
troter_______ has quit [Ping timeout: 248 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drew0 has joined #ruby
jabreity has joined #ruby
tjohnson has joined #ruby
troter_______ has joined #ruby
Uber|Dragon has quit [Ping timeout: 240 seconds]
drewo has quit [Ping timeout: 268 seconds]
alem0lars has joined #ruby
<ericli> how do I make sure the var I defined outside of a method could be used by the method?
znz_jp has quit [Ping timeout: 248 seconds]
johnmilton has quit [Ping timeout: 276 seconds]
<shevy> ericli use an @ivar
drew0 has quit [Ping timeout: 260 seconds]
<ericli> shevy, you mean in method or sth like:
freerobby has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
James1 has quit [Ping timeout: 264 seconds]
Pupeno has quit [Remote host closed the connection]
stannard has joined #ruby
axl_ has quit [Quit: axl_]
nando293921 has joined #ruby
jgpawletko has joined #ruby
<eam> /win 1
<eam> whoops
<shevy> <ericli> how do I make sure the var I defined outside of a method
<shevy> you define it outside of course
codecop has quit [Remote host closed the connection]
drew0 has joined #ruby
phredus has joined #ruby
Melpaws has quit [Quit: Leaving.]
queequeg1 has quit [Ping timeout: 244 seconds]
hxegon is now known as hxegon_AFK
queequeg1 has joined #ruby
rmulligan has joined #ruby
stunder_ has joined #ruby
ecksit has joined #ruby
B1n4r10 has quit [Quit: Lost terminal]
mary5030 has joined #ruby
marr123 is now known as marr
stunder001 has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
* smathy smells global vars and side effects and runs
Azure has quit [Quit: Oops.]
_djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
hxegon_AFK has quit [Quit: BRB]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xpt has quit [Quit: WeeChat 1.4]
uglybandersnatch has joined #ruby
stunder001 has joined #ruby
bry4n has quit [Ping timeout: 276 seconds]
<jottr> Hi all
nando293921 has quit [Ping timeout: 250 seconds]
stunder_ has quit [Ping timeout: 260 seconds]
mr_blue has quit [Quit: leaving]
TheNet has joined #ruby
moos3 has quit [Ping timeout: 250 seconds]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
Pupeno has joined #ruby
uglybandersnatch has quit [Ping timeout: 260 seconds]
SCHAAP137 has joined #ruby
polyidus has quit [Quit: Later]
<jottr> Could someone have a look at how I use CSV.table.delete_if ? The way I do it now, I always end up with zero entries, which is wrong: https://git.io/vapVo
<jottr> It's probably very trivial. Just can't see it right now
freerobby has quit [Quit: Leaving.]
<jottr> Also, could this be made faster then N+1?
dopie has quit [Quit: Leaving]
polyidus has joined #ruby
mdw has joined #ruby
pawnbox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
drewbro has joined #ruby
drew0 has quit [Ping timeout: 252 seconds]
agentmeerkat has joined #ruby
htmldrum_ has quit [Ping timeout: 250 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
zenlot6 has joined #ruby
zenlot has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
astrobun_ has joined #ruby
<smathy> jottr, = vs ==
jgpawletko has quit [Quit: jgpawletko]
<jottr> smathy: ?
<jottr> smathy: Hi, first of all. :)
<jottr> smathy: Not sure I understand what you're trying to say there
<smathy> jottr, take a guess.
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0.1/20160315153207]]
yfeldblum has quit [Remote host closed the connection]
<jottr> ah
<jottr> doh
<smathy> :)
astrobunny has quit [Ping timeout: 276 seconds]
<smathy> We all do that.
last_staff has quit [Quit: last_staff]
<jottr> Thx. It's been a long day and night and day...
<smathy> jottr, you're welcome.
neanderslob_ has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
northfurr has joined #ruby
northfurr has quit [Client Quit]
polishdub has quit [Quit: Leaving]
Snowy has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
jobewan has quit [Ping timeout: 244 seconds]
neanderslob_ has joined #ruby
Azure has joined #ruby
johnmilton has joined #ruby
hxegon has joined #ruby
tubuliferous has quit [Ping timeout: 252 seconds]
hxegon is now known as hxegon_AFK
stannard has quit [Ping timeout: 240 seconds]
hxegon_AFK is now known as hxegon
sepp2k has quit [Read error: Connection reset by peer]
polyidus has quit [Quit: Later]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sneakerhax has quit [Ping timeout: 268 seconds]
queequeg1 has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
queequeg1 has joined #ruby
saneax_AFK is now known as saneax
floatingpoint has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
Noxilex has joined #ruby
drewbro has quit [Ping timeout: 244 seconds]
neanderslob_ is now known as neanderslob
polyidus has joined #ruby
mleung has quit [Quit: mleung]
codepete_ has joined #ruby
TheNet has joined #ruby
queequeg1 has quit [Ping timeout: 244 seconds]
rattatmatt has quit []
chipotle_ has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
Azure has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
codepete_ has quit [Client Quit]
crowell has quit [Ping timeout: 248 seconds]
codepete has joined #ruby
TheNet has quit [Client Quit]
queequeg1 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
ledestin has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
pikajude has quit [Ping timeout: 248 seconds]
rmulligan has quit [Remote host closed the connection]
rmulligan has joined #ruby
intrigueD has quit [Remote host closed the connection]
<jottr> smathy: Still can't get it to work: https://gist.github.com/jottr/eddfd42e4e66562fa44c#file-error-log
TheNet has joined #ruby
rbennacer has joined #ruby
<jottr> This should both be strings, no?
skade has joined #ruby
Balzrael has quit [Ping timeout: 246 seconds]
nocontrol has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
neanderslob has quit [Read error: Connection reset by peer]
neanderslob_ has joined #ruby
drewbro has joined #ruby
queequeg1 has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
baweaver has joined #ruby
pikajude has joined #ruby
pikajude has joined #ruby
neanderslob_ has quit [Read error: Connection reset by peer]
queequeg1 has joined #ruby
yfeldblum has joined #ruby
<smathy> You changed from each...delete_if to delete_if...each - but the return of foo.each is foo
<smathy> (which will be true)
razer_ has quit [Quit: Leaving...]
neanderslob_ has joined #ruby
<jottr> smathy: Well both variants did not work. The commented-out version yielded the same result.
neanderslob_ is now known as neanderslob
mleung has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
elifoster has joined #ruby
<smathy> Oh, the error you mean?
<smathy> Well, let's work through that.
<smathy> What's it telling you?
<jottr> Yes, the error. :)
tubuliferous has joined #ruby
ellistaa has joined #ruby
choke has joined #ruby
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crowell has joined #ruby
xpt has joined #ruby
<ellistaa> im creating something similar to an amazon clone. im thinking since there are many items that ill use nosql for the items and rdb for users …. good idea?
piotr has joined #ruby
<jottr> Well, that I'm trying to convert a string to integer, which does not work.
<smathy> Right, and which line and where are you trying to do that?
<jottr> 13
<shevy> "5".to_i # => 5
<shevy> it works!
<piotr> q
<smathy> jottr, right, line 13 and the error tells you even more about where it's happening.
benlieb has quit [Quit: benlieb]
<jottr> inside the array. so t['email'] does not return an array?
<smathy> Nope, in []
<jottr> erm string. i meannt
<smathy> [] is just a method call in Ruby, and what's inside the []s is the argument to the method.
<ellistaa> i guess the other option is to just use an rdb and have a field in item model that is of type json …
Balzrael has joined #ruby
<smathy> So, on that line 13 you're calling [] in two places, and in both you're passing strings right?
<jottr> yes
<smathy> ...and what is the error telling you Ruby is expecting?
<jottr> ...an Integer
<smathy> jottr, so, for this sort of [] call, what could it possibly mean if Ruby is expecting an integer instead of a string for one of those two calls?
piotr has quit [Quit: WeeChat 1.4]
moos3 has joined #ruby
<jottr> ...hm. Not sure. That it expects an array position?
SCHAAP137 has quit [Quit: Leaving]
superfox_il_volp has joined #ruby
<smathy> jottr, well, are you familiar with notation like: foo[1] as well as what you're using: foo['str'] ?
<jottr> yes
<smathy> jottr, and so if Ruby is expecting foo[1] (instead of foo['str']) then what does that mean foo is?
duncannz has joined #ruby
<superfox_il_volp> hi, silly question, how do you output a string in an erb template from an enclosed block <% %> ? using <%= %> requires to exit from the <% %> block
<jottr> an array of integers?
jrcharney has joined #ruby
<jottr> no
<superfox_il_volp> while print(x) sends its output into the stdout :/
<jottr> god i'm just tired...
TheNet has joined #ruby
davedev24 has joined #ruby
intrigueD has joined #ruby
moos3 has quit [Ping timeout: 268 seconds]
jam_ has joined #ruby
intrigueD has quit [Remote host closed the connection]
<smathy> superfox_il_volp, you close the %> and then open a <%=
LoneHermit has joined #ruby
bricker has quit [Ping timeout: 268 seconds]
kam270 has joined #ruby
<superfox_il_volp> apparently rails has a concat method ( http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-concat ) missing in Sinatra
Balzrael has quit [Quit: Leaving]
<jrcharney> I'm starting to think installing rubywith ruby-instal with the --system attribute (which installs ruby in /usr/local) may have been a bad idea. Any suggestions for how I can uninstall it and reinstall it into something like /opt/rubies?
jam_ has quit [Ping timeout: 268 seconds]
LoneHermit has quit [Ping timeout: 276 seconds]
jrcharney has quit [Quit: WeeChat 1.4]
jrcharney has joined #ruby
<jrcharney> I think tree branch hit my phone line again
pawnbox has joined #ruby
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
polyidus has quit [Quit: Later]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has joined #ruby
graffix has joined #ruby
m4tm4t has joined #ruby
RegulationD has quit [Remote host closed the connection]
m4tm4t has quit [Quit: leaving]
polyidus has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
stunder001 has quit [Quit: WeeChat 1.4]
skade has quit [Quit: Computer has gone to sleep.]
hahuang65 has quit [Ping timeout: 240 seconds]
Moosashi has joined #ruby
toretore has joined #ruby
halfamind has joined #ruby
rmulligan has quit [Ping timeout: 248 seconds]
valetudo has quit [Ping timeout: 244 seconds]
bricker has joined #ruby
tubuliferous has quit [Ping timeout: 260 seconds]
Noxilex has quit [Ping timeout: 248 seconds]
halfamind has quit [Quit: Leaving.]
rmulligan has joined #ruby
superfox_il_volp has quit [Quit: Nettalk6 - www.ntalk.de]
firstdayonthejob has quit [Ping timeout: 252 seconds]
benbro1 has joined #ruby