apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
senayar_ has quit [Remote host closed the connection]
lfox has quit [Quit: ZZZzzz…]
petey has quit [Ping timeout: 240 seconds]
senayar has joined #ruby
v1n has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
scmaccal_ has joined #ruby
scmaccal_ has quit [Excess Flood]
scmaccal_ has joined #ruby
scmaccal_ has quit [Excess Flood]
yekta has joined #ruby
senayar has quit [Ping timeout: 245 seconds]
yekta has quit [Client Quit]
jb41 has quit [Ping timeout: 260 seconds]
PragCypher has quit [Quit: Leaving]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
<volty> jb41: that simplicity made me forgot a.values_at(*b) // and I wonder why they defined values_at -- think that it is more difficult to remember that there's values_at than to just map
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
Matriks has quit [Remote host closed the connection]
sailias has joined #ruby
Zai00 has joined #ruby
Zai00 has quit [Client Quit]
boboc has joined #ruby
<boboc> how can i format an flaot to show with the $ at the begining? from 10.5 to format $10.5 ?
PixelShuck is now known as SleeepingShuck
endash has quit [Quit: endash]
nerdy has quit [Quit: Computer has gone to sleep.]
yestermorn16 has quit [Remote host closed the connection]
mdst has quit [Quit: Leaving]
<volty> >> f = 10.5; p "$%.1f" % f
<eval-in> volty => "$10.5" ... (https://eval.in/52903)
baroquebobcat has quit [Quit: baroquebobcat]
adeponte has quit [Ping timeout: 240 seconds]
cynomorium84 has joined #ruby
aspires has quit [Quit: aspires]
nerdy has joined #ruby
dross has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
dross has joined #ruby
amacgregor has joined #ruby
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
boboc has quit [Remote host closed the connection]
siwica has quit [Ping timeout: 246 seconds]
DanKnox_away is now known as DanKnox
Mars` has quit [Ping timeout: 264 seconds]
lfox has joined #ruby
Ox6abe has quit [Remote host closed the connection]
Ox6abe has joined #ruby
jlebrech has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
DanKnox is now known as DanKnox_away
T_T has joined #ruby
Notte has quit [Remote host closed the connection]
aspires has joined #ruby
Ox6abe has quit [Ping timeout: 264 seconds]
Barrin6 has left #ruby [#ruby]
Ox6abe has joined #ruby
DonRichie has quit [Ping timeout: 264 seconds]
DonRichie has joined #ruby
pwh has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
adeponte has joined #ruby
scarolan has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
zz_michael_mbp is now known as michael_mbp
Valesk has quit [Ping timeout: 240 seconds]
Squarepy has quit [Read error: Operation timed out]
mac___ has quit [Remote host closed the connection]
mac___ has joined #ruby
adeponte has quit [Ping timeout: 264 seconds]
michael_mbp is now known as zz_michael_mbp
mac___ has quit [Read error: Connection reset by peer]
mac___ has joined #ruby
baron_underscore has joined #ruby
jarm has quit [Read error: Connection reset by peer]
jarm has joined #ruby
Spleeze has joined #ruby
kofno has quit [Ping timeout: 252 seconds]
jarm has quit [Read error: Connection reset by peer]
sayan has joined #ruby
mercwithamouth has joined #ruby
volty has quit [Quit: Konversation terminated!]
maletor has quit [Quit: Computer has gone to sleep.]
jarm has joined #ruby
serp` has joined #ruby
GeissT has joined #ruby
Xeago has joined #ruby
aspires has quit [Quit: aspires]
shvelo has quit [Read error: Operation timed out]
aspires has joined #ruby
nerdy has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
St_Marx has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 264 seconds]
DanKnox_away is now known as DanKnox
w3pm has quit [Quit: This computer has gone to sleep]
randomnick_ has quit [Quit: Leaving]
sayan has quit [Ping timeout: 264 seconds]
SkuliOskarsson has joined #ruby
baron_underscore has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
Mars` has joined #ruby
dash_ has joined #ruby
Davey has joined #ruby
Squarepy has joined #ruby
mikepack has quit [Ping timeout: 256 seconds]
dash_ has quit [Ping timeout: 264 seconds]
monsterment has joined #ruby
Hanmac1 has joined #ruby
aspires has quit [Quit: aspires]
notjohn has quit [Quit: notjohn]
Hanmac has quit [Ping timeout: 245 seconds]
heidi has joined #ruby
scarolan has quit [Ping timeout: 260 seconds]
SkuliOskarsson has quit [Quit: SkuliOskarsson]
Valesk has joined #ruby
w3pm has joined #ruby
nathancahill has joined #ruby
dross has quit [Ping timeout: 264 seconds]
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo_ has joined #ruby
dross has joined #ruby
nathancahill has quit [Client Quit]
zz_michael_mbp is now known as michael_mbp
sailias has quit [Ping timeout: 252 seconds]
jarm has quit [Ping timeout: 260 seconds]
fschuindt has joined #ruby
kofno has joined #ruby
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
heidi has quit [Quit: Leaving.]
i_s has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
IceDragon has quit [Remote host closed the connection]
Squarepy has quit [Ping timeout: 252 seconds]
aetaric has quit [Ping timeout: 260 seconds]
zzz_taion809 is now known as taion809
monsterment has quit [Remote host closed the connection]
ravster has quit [Quit: Leaving.]
senayar has joined #ruby
lsoa has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Fuzai has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
SkuliOskarsson has joined #ruby
Heero has quit [Read error: Connection reset by peer]
monsterment has joined #ruby
aetaric has joined #ruby
pwh has quit []
drDexx has joined #ruby
drDexx has left #ruby [#ruby]
senayar has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
lukec has quit [Quit: lukec]
lsoa has quit [Quit: WeeChat 0.4.1]
T_T has quit [Remote host closed the connection]
NicolasTarzia has quit [Read error: Connection reset by peer]
T_T has joined #ruby
fschuindt has quit [Quit: Computer has gone to sleep.]
NicolasTarzia has joined #ruby
scarolan has joined #ruby
brennanM_ has quit [Remote host closed the connection]
threesome has joined #ruby
NicolasTarzia has quit [Max SendQ exceeded]
Ox6abe has quit [Remote host closed the connection]
NicolasTarzia has joined #ruby
xk_id has joined #ruby
T_T has quit [Ping timeout: 252 seconds]
scarolan has quit [Read error: Operation timed out]
Deele has quit [Ping timeout: 260 seconds]
danshultz has joined #ruby
Clooth has quit [Read error: Connection reset by peer]
Cheos has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
heidi has joined #ruby
Xeago has joined #ruby
agent_white has quit [Quit: leaving]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
monsterment has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 246 seconds]
stillEPIK has joined #ruby
coaster has quit [Ping timeout: 248 seconds]
eka has quit [Quit: Computer has gone to sleep.]
Ox6abe has joined #ruby
kreeves has quit [Ping timeout: 240 seconds]
l3ck has joined #ruby
ecksit has joined #ruby
vadviktor has quit [Read error: Operation timed out]
ecksit has quit [Client Quit]
i_s has quit [Remote host closed the connection]
mattp_ has quit [Ping timeout: 240 seconds]
cool has quit [Read error: Operation timed out]
vadviktor has joined #ruby
cool has joined #ruby
mattp_ has joined #ruby
DanKnox is now known as DanKnox_away
yekta has joined #ruby
heidi has quit [Quit: Leaving.]
Rollabunna has joined #ruby
sailias has joined #ruby
pwh has joined #ruby
radic has joined #ruby
cads has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
radic_ has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby
alexju has quit [Remote host closed the connection]
amacgregor_ has joined #ruby
alexju has joined #ruby
amacgregor has quit [Ping timeout: 240 seconds]
drizz_ has joined #ruby
relix has joined #ruby
drizz has quit [Ping timeout: 248 seconds]
undert- has quit [Ping timeout: 248 seconds]
Es0teric has quit [Ping timeout: 256 seconds]
telling has quit [Ping timeout: 248 seconds]
telling has joined #ruby
alexju has quit [Ping timeout: 256 seconds]
undert_ has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
DanKnox_away is now known as DanKnox
Mars` has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
v1n has quit [Ping timeout: 252 seconds]
jefflyne has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
SkuliOskarsson has quit [Quit: SkuliOskarsson]
lfox has quit [Quit: ZZZzzz…]
_adeponte has joined #ruby
mansi_ has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
mikepack has joined #ruby
lukec has joined #ruby
mary5030 has joined #ruby
lukec has quit [Client Quit]
mobileblue has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
mobileblue has joined #ruby
braincra- has quit [Ping timeout: 264 seconds]
Cheos has quit [Quit: Leaving...]
edwardly has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
edwardly has joined #ruby
roadt_ has quit [Ping timeout: 240 seconds]
sarmiena_ has quit [Quit: sarmiena_]
Xeago has joined #ruby
gen0cide_ has joined #ruby
<gen0cide_> Question for all of you
<gen0cide_> Anyone got good experience with the typhoeus gem?
mengu has quit [Ping timeout: 260 seconds]
Xeago has quit [Read error: Operation timed out]
marcdel_ has quit [Ping timeout: 245 seconds]
aapzak has quit [Ping timeout: 251 seconds]
coaster has joined #ruby
aapzak has joined #ruby
jefflyne has quit [Quit: WeeChat 0.4.1]
abstrusenick has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Client Quit]
jefflyne has joined #ruby
gja has joined #ruby
tkuchiki has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
LLckfan has joined #ruby
nwertman1 has quit [Ping timeout: 264 seconds]
_adeponte has quit [Remote host closed the connection]
Aloysius1 has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
yacks has joined #ruby
Aloysius1 has joined #ruby
adeponte has quit [Ping timeout: 245 seconds]
reactormonk has quit [Quit: WeeChat 0.4.1]
postmodern has joined #ruby
aspires has joined #ruby
robert_ has joined #ruby
edwardly has quit [Quit: ZNC - http://znc.in]
cynomorium84 has quit [Remote host closed the connection]
dap has joined #ruby
xk_id has quit [Quit:
predefiance06 has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Inside has joined #ruby
i_s has joined #ruby
edwardly has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
popl_ has joined #ruby
popl has quit [Ping timeout: 246 seconds]
popl_ is now known as popl
popl has quit [Changing host]
popl has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
Aloysius1 has quit [Remote host closed the connection]
aspires has quit [Quit: aspires]
dopesick has joined #ruby
dkamioka has quit [Remote host closed the connection]
alexju has joined #ruby
Alina-malina has joined #ruby
pwh has quit []
adeponte has joined #ruby
coderhs has joined #ruby
dash_ has joined #ruby
notjohn has joined #ruby
dash_ has quit [Ping timeout: 252 seconds]
sectionme has joined #ruby
iliketurtles has joined #ruby
Ox6abe has quit [Remote host closed the connection]
petey has joined #ruby
Ox6abe has joined #ruby
yekta has quit [Quit: yekta]
lusory has joined #ruby
Ox6abe_ has joined #ruby
Xeago has joined #ruby
Rich_Morin has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
dodosan has joined #ruby
iliketurtles has quit [Ping timeout: 245 seconds]
danshultz has quit [Remote host closed the connection]
l3ck has quit [Quit: Bye!]
petey has quit [Ping timeout: 256 seconds]
Ox6abe has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
petey has joined #ruby
mary5030 has joined #ruby
dodosan has quit [Remote host closed the connection]
LiquidIn1ect is now known as LiquidInsect
nisstyre has quit [Quit: Leaving]
danshultz has joined #ruby
Ox6abe_ has quit [Ping timeout: 260 seconds]
serp` has quit [Quit: serp`]
Xeago has quit [Ping timeout: 264 seconds]
dopesick has quit [Quit: ChatZilla 0.9.87 [Iceape 2.7.12/20130119095535]]
petey has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 264 seconds]
flagg0204 has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
deens has joined #ruby
ehc has quit [Quit: ehc]
petey has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
roadt_ has joined #ruby
mikepack has quit [Remote host closed the connection]
ehc has joined #ruby
mikepack has joined #ruby
alexju has quit [Remote host closed the connection]
deens has quit [Client Quit]
ehc has quit [Client Quit]
nathancahill has joined #ruby
ewnd9 has joined #ruby
pwh has joined #ruby
intuxicated_ has quit [Quit: Leaving]
yacks has quit [Quit: Leaving]
mikepack has quit [Ping timeout: 264 seconds]
SilverKey has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
serp` has joined #ruby
nanothief has quit [Read error: Connection reset by peer]
nanothief has joined #ruby
guilleiguaran_ has quit [Ping timeout: 248 seconds]
shaileshg has quit [Ping timeout: 248 seconds]
shaileshg has joined #ruby
wesside has quit [Ping timeout: 264 seconds]
octarine has quit [Ping timeout: 248 seconds]
waxjar has quit [Ping timeout: 248 seconds]
daaaan_ has quit [Ping timeout: 248 seconds]
daaaan has joined #ruby
wesside has joined #ruby
octarine has joined #ruby
waxjar has joined #ruby
iliketurtles has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
coderhs has joined #ruby
banisterfiend has joined #ruby
karnowski has quit [Ping timeout: 248 seconds]
Aryasam has joined #ruby
senayar has joined #ruby
T_T has joined #ruby
aryaching has joined #ruby
dap has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dap has joined #ruby
Aryasam has quit [Quit: Bye]
senayar has quit [Ping timeout: 245 seconds]
ner0x has joined #ruby
fridim_ has quit [Ping timeout: 264 seconds]
danshultz has quit [Remote host closed the connection]
dap has left #ruby [#ruby]
brennanMKE has joined #ruby
ehc has quit [Quit: ehc]
dzhulk has joined #ruby
Xanderby has joined #ruby
brennanMKE has quit [Ping timeout: 264 seconds]
heidi has joined #ruby
scottstamp is now known as zz_scottstamp
Zekka has quit [Quit: Lost terminal]
Xeago has joined #ruby
T_T has quit [Remote host closed the connection]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
popl is now known as pboupul
pboupul is now known as popl
Xeago has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
milesforrest has joined #ruby
decoponio has joined #ruby
ehc has joined #ruby
emergion has joined #ruby
pwh has quit []
darren has joined #ruby
heidi has quit [Quit: Leaving.]
dplore has joined #ruby
dplore has quit [Quit: leaving]
marcdel has joined #ruby
marcdel has quit [Max SendQ exceeded]
Jetchisel has joined #ruby
marcdel has joined #ruby
danshultz has joined #ruby
amacgregor_ has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
serp` has quit [Ping timeout: 264 seconds]
Al___ has joined #ruby
i_s has joined #ruby
guilleiguaran_ has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
danshultz has quit [Ping timeout: 256 seconds]
osvico has quit [Ping timeout: 264 seconds]
amacgregor has joined #ruby
aspires has quit [Quit: aspires]
sarmiena_ has joined #ruby
akemrir has joined #ruby
i_s has quit [Ping timeout: 240 seconds]
darren has quit [Quit: Leaving]
marcdel has quit [Quit: Textual IRC Client: www.textualapp.com]
petey has quit [Remote host closed the connection]
petey has joined #ruby
lemonsparrow has joined #ruby
funburn has joined #ruby
petey has quit [Ping timeout: 260 seconds]
roadt__ has joined #ruby
mxweas has joined #ruby
aryaching_ has joined #ruby
senayar has joined #ruby
roadt_ has quit [Read error: Operation timed out]
sectionme has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
senayar has quit [Ping timeout: 245 seconds]
sectionme has quit [Ping timeout: 264 seconds]
hogeo has joined #ruby
brennanMKE has joined #ruby
heidi has joined #ruby
<akemrir> hi, it is possible to check length of unpack format?
brennanMKE has quit [Ping timeout: 246 seconds]
heidi has quit [Read error: Connection reset by peer]
heidi has joined #ruby
notjohn has quit [Quit: notjohn]
heidi has quit [Client Quit]
akemrir has quit [Quit: WeeChat 0.4.1]
a1ph4g33k has joined #ruby
<a1ph4g33k> greetings all ... quick question I've never found an answer for ... # vs . ... as in Foo#bar vs Foo.bar ...
ehc has quit [Quit: ehc]
Xeago has joined #ruby
milesforrest is now known as milesforrest|afk
<ryanf> a1ph4g33k: # = instance method, . = class method
Al___ has quit [Read error: Connection reset by peer]
<ryanf> Foo.new.bar() vs Foo.bar()
<a1ph4g33k> just as a notation for the function?
<ryanf> yeah
<ryanf> it's just a documentation thing
Al___ has joined #ruby
akemrir has joined #ruby
<a1ph4g33k> gotcha. just wanted to be sure.
<a1ph4g33k> because in code, # is going to be a comment and be thrown out.
<ryanf> yeah
<a1ph4g33k> just wanted to be sure.
<a1ph4g33k> thansk.
<a1ph4g33k> ... thanks.
<ryanf> yeah, kind of hard to google
<ryanf> no prolbem
rippa has joined #ruby
<a1ph4g33k> ( 10 years of Ruby and still learning =) )
<a1ph4g33k> ( not being boastful )
Xeago has quit [Ping timeout: 245 seconds]
<a1ph4g33k> anyways ... again thanks.
<LLckfan> I have a Gateway laptop and when I opened the lid the power light was on but the laptop was asleep. When I pushed the power it started flashing with the lights for the light bulb and the battery but only when it was plugged in. Is this a sign I need a new tip end for my charger?
Al___ has quit [Read error: Connection reset by peer]
Al___ has joined #ruby
mrnugget has joined #ruby
<xybre> I've seen that exact chat a few days ago. Are you some sort of weird bot?
<LLckfan> not a bot
<BraddPitt> thanks a1ph4g33k i actually had the same question
iliketurtles has quit [Quit: zzzzz…..]
mxweas has quit [Ping timeout: 260 seconds]
ukd1 has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
<xybre> Why would someone post weird questions about laptops copy pasted over different days to different non-hardware related channels.
danshultz has joined #ruby
<pontiki> maybe they're like the person with a phone problem
<Hanmac1> xybre: a few days ago it was in this channel too (not a different)
Hanmac1 is now known as Hanmac
<pontiki> we have become the general problem solving channel
<pontiki> RUBY CAN DO EVERYTHING
<Hanmac> xD
Al___ has quit [Quit: Al___]
dhruvasagar has joined #ruby
<ryanf> that guy pasted the same thing in #bundler earlier today
LLckfan has left #ruby [#ruby]
<ryanf> very subtle trolling?
<xybre> Hanmac: You keep track of all the channels I'm in?
danshultz has quit [Ping timeout: 245 seconds]
<xybre> >> StringTheory.explain
<eval-in> xybre => uninitialized constant StringTheory (NameError) ... (https://eval.in/52933)
<pontiki> everyone does xybre
<Hanmac> hm maybe? ... no only the ruby channel
<xybre> Okay well maybe it can't solve *every* problem.
<xybre> Hanmac: Then considering your small sample size, its probably innacurate to state he did not post in another channel I'm in :)
ukd1 has quit [Remote host closed the connection]
Bosox20051 has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
Targen has joined #ruby
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
ewnd9 has joined #ruby
dzhulk1 has joined #ruby
dzhulk has quit [Ping timeout: 240 seconds]
mansi has quit [Ping timeout: 240 seconds]
amacgregor has quit [Ping timeout: 256 seconds]
jlebrech has joined #ruby
sumark is now known as Guest54455
karnowski has joined #ruby
fgo has joined #ruby
goganchic has joined #ruby
amacgregor has joined #ruby
yacks has joined #ruby
T_T has joined #ruby
iliketurtles has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
Lewix has quit [Remote host closed the connection]
w3pm has quit [Quit: This computer has gone to sleep]
gja has joined #ruby
adambeynon has joined #ruby
Xeago has joined #ruby
ewokchewy has joined #ruby
dagen has joined #ruby
stillEPIK has quit [Ping timeout: 245 seconds]
leonidlm has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
jrobeson has quit [Quit: Leaving]
jrobeson has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jrobeson has quit [Changing host]
jrobeson has joined #ruby
<akemrir> hi, struct.unpack is similar to ruby String.unpack?
<akemrir> struct.unpack from python
echevemaster has quit [Read error: Connection reset by peer]
arietis has joined #ruby
<akemrir> I have format in python and I want to use it in ruby.
DanKnox is now known as DanKnox_away
gja has quit [Quit: This computer has gone to sleep]
<Hanmac> akemrir: i think it should be similar ... (but you can also look at the documentation)
<pontiki> the ruby unpack uses the underlying glib unpack. don't know what python uses
<akemrir> Hanmac: I already have. This isnt that simple.
<akemrir> Hanmac: ruby have more directives
<akemrir> I have in pyton that format 'llHHI'. This supposed to be to decode struct of events from /dev/input/eventX.
SilverKey has quit [Quit: Zzzzzz.]
SilverKey has joined #ruby
<xybre> Do you know what the format of that file is, or are you just cargo culting stuff from python?
<pontiki> what happens when you run the same in ruby?
<akemrir> This is initial version of script. https://gist.github.com/akemrir/61d0a8baf840b59a90e5
<pontiki> and so what happens?
<akemrir> Example response "[1381043260, 0, 8851, 11, 0]"
<akemrir> First is timestap decoded correctly.
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
<akemrir> pontiki: this response is when I run directly same format.
<xybre> If you know the format and don't like using String#unpack there are other alternatives.
<pontiki> akemrir: i don't even know what that means
<pontiki> i mean show us the output
<pontiki> sheesh
zz_tsykoduk is now known as tsykoduk
<akemrir> This is sample output
maletor has quit [Quit: Computer has gone to sleep.]
<pontiki> how about real output
<xybre> Wh..why are you doing throw catch?
<pontiki> i guess now i'm wondering what the actual question is
<pontiki> is this not data you are expecting?
<akemrir> This is script that is launched at environment starts, and it gets SIGTERM from systemd.
workmad3 has joined #ruby
danshultz has joined #ruby
<xybre> fantastic, so?
maletor has joined #ruby
<xybre> Anyway, whats the problem?
<xybre> (other than throw/catch)
dagen has left #ruby [#ruby]
<akemrir> I`m not quite sure of that output format is correct.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<xybre> Do you know what the encoding of the binary data is?
DrCode has joined #ruby
<pontiki> how does it compare to your python script?
<xybre> Do you know the schema with which they have encoded it, so that if you could adequately explain it, you could be assured of its correctness with which to test it?
<akemrir> pontiki: only timestamp is correct
<pontiki> then i'll point you to the doc link above
<akemrir> xybre: at and of this document https://www.kernel.org/doc/Documentation/input/input.txt, there is some data about format used in /dev/input/eventX
<xybre> Cool, thats your encoding then
danshultz has quit [Ping timeout: 256 seconds]
mdst has joined #ruby
mdst3 has quit [Read error: Connection reset by peer]
T_T has quit [Remote host closed the connection]
mansi_ has joined #ruby
Hanmac1 has joined #ruby
nathancahill has quit [Quit: nathancahill]
Hanmac has quit [Ping timeout: 240 seconds]
sectionme has joined #ruby
<xybre> akemrir: according to the doc you provided there's only 4 fields, but your FORMAT string has 5.
adeponte has quit [Remote host closed the connection]
totem has joined #ruby
mansi_ has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
<akemrir> xybre: ok, first l is for timestamp. This works
<xybre> lS_S_l
<xybre> I think thats what you want for the format.
<bnagy> is there an actual question being asked at any point here?
skaflem has joined #ruby
<popl> just now
<akemrir> S_ returns 0 always
<bnagy> what is the raw string you're getting?
boxmein has joined #ruby
<xybre> akemrir: I just tried it and it doesn't return 0 here
<xybre> akemrir: try providing what bnagy said, an actual input string would be useful.
<akemrir> xybre: ok
sectionme has quit [Ping timeout: 240 seconds]
<bnagy> BinData is a million times nicer than unpack btw
<akemrir> https://gist.github.com/akemrir/cbbde9e040ecb695994e raw output with acutally decoded data
adeponte has quit [Ping timeout: 246 seconds]
<xybre> bnagy +1
DrCode has quit [Ping timeout: 240 seconds]
<xybre> akemrir: S_ is 0 becuase the data is zero: "P\u0013QR\u0000\u0000\u0000\u000046\u0006\u0000\u0000\u0000\u0000\u0000"
<akemrir> but this is additional requirement, I almost have decoded data
<xybre> See the zeros? Those mean zero.
<akemrir> xybre: Could you post yours example output data?
adeponte has joined #ruby
<xybre> >> "P\x13QR\x00\x00\x00\x0046\x06\x00\x00\x00\x00\x00".unpack 'lS_S_l'
<eval-in> xybre => [1381045072, 0, 0, 407092] (https://eval.in/52954)
_adeponte has joined #ruby
<xybre> That looks correct to me from the encoding provided in the documentation.
adeponte has quit [Read error: Connection reset by peer]
diegoviola has quit [Quit: WeeChat 0.4.1]
<xybre> The type/code is 0/0
lemonsparrow has quit [Ping timeout: 250 seconds]
<akemrir> thanks for help, I think this explains my questions
nathancahill has joined #ruby
<akemrir> xybre: Do you know where I can read more about encoding binary data?
senayar has joined #ruby
<akemrir> xybre: when I ran this python script, I have response with types and codes. And none of them are 0/0.
svector has joined #ruby
<xybre> The python output looks incorrect given that input.
<xybre> akemrir: I started this as a list of useful binary tools: https://gist.github.com/acook/6622270 The bindata manual http://bindata.rubyforge.org/manual.html has a lot more information as well.
<xybre> Unless of course the format has changed from the kernel.org documentation.
Inside has quit [Ping timeout: 245 seconds]
a1ph4g33k has quit [Read error: Connection reset by peer]
aryaching_ has quit [Ping timeout: 264 seconds]
<xybre> The numbers the python script are giving like 39045, 59977, and 20840 seem to be way out of range.
banisterfiend has joined #ruby
<akemrir> hmm
senayar has quit [Ping timeout: 245 seconds]
<xybre> And also they're expecting 5 sets of data, while the specification you sent me indicates only 4. So its almost certainly an incorrect format specification.
<akemrir> it could be
Mars` has joined #ruby
Nuck has quit [Ping timeout: 264 seconds]
<akemrir> xybre: I think my script is incorrectly built. When its gathering data, I cant select text in terminal.
DrCode has joined #ruby
PLejeck has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<akemrir> but only when I gather data from mouse.
brennanMKE has joined #ruby
<akemrir> In that case, these responses from python script are out of range too.
<pontiki> you're collecting data from the mouse input, and you're wondering why using it might not work? what?
<akemrir> pontiki: I`am reading data only
<pontiki> so?
<akemrir> Maybe this way is not correct, with popen and cat.
BizarreCake has joined #ruby
<akemrir> cat opens endless stream, that outputs data when events occur.
claymore has joined #ruby
gmas has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
hogeo has joined #ruby
nso95_ has joined #ruby
<xybre> akemrir: you're reading keyboard input aren't you?
<akemrir> no, I dont need keyboard input
PLejeck is now known as Nuck
Nuck has quit [Changing host]
Nuck has joined #ruby
wallerdev has quit [Quit: wallerdev]
<xybre> Its mouse input like pontiki said?
DanKnox_away is now known as DanKnox
Hanmac1 has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
<akemrir> xybre: my bad, sorry. I read keyboard input, but I want to have key codes with timestamps and event types
hogeo has quit [Ping timeout: 240 seconds]
tonni has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
TTilus has joined #ruby
<akemrir> hmm
rubyracer has joined #ruby
aryaching has joined #ruby
<akemrir> It fails at value_index
GeissT has quit [Read error: Connection reset by peer]
GeissT has joined #ruby
lukec has joined #ruby
<akemrir> value is not needed, only code. To correctly count keypresses
<akemrir> Don`t know why, I always have type and code that equals to 0
maletor has quit [Quit: Computer has gone to sleep.]
arietis has quit [Quit: Computer has gone to sleep.]
Tearan has quit [Quit: Sleepy Badger....]
<xybre> akemrir: Thsoe keyboards operate using nonstandard protocols
<xybre> iirc
<xybre> akemrir: pretty sure all you need is value
<xybre> akemrir: thing is, its returning nonstandard values
totem has quit [Quit: totem]
<akemrir> This could be a problem
coderhs has quit [Quit: Leaving]
funburn has quit [Quit: funburn]
<xybre> akemrir: And you should probably just File.open instead of using cat.
<akemrir> No need for this loop?
<xybre> You need the loop if it hits EOF, so it can reopen the file.
<xybre> The throw/catch stuff is a mess, and the trap hooks don't work like you think they do.
tsykoduk is now known as zz_tsykoduk
adambeynon has joined #ruby
danshultz has joined #ruby
nso95_ has quit [Ping timeout: 252 seconds]
_adeponte has quit [Remote host closed the connection]
<akemrir> xybre: when I use File.open it get new data everytime when I call gets on it. This could be easier solution.
<akemrir> In case of trap. I want to exit script when it gets SIGTERM.
Zai00 has joined #ruby
dbjeepn has joined #ruby
gyzmodo has joined #ruby
lukec has quit [Quit: lukec]
<akemrir> And of course save calculated data before it exits
danshultz has quit [Ping timeout: 245 seconds]
<akemrir> Maybe I`am doing it wrong
dbjeepn has quit [Client Quit]
JeanMertz has joined #ruby
DanKnox is now known as DanKnox_away
Jetchisel has quit [Read error: Connection reset by peer]
Jetchisel has joined #ruby
mansi_ has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
funburn has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
funburn has quit [Client Quit]
nomenkun has joined #ruby
amacgregor has quit [Ping timeout: 240 seconds]
noopq has joined #ruby
heftig has joined #ruby
<xybre> akemrir: make a method that the trap block calls and use that to record the values and then exit.
mansi_ has quit [Ping timeout: 240 seconds]
goganchic has quit []
Nss has joined #ruby
lucazi has joined #ruby
dangerousdave has joined #ruby
arietis has joined #ruby
amacgregor has joined #ruby
sergicles has joined #ruby
fgo has quit [Remote host closed the connection]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
joesavage has joined #ruby
Squarepy has joined #ruby
ewokchew_ has joined #ruby
mrnugget has quit [Quit: mrnugget]
<joesavage> I have a Ruby script that runs once a day, and writes to a binary file using File.open(…, 'rb+') file for approx half an hour a day (from its 8 hours of processing). When the script ran yesterday, something went wrong and so I woke up this morning to see a tone of garbage values in my binary file (the script goes through and increments a bunch of values some number of times, and I've been left with 33987s which is far too high).
<joesavage> anyone have any tips on how I might troubleshoot this? (I'm guessing, for starters, that I should be locking the file for every write, but I have no idea)
funburn has joined #ruby
MrZYX|off is now known as MrZYX
ewokchewy has quit [Ping timeout: 264 seconds]
<joesavage> Alternatively, is the solution here that I shouldn't be writing to the file with the new data each time and should be storing all the results in memory as a Hash table and then only writing after all the collection?
<xybre> joesavage: It might be a more robust solution to write the data out more often. Is there a reason you need to write it as binary?
ewokchew_ has quit [Remote host closed the connection]
<joesavage> Yeah, I need to read the file very efficiently for its later uses
ananthakumaran has quit [Quit: Leaving.]
<joesavage> The weird thing in this case is that a bunch of the values in the file (which are usually written completely separately) have been changed to the same value -- either "c484" or "c483", which translate to 33988 and 33732
Jetchisel has joined #ruby
shvelo has joined #ruby
brennanMKE has joined #ruby
nomenkun has quit [Remote host closed the connection]
colonolGron has joined #ruby
VTLob has joined #ruby
Xeago has joined #ruby
brennanMKE has quit [Ping timeout: 240 seconds]
Xeago_ has joined #ruby
SleeepingShuck is now known as PixelShuck
<jrobeson> joesavage, you're writing to the exact same file everyt time?
<joesavage> Yeah
<jrobeson> you should consider writing to a temp file and then renaming it
<joesavage> I should?
<jrobeson> yes..
<jrobeson> why would i say it otherwise?
<joesavage> :D I was wondering _why_ I should
<jrobeson> unless the file is meant to always be read even when incomplete
<jrobeson> so you have a chance to make sure it was written correctly
<jrobeson> you could perform various tests and then rename it to the one it should be once you're sure
<xybre> Yeah I'd save the data to a timestamp-prefixed file each time.
<jrobeson> and then you wouldn't have to lock it
<joesavage> It can't really get written to wrongly -- each increment to a byte it does is an extra datapoint, which is always useful
<jrobeson> just make sure you rename atomically
<jrobeson> you just said it was wrong..
<joesavage> Well, it _is_ wrong, but I have no idea why.
Xeago_ has quit [Ping timeout: 260 seconds]
<joesavage> Typically it shouldn't go wrong
<jrobeson> like everything else in computers that does
<jrobeson> hah
<jrobeson> anyways.. that's my advice.. and xybre's too
<xybre> Its difficult to rule things out when things are behaving anomlously.. since by definition something isn't as you expected.
<pontiki> isn't that liek famous last words?
<shevy> anyone knows of a library that does: 5 -> five, 123 -> one-hundred-twenty-three
<joesavage> XD "Typically it shouldn't go wrong" would make a great software developers shirt. Yeah, I'll make some cases for if it goes wrong, but specifically right now I'm more interested in how to stop it going wrong
<xybre> shevy: doesn't something in AS do that?
codecop has joined #ruby
leonidlm has quit [Read error: Connection reset by peer]
<xybre> joesavage: well, since we can't see the code and we don't know what it does or why, thats pretty tricky.
<jrobeson> xybre, :)
jefflyne has quit [Ping timeout: 252 seconds]
<jrobeson> pontiki, bon soir
<joesavage> Yeah - I was kind of hoping writing to binary files often was something that commonly screws up. I can show you some code if you have the time to take a look though
<pontiki> ciao, jrobeson
Xeago_ has joined #ruby
<jrobeson> i thought it was more like good evening.. perhaps i misunderstood.. not like i'm leaving
<jrobeson> unless you are :)
<pontiki> ciao can be used for both
fgo has joined #ruby
<shevy> to human?
<shevy> do we have a to cyborg method as well?
<xybre> shevy: but this actually seems to do what you want: https://github.com/kslazarev/numbers_and_words
<shevy> hmm the docu is scary
<shevy> ??????? ?????
<shevy> :D
<shevy> thanks xybre
<joesavage> xybre: Here's the important part: https://gist.github.com/joesavage/f018f0d133b84db740f5 -- teamA and teamB are guaranteed to have 5 values in each, and the seek just deals with writing to the correct place in my custom binary format (which I've used all over the place previously -- it works)
<xybre> joesavage: thing is, other than today, where everone seems to be having binary problems, most people I know don't write binary in ruby by hand
<joesavage> XD
<Hanmac> shevy you are right, it sounds a bit "rasistic" ...
<Hanmac> :P
<xybre> argh my eyes the goggles do nothing
spider-mario has joined #ruby
<shevy> pr0n goggling
<xybre> Tabs, no paragraphs, no methods, no classes, 4 levels of nesting, completely procedural.
<jrobeson> oh.. got it.. pontiki .. i assume you actually took french :)
funburn has quit [Quit: funburn]
<xybre> Thats not even n+1, thats like n*n*n*n
<Hanmac> and imo number_to_human_size is still wrong
<joesavage> The code was actually written with spaces initially, got converted to tabs in the gist somehow, but admittedly it's not the cleanest piece of Ruby.
<shevy> huh
<shevy> what evil magic is it that converts spaces to tabs on pasting
<xybre> shevy +1
<shevy> some mysteries in life can never be solved :)
<xybre> joesavage: I bet if you rewrote it to be idiomatic your problem would be either 1. Solved. 2. Much easier to solve.
relix has joined #ruby
<joesavage> I'm not totally sure on the idiomatic way to write such data -- I'm comfortable with looping through a few things, and so I wrote it in that manor.
fgo has quit [Ping timeout: 240 seconds]
<xybre> I can tell what I'm looking at is likely a small part of a larger piece of code, and its indicative of larger stuctural problems that make it more difficult to maintain and understand.
dbjeepn has joined #ruby
<xybre> And indeed, debug. I'm assumimg there's no tests.
<michael_mbp> banisterfiend: hello
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
<xybre> I'd recommend writing some tests too.
danshultz has joined #ruby
Guest20398 has joined #ruby
dbjeepn has quit [Client Quit]
funburn has joined #ruby
leonidlm has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
SilverKey has quit [Quit: Zzzzzz.]
mansi_ has joined #ruby
Jetchisel has joined #ruby
thebastl has joined #ruby
pellenation has joined #ruby
thebastl has quit [Read error: Connection reset by peer]
leonidlm has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
mansi_ has quit [Ping timeout: 256 seconds]
pellenation has quit [Client Quit]
jlebrech has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
ner0x has quit [Quit: Leaving]
leonidlm has joined #ruby
fgo has quit [Remote host closed the connection]
obs has joined #ruby
sniffingcats has joined #ruby
wildroman has joined #ruby
jibi has joined #ruby
<sniffingcats> hello. I'm doing something like: %x{cat 1 2 > 3} on big files and keep getting "cannot allocate memory", while typing that command in bash shell works fine. Any tip how to do it in Ruby using less memory or why it happens?
popl has quit [Quit: We must make an idol of our fear, and call it God.]
obs has quit [Client Quit]
obs has joined #ruby
<xybre> sniffingcats: don't use cat
obs has quit [Client Quit]
obs has joined #ruby
<sniffingcats> I like cats, cats be my friends :<
<sniffingcats> xybre: Why not?
<xybre> sniffingcats: Well, you'll run out of memory.
<sniffingcats> I don't in shell
dhruvasagar has quit [Ping timeout: 264 seconds]
<xybre> Cool, then use bash.
<sniffingcats> just when executing that shell command from Ruby
<sniffingcats> Umh... but I want to do it from Ruby…
obs has quit [Client Quit]
obs has joined #ruby
<xybre> Then don't use cat?
<sniffingcats> :|
<sniffingcats> Any explanation why?
leonidlm has quit [Ping timeout: 260 seconds]
<xybre> Because cat is an external program being run in a shell, which is opening up at least 1 more external process.
robertjpayne has joined #ruby
<sniffingcats> It doesn't explain why it uses too much memory in that case
<robertjpayne> Is there an easy way to take an array of hashes that all have a key :id and create a hash that is arrays stored by :id?
leehambley has left #ruby ["Linkinus - http://linkinus.com"]
obs has quit [Client Quit]
obs has joined #ruby
<xybre> robertjpayne: example?
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
<robertjpayne> Right now I do something like by_id = {}; values.each { |v| by_id[v[:id]] ||= []; by_id[v[:id]] = v };
<xybre> sniffingcats: Well, you could profile it and find out.
<xybre> robertjpayne: can you give an example of the input and output?
<robertjpayne> xybre: Actually I quoted it a bit wrong, I don't need arrays of ID's I just need an inverse index sorta
<robertjpayne> xybre: Have a array of "user" models and want a dictionary to look them up by id
<jrobeson> group_by ? or is that a railsism ?
<robertjpayne> jrobeson: exactly what I was after thanks!
<robertjpayne> jrobeson: though group_by results in arrays which is good in some cases other cases I just want the value itself
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
<Hanmac> { |v| by_id[v[:id]] ||= []; by_id[v[:id]] = v }; <<<< that part means, that you first set it with [] when nil and then you overwrite it with v ... dont make sense doesnt it?
<robertjpayne> Hanmac: typo'd should have been <<
mityaz has joined #ruby
<robertjpayne> Hanmac: anyways, group_by solves that use case and then i suppose I can just reduce the arrays
mm__ has quit [Read error: Connection reset by peer]
puppeh has joined #ruby
<robertjpayne> A bit reworded I have an array of users which can be thought of as: {id: <user_id>, username: <username>} I want to generate a hash that is like {<user_id>: <user>} so it can be used to easily lookup users in further code
Mars` has quit [Ping timeout: 256 seconds]
mm__ has joined #ruby
codecop has quit [Remote host closed the connection]
<apeiros> robertjpayne: .each_with_object({}) { |user, hash| hash[user[:id]] = user }
<apeiros> in rails/with AS: .index_by { |user| user[:id] }
<robertjpayne> apeiros: :)
<robertjpayne> apeiros: thanks
threesome has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
wildroman has quit [Remote host closed the connection]
leonidlm has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
ner0x has joined #ruby
wildroman has joined #ruby
<Hanmac> i dont like active support or other stuff ... even after so many years they still doesnt get the file size standard currect ...
DonRichie has quit [Ping timeout: 260 seconds]
dzhulk has joined #ruby
fgo has joined #ruby
DonRichie has joined #ruby
jb41 has joined #ruby
leonidlm has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
dzhulk1 has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
wildroman has quit [Remote host closed the connection]
Xeago__ has joined #ruby
Xeago___ has joined #ruby
jbpros has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
Mon_Ouie has joined #ruby
Xeago__ has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 264 seconds]
mengu has joined #ruby
Xeago_ has quit [Ping timeout: 264 seconds]
mercwithamouth has joined #ruby
smlgs has joined #ruby
Xeago has joined #ruby
mansi has joined #ruby
adeponte has quit [Ping timeout: 264 seconds]
mengu has quit [Ping timeout: 245 seconds]
blastDAbLast has joined #ruby
<blastDAbLast> hello
<blastDAbLast> how can i make a constructor to have optional arguments?
codecop has joined #ruby
<blastDAbLast> like i want to do
<blastDAbLast> a = Appclass.new
<blastDAbLast> and
<blastDAbLast> a = Appclass.new(obj)
<MrZYX> just like with any other method, def initialize(obj=default)
mansi has quit [Ping timeout: 245 seconds]
leonidlm has joined #ruby
<blastDAbLast> can that be called using Appclass.new?
<MrZYX> yes
<blastDAbLast> hmm ok lemme try it out :D ty
<blastDAbLast> how do i check for it? obj.nil?
<MrZYX> really depends on your default value
spacebug has joined #ruby
maroloccio has joined #ruby
<blastDAbLast> what im trying to do is just passing a url to the initialize method
<MrZYX> >> class Foo; attr_reader :arg; def initialize(arg="default"); @arg = arg; end; end; [Foo.new.arg, Foo.new("my_arg").arg]
<eval-in> MrZYX => ["default", "my_arg"] (https://eval.in/52957)
<blastDAbLast> but if no args are present a default url is put in
<MrZYX> see my example
<blastDAbLast> ahhh ok thats how you do it
<blastDAbLast> awesome ty very much that did it :D
<MrZYX> you're welcome
<blastDAbLast> didnt know that you couldnt overload methods on ruby
<blastDAbLast> learned something new :S
leonidlm has quit [Read error: Operation timed out]
swordsmanz has joined #ruby
jbpros has quit [Quit: jbpros]
PixelShuck is now known as PelmeniShuck
Deele has joined #ruby
Squarepy has quit [Ping timeout: 240 seconds]
swordsmanz has quit [Read error: Connection reset by peer]
nemesit|znc has quit [Ping timeout: 260 seconds]
swordsmanz has joined #ruby
admin0 has joined #ruby
jlebrech has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
mklappstuhl has joined #ruby
dhruvasagar has joined #ruby
admin0 has quit [Client Quit]
admin0 has joined #ruby
admin0 has quit [Client Quit]
chairabanta has joined #ruby
edwardly has quit [Quit: ZNC - http://znc.in]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
sniffingcats has quit [Quit: Til rivido Idisti!]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
leonidlm has joined #ruby
i_s has joined #ruby
lkba has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
ericmathison has quit [Ping timeout: 246 seconds]
jb41 has quit [Ping timeout: 260 seconds]
|jemc| has quit [Ping timeout: 264 seconds]
i_s has quit [Ping timeout: 240 seconds]
<apeiros> blastDAbLast: you can't overload in ruby. what MrZYX did isn't overloading.
jefflyne has joined #ruby
Lingo has joined #ruby
k610 has joined #ruby
sectionme has joined #ruby
<MrZYX> I think he's aware, "couldnt overload"
<apeiros> oh. misread :)
nemesit|znc has joined #ruby
leonidlm has quit [Ping timeout: 245 seconds]
Lingo has quit [Remote host closed the connection]
<blastDAbLast> yah lol some OO stuff you learned in java/c++, i was kind of surprised you couldn't overload methods/constructors
<blastDAbLast> but i still like ruby none the less :D
mklappstuhl has quit [Remote host closed the connection]
sectionme has quit [Ping timeout: 240 seconds]
schaerli has joined #ruby
ner0x has quit [Quit: Leaving]
mercwithamouth has quit [Ping timeout: 264 seconds]
chairabanta has quit [Quit: Leaving...]
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
mengu has joined #ruby
amacgregor_ has joined #ruby
funburn has quit [Quit: funburn]
danshultz has joined #ruby
mklappstuhl has joined #ruby
obs has quit [Quit: Konversation terminated!]
amacgregor has quit [Ping timeout: 252 seconds]
leonidlm has joined #ruby
danshultz has quit [Ping timeout: 260 seconds]
mklappstuhl has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
mklappstuhl has joined #ruby
adeponte has joined #ruby
obs has joined #ruby
Xeago has quit [Remote host closed the connection]
wildroman has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
hukl has joined #ruby
devoldmx has joined #ruby
mansi_ has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
Beoran_ has quit [Remote host closed the connection]
<Hanmac> shevy lets write our own overload gem ;P
adeponte has quit [Ping timeout: 245 seconds]
pencilcheck has quit [Remote host closed the connection]
JeanMertz has quit []
<lupine> woo, rbx2.0
mansi_ has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
hexadeGZC has joined #ruby
colonolGron has quit [Quit: Lost terminal]
cads has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
PelmeniShuck is now known as pixelshuck
IceyEC has quit [Quit: IceyEC]
chairabanta has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
wildroman has quit [Read error: Connection reset by peer]
wildroman has joined #ruby
danshultz has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
danshultz has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
danshultz has joined #ruby
danshultz has quit [Remote host closed the connection]
nemesit|znc has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
Es0teric has joined #ruby
scarolan has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
osvico has joined #ruby
chairabanta has quit [Quit: Leaving...]
<shevy> Hanmac nah
<shevy> Hanmac I'd rather write my own language, in 100 years!
<shevy> Hanmac but it should be an agnostic language
nkts has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 256 seconds]
leonidlm has quit [Ping timeout: 264 seconds]
atno has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
obs has quit [Quit: Konversation terminated!]
randomnick_ has joined #ruby
akemrir has quit [Quit: WeeChat 0.4.1]
carraroj has quit [Ping timeout: 260 seconds]
mklappstuhl has quit [Remote host closed the connection]
jefflyne has quit [Ping timeout: 245 seconds]
eka has joined #ruby
leonidlm has joined #ruby
gwb3 has quit [Quit: leaving]
gwb3 has joined #ruby
claymore has quit [Quit: Leaving]
rippa has joined #ruby
rippa has quit [Client Quit]
nemesit|znc has joined #ruby
leynos has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
leonidlm has quit [Read error: Operation timed out]
robertjpayne has quit [Remote host closed the connection]
wildroman has quit [Ping timeout: 240 seconds]
wildroman has joined #ruby
wildroman has quit [Remote host closed the connection]
vst0rm has joined #ruby
leynos has quit [Quit: Off to dreams of Laserdiscs and Neo-Geos]
wildroman has joined #ruby
mklappstuhl has joined #ruby
Liothen has quit [Quit: System of a down……]
mansi has joined #ruby
mrnugget has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
roadt__ has quit [Quit: 暂离]
kofno has quit [Ping timeout: 246 seconds]
shvelo has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Remote host closed the connection]
jlebrech has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
leonidlm has joined #ruby
Xeago has joined #ruby
joesavage_ has joined #ruby
joesavage has quit [Ping timeout: 260 seconds]
joesavage_ is now known as joesavage
cauffe has joined #ruby
postmodern has quit [Quit: Leaving]
Xeago has quit [Ping timeout: 260 seconds]
mklappstuhl has joined #ruby
leonidlm has quit [Ping timeout: 264 seconds]
<Freeaqingme> Say I've got a Hash like H = {'F' => 'oo', 'B' => 'ar', 'R' => 'fooba' }. Can I somehow reorder it in a specific manner by specifying a hash that contains the keys of elements that I'd like to put first in that particular order? So: O = ['R', 'F'] will put the elements in the order of R, F, B?
svector has quit [Ping timeout: 252 seconds]
cauffe has quit [Remote host closed the connection]
Mermaid has joined #ruby
sectionme has joined #ruby
senayar has quit [Remote host closed the connection]
r0bgleeson has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
threesome has quit [Ping timeout: 252 seconds]
edwardly has quit [Read error: Operation timed out]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
sectionme has quit [Ping timeout: 260 seconds]
Ox6abe has joined #ruby
edwardly has joined #ruby
<MrZYX> Freeaqingme: ['R', 'F'].each do |key| do_something_with(hash[key]); end ?
edwardly has quit [Changing host]
edwardly has joined #ruby
mrnugget has quit [Quit: mrnugget]
<Freeaqingme> MrZYX, aight, tnx. Figured there might be some predefined function that would do more or less what I wanted
Xeago has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
Lewix has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
hexadeGZC has quit [Read error: Connection reset by peer]
krz has joined #ruby
leonidlm has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
coderhs has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
SHyx0rmZ has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
niklasb has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
rondale_sc has quit [Quit: leaving]
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
hemanth has joined #ruby
Kar- has joined #ruby
fijimunkii has quit [Quit: Lost terminal]
Mermaid has left #ruby [#ruby]
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
Kar- has quit [Remote host closed the connection]
leonidlm has quit [Read error: Operation timed out]
Kar- has joined #ruby
<puppeh> the cruby vm (yarv) translates the source code to bytecode. is that right?
fijimunkii has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
<heftig> puppeh: yes, YARV is a bytecode stack machine
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
<puppeh> supposing it didn't do any JIT, would it translate to bytecode line-by-line?
<heftig> puppeh: er?
wildroman has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
xk_id has joined #ruby
wildroman has joined #ruby
wildroman has quit [Remote host closed the connection]
wildroman has joined #ruby
wildroman has quit [Read error: Connection reset by peer]
wildroman has joined #ruby
<heftig> puppeh: i'm not sure, but i think the ruby language needs infinite lookahead
hoolandi has joined #ruby
bsaboia_ has joined #ruby
<puppeh> heftig: yeah I think so too. do you think it would be possible to do static analysis in ruby code?
<hoolandi> Hello
<heftig> puppeh: no, i don't think so. the environment is too dynamic
xk_id has quit [Client Quit]
niklasb has quit [Read error: Operation timed out]
<puppeh> I see
<heftig> puppeh: you can't know which method is actually called until you're actually at the call site
<heftig> at runtime.
joesavage has quit [Quit: joesavage]
<puppeh> I thought it would be cool to write a ruby code formatter but I guess it'd be hard
adeponte has joined #ruby
<heftig> oh, that's just syntax, should be easier
ravster has joined #ruby
nemesit|znc has quit [Ping timeout: 264 seconds]
<puppeh> heftig: do you find this a useful tool?
xk_id has joined #ruby
hoolandi has left #ruby [#ruby]
mansi has joined #ruby
shredding has joined #ruby
xk_id has quit [Client Quit]
<heftig> puppeh: eh, i don't have any trouble with formatting
funburn has joined #ruby
<puppeh> me neither, individually, I thought about it for teams
Xeago___ has quit [Remote host closed the connection]
adeponte has quit [Ping timeout: 240 seconds]
jbpros has joined #ruby
xk_id has joined #ruby
nouitfvf has joined #ruby
leonidlm has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
funburn has quit [Ping timeout: 246 seconds]
IceDragon has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Clooth has joined #ruby
whowantstolivef3 has joined #ruby
drumsrgr8forn8_ has joined #ruby
xk_id has quit [Quit:
xk_id has joined #ruby
whowantstolivefo has quit [Ping timeout: 246 seconds]
leonidlm has quit [Ping timeout: 264 seconds]
nazty has quit [Quit: Leaving]
choobie has joined #ruby
Sammael has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
nemesit|znc has joined #ruby
Zai00 has quit [Quit: Zai00]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
scmaccal has joined #ruby
scmaccal has quit [Excess Flood]
ferdev has joined #ruby
ferdev has quit [Client Quit]
atmosx has quit [Remote host closed the connection]
gja has joined #ruby
atmosx has joined #ruby
zz_scottstamp is now known as scottstamp
kraljev2 has joined #ruby
dash_ has joined #ruby
<kraljev2> Why does:
<kraljev2> array.each.with_index.drop(1)
<kraljev2> produce no iterations
<kraljev2> [1,2,3].each.with_index.drop(1) { |x, i| p x, i }
<kraljev2> >> [1,2,3].each.with_index.drop(1) { |x, i| p x, i }
<eval-in> kraljev2 => [[2, 1], [3, 2]] (https://eval.in/52967)
<Mon_Ouie> Because Enumerable#drop returns an array
leonidlm has joined #ruby
alexandernst has joined #ruby
<kraljev2> and how to accomplish something like that most elegantly
<kraljev2> each with index, skiping first element
<Mon_Ouie> Since Ruby 2.0, you can use lazy enumerators
<Mon_Ouie> [1,2,3].lazy.each.with_index.drop(1).each { |x, i| }
<alexandernst> Running './myapp' from bash will show a new shell and will start outputting data, but %x(./myapp) will block and it won't show me the new shell. How can I prevent it from blocking and from hidding the shell?
<Mon_Ouie> Actually you can just do lazy.with_index (as #each with a block is a no-op on enumerators)
spider-mario has quit [Ping timeout: 264 seconds]
sniffingcats has joined #ruby
zerun0 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
pskosinski__ has joined #ruby
pskosinski__ is now known as pskosinski
pskosinski has quit [Client Quit]
jbpros has quit [Quit: jbpros]
<sniffingcats> hello! maybe now someone will help. I have problem with "Cannot allocate memory … (Errno::ENOMEM)" while %x{a shell command}. Any tip why?
kreeves has joined #ruby
<banisterfiend> Mon_Ouie 'alut, good to see you. It's been a long time, i heard you'd lost interest in computer programming and began a course of study in feminist philosophy at university
mrsolo has joined #ruby
<sniffingcats> When I run "a shell command" in shell it is using ~150 MB. I have 2600 MB of free RAM and it's too little for Ruby to run that command
<Mon_Ouie> Nah :p I just don't have an internet connection during the week. We're supposed to get it on Tuesday.
mengu has quit [Remote host closed the connection]
xcv has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
<apeiros> sniffingcats: maybe your "a shell command" generates too much output (%x captures the output in a string)
mklappstuhl has quit [Ping timeout: 246 seconds]
T_T has joined #ruby
vst0rm has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
blastDAbLast has quit [Read error: Connection reset by peer]
jefflyne has joined #ruby
nemesit|znc has quit [Ping timeout: 246 seconds]
gja has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby
Elhu has joined #ruby
Xeago has joined #ruby
fridim_ has joined #ruby
senayar has quit [Ping timeout: 245 seconds]
kobain has joined #ruby
<sniffingcats> apeiros: Well, it generates 4 lines… but I used system which is not returning command output and I don't get error anymore. Thank you. :)
hukl has quit [Quit: Leaving...]
T_T has quit [Remote host closed the connection]
relix has joined #ruby
mklappstuhl has joined #ruby
kraljev2 has quit [Read error: Operation timed out]
michael_mbp is now known as zz_michael_mbp
Xeago has quit [Ping timeout: 260 seconds]
ravster has quit [Quit: Leaving.]
puppeh is now known as puppeh_
nemesit|znc has joined #ruby
claymore has joined #ruby
freerobby has quit [Quit: Leaving.]
sepp2k has joined #ruby
xk_id has quit [Quit:
Dwarf has quit [Max SendQ exceeded]
staafl has joined #ruby
Dwarf has joined #ruby
admin0 has joined #ruby
<sniffingcats> Cannot allocate memory - echo 'foo' (Errno::ENOMEM) <= kinda… weird
shredding has quit [Quit: shredding]
admin0 has quit [Client Quit]
NicolasTarzia has quit [Ping timeout: 246 seconds]
petey has joined #ruby
chairabanta has joined #ruby
Clooth has quit [Quit: Leaving...]
ArchBeOS has quit [Quit: Peace Out, jerks!]
xcv has quit [Remote host closed the connection]
NicolasTarzia has joined #ruby
rippa has joined #ruby
wallerdev has joined #ruby
xcv has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
abstrusenick has quit [Quit: abstrusenick]
Sammael has joined #ruby
Elhu has joined #ruby
<kapowaz> I'm trying to make use of a gem I found that I think does exactly what I need (https://github.com/divshot/rack-tumblr) but I can't figure out how to get it wired up correctly. The readme is somewhat terse, so I *think* I'm interpreting it correctly… the `use …` call is for Rack, so that should go in my config.ru, right…?
Zai00 has joined #ruby
<canton7> sounds likely
<kapowaz> all this does is route through to the 404 error page for MyApp (it's Sinatra, fwiw)
<kapowaz> sadly googling for rack-tumblr yields… different results :)
<kapowaz> but if you wanted to look at breasts, you're in luck!
emergion has joined #ruby
admin0 has joined #ruby
<canton7> iirc you can also use 'use' inside modular sinatra apps
xcv has quit [Ping timeout: 246 seconds]
<canton7> but anyway, I'd first try removing the 'map' and its contents altogether? see if it works on its own
alexandernst has left #ruby ["Konversation terminated!"]
<puppeh_> anyone here that uses file-specific settings in their vim? mine doesn't seem to work for some reason even they seem correct
<kapowaz> canton7: if I do that I get RuntimeError: missing run or map statement
<kapowaz> suggesting it needs to be enclosed inside of something else
whowantstolivef2 has joined #ruby
<canton7> aha, fun
<canton7> ueaj
<canton7> *yeah
<canton7> try the 'use' inside the 'map'?
lukec has joined #ruby
<kapowaz> just tried that then… different error this time.
lkba has quit [Ping timeout: 260 seconds]
<kapowaz> wait no, same error.
smashwilson has joined #ruby
nemesit|znc has quit [Ping timeout: 240 seconds]
<canton7> so you've got the 'use' and the 'run' both inside the 'map'
<kapowaz> actually it was just the use, not the run
xcv has joined #ruby
whowantstolivef3 has quit [Ping timeout: 246 seconds]
<canton7> add the run?
<kapowaz> NoMethodError: undefined method `new' for Rack::Tumblr:Module
nemesit|znc has joined #ruby
<canton7> pastie again?
|jemc| has joined #ruby
<canton7> fun
Jake has joined #ruby
drumsrgr8forn8_ has quit [Ping timeout: 240 seconds]
Jake has left #ruby [#ruby]
<canton7> ok, stick the 'use' into your sinatra app? at the top, along with the helpers, registers and configures
lukec has quit [Quit: lukec]
<kapowaz> same error as before, undefined method new
<kapowaz> maybe I should try tracking down the author ^_^
<canton7> there is an example in the repo, by the looks of things
<kapowaz> oh ?
<kapowaz> oh the config.ru
<canton7> yeah
<canton7> that fails with the same error
<kapowaz> you're trying it yourself now ?
sectionme has joined #ruby
arietis has joined #ruby
sectionme has quit [Read error: Operation timed out]
razi has joined #ruby
<canton7> kapowaz, use 'Rack::Tumblr::ReverseProxy, ...' seems to work
Ziarkaen has joined #ruby
<kapowaz> canton7: could you gist what you're using? I'm not having any luck doing that combined with the example config.ru
<kapowaz> if I do that it always falls through to the 404 with ‘Hi there.’
<canton7> then navigated to <host>/blog
vst0rm has joined #ruby
<canton7> oops, not quite
<kapowaz> hmm, nope. That still gives me "Hi there."
xcv has quit [Remote host closed the connection]
<canton7> did you navigate to /blog?
<kapowaz> yes
<kapowaz> that's what gives me the Hi there
xcv has joined #ruby
<kapowaz> I'd expect it to be proxying the whole content of the named tumblr
d3c has joined #ruby
<kapowaz> but no joy
hamakn has joined #ruby
fgo has quit [Remote host closed the connection]
<canton7> then you're doing something else wrong
<canton7> as that's working perfectly for m
<canton7> *me
preyalone has joined #ruby
<preyalone> What's the state of Mavericks support in Ruby?
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
<havenwood> preyalone: ruby 2.0.0p247 is installed by default in Mavericks
<kapowaz> canton7: it's possible, I've changed the first line (the require) to just be require ./application
<havenwood> preyalone: everything working fine on my machine (using ruby-install and chruby)
<kapowaz> but that's because I get a different error with that.
<canton7> kapowaz, 1) clone rack-tumblr. 2) edit config.ru to have the contents I pastied. 3) 'rackup'
<kapowaz> I'll try that
Inside has joined #ruby
zz_michael_mbp is now known as michael_mbp
<preyalone> havenwood: Excellent! I'll probably use rvm, in any case.
notjohn has joined #ruby
<havenwood> preyalone: should work great :)
mklappstuhl has quit [Remote host closed the connection]
<havenwood> preyalone: let #rvm know if you hit any issues, but betcha most kinks worked out by now
xcv has quit [Ping timeout: 256 seconds]
endash has joined #ruby
<kapowaz> canton7: what version of ruby are you running under? I've just done those steps and rackup gives me this stack trace: https://gist.github.com/kapowaz/4043669e550ce0740315
dhruvasagar has joined #ruby
jb41 has joined #ruby
<kapowaz> d'oh, that was without changing the namespace to Rack::Tumblr::ReverseProxy
<kapowaz> it runs now.
taptapdan has joined #ruby
<canton7> that was step 2 ;)
<kapowaz> yeah, done and it works now \o/
<kapowaz> now I have no idea why it doesn't work in my app
<canton7> cool
<kapowaz> something about that first line in the config.ru I guess
<canton7> let's see your latest config.ru?
jibi has quit [Ping timeout: 246 seconds]
obs has joined #ruby
<kapowaz> the one I'm trying to use ?
<kapowaz> (in my app, rather than in rack-tumblr)
<kapowaz> sec.
<canton7> aye
T_T has joined #ruby
mklappstuhl has joined #ruby
<canton7> try this? http://pastie.org/8381856
nathancahill has quit [Quit: nathancahill]
<kapowaz> YES! Excellent!
<canton7> or even this http://pastie.org/8381858
<canton7> cool
lucazi is now known as lucazi_away
Mon_Ouie has quit [Ping timeout: 240 seconds]
<kapowaz> cheers, much appreciated :)
<canton7> <canton7> so you've got the 'use' and the 'run' both inside the 'map', from way back ;)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Elhu has quit [Quit: Computer has gone to sleep.]
preyalone has left #ruby ["Killed buffer"]
banisterfiend has joined #ruby
nathancahill has joined #ruby
wallerdev has quit [Quit: wallerdev]
dallasm has joined #ruby
nathancahill has quit [Client Quit]
mklappstuhl has quit [Remote host closed the connection]
jefflyne has quit [Ping timeout: 264 seconds]
<admin0> hi guys .. does any function exist in ruby to make it possible to do string-matching ? my issue is here: http://pastebin.com/GsP30hJP ..
razi has quit [Ping timeout: 264 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
mklappstuhl has joined #ruby
helloworld has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
drumsrgr8forn8_ has joined #ruby
flagg0204 has joined #ruby
<MrZYX> why 1001 in the fourth case?
<admin0> 10011 will match 1001, because 1001 exists in the list
lkba has joined #ruby
mhodgson has joined #ruby
<admin0> its matching phone numbers to area codes .. if area code is 1001, number 10011 will match 1001 ..
brennanMKE has joined #ruby
arietis has joined #ruby
k610 has joined #ruby
<MrZYX> Hm, I guess I'd end up converting everything to strings, sort the area_codes descending by length, then something like area_codes.find {|code| number.start_with? code }
seoNinjaWarrior has quit [Quit: Textual IRC Client: www.textualapp.com]
seoNinjaWarrior has joined #ruby
seoNinjaWarrior has quit [Max SendQ exceeded]
freerobby has joined #ruby
obs has quit [Quit: Konversation terminated!]
Elhu has joined #ruby
fgo has joined #ruby
shredding has quit [Quit: shredding]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
elaptics`away is now known as elaptics
Elhu has quit [Client Quit]
v1n has joined #ruby
timonv has joined #ruby
drumsrgr8forn8_ has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
bsaboia_ has quit [Ping timeout: 264 seconds]
Amnesia has joined #ruby
dallasm has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 245 seconds]
Zai00 has quit [Quit: Zai00]
mansi_ has joined #ruby
<Amnesia> question for the vim users over here: does one of you know how to get sane ruby autocompletion in vim?
xk_id has joined #ruby
vst0rm has quit [Ping timeout: 256 seconds]
soba_ has joined #ruby
elaptics is now known as elaptics`away
mrsolo has quit [Quit: This computer has gone to sleep]
soba__ has joined #ruby
mansi_ has quit [Ping timeout: 240 seconds]
<Dwarf> I just want to thank you guys for making my life more fun
<banisterfiend> ha someone needs to get out more
<banisterfiend> :P
soba_ has quit [Ping timeout: 240 seconds]
<Dwarf> Lol
skaflem has quit [Quit: This computer has gone to sleep]
<Dwarf> Maybe
<Dwarf> Probably
<Dwarf> Still tho, ruby might one of the better scripting languages I've seen
<Dwarf> Compared to PHP, it's heaven
<plotter> oh thats a given :)
<banisterfiend> Dwarf we prefer the term "dynamic language"
wallerdev has joined #ruby
<banisterfiend> "scripting language" has almost lost its meaning these days
<plotter> i always refer to it as "interpreted" language
<banisterfiend> plotter but that's an implementation detail ;)
<plotter> generally speaking =\
dallasm has joined #ruby
sepp2k has quit [Quit: Leaving.]
eka has quit [Quit: Computer has gone to sleep.]
nathancahill has joined #ruby
nathancahill has quit [Client Quit]
nathancahill has joined #ruby
nathancahill has quit [Client Quit]
threesome has joined #ruby
platzhirsch has joined #ruby
araujo has quit [Read error: Connection reset by peer]
<platzhirsch> Wow, if you ever need to detect languages in Ruby, CLD is pretty fast and very accurate
araujo has joined #ruby
razi has joined #ruby
T_T has quit [Remote host closed the connection]
T_T has joined #ruby
<Dwarf> platzhirsch: care to elaborate?
<platzhirsch> Dwarf: it's based on the Chromium Language Detection
nemesit|znc has quit [Ping timeout: 240 seconds]
<Dwarf> Oh that's pretty fancy
<platzhirsch> I have used whatlanguage, which I found very handy, it's using bloom filter on a basis of language files
Matix has joined #ruby
<platzhirsch> but unfortunately, rather inaccurate for some cases
<Matix> Hello
<Matix> given a string I'm getting the class using Kernel.eval(myclass)
leonidlm has quit [Ping timeout: 252 seconds]
<Matix> it works for many classes but I have one that is called "Resource"
JRizzle has joined #ruby
<Matix> which it's not finding inside a module
<Inside> because there's nothing here
<Matix> Inside, was it for me?
k611 has joined #ruby
<JRizzle> Hi all, does anyone know of any good rails tutorials that include how to create a product listings or something similar with 'Products' ? Any help would be appreciated
k610 has quit [Ping timeout: 240 seconds]
mansi_ has joined #ruby
<Matix> I call this module many times throughout the application, it's when I want to find "Resource" that it doesn't work, the rest is working
<Matix> do you have any clue?
hogeo has joined #ruby
<MrZYX> Matix: have a look at the get_const method
Vivekananda has quit [Read error: Connection reset by peer]
<heftig> JRizzle: the Agile Development with Rails book
T_T has quit [Ping timeout: 245 seconds]
<JRizzle> heftig: Thanks, is it compatible with the newest versions? ruby 2.0 and rails 4 ?
<heftig> yes. if you buy the rails4 version
kraljev2 has joined #ruby
<Matix> neeeeever mind
<Amnesia> does one of you know how to get the same auto completion as: http://youtu.be/zkSCJ2_Gjuk ?
<Matix> I restarted the debugger and now it works
<Amnesia> in vim that is
ehc has joined #ruby
<MrZYX> Matix: also I hope that string you're passing to eval isn't user input
<kraljev2> Any shorter way to write this? https://gist.github.com/strelec/6855670
<Matix> no, it's not
<MrZYX> why does it come as string in the first place then?
threesome has quit [Ping timeout: 252 seconds]
<Matix> long story, it's how a library I'm using works
<MrZYX> kraljev2: the else is basically redundant
<MrZYX> you also might want to look into require_relative and $LOAD_PATH
<Matix> but basicalle you call a method with the name of an association (link). that link has a link.class_name, which is the name (string) of the class the object that should be created. so Kernel.eval(link.class_name).new whatever
rippa has joined #ruby
bl4ckdu5t has joined #ruby
<MrZYX> Matix: I'd still use get_const over eval
<Matix> yeah, that could be a better idea. I'm going to do a pull request
<Inside> hey
matchaw has quit [Remote host closed the connection]
<bl4ckdu5t> Hanmac: I checked for rubymine in my apt repositories and I couldn't find it! How can I get it installed?
Rich_Morin has left #ruby [#ruby]
vst0rm has joined #ruby
<Matix> you meant Kernel.const_get I guess
emergion has quit [Quit: Computer has gone to sleep.]
shredding has quit [Quit: shredding]
<apeiros> Object is the toplevel
<Hanmac> bl4ckdu5t: as gem?
raphaelivan has joined #ruby
<bl4ckdu5t> I just did an "apt-cache search ruby-mine" and "apt-cache search rubymine" but they both returned 0 results
hogeo has quit [Remote host closed the connection]
matchaw has joined #ruby
hogeo has joined #ruby
Vivekananda has joined #ruby
mrsolo has joined #ruby
<kraljev2> how can i force map to skip first element
lukec has joined #ruby
michael_mbp is now known as zz_michael_mbp
mklappstuhl has quit [Remote host closed the connection]
<Morrolan> bl4ckdu5t: Closed source, proprietary, IDE. Get it from the Jetbrains' website.
<apeiros> kraljev2: by not providing the first element to map
<apeiros> e.g. ary[1..-1].map
<Morrolan> kraljev2: ary[1..-1].map { ... }
<kraljev2> but i want to have first element unchanged
Elhu has joined #ruby
<bl4ckdu5t> Morollan: As a .deb file?
mklappstuhl has joined #ruby
<Morrolan> I don't think they package it, no.
matchaw has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 245 seconds]
<Morrolan> It's probably just a compressed tarball.
IceDragon has quit [Ping timeout: 260 seconds]
hemanth has quit [Quit: This computer has gone to sleep]
senayar has joined #ruby
nathancahill has joined #ruby
shredding has joined #ruby
matchaw has joined #ruby
kobain has quit [Ping timeout: 252 seconds]
nathancahill has quit [Client Quit]
senayar has quit [Remote host closed the connection]
kobain has joined #ruby
senayar has joined #ruby
senayar_ has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
brennanMKE has quit [Remote host closed the connection]
dzhulk has joined #ruby
nemesit|znc has joined #ruby
tatsuya_o has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
mac___ has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 264 seconds]
mac___ has joined #ruby
mac___ has quit [Read error: Connection reset by peer]
jb41 has quit [Ping timeout: 260 seconds]
IceDragon has joined #ruby
mac___ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
timonv has joined #ruby
helloworld has joined #ruby
wildroman has quit [Read error: No route to host]
noop has joined #ruby
chairabanta has quit [Quit: Leaving...]
zz_tsykoduk is now known as tsykoduk
kraljev2 has quit [Quit: kraljev2]
noopq has quit [Ping timeout: 264 seconds]
arietis has joined #ruby
fgo has joined #ruby
agjacome has quit [Ping timeout: 245 seconds]
tsykoduk is now known as zz_tsykoduk
ukd1 has joined #ruby
agjacome has joined #ruby
user64 has joined #ruby
arclit has joined #ruby
mac___ has quit [Remote host closed the connection]
* Hanmac hates Jetbrains IDEs ... because i need one that support more than one language ,P
user64 has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 246 seconds]
nemesit|znc has quit [Ping timeout: 252 seconds]
nemesit|znc has joined #ruby
siwica has joined #ruby
Matriks has joined #ruby
zenloop has joined #ruby
emergion has joined #ruby
schaerli has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<zenloop> hey guys, quick question. I want to use the include method on a list but instead of 1 argument I want to use 2. is there a way to dothis? my_list.include?(a) works but not my_list.incude?(a,b) does not.
<zenloop> Is there a way to do that?
mklappstuhl has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
<apeiros> zenloop: no. you have to call it twice.
v1n has quit [Ping timeout: 256 seconds]
<zenloop> apeiros: Ok. Thanks.
aspires has joined #ruby
mklappstuhl has joined #ruby
<yxhuvud> well. (list && [a,b]).empty?
<apeiros> not the same, though
<apeiros> errr, that one is even probably not what you wanted to say :D
<apeiros> & not &&, I guess?
S0da has quit [Read error: Connection reset by peer]
<yxhuvud> forgot a ! in front, yes.
<apeiros> Array#& uses #hash+#eql?, #include? uses #==
<yxhuvud> ah, yes that too
kreeves has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
freerobby has joined #ruby
<yxhuvud> true, but usually it will be close enough, ime.
<apeiros> sure. it may not matter. but then again it might.
<apeiros> just saying it's not the same :)
notjohn has quit [Quit: notjohn]
arietis has quit [Quit: Computer has gone to sleep.]
schaerli has joined #ruby
<Morrolan> Think I'd prefer [a, b].all? { |i| my_ary.include? i } then, though.
<Morrolan> (my_list & [a, b]).empty? looks slightly cryptic.
<apeiros> I think with 2 I'd actually just copy
arclit has quit [Remote host closed the connection]
<Morrolan> Oh, with two, sure.
<apeiros> and with more than 2, Array#& has probably better performance
<apeiros> being O(n+m) rather than O(n*m)
mrsolo has quit [Quit: This computer has gone to sleep]
<Morrolan> I'll think about sacrificing readability for the sake of performance when this turns out to be a bottleneck. ;D
mklappstuhl has quit [Remote host closed the connection]
carraroj has joined #ruby
mklappstuhl has joined #ruby
<zenloop> Morrolan: that did it.
r0bgleeson has joined #ruby
bean has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
ukd1_ has joined #ruby
soba__ has quit [Read error: Connection reset by peer]
julian-delphiki has quit [Ping timeout: 264 seconds]
<heftig> apeiros: hm, can't really tell
<heftig> which one is superior depends on a lot of factors
carraroj has quit [Ping timeout: 252 seconds]
bl4ckdu5t has quit [Ping timeout: 252 seconds]
ukd1 has quit [Ping timeout: 245 seconds]
<heftig> size of the set of needles; size of the haystack; how many of the needles are actually in the haystack
AzizLight has joined #ruby
<AzizLight> hi everybody
tkuchiki has quit [Remote host closed the connection]
<apeiros> heftig: don't think those matter.
timonv has quit [Remote host closed the connection]
IceDragon has quit [Ping timeout: 246 seconds]
<apeiros> algorithmic complexity abstracts that away.
tkuchiki has joined #ruby
timonv has joined #ruby
IceDragon has joined #ruby
<apeiros> what you cite are worst-case/best-case scenarios
NealJ has joined #ruby
<AzizLight> I just created a gem. It has a bin dir with a shell script inside. But I think that the script is being executed by ruby instead of sh when I install the gem and try to use it... is that normal?
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<Morrolan> Proper shebang line?
JeanMertz has joined #ruby
lucazi_away is now known as lucazi
Ox6abe has quit [Remote host closed the connection]
rubyracer has joined #ruby
carraroj has joined #ruby
<AzizLight> Morrolan: yeah. But I just foud a source saying that I can't include shell scripts in rubygems :-(
<Morrolan> Oh?
<Morrolan> Didn't expect that. :)
Ox6abe has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
tkuchiki has quit [Ping timeout: 240 seconds]
Ox6abe_ has joined #ruby
ukd1_ has quit [Remote host closed the connection]
chairabanta has joined #ruby
ukd1 has joined #ruby
Ox6abe has quit [Ping timeout: 240 seconds]
volty has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
pygospa has quit [Disconnected by services]
bl4ckdu5t has joined #ruby
TheRealPygo has joined #ruby
ukd1 has quit [Ping timeout: 256 seconds]
bl4ckdu5t has quit [Max SendQ exceeded]
<Amnesia> is anyone using Vim over here?
sepp2k has joined #ruby
lkba has quit [Read error: Connection reset by peer]
taptapdan has quit [Quit: taptapdan]
dhruvasagar has joined #ruby
krz has quit [Quit: krz]
lkba has joined #ruby
julian-delphiki has joined #ruby
<AzizLight> Amnesia: yeah
<Amnesia> AzizLight: do you have same completion with it ?
bean has quit [Ping timeout: 260 seconds]
<Amnesia> (so something else as omnicompletion)
<AzizLight> Amnesia: yes, I use YouCompleteMe
<AzizLight> it's pretty awesome
<Amnesia> hm, from what I saw, it's a pita to get that installed...
<AzizLight> Amnesia: not if you don't include the CLang stuff, which you don't need with ruby
coderhs has quit [Ping timeout: 245 seconds]
<Amnesia> did you use vundle?
nisstyre has joined #ruby
aspires has quit [Quit: aspires]
nouitfvf has quit []
daaaan has quit [Ping timeout: 264 seconds]
jefflyne has joined #ruby
mikepack has joined #ruby
matchaw has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 256 seconds]
likemike has quit [Ping timeout: 253 seconds]
likemike has joined #ruby
pixelshuck is now known as GamingShuck_TF2
tbrock_ has joined #ruby
matchaw has joined #ruby
<banisterfiend> apeiros ping
<apeiros> beer pong
<banisterfiend> apeiros can i pm you a q?
<apeiros> sure
<banisterfiend> thx
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
Soda has joined #ruby
<shevy> Hanmac, look... this is a distant cousin of the tyrannosaurus... really small isn't it http://en.wikipedia.org/wiki/File:Albertosaurus.png
ravster has joined #ruby
v0n has joined #ruby
S0da has joined #ruby
<havenwood> shevy: prolly just a baby rex, most dinos aren't real but just different stages of development and wrongly classified as own species
Clooth has joined #ruby
fgo has joined #ruby
tatsuya_o has quit [Ping timeout: 240 seconds]
<havenwood> shevy: like birds, skeleton changes over development, tricking folks into thinking different animal
volty has quit [Quit: Konversation terminated!]
ewnd9 has quit [Ping timeout: 260 seconds]
ehc has quit [Quit: ehc]
tomzx_mac has joined #ruby
petey has quit [Remote host closed the connection]
maroloccio has quit [Quit: WeeChat 0.4.0]
petey has joined #ruby
Soda has quit [Ping timeout: 248 seconds]
tbrock_ has quit [Quit: Computer has gone to sleep.]
petey has quit [Read error: Connection reset by peer]
petey has joined #ruby
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby
senayar_ has quit [Remote host closed the connection]
senayar has joined #ruby
<sniffingcats> or maybe just midget rex! we know that people can be 230 and 70 cm tall but we assume that all dinosaurs from one family are almost identical
hakunin_ is now known as hakunin
coderhs has joined #ruby
nemesit|znc has quit [Ping timeout: 245 seconds]
shredding has quit [Quit: shredding]
mary5030 has joined #ruby
carraroj has joined #ruby
schaerli has quit [Ping timeout: 264 seconds]
mklappstuhl has quit [Remote host closed the connection]
nemesit|znc has joined #ruby
adeponte has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
arietis has joined #ruby
raphaelivan has quit [Quit: Leaving.]
carraroj has quit [Ping timeout: 240 seconds]
ukd1 has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
ukd1 has quit [Remote host closed the connection]
workmad3 has joined #ruby
mklappstuhl has joined #ruby
codecop has quit [Remote host closed the connection]
ukd1 has joined #ruby
v0n has quit [Quit: WeeChat 0.4.2-dev]
petey has quit [Remote host closed the connection]
sniffingcats has quit [Quit: Til rivido Idisti!]
ukd1 has quit [Ping timeout: 256 seconds]
petey has joined #ruby
gogunners has joined #ruby
noop has quit [Quit: Leaving]
noop has joined #ruby
<gogunners> anyone around to answer a noob question?
<MrZYX> you'll never find out without asking ;)
Bosox20051 has quit [Remote host closed the connection]
lucazi has quit [Ping timeout: 252 seconds]
<gogunners> ok
<gogunners> well ive got a hash with strings for keys (which is fine) and strings for values. however the values are floats masquerading as strings
devoldmx3 has joined #ruby
<gogunners> and i want them all to me floats
<gogunners> such as "key" => "5.4"
<gogunners> and i want "key" => 5.4
mayorga has joined #ruby
<AzizLight> Amnesia: I do use vundle
shvelo has joined #ruby
<Amnesia> For some reason I'm not getting any automatic completion..
petey has quit [Ping timeout: 256 seconds]
Bish has quit [Excess Flood]
petey has joined #ruby
<MrZYX> gogunners: you want to call to_f on them or pass them through the Float method
devoldmx has quit [Ping timeout: 245 seconds]
<gogunners> right
<Amnesia> AzizLight: ycm_core has been compiled in /home/amnesia/.vim/bundle/YouCompleteMe
<gogunners> and im actually able to do that
<gogunners> sort of
mayorga has quit [Max SendQ exceeded]
<AzizLight> Amnesia: weird..
sayan has joined #ruby
<gogunners> like with an array if i was converting all the elements to floats it would just be arr.map!{|x| x.to_f}
axsuul has joined #ruby
<gogunners> is there not something similar?
mayorga has joined #ruby
<havenwood> gogunners: Hash[your_hash_here.map { |k, v| [k, v.to_f] }]
<gogunners> like myhsh.each_pair!{|k,v| v.to_f}
<gogunners> i thought i tried something like that already havenwood
<gogunners> ill try again. thanks.
<havenwood> gogunners: or use a little gem: require 'hashy'; myhsh.map_value(&:to_i)
<apeiros> shameless self promotion
<apeiros> I like :D
<havenwood> apeiros: hehe
mary5030 has quit [Remote host closed the connection]
<havenwood> apeiros: silly me, didn't realize there was a `hashie` >.>
<gogunners> havenwood. it worked
<gogunners> i dont know what i did before but I could have sworn i tried that
<gogunners> thanks a million man
mercwithamouth has joined #ruby
<havenwood> gogunners: de nada
mary5030 has joined #ruby
<gogunners> havenwood, would you mind explaining the Hash[] syntax there
<gogunners> and how that works when just myhsh.map does not
Xaitec has joined #ruby
Xaitec has quit [Remote host closed the connection]
<Ziarkaen> I need to send an HTTP GET request, but do not care about the response. IS there a more efficient way than open-uri (which is what I'd usually use)
shredding has quit [Quit: shredding]
Bish has joined #ruby
<havenwood> gogunners: for historical reasons (pre 1.9.1) Hash#map returns an Array not a Hash, take a look at: http://www.ruby-doc.org/core-2.0.0/Hash.html#method-c-5B-5D
<havenwood> Ziarkaen: Maybe it isn't a GET that you really want?
<havenwood> Ziarkaen: look at HEAD
zarubin has joined #ruby
<gogunners> thanks hackeron
<gogunners> havenwood*
ryandeussing has joined #ruby
ryandeussing has quit [Remote host closed the connection]
<Ziarkaen> havenwood: Thanks.
devoldmx has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
dsferreira has quit [Quit: Leaving]
araujo has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
araujo has joined #ruby
Guest20398 has quit [Remote host closed the connection]
<havenwood> Ziarkaen: An example with Net:HTTP, but you could do it with Mechanize or other wrappers: http://gistflow.com/posts/861-use-http-head-request
<havenwood> Ziarkaen: Net::HTTP wrappers prolly mostly have it, and I'm guessing Curl wrappers too. Not sure if HTTPClient supports.
GamingShuck_TF2 is now known as PixelShuck
Evixion has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
<havenwood> (^ Nahi's spreadsheet)
workmad3 has quit [Ping timeout: 245 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
yxhuvud has quit [Quit: Leaving]
gmas has joined #ruby
Evixion has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
zerun0 has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
v0n has joined #ruby
zerun0 has joined #ruby
v0n has quit [Client Quit]
kvirani has joined #ruby
baron_underscore has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
<Ziarkaen> havenwood: Thank you. Would most web frameworks honour HEAD requests, without the developer explicitly doing so?
Advocation has joined #ruby
devoldmx has joined #ruby
tvw has joined #ruby
niklasb has quit [Read error: No route to host]
ru has joined #ruby
niklasb has joined #ruby
gcds has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
butblack has joined #ruby
v0n has joined #ruby
ehaliewicz has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
xibalba has left #ruby ["Textual IRC Client: www.textualapp.com"]
mklappstuhl has quit [Remote host closed the connection]
puppeh_ has left #ruby [#ruby]
sayan has quit [Ping timeout: 240 seconds]
Es0teric has joined #ruby
sayan has joined #ruby
sarmiena_ has joined #ruby
v0n has quit [Quit: WeeChat 0.4.1]
v0n has joined #ruby
<havenwood> Ziarkaen: i'd think it should be fine but i'm sure there are exceptions, ymmv
bl4ckdu5t has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
baron_underscore has quit [Quit: Computer has gone to sleep.]
sectionme has joined #ruby
dangerousdave has joined #ruby
colonolGron has joined #ruby
kvirani has quit [Remote host closed the connection]
kvirani has joined #ruby
heidi has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
mklappstuhl has joined #ruby
Ox6abe_ has quit [Remote host closed the connection]
sectionme has quit [Ping timeout: 245 seconds]
Ox6abe has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
kofno has joined #ruby
d3c has quit [Quit: Quit]
Guest54455 is now known as sumark
intuxicated has joined #ruby
heidi has quit [Client Quit]
arietis has joined #ruby
kvirani has quit [Ping timeout: 248 seconds]
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
v0n has quit [Quit: WeeChat 0.4.2-dev]
mansi_ has quit [Ping timeout: 264 seconds]
dzhulk has quit [Quit: Leaving.]
Ox6abe has quit [Ping timeout: 241 seconds]
<shevy> havenwood that was a cool video
<shevy> next time I see a dinosaur, I will ask the guys there where the baby dinosaurs are kept
schaerli has joined #ruby
<shevy> I mean
<shevy> a bone dinosaur in a museum
<banisterfiend> shevy would u take them & keep them
<havenwood> shevy: hehe
v0n has joined #ruby
v0n has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
v0n has joined #ruby
heidi has joined #ruby
obs has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
relix has joined #ruby
mklappstuhl has joined #ruby
vasilakisFiL has joined #ruby
<vasilakisFiL> hey
ryandeussing has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<vasilakisFiL> what is the difference between official logger and log4r ?
Sammael has quit [Ping timeout: 260 seconds]
<vasilakisFiL> or are the same ?
baroquebobcat has joined #ruby
dzhulk has joined #ruby
<havenwood> vasilakisFiL: Logger is in the stdlib (you can just `require 'logger'`) while log4r is a gem.
<havenwood> vasilakisFiL: Not the same thing.
<havenwood> vasilakisFiL: If Logger doesn't meet your logging needs, gem time!
ryandeussing has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 248 seconds]
<vasilakisFiL> actually neither log4r meets my needs.. I would also have my class printed in each message
tatsuya_o has joined #ruby
<vasilakisFiL> but I guess I have to modify it somehow
mklappstuhl has joined #ruby
ryandeussing has joined #ruby
ryandeussing has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
tatsuya_o has quit [Remote host closed the connection]
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
tatsuya_o has joined #ruby
<havenwood> vasilakisFiL: Another gem to maybe look at: https://github.com/TwP/logging#readme
IceDragon has quit [Remote host closed the connection]
<havenwood> vasilakisFiL: Opening up Logger class and adding what you need may be a good way to go. Depends on whatcha need.
<vasilakisFiL> thanks !
mklappst_ has joined #ruby
<vasilakisFiL> another think: about ruby class (instance) variables (the ones with a single @)
dzhulk has quit [Quit: Leaving.]
DonRichie has quit [Quit: Verlassend]
<vasilakisFiL> cause I am coming from C++ and java in which we used to declare them in the top of the class
<ravster> Hey all, how do I ensure that Faraday (HTTP client) follows redirects in urls that I feed it?
gcds has quit [Quit: gcds]
<vasilakisFiL> in ruby there is no a convention like that, right ?
<vasilakisFiL> I mean I have seen ruby codes in which a new @variable is declared only when is needed
apeiros has quit [Remote host closed the connection]
<udoprog> vasilakisFiL: no, but all instance variables are private
<ravster> the only thing I can find is http://mislav.uniqpath.com/2011/07/faraday-advanced-http/, but it only seems to work if you have your url split into a host and a path.
apeiros has joined #ruby
gcds has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tatsuya_o has quit [Ping timeout: 245 seconds]
ugoldw has quit [Ping timeout: 240 seconds]
ugoldw has joined #ruby
maletor has joined #ruby
<udoprog> vasilakisFiL: it's a pretty common convention to lazy define variables in accessor/mutator methods, most often when you are dealing with mixins
Advocation has quit [Quit: Advocation]
conner has joined #ruby
staafl has quit [Ping timeout: 240 seconds]
<ravster> havenwood: will do, thanks
staafl has joined #ruby
eka has joined #ruby
yxhuvud has joined #ruby
threesome has joined #ruby
headius has joined #ruby
Inside has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
jibi has joined #ruby
<vasilakisFiL> could you help me on that? http://pastebin.com/mN0ASLz5
khushildep has joined #ruby
rumours has joined #ruby
hukl has joined #ruby
Elhu has joined #ruby
<havenwood> vasilakisFiL: change line 18 to: @logger = ::Logger.new(STDOUT)
gcds has quit [Quit: gcds]
<vasilakisFiL> did that but no luck
<havenwood> vasilakisFiL: new error?
<vasilakisFiL> I get this NameError: uninitialized constant Celluloid::Logger::DEBUG
<havenwood> vasilakisFiL: With the `::` preceding `Logger`?
<vasilakisFiL> yes
<ravster> I've looked at the followredirect Faraday middleware, butthink I'm missing something obvious. What am I doing incorrectly (Or not at all)? https://gist.github.com/ravster/6857696
siwica has quit [Ping timeout: 260 seconds]
<havenwood> vasilakisFiL: update pastie?
<vasilakisFiL> @logger = ::Logger.new(STDOUT) with that
<vasilakisFiL> just a sec
DrCode has quit [Remote host closed the connection]
popl_ has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
<vasilakisFiL> I suspect celluloid because it uses its own logger
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> vasilakisFiL: Same on line 19. Prefix with ::
<havenwood> vasilakisFiL: That should do the trick.
brian` has quit [Ping timeout: 248 seconds]
popl has quit [Read error: Operation timed out]
aspires has quit [Quit: aspires]
<vasilakisFiL> thanks :D
heidi has quit [Quit: Leaving.]
<havenwood> ravster: try adding right after `FollowRedirects` on line 2: `;c.adapter :net_http`
mklappst_ has quit [Remote host closed the connection]
<vasilakisFiL> yeah works perfectly I should have changed all of them from the begining
<havenwood> ravster: (Mount the adapter)
<havenwood> vasilakisFiL: w00t :)
SilverKey has joined #ruby
SilverKey has quit [Max SendQ exceeded]
aspires has joined #ruby
<vasilakisFiL> havenwood the problem is that ruby compiler is confused with celluloid inclusion, that is, thinks that I mean celluoid's logger?
butblack has joined #ruby
DrCode has joined #ruby
<havenwood> vasilakisFiL: If you don't tell it the class/module is at the top level, it presumes you mean it to be in the currently scoped namespace
timonv has quit [Ping timeout: 264 seconds]
<vasilakisFiL> ok thanks :)
banisterfiend is now known as aryaching_
admin0 has quit [Quit: admin0]
aryaching_ is now known as banisterfiend
<ravster> havenwood: wow, thanks. That solved the problem for me.
<havenwood> ravster: good deal :)
devoldmx has quit [Ping timeout: 268 seconds]
ciziar has joined #ruby
devoldmx has joined #ruby
Sammael has joined #ruby
Davey has joined #ruby
<vasilakisFiL> for documenting my code you suggest rdoc ?
aspires has quit [Quit: aspires]
decoponio has quit [Quit: Leaving...]
Davey has quit [Client Quit]
<havenwood> rdoc is popular, or yard: http://yardoc.org/
dash_ has quit [Quit: dash_]
chrishough has joined #ruby
<Morrolan> YARD. \o/
nemesit|znc has quit [Ping timeout: 248 seconds]
valesk_ has joined #ruby
Valesk has quit [Ping timeout: 260 seconds]
Mars` has joined #ruby
cyberarm has joined #ruby
dzhulk has joined #ruby
nemesit|znc has joined #ruby
zarubin has quit [Ping timeout: 240 seconds]
JeanMertz has quit []
kvirani has joined #ruby
mm__ has quit [Read error: Connection reset by peer]
mm__ has joined #ruby
BizarreCake has quit [Ping timeout: 264 seconds]
ewokchewy has joined #ruby
relix has joined #ruby
kevind has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
fenicks has joined #ruby
tatsuya_o has joined #ruby
kvirani has quit [Remote host closed the connection]
sayan has joined #ruby
mm__ has quit [Ping timeout: 252 seconds]
kvirani has joined #ruby
felipec has left #ruby ["Leaving"]
poisonarms has joined #ruby
mm__ has joined #ruby
<poisonarms> So this HTTP library is no good to me, https://github.com/tarcieri/http -- It's not returning anything when using the Reddit API, but when I use WWW::Mechanize in Perl, I'm getting results -- Anyone got any idea why that might be?
ewokchewy has quit [Remote host closed the connection]
<poisonarms> I've just got: data = HTTP.get("http://reddit.com/r/popping/new.json")
kvirani has quit [Ping timeout: 248 seconds]
Matriks has quit [Read error: Connection reset by peer]
colonolGron has quit [Ping timeout: 245 seconds]
Matriks has joined #ruby
S0da has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mklappstuhl has joined #ruby
carraroj has joined #ruby
mayorga has quit [Ping timeout: 256 seconds]
w3pm has joined #ruby
Macaveli has joined #ruby
colonolGron has joined #ruby
ahawkins has joined #ruby
zarubin has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
arietis has quit [Quit: Computer has gone to sleep.]
marcgg has quit [Ping timeout: 264 seconds]
idoru has joined #ruby
zz_michael_mbp is now known as michael_mbp
Sammael has quit [Ping timeout: 260 seconds]
mayorga has joined #ruby
<shevy> hmmm so when should I use a block, and when lambda... proc {|a| puts a } vs b = lambda {|b| puts b }
<shevy> it seems one gets more flexibility with proc
maletor has joined #ruby
<bnagy> 95% of the time it doesn't matter ime
<bnagy> I use procs
Matip has joined #ruby
<bnagy> just because the word lambda squicks me out
boboc has joined #ruby
<shevy> hehe
<shevy> yeah
arietis has joined #ruby
<shevy> It reminds me of haskell
osvico has quit [Ping timeout: 245 seconds]
gcds has joined #ruby
<shevy> I don't understand how so many people can use haskell, #haskell has 300 people more than we have here :(
mayorga has quit [Max SendQ exceeded]
ping-pong has quit [Ping timeout: 245 seconds]
polaco_zZz is now known as polaco
<bnagy> academia?
<boboc> guys how can i use regex to replace a value with a saved in the parantheses from a regex pattern? for exi would like to apend 0 in front of the last 2 digits from a string: str.gsub(-(/\d{2})$/,0\1)
mayorga has joined #ruby
<|jemc|> I'll start using "lambdas" instead of procs when the ruby parser starts accepting the greek character
<boboc> but this doesn't work in code, only in the editor (text wrangler) using find and replace
<shevy> |jemc| can't you use the -> operator thingy?
michael_mbp is now known as zz_michael_mbp
amacgregor has joined #ruby
<shevy> boboc try "\\1" instead... in .gsub() second argument
<boboc> with 2 back slashes?
<shevy> I think so
<|jemc|> shevy: that's not nearly as fun as the λ
<shevy> perhaps '\\1'
mklappst_ has joined #ruby
<shevy> puts x.gsub(/(.{80})/,"\\1\n")
<boboc> yup, it worked, thanks :)
<shevy> boboc definitely with "\\1"
Matix has quit [Ping timeout: 264 seconds]
<shevy> but it's kinda ugly
<shevy> I'd wish regexes would be as pretty as the rest of the ruby code
<bnagy> >> "foo00".sub(/(\d\d)/,'$\1')
<eval-in> bnagy => "foo$00" (https://eval.in/52988)
<|jemc|> >> λ{5+5}.call
<eval-in> |jemc| => undefined method `λ' for main:Object (NoMethodError) ... (https://eval.in/52989)
<bnagy> it's cause you were using double quotes
mayorga has quit [Max SendQ exceeded]
<shevy> huh that is odd, what character did you just use |jemc| ?
<shevy> λ
mayorga has joined #ruby
<shevy> hmmm
devoldmx3 has joined #ruby
<shevy> >> ->{5/5}.call
<eval-in> shevy => 1 (https://eval.in/52990)
mklappstuhl has quit [Ping timeout: 248 seconds]
osvico has joined #ruby
amacgregor_ has quit [Ping timeout: 252 seconds]
devoldmx has quit [Read error: Connection reset by peer]
<|jemc|> >> def λ &block; Proc.new &block; end; λ{5+5}.call
<eval-in> |jemc| => 10 (https://eval.in/52991)
<|jemc|> yay!
<shevy> a proc that accepts a block
<shevy> that boggles the mind
mayorga has quit [Max SendQ exceeded]
<bnagy> uh
<bnagy> how else would they work?
chrishough_ has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
<havenwood> >> alias λ lambda; λ { true }.call
<eval-in> havenwood => true (https://eval.in/52992)
mayorga has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
<shevy> >> Proc.new {|y| lambda {|x| puts x} }.call 5
<eval-in> shevy => #<Proc:0x416b8fa0@/tmp/execpad-bc6f0736857d/source-bc6f0736857d:2 (lambda)> (https://eval.in/52993)
<|jemc|> havenwood: there we go
<shevy> bnagy no idea hehe
mrsolo has joined #ruby
gcds has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
robustus has quit [Ping timeout: 245 seconds]
carraroj has quit [Changing host]
carraroj has joined #ruby
<bnagy> I just mean that _essentially_ a Proc _is_ a block as a first class variable
chrishough has quit [Ping timeout: 248 seconds]
chrishough_ is now known as chrishough
mac___ has joined #ruby
<|jemc|> now can we petition to get that greek syntax standardized?
<|jemc|> :P
<popl_> the petition is in Greek
yxhuvud has quit [Remote host closed the connection]
<|jemc|> heck, we can throw in some new globals while we're at it
b00stfr3ak has quit [Ping timeout: 264 seconds]
<|jemc|> $Δ returns the result of the most recent subtraction
<bnagy> haha
<havenwood> >.>
<gogunners> havenwood got another question for you
gcds has joined #ruby
popl_ is now known as popl
popl has quit [Changing host]
popl has joined #ruby
robustus has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
<gogunners> im trying to change all values in a hash to a string. i tried myhsh.inject({}){|h,(k,v)| h[k] = newvalue}
mayorga has quit [Max SendQ exceeded]
<gogunners> but i get index error, string not matched.
yxhuvud has joined #ruby
drumsrgr8forn8_ has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
<bnagy> use map
mayorga has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
<bnagy> or just create the new hash and each over the old one, either way
IceDragon has joined #ruby
<bnagy> inject is a good way to make a simple thing hard to read
mklappst_ has quit [Ping timeout: 264 seconds]
<havenwood> gogunners: Hash[myhsh.map { |k, v| [k, v.to_s] }]
gcds has quit [Client Quit]
ciziar has quit [Quit: Computer has gone to sleep.]
colonolGron has quit [Ping timeout: 245 seconds]
headius has quit [Quit: headius]
<havenwood> gogunners: or :p you could: require 'hashy'; myhsh.map_value &:to_s
bl4ckdu5t has quit [Ping timeout: 240 seconds]
<bnagy> wtf is hashy
deens has joined #ruby
<havenwood> gogunners: Or just steal the #map_value: https://github.com/havenwood/hashy/blob/master/lib/hashy.rb
<|jemc|> havenwood's shameless plug for his own gem
drumsrgr8forn8_ has quit [Client Quit]
<|jemc|> :)
kreeves has joined #ruby
vst0rm has left #ruby [#ruby]
deens has quit [Client Quit]
<gogunners> i dont see how the first suggestion changes the key to the new value
<havenwood> bnagy: someone proposed addition of #map_pair, #map_key, and #map_value and Nobu suggested cutting a gem to see if anyone uses it: https://www.ruby-forum.com/topic/4410595
framling has quit [Quit: Lost terminal]
robbyoconnor has joined #ruby
fuhgeddaboudit has joined #ruby
shredding has joined #ruby
<havenwood> bnagy: i forget there was a `hashie` gem already, so that sucks since i wasn't trying to cause confusion just cut a little gem :P
<bnagy> hrmmmm ;)
araujo has quit [Ping timeout: 245 seconds]
framling has joined #ruby
<bnagy> gogunners: which suggestion?
raphaelivan has joined #ruby
snearch has joined #ruby
sarmiena_ has quit [Quit: sarmiena_]
<gogunners> any of them
<gogunners> but his first one in particular
chrishough has quit [Ping timeout: 264 seconds]
raphaelivan has quit [Client Quit]
adeponte has joined #ruby
raphaelivan has joined #ruby
raphaelivan has quit [Client Quit]
<gogunners> i just want to go thru a hash and replace all the values with a value determined elsewhere in the method
<havenwood> >> { aim: true }.map { |k, v| [k, v.to_s] }
<eval-in> havenwood => [[:aim, "true"]] (https://eval.in/52994)
_adeponte has joined #ruby
mrnugget has joined #ruby
<havenwood> >> Hash[[[:aim, "true"]]]
<eval-in> havenwood => {:aim=>"true"} (https://eval.in/52995)
<gogunners> havenwood
<gogunners> i see how that turns true into a string
<havenwood> gogunners: Mapping a Hash returns an Array. Hash[array] makes a Hash again of the Array.
<gogunners> i want to change it entirely
_adeponte has quit [Remote host closed the connection]
<gogunners> from true to "some random string"
ixti has joined #ruby
<bnagy> so instead of v.to_s put call_magic_method
_adeponte has joined #ruby
Ox6abe has joined #ruby
<gogunners> i did and thats where i got my error
<havenwood> gogunners: Does the random string have any relation to the existing value?
<gogunners> no none at all
<gogunners> in fact its a different type entirely
<bnagy> sounds like each_key might be easier if you don't care about the old value
schaerli has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 240 seconds]
<havenwood> gogunners: Does it have any relation to the existing key?
ravster has quit [Quit: Leaving.]
boboc has quit [Remote host closed the connection]
<havenwood> it must :P
<gogunners> sort of. basically i have one long hash
gcds has joined #ruby
schaerli has joined #ruby
<gogunners> and i am pulling 6 pairs at a time out of it
<havenwood> bnagy: like bnagy suggested, each_key may be way to go
<gogunners> and sending each group of 6 to a new method
<gogunners> and that method is supposed to replace all the values in that group
<gogunners> ill try each key. thanks.
<havenwood> err, i meant gogunners: >.>
<bnagy> wait wait replace them where?
<bnagy> cause when you pull out 6 kv pairs you've created a new hash
<gogunners> yes
<gogunners> i know
<bnagy> just make sure your references are doing what you want
<gogunners> and i send that hash to a method
<gogunners> and that method is supposed to change all the values
adeponte has quit [Ping timeout: 248 seconds]
<bnagy> oh and btw you inject is broken cause you don't return h at the end of the block
raphaelivan has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sayan has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
chrishough has joined #ruby
mrnugget has quit [Ping timeout: 264 seconds]
araujo has joined #ruby
atno has quit [Remote host closed the connection]
_adeponte has quit [Ping timeout: 264 seconds]
polaco is now known as polaco_zZz
schaerli has quit [Ping timeout: 268 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mois3x_ has joined #ruby
intuxicated has quit [Quit: Leaving]
volty has joined #ruby
Xeago has joined #ruby
mac___ has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
Lewix has joined #ruby
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
w3pm has quit [Quit: This computer has gone to sleep]
mayorga has quit [Read error: Connection reset by peer]
chairabanta has quit [Quit: Leaving...]
Sammael has joined #ruby
gcds has quit [Read error: Connection reset by peer]
<gogunners> havenwood & bnagy
<gogunners> thanks for all the help guys
<gogunners> sorry if i was being a...nagger
<havenwood> gogunners: np, happy hacking
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sectionme has joined #ruby
<gogunners> i finally got it to work. really appreciate it. later
gogunners has left #ruby [#ruby]
colonolGron has joined #ruby
valesk_ has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 248 seconds]
gcds has joined #ruby
Mars` has quit [Ping timeout: 246 seconds]
headius has joined #ruby
devoldmx has joined #ruby
kevind has quit [Quit: kevind]
axsuul has joined #ruby
Clooth has quit [Quit: Leaving...]
r0bgleeson has quit [Ping timeout: 246 seconds]
sectionme has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx3 has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
workmad3 has joined #ruby
araujo has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
colonolGron has quit [Ping timeout: 268 seconds]
fryguy has left #ruby ["WeeChat 0.4.0"]
robbyoconnor has joined #ruby
Lewix has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
Clooth has joined #ruby
<shevy> time = Time.now + (5 * 24 * 60 * 60)
<shevy> ahhh... wanted to ask something, but noticed that I can run .strftime on that
<shevy> so that is solved
Lewix has joined #ruby
Mars` has joined #ruby
deens has joined #ruby
staafl has quit [Ping timeout: 264 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
sniffingcats has joined #ruby
ahawkins has quit [Quit: leaving]
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
gcds has quit [Quit: gcds]
devoldmx3 has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
deens has quit [Quit: deens]
deens has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
sayan has quit [Ping timeout: 246 seconds]
rubyracer has quit [Read error: Connection reset by peer]
mois3x_ has quit [Quit: Konversation terminated!]
rubyracer has joined #ruby
aep has left #ruby ["WeeChat 0.4.1"]
devoldmx3 has quit [Ping timeout: 268 seconds]
sayan has joined #ruby
arclit has joined #ruby
deens has quit [Remote host closed the connection]
deens has joined #ruby
deens has quit [Client Quit]
deens has joined #ruby
w3pm has joined #ruby
deens has quit [Client Quit]
PixelShuck is now known as GamingShuck_TF2
deens has joined #ruby
chrishough has quit [Ping timeout: 268 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
chrishough has joined #ruby
siwica has joined #ruby
deens has quit [Remote host closed the connection]
arclit has quit [Remote host closed the connection]
deens has joined #ruby
noop has quit [Ping timeout: 240 seconds]
ericmathison has joined #ruby
iliketurtles has joined #ruby
gcds has joined #ruby
Kar- has quit [Quit: leaving]
petey has quit [Remote host closed the connection]
petey has joined #ruby
<chrishough> anyone familiar with guard? I am a noob to using it and I am getting this odd error "guard-2.0.0/lib/guard/commander.rb:113:in `block in within_preserved_state': undefined method `start' for nil:NilClass" with live reload :(
poisonarms has quit [Ping timeout: 252 seconds]
fgo has quit [Remote host closed the connection]
petey has quit [Ping timeout: 256 seconds]
<pontiki> what guards do you have loaded?
ping-pong has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<pontiki> and show your Guardfile
<pontiki> typical course of debugging: remove all guards and start adding them back one at a time
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
noname001 has joined #ruby
havenwood has quit [Ping timeout: 248 seconds]
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
gcds has quit [Quit: gcds]
aryaching has quit [Ping timeout: 240 seconds]
tbrock_ has joined #ruby
jarm has joined #ruby
threesome has quit [Read error: Operation timed out]
elaptics`away is now known as elaptics
polaco_zZz is now known as polaco
gcds has joined #ruby
cads has joined #ruby
leynos has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
noname001 has quit [Ping timeout: 240 seconds]
<shevy> the RUBY OS ...
<|jemc|> eh?
jarm has quit [Ping timeout: 264 seconds]
<shevy> we need it!
havenwood has joined #ruby
tvw has quit []
iliketurtles has quit [Quit: zzzzz…..]
tbrock_ has quit [Quit: Computer has gone to sleep.]
petey has joined #ruby
petey has quit [Remote host closed the connection]
Beoran has joined #ruby
<shevy> or
<shevy> or I will just wait for Haiku ...
petey has joined #ruby
khushildep has quit [Quit: khushildep]
<|jemc|> what about Haiku do you find attractive? (I hadn't heard of it before now)
Apocalypse has quit [Ping timeout: 245 seconds]
ahawkins has joined #ruby
shredding has quit [Quit: shredding]
<shevy> hmmmm
<|jemc|> I don't see the advantage of it over a tweaked linux-based distro installation
<shevy> I am wondering about that too in a way
<shevy> but I don't like linux
<shevy> kinda odd :\
petey has quit [Ping timeout: 245 seconds]
pyx has joined #ruby
<shevy> I am compiling kernel 3.11.4 right now...
<shevy> the first time I saw haiku perhaps 5 years ago
<pontiki> write your own
havenwood has quit [Remote host closed the connection]
<shevy> |jemc| it feels a bit different, as if everything is one integrated part
colonolGron has joined #ruby
knigitz has quit []
havenwood has joined #ruby
deens has quit [Read error: Connection reset by peer]
<shevy> though you are probably right... linux + kde seems to be like +10 years ahead
GamingShuck_TF2 is now known as PixelShuck
<|jemc|> I use xfce and not kde or gnome
<|jemc|> but if you're into trying alternative oses
<|jemc|> maybe http://elementaryos.org/ would be interesting to you
<shevy> I am running xfce right now too, I am just wondering about feature / functionality comparisons
<shevy> like windows vs. linux vs. xyz...
<|jemc|> a friend pointed it out to me but I hadn't been interested enough to download it
volty_ has joined #ruby
nisstyre has quit [Remote host closed the connection]
volty has quit [Ping timeout: 246 seconds]
nathancahill has joined #ruby
volty_ has quit [Client Quit]
jarm has joined #ruby
<|jemc|> wait maybe it's an ubuntu derivative
<|jemc|> can't immediately tell
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<chrishough> anyone run into this guard-livereload issue? https://github.com/guard/guard-livereload/issues/85
<pontiki> i don't run livereload
colonolGron has quit [Ping timeout: 240 seconds]
<|jemc|> but I'd be hesitant myself to jump into haiku when the linux kernel is so much more ubiquitous. I have to deal with enough compatibility issues as it is dealing with companies who insist on windows-only software. I wouldn't want to migrate to something even more obscure.
havenwood has quit [Ping timeout: 268 seconds]
PixelShuck is now known as GamingShuck_BF2
<|jemc|> but it's cool that they're doing it, at the very least
mrnugget has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
mrsolo has joined #ruby
<|jemc|> but yeah, upon closer inspection it looks like luna/elementary os is an ubuntu derivative marketed toward apple users
<shevy> |jemc| yeah... they said on #haiku just now that it is not very stable.. as in I might experience crashes after a while
<chrishough> I am about to give up on it pontiki
<shevy> (well ~8 minutes ago)
mrsolo has quit [Client Quit]
hasrb has joined #ruby
sniffingcats has quit [Quit: Til rivido Idisti!]
sayan has joined #ruby
vkr has joined #ruby
<|jemc|> yeah, and it looks like most linux apps you'd want to run would have to be ported
vkr has left #ruby ["Išeinu"]
<shevy> :(
<shevy> I cant live without ruby anymore
<|jemc|> which sounds like a pain the moment you reach a package the haiku devs hadn't gotten to yet
ahawkins has quit [Quit: leaving]
<shevy> or, I would have to switch to another language, but I would not know which
<shevy> yeah
<xybre> If you don't like the linux distro you've used you can just make your own.
mrnugget has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby
jibi has quit [Quit: .]
<xybre> You can replace literally every binary on the system with your own preference. And of course there's alwaus Free/OpenBSD if you don't want to start from scratch and like the BSD userspace tools.
snearch has quit [Quit: Verlassend]
Al___ has joined #ruby
<shevy> well that is what I was wondering
<shevy> about the BSDs
Nss has quit [Ping timeout: 240 seconds]
<shevy> I am not really able to determine if they are better or worse than linux
<xybre> And then there's the Solaris-based distros like OpenIndiana and SmartOS
iliketurtles has joined #ruby
staafl has joined #ruby
<xybre> What do you think "linux" is?
vikhyat has joined #ruby
mityaz has quit [Quit: See ya!]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
banisterfiend has quit [Quit: Computer has gone to sleep.]
nathancahill has quit [Quit: nathancahill]
pyx has quit [Quit: WeeChat 0.4.1]
Al___ has quit [Quit: Al___]
banisterfiend has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
<shevy> the linux kernel, a shell, xorg server and associated apps, glibc and gcc and a WM or DE, and some more applications loosely following an outdated UNIX tradition model
<shevy> I think the "everything is a file" and unix pipes are the best parts
maletor has joined #ruby
<shevy> xorg server model absolutely sucks
<popl> shevy: water is wet
beilabs has quit [Ping timeout: 252 seconds]
k611 has quit [Quit: Leaving]
<shevy> popl depends on the temperature
<pontiki> well said, shevy
<Xeago> shevy: on my linux box I run just urxvt and luakit
<popl> shevy: so by analogy the xorg model doesn't always suck?
<shevy> well water is really strange... have you seen those "water bridges"? I mean not the small ones one can not see with the eye, but the large ones
jarm has quit [Ping timeout: 245 seconds]
<popl> I'm not sure I know what you're talking about.
<pontiki> yes, sometimes it actually works
<shevy> pontiki I show you what water can do
mary5030 has quit [Remote host closed the connection]
<shevy> that is really cool
<shevy> now show me something cool as this for xorg!
<pontiki> it doesn't have to be cool to work
mary5030 has joined #ruby
beilabs has joined #ruby
<shevy> actually... I lied... water can only do this when there is an electric current :\
<xybre> Linux is just the kernel. Everything else is optional and while they often use the GNU userspace utils, they don't always and there are alternatives. If you don't need a GUI you don't need X, and they are *right now* building replacements for X because everyone knows it sucks. There's no real alternatives though, SkyOS went away, Haiku isn't done cooking and probably never will be, you could use ReactOS but
<xybre> then why not just use Windows, and pretty much everything else is embedded or uses X anyway.
zarubin has quit [Read error: Operation timed out]
<|jemc|> Xeago: haven't seen luakit yet- looks like something I could get behind
<shevy> but it's still cool
<|jemc|> Xeago: downloading now, in fact
<popl> oh right, I have seen that.
<popl> shevy: it's pretty neat.
<shevy> xybre I need a GUI! I love GUIs... I think there should not be a separation between GUIs and the commandline... in an ideal OS
<xybre> shevy: then use Windows NT?
Fuzai has quit [Quit: No Ping reply in 180 seconds.]
<shevy> nah, ruby works better on linux
Fuzai has joined #ruby
Soda has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<shevy> xybre I think Haiku and ReactOS will never really manage to catch up :(
gcds has quit [Quit: gcds]
DrShoggoth has joined #ruby
Mars` has quit [Remote host closed the connection]
petey has joined #ruby
<xybre> I'd love to see a better OS, but it seems that most projects are poorly managed or maintained.
Mars` has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
deens has joined #ruby
<xybre> It doesn't seem like there's enough people willing to risk it anymore in the Open Source Community, it would need real funding and solid backing. But then it'd have a profit motive, so it'd be challenging to keep it doing the right thing.
mac___ has joined #ruby
Clooth has quit [Quit: Leaving...]
<shevy> yeah
<shevy> noone has time anymore, other things are more important
<shevy> well
<shevy> like there is a lack of enthusiasm as well
<xybre> There's plenty of dev happening for the Linux kernel and all the assorted userland tools, but people don't want to risk working on a dead end project.
<shevy> linus did not have financial backing initially
<|jemc|> I think it's just hard to justify the effort expended when "linux" is so customizable
sectionme has joined #ruby
<shevy> math neither had financial backing
apeiros has quit [Remote host closed the connection]
<xybre> No, but there also wasn't much competition.
<shevy> sorry
<shevy> *matz
<shevy> my brain is telling me to go to bed slowly...
<xybre> Yeah but we're not talking programming languages, many of them did not have financial backing, but thats not the same as an OS.
Mars` has quit [Ping timeout: 245 seconds]
<xybre> Well, usually its not. I actually found out recently that that the REBOL v3 language was originally being built for Blackberry as their OS, but they bailed and used QNX instead.. and you can see how well that worked out for them.
mercwithamouth has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
<xybre> And of course Java is both an OS and a language that just happens to run on the JVM virtual hardware, but it was intended to be physical hardware and there were even a couple of Java processors developed, but they never went mainstream.
JRizzle has quit [Quit: Leaving]
<xybre> But both of those had financial backing, of course.
<shevy> yeah, a kernel is more work than a programming language
siwica has quit [Ping timeout: 264 seconds]
<xybre> Well, its funny, because a functional OS isn't *that* hard, but you have to do everything yourself.
sectionme has quit [Ping timeout: 245 seconds]
<shevy> :(
<|jemc|> y
<xybre> For instance http://www.menuetos.net
<|jemc|> ignore that 'y', was supposed to go in my other terminal :P
deens has quit [Ping timeout: 248 seconds]
<pontiki> while it isn't necessarily "hard" to make one, it's enormously hard to get anyone interested in using it
<shevy> so basically my take-home messages for today is... without money it'll fail :(
<|jemc|> it's hard enough getting people to use linux and write compatible programs for it
vikhyat has quit [Ping timeout: 240 seconds]
<xybre> pontiki: Absolutely, and that kills OSS
v0n has quit [Ping timeout: 264 seconds]
<pontiki> i don't think it kills OSS
<pontiki> it easily kills any particular piece of software
<pontiki> but it's kind of like music
<pontiki> lots and lots of bands
<pontiki> way more than ever get a hit
<xybre> pontiki: I mean it kills an OSS project
<pontiki> way way more than ever get popular
mengu has joined #ruby
<pontiki> but then it is also a lot about networking; the people kind
<pontiki> and tech folk are famously bad at that
<xybre> Syllable is probably the most successful non-linux non-bsd OSS OS out there.
<xybre> But thats because of the Amiga legacy.
i_s has joined #ruby
chrishough has quit [Quit: chrishough]
havenwood has joined #ruby
alx- has joined #ruby
Reach has joined #ruby
claymore has quit [Quit: Leaving]
alx- has quit [Client Quit]
kvirani has joined #ruby
<Reach> how do i change programming modes on emacs, particularly ruby-mode
conner has quit [Ping timeout: 264 seconds]
alx- has joined #ruby
<pontiki> Reach: change how?
<Reach> well how do i use ruby-mode on emacs?
<xybre> Oh, and apparently last month SkyOS released their final Beta image publicly.
<pontiki> Reach: you're asking extremely elementary questions. perhaps read the info files about file modes and such
wallerdev has quit [Quit: wallerdev]
<Morrolan> emacs' tutorial (to which there's a link in the default starting buffer) is quite nice, and relatively short.
chrishough has joined #ruby
obs has quit [Quit: Konversation terminated!]
Matriks has quit [Remote host closed the connection]
<Morrolan> You can work through it in one hour top.
Xeago has quit [Remote host closed the connection]
wallerdev has joined #ruby
vikhyat has joined #ruby
dallasm has quit [Read error: Connection reset by peer]
emergion has joined #ruby
vikhyat has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
iliketurtles has joined #ruby
blackratdog has joined #ruby
postmodern has joined #ruby
VTLob has quit [Quit: VTLob]
funburn has joined #ruby
funburn has quit [Client Quit]
zz_michael_mbp is now known as michael_mbp
Reach has quit [Remote host closed the connection]
siwica has joined #ruby
cyberarm has quit [Ping timeout: 256 seconds]
gyzmodo has quit []
hasrb has quit [Remote host closed the connection]
w3pm has quit [Quit: This computer has gone to sleep]
raphaelivan has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
mrnugget has joined #ruby
smlgsx has joined #ruby
fgh2 is now known as fgh
Mars` has joined #ruby
fijimunkii has quit [Ping timeout: 240 seconds]
<|jemc|> Xeago: thanks for mentioning luakit; it's a keeper for me
ericmathison has quit [Ping timeout: 246 seconds]
brennanMKE has joined #ruby
mrnugget has quit [Ping timeout: 264 seconds]
raphaelivan has joined #ruby
conner has joined #ruby
shvelo has quit [Ping timeout: 240 seconds]
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
bg_ has joined #ruby
Apocalypse has joined #ruby
ferdev has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
dangerousdave has quit [Quit: Leaving...]
cads has quit [Ping timeout: 264 seconds]
gmdeux has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
Inside has quit [Ping timeout: 245 seconds]
w3pm has joined #ruby
Squarepy has quit [Remote host closed the connection]
raphaelivan has quit [Quit: Leaving.]
ewnd9 has joined #ruby
leynos has quit [Quit: Off to dreams of Laserdiscs and Neo-Geos]
hukl has quit [Quit: Leaving...]
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
v0n has joined #ruby
elaptics is now known as elaptics`away
alx- has quit [Quit: Linkinus - http://linkinus.com]
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
sepp2k1 has joined #ruby
jrobeson has quit [Read error: Connection reset by peer]
kofno has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 256 seconds]
<nhmood> When I pass a variable to a function/method, does it not create a local instance in Ruby (like in C/C++)?
aapzak has quit [Read error: Operation timed out]
<nhmood> I'm seeing that when I pass a local variable to a method (within the same class) if I try to access the variable after it is modified by the method?
<|jemc|> nhmood: yes, you can think of it somewhat like it is passing by value instead of by reference
<|jemc|> or rather
<|jemc|> the reverse of that
<|jemc|> but often, your method should not be "mutating" the input object unless that is the desired effect
jrobeson has joined #ruby
<|jemc|> the notions of passing by value or reference aren't the same in ruby as in c/c++
aapzak has joined #ruby
<davidcelis> #dup dat shit
<|jemc|> but when you pass an object to a method, you are passing the actual object
<|jemc|> rather than duplicating it, which as davidcelis ntoed can be done with my_object.dup
ewnd9 has quit [Ping timeout: 245 seconds]
xkickflip has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
<nhmood> Interesting, I wonder what the reasoning behind by reference was for methods
kofno has quit [Ping timeout: 264 seconds]
<|jemc|> but there are often other ways to acheive what you want
<nhmood> As most languages I have dealt with by default take it by value as opposed to reference
<|jemc|> the design patterns intended are just _different_
<|jemc|> like I said, 'by value' and 'by reference' don't have meaning in the same way they do in c
<nhmood> I see
xkickflip has joined #ruby
<nhmood> Do you have a recommended reference/article/write up for this topic?
<|jemc|> in the ruby/python style of languages, we talk more about 'mutable' vs 'immutable'
<nhmood> Yes, I see that a lot reading articles about Ruby/Python
<nhmood> I come from a C/C++ bg so I'm fairly new to this style language I guess
<|jemc|> yeah, it's a big shift
funburn has joined #ruby
<nhmood> Another related question: If I take the input argument and assign it to a new variable, does that act as a reference?
<|jemc|> yeah
<nhmood> e.g. def mymethod(arg)
<nhmood> _myarg = arg
<nhmood> If I modify _myarg, I'm guessing it will affect arg?
<|jemc|> yes
<nhmood> As it is a reference and not a dup
<nhmood> I see
<nhmood> .dup() is universal to all objects?
<nhmood> #dup*
staafl has quit [Ping timeout: 248 seconds]
<|jemc|> it is defined in Object, so it works for all objects that inherit from it
<|jemc|> although it might not always do what you want, in which case you can redefine it
flipture has quit [Ping timeout: 246 seconds]
<nhmood> I see
<|jemc|> as a side note, yes, all objects inherit from Object by default
<nhmood> That is a pretty big detail I seem to have missed :P
<nhmood> I need to go back over all the code I've written so far and address this lol
<|jemc|> but you can explicitly specify BasicObject, for example, and not get all of Object's methods
<|jemc|> also, I'd recommend reading about Enumerable
<|jemc|> if you're dealing with an enumerable collection of objects, it defines a bunch of useful methods for doing so
<nhmood> With respect to this scoping issue or in general (with respect to the "Ruby way")
<nhmood> I've briefly looked at Enumerable
<|jemc|> eh, because it sort of applies to this discussion
<|jemc|> but not quite directly
tatsuya_o has joined #ruby
mlpinit has joined #ruby
<|jemc|> for example, '#map' vs '#map!'
<nhmood> In place vs return mapped?
<|jemc|> the latter modfies the receiver object and the former does not
<|jemc|> yes
<nhmood> Yeah, I've seen that notation with things like slice! or gsub!
<nhmood> Which I guess are also Enumerable methods?
nwertman_ has quit [Ping timeout: 240 seconds]
<nhmood> Well, gsub is for String and slice for Array
<|jemc|> slice is also for String as well
kvirani has quit [Remote host closed the connection]
<|jemc|> but yeah, I bring that up because I don't often find myself explicitly 'dup'ing objects just to avoid modifying them
kvirani has joined #ruby
<nhmood> Yeah there is probably a better way of doing what I am doing to avoid duping
<|jemc|> rather it's more ruby-ish to chain together methods that return objects that are related to the input but did not modify the input
Apocalypse has quit [Ping timeout: 245 seconds]
<nhmood> I see
<nhmood> Yeah I am not very well versed in the "Ruby" way of doing things
<|jemc|> especially with Arrays and other collections
amacgregor_ has joined #ruby
<nhmood> I feel like a lot of my code right now is still in the non-Ruby mindset
<nhmood> Do you know of any good resources for helping me see the "Ruby" way haha
siwica has quit [Ping timeout: 240 seconds]
<nhmood> It'd be great if there was a resource that just had examples of "Traditional way --> Ruby way"
<|jemc|> I have a friend who swears by this book: http://designpatternsinruby.com/
amacgregor has quit [Ping timeout: 246 seconds]
<|jemc|> I'm not as much of a book guy, but I had an easier learning curve coming from python
volty has joined #ruby
<nhmood> Yeah I can never find a book that is the right pace for me, but I will take a look at that, thanks
kvirani has quit [Ping timeout: 248 seconds]
polaco is now known as polaco_zZz
<|jemc|> other than that I'd say just try to take some time and go over your code optimizing for 'elegance' and 'DRYness'
<nhmood> Yeah I think that is a good approach
siwica has joined #ruby
<nhmood> I'm currently "learning" Ruby by porting a project I wrote in Perl
<|jemc|> yeah, I learned by porting a python project
<nhmood> Once I get the functionality down, my next step is to go through it again and see where I can slim down or do things neater
<nhmood> Do you primarily code in Ruby now?
<|jemc|> yeah
tatsuya_o has quit [Ping timeout: 268 seconds]
ce_afk is now known as cescalante
<nhmood> It is a pretty magical language, coming from C/C++/Bash/Perl lol
<|jemc|> with your c/c++ experience you can have some fun writing c extensions
<nhmood> Any reason you prefer Ruby over Python?
<|jemc|> the ruby c "environment" they've constructed with their macros and such almost makes c feel like a dynamic language
<|jemc|> um
<|jemc|> I like the flexibility above python's rigidity
agent_white has joined #ruby
<|jemc|> python is quite prescriptive compared to ruby
<nhmood> Whitespaces shouldn't be important :(
v0n has quit [Ping timeout: 240 seconds]
<|jemc|> ruby's conventions are mostly socially enforced rather than enforced by the language
<|jemc|> so you can whip up some interesting DSLs and other bastardizations
<|jemc|> and metaprogramming
<|jemc|> python strongly discourages metaprogramming
<|jemc|> and in ruby the worst that happens is that you make some people cringe at you
petey has quit [Remote host closed the connection]
<|jemc|> and ruby's blocks are also a unique feature that python doesn't have that really drew me in
pigggie has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
rubyracer has quit [Quit: Konversation terminated!]
MrZYX is now known as MrZYX|off
<pigggie> Is there a "class that mixes in another class"? As in, how would I refer to a class that mixes in a certain mixin?
<pigggie> *is there a name for a
fijimunkii has joined #ruby
<|jemc|> pigggie: only a module can be mixed in
<|jemc|> so no class can mix in another class
<|jemc|> only inherit
<pigggie> Sorry, that's what I meant :P
<pigggie> Mixes in a certain module
<|jemc|> other than that bit, I don't know if there's a term for it
<|jemc|> you could say it 'implements
<pigggie> Hmm, maybe "inheriting class"?
<|jemc|> but that is not quite accurate
cescalante is now known as ce_afk
<|jemc|> what I said, not what you said
<|jemc|> because it doesn't _really_ implement the mixin
<pigggie> So do you think inheriting class might do? I'm just trying to refer to it in an obvious way in a test
<nhmood> jemc : I haven't looked much into metaprogramming but I will check that out
<volty> what should be 'implement'?
<nhmood> and the blocks in Ruby are really interesting
predator217 has joined #ruby
<pigggie> Also, just out of curiosity, when would you say "implement" is appropriate?
jarm has joined #ruby
<|jemc|> it's appropriate when:
<|jemc|> you want to duck type an object
<|jemc|> and you might have a defined 'interface' of methods that that duck type responds to
<volty> you should find another term for that
<|jemc|> if you make a new object that has those methods you could say it implements that interface
<volty> implement is just what the dict says: apply in a manner consistent with its purpose or design; "implement a procedure"
predator117 has quit [Ping timeout: 264 seconds]
GamingShuck_BF2 is now known as SleepingShuck
Naeblis has joined #ruby
<pigggie> Could a mixin not accomplish that?
ixti has quit [Ping timeout: 246 seconds]
<volty> if you write it that way :)
<|jemc|> volty: so you're saying it shouldn't be called 'implementing' unless it is implementing a prescribed algorithm/procedure?
<volty> no no, my answer to pigggie was a funny one: about his own implementation
<|jemc|> rather than an unknown algorithm/procedure that takes the same input and produces the expected result?
<|jemc|> ah
kvirani has joined #ruby
roflmaus has joined #ruby
<volty> generically speaking the mixins in ruby are implemented : as the lang allows and handles them
<|jemc|> nhmood: blocks get even more interesting when you start executing them in a different binding than the one in which they were defined
<waxjar> can someone explain why this behaves as it does: https://gist.github.com/britishtea/6860506
jarm has quit [Ping timeout: 246 seconds]
iliketurtles has quit [Quit: zzzzz…..]
<banisterfiend> waxjar cos the method is only defined after you run x
<volty> waxjar: what, precisally ?
<waxjar> aaah
<waxjar> that makes sense, thx banisterfiend
<banisterfiend> waxjar np fellow leidenite
<roflmaus> Hi. I've read about the object model in Ruby that a class is just an object of class "Class" (which is a subclass of object of class "Object"), and an instance of a class is actually a subclass of "Class". So i wonder: is it possible to subclass directly from an arbitrary object?
<|jemc|> banisterfiend: I pushed my first gem that (ab)uses the Ruby 2.1 def return value to act as a decorator
bg_ has quit [Remote host closed the connection]
<banisterfiend> |jemc| cool, what does it do
AndChat| has joined #ruby
<banisterfiend> roflmaus no, just because classes are objects doesn't mean that all objects are classes
<|jemc|> it existed already, but I made it work now with either a symbol passed later or the def itself
<|jemc|> it just wraps the instance method you use it on in a re-entrant lock
<|jemc|> def foo; end; def bar; end; threadlock :foo, :bar
<|jemc|> or, now, in 2.1:
<|jemc|> threadlock def foo; end; threadlock def bar; end
<|jemc|> or even the unspeakable:
<|jemc|> threadlock def foo; end, def bar; end
Banistergalaxy has quit [Ping timeout: 260 seconds]
<|jemc|> and you can specify a custom lock name with a kwarg
endash has quit [Quit: endash]
<roflmaus> banisterfiend, thx
vlad_starkov has joined #ruby
vasilakisFiL has left #ruby ["Konversation terminated!"]
burlyscudd has joined #ruby
xk_id has quit [Quit:
<banisterfiend> roflmaus though a few years ago i wrote a library that turned any object into a module
<banisterfiend> but it doesn't turn the object itself into a module, just its eigenclass
deweichen has joined #ruby
deweichen has quit [Client Quit]
havenwood has quit [Read error: Connection reset by peer]
havenn has joined #ruby
ehc has joined #ruby
deweichen has joined #ruby
Ox6abe has quit [Remote host closed the connection]
notjohn has joined #ruby
deweichen is now known as gazzik
endash has joined #ruby
Ox6abe has joined #ruby
chrishough has quit [Quit: chrishough]
kirun has quit [Quit: Client exiting]
sectionme has joined #ruby
jarm has joined #ruby
kvirani has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
kvirani has joined #ruby
Ox6abe has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
kvirani_ has joined #ruby
kvirani has quit [Read error: Connection reset by peer]
sectionme has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
i_s has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
i_s has joined #ruby
Ziarkaen has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]