vlad_starkov has quit [Remote host closed the connection]
divout has joined #ruby-lang
celinedior has quit [Quit: celinedior]
dankest has quit [Ping timeout: 240 seconds]
rue has joined #ruby-lang
rue has quit [Remote host closed the connection]
solars has quit [Ping timeout: 245 seconds]
poga has joined #ruby-lang
celinedior has joined #ruby-lang
rippa has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
hapster has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
jxie_ has quit [Quit: leaving]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
crudson has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
brianpWins has joined #ruby-lang
setmeaway has quit [Ping timeout: 264 seconds]
rippa has quit [Ping timeout: 240 seconds]
sush24 has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
rippa has joined #ruby-lang
pbjorklund has joined #ruby-lang
robbyoconnor has joined #ruby-lang
mistym has quit [Remote host closed the connection]
epitron_ has quit [Changing host]
epitron_ has joined #ruby-lang
epitron_ has left #ruby-lang [#ruby-lang]
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 256 seconds]
poga has quit [Remote host closed the connection]
poga has joined #ruby-lang
krohrbaugh has joined #ruby-lang
poga has quit [Ping timeout: 258 seconds]
krohrbaugh has quit [Ping timeout: 252 seconds]
poga has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
idkazuma has joined #ruby-lang
nXqd has joined #ruby-lang
Guest85414 has joined #ruby-lang
anildigital_work has joined #ruby-lang
voker57 has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
jg has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
solars has joined #ruby-lang
tonni has quit [Remote host closed the connection]
tonni has joined #ruby-lang
sepp2k has joined #ruby-lang
Axsuul has quit [Ping timeout: 246 seconds]
tomzx_mac has quit [Read error: Operation timed out]
poga has quit [Remote host closed the connection]
dr_bob has joined #ruby-lang
poga has joined #ruby-lang
krohrbaugh has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
vlad_sta_ has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 256 seconds]
tenderlo_ has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 248 seconds]
gix has quit [Quit: Client exiting]
FlyingLeap has quit [Quit: No Ping reply in 180 seconds.]
FlyingLeap has joined #ruby-lang
symm- has joined #ruby-lang
gix has joined #ruby-lang
hackeron has joined #ruby-lang
mhenrixon has joined #ruby-lang
sush24 has joined #ruby-lang
sush24 has quit [Remote host closed the connection]
alessio_rocco has joined #ruby-lang
sush24 has joined #ruby-lang
francisfish has quit [Ping timeout: 258 seconds]
brianpWins has quit [Quit: brianpWins]
fsvehla has joined #ruby-lang
fsvehla has quit [Client Quit]
Mon_Ouie has joined #ruby-lang
francisfish has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
gix has quit [Ping timeout: 256 seconds]
fjfish has joined #ruby-lang
gix has joined #ruby-lang
francisfish has quit [Ping timeout: 258 seconds]
xcombelle has joined #ruby-lang
poga has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby-lang
idkazuma has joined #ruby-lang
maxmande_ has joined #ruby-lang
maxmanders has quit [Ping timeout: 252 seconds]
mbj has joined #ruby-lang
jonahR has quit [Quit: jonahR]
r0bgleeson has quit [Ping timeout: 255 seconds]
jxie has joined #ruby-lang
symm- has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
<yorickpeterse>
whitequark: back in NL
<yorickpeterse>
I'll be messing around with parser some time in the next two weeks so expect a potential increase of bug reports/patches
gnufied has joined #ruby-lang
<yorickpeterse>
also, I've managed to create a Lemon parser in C++ and connect it with Ragel
<yorickpeterse>
Needed some hacking though so I should probably blag about this
gnufied has quit [Client Quit]
mytrile has joined #ruby-lang
kgrz has joined #ruby-lang
dkannan has joined #ruby-lang
krohrbaugh has joined #ruby-lang
gnufied has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Ca1us has quit [Quit: ""]
krohrbaugh has quit [Ping timeout: 264 seconds]
tockitj has joined #ruby-lang
megha has joined #ruby-lang
poga has joined #ruby-lang
baba has quit [Ping timeout: 256 seconds]
tockitj has quit [Remote host closed the connection]
maxmande_ has quit [Ping timeout: 258 seconds]
poga has quit [Read error: No route to host]
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
tockitj has joined #ruby-lang
tockitj has left #ruby-lang [#ruby-lang]
tockitj has joined #ruby-lang
<injekt>
:)
<tockitj>
each_with_object (:
vlad_starkov has quit [Ping timeout: 252 seconds]
<charliesome>
each_with_object is the best thing ever
<injekt>
agreed
vlad_starkov has joined #ruby-lang
nXqd has quit [Remote host closed the connection]
<lianj>
hm, you used it so much?
MaddinXx has joined #ruby-lang
toretore has joined #ruby-lang
madb055 has joined #ruby-lang
dkannan has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
dkannan has joined #ruby-lang
krohrbaugh has joined #ruby-lang
mrfelix has joined #ruby-lang
jg has quit [Ping timeout: 255 seconds]
marr has quit [Ping timeout: 264 seconds]
maxmanders has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 264 seconds]
mbj has quit [Read error: Operation timed out]
cg has joined #ruby-lang
cg has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
stef_204 has joined #ruby-lang
jg has joined #ruby-lang
havenwood has joined #ruby-lang
mbj has joined #ruby-lang
<yorickpeterse>
http://cfp.euruko2013.org/proposals/17 self promotion: if you're going to Euruko and interested in this talk, do me a favour and upvote it
<yorickpeterse>
I don't want to end up without tickets again like last year :<
madb055 has quit [Ping timeout: 258 seconds]
mytrile has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
xcombelle has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
aob has joined #ruby-lang
mytrile has joined #ruby-lang
<aob>
Hello - I'm trying to parse a really simple html page using nokogiri; it doesn't use css really. I want to show the text *between* two <h2> elements - ie I want to treat the doc hierarchically - show me the stuff "underneath" one of the h2 elements
<aob>
I can't work out how to do this - any clues?
<manveru>
yorickpeterse: any reason you don't mention the name of the linter?
<aob>
I can find the elements with page.css('h2') - but how to I find out what's under them? Or am I just misunderstanding how nokogiri works?
<manveru>
aob: basically you go to the parent of h2, iterate until you hit first h2, then collect the text until you hit second h2
vlad_sta_ has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
srbaker has quit [Client Quit]
sush24 has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Ping timeout: 258 seconds]
dr_bob has quit [Quit: Leaving.]
<aob>
manveru: ok - so the page doesn't seem to be iterable; page.children is
<aob>
ok - my case is actually not quite as I described it, as the content under the h2 is actually the last section - so there isn't a next h2.
<manveru>
hm
<manveru>
[16] pry(main)> a = 0; n.at('h2').parent.children.each_with_object([]){|e,o| break if a > 1; e.name == 'h2' ? (a += 1) : (o << e.inner_text) }
<aob>
I can see I can ask nokogiri to give me the 3rd element
<whitequark>
i.e. break the idea of CI by not breaking CI
<injekt>
it would just work and exit early
<injekt>
exactly
<whitequark>
dat sucks. we need more dependency injection
<whitequark>
and moooocking
<injekt>
aye
<blegat>
Hi, I've already done 2 websites in Ruby on Rails so I'm familiar with basic ruby but I would like to know the advanced ruby stuff. I'm familiar with C++/Java style and I would love to find a tutorial not to long that explains the stuff that ruby does differently :)
<injekt>
thanks for letting me know will check it out more when im home
<blegat>
Do you have any idea :P
<whitequark>
injekt: I'll fix this I think
<injekt>
whitequark: even better, thanks!
<whitequark>
yeah done
kristofferrr has joined #ruby-lang
<blegat>
No idea ? :/
<whitequark>
blegat: there isn't much similarities between C++/Java and Ruby
<whitequark>
I'm not sure I can pick any from the top of my mind
Wardrop has joined #ruby-lang
<injekt>
whitequark: awesome! thanks. I'll merge and push a new version tonight
<whitequark>
:D
swav has quit [Ping timeout: 260 seconds]
<aob>
manveru: your approach doesn't quite work on my example:
<aob>
ie it does exactly what I was doing with page.css('h1') - it doesn't fetch the stuff underneath
<whitequark>
runpaintrunrun's ruby reference is dead
<whitequark>
the domain is expired
io_syl has quit [Quit: Computer has gone to sleep.]
gnufied has joined #ruby-lang
gnufied has quit [Client Quit]
<whitequark>
injekt: also I have a question
<whitequark>
I want to do a somewhat strange thing... make a parent class which initializes common slop options. then make a subclass which extends them
<whitequark>
what's the most sane way to do that?
vlad_starkov has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 258 seconds]
swav has quit [Remote host closed the connection]
aob has quit [Ping timeout: 264 seconds]
dvorak has joined #ruby-lang
kain has quit [Quit: exit]
sailias has joined #ruby-lang
dkannan has quit [Quit: dkannan]
<manveru>
oh, forgot the break
<manveru>
a = 0; n.at('h1').parent.children.each_with_object([]){|e,o| break(o) if a > 1; e.name == 'h1' ? (a += 1) : (o << e.text) }
io_syl has joined #ruby-lang
<manveru>
in case he ever comes back
<injekt>
whitequark: I think pry does something similar, i'll cook something up when i have a computer
io_syl has quit [Quit: Computer has gone to sleep.]
srbaker has joined #ruby-lang
<whitequark>
codeclimate just hates my code :/
swav has joined #ruby-lang
<ericwood>
global code warming
<ericwood>
today will be the day I organize my documents.
<ericwood>
I have a giant stack of 100 different things that range from insurance to car payments to other important stuff, and it's just sitting in a box
mytrile has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
enebo has joined #ruby-lang
swav has quit [Remote host closed the connection]
enebo has quit [Read error: Connection reset by peer]
enebo has joined #ruby-lang
blegat has quit [Ping timeout: 258 seconds]
MartynKeigher has quit [Excess Flood]
MartynKeigher has joined #ruby-lang
nertzy2 has joined #ruby-lang
<injekt>
whitequark: I'm not sure there's a nice way to solve that, I had initially thought something like this: https://gist.github.com/injekt/b54bd981ea406fd5081e but that obviously wont work because or overriding initialize
<whitequark>
injekt: oh, I don't really want to inherit Slop
<whitequark>
I just want to have a way of "partially initializing" it
<whitequark>
ie smth like "slop = Slop.new; slop.on(...); super(slop)"
nertzy has quit [Ping timeout: 276 seconds]
<injekt>
whitequark: ah right
<whitequark>
and in super more "slop.on(...)'
<injekt>
yeah I see
<whitequark>
inheritance would really be wrong here :)
<injekt>
yup
<injekt>
which led to my confusion :)
<injekt>
whitequark: you could do something like; slop = Slop.new; slop.on(...); slop.extend(BaseOptions) and add them in there
<injekt>
the problem is not being able to specify the order
mbj has joined #ruby-lang
idkazuma has quit [Remote host closed the connection]
<injekt>
or of course just send the slop object anywhere and add them
oneirophren has quit [Ping timeout: 256 seconds]
<whitequark>
injekt: ... I guess the obvious solution will work
<injekt>
whitequark: :P
lguardiola has joined #ruby-lang
jg has quit [Ping timeout: 256 seconds]
jxie has joined #ruby-lang
setmeaway has joined #ruby-lang
GeissT has quit [Quit: MillBroChat AdIRC User]
havenwood has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
<judofyr>
Aria: I have no idea how to help you. the Ruby community have sort-of just decided that it's possible to install multiple versions of the same gems,
<Aria>
Yeah.
<Aria>
It's not any specific thing that's a problem, it's just that all together, it's really frustrating.
* judofyr
wonders how Node.js is handled in the same system
<judofyr>
I would imagine you have the same problems there
<Aria>
Similar, but it was designed that way from the ground up.
<Aria>
So some of the nasty edge cases are shaved off.
<judofyr>
in Node.js or the RPM/OS-integration?
<Aria>
in node.js / npm.
<Aria>
It doesn't install into system locations by default. It doesn't even LOOK in system locations, often.
<Aria>
Their load path is relative to the file being executed/loaded, rather than relative to the cwd.
<judofyr>
Aria: interesting. what would make it easier in Ruby?
<Aria>
That last thing would be the best.
<Aria>
Relative load paths.
<Aria>
Without dirname hacks.
<judofyr>
for dependencies too?
blacktulip has quit [Remote host closed the connection]
<Aria>
Dependencies are searched for in a hierarchy of libdirs, starting deep and working upward.
<judofyr>
Aria: wouldn't you be able to accomplish the same with a shim-script that sets up the load path?
s0ber_ has joined #ruby-lang
<Aria>
Yes. That was how node.js did it originally.
<Aria>
It's brittle, and surprising, but ... honestly, probably the best way.
<judofyr>
I do wish Ruby had a better namespace system
<judofyr>
instead of just "load a file and define constants everywhere"
s0ber has quit [Ping timeout: 245 seconds]
s0ber_ is now known as s0ber
<Aria>
Yeah.
<Aria>
node.js had the opportunity to do better, with no backward-compatibility to worry about .
<judofyr>
still, I don't think node.js is the perfect solution
<Aria>
Not at all. They made an attempt, and got it better than most.
<Aria>
having versioning in the namespace is the only universal solution, I think.
<Aria>
require('foo-2.0')
<Aria>
But then people have to actually change the number when they break compatibility.
<Aria>
And THAT is something that's often not realized until later.
<judofyr>
one problem with Node.js: there's no way to specify dependencies for plugins. e.g. if Rails used Node.js-style libraries a plugin wouldn't be able to say "I can only be used with Rails 3.x"
<judofyr>
Aria: that is basically the Perl-way
<Aria>
There is!
<Aria>
peerDependencies
<judofyr>
there is?
<judofyr>
ah
<judofyr>
nice
<Aria>
Yup!
<Aria>
I was very happy to discover that. It was added more recently.
<judofyr>
recent?
<Aria>
Yeah, 0.8.x
<Aria>
It's nice having this encoded only into the package manager, and have the core lookup rules be more stupid.
<Aria>
rubygems went the other way and extended the runtime lookup mechanism heavily.
<judofyr>
I actually thought about this problem recently (about peer dependencies) and came to the same conclusion. although I called it "public dependency" and "private dependency"
* Aria
nods.
<Aria>
Makes perfect sense.
<apeiros>
oh, hey, hi Aria. rare guest you are nowadays :)
r0bby is now known as robbyoconnor
<Aria>
Hehe. Indeed.
<Aria>
Working for others leaves me less time for community. It's sad.
<Aria>
Also, living in node.js land a lot lately.
<judofyr>
apieros: I feel like you're becoming rarer and rarer
<judofyr>
too
<apeiros>
too sad… I have to go to bed (I'm already far too late :-S). talk to you another time :)
<apeiros>
judofry: nah, that's a temporal issue
<apeiros>
*temporary
<judofyr>
good :)
<Aria>
(Aww)
<judofyr>
I feel like whitequark has stolen this channel
<Aria>
Take care, judofyr!
<Aria>
One day I'll have to visit your timezone ;-)
<apeiros>
though, having a dedicated gaming pc might reduce my online time in irc :D
* apeiros
off, cya'all
<Aria>
Ta, apeiros
<Aria>
Oh. Derp. My client highlighted both apeiros and judofyr the same.
* Aria
waves to apeiros, and un-goodbyes judofyr
<judofyr>
:D
mbj has quit [Ping timeout: 258 seconds]
* judofyr
wonders if there's a seen-bot here
<judofyr>
corundum: seen ubersapiens
<corundum>
ubersapiens was last seen 3 days, 5 hours, 16 minutes and 43 seconds ago, quitting IRC (Ping timeout: 245 seconds)
<apeiros>
nickserv has that
<judofyr>
right
<judofyr>
where art you ubersapiens?
cirenyc has quit [Ping timeout: 248 seconds]
<judofyr>
Aria: I really wish we had something better than RubyGems :(
<Aria>
Me too.
<Aria>
rpa was on the right track, but tried to do too much.
<Aria>
Not enough small pieces.
benanne has quit [Quit: kbai]
srbaker has quit [Quit: Computer has gone to sleep.]
MaddinXx_ has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
Aria has quit [Remote host closed the connection]
Aria has joined #ruby-lang
<yxhuvud>
aria: extra fun ensued when fedora/redhat decided to change the way they package gems between 1.8 and 1.9. so much extra migration work to no productive use :(
mrfelix has quit [Quit: Computer has gone to sleep.]
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 248 seconds]
<yorickpeterse>
manveru: mostly because I feel that would make it look like an advertisement at this point
mrfelix has joined #ruby-lang
alessio_rocco has quit [Remote host closed the connection]
r0bby is now known as robbyoconnor
pskosinski has quit [Quit: pskosinski]
MaddinXx_ has joined #ruby-lang
<zzak>
corundum: seen drbrain
<corundum>
drbrain was last seen 8 days, 16 hours, 46 minutes and 18 seconds ago, saying so you end up with an extra hop going through the express
<zzak>
:(
<Aria>
yxhuvud: Yup. Though the new way seems better.
wmoxam has joined #ruby-lang
<yxhuvud>
well, I see some huge problems ahead if someone aims to run, say, mri 1.9 and jruby2.0 at the same time, as they have made gems global and have stripped the abi version.
<yxhuvud>
but apart from that, I'm not really convinced the changes actually solve any problems, while it *does* make their version of rubygem/bundler less compatible with the stock version.
<Aria>
Yeah.
<Aria>
Grm
<yxhuvud>
(my personal pet peeve is when they decide to change the dependencies of a gem, but that is really a different question)
<Aria>
(Hm.)
wmoxam has quit [Ping timeout: 252 seconds]
cirenyc has joined #ruby-lang
fjfish has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
sailias has quit [Ping timeout: 258 seconds]
<yxhuvud>
because it kills bundler cold when I add stuff in my dev env and then try to use prepackaged versions. (yes, I use both bundler and packaged gems, mostly cause it makes developing a lot simpler and it protects against stupid errors since it makes certain dependency failures are found as soon as possible).
francisfish has quit [Ping timeout: 256 seconds]
<yxhuvud>
oh well I should get some sleep. night.
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
cirenyc has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
solars has quit [Ping timeout: 256 seconds]
kain has joined #ruby-lang
wmoxam has joined #ruby-lang
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 264 seconds]
mrfelix has quit [Quit: Computer has gone to sleep.]
jacktrick has quit [Quit: Leaving]
chessguy has joined #ruby-lang
face has joined #ruby-lang
r0bby is now known as robbyoconnor
faces has quit [Ping timeout: 276 seconds]
MaddinXx_ has quit [Remote host closed the connection]