Soda has quit [Read error: Connection reset by peer]
fgo has quit [Ping timeout: 255 seconds]
robfrawley has joined #ruby
confused_ has quit [Excess Flood]
Photism has joined #ruby
gtrak_ has quit [Ping timeout: 264 seconds]
gtrak_ has joined #ruby
cap has quit [Ping timeout: 264 seconds]
whyy has quit [Ping timeout: 255 seconds]
marr has quit [Ping timeout: 250 seconds]
mkaesz has joined #ruby
oo_ has joined #ruby
Grantlyk has quit [Read error: Connection reset by peer]
zz_karupa is now known as karupa
Grantlyk has joined #ruby
Martxel has quit [Read error: Connection reset by peer]
mkaesz has quit [Ping timeout: 250 seconds]
davispuh has quit [Ping timeout: 245 seconds]
linojon has joined #ruby
Soda has joined #ruby
tyfighter has quit [Quit: tyfighter]
oo_ has quit [Remote host closed the connection]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
pareidoliax has joined #ruby
rubytor has joined #ruby
sylvanica has joined #ruby
oo_ has joined #ruby
nobitanobi has joined #ruby
mojo619 has joined #ruby
gilest has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaelchum has quit [Quit: Connection closed for inactivity]
ixti has quit [Quit: WeeChat 0.4.3]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinH_ has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
GriffinHeart has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
iteratorP has joined #ruby
gtrak_ has quit [Ping timeout: 264 seconds]
peret has quit []
momomomomo has quit [Quit: momomomomo]
GriffinHeart has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
michaeldeol has joined #ruby
SilkFox has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 244 seconds]
ghr has joined #ruby
juz88 has quit [Ping timeout: 260 seconds]
SilkFox has joined #ruby
icebourg has joined #ruby
wallerdev has joined #ruby
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
icebourg has joined #ruby
robbyoconnor has joined #ruby
icebourg has quit [Max SendQ exceeded]
ghr has quit [Ping timeout: 272 seconds]
rdavila has quit [Quit: rdavila]
MrSamuel has joined #ruby
icebourg has joined #ruby
chipotle has quit [Quit: cya]
hfp_ is now known as hfp
icebourg has quit [Max SendQ exceeded]
hfp is now known as hfp_
hfp_ is now known as hfp
wallerdev_ has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
wallerdev has quit [Ping timeout: 246 seconds]
wallerdev_ is now known as wallerdev
icebourg has joined #ruby
axsuul_ has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
charliesome has quit [Quit: zzz]
androidbruce has left #ruby ["Leaving"]
onso has joined #ruby
androidbruce has joined #ruby
SilkFox_ has joined #ruby
Shidash1 has joined #ruby
Shidash has quit [Read error: Connection reset by peer]
SilkFox has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
axsuul has joined #ruby
tylerkern has joined #ruby
SilkFox has joined #ruby
mkaesz has joined #ruby
SilkFox_ has quit [Ping timeout: 245 seconds]
cy has joined #ruby
Grantlyk has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
mkaesz has quit [Ping timeout: 246 seconds]
gilest has quit [Read error: Connection reset by peer]
fgo has joined #ruby
gilest has joined #ruby
wallerdev_ has joined #ruby
jmbrown412 has quit [Remote host closed the connection]
fgo has quit [Read error: Connection reset by peer]
fgo has joined #ruby
vyorkin has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
timgauthier has joined #ruby
nateberkopec has joined #ruby
wallerdev_ has quit [Quit: wallerdev_]
nobitanobi has quit [Client Quit]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patrick99e99 has joined #ruby
chipotle has joined #ruby
niklasb has joined #ruby
davedev2_ has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Ping timeout: 240 seconds]
patrick99e99 has quit [Ping timeout: 244 seconds]
fgo has quit [Remote host closed the connection]
rdavila has joined #ruby
fgo has joined #ruby
nobitanobi has joined #ruby
phutchins has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
oo__ has joined #ruby
oo_ has quit [Quit: Leaving...]
mercwithamouth has joined #ruby
nobitanobi has quit [Remote host closed the connection]
wallerdev has quit [Read error: Connection reset by peer]
arup_r has quit [Read error: Connection reset by peer]
tokik has joined #ruby
goshdarnyou has quit [Quit: Connection closed for inactivity]
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
fgo has joined #ruby
Fezzler has quit [Quit: Leaving]
chipotle has quit [Ping timeout: 250 seconds]
mercwithamouth has quit [Ping timeout: 255 seconds]
androidbruce has left #ruby ["Leaving"]
androidbruce has joined #ruby
philcrissman has joined #ruby
oo__ has quit [Remote host closed the connection]
oo_ has joined #ruby
arup_r has joined #ruby
cocotton has joined #ruby
chipotle has joined #ruby
Atlas159 has quit [Read error: Connection reset by peer]
jsodini has joined #ruby
philcrissman has quit [Ping timeout: 255 seconds]
cocotton has quit [Remote host closed the connection]
oo_ has quit [Ping timeout: 260 seconds]
cocotton has joined #ruby
MrSamuel has quit [Quit: MrSamuel]
axsuul has quit [Read error: Connection reset by peer]
_0xf_ has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
whyy has joined #ruby
fumduq has quit [Quit: die()]
cocotton has quit [Ping timeout: 240 seconds]
SilkFox has joined #ruby
bmurt has joined #ruby
bmurt has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whyy has quit [Ping timeout: 244 seconds]
gilest has quit [Remote host closed the connection]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
charliesome has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
rubytor has joined #ruby
SouL has quit [Ping timeout: 245 seconds]
gilest has joined #ruby
<pontiki>
o/
goodenough has joined #ruby
Apocalypse has quit [Quit: Input/Output Error]
axsuul has joined #ruby
<Nilium>
Mercurial's seriously going to drive me insane.
<pontiki>
has it gone retrograde?
mkaesz has joined #ruby
tyfighter has joined #ruby
GinoMan has quit [Ping timeout: 244 seconds]
Dreamer3 has joined #ruby
chipotle has quit [Ping timeout: 246 seconds]
arup_r has quit [Read error: Connection reset by peer]
_0xf_ has joined #ruby
axl_ has joined #ruby
krz has joined #ruby
GriffinHeart has joined #ruby
mkaesz has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
axl_ has quit [Client Quit]
Fire-Dragon-DoL has quit [Quit: Leaving.]
_0xf_ has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Ping timeout: 255 seconds]
mojo619 has quit [Quit: mojo619]
<Nilium>
pontiki: No, but when I've been using git for ~6 years and have a workflow around it, Mercurial doesn't fit.
nateberkopec has quit [Quit: Leaving...]
<Nilium>
And the most annoying part is that I keep getting people telling me that X in Mercurial is equivalent to Y in git, and it becomes obvious that all the people talking about Y in git haven't got a single idea what they're talking about
<pontiki>
it was just sort of a joke...
<Nilium>
I'm starting to think Mercurial started out as a joke that everyone took seriously ಠ_ಠ
Oog has joined #ruby
<Oog>
ive got a string "for <blah@asdfasdfads.com\x0E\xC8\x14\xDD....." - trying to figure out how to decode it... that \x0E should be a > - any ideas waht this i?
arup_r has joined #ruby
<pontiki>
those are hex character codes
<pontiki>
seems odd following an email address, tho
goshdarnyou has joined #ruby
<Oog>
yeah...
<Oog>
this is coming from the gmail api - it is supposed to be the raw mime data
Apocalypse has joined #ruby
<Oog>
the first 1000 or so characters are normal then this starts
<pontiki>
no idea, then
chipotle has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
sevenseacat has joined #ruby
Soda has quit [Remote host closed the connection]
tokik has quit [Quit: leaving]
tokik has joined #ruby
juz88 has joined #ruby
vyorkin has quit [Ping timeout: 272 seconds]
tokik_ has joined #ruby
mr-foobar has quit [Read error: Connection reset by peer]
tokik has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby
cy has quit [Quit: :q!]
fgo has quit [Remote host closed the connection]
fgo has joined #ruby
hamakn has joined #ruby
sylvanica has quit [Ping timeout: 250 seconds]
mahtennek has joined #ruby
divi has joined #ruby
nobitanobi has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
michaeldeol has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
Zenigor has quit [Remote host closed the connection]
jerikl has joined #ruby
divi has quit [Ping timeout: 240 seconds]
juz88 has quit [Ping timeout: 255 seconds]
DadoCe has joined #ruby
Matadoer has quit [Remote host closed the connection]
BraddBitt has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
braincrash has quit [Quit: bye bye]
juz88 has joined #ruby
mikedugan has quit [Ping timeout: 246 seconds]
ghr has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iteratorP has quit [Remote host closed the connection]
alexju has joined #ruby
iteratorP has joined #ruby
braincrash has joined #ruby
SilkFox has joined #ruby
Takle has joined #ruby
Cheezebox has joined #ruby
_0xf_ has joined #ruby
frankle has quit [Quit: Connection closed for inactivity]
tyfighter has quit [Quit: tyfighter]
ghr has quit [Ping timeout: 244 seconds]
fgo has joined #ruby
alexju has quit [Remote host closed the connection]
fgo has quit [Client Quit]
alexju has joined #ruby
SilkFox has quit [Ping timeout: 260 seconds]
juz88 has quit [Ping timeout: 245 seconds]
Takle has quit [Ping timeout: 260 seconds]
_0xf_ has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
thomasxie has joined #ruby
alexju has quit [Ping timeout: 240 seconds]
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsfiffo has joined #ruby
<dsfiffo>
i copied pasted a block into irb and it prints out the files in current directory before reaching end? what the hell?
kp666 has joined #ruby
xaxisx has joined #ruby
Cheezebox has quit [Remote host closed the connection]
mkaesz has joined #ruby
momomomomo has joined #ruby
kp666 has quit [Ping timeout: 250 seconds]
kp666 has joined #ruby
<Oog>
what is inverse of =~
chipotle has quit [Ping timeout: 244 seconds]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
divi has joined #ruby
mahtennek has quit [Remote host closed the connection]
mkaesz has quit [Ping timeout: 250 seconds]
GriffinHeart has joined #ruby
rubytor has joined #ruby
<Oog>
found it
centrx has joined #ruby
hamakn has quit [Remote host closed the connection]
kp666 has quit [Read error: Connection reset by peer]
kp666 has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
mbuf has joined #ruby
yfeldblum has joined #ruby
divi has quit [Ping timeout: 240 seconds]
BraddPitt has joined #ruby
_0xf_ has joined #ruby
GriffinHeart has quit [Ping timeout: 250 seconds]
narcan has joined #ruby
BraddBitt has joined #ruby
kp666 has quit [Ping timeout: 255 seconds]
axl_ has joined #ruby
kp666 has joined #ruby
chipotle has quit [Ping timeout: 250 seconds]
axl_ has quit [Client Quit]
mahtennek has joined #ruby
BraddPitt has quit [Ping timeout: 240 seconds]
jobewan has quit [Remote host closed the connection]
chipotle has joined #ruby
Tab_ has joined #ruby
<agent_white>
dsfiffo: Is that what the block returns? You can hit 'q' instead of scrolling down to the end of it, if you want.
<agent_white>
scrolling down to the end of the output*
MatthewsFace has quit [Quit: This computer has gone to sleep]
<dsfiffo>
it prints, not returns
Tab_ has quit [Read error: Connection reset by peer]
<centrx>
oh actually it's in a sandbox, dir is probably disabled
<mbuf>
centrx: okay, need to use it in a Ruby script file. It works
<mbuf>
centrx: thanks!
<centrx>
great
alexju has joined #ruby
philcrissman has quit [Ping timeout: 250 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kp666 has quit [Remote host closed the connection]
kp666 has joined #ruby
centrx has quit [Quit: Mead error: Connection reset by beer]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
narcan has joined #ruby
kp666 has quit [Remote host closed the connection]
kp666 has joined #ruby
whyy has joined #ruby
icebourg has quit []
ValicekB has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
kp666 has quit [Remote host closed the connection]
rubytor has joined #ruby
kp666 has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
axilla has quit [Ping timeout: 240 seconds]
tkuchiki_ has joined #ruby
Fezzler has joined #ruby
whyy has quit [Ping timeout: 264 seconds]
hamakn has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kp666 has quit [Remote host closed the connection]
kp666 has joined #ruby
duncannz has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
eeezkil has quit [Ping timeout: 260 seconds]
Fezzler has quit [Client Quit]
tyfighter has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
kp666 has quit [Client Quit]
ghr has joined #ruby
bluOxigen has joined #ruby
SilkFox has joined #ruby
rdavila has quit [Quit: rdavila]
rdavila has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
icebourg has joined #ruby
arup_r has quit [Client Quit]
rdavila has quit [Ping timeout: 272 seconds]
SilkFox has quit [Ping timeout: 272 seconds]
DadoCe has quit [Remote host closed the connection]
snorkra has quit [Ping timeout: 244 seconds]
gilest has quit [Remote host closed the connection]
tylerkern has joined #ruby
Pharaoh2 has quit [Quit: Leaving...]
timgauthier has joined #ruby
freerobby has quit [Quit: Leaving.]
bearish has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
arya_ has joined #ruby
sylvanica has joined #ruby
bearish has quit [Ping timeout: 245 seconds]
mkaesz has joined #ruby
hasan has left #ruby [#ruby]
nat2610 has quit [Quit: Leaving.]
jerikl has quit [Quit: jerikl]
icebourg has quit []
nobitanobi has quit [Remote host closed the connection]
Wolland has joined #ruby
PanPan has joined #ruby
nobitanobi has joined #ruby
momomomomo has quit [Quit: momomomomo]
mkaesz has quit [Ping timeout: 245 seconds]
Wolland has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
kies has joined #ruby
GriffinHeart has joined #ruby
echooo has joined #ruby
icebourg has joined #ruby
Wolland has joined #ruby
gilest has joined #ruby
GriffinHeart has quit [Ping timeout: 246 seconds]
<nobitanobi>
Which data structure would I use in order to place objects in there, and at some point be able to find out if there is a particular element in there?
<nobitanobi>
first thing that comes to mind is an Array, but I am guessing there might be something 'more optimal' for this task.
jarto has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
nat2610 has joined #ruby
michaeldeol has joined #ruby
JBreit has quit [Quit: Leaving]
geardev has joined #ruby
hamakn has joined #ruby
<geardev>
I have a string like "1700" and I'd like to parse it as a Time
Inside has quit [Ping timeout: 255 seconds]
<geardev>
how would you do this?
<cHarNe2>
Time.geardev: strftime
armyriad has quit [Ping timeout: 260 seconds]
<cHarNe2>
geardev: lol, that was wrong :P Time.strftime
<cHarNe2>
i think that is the one
JBreit has joined #ruby
<cHarNe2>
you might have to do some rweaking because of the parsing
<geardev>
i wish i could use t.to_time
<geardev>
or Time.at("1700")
<geardev>
'1700'.to_time
axl_ has joined #ruby
axl_ has quit [Client Quit]
<cHarNe2>
geardev: ohh, i misunderstood
<cHarNe2>
chipotle: you need Time.parse
mooru has joined #ruby
<cHarNe2>
geardev: ^
<cHarNe2>
be sure to do require "time"
ARCADIVS has joined #ruby
whyy has joined #ruby
InhalingPixels has quit [Remote host closed the connection]
Oog has quit []
InhalingPixels has joined #ruby
chipotle has quit [Quit: cya]
Deele has joined #ruby
arya_ has quit [Read error: No route to host]
<geardev>
Time.parse("1700", Time.now) => ArgumentError: argument out of range
<geardev>
Time.at("1700".to_i)
<geardev>
that's it
mercwithamouth has joined #ruby
<geardev>
except that it gives a year of 1970
<geardev>
..so that can't be right
<cHarNe2>
geardev: it is, you have tweak a bit
asteve has joined #ruby
<cHarNe2>
t = Time.parse(Time.new.year, Time.new.month, Time.new.day....)
InhalingPixels has quit [Ping timeout: 255 seconds]
<geardev>
i guess i really don't need to parse the time
<geardev>
because there's no associated date
<geardev>
it should probably be a string
<cHarNe2>
ok, well if you dont need the Time.object i dont see a reason to
<geardev>
ah, i have access to a date object, i can base it off of that
GriffinHeart has joined #ruby
<geardev>
> date
<geardev>
=> Mon, 18 Aug 2014
<geardev>
Time.parse("1700", date) => ArgumentError: argument out of range
yacks has quit [Ping timeout: 260 seconds]
<cHarNe2>
geardev: you still need do do it in the right order.(year, month, day, ...
iteratorP has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
hellangel7 has quit [Read error: Connection reset by peer]
iteratorP has joined #ruby
<cuqa>
but when I wanna display some value of the Array ret with: puts ret[:resource] e.g., I get the message cant convert string into integer
TieSoul has joined #ruby
ghr has joined #ruby
timonv_ has joined #ruby
wjimenez5271 has quit [Ping timeout: 240 seconds]
<cuqa>
what am I doing wrong?
threesixes has quit [Remote host closed the connection]
Aranshada|W has joined #ruby
gauravagarwalr has joined #ruby
sevenseacat has joined #ruby
ARCADIVS has quit [Quit: WeeChat 0.4.3]
whyy has quit [Remote host closed the connection]
<cuqa>
sometimes I receive also: cant convert symbol into integer
qba73 has joined #ruby
ayaz has joined #ruby
<cuqa>
mh okay, the array is actually ret[0] .. but why
einarj has joined #ruby
dumdedum has joined #ruby
SilkFox has joined #ruby
Takle has joined #ruby
poulet_a has joined #ruby
iteratorP has quit [Remote host closed the connection]
shredding has joined #ruby
roolo has joined #ruby
SilkFox has quit [Ping timeout: 272 seconds]
iteratorP has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
Nilium has quit [Ping timeout: 240 seconds]
Nilium has joined #ruby
_0xf_ has joined #ruby
root3d has joined #ruby
<agent_white>
cuqa: How do you access an array element?
<agent_white>
And what type of object is ret?
<root3d>
agent_white, simple array[index_number]
Macaveli has joined #ruby
dumdedum has quit [Ping timeout: 260 seconds]
_0xf_ has quit [Ping timeout: 255 seconds]
W0rmDr1nk has joined #ruby
Spami has joined #ruby
<agent_white>
root3d: Exactly. Now, what is cuqa calling in his "puts" statement above.
<agent_white>
to the array
<agent_white>
cuqa: This is for you my friend!
diegoviola has joined #ruby
musicmatze has joined #ruby
whyy has joined #ruby
hellangel7 has joined #ruby
musicmatze has quit [Client Quit]
OffTheRails has joined #ruby
Mattsan has joined #ruby
jhass|off is now known as jhass
<cuqa>
agent_white, sorry. logical mistake :[ I returned an array from a function but pushed it to an array
<root3d>
agent_white, i missed what cuqa said . could you repeat it please ?
<root3d>
*can
<agent_white>
root3d: "hello, I have this array: http://pastie.org/9482440 . but when I wanna display some value of the Array ret with: puts ret[:resource] e.g., I get the message cant convert string into integer
musicmatze has joined #ruby
<agent_white>
"
axsuul has quit [Ping timeout: 246 seconds]
<root3d>
agent_white, technically that is hash .
cool has joined #ruby
<root3d>
agent_white, since you used " " ruby will take it as string , to convert it to integer use the method to_i
<root3d>
.to_i
razum2um has joined #ruby
<agent_white>
root3d: Haha exactly what I was trying to point cuqa towards :)
alexju has joined #ruby
<agent_white>
An array is indexed by integers, a hash by strings or symbols.
nobitanobi has joined #ruby
<Mattsan>
Hi im new to ruby and currently trying to finish setting up my frontend.. Im trying to install binaries but keep getting an error, might someone be able to help me?
<Mattsan>
im mint based
krisquigley has joined #ruby
<Mattsan>
basically ubunutu
LangeOortjes has joined #ruby
<Mattsan>
ubuntu*
blackmesa has joined #ruby
<Hanmac>
Mattsan: what errror and did you install the ruby dev packages?
<root3d>
agent_white, so to access a hash you have used key like your_hash[:key] ..
smiller2 has joined #ruby
<root3d>
Mattsan, use ruby 2.0 above . (recommended)
<Mattsan>
++ /scripts/functions/logging : rvm_error() 117 > printf %b 'There has been error while updating '\''apt-get'\'', please give it some time and try again later.
<Mattsan>
For 404 errors check your sources configured in:
<Mattsan>
/etc/apt/sources.list
<Hanmac>
Mattsan: Pastie!!
dumdedum has joined #ruby
<agent_white>
root3d: Basically, cuqa would have noticed his error while describing it for us if he realized he was passing a symbol to an array
txdv has quit [Read error: Connection reset by peer]
fold has joined #ruby
<Mattsan>
tobiasvl: any idea?
txdv has joined #ruby
darkf has joined #ruby
<tobiasvl>
nope, don't know anything about RVM. I'd ask in #rvm like Hanmac said
<Mattsan>
tobiasvl: ok thanks
<darkf>
why is $f(x) a syntax error? can I not have a global $f point to a function and call it normally?
<Hanmac>
hm it smells that rvm does try to get the system name, and got confused about "mint"
Mattsan has quit [Quit: Leaving]
<Hanmac>
darkf $f[x] , $f.call(x) or $f.(x)
prologepilog has quit [Ping timeout: 250 seconds]
jheg has quit [Quit: jheg]
<darkf>
Hanmac: okay, interesting (and thanks), but why is $f(x) not valid?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
<Hanmac>
hm the same reason why you cant do that: a = proc {|x| p x }; a(3) because it does try to call a as a function but is an object, for your problem is there cant be a method named $f, thats why its a syntax error
prologepilog has joined #ruby
workmad3 has joined #ruby
mooru has quit [Ping timeout: 260 seconds]
Mattsan has joined #ruby
<darkf>
well, that's interesting :P
timgauthier has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
chipotle has quit [Client Quit]
Takle has joined #ruby
jheg has joined #ruby
<benzrf>
darkf: ruby doesnt have first class functions
<benzrf>
is the idea here
<darkf>
that's why I'm confused, yeah
<darkf>
it seems like it would
chipotle has joined #ruby
philcrissman has joined #ruby
chipotle has quit [Client Quit]
Aranshada|W has quit [Ping timeout: 260 seconds]
<Mattsan>
i cantr seem to connecvt or add the rvm channel... =/
gauravagarwalr has quit [Remote host closed the connection]
SilkFox has joined #ruby
<apeiros>
I can. maybe it requires authentication with nickserv
timfoo has left #ruby [#ruby]
<apeiros>
Mode: +nrt -- seems like. iirc +r is registered nick
<Mattsan>
apeiros: oh.. how do i do that again?
rdark has joined #ruby
Matt5ander5 has joined #ruby
philcrissman has quit [Ping timeout: 255 seconds]
flughafen has quit [Read error: Connection reset by peer]
_0xf_ has joined #ruby
zz_jrhorn424 is now known as jrhorn424
Mattsan has quit [Quit: Leaving]
Guest68863 has joined #ruby
goodenough has quit [Remote host closed the connection]
goodenough has joined #ruby
<apeiros>
difficult to tell somebody something if he leaves…
<benzrf>
bye
jrhorn424 is now known as zz_jrhorn424
eivindml has joined #ruby
SilkFox has quit [Ping timeout: 272 seconds]
eivindml has quit [Max SendQ exceeded]
prologepilog has quit [Ping timeout: 250 seconds]
benzrf is now known as benzrf|offline
eivindml has joined #ruby
<apeiros>
benzrf|offline: I don't think this has anything to do with first class functions or not
<apeiros>
also, using WPs description, ruby has first class functions: "the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures"
<apeiros>
check on all accounts :)
_0xf_ has quit [Ping timeout: 245 seconds]
<apeiros>
IMO it's just a syntax related issue
prologepilog has joined #ruby
goodenough has quit [Ping timeout: 250 seconds]
<darkf>
yeah, i don't see why $f(x) wouldn't be parsed as expr '(' args ')' and then treated like a call, either to a method or a function-object(?) via the () method
<darkf>
seems a bit strange
Spami has quit [Quit: This computer has gone to sleep]
Tab_ has quit [Quit: This computer has gone to sleep]
<apeiros>
darkf: there'd be ambiguity
chipotle has joined #ruby
<apeiros>
also, don't use globals
mike32 has joined #ruby
<apeiros>
($var are globals in ruby)
<darkf>
yeah, it was just for a quick test
<mike32>
hello, i have datetime object , how i can print with another timezone?
Xeago has joined #ruby
chipotle has quit [Client Quit]
<mike32>
now prints with local timezone
oo_ has quit [Remote host closed the connection]
flughafen has joined #ruby
Tab__ has joined #ruby
pr00t has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
darkf_ has joined #ruby
diegoviola has quit [Ping timeout: 246 seconds]
sk87 has quit [Ping timeout: 246 seconds]
axl_ has quit [Client Quit]
darkf has quit [Ping timeout: 260 seconds]
Tab__ has quit [Client Quit]
agjacome has joined #ruby
diegoviola has joined #ruby
agjacome has quit [Client Quit]
agjacome has joined #ruby
AlSquire has joined #ruby
agjacome has quit [Client Quit]
matchaw has quit [Read error: Connection reset by peer]
klaut has quit [Remote host closed the connection]
Asher has quit [Ping timeout: 244 seconds]
Asher has joined #ruby
andrewlio has joined #ruby
root3d has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
patrick99e99 has joined #ruby
relix_ has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
relix has quit [Read error: Connection reset by peer]
krz has quit [Quit: WeeChat 0.4.3]
<mike32>
new_offset works well
<mike32>
bit possible set offset for puts?
<mike32>
or some method for datetime , that print date in specified timezone
root3d has joined #ruby
flughafen has quit [Read error: Connection reset by peer]
<wasamasa>
zenspider: I'm investigating in the bug again
<wasamasa>
zenspider: narrowed down the faulty file in my config
patrick99e99 has quit [Ping timeout: 272 seconds]
rylev has joined #ruby
flughafen has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
diegovio1 has joined #ruby
gauravagarwalr has joined #ruby
diegoviola has quit [Ping timeout: 244 seconds]
<wasamasa>
zenspider: so it looks like the popwin package I'm using closes the compilation buffer before it's finished and therefore aborts byte compilation
<wasamasa>
zenspider: what the hell, emacs
davedev2_ has quit [Remote host closed the connection]
davedev24_ has joined #ruby
cap has joined #ruby
Tab__ has quit [Quit: This computer has gone to sleep]
davedev24_ has quit [Ping timeout: 245 seconds]
abuzze has joined #ruby
fold has quit [Ping timeout: 260 seconds]
cap has quit [Ping timeout: 240 seconds]
LangeOortjes has joined #ruby
Dusty_ has quit [Ping timeout: 245 seconds]
Hanmac has quit [Remote host closed the connection]
jottr has joined #ruby
andikr has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
diegovio1 is now known as diegoviola
axsuul has joined #ruby
andikr has joined #ruby
qba73 has quit []
mkaesz has joined #ruby
vyorkin has joined #ruby
m8 has joined #ruby
pydave6367 has quit [Quit: leaving]
Jackneill has joined #ruby
pydave6367 has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
marr has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roryhughes has joined #ruby
Takle has joined #ruby
rylev has quit [Remote host closed the connection]
kyb3r_ has quit [Read error: Connection reset by peer]
rylev has joined #ruby
nerium has joined #ruby
memph1s has joined #ruby
<nerium>
I dont get this. Should this one return a bunch of items?
<agent_white>
I just want to know where it is, 7 hours from where I am. Shit... just tell me how many hours Germany is ahead of the US in time standards.
eivindml has joined #ruby
<agent_white>
I don't like "delta times" and stuff.
eivindml has quit [Max SendQ exceeded]
_JamieD_ has joined #ruby
cap has quit [Ping timeout: 240 seconds]
eivindml has joined #ruby
tkuchiki has joined #ruby
eivindml has quit [Max SendQ exceeded]
<workmad3>
agent_white: right, but that disregards the ISO8601 time format... and if I'm at, say, geosynchronous orbit level and moving at 0.25c, I'm gonna want to specify what my reference frame is in any time strings for suitable comparison...
eivindml has joined #ruby
<agent_white>
workmad3: I would reply if I had slept more than 4 hours in the past 48. :)
yeltzooo has quit [Ping timeout: 245 seconds]
<workmad3>
heh :)
sirecote has quit [Ping timeout: 250 seconds]
<agent_white>
For now, I just think time is too complicated in ruby.
<agent_white>
;P
<workmad3>
time is too complicated in just about any language/library/framework you care to specify
<agent_white>
Time.now.in("Germany")
<agent_white>
plz ;D
earthquake has quit [Quit: earthquake]
philcrissman has joined #ruby
CorpusCallosum has quit [Ping timeout: 246 seconds]
_JamieD_ has quit [Client Quit]
<agent_white>
Time.now.in("Germany, SomeCity")
gruz0[russia] has joined #ruby
olausm has joined #ruby
<workmad3>
agent_white: tzinfo and tzinfo-data gems
<agent_white>
Time.in("Germany").to_now
<agent_white>
idk
sirecote has joined #ruby
<agent_white>
:P
<agent_white>
workmad3: I'll check them out! :D
<agent_white>
They just need to put them into the stdlib.
<workmad3>
they're more complicated than that, but they'd be the starting point for that kind of wrapper
<agent_white>
Aye!
yeltzooo has joined #ruby
<workmad3>
if the stdlib ever gets gemified, they'd be suitable candidates
<agent_white>
The problem arises enough to warrant a good fix for it; an stdlib module at least instead of a gem.
jottr has joined #ruby
<workmad3>
as it is, tzinfo-data keeps on getting updated due to countries being stupid and updating their DST decisions
<agent_white>
Ahhh! Sounds like they have good contributors though eh? :D
<agent_white>
s/good/actively good
<workmad3>
and you also need to keep track of the historical data for that sort of crap so that you can do 'correct' time comparisons on historical data
<workmad3>
tbh, the delta offsets in ISO8601 are massively simpler than tzinfo solutions due to that
<workmad3>
because you don't need complicated lookup logic to figure out that March23 is in DST in the US but not in the UK, or that it's in DST in the US in 2008 but not in 2009...
<workmad3>
instead it's just 'the time this happened at was 10pm in offset +0600
philcrissman has quit [Ping timeout: 250 seconds]
ajf- has quit [Ping timeout: 250 seconds]
<workmad3>
but a tzinfo wrapper to get the starting point would be nice I guess :)
mercwithamouth has quit [Ping timeout: 246 seconds]
GriffinHeart has joined #ruby
kirun has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
lkba has joined #ruby
Grantlyk has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
razum2um has quit [Quit: Leaving.]
tkuchiki has joined #ruby
AntelopeSalad has quit [Read error: Connection reset by peer]
KnownSyntax_ has joined #ruby
whyy has joined #ruby
jhass has quit [Quit: Bye]
AntelopeSalad has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 260 seconds]
arya_ has joined #ruby
Ilyas_ has joined #ruby
klaut has joined #ruby
jhass|off has joined #ruby
ajf- has joined #ruby
jhass|off is now known as jhass
KnownSyntax has quit [Ping timeout: 240 seconds]
roolo has joined #ruby
SilkFox has joined #ruby
diegoviola has quit [Ping timeout: 255 seconds]
spider-mario has quit [Ping timeout: 246 seconds]
Ilyas has quit [Ping timeout: 246 seconds]
agent_white has left #ruby [#ruby]
<shevy>
what happens again if I have one module with one method
<shevy>
and I make this method a: module_function :foo
<shevy>
is that the same as doing: def self.foo inside of that module?
spider-mario has joined #ruby
robbyoconnor has joined #ruby
olausm has quit []
SilkFox has quit [Ping timeout: 250 seconds]
mskaesz has joined #ruby
mkaesz has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
Xeago has joined #ruby
<jhass>
shevy: no, it's copying the instance method to the modules singleton class
<shevy>
hmm
Takle has quit [Remote host closed the connection]
Scient has quit [Ping timeout: 240 seconds]
Scient has joined #ruby
diegoviola has joined #ruby
ValicekB has quit [Ping timeout: 272 seconds]
clauswitt has joined #ruby
jottr has joined #ruby
ldnunes has joined #ruby
tjr9898 has joined #ruby
Wolland has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
BBBThunda has quit [Ping timeout: 240 seconds]
cap has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
<shevy>
if [ -f /foo.txt ];
<shevy>
then source /foo.txt fi
<shevy>
ruby spoiled me
<shevy>
I hate shell syntax
Xeago has joined #ruby
AndChat654401 has quit [Ping timeout: 250 seconds]
<shevy>
I think the only advantage shell syntax has in regards to syntax, over ruby, is that you can omit ' and " in such cases
<shevy>
load 'foo.rb' if File.exist? 'foo.rb'
<shevy>
load foo.rb if File.exist? foo.rb
<shevy>
hmm
<shevy>
actually, the variant without ' confuses me more
<bhaak>
shevy: I thought you only compiled ruby manually, so how do you know what rvm needs? ;-)
Soda has joined #ruby
tkuchiki has quit [Ping timeout: 272 seconds]
<shevy>
bhaak from the pastie
<shevy>
"No binary rubies available for: mint/17/x86_64/ruby-2.1.2. "
<bhaak>
rvm tries to install the prerequisites for compiling ruby. therefore it tries to run a 'apt-get update' first. if that fails, the debian system is broken and it should be fixed first.
<Nowaker>
did you guys use ruby libvirt bindings? the whole world uses python bindings, so i'm just wondering how good our bindings are.
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
<shevy>
more people use python
<shevy>
and I think the python C API must be simpler than ruby
<User458764>
jhass one more nice pattern thanks
Hobogrammer has quit [Ping timeout: 255 seconds]
darkf has quit [Quit: Leaving]
sheeny has joined #ruby
<Hanmac>
jhass: hay is there a regex negation of /^\.\.?$/ ?
mary5030 has quit [Ping timeout: 264 seconds]
<sheeny>
Hi all, I'm trying to output a pdf file from a byte array I am being passed but I can't seem to get it working. I have tried writing the bytes to a file but not having any luck. Could anyone point me in the right direction of how to do this in ruby? Byte array looks like "JVBERi0xLjMNC..."
gerep has joined #ruby
mackintosh has joined #ruby
<jhass>
Hanmac: mmh, negative lookbehind comes to mind
Takle has quit [Remote host closed the connection]
mleone has joined #ruby
davispuh has joined #ruby
<jhass>
though those have to be fixed length
<gerep>
Hi all. I need to split files (any type) into chunks, I have no idea from where to start looking, can you please point me to a direction? I google a while and I found examples only with text files, reading the content, etc
<Hanmac>
jhass & User458764: also nice: Dir.glob(".*").grep(/^\.[^.]/)
<jhass>
Hanmac: I'd just do /^\.[^\.]+$/ I guess
<Nowaker>
shevy: libvirt is something that rather few projects are interested in - it's to talk to hypervisors and manage virtual machines. openstack, the most popular solution for this, is written in python. there's also archipel, and its server-side component is in python too. there are a few other solutions, some in C.
<shevy>
yeah
<shevy>
python dominates
<Nowaker>
so i will be the first to use libvirt in ruby with my project www.virtkick.io, and wanted to see if anyone has already used it for internal purposes
sumark has quit [Remote host closed the connection]
relix has quit [Read error: Connection reset by peer]
relix has joined #ruby
dangerousdave has joined #ruby
nobitanobi has joined #ruby
<dangerousdave>
I am fed up of trying to get this sinatra application working. I have the following, however send_email in notifications errors is it does not recognise the class method. https://gist.github.com/deathwishdave/f152c0fa9885e12b4164
bluOxigen has quit [Ping timeout: 240 seconds]
Grantlyk has quit [Remote host closed the connection]
wu_lmao has joined #ruby
<Matt5ander5>
oh, sorry I'v just got back to comp... everyone done me? I am a newb, I admit to be a newb, i wasnt after jokes, just some help. Obviously I had noted that it said apt update fail, so I did this independently from the ruby/rvm command and everything was fine. So I made the assumption it must have been related either to the source or something, wasn’t sure if I needed any other prerequisites??
sheeny has quit [Quit: Page closed]
beef-wellington has quit [Ping timeout: 272 seconds]
jmurray has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
jmurray has quit [Client Quit]
w1xz has quit [Ping timeout: 240 seconds]
aclearman037 has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
dangerousdave was kicked from #ruby by apeiros [when you cross-post, tell in every channel that you are cross-posting. this is only a warning kick. you are not banned. you can return.]
* apeiros
needs canned kicks
philcrissman has joined #ruby
Sonny|3oy has quit [Quit: Leaving]
paulfm has joined #ruby
machete has quit [Ping timeout: 244 seconds]
machete has joined #ruby
mike32 has joined #ruby
<jhass>
apeiros: now he doesn't return :(
beef-wellington has joined #ruby
<apeiros>
*shrug*
<apeiros>
I wouldn't wonder if he's afk/afc
bclune_ has quit [Ping timeout: 246 seconds]
jerius has joined #ruby
kies has joined #ruby
philcrissman has quit [Ping timeout: 260 seconds]
<apeiros>
pondering on writing a cinch bot which monitors channels and looks for cross-posts and simply does the announcing
<apeiros>
less annoying for everybody I guess
<jhass>
we should just merge the channels
infinitone has joined #ruby
<shevy>
never!
<apeiros>
that's a no-starter
<shevy>
down with #ruby-lang!!!
mike32 has quit [Client Quit]
<apeiros>
every attempt in the last few years failed
dangerousdave has joined #ruby
<apeiros>
so I wouldn't hold my breath for it
<shevy>
+1 for free booze and free speech on #ruby
redondo has joined #ruby
krisquigley has joined #ruby
<apeiros>
free booze? where?!?
<diegoviola>
there's no free speech in #ruby-lang?
<shevy>
there is if you don't get banned!
<shevy>
and if you have registered
<apeiros>
you got banned?
<shevy>
or rather, authenticated
<jhass>
remember the main opposing people besides shevy?
<apeiros>
how'd you manage that?
<shevy>
only RubyPanther got banned. and tsume
freerobby has joined #ruby
<diegoviola>
why did #ruby split from #ruby-lang?
mskaesz has quit [Ping timeout: 264 seconds]
<apeiros>
tsume I've never experienced I think. rubypanther I can easily see how he got himself banned
jottr has joined #ruby
<shevy>
not sure it split diegoviola, I forgot which channel is older
cap has joined #ruby
<apeiros>
and you can't check with chanserv afaik. #ruby-lang got reregistered afaik, so the register date is wrong.
<shevy>
from my faulty memory I'd think #ruby is older
machete has quit [Ping timeout: 244 seconds]
garethrees has joined #ruby
<shevy>
it's very confusing for newcomers
<apeiros>
indeed
<shevy>
let's assimilate #ruby-lang :>
<apeiros>
and we have 2 more channels - ##new2ruby and #ruby-learning
rdark has quit [Ping timeout: 245 seconds]
<shevy>
hehe
<dorei>
all your ruby are belong to us :D
<shevy>
let me see ...
<jhass>
interesting, #ruby was registered feb 03, #ruby-lang oct 03
<shevy>
wow... there is people in ##new2ruby
<apeiros>
jhass: as said, afaik #ruby-lang was reregistered
<apeiros>
i.e., somebody told me it's actually older. but that's hearsay :)
ikawnoclast has joined #ruby
whyy has quit [Ping timeout: 245 seconds]
<workmad3>
I heard #ruby-lang was the original too... but that's hearsay on my part as well, and both of them were registered way before I started frequenting them :)
anaeem1 has quit [Remote host closed the connection]
rdark has joined #ruby
yfeldblu_ has joined #ruby
<jhass>
apeiros: do you have access to join messages btw.? I think one of the channels got a rather outdated one
<apeiros>
jhass: I can't change the welcome message, no :(
ghr has quit [Ping timeout: 245 seconds]
<DefV>
some bastard in #ruby-lang told them you were gossiping on #ruby
<shevy>
hahaha
Ilyas_ has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
<shevy>
I'm gonna monitor them
<shevy>
it's been a while since the last channel war
oo_ has joined #ruby
<shevy>
hmm
<shevy>
many alien people there...
cap has quit [Ping timeout: 240 seconds]
<workmad3>
DefV: stop spreading rumours behind your own back :P
<crome>
big black eyes?
brothmars has joined #ruby
<shevy>
actually
<shevy>
if you'd add those folks who are there but not here, this channel would be like at +1000 people
<DefV>
workmad3: no, I love channel wars
<dangerousdave>
I am struggling on how to structure my ruby application. it's a sinatra web application that send emails. I want to initialise the email sending object only once for my application. I then want to call it from both a sinatra method, and from sinatra class scope. I am not able to reconsile all these thigs :-(
marr has quit [Ping timeout: 260 seconds]
<DefV>
shevy: that must be the worst job of monitoring a chan EVER
jottr has quit [Ping timeout: 260 seconds]
Takle has quit [Remote host closed the connection]
<shevy>
I need to be invisible
<jhass>
dangerousdave: earlier gist still up-to-date?
<dangerousdave>
jhass, yes
<jhass>
dangerousdave: you can't call send_mail there because the configure method changes the scope of the block
<jhass>
dangerousdave: you need to reference it explicitly
<jhass>
by putting the class name in front
yfeldblu_ has quit [Ping timeout: 272 seconds]
frankle has joined #ruby
SouL has joined #ruby
oo_ has quit [Ping timeout: 250 seconds]
arya_ has quit [Read error: Connection reset by peer]
<dangerousdave>
jhass, ok thanks, is that a good design? i felt send_email is a utility function, and doesn't belong in the class, but where should i put it?
arya_ has joined #ruby
<jhass>
dangerousdave: if that's your entire app I wouldn't bother
<dangerousdave>
thats it
freerobby has quit [Quit: Leaving.]
Ilyas has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
<jhass>
shevy: ever been to #freenode?
roshanavand has joined #ruby
kotk_ has quit [Quit: Leaving...]
<infinitone>
hey guys
<infinitone>
does ruby have built in graphs (verticies/edges/etc.) ?
hamakn_ has quit [Read error: Connection reset by peer]
Takle has joined #ruby
hamakn has joined #ruby
<workmad3>
infinitone: no, there's no core graph data structure and afaik not one in the stdlib either
<infinitone>
ah k
<shevy>
jhass a few times, like when there were spambots here on #ruby and noone around to kick them
<infinitone>
thanks
<workmad3>
infinitone: but there are plenty of libraries for working with graphs out there... ruby-rdf, graphviz, probably several others
<dangerousdave>
jhass, thank you
<workmad3>
infinitone: and depending on how much you really need, it's pretty easy to construct a graph out of hashes and arrays, it just wouldn't have much in the way of traversal, cycle detection, etc... but it could be enough for your needs :)
<infinitone>
yeah
<infinitone>
i know of the adjacency list impl
<infinitone>
might go with that
hamakn has quit [Read error: Connection reset by peer]
<infinitone>
im just surprised
<infinitone>
many langs don't have it built it
<infinitone>
in*
mc_fail_ has quit [Ping timeout: 255 seconds]
hamakn has joined #ruby
newUser1234 has joined #ruby
ionelmc has joined #ruby
jottr has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ionelmc>
what does &:upcase do ?
<ionelmc>
i mean the "&:" part specifically
<DefV>
calls :upcase.to_proc
<workmad3>
^^ and passes it as the block arg
<jhass>
ionelmc: it's :upcase the symbol, & calls to_proc and converts the resulting proc to a block
<DefV>
and Symbol#to_proc creates a proc that calls the symbol on the object passed in
<DefV>
naive version: def to_proc; proc {|obj| obj.send(self) }; end
<ionelmc>
can anyone give me a link to docs for "&" ?
* ionelmc
is very lazy, sorry :)
<workmad3>
jhass: I doubt the interpreter 'converts to a block' there... a block is generally just the interpreter not creating a full proc when not necessary (e.g. when the block arg is implicit)
shredding has quit [Quit: shredding]
<jhass>
workmad3: implementation detail, the proc becomes available as a block to the method
<workmad3>
jhass: I view the entire concept of block as an implementation detail personally ;)
<workmad3>
jhass: as if you ever look at a 'block' in the method, it's a proc
<jhass>
in my mind yield doesn't call a proc but a block
<workmad3>
ionelmc: personally, I view the block-proc distinction as an implementation optimisation of the ruby runtime
danijoo has joined #ruby
alexherbo2 has joined #ruby
SilkFox has quit [Ping timeout: 244 seconds]
arya_ has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
<ionelmc>
workmad3: well ok, but on low level what's different ?
<jhass>
dangerousdave: not sure I follow the question
<workmad3>
ionelmc: is if you make the block-arg explicit and examine it, the runtime creates a full block there, but if you examine the source code of the runtime, you'll find that this only happens when necessary
<ionelmc>
are there different types of callables?
<workmad3>
*full proc
tylerkern has joined #ruby
<ionelmc>
from the point of view of the caller ofc
<jhass>
ionelmc: I'd differentiate between block, proc, lambda and method
qwyeth has joined #ruby
<workmad3>
ionelmc: a 'block' can never be examined directly in ruby... any time you try to, you'll instead have a proc... a lambda is also an instance of Proc with 'lambdaness' that changes its behaviour slightly
<ionelmc>
what does a proc have and block doesn't?
<dangerousdave>
jhass, my application wotks with this "def send_email" or "self.def send_email" The send_email call in "post /notifications" will happily call both.
<ionelmc>
actually, workmad3, what do you mean by `examined directly` ?
<wasamasa>
the block is an inline construct?
<ionelmc>
introspection ?
<workmad3>
ionelmc: I mean that if you make the block-arg explicit (def foobar(&blk) ) and then look at blk.class, it'll tell you blk is a Proc
<ionelmc>
i don't know much ruby :\
<workmad3>
ionelmc: and without making it explicit, there's no way to examine the block-arg in ruby
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
<jhass>
dangerousdave: Sinatra probably does some magic behind the scenes for that
momomomomo has joined #ruby
shredding has joined #ruby
dblessing has joined #ruby
tjr9898 has quit [Remote host closed the connection]
<ionelmc>
ok so a block is cheaper to call than a proc?
shredding has quit [Remote host closed the connection]
tjr9898 has joined #ruby
shredding has joined #ruby
venture37 has left #ruby [#ruby]
<workmad3>
ionelmc: unlikely it's cheaper to call
Matt5ander5 has quit [Quit: Leaving]
<ionelmc>
i don't get what the difference is :|
<workmad3>
ionelmc: but the runtime will optimise away constructing and allocating a full proc object if it doesn't have to... and that is a 'block'
<wasamasa>
<wasamasa> the block is an inline construct?
autochthon has quit [Read error: Connection reset by peer]
tjr9898 has quit [Ping timeout: 245 seconds]
roolo has quit [Quit: Leaving...]
rylev_ has joined #ruby
djcp has joined #ruby
InhalingPixels has joined #ruby
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djcp has left #ruby [#ruby]
DadoCe has joined #ruby
rylev has quit [Ping timeout: 255 seconds]
sylvanica1 is now known as sylvanica
chipotle has joined #ruby
rylev_ has quit [Read error: Connection reset by peer]
rylev has joined #ruby
<sheepman>
how can i group together elements in an array, so I start with say a = ["my", "array", "items","need","grouping","together"] and result in ["my array items","need grouping together"] ?
<jhass>
workmad3: it's interesting that yet official docs call it conversion and not passing
<jhass>
sheepman: .chunk + .map + .join
<ionelmc>
aaaaaaah!
kaiserpathos has quit [Remote host closed the connection]
roolo has joined #ruby
<ionelmc>
so & signals that the argument goes in the "block slot"
<ionelmc>
and you can only have one of those
<ionelmc>
right?
chipotle has quit [Client Quit]
<workmad3>
ionelmc: yup
<workmad3>
ionelmc: I call it the block-arg
<jhass>
sheepman: or if it's like every 3, (each_)slice + map + join
apeiros has quit [Ping timeout: 246 seconds]
<ionelmc>
god damn it why didn't you say so :P
arya_ has quit [Read error: Connection reset by peer]
<sheepman>
jhass: it is every 3
<workmad3>
ionelmc: heh :) I think that's one of the first things said ;)
arya_ has joined #ruby
<ionelmc>
yeah maybe, i think the forehead slap did the trick
devdazed has joined #ruby
<workmad3>
jhass: also interesting is that & calls to_proc rather than to_*block* ;)
mark_locklear has joined #ruby
<ionelmc>
so ruby wouldn't know to fill the block slot if there's a single "callable" argument automatically ?
<ionelmc>
but it does it you define the block inline ?
<ionelmc>
is it just me or this is kinda inconsistent?
GriffinHeart has quit [Remote host closed the connection]
Insanity_ has joined #ruby
<workmad3>
ionelmc: it's perfectly valid to pass around a callable without it going into the block-arg slot
GriffinHeart has joined #ruby
<workmad3>
ionelmc: a callable is just another object after all
dawkirst has joined #ruby
mary5030 has joined #ruby
Insanity_ has quit [Client Quit]
<ionelmc>
yeah i guess so, but you can still access as an argument and yielding is optional
Insanity_ has joined #ruby
<ionelmc>
kinda nitpicking here i know :P
geekbri has joined #ruby
<jhass>
workmad3: well that make sense since you can pass any object which is converted to a proc via to_proc and that proc then passed/converted to a block
<jhass>
I see it as two step process
Zenigor has joined #ruby
<workmad3>
jhass: I'd be happier if this 'block' existed anywhere that the ruby language could see it, rather than purely as an implementation artifact ;)
<ionelmc>
ok, so &:upcase is the same as &"upcase" right ?
<workmad3>
ionelmc: no, strings don't define a to_proc
<ionelmc>
but ruby converts that string to a callable (proc) automatically
<ionelmc>
right?
GriffinHeart has quit [Remote host closed the connection]
<workmad3>
ionelmc: no... no to_proc method
hellangel7 has quit [Remote host closed the connection]
<ionelmc>
the string has that method?!
<ionelmc>
ah
GriffinHeart has joined #ruby
<jhass>
ionelmc: even Proc defines a to_proc method for that reason, so ruby can call it in that situation
<workmad3>
ionelmc: to_proc is defined on Symbol, not String... of course, you could write your own .to_proc :)
<ionelmc>
so there are strings ("foobar") and symbols (:foobar - still a sort of string) ?
tylerkern has joined #ruby
ffranz has joined #ruby
poulet_a has quit [Quit: Quitte]
<workmad3>
ionelmc: symbols are distinct from strings
Dusty_ has quit [Ping timeout: 245 seconds]
mary5030 has quit [Ping timeout: 255 seconds]
gtrak_ has joined #ruby
<workmad3>
ionelmc: but one of the easiest ways to describe them when coming to ruby is as a 'lightweight, immutable string literal' that has some other nice characteristics (such as two identical symbol literals always returning the same symbol object within a program run)
snath has quit [Ping timeout: 272 seconds]
<workmad3>
ionelmc: and yes, String instances in ruby are mutable ;)
ursooperduper has joined #ruby
Insanity_ has quit [Client Quit]
<ionelmc>
it's called interning :P
newUser1234 has quit [Remote host closed the connection]
moritzs has joined #ruby
<ionelmc>
ok, so there's a "upcase" proc in the global namespace somewhere that just calls .upcase on the input ?
newUser1234 has joined #ruby
Ilyas_ has joined #ruby
sambao21 has joined #ruby
<workmad3>
ionelmc: no... there's an :upcase symbol interned on first use... and when you call .to_proc on that, it provides a proc that calls upcase on the first argument
jmbrown412 has quit [Remote host closed the connection]
<wasamasa>
if you care about speed, ruby is not the right language for you
Insanity133 has quit [Client Quit]
arya_ has quit [Ping timeout: 240 seconds]
<ionelmc>
using `for` is generally frowned upon?
iamjarvo has joined #ruby
<workmad3>
ionelmc: yeah
Insanity133 has joined #ruby
jmbrown412 has joined #ruby
<ionelmc>
wasamasa: just answer :P
<wasamasa>
also, for looks rather useless to me
Insanity133 has quit [Client Quit]
startupality_ has joined #ruby
Insanity133 has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
_justin has left #ruby [#ruby]
Grantlyk has quit [Read error: Connection reset by peer]
Rylee has quit [Excess Flood]
<workmad3>
ionelmc: in a naive comparison, 'for' is probably faster... but if you're in a situation where you need to eke out that sort of speed, using enumerator methods gives you the ability to consider distributing the processing out amongst other workers much more easily than for would
startupality has quit [Ping timeout: 272 seconds]
startupality_ is now known as startupality
Grantlyk has joined #ruby
Rylee has joined #ruby
Insanity133 is now known as Insanity_
Insanity_ is now known as Insanity133
St_Marx has quit [Remote host closed the connection]
yfeldblum has joined #ruby
cocotton has joined #ruby
arya__ has quit [Read error: No route to host]
Cheezebox has joined #ruby
arya_ has joined #ruby
<ionelmc>
workmad3: you meant that it would be easier to replace `each` with a fictive `parallelised_each` right?
jmbrown412 has quit [Ping timeout: 255 seconds]
momomomomo_ has joined #ruby
Insanity133 is now known as Insanity|Severen
Dusty_ has joined #ruby
matchaw has joined #ruby
<ionelmc>
than `for` with a parallelised whatever
FarlaTux has joined #ruby
mr_snowf1ake has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
momomomomo_ is now known as momomomomo
linojon has joined #ruby
apeiros has joined #ruby
St_Marx has joined #ruby
Insanity|Severen is now known as Insanity_
<workmad3>
ionelmc: yes... although .each would be a dangerous one to parallelise, but .map, .select, .reject and the other higher-level enumerable methods would be much more likely candidates
shackleford has joined #ruby
cocotton has quit [Remote host closed the connection]
shackleford has quit [Read error: Connection reset by peer]
Insanity_ is now known as Insanity|Severen
bluOxigen has joined #ruby
shackleford has joined #ruby
qmfnp has joined #ruby
bluOxigen has quit [Client Quit]
gauravagarwalr has quit [Remote host closed the connection]
tjr9898 has joined #ruby
infinitone has quit [Remote host closed the connection]
apeiros has quit [Client Quit]
GriffinHeart has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
startupality_ has joined #ruby
poikon has joined #ruby
poikon has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
larissa has joined #ruby
<workmad3>
ionelmc: the other advantage to using enumerable methods rather than direct loops is that all ruby collections implement .each, while not all collections will work with for ;)
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
poikon has joined #ruby
gauravagarwalr has joined #ruby
mary5030 has joined #ruby
startupality has quit [Ping timeout: 272 seconds]
<ionelmc>
yeah i was just asking
<ionelmc>
in python it's the other way around
soahccc has quit [Read error: No route to host]
arya__ has joined #ruby
<ionelmc>
everything revolves around the iterator interfaces
veleno has joined #ruby
<ionelmc>
this means the for statement (or list/gen comprehensions)
startupality_ is now known as startupality
<veleno>
hello. what would be a simple gem to validate a string as valid JSON code ?
ptrrr has joined #ruby
<jhass>
veleno: require 'json'; string.to_json
<MarcWebe3>
veleno: use JSON.parse, if it fails its invalid
axl_ has quit [Read error: Connection reset by peer]
Kerber0s has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
jerikl has joined #ruby
relix has joined #ruby
Ilyas has joined #ruby
jonahR has joined #ruby
Ilyas_ has quit [Read error: Connection reset by peer]
cocotton has joined #ruby
yacks has quit [Remote host closed the connection]
<IotaSpencer>
Anyone here used cinch?
charliesome has joined #ruby
<waxjar>
yep
tagrudev has quit [Quit: Me = Awesome]
divi_ has joined #ruby
Takle_ has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
<veleno>
MarcWebe3: is there a limit on the size of the string that JSON.parse accepts ?
arya__ has joined #ruby
vieq has quit [Ping timeout: 264 seconds]
<jhass>
veleno: do you run into an error?
User458764 has joined #ruby
<veleno>
jhass: i did, yes. it seems like the input string (that I print right before giving it to the parse method) is truncated
<IotaSpencer>
waxjar: have you used cinch in a way where you have multiple clients, because I want a way to select one bot and one bot only for something but I can't seem to figure out how
<jhass>
veleno: truncated in what way?
CorySimmons has joined #ruby
<jhass>
veleno: there's a nesting limit that you can set if you look at the doc momomomomo linked
rdark has joined #ruby
DEA7TH has joined #ruby
craigp has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
yeticry has quit [Ping timeout: 255 seconds]
ixti has quit [Ping timeout: 260 seconds]
arya_ has quit [Ping timeout: 260 seconds]
tsunamie has quit [Ping timeout: 260 seconds]
ixti has joined #ruby
tsunamie has joined #ruby
Takle has joined #ruby
rdark has quit [Client Quit]
rdark has joined #ruby
djstorm has joined #ruby
yeticry has joined #ruby
philcris_ has joined #ruby
<waxjar>
IotaSpencer: no. i think you have to run each one in a separate thread
<veleno>
jhass: everything after the 8205 character is truncated, and parse fails with ‘JSON::ParserError: 757: unexpected token at’
<jhass>
veleno: any chance you can provide the data in a gist?
<veleno>
jhass: i can.
<IotaSpencer>
waxjar, they already seem to be in separate threads
gerep has quit [Read error: Connection reset by peer]
jimms has quit [Remote host closed the connection]
gerep has joined #ruby
Cheezebox has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
<waxjar>
you want to select the bot from within a plugin?
tjr9898 has joined #ruby
cocotton has quit [Quit: Leaving...]
philcris_ has quit [Ping timeout: 264 seconds]
yeticry has quit [Remote host closed the connection]
kachi8 has joined #ruby
<IotaSpencer>
waxjar: yes
yeticry has joined #ruby
<waxjar>
you could pass the list of bots as a configuration option, then you could get the list in the plugin with config[:list_of_bots], something like that
tjr9898_ has quit [Remote host closed the connection]
<donofrio>
my gems:refresh still not workin
root3d has joined #ruby
icebourg has joined #ruby
<jhass>
donofrio: same answer as last time, that's a rails 2 thingy, you seem to have a rails 3 app. What happened after you skipped the step like I said?
<IotaSpencer>
each server is given a bot instance, I want to select a certain bots messages, and relay to a specific bot
Fractional has joined #ruby
blackmesa has joined #ruby
tjr9898 has joined #ruby
postmodern has joined #ruby
<donofrio>
the next command fails as well
emmesswhy has joined #ruby
emmesswhy has quit [Client Quit]
<Fractional>
Anyone here who is running opengl with ruby?
<IotaSpencer>
particularly, there is a znc bot thread, and these threads, I'd like to go irc->znc->irc
<jhass>
donofrio: what's the command and how does it fail. Don't let me dig out every detail out of your nose
<jhass>
donofrio: I can't see your screen
tijmencc has joined #ruby
<donofrio>
first was "rake gems:refresh_specs" so I skipped that, when I do the next command "rake RAILS_ENV=production db:migrate" fails with same mesage
<root3d>
donofrio, provide some code
<jhass>
donofrio: I already told you to bundle exec that
nfk has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<donofrio>
I tried the bundle didn't change anything
<root3d>
donofrio, if you have log file , paste it
<jhass>
donofrio: wrong you don't need to run the gems:refresh_specs task
<donofrio>
jhass: ok but migrate is needed
xMopxShell has joined #ruby
<IotaSpencer>
like if I want znc's uptime, I want it from the znc connection, or a specific connection, otherwise the usual $bots.each do blah = spam
<jhass>
donofrio: so can you tell me already what's the output of RAILS_ENV=production bundle exec rake db:migrate
<waxjar>
IotaSpencer: I'd use a Queue in that case. push messages on the queue in a plugin from the bot on server A, pop them of in a plugin from the bot on server B
CorySimmons has quit [Quit: Zzz...]
<IotaSpencer>
uh huh o,o
existensil has quit [Quit: WeeChat 0.4.2]
ptrrr has quit [Quit: ptrrr]
<root3d>
donofrio, come to Rubyonrails channel
<donofrio>
k
cap has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamakn has joined #ruby
jheg has quit [Quit: jheg]
germanstudent has joined #ruby
mkaesz has quit [Ping timeout: 272 seconds]
toastyne_ has quit [Remote host closed the connection]
bal has quit [Quit: bal]
starkhalo has joined #ruby
sepp2k has quit [Quit: Konversation terminated!]
tkuchiki has joined #ruby
Cheezebox has joined #ruby
renier_ has joined #ruby
cap has quit [Ping timeout: 240 seconds]
machete has joined #ruby
Aranshada|W has joined #ruby
andrewjanssen has joined #ruby
tijmencc has quit [Quit: tijmencc]
andrewjanssen has quit [Client Quit]
zeroNones has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andrewjanssen has joined #ruby
tkuchiki has quit [Remote host closed the connection]
renier has quit [Ping timeout: 250 seconds]
CorySimmons has joined #ruby
tkuchiki has joined #ruby
renderful has joined #ruby
Macaveli has quit [Ping timeout: 240 seconds]
zeroNones has joined #ruby
Cheezebox has quit [Ping timeout: 240 seconds]
ctp has joined #ruby
zeroNones has quit [Max SendQ exceeded]
banister has joined #ruby
rylev has quit [Remote host closed the connection]
rylev has joined #ruby
germanstudent has quit [Changing host]
germanstudent has joined #ruby
amargherio has joined #ruby
noop has quit [Quit: Leaving]
fieasdfk has joined #ruby
<fieasdfk>
hello all, can anyone tell me the significance of Array#to_a ?
fabrice31 has quit [Remote host closed the connection]
<DefV>
duck typing
<fieasdfk>
the # mark is confusing
<DefV>
ah
<DefV>
that means it's an instance method
<DefV>
so you can't call Array.to_a
axsuul has joined #ruby
<DefV>
you can call to_a on an instance of Array
tkuchiki has quit [Ping timeout: 264 seconds]
<DefV>
so for example a = []; a.to_a
gauravagarwalr has quit []
<fieasdfk>
oh ok, thank you
Squarepy has quit [Quit: Leaving]
<waxjar>
in documentation # denotes an instance method, :: a class method
InhalingPixels has joined #ruby
rylev has quit [Ping timeout: 255 seconds]
<fieasdfk>
a class method is not instantiatied? eh bleh tong tied
<waxjar>
a class method is a method you call on a class, Array::new for example
<fieasdfk>
never got that lesson
destructure has quit [Read error: Connection reset by peer]
cpruitt has quit [Read error: Connection reset by peer]
<fieasdfk>
thanks all
User4587_ has joined #ruby
cpruitt has joined #ruby
roolo has quit [Quit: Leaving...]
<Fractional>
fieasdfk: What are you working on with Ruby?
<fieasdfk>
bfs
polysics has left #ruby [#ruby]
<Fractional>
bfs?
User458764 has quit [Ping timeout: 272 seconds]
<fieasdfk>
oh sorry, heh let me be clear. the graph data structure
<fieasdfk>
thanks for asking
gauke has quit [Quit: gauke]
slash_ni1k has quit [Changing host]
slash_ni1k has joined #ruby
snath has joined #ruby
SilkFox has joined #ruby
renderfu_ has joined #ruby
justas has quit [Ping timeout: 240 seconds]
brasten has joined #ruby
roolo has joined #ruby
rdark has quit [Ping timeout: 245 seconds]
jerikl has quit [Quit: jerikl]
<sweeper>
yay graphs
slash_ni1k is now known as slash_beep
renderful has quit [Ping timeout: 272 seconds]
justas has joined #ruby
tylerker_ has quit [Read error: Connection reset by peer]
SilkFox has quit [Ping timeout: 260 seconds]
tylerkern has joined #ruby
<fieasdfk>
they are everywhere on the web
<sweeper>
they are also annoying to persist :P
klaut has quit [Remote host closed the connection]
<fieasdfk>
yeah i know, some of the traversals are difficult to understand
<noshi>
rumours say the rmagick gem is a thing of the past -- what is the go-to gem nowadays for image manipulation?
<fieasdfk>
you can make a simple graph with a hash
<sweeper>
noshi: it's pretty dead, but it's still it
<sweeper>
sweeper: there are some forks around GH
<sweeper>
err
<noshi>
sweeper: ok. Google suggests 'minimagick', that is supposed to be less of a memory-hog
<noshi>
but I'm not sure it's what I should use
Ilyas_ has joined #ruby
<workmad3>
noshi: both rmagick and minimagick are wrappers around imagemagick
<fieasdfk>
renderfu_: whats up
<noshi>
workmad3: that I understand
MartinCleaver has quit [Quit: MartinCleaver]
<noshi>
I don't mind ImageMagick, it's rather nice. Just want to know if there's a gem better than rmagick
lkba has quit [Read error: Connection reset by peer]
yacks has joined #ruby
<noshi>
I guess I'll evaluate minimagick for a bit and see if it suits me better
<noshi>
thanks
lkba has joined #ruby
<workmad3>
noshi: and I think rmagick is a direct binding to it, while minimagick is more of a wrapper around 'identify' and 'convert'
paolooo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Matadoer has quit [Remote host closed the connection]
CorySimmons has joined #ruby
Matadoer has joined #ruby
Cheezebox has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
terrellt has quit [Ping timeout: 250 seconds]
johncamelion has joined #ruby
osvico has joined #ruby
gerep has quit [Read error: Connection reset by peer]
gerep has joined #ruby
Lewix has joined #ruby
tyfighter has joined #ruby
deric_skibotn has joined #ruby
lamasnik has joined #ruby
wallerdev has quit [Quit: wallerdev]
autochthon has joined #ruby
wallerdev has joined #ruby
ValicekB has quit [Ping timeout: 255 seconds]
roshanavand has quit [Quit: Leaving]
top4o has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
arya__ has quit [Ping timeout: 240 seconds]
craigp has joined #ruby
djbkd has joined #ruby
faulkner has quit [Quit: boo.]
dawkirst has joined #ruby
arya_ has joined #ruby
SloggerKhan has quit [Remote host closed the connection]
mark_locklear has quit [Ping timeout: 272 seconds]
tyfighter has quit [Quit: <3]
timonv_ has quit [Remote host closed the connection]
icarus has joined #ruby
icarus has quit [Changing host]
icarus has joined #ruby
coldkey21 has joined #ruby
rezzack1 has quit [Quit: Leaving.]
fold has joined #ruby
cpruitt has quit [Quit: cpruitt]
cpruitt has joined #ruby
Takle has quit [Remote host closed the connection]
jimms has quit [Remote host closed the connection]
coreycon1ardo has joined #ruby
maetthew has joined #ruby
johncamelion has left #ruby [#ruby]
mikecmpbll has joined #ruby
larissa has quit [Quit: Leaving]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
MartinCleaver has quit [Quit: MartinCleaver]
iamjarvo has joined #ruby
wjimenez_ has joined #ruby
terrell_t has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 260 seconds]
terrellt has joined #ruby
Takle has joined #ruby
mooru has joined #ruby
ValicekB has joined #ruby
rezzack has joined #ruby
fabrice31 has joined #ruby
newUser1234 has quit [Remote host closed the connection]
chrishough has joined #ruby
chrishough has quit [Client Quit]
newUser1234 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
charliesome has quit [Quit: zzz]
coreycon1ardo has quit [Quit: Lost terminal]
justas has quit [Ping timeout: 272 seconds]
cocotton has joined #ruby
wallerdev_ has joined #ruby
coreycondardo has joined #ruby
sambao21 has joined #ruby
cap has joined #ruby
SloggerKhan has joined #ruby
gauke has joined #ruby
<maetthew>
Hey guys, It was a while since I fiddled with ruby. I'm looking to output a continous ping, prefixed with timestamp. Could anyone point me in the general direction (methods/gems to use)? Thanks
garethrees has quit [Ping timeout: 272 seconds]
michaeldeol has joined #ruby
newUser1234 has quit [Remote host closed the connection]
Xeago_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
Takle has quit [Remote host closed the connection]
<pontiki>
i cheat and use foreman with a Procfile that just includes a ping command
<jhass>
I cheat and use #!/bin/sh
<pontiki>
oh that's no fun!!
<jhass>
but loop and system or ` should do
cap has quit [Ping timeout: 240 seconds]
ta has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<maetthew>
pontiki: Thanks but that seems a little too advanced imo. I'm having trouble with my home internet connection, was just trying to monitor when it goes up and down so I can give my ISP something to look at.
<maetthew>
jhass, I would do that except I wanted to be able to run it on a Windows machine as wel
dawkirst has quit [Remote host closed the connection]
newUser1234 has quit [Ping timeout: 245 seconds]
mark_locklear has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
<maetthew>
Well, that seems to solve my problem :P
<maetthew>
THanks
<pontiki>
"a little too advanced" ??
<pontiki>
dude, this is the procfile:
Zenigor has joined #ruby
wjimenez5271 has joined #ruby
<pontiki>
homerouter: ping -i 10 10.0.0.1
<pontiki>
google: ping -i 10 8.8.8.8
nobitanobi has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
<maetthew>
pontiki: I just had a quick glance, but I just wanted a small quick tool to monitor my internet connection on my Windows dekstop.
<pontiki>
TADA!
brothmars has joined #ruby
gerep has quit [Read error: Connection reset by peer]
melik has joined #ruby
gerep has joined #ruby
qmfnp is now known as qmfnp-lunch
wjimenez5271 has quit [Ping timeout: 272 seconds]
rezzack has quit [Quit: Leaving.]
cocotton has joined #ruby
Matadoer has quit [Remote host closed the connection]
Matadoer has joined #ruby
Pulpie has joined #ruby
<Pulpie>
hey all
IceDragon has quit [Ping timeout: 246 seconds]
Guest68863 has quit [Ping timeout: 250 seconds]
<jhass>
hi
<Pulpie>
So I have a string that is like "filename_*" and I am getting an array of files in a directory. I am trying to use regex to figure out what files start with "filename_"
IceDragon has joined #ruby
wallerdev__ has joined #ruby
<jhass>
How do you obtain the array of files?
<Pulpie>
sftp.dir.foreach :)
AlSquire has quit [Quit: This computer has gone to sleep]
nanoyak has joined #ruby
wallerdev_ has quit [Ping timeout: 272 seconds]
brasten has quit [Quit: brasten]
<Pulpie>
so in that foreach loop I am trying to take the filename, figure out if it matches and puts it
nanoyak has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
<Pulpie>
and globbing will also support regex?
nanoyak has quit [Client Quit]
<jhass>
no
<Pulpie>
just the asterisk?
<jhass>
no, a few more advanced things
<jhass>
check File.fnmatch
<jhass>
and Dir.glob
jerikl has quit [Quit: jerikl]
<jhass>
lots of examples there
arya_ has joined #ruby
arya__ has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
nat2610 has joined #ruby
<Hanmac>
Pulpie: use dir.glob(general_glob).grep(regexp) ... but in your case the glob is enough with "filename_*" or do you require a more complex regexp?
<Pulpie>
jhass: ahh it's regex-y engough to pass.
<Pulpie>
Hanmac: well it's a search system I am creating so regex might be useful but it can also be a version 2 thing :)
<Pulpie>
glob supports enough of what seems like regex to do the trick
<Pulpie>
sets, multiple literals and of course ? and *
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Pulpie>
thats all I need seeing that this string is also evaulated and treated like ruby code.
timonv_ has joined #ruby
aspires has quit []
dawkirst has joined #ruby
aspires has joined #ruby
poikon has quit [Remote host closed the connection]
newUser1234 has joined #ruby
poikon has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
kirun has joined #ruby
nobitanobi has joined #ruby
ghr has joined #ruby
heftig has quit [Quit: Quitting]
craigp has quit [Remote host closed the connection]
hamakn has joined #ruby
mojo619 has joined #ruby
rdavila has quit [Quit: rdavila]
Fractional has quit [Remote host closed the connection]
mikepack_ has quit [Remote host closed the connection]
<wallerdev__>
good morning
poikon has quit [Ping timeout: 246 seconds]
<wallerdev__>
oh i guess im logged in at home too
yfeldblum has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Ping timeout: 272 seconds]
jimms has joined #ruby
stan has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
nobitanobi has joined #ruby
Morkel has joined #ruby
arya__ has quit [Read error: Connection reset by peer]
zorak has quit [Ping timeout: 250 seconds]
rylev has quit [Remote host closed the connection]
Cheezebox has quit [Remote host closed the connection]
britneywright has joined #ruby
rylev has joined #ruby
cap has joined #ruby
threesixes has joined #ruby
icole has joined #ruby
renderful has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
renderful has joined #ruby
farid has quit [Quit: Leaving]
mooru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gerep has quit [Read error: Connection reset by peer]
gerep has joined #ruby
goganchic has joined #ruby
mikepack has joined #ruby
goganchic has quit [Client Quit]
farid has joined #ruby
rylev has quit [Ping timeout: 250 seconds]
mijicd has quit [Remote host closed the connection]
vyorkin has quit [Ping timeout: 272 seconds]
benzrf|offline is now known as benzrf
arya_ has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
craigp has joined #ruby
atmosx has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
emmesswhy has joined #ruby
Nahra has joined #ruby
Bumptious has quit [Remote host closed the connection]
zeroNones has quit [Ping timeout: 240 seconds]
Zebroid has quit [Remote host closed the connection]
Bumptious has joined #ruby
qmfnp-lunch is now known as qmfnp
Matadoer has quit [Remote host closed the connection]
polyidus has joined #ruby
Matadoer has joined #ruby
tier has joined #ruby
GGMethos has quit [Quit: WeeChat 0.4.3]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CorySimmons has quit [Quit: Zzz...]
Lewix has quit [Remote host closed the connection]
gerep has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
gerep has joined #ruby
W0rmDr1nk has joined #ruby
farid has quit [Read error: Connection reset by peer]
nanoyak has quit [Read error: Connection reset by peer]
farid has joined #ruby
Spami has joined #ruby
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
nanoyak has joined #ruby
Ilyas has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
bearish has joined #ruby
divi_ has joined #ruby
Lewix has quit [Ping timeout: 245 seconds]
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
djbkd has quit [Remote host closed the connection]
marr has quit [Ping timeout: 272 seconds]
terrellt_ has joined #ruby
mooru has joined #ruby
phutchins has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby
maetthew has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has joined #ruby
CorySimmons has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
axilla has quit [Ping timeout: 264 seconds]
kaspertidemann has joined #ruby
anaeem1 has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 240 seconds]
centrx has joined #ruby
claymore has joined #ruby
Matadoer has quit [Remote host closed the connection]
Matadoer has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
goodenough has quit [Remote host closed the connection]
roryhughes has joined #ruby
maximski has quit [Client Quit]
Morkel has quit [Quit: Morkel]
DrShoggoth has joined #ruby
toastynerd has joined #ruby
nat2610 has joined #ruby
ghostmoth has joined #ruby
alexju has joined #ruby
bearish has joined #ruby
polyidus has quit [Quit: EOF]
mleone has quit [Ping timeout: 250 seconds]
fold has quit [Ping timeout: 246 seconds]
Wolland has joined #ruby
Shidash has joined #ruby
txdv_ has quit [Read error: Connection reset by peer]
<siwica>
I am fairly new to Ruby and have a small design question: I will have different geographical features (class:feature) of which each does have one geometry. Since there are the geometry types 0D, 1D, 2D and 3D I am thinking of creating 4 classes (class:1D, ..., class:4D) and use Mixins for the shared properties of those classes (geometry_name, geometry_id, ...). Would that be a reasonable thing to do, or would you do it diferrently? (I
<siwica>
actually wanted to make an abstract "geometry" super classe, but apparently this is not a common thing to do with duck typing languages?!).
rdavila has joined #ruby
txdv has joined #ruby
goodenough has joined #ruby
jxf has quit [Ping timeout: 240 seconds]
geekbri has joined #ruby
Ilyas_ has joined #ruby
bearish has quit [Ping timeout: 246 seconds]
Takle has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
mikeg has joined #ruby
klaut_ has joined #ruby
wallerdev_ has quit [Quit: wallerdev_]
havenn has quit [Ping timeout: 264 seconds]
shacklef_ has joined #ruby
jenskarlsen_ has joined #ruby
jw has joined #ruby
axisys_ has joined #ruby
androidbruce_ has joined #ruby
Muz_ has joined #ruby
yliu_ has joined #ruby
Xeago has joined #ruby
Soulcutter has joined #ruby
jw is now known as Guest21130
hephaest1s_rg has joined #ruby
cHarNe2_ has joined #ruby
bearish has joined #ruby
yeltzooo9 has joined #ruby
excarna has joined #ruby
maloik_ has joined #ruby
matrixis1 has joined #ruby
omosoj has joined #ruby
krandi has joined #ruby
pontiki_ has joined #ruby
GeekOnDecaf has joined #ruby
heftig has quit [*.net *.split]
Matadoer has quit [*.net *.split]
klaut has quit [*.net *.split]
Ilyas has quit [*.net *.split]
threesixes has quit [*.net *.split]
russoneto has quit [*.net *.split]
lamasnik has quit [*.net *.split]
MatthewsFace has quit [*.net *.split]
RandyT has quit [*.net *.split]
carraroj has quit [*.net *.split]
Kruppe has quit [*.net *.split]
asteve has quit [*.net *.split]
everett has quit [*.net *.split]
gf3 has quit [*.net *.split]
androidbruce has quit [*.net *.split]
drago777- has quit [*.net *.split]
shackleford has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
andikr has quit [*.net *.split]
braincrash has quit [*.net *.split]
thoolihan has quit [*.net *.split]
Kovensky has quit [*.net *.split]
iaj has quit [*.net *.split]
quarcu has quit [*.net *.split]
jamespw has quit [*.net *.split]
cHarNe2 has quit [*.net *.split]
Mattias has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
FracV has quit [*.net *.split]
cgj has quit [*.net *.split]
hephaestus_rg has quit [*.net *.split]
maloik has quit [*.net *.split]
axisys has quit [*.net *.split]
chridal has quit [*.net *.split]
wackobobby has quit [*.net *.split]
LACP has quit [*.net *.split]
Trieste has quit [*.net *.split]
GeekOnCoffee has quit [*.net *.split]
yliu has quit [*.net *.split]
pontiki has quit [*.net *.split]
pipework has quit [*.net *.split]
matrixise has quit [*.net *.split]
zenspider has quit [*.net *.split]
moshee has quit [*.net *.split]
Muz has quit [*.net *.split]
xiphias has quit [*.net *.split]
androidbruce_ is now known as androidbruce
androidbruce has quit [Changing host]
androidbruce has joined #ruby
braincra- has joined #ruby
FracV has joined #ruby
braincra- is now known as braincrash
heftig has joined #ruby
MatthewsFace has joined #ruby
pipework has joined #ruby
pipework has joined #ruby
pontiki_ is now known as pontiki
wackobobby has joined #ruby
GeekOnDecaf is now known as GeekOnCoffee
threesixes has joined #ruby
maximski has joined #ruby
Mattias has joined #ruby
asteve has joined #ruby
cgj has joined #ruby
thoolihan has joined #ruby
moshee has joined #ruby
RandyT has joined #ruby
lamasnik2 has joined #ruby
russoneto has joined #ruby
Kovensky has joined #ruby
quarcu has joined #ruby
Matadoer has joined #ruby
gf3 has joined #ruby
Trieste has joined #ruby
zenspider has joined #ruby
chridal has joined #ruby
drago777 has joined #ruby
Wolland_ has joined #ruby
maximski has quit [Client Quit]
Kruppe has joined #ruby
ptrrr has quit [Quit: ptrrr]
obscured has joined #ruby
philcrissman has joined #ruby
yfeldblu_ has joined #ruby
bearish has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
mtimko has joined #ruby
mtimko has left #ruby ["Leaving"]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gerep has quit [Quit: Leaving]
iaj has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
LACP has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
itspots has joined #ruby
itspots has quit [Changing host]
itspots has joined #ruby
geekbri has quit []
philcrissman has quit [Ping timeout: 264 seconds]
yumanki has joined #ruby
klaut_ has quit [Read error: No route to host]
klaut has joined #ruby
chrishough has quit [Quit: chrishough]
TieSoul has quit [Ping timeout: 255 seconds]
arya_ has quit [Ping timeout: 260 seconds]
Grantlyk has quit [Remote host closed the connection]
kaspertidemann has quit []
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mijicd has joined #ruby
kquig has joined #ruby
michaeldeol has joined #ruby
maximski has joined #ruby
testcore has joined #ruby
djbkd has joined #ruby
krisquigley has quit [Ping timeout: 246 seconds]
emmesswhy has quit [Ping timeout: 272 seconds]
ssvo has joined #ruby
emmesswhy has joined #ruby
Jarboe has joined #ruby
emmesswhy has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
zcreative has joined #ruby
emmesswhy has joined #ruby
maximski has quit []
djbkd has quit [Ping timeout: 264 seconds]
sparrovv has joined #ruby
Wolland__ has joined #ruby
polyidus has joined #ruby
Wolland_ has quit [Ping timeout: 260 seconds]
Wolland__ is now known as Wolland_
Xeago has quit [Remote host closed the connection]
x1337807x has joined #ruby
klaut has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
timonv_ has joined #ruby
zcreative has quit [Ping timeout: 245 seconds]
Soulcutter is now known as Sou|cutter
pasv has joined #ruby
rylev has joined #ruby
chrishough has joined #ruby
Wolland has quit [Ping timeout: 272 seconds]
rezzack has joined #ruby
relix has joined #ruby
jimms has joined #ruby
mijicd has quit [Quit: leaving]
TC` has joined #ruby
Grantlyk has joined #ruby
Zebroid has joined #ruby
obscured has quit [Quit: leaving]
TC` has quit [Client Quit]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
virtualize has quit [Read error: Connection reset by peer]
mikepack has quit [Remote host closed the connection]
virtualize has joined #ruby
mikepack has joined #ruby
terrell_t has joined #ruby
nfk has quit [Read error: Connection reset by peer]
nat2610 has quit [Quit: Leaving.]
diegoviola has joined #ruby
newUser1234 has joined #ruby
gilest has joined #ruby
TC` has joined #ruby
djbkd has joined #ruby
nat2610 has joined #ruby
terrellt has quit [Ping timeout: 260 seconds]
ghr has joined #ruby
chrisg has quit [Ping timeout: 272 seconds]
mikepack has quit [Read error: Connection reset by peer]
Hobogrammer_ has joined #ruby
maximski has joined #ruby
mikepack has joined #ruby
nfk has joined #ruby
jherbst has joined #ruby
timonv_ has quit [Remote host closed the connection]
Hobogrammer has quit [Ping timeout: 245 seconds]
gilest has quit [Remote host closed the connection]
wallerdev_ has joined #ruby
klaut has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
fabrice31 has joined #ruby
georgelappies has quit [Remote host closed the connection]
tectonic has quit []
goodenough has quit [Remote host closed the connection]
jprovazn has quit [Quit: Odcházím]
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
chrisg has joined #ruby
chrisg has joined #ruby
chrisg has quit [Changing host]
KnownSyntax_ is now known as KnownSyntax
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
gilest has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
brianherman has joined #ruby
maximski has quit []
stef_204 has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
gilest has quit [Remote host closed the connection]
relix_ has joined #ruby
speakingcode has quit [Quit: Lost terminal]
intothev01d has left #ruby ["Leaving"]
speakingcode has joined #ruby
gilest has joined #ruby
relix has quit [Ping timeout: 255 seconds]
lolmaus has quit [Quit: Konversation terminated!]
aclearman037 has quit []
tectonic has joined #ruby
Takle has quit [Remote host closed the connection]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
divi_ has joined #ruby
mkaesz has quit [Ping timeout: 245 seconds]
divi_ has quit [Client Quit]
stef_204 has quit [Remote host closed the connection]
tylerkern has quit [Read error: Connection reset by peer]
mkaesz has joined #ruby
tylerkern has joined #ruby
tylerkern has quit [Client Quit]
terrell_t has quit [Remote host closed the connection]
terrellt has joined #ruby
Zebroid has quit [Remote host closed the connection]
stef_204 has joined #ruby
icole has quit [Remote host closed the connection]
paulfm has quit []
foxynna has joined #ruby
Zenigor has quit [Remote host closed the connection]
divi_ has joined #ruby
banister is now known as banister`sleep
mleone has joined #ruby
rake has joined #ruby
yumanki has quit [Ping timeout: 260 seconds]
gregf has joined #ruby
deric_skibotn has quit [Ping timeout: 250 seconds]
zorak has joined #ruby
<rake>
hello, I'm tweaking existing code and I'm trying to figure out how express a var with the first matching part removed. e.g.: var="hate bob" ; puts "I hate that #{bob}".
<rake>
errr #{var} - in whatever expression where the first part up to the space are excluded.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rake>
in bash I'd use: ${var/#* /}
<rake>
is there a similar expression in Ruby?
zmisc has joined #ruby
zmisc has quit [Max SendQ exceeded]
zmisc has joined #ruby
zmisc has quit [Max SendQ exceeded]
renderfu_ has joined #ruby
<jhass>
rake: .split(' ', 2).first or [/[^ ]+ (.*)/, 1] comes to mind
stef_204 has quit [Remote host closed the connection]
<wallerdev_>
interesting regex lol
jerius has quit []
<rake>
so: puts "I hate that #{var.split(' '.2).first}"
<rake>
that'd work?
<wallerdev_>
should be a comma not a period
<waxjar>
it'd say i hate that hate, tho
<rake>
derp. yeah.
djbkd has quit [Remote host closed the connection]
<jhass>
er, yeah, sorry, last not first
<wallerdev_>
you can do it like bash though
DEA7TH has joined #ruby
<rake>
?? how so wallerdev_?
<fieasdfk>
attr_accessor?
zmisc has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
rdavila has quit [Quit: rdavila]
<wallerdev_>
i mean you can use a regex, im not sure on the bash syntax but something like
<rake>
puts "I hate that #{var.split(' ',2).last}" and puts "I hate that #{var.sub(/.* /, '')} too" both work.
<rake>
Thanks!
kquig has quit [Remote host closed the connection]
diegoviola has quit [Read error: Connection reset by peer]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
dexkiki has joined #ruby
zeroNones has joined #ruby
mikedugan has joined #ruby
bmurt has quit [Ping timeout: 255 seconds]
Nahra has quit [Ping timeout: 240 seconds]
rylev has quit []
Nahra has joined #ruby
rake has left #ruby [#ruby]
tylerkern has joined #ruby
russoneto has quit [Quit: Going offline, see ya! (www.adiirc.com)]
cgj has quit [Quit: sleep]
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
icole has joined #ruby
beneggett has joined #ruby
beneggett has quit [Max SendQ exceeded]
newUser1234 has quit [Quit: Leaving...]
Takle has joined #ruby
maestrojed has quit [Quit: Computer has gone to sleep.]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
Lewix has joined #ruby
beneggett has quit [Max SendQ exceeded]
Soda has joined #ruby
<shevy>
ruby needs to become more popular
beneggett has joined #ruby
mikedugan has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<pipework>
ruby needs to become more ruby
<pipework>
"So easy, even shevy can use it"
<shevy>
yeah
<shevy>
that is actually a very true statement :)
<shevy>
well
<jhass>
shevy: what awesome unique ruby project did you start that everybody wants to use and makes ruby popular?
<centrx>
snails
<shevy>
the problem is that ruby itself is actually rather big
Grantlyk has quit [Remote host closed the connection]
<MarcWebe3>
Ruby can shine, but it does not always do so.
<pipework>
shevy: Certainly no bigger than a breadbox.
<shevy>
jhass I am working on many but one man alone can not change the world
dfedde has joined #ruby
<centrx>
submarine sandwich big or asteroid big
<shevy>
pipework I mean like there is a big learning curve
<shevy>
it's like with vim
<pipework>
shevy: Have you heard about our lord and saviour, Matz?
<jhass>
shevy: you need to focus on one
<shevy>
pipework he is too busy with mruby since some years by now :(
jimms has quit [Remote host closed the connection]
<MarcWebe3>
pipework: Yes and no, because sometimes a particular larnguage just is the wrong tool.
<jhass>
shevy: and make it so that other people want to contribute
mleone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework>
MarcWebe3: Most languages are the wrong tools, we just don't have anything better.
<shevy>
hmmm
<shevy>
one day I'll get pipework to contribute to one of my projects
emmesswhy has quit [Quit: This computer has gone to sleep]
failshell has quit []
<pipework>
shevy: probably just useless documentation
<MarcWebe3>
Ruby in praticualar is simple: everything is an object, evertyhing is dynamic and you can monkey patch everything which is bad style ..
<shevy>
hey, documentation is useful!
heftig has quit [Quit: Quitting]
<pipework>
shevy: Not the kind I write!
workmad3 has quit [Ping timeout: 240 seconds]
<shevy>
MarcWebe3 well it empowers people to change stuff however they want to, if they want to
<MarcWebe3>
Eg I think rake is broken by design, because it asks the user to know whether a parallel flag may be passed. The rake fil authors should know it..
divi_ has joined #ruby
<shevy>
isn't the rake dev gone?
<pipework>
Ruby is complex compared to erlang.
heftig has joined #ruby
<shevy>
but that brings me to another topic... we need young folks for ruby!
<MarcWebe3>
I love it for small dynamic stuff such as webscraping, because I can just run irb within Vim code and copy paste and try and error till I get what I need.
<xlii>
pipework: not really, depends on how good you are in shifting programming paradigms, for some declarative is better than imperative
<xlii>
who nowadays learn something else than imperative paradigm?
tjr9898 has quit [Remote host closed the connection]
<MarcWebe3>
shevy: I created two issues @ github that time.
<shevy>
there is more than one way
<pipework>
MarcWebe3: Um... because 'x'.to_i
<shevy>
even when dead
<shevy>
there will be free respawns one day!
<pipework>
xlii: People who learn languages that arne't the ones you know, clearly.
MarcWebe3 has left #ruby [#ruby]
<waxjar>
functional programming is hot
<shevy>
xlii ruby spoiled me ... I don't wanna learn much :( though I did say I will learn C, so that is still on my todo list... but perhaps I go for C++ ... I always liked the << part
zcreative has joined #ruby
<shevy>
<3 <<
<xlii>
:)
ldnunes has quit [Quit: Leaving]
djstorm has quit [Ping timeout: 260 seconds]
<xlii>
pipework: sure, but I see degradation in quality of programming
<pipework>
xlii: Your anecdotes don't affect reality.
<xlii>
I heard few times that learning theory behind programming is waste of time
codecop has quit [Remote host closed the connection]
<shevy>
well, math can always be useful
<xlii>
pipework: obviously, but last time I checked Erlang was obscure language, that people were paying high money for
<pipework>
No code is better than no code.
<shevy>
pipework I have problems parsing that sentence...
<wallerdev_>
i knwo erlang
<wallerdev_>
the amount of erlang jobs is small
<wallerdev_>
lol
<shevy>
... and wallerdev has problems writing sentences ...
<pipework>
xlii: You seem to be interested in asserting something about your experiences as if that's remotely reflectant of reality.
vyorkin has quit [Ping timeout: 245 seconds]
<shevy>
damn, there are at least two wallerdevs here
<pipework>
never enough wallerdevii
<wallerdev_>
my home laptop is on
<shevy>
pipework you soooo remind me of RubyPanther
<shevy>
wallerdev_ on fire?
<wallerdev_>
maybe, i left it encoding videos
<shevy>
hehe
<pipework>
shevy: He's a little more grumpy than I.
<xlii>
pipework: could you point what exactly, since I think you might be overinterpreting
linojon has quit [Quit: linojon]
<shevy>
dunno... but he wrote much longer sentences than you do
agjacome_ has joined #ruby
gkagan has quit [Ping timeout: 272 seconds]
<pipework>
xlii: What do you mean by 'could you point what'?
<shevy>
it's like of epic length... and then BAMM he gets banned from #ruby-lang
<shevy>
Erlang has nice ideas
<pipework>
shevy: banned for?
<shevy>
pipework disagreeing with folks there :)))
<pipework>
erlang is simple and nice as a language.
emmesswhy has joined #ruby
<wallerdev_>
erlang is a little weird with its prolog syntax
<shevy>
well it looked nice but the syntax always turns me off :(
zcreative has quit [Ping timeout: 245 seconds]
<wallerdev_>
but its fun to use when you have a good use for it
<pipework>
shevy: People are often quite disagreeable. RubyPanther being very much disagreeable.
deric_skibotn has joined #ruby
<shevy>
I'd like a mix between a lightweight ruby... some erlang... hmm
<shevy>
optional static typing
<pipework>
elixir?
<shevy>
that is the thing that requires java or?
<pipework>
shevy: google works in your country, no?
agjacome has quit [Ping timeout: 245 seconds]
<wallerdev_>
lol
<shevy>
yeah
<pipework>
fascinating
<wallerdev_>
yeah i guess we should just shut down the channel and link to google
<xlii>
pipework: um, you said that I'm interesting in asserting something, and since I'm not, I thought that you could clarify that
<shevy>
and stackoverflow
<Edelwin>
\o/
<xlii>
pipework: I'm interested in what I'm interested :-)
<wallerdev_>
might as well post on stackoverflow "just google it" for each answer too
<shevy>
lol wallerdev_
veleno has joined #ruby
<shevy>
I think I would get downvoted if I'd do that :(
<pipework>
xlii: You're making assertions about the difficulty of a context switch.
zeroNone_ has joined #ruby
zeroNones has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
zeroNone_ has quit [Max SendQ exceeded]
<wallerdev_>
thats the most frustrating thing to see in an answer
<shevy>
pipework is sooooooo like RubyPanther
nerium has joined #ruby
<xlii>
pipework: nope, I'm saying that not everyone is good at every paradigm
MartinCleaver has joined #ruby
fieasdfk has quit [Ping timeout: 246 seconds]
<wallerdev_>
i come from google and it takes me to this SO answer thats like, cmon did you even google this?!
<shevy>
wallerdev_ well, the most annoying are snobby old users who try to lecture people, on stackoverflow
<wallerdev_>
and im like yes i did, thats how i got here
Cheezebox has quit [Remote host closed the connection]
<xlii>
pipework: some people tend to program in one paradigm than other
<pipework>
xlii: I think that we both lack the information to say what people are and aren't good at.
zeroNones has joined #ruby
linojon has joined #ruby
<shevy>
lol wallerdev_
<pipework>
wallerdev_: Actually, you don't have to post 'just google it', you either write a long explanation and source the thing you googled, or you wait for someone to close the answer.
<shevy>
wat
<shevy>
closing answers!!!
<shevy>
CENSORSHIP
<pipework>
s/answer/question/
<xlii>
pipework: there are resources if you're interested
jherbst has quit [Ping timeout: 260 seconds]
<pipework>
Lots of questions are just rubbish.
<shevy>
pipework does not google
osvico has quit [Ping timeout: 240 seconds]
<pipework>
xlii: I'm not. I don't feel like humans are limited in any fashion around learning any given thing.
<pipework>
As opposed to another.
<shevy>
well, I looked on ruby stackoverflow
heftig has quit [Quit: Quitting]
<shevy>
and most questions are kinda hard, very domain or application specific :(
<pipework>
shevy: just stackoverflow search until you find the answer.
<shevy>
hehehe
<shevy>
hey, I have 307 karma there, I am a late bloomer
<xlii>
pipework: I've done small paper on computer language design and had to do some query, while the paper is outdated and non-english I can recall some sources
<shevy>
arup has like 32.000
<xlii>
pipework: it's not about limitation, it's about preference
<pipework>
xlii: People who have no prior experience have no prefernce.
Zebroid has joined #ruby
<xlii>
pipework: too straightforward, this goes further than that, people can use logical thinking to guess what they might like
<pipework>
If your argument is that it's hard to learn paradigms that you haven't learned, I'd agree, even going so far as to admit that learning paradigms that you're unfamiliar with after learning others might be difficult.
Cheezebox has joined #ruby
djbkd has joined #ruby
<pipework>
xlii: I dont' really have any interest in this, but you're free to go on.
<xlii>
oh, well, too bad, I was looking forward to nice discussion with someone who has strong viewpoint on programming paradigms
x1337807x has joined #ruby
qwyeth has quit [Quit: Leaving]
<pipework>
I have preferences about specifics, but I feel comparing which are easier to learn is fruitless without mounds of data and a really long line.
mark_locklear has quit [Ping timeout: 260 seconds]
Lingo__ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_djbkd has joined #ruby
<xlii>
obviously neither are, however it can be easily observed where people tend to flock, as a mass we're quite simple beings
<shevy>
people flock to:
<shevy>
- php
djbkd has quit [Remote host closed the connection]
<shevy>
- javascript
<shevy>
do we need to say more about people?
ghr has joined #ruby
<xlii>
ha, and that's interesting observation, since PHP and Javascript are not quite Object Oriented
nerium has quit [Quit: nerium]
<eam>
shevy: well, web people
<pipework>
xlii: I don't think you can equate the unwashed masses destination language as any kind of canonical source of truth on what's easiest and best to learn with.
<waxjar>
people flock to whatever has the best tutorials to get started with i think
<zenspider>
almost all OO/dynamic languages do something of the sort. smalltalk, lisp, etc
<eam>
zenspider: yeah that makes sense
amargherio has quit [Remote host closed the connection]
clov3r has joined #ruby
ItSANgo has quit [Quit: Leaving...]
nanoyak has joined #ruby
<eam>
so by extension - object ID for non numeric integers cannot be odd?
<zenspider>
correct. modern architectures require aligned pointers anyhow
Dusty_ has joined #ruby
<eam>
makes sense
<eam>
wow, and I didn't realize object_id could return negative numbers
<eam>
seems like that ought to be unsigned
<zenspider>
pretty sure we could sneak another flag in on 32 bit machines, and a 4th on 64 bit machines. but ruby doesn't really make use of extra flags
<zenspider>
like, smalltalk has precise GC, so they use one of the flags to mark an old object as a forwarded object while the GC walks the graph of live objects
osvico has joined #ruby
andrewlio has quit [Quit: Leaving.]
riotjones has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
Jarboe has quit [Ping timeout: 244 seconds]
postmodern has quit [Quit: Leaving]
toertore has quit [Quit: This computer has gone to sleep]
tylerkern has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zcreative has quit [Ping timeout: 240 seconds]
<asteve>
I need a ruby script to automatically execute a method when I call it but I also need to run unit tests
<asteve>
is there a middle ground somewhere short of commenting out the method call at the end of the script every time I need to run tests?
phoo1234567 has quit [Quit: Leaving]
<zenspider>
call_my_method if $0 == __FILE__
<zenspider>
tho I suggest you put your script in lib, the thing that calls the method in bin and your tests in test, like a good ruby dev
<zenspider>
then you've separated everything out into a nice happy library that is easier to maintain
<jhass>
asteve: make your bin/foo MyLib.my_method and call just MyLib in the tests
m8 has quit [Quit: Sto andando via]
omosoj has quit [Ping timeout: 240 seconds]
shacklef_ has quit [Remote host closed the connection]
aspiers has joined #ruby
crdpink has joined #ruby
Darkchaos has quit [Ping timeout: 250 seconds]
<asteve>
jhass: are you setting up the loadpath at the top of every script then?
hamakn has joined #ruby
<jhass>
asteve: no, rubygems does that. if the project doesn't use bundler then I setup the load path in the spec/test helper for the test suite
enedil has quit [Quit: leaving]
sylvanica has quit [Disconnected by services]
ItSANgo has joined #ruby
sylvanica_ is now known as sylvanica
sylvanica1 has joined #ruby
icole has quit [Remote host closed the connection]
<zenspider>
(or use rake)
hamakn has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
centrx has quit [Quit: Mead error: Connection reset by beer]
hamakn has joined #ruby
geggam has quit [Ping timeout: 272 seconds]
OffTheRails has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
veleno has quit [Quit: veleno]
divi_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brothmars has quit [Remote host closed the connection]
brothmars has joined #ruby
sparrovv has quit [Remote host closed the connection]
tylerkern has joined #ruby
sparrovv has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
mary5030_ has quit [Remote host closed the connection]
bwilson has joined #ruby
freerobby has quit [Quit: Leaving.]
Jackneill has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 260 seconds]
sparrovv has quit [Ping timeout: 272 seconds]
johnmolina has quit []
hooper has quit [Quit: Leaving.]
jottr has joined #ruby
Cheezebox has quit [Remote host closed the connection]
Takle has quit []
axsuul has joined #ruby
Takle has joined #ruby
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jobewan has quit [Quit: Leaving]
cocotton_ has joined #ruby
aspires has quit []
cap has quit [Remote host closed the connection]
cocotto__ has joined #ruby
renderful has joined #ruby
apeiros has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
snath has quit [Ping timeout: 240 seconds]
cocotton has quit [Ping timeout: 264 seconds]
cocotto__ has quit [Remote host closed the connection]
cocotton_ has quit [Ping timeout: 245 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
cocotton has joined #ruby
aspires has joined #ruby
renderfu_ has quit [Ping timeout: 264 seconds]
gilest has quit [Read error: Connection reset by peer]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bigkevmcd has joined #ruby
djcp has joined #ruby
zoo-zed has joined #ruby
benzrf is now known as benzrf|offline
ytw has quit [Remote host closed the connection]
<dexkiki>
I'm reading through the better_errors gem, and I came accross this line, ::Kernel.binding.callers.drop(1), and I can't find any documentation on what callers does