apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
apeiros_ has quit [Remote host closed the connection]
intellitech has quit [Quit: intellitech]
mantono has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 256 seconds]
<r0bglees0n> whitequark: nice work man. thank you.
wmoxam has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
Spaceghost|cloud has joined #ruby-lang
retro|cz has joined #ruby-lang
idkazuma has joined #ruby-lang
hakunin has quit [Ping timeout: 256 seconds]
hakunin has joined #ruby-lang
hahuang65 has joined #ruby-lang
idkazuma has quit [Ping timeout: 258 seconds]
stonerfish has joined #ruby-lang
soknee has joined #ruby-lang
<abstr4ct> any idea how to get html output with my row joins as content in the middle as apposed to before hand.
io_syl_ has joined #ruby-lang
io_syl has quit [Read error: Operation timed out]
io_syl_ is now known as io_syl
<abstr4ct> the idea is to have the ruby script generate the html... but it seems to be doing my content, then the html. not good.
randym has joined #ruby-lang
lsegal has joined #ruby-lang
Aiur has joined #ruby-lang
jgoss has joined #ruby-lang
jgoss has quit [Changing host]
jgoss has joined #ruby-lang
ritek has joined #ruby-lang
apeiros_ has joined #ruby-lang
S1kx has quit [Quit: Leaving]
apeiros_ has quit [Ping timeout: 246 seconds]
piisalie has joined #ruby-lang
wmoxam has quit [Ping timeout: 246 seconds]
<rking> yorickpeterse: (pong)
wmoxam has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
grandy has joined #ruby-lang
fosky has quit [Remote host closed the connection]
fosky has joined #ruby-lang
thufir_ has joined #ruby-lang
<TheNotary> abstr4ct: I'm not too familiar with ruby's CGI stuff, but I'm curious what leads you to using ruby outside of a framework like camp/ sinatra/ rails/ etc and all that lovely ActiveRecord stuff?
chimkan has joined #ruby-lang
wmoxam has quit [Ping timeout: 256 seconds]
Domon has joined #ruby-lang
<lianj> judging by indentation he doesn't know about them
<r0bglees0n> id just use sinatra & a ERB view for that.
<TheNotary> yeah, that indentation really hurts, I have to open a misc text editor called 'medit' to make any sense of it. I think his problem is his use of the 'puts' command. It's sending text directly out at the time the puts command is processed. Maybe if he get's rid of the puts and makes it a 'return' it will work. I don't know how to test that code exactly though.
Xzyx987X has quit [Ping timeout: 256 seconds]
sush24 has joined #ruby-lang
Xzyx987X has joined #ruby-lang
pygmael has joined #ruby-lang
intellitech has joined #ruby-lang
retro|cz has quit [Ping timeout: 256 seconds]
<abstr4ct> thenotary: all of my noobness leads me here...
retro|cz has joined #ruby-lang
<abstr4ct> my goal seems simple enough, i thought i could get away without all the frills of rails...
<TheNotary> k, you should google "sinatra", or even "camp" with respect to 'ruby' of course.
<TheNotary> are you coming from another language like PHP?
norplr has joined #ruby-lang
<TheNotary> or c++
<lianj> TheNotary: camp is in camping framework?
<abstr4ct> i am not a programmer by trade, this is just a small fun project for me to learn a bit of ruby. I am however not new to sysadmining....
<TheNotary> what ever the one _why wrote is
Xzyx987X has quit [Ping timeout: 252 seconds]
Xzyx987X has joined #ruby-lang
<abstr4ct> forget my indentation, it is bad.... it is not final code...
<abstr4ct> i just want to do a loop in the cgi creation proccess, but i fail hard
<TheNotary> ah, I see where you're coming from now abstr4ct.
<TheNotary> Here's a tut that might get you closer. http://www.tutorialspoint.com/ruby/ruby_web_applications.htm
<TheNotary> But maybe I can find you a quick easy tut in a limited web framework that you'll enjoy even more
<abstr4ct> hehe, yeah workin off that. i cant seem to pull the last piece off.
<TheNotary> lianj: yeah, my bad, I spaced on that name a bit apparently
<lianj> nevermind, was just curious if you really mean _whys one
<abstr4ct> cant make this part work... n_rows.times do
<abstr4ct> puts rs.fetch_row.join("\s ")
bentis_ has joined #ruby-lang
<TheNotary> abstr4ct: I worked something out that might help you in your code https://gist.github.com/anonymous/5282864
<TheNotary> I commented out all the references to your mysql database so I could focus on just the CGI aspect of things
aef_ has joined #ruby-lang
<TheNotary> notice line #16 If I want more things in the body, I need to have the "+" at the end of the line. That's like making a nice big long string, you know? It could all be on the same line if you wanted, but it wouldn't look as nice.
<TheNotary> oh wait... I didn't finish my investigation...
<TheNotary> the loop, lol 1 sec
pygmael has quit [Quit: pygmael]
Xzyx987X has quit [Ping timeout: 252 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
<TheNotary> this one has a working loop
grandy has quit [*.net *.split]
Spaceghost|cloud has quit [*.net *.split]
lele has quit [*.net *.split]
thejspr_ has quit [*.net *.split]
aef has quit [*.net *.split]
melter has quit [*.net *.split]
bentis has quit [*.net *.split]
kvs has quit [*.net *.split]
adam12 has quit [*.net *.split]
d_roge has quit [*.net *.split]
thorncp has quit [*.net *.split]
<abstr4ct> nice, ill take a look soon, my anti-irc (girl) pullin me away... ugh!~
FlyingLeap_ has joined #ruby-lang
khaase_ has joined #ruby-lang
sailias has quit [Quit: Leaving.]
ahf_ has joined #ruby-lang
mbr has joined #ruby-lang
matthewd_ has joined #ruby-lang
sailias has joined #ruby-lang
badeball_ has joined #ruby-lang
mbr_ has quit [Write error: Broken pipe]
ahf has quit [Remote host closed the connection]
FlyingLeap has quit [Quit: No Ping reply in 180 seconds.]
badeball has quit [Write error: Broken pipe]
matthewd has quit [Remote host closed the connection]
khaase has quit [Ping timeout: 435 seconds]
amateurhuman has quit [Ping timeout: 435 seconds]
ahf_ is now known as ahf
sailias1 has joined #ruby-lang
sailias1 has quit [Read error: Connection reset by peer]
sailias1 has joined #ruby-lang
amateurhuman has joined #ruby-lang
semajs has quit [Ping timeout: 258 seconds]
sailias1 has quit [Read error: Connection reset by peer]
sailias2 has joined #ruby-lang
sailias2 has quit [Client Quit]
sailias1 has joined #ruby-lang
sailias2 has joined #ruby-lang
sailias2 has quit [Client Quit]
sailias2 has joined #ruby-lang
sailias2 has quit [Client Quit]
techlife has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 258 seconds]
sailias has joined #ruby-lang
<TheNotary> "Camping is for hackers and tricksters parasailing off the edge of the earth." -- _why http://camping.io
sailias has quit [Client Quit]
amerine has joined #ruby-lang
<TheNotary> What a sweet mind it must be to live in
sailias has joined #ruby-lang
tylersmith has joined #ruby-lang
sailias1 has quit [Ping timeout: 258 seconds]
ssssss has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 258 seconds]
techlife has joined #ruby-lang
gianlucadv has quit [Ping timeout: 264 seconds]
grandy has joined #ruby-lang
d_roge has joined #ruby-lang
adam12 has joined #ruby-lang
kvs has joined #ruby-lang
thorncp has joined #ruby-lang
melter has joined #ruby-lang
Spaceghost|cloud has joined #ruby-lang
thejspr_ has joined #ruby-lang
lele has joined #ruby-lang
Demux_ has joined #ruby-lang
narya_ has joined #ruby-lang
wnd^ has joined #ruby-lang
charliesome has joined #ruby-lang
perryh has joined #ruby-lang
kotp has joined #ruby-lang
perryh has quit [Changing host]
perryh has joined #ruby-lang
Git|Nick has joined #ruby-lang
kevinfagan has quit [Write error: Broken pipe]
vgoff has quit [Write error: Broken pipe]
GitNick has quit [Write error: Broken pipe]
perry has quit [Write error: Connection reset by peer]
perryh is now known as perry
msch has quit [Remote host closed the connection]
kevinfagan_ has joined #ruby-lang
Kuukunen- has joined #ruby-lang
cout_ has joined #ruby-lang
tomzx_mac_ has joined #ruby-lang
techlife has quit [Ping timeout: 260 seconds]
tomzx_mac has quit [Ping timeout: 256 seconds]
Weems2 has joined #ruby-lang
mitchty_ has joined #ruby-lang
techlife has joined #ruby-lang
tdy_ has quit [*.net *.split]
lele|w has quit [*.net *.split]
Kuukunen has quit [*.net *.split]
Weems has quit [*.net *.split]
mitchty has quit [*.net *.split]
joast has quit [*.net *.split]
wnd has quit [*.net *.split]
benwoody has quit [*.net *.split]
Demux has quit [*.net *.split]
cout has quit [*.net *.split]
narya has quit [*.net *.split]
techlife has quit [Read error: Connection reset by peer]
techlife has joined #ruby-lang
benwoody has joined #ruby-lang
lele|w has joined #ruby-lang
tdy_ has joined #ruby-lang
gianlucadv has joined #ruby-lang
KU0N has quit [Quit: Leaving.]
tomzx_mac_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby-lang
semajs has joined #ruby-lang
mitchty_ is now known as mitchty
tomzx_mac has joined #ruby-lang
retro|cz has quit [Ping timeout: 255 seconds]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
<TheNotary> does anyone know why the installations for ri documentation and RDoc haven't be handled in a more multi-threaded way?
tallship has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
Technodrome has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
baba has joined #ruby-lang
fire has quit [Ping timeout: 258 seconds]
stonerfish has quit [Quit: Leaving.]
tylersmith has joined #ruby-lang
Demux_ has quit [Ping timeout: 240 seconds]
semajs has quit [Ping timeout: 252 seconds]
tylersmith has quit [Quit: tylersmith]
heftig has quit [Quit: Quitting]
Gaelan has quit [Remote host closed the connection]
breakingthings has quit []
bzalasky has joined #ruby-lang
heftig has joined #ruby-lang
Voker57 has quit [Ping timeout: 264 seconds]
amerine has quit [Quit: Computer has gone to sleep.]
techlife has quit [Ping timeout: 245 seconds]
amerine has joined #ruby-lang
rippa has joined #ruby-lang
Voker57 has joined #ruby-lang
amerine has quit [Client Quit]
amerine has joined #ruby-lang
amerine has quit [Client Quit]
amerine has joined #ruby-lang
dhruvasagar has joined #ruby-lang
amerine has quit [Read error: Connection reset by peer]
techlife has joined #ruby-lang
amerine has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 255 seconds]
chessguy has quit [Remote host closed the connection]
oguzbilgic has joined #ruby-lang
semajs has joined #ruby-lang
Gaelan has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
fosky has quit [Remote host closed the connection]
oguzbilgic has left #ruby-lang [#ruby-lang]
ruby-lang110 has joined #ruby-lang
Mon_Ouie has quit [Read error: Operation timed out]
hahuang65 has quit [Quit: Computer has gone to sleep.]
retro|cz has joined #ruby-lang
<freedrull> 23 scenarios (23 passed)
<freedrull> 84 steps (84 passed)
<freedrull> -6051m49.128s
io_syl has quit [Ping timeout: 252 seconds]
<freedrull> woah sweet my scenarios are so fast they went -6000ms into the past!
amerine has quit [Quit: Computer has gone to sleep.]
Gaelan has quit [Remote host closed the connection]
<r0bglees0n> freedrull: hahaha
io_syl has joined #ruby-lang
Gaelan has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
<freedrull> whats the thing that is like `take` but you get the last n elemnts instead of the first n elements
<freedrull> wait is that actually a thing
<r0bglees0n> freedrull: [1,2,3].last(2) # => [2,3].
<freedrull> oh you can apply an arg to last, sweet
<freedrull> i was gonna do .reverse.take hehe
<r0bglees0n> or [1,2,3][-2..-1]
retro|cz has quit [Ping timeout: 245 seconds]
retro|cz has joined #ruby-lang
agarie has quit [Remote host closed the connection]
<r0bglees0n> >> [1,2,3][-2..-1]
<eval-in> r0bglees0n => [2, 3] (http://eval.in/14137)
<r0bglees0n> eval-in: botsnack
<r0bglees0n> :[
heftig has quit [Remote host closed the connection]
heftig has joined #ruby-lang
<freedrull> >> [1,2,3].reverse.take(10)
<eval-in> freedrull => [3, 2, 1] (http://eval.in/14138)
<freedrull> >> [1,2,3].reverse.take(-1)
<eval-in> freedrull => /tmp/execpad-ef8b032ef358/source-ef8b032ef358:2:in `take': attempt to take negative size (ArgumentError) ... (http://eval.in/14139)
Gaelan has quit [Remote host closed the connection]
soknee has quit [Quit: Leaving.]
rshackle1ord has left #ruby-lang [#ruby-lang]
amerine has joined #ruby-lang
crynix has quit [Remote host closed the connection]
azlon has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
agarie has joined #ruby-lang
retro|cz has joined #ruby-lang
chimkan has quit [Quit: chimkan]
glebm has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
azlon has quit [Ping timeout: 260 seconds]
<freedrull> >> a = [1,2,3].cycle
<eval-in> freedrull => #<Enumerator: [1, 2, 3]:cycle> (http://eval.in/14140)
<freedrull> >> Array(a)
<eval-in> freedrull => /tmp/execpad-110219018b67/source-110219018b67:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (http://eval.in/14141)
<freedrull> >> Array([1,2,3].cycle)
tcopp has quit [Ping timeout: 240 seconds]
<eval-in> freedrull => /tmp/execpad-89b921c45e89/source-89b921c45e89:2:in `cycle': failed to allocate memory (NoMemoryError) ... (http://eval.in/14142)
<freedrull> doh
heftig has quit [Quit: Quitting]
heftig has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
azlon has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
azlon has quit [Ping timeout: 240 seconds]
mytrile has joined #ruby-lang
vlad_starkov has joined #ruby-lang
azlon has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
amerine has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Ping timeout: 260 seconds]
azlon has quit [Ping timeout: 256 seconds]
ledestin has quit [Quit: ledestin]
amerine has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
rippa has quit [Ping timeout: 240 seconds]
retro|cz has joined #ruby-lang
azlon has joined #ruby-lang
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby-lang
kgrz has joined #ruby-lang
azlon has quit [Ping timeout: 256 seconds]
azlon has joined #ruby-lang
azlon has quit [Ping timeout: 246 seconds]
azlon has joined #ruby-lang
bzalasky has joined #ruby-lang
earthquake has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
ruby-lang642 has joined #ruby-lang
ruby-lang642 has quit [Client Quit]
pygmael has joined #ruby-lang
noop has joined #ruby-lang
slightair has joined #ruby-lang
azlon has quit [Ping timeout: 245 seconds]
azlon has joined #ruby-lang
azlon has quit [Ping timeout: 252 seconds]
Gaelan has joined #ruby-lang
azlon has joined #ruby-lang
ando has joined #ruby-lang
ando has quit [Client Quit]
Gaelan has quit [Ping timeout: 260 seconds]
azlon has quit [Ping timeout: 255 seconds]
jonahR has joined #ruby-lang
ruby-lang110 has quit [Ping timeout: 245 seconds]
azlon has joined #ruby-lang
azlon has quit [Client Quit]
dhruvasagar has joined #ruby-lang
nXqd has joined #ruby-lang
postmodern has quit [Ping timeout: 260 seconds]
ritek has quit [Remote host closed the connection]
ritek has joined #ruby-lang
mytrile has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<Technodrome> what is the terminology for a method attribute setter?
nertzy2 has quit [Ping timeout: 256 seconds]
<r0bglees0n> Technodrome: normally, just a "setter".
<Technodrome> ah
<Technodrome> attribute setter?
<r0bglees0n> setter is fine :)
blacktulip has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
<r0bglees0n> you can say setter or getter, no need for attribute but you can keep it there if you like.
postmodern has joined #ruby-lang
<Technodrome> yeah r0bglees0n just trying to get terminology right :P
fosky has joined #ruby-lang
<ddfreyne> Hmm, in Ruby they might be called reader/writer (attr_reader, attr_writer) but I haven’t really seen that happen yet
<ddfreyne> So yeah, getter/setter.
mistym has quit [Remote host closed the connection]
nertzy has joined #ruby-lang
perry has quit [Quit: ZNC - http://znc.in]
perry has joined #ruby-lang
vlad_starkov has joined #ruby-lang
retro|cz has quit [Ping timeout: 260 seconds]
retro|cz has joined #ruby-lang
amerine has joined #ruby-lang
semajs has quit [Ping timeout: 256 seconds]
thebastl has joined #ruby-lang
tom__ has joined #ruby-lang
retro|cz has quit [Ping timeout: 252 seconds]
retro|cz has joined #ruby-lang
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tom__ has quit [Quit: Page closed]
ruby-lang570 has joined #ruby-lang
io_syl_ has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
ritek has quit [Remote host closed the connection]
ruby-lang570 has quit [Ping timeout: 245 seconds]
io_syl has quit [Ping timeout: 246 seconds]
io_syl_ is now known as io_syl
dhruvasagar has joined #ruby-lang
ledestin has joined #ruby-lang
ritek has joined #ruby-lang
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
mytrile has quit [Ping timeout: 240 seconds]
retro|cz has quit [Ping timeout: 252 seconds]
retro|cz has joined #ruby-lang
Demux has joined #ruby-lang
ryanf has left #ruby-lang [#ruby-lang]
<Technodrome> how often do you guys write class methods vs instance?
mytrile has joined #ruby-lang
<Technodrome> kinda stupid question, but sometimes i just don't see the need to write a class method, even though technically you could write it as a class method as well
apeiros_ has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Ping timeout: 240 seconds]
dmoctezuma has joined #ruby-lang
ritek has quit [Ping timeout: 245 seconds]
kain has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
wudofyr has quit [Remote host closed the connection]
faces has quit [Ping timeout: 252 seconds]
wudofyr has joined #ruby-lang
face has joined #ruby-lang
Axsuul has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
maxmanders has joined #ruby-lang
thufir_ has joined #ruby-lang
maxmanders has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby-lang
retro|cz has quit [Ping timeout: 256 seconds]
retro|cz has joined #ruby-lang
workmad3 has joined #ruby-lang
Boohbah has quit [Ping timeout: 258 seconds]
kirin` has quit [Ping timeout: 255 seconds]
Traz has joined #ruby-lang
Traz has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
Aiur has joined #ruby-lang
retro|cz has quit [Ping timeout: 255 seconds]
retro|cz has joined #ruby-lang
drumond1_ has joined #ruby-lang
drumond19 has quit [Ping timeout: 258 seconds]
nXqd has quit [Ping timeout: 246 seconds]
nXqd has joined #ruby-lang
postmodern has quit [Quit: Leaving]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
<rue> Then don’t?
noop has quit [Ping timeout: 245 seconds]
<Technodrome> rue: was just a question
<rue> That’s basically how you decide :P
<Technodrome> i mean i guess any method that doesn't operate on the attributes of that instance themselves *could* be a class method, but sometimes if its deals with something relating to the instance, i don't see much harm in just adding an instance method
fosky has quit [Remote host closed the connection]
baba has quit [Quit: WeeChat 0.4.0]
baba has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
retro|cz has joined #ruby-lang
devoper has joined #ruby-lang
noop has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
Guedes0 has left #ruby-lang [#ruby-lang]
retro|cz has joined #ruby-lang
soknee has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dmoctezuma has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
drumond1_ has quit [Remote host closed the connection]
drumond19 has joined #ruby-lang
charliesome has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
kirin` has joined #ruby-lang
noop has quit [Ping timeout: 245 seconds]
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
jonahR has quit [Quit: jonahR]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
dkannan has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
Aiur has quit [Read error: Connection reset by peer]
Aiur has joined #ruby-lang
kirin` has joined #ruby-lang
badeball_ is now known as badeball
noop has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
kirin` has quit [Ping timeout: 255 seconds]
kirin` has joined #ruby-lang
drumond19 has quit [Remote host closed the connection]
mbj has joined #ruby-lang
kirin` has quit [Ping timeout: 246 seconds]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
Domon has quit [Remote host closed the connection]
kirin` has joined #ruby-lang
dkannan_ has joined #ruby-lang
mrfelix has joined #ruby-lang
sush24 has joined #ruby-lang
benanne has joined #ruby-lang
francisfish has joined #ruby-lang
KU0N has joined #ruby-lang
dkannan has quit [Ping timeout: 240 seconds]
dkannan_ is now known as dkannan
kirin` has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
MaddinXx has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
nkr has joined #ruby-lang
thone_ has joined #ruby-lang
Wardrop has quit [Quit: Wardrop]
Wardrop has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby-lang
thone has quit [Ping timeout: 256 seconds]
kirin` has quit [Ping timeout: 245 seconds]
soknee has quit [Quit: Leaving.]
<rue> Technodrome: It’s better to default to instance methods
kirin` has joined #ruby-lang
sepp2k has joined #ruby-lang
<Technodrome> rue: yeah
<Technodrome> you know ruby is kinda like smalltalk in multiple ways, and in one way is, you don't really have to know it to use it, hence why i spent some time learning a few better ways of doing things
srbaker has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
kirin` has quit [Ping timeout: 256 seconds]
megha has joined #ruby-lang
kirin` has joined #ruby-lang
charliesome has joined #ruby-lang
baba has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
kirin` has quit [Ping timeout: 256 seconds]
mrfelix has quit [Quit: Computer has gone to sleep.]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 246 seconds]
m4t_ has left #ruby-lang [#ruby-lang]
kirin` has joined #ruby-lang
m4t- has joined #ruby-lang
wizonesolutions has quit [Ping timeout: 245 seconds]
kirin` has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
wizonesolutions has joined #ruby-lang
Aiur has quit [Quit: Computer has gone to sleep.]
retro|cz has quit [Ping timeout: 255 seconds]
kirin` has quit [Ping timeout: 240 seconds]
retro|cz has joined #ruby-lang
kirin` has joined #ruby-lang
burgestrand has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<lewis1711> I always thought smalltalk had very nice syntax
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
mixandgo has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<lewis1711> that;s one thing that sometimes irritates me about ruby - the syntax is too "clever".
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
semajs has joined #ruby-lang
xxaM has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 255 seconds]
solars has joined #ruby-lang
<Technodrome> lewis1711: i think it was alan key who said, you don't have to know smalltalk to use it
<Technodrome> or something like that
<Technodrome> i find many dev's will use rails for a long time without really knowing anything but the basics of ruby
<Technodrome> even I sometimes get eye openers here or there
kirin` has joined #ruby-lang
chimkan_ has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
kirin` has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
kirin` has joined #ruby-lang
carloslopes has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
soknee has joined #ruby-lang
carloslopes has joined #ruby-lang
<yorickpeterse> rking: ping (heh)
<rking> (pong)
<yorickpeterse> yay
<yorickpeterse> Do you happen to know what error format Syntastic requires?
<rking> It's configurable
<yorickpeterse> If there's a specific format I can just add some code to ruby-lint to spit errors out in that format
kirin` has quit [Ping timeout: 252 seconds]
<rking> https://github.com/scrooloose/syntastic/blob/master/syntax_checkers/ruby/mri.vim # this is the MRI one, definitely one of the more complicated syntax_checkers
solars has quit [Ping timeout: 256 seconds]
<rking> I imagine there'd be a syntax_checker/ruby/lint.vim
kirin` has joined #ruby-lang
solars has joined #ruby-lang
<rking> Actually, the coffee/ dir has a lint one in addition to its normal one.
<yorickpeterse> hmm
<rking> :help errorformat from within vim
<yorickpeterse> ta
<yorickpeterse> I'll take a look at that to see if I can make it easier to intergrate it with syntastic
toretore has joined #ruby-lang
<rking> Np. =) One thing I'm not sure about is if they have a 3rd or Nth "bucket". Currently it handles Errors and Warns, I wonder if it could do more.
judofyr has joined #ruby-lang
kirin` has quit [Ping timeout: 260 seconds]
<yorickpeterse> still a lot of work to be done but once I finish re-writing the definition generator (currently used for core/stdlib) I'll probably just release a new version so that people can play with it
<yorickpeterse> with a big notice "EXPECT FALSE POSITIVES!"
kirin` has joined #ruby-lang
<lewis1711> what's the nicest way to define a private method on a single instance of an object? ie the private equivalant of "def some_instnace.foo ..."
dustint has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
<rking> lewis1711: I'm curious: Why do you want that?
kirin` has joined #ruby-lang
wmoxam has joined #ruby-lang
<lewis1711> rking: I always make helper methods privage
sailias has joined #ruby-lang
<lewis1711> private
<rking> lewis1711: I always try to find a better place for methods I want to make private. =)
<rking> Sort of like how a comment is valid, but a smell that there's some other refactoring missing, I generally view private methods as an indicator that I don't have some other object that would have a public method instead.
<m4t-> sounds hacky to me too, but inheritance from the instance and then privat'ing it could work?
<m4t-> class << your_instance
<m4t-> private foo
<m4t-> end
<m4t-> ?
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
<rking> This also does it: x.instance_eval do private; def prv; puts 'hi' end end
<rking> But it still sounds really iffy. =)
TheNotary has quit [Ping timeout: 252 seconds]
<lewis1711> yes but abusing the dynamicness of ruby is half the fun surely
<lewis1711> rking: why do you think making another object with public methods is better than having private helper methods?
kirin` has quit [Ping timeout: 245 seconds]
<rking> lewis1711: I've just found that it's normally the right organization.
<rking> If there's an object that truly has a certain responsibility, then why is that responsibility private?
arooni-mobile has joined #ruby-lang
kirin` has joined #ruby-lang
<lewis1711> I generally use private methods when the public method is too long. I don't feel like the outside world needs know about them
chimkan_ has left #ruby-lang [#ruby-lang]
chrismar035 has joined #ruby-lang
<rking> lewis1711: Do you have an example you can gist?
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
TheNotary has joined #ruby-lang
scampbell has joined #ruby-lang
glebm has joined #ruby-lang
andrea93 has joined #ruby-lang
breakingthings has joined #ruby-lang
kirin` has quit [Ping timeout: 240 seconds]
<lewis1711> rking: sure
<lewis1711> to me current_forecast and extended_forecast should be private methods, rather internal like that
andrea93 has quit [Killed (idoru (Spam is off topic on freenode.))]
kirin` has joined #ruby-lang
<rking> So what is the "one responsibility" of a WeatherUnderground object?
<lewis1711> to search a page, format the info I want, and print it nicely. I guess that's 3 ;)
Gaelan has joined #ruby-lang
<rking> Exactly. =)
vlad_starkov has joined #ruby-lang
<rking> Not like a "drop everything and fix this" smell, but definitely one I try to heed.
<lewis1711> so you would make a new object for each of those tasks? isn't that a bit overboard?
kirin` has quit [Ping timeout: 240 seconds]
Gaelan has quit [Remote host closed the connection]
solars has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
<rking> Which way I'd go depends on many things — for example, are there other patterns like this in the system? E.g. is there another Weather service that gets handled in a different way?
<rking> Or is there another service of another kind altogether?
tcopp has joined #ruby-lang
<lewis1711> rking: well I am just finishing this program up. if you're still around I'll gist it. the reason I am so curious about your views is that I have heard the notion before, that private methods are a sign of poor design, but never had it well substantiated
ruby-lang166 has joined #ruby-lang
<lewis1711> still around when it's finished, I mean
<rking> Sure thing. =)
<rking> Does it have tests?
kirin` has quit [Ping timeout: 245 seconds]
benwoody has left #ruby-lang [#ruby-lang]
rsl has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
retro|cz has quit [Ping timeout: 252 seconds]
heftig has quit [Quit: Quitting]
benwoody has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
ruby-lang166 has quit [Ping timeout: 245 seconds]
rsl has joined #ruby-lang
glebm has joined #ruby-lang
imperator has joined #ruby-lang
dhruvasagar has joined #ruby-lang
kirin` has quit [Ping timeout: 256 seconds]
semajs has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
kirin` has joined #ruby-lang
Gaelan has joined #ruby-lang
snafoo has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
kirin` has quit [Ping timeout: 256 seconds]
kirin` has joined #ruby-lang
willdrew has joined #ruby-lang
chessguy has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
kirin` has quit [Ping timeout: 245 seconds]
chessguy has quit [Ping timeout: 245 seconds]
kirin` has joined #ruby-lang
Gaelan has joined #ruby-lang
thebastl has quit [Read error: Operation timed out]
Gaelan has quit [Ping timeout: 256 seconds]
kirin` has quit [Ping timeout: 260 seconds]
dkannan has quit [Quit: dkannan]
kirin` has joined #ruby-lang
kirin` has quit [Read error: Connection reset by peer]
cout_ is now known as cout
kirin` has joined #ruby-lang
mrfelix has joined #ruby-lang
joast has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
outoftime has joined #ruby-lang
wizonesolutions has quit [Ping timeout: 240 seconds]
sonots has joined #ruby-lang
wizonesolutions has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
judofyr has quit [Read error: Connection reset by peer]
judofyr has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
scottschecter has quit [Quit: WeeChat 0.4.0]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yorickpeterse> sweet, finally managed to get some code going to recursively retrieve *all* constant of a given constant
toretore has quit [Quit: This computer has gone to sleep]
<yorickpeterse> 635 constants, notbad.jpg
judofyr has quit [Ping timeout: 260 seconds]
breakingthings has quit []
kgrz has quit [Quit: Computer has gone to sleep.]
judofyr has joined #ruby-lang
solars has joined #ruby-lang
<lewis1711> (["separate", "with", "tabs"].join('\t')) #why does this result in \\t instead of \t?
<yorickpeterse> I take it you're running this in a console of some sort?
Technodrome has quit [Quit: Technodrome]
<lewis1711> yes
<yorickpeterse> if so, Ruby escapes it when displaying it
<yorickpeterse> The actual value is still "\t"
<sepp2k> lewis1711: Because single quotes don't allow escpae sequences.
<yorickpeterse> oh derp, didn't see that
<yorickpeterse> disregard that, I suck cock, etc
<lewis1711> sepp2k: wouldn't have figured that out in a million years
dhruvasagar has joined #ruby-lang
<sepp2k> A backslash in single quotes is just a backslash (unless followed by a single quote or another backslash)
<lewis1711> any other single quote double quote differences I should know about? :/
bantic has joined #ruby-lang
beiter has joined #ruby-lang
<apeiros_> lewis1711: single quoted strings don't do string interpolation
chao has quit [Remote host closed the connection]
mrfelix has quit [Quit: Computer has gone to sleep.]
mytrile has quit [Remote host closed the connection]
anonymuse has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
srbaker has joined #ruby-lang
srbaker has quit [Client Quit]
havenwood has joined #ruby-lang
workmad3 has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
srbaker has quit [Client Quit]
rippa has joined #ruby-lang
pygmael has quit [Quit: pygmael]
sonots has quit [Remote host closed the connection]
sonots has joined #ruby-lang
rippa has quit [Client Quit]
rippa has joined #ruby-lang
beiter has quit [Quit: beiter]
kogent has quit [Quit: kogent]
breakingthings has joined #ruby-lang
semajs has joined #ruby-lang
vlad_starkov has joined #ruby-lang
mistym has joined #ruby-lang
tomzx_mac has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
toretore has joined #ruby-lang
tylersmith has joined #ruby-lang
Qwak has joined #ruby-lang
llaskin has joined #ruby-lang
llaskin has quit [Changing host]
llaskin has joined #ruby-lang
<llaskin> https://gist.github.com/llaskin/3a2f14f0417853fa48b0 can I somehow call method b inside of method a?
<sepp2k> llaskin: If a has a reference to an object of class foo, you can. Or if the object that you call a on is an instance of class foo (because foo includes bar or you extended a foo object with bar).
<sepp2k> Otherwise, no.
<llaskin> sepp2k: but a is inside a moduel which is inside class Foo
<llaskin> so wouldn't I end up in an endless loop somehow?
carloslopes has quit [Remote host closed the connection]
<sepp2k> I don't see how you would.
gregmore_ has joined #ruby-lang
sonots has quit [Remote host closed the connection]
<havenwood> llaskin: I can't tell what you mean from the pseudo code. Are you trying to call ::Foo.new.a from Bar?
<llaskin> havenwood: yes.
jg has joined #ruby-lang
pygmael has joined #ruby-lang
<llaskin> ok will try
dhruvasagar has quit [Ping timeout: 260 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
srbaker has joined #ruby-lang
srbaker has quit [Client Quit]
dhruvasagar has joined #ruby-lang
<cored> hello all
<cored> question regarding Gemfile, why if I specified a version in a gem pointing to a github repository if I made the first gem a dependency of another one the version of the gem that's get installed is the one on rubygems not the one inside the github repo?
retro|cz has joined #ruby-lang
<cored> does it means that I have to specified the github version gem inside the last gem also?
<llaskin> havenwood: thanks that worked
<yxhuvud> cored: I'd assume that bundler isn't smart enough to figure out what revision to check out and that you have to figure that out by yourself if you need to use a git based gem.
pygmael has quit [Ping timeout: 256 seconds]
srbaker has joined #ruby-lang
maxmanders has joined #ruby-lang
<cored> yxhuvud: I see
tylersmith has quit [Quit: tylersmith]
<cored> I thought that the correct logic, was to install the first dependency and going up from there
<yxhuvud> I don't really see the reason for why you'd want that though. the gem dependencies should be authoritative.
<cored> hm
semajs has quit [Ping timeout: 257 seconds]
<cored> because there's a fork for a particular branch that have the code that I want/need the main version doesn't have it yet
mrfelix has joined #ruby-lang
srbaker has quit [Ping timeout: 264 seconds]
mistym has quit [Ping timeout: 276 seconds]
__butch__ has joined #ruby-lang
amerine has joined #ruby-lang
sonots has joined #ruby-lang
mistym has joined #ruby-lang
io_syl has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
lewis1711 has quit [Remote host closed the connection]
__butch__ has quit [Ping timeout: 256 seconds]
chimkan has joined #ruby-lang
carloslopes has joined #ruby-lang
retro|cz has quit [Ping timeout: 272 seconds]
benanne has quit [Quit: kbai]
mistym has quit [Ping timeout: 272 seconds]
sush24 has quit [Ping timeout: 240 seconds]
__butch__ has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
tbuehlmann has joined #ruby-lang
sush24 has joined #ruby-lang
runeb has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
mistym has joined #ruby-lang
runeb has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
<whitequark> >> (1..2).frozen?
<eval-in> whitequark => false (http://eval.in/14188)
<whitequark> but can I modify it?
thebastl has joined #ruby-lang
<whitequark> except for with instance_variable_*, i.e. only with public API
stevechiagozie has joined #ruby-lang
runeb has joined #ruby-lang
stevechiagozie has quit [Client Quit]
retro|cz has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
Luwe has joined #ruby-lang
srbaker has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
nkonteks has joined #ruby-lang
srbaker has quit [Client Quit]
fragamus has joined #ruby-lang
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
<mbj> whitequark: What about having a real object Parser::Diagonstic::Level than messing around with symbols ?
runeb has quit [Remote host closed the connection]
<whitequark> mbj: what for? symbols are more than enough.
<mbj> whitequark: This object could encapsulate the behavior for ignoring diagnostic messages etc.
<whitequark> fyi, the Diagnostic stuff is modelled after clang
wudofyr has quit [Remote host closed the connection]
<whitequark> mbj: DiagnosticsEngine already encapsulates this behavior
<whitequark> I don't think that a level should determine if it should be ignored or not. That can be related to a certain parser invocation.
<whitequark> Thus, it's in DiagnosticsEngine.
wudofyr has joined #ruby-lang
<mbj> whitequark: Got it.
<mbj> whitequark: BTW why you use protected instead of private in DiagonsticsEngine?
<whitequark> mbj: I don't really use `private` in Ruby code. Instead of providing access control, it provides some weird lexically-related rules
<whitequark> also I can't make any private writers
<mbj> whitequark: Because you cannot use self.any_private_method ?
havenwood has quit [Remote host closed the connection]
<whitequark> >> def a=(b);end; private :a=; self.a=1
<eval-in> whitequark => 1 (http://eval.in/14189)
<whitequark> what
<whitequark> 19>> def a=(b);end; private :a=; self.a=1
<eval-in> whitequark => 1 (http://eval.in/14190)
* whitequark scratches his head
<mbj> heh
<mbj> whitequark: I generally start with private and loose strictness once I see the need.
<whitequark> mbj: well in this case it makes sense.
<whitequark> I agree.
<mbj> whitequark: protected methods in my code are only used for equalization
<mbj> whitequark: 99%
thebastl has joined #ruby-lang
<whitequark> I agree.
<whitequark> I rather dislike your approach to Parser::Version
<mbj> whitequark: Generally I avoid attribute writers. Use to work with immutable objects all the time.
kogent has joined #ruby-lang
<mbj> whitequark: Parser::Diagnostic could be renamed to Parser::Diagnostic::Message
<mbj> whitequark: And Parser::DiagnosticsEngine to Parser::Diagnostic::Engine
<mbj> whitequark: Maybe it is a CS term again ;)
<whitequark> mbj: no, not really, it's wordly enough as it is
Aiur has joined #ruby-lang
adambeynon has joined #ruby-lang
<whitequark> not a CS term, but the message is generally called "diagnostic"
<mbj> whitequark: okay
<mbj> whitequark: I'm still learning the common terms. Sorry for the noise.
mistym has quit [Ping timeout: 256 seconds]
<whitequark> mbj: it's okay :)
<whitequark> mbj: can you rebase your branches instead of merging `master`?
<whitequark> git pull --rebase, etc
<whitequark> keeps the logs clean
<mbj> whitequark: Fuck, forgot it this time.
<mbj> whitequark: Mom let me clean it up.
<mbj> whitequark: done
<mbj> afk for minutes, family busines
sonots has quit [Quit: Leaving...]
Guest55873 has quit [Read error: Connection reset by peer]
Guest55873 has joined #ruby-lang
mrsolo has joined #ruby-lang
mrfelix has quit [Ping timeout: 256 seconds]
srbaker has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
srbaker has quit [Client Quit]
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
tylersmith has joined #ruby-lang
dhruvasagar has joined #ruby-lang
havenwood has joined #ruby-lang
nkonteks has left #ruby-lang [#ruby-lang]
workmad3 has joined #ruby-lang
chao has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
<whitequark> mbj: let's do something with the parser itself :)
thebastl has quit [Remote host closed the connection]
thebastl has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 255 seconds]
soknee1 has joined #ruby-lang
soknee has quit [Ping timeout: 240 seconds]
srbaker has joined #ruby-lang
breakingthings has quit []
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
thebastl has joined #ruby-lang
llaskin has left #ruby-lang [#ruby-lang]
thebastl has quit [Remote host closed the connection]
Aiur has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<mbj> whitequark: heh
MaddinXx has quit [Remote host closed the connection]
<mbj> whitequark: I begun to experiment with the current code to understand where the direction is heading
jmeeuwen has quit [Ping timeout: 256 seconds]
<mbj> whitequark: Expect my contribution significance rise ;)
<yorickpeterse> I think weechat made the mistake of coloring whitequark and mbj the same way: http://is.gd/nqp8ix
<yorickpeterse> YELLOW EVERYWHERE
symm- has joined #ruby-lang
<whitequark> yorickpeterse: use irclogger, dude :D http://irclog.whitequark.org/ruby-lang/2013-04-01
rolfb has joined #ruby-lang
kogent has quit [Ping timeout: 246 seconds]
ttilley has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
<yorickpeterse> pffff
<yorickpeterse> aint got no time for that
jmeeuwen has joined #ruby-lang
<yorickpeterse> Also, I never shut down weechat anyway so I hardly read actual logs
<yorickpeterse> HAHAHA! YES
<yorickpeterse> So I spent most of my day reworking the process of generating definitions for ruby-lint. I just finished fixing the last test
jg has quit [Disconnected by services]
<yorickpeterse> So right now I can basically cover everything of core/stdlib with the exception of return values
<yorickpeterse> and it's also piss easy to generate this data for project X (e.g. all of Rails)
jg_ has joined #ruby-lang
<yorickpeterse> 159 files changed, 39630 insertions(+), 1662 deletions(-)
<yorickpeterse> lol
<yorickpeterse> Also a nice feature: it lazy loads this stuff from a load path meaning you don't have to manually load these "helper" definitions
jmeeuwen has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Remote host closed the connection]
breakingthings has joined #ruby-lang
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
lcdhoffman has joined #ruby-lang
MaddinXx has joined #ruby-lang
Gaelan has joined #ruby-lang
ttilley has quit [Read error: Connection reset by peer]
Aphelion has joined #ruby-lang
solars has joined #ruby-lang
Technodrome has joined #ruby-lang
pr0ton has joined #ruby-lang
<whitequark> mbj: please comment on my last commit, full of crappy code :D
<whitequark> also you can do this in setup_lexer:
<whitequark> #@lex.diagnostics.all_errors_are_fatal = true
<whitequark> @lex.diagnostics.consumer = ->(diag) { puts "", diag.render }
<whitequark> and enjoy the resulting diagnostics
jmeeuwen has joined #ruby-lang
<yorickpeterse> oh nice, Ruby calls keyword arguments labels
Luwe has quit [Quit: leaving]
<whitequark> yorickpeterse: they're "labels" since 1.9
<yorickpeterse> BUT!
<yorickpeterse> when calling a method with a keyword argument it parses it as a Hash
<yorickpeterse> >> Ripper.sexp('foo(number: 10)')
<eval-in> yorickpeterse => /tmp/execpad-8544150f4d9b/source-8544150f4d9b:2:in `<main>': uninitialized constant Ripper (NameError) (http://eval.in/14198)
workmad3 has quit [Ping timeout: 260 seconds]
<yorickpeterse> oh derp
<yorickpeterse> >> require 'ripper'; Ripper.sexp('foo(number: 10)')
<eval-in> yorickpeterse => [:program, [[:method_add_arg, [:fcall, [:@ident, "foo", [1, 0]]], [:arg_paren, [:args_add_block, [[:bare_assoc_hash, [[:assoc_new, [:@label, "number:", [1, 4]], [:@int, "10", [1, 12]]]]]], false]]]]] (http://eval.in/14199)
<whitequark> yorickpeterse: of course
jmeeuwen has quit [Ping timeout: 256 seconds]
<yorickpeterse> greeaaaaat, and they also seem to've injected it between the other arguments' positions
<yorickpeterse> yup, position 4 used to be the block but that's now the keyword args collection
<yorickpeterse> though that shouldn't be too hard to work around
<whitequark> mbj: ok I'm going home, back in ~1.5 hrs
<whitequark> grrrrr, 1.9.3 does not have Range#size
Aphelion has quit [Read error: Connection reset by peer]
MaddinXx has quit [Remote host closed the connection]
jmeeuwen has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<mbj> whitequark: Sorry was afk
sepp2k has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
mrfelix has joined #ruby-lang
techlife has quit [Ping timeout: 256 seconds]
Technodrome has quit [Quit: Technodrome]
ttilley has joined #ruby-lang
<yorickpeterse> huh interesting, it seems Ruby 2.0 has another argument type between keyword arguments and block arguments
<yorickpeterse> >> require 'ripper'; Ripper.sexp("def foo(required, optional = 10, *rest, more, keyword: 'value', &block); end")[1][0][2][1]
<eval-in> yorickpeterse => [:params, [[:@ident, "required", [1, 8]]], [[[:@ident, "optional", [1, 18]], [:@int, "10", [1, 29]]]], [:rest_param, [:@ident, "rest", [1, 34]]], [[:@ident, "more", [1, 40]]], [[[:@label, "keyword:", [ ... (http://eval.in/14204)
<yorickpeterse> heh
lcdhoffman has quit [Quit: lcdhoffman]
<yorickpeterse> (note the nil before :blockarg)
<injekt> :blargh
chessguy has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
ivanoats has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
Axsuul has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
postmodern has joined #ruby-lang
lcdhoffman has joined #ruby-lang
adambeynon has joined #ruby-lang
<whitequark> yorickpeterse: well obviously
<whitequark> **rest?
Technodrome has joined #ruby-lang
<yorickpeterse> the fuck is that supposed to do
<yorickpeterse> also, wasn't that already in 1.9?
pr0ton has quit [Ping timeout: 256 seconds]
<yorickpeterse> meh fuck 2.0 support for now. I'll just wait until I can implement it using "parser"
<mbj> yorickpeterse: 1.9 only added the foo(bar: baz) as syntax shugar for foo(:bar => baz).
<yorickpeterse> I know that
<whitequark> yorickpeterse: no **rest is a 2.0 only feature.
r0bglees0n has quit [Ping timeout: 252 seconds]
<yorickpeterse> hm, what does it do?
<whitequark> >> def foo(a: 1, b: 2, **rest); p a,b,rest; end; foo(a: 10, foo: "bar")
<eval-in> whitequark => 10 ... (http://eval.in/14205)
<whitequark> mbj: I think the only thing left to be designed is source location information for AST nodes
* injekt passes a [ and a ]
<whitequark> injekt: wat
<injekt> '10' isn't helpful output to explain what the code is trying to explain
<yorickpeterse> whitequark: wat
<injekt> p [a,b,rest]
<injekt> would have been better
<whitequark> yorickpeterse: it's like *rest but for keyword arguments
<yorickpeterse> right
vlad_starkov has joined #ruby-lang
<whitequark> yorickpeterse: **rest receives all the keyword arguments which were not matched by explicit keyword argument declarations
ryanf_ has joined #ruby-lang
<whitequark> as a hash
<mbj> whitequark: nice
megha has quit [Ping timeout: 256 seconds]
<mbj> whitequark: Once I really have time I'll port to_source over.
<mbj> whitequark: No real time today.
<whitequark> mbj: no no, you misunderstood me :)
<whitequark> there are still all .y files to port
<mbj> whitequark: okay
<whitequark> but I know how to do that, roughly. the "source location in AST" thing is yet to be designed
<whitequark> I'll probably need your help with the parsers :)
<mbj> whitequark: You are moving fast, this is good. I hope I do not slow you down.
vlad_starkov has quit [Ping timeout: 256 seconds]
ryanf_ has quit [Quit: leaving]
TheNotary has quit [Quit: Leaving]
<whitequark> mbj: heh, you don't :)
<mbj> whitequark: Just busy with socializing / family
<mbj> whitequark: We have a free day here. So I'm not into devmode this evening ;)
<whitequark> mbj: ok :)
megha has joined #ruby-lang
<yorickpeterse> well shit, parts of ruby-lint actually run on jruby-head
<whitequark> mbj: I'll have to prepare a talk soon. So I try to flesh out the parts for which I already have the design in my head
thebastl has joined #ruby-lang
<mbj> whitequark: sorry for introducing the bug
<whitequark> mbj: already fixed it, nevermind :)
<mbj> whitequark: Heh, my normal flow involves guard, do not have to wait for ci to remind me running the specs normally.
<mbj> whitequark: Will setup a Guardfile soon.
<whitequark> mbj: I usually just `rake` it myself, but I was on the bus and that kinda distracted me, too
<whitequark> as you've seen I've introduced quite a few bugs too
<mbj> whitequark: If you do not break CI you are not using it correctly ;)
<whitequark> heh
<whitequark> yay, fixed!
<mbj> whitequark: I'd love to bring mutant to the non generated parts.
<mbj> whitequark: This would also give me a reason to finally write a stable minitest / test/unit runner.
<whitequark> mbj: sure
__butch__ has quit [Remote host closed the connection]
<mbj> whitequark: Next mutant release allows blacklisting of certain mutations / subjects so we can exclude the generated parts.
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
<mbj> whitequark: Once parser is used by mutant, I'd love to list it here: status.datamapper.org. Okay for you?
rippa has quit [Ping timeout: 240 seconds]
<mbj> whitequark: We'll explicitly mark it as dependency, not part of the project.
<whitequark> mbj: sure
<mbj> whitequark: I'll present all dependencies there. A library is only as good as the stuff it depends on.
<whitequark> +1 on that, indeed
<whitequark> you don't really have to set any special marks on it. to_source is just fine there
<mbj> the list is already to long, we have to introduce categories anyways.
<mbj> adapters / core / other
<whitequark> 'k
<mbj> whitequark: BTW I'd love to build a veritas backend emitting machinecode that efficiently walks an mmaped efficently stored tuple space.
<mbj> whitequark: I'll play around with the ruby-llvm
<mbj> whitequark: Just for learning, I do not expect to build an RDBMS.
Luwe has joined #ruby-lang
<whitequark> mbj: sure, though that might or might not make much sense
<whitequark> there's quite a bit of overhead within FFI
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
ttilley has quit [Read error: Connection reset by peer]
__butch__ has joined #ruby-lang
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<mbj> whitequark: I'll have to benchmark it. Once I can identify the binary => tuple transformation as bottleneck I could bypass FFI via c.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<mbj> whitequark: Why do you build a parser?
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<mbj> whitequark: BTW I like the idea behind funace-ast, only having a few nodes not coupled with behavior is a good idea.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
__butch__ has quit [Client Quit]
<whitequark> mbj: I have a project called Foundry. http://whitequark.org/blog/2012/12/06/a-language-for-embedded-developers/
pbjorklund_ has quit [Ping timeout: 264 seconds]
<whitequark> it needs to have *perfect* diagnostics. character for character correct.
__butch__ has joined #ruby-lang
<mbj> whitequark: The rbx ast with 181 (last time I counted) ast nodes is aligned to the needs of the bytecode emitter. I expect to_source will be greatly simplified when based on the parsers ast.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
pbjorklund has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
<whitequark> mbj: I definitely plan to have a RubyParser compatibility module and maybe, just maybe an rbx compatibility module.
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<whitequark> maybe we'll even be able replace rbx's current C parser, with the help of dbussink :)
pr0ton has joined #ruby-lang
techlife has joined #ruby-lang
<whitequark> I heard ruby_parser was evaluated for that but failed... I'm not surprised honestly
techlife has quit [Max SendQ exceeded]
<whitequark> apeiros_: please +b techlife
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
<mbj> whitequark: I'd love to help porting the parser to rbx. I have far more experience consuming asts than parsing them ;)
<whitequark> mbj: furnace-ast is a result of quite a long struggle with a mutable, quirky AST format
<whitequark> I also plan to split it into its own gem, to decouple it with hardcore SSA stuff in furnace
techlife has joined #ruby-lang
<mbj> whitequark: +1
apeiros_ has quit [Remote host closed the connection]
<mbj> whitequark: I have some small style/documentation comments.
thebastl has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
<whitequark> mbj: (porting to rbx) https://travis-ci.org/whitequark/parser/jobs/5966736 ;)
Technodrome has joined #ruby-lang
<mbj> whitequark: Doesnt rbx have a chicken egg problem if the parser/lexer callbacks are in ruby?
<whitequark> mbj: I think it's bootstrapped with bytecode
<whitequark> so we can compile lexer/parser to bytecode and just load it that way
<whitequark> mbj: what style/docs comments?
<mbj> whitequark: Ahh yeah. Forgot.
<mbj> whitequark: Forking and PRing currently.
Technodrome has quit [Quit: Technodrome]
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
Technodrome has joined #ruby-lang
dustint has quit [Ping timeout: 246 seconds]
MaddinXx_ has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
Voker57 has quit [Read error: Connection reset by peer]
My_Hearing has joined #ruby-lang
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
cjs226 has joined #ruby-lang
xxaM has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
cjs226 has quit [Client Quit]
Gaelan has joined #ruby-lang
benanne has joined #ruby-lang
<mbj> whitequark: I love your foundry project!
<whitequark> :3 thanks
<mbj> whitequark: You have escape analysis, yeah.
lewis1711 has joined #ruby-lang
<whitequark> mbj: btw, your suggested fix with dup won't work
<mbj> whitequark: interesting, I have to lookup what adamantium did. What problems do you have?
<lewis1711> say I have a strng with a number in it. what would be the best way to take that string, and get a new string back with the number multiplied by say two?
<whitequark> mbj: I'll better show with a commit
<whitequark> mbj: e65fdf4 that would be.
<drbrain> lewis1711: see Kernel#Integer and Numeric#to_s
<mbj> whitequark: I dont think this is needed. Why dont call "self.class.new(new_type, new_children, new_properties)" ?
<whitequark> mbj: remember: metadata
<whitequark> is represented by instance variables
<whitequark> user-defined ones.
<mbj> whitequark: thinking...
<mbj> whitequark: It is a littlebit harder as the solution should fit in a ruby implementation.
<whitequark> mbj: I don't think we need an enumerator for metadata. Actually, you are encouraged to override the constructor with your own implementation which explicitly sets the @vars
<mbj> whitequark: This constrains most of my "refactor to $foo" ideas ;)
<lewis1711> drbrain: say the string "3 cats" => "6 cats". I was thinking there might be some gsub trick
<whitequark> also note that AST::Nodes should have as little runtime overhead as possible. No hashes :)
nkr has quit [Quit: Linkinus - http://linkinus.com]
<drbrain> lewis1711: try String#to_i then, so long as the number is first in the string
<lewis1711> it is not
<drbrain> if there is only one number in the string, sub will do it
<drbrain> if there are multiple numbers you can write a post-graduate thesis on the project
<whitequark> >> "3 cats".gsub(/\d+/) { |m| m.to_i * 2 }
<eval-in> whitequark => "6 cats" (http://eval.in/14217)
<mbj> whitequark: But compiler cannot know about ivars in advance, bad for optimizing: http://blog.headius.com/2012/09/avoiding-hash-lookups-in-ruby.html (Instance Variables Section).
<whitequark> mbj: it doesn't need to have these ivars specified lexically
<lewis1711> whitequark: a block, of course. thanks
<whitequark> I can access @a with `instance_variable_set :@a` as long as I want and it won't be significantly slower than `@a` with a good runtime.
<mbj> whitequark: It does not know about ivars in advance.
<whitequark> mbj: so?
<whitequark> I know how that exact optimization works :)
<mbj> whitequark: It cannot offset access / writes.
<mbj> whitequark: I trust you here, I just whant to understand ;)
<whitequark> oh, you mean the node creation will be slow?
<mbj> whitequark: We are doing premature optimization talks ;)
<whitequark> well, it kinda will be, this is why you're encouraged to override the default constructor with your own
sepp2k has quit [Quit: Leaving.]
<whitequark> for both dup and attr_reader there's no problem to optimizer
<mbj> This "abitrary" write to ivars via a hash enumeration just scares me.
<mbj> It feels "inexact"
<mbj> Also if you pass in a typo you'll not notice.
<whitequark> mbj: I may remove it in the future
glebm has quit [Ping timeout: 240 seconds]
<whitequark> mbj: please see the docs for assign_properties
<mbj> I wrote something that also populates the instance variables of a given object via an attribute hash. https://github.com/mbj/anima.
<mbj> But it raises on unknown keys.
<mbj> Reduced debugging cycles a lot of time.
sailias has quit [Ping timeout: 240 seconds]
<whitequark> I may just remove the enumeration inside and make it raise an error if something's passed.
workmad3 has joined #ruby-lang
<mbj> whitequark: Looks like: class MyFoo; include Anima.new(:bar, :baz); end; instance = MyFoo.new(:bar => 1, :baz => 2)
glebm has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
<mbj> whitequark: I'd love if subclasses would "advertise" the keys they consume. So an error could be raised on unknown keys.
<whitequark> mbj: there's also issue with freezing and checking the types of values
<whitequark> so it's not possible to write a generic implementation
<mbj> whitequark: MyNodeClass = Furnace::Ast::Node.inherit(:foo, :bar)
solars has joined #ruby-lang
<whitequark> mbj: that won't handle the freezing and typechecking.
carloslopes has quit [Remote host closed the connection]
<mbj> whitequark: Freezing is possible, just generate code that freezes :@foo, :@bar.
scampbell has quit [Remote host closed the connection]
<whitequark> mbj: nope, I might want to do a deep freeze
slacko3280 has joined #ruby-lang
<mbj> whitequark: There is a generic deep freeze library ice_nine
<mbj> whitequark: its used in adamantium
<whitequark> I'm not sure if generic deep freeze even makes sense at all...
<mbj> whitequark: It only has development dpendencies http://rubygems.org/gems/ice_nine
<mbj> whitequark: heh, especially if the SourceFile object is hit.
<whitequark> exactly
Luwe has quit [Quit: leaving]
<mbj> whitequark: ice_nine stops at objects that have #frozen? => true
<mbj> whitequark: You could override SourceFile#frozen?
slacko3280 has quit [Max SendQ exceeded]
<whitequark> mbj: you've just lectured me on the perils on overriding core APIs ;)
<mbj> whitequark: hehe
<whitequark> well, just no. assign_properties is here to stay
<mbj> whitequark: no problem
<whitequark> I definitely think I'll remove the default behavior.
slacko3280 has joined #ruby-lang
<mbj> Just like to talk about such stuff. And the alternatives, and the reasons the alternatives do not work.
<mbj> This helps me to understand the project.
alessio_rocco has joined #ruby-lang
<whitequark> sure
<mbj> whitequark: I'd love to externalize or at least split this beast https://github.com/whitequark/furnace/blob/master/lib/furnace/ast/node.rb#L175-L206
<whitequark> mbj: I'll probably remove the Hash case when foundry no longer depends on it
<whitequark> it's way too ad-hoc
wmoxam has quit [Ping timeout: 240 seconds]
<mbj> whitequark: BTW I typically define operators only as aliases to "normally named" methods https://github.com/whitequark/furnace/blob/master/lib/furnace/ast/node.rb#L139
<mbj> whitequark: Just a style preference.
<whitequark> mbj: was on my to-fix list :)
<mbj> whitequark: Most likely I'll steal the idea of this ast. Having a #type attribute and #children no subclass hell.
<whitequark> mbj: you can just depend on furnace-ast ;)
<mbj> whitequark: Once you removed the Hash stuff ;)
<whitequark> already did
<whitequark> I remembered that I can depend on a specific version :D
Technodrome has quit [Quit: Technodrome]
<whitequark> also I think it's time to split the gem...
<mbj> whitequark: So it will be called "ast" this time ? :D
<whitequark> mbj: ... that's an idea.
<mbj> whitequark: Furnace::SSA is about http://en.wikipedia.org/wiki/Static_single_assignment_form ?
<whitequark> yep
slacko3280 has quit [Max SendQ exceeded]
slacko3280 has joined #ruby-lang
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
jmeeuwen has joined #ruby-lang
jmeeuwen has quit [Client Quit]
slacko3280 has quit [Read error: Connection reset by peer]
toretore has quit [Quit: Leaving]
jmeeuwen has joined #ruby-lang
<whitequark> https://rubygems.org/gems/ast ... :D
sepp2k has joined #ruby-lang
<mbj> whitequark: https://rubygems.org/gems/html :D
<mbj> whitequark: I also have "obvious" names ;)
megha has quit [Quit: WeeChat 0.4.0]
<whitequark> neat
<mbj> whitequark: Node#to_sexp is looking better now.
<mbj> whitequark: I'm out for now! Have fun. Morning is normal workday, will have more time.
mbj has quit [Quit: leaving]
snafoo has quit [Read error: Connection reset by peer]
snafoo has joined #ruby-lang
snafoo has joined #ruby-lang
snafoo has quit [Changing host]
workmad3 has quit [Ping timeout: 246 seconds]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
mixandgo has quit [Quit: mixandgo]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Technodrome has joined #ruby-lang
soknee1 has quit [Quit: Leaving.]
bluepojo has joined #ruby-lang
Nisstyre has joined #ruby-lang
stef_204 has joined #ruby-lang
benanne has quit [Quit: kbai]
breakingthings has quit []
Gaelan has quit [Remote host closed the connection]
solars has quit [Ping timeout: 260 seconds]
Gaelan has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
soknee has joined #ruby-lang
willdrew has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
wmoxam has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
Gaelan has joined #ruby-lang
glebm has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
nXqd has quit [Ping timeout: 256 seconds]
Technodrome has quit [Quit: Technodrome]
firefux has joined #ruby-lang
wmoxam has quit [Ping timeout: 260 seconds]
__butch__ has quit [Quit: Leaving.]
pr0ton has quit [Ping timeout: 240 seconds]
pr0ton has joined #ruby-lang
Guest85414 has quit [Ping timeout: 258 seconds]
io_syl has quit [Ping timeout: 246 seconds]
Guest85414 has joined #ruby-lang
io_syl has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
outoftime has quit [Quit: Leaving]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
srbaker has joined #ruby-lang
wmoxam has joined #ruby-lang
roobnoob2013 has joined #ruby-lang
toretore has joined #ruby-lang
havenwood has quit [Ping timeout: 255 seconds]
chrismar035 has quit [Quit: chrismar035]
ivanoats has joined #ruby-lang
clov3r has joined #ruby-lang
mrfelix has quit [Quit: Computer has gone to sleep.]
gix has quit [Ping timeout: 272 seconds]
fosky has joined #ruby-lang
wmoxam has quit [Ping timeout: 240 seconds]
ddd has joined #ruby-lang
ddd is now known as Guest74013
<zenspider> blowmage: oi
Guest74013 is now known as ddd
tpope has quit [Ping timeout: 252 seconds]
ddd has quit [Client Quit]
ddd has joined #ruby-lang
gix has joined #ruby-lang
nXqd has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
mjio has joined #ruby-lang
ddd has quit [Client Quit]
Averna has joined #ruby-lang
bantic has quit [Quit: bantic]
nXqd has quit [Ping timeout: 264 seconds]
toertore has joined #ruby-lang
ahf_ has joined #ruby-lang
ahf_ has quit [Changing host]
ahf_ has joined #ruby-lang
ddd has joined #ruby-lang
ddd has quit [Client Quit]
eam_ has joined #ruby-lang
firefux has left #ruby-lang [#ruby-lang]
ddd has joined #ruby-lang
roobnoob2013 has left #ruby-lang [#ruby-lang]
<whitequark> zenspider: what do YOU think about reporting errors like this? https://gist.github.com/whitequark/0525966cc1da7f60e962
agarie_ has joined #ruby-lang
toretore has quit [Ping timeout: 276 seconds]
amerine_ has joined #ruby-lang
tylersmith_ has joined #ruby-lang
narya has joined #ruby-lang
havenwood has joined #ruby-lang
chao_ has joined #ruby-lang
setmeaway2 has joined #ruby-lang
wudofyr_ has joined #ruby-lang
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
<blowmage> zenspider: hah
<blowmage> heh, rather
ahf has quit [Ping timeout: 258 seconds]
eam has quit [Ping timeout: 258 seconds]
narya_ has quit [Ping timeout: 258 seconds]
ahf_ is now known as ahf
symm-_ has joined #ruby-lang
steez_ has joined #ruby-lang
beawesomeinstead has quit [Ping timeout: 258 seconds]
bryanl_ has joined #ruby-lang
threeday1onk has joined #ruby-lang
Oloryn_lt2 has quit [Read error: Connection reset by peer]
mitchty has quit [Ping timeout: 258 seconds]
Oloryn_lt2 has joined #ruby-lang
mitchty has joined #ruby-lang
techlife has quit [Ping timeout: 246 seconds]
valeri_uF0 has joined #ruby-lang
wmoxam has joined #ruby-lang
wmoxam has quit [Client Quit]
techlife has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
sepp2k has quit [Ping timeout: 272 seconds]
Weems2 is now known as Weems
Weems has quit [Changing host]
Weems has joined #ruby-lang
agarie has quit [Ping timeout: 272 seconds]
amerine has quit [Ping timeout: 272 seconds]
Qwak has quit [Ping timeout: 272 seconds]
wudofyr has quit [Ping timeout: 272 seconds]
steez has quit [Ping timeout: 272 seconds]
tylersmith has quit [Ping timeout: 272 seconds]
sonne has quit [Ping timeout: 272 seconds]
symm- has quit [Ping timeout: 272 seconds]
setmeaway has quit [Ping timeout: 272 seconds]
amerine_ is now known as amerine
bryanl has quit [Ping timeout: 272 seconds]
chao has quit [Ping timeout: 272 seconds]
vbatts has quit [Ping timeout: 272 seconds]
valeri_ufo has quit [Ping timeout: 272 seconds]
naquad has quit [Ping timeout: 272 seconds]
threedaymonk has quit [Ping timeout: 272 seconds]
vereteran has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 245 seconds]
havenwood has quit [Ping timeout: 245 seconds]
sonne has joined #ruby-lang
vbatts has joined #ruby-lang
tylersmith_ is now known as tylersmith
mrsolo has quit [Quit: Leaving]
techlife has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Max SendQ exceeded]
ivanoats has quit [Remote host closed the connection]
anonymuse has quit [Quit: Leaving...]
robbyoconnor has joined #ruby-lang
soknee has quit [Quit: Leaving.]
Markvilla has joined #ruby-lang
ddd has quit [Quit: Lost terminal]
<lewis1711> rking: https://gist.github.com/lewis1711/5288632 (on the off chance you're still around)
msch has joined #ruby-lang
snafoo has quit [Quit: Leaving]
valeri_uF0 has left #ruby-lang [#ruby-lang]
valeri_ufo has joined #ruby-lang
<drbrain> lewis1711: why require 'open-uri'?
TheNotary has joined #ruby-lang
pib1999 has joined #ruby-lang
<lewis1711> think I saw it on a tutorial for mechanize somewhere
<drbrain> mechanize doesn't use open-uri
ddd has joined #ruby-lang
<lewis1711> yeah, removed it
matled has quit [Remote host closed the connection]
matled has joined #ruby-lang
lsumner has joined #ruby-lang
alessio_rocco has quit [Quit: Lost terminal]
<drbrain> your def WeatherChannel.report and so on is …
<drbrain> interesting
techlife has joined #ruby-lang
<lewis1711> Yes, I am not sure about the structure of the thing
<lewis1711> do you have a better idea?
<drbrain> if you're just going to have it be in this script, its fine
matled has quit [Remote host closed the connection]
<drbrain> otherwise I'd make a WeatherReport class and have def weather_underground; def weather_channel, etc
msch has quit [Ping timeout: 256 seconds]
<lewis1711> makes sense
<lewis1711> this little exercise has really made me hate weather.com. for it's weird html layout
soknee has joined #ruby-lang
Guest85414 has quit [Ping timeout: 256 seconds]
wang has quit [Ping timeout: 256 seconds]
matled has joined #ruby-lang
<lewis1711> ugh, accuweather auto-converts to fahrenheit when you ask about an american location. oh well, works fine for my country lol
wang has joined #ruby-lang
Boohbah has joined #ruby-lang
<TheNotary> I recently wrote a unit test that I have mixed feelings about. It was handy for TDD, but now that development is complete, if the method gets refactored/moved the person doing the refactoring will have to keep coming back and changing every reference to the method. Is there a pretty way to dry it up so they would only need to change one line if they moved the method from say one module into a class?
Aria has quit [Remote host closed the connection]
Aria has joined #ruby-lang
msch has joined #ruby-lang
<drbrain> TheNotary: this unit test is just fine as it is
vbatts has quit [*.net *.split]
<TheNotary> what about if I move the #parse_youtube_id(url) method directly into the class which utilizes it? I'm thinking that's the most logical way to represent the code.. but come to think of it, i'm not even sure how to do a thorough unit test on an instance method
<rking> lewis1711: This is really interesting.
<rking> I'm not sure how/if to critique it. =)
<drbrain> TheNotary: then you move the test to the appropriate location as well
<TheNotary> hmm
eban has quit [Ping timeout: 256 seconds]
<drbrain> TheNotary: while I'm developing new features it's quite common for me to move or rename the method a couple times until I'm happy that its name and location make sense
eban has joined #ruby-lang
lsumner has quit [Remote host closed the connection]
<lewis1711> rking: interesting? heh in what way?
<TheNotary> k, thats good to hear, thanks
<rking> lewis1711: The way it does pretty much everything. How it uses those constants kind of like class names, but they're just the result of link.click, etc.
<rking> lewis1711: What other programming langs do you know?
<drbrain> TheNotary: also, DRY isn't just "duplication is bad": http://c2.com/cgi/wiki?DontRepeatYourself
vbatts has joined #ruby-lang
<lewis1711> rking: C, Java, scheme/racket, haskell. for a given value of "know" :)
ivanoats has joined #ruby-lang
idkazuma has joined #ruby-lang
chao has joined #ruby-lang
<rking> lewis1711: Well, you basically have some rather nonstandard Ruby code, here. You've managed to organize the 6 major blocks of code (the path walking for all 3 pairs of current and extended forecasts), plus the before/after preambles.
ivanoats has quit [Remote host closed the connection]
<rking> Also how it uses Google to first search... just a bouquet of odd things throughout. =)
jstemmer has quit [Ping timeout: 256 seconds]
<drbrain> rking: I wouldn't say there's anything particularly wrong with it, just that it's unusual
<lewis1711> haha yeah. I originally searched each site individually, but it got hard to synch things up (say searching for somewhere like "Springfield" or "Belfast" which could be any number of places in the world)
jstemmer has joined #ruby-lang
chao_ has quit [Ping timeout: 255 seconds]
<rking> drbrain: Yeah. Kinda cool in some ways.
<TheNotary> drbrain: that paper and c2.com are great! Thanks for the link
<eam_> is this a bug? It sure looks like a bug: https://gist.github.com/eam/5288815
<drbrain> eam_: it is your bug
<rking> TheNotary: The c2 page can be better, if you deign to click edit!
<drbrain> eam_: octal numbers only go up to 7
chao has quit [Ping timeout: 240 seconds]
<drbrain> per place
randallagordon has quit [Read error: Connection reset by peer]
<eam_> drbrain: yes I'm aware -- the bug is that it's considering it as octal
<eam_> that's not part of sprintf
<drbrain> you put a 0 in front of it, so it is octal
<eam_> and it's not in line with the to_i or to_f semantics
<eam_> drbrain: no, read the rest of it
<eam_> sprintf "%d", "020".to_i
<rking> eam_: Hehe, what would you propose be changed about it?
<rking> * without breaking tons of existing code.
<eam_> why would sprintf arguments have divergant string to numeric logic?
<eam_> rking: stuck with buggy behavior is one thing, but it is a bug yes?
<drbrain> eam_: sprintf uses Kernel#Integer, not String#to_i
<eam_> ah
eam_ is now known as eam
<drbrain> String#to_i is more lax