yeticry has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
roshanavand has joined #ruby
jud^ has quit [Ping timeout: 246 seconds]
Snowy has joined #ruby
wazzat has joined #ruby
wazzat has left #ruby [#ruby]
jud has joined #ruby
Silthias1 has joined #ruby
aryaching has quit [Remote host closed the connection]
Silthias has quit [Ping timeout: 264 seconds]
omphe has joined #ruby
hipertracker has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpb_ has joined #ruby
mikecmpb_ is now known as mikecmpbll
xue has joined #ruby
hipertracker has quit [Client Quit]
ReK2 has quit [Read error: No route to host]
stephan_ has joined #ruby
ReK2 has joined #ruby
<stephan_>
Hey, i got an really odd error. i always get "undefined method `each' for nil:NilClass" for this snippet of code: http://pastebin.com/cukxkJNF
<stephan_>
it get called twice, it seems like the first call doesnt wait for the hhtp request to end and instead sends the http request and doesnt wait for an answer
<stephan_>
is there some way to force this?
govg has joined #ruby
tristanp has quit [Ping timeout: 244 seconds]
<TomyWork>
wat
<TomyWork>
stephan_ what http request?
karapetyan has joined #ruby
<stephan_>
"hole_fixtures" sends a http get request to an api
ramfjord has quit [Ping timeout: 264 seconds]
<TomyWork>
and what does that have to do with how many times your function is being invoked?
<stephan_>
but doesnt wait until the request is completet, instead it continus executing my script
<al2o3-cr>
hemangpatel: download the zip
<al2o3-cr>
What makes you say it's disabled on debian?
<jhass>
I'd expected you'd highlight the other person it was an answer to something
<jhass>
so I took it as a question
<al2o3-cr>
i should of done really
Gooer has joined #ruby
burgestrand has joined #ruby
guest___ is now known as relix
tvw has joined #ruby
Klumben has quit [Ping timeout: 250 seconds]
alem0lars has quit [Ping timeout: 250 seconds]
Kuukunen has joined #ruby
jsaak has joined #ruby
wazzat has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
aryaching has quit [Remote host closed the connection]
dangerousdave has joined #ruby
LoneHermit has joined #ruby
rstacruz has quit [Quit: rstacruz]
saneax is now known as saneax_AFK
edwinvdgraaf has joined #ruby
rstacruz has joined #ruby
jsaak has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
dragon9783 has quit [Quit: Connection closed for inactivity]
LoneHermit has quit [Ping timeout: 252 seconds]
Oclair has quit [Read error: Connection reset by peer]
Oclair has joined #ruby
xall has joined #ruby
jsaak has joined #ruby
Gooer has quit [Ping timeout: 240 seconds]
saneax_AFK is now known as saneax
macsteps has joined #ruby
drewo has joined #ruby
rstacruz has quit [Quit: rstacruz]
aryaching has quit [Remote host closed the connection]
andikr has joined #ruby
karapetyan has quit []
xall_ has joined #ruby
Devalo has joined #ruby
macsteps has quit [Remote host closed the connection]
cd-rum has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
xall has quit [Ping timeout: 250 seconds]
cd-rum_ has joined #ruby
Devalo has quit [Remote host closed the connection]
rstacruz has joined #ruby
cd-rum has quit [Ping timeout: 250 seconds]
<crdpink>
where would I submit stdlib documentation fixes to these days?
<dminuoso>
crdpink: bugs.ruby-lang.org
<crdpink>
dminuoso: cheers!
<dminuoso>
crdpink: Or you can simply try a pull request on github, but generally you should get feedback first.
<dminuoso>
Or actually!
<dminuoso>
crdpink: Documentation fixes, just make a pull request on github. :)
<crdpink>
dminuoso: ok I will do that. Been a while since I did this and couldn't remember which way was preferred then.
<crdpink>
thanks :D
jsaak has quit [Ping timeout: 250 seconds]
hipertracker has joined #ruby
jsaak has joined #ruby
<dminuoso>
crdpink: Well, if it's obvious things that don't require peer review you can always just make a pull request - even for code stuff.
<dminuoso>
But the moment when you modify existing behavior or are applying some non-trivial fix, open a ticket first.
<crdpink>
it's really simple - just the name of a couple of arguments out of date.
<dminuoso>
Yeah that's perfectly fine. :)
pawnbox has joined #ruby
reaVer has joined #ruby
bruce_lee has joined #ruby
sdothum has joined #ruby
jsaak has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
blackgoat has joined #ruby
Klumben has joined #ruby
ramfjord has joined #ruby
alem0lars has joined #ruby
blackgoat has quit [Ping timeout: 258 seconds]
hipertracker has quit [Quit: hipertracker]
jsaak has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
johnmilton has quit [Remote host closed the connection]
Wildfyr has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
c355e3b has joined #ruby
Gooer has joined #ruby
jsaak has quit [Ping timeout: 252 seconds]
jsaak has joined #ruby
giz|work has joined #ruby
Aria22 is now known as Rose_Aleria
harfangk has quit [Quit: harfangk]
jsaak has quit [Ping timeout: 240 seconds]
akira616` has quit [Read error: Connection reset by peer]
Gooer has quit [Ping timeout: 240 seconds]
harfangk has joined #ruby
Daneel has joined #ruby
<Daneel>
hi
<Daneel>
i am not a ruby man nor a windows man but i would like to use ruby on a windows to make a big search on all disks of a file with pattern matching
<Daneel>
Dir.glob("*pattern")
jsaak has joined #ruby
<Daneel>
but does it search on all the disks ?
<Wildfyr>
i don't think so
<Mon_Ouie>
That searches only in the current directory
<Wildfyr>
^
<Mon_Ouie>
You can do something like '/**/*pattern'
craigp_ has joined #ruby
bkxd has joined #ruby
<Daneel>
Mon_Ouie, with ** it will use all drives ?
<Daneel>
like '**/*pattern'
<Daneel>
without root /
<Daneel>
it does not means something with windows
freerobby has joined #ruby
<Mon_Ouie>
No, that would look for *pattern within the current directory all its subdirectories (recursively)
<Mon_Ouie>
Well, what does Dir.entries("/") return?
coffeecupp has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<elomatreb>
Does not work across drives for me on W10
<miesco>
Hi. I need a language that is readable, that doesn't have characters before variables when you define them ($, @, etc), and is good for one liners. Is this the language?
nocco has quit []
blackmesa has joined #ruby
giz|work has joined #ruby
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 276 seconds]
tristanp has joined #ruby
aupadhye has joined #ruby
Gooer has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
jishankai has quit [Ping timeout: 272 seconds]
ewelina has joined #ruby
<toretore>
miesco: no
kavanagh has quit [Ping timeout: 240 seconds]
<dminuoso>
miesco: If you want a language that is great for one liners than readability is probably not important to you. ;-)
valkyrka_ has joined #ruby
<miesco>
ruby isn't good for one liners?
kavanagh has joined #ruby
<dminuoso>
Oh its superb for one liners.
<dminuoso>
Even quite readable ones at times
<dminuoso>
And for short compact code you probably don't need instance variables (@ivar) anyway.
<dminuoso>
But what do I know, Im a Ruby guy - Ill sell Ruby to you even if you want Perl.
the_drow has joined #ruby
jaiks has quit [Ping timeout: 250 seconds]
gloscombe has joined #ruby
ngw has joined #ruby
valkyrka has quit [Ping timeout: 276 seconds]
valkyrka_ is now known as valkyrka
modin has joined #ruby
<lupine>
it's ok, they look quite similar ^^
craigp has quit [Ping timeout: 244 seconds]
xall_ has joined #ruby
the_drow has quit [Client Quit]
the_drow has joined #ruby
<miesco>
So what is ruby lacking out of what I mentioned?
mdw has quit [Quit: Sleeping Zzzzz]
aupadhye has quit [Ping timeout: 258 seconds]
astrobun_ has quit [Read error: Connection reset by peer]
<dminuoso>
miesco: Well, Ruby comes with global variables ($foo) but you rarely if ever use them, and instance variables (which well ruby code should have) start with @.
<dminuoso>
But for short code that does not rely on classes/object oriented design that last one shouldn't matter to you.
xall_ has quit [Ping timeout: 264 seconds]
<dminuoso>
And the way that Ruby uses blocks makes it pretty easy to use for long one liners without getting confused
mattwashere has joined #ruby
craigp has joined #ruby
<ewelina>
okay
umdstu has joined #ruby
deuterium has joined #ruby
pawnbox has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
camilasan has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 244 seconds]
ewelina has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
camilasan has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
haxrbyte has quit [Ping timeout: 258 seconds]
jaiks has joined #ruby
ryez has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
aupadhye has joined #ruby
sjums has quit [Quit: Connection reset by beer]
l4v2 has joined #ruby
ryez has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
nhhc has quit [Quit: Leaving]
Macaveli has joined #ruby
pawnbox has quit [Remote host closed the connection]
dfinninger has joined #ruby
pawnbox has joined #ruby
wazzat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
they left but tbf pseudo globals are not uncommon in one liners
<jhass>
$~, $_ etc
malconis has joined #ruby
jrafanie has joined #ruby
anisha_ has joined #ruby
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
drewo has joined #ruby
anisha has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Ping timeout: 258 seconds]
hipertracker has quit [Ping timeout: 276 seconds]
<shevy>
miesco have you found such a language yet
Tempesta has quit [Quit: See ya!]
hipertracker has joined #ruby
<jhass>
oh, wait, they didn't leave, ewelina confused me :P
ta_ has joined #ruby
<miesco>
shevy: I think ruby does all of that. I don't care if you have to use sigals for class variables and such.
<miesco>
ruby = real perl 6
<lupine>
don't forget, some globals are actually thread-local-globals
mattwashere has quit [Ping timeout: 240 seconds]
<lupine>
and some are not
mrmargolis has joined #ruby
<shevy>
ah
<shevy>
now I see what you mean
drewo has quit [Ping timeout: 240 seconds]
<shevy>
like perl 5 my $foo = "black cat";
GinoManWorks has joined #ruby
<miesco>
shevy: Yea, and I don't even mind using a '$' as long as its in a quote, but if its outside a quote...
<miesco>
I guess the only problem with ruby is it can only do 40 recursive nests
sujith has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<toretore>
i did 41 once
<shevy>
lol
zapata has quit [Ping timeout: 258 seconds]
ramortegui has joined #ruby
memorasus has joined #ruby
spiette has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
ta_ has quit [Remote host closed the connection]
tesuji has joined #ruby
sepp2k has joined #ruby
roamingdog has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 272 seconds]
aupadhye has quit [Ping timeout: 252 seconds]
Rutix`away is now known as Rutix
jsaak has quit [Ping timeout: 250 seconds]
peteretep has joined #ruby
<peteretep>
Do all of Ruby's testing tools basically just raise errors on failure?
<toretore>
elaborate
fmcgeough has joined #ruby
<peteretep>
It seems that Test::Unit's assertions, and Spec::Expectations, they just `raise` to signal an assertion failure
dvinciguerra_ has joined #ruby
<peteretep>
I'm guessing this is the standard Ruby mechanism?
JeanCarloMachado has quit [Ping timeout: 252 seconds]
<toretore>
well, that's implementation specific, is it a problem for your use case?
roamingdog has joined #ruby
xall_ has joined #ruby
A_Drone has quit [Remote host closed the connection]
<peteretep>
It would seem there's no sensible interoperability mechanism between these libraries
<peteretep>
They all use their own exception classes
Tempesta has joined #ruby
Silthias1 has left #ruby [#ruby]
swills has joined #ruby
<peteretep>
If I wanted to use something like hashdiff, I'd have to write library-specific glue for each testing library I wanted to use it with
rstacruz has joined #ruby
<toretore>
probably, yes
nersoh has joined #ruby
pard has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<peteretep>
And impossible to interoperate between different test libraries
<pard>
hello
xall_ has quit [Ping timeout: 272 seconds]
<pard>
>> eval(":\\ne")
<ruby[bot]>
pard: # => (eval):1: syntax error, unexpected $undefined, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_ ...check link for more (https://eval.in/605369)
the_drow has joined #ruby
<pard>
>> eval(":#\ne")
<ruby[bot]>
pard: # => (eval):1: syntax error, unexpected ':' (SyntaxError) ...check link for more (https://eval.in/605370)
<pard>
thanks
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pard>
in irb2, i can have a comment after : and have 'e' come after it, and it would still be a sym
<pard>
has it been a bug
<pard>
i mean
<pard>
?
ascarter has joined #ruby
<pard>
>> eval("print :#\ne") // like this
<ruby[bot]>
pard: # => /tmp/execpad-788815e522ef/source-788815e522ef:2: unterminated regexp meets end of file ...check link for more (https://eval.in/605372)
<toretore>
well, in any case, i don't think it's something you should do or rely on
<pard>
thanks
astrobun_ has joined #ruby
<pard>
>> eval(":#this is a comment\\ne") # toretore
<ruby[bot]>
pard: # => (eval):1: syntax error, unexpected ':' ...check link for more (https://eval.in/605376)
<pard>
looks like it has been resolved actually
<toretore>
>> eval(":\\#you can do this\nfoo")
<ruby[bot]>
toretore: # => (eval):1: syntax error, unexpected $undefined, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_ ...check link for more (https://eval.in/605377)
<toretore>
or maybe not
sjums has joined #ruby
<toretore>
>> eval(":#comment\\\nfoo")
<ruby[bot]>
toretore: # => (eval):1: syntax error, unexpected ':' ...check link for more (https://eval.in/605378)
<toretore>
ok, enough bot abuse
roamingdog has quit [Remote host closed the connection]
<pard>
toretore, thanks; is there any way to use a particular version of ruby with >> ?
<pard>
i guess it's a bug in irb, inrepreting comments a line-continuations
<pard>
*as
<dminuoso>
stephenmac7: I don't see a compact way of doing it.
tristanp has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
<stephenmac7>
dminuoso: [1,2].zip([1,2,3]).map &:reverse seems a little inefficient
<dminuoso>
stephenmac7: truncate the longer one first, then zip.
<dminuoso>
stephenmac7: In about 548 cases out of 560 when people talk about efficiency it is premature optimization.
<dminuoso>
Also 90% of all statistics are made up
JakFrist has joined #ruby
<stephenmac7>
dminuoso: Yup, and that's probably one of them
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso>
It doesn't invalidate my point though.
<stephenmac7>
(a case of premature optimization) Plus, if I was working somewhere that actually cared about speed I wouldn't be using ruby
<dminuoso>
Precisely.
depesz has left #ruby ["WeeChat 1.5-dev"]
mattwashere has joined #ruby
<stephenmac7>
So something like a.take(a.size - 1).zip(a.drop(1)) is better than the reverse approach
[74]HELLth has joined #ruby
alfiemax has joined #ruby
dasher^0_o has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 276 seconds]
<dminuoso>
stephenmac7: It at also clearly documents the intent.
Gooer has joined #ruby
mdw has joined #ruby
<stephenmac7>
dminuoso: Yes, thanks for the help!
kavanagh has quit [Read error: Connection reset by peer]
AngryBuzzy has joined #ruby
JeanCarloMachado has quit [Ping timeout: 246 seconds]
hipertracker has quit [Ping timeout: 276 seconds]
Es0teric has joined #ruby
roshanavand has joined #ruby
codecop has quit [Remote host closed the connection]
tristanp has joined #ruby
sneakerhax has quit [Ping timeout: 250 seconds]
pard has quit [Quit: Leaving]
drewo has joined #ruby
Es0teric has quit [Client Quit]
eljimmy has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
roshanavand has quit [Client Quit]
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
JeanCarloMachado has joined #ruby
flughafen_ has joined #ruby
drewo has quit [Ping timeout: 264 seconds]
The_Phoenix has joined #ruby
mistermocha has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
mdw has quit [Quit: Sleeping Zzzzz]
chip_ has quit [Ping timeout: 258 seconds]
The_Phoenix has joined #ruby
Hounddog has quit [Remote host closed the connection]
polysics has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
ItSANgo has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
mdw has joined #ruby
aupadhye has joined #ruby
LBRapid has quit [Ping timeout: 250 seconds]
yadobujo has quit [Remote host closed the connection]
giz|work has quit [Ping timeout: 240 seconds]
yadobujo has joined #ruby
hipertracker has joined #ruby
giz|work has joined #ruby
yadobujo has quit [Ping timeout: 240 seconds]
xue has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
mistermocha has quit [Remote host closed the connection]
LBRapid has joined #ruby
dminuoso has quit [Ping timeout: 272 seconds]
mrmargolis has joined #ruby
chenillen has joined #ruby
<nettoweb>
guys, I installed RVM, but it was all ok, but then I installed fish shell, and now it dont recognize rvm command. I need to change some config so fish can detect previous rvm installed?
<Daneel>
chris2, even if the file is with microsoft end of file ?
<chris2>
if it consistently uses \r\n...
<chris2>
probably File.read transcodes on windows
xue has joined #ruby
<Daneel>
chris2, thank you
hipertracker has quit [Quit: hipertracker]
gizmore has joined #ruby
Mirubiri has joined #ruby
Mirubiri has quit [Max SendQ exceeded]
tristanp has joined #ruby
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mirubiri has joined #ruby
diegoviola has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Mirubiri has quit [Max SendQ exceeded]
[Butch] has joined #ruby
Mirubiri has joined #ruby
nersoh has joined #ruby
Miron has quit [Ping timeout: 250 seconds]
Es0teric has joined #ruby
Mirubiri has quit [Max SendQ exceeded]
loveablelobster has joined #ruby
loveablelobster has quit [Client Quit]
d5sx43 has joined #ruby
<lupine>
note that that won't do too well with ginormous files
jsaak has joined #ruby
troulouliou_divn has quit [Quit: Leaving]
swills has joined #ruby
<jhass>
File.foreach("file").count should however
troulouliou_div2 has joined #ruby
Mirubiri has joined #ruby
Pumukel has quit [Ping timeout: 252 seconds]
<lupine>
I'd gotten as far as `File.open("/vmlinuz", "r").each_line.inject(0) {|acc,_| acc + 1 }` :D
Snowy has quit [Quit: ragequit]
Azure has quit [Ping timeout: 276 seconds]
Azure|dc has joined #ruby
xall_ has joined #ruby
Mirubiri has left #ruby [#ruby]
<Daneel>
in a string like /my/path/for/a/file, i would like have 'file' in a variable. How to call the variable in the string ? like /my/path/for/a/$myvariable ?
the_drow has quit [Quit: This computer has gone to sleep]
sullyj3 has quit [Quit: Leaving]
<lupine>
yeah, foreach is better
<Daneel>
ah perhaps #{myvariable} ?
Cohedrin has joined #ruby
swills has quit [Remote host closed the connection]
<jhass>
Daneel: generically yes, in this case however just File.join("/my/path/for/a", myvariable)
<lupine>
Daneel: yep, although you might one to use File.join to avoid a platform dependency
<lupine>
:D
<chris2>
so it runs on vms? :P
<jhass>
all ruby code must!
AndyBotwin has joined #ruby
<jhass>
but no, so you don't have to deal with trailing/leading / in the variable yourself
dionysus69 has quit [Ping timeout: 260 seconds]
swills has joined #ruby
Guest60828 has quit [Ping timeout: 276 seconds]
whathappens has joined #ruby
swills has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
harfangk has quit [Quit: harfangk]
d5sx43 has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
<jhass>
btw use p, not print or puts for debug printing
<pard>
i though the 'def' thing returns 'nil'
<pard>
jhass, apologies
<jhass>
it did until ruby 2.0
<pard>
i'm way behind others then
<pard>
:\
tristanp has joined #ruby
Silthias has quit [Quit: Leaving.]
Oclair has quit [Ping timeout: 260 seconds]
<pard>
jhass, could we say that 'print (undef l)' not parsing is an inconsistency? specially because the '(undef l)' thing looks to be correct?
<jhass>
I'd argue so
<jhass>
hence I called it edgecase
<pard>
thanks :)
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
thing is I can't imagine any real world usecase ;)
<pard>
there :)
<pard>
i'm writing a parser
<jhass>
for ruby?
<pard>
yes
AngryBuzzy has joined #ruby
<jhass>
for fun or...?
<pard>
jhass, that is what i actually asked on this channel last week :\
<umdstu>
i recently updated to rest-client 2.0 and response.cookies isn’t being populated by the cookie field in the response headers for some reason. anyone run across this?
<pard>
jhass, i'm really eager to find a real-world usage for it though; it is a recursive descent parser, and i could say it is arguably simpler
aazsdk has quit [Quit: aazsdk]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
LBRapid has quit [Ping timeout: 250 seconds]
hutch34 has joined #ruby
bb010g has joined #ruby
johnbat26 has quit [Ping timeout: 250 seconds]
zekriad has joined #ruby
pard has quit [Quit: Leaving]
eizua has quit [Remote host closed the connection]
replay has joined #ruby
replay has quit [Max SendQ exceeded]
zacts has joined #ruby
hipertracker has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wixad_ has joined #ruby
replay has joined #ruby
replay has quit [Max SendQ exceeded]
replay has joined #ruby
Klumben has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
naftilos76 has joined #ruby
LBRapid has joined #ruby
JeanCarloMachado has joined #ruby
last_staff has joined #ruby
dfinninger has quit []
skweek has joined #ruby
xall_ has joined #ruby
jmarinelli has joined #ruby
jmarinelli is now known as yuung
alem0lars has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
AngryBuzzy has quit [Quit: This computer has gone to sleep]
smathy has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
sneakers has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
banisterfiend has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
whathappens has quit [Ping timeout: 276 seconds]
aryaching has quit [Ping timeout: 276 seconds]
astrobun_ has joined #ruby
minimalism has quit [Quit: minimalism]
k13nox has joined #ruby
conta has joined #ruby
jaruga___ has quit [Quit: jaruga___]
lkb_ has joined #ruby
astrobun_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
blackmesa has joined #ruby
spider-mario has joined #ruby
lkb has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
LoneHermit has quit [Remote host closed the connection]
jakkn has quit [Ping timeout: 244 seconds]
SilverKey has quit [Quit: Halted.]
hutch34 has quit [Ping timeout: 264 seconds]
zacts has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
augcesar has joined #ruby
SilverKey has joined #ruby
nankyokusei has joined #ruby
rcvalle has joined #ruby
marxarelli has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
umdstu has quit [Quit: umdstu]
dionysus69 has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
swills has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
<wixad_>
class DiceSet def roll(n) res = [] co=rand(1..6) n.times do res << co end; end;
tristanp has quit [Ping timeout: 250 seconds]
nemish has joined #ruby
swills has joined #ruby
aep-shoutlet has joined #ruby
gizmore has quit [Ping timeout: 276 seconds]
<nemish>
I have probably a simple question... I have a server that I did a "gem install FOO" on and it went and installed the gem and it's dependencies... now few months later when i do a "gem install FOO" it downloads newer versions of the dependencies even though it's same version of the FOO gem but some of those children require ruby 2.2 :(
<wixad_>
my problem is that i cant access the array from outside
<nemish>
is there a way I can use a Gemfile or something to install system gems instead of bundled gems
whathappens has joined #ruby
<jhass>
wixad_: you need to return it from the method
Gooer has joined #ruby
<wixad_>
and the array is being filled with the same number
gizmore has joined #ruby
<jhass>
or store it in an instance variable and provide further methods to operate on it
<jhass>
well yes, you only generate one random number and add it n times
catphish has joined #ruby
aibot has joined #ruby
cschnei__ has quit [Ping timeout: 272 seconds]
<catphish>
is "#read_nonblock(9999999)" a reasonable way to throw away all data in an IO buffer?
<jhass>
I'd question the need to do any such thing in the first place
<wixad_>
n is suposed to be the number of rolls and the array should store the number
smathy_ has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
<catphish>
jhass: how so?
smathy has quit [Ping timeout: 240 seconds]
finisherr has joined #ruby
Mirubiri has joined #ruby
<jakkn>
I'm working on a Rakefile where I would like to transform files from .yml to whatever the old extension was. I don't care what the old extension was, could be foo.bar.yml or foo.baz.yml, I just want to apply the tranformation to the files and create foo.bar and foo.baz. I've been wringing my brain but can't come up with a clever way to do this..
tristanp has joined #ruby
aakira616 has joined #ruby
swills has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
<jhass>
catphish: not knowing how much data you need to discard is kinda weird
aakira616 has left #ruby [#ruby]
k13nox has quit [Remote host closed the connection]
blaxter has quit [Quit: foo]
johnmilton has quit [Remote host closed the connection]
yfeldblum has joined #ruby
marr has quit [Remote host closed the connection]
akira616 has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
<catphish>
jhass: well sometimes things send data during their boot which you arent interested in, but don't know its quantity, so you just want to empty the rx buffer before sending your first command
Mirubiri has quit [Quit: WeeChat 1.5]
freerobby has joined #ruby
<catphish>
it's not an ideal situation certainly, but with serial connections, sometimes junk just ends up in the buffer before you get started
<jhass>
never seen any where you wouldn't be able to properly figure out how much that was
<jakkn>
does anyone have any clues on how to accomplish what I described above? I thought about having a rule where the name came from a lambda function, but that failed and I guess reasonably so.
djbkd_ has joined #ruby
<catphish>
anyway, that aside, any idea what the best way might be to discard the entire rx buffer?
flughafen_ has quit [Ping timeout: 246 seconds]
huyderman has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
chip_ has joined #ruby
Tachikomas has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Gooer has quit [Ping timeout: 240 seconds]
bmurt has quit [Max SendQ exceeded]
firstdayonthejob has quit [Quit: WeeChat 1.5]
Mirubiri has joined #ruby
bmurt has joined #ruby
yadobujo_ has joined #ruby
xall_ has joined #ruby
Mirubiri has left #ruby [#ruby]
kirun has joined #ruby
u235psycho has joined #ruby
vuoto has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
yadobujo has quit [Ping timeout: 258 seconds]
<al2o3-cr>
catphish: #nread will tell you how many bytes can be read
elaptics is now known as elaptics`away
yadobujo_ is now known as yadobujo
weaksauce has quit [Ping timeout: 272 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vuoto has quit [Read error: Connection reset by peer]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
k13nox has quit [Remote host closed the connection]
<al2o3-cr>
word
dionysus69 has joined #ruby
freerobby has quit [Quit: Leaving.]
k13nox has joined #ruby
nando293921 has quit [Ping timeout: 272 seconds]
AndrewIsHere has joined #ruby
troulouliou_div2 has joined #ruby
flughafen_ has joined #ruby
SilverKey has quit [Quit: Halted.]
diegoviola has quit [Ping timeout: 272 seconds]
nekomune has quit [Ping timeout: 272 seconds]
Mirubiri has quit [Quit: -]
jakkn has quit [Quit: leaving]
singalaut has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
yqt has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
pawnbox_ has joined #ruby
Synthead has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
flughafen_ has quit [Ping timeout: 240 seconds]
mistermocha has quit [Remote host closed the connection]
VerrNum has joined #ruby
mistermocha has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
tristanp has quit [Ping timeout: 264 seconds]
isberg has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
whathappens has quit [Ping timeout: 244 seconds]
tristanp has joined #ruby
spudowiar has quit [Quit: biab]
nekomune has joined #ruby
burgestrand has joined #ruby
Nawn has joined #ruby
conta has quit [Ping timeout: 244 seconds]
VerrNum has quit [Quit: Page closed]
al2o3-cr has quit [Quit: WeeChat 1.5]
Es0teric has joined #ruby
SilverKey has joined #ruby
Ishido has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
Tachikomas has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
eljimmy has quit [Quit: This computer has gone to sleep]
Ishido has joined #ruby
Nawn has quit [Remote host closed the connection]
yuung has quit [Ping timeout: 264 seconds]
tristanp has quit [Ping timeout: 258 seconds]
<l4v2>
What does the * and & mean in the docs that say this for create create(*args, &block)
<l4v2>
is that the splat?
<l4v2>
and block address>
centrx has quit []
naftilos76 has quit [Quit: Αποχώρησε]
kavanagh has joined #ruby
diegoviola has joined #ruby
<havenwood>
l4v2: that signifies that the parameter is being passed as a block
weaksauce has joined #ruby
Nawn has joined #ruby
mistermocha has joined #ruby
firstdayonthejob has joined #ruby
Nawn has quit [Remote host closed the connection]
<l4v2>
havenwood thank you. Hey do you get paid to do this lol
postmodern has joined #ruby
<jhass>
yes, I handle the transactions, that'll be $30
<dminuoso>
So I was actually going to say "One dereferneces, one takes the address - duh". Good thing I wasn't so quick.
burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
<havenwood>
l4v2: We unfortunately don't get paid for answering questions on irc. :-)
djbkd_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
tristanp has joined #ruby
_djbkd has joined #ruby
<l4v2>
Trying to learn how to read the docs
DoubleMalt has joined #ruby
blackgoat has joined #ruby
kavanagh has quit [Quit: That's all folks!]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
burgestrand has joined #ruby
jenrzzz has joined #ruby
<shevy>
l4v2 many similar questions are asked, the more common ones are simpler to answer. I guess * is within the top 20, aka people don't know that it is called "splat" and if they don't know that, they can not too easily google/search for it (it's mostly advanced users who can search for * as the token)
_djbkd has quit [Ping timeout: 240 seconds]
<l4v2>
So when I see that in a doc it jsut means any number of args right?
xall_ has quit [Ping timeout: 244 seconds]
<havenwood>
l4v2: the parameter with the * is a catch-all argument and the parameter with the & is a block
flashpoint9 has quit [Remote host closed the connection]
<l4v2>
how would those be used in ActiveRecords Create class?
<l4v2>
method
burgestrand has quit [Client Quit]
<havenwood>
l4v2: Link to the docs for the method you're talking about?
<flashpoint9>
drbrain: So are frozen strings meant to replace symbols in a hash or is it just a boost for cases where you have/want to use a string as a key in a hash
tristanp has joined #ruby
<drbrain>
flashpoint9: frozen strings are not meant to replace symbols
<eam>
due to optomization for certain key class types
<drbrain>
they may be a boost for use as hash keys, and may improve memory efficiency if you have lots of tiny strings
<eam>
optimization, even
<flashpoint9>
so in general stick with symbols for hash keys
<drbrain>
flashpoint9: use what's "natural"
xall_ has quit [Ping timeout: 260 seconds]
<drbrain>
if you're using hashes in your program and don't accept user input to reference the hash keys, symbols are great
<drbrain>
if you use user input to pick values out of a hash, use strings
<flashpoint9>
ok, and sorry if this is a nub question, what makes a symbol "natural" in a case vs a string for hash keys?
<flashpoint9>
ahhhh
<flashpoint9>
ok
<flashpoint9>
sorry hadnt scrolled down
<flashpoint9>
thanks!
akira616 has joined #ruby
<drbrain>
maybe you have a drawing API with a constant COLORS = { red: '#ff0000;', … }
<drbrain>
then you could have pen.color :red
<drbrain>
so symbols would be natural because it's all code
<drbrain>
but if it was: puts "what color do you want to draw with?"; color = gets.strip
<drbrain>
then you would want to use strings
tvw has quit [Remote host closed the connection]
<eam>
you can conceptually replace the gets() with "data from json" for example
<eam>
json doesn't have a Symbol type
<drbrain>
or data from an HTTP form field
nankyokusei has joined #ruby
<flashpoint9>
thanks again
solars has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
chip_ has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
jetpackjoe has quit [Quit: WeeChat 1.5]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
xall_ has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
SCHAAP137 has quit [Ping timeout: 276 seconds]
_djbkd has quit [Ping timeout: 240 seconds]
babblebre has joined #ruby
spudowiar has quit [Quit: Leaving.]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has joined #ruby
solars has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
replay has quit [Ping timeout: 250 seconds]
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
[Muslim] has joined #ruby
SilverKey has quit [Quit: Halted.]
_djbkd has quit [Remote host closed the connection]
mattwashere has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
drewo has quit [Quit: WeeChat 1.4]
drew has joined #ruby
drew is now known as Guest39441
tristanp has quit [Ping timeout: 252 seconds]
tristanp has joined #ruby
xall_ has quit [Ping timeout: 258 seconds]
SilverKey has joined #ruby
postmodern has quit [Quit: Leaving]
kirun has quit [Remote host closed the connection]
mdw has quit [Quit: Sleeping Zzzzz]
yadobujo has quit [Remote host closed the connection]
biberu has quit [Read error: Connection reset by peer]
troulouliou_div2 has quit [Quit: Leaving]
dhollinger has quit [Quit: WeeChat 1.5]
hipertracker has quit [Quit: hipertracker]
SHyx0rmZ has quit [Ping timeout: 276 seconds]
whathappens has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
gizless has joined #ruby
whathappens has quit [Client Quit]
k13nox has joined #ruby
Oclair_ has quit [Ping timeout: 244 seconds]
pontiki has joined #ruby
<shortdudey123>
anyone have a suggestions for a gem that will be faster than Zlib::GzipReader?
[Muslim] has left #ruby [#ruby]
ta_ has quit [Remote host closed the connection]
neohunter has joined #ruby
LoneHerm_ has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<jhass>
your bottleneck probably is Ruby there tbh
<jhass>
it just binds libz already
zenlot6 has joined #ruby
moeabdol has joined #ruby
<flashpoint9>
jhass: should he use a different language?
astrobun_ has joined #ruby
<jhass>
perhaps, it depends on what's actually done
hipertracker has joined #ruby
aredridel has quit [Ping timeout: 258 seconds]
<jhass>
there might be a faster implementation thereof in Ruby too
nb_bez___ has quit [Quit: Connection closed for inactivity]
<jhass>
so that was actually going to be my next question, what are you doing and how?
flashpoint9 has quit [Remote host closed the connection]
zenlot has quit [Ping timeout: 272 seconds]
flashpoint9 has joined #ruby
dopamean_ has quit [Ping timeout: 246 seconds]
LoneHerm_ has quit [Ping timeout: 250 seconds]
aredridel has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
astrobun_ has quit [Ping timeout: 252 seconds]
mistermocha has quit [Remote host closed the connection]
<bougyman>
w/44
flashpoint9 has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
gizmore has joined #ruby
gizless has quit [Ping timeout: 250 seconds]
tristanp has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
tristanp has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
sung has joined #ruby
polishdub has quit [Quit: Leaving]
AndrewIsHere has quit []
dminuoso has quit [Ping timeout: 240 seconds]
LoneHerm_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 272 seconds]
postmodern has joined #ruby
djbkd_ has joined #ruby
dvinciguerra_ has joined #ruby
SilverKey has quit [Quit: Halted.]
Guest60828 has quit [Ping timeout: 258 seconds]
Mimorial has quit [Ping timeout: 276 seconds]
cschnei__ has quit [Remote host closed the connection]
SilverKey has joined #ruby
mistermocha has joined #ruby
Guest60828 has joined #ruby
CloCkWeRX has joined #ruby
yfeldblum has quit [Remote host closed the connection]
finnnnnnnnnnn has joined #ruby
memorasus1 has joined #ruby
hipertracker has quit [Quit: hipertracker]
memorasus has quit [Ping timeout: 240 seconds]
memorasus1 is now known as memorasus
edwardly has quit [Ping timeout: 272 seconds]
cd-rum has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
hipertracker has joined #ruby
pwnd_nsfw` has joined #ruby
cd-rum_ has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
Mirubiri has joined #ruby
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
cd-rum has quit [Ping timeout: 264 seconds]
pontiki has quit [Quit: Lost terminal]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
saneax_AFK is now known as saneax
tristanp has joined #ruby
<shortdudey123>
jhass: taking a gz file, reading a line at a time, and doing something with the line