tonni_ has quit [Remote host closed the connection]
judofyr has quit [Ping timeout: 272 seconds]
bzalasky has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
retro|cz has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
miqui has quit [Remote host closed the connection]
mistym has joined #ruby-lang
miqui has joined #ruby-lang
miqui has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
Raycaster1 has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
danijoo has quit [Read error: Connection reset by peer]
dik_dak has quit [Quit: Leaving]
danijoo has joined #ruby-lang
r0bglees0n has quit [Ping timeout: 245 seconds]
stonerfish has quit [Quit: Leaving.]
amerine has quit [Quit: Computer has gone to sleep.]
stonerfish has joined #ruby-lang
knu has joined #ruby-lang
elliotec has quit [Remote host closed the connection]
tylersmi_ has quit [Remote host closed the connection]
elliotec has joined #ruby-lang
vlad_starkov has joined #ruby-lang
kitak_ has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
amerine has joined #ruby-lang
knu has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
mucker has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
kitak has joined #ruby-lang
tonni has joined #ruby-lang
apeiros has quit [Ping timeout: 272 seconds]
knu has quit [Ping timeout: 252 seconds]
anulman has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
rubyn00b316 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mistym_ has joined #ruby-lang
mistym__ has joined #ruby-lang
bjh13 has quit [Quit: leaving]
arBmind has joined #ruby-lang
judofyr has joined #ruby-lang
mistym has quit [Ping timeout: 272 seconds]
judofyr has quit [Client Quit]
mistym_ has quit [Ping timeout: 252 seconds]
Barrin6 has quit [Remote host closed the connection]
moneydouble has quit [Quit: Leaving.]
anulman has joined #ruby-lang
knu has joined #ruby-lang
jerrytgarcia has quit [Quit: WeeChat 0.4.2]
rubyn00b316 has quit [Quit: irc2go]
abroco has joined #ruby-lang
<abroco>
hello.
<abroco>
Given the string "hello'\bye", how can I trim the string so that it gives back "hello" alone, trimming special characters, and everything that comes after it?
Lewix has joined #ruby-lang
bzalasky has joined #ruby-lang
simoz15 has joined #ruby-lang
<whitequark>
abroco: define 'special characters'
<abroco>
whitequark: commas, periods, quotes.
<whitequark>
but str[/\A(.*)[special character set]/, 1]
dagobah has joined #ruby-lang
<abroco>
Already using s = n.delete("^a-zA-Z0-9")
<abroco>
(which does "hellobye", given "hello'\bbye"
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
ninjapig1 has joined #ruby-lang
anulman has joined #ruby-lang
ninjapig has quit [Ping timeout: 252 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
mikecmpbll has joined #ruby-lang
elliotec_ has quit [Ping timeout: 272 seconds]
arBmind has quit [Quit: Leaving.]
phansch_ is now known as phansch^
anulman1 has joined #ruby-lang
anulman has quit [Read error: Connection reset by peer]
tbuehlmann has quit [Quit: Konversation terminated!]
tbuehlmann has joined #ruby-lang
tbuehlmann has quit [Changing host]
tbuehlmann has joined #ruby-lang
anulman1 has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
elia has joined #ruby-lang
DouweM has joined #ruby-lang
Fyyr13 has quit [Remote host closed the connection]
matp has quit [Quit: Bye!]
jsullivandigs has joined #ruby-lang
workmad3 has joined #ruby-lang
faces has joined #ruby-lang
arBmind has joined #ruby-lang
face has quit [Ping timeout: 253 seconds]
matp has joined #ruby-lang
DouweM has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 272 seconds]
albioner_ has quit [Quit: Signing off...]
<yorickpeterse>
morning
<apeiros>
moin
<ljarvis>
pretty sure 30% of rubyists have gone to rust, another 30 to Go
<yorickpeterse>
pretty sure the other 70% is making good money with Ruby
<apeiros>
the other 40 enjoy malbolge
<yorickpeterse>
and will continue doing so for another decade
heftig has quit [Ping timeout: 272 seconds]
phansch^ is now known as phansch
yfeldblum has joined #ruby-lang
knu has joined #ruby-lang
|jemc| has quit [Ping timeout: 240 seconds]
heftig has joined #ruby-lang
cba has quit [Quit: Leaving]
_tockitj has joined #ruby-lang
<yorickpeterse>
oh boy, Monday morning shit's acting up
<yorickpeterse>
YAY
<ljarvis>
:/
<ljarvis>
apeiros: :D
<ljarvis>
dat hello world
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<r0bglees0n>
ljarvis: diversity is key
knu has quit [Ping timeout: 252 seconds]
<apeiros>
ljarvis: we're just waiting for malbolge on rails
<r0bglees0n>
any language who copies rails is doomed to fail though :P
<ljarvis>
what language copies rails?
<apeiros>
I don't worry. Malbolge will prevail.
<ljarvis>
ah
<ljarvis>
indeed
<ljarvis>
rails isn't that bad
<r0bglees0n>
none that i know of, it was a joke, to say why would you copy the mistakes of one framework that may have led you to another language in the first place
knu has joined #ruby-lang
<apeiros>
I think there are rails clones for php and python
<apeiros>
not sure how close to the original those are
<r0bglees0n>
yeah, MVC frameworks at the very least
<r0bglees0n>
same idea a lot of the time
benlovell has joined #ruby-lang
kitak has quit [*.net *.split]
<apeiros>
there are some people who argue that rails isn't really MVC
<apeiros>
(note: I don't have an opinion on that, and I don't really care for pattern names)
<yorickpeterse>
Malbolge?
<ljarvis>
MVC kind of implies simplicity in some ways
<r0bglees0n>
i don't think MVC matters that much for rails, but i'm not sure. i think its selling point is the ability to prototype quickly and get something to market quickly, with very little fuss. you can be very productive, until it takes 10000 light years to 'rails s', then it bites
kitak has joined #ruby-lang
<ljarvis>
I still enjoy rails because I get to write a heck of a lot of ruby
<ljarvis>
and it's easy to test
<yorickpeterse>
yeah but Rails is too mainstream
relix has joined #ruby-lang
<apeiros>
I have yet to figure out how to properly test controllers :-/
<r0bglees0n>
sure, it's not terrible, it would be super awesome if there was an alternative though (viable alternative)
<apeiros>
and views
<r0bglees0n>
nothing can challenge it on the same stage because sinatra wouldn't build the same application
<apeiros>
rails doesn't exactly make it easy to isolate those
<yorickpeterse>
apeiros: lol testing views
<yorickpeterse>
shit's hard yo
<apeiros>
I'm sorry, our views don't just consist of "<h1>Hello there!</h1>"
* yorickpeterse
is currently in the posession of the company credit card
<yorickpeterse>
apeiros: I'm swimming in money here
<apeiros>
ljarvis: well, I meant the rendered version
<ljarvis>
I know i.. i was kidding
<apeiros>
I'M NOT!
<ljarvis>
LETS NOT KID ABOUT HTML
* apeiros
so serious
<ljarvis>
srs
<r0bglees0n>
apeiros: i didn't find it too hard with a mock or two or twenty
<r0bglees0n>
i usually would use cucumber/capybara for that though, not as precise though
<apeiros>
r0bglees0n: cucumber/capybara is the anti-thesis of isolated testing
<r0bglees0n>
yup
<r0bglees0n>
its an integration test
<apeiros>
yes
<apeiros>
that I can do just fine
<ljarvis>
i unit test controllers
<apeiros>
but I want proper unit tests
<ljarvis>
and testing views is over testing
<apeiros>
ljarvis: strongly disagree
<r0bglees0n>
tend to agree, if you have cukes
<yorickpeterse>
lol cucumber
<apeiros>
our views contain a lot of logic
<r0bglees0n>
yorickpeterse: well, anything that uses capybara then
<r0bglees0n>
it could be rspec or something
<ljarvis>
apeiros: I think it makes it easier to over test, we test functionality via capybara, but we dont test for general markup logic (existence, for example)
toretore has joined #ruby-lang
DouweM has joined #ruby-lang
<apeiros>
ljarvis: the parts I want to test are mostly related to authorization and javascripts/ajax
<apeiros>
and I'd prefer to not test those as integration tests
<apeiros>
anyway, it's mostly theory anyway as we don't get the time to set up proper tests :(
<ljarvis>
we have a huge capybara suite that runs poltergeist
<ljarvis>
takes about 3 weeks to run
<ljarvis>
(2 minutes)
<r0bglees0n>
run it right before your holidays
<ljarvis>
but we unit test our controllers
<apeiros>
our last version of cukes took some 30min to run :-/
<apeiros>
not sure it's still running
<r0bglees0n>
4 or so mins here
<r0bglees0n>
not that bad
<ljarvis>
I hate cukes
<r0bglees0n>
variation of capybara-webkit & poltergeist
<ljarvis>
hate with a H
<r0bglees0n>
i dont like writing them either
<r0bglees0n>
pretty painful and horrible
<ljarvis>
my problem with cukes is that I genuinly dont understand why it exists, the whole "my client wants to read/write tests" is a bullshit cop-out
<apeiros>
for me the most painful was, that you couldn't rely on cucumber to still run after updating stuff
<r0bglees0n>
yeah, on one hand though it is a pretty good language for describing user interaction with a browser
<r0bglees0n>
it is just so horrible to write new steps
<lupine>
heh. the move to rspec2 + new-cucumber is a nightmare, from 1 + old-cucumber
<apeiros>
every couple of weeks you had to tweak and fiddle with old parts simply because of updates
<lupine>
but I did enjoy writing tests in it, and that's honestly the important bit
kitak has quit [Remote host closed the connection]
knu has quit [Ping timeout: 252 seconds]
<r0bglees0n>
i see specs written the 'rspec + capybara' way, it does look much more preferable and easier to get stuff done
<r0bglees0n>
you dont have to write a 'story' first
knu has joined #ruby-lang
kitak has joined #ruby-lang
<ledestin>
about production. do you have cron job or something with bundle update for your apps?
francisfish has joined #ruby-lang
<r0bglees0n>
that may not be wise
<ledestin>
yeah, I just thought about it
<ledestin>
might break
<r0bglees0n>
yeah
<ljarvis>
bundle update should never be run without an argument
<r0bglees0n>
alias yolo='bundle update && deploy!'
<ledestin>
ljarvis: in production maybe, so that you can have only versions that you've tested
<ledestin>
ljarvis: if that's what you mean
<r0bglees0n>
bundle update will update all your dependencies, then Gemfile.lock, and depending on how wise gem authors have been they may totally break your app through greedy version requirements
<r0bglees0n>
definitely something to do before production
bzalasky has quit [Remote host closed the connection]
<ljarvis>
ledestin: I wouldn't rcommend ever running bundle update without a specific library
<r0bglees0n>
you would also need to reboot your application as part of that cronjob for it to be seen
anulman has joined #ruby-lang
<ljarvis>
as r0bglees0n says, it updates everything
<ljarvis>
that's geenrally not what you want
<ljarvis>
also i cant spell
rjrj has quit [Ping timeout: 260 seconds]
<ledestin>
ljarvis: well, if I need to be up to date, I'd update everything
FlyingLeap has quit [Remote host closed the connection]
FlyingLeap has joined #ruby-lang
<r0bglees0n>
you can do that but don't do it in production unless you wanna be freddie mercury for a day
<ljarvis>
heh
<ljarvis>
that's crazy but ok
<r0bglees0n>
id agree, better to do it one-by-one and verify before you do something like that
<ledestin>
r0bglees0n: yeah
<r0bglees0n>
you wanna be freddie? then go for it
mistym has joined #ruby-lang
<ledestin>
r0bglees0n: how does it relate to Freddie?
rjrj has joined #ruby-lang
<r0bglees0n>
because only a rockstar superstar could pull it off and live to tell the tale
anulman has quit [Ping timeout: 252 seconds]
<ledestin>
ok
<r0bglees0n>
sorry i dont mean to be rude. it's just not a good idea in general.
<ledestin>
isn't there automated scripts or something? run tests, then use those versions in production?
<ljarvis>
ledestin: why not use the versions that work?
<ljarvis>
why update everything if the test suite passes?
<ledestin>
ljarvis: well, they update it for a reason
<ledestin>
ljarvis: for example, I've fixed bugs in my gem
<r0bglees0n>
the only thing i could see myself doing is something like using bundle-audit to automatically deploy fixes as they become available and also go through a test build
<r0bglees0n>
security fixes*
<ljarvis>
ledestin: then you'd update that gem
<ljarvis>
that proves my point
<ledestin>
ljarvis: but it's too much of dependencies
<r0bglees0n>
rails also degraded performance in one of their security fixes
<r0bglees0n>
so lots of stuff to consider
<ledestin>
there's no security.rubygems.org
<ljarvis>
what does that have to do with anything?
<ledestin>
so you can't just follow security updates
<darix>
btw: that ruby-advisory-db should really check if the sec bug is still there and not just compare version numbers. otherwise it will get lots of false alarms with vendor provided libs.
<r0bglees0n>
darix: open an issue? don't know much about it myself to make a comment.
<r0bglees0n>
the way it works at the moment is that someone sends a pull request, and there is a process it goes through before it can be added
<r0bglees0n>
it also tracks a "fixed version"
<darix>
r0bglees0n: many distros wont bump the version. they will backport the fix.
<r0bglees0n>
don't use your distro for rubygems
<r0bglees0n>
terrible idea
<ljarvis>
:D
<ljarvis>
i think you just started something
diegoviola has joined #ruby-lang
<darix>
r0bglees0n: some distros do actually a pretty good job for it. and when the distro ships ruby based apps themself. they dont have much of a choice anyway.
<darix>
oh and just in case you didnt know ... i am actually working on packaging gems for such cases.
<r0bglees0n>
cool
<darix>
besides most "security scanners" are stupid enough to compare just versions
<r0bglees0n>
i don't have that as an immediate problem because i just use rubygems, which disallows(iirc) re-releasing the same version
<darix>
correct
<r0bglees0n>
no patches, or anything like that
<darix>
which is correct for them.
<darix>
but e.g. when upstream only releases the sec fix for the latest version. and you need it for an older version because another gem pulls it via ~>
<r0bglees0n>
yeah, sure, it doesn't get that complicated and often maintainers won't maintain older 0.X releases or branches
benlovell has quit [Read error: Operation timed out]
<r0bglees0n>
it's very unwarranted for just a little project or something
jsullivandigs has joined #ruby-lang
<r0bglees0n>
for rails2 or similar i could understand
<darix>
r0bglees0n: rails2 means also every gem which is needed by that ;)
<r0bglees0n>
sure
<r0bglees0n>
which is why it's better to keep moving your stack with the times if you can
<darix>
r0bglees0n: and then you run into fun things like. gems start to require 1.9 or higher. which you cant just put in as it wasnt a drop in replacement and you cant break customer code during release cycles.
<darix>
r0bglees0n: you really think they are doing that because it is fun?
<r0bglees0n>
yeah
<r0bglees0n>
i just dont think you should run into that problem because 1.9-only took a while
symm- has quit [Ping timeout: 245 seconds]
<darix>
*sigh*
<r0bglees0n>
yeah, sure :)
jsullivandigs has quit [Ping timeout: 252 seconds]
<r0bglees0n>
im pretty against supporting old software
<darix>
it was one facet.
fuhgeddaboudit has quit [Ping timeout: 260 seconds]
<r0bglees0n>
i understand some people have limitations or situations that make it much harder to upgrade
<darix>
r0bglees0n: take a few semi complex rails apps.
<darix>
and then just check how many versions of each gem you will need to support all of those.
<r0bglees0n>
yeah, believe me i get it, but in most situations you should be making an effort to move onto a newer stack as part of your development flow. by the time everything is 1.9-only is kind of way too late, it didn't happen over night.
robmiller has quit [Quit: robmiller]
workmad3 has joined #ruby-lang
skade has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wardrop has joined #ruby-lang
yfeldblum has quit [Ping timeout: 252 seconds]
<Wardrop>
Is there an official github repo or anything for ERB in the standard library?
<Wardrop>
I know the JSON library has it's own github repository to which one can submit bugs, etc. Looking for the same for ERB.
<r0bglees0n>
Wardrop: kind of, there is github.com/ruby/ruby, and there is github.com/rubysl/rubysl-erb
<r0bglees0n>
if you want a change to go back upstream, it should go back to ruby/ruby. rubysl-erb is a rubinius thing at the moment.
<r0bglees0n>
JSON is maintained outside MRI yeah
<Wardrop>
r0bglees0n: Yeah I wasn't sure what `rubysl` was all about. Thanks for the clarifcation.
<r0bglees0n>
sure
<Wardrop>
So should I be submitted bugs and feature request for ERB through bugs.ruby-lang.org?
<yorickpeterse>
yes
<r0bglees0n>
probably the best place to get a response
kitak has quit [Remote host closed the connection]
<r0bglees0n>
you can submit PRs on ruby/ruby but it can be slow from what i heard
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Johz has joined #ruby-lang
Squarepy has joined #ruby-lang
vlad_starkov has joined #ruby-lang
skade has joined #ruby-lang
anulman has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
anulman1 has joined #ruby-lang
anulman has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
anulman1 has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
Mon_Ouie has quit [Ping timeout: 248 seconds]
jerrytgarcia has joined #ruby-lang
anulman has joined #ruby-lang
mucker has joined #ruby-lang
anulman1 has joined #ruby-lang
anulman has quit [Read error: Connection reset by peer]
moneydouble has quit [Quit: Leaving.]
heftig has quit [Ping timeout: 272 seconds]
thisirs has joined #ruby-lang
anulman1 has quit [Ping timeout: 265 seconds]
MrZYX|off is now known as MrZYX
plurt has joined #ruby-lang
phansch has quit [Quit: Leaving]
marr has joined #ruby-lang
clamstar has quit [Quit: Computer has gone to sleep.]
patriciomacadden has joined #ruby-lang
EngierkO has joined #ruby-lang
retro|cz has joined #ruby-lang
<yorickpeterse>
So before I come up with some crazy secret sauce, does anybody know of a way to parse HTML/XML in Nokogiri using the DOM parser, minus the terrible memory impact?
<whitequark>
no.
<yorickpeterse>
Writing 63 SAX parsers isn't really fun
<yorickpeterse>
hm
<yorickpeterse>
I was thinking of some hybrid solution, but that might still be pretty tricky
<yorickpeterse>
That is, use a SAX parser to find your "context", then use the DOM for that
<whitequark>
yes, I was about to say that
<yorickpeterse>
alternatively: lol regexp
<yorickpeterse>
<insert that SO post>
<whitequark>
your data formats are probably similar
<yorickpeterse>
HAHAHA
<yorickpeterse>
No
<whitequark>
okay
<yorickpeterse>
63 totally different websites
mehlah has quit [Read error: Connection reset by peer]
mehlah_ has joined #ruby-lang
<yorickpeterse>
of which some are just flat out insane, but at least with all we know the entry point of our data
shinnya has joined #ruby-lang
fuhgeddaboudit has quit [Ping timeout: 265 seconds]