byennen has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
byennen has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
chrishough has quit [Quit: chrishough]
subbyyy has joined #ruby
radic has joined #ruby
thams has quit [Quit: thams]
tcstar has joined #ruby
twshelton has quit [Quit: Computer has gone to sleep.]
browndawg has quit [Ping timeout: 252 seconds]
tcstar has quit [Remote host closed the connection]
etcetera has joined #ruby
FELS___ has quit [Ping timeout: 252 seconds]
radic_ has quit [Ping timeout: 252 seconds]
girija has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
agarie has joined #ruby
hbpoison has joined #ruby
ebobby has quit [Ping timeout: 246 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
jgrevich has joined #ruby
bradhe has joined #ruby
rakm has quit [Ping timeout: 245 seconds]
rakm has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
tealmage has quit [Remote host closed the connection]
<Yakko>
hey guys, I'm setting $stdout=File.open('a.log', 'a') and writing put commands in a rake task with an infinite loop and a sleep 1, but the log file only gets written when the rake task finishes running, am I missing anything?
tcstar has joined #ruby
tcstar has quit [Remote host closed the connection]
<sam113101>
maybe you should close the file handle and reopen it once in a while? I don't know
maxmanders has quit [Ping timeout: 276 seconds]
tcstar has joined #ruby
jborica has quit [Remote host closed the connection]
maxmanders has joined #ruby
<breakingthings>
What's the "break" equivalent keyword in ruby? eg. to break out of a control group (stop processing an if clause)
BoomCow has joined #ruby
<sam113101>
it's break
<otters>
are there languages that let you break out of an if?
<otters>
i've never heard of that
angusiguess has joined #ruby
<breakingthings>
sam113101: does it accept multiple levels?
<breakingthings>
eg break 2
<breakingthings>
(I know this is hacky as shit but I'm just throwing together something. Don't judge me :d)
yshh has quit [Remote host closed the connection]
<sam113101>
no
<otters>
I don't think ruby has labeled break either, does it
<otters>
you could use throw/catch though
yshh has joined #ruby
iamjarvo has joined #ruby
akashj87 has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
verysoftoiletppr has quit [Ping timeout: 252 seconds]
tundrax has joined #ruby
BoomCow has quit [Quit: Leaving]
Qwak has joined #ruby
mneorr has joined #ruby
verysoftoiletppr has joined #ruby
ahokaomaeha is now known as lolcathost|afk
nignaztic has joined #ruby
nignaztic has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
Qwak has quit [Ping timeout: 252 seconds]
Retistic has quit [Quit: Retistic]
Guest69401 has quit [Ping timeout: 245 seconds]
meoblast001 has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
speakingcode has joined #ruby
[rust] has joined #ruby
ddd has joined #ruby
ddd is now known as Guest94877
sandGorgon has quit [Ping timeout: 256 seconds]
sandGorgon has joined #ruby
byennen has quit [Ping timeout: 260 seconds]
byennen has joined #ruby
IceDragon has quit [Quit: Space~~~]
yshh has quit [Remote host closed the connection]
philcrissman has joined #ruby
byennen has quit [Remote host closed the connection]
byennen has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
philcrissman has quit [Remote host closed the connection]
bradhe has joined #ruby
byennen has quit [Remote host closed the connection]
lolcathost|afk has quit [Ping timeout: 252 seconds]
Matip has joined #ruby
yshh has joined #ruby
decoponio has quit [Quit: Disconnect before AFKing]
akashj87 has joined #ruby
takeru has joined #ruby
Mattix has quit [Ping timeout: 255 seconds]
cableray has joined #ruby
takeru has quit [Ping timeout: 252 seconds]
mattbl has joined #ruby
fbernier has quit [Ping timeout: 256 seconds]
agarie has quit [Remote host closed the connection]
fbernier has joined #ruby
smallcapsdude has joined #ruby
statarb3 has quit [Ping timeout: 276 seconds]
etcetera has quit [Ping timeout: 260 seconds]
girija has quit [Ping timeout: 256 seconds]
yshh has quit [Read error: Connection reset by peer]
yshh_ has joined #ruby
averiso has joined #ruby
Bry8Star has joined #ruby
sandGorgon has quit [Ping timeout: 260 seconds]
pakchoi2 has joined #ruby
breakingthings has quit []
heliumsocket has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
mlr has quit [Ping timeout: 255 seconds]
ThePicard has quit [Ping timeout: 252 seconds]
dross has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
Retistic has joined #ruby
joofsh has quit [Remote host closed the connection]
akashj87 has quit [Ping timeout: 264 seconds]
dross has joined #ruby
agarie has joined #ruby
ThePicard has joined #ruby
pakchoi2 has quit [Ping timeout: 260 seconds]
bradhe has quit [Ping timeout: 244 seconds]
Gwyxx has joined #ruby
pakchoi2 has joined #ruby
beiter_ has joined #ruby
sandGorgon has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
heliumsocket has joined #ruby
beiter has quit [Ping timeout: 248 seconds]
beiter_ is now known as beiter
tundrax has quit [Remote host closed the connection]
<fir_ed>
this might come in handy if i listen on port 80 i suppose
<fir_ed>
using tcpserver class
<johnsalton>
Hi I'm using rbenv. I'm installed several different versions without problem, and then I went to install maglev-1.0.0, and all of a sudden something is running sudo and asking for my password. that's not right is it? what could be going on?
<johnsalton>
Using ruby-build as well, i should have said
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
emergion has quit [Quit: Computer has gone to sleep.]
pakchoi2 has quit [Ping timeout: 255 seconds]
jhgaylor has joined #ruby
tundrax has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
mattbl has quit [Quit: This computer has gone to sleep]
bradhe has joined #ruby
Animawish has joined #ruby
<Animawish>
given the array ['a', 'b', 'a'], how would I get the index of both 'a's?
<heftig>
%w{a b a}.flat_map.with_index { |x,i| x == "a" ? [i] : [] }
Bry8Star has quit [Ping timeout: 276 seconds]
<heftig>
i probably forgot something
pakchoi2 has joined #ruby
spaceships has quit [Ping timeout: 276 seconds]
<fir_ed>
Animawish: your answer is up there
<fir_ed>
I didn't check it
angusiguess has joined #ruby
Adys_ is now known as Adys
tomzx_mac has quit [Ping timeout: 260 seconds]
<Animawish>
i've never seen either of those methods before
skcin7 has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
<danneu>
johnsalton: i dont use rbenv but is there some incantation you need to type to tell it to actually use one of the installed rubies by default?
emergion has joined #ruby
<danneu>
johnsalton: cuz it sounds like you opened a new terminal without doing that and you're back using system ruby
morfin has left #ruby [#ruby]
angusiguess has quit [Ping timeout: 244 seconds]
<fir_ed>
Animawish, that's also in enumerable
<fir_ed>
except it is called each_with_index
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
love_color_text has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 256 seconds]
<Animawish>
where can I read more about %w?
mattbl has quit [Quit: This computer has gone to sleep]
bradhe has quit [Remote host closed the connection]
generalissimo has quit [Remote host closed the connection]
MrSamuel has joined #ruby
<johnsalton>
danneu: it looks like MagLev-1.0.0 for build-build is just pretty broken, there's a few posts about it here and there, so i think i'll give up, just in case anyone is googling this irc for the same problem as me
wmoxam has quit [Ping timeout: 260 seconds]
blueOxigen has joined #ruby
<Animawish>
so %w[asdf] is just a fancy idiomatic way to write some kinds of arrays?
bluOxigen has quit [Ping timeout: 252 seconds]
<fir_ed>
%w[a s d w] => ["a","s","d","f"]
<fir_ed>
Animawish: ^
johnsalton has quit [Quit: Page closed]
w|t has quit [Quit: Cya.]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
pakchoi2 has quit [Quit: 离开]
Qwak has quit [Ping timeout: 255 seconds]
takeru has joined #ruby
MrSamuel has quit [Ping timeout: 246 seconds]
generalissimo has joined #ruby
dmiller has joined #ruby
dmonjo has joined #ruby
<dmonjo>
hello ruby on weekends
neverminding has joined #ruby
averiso has quit [Ping timeout: 252 seconds]
love_color_text has joined #ruby
pakchoi2 has joined #ruby
averiso has joined #ruby
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
neverminding has quit [Remote host closed the connection]
jhgaylor has quit [Quit: Leaving]
tundrax has quit [Remote host closed the connection]
verysoftoiletppr has quit []
pakchoi2 has quit [Read error: Connection reset by peer]
pakchoi2 has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
verysoftoiletppr has joined #ruby
znode has joined #ruby
tcstar has quit [Remote host closed the connection]
pakchoi2 has quit [Max SendQ exceeded]
maxmanders has quit [Ping timeout: 276 seconds]
newUser1234 has joined #ruby
bradleyprice has quit [Remote host closed the connection]
maxmanders has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
verysoftoiletppr has quit [Client Quit]
znode_ has joined #ruby
seich- has joined #ruby
znode has quit [Ping timeout: 245 seconds]
dmiller has quit [Ping timeout: 252 seconds]
NobbZ has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 264 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
NobbZ has joined #ruby
tundrax has joined #ruby
NobbZ has quit [Remote host closed the connection]
d3vic3 has joined #ruby
TomJ_ has joined #ruby
TomJ_ has quit [Changing host]
TomJ_ has joined #ruby
NobbZ has joined #ruby
pakchoi2 has joined #ruby
generalissimo has quit [Remote host closed the connection]
TomJ has quit [Ping timeout: 260 seconds]
TomJ_ is now known as TomJ
goganchic has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<jblack>
omg.
crackfu has quit [Remote host closed the connection]
angusiguess has joined #ruby
<jblack>
I'm using ObjectSpace to print out a count of each type of class I'm using.
<jblack>
and 77k srings, 68k hashes, 17k Time... (17k of type Time??????)
<jblack>
The only way I explicitely use Time at all, is Time.now.to_i
pakchoi2 has quit [Ping timeout: 244 seconds]
chrisramon has joined #ruby
<chrisramon>
hi
<chrisramon>
i have a event machine web socket running
<chrisramon>
how can i connect to it and send messages with ruby ?
justsee has quit [Ping timeout: 260 seconds]
johnnyg1 has quit [Quit: Leaving.]
BeLucid has quit [Ping timeout: 260 seconds]
etcetera has joined #ruby
<jblack>
chrisramon: You mean you're accepting tcp requests on port somethignorother?
<chrisramon>
I want to send message to the web socket which I created using event machine
<chrisramon>
from another script with ruby
havenwood has quit [Remote host closed the connection]
sandGorgon has quit [Ping timeout: 255 seconds]
AndChat| has quit [Ping timeout: 260 seconds]
akashj87 has joined #ruby
<dmonjo>
i know 5 websites that provide some information when queried over web interface for example when searching in the search bar provided by the websites, is there a way in ruby to create like a small software that can query these search bars? something like send a get request, point to that search bar and return the data to my ruby?
<dmonjo>
maybe to gather all data rom these websites and put them on my server for caching
<jblack>
dmonjo: Almost tthe same question as chrisramon. =) Look at Mechanize.
<jblack>
but those search bars use javascript. not sure how you'll run that, but there are javascript interpreters for ruby
<dmonjo>
jblack: is that legal in some way ? coz can you exhaust the database of the websites and get all their data that way
Retistic has joined #ruby
<jblack>
Good luck with that.
<chrisramon>
jback
<jblack>
some how I don't think you're going to get all of google's search results by hitting "a", then "b" then "c". and so on
<chrisramon>
can i connect to web socket using mechanize ?
danneu has quit [Quit: WeeChat 0.3.8]
<dmonjo>
jblack: but technically speaking it can be done surely if the db is not as google's size
<jblack>
dmonjo: As it happens, I scrape Secretary of State websites to download business entity data.
akashj87 has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
<jblack>
any given database you're looking at "out there" is var larger than the soda straw that is an http form.. with or without javascript.
<jblack>
you really have to know what you're looking for.
lkba has joined #ruby
tealmage has joined #ruby
<jblack>
what data are you tryign to get, dmonjo?
<dmonjo>
jblack: you mean since we are getthing the data via http instead of direct db access so you have all these headers getting in the way
<dmonjo>
some yellowpages
<jblack>
so you want to scrape business info.
<dmonjo>
no
<dmonjo>
i am just asking if this is legal or not
<dmonjo>
since data is accessible to the public anyways
<jblack>
Almost certainly not.
Retistic has quit [Ping timeout: 246 seconds]
<jblack>
At least not in the US. In the US, you need permission to connect and use a resource on the internet...
pakchoi2 has joined #ruby
<dmonjo>
jblack: what if you redirect the request ot their website?
<dmonjo>
and not download anything
<jblack>
now, nobody is ever going to get into trouble because they poke at something a little, but when you start doing it in bulk, you cross a line, and Who you're pissing off becomes important.
dallasm_ has joined #ruby
<jblack>
It's all about terms of use, and what they've given you permission to do
SCommette has joined #ruby
<jblack>
There's a recent tragedy involving Aaron Swartz. He made a program to download scientific journals from a company that MIT had licensed the data from
<dmonjo>
do wqebsites publish term of use ? never saw that :)
<jblack>
all big ones do.
<dmonjo>
aha
v0n has quit [Ping timeout: 255 seconds]
love_color_text has quit [Remote host closed the connection]
<dmonjo>
these scientifc journals were shared for the public ?
<jblack>
First MIT tried to stop him one way, then they tried another. Then, he put a computer on their network. and he scraped all that data.
<jblack>
they were shared with MIT students and alumni.
tundrax has quit [Remote host closed the connection]
<dmonjo>
i see
<jblack>
but the terms or service were clear. You're not allowed to just grab them all.
dallasm has quit [Ping timeout: 252 seconds]
<dmonjo>
got it
<jblack>
So, He violated terms of service, and MIT AND the journal company pressed charges.. at least until it became public.
<dmonjo>
thanks for sharing
<jblack>
It's worth knowing about .
v0n has joined #ruby
<dmonjo>
sure
<jblack>
In real life, it's all about how annoying you are, and who you piss off.
<jblack>
99.99% of places out there, if they care at all will just ban your ip, and that's the end of it.
<jblack>
but if you try to download craploads of data that someone sell, and especially if you start to compete against them, you can bet they'll do their best to make you sad.
cableray has quit [Quit: cableray]
<jblack>
You might be able to argue fair use. You might be able to argue permission was given. you might be in the right. But that may not stop them from trying to make you wish you had never tried.
<jblack>
Make sense buddy?
Nisstyre-laptop has quit [Quit: Leaving]
<dmonjo>
well said
tealmage has quit [Ping timeout: 264 seconds]
<jblack>
Google isn't likely to sue you.. or yahoo... Monster companies don't generally beat up on the little folk unless they're really being a BIG pain in the ass...
<jblack>
but your midsized companies can be real assholes, and they're often powerful enough to make your life suck if they don't like you
oneawayman has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
<jblack>
They can also be really cool. My advice: Contact the people you want the data from, and ask them if they can public an api.
<dmonjo>
thats the way i was thinking about
<jblack>
if you tell a good story about why it's good for them, you very well might get a nice api
<jblack>
open communication is all the rage these days. =)
daniel_- has joined #ruby
oneawayman has joined #ruby
charliesome has joined #ruby
Slivka has joined #ruby
<jblack>
Ok, so, I'm looking at an array of objects provided by ObjectSpace ....
<jblack>
My turn! How do I find out which objects hold references to another object?
marr has joined #ruby
goganchic has quit []
dhruvasagar has joined #ruby
<devyn>
hm, I'm not sure you can do that
sandGorgon has joined #ruby
<jblack>
e.g. let's say I have an object "in the hand"... is there a way to find out which other objects hold a reference to that object?
chrisramon has quit [Quit: chrisramon]
mduvall has quit []
<jblack>
I'm trying to chase down a file handle leak because somewhere my code is opening but not closing sockets.
mneorr has joined #ruby
<jblack>
I don't know what's doing it, so somehow I need to figure out what's opening socket, and then figure out what's not being GC'ed
<devyn>
well, I wouldn't rely on GC to close sockets…
<devyn>
just close them yourself when you're done with them
<jblack>
I presume that whatever object opened the socket would close it when -it- gets GC'ed.
<jblack>
I'm not directly handling sockets at all.
oneawayman has quit [Ping timeout: 276 seconds]
<jblack>
I'm using things that do... Nokogiri, Mechanize, a logger class or two...
<devyn>
hm, Mechanize could do it
* devyn
looks into it
dmiller has quit [Ping timeout: 252 seconds]
oneawayman has joined #ruby
<devyn>
jblack: you can call #shutdown on a Mechanize instance, apparently
<devyn>
which closes its persistent connections
<jblack>
hmmm. I would have expected it to do that on it's own...
<jblack>
but perhaps lazy cleanup you think?
etcetera has quit [Remote host closed the connection]
jgrevich has quit [Remote host closed the connection]
<jblack>
I've got up to 50 threads running, hitting various SoS websites.
<devyn>
well you just shouldn't be relying on GC to do that
SCommette has quit [Quit: SCommette]
<jblack>
I agree. it's almost always a bad sign when one talks to the GC
<devyn>
Mechanize intentionally has persistent connections
<devyn>
to make things faster
smallcapsdude has quit [Quit: smallcapsdude]
<jblack>
lol.
<jblack>
I googled for "Mechanize shutdown" and the very first result is "Sep 3, 2012 – e.g. when writing crawlers, it's easy to hit the limit of open files because of idle Net::HTTP::Persistent connections. If you agree this is useful I ..."
mneorr has quit [Ping timeout: 255 seconds]
decoponio has joined #ruby
<jblack>
that sounds like me
smallcapsdude has joined #ruby
<devyn>
are you using the same Mechanize instance, or creating new ones all the time?
<jblack>
I'm creating new one all the time.
<devyn>
actually, that shouldn't make a difference
<devyn>
just use #shutdown xD
<jblack>
You don't think I'll kick myself in the threads by doing that, do you?
<jblack>
each thread is starting up mechanize on it's own, so as long as there's no singleton hidden in there... right ?
* devyn
shrugs
<jblack>
nah, they should be independent objects
dhruvasagar has quit [Remote host closed the connection]
<devyn>
well, get it working, I guess, and if you find a better way, use that
<jblack>
I only call "getmechanize" 9 times throughout the codebase.
<jblack>
so that should be an easy fix.
<devyn>
I have a feeling that whatever you're doing is not really the best design, but hey, go for it; there's time to make it better later
<devyn>
:p
<jblack>
I'm scraping entity data from secretary of state websites. each state is slightly different, so the code is slightly different for each one.
pakchoi2 has quit [Quit: This computer has gone to sleep]
<jblack>
so I have 50 queues, 1 for each state, and a pile of worker threads that looks for states that have queues of work to do, and intermittently fires off work for each queue
oneawayman has quit [Quit: Leaving]
etcetera has joined #ruby
<jblack>
e.g. instead of doing 50 requests for texas at the same time, I throttle them down to 1 request every 3 seconds. otherwise, they tend to firewall my ass for being a bad neighbor. =)
swex has joined #ruby
<devyn>
alright, seems… okay
<devyn>
have fun then
<devyn>
:p
<jblack>
oh, gawd, I hate it
<jblack>
75% of the crap out there is old asp.net
<jblack>
remember that incomptent jackass you worked with 6 years ago, that wrote ugly redundant code that worked a good 35% of the time?
krz has joined #ruby
bradhe has joined #ruby
<devyn>
haha
<jblack>
the sort that had 26 if/then/elses instead of a swithc statement?
<devyn>
I know
<jblack>
Well, he has a job for idaho... or oregon
<devyn>
oh boy
<devyn>
yeah government websites of any kind tend to be pretty bad
daniel_- has quit [Ping timeout: 252 seconds]
<jblack>
yeah. Deleware's website has BUSINESS HOURS.
<jblack>
they literally shut down at like midnight, and wake up again at 8am or somesuch
nari has joined #ruby
Tony2323 has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<jblack>
their search results page doesn't reference ids... you actually have to do a frigging form post submit on a _relative_location_named_button_ in order to get any particular entity
<devyn>
holy shit
<devyn>
this looks like it was written by some convoluted template framework
bradhe has quit [Ping timeout: 252 seconds]
<jblack>
Yeah, that's asp.net
<devyn>
yeah, I fortunately never had to do asp.net
<jblack>
most of it's not -that- bad... but then someone gets "smart", and ...
rickmasta has joined #ruby
<rickmasta>
Hi
<jblack>
like... entities might be behind a form get, which is nice, cause you toss that in the url....
<devyn>
I'm willing to bet it's at least partially because they wanted it to be a button
<jblack>
but then they require 2 hour session ids.
<jblack>
Right. But they could hvae done that with an HREF! =)
<devyn>
of course but they're dumb
<dmonjo>
how can i check all the &:<Symbol> method classes eg: :&upcase
newUser1234 has quit [Ping timeout: 245 seconds]
<jblack>
They could have at least added a <span> with the entity id, or a comment, or SOME SORT OF TAG that references the entity ID.. but no.
AntiTyping has quit [Quit: AntiTyping]
<devyn>
dmonjo: huh? you can use any method that object supports
<jblack>
you can't get the entity id for that state until you get to the entity page.
blueOxigen has quit [Ping timeout: 264 seconds]
<devyn>
rickmasta: hello
zzing has quit [Quit: Computer has gone to sleep.]
<rickmasta>
Anyone here familiar with Mechanize?
<jblack>
rickmasta: I am veyr familiar with it. =)
krz has quit [Quit: krz]
<jblack>
I was just talking about it. =)
<rickmasta>
I've just began using it, but I'm not entirely sure what's going wrong.
<devyn>
=) =) =)
krz has joined #ruby
<jblack>
Ok, well, I can try to help.
<jblack>
what's wrong?
<rickmasta>
Nothing I'm doing is working, I've even copied code samples directly from the website and it hasn't worked.
<jblack>
Ok, let's try to get a little more specific than "it doesn't work"
<jblack>
do you know how to use irb?
<rickmasta>
Sure
<jblack>
ok, run that, and start off with 'require mechanize'
havenwood has joined #ruby
<jblack>
pardon, require 'mechanize'
<jblack>
did you get a true?
<rickmasta>
Yup, I get the page loaded, even get all of the links listed.
<devyn>
or you can irb -rmechanize when you start it
<havenwood>
jblack: Lots of nice stuff. Just made sure to not break with 1.9 like 1.9 did with 1.8.
hbpoison has joined #ruby
<Paradox>
i still think 1.9 should have been 2.0
<Paradox>
and 2.0 should be 2.1
<Paradox>
semver!
<pmros>
I'm agree
<jblack>
it's already such a nice language. =)
<pmros>
but aniversaries
<pmros>
do you remember linux 3.0?
<Paradox>
basically, if i'm reading this right, for most day-to-day tasks of enumeration, lazy wont be useful
<Paradox>
but for things that read billions of enumerations
<havenwood>
And lots of nice stuff in 2.0, stable unlike 1.9.0.
<Paradox>
ie file readers and writers and whatever
<Paradox>
lazy will be useful
<jblack>
"We have also made documentation improvements which many rubyists have requested. We have added a huge amount of rdoc for modules and methods. 2.0.0 will be around 75% documented while 1.9.3 was about 60%. Also, we have added a description of Ruby's syntax. You can see:"
<jblack>
sweet
<Paradox>
ruby already has the best documentation i've ever seen
<jblack>
is there a command line doc tool out there?
<rickmasta>
I'm trying to scrape this webpage http://d.pr/i/pDPu ( Source: http://pastie.org/6326746 ) every day to get any updates to my schedule. The thing is, the schedule is updated every thursday and a second row is added for my next weeks' schedule, until sunday comes when the first week ends and is gone, and the second row moves to the first row. Then a second row is added next thursday and so on.
<pmros>
precompiled code!!!
<devyn>
Paradox: I prefer Haskell's, honestly
<Paradox>
i dont
<rickmasta>
You guys can see my crappy work schedule. haha
<devyn>
but Ruby's is up there
dmiller has joined #ruby
<Paradox>
i find haskells to focus way too much on the math, just like the language itself
<jblack>
rickmasta: You're not really going to bring your whole project here, step by step, are you? :P
<Paradox>
but no worries if you like it :)
d3vic3 has quit [Quit: leaving]
<pmros>
keywords was a must
<rickmasta>
Ohh no no, I'm not.
<devyn>
sometimes you don't need that much of an explanation when the types suffice :)
<jblack>
so what's your question, rick?
Jeaye has quit [Quit: zzzZZZzzz]
<jblack>
soemtimes there are 2 rows, and sometimes 3?
<rickmasta>
Not trying to atleast, just don't know how I can tackle this page.
<jblack>
btw, firebug with the xpath addon is great for this
<jblack>
well, first things first...
<jblack>
that's a gif
<rickmasta>
Never three, only one, sometimes two.
<Paradox>
or just use chrome
<Paradox>
which can copy xpath natively ;)
jhgaylor has joined #ruby
ebobby has quit [Ping timeout: 252 seconds]
arturaz has joined #ruby
<jblack>
his xpath is "//img[@src]....
<jblack>
thats not a table. thats a gif of a table.
<rickmasta>
What's xpath?
<jblack>
xpath is going to become your very best friend some day, when you have a html document that's made out of html instead of pixels. =)
<rickmasta>
Well I took a screenshot of the page, and also provided the source of the actual page. lol
<jblack>
oh, I missed that.
<Paradox>
jblack, try parsing patents
<Paradox>
shudder
<Paradox>
worst shit ever
<Paradox>
i have a regex longer than the constitution
<devyn>
that's not parsing; that's guessing
<jblack>
xpath lets you do things like....
dmiller has quit [Ping timeout: 260 seconds]
<Paradox>
devyn, essentially
<Paradox>
patent office
<Paradox>
y u no json
<jblack>
paradox: I parse business registry data from the great 50 states' SoS websites. =)
<Paradox>
thats almost as bad
<Paradox>
lol
<jblack>
retarded from the start, with 50 different fucked up individually retarted derivations. =)
subbyyy has quit [Ping timeout: 246 seconds]
<jblack>
so, rikmasta...
pakchoi2 has quit [Quit: 离开]
<jhgaylor>
i'm working through a ruby tutorial and I ran into a line that read `"str".includes?`. What does the ? on the method do? Does someone have a bot that they can make link me to the best place to read about it?
<jblack>
you want to learn about a gem called nokogiri
<jblack>
rows = page.xpath(//tr).each { |a_row| (you now have a row) }
<jblack>
I just happened to find mechanize first. it does everything I need. =)
mengu__ has joined #ruby
mengu_ has quit [Ping timeout: 260 seconds]
<jblack>
mechanize has lot of flexibility in it. I think it can do anytihng to a page but javascript, and it might have that too
<TomJ>
Hey all. I have a decorator function that formats datetimes for UI output. I need to check that the input time is not nil, otherwise the strftime fails. I have the code working fine, just wondering if this is the "idiomatic" way to do it? def format_time(time) ; time.blank? ? nil : time.strftime("%e %b %Y %H:%M:%S") ; end
<ryanf>
TomJ: you can just use "time ?" instead of "time.blank? ?"
<ryanf>
the only reason to use blank? is if you think it might be an empty string or something
<ryanf>
so then it'd be "time ? time.strftime" etc
<ryanf>
or you could do "time && time.strftime"
<ryanf>
or you could do time.try(:strftime, "%e %b %Y etc")
<ryanf>
or time.strftime(...) if time
<jblack>
Paradox: that looks pretty useful for anything restful
<TomJ>
oh nice, thanks ryan. silly, of course I could just do 'time'. but I didnt even think of time && - I think I like that best actually, no reason to explicitly return 'nil' in a ternary
mengu has joined #ruby
<ryanf>
yeah I think I'd probably go with time && since it's nice and compact in this case
justme1 has quit [Quit: Leaving.]
<TomJ>
yeah exactly. thanks a lot ryanf!
<ryanf>
I'd be tempted to do "if time" at the end too
<ryanf>
np
mengu__ has quit [Ping timeout: 260 seconds]
<rickmasta>
I mean, as long as I have the times paired with the date, it doesn't matter where they're located, really.
emergion has quit [Quit: Computer has gone to sleep.]
sandGorgon has quit [Ping timeout: 260 seconds]
Hanmac1 is now known as Hanmac
<TomJ>
actually rather than && I think like best: time and time.strftime(..) # I checked the bbatsov ruby style guide and it seems to agree, use and/or for "control of flow" and &&/|| for multiple conditions
<rickmasta>
so with the code you provided me.
zzing has joined #ruby
pmros has quit [Quit: Konversation terminated!]
<rickmasta>
After I've done page = login(siteInfo) then I should be able to do page = page.link_with(:text => 'Schedule').click to move onto the next page, right?
testingb0t has joined #ruby
<dmonjo>
big difference between ruby 1.0 and .9 ?
<dmonjo>
2.0 and 1.9*
emergion has joined #ruby
lxsameer has joined #ruby
<Hanmac>
dmonjo 2.0 has a list of interesting new features
<lxsameer>
does ruby 2.0 support named argument for methods ?
bradhe has joined #ruby
<TomJ>
lxsameer: yes
<apeiros_>
Hanmac: didn't you have a page with the changes?
emergion has quit [Client Quit]
<dmonjo>
Hanmac: i am in the provess of learning 1.9 i hope no big difference between the 2
<lxsameer>
TomJ, nice, does ruby 2.0 have any backward incompatibility ?
<TomJ>
lxsameer: I don't believe so, no - but you should google for the ruby 2.0 change list
<Animawish>
'bears'.something #=> %w[b e a r s] what is something?
<Hanmac>
dmonjo 1.9 code works with 2.0 too
<lxsameer>
TomJ, i already seen the change list, thanks man
<Hanmac>
Animawish .each_char.to_a
<apeiros_>
Animawish: split or chars
* apeiros_
still thinks it's bad that chars == each_char, instead of returning an array directly… :-/
<TomJ>
2.0 has a few nice things. Doesn't feel all that 'big' to me though. They're releasing it to coincide with the 20th anniversary of ruby's release - hence 2.0 - so I guess they had an artificial deadline and couldn't make it as big an upgrade as it might otherwise have been. Biggest disappointment for me is that I see nothing at all relating to performance improvements. correct me if I'm wrong, but I think 1.8 -> 1.9 was a bigger upgrade than 1.9 -> 2.0
<Hanmac>
but ... chars does not return an array directly
banister`tyrion has quit [Remote host closed the connection]
<Paradox>
TomJ, yeah, i still think 1.9 should have been 2 and this should have been 2.1
<TomJ>
yeah
dhruvasagar has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
zzing has quit [Ping timeout: 256 seconds]
emergion has joined #ruby
kevinfagan has joined #ruby
dallasm_ has quit [Remote host closed the connection]
<jblack>
It's hard to improve too much on near perfection. =)
<Hanmac>
the interesting point is : ruby2 have a build flag --enable-multiarch ... that allows to install the ruby into an subdir lib ... like /usr/lib/x86_64-linux-gnu ;P ...this is interesting for the package maintrainers :P :D
<havenwood>
TomJ: There are some nice performance increases in 2.0.0. Good talk on 2.0.0 internals changes at RubyConf. The new copy-on-write friendly GC is awesome too.
havenwood has quit [Remote host closed the connection]
mneorr has joined #ruby
ikst has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 260 seconds]
<TomJ>
oh that's great re perf, I'll go check that talk
<TomJ>
Hanmac: that's true, yeah that will be handy
anderse has joined #ruby
<TomJ>
jblack: I agree - the language is near perfect, so I wouldn't spend much time on that. the performance.. there's room for improvement I think :) they did do great things in 1.9, I hope it continues
<TomJ>
although to be fair 99% of my ruby experience is via rails, and I think a lot of the bad perf I personally see is more rails than ruby itself
<Hanmac>
haven has talked about the something that does not want to be named ... thats why the host closes the connection :P
<jblack>
Yeah, true. and better integration with host operating systems. I know more than one sysadmin that dislikes ruby due to gem management
spider-mario has joined #ruby
timonv has joined #ruby
halfdan- has joined #ruby
<halfdan->
Hi guys
<halfdan->
How to you generate a random time that is normally distributed across a 24h period?
<jblack>
oh, that's easy.
<Hanmac>
the intigration is not 100% perfect. .. i mean you could install the lib and the other so files into different dirs and install them simultany ... but you could still only install one "ruby" bin .. (and gem still list only 2 archs, not more)
<dmonjo>
lambda vs proc?
<jblack>
generate a random number between 0 and 86400. then add that to whatever time you want to start from.
mneorr has quit [Ping timeout: 252 seconds]
<halfdan->
jblack: damn, that's really easy
<TomJ>
Most of my Ruby experience (until this month anyway) was in sysadminning it - rails apps. I found the best way was to set a GEM_HOME for every app. e.g. Capistrano deploy app1 to /opt/mycompany/apps/app1/, with GEM_HOME set to /opt/mycompany/gems/app1 . You use more disk space installing gems multiple times, but it's much cleaner - no interference, I can clear out all gems and start again with one rm , etc. bundler does a good job on its own but I like to
<TomJ>
them separate as well. With that setup, I've never really had any gem problems at all. And it's easy to package, too - just package apps/app1 && gems/app1 (usually in separate packages)
<halfdan->
thanks!
krz has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<jblack>
halfdan-: Time.now() + rand(86400)
<devyn>
TomJ: bundle install --deployment is what I usually do…
dhruvasagar has quit [Ping timeout: 255 seconds]
<halfdan->
jblack: "normal distribution" != rand(), but that's ok
echosystm has joined #ruby
monkegjinni has joined #ruby
<echosystm>
does anyone know of a library that makes multiprocessing easy in ruby?
Ethan is now known as undersc0re97
<jblack>
I can barely tell the difference betwene the mean and the mode. what's a normal distribution?
<halfdan->
I'll use a box muller tranform for the normal distribution
<halfdan->
jblack: a gaussian distribution
Elhu has joined #ruby
<jblack>
pretend I can count to ten, but not to twenty. what is a normal distribution?
<jblack>
is it like a bell curve?
<halfdan->
yes
<jblack>
Ok. so, make me a function that does a normal distribution from 0 to 86400, and I'll add that to Time.now() for you. =)
<halfdan->
as I said, I'm already using the box-muller transform for generating random samplings
emergion has quit [Quit: Computer has gone to sleep.]
znode_ has quit [Remote host closed the connection]
<halfdan->
just didn't think of the easy way to map it to times
<jblack>
ok.. you might want to let muller out of his box before he suffocates
instinkt has joined #ruby
<jblack>
=)
znode has joined #ruby
takeru has quit [Remote host closed the connection]
<jblack>
btw, did you want to start that as a normal distribution from Now, or a normal distribution from midnight?
<jblack>
and if midnight, the one we had, or the one we shall?
browndawg has joined #ruby
* jblack
goes to bed
<halfdan->
jblack: need it to be around 2/3pm
<halfdan->
already working
<halfdan->
thanks again
* jblack
shuts up
ddv has left #ruby [#ruby]
znode has quit [Read error: Connection reset by peer]
instinkt has quit [Quit: Lost terminal]
monkegjinni has quit [Remote host closed the connection]
banister_ has joined #ruby
znode has joined #ruby
akashj87 has joined #ruby
werdnativ has quit [Quit: werdnativ]
anderse has quit [Quit: anderse]
burgestrand has joined #ruby
<banister_>
TomJ: startup time in 2.0 has been dramatically reduced
<banister_>
TomJ: and there's other patches in the works (say for 2.1) that give rails a speed boost of up to 15-20%
vabenjamin has left #ruby [#ruby]
<TomJ>
banister_: oh that's awesome news, thank you
cs02rm0 has quit [Ping timeout: 264 seconds]
<apeiros_>
do we have a good list of changes of 1.9->2.0 somewhere?
srikanthkurni has joined #ruby
<apeiros_>
I thought somebody had pasted a link in here a few times for the rc's
tealmage has joined #ruby
yshh_ has quit [Remote host closed the connection]
colonolGron has joined #ruby
<dmonjo>
what is usually better to use labda or proc? what is less complex
srikanthkurni has quit [Remote host closed the connection]
akashj87 has quit [Ping timeout: 244 seconds]
<burgestrand>
dmonjo: lambdas enforce their arguments, so they are more similar to a regular method than a proc (which is much more accepting when it comes to missing arguments) in that regard
<dmonjo>
so better use blocks and lambdas
<dmonjo>
returning from procs is tricky
icole has joined #ruby
undersc0re97 has quit [Remote host closed the connection]
tealmage has quit [Ping timeout: 252 seconds]
srikanthkurni has joined #ruby
srikanthkurni has left #ruby [#ruby]
HecAtic has quit [Quit: Àá¼ö]
dhruvasagar has joined #ruby
icole has quit [Remote host closed the connection]
icole has joined #ruby
znode has quit [Remote host closed the connection]
<shevy>
Xeago dunno, I noticed that it often depends whether you were calm that day or not, and whether you were very tired or not before going to sleep
<apeiros_>
Xeago: if you breathed heavily, check your nose. or breathing in general.
<shevy>
I am more anxious when I go to sleep when I am overworked or barely had enough sleep
<apeiros_>
if you don't get enough air in the night, your body reacts with fears of death when detecting the falling oxygen levels
<Xeago>
I went to the gym earlier that day, second time in life/2weeks going to gym
krz has quit [Quit: krz]
pyrac has quit [Quit: pyrac]
<Xeago>
I don't remember having quick breathing because of lack of oxygen
<Xeago>
more heavily controlled breathing in anxiety
<Xeago>
I imagined a scythe/reaper/crescent when I 'woke up' and looked at my door
mneorr has quit [Ping timeout: 244 seconds]
<Xeago>
I got my depth all wrong and I would have sworn there was a scythe right in front of my face
vlad_starkov has joined #ruby
<Xeago>
that was around 1:30
pskosinski has joined #ruby
<Xeago>
(got on irc about 20minutes later)
<shevy>
Xeago if it is just cardio + breathing, that is easier
<Xeago>
shevy: I don't understand
dmiller has quit [Ping timeout: 256 seconds]
<shevy>
Xeago if you lack air, you can train that
<Xeago>
I don't have a record of having a lack of oxygen, am quite a good breather (big lung capacity, play[ed] breathing instruments)
<shevy>
I go running up on stairs in public places (like one to a public library, it has like 50 steps, you do that 10 times a day for a week or two, then you won't have much breathing or cardio problems)
vlad_starkov has quit [Remote host closed the connection]
<Xeago>
I can do spinning at the gym for 40minutes straight without losing my breath?
thinkclay has quit [Quit: Leaving.]
<Xeago>
and thats about 15-20 km, depending on the setting (hills/flat/etc)
<shevy>
dunno, depends on the cardio and your max peak... I always go to 80 to 90 percent max, so I will end up sweating a lot. when I dont sweat, it's barely worth the time and effort
vlad_starkov has joined #ruby
<shevy>
Hanmac I did not read that yet
ferdev|away is now known as ferdev
eka has joined #ruby
<Xeago>
I am soaked wgenb I do that :P, but don't loose my breath
<fir_ed>
shevy, okay. Make installed.
<fir_ed>
nowwut, great ruby master
ninjers has joined #ruby
<Hanmac>
shevy you may like: "The UTF-8 default encoding, which make many magic comments omissible"
<shevy>
Xeago hmm, perhaps try a training routine where you really overwork your body a bit
<Xeago>
as to 'loose my breath'
<shevy>
that too
<Xeago>
am 21 now, till I was 18 I biked to school for 60-90 minutes
<Xeago>
then I jogged with the dog till I was 20
<shevy>
I can assure you it won't get better the older you get ;)
<dmonjo>
can anyone tell me whats wrong iwth my code?
<dmonjo>
test4.rb:11:in `[]=': wrong number of arguments (1 for 2) (ArgumentError)
<Xeago>
went to sweden, didn't do anything there
<shevy>
I think I had my physical peak around 24
<Xeago>
besides 1 hour of jogging every week
<Xeago>
and now starting gym
dhruvasagar has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
<shevy>
dmonjo what is that:
<shevy>
myarray[]=[1,2,3]
<Xeago>
shevy, apeiros_: thanks for the tips, I'll keep them in mind
<dmonjo>
doesnt array provide []= method?
* Xeago
is off to food, lovely home made soup!
<shevy>
Xeago jogging is very good, we used to do that every weekend next to normal work out
<Xeago>
my dog passed away, than I stopped :'(
<shevy>
dmonjo the method is not special, you can define that method on any class
<shevy>
class Test; def []=(input);end;end
<Xeago>
not fun jogging alone :'(
* Xeago
off!
<Hanmac>
dmonjo ... "myarray[]=[1,2,3]" is totaly php style ...
<shevy>
Xeago we were a small team of 5 or 6 people training together
<dmonjo>
Hanmac: what would be the way to do it in ruby
Retistic has joined #ruby
<shevy>
when one wasn't very motivated, others kicked in and brought that guy in line again, that helped a lot
ninjers has quit [Client Quit]
dross has quit [Ping timeout: 252 seconds]
<Hanmac>
dmonjo: array.push [1,2,3]
<shevy>
dmonjo you remember how you use [] in normal arrays?
ninjers has joined #ruby
nachtwandler has quit [Ping timeout: 244 seconds]
dross has joined #ruby
<Hanmac>
or: array.push 1,2,3
<shevy>
array = [0,2,3] # => [0, 2, 3]
<shevy>
array[0] = 1
<shevy>
array # => [1, 2, 3]
<shevy>
dmonjo notice the argument to [] is 0 in this example
<shevy>
dmonjo in your example you do not provide any argument to []
<dmonjo>
i am dealing with PatAraay which is a subclass of Array so i need to push to PatArray.new.push[1,2,3] ?
lkba has joined #ruby
<shevy>
Hey Hanmac how does this work? "Keyword arguments, which give flexibility to API design"
nachtwandler has joined #ruby
keller-ship has joined #ruby
<shevy>
dmonjo, you should first fix this error: myarray[]=[1,2,3]
<keller-ship>
How can I upgrade to 2.0.0-p0 from 1.9.3-194 using rvm? I tried rvm upgrade 2.0.0 1.9.3-p194 but it then asks me whether I want to upgrade from 1.9.3 to 1.9.3.
<apeiros_>
Xeago: d'oh! I have to download the patch first
<Xeago>
why wait for timemachine to finish?
<apeiros_>
because it kills performance
<Xeago>
I never seen tm as a heavy load on my machine or network
hbpoison has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 252 seconds]
<Xeago>
flash or skype kill my machine more..
<banister_>
Xeago: when to use 'deze' vs 'dit' in dutch
<Xeago>
also, I'm home >:)
tealmage has joined #ruby
<Xeago>
banister_: deze: all english words
<Xeago>
erhm, what else
<apeiros_>
TM tends to spike here
<apeiros_>
normally it's low on resource hogging, but occasionally it spikes to 100%
zzing has quit [Ping timeout: 260 seconds]
catphish has joined #ruby
<Xeago>
banister_: deze for basically everything, except smallified words
<Xeago>
like meisje (little girl)
fjfish has quit [Read error: Connection reset by peer]
<Xeago>
for non-nouns
<Xeago>
(dit for non-nouns)
yshh has quit [Remote host closed the connection]
francisfish has joined #ruby
<Xeago>
banister_: why?
<tommylommykins>
dutch has diminuitive particles? o_o
dmonjo has quit [Quit: Leaving]
<Xeago>
tommylommykins: I have never heard that term before
<tommylommykins>
I think I meant article, not particle :s
<Xeago>
I meant the diminuitive part; p
<tommylommykins>
diminuitive == makes in sound cuter
<apeiros_>
he's insulting your penis size
<Xeago>
yea totally
<tommylommykins>
D:
robustus has quit [Ping timeout: 248 seconds]
* apeiros_
wonders what "Landjäger" means in english
highbeats has joined #ruby
* Xeago
slaps banister_ with a fishbat!
m3pow has joined #ruby
<apeiros_>
95%
<Xeago>
:O
<banister_>
Xeago: cos i couldn't make sense of it
<Xeago>
you realized!
<apeiros_>
I what?
<banister_>
Xeago: i still cant, even after your epxlanation :P
<Xeago>
apeiros_: my ctcp ping
robustus has joined #ruby
* apeiros_
confused
<Xeago>
apeiros_: I ctcp ping'd and then you announced 95%
Retistic has quit [Quit: Retistic]
<apeiros_>
lol?
<Xeago>
banister_: deze jongen => cutified => dit jongetje
postmodern has quit [Quit: Leaving]
<apeiros_>
nice coincidence then
<Xeago>
banister_: do you understand de/het?
<apeiros_>
ctcp queries are shown in a separate log in limechat. I normally don't see them
<banister_>
Xeago: wait so 'deze' is just used when u want to sound cute?
<apeiros_>
TM is done too
<Xeago>
other way around
<Xeago>
dit is used when not-female-wprd
<Xeago>
de=>deze, het=>dit
<apeiros_>
~80s remaining
<apeiros_>
I have to upgrade my 25Mb/s to 75Mb/s
<Xeago>
(t)je is used to cutify
<apeiros_>
it's like 15 bucks per month
<apeiros_>
(increase, not total)
<Xeago>
how much does your up increase for that?
Elhu has quit [Quit: Computer has gone to sleep.]
<apeiros_>
3x too I think
<apeiros_>
2.5 -> 7.5
<Xeago>
definitely do :P
<Xeago>
I can't live with anyting below 10
<apeiros_>
eeep? sc2 just crashed?
Stuif has joined #ruby
<Xeago>
you show as obnline
Stuif has quit [Quit: WeeChat 0.4.0]
<Xeago>
ready?
<Xeago>
arf
macq has quit [Ping timeout: 260 seconds]
ferdev|away is now known as ferdev
macq has joined #ruby
horofox has quit [Quit: horofox]
maxmanders has quit [Quit: Computer has gone to sleep.]
<banister_>
Xeago: why do the dutch like to cutify things so much
<banister_>
Xeago: i expect cutification from small people like japanese, but 8 foot tall blonde beasts from holland, it's weird to hear them cutify things
velCzupa has quit [Read error: Connection reset by peer]
ozgura has quit [Remote host closed the connection]
MartinCleaver has quit [Quit: MartinCleaver]
neurotech has quit [Ping timeout: 260 seconds]
Qwak has quit [Ping timeout: 256 seconds]
dmiller has quit [Ping timeout: 252 seconds]
chrisramon has quit [Quit: chrisramon]
arya has quit [Ping timeout: 248 seconds]
twshelton has joined #ruby
<shevy>
hiall yes
<shevy>
it is even considered "stable"
workmad3 has joined #ruby
newUser1234 has joined #ruby
pyrac has joined #ruby
arya has joined #ruby
newUser1234 has quit [Remote host closed the connection]
monkegjinni has joined #ruby
Elhu has joined #ruby
davetherat has joined #ruby
senayar has quit [Quit: Quitte]
neurotec_ has quit [Remote host closed the connection]
bradhe has joined #ruby
arya has quit [Ping timeout: 248 seconds]
dorei has joined #ruby
newUser1234 has joined #ruby
thone has joined #ruby
<dorei>
hello
Wildhoney has quit [Ping timeout: 255 seconds]
<dorei>
could someone explain me the difference between .rdoc and .ri ?
<dorei>
and do i need both of them?
trevortwining has joined #ruby
<otters>
when will rbenv get updated
rekado has joined #ruby
arya has joined #ruby
pakchoi2 has quit [Read error: Connection reset by peer]
<burgestrand>
rbenv is updated
<burgestrand>
no, sorry, wrong
<burgestrand>
^^
<burgestrand>
rvm is updated
<burgestrand>
\o/
bradhe has quit [Ping timeout: 276 seconds]
baroquebobcat has joined #ruby
<otters>
rats
<hiall>
thanks shevy
ethicalhack3r has quit [Quit: ethicalhack3r]
<rekado>
I've got a library method that expects a block that is to be run in a callback. I've got an implementation of the callback as a method.
<rekado>
I want to feed the method into the library method without wrapping it in a block.
<rekado>
Can this be done without the ugly plumbing?
<rekado>
this works, but is ugly:
<burgestrand>
rekado: method(methodname) will give you a method instance, that responds to to_proc
<burgestrand>
rekado: so, for example, some_method(&object.method(:methodname))
<burgestrand>
rekado: object is the object that has the method you want to pass as a proc, some_method is the one accepting the callback, and :methodname is the name of your method on object that you want to pass as a proc
<rekado>
burgestrand: hmm, I've tried that but failed.
<rekado>
burgestrand: I'm going to check again.
<burgestrand>
rekado: :)
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<rekado>
burgestrand: oh yes, I was missing the ampersand. Thanks!
sepp2k has joined #ruby
pakchoi2 has joined #ruby
<Xeago>
fffs
ethicalhack3r has joined #ruby
pac1 has joined #ruby
<Xeago>
stupid safari forgot all my tabs and windows
Elhu has quit [Quit: Computer has gone to sleep.]
codespectator has joined #ruby
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<maetthew>
Anyone know why I can't require localfiles like this "require 'lib/test"? I have to require by doing "require File.join(File.dirname(__FILE__), '/lib'/, 'test.rb')"
<maetthew>
(i'm ruby noob)
<Morrolan>
Tried a 'require_relative' yet? :)
takeru has joined #ruby
pakchoi2 has joined #ruby
<Morrolan>
(That is, if you're on a version which supports it, 1.9.something, I believe)
<canton7>
maetthew, 'require' looks for the file in your $LOAD_PATH (print it out if you're curious)
<maetthew>
Morrolan: same Morrolan as #lethalzone on QuakeNet? :P
<Morrolan>
Yep.
<maetthew>
haha cool
<maetthew>
<- booyakah :p
<Morrolan>
Oh, heh. :)
<canton7>
iirc you can rewuire './lib/test', or modify your LOAD_PATH, or as Morrolan said use require_relative
newUser1234 has quit [Ping timeout: 252 seconds]
<canton7>
s/rewuire/require
<Xeago>
apeiros_: frustrated why?
takeru has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
horofox has quit [Quit: horofox]
angusiguess has joined #ruby
himsin has quit [Ping timeout: 260 seconds]
<apeiros_>
because I still have no recipe against tossball
<apeiros_>
OF DEATH
<apeiros_>
got to pay attention in the next pro pvz I watch
<apeiros_>
maetthew: booyakah? you watch too much tv :-p
zzing has joined #ruby
<maetthew>
apeiros_: what? :P
<apeiros_>
I've only ever heard that word in one tv show ;-)
banister_ has quit [Ping timeout: 276 seconds]
<maetthew>
apeiros_: haha what? Ali G?
<apeiros_>
ok, 2 shows
<maetthew>
:D
busybox42 has quit [Ping timeout: 245 seconds]
newUser1234 has joined #ruby
cantonic_ has joined #ruby
girija has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
zzing has quit [Ping timeout: 264 seconds]
horofox_ has joined #ruby
kevinfagan has quit [Quit: Leaving...]
nari has quit [Ping timeout: 246 seconds]
predator117 has quit [Ping timeout: 252 seconds]
pakchoi2 has quit [Ping timeout: 252 seconds]
predator117 has joined #ruby
fabionl has joined #ruby
pakchoi2 has joined #ruby
pakchoi2 has quit [Max SendQ exceeded]
skattyadz has joined #ruby
schaerli has joined #ruby
pakchoi2 has joined #ruby
backjlack_ has joined #ruby
pakchoi2 has quit [Max SendQ exceeded]
pakchoi2 has joined #ruby
busybox42 has joined #ruby
thams has joined #ruby
trevortwining has quit [Quit: trevortwining]
kaen has quit [Quit: Leaving]
meoblast001 has joined #ruby
backjlack has quit [Ping timeout: 255 seconds]
schaerli has quit [Ping timeout: 276 seconds]
banister`tyrion has joined #ruby
pakchoi2 has quit [Read error: Connection reset by peer]
<kushkella>
Ok I get it. The service would be a PDF form filler I think. Can you please take a look at LiveDocx and Docmosis and let me know what do you think of it as a developer?
<kushkella>
Xeago: I know that. What about livedocx then?
<Xeago>
Docmosis completely amazon based, probably not PCI compliant (e.g. can't send invoices that specify cc numbers)
girija has quit [Ping timeout: 264 seconds]
pettsson has joined #ruby
<Xeago>
I consider mso a pain the ass, livedocx therefore drops for me
pyrac has quit [Quit: pyrac]
<kushkella>
MSO=Microsoft right?
<Xeago>
microsoft office, their office suite
<Xeago>
when I make invoices, I make them in latex or html
<Xeago>
tho most say livedocx looks more appealing than docmosis
newUser1234 has quit [Remote host closed the connection]
<Xeago>
as a developer
<Xeago>
tho livedocx sends password over http
walbert has joined #ruby
hogeo has quit [Remote host closed the connection]
<Xeago>
their setfieldvalue api is fooked tho
<Xeago>
adn their whole retrieve api lol
<kushkella>
Actually I was working for a startup that wants to make something like this. But I was unsure whether developers want a service like livedocx with a visual designer probably, where you could design a PDF in browser and then call an API to generate the PDF with some data.
<Xeago>
kushkella: make the designer aspect optional imo
<kushkella>
xeago: What do you think of this?
<Xeago>
the services I currently know of, have crappy api's
<Xeago>
bad security practices
<Xeago>
and don't export as a trillion of formats
<Xeago>
do pdf right
<kushkella>
So what other options do you think are good to design the template?
<kushkella>
Got it.
<Xeago>
I used latex, and seperately also used html
Beoran__ has joined #ruby
bradhe has joined #ruby
browndawg has joined #ruby
<Xeago>
the html was a reseller product, for people that wanted to style it their way
<Xeago>
they could insert their css
matchaw_ has joined #ruby
<Xeago>
(we had a test screen with a syntax highlighted css, and auto updating preview)
<Xeago>
the latex template is for my own game server hosting
coolj1 has joined #ruby
<Xeago>
which sadly enough runs under my bed
matchaw has quit [Ping timeout: 248 seconds]
<Xeago>
:<
Beoran_ has quit [Read error: Operation timed out]
<kushkella>
Yeah I think HTML will be a good option to go.
<Xeago>
seperating the document template creation and the api, is actually a good thing tbh
<Xeago>
as long as you keep stuff nicely versioned, and don't throw errors when a field gets removed by some weird c-level dude
guns has joined #ruby
<Xeago>
(and some nice extras, as give me a pdf of the last request using this, that, and those tempaltes)
<kushkella>
Xeago can I please have some sort of your contact id. I will be very grateful.
<Xeago>
blog.xeago.nl
<kushkella>
Thanks!
<Xeago>
I'm on irc almost daily, if not daily
justme1 has quit [Quit: Leaving.]
bradhe has quit [Ping timeout: 252 seconds]
<kushkella>
That is good because I may need some one like you to give feedback.
coolj1 has quit [Client Quit]
takeru has joined #ruby
<jaywastaken>
can anyone explain to me why it's not a bad idea to pass along a client private key when using Net::HTTP? (e.g. http.key = OpenSSL::PKey::RSA.new('...'))
subbyyy has quit [Quit: none 0.3.9.2]
d3vic3 has quit [Ping timeout: 260 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
<jaywastaken>
or i guess you just always pass a public key
Virunga has joined #ruby
johnnyg1 has joined #ruby
dmiller has joined #ruby
takeru has quit [Remote host closed the connection]
takeru has joined #ruby
<catphish>
jaywastaken: do you know what that key is used for?
gyre007 has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
sonda has joined #ruby
<catphish>
my guess is that it's designed to take a client private ey
<catphish>
*key
Xeago has quit [Ping timeout: 260 seconds]
<jaywastaken>
catphish: I am actually trying to secure my own internal api using ssl certs
<catphish>
sure
<fwaokda>
I'm trying to get a value from an html file... there is this element "<form method="post" action="8387" id="ct">" I want the value in "action" how can i do this with nokigiri? I know how to select information based off a class but not how to do this... ;/
<catphish>
well that attribute takes a client private key
maucat has quit [Read error: Connection reset by peer]
<catphish>
there's no reason it should be a bad idea
takeru has quit [Ping timeout: 256 seconds]
<jaywastaken>
i guess i can safely assume that the connection does not actually send the private key
<catphish>
you can assume that, doing so would make no sense
<catphish>
but there's no way it could verify unless you gave it the key
<kushkella>
fwaokda: you can do it with xpath selectors
gyre007 has quit [Ping timeout: 256 seconds]
<catphish>
jaywastaken: you will also need to pass the client cert
<fwaokda>
kushkella, ok thanks i'll read up on that
<fwaokda>
perfect thanks ;D
joofsh has quit [Remote host closed the connection]
<jaywastaken>
catphish: thanks. for some reason i just found it strange to actually use the private key
<jaywastaken>
or even passing a private key to curl
<catphish>
there'd be no point having a private key if you couldn't use it :)
nitro_ has joined #ruby
<catphish>
one end always needs to use the private key
<catphish>
the cert *will* get send with the request of course
<catphish>
but the private key is just used locally
Elhu has joined #ruby
mlr has joined #ruby
jfontan has joined #ruby
<jaywastaken>
still trying to wrap my head around the whole business of certificates, signing, etc.
justme1 has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 252 seconds]
<jaywastaken>
i.e. generate server key and cert, generate client key and CSR, sign client CSR with server cert. server verifies clients with its own certificate. client includes its own cert and key when making a request to server
<jaywastaken>
i think i'm confused as to why the client needs to send a key along with its cert when the server cert did the signing
colonolGron has joined #ruby
arthurstomp has joined #ruby
<kushkella>
captish: Sorry for missing on the conversation, as I mentioned that I was working for a startup that wants to develop service for developers to design PDF templates within browser and generate PDFs through API. Do you think developers will use such service probably with a WYSIWYG designer for designing templates?
<catphish>
jaywastaken: any host that wants to identify itself needs to use a private key
BizarreCake has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
<catphish>
kushkella: i think some people would use it
nitro_ has quit [Ping timeout: 256 seconds]
awarner has joined #ruby
radic has quit [Disconnected by services]
skattyadz has quit [Quit: skattyadz]
radic_ has joined #ruby
<catphish>
jaywastaken: the process is in 4 parts 1) you have a private key 2) you use that to generate a public certificate 3) somebody else signs that public certificate to say you're trusted 4) you can use the private key to prove that the signed public cert is yours
linusoleander has joined #ruby
mcarron has joined #ruby
nitro_ has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
justme1 has quit [Quit: Leaving.]
<kushkella>
captish: Would you use it for PDF generation with a visual designer for template designing?
<catphish>
jaywastaken: the client never "sends" the private key anywhere, but it needs to use it internally to prove it owns the public cert
<catphish>
kushkella: i wouldn't use it, as i said i write everything myself, but i believe other people would
<Banistergalaxy>
Xeago what is riblappen
thams has joined #ruby
arthurstomp has quit [Client Quit]
crackfu has joined #ruby
<kushkella>
captish: Thanks for the feedback, can you point me to someone who might. I needed some feedback?
IrishGringo has joined #ruby
Yakko has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
sk87_ has joined #ruby
drago757- has joined #ruby
elaptics is now known as elaptics`away
anderse has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
drago757 has quit [Quit: drago757]
<jaywastaken>
catphish: thanks for the explanation! makes sense now
<catphish>
jaywastaken: gdgd, i didnt explain it that well :)
Wildhoney has left #ruby [#ruby]
Wildhoney has joined #ruby
dangerousdave has joined #ruby
jpfuentes2 has joined #ruby
nitro_ has quit [Ping timeout: 255 seconds]
newUser1234 has joined #ruby
workmad3 has joined #ruby
nitro_ has joined #ruby
Vainoharhainen has joined #ruby
kofno has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
mercwithamouth has joined #ruby
skattyadz has joined #ruby
ananthakumaran has quit [Ping timeout: 256 seconds]
octoberry has joined #ruby
slainer68 has quit [Remote host closed the connection]
thams has quit [Quit: thams]
eldariof has joined #ruby
drago757- has quit [Remote host closed the connection]
drago777 has joined #ruby
tomzx_mac has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
Elhu has quit [Quit: Computer has gone to sleep.]
bradleyprice has joined #ruby
imami|afk is now known as banseljaj
gianlucadv_ has joined #ruby
trevortwining has quit [Quit: trevortwining]
newUser1234 has quit [Remote host closed the connection]
thams has joined #ruby
gianlucadv has quit [Read error: Connection reset by peer]
banister`tyrion has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 245 seconds]
sabooky has quit [Ping timeout: 256 seconds]
eklarskov has quit [Ping timeout: 245 seconds]
thams has quit [Quit: thams]
Matip has quit [Ping timeout: 252 seconds]
banister`tyrion has joined #ruby
Al__ has joined #ruby
Matip has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
<Spooner>
havenwood, Nice. Pity no-one will accept 2.0.0 code for another 2 years :) People still can't get to 1.9 right now...
jgrevich has joined #ruby
bradleyprice has quit [Remote host closed the connection]
Slivka has quit [Remote host closed the connection]
<havenwood>
Spooner: Hopefully folks realize 2.0.0 is a stable release unlike 1.9.0 and adopt it quicker! But yeah... my farewell to __FILE__ line noise is premature. :P
ferdev is now known as ferdev|away
<apeiros_>
I'd love if they'd extend $LOAD_PATH with a little .unshift_relative
dhruvasagar has quit [Ping timeout: 255 seconds]
<apeiros_>
so you could write: $LOAD_PATH.unshift_relative '../lib' instead of: $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
techhelp has joined #ruby
<hiall>
anyone recommend any ruby books for medium developers?
pkondzior__ has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<sam113101>
hiall: The Well-Grounded Rubyist
kofno has joined #ruby
pdamer has quit [Quit: pdamer]
schaerli has joined #ruby
pyro111 has quit [Quit: Leaving]
mneorr has joined #ruby
bradhe has joined #ruby
testingb0t has quit [Quit: Leaving.]
tintin has joined #ruby
awarner has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<tintin>
how can i set flags or options to debug ruby source code
kofno has quit [Remote host closed the connection]
<tintin>
./configure -- ?
pyrac has joined #ruby
rohrer has joined #ruby
joofsh has joined #ruby
<fwaokda>
anyone know where i can find tutorials/docs on simplxlsxwriter ? i keep getting results for xlsx writer... ;/
Banistergalaxy has joined #ruby
Jeaye has joined #ruby
schaerli has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
Elhu has joined #ruby
artofraw has joined #ruby
artofraw has quit [Client Quit]
ferdev|away is now known as ferdev
pyr0commie has quit [Remote host closed the connection]
Al__ has quit [Quit: Al__]
timonv has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
tcstar has joined #ruby
Vert has joined #ruby
bradhe has quit [Remote host closed the connection]
F1skr has joined #ruby
bradhe has joined #ruby
eklarskov has joined #ruby
awarner has joined #ruby
thone_ has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
schaerli has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
awarner has quit [Remote host closed the connection]
heliumsocket has joined #ruby
thone has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
schaerli has quit [Remote host closed the connection]
sabooky has joined #ruby
heliumsocket has quit [Client Quit]
arturaz has joined #ruby
bradleyprice has joined #ruby
eklarskov has quit [Ping timeout: 252 seconds]
Al__ has joined #ruby
<otters>
You know what's weird is that it works locally with the same thin and eventmachine versions
<otters>
how upsetting
<otters>
does unicorn use eventmachine?
tintin has left #ruby [#ruby]
sk87_ has quit [Quit: Computer has gone to sleep.]
ablemike has joined #ruby
<havenwood>
otters: nope
<otters>
I'll try that, then
<ablemike>
Does anyone recognize this date format? 2012-01-04T10:19:00
<otters>
it might be nicer to not need to restart the web server when I deploy
<havenwood>
otters: +1 Unicorn
Morkel has joined #ruby
<otters>
heh
<davidcelis>
lmao if you're trying to build ruby 2.0 on mountain lion using rbenv
lxsameer has quit [Quit: Leaving]
<shevy>
syck is dead :(
schaerli has joined #ruby
<havenwood>
davidcelis: Agreed. Why would someone not be using rbenv over chruby!? :O
<shevy>
Psych::SyntaxError: (/settings.yml): invalid leading UTF-8 octet at line 1 column 1
<shevy>
now all my yaml files must be in UTF-8 :(((
jgrevich_ has joined #ruby
takeru has joined #ruby
<davidcelis>
havenwood: i mean the build totally barfs on openssl 1.0.1e
<havenwood>
davidcelis: ahhhhh
eka has joined #ruby
jgrevich has quit [Ping timeout: 256 seconds]
jgrevich_ is now known as jgrevich
newUser1234 has joined #ruby
hesco has joined #ruby
<havenwood>
guess ruby-build's .configure should add a flag, --with-openssl-dir=`brew --prefix openssl`
<davidcelis>
that's what i had been doing
<davidcelis>
using CONFIGURE_OPTS
<davidcelis>
RUBY_CONFIGURE_OPTS worked; with CONFIGURE_OPTS, it was still trying to download openssl manually and build it
maycon has quit [Ping timeout: 260 seconds]
<havenwood>
davidcelis: Yeah, i just go ahead and use a ton of --with options to avoid dynamic linking hell.
<hesco>
I just used gem to install cucumber-puppet-0.3.7, which advised me that 'ri' and 'RDoc' had been installed for it. Apparently none of that documentation has been manified. How is it I access those docs?
<havenwood>
davidcelis: oh, wierd!
joofsh has quit [Remote host closed the connection]
maycon has quit [Remote host closed the connection]
takeru has quit [Ping timeout: 255 seconds]
<havenwood>
hesco: E.g.: ri Array
Kobrakao has quit [Ping timeout: 260 seconds]
johnnyg1 has quit [Quit: Leaving.]
decoponio has quit [Quit: Leaving...]
<havenwood>
hesco: The pry gem is a fantastic repl for easy access to the docs. I'd highly recommend just installing pry and using that over irb. Then you can see docs with: ? Array#slice
<havenwood>
hesco: And actual method implementation with: show-method Array#slice
tcstar has quit [Read error: Connection reset by peer]
<spider-mario>
there’s also code completion as well as “edit” and “save-file”
<havenwood>
hesco: Type 'help' from within Pry for list of available pry-specific commands: http://pryrepl.org
<Spooner>
And you get a free cuddly toy with every copy of pry ;)
<hesco>
havenwood: thanks, installing pry now
Elhu has joined #ruby
<TTilus>
hesco: gem server gives you access to the docs
kodeart has left #ruby [#ruby]
sayan has quit [Quit: Leaving]
samphippen has joined #ruby
nwertman has quit [Ping timeout: 260 seconds]
schaerli has quit [Remote host closed the connection]
<hesco>
I encountered this error:
<hesco>
RDoc::Parser::Ruby failure around line 25 of
<hesco>
lib/pry/commands/ls.rb
eklarskov has joined #ruby
thone_ has quit [Ping timeout: 246 seconds]
Virunga has quit [Remote host closed the connection]
<banister`tyrion>
hesco: that's just a doc error due to a bug in rdoc, pry still installed successfully
Catbuntu has joined #ruby
Al__ has quit [Quit: Al__]
thone has joined #ruby
bradhe has joined #ruby
nwertman has joined #ruby
<hesco>
banister`tyrion: thanks, will try it then
toekutr has joined #ruby
anderse has quit [Quit: anderse]
TwN has joined #ruby
<Hanmac>
hm yeah banister i saw that rdoc at gem install try to make the doc out of *so files :P
anderse has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
justme1 has left #ruby [#ruby]
yacks has quit [Remote host closed the connection]
seta has quit [Remote host closed the connection]
schaerli has joined #ruby
<davidcelis>
of course, io-console is still broken with 2.0
<davidcelis>
so coolline can't install, so i can't use pry-coolline :(
schaerli has quit [Remote host closed the connection]
thone_ has joined #ruby
thone has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
<shevy>
Hanmac do you use 2.0 already?
marr has joined #ruby
<fwaokda>
when nokogiri access a page does it specify to the webpage that its a certain browser?
<Hanmac>
shevy i had, but it was on a different pc
thone_ has quit [Read error: Connection reset by peer]
zzing has joined #ruby
pdamer has joined #ruby
thone has joined #ruby
elux has quit [Remote host closed the connection]
anderse has quit [Quit: anderse]
elux has joined #ruby
pyrac has quit [Quit: pyrac]
mfcabrera has joined #ruby
etcetera has joined #ruby
<TwN>
apeiros_: replay analysis?
browndawg has quit [Quit: Leaving.]
Opettaja has joined #ruby
BizarreCake has joined #ruby
brum has joined #ruby
Mon_Ouie has joined #ruby
locriani_ is now known as locriani
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
<Catbuntu>
What do you recommend me, indenting with tabs or with spaces?
<shevy>
Catbuntu spaces
<shevy>
ideally 2
<Catbuntu>
Okay, thanks :)
<shevy>
Catbuntu you should reason for tabs or spaces however
adkron has joined #ruby
codespectator has quit [Quit: Computer has gone to sleep.]
<shevy>
Catbuntu I myself used tabs for a few years until I noticed that I wanted to use tabs to indent documentation in code as well
<shevy>
to "align" larger chunks of docu
<Catbuntu>
And what's the difference at all?
elux has quit [Ping timeout: 276 seconds]
mattbl has joined #ruby
sabooky has quit [Quit: leaving]
<shevy>
I dunno, I could not use tabs for documentation, but I could use spaces very well, so I switched to spaces
Mon_Ouie has quit [Read error: Connection reset by peer]
mephux has quit [Excess Flood]
<shevy>
I think the most common use case for \t is a table layout
<Catbuntu>
I used tabs when I used Python.
<shevy>
cell 1 | cell 2
<Catbuntu>
Yep
<shevy>
data1 \t data2
Elhu has quit [Quit: Computer has gone to sleep.]
<shevy>
and some people say "you could always replace tabs with the amount of spaces you want to"
<Catbuntu>
In fact my largest project which is an IRC bot was done first in PHP — then with Python.
mockra has joined #ruby
<shevy>
Catbuntu in ruby I usually find the first way that works and ignore the others
<Catbuntu>
Also I read that Ruby has a bad scalability, in fact Twitter stopped using it because of that.
mockra has quit [Remote host closed the connection]
<havenwood>
Catbuntu: FUD. Twitter still uses Ruby.
bradhe has joined #ruby
<shevy>
ok when you are as big as twitter you were pretty successful to that point, were you not ;)
<sam113101>
they switched to scala for their backend though I think
<apeiros_>
Catbuntu: a) twitter managed to get this big because of ruby in the first place, don't forget that
ddv has joined #ruby
<havenwood>
Catbuntu: They switched to Scala or Closure or what-have-you for backend stuff, but Twitter is still a Rails app.
<apeiros_>
Catbuntu: b) twitter still uses ruby
<Catbuntu>
They use Scala afaik, havenwood
<shevy>
Catbuntu big companies will almost always use whatever works best for them
<apeiros_>
Catbuntu: c) I wouldn't call it "bad" scalability if you get up to a couple of million request per second
<havenwood>
Catbuntu: They use multiple languages on the JVM. (JRuby is an awesome lang on the JVM.)
<Catbuntu>
ow
johnnyg1 has joined #ruby
jaygen_ has joined #ruby
<Catbuntu>
GitHub uses Ruby (on Rails) also, doesn't it?
xclite has quit [Ping timeout: 264 seconds]
jaygen has quit [Read error: Operation timed out]
<sam113101>
yes
<apeiros_>
appendum to c) not that many people manage to create a product which big enough to even make you switch
mattbl has quit [Quit: This computer has gone to sleep]
johnnyg1 has left #ruby [#ruby]
<havenwood>
Catbuntu: Github is a Unix shop so they use CRuby (actually they use Ruby 2.0.0 cause they run Unicorn and copy-on-write friendly GC is a big savings)
<shevy>
anyone knows if rails supports 2.0 already? :>
<havenwood>
Catbuntu: Twitter is a JVM shop.
<apeiros_>
Catbuntu: but re scalability - feel free to write everything in hand optimized assembler from start. lets see how far you get…
<havenwood>
Catbuntu: Ruby is great on both.
jaygen has joined #ruby
Catbuntu has quit [Read error: Connection reset by peer]
<havenwood>
shevy: Yeah, it does.
<havenwood>
shevy: Rails 4.0 is 2.0-preferred, 1.9-supported, 1.8-ah-hells-no.
jaygen_ has quit [Read error: Operation timed out]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<shevy>
!!! :(
<shevy>
no more 1.8 ...
<shevy>
I think I must switch to sublime text as my editor
jfontan has quit [Quit: Leaving.]
<havenwood>
nope, banished - lets them ditch legacy code and no point since 1.8 is already patch-dead and end-of-life in June. If a Rails shop wants to Run 1.8 with no security patch support, heaven help them (and they have to do it on Rails 3-or-lower).
Jebron has joined #ruby
toekutr has quit [Remote host closed the connection]
<otters>
oh man
<shevy>
hehe
kushkella has quit [Ping timeout: 245 seconds]
<shevy>
wow 10 years birthday
<shevy>
"Rails was created in 2003 by David Heinemeier Hansson "
colonolGron has quit [Quit: leaving]
<aedornm>
I love people asking why they should choose X language. Like if they don't choose the right one, the world will end. I have similar arguments with myself about what to have for lunch.
<havenwood>
shevy: I'll go out with a 20-yr-old, but 10?? No thanks Rails. Will stick to Ruby. :P
arturaz has quit [Remote host closed the connection]
Catbuntu has joined #ruby
<whitequark>
aedornm: excellent comparison
<havenwood>
Today being Ruby's 20th birthday really does feel festive! ┌(★o☆)┘
<whitequark>
I'm going to use it.
<apeiros_>
aedornm: you'll end the world with your careless lunch choices!
techhelp has quit [Quit: This computer has gone to sleep]
Catbuntu is now known as Guest89564
<Guest89564>
owwwwwwwww
thufir_ has joined #ruby
<Guest89564>
stupid internet
pyrac has joined #ruby
<havenwood>
brunch ftw
Guest89564 is now known as Catbuntu
Catbuntu has quit [Changing host]
Catbuntu has joined #ruby
<shevy>
aedornm would you want to eat unhealthy food
<Catbuntu>
Is today Ruby's 20th birthday?
<havenwood>
Catbuntu: Yes!
<shevy>
nah, ruby "Appeared in 1995" according to wikipedia
<Catbuntu>
coolie
<Catbuntu>
so why does Twitter use JVM?
<havenwood>
shevy: Wikipedia is wrong.
<aedornm>
shevy: There are days where fish, chips, and a beer are appropriate!
<shevy>
havenwood hmm
<whitequark>
Catbuntu: 1) Twitter still uses Ruby/Rails on the frontend AFAIK
kevinfagan has quit [Quit: Leaving...]
<Catbuntu>
Isn't it using JRuby?
<whitequark>
2) using JVM and Ruby is not mutually exclusive
<whitequark>
dunno, wasn't it their 1.8 fork? Kiji or so
kevinfagan has joined #ruby
poga has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
FondoDeBikini has joined #ruby
<havenwood>
shevy: Matz says Ruby is 20. Quick check of Matz' twitter has DDH congrats for 20-years of Ruby. I haven't had my coffee, but I'd bet that Wikipedia is not-at-all-correct on this one. :P
<havenwood>
shevy: Guess you could debate what 'birthday' means, but Feb 24, 1993 is what Matz pegs as DOB.
<shevy>
hehe ok
CraHan|out is now known as CraHan
<havenwood>
shevy: Actually, now it makes sense why in his talk at RubyConf Brixen mentioned Ruby turning 18, betcha he went off Wikipedia. Hehe.
icole has joined #ruby
Catbuntu has quit [Read error: Connection reset by peer]
arietis has joined #ruby
<aedornm>
Conception vs inception, probably...
jekotia has joined #ruby
<havenwood>
aedornm: Or public release maybe?
<aedornm>
uh .. vs. reception
<havenwood>
hehe
otherj has joined #ruby
<havenwood>
I like the idea of Ruby inception though, wait are we 3 Rubies deep or 4? Where is my coin!?
etcetera has quit []
burgestrand has quit [Quit: Leaving.]
<fwaokda>
i have a string " this" and im doing .strip on it and it's not removing the white space... anything im missing?
d2dchat has joined #ruby
<havenwood>
fwaokda: Are you modifying a variable (might need #strip!). #strip does work: " this".strip; #=> "this"
<havenwood>
! to modify the receiver
<fwaokda>
hmmm idk maybe its not really a space
BizarreCake has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
<fwaokda>
it outputs to console as => " College Person", but then if i try the .strip! it prints out => nil
nachtwandler has quit [Remote host closed the connection]
<havenwood>
fwaokda: " this"[0].ord; #=> 32
<havenwood>
fwaokda: paste a Gist of the code?
<havenwood>
fwaokda: 32.chr; #=> " "
<fwaokda>
that returns => 160
<havenwood>
160.chr; #=> "\xA0"
<fwaokda>
what the hell is that haha
<Spooner>
"Bundler is not compatible with Ruby 2.0 or Rubygems 2.0" - well, that was a waste of time :D
<havenwood>
Spooner: 1.3 is, just --pre it
<Hanmac>
fwaokda .strip! returns nil if the string does not change
budmang has quit [Read error: Connection reset by peer]
<Spooner>
Ah right.
<Spooner>
havenwood, Thanks.
<Hanmac>
Spooner about Bundler: what??? why?¿
SCommette has joined #ruby
<Spooner>
Hanmac, The current release doesn't work with 2.0. As havenwood said, the --pre version is.
<fwaokda>
how can i have strip, strip off "\xA0" ? or do i just need to remove it somehow?
sonda has quit [Remote host closed the connection]
budmang has joined #ruby
d2dchat has quit [Read error: Connection timed out]
d2dchat has joined #ruby
io_syl_ has joined #ruby
schaerli has joined #ruby
mario___ has joined #ruby
joofsh has joined #ruby
k776 has joined #ruby
<k776>
There has been articles going around that MySQL+TcMalloc (via LD_PRELOAD) == Speed Boost. But does anyone know if Postgresql or Ruby in general can benefit from LD_PRELOAD being set to TcMalloc?
horofox_ has quit [Quit: horofox_]
<whitequark>
k776: try it and benchmark it.
<whitequark>
theoretically it is possible and likely.
<k776>
I'm hesitant to try it on a production box...
schaerli has quit [Remote host closed the connection]
<Hanmac>
fwaokda: you want to tell me that your string is "\xA0College Person"?
<whitequark>
k776: try it on a development box?
<whitequark>
`ab' is your friend.
<k776>
whitequark: I suppose...
hbpoison has quit [Remote host closed the connection]
mario___ has left #ruby [#ruby]
icole has quit [Remote host closed the connection]
hbpoison has joined #ruby
maxmanders has quit [Ping timeout: 256 seconds]
io_syl has quit [Ping timeout: 255 seconds]
io_syl_ is now known as io_syl
<fwaokda>
Hanmac, i think so but in terminal the \xA0 shows up as a blank
<Spooner>
Yay, I just ran my first script in 2.0 :)
trevortwining has quit [Quit: trevortwining]
maxmanders has joined #ruby
<fwaokda>
i think it's a " " or whatever from the html file im getting the string from
<havenwood>
fwaokda: You could change the \xA0's to spaces or just remove them. Here is convert to spaces: #gsub!(/[\xA0]/n, ' ')
heliumsocket has quit [Ping timeout: 252 seconds]
znode_ has quit [Remote host closed the connection]
<fwaokda>
im getting... Encoding::CompatibilityError: incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
<shevy>
there is also $stderr and $stdout, I think
<Amnesia>
isn't there anything similar as bash's "cmd > log" ?
adkron has quit [Ping timeout: 245 seconds]
mockra has joined #ruby
joofsh has joined #ruby
Guest6320 has joined #ruby
Guest6320 has quit [Client Quit]
<Amnesia>
or should I set a fd called $stdout, and write to that?
<catphish>
$stdout always exists
<catphish>
afaik
<Amnesia>
I know
<shevy>
Amnesia that creates a file right?
pyrac has quit [Quit: pyrac]
<Amnesia>
it redirects stdout to log yes
<shevy>
as far as I know, in plain ruby, you can only use File.open and File.new
<shevy>
you can use the redirection inside ``
<catphish>
$stdout.reopen perhaps?
<Amnesia>
I think it's just $stdout = File.open('log', 'w') ; system('ls')
<catphish>
i would use reopen rather than redefining the variable
<catphish>
it ensures any other links are updated
<apeiros_>
Amnesia: see Process.spawn
<catphish>
like STDOUT
ner0x has quit [Quit: Leaving]
<Amnesia>
hm ok ty
<apeiros_>
allows you to do whatever you want with a subprocess' IOs
TheFuzzball has joined #ruby
<Amnesia>
apeiros_: I'll take a look, thanks
mockra has quit [Ping timeout: 260 seconds]
joofsh has quit [Remote host closed the connection]
h4mz1d has joined #ruby
techhelp has joined #ruby
horofox has joined #ruby
TheFuzzball has quit [Client Quit]
generalissimo has joined #ruby
generalissimo has quit [Remote host closed the connection]
v0n has joined #ruby
generalissimo has joined #ruby
kop has quit [Ping timeout: 260 seconds]
joofsh has joined #ruby
<rickmasta>
Is Mechanize unable to click JS links?
<rickmasta>
Even if it recognizes them when you have it list the links?
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
bradleyprice has joined #ruby
TheFuzzball has joined #ruby
nat_home has joined #ruby
reppard has joined #ruby
kop has joined #ruby
swex_ has joined #ruby
m8 has joined #ruby
znode has joined #ruby
thams has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<aedornm>
if the link requires javascript, then no. Mechanize does not execute JS
motto has quit [Read error: Operation timed out]
Retistic has joined #ruby
bradleyprice has quit [Remote host closed the connection]
swex has quit [Ping timeout: 260 seconds]
schaerli has joined #ruby
Wildhoney has quit [Ping timeout: 255 seconds]
znode has quit [Ping timeout: 276 seconds]
schaerli has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
mduvall has quit []
tylersmith has joined #ruby
Stilo has joined #ruby
reppard has quit [Ping timeout: 252 seconds]
Retistic has quit [Quit: Retistic]
ner0x has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Retistic has joined #ruby
mduvall has joined #ruby
twshelton has joined #ruby
testingb0t has joined #ruby
newUser1234 has joined #ruby
brum has quit [Remote host closed the connection]
slainer68 has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
generali_ has joined #ruby
reppard has joined #ruby
havenwood has joined #ruby
awarner has quit [Remote host closed the connection]
postmodern has joined #ruby
gosshedd has quit [Ping timeout: 255 seconds]
generalissimo has quit [Ping timeout: 260 seconds]
Quebert has joined #ruby
thams has quit [Quit: thams]
heliumsocket has joined #ruby
meoblast001 is now known as emoblast001
onlinenickid has quit [Quit: Nettalk6 - www.ntalk.de]
Todd has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
Umren has quit [Read error: Connection reset by peer]
eklarskov has quit [Quit: leaving]
Nisstyre has quit [Quit: Leaving]
chrisnicola has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
daxim has quit [Quit: pro quo, Agent Starling]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
thufir_ has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby
epicurus has joined #ruby
elico has quit [Ping timeout: 245 seconds]
<fir_ed>
gem install is failing on all gems
<fir_ed>
Loading command: install (LoadError)
<fir_ed>
What should I do?
<fir_ed>
Ruby 2.0.0-p0
apok has joined #ruby
<epicurus>
check to see if rubygems works with that old version of ruby maybe?
<havenwood>
fir_ed: What do you get for?: gem -v
br4ndon has joined #ruby
jpcamara has joined #ruby
verysoftoiletppr has quit []
<fir_ed>
gem -v => 2.0.0
<fir_ed>
epicurus, that's the newest version of ruby.
<epicurus>
oh. lol
<epicurus>
never mind.
<fir_ed>
Maybe I compiled it wrong?
<fir_ed>
lol.
<fir_ed>
noobs should not compile.
arya has quit [Ping timeout: 248 seconds]
thufir_ has joined #ruby
<epicurus>
i have a question of my own. trying to send an http post request with net/http , how do i encode the body? i have a couple of params, one of them has a single string value and the other takes an array of strings
thillux has quit [Remote host closed the connection]
arya has joined #ruby
<fir_ed>
havenwood, looking it over
<fir_ed>
thanks
<dblack_>
hmmm, can't compile 2.0.0-p0 without "CC=clang"
F1skr has quit [Quit: WeeChat 0.4.0]
<dblack_>
apple's compiler chain isn't letting me treat it as the black box i wish it were
<havenwood>
fir_ed: I'd recommend chruby as well, just to simply set your environment variables and paths for any rubies you build.
justsee has quit [Quit: Leaving...]
Rheoli has joined #ruby
emergion has joined #ruby
sjk has left #ruby [#ruby]
codecop has quit [Quit: Išeinu]
elico has quit [Remote host closed the connection]
MrITR has quit [Ping timeout: 255 seconds]
huoxito has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
lazyPower has joined #ruby
jetblack has quit [Quit: leaving]
tealmage has quit [Remote host closed the connection]
rocket has joined #ruby
etcetera has quit []
<lazyPower>
Has anyone experienced any issues with building ruby 1.9.3-p392 via ruby_build from rbenv? every time i try to compile a ruby it seems to just error out on implicit conversions.
<lazyPower>
st.c:520:35: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] from st.c
elkclone has joined #ruby
<postmodern>
lazyPower, what system are you compiling on?
<postmodern>
lazyPower, also have you tried compiling it manually to see if it's something ruby-build is doing?
twshelton has quit [Quit: Computer has gone to sleep.]
<lazyPower>
OSX 10.8 with brew/LLVM GCC via xcode cmd line tools
emergion has quit [Ping timeout: 264 seconds]
Quebert has quit [Ping timeout: 260 seconds]
nat_home has quit [Quit: Leaving.]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
krawchyk has joined #ruby
<lazyPower>
Thats a good idea, Fetching the source now to try a manual compile
emoblast001 is now known as meoblast001
Nisstyre has joined #ruby
mockra has joined #ruby
timols has joined #ruby
<shevy>
fir_ed I have the same error but only on 2.0.0, on 1.9.3 not
<fir_ed>
shevy, great to see we have the same error
<shevy>
yeah. and it told me to stop wasting my time on 2.0.0 too, I'll try the next release :P
<shevy>
they also killed syck :(
chichou has joined #ruby
jborica has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
chichou has quit [Client Quit]
mengu has quit [Ping timeout: 260 seconds]
<fir_ed>
didnt they replace it with
<fir_ed>
psych?
mockra has quit [Ping timeout: 256 seconds]
takeru has joined #ruby
chichou has joined #ruby
null_radx has joined #ruby
HecAtic has joined #ruby
<shevy>
yeah
<shevy>
bastards
vlad_starkov has joined #ruby
bradhe has quit [Remote host closed the connection]
mockra has joined #ruby
bradhe has joined #ruby
apok has quit [Quit: apok]
twshelton has joined #ruby
mockra has quit [Remote host closed the connection]
justsee has quit [Quit: Leaving...]
Deltaoo has joined #ruby
null_radx has left #ruby [#ruby]
blacksta_ has joined #ruby
takeru has quit [Ping timeout: 276 seconds]
<whitequark>
shevy: correctness > speed
dblack_ has quit [Quit: dblack_]
<shevy>
whitequark it's causing me extra work, just to be able to use 2.0.0
brum has joined #ruby
gregor3005 has joined #ruby
vlad_starkov has quit [Ping timeout: 255 seconds]
maxmanders has quit [Ping timeout: 252 seconds]
hiall has quit [Quit: hiall]
<shevy>
I need to use something else than yaml
bradhe has quit [Ping timeout: 252 seconds]
razibog has quit [Ping timeout: 252 seconds]
<shevy>
but I dont know what :(
etcetera has joined #ruby
baroquebobcat has joined #ruby
<otherj>
got it. needed to specify listen directive
maxmanders has joined #ruby
etcetera has quit [Client Quit]
timonv has quit [Remote host closed the connection]
<atal421>
v0n: not sure how you mean? pry, console, irb, none of those will actually show me anything new, will they? they're just a way to goof around … i mean, within the ruby/github repo, how do i find what's undocumented?
FondoDeBikini has quit [Remote host closed the connection]
FondoDeBikini has joined #ruby
<faoiseamh>
I want to encode hashes in ruby that may have values in various encodings (utf-8, ascii-8bit, etc) as well as perhaps some binary data and pass it over http to a php api where I want to decode it. Binary data aside, I'm having trouble with json because some characters can't be converted to utf-8 and php's json_decode fails as a result. Any suggestions for alternative encoding schemes?
Es0teric has quit [Read error: Connection reset by peer]
<faoiseamh>
the data I've run into an issue with so far is the response from an http get of google.com
brum has quit [Ping timeout: 252 seconds]
Vainoharhainen has quit [Quit: Leaving...]
averiso has quit [Quit: Computer has gone to sleep.]