apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
outoftime has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
BlaXpirit has quit [Quit: Quit Konversation]
tenderlove has quit [Read error: Connection reset by peer]
outoftime has quit [Client Quit]
gregmore_ has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
chimkan has quit [Quit: chimkan]
gregmoreno has joined #ruby-lang
<banistertab> Drbrain what does the "ep" member of rb_control_frame_t do?
pkrnj has quit [Quit: Computer has gone to sleep.]
<drbrain> unsure
<drbrain> oh, it seems to be the environment pointer
<drbrain> around line 389: *envptr = VM_ENVVAL_PREV_EP_PTR(pcfp->ep);
<charliesome> mri needs a lot more internal documentation
seanstickle has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 244 seconds]
<banistertab> Seems to have superceded lfp and dfp in from 1.9
<zzak> charliesome: write a README.VM
CaptainJet has joined #ruby-lang
<charliesome> zzak: have you read the python source?
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
<zzak> nope
<banistertab> Python core are english speakers
<banistertab> Ruby core are generalky not
sn0wb1rd has joined #ruby-lang
<charliesome> banistertab: even if it were documented in japanese that'd be helpful
<charliesome> the problem is programmers just hate documenting
<seanstickle> s/programmers/everyone/
<zzak> i dont!
<zzak> one of my favorite ways of learning
<charliesome> zzak: you're a rare exception
sent-hil has quit [Remote host closed the connection]
aeberlin has quit [Quit: Leaving]
fire_wall has quit [Ping timeout: 252 seconds]
<seanstickle> Well, I'm a fan of Literate Programming, so we prefer to write documentation
<seanstickle> The code is sort of an afterthought
Mellett68 has quit [Remote host closed the connection]
Axsuul has joined #ruby-lang
wardrop has quit [Ping timeout: 260 seconds]
slyphon__ has quit [Ping timeout: 245 seconds]
wardrop has joined #ruby-lang
cirwin has left #ruby-lang [#ruby-lang]
dalekurt has quit [Quit: I'll be back!]
wardrop has quit [Quit: wardrop]
wardrop has joined #ruby-lang
fire_wall has joined #ruby-lang
slyphon__ has joined #ruby-lang
pkrnj has joined #ruby-lang
thone has joined #ruby-lang
thone_ has quit [Ping timeout: 250 seconds]
babinho has quit [Remote host closed the connection]
gregmoreno has quit [Ping timeout: 255 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
CaptainJet has quit []
kentos has quit [Quit: Leaving]
robotmay has quit [Remote host closed the connection]
robotmay has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
Assurbanipal has joined #ruby-lang
robotmay has quit [Ping timeout: 264 seconds]
Banistertab` has joined #ruby-lang
banistertab has quit [Read error: Connection reset by peer]
Assurbanipal has quit [Client Quit]
sailias has joined #ruby-lang
waffleau has joined #ruby-lang
apeiros_ has joined #ruby-lang
Banistertab` has quit [Ping timeout: 252 seconds]
apeiros_ has quit [Ping timeout: 255 seconds]
simi has quit [Ping timeout: 244 seconds]
<foucist> seanstickle: do you use folding for that too?
<soahccc> Just wondered if there is a system() which gives me the result as string. Backticks aren't in the user's context and %x[] gives me always this: sh: echo "something": command not found
<seanstickle> foucist: folding?
marr has quit [Ping timeout: 240 seconds]
<drbrain> soahccc: what's in your %x[] ?
<drbrain> and, what OS?
Croms has quit [Read error: Connection reset by peer]
<foucist> seanstickle: in the editor, is the doc mixed right in the code?
Croms has joined #ruby-lang
<foucist> documentation*
<seanstickle> foucist: doc mixed into the code? no. you miss the idea of literate programming.
<seanstickle> the code is littered among the documentation.
<soahccc> OS X but can't I pass arguments? %x["ls"] works, %x["ls -al"] not
cczona has joined #ruby-lang
<drbrain> soahccc: what happens when you type '"ls -al"' at your prompt?
<drbrain> soahccc: I get: -bash: ls -al: command not found
cczona has quit [Client Quit]
<soahccc> oh I see... Didn't need those bloody brackets >:/
<drbrain> :D
<soahccc> I mean the quotes :< It's to late I guess
<drbrain> soahccc: either!
<foucist> seanstickle: ok, do you use vim? any particular setup at all to help?
<drbrain> foucist: I use almost no plugins with vim
<seanstickle> foucist: vim, yes.
<seanstickle> foucist: but pretty much stock, a couple of plugins, but nothing specific to literate programming.
lsegal` has joined #ruby-lang
lsegal` has quit [Client Quit]
davidbalber|away is now known as davidbalbert
<foucist> cool
<soahccc> Hmm doesn't solve it either... What do I have to do so that aliases works? with system() they work but with no other form
lsegal has joined #ruby-lang
<seanstickle> I should probably use more plugins for this.
<drbrain> soahccc: maybe popen or Process.spawn?
mjio has quit []
wardrop has quit [Quit: wardrop]
<soahccc> drbrain: Hmm can't get it to work with spawn really... Could be so easy :( I know a gem which works but I don't want that dependency just because I can't capture system's output
blazes816 has quit [Quit: blazes816]
<drbrain> soahccc: Process.spawn is a bit of work, you have to do something like in, out = IO.pipe; pid = Process.spawn command, out: in, err: in; Process.wait pid; out.read
<soahccc> Yeah I've got that but it already died when I tried to read from it
<drbrain> soahccc: popen or open3 should do it, they ship in ruby
<soahccc> popen doesn't have user aliases either.
<drbrain> :/
<soahccc> and the session gem accomplishes that by calling a bash login
<soahccc> With all this problems I wonder if it is supposed to work with system()
tenderlove has quit [Read error: Operation timed out]
runeb has joined #ruby-lang
jsilver has quit [Quit: poserchats]
<soahccc> According to some articles system and backticks should behave the same as they both uses subshells instead of subprocesses like popen does.
sent-hil has joined #ruby-lang
stardiviner has joined #ruby-lang
banisterfiend has joined #ruby-lang
<foucist> seanstickle: any tips on writing the documentation? rules of thumbs?
<drbrain> popen can spawn a subshell as well, under certain conditions
wardrop has joined #ruby-lang
<seanstickle> foucist: write an essay about the software you are building. code gets interspersed in the essay in whatever order you like.
<seanstickle> It's basically writing a very nice LaTeX file with code blocks in whatever order makes sense to write about it, rather than the order that the compiler/interpreter wants to see
<foucist> ok
runeb has quit [Ping timeout: 248 seconds]
<seanstickle> foucist: the literate programming tool then reorders the code so the interpreter can process it
Drekonus has joined #ruby-lang
thatdutchguy has quit [Remote host closed the connection]
<firefux> do you guys find you are more productive on the desktop than on the laptop?
<seanstickle> Nope.
<seanstickle> All laptop all the time for me.
waffleau has quit [Quit: waffleau]
<soahccc> drbrain: I'll stick with the session gem for now... It's slower but I'll fix that up later
<soahccc> Thanks for the help anyway
<foucist> firefux: i haven't had a desktop since 2007, sometimes i miss the sweet ergonomic setup with a ergonomic keyboard, comfy computer chair etc.. but if you have a nice portable laptop you can change environment through out the day and that can help some people be more productive.. or not :P
<foucist> firefux: also for awhile i would just plug the laptop into a monitor/keyboard etc at home.. before i started travelling heavily
rsl has quit [Quit: Computer has gone to sleep.]
faustman has quit [Read error: Connection reset by peer]
ryanlecompte has quit [Remote host closed the connection]
faustman has joined #ruby-lang
mjio has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
sent-hil has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby-lang
sepp2k has joined #ruby-lang
jds_ has joined #ruby-lang
jds has quit [Read error: Operation timed out]
krohrbaugh has quit [Quit: Leaving.]
faustman has quit [Ping timeout: 260 seconds]
Aiur has quit [Quit: Computer has gone to sleep.]
slyphon__ is now known as slyphon
kain has quit [Quit: exit]
ryanlecompte has joined #ruby-lang
kain has joined #ruby-lang
havenn has quit [Remote host closed the connection]
jbsan_ has joined #ruby-lang
towski has quit [Remote host closed the connection]
jbsan has quit [Ping timeout: 246 seconds]
jbsan_ is now known as jbsan
macmartine has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
io_syl has quit [Ping timeout: 264 seconds]
krz has joined #ruby-lang
<Drekonus> firefux: I've really enjoyed a 13" MBP with an upgrade 2TB HDD for on the go, then when I'm at home I use an external 24" monitor with external mouse and touchpad/mouse. Win.
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ryanlecompte has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
lushious has joined #ruby-lang
waffleau has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
sn0wb1rd has joined #ruby-lang
headius has quit [Quit: headius]
bluepojo has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
spuk has quit [Ping timeout: 244 seconds]
Andvari3D has quit [Ping timeout: 246 seconds]
spuk has joined #ruby-lang
xyzodiac has quit [Ping timeout: 252 seconds]
m3nd3s has quit [Ping timeout: 246 seconds]
jsilver has joined #ruby-lang
elcapo has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
m3nd3s has joined #ruby-lang
brianpWins has joined #ruby-lang
pkrnj has joined #ruby-lang
pkrnj has quit [Client Quit]
Mellett68 has joined #ruby-lang
headius has joined #ruby-lang
stonerfish has joined #ruby-lang
elcapo has left #ruby-lang [#ruby-lang]
havenn has joined #ruby-lang
runeb has joined #ruby-lang
Drekonus has quit [Quit: Leaving.]
JohnBat26 has joined #ruby-lang
kingcrawler has joined #ruby-lang
runeb has quit [Ping timeout: 255 seconds]
headius has quit [Quit: headius]
havenn has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
rohit has joined #ruby-lang
ryanf has quit [Quit: leaving]
pkrnj has joined #ruby-lang
macmartine has joined #ruby-lang
tdy has quit [Ping timeout: 246 seconds]
tdy has joined #ruby-lang
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
macmartine has quit [Quit: Computer has gone to sleep.]
tjadc has quit [Read error: Connection reset by peer]
seanstickle has quit [Quit: seanstickle]
tjadc has joined #ruby-lang
waffleau_ has joined #ruby-lang
waffleau has quit [Read error: Connection reset by peer]
slyphon has quit [Ping timeout: 245 seconds]
headius has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
jxie has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
jbsan_ has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
headius has quit [Quit: headius]
towski has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
chimkan has joined #ruby-lang
jsilver has joined #ruby-lang
mindbender1 has joined #ruby-lang
JohnBat26|2 has joined #ruby-lang
mjio has quit []
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chimkan has quit [Quit: chimkan]
<ggreer> SSD
<ggreer> I can't live without one. any computer with a normal hard drive feels broken
<ggreer> my setup is an 11" air. I plug it into a 27" monitor at home
mars26 has joined #ruby-lang
slyphon has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
cantonic_ has joined #ruby-lang
waffleau_ has quit [Quit: waffleau_]
davidbalbert is now known as davidbalber|away
retro|cz has joined #ruby-lang
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
burgestrand has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
areil has joined #ruby-lang
rohit has quit [Quit: Leaving]
sepp2k has quit [Remote host closed the connection]
tjadc has quit [Ping timeout: 244 seconds]
slyphon has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby-lang
gnufied has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
wardrop has quit [Quit: wardrop]
wyhaines has quit [Remote host closed the connection]
kingcrawler has quit [Quit: Computer has gone to sleep]
Mon_Ouie has quit [Ping timeout: 248 seconds]
bastilian has joined #ruby-lang
tenderlove has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
jsilver has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
jsilver has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
dc5ala has joined #ruby-lang
tenderlove has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
tenderlove has quit [Read error: Connection reset by peer]
tjadc has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
PhilCK has joined #ruby-lang
solars has joined #ruby-lang
PhilCK has quit [Client Quit]
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby-lang
robbyoconnor has joined #ruby-lang
kitallis has joined #ruby-lang
waffleau has joined #ruby-lang
runeb has joined #ruby-lang
runeb has quit [Ping timeout: 255 seconds]
luikore has joined #ruby-lang
rippa has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
charliesome has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Read error: Connection reset by peer]
mindbender1 has quit [Ping timeout: 265 seconds]
dr_bob has joined #ruby-lang
fire_wall has quit [Ping timeout: 252 seconds]
<yorickpeterse> Morning
rippa has quit [Ping timeout: 264 seconds]
<charliesome> evening
towski has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
dous has quit [Ping timeout: 260 seconds]
turbolihis has quit [*.net *.split]
Guedes has quit [*.net *.split]
jarib has quit [*.net *.split]
xsdg has quit [*.net *.split]
hackeron has quit [*.net *.split]
nibbo_ has quit [*.net *.split]
soahccc has quit [*.net *.split]
jasiek has quit [*.net *.split]
matled has quit [*.net *.split]
yibe_ has quit [*.net *.split]
cout has quit [*.net *.split]
nibbo has joined #ruby-lang
turbolihis has joined #ruby-lang
xsdg has joined #ruby-lang
jasiek has joined #ruby-lang
soahccc has joined #ruby-lang
cout has joined #ruby-lang
matled has joined #ruby-lang
hackeron has joined #ruby-lang
jarib has joined #ruby-lang
Guedes has joined #ruby-lang
Guedes has quit [Changing host]
Guedes has joined #ruby-lang
fire_wall has joined #ruby-lang
yibe_ has joined #ruby-lang
bastilian has quit [Quit: Leaving...]
judofyr has joined #ruby-lang
fire_wall has quit [Ping timeout: 260 seconds]
cardoni has joined #ruby-lang
apeiros_ has joined #ruby-lang
rolfb has joined #ruby-lang
faustman has joined #ruby-lang
ryanf has joined #ruby-lang
fire_wall has joined #ruby-lang
bastilian has joined #ruby-lang
rue has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
runeb has joined #ruby-lang
zmack has joined #ruby-lang
rue has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
Averna has joined #ruby-lang
rue has quit [Remote host closed the connection]
runeb has quit [Ping timeout: 246 seconds]
m3nd3s has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
cardoni has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
zmack_ has joined #ruby-lang
agib has quit [Remote host closed the connection]
Assurbanipal has joined #ruby-lang
zmack has quit [Ping timeout: 240 seconds]
Assurbanipal has quit [Remote host closed the connection]
Assurbanipal has joined #ruby-lang
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 255 seconds]
r0bby has quit [Read error: Connection reset by peer]
r0bby has joined #ruby-lang
mercwithamouth has joined #ruby-lang
robotmay has joined #ruby-lang
henrikhodne has joined #ruby-lang
r0bby_ has joined #ruby-lang
<henrikhodne> Does the #[] method in Ruby have a name?
marr has joined #ruby-lang
agarcia has joined #ruby-lang
<judofyr> henrikhodne: #[]
adambeynon has joined #ruby-lang
r0bby has quit [Ping timeout: 250 seconds]
<henrikhodne> judofyr: Well, duh. I meant a name that doesn't use those characters (for a filename).
<henrikhodne> Or do most file systems support "[]" in filenames?
<judofyr> henrikhodne: :) hm… I'm actually not sure
<henrikhodne> I seem to remember seeing a name at some point, but I can't recall what it is.
<rolfb> pickaxe calls it element reference
<rolfb> it seems
<rolfb> doesn't seem apt
zmack_ has quit [Remote host closed the connection]
<judofyr> rolfb: element acccess? element getter?
<judofyr> hm…
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<apeiros_> "the brackets method"? (haven't really come across a name)
* henrikhodne just called the file bracket_spec.rb for now.
<henrikhodne> It works.
retro|cz has quit [Ping timeout: 244 seconds]
<judofyr> henrikhodne: you need a whole file for just #[]?
<henrikhodne> judofyr: I split my specs out by methods. Not the most conventional way of doing it, but I liked the idea and wanted to try it,
agib has joined #ruby-lang
<judofyr> henrikhodne: sounds like an interesting experiment, but mine #[] are often just a single line
coffeejunk has joined #ruby-lang
<henrikhodne> judofyr: My implementation is just a single line too: def [](range); to_s[range]; end
<rolfb> henrikhodne: square bracket notation
<rolfb> :P
bastilian has quit [Quit: Linkinus - http://linkinus.com]
mercwithamouth has quit [Ping timeout: 252 seconds]
waffleau_ has joined #ruby-lang
waffleau has quit [Read error: Connection reset by peer]
dbussink has quit [Quit: Coyote finally caught me]
mroth has quit [Remote host closed the connection]
dbussink has joined #ruby-lang
rikkus has quit [Remote host closed the connection]
kitallis has quit [Read error: Connection reset by peer]
jds__ has joined #ruby-lang
runeb has joined #ruby-lang
dbussink has quit [Quit: Coyote finally caught me]
kitallis has joined #ruby-lang
dbussink has joined #ruby-lang
robotmay has quit [Remote host closed the connection]
gaveen has quit [Ping timeout: 246 seconds]
runeb has quit [Ping timeout: 246 seconds]
yaroslav has joined #ruby-lang
workmad3 has joined #ruby-lang
Averna has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
yaroslav has quit [Quit: yaroslav]
faustman has quit [Ping timeout: 244 seconds]
mroth has joined #ruby-lang
rikkus has joined #ruby-lang
GarethAdams has joined #ruby-lang
jds__ is now known as jds
rue has joined #ruby-lang
krz has quit [Quit: krz]
ryanf has quit [Quit: leaving]
rue has quit [Ping timeout: 252 seconds]
rue has joined #ruby-lang
leopard_me has joined #ruby-lang
mars777 has quit [Quit: mars777]
gnufied has quit [Quit: Leaving.]
lele|w has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
<rolfb> what colorschemes are people using nowadays?
<judofyr> molokai
<rolfb> trying
stardiviner has joined #ruby-lang
<andrewvos> tomorrow-night for terminal and bclear for vim
fire_wall is now known as hack
* henrikhodne is using Tomorrow Night in Sublime.
<judofyr> andrewvos: tomorrow-night looks nice
<judofyr> rolfb: also, that's a custom monospace font that Rob made ;)
<andrewvos> judofyr: It's great
<rolfb> judofyr; wait what?
<rolfb> custom monospace font where?
<judofyr> rolfb: ah. sorry. I tried to take a screenshot, but Skitch crashed
<judofyr> rolfb: so I went to the water dispenser instead. and thought I pasted the screenshot.
<judofyr> rolfb: here you go: http://cl.ly/image/392T1D1p1C19
<andrewvos> sexy
<andrewvos> can hav?
<rolfb> i'd like to take that for a spin too
lele|w has joined #ruby-lang
<judofyr> it's still in beta
<judofyr> but I can ask
<rolfb> judofyr: i can ask rob myself
<andrewvos> A font, in beta? You're taking the piss
<rolfb> andrewvos: fonts are complex
<rolfb> :P
<andrewvos> Apparently
<judofyr> andrewvos: doing a proper hinting of a font can take weeks :)
* andrewvos pretends to know what that even means
<andrewvos> judofyr: Where do you work?
<judofyr> andrewvos: http://nordaaker.com/
ioga_wrk has quit [Read error: Operation timed out]
<henrikhodne> Hold on, Youngstorget 3? I've spent way too many nights just down the street from there.
<andrewvos> Cool site
<henrikhodne> Oslo is too small.
gnufied has joined #ruby-lang
<judofyr> :)
<andrewvos> haha there's a pic of Magnus on there :)
<judofyr> andrewvos: crappy one :P
tjadc has quit [Read error: Connection reset by peer]
<andrewvos> judofyr: You spelled disciplines wrong http://nordaaker.com/omoss.html
<andrewvos> judofyr: Is it nice working for a small company?
<judofyr> andrewvos: yes. although I haven't worked for any big companies :P
<judofyr> oh
<judofyr> it's lunch
<judofyr> brb
ioga_wrk has joined #ruby-lang
<rolfb> lunch!
<rolfb> bb in 25
<judofyr> brb where r = 30 mins
* henrikhodne wishes he could eat lunch or some meal.
<henrikhodne> However, not that many places are open at 5 AM.
<rolfb> henrikhodne: the trick is to STOCK UP
<rolfb> :P
<henrikhodne> rolfb: Yes, I need to restock soon. Winter break is in not too long though, so I don't want to restock too much.
cultureulterior_ has joined #ruby-lang
hack has quit [Read error: Operation timed out]
madish has joined #ruby-lang
m3nd3s has joined #ruby-lang
nerd has joined #ruby-lang
nerd is now known as hack
ddd has joined #ruby-lang
sepp2k has joined #ruby-lang
banisterfiend has joined #ruby-lang
<gnufied> working for big companies is best. you get natural tubelight tan (for working in artificial light all the time), some operate from so called IT parks, security there make you feel like terrorist (without visiting airports)
<gnufied> and that is tip of goldberg
jds has quit [Ping timeout: 250 seconds]
retro|cz has joined #ruby-lang
<banisterfiend> zenspider: did u see all those mean tweets about minitest yesterday?
GarethAdams has quit [Remote host closed the connection]
GarethAdams|Work has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<judofyr> banisterfiend: mean tweets?
<judofyr> ah, @brixen
<judofyr> and @bascule
rohit has joined #ruby-lang
<banisterfiend> judofyr: yeah
waffleau has joined #ruby-lang
waffleau_ has quit [Read error: Connection reset by peer]
<judofyr> @brixen is Mr. Angry Man :/
vlad_starkov has quit [Remote host closed the connection]
cultureulterior_ has quit [Ping timeout: 240 seconds]
cultureulterior_ has joined #ruby-lang
<rolfb> oh, i dunno
<andrewvos> I find thi strange. I quite like minitest.
<rolfb> i haven't seen this btw
<rolfb> what's the gist?
<andrewvos> rolfb: People bitching about minitest
<rolfb> on what grounds?
<andrewvos> I don't care enough to be able to read the tweets.
agnitio has joined #ruby-lang
<judofyr> rolfb: here's the gist: https://gist.github.com/4221051
<rolfb> judofyr: had a feeling you would do that
<andrewvos> BEst thing I've seen today
mindbender1 has joined #ruby-lang
rohit has quit [Quit: Leaving]
<judofyr> rolfb: I so agree with zenspider there
<rolfb> got a point there
<rolfb> i prefer expect() either way ;)
<judofyr> woah
<judofyr> I just googled it
<andrewvos> "Object Pollution" is bad.
<judofyr> and this is the first example
<judofyr> "expect{Counter.increment}.to change{Counter.count}.from(0).to(1)"
<andrewvos> Seems like a valid argument.
<judofyr> seems terrible
<andrewvos> IF YOU'RE AN ASSHOLE
<rolfb> judofyr: that's probably the old one
<judofyr> andrewvos: "Well no, actually. If your argument is against global pollution, then anything > 0 is bad. You can't have it both ways. As pointed out elsewhere, I always scope my methods on object to must_* and wont_* so it really isn't any worse than your should/should_not."
<andrewvos> judofyr: That whole argument seems like trolling
<rolfb> judofyr: the new thing happened in 2.1 i think
<andrewvos> judofyr: hahaha "Also, as I've pointed out, you can disable the expectation methods in minispec. Clearly 0 methods infecting Object is better than your 2. Right? I mean... I do get to use your own logic against you, right?
<judofyr> andrewvos: I really dislike the RSpec matcher style do. for me, it's always a game of "should I use a space, dot or underscore here?"
<rolfb> judofyr: the benefit of this verbosity is that you get some nicely formatted documentation
<andrewvos> judofyr: Yeah, I absolutely hate rspec.
<rolfb> and clear error messages
BlaXpirit has joined #ruby-lang
<andrewvos> judofyr: I hate the word should in tests actually. It's like saying "my object should do this, I don't quite know if it does, but yeah, it should be doing this"
<judofyr> rolfb: custom assert messages are pretty useful too :)
<rolfb> hate is so unneccesary
<rolfb> judofyr: custom assert messages?
<rolfb> like custom error message?
<judofyr> rolfb: assert @called, "Callback wasn't called"
<rolfb> yeah, rspec has those too
<judofyr> rolfb: how do they look?
<judofyr> rolfb: nice: "This works for any matcher other than the operator matchers."
<ddd> i like the should. it says "my app should be doing this". The passing or failing of the tests states whether it actually is.
<judofyr> rolfb: I prefer Test::Unit-style assertions, but with contexts and setup/teardown-blocks :)
<rolfb> teardown is very pre-database cleaner?
lushious has quit [Remote host closed the connection]
<judofyr> rolfb: setup/teardown is MiniTest's name for before/after
<rolfb> after is very pre-database cleanr?
<rolfb> ^^
<judofyr> what?
mindbender1 has quit [Ping timeout: 265 seconds]
<rolfb> i can't remember using after/teardown since i've started using database cleaner
<judofyr> rolfb: I've acutally been using it for assertions inside contexts
<rolfb> o_O
<rolfb> judofyr: i'd love to see a contrived example
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
<judofyr> rolfb: it could need some better context/test names though
stardiviner has joined #ruby-lang
<rolfb> oh wow
stardiviner has quit [Client Quit]
banisterfiend has quit [Remote host closed the connection]
<rolfb> looks very procedural
waffleau has quit [Quit: waffleau]
<judofyr> rolfb: this is a rather complex class though. it does a lot
stardiviner has joined #ruby-lang
<rolfb> judofyr: should_receive would look much nicer imho
<judofyr> rolfb: should_receive what?
<judofyr> rolfb: done.should_receive(:call) ?
vlad_starkov has joined #ruby-lang
<rolfb> judofyr: something like that
<rolfb> but i'm really not sure
<rolfb> what you are testing
<rolfb> :D
<judofyr> rolfb: a controller class
<judofyr> this is a test in a web-framework, so it tests that the callback gets called
<judofyr> e.g: get('/') { render :text => "Hello world!" }
<rolfb> hmm
<judofyr> rolfb: I'm not very satisfied with the tests, but yeah, it's a complex class. it's a glue between 5 different classes :/
<rolfb> my first though is that they are very hard to read
<rolfb> and there is a lot of setup going on
<rolfb> and subsequent setups depend on parent setups
<rolfb> thought, even
<judofyr> rolfb: well, yeah. this class requires a lot of setup. I had "one test, one setup" earlier, but it was too much copy-paste
<ddd> now imagine if you were adding in mocks and stubs :)
<judofyr> ddd: I do have some mocks and stubs
banisterfiend has joined #ruby-lang
jbsan_ has quit [Quit: jbsan_]
<banisterfiend> judofyr: i really like bacon
<banisterfiend> at least...i like its speed
<rolfb> judofyr: yeah, it's too complex for me to start editing it. :)
jbsan has joined #ruby-lang
mindbender1 has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
<judofyr> rolfb: I just can't find a way to write this class in a simple way. Controllers need access to *everything*, and thus the unit test becomes messy
<rolfb> it's also a bit confusing that you are mixing extensive setup / integration with mocking later on. also seems like you are testing the controllers understanding of the @stash a lot. what kind of a name is @stash anyway?
<rolfb> :)
<judofyr> rolfb: I consider Transaction/Request/Response as basic objects (like String/Array) so I don't bother mocking them. they are (mostly) data object.
<rolfb> primitives
<rolfb> in other words
<judofyr> yes
<judofyr> rolfb: well, yeah. @stash is probably as good as `params` in Rails. @stash is what the router returns. the router is just a mapping from a path to a stash.
<rolfb> by not having an interface for the stash i think the tests are going to be expensive to change
<judofyr> rolfb: e.g. /items/123 maps to { :controller => "items", :action => "show", :id => "123" }
<judofyr> rolfb: but the stash is just a hash
<judofyr> it even shares 3 letters
<rolfb> heh
<judofyr> that's like over 50%
<rolfb> i thought the project aimed for using good OO-design
<judofyr> rolfb: what would I gain from objectifying @stash?
pab|o has joined #ruby-lang
<rolfb> judofyr: you would gain hiding what "streaming?" means
<rolfb> from the controller
<rolfb> hmm
<rolfb> perhaps you are doing this already
<rolfb> haven't checked how the stash is interpreted
<judofyr> rolfb: it's used for various things. the action is dispatched based on :action or :callback. the controller is looked up based on :controller. the action itself can use it to get access to parts of the URL. (e.g. :id)
<judofyr> that's the basic stuff
<judofyr> rolfb: but it's also a way to say to the controller "wrap this action in a fiber"
<judofyr> or, dispatch the action right away (instead of waiting until the full body is read)
<rolfb> what's the difference between stash and params in the controller?
<judofyr> params is only query parameters + form body
ddd has quit [Quit: rebooting to fix display. damned iStats]
<judofyr> params comes entirely from the user
<judofyr> stash is something you control in your app
<judofyr> stash is trusted, params is not
<rolfb> so it's not like rails' params
icooba has quit [Quit: Textual IRC Client: www.textualapp.com]
<rolfb> man, naming is hard
<judofyr> Rails' params is kinda a merge between my stash and my params
<rolfb> hmm
jbsan has quit [Quit: jbsan]
<judofyr> I prefer keeping them separate
<rolfb> sure
jds has joined #ruby-lang
<rolfb> is stash more of a configuration?
<judofyr> yes
<rolfb> should it have config or configuration in it's name?
<rolfb> :)
<judofyr> well, :id isn't actually configuration though
<rolfb> is it a delivery configuration=?
<judofyr> get("/items/:id").to('item#show')
m3nd3s has quit [Remote host closed the connection]
<judofyr> delivery configuration?
<rolfb> bad word
<judofyr> rolfb: you're going to use it all the time in the controller, so it needs to be short
zmack has joined #ruby-lang
<judofyr> rolfb: I don't like config, because there's also going to be a config that refers to the app-config
ddd has joined #ruby-lang
<rolfb> judofyr: trying to figure out all of stash's responsibilites
<rolfb> lots of them :)
kurko_ has joined #ruby-lang
jds has quit [Ping timeout: 265 seconds]
jxie has quit [Quit: leaving]
<rolfb> judofyr: terribly sorry, but i have to do some work
<judofyr> rolfb: well, the stash is how a router parses a request
<judofyr> or, it's the result from parsing a request
<judofyr> it's all about extracting data from the request, to make it usable for your app
jbsan has joined #ruby-lang
<judofyr> rolfb: no worries :)
vlad_starkov has joined #ruby-lang
<rolfb> judofyr: btw, would love to see how your code turns out if you give yourself a contraint of not using any variable names with less than five letters
<judofyr> rolfb: haha. is it that bad?
<judofyr> rolfb: always interesting talking about this stuff. I do feel that the stash is kinda difficult to explain to Railsers (who are used to merging query string and path parsing)
<rolfb> judofyr: the cogntive load is immense
<rolfb> which either means i'm stupid
banisterfiend has quit [Ping timeout: 252 seconds]
<rolfb> or the code is hard to read
<rolfb> i prefer the latter
<rolfb> but sometimes the former is true
<rolfb> :D
<judofyr> rolfb: interesting. but tx, res, req stays
<rolfb> tx is fine
<rolfb> req is ... fine
<rolfb> res is confusing
<judofyr> oh?
<rolfb> res[ponse|sult]
<judofyr> ah
<judofyr> well, a response is a type of a result ;)
<rolfb> true
<rolfb> would be nice to know what kind of response/result it is
<rolfb> is it generic, or does it have a type?
<judofyr> res is a HTTP response
<rolfb> then http_res would save me a lot of lookup
<judofyr> ugh
<rolfb> ^^
<judofyr> ugly man
<judofyr> ugly, man*
<rolfb> well, i'd rather save those minutes i need to spend figuring out what i can expect to get there
<rolfb> also, http_res is way easier to grep for than res
<rolfb> judofyr: please try grepping your code for "res"
<rolfb> :D
<judofyr> rolfb: then use tx.res instead :D
runeb has joined #ruby-lang
<rolfb> hehe
<rolfb> judofyr; the clean code video on naming is brilliant for this topic btw
<judofyr> rolfb: either you're in an action: res.headers.server = "Foo". or you're working with a tx (from an API): tx = ua.get("http://api/").wait!; tx.res
<rolfb> https://www.google.com/search?q=define:+tx <- cheap shot
<rolfb> :P
<rolfb> fine, i'll ask texas for the response
runeb has quit [Ping timeout: 252 seconds]
<judofyr> rolfb: but yes, there could be request/response instead of req/res
waffleau has joined #ruby-lang
<judofyr> rolfb: but yeah, this is inspired from Perl :/
<judofyr> ;) *
<rolfb> haha
<rolfb> yes
<rolfb> i knew i had seen the type of abbreviations before
s1n4 has joined #ruby-lang
<andrewvos> Is anyone really on app.net?
<judofyr> rolfb: think about it as jargon; you'll have to learn it once, but the same classes are used consistently across the framework. so a `req` on an API call is the same as a `req` in an action
<rolfb> judofyr: readability > consistency
<judofyr> rolfb: there's also verbosity in there :P
<rolfb> verbosity is cheap
willdrew has joined #ruby-lang
<judofyr> transaction = user_agent.get_request('…').wait_in_fiber; transaction.response.json_body
<rolfb> and beneficial in the long term
<judofyr> vs: tx = ua.get('…').wait!; tx.res.json
<judofyr> or maybe it's res.body.json
<judofyr> no, it has to be res.json
<judofyr> nevermind
<rolfb> wait in fiber means it waits for the body before it sends anything back?
<judofyr> rolfb: waits for the whole request. it's async
<judofyr> #get returns a Promise
retro|cz has quit [Ping timeout: 244 seconds]
<judofyr> but yes, it's the resolved when the body and everything has been received
slyphon has joined #ruby-lang
<rolfb> judofyr: what's the size of user_agent's public api
<rolfb> also ... this work thing, i should probably do that
<rolfb> :D
<judofyr> rolfb: get/post/put/delete/post_form + request (which is what the other delegates to). and some attributes (max_redirects, max_connections etc.)
r0bby_ has quit [Ping timeout: 246 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<rolfb> so it wouldn't be a very big stretch to add get_async
<rolfb> and hide the "wait!" or "wait_in_fiber"
retro|cz has joined #ruby-lang
<judofyr> rolfb: promises are useful on their own. and often you want to use them even if you have fibers available.
<judofyr> rolfb: e.g: http://cl.ly/text/1w081S0h2R26
<judofyr> rolfb: that's inside an OAuth2-plugin
<judofyr> promises compose really well
<judofyr> rolfb: used like this: http://cl.ly/image/2D0b453V0W2G
<rolfb> hmm
<rolfb> is this what the controller would look like?
<rolfb> or is this a route layer?
<judofyr> last one, yes
<judofyr> that's a controller
kingcrawler has joined #ruby-lang
bougyman_ has joined #ruby-lang
bougyman_ has quit [Changing host]
bougyman_ has joined #ruby-lang
bougyman has quit [Read error: Operation timed out]
kingcrawler has quit [Client Quit]
<judofyr> rolfb: it's a shortcut for: get('/').to(:callback => proc { … }). this is a Lite-app.
bougyman_ is now known as bougyman
<judofyr> rolfb: for big apps, you would have. get('/login').to('session#login'); or something
<judofyr> this is kinda a route and controller in one :)
<bougyman> seems complicated.
<judofyr> rolfb: I could also have written the controller like this with fibers: token = oauth_token(…).wait!
<judofyr> bougyman: what part? :)
<bougyman> all of it
<judofyr> bougyman: you're very constructive :)
<rolfb> it's not really complicated
<judofyr> bougyman: you can use fibers if that's your style: http://cl.ly/image/3Z2f2F3k3q0a
<judofyr> bougyman: but yes, async stuff is usually more complicated than sync stuff
<bougyman> guess i'm just not fond of dsls for webwork
<judofyr> bougyman: DSL? are you talking about the router? #get?
<bougyman> i don't see how the end-result has to be more complicated.
<judofyr> this is way less DSL than Rails :)
<bougyman> but way more than what I'm used to.
<judofyr> bougyman: what are you used to?
<bougyman> in innate and ramaze, methods route themselves.
<bougyman> def index(onearg, twoarg); stuff; end
<bougyman> which routes /onearg/twoarg
<judofyr> bougyman: that seems way more complex in my head.
<bougyman> def index(onearg, twoarg = nil); stuff; end
<bougyman> which routes /onearg _or_ /onearg/twoarg
<judofyr> automatically parsing method parameters = magic stuff
<bougyman> seems very ruby to me.
<judofyr> I also like a central router
<bougyman> this is why we have choices!
<judofyr> bougyman: and what about /items/123/comments/456 ?
<judofyr> how would you map that?
slyphon has quit [Ping timeout: 245 seconds]
Guedes has quit [Ping timeout: 240 seconds]
kith_ has joined #ruby-lang
<bougyman> judofyr: depends on how long.
<judofyr> bougyman: very long
mindbender1 has quit [Ping timeout: 265 seconds]
<judofyr> bougyman: :P
<judofyr> I have no idea what you mean :P
<bougyman> if only 4, i'd probably do def index(id, more = nil, more_id = nil)
<bougyman> to allow /items/123 orr /items/123/comments or /items/123/tags/12
<bougyman> that'd be in the Items controller
<judofyr> bougyman: but I want …/comments/123 to go to one action and …/tags/123 to go to another
<bougyman> and it will/would
mars26 has quit [Ping timeout: 260 seconds]
kith has quit [Ping timeout: 244 seconds]
spuk has quit [Ping timeout: 252 seconds]
<darix> can i have one method handling /items/123/comments/X and one method /items/123/tags/12 or do i have to make that "routing" with if/else|case/when inside the index method?
hack is now known as video
<bougyman> you could do the typical route mapping or you could put the logic in items index method
<bougyman> you have the choice.
<bougyman> that's why I said "how long" if it's a wealth of possible options I prefer the optional args and handling the business logic in the method. if it's just one (like comments), probably a route map.
scottschecter has joined #ruby-lang
<judofyr> bougyman: here's my router's version: http://hastebin.com/xifuginowi.rb
<bougyman> yeah that's a lot
methods has joined #ruby-lang
jds has joined #ruby-lang
<bougyman> Innate::Route[ %r!/items/\d+/comments/(\d+)! ] = "/comments/%d"
<judofyr> bougyman: you can also chain it: http://hastebin.com/dohiqupeno.rb
video has quit [Quit: WeeChat 0.3.9.2]
<judofyr> bougyman: or you can flatten it:
nerd has joined #ruby-lang
<judofyr> r.get('/items/:item_id/comments/:id').to('comments#show')
methods has quit [Client Quit]
methods has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
<judofyr> bougyman: I'll probably add a resource-helper too
babinho has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Guedes has joined #ruby-lang
<judofyr> bougyman: maybe I'll even implement non-central routes via a plugin ;)
jbsan has quit [Quit: jbsan]
<bougyman> Innate::Route can have a lambda on the right side, that's where complex junk can be done.
<bougyman> nnate::Route[ 'name of route' ] = lambda{ |path, request| do_stuff }
gnufied has joined #ruby-lang
<judofyr> bougyman: that seems complicates to me. having some routes in a global state, other spread across your application
<bougyman> judofyr: that's not generally how it's done.
<bougyman> many put all their Route entries in one file.
<bougyman> it's not mandated, you certainly _could_ have them all over the place.
<bougyman> but that'd be bad, I agree.
<judofyr> but doesn't it use the method parameters? :S
<judofyr> (that's what I meant about "spread across your application")
<bougyman> sure, but those are the 'natural routes'
<bougyman> you have to have controller methods anyway
<bougyman> if they also take care of routing by their very definition that's a win, to me.
jbsan has joined #ruby-lang
<bougyman> so only 'special' routes end up being defined with Innate::Route
<bougyman> most of my ramaze/innate apps have no Route entries, just the method mappings.
bhus has joined #ruby-lang
mindbender1 has joined #ruby-lang
chimkan_ has joined #ruby-lang
tubbo has quit [Read error: Operation timed out]
tubbo has joined #ruby-lang
cldwalker_ has quit [Ping timeout: 240 seconds]
thejspr has quit [Ping timeout: 240 seconds]
pvh has quit [Ping timeout: 240 seconds]
Spaceghost|cloud has quit [Ping timeout: 240 seconds]
herpless has quit [Ping timeout: 240 seconds]
amdprophet has quit [Read error: Operation timed out]
amdprophet has joined #ruby-lang
cldwalker_ has joined #ruby-lang
herpless_ has joined #ruby-lang
sebastianb has quit [Ping timeout: 246 seconds]
jasiek_ has joined #ruby-lang
nerd has quit [Quit: WeeChat 0.3.9.2]
mccraig has quit [Ping timeout: 240 seconds]
dkannan has quit [Ping timeout: 240 seconds]
darix has quit [Ping timeout: 246 seconds]
nerd has joined #ruby-lang
jasiek has quit [Ping timeout: 265 seconds]
burgestrand has quit [Quit: Leaving.]
aef has quit [Ping timeout: 264 seconds]
L0rdShrek___ has quit [Ping timeout: 276 seconds]
darix has joined #ruby-lang
darix has quit [Changing host]
darix has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
aef has joined #ruby-lang
jbsan has quit [Quit: jbsan]
toretore has joined #ruby-lang
Uranio has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
sebastianb has joined #ruby-lang
pab|o has left #ruby-lang [#ruby-lang]
mars26 has joined #ruby-lang
methods has quit [Quit: Leaving.]
chendo_ has quit [Ping timeout: 260 seconds]
levicole has quit [Ping timeout: 260 seconds]
spectra has quit [Quit: ZNC - http://znc.sourceforge.net]
sebastianb has quit [Ping timeout: 246 seconds]
datanoise has joined #ruby-lang
blowmage has quit [Ping timeout: 264 seconds]
spectra has joined #ruby-lang
blowmage has joined #ruby-lang
levicole has joined #ruby-lang
Steve-W has joined #ruby-lang
sebastianb has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
<Steve-W> Could I check some weird csv lib behaviour with someone please? I think it's a bug
jxie has joined #ruby-lang
sailias has joined #ruby-lang
rsl has joined #ruby-lang
rippa has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
<darix> Steve-W: it helps with you describe your issue in a pastie maybe with a small reproducer script
<Steve-W> wayyy, well, slightly, ahead of you ;-)
dous has joined #ruby-lang
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby-lang
<Steve-W> I'm thinking that's just someone forgetting to check the class of the object, but I might be misunderstanding something (like a convention of placing nil first or something)
<darix> Steve-W: why not use row.nil?
<darix> the error is weird indeed
<darix> but row.nil?
<Steve-W> I'm using nil == row
<Steve-W> nil == row or row.nil? both work fine, I just thought t'was an oddity
<darix> Steve-W: again why not 'puts "1" if row.nil?'
<darix> Steve-W: it is odd indeed^^
<Steve-W> I'm not stuck per se, just thought it might be worth checking before I file a bug report
<Steve-W> Placing nil first in all comparisons seems to be more stable than using .nil? or x == nil, logically
vlad_starkov has quit [Remote host closed the connection]
<Steve-W> but, well, that's somewhat counter-intuitive given the behaviour of == in many other languages
<darix> Steve-W: .nil? should also work all the time :)
<Steve-W> nil == can't be overridden though
dous has quit [Ping timeout: 246 seconds]
<Steve-W> well, not by the type being compared
<Steve-W> .nil? can be 'semantically nil' as well as 'object'ly nil, if you'll excuse the ugly phrasing
runeb has joined #ruby-lang
<darix> uhm
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<darix> i dont see how
<darix> for "has nothing in it"
<darix> i would think .empty? is better
<Steve-W> My point was pretty weak, I'm basically saying that it's easier for someone else to have mixed up .empty? and .nil? than it is for them to override NilClass.==
<Steve-W> I'll grant neither should happen in most situations too ;-)
<Steve-W> (rather 'more likely' than 'easier', p'raps)
runeb has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
<Steve-W> anyway, this is somewhat academic. Any idea how I file a bug report for the standard library?
jxie has quit [Ping timeout: 265 seconds]
outoftime has joined #ruby-lang
waffleau has quit [Ping timeout: 240 seconds]
nerd has quit [Quit: WeeChat 0.3.9.2]
<Kero> also fails for row == "Hello, world" and a whole host of other comparisons
wyhaines has joined #ruby-lang
<Steve-W> It should fail for most things really
mars777 has joined #ruby-lang
heftig has quit [Quit: leaving]
<Kero> yeah; I would hope bug-reporting can be found on the ruby-lang website?
nerd has joined #ruby-lang
<Steve-W> I've just found the right one, I think
waffleau_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
Okasu has joined #ruby-lang
Okasu has left #ruby-lang [#ruby-lang]
jxie has joined #ruby-lang
<Steve-W> Done! Well, thanks for the help, it's always nice to know I'm not missing something obvious
<Mon_Ouie> Out of curiousity, what is the bug?
kith_ is now known as kith
<darix> row = CSV::Row.new( [], [] )
<darix> puts "1" if row == nil
<darix> NoMethodError: undefined method `row' for nil:NilClass
<darix> puts "1" if nil == row
<darix> works
<rking> darix: gem install jist && jist yourcode.rb
<darix> rking: 15:44:21 < Steve-W> darix: https://gist.github.com/4224854
<darix> just reading up would help already. ;)
chimkan_ has quit [Ping timeout: 265 seconds]
gsav has joined #ruby-lang
headius has joined #ruby-lang
postmodern has quit [Ping timeout: 252 seconds]
Glass_saga has quit [Remote host closed the connection]
<rking> darix: I just wanted to make sure there wasn't something before that that interfered.
<rking> darix: This is an oddity of the implementation of CSV::Row#==. Instead just say row.nil?
Glass_saga has joined #ruby-lang
jasiek_ has left #ruby-lang [#ruby-lang]
<rking> (That is, it's defined as: @row == other.row …so the arg you pass it cannot be nil)
<yorickpeterse> Is it possible to show a list of required files in Ruby 1.8?
<yorickpeterse> Ah, $LOADED_FEATURES works on 1.8 as well
<darix> Steve-W: see rking
gsav has quit [Client Quit]
<darix> rking: nice find
gsav_ has joined #ruby-lang
gsav_ has quit [Client Quit]
<banisterfiend> yorickpeterse: Hey there yiruck
<rking> darix: require'pry';binding.pry then $ row.==
<Steve-W> rking I know, t'was my conjecture that it ought not to be (other stdlib items that override == check and work as I expected)
mytrile has joined #ruby-lang
GarethAdams|Work has quit [Changing host]
GarethAdams|Work has joined #ruby-lang
GarethAdams|Work is now known as GarethAdams
jbsan has joined #ruby-lang
davidbalber|away is now known as davidbalbert
gsav has joined #ruby-lang
sent-hil has joined #ruby-lang
davidbalbert is now known as davidbalber|away
Assurbanipal has quit [Quit: Konversation terminated!]
mercwithamouth has joined #ruby-lang
chimkan_ has joined #ruby-lang
jbsan has quit [Quit: jbsan]
methods has joined #ruby-lang
slyphon has joined #ruby-lang
jtoy has joined #ruby-lang
<jtoy> i am trying to find all strings that are not substrings of others from array a, what am I doing wrong here: a=%w[a ab abc d]; b= a.reject{|x| a.detect{|xx| x.match(/^#{xx}/) } };puts b
<jtoy> I am trying to get back abc and d
davidbalber|away is now known as davidbalbert
jbsan has joined #ruby-lang
davidbalbert is now known as davidbalber|away
davidbalber|away is now known as davidbalbert
<judofyr> jtoy: it matches against itself
<rking> jtoy: Well, you never refer to 'x'
<judofyr> rking: he does. x.match
<rking> Oops haha
<judofyr> rking: you need to add a x != xx
<judofyr> err
<judofyr> jtoy: ^
<jtoy> judofyr: doh
enebo has joined #ruby-lang
<rking> jtoy: Well, what should %w(aa ab aa) return?
<jtoy> hmm, this is not right either though: a=%w[a ab abc d]; b= a.reject{|x| a.detect{|xx| x != xx && x.match(/^#{xx}/) } };puts b => [a,d]
<jtoy> rking: I think aa and ab
<jtoy> the list will be unique if that helps
<judofyr> jtoy: xx.match(/^#{x}/)
<jtoy> judofyr: yes!
cirenyc has joined #ruby-lang
<jtoy> thanks
<masterkorp> Guys, I have a series of object members in strings. How can i know if the class has that attribute name ?
gnufied has quit [Quit: Leaving.]
Swimming_Bird has joined #ruby-lang
waffleau_ has quit [Quit: waffleau_]
leopard_me has quit [Quit: Computer has gone to sleep.]
methods has quit [Quit: Leaving.]
methods has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
davidbalbert is now known as davidbalber|away
s1n4 has quit [Quit: leaving]
sepp2k has quit [Quit: Leaving.]
<judofyr> masterkorp: hm? what class?
<judofyr> masterkorp: you can check: klass.method_defined?("foo=")
gnufied has joined #ruby-lang
<masterkorp> basically i have a class with a shitload of attributes
<banisterfiend> masterkorp: by 'attribute' you mean instance variable? or attr_accessor generated methods?
<masterkorp> attr_acessor
<banisterfiend> then do what judofyr said
<masterkorp> yeah and then how can use it without hard coding
<banisterfiend> klass.method_defined?(any_string_you_want)
sent-hil has quit [Remote host closed the connection]
<masterkorp> like if klass.menthod_define?(string_with_value) then klass.{string_with_value} = value
<masterkorp> i would still have to have like 100 lines with all options ?
Nisstyre-laptop has quit [Ping timeout: 244 seconds]
<masterkorp> its a bit monolitic
<masterkorp> any ideas ?
jtoy has quit [Quit: jtoy]
jtoy has joined #ruby-lang
methods has quit [Read error: Connection reset by peer]
methods1 has joined #ruby-lang
jtoy_ has joined #ruby-lang
dkannan has joined #ruby-lang
pvh has joined #ruby-lang
thejspr has joined #ruby-lang
mccraig has joined #ruby-lang
Spaceghost|cloud has joined #ruby-lang
Croms has quit [Read error: Connection reset by peer]
Croms_ has joined #ruby-lang
<mindbender1> how can I check for the type of and object in irb
<andrewvos> mindbender1: object.class
<andrewvos> mindbender1: variable_name.class rather.
jtoy has quit [Ping timeout: 250 seconds]
jtoy_ is now known as jtoy
<mindbender1> ok. thanks
Mon_Ouie has quit [Ping timeout: 240 seconds]
<judofyr> masterkorp: assign = "#{foo}="; if obj.respond_to?(assign); obj.send(assign, value) end
krohrbaugh has quit [Ping timeout: 252 seconds]
<judofyr> masterkorp: I'm note that klass.method_defined? checks on a class, but the methods can only be called on an instance
ruurd has joined #ruby-lang
sent-hil has joined #ruby-lang
io_syl has joined #ruby-lang
<masterkorp> judofyr: thanks !
heftig has joined #ruby-lang
headius has quit [Quit: headius]
apeiros_ has quit [Remote host closed the connection]
<sent-hil> can i use capybara without rspec/cucumber?
<judofyr> sent-hil: yes
marr has quit [Ping timeout: 264 seconds]
<judofyr> sent-hil: `include Capybara::DSL`
<judofyr> sent-hil: then do Capybara.reset_sessions! and Capybara.use_default_driver when you want to reset it
<judofyr> sent-hil: I think must of the things will just work then
<zzak> judofyr: omg quit spamming <3
<judofyr> zzak: huh?
<sent-hil> judofyr: that's what i've been doing, thought it seems antipattern to use capybara outside rspec, wondering if i should just use selenium directly
<judofyr> sent-hil: I've only been using it inside Test::Unit
Edwan has joined #ruby-lang
<zzak> judofyr: banned
<judofyr> zzak: waat?
<zzak> i seemed to have exceeded my daily limit on coffee
<andrewvos> zzak: Me too man. Getting the too much coffee paranoia
sepp2k has joined #ruby-lang
<andrewvos> sent-hil: An anti-pattern to use it outside of rspec? What?
<andrewvos> sent-hil: Please elaborate.
<sent-hil> andrewvos: outside a testing framework
ruurd has quit [Quit: Leaving...]
methods has joined #ruby-lang
swav has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby-lang
swav has joined #ruby-lang
methods2 has joined #ruby-lang
methods has quit [Read error: Connection reset by peer]
znowi has joined #ruby-lang
andrewvos has quit [Ping timeout: 240 seconds]
andrewvos has joined #ruby-lang
methods1 has quit [Read error: Connection reset by peer]
methods2 has quit [Read error: Connection reset by peer]
jxie has quit [Ping timeout: 240 seconds]
ozzloy has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
agnitio has quit [Ping timeout: 265 seconds]
foucist has quit [Remote host closed the connection]
mercwithamouth has joined #ruby-lang
foucist has joined #ruby-lang
jxie has joined #ruby-lang
achiu has quit [Ping timeout: 252 seconds]
runeb has joined #ruby-lang
rsl has quit [Ping timeout: 252 seconds]
ozzloy has joined #ruby-lang
ozzloy has quit [Changing host]
ozzloy has joined #ruby-lang
JohnBat26|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
freedrull has joined #ruby-lang
listrophy has quit [Ping timeout: 252 seconds]
krohrbaugh has joined #ruby-lang
runeb has quit [Ping timeout: 252 seconds]
agnitio has joined #ruby-lang
nerd has quit [Quit: WeeChat 0.3.9.2]
nerd has joined #ruby-lang
ozzloy has quit [Remote host closed the connection]
ozzloy has joined #ruby-lang
ozzloy has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
listrophy has joined #ruby-lang
macmartine has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
ryanlecompte has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
ttilley has quit [Quit: ttilley]
scottschecter has quit [Ping timeout: 252 seconds]
towski has joined #ruby-lang
havenn has joined #ruby-lang
mwjcomputing has joined #ruby-lang
m0wfo has joined #ruby-lang
rins has quit [Quit: leaving]
soahccc has quit [Remote host closed the connection]
rsl has joined #ruby-lang
chaos_ has joined #ruby-lang
chaos_ has left #ruby-lang [#ruby-lang]
soahccc has joined #ruby-lang
__butch__ has joined #ruby-lang
Edwan has quit [Quit: Edwan]
gregmoreno has joined #ruby-lang
ruurd has joined #ruby-lang
methods has joined #ruby-lang
towski has quit [Remote host closed the connection]
nerd has quit [Quit: WeeChat 0.3.9.2]
nerd has joined #ruby-lang
<sent-hil> when i include a file with instance vars in main, why aren't they available in the other file?
gregmore_ has joined #ruby-lang
swav has quit [Remote host closed the connection]
gregmoreno has quit [Ping timeout: 240 seconds]
davidbalber|away is now known as davidbalbert
<sent-hil> err, they're available
<sent-hil> i wonder where exactly they're stored
<heftig> the anonymous main object
willdrew has quit [Ping timeout: 265 seconds]
<sent-hil> heftig: ah, thx
agnitio has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
brianpWins has joined #ruby-lang
chrismcg is now known as zz_chrismcg
methods1 has joined #ruby-lang
methods has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby-lang
rins has joined #ruby-lang
mars26 has quit [Ping timeout: 264 seconds]
gregmore_ has quit [Remote host closed the connection]
alvaro_o has joined #ruby-lang
gregmoreno has joined #ruby-lang
cirenyc has quit [Quit: Leaving...]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ruurd has quit [Quit: Leaving...]
davidbalbert is now known as davidbalber|away
krohrbaugh has quit [Quit: Leaving.]
apeiros_ has joined #ruby-lang
krohrbaugh has joined #ruby-lang
jtoy has quit [Ping timeout: 244 seconds]
towski has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
luikore has quit [Ping timeout: 252 seconds]
mindbender1 has quit [Ping timeout: 252 seconds]
headius has joined #ruby-lang
tdy has quit [Ping timeout: 264 seconds]
tdy has joined #ruby-lang
sent-hil has joined #ruby-lang
dankest has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
Uranio has quit [Quit: WeeChat 0.3.8]
dr_bob has left #ruby-lang [#ruby-lang]
cultureulterior_ has quit [Quit: cultureulterior_]
brianpWins_ has joined #ruby-lang
chrisbislr has joined #ruby-lang
brianpWins has quit [Read error: Connection reset by peer]
brianpWins_ is now known as brianpWins
gregmore_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
sn0wb1rd has quit [Quit: sn0wb1rd]
heftig has quit [Quit: leaving]
gregmoreno has quit [Ping timeout: 265 seconds]
cirenyc has joined #ruby-lang
davidbalbert is now known as davidbalber|away
<crankharder> need {:foo=>{:bar=>{:asdf=>123}}}.foo => [:foo, :bar, :asdf, 123]. thoughts?
<crankharder> where Hash#foo is some method that 'flattens' the hash
retro|cz has quit [Ping timeout: 244 seconds]
methods1 has left #ruby-lang [#ruby-lang]
lushious has joined #ruby-lang
davidbalber|away is now known as davidbalbert
sn0wb1rd has joined #ruby-lang
eydaimon has joined #ruby-lang
mwjcomputing has joined #ruby-lang
wallerdev has joined #ruby-lang
<rking> crankharder: I'd not assume that a terse way exists, and personally would define Object#recursive_flatten to return self + Hash#recursive_flatten to flatten its level and recurse
tdy has quit [Ping timeout: 264 seconds]
<banisterfiend> err, it outputs: [:foo, :bar, :asdf, 123]
imperator has joined #ruby-lang
<rking> Yeah, I like banisterfiend's, but personally I favor reopening classes rather than using .is_a? Hash
<banisterfiend> this is better: https://gist.github.com/d8f2dde9e895e903f9a6
sn0wb1rd has quit [Quit: sn0wb1rd]
<banisterfiend> rking: someone has totally broken gist and it's syntax highlighting
<banisterfiend> its*
<rking> banisterfiend: Are you using 'jist' ?
<banisterfiend> 'jist' is an alias for 'gist' on pry head
<banisterfiend> so yeah
<rking> OK that's what I meant, pry head
sn0wb1rd has joined #ruby-lang
<rking> banisterfiend: on the CLI it's specified by 'jist -f foo.rb', so I'm not sure what piece is saying '(pry)' instead of 'foo.rb'
achiu has joined #ruby-lang
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sepp2k has quit [Remote host closed the connection]
<rking> Jist#gist takes a :filename arg
<rking> banisterfiend: What is your exact gist command?
<banisterfiend> rking: my final version: https://gist.github.com/6c8f0c1f0dffaef00602
<banisterfiend> oops, ping crankharder
<banisterfiend> rking: gist -m flatten_hash
<rking> Kk
schaerli has joined #ruby-lang
<rking> I've actually got a minute, I'll fix
zmack has quit [Remote host closed the connection]
<rking> banisterfiend: Do you want it to try to come up with a name other than 'a.rb'?
<rking> Probably YAGNI but if there's some easy thing I'll throw that in.
<banisterfiend> rking: nah, that really doesnt matter
<rking> K
<banisterfiend> rking: also check if someone actually did edit gist.rb
<banisterfiend> rking: if they didnt, then the bug is elsewhere
<banisterfiend> can you repro it?
tdy has joined #ruby-lang
tbuehlmann has joined #ruby-lang
davidbalbert is now known as davidbalber|away
wallerdev has quit [Quit: wallerdev]
tamash has joined #ruby-lang
scottschecter has joined #ruby-lang
<rking> banisterfiend: No edits to gist.rb since Summer of '11, back when we were young.
wyhaines has quit [Remote host closed the connection]
<banisterfiend> rking: hmm, can u repro it though?
<banisterfiend> rking: it could be something weird on my end
<banisterfiend> i have a bunch of different branches and so on that i'm working on
Carnage\ has joined #ruby-lang
<rking> banisterfiend: Yeah I repro like the female in this vid http://youtu.be/JC2gIPnUCgw
<rking> banisterfiend: I doubt it ever worked for REPL def's
<banisterfiend> rking: hm ok, weird if that's true
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
tamash has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
heftig has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
sent-hil has joined #ruby-lang
ebouchut has joined #ruby-lang
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
swav has joined #ruby-lang
mindbender1 has joined #ruby-lang
BlaXpirit has left #ruby-lang ["Quit Konversation"]
mindbender1 has quit [Max SendQ exceeded]
havenn has quit [Remote host closed the connection]
mindbender1 has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
mindbender1 has quit [Max SendQ exceeded]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
[dmp] has joined #ruby-lang
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
mindbender1 has joined #ruby-lang
areil has quit [Remote host closed the connection]
mindbender1 has quit [Max SendQ exceeded]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
krohrbaugh has quit [Quit: Leaving.]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
mindbender1 has joined #ruby-lang
mindbender1 has quit [Max SendQ exceeded]
krohrbaugh has joined #ruby-lang
macmartine has joined #ruby-lang
<imperator> rking, wtf did i just watch?
mindbender1 has joined #ruby-lang
<rking> imperator: AFAIK it was an ad agency doing a demo
srbaker has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
wallerdev has joined #ruby-lang
gaveen has quit [Ping timeout: 246 seconds]
guns has joined #ruby-lang
<cout> rking: double yew tee eff.
<rking> =D
agr__ has joined #ruby-lang
ruurd has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
agr__ has quit [Quit: Page closed]
crudson has joined #ruby-lang
gaveen has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
ebouchut has quit [Quit: This computer has gone to sleep]
jtoy has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
wnd has quit [Excess Flood]
havenn has joined #ruby-lang
wnd has joined #ruby-lang
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
<yorickpeterse> is it possible to add platform specific dependencies in a Gemspec?
<tbuehlmann> yorickpeterse, you can something like `gem "weakling", :platforms => :jruby`
<tbuehlmann> do you mean that?
<yorickpeterse> That's for Bundler, not Rubygems
<yorickpeterse> Does Bundler actually have anything to do that but for operating systems?
<tbuehlmann> ah, righty
<yorickpeterse> e.g. `gem :foo, :os => :osx`?
<yorickpeterse> I kinda need both
jbald has joined #ruby-lang
RickHull has joined #ruby-lang
RickHull has quit [Changing host]
RickHull has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
MaddinXx has joined #ruby-lang
erichmenge has left #ruby-lang [#ruby-lang]
<rking> yorickpeterse: The thing is, bundler only makes a single Gemfile.lock for a given configuration
erichmenge has joined #ruby-lang
<rking> yorickpeterse: So you can definitely check RUBY_PLATFORM in your Gemfile, but you'll have to generate plural things, like Gemfile.lock.osx + Gemfile.lock.lnx
<yorickpeterse> hm
jbald has quit [Quit: jbald]
swav has quit [Remote host closed the connection]
artOfWar has joined #ruby-lang
vlad_starkov has joined #ruby-lang
artOfWar has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
_sillymarketing has joined #ruby-lang
_sillymarketing has left #ruby-lang [#ruby-lang]
_sillymarkets has joined #ruby-lang
postmodern has joined #ruby-lang
<_sillymarkets> alo
<_sillymarkets> is anyone good with "diffy" or using diff in ruby ?
<postmodern> _sillymarkets, you probably want to use diff-lcs
MaddinXx has quit [Remote host closed the connection]
<_sillymarkets> hm, okay... looking into it now
postmodern has quit [Client Quit]
<whitequark> yorickpeterse: there's a hack... you do :require => ('file' if RUBY_PLATFORM =~ /linux/)
<whitequark> but it doesn't work with all gems
<yorickpeterse> That's what I currently have in the gemspec
<yorickpeterse> There are some tests that are platform/implementation specific and require specific gems
<yorickpeterse> but it feels dirty
<yorickpeterse> if RUBY_PLATFORM.include?('darwin')
<yorickpeterse> ...
<yorickpeterse> end
<yorickpeterse> etc
<rking> whitequark: That still only generates one Gemfile.lock
postmodern has joined #ruby-lang
kurko_ has joined #ruby-lang
<yorickpeterse> rking: non issue, it's not tracked in the repo
<yorickpeterse> I'm only using bundler to ease the process of installing deps
PhilCK has joined #ruby-lang
<rking> OK, that's a much easier problem.
<rking> What you're doing is fine.
vlad_starkov has quit [Remote host closed the connection]
ryanlecompte has quit [Ping timeout: 246 seconds]
jsilver has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby-lang
musl has quit [Quit: WeeChat 0.3.9.2]
dankest is now known as dankest|away
burgestrand has joined #ruby-lang
workmad3 has joined #ruby-lang
wyhaines has joined #ruby-lang
PhilCK has left #ruby-lang [#ruby-lang]
<_sillymarkets> postmodern - have any examples of diff-lcs parsing two files and highlighting differences to html ?
srbaker has quit [Quit: Computer has gone to sleep.]
lcdhoffman has joined #ruby-lang
<postmodern> _sillymarkets, so you'd probably read in the lines of both files and diff them
workmad3 has quit [Ping timeout: 252 seconds]
love_col_ has joined #ruby-lang
love_col_ has left #ruby-lang [#ruby-lang]
Swimming_Bird has joined #ruby-lang
mindbender1 has quit [Ping timeout: 252 seconds]
brianpWins has quit [Quit: brianpWins]
tenderlove has joined #ruby-lang
savage- has joined #ruby-lang
ryanlecompte has quit [Ping timeout: 265 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<headius> yorickpeterse: it is not possible
<headius> you have to release a separate gem with -java and its own list of deps
<soahccc> Does anyone know a reference for something like this: A rack app (presumably Sinatra) with multiple workers (via unicorn) by all having access to a single shared thread (which gathers remote data). Is that even possible with unicorn workers?
<yorickpeterse> headius: it's for testing mostly
<yorickpeterse> there are some deps that only work on platform X so there's no point in adding them as a dev dep (and thus try to install them when running `bundle install`)
ruurd has quit [Quit: Leaving...]
willdrew has joined #ruby-lang
<yorickpeterse> headius: While you are here, is it true that Syslog in stdlib doesn't run on jruby?
ruurd has joined #ruby-lang
ryanf has joined #ruby-lang
sabfer has joined #ruby-lang
<headius> yorickpeterse: I think we have an FFI-based syslog that works fine
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<yorickpeterse> Does that come with the jruby stdlib? I noticed some hacks in this code that basically disable Syslog tests because I at some point found out Syslog didn't work
<yorickpeterse> Though I'm unsure if that's still the case
<yorickpeterse> * disables
swav has joined #ruby-lang
musl has joined #ruby-lang
sabfer has quit [Read error: Connection reset by peer]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
swav has quit [Ping timeout: 250 seconds]
intellitech has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 240 seconds]
<whitequark> ok folks, I promised to write an article
<yorickpeterse> aww yiss
<headius> yorickpeterse: hmm…well it's supposed to work
<headius> if it doesn't report it
<yorickpeterse> I'll give it another try
Mon_Ouie has joined #ruby-lang
<sent-hil> is html a dsl?
<whitequark> sent-hil: it's not a programming language; and yes.
<yorickpeterse> headius: Hm, seems to be working fine
<headius> hooray
<whitequark> sent-hil: (why? because it's not turing complete. XSLT, on the other hand...)
<sent-hil> whitequark: cool, any other common exs of dsl?
<apeiros_> whitequark: I don't have the time right now to read the full article, but skimming it definitively wets the appetite to read the full one.
<apeiros_> whitequark: so: thanks for writing the article. I'm also quite interested in your ruby implementation :)
<yorickpeterse> whitequark: what does "reify" mean? Or how do you pronounce it?
<whitequark> apeiros_: you're welcome :)
<headius> whitequark: interesting post
<yorickpeterse> whitequark: aah
<whitequark> headius: thanks!
<apeiros_> yorickpeterse: with a french accent.
intellitech has quit [Quit: intellitech]
<yorickpeterse> my French is terrible
<whitequark> sent-hil: cucumber, quite certainly. rspec, but some people don't consider that kind of stuff a "real" DSL.
intellitech has joined #ruby-lang
<matled> whitequark: looks nice. I think its worth to look into the performance gains possible with this approach also on normal machines, and not only microcontrollers.
<whitequark> sent-hil: anything embedded in a game engine. Lua, unless it's used to write standalone programs, but that's again arguable.
<whitequark> matled: it seems for me that in the time-memory tradeoff time wins
workmad3 has joined #ruby-lang
<whitequark> i.e. the JVM/Rubinius approach has a very strong ground and it would be very hard to compete with it
<whitequark> after all, I'm pretty sure that a hypothetical version of JRuby which also optimizes code on Ruby level, apart from just using JVM optimizations, could well compete with my implementation for performance, albeit with a warm JIT and significantly higher memory usage
mjio has joined #ruby-lang
sailias has quit [Read error: No route to host]
<headius> we can already compete with Java in cases that don't involve numerics
<whitequark> (AFAIK JRuby already has some infrastructure for doing that kind of optimizations, but it isn't really used for doing anything interesting right now.)
<whitequark> yup
<whitequark> I believe that interactive, GUI apps could get some gains from a non-JIT approach; you could see that in ObjC
<whitequark> ObjC method dispatch basically has the same semantics as Ruby one does, but instead of caching methods at a call site ObjC caches methods in the classes
<sent-hil> whitequark: cool, thx
savage- has quit [Remote host closed the connection]
<whitequark> i.e. in JRuby a method call might incur 1 instruction of overhead or even be inlined, but that comes after a long time the JIT will warm up, whereas in ObjC there is around 60 instructions of overhead, but it settles on those 60 instructions right after the first invocation
<headius> jruby caches methods at the call site *and* in the classes :)
slyphon has quit [Ping timeout: 245 seconds]
<whitequark> what's even better is that ObjC caching consumes very little memory compared to what a JIT commonly has, doesn't depend on a call site being (mostly) monomorphic, and doesn't require an incredibly complex runtime
<whitequark> an in-depth explanation of how it works: http://www.friday.com/bbum/2009/12/18/objc_msgsend-part-1-the-road-map/
lcdhoffman has quit [Quit: lcdhoffman]
<whitequark> MacRuby works this way, and it's pretty good. I've actually considered writing such an implementation, but I've done some research and it seems that there is very little market for such a product.
<whitequark> so, I decided to focus on embedded instead, where nothing similar exists. C++ has similar feature and performance characteristics to what I'm proposing, but it also includes a thousand and one way to shoot yourself in the leg.
dankest|away is now known as dankest
<yorickpeterse> So does this actually run as Ruby or does it compile down to X
<whitequark> headius: that's pretty good, but I'm still wary of Java method call overhead there
<whitequark> yorickpeterse: "this" as in what?
<yorickpeterse> Your Ruby implementation
PhilCK has joined #ruby-lang
<whitequark> yorickpeterse: no, it's not Ruby. For example, there is no way to compile `pry'. That's by design.
<yorickpeterse> or language would be a better name
<whitequark> It's basically a language and runtime which use Ruby as a DSL to define another program, which itself gets compiled to native code.
<yorickpeterse> ah
dankest has quit [Quit: Linkinus - http://linkinus.com]
<whitequark> there's no way you could fit a "proper" ruby in 8K, or maybe 512B of RAM. just no.
<yorickpeterse> heh
wardrop has joined #ruby-lang
<whitequark> yeah, arduino is a possible target. I consider it as a toy, but hey, people play with toys before getting serious.
<yorickpeterse> would be nice for it to become a viable alternative to Lua at some point
<yorickpeterse> or at least something in that direction
ryanlecompte has joined #ruby-lang
<firefux> Lua is still much smaller thatn mRuby
<headius> macruby's quite a bit slower than the other impls at this point
<headius> except for specific things
<headius> I don't know about rubymotion
<whitequark> well, the obvious huge disadvantage of the ObjC way is that you can't optimize anything.
<whitequark> so you can use it as a high-level specification of how your program should work, and complement it with actual low-level implementations of basic actions
<whitequark> like drawing on screen or working with bitmaps, or whatever
<whitequark> ObjC has that for free because it includes C. MacRuby has that for free because it links with ObjC runtime and ObjC code.
<headius> it's not not quite as fluid to drop to C from MacRuby
<headius> er, it's just not
<headius> so that's a down side of using macruby instead of objc I've seen people report
<whitequark> but yeah, on its own grounds it's not a very good idea. again, I've only considered doing it to link Qt inside and distribute it as a nice complete package for doing GUIs in Ruby
<RickHull> qq, is the general sense of "bitmap" anything that uses individual bits as flags? and the windows bitmap image format -- wouldn't it be more properly described as bytemap?
<whitequark> (ever tried to distribute ruby-gtk or ruby-qt apps? I did, and I'd rather drink acid or something. It's just horrible.)
<whitequark> RickHull: hysterical raisins
<RickHull> eh? non sequitur?
<whitequark> "historical reasons" :)
<yorickpeterse> headius: while you're here, does jruby exposes the jruby parser using a Ruby API? If so, where can I find info on it?
<headius> yorickpeterse: we don't expose a separate API, but it's all just objects
<whitequark> RickHull: early on, those bitmaps were actually bitmaps due to being b&w.
<RickHull> oh right
<headius> you can access our AST from Ruby by calling the JRuby Java APIs
<RickHull> yeah, makes sense
<headius> or better would be to use the jrubyparser project's parser and AST…it's a richer AST
<yorickpeterse> What the hell, jruby has ripper?
<yorickpeterse> hmmm
<zenspider> headius: hey... while you're here...
<yorickpeterse> "the `ripper' lib is not supported on JRuby" hrmpf
<zenspider> headius: I've got reports that minitest tests fail on jruby. probably the same type of stuff as last time (mock seeing internal calls)
<zenspider> headius: you guys ship with minitest, yes?
<rking> zenspider: Do you have any interest in minitest-spork and guard-minitest ?
<zenspider> rking: interest in what sense?
davidbalber|away is now known as davidbalbert
charliesome has joined #ruby-lang
<rking> zenspider: Well, I was hoping maybe you would throw your opinion on a particular deadlocked issue. guard-minitest sends args that minitest-spork can't handle, so the whole system is borked.
<headius> zenspider: we ship with whatever's current 1.9.3 stdlib minitest, yes
<headius> yorickpeterse: we don't have ripper yet, but enebo thinks he can add it
Sambalero has joined #ruby-lang
<headius> matter of time and resources
<zenspider> headius: including the minitest tests?
<zenspider> hrm... I wonder why they fail now.
<headius> we don't ship any tests in our dist
<zenspider> no, not ship. but use.
<yorickpeterse> headius: hm, does the jruby parser allow you to define your own AST in similar fashion to Ripper?
<zenspider> rking: using guard and spork at the same time? aren't they basically the same thing?
<rking> zenspider: Nope, rather orthogonal. Spork's role is to keep a long-running process of the parts that aren't changing (like Rails itself) but forking and running the tests after that
<headius> yorickpeterse: the jruby parser presents you with our Ruby AST
<headius> zenspider: oh sure…we use minitest + excludes to run MRI's suite
<headius> in CI
<rking> Guard is a file-change watcher that decides to run certain tests depending on a DSL that maps Test ↔ Implementation files.
<zenspider> headius: huh.
<yorickpeterse> headius: The reason for it is because I'll need to change the AST so it's in a uniform format similar to other parsers I plan on using (in this case Ripper on MRI)
<rking> (Well, Guard is more general, but in the case of guard-minitest that's what it does)
<zenspider> headius: can you eyeball https://travis-ci.org/splattael/minitest and tell me if I should care?
<zenspider> rking: oh. I thought spork also had file monitoring
<rking> zenspider: Nope. Both Spork and Guard are pretty simple, actually.
PhilCK has left #ruby-lang [#ruby-lang]
<rking> zenspider: BTW, before I bother, would you consider a patch to minitest/mock for a .multi_stub method so you don't have to nest 3 or 4 blocks to get 3 or 4 stubs?
<headius> ok
<headius> zenspider: hmm
<headius> some of those look like the same mocking bug
<headius> and it's running against 1.7.0, so that's not surprising I guess
<headius> 1.7.1 has the fix for that
<headius> dunno about the others
willdrew has quit [Remote host closed the connection]
BigFatFatty has joined #ruby-lang
BigFatFatty has left #ruby-lang [#ruby-lang]
slaytanic has quit [Read error: Connection reset by peer]
slaytani1 has joined #ruby-lang
slaytani1 is now known as slaytanic
intellitech has quit [Quit: intellitech]
intellitech has joined #ruby-lang
adambeynon has joined #ruby-lang
davidbalbert is now known as davidbalber|away
dankest has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
davidbalber|away is now known as davidbalbert
slyphon has joined #ruby-lang
<zenspider> headius: ok. I won't care then. thanks.
<zenspider> rking: yeah. I'd consider it
<rking> zenspider: K. I'll tinker with it to see if there's a decent API possible. One issue I'm not sure about is if it should only apply to one class, or that it would operate on several somehow, or that it would work with either, somehow.
faustman has joined #ruby-lang
<zzak> zenspider: https://github.com/ruby/ruby/graphs/contributors what's your 100th commit gonna be?
sent-hil has quit [Remote host closed the connection]
intellitech has left #ruby-lang [#ruby-lang]
cirenyc has quit [Quit: Leaving...]
intellitech has joined #ruby-lang
datanoise has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby-lang
<yfeldblum> any good libs for dealing with xml encryption?
mjio has quit []
<RickHull> encryption is generally payload agnostic. i'm having trouble with the concept, here
<RickHull> yfeldblum: ^
runeb has joined #ruby-lang
<yfeldblum> RickHull, xml encryption is in large part a standardized container format for encrypted payloads
<yfeldblum> RickHull, it's just rather complex ...
<RickHull> ok, I'm no help then
<zenspider> zzak: heh. probably a boring update to minitest :P
Sambalero has quit [Remote host closed the connection]
<zenspider> maybe I should stop now :)
<whitequark> >It has been reported that this specification has severe security concerns
runeb has quit [Ping timeout: 252 seconds]
<zenspider> I'm only 18th on contributions... but 11th on deletions! :P
mjio has joined #ruby-lang
sent-hil has joined #ruby-lang
ttilley has joined #ruby-lang
solars has quit [Ping timeout: 260 seconds]
<zzak> nice, i am #19 for both.. drbrain is top 5 for both
<zzak> only like 40 more commits and i will beat you :D
<zenspider> rking: "Spork-testunit parsed all options itself and did not pass them to MiniTest. I don't want that. I want all options to be passed through to MiniTest Unit runner and let it interpret them. This is a feature."
<RickHull> i wonder if you could have a reliable metric for e.g. "replaced 100 LOC with 10"
<zenspider> I think that's the crux of the issue, no?
<RickHull> so long as you "trust" the deleter's judgment, i'd say deletions is the best metric
<zenspider> you'd have to do something like flog instead, or even jsut plain AST node counts
<RickHull> best *simple* metric
<rking> zenspider: Right. It's a deadlock. The guard-spork guy isn't accepting the (perfectly sensible, IMO) pull req to remove the explicit default_runner.rb thing, and then that quote you pasted prevents the other side from handling that.
<zenspider> I can go delete all the rdoc and get LOTS of points for deletions :P
<RickHull> might cost you some trust
setmeaway2 has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
<zzak> zenspider: noooo my precious
<zenspider> haha
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
joooooo has joined #ruby-lang
<rking> zenspider: Actually this one is the one I like better: https://github.com/guard/guard-minitest/pull/42
tdy has quit [Ping timeout: 264 seconds]
<zenspider> both groups need to get over their shit and fix their side of the issue
<zenspider> once they both do that, things should be fine
<zenspider> I've commented on both now
<rking> zenspider: That's the same one. I meant this one: https://github.com/guard/guard-minitest/pull/41
<rking> zenspider: Hehe, OK, great. Thank you for contributing
davidbalbert is now known as davidbalber|away
<yfeldblum> whitequark, talking about this? http://crypto.stackexchange.com/a/1044
setmeaway has quit [Ping timeout: 246 seconds]
setmeaway has joined #ruby-lang
<zenspider> commented there also
setmeaway2 has quit [Ping timeout: 248 seconds]
joooooo has quit [Ping timeout: 240 seconds]
jobicoppola has joined #ruby-lang
<whitequark> yfeldblum: yes
<yfeldblum> whitequark, is it still a problem if you encrypt-then-sign, and always check the signature before attempting a decrypt?
cored has quit [Quit: leaving]
intellitech has quit [Quit: intellitech]
intellitech has joined #ruby-lang
intellitech has left #ruby-lang [#ruby-lang]
<whitequark> yfeldblum: no, but then you'd better off just using AES+HMAC
codingenesis has joined #ruby-lang
RickHull has left #ruby-lang [#ruby-lang]
<yfeldblum> whitequark, that's certainly true, until the service you're talking to is using xml encryption and you don't control that service :D
<whitequark> yfeldblum: then you won't be sure they check the signature either
<yfeldblum> whitequark, true, unless they're creating the message and i'm receiving it
<whitequark> Mallory could intercept your request, substitute it for his, then return the reply from the remote service
<whitequark> and you'd accept it
<whitequark> I doubt that these services commonly reply with all the request parameters included.
jmeeuwen_ has joined #ruby-lang
nerd has quit [Ping timeout: 260 seconds]
<yfeldblum> whitequark, :D
jmeeuwen has quit [Ping timeout: 248 seconds]
codingenesis is now known as nerd
jmeeuwen_ is now known as jmeeuwen
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<yfeldblum> whitequark, then suppose reject unsigned messages and messages signed with the wrong private key
agile has quit [Ping timeout: 246 seconds]
elcapo has joined #ruby-lang
<yfeldblum> whitequark, suppose the public key of the signing keypair is pre-shared
slyphon has quit [Ping timeout: 245 seconds]
agile has joined #ruby-lang
theoros has joined #ruby-lang
datanoise has joined #ruby-lang
<whitequark> yfeldblum: as it was said, the reply of the remote service is returned as-is
<whitequark> so it is signed and the key is appropriate for the service
tdy has joined #ruby-lang
PhilCK has joined #ruby-lang
PhilCK has left #ruby-lang [#ruby-lang]
sent-hil has joined #ruby-lang
<yfeldblum> whitequark, :D
<yfeldblum> anyway ... any good ruby libs for dealing with xml encryption?
_sillymarkets has quit [Ping timeout: 245 seconds]
gaveen has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
datanoise has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
ttilley has quit [Quit: ttilley]
slyphon has joined #ruby-lang
jtoy has quit [Quit: jtoy]
<tockitj_> what is specific about xml encryption
jsilver has joined #ruby-lang
ryanf has quit [Ping timeout: 264 seconds]
davidbalber|away is now known as davidbalbert
<yfeldblum> tockitj_, xml encryption is a container format for describing and transporting signed or encrypted messages
<postmodern> tockitj_, there's a big ugly RFC for it
<tockitj_> XEP or RFC ?
davidbalbert is now known as davidbalber|away
<postmodern> er whatever the W3C calls their documents
havenn has quit [Remote host closed the connection]
<tockitj_> RFCs come from IETF only, as far as i know
<whitequark> tockitj_: XEP is about Jabber, not W3C
<tockitj_> yes
banisterfiend has quit [Remote host closed the connection]
Sambalero has joined #ruby-lang
enebo has quit [Quit: enebo]
marr has quit [Ping timeout: 264 seconds]
swav has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
enebo has joined #ruby-lang
tdy has quit [Read error: Connection reset by peer]
outoftime has quit [Quit: Leaving]
gsav has quit [Ping timeout: 264 seconds]
<drbrain> tockitj_: historically anyone could submit an RFC
sent-hil has quit [Remote host closed the connection]
<tockitj_> true, but they regulate them
ryanf has joined #ruby-lang
tenderlove has joined #ruby-lang
banisterfiend has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
elcapo has quit [Quit: Emacs.app, it's in the editor.]
stonerfish has joined #ruby-lang
datanoise has joined #ruby-lang