fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
<bperry> mildfate: "string" =~ /#{long_regex}/
Banistergalaxy has quit [Ping timeout: 248 seconds]
jblack has quit [Ping timeout: 248 seconds]
F1skr has quit [Quit: WeeChat 0.3.8]
<bperry> long_regex is a string that you build dynamically I suppose that may be very large amd unwieldy
BMF has joined #ruby
mikeycgto has joined #ruby
AndChat| has quit [Ping timeout: 248 seconds]
Takehiro has joined #ruby
awc737 has quit [Quit: Leaving.]
tgraham is now known as tgraham|away
lggr has joined #ruby
<elico> anyone knows a thing about socket programming? need some help understanding.
tommyvyo has joined #ruby
rads has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nari_ has quit [Ping timeout: 252 seconds]
nwest has joined #ruby
<graft> what about socket programming?
CaptainJet has joined #ruby
`brendan has joined #ruby
Banistergalaxy has joined #ruby
chussenot has quit [Quit: chussenot]
<elico> I read about it before but now someone told me a thing but i'm unsure about it
<elico> giving this diagram
ukd1_ has joined #ruby
AndChat| has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
<elico> the next step after established is to be closed right?
bluebie has joined #ruby
SegFaultAX|work has quit [Ping timeout: 240 seconds]
<elico> He was saying about half close can still get data from the client
<elico> but it's only for fin\ack and not other data
ukd1 has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 256 seconds]
AndChat- has quit [Ping timeout: 248 seconds]
chin-tastic has joined #ruby
<elico> like in the fin_wait you cant get data from the other side
Banistergalaxy has quit [Ping timeout: 248 seconds]
<elico> graft: ??
duracrisis has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
dekz has joined #ruby
ianblenke1 has joined #ruby
Asher has quit [Ping timeout: 245 seconds]
elaptics is now known as elaptics`away
DrShoggoth has joined #ruby
duracrisis has joined #ruby
elaptics`away is now known as elaptics
Banistergalaxy has joined #ruby
pskosinski has quit [Quit: Some unofficial Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb]
AndChat- has joined #ruby
<RubyPanther> Elico: you don't worry about that, you just use the stdlib
SegFaultAX|work has joined #ruby
<graft> err... i'm not sure what exactly you're asking, but i'm skeptical that you need to worry about fin/ack stuff
AndChat| has quit [Ping timeout: 252 seconds]
rakunHo has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<graft> can someone help me explain how i can use a pull parser to read in a large XML file?
<graft> i'm trying to wrap my head around this and failing
<graft> i have a file with a bunch of <entry></entry> records, each of which is a fairly complex xml structure... i'd like to just read in those <entry> records one-at-a-time and do some stuff to them
<graft> how do i accomplish this?
<elico> how about xml parser?
flovv has joined #ruby
duracrisis has quit [Ping timeout: 260 seconds]
nightfalcon has joined #ruby
lggr has joined #ruby
<graft> i can't load the whole thing into memory, it's too big
<elico> regex can be nice..
mikedevita has joined #ruby
<heftig> graft: use a SAX parser
Kruppe has joined #ruby
<heftig> nokogiri is one, AFAIK
<graft> heftig: i don't really understand the SAX parser, is my problem.
joofsh has joined #ruby
mikedevita has left #ruby [#ruby]
<heftig> it generates events as it encounters nodes
<graft> heftig: it seems to just traverse the nodes one-at-a-time, which seems totally useless to me
<heftig> it doesn't hold any internal structure of the xml file, so memory usage is low
xyzodiac has joined #ruby
niklasb has quit [Ping timeout: 255 seconds]
<graft> well, i want to be able to read in some sub-structure of the xml file
mikedevita has joined #ruby
<mikedevita> anyone familiar with Devise, and Rails? Trying to figure howtf to make Devise use flash messages instead of devise_error_messages!
<rakunHo> mikedevita: ask on #RubyOnRails
<mikedevita> i cant send anything in there
<mikedevita> just says error 404
<mikedevita> tis booty
blazes816 has quit [Read error: Connection reset by peer]
xuser has joined #ruby
ken_barber has joined #ruby
blazes816_ has joined #ruby
vlad_starkov has joined #ruby
<chiel> anyone feel like giving an opinion about something i'm working on? trying to figure out the best way to structure things.
<chiel> I'll just go ahead and ask
lggr has quit [Ping timeout: 260 seconds]
<chiel> i'm working on https://github.com/tinker/tinker-api/blob/master/lib/api.rb , basically the post stuff (post '/tinkers') is working pretty well, but now i am trying to get the put stuff working as well, to update things
codeFiend has joined #ruby
<chiel> a lot of the code in the post path is obviously shared, i'm trying to figure out the best place to put this code. should it be in a class, or so?
seanstickle has quit [Quit: seanstickle]
statarb3 has quit [Quit: Leaving]
jenrzzz has joined #ruby
ttt has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
blazes816_ has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby
lggr has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
elaptics is now known as elaptics`away
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
Banistergalaxy has joined #ruby
AndChat| has joined #ruby
Chryson has joined #ruby
stkowski has quit [Quit: stkowski]
ttt has quit [Ping timeout: 260 seconds]
AndChat- has quit [Ping timeout: 252 seconds]
yigal has quit [Quit: leaving]
Banistergalaxy has quit [Ping timeout: 244 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
Juul has quit [Ping timeout: 246 seconds]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
issyl0 has quit [Remote host closed the connection]
issyl0 has joined #ruby
issyl0 is now known as Guest61241
lggr has quit [Ping timeout: 260 seconds]
asteve has joined #ruby
verto is now known as verto|off
Taranis has quit [Quit: leaving]
lggr has joined #ruby
blazes816 has quit [Quit: blazes816]
Taranis has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
eignerchris has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
ewag has joined #ruby
icole has quit [Remote host closed the connection]
iamjarvo has joined #ruby
elico has quit [Quit: Elico]
punkrawkR has quit [Read error: Connection reset by peer]
sneakyness_wk has quit [Quit: Today's word of the day is: infanticide]
vitor-br has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
bigmcq77 has joined #ruby
chrisja has quit [Quit: leaving]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
tommyvyo has joined #ruby
wuiqed has joined #ruby
ffranz1 has joined #ruby
dakine has joined #ruby
Pochacco has joined #ruby
Pochacco has quit [Client Quit]
lggr has joined #ruby
bricker has quit [Ping timeout: 260 seconds]
yshh has joined #ruby
ffranz has quit [Ping timeout: 240 seconds]
bluebie has quit [Quit: Leaving...]
ukd1_ has quit [Read error: Connection reset by peer]
mikedevita has quit []
jenrzzz has quit [Ping timeout: 244 seconds]
mikedevita has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
apok has joined #ruby
mikedevita has quit [Client Quit]
ndboost has joined #ruby
Takehiro has joined #ruby
lggr has joined #ruby
codeFiend has quit [Ping timeout: 246 seconds]
kiyoura has joined #ruby
macmartine has joined #ruby
aharris has joined #ruby
horofox has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
waxjar has joined #ruby
jimeh has joined #ruby
jblack has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Remote host closed the connection]
Left_Turn has quit []
lggr has quit [Ping timeout: 246 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
codeFiend has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
fungoat has joined #ruby
waxjar has quit [Ping timeout: 244 seconds]
shiki has joined #ruby
aantix has quit [Ping timeout: 240 seconds]
tgraham|away is now known as tgraham
iori has joined #ruby
ncr100_ has joined #ruby
lurraca has joined #ruby
kzrl has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
wuiqed has quit [Quit: Leaving]
jblack has quit [Ping timeout: 246 seconds]
ncr100 has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
SegFaultAX|work has quit [Ping timeout: 240 seconds]
wuiqed has joined #ruby
lggr has joined #ruby
ncr100_ has quit [Ping timeout: 245 seconds]
thillux_ has quit [Ping timeout: 260 seconds]
CannedCorn has joined #ruby
sent-hil has joined #ruby
bluebie has joined #ruby
dmiller has joined #ruby
waxjar has joined #ruby
limon7 has joined #ruby
rakl has joined #ruby
sent-hil has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
ebragaparah has joined #ruby
Guedes has quit [Ping timeout: 240 seconds]
ttt has joined #ruby
kpshek has joined #ruby
lggr has joined #ruby
skaczor has quit [Remote host closed the connection]
sent-hil has joined #ruby
Targen has joined #ruby
ttt has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
bluebie has quit [Ping timeout: 260 seconds]
kpshek has quit [Ping timeout: 240 seconds]
nykur has quit [Quit: bye]
jimeh has quit [Ping timeout: 255 seconds]
rabidpraxis has joined #ruby
SegFaultAX|work has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
<graft> argh. who invented xpath, and how can i shoot them?
quazimodo has quit [Ping timeout: 255 seconds]
rabidpraxis has quit [Remote host closed the connection]
lggr has joined #ruby
jrunning has quit [Quit: leaving]
ryanf has quit [Quit: leaving]
dmiller has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
<Pip> Any good book for beginners?
sent-hil has quit [Remote host closed the connection]
wuiqed has quit [Quit: Leaving]
wuiqed has joined #ruby
<mildfate> I have 6 strings of varying lengths. Is there a way to, in a single line, assign the longest string to a var?
<graft> are the six strings in an array?
<mildfate> graft: Would it be easier if they were?
<mildfate> (at the moment, they're not in an array)
dmiller has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 240 seconds]
<flovv> Pip: Book about ruby? I recommend the ruby book by yukihiro matsumuto aka matz, creator of ruby
<flovv> it's really good
<graft> a = [ "a", "blah", "trues" ].max_by(&:length)
<Pip> flovv, name?
<flovv> ruby programming language
swarley has joined #ruby
zcreative has quit [Quit: zcreative]
ZubKonst_ has joined #ruby
<Pip> flovv, Serioiusly? For beginners?
wuiqed has quit [Quit: Leaving]
lggr has joined #ruby
bradyl0ve has joined #ruby
ZubKonst has quit [Ping timeout: 246 seconds]
wuiqed has joined #ruby
<graft> anyone good with libxml?
nari_ has joined #ruby
<flovv> Pip what kind of beginner are you? I began with this book four years ago and it helped me alot, it demonstrates rubies power and elegance.
Hanmac1 has joined #ruby
<swarley> graft, in c?
<Pip> alright
<swarley> also what book
<flovv> I had quite some experience from other languages though
<swarley> flovv, you may want to look into the pickax book then
<flovv> try out _why's poignant guide to ruby as well
<swarley> oh sorry
<swarley> wrong person
<swarley> :p
<swarley> that's what i get for joining mid conversation
<flovv> that's a funny book drawn with foxes and lots of chunky bacon!
<graft> swarley: no, in ruby
wuiqed has quit [Client Quit]
<swarley> graft, XmlSimple?
<flovv> (I'm not joking)
ttt has joined #ruby
<swarley> CHUNKY BACON
<swarley> CHUNKY BACON CHUNKY BACON CHUNKY BACON CHUNKY BACON
<swarley> KEEP SAYING IT MAYBE HE'LL PUT IT IN THE BOOK
<swarley> graft, what is the actual gem you are using
<graft> swarley: libxml4r
<swarley> o-o i've never heard of that one
Hanmac has quit [Ping timeout: 244 seconds]
<graft> libxml.rubyforge.org
lggr has quit [Ping timeout: 256 seconds]
<flovv> lol
<graft> argh, anyway, gotta run now, maybe i can beat my head against this tomorrow
<swarley> ah
voodoofish430 has quit [Quit: Leaving.]
pipopopo has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
peneconleche|awa has quit [Quit: Leaving...]
Takehiro has joined #ruby
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
pipopopo has joined #ruby
dmiller has quit [Remote host closed the connection]
g-ram has joined #ruby
waxjar has quit [Quit: Textual IRC Client: www.textualapp.com]
waxjar_ has joined #ruby
lggr has joined #ruby
Pip has quit [Quit: 离开]
waxjar_ is now known as waxjar
thaostra has joined #ruby
dmiller has joined #ruby
nightfalcon has quit [Quit: Lost terminal]
aharris has left #ruby [#ruby]
bluebie has quit [Ping timeout: 252 seconds]
Takehiro has quit [Ping timeout: 252 seconds]
pipopopo has quit [Ping timeout: 246 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
pipopopo has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
Knodi has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
AndChat| has quit [Ping timeout: 244 seconds]
codeFiend has quit [Quit: codeFiend]
elico has joined #ruby
h4mz1d has joined #ruby
lggr has joined #ruby
codeFiend has joined #ruby
shadoi1 has quit [Quit: Leaving.]
shadoi has joined #ruby
Knodi has quit [Quit: Knodi]
bbttxu has quit [Quit: bbttxu]
sciolizer has quit [Quit: Leaving]
macmartine has quit [Quit: Computer has gone to sleep.]
krz has joined #ruby
dmiller has quit [Remote host closed the connection]
<mildfate> What regex would match only the newline character?
rakl has quit [Quit: sleeping]
cakehero has joined #ruby
SegFaultAX|work has quit [Ping timeout: 246 seconds]
shadoi has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 240 seconds]
dmiller has joined #ruby
Trioke has quit [Ping timeout: 245 seconds]
philcrissman has joined #ruby
kiyoura has quit [Quit: Leaving]
Axsuul has quit [Ping timeout: 255 seconds]
Axsuul has joined #ruby
cbuxton has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
<swarley> mildfate, /\n/
S2kx has joined #ruby
linoj has quit [Quit: linoj]
wpaulson has joined #ruby
Spooner has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 248 seconds]
linoj has joined #ruby
hackeron has quit [Ping timeout: 246 seconds]
hackeron has joined #ruby
goyox86 has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<mildfate> String.match(regex) matches the first occurence of regex. Is there a way to negate this? I.e. String.match(NOT regex)?
wpaulson_ has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
S1kx has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
dmiller has quit [Remote host closed the connection]
rakl has joined #ruby
goyox86 has quit [Remote host closed the connection]
chin-tastic has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
goyox86 has joined #ruby
colinbm has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
wpaulson has quit [Ping timeout: 248 seconds]
wpaulson_ is now known as wpaulson
lurraca_ has joined #ruby
rakl has quit [Client Quit]
apok has quit [Ping timeout: 246 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
bluebie has quit [Ping timeout: 265 seconds]
dmiller has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
lurraca has quit [Ping timeout: 256 seconds]
codeFiend has quit [Quit: codeFiend]
goyox86 has quit [Read error: Connection reset by peer]
goyox86_ has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
colinbm has quit [Quit: colinbm]
Banistergalaxy has joined #ruby
philcrissman has quit [Remote host closed the connection]
freeayu__ has quit [Remote host closed the connection]
wallerdev has quit [Read error: Connection reset by peer]
goyox86 has joined #ruby
wallerdev has joined #ruby
goyox86_ has quit [Read error: Connection reset by peer]
My_Hearing is now known as Mon_Ouie
<flovv> mildfate: negating a regex is not so easy, I can remember that I've researched this on stackoverflow, in the end I gave it up, but give it a try
asteve has quit [Quit: Computer has gone to sleep.]
chrstphrhrt has joined #ruby
chrstphrhrt has left #ruby [#ruby]
lggr has joined #ruby
cbuxton has joined #ruby
cbuxton has quit [Client Quit]
<mildfate> flovv: Looks like you have to make a character class with the carrot operator: /[^]/. After the character operator comes all characters you don't want to be matched.
lurraca__ has joined #ruby
jimeh has joined #ruby
joofsh has quit [Remote host closed the connection]
yoklov has joined #ruby
g-ram has joined #ruby
wpaulson has joined #ruby
lurraca_ has quit [Read error: Connection reset by peer]
DrShoggoth has quit [Quit: Leaving]
lggr has quit [Ping timeout: 252 seconds]
Trioke has joined #ruby
jimeh has quit [Ping timeout: 244 seconds]
butblack has joined #ruby
<thaostra> I am having a couple issues with implementing a method for downloading files. One is that it does not write to file until the download is finished, and secondly it does not resume partial downloads. I can tolerate wasted bandwidth and time for small files, but not so much for large files. Basically I want to implement something that is not unlike ( wget -P PATH/TO/FILE -c URL ). I have a snippet of my code so far: https://gist.github.com/4e01da8091ab2525a
<thaostra> 446
<thaostra> Oops, broken URL. Here it is: https://gist.github.com/4e01da8091ab2525a446
lggr has joined #ruby
BMF has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
Beoran__ has joined #ruby
iamjarvo has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
Takehiro has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
rabidpraxis has joined #ruby
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
wpaulson has quit [Read error: Connection reset by peer]
dmiller has quit [Ping timeout: 256 seconds]
Takehiro has quit [Ping timeout: 256 seconds]
bluebie has quit [Ping timeout: 272 seconds]
mensvaga has quit [Ping timeout: 240 seconds]
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 246 seconds]
jgrevich_ is now known as jgrevich
lggr has quit [Ping timeout: 244 seconds]
m3pow has quit [Ping timeout: 240 seconds]
g-ram has joined #ruby
g-ram has quit [Client Quit]
m3pow has joined #ruby
lggr has joined #ruby
jenrzzz has joined #ruby
Chryson has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 255 seconds]
<bnagy> thaostra: first issue you can solve with chunking
vitor-br has quit [Ping timeout: 246 seconds]
<bnagy> out_fh.write in_fh.read(2048) or whatever
<bnagy> resuming I dunno, I don't use open-uri - would depend on the API for starting to download from an offset
<bnagy> normally I think people use a .partial file or somesuch and then mv it over at the end
vitor-br has joined #ruby
lggr has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
<bnagy> also I thought the point of mkdir_p is that you don't have to test for existence first...
dv_ has quit [Ping timeout: 246 seconds]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
<thaostra> bnagy, I am unfamiliar with using file chunking, so could you write up a snippet? I would really appreciate it, as it is usually how I learn new code
gry has quit [Ping timeout: 615 seconds]
<bnagy> you just pass a length arg to read
friskd has quit [Ping timeout: 240 seconds]
<thaostra> bnagy, Well I am coming from Bash land, and I have not benchmarked to see if using a testing operation would speed things up
icole has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
gry has joined #ruby
<bnagy> doubt it would be noticably faster, you only do it once, it just looks weird and it's dead code
dv_ has joined #ruby
CaptainJet has quit []
<thaostra> bnagy, Not really, I have seen noticeable differences in performance with my bast scripts when testing over 11000 times for destinations of files.
nwest has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
<thaostra> However, I do not know if Ruby is more intelligent than indiscriminately running mkdir -p
lggr has quit [Ping timeout: 246 seconds]
ianblenke1 has quit [Quit: Leaving.]
patrickximenes has joined #ruby
patrickximenes has quit [Client Quit]
lggr has joined #ruby
vitor-br has joined #ruby
dmiller has joined #ruby
bigmcq77 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
nat2610 has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 245 seconds]
chin-tastic has joined #ruby
cakehero has joined #ruby
kyb3r has joined #ruby
kenneth has quit [Quit: kenneth]
macmartine has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
goyox86_ has joined #ruby
chin-tastic has quit [Ping timeout: 240 seconds]
elsifaka has joined #ruby
codeFiend has joined #ruby
tgraham has quit [Quit: Linkinus - http://linkinus.com]
macmartine has quit [Read error: Connection reset by peer]
goyox86 has quit [Ping timeout: 246 seconds]
swarley has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 245 seconds]
<thaostra> bnagy, To help give you an idea of what I am doing, I am porting one of my projects -- a download manager -- from Bash to Ruby. So far I have most of the functionality working and even appears to perform better in Ruby, but I have yet to find a good equivalent for wget. I could just run the command in-line, but that is platform-specific and would create a dependency.
cantonic has quit [Quit: cantonic]
butblack has quit [Quit: butblack]
goyox86 has joined #ruby
lurraca__ has quit [Quit: Leaving]
goyox86__ has joined #ruby
lggr has joined #ruby
goyox86_ has quit [Ping timeout: 246 seconds]
JohnBat26 has joined #ruby
macmartine has joined #ruby
linoj has quit [Quit: linoj]
goyox86 has quit [Ping timeout: 246 seconds]
g-ram has joined #ruby
hsbt is now known as hsbt_away
cantonic has joined #ruby
icole has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
tommyvyo has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
CannedCorn has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
horofox has quit [Quit: horofox]
Takehiro has joined #ruby
lggr has joined #ruby
cantonic has quit [Quit: cantonic]
kenneth has joined #ruby
cakehero has quit [Ping timeout: 256 seconds]
goyox86 has joined #ruby
goyox86_ has joined #ruby
goyox86 has quit [Read error: Connection reset by peer]
goyox8___ has joined #ruby
Takehiro has quit [Ping timeout: 252 seconds]
fungoat has quit [Quit: fungoat]
iamjarvo has quit [Ping timeout: 240 seconds]
cakehero has joined #ruby
goyox86__ has quit [Ping timeout: 260 seconds]
fungoat has joined #ruby
fungoat has quit [Client Quit]
CodeFriar has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 260 seconds]
goyox86_ has quit [Ping timeout: 260 seconds]
jgwong has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
mikepack has joined #ruby
CodeFriar has joined #ruby
Guest74235 has quit [Ping timeout: 260 seconds]
puppy is now known as thomas
Guest74235 has joined #ruby
ffranz1 has quit [Quit: Leaving]
goyox8___ has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
ryanlecompte has joined #ruby
burgestrand has quit [Ping timeout: 256 seconds]
Banistergalaxy has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
masteraka has joined #ruby
charliesome has joined #ruby
masteraka has left #ruby [#ruby]
ken_barber has quit [Remote host closed the connection]
lggr has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
d3vic3 has quit [Ping timeout: 255 seconds]
reset has quit [Ping timeout: 246 seconds]
d3vic3 has joined #ruby
noyb has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
fredjean has joined #ruby
Monie has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
bjhaid has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bluebie has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 256 seconds]
nat2610 has joined #ruby
<kenneth> hey so
<kenneth> with pry
ltsstar has joined #ruby
<kenneth> is there a way to re-require a file
<kenneth> re-load it from source
<Banistergalaxy> Kenneth load method
lggr has joined #ruby
<kenneth> Banistergalaxy: will it look in $:?
<Banistergalaxy> It's ruby not pry that provides that :)
<Banistergalaxy> No
tommyvyo has joined #ruby
justinlilly has quit [Quit: Peace.]
rubious has joined #ruby
<rking> kenneth: If you use pry's `edit` command, it will do that automatically.
<Banistergalaxy> True
<rking> Also `edit-method`
bjhaid has quit [Ping timeout: 255 seconds]
justinmcp has quit [Remote host closed the connection]
nat2610 has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Quit: Leaving.]
justinlilly has joined #ruby
<thaostra> I seemed to have found a fix with writing to directly to file. Unfortunately, when I stop and restart the download it overwrites the file. I have switched from open-uri to Net::HTTP which allows one to use headers to perhaps get partial downloads by using the range header like wget does, but I have little idea of how to implement that in code. Updated snippet: https://gist.github.com/4e01da8091ab2525a446
lggr has quit [Ping timeout: 252 seconds]
otters has quit [Ping timeout: 246 seconds]
monkegjinni has joined #ruby
lggr has joined #ruby
monkegjinni has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
Juul has joined #ruby
tommyvyo has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
justinlilly has quit [Quit: Peace.]
margle has joined #ruby
justinlilly has joined #ruby
Takehiro has joined #ruby
Fretta has quit [Quit: Fretta]
lggr has joined #ruby
dakine has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
codecop has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby
Solnse has joined #ruby
ttt has quit [Remote host closed the connection]
Takehiro has joined #ruby
ttt has joined #ruby
Forevernade has quit [Ping timeout: 246 seconds]
icole has joined #ruby
thecreators has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 252 seconds]
bluebie has quit [Ping timeout: 252 seconds]
rotev has joined #ruby
Juul has quit [Read error: Connection reset by peer]
aantix has joined #ruby
<mildfate> I have this regex: /'^\'\\\[^\n]\''/ which when implemented in my code matches "'\n\". But when I use it in rubular.com, it doesn't say there's a match between these. Why is there this discrepancy?
lggr has joined #ruby
icole has quit [Ping timeout: 244 seconds]
otters has joined #ruby
<Gate> mildfate: that doesn't match in my interpreter either. What version of ruby are you using?
<mildfate> I used both 1.8.7 and 1.9.3
<mildfate> matches in both
<mildfate> I don't get it
ananthakumaran has joined #ruby
<mildfate> this is the line of code: "charRE1 = Regexp.new('^\'\\\[^\n]\'')"
yoklov has quit [Quit: computer sleeping]
<Gate> mildfate: that regexp throws a warning in my code
<mildfate> Gate: Interesting, charRE1 = Regexp.new('^\'\\[^\n]\'') threw a warning in mine
<mildfate> (that's subtracting one slash)
<Gate> mildfate: I had the match string wrong.
<mildfate> Gate: Does it work with 3 forward slashes?
<Gate> mildfate: using regexp.new doesn't throw the warning, but // does
triptec has joined #ruby
<Gate> mildfate: so what string are you trying to match, exactly? "'\n\" is incomplete
<Gate> (its escaping the terminating quote)
<mildfate> I'm sorry, I mean: '\n'
justsee has joined #ruby
tomaw has quit [Ping timeout: 604 seconds]
justsee has quit [Changing host]
justsee has joined #ruby
ontoillogical has joined #ruby
<mildfate> It should match [singlequote][forwardslash][n][singlequote]
<Gate> mildfate: it might help if you used gist.github.com or pastebin to put up your exact code
Takehiro has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
lggr has quit [Ping timeout: 255 seconds]
aantix has quit [Quit: aantix]
josh^ has joined #ruby
<ontoillogical> Hey all, quick question --- I'm trying to read a file full of binary data as a string. In Python after doing string = file.read() I would get "\x00\x00\x00", in Ruby it's defaulting to Unicode so I get a string like "\u0000\u0000". How do I turn the UTF encoding off --- string.encoding("us-ascii") isn't working since I have non ascii bytes
Takehiro has joined #ruby
<Gate> ontoillogical: try file.binmode
lggr has joined #ruby
nat2610 has joined #ruby
<ontoillogical> Gate: thanks!
<Gate> that was probably a stupid suggestion
matrixise has joined #ruby
slicslak has quit [Ping timeout: 244 seconds]
xorgnak has joined #ruby
justinmcp has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
<Gate> mildfate: I'm coming up short. Neither one matches for me.
quazimodo has joined #ruby
<Gate> mildfate: how are you performing the match? "'\n'".match charRE1
<Gate> or something else?
uris has quit [Quit: leaving]
Gal3rielol has joined #ruby
<mildfate> Gate: char1 = line.match(charRE1).to_s()
xorgnak has quit [Remote host closed the connection]
<Gate> yeah, neither one matches, still
<mildfate> Gate: I'm using line = STDIN.gets
xorgnak has joined #ruby
<mildfate> and entering: '\n' manually
<mildfate> could that make a difference?
<Gate> yes
lggr has quit [Ping timeout: 256 seconds]
<Gate> that could very much make a difference
<Gate> that's the difference between the \n being interpreted as enline vs. just a string...
<Gate> trying again
<mildfate> Sorry, how does that make a diff?
answer_42 has joined #ruby
<Gate> mildfate: \n is a control character
macmartine has quit [Quit: Computer has gone to sleep.]
<Gate> so, if you were, in a ruby shell like I have been using, to type "\n" that would be a string ONE character long, containing an endline
<Gate> whereas if you type \n into a stdin gets it will be interpreted as two seperate characters (like typing "\\n" in the ruby shell)
<mildfate> Gate: But that's not what I type, I type: '\n'
lggr has joined #ruby
<Gate> ok, i'm getting the same results as you now
n_blownapart has joined #ruby
<Gate> mildfate: the difference is where you are typing it
<Gate> using STDIN.gets and typing in '\n' would give you the same string from a ruby shell as typing "'\\n'" in the ruby shell
<mildfate> Gate: So, assuming I have the string "'\n'" in a file
<mildfate> and I redirect it to my program which reads from stdin
<mildfate> which regex do I want to match said string?
thaostra has quit [Quit: Leaving]
xorgnak has quit [Remote host closed the connection]
<Gate> then ruby will get the literal. I'm still not sure about the third \ though
Solnse has quit [Ping timeout: 265 seconds]
eldariof has joined #ruby
xorgnak has joined #ruby
<Gate> mildfate: you have desended into string escape hell ;)
<mildfate> Gate: So for file redirection, matching '\n', I should use the 3 \ variant?
<Gate> mildfate: yes
<Gate> mildfate: it has to do with how you are building the regular expression (inside a single quoted string)
<mildfate> Gate: Do you have any ideas as to why the 3 slashes are needed?
<Gate> harRE1 = Regexp.new('^\'\\\[^\n]\'')
<Gate> => /^'\\[^\n]'/
<Gate> when Regexp compiles it, it compiles it down to two slashes
<mildfate> ...
<mildfate> what? why?
bluebie has joined #ruby
bluebie has quit [Changing host]
bluebie has joined #ruby
<Gate> I think because you are using a single quote string to build the regexp
cakehero has quit [Quit: Computer has gone to sleep.]
rippa has joined #ruby
<mildfate> Gate: Should I be using double-quote? (I'm very new at ruby and regex)
<Gate> mildfate: I personall would use just this: /^'\\[^\n]'/
<Gate> that is much easier to read and is perfectly identical to Regexp.new('^\'\\\[^\n]\'')
lggr has quit [Ping timeout: 245 seconds]
<Gate> mildfate: however, on a seperate note, I don't think that regular expression is exactly what you want
<mildfate> Gate: fuck yea that works with only 2 slashes
<mildfate> wth?
<mildfate> Gate: Why not?
xorgnak has quit [Remote host closed the connection]
<Gate> mildfate: because of [^\n]
<n_blownapart> hi what about a regex like this: re = /[a-c]{3}/ ...I'm a bit confused over what this will match. thanks
<Gate> that matches everything except an endline, which is not what I think you are trying to do
AlbireoX has quit [Remote host closed the connection]
<mildfate> Gate: It is
JonnieCache has joined #ruby
xorgnak has joined #ruby
<Gate> mildfate: OK, then ignore my last :)
AlbireoX has joined #ruby
<mildfate> Gate: Coolio, thanks for your help
<mildfate> Gate: I don't get why using quotes messed with the slashes, but moving to /'s solved it
<Gate> n_blownapart: that will match aaa, abc, bbb, etc. any combination of a, b and c three characters long
<Gate> mildfate: in ruby there are several ways to build strings
<n_blownapart> thanks Gate
jenrzzz has joined #ruby
<Gate> mildfate: using single quotes like 'abc' will IGNORE control sequences (like \n), whereas double quotes will interpret them
bluebie has quit [Ping timeout: 260 seconds]
<mildfate> Gate: Ah, ok
<mildfate> and what do /s do?
lggr has joined #ruby
<Gate> mildfate: those build a regular expression on the fly
<Gate> and they interpret it like it was a double quoted string
<Gate> Incidentally, that means you can use ruby string interpolation with them, which can make them really fun
<mildfate> Gate: so / and " are the same in terms of interpretation?
sj26 has quit [Quit: Rainbows!]
xorgnak has quit [Remote host closed the connection]
<Gate> mildfate: basically, yes.
AlbireoX has quit [Ping timeout: 246 seconds]
<n_blownapart> Gate I always wonder about single quotes should one just never use them?
<Gate> oh, they are very useful
<Gate> and if you are a performance nut they are slightly faster than double quoted strings.
rippa has quit [Ping timeout: 240 seconds]
xorgnak has joined #ruby
<Gate> Basically, I use single quoted strings whenever I need to have a lot of double quotes or other things that would force me to put a lot of \s in my code
kyb3r has quit []
jerius has joined #ruby
<n_blownapart> Gate: I need to review the differences. interpolation is very cool though. thanks will check it out.
<Gate> n_blownapart: Enjoy.
<n_blownapart> like the moniker too Gate
<Gate> :)
awestroke has joined #ruby
burgestrand has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
ojongerius has joined #ruby
lggr has joined #ruby
leehambley has joined #ruby
mahmoudimus has joined #ruby
<n_blownapart> Gate if you have time could you rephrase this or give an example? thanks: Basically, I use single quoted strings whenever I need to have a lot of double quotes or other things that would force me to put a lot of \s in my code
senny has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
baphled has quit [Ping timeout: 260 seconds]
samuel02 has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
Tearan has joined #ruby
arturaz_ has joined #ruby
n_blownapart has quit [Remote host closed the connection]
bartj3 has joined #ruby
leehambley has quit [Quit: leehambley]
Mon_Ouie has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
aganov has joined #ruby
Erfankam has joined #ruby
matrixise has quit [Ping timeout: 240 seconds]
dmiller has quit [Remote host closed the connection]
<mildfate> Is there a one line assignment for assigning the value to a variable if the value is not null, and assigning an empty object to the var if it is null
lggr has quit [Ping timeout: 256 seconds]
ryanlecompte has quit [Remote host closed the connection]
nigelb has joined #ruby
dlh has joined #ruby
xorgnak has quit [Remote host closed the connection]
falieson has joined #ruby
slicslak has joined #ruby
friskd has joined #ruby
dhruvasagar has joined #ruby
lggr has joined #ruby
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
xorgnak has quit [Remote host closed the connection]
dmiller has joined #ruby
dmiller has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 246 seconds]
samphippen has joined #ruby
<falieson> http://pastie.org/4895052 everything works, but not perfectly =)
maesbn has joined #ruby
<falieson> line 5 I'm grabbing a text string, but occasionally the text string contains a quote or apostrophe
Forevernade has joined #ruby
xorgnak has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<falieson> so in line 6 when i'm trying to find the matching row in the input table by the text string it doesn't find it
Gal3rielol has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<falieson> because of that apostrophe or quote
xorgnak has quit [Remote host closed the connection]
jgrevich has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
monkegjinni has joined #ruby
arturaz_ has quit [Remote host closed the connection]
elico has quit [Quit: Elico]
mikepack has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
dakine has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
dakine has quit [Client Quit]
noyb has quit [Ping timeout: 246 seconds]
xorgnak has joined #ruby
lggr has joined #ruby
Morkel has joined #ruby
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
<Gate> mildfate: yes. my_var = foo || ""
codeFiend has quit [Quit: codeFiend]
<Gate> mildfate: if foo is false or nil then my_var will be empty string
<Gate> mildfate: there is also my_var = foo.nil? ? '' : foo
<Gate> mildfate: which is the same, except it will only assign empty string if foo is nil
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
dlh has left #ruby [#ruby]
sspiff has joined #ruby
<mildfate> Gate: Thanks, I see the short-circuiting
maesbn has quit [Remote host closed the connection]
Rydefalk_ has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 256 seconds]
apok has joined #ruby
Norrin has quit [Ping timeout: 246 seconds]
Rydefalk has joined #ruby
jord has quit [Ping timeout: 246 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
xorgnak has quit [Remote host closed the connection]
gregorg_taf has quit [Changing host]
gregorg_taf has joined #ruby
gregorg_taf is now known as gregorg
xorgnak has joined #ruby
lggr has joined #ruby
piotr_ has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
xyntax has joined #ruby
Guest74235 has quit [Ping timeout: 260 seconds]
justsee has quit [Quit: Leaving...]
jord has joined #ruby
Takehiro has joined #ruby
Norrin has joined #ruby
leehambley has joined #ruby
justsee has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
eldariof has quit [Ping timeout: 240 seconds]
xorgnak has quit [Remote host closed the connection]
xorgnak has joined #ruby
justinmcp has quit [Remote host closed the connection]
_mak has joined #ruby
maesbn has joined #ruby
lggr has joined #ruby
friskd has quit [Quit: friskd]
xorgnak has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
jord has quit [Ping timeout: 240 seconds]
xorgnak has joined #ruby
jord has joined #ruby
falieson has left #ruby [#ruby]
slicslak has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 260 seconds]
zommi has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
justsee has quit [Quit: Leaving...]
pipopopo has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
xorgnak has quit [Ping timeout: 240 seconds]
dr_bob has joined #ruby
xorgnak has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
monkegji_ has joined #ruby
pskosinski has joined #ruby
dr_bob has quit [Client Quit]
BrianJ has quit [Quit: Computer has gone to sleep.]
xyntax has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
elico has joined #ruby
pipopopo has joined #ruby
kstephens has quit [Ping timeout: 264 seconds]
AndChat| has joined #ruby
lggr has joined #ruby
reset has joined #ruby
xorgnak has quit [Read error: No route to host]
Banistergalaxy has quit [Ping timeout: 244 seconds]
rpgsimmaster has quit []
Axsuul has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 260 seconds]
duracrisis has joined #ruby
duracrisis has quit [Changing host]
duracrisis has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
jgrevich has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
quazimodo has joined #ruby
codecop has quit [Remote host closed the connection]
duracrisis_ has joined #ruby
Hanmac has joined #ruby
duracrisis has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
lggr has joined #ruby
nat2610 has quit [Quit: Leaving.]
Elhu has joined #ruby
xorgnak has joined #ruby
samphippen has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
c0rn_ has joined #ruby
KevinSjoberg has joined #ruby
ontoillogical has quit [Ping timeout: 260 seconds]
jprovazn has joined #ruby
niklasb has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
rotev has quit [Ping timeout: 245 seconds]
maesbn has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
roadt has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
gabrielrotbart has quit [Remote host closed the connection]
maesbn has joined #ruby
jgrevich has quit [Quit: jgrevich]
samphippen has joined #ruby
monkegji_ has quit [Read error: No route to host]
g-ram has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 240 seconds]
sv has joined #ruby
sv is now known as Guest70131
Guest70131 has quit [Client Quit]
lggr has joined #ruby
monkegji_ has joined #ruby
skogis has joined #ruby
robustus has joined #ruby
tagrudev has joined #ruby
Eplemosen has joined #ruby
justsee has quit [Quit: Linkinus - http://linkinus.com]
Axsuul has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
justinmcp has joined #ruby
leehambley has quit [Quit: leehambley]
diegoviola has quit [Ping timeout: 244 seconds]
Eplemosen has quit [Read error: Connection reset by peer]
Eplemosen has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
jimeh has joined #ruby
mr_dynamix has joined #ruby
lggr has joined #ruby
Takehiro has joined #ruby
dr_bob has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
dr_bob has quit [Client Quit]
Eldariof-ru has joined #ruby
mahmoudimus has joined #ruby
awestroke has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 252 seconds]
dr_bob has joined #ruby
kstephens has joined #ruby
dr_bob has quit [Client Quit]
lggr has quit [Ping timeout: 256 seconds]
rotev has joined #ruby
dr_bob has joined #ruby
thaz has joined #ruby
elaptics`away is now known as elaptics
lggr has joined #ruby
indel has joined #ruby
maesbn has quit [Ping timeout: 246 seconds]
maesbn has joined #ruby
leehambley has joined #ruby
thaz has quit [Client Quit]
zigomir has joined #ruby
thaz has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
samphippen has joined #ruby
thaz has quit [Client Quit]
samuel02 has quit [Remote host closed the connection]
maesbn_ has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
berkes has joined #ruby
justinmcp has quit [Remote host closed the connection]
maesbn has quit [Read error: Connection reset by peer]
maesbn_ has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
slainer68 has joined #ruby
lggr has joined #ruby
slainer6_ has joined #ruby
chussenot has joined #ruby
chussenot has quit [Client Quit]
maesbn has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
limon7 has quit [Quit: limon7]
dangerousdave has joined #ruby
xorgnak has quit [Ping timeout: 260 seconds]
slainer68 has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
rubious has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 240 seconds]
<roadt> hi, rubygems-mirror is deprecated, i got ' Net::HTTPServiceUnavailable 503 Service Temporarily Unavailable readbody=false' after fetching rubygems.org/specs.4.8.gz (success).
<roadt> is rubygems-mirror deprecated?
duracrisis_ has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby
limon7 has joined #ruby
maesbn_ has joined #ruby
colinbm has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
Axsuul has quit [Remote host closed the connection]
lggr has joined #ruby
AndChat| has quit [Ping timeout: 246 seconds]
Vainoharhainen has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
tomaw_ has joined #ruby
maesbn_ has quit [Read error: Connection reset by peer]
maesbn has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
apok has quit [Ping timeout: 252 seconds]
GeekOnCoffee has quit [Ping timeout: 244 seconds]
cezar has joined #ruby
lggr has joined #ruby
Kruppe has quit [Ping timeout: 245 seconds]
thillux has joined #ruby
cezar has quit [Client Quit]
sepp2k has joined #ruby
Xeago has joined #ruby
monkegji_ has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
Hanmac has joined #ruby
Eplemosen has quit [Ping timeout: 256 seconds]
GeekOnCoffee has joined #ruby
<Xeago> kenneth: you could also use -> syntax for lamda/proc
<kenneth> Xeago: how so?
timmow has joined #ruby
<Xeago> it's in 1.9
lggr has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
jerius has joined #ruby
hakunin has quit [Remote host closed the connection]
notVert has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
beiter has joined #ruby
baphled has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
AndChat| has joined #ruby
Takehiro has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
maesbn has quit [Ping timeout: 240 seconds]
hakunin has quit [Ping timeout: 260 seconds]
Iszak has joined #ruby
zz_chrismcg is now known as chrismcg
nari_ has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
workmad3 has joined #ruby
chussenot has joined #ruby
maesbn has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
mengu has joined #ruby
AndChat| has quit [Ping timeout: 240 seconds]
Axsuul has joined #ruby
maesbn has joined #ruby
thaz has joined #ruby
dr_bob has quit [Read error: Connection reset by peer]
thaz has quit [Client Quit]
thaz has joined #ruby
thaz has quit [Client Quit]
manizzle has joined #ruby
daniel_- has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
maesbn_ has joined #ruby
maesbn has quit [Read error: Connection reset by peer]
lggr has joined #ruby
ryanf has quit [Quit: leaving]
roadt has quit [Ping timeout: 246 seconds]
Taranis has quit [Read error: Connection reset by peer]
Taranis has joined #ruby
tomaw_ is now known as tomaw
berserkr has joined #ruby
nataraj has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
matrixise has joined #ruby
Sou|cutter has quit [Quit: WeeChat 0.3.7]
lggr has joined #ruby
rakunHo has quit [Remote host closed the connection]
flovv has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
<nataraj> print Unidecoder.decode (string.to_s)
<nataraj> this works well on a transilterated unicode string
<nataraj> how to achieve the reverse?
Trioke has quit [Ping timeout: 248 seconds]
<nataraj> encode an 'ascii' string to transliterate to the local language font?
notVert has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<bnagy> I doubt you can
lggr has joined #ruby
dr_bob has joined #ruby
<Hanmac> nataraj on an good ruby, Strings has methods for that ... "UTF8".encode("ascii") and force_encoding("ascii")
arietis has joined #ruby
<bnagy> Hanmac: did you look at unidecoder?
<bnagy> it has nothing to do with encoding, really
<Hanmac> not yet ...
<nataraj> i did a transliteration in emacs and used as string
lggr has quit [Ping timeout: 246 seconds]
<nataraj> cant find 'malayalam-composable-pattern'
<nataraj> sorry
xorgnak has joined #ruby
<bnagy> nataraj: lossy transliteration from something -> ascii is possible, but the reverse is simply impossible in huge numbers of cases
<bnagy> because you can't reverse a lossy transformation
<bnagy> ['ü', 'u']-> 'u'
<bnagy> chinese is worse
<Hanmac> "its easy to piss in the ocean, but its hard to get the piss back"
<Xeago> what you can do is dictionary it
shiki has quit [Remote host closed the connection]
dwon has quit [Quit: Leaving]
lggr has joined #ruby
<Xeago> You'll have to transliterate the dictionary, and then use the entry that matches to get the original
<bnagy> won't work, same reason
<Xeago> bnagy: why won't it work?
<bnagy> well, won't work reliably
<Xeago> true
<Xeago> but it's best effort
<bnagy> because there are multiple word entries that will have the same transliteration
<bnagy> so you don't know which one to pick
<bnagy> chinese is again the pathological example
<Xeago> chinese is horrible ;p
<bnagy> or thai
mr_dynamix has quit [Quit: mr_dynamix]
<bnagy> in any case, it would have to be very language specific
<Xeago> dict/lang
<Hanmac> korean has funny looking chars :P they look like alien-language :D
<bnagy> whereas this unidecoder thing does some kind of a job for many languages
jenrzzz has quit [Ping timeout: 246 seconds]
<bnagy> Hanmac: actually korean would probably be one of the better ones
<bnagy> like, it's phoenetic, so with 'correct' transliteration it would probably reverse ok
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
<nataraj> mine is an Indian language, Malayalam
<Xeago> well, if it is only 1 language, dictionary might work
JonnieCa1he has joined #ruby
<Xeago> depends on the collisions you get
JonnieCa1he is now known as JonnieCache|work
<bnagy> nataraj: what's the script most like?
<bnagy> it might work OK, if you can drop the implied vowels
<Hanmac> bnagy korean language may look funny, but it sounds a bit "wrong" (i watched korean anime) ... japanise sounds better, but the language does not look so funny ...
<bnagy> like for devanagari you'd have to convert 'ma' to म which should be ok
lggr has quit [Ping timeout: 246 seconds]
<bnagy> as long as it's properly transliterated in the first place so ma and maa are different
<bnagy> this is assuming your script is in that family
Elico1 has joined #ruby
arturaz has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
lggr has joined #ruby
<clocKwize> I did a few weeks of chinese lessons.. the only thing I can remember is how to ask where the toilet is
<clocKwize> and the word for bar/pub
<clocKwize> which I guess means I can ask where the bar/pub is
LouisGB has joined #ruby
<nataraj> bnagy, emacs does a good transliteration, near perfect
<bnagy> backwards?
<nataraj> except for a few chars like 'in' 'ir' etc
<bnagy> find out what it uses and use that then :)
<nataraj> i select input-method as 'malayalam-itrans'
<nataraj> "/usr/share/emacs/24.2/lisp/language/indian.el.gz" defines the letters
hsbt is now known as hsbt_away
samphippen has quit [Quit: Computer has gone to sleep.]
<nataraj> anyway to map the unicode string a font?
lggr has quit [Ping timeout: 260 seconds]
Virunga has joined #ruby
lkba has joined #ruby
<nataraj> http://paste.org/54909, wonder if this is visible to others
leehambley has quit [Quit: leehambley]
xsdg has quit [Ping timeout: 246 seconds]
<nataraj> i wish type these in a ruby coded editor
<bnagy> nataraj: it's not a font thing
lggr has joined #ruby
dhruvasagar has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegji_ has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 260 seconds]
beiter has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
xsdg has joined #ruby
Erfankam has quit [Read error: Connection reset by peer]
prtksxna has joined #ruby
ZubKonst has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Erfankam has joined #ruby
levabalkin has joined #ruby
samphippen has joined #ruby
hsbt_away is now known as hsbt
ZubKonst_ has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
Gal3rielol has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
hsbt is now known as hsbt_away
Mon_Ouie has joined #ruby
SleepN0T has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
roadt has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Guedes_out is now known as Guedes
KevinSjoberg has joined #ruby
lggr has joined #ruby
Erfankam1 has joined #ruby
Erfankam has quit [Ping timeout: 246 seconds]
Criztian has joined #ruby
tvw has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
xorgnak has quit [Ping timeout: 246 seconds]
atmosx has joined #ruby
<dangerousdave> What does this do? @current_user = current_user_session && current_user_session.user
lggr has quit [Ping timeout: 255 seconds]
Russell^^ has joined #ruby
<dangerousdave> i don't understand the &&
<Muz> Runs "current_user_session", checks if a non-falsey return result appears. If it's falsey, returns the returned value. If it's non-falsey, runs current_user_session.user, and assigns the return value of that to @current_user
<Muz> So, if current_user_session isn't valid, it'd never run the second argument, preventing the raising of a horrible runtimeerror or exception.
rotev has quit [Ping timeout: 246 seconds]
bartj3 has quit []
lggr has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<dangerousdave> Muz: thanks, what is that construct called?
<Muz> Logical AND
DrWhax has joined #ruby
<Xeago> Muz: isn't it always a boolean?
<Muz> Xeago: it? Assuming you're referring to what I think you are; no.
<Muz> `1 && 2` returns a 2.
<Xeago> current_user
<Xeago> weird..
<Xeago> good to know tho
<dangerousdave> muz: thanks
awestroke has joined #ruby
<DrWhax> anyone has a resource for how to create ruby gems?
nw_ has quit [Quit: leaving]
<Muz> DrWhax: bundler can create the skeleton of a gem. `bundle gem gemname`.
fbernier has quit [Read error: Connection reset by peer]
<DrWhax> thanks
jokar has quit [Ping timeout: 245 seconds]
<Muz> You have asked a pretty vague question though, so it's hard to give you exactly what you need/want.
d3vic3 has quit [Quit: leaving]
lggr has quit [Ping timeout: 244 seconds]
mohits has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
colinbm has quit [Quit: colinbm]
jerius has quit [Quit: Computer has gone to sleep.]
<dangerousdave> Xeago: i think i was confused in the same way as Xeago as logical && works differently in other languages such as C++ http://msdn.microsoft.com/en-us/library/c6s3h5a7(v=vs.80).aspx
lggr has joined #ruby
<dangerousdave> Muz: ^
daniel_- has joined #ruby
<Muz> Ah yeah. Well, in ruby it's functionally equivalent, and it gives you the actual return value as opposed to a bool.
jblack has joined #ruby
<Muz> So you can do `if (something && something_else)` for flow logic.
margle has quit [Quit: Computer has gone to sleep.]
nw has joined #ruby
<dangerousdave> MUz: the advantage of a loosley typed launguage i guess
margle has joined #ruby
<Xeago> is the following in c++ allowed?
<Xeago> 5 > i > 15
<Xeago> if so, it is not like c++ but like java/c#
<Xeago> I know c allows such construct
josh^ has quit [Ping timeout: 246 seconds]
<dangerousdave> Xeago: i would have to try it, but i don't believe it is valid
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
awestroke has quit [Remote host closed the connection]
josh^ has joined #ruby
ph^ has joined #ruby
<matled> Xeago: seems to be valid and I bet it is the same as (5 > i) > 15.
<Xeago> yea
<matled> so it is more confusing than useful :)
mucker has joined #ruby
bartj3 has joined #ruby
<Xeago> well, it is more readable than i < 15 && 5 > i
<Hanmac> Xeago its valid in C++ but its not what you want ... when it works on java and C# then there is something very wrong with the language
<Xeago> or 5 > i && i > 15
lggr has joined #ruby
<matled> Xeago: (5 > i) > 15 is either 0 > 15 or 1 > 15
<matled> so it is always false
clocKwize has quit [Remote host closed the connection]
frogprince_mac has joined #ruby
<Xeago> matled: no?
colinbm has joined #ruby
flype has joined #ruby
<Hanmac> in ruby you could do: "i.between?(5,15)" or "5..15 === i"
<matled> Xeago: for which value of i should it be true?
<Xeago> 10 for example
<matled> so you have 5 > 10 > 15, 5 > 10 evaluates to 0, so you have 0 > 15, which evaluates to 0 as 0 is not larger than 15.
<lupine_85> s/wrong/different
<Xeago> I think I typo'd..
<Xeago> 5 < i < 15
<Xeago> >.<
shiki has joined #ruby
<matled> in this case it is always true
<lupine_85> you don't see me complaining that ! in ruby doesn't mean factorial
<matled> as 0 and 1 are both smaller than 15
awestroke has joined #ruby
awestroke has quit [Remote host closed the connection]
iamjarvo has joined #ruby
Peter-W has joined #ruby
awestroke has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
<Hanmac> Xeago: (5 < 10 < 15) returns true, but its a trap ... (5 < 16 < 15) returns true too
dr_bob has quit [Quit: Leaving.]
<Xeago> I swear to god I've seen it used in production lol
slainer6_ has quit [Remote host closed the connection]
<Hanmac> net me guess ... by java kiddies? :D
<Hanmac> let
beiter has joined #ruby
<Xeago> no, by bash a sysadmin needing something faster than bash
lggr has joined #ruby
<atmosx> I think, I'm gonna get something to eat!
<atmosx> I wanted you ppl to know.
verto|off is now known as verto
jerius has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
ph^ has quit [Remote host closed the connection]
jokar has joined #ruby
hsbt_away is now known as hsbt
frogprince_mac has quit [Quit: Leaving...]
samphippen has quit [Quit: Computer has gone to sleep.]
lanli has joined #ruby
awestroke has quit [Remote host closed the connection]
lggr has joined #ruby
dpk has joined #ruby
Asher has joined #ruby
mildfate has quit [Quit: Leaving.]
josh^ has quit [Remote host closed the connection]
Asher1 has joined #ruby
jcoglan has joined #ruby
<jcoglan> quick Q: what's a good library or stdlib thing for doing authenticated encryption?
Erfankam1 has quit [Quit: Leaving.]
Asher has quit [Disconnected by services]
Asher1 has quit [Client Quit]
<jcoglan> or just doing AES with CBC or CTR modes
Asher has joined #ruby
<Xeago> use openssh imo
dpk has quit [Quit: Ceci n'est pas une broken pipe.]
<jcoglan> is there a good intro to that? I know what I want to do in theory, but I don't know the openssl APIs to well
<Xeago> openssh!=openssl
<Xeago> how do you access your resource from the client?
<Xeago> over http?
<jcoglan> ah, thought you were referring to the OpenSSL module
lggr has quit [Ping timeout: 248 seconds]
<jcoglan> I'm looking to encrypt something using authenticated encryption
<jcoglan> been advised to use GCM, or one of the things SSL does, combining AES with HMAC
<Xeago> what is the transport?
<matti> ;-)
reset has quit [Quit: Leaving...]
GoogleGuy has quit [Ping timeout: 260 seconds]
<Xeago> or how does the client access the encrypted resource
<jcoglan> there's a couple places I want to apply this
robertotauille has joined #ruby
<jcoglan> one is generation of oauth tokens or sessions that self-contain data rather than just being identifiers
<Xeago> if it is over http, use ssl with whatever authentication scheme you want
<jcoglan> and the other is to encrypt a file I keep in dropbox
lggr has joined #ruby
<jcoglan> this is stuff I can't just delegate to the transport, it's within http, e.g. tokens, cookies
<Xeago> oauth usually works over http
<Xeago> cookies are from http
<jcoglan> oauth is delivered over https, but the token is exposed to the client, and must be protected from access and modification
<Xeago> jcoglan: the client can do whatever he wants with the token
<Xeago> if he modifies it, it is likely to get invalid
xyzodiac has joined #ruby
<Xeago> jcoglan: go to coursera, and do the course about encryption
<jcoglan> so, just getting away from http for a minute -- all I want to do is encrypt a blob of data, with an authenticated encryption scheme
<jcoglan> I did that course, is why I'm asking how to apply it in ruby :)
<Xeago> then you do not understand what went on in that course
<jcoglan> how do you mean?
nataraj has quit [Ping timeout: 248 seconds]
rippa has joined #ruby
<Xeago> do you know the difference between asymmetric and symmetric encryption?
JonnieCache|work has quit [Ping timeout: 240 seconds]
<jcoglan> yes
<matti> I do ;-)
<Xeago> then encrypt your block using whatever encryption algorithm you please, share a secret, whether shared secret or personal secret over https with the oauth access_token
<Xeago> s/block/blob
vlad_starkov has joined #ruby
<matti> ;-)
<jcoglan> in this case I need to do symmetric -- I'm talking about transferring information from the server to the client. I want the server to send a blob to the client that the client simply sends back later, e.g. a token or cookie value
<Xeago> than just use ssl + http authentication
<jcoglan> the client never gets to read or change the content, and the server is both the encryptor and decryptor of the messages
<Xeago> jcoglan: you cannot enforce that
prtksxna has quit [Remote host closed the connection]
<Xeago> if you transfer something to a client, he can do whatever he want
<jcoglan> I cannot enforce what?
<Xeago> s
<Xeago> you do not control the instructions on the client
lggr has quit [Ping timeout: 240 seconds]
<Xeago> jcoglan: base64 it, put it in a secure cookie
<Xeago> done
<jcoglan> that's what I'm trying to prevent -- if the value you give to the client is either signed or authentically encrypted, you can tell if the client changed it when it sends the value back to you
<Xeago> yes but even though you can tell that, you cannot prevent it
<Xeago> use a secure cookie
<Xeago> and encrypt the contents of that cookie however you want
<jcoglan> in the oauth case, I'm talking about a token that the client JavaScript has to read and store and send back itself, it's not something the browser handles for you
vitoravelino`afk is now known as vitoravelino
demet8 has joined #ruby
<Xeago> you absolutely have no idea what you want to do
<Xeago> therefore neither do I
levabalkin has quit [Quit: Page closed]
<jcoglan> in the case of cookies, even if you send them over a secure transport, the client can read them and send back a modified copy -- you need to be able to deny access if the cookie has been modified
prtksxna has joined #ruby
<Xeago> you really don't read what I am saying are you?
prtksxna has quit [Remote host closed the connection]
lggr has joined #ruby
<Xeago> encrypt the contents of the cookie, base64 that, put that in a secure cookie
<Xeago> if he changes it, it will render the contents invalid
<Xeago> unless cracked
<Xeago> and even than, it depends on whether the content is valid or not
<jcoglan> okay, so that's what I'm asking -- given I've decided I want encrypt the cookie with GCM, what are the ruby APIs for doing that?
<Xeago> GCM is more than just encryption
<Xeago> duckduckgo will have an answer
<jcoglan> it's authenticated encryption, right?
<Xeago> yes but you have not considered authentication yet
<Xeago> anyways, off for food
_bart has joined #ruby
leehambley has joined #ruby
Hamed-R has joined #ruby
yshh has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]
arietis has quit [Read error: Connection reset by peer]
<burgestrand> jcoglan: rails does this out of the box for session cookies. Perhaps you could find implementation ideas there.
<jcoglan> okay, great
<jcoglan> thanks!
horofox has joined #ruby
<jcoglan> does it default to the cookie store, or to server-side storage?
<burgestrand> jcoglan: cookie store as far as I am aware.
<_bart> how do I get all p tags that are 2 levels in using path on a nokogiri doc?
lggr has quit [Ping timeout: 256 seconds]
<burgestrand> jcoglan: uses a configuration named session_secret which is used to encrypt the cookie contents to prevent fiddling.
<_bart> I thought '//*/*/p' but I think that gets all the p tags at levels 3, 4, 5 and so on too
<burgestrand> Oh, maybe it’s named cookie_secret, not session_secret.
<jcoglan> right
<jcoglan> thanks for the tip :)
<_bart> Ah I think I only need to remove the first /
omry__ has joined #ruby
<Xeago> / wil see any subnode as a possible root node, and will in your case find everything
<Xeago> //*
<Xeago> iirc
lggr has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
flype has quit [Quit: Computer has gone to sleep.]
moshee has quit [Ping timeout: 240 seconds]
limon7 has quit [Quit: Leaving.]
d3vic3 has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
larissa has joined #ruby
samphippen has joined #ruby
kroniksenvy has joined #ruby
sspiff has quit [Remote host closed the connection]
<_bart> Xeago: but doing //li for example, does select any li, not only the li's at the level just below root.
sspiff has joined #ruby
sspiff has joined #ruby
<Xeago> it sees every node as a possible root, and then finds a li
berkes has quit [Quit: Ex-Chat]
<_bart> Xeago: how do I specify that the root is the first element?
<_bart> I mean, I want the root to be the real root if you know what I mean.
nataraj has joined #ruby
<Xeago> /
<Xeago> iirc
<_bart> also I found this //*[count(ancestor::*) = 2], is it possible to limit that to selecting only p, li and tr?
<_bart> oh
<Xeago> no idea, my xpath knowledge is 10 years old kinda
<_bart> you're right
<_bart> the / works
morozovmorg has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
morozovmorg has left #ruby [#ruby]
morozovmorg has joined #ruby
morozovmorg has left #ruby [#ruby]
morozovmorg has joined #ruby
morozovmorg has left #ruby [#ruby]
freeayu has joined #ruby
hekin has joined #ruby
jerius has quit [Quit: Computer has gone to sleep.]
margle has quit [Quit: Computer has gone to sleep.]
dpk has joined #ruby
morozovm has joined #ruby
lggr has joined #ruby
morozovm has left #ruby [#ruby]
nataraj has quit [Ping timeout: 246 seconds]
rotev has joined #ruby
morozovm has joined #ruby
morozovm has left #ruby [#ruby]
colinbm has quit [Quit: colinbm]
awestroke has joined #ruby
demet8 has quit [Quit: demet8]
justinmcp has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
morozovmdotorg has joined #ruby
awestroke has quit [Remote host closed the connection]
codefyre has joined #ruby
lggr has joined #ruby
mensvaga has joined #ruby
jerius has joined #ruby
cantonic has joined #ruby
d1zzYLuLz_ has quit [Remote host closed the connection]
Eldariof-ru is now known as eldariof
Jeff_D has joined #ruby
jerius has quit [Client Quit]
scx has joined #ruby
<Jeff_D> Anybody know of a decent or promising Wiki implementation in Ruby out there? Padrino, Sinatra, Rails, anything… looking for a local project note catcher and possible project to contribute to
<Xeago> gollum
haxrbyte has joined #ruby
SleepN0T has left #ruby [#ruby]
morozovmdotorg has left #ruby [#ruby]
<scx> i have ruby script in UTF-8; i want to execute shell command from it, but in other locale/encoding (latin-x, where x is [[:digit:]]); how to do that?
morozovm has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
mark_locklear has joined #ruby
fbernier has joined #ruby
haxrbyte has quit [Remote host closed the connection]
jhchabran has quit [Ping timeout: 255 seconds]
haxrbyte has joined #ruby
luckyruby has joined #ruby
geekbri has joined #ruby
<Jeff_D> Xeago: d'oh! should have remembered. Thanks :)
<Xeago> not sure if you want to git commit every thought you ever have tbh :)
<burgestrand> scx: you mean you need the command string to be in a latin encoding?
flype has joined #ruby
flype has quit [Client Quit]
lggr has joined #ruby
jhchabran has joined #ruby
williamherry has joined #ruby
<scx> burgestrand: yes, and i want to convert result from latin to utf-8
<burgestrand> scx: all ruby strings come with an #encode method that accepts the target encoding. Say "å".encode("ISO-8859-1")
<burgestrand> scx: it will allow you to convert from/to UTF-8 and your latin encodings
<Jeff_D> Xeago: Not really. My sweet spot would be something about on the complexity/functionality balance of Dokuwiki (PHP) that lets me poke around and learn from other people's Ruby code.
dhruvasa1ar has joined #ruby
<scx> when i execute command using "exec" or "system" i can't get results in ruby; when i use `command` i can't use custom string
<Jeff_D> ideally Padrino, since I'm learning that now, but I've been working on a commercial Rails project for over a year now, so that works, too. You'd think I'd have remembered Gollum
<scx> burgestrand: ^^
jerius has joined #ruby
dhruvasagar has quit [Quit: leaving]
<Xeago> Jeff_D: you want to do note taking, and hav eit synced through mobile devices?
dhruvasagar has joined #ruby
krawchyk has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<burgestrand> scx: you can do string interpolation inside `
<Jeff_D> Xeago: don't care so much about mobile; something I can run from my local Mac and have accessible on the LAN would work just fine
<burgestrand> scx: `your_script #{"some string".encode("ISO-8859-1")}`
<burgestrand> scx: be careful with shell escape characters, use Shellwords.escape from shellwords in stdlib
<burgestrand> Jeff_D: note taking? Have you looked at notational velocity?
<burgestrand> I mean, it’s not a wiki, but hey.
<Jeff_D> point. I haven't, I'll take a look at it. Thanks.
<Xeago> notational velocity is the one I was looking for
<Xeago> ty
lggr has joined #ruby
ndboost has quit [Remote host closed the connection]
<Jeff_D> Xeago: Need to head out now… back to the salt mines, to work with my trusty toothpick
dhruvasagar has quit [Client Quit]
Jeff_D has quit [Quit: JMP $]
dhruvasagar has joined #ruby
<burgestrand> It’s awfully useful. You don’t even need the tagging behaviour to boot, just write plaintext words and add a weird prefix to them and use that in the fulltext search, e.g. #ruby, #sinatra, #web.
invisime has joined #ruby
<scx> burgestrand: thx
frogprince_mac has joined #ruby
<burgestrand> scx: :)
<burgestrand> scx: keep in mind the output is *expected* to be in Encoding.default_external
otters has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Client Quit]
<burgestrand> scx: but it is in no way converted by default, so for the return value you’ll either need to change Encoding.default_external, or force the encoding of the output before you convert it back to UTF-8
<KevinSjoberg> I just created a gist for a little problem solving challenge? Anyone interested in submitting a solution in Ruby? :)
dhruvasagar has joined #ruby
<burgestrand> scx: `./some_script.rb #{"å".encode("ISO-8859-1")}`.force_encoding("ISO-8859-1").encode("UTF-8")
skaczor has joined #ruby
krz has quit [Quit: krz]
lggr has quit [Ping timeout: 245 seconds]
otters has joined #ruby
Spooner has joined #ruby
hekin has quit [Quit: hekin]
lggr has joined #ruby
joofsh has joined #ruby
hoelzro|away is now known as hoelzro
<Xeago> KevinSjoberg: that was a bit easy to figure out, you probably want a solution that works with every input right?
lggr has quit [Ping timeout: 240 seconds]
reisl has joined #ruby
<KevinSjoberg> Xeago: Impressive. The algorithm is the same for any string. But I started out easy. Is you that posted the first solution?
moshef has joined #ruby
<Xeago> no, but I figured it out in a snap
<Xeago> I know most of the ascii values
<moshef> how do I redirect to external URL with ruby?
<moshef> everything I search for is rails..
xyzodiac has joined #ruby
<Xeago> then you see the distinct 95 in there, prefixed by 115115
<KevinSjoberg> Xeago: Yeah, The solution posted isn't quite correct though. One character should be moved.
fortysixandtwo has joined #ruby
lggr has joined #ruby
<Xeago> KevinSjoberg: you should ask for a implementation that solves arbitrary numbers like that
<Xeago> not for a solution given a single problem
<KevinSjoberg> Xeago: I'll update the gist. That is a perfect idea.
larissa has quit [Ping timeout: 240 seconds]
<Xeago> also
<Xeago> uppercase?:)
morozovm has quit [Quit: morozovm]
morozovm has joined #ruby
hsbt is now known as hsbt_away
<KevinSjoberg> Xeago: The string may be lowercase or uppercase letters and underscore.
bartj3 has quit []
Elhu has joined #ruby
dakine has joined #ruby
<kaleido> objective c makes me want to gouge out my own eyes and boil them in salt water :(
morozovm has quit [Client Quit]
<kaleido> </random>
morozovm has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
colinbm has joined #ruby
sailias has joined #ruby
codefyre has quit [Quit: Leaving]
sailias has quit [Client Quit]
flype has joined #ruby
morozovm has quit [Client Quit]
morozovm has joined #ruby
sailias has joined #ruby
Appineer has joined #ruby
Appineer has left #ruby [#ruby]
A124 has quit [Quit: Leaving.]
A124 has joined #ruby
lggr has joined #ruby
iamjarvo has joined #ruby
<KevinSjoberg> Xeago: Gist, updated. Better? https://gist.github.com/3818527
<Xeago> Can you solve it? If the answer is yes, can you write => Write a program
<Xeago> don't ask if they can, tell them to
colinbm has quit [Quit: colinbm]
<Xeago> also, what do you mean by the note?
g-ram has joined #ruby
<Xeago> KevinSjoberg: shouldn't be too hard to write
tommyvyo_ has joined #ruby
<KevinSjoberg> Xeago: I removed the "can". I agree, it was unnecessary. I also removed the note.
JonnieCache|work has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<KevinSjoberg> Now I'm looking forward for solutions.
<Xeago> it still says "Can you solve it?"
lggr has quit [Ping timeout: 252 seconds]
lanli has quit [Quit: lanli]
sailias has quit [Quit: Leaving.]
<Spooner> KevinSjoberg : The most obvious difficulty is 99 not being 099. I assume it is a string, not a BigNum, by the way?
daniel_- has quit [Ping timeout: 240 seconds]
Elico1 has quit [Quit: Elico1]
daniel_- has joined #ruby
carlyle has joined #ruby
<KevinSjoberg> Xeago: I missed that part. Removed. Now it just tell the user to write a program that encrypt/decrypt.
deadalus has joined #ruby
colinbm has joined #ruby
<KevinSjoberg> Spooner: The numbers should all be integers and then converted.
lggr has joined #ruby
<Spooner> You mean they are [1, 1, 5, 1, 1, etc]? It really isn't clear what they actually are.
luckyruby has quit [Remote host closed the connection]
<Spooner> Or [115, 115, 95, etc] ?
<Spooner> Or "115115etc"
<KevinSjoberg> Spooner: That it part of the solving. First you have to determine what they actually are, when you have done that, the easy part is left.
<Spooner> No, I don't know what I'm _given_.
<Spooner> I'm not talking about working out what they represent. I need to know what the input is!
JustinCampbell has joined #ruby
carloslopes has joined #ruby
luckyruby has joined #ruby
<Spooner> Oh, 4th option: 1151159511610110199114 might be given as a BigNum.
<KevinSjoberg> Spooner: Oh, my bad. I'll make that more clear. The input to encrypt and decrypt should be a string.
bawer has joined #ruby
<Spooner> Yeah, that is what wasn't clear. Thanks.
dr_bob has joined #ruby
luckyruby has quit [Remote host closed the connection]
<KevinSjoberg> Spooner: Sorry about that. I just updated the gist.
GoGoGarrett has joined #ruby
<Spooner> Also, since I'm being picky, "letters" is terribly vague. I assume you mean A-Za-z, not all possible letters (e.g. ö). The example only uses a-z (and underscore, of course).
jerius has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xyzodiac has quit [Quit: Textual IRC Client: www.textualapp.com]
[Neurotic] has quit [Remote host closed the connection]
<Xeago> Spooner: limit it to ascii
lggr has quit [Ping timeout: 244 seconds]
xpen has joined #ruby
<Spooner> xeago Not my choice what the limitations of the problem are.
snearch has joined #ruby
<KevinSjoberg> Spooner: The limitation is ASCII characters a-zA-Z 0-9.
<Xeago> wops quoted the wrong guy
jeffreybaird has joined #ruby
slainer68 has joined #ruby
tnk1 has quit [Ping timeout: 252 seconds]
<KevinSjoberg> Spooner: I've also added the solution to the first example so now the order of the characters in the final output should be more clear.
lggr has joined #ruby
bluenemo has quit [Ping timeout: 240 seconds]
<Xeago> KevinSjoberg: I have no idea how you went from ss_teecr to s_ecrets
fixl has joined #ruby
<Spooner> Thanks! I like clear specifications. I'd also say "write a program to" is unclear. It should be "two methods, #encode and #decode that each take a string parameter". Why? Because you could be asking for a single method that first decides whether it is an encoded or decoded string. alternatively, it could be a CLI program...etc, etc, etc.
<KevinSjoberg> Spooner: Great feedback.
<KevinSjoberg> Xeago: There is some logic behind it :)
<Xeago> alright figured that out
codefyre has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<Spooner> KevinSjoberg : The current version now allows numbers and doesn't allow underscores! ;)
<Xeago> pop 0 or -1 from the string, but reverse this
<Spooner> The secret word wasn't s_ecrets it was ss_teecr
<KevinSjoberg> Spooner: Fixed, it slipped through.
<Spooner> That was Xeago saying s_ecrets!
fermion has joined #ruby
<Xeago> !
<KevinSjoberg> Spooner: The secret word is s_ecrets but before repositioned it is something else.
<Spooner> Xeago Oh no, you were correcting Kevin too. Sorry.
<KevinSjoberg> Brb.
<Xeago> wot?
<Xeago> I have no idea
lggr has quit [Ping timeout: 260 seconds]
<Xeago> to go from s_ecrets to ss_teecr is doable, reversing it is a bit harder
ffranz has joined #ruby
<Xeago> I guess you can just insert it at an index
<Xeago> toggling between i and length-i
beiter has quit [Quit: beiter]
gani has joined #ruby
_try4_ has joined #ruby
<Xeago> where length is the string in construction and i is 0 to the length of the ascii you computed
codefyre has quit [Quit: Leaving]
lggr has joined #ruby
mohits has quit [Read error: Connection reset by peer]
xpen has quit [Ping timeout: 240 seconds]
samphippen has joined #ruby
fmcgeough has joined #ruby
ndboost has joined #ruby
philcrissman has joined #ruby
Coolhand has joined #ruby
shiki has quit [Remote host closed the connection]
<matti> Hm, I do wonder how Bignum does it.
jrist is now known as jrist-afk
lggr has quit [Ping timeout: 240 seconds]
Gal3rielol has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
F1skr has joined #ruby
lggr has joined #ruby
asteve has joined #ruby
kpshek has joined #ruby
linoj has joined #ruby
theRoUS has joined #ruby
c0rn_ has quit []
Jay_Levitt has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
xclite has quit [Remote host closed the connection]
mohits has joined #ruby
asuka has quit [Ping timeout: 240 seconds]
<KevinSjoberg> Xeago: The repositioning is done by taking the string in characters of two. So "ss_teecr" becomes [['s', 's'], ['_', 't'], ['e','e'], ['c', 'r']] and then printing the first in each pair which is "s_ec" and then first in each pair reversed "rest", together "s_ecrets".
Kruppe has joined #ruby
<KevinSjoberg> "rest" should be "rets", a typo of mine.
asuka has joined #ruby
LBRapid has joined #ruby
<Xeago> that is easier :)
<KevinSjoberg> Xeago: :)
karakedi has joined #ruby
elaptics is now known as elaptics`away
S3kx has joined #ruby
S2kx has quit [Read error: Connection reset by peer]
lggr has joined #ruby
xiexie_11 has joined #ruby
fixl has quit [Remote host closed the connection]
tchebb has quit [Ping timeout: 264 seconds]
<KarlHungus> anyone know offhand what config option i set in bundle to override the value of --with-opt-dir= for all gem builds
daniel_- has quit [Ping timeout: 240 seconds]
philcrissman has quit [Remote host closed the connection]
asuka has quit [Ping timeout: 240 seconds]
_try4_ has left #ruby [#ruby]
philcrissman has joined #ruby
uris has joined #ruby
CodeFriar has quit [Quit: Leaving...]
asuka has joined #ruby
roelof has joined #ruby
roelof has quit [Client Quit]
Criztian has quit [Remote host closed the connection]
pygmael has joined #ruby
margle has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
asuka has quit [Ping timeout: 244 seconds]
justinmcp has quit [Remote host closed the connection]
asuka has joined #ruby
Knodi has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
jerius has joined #ruby
cakehero has joined #ruby
nwest has joined #ruby
Rad- has joined #ruby
sailias has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
pygmael has quit [Read error: Connection reset by peer]
joshman_ has joined #ruby
pygmael has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
jrist-afk is now known as jrist
Hanmac has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
sheenobu has joined #ruby
burgestrand has quit [Quit: Leaving.]
mark_locklear has quit [Remote host closed the connection]
ttt has quit [Remote host closed the connection]
gift has quit [Quit: it puts the packet in the socket or else it gets the close again]
gift has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
moshef has quit [Quit: moshef]
snearch has quit [Quit: Verlassend]
CodeFriar has joined #ruby
stopbit has joined #ruby
ltsstar has joined #ruby
internet_user has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
CarlB_the_great has joined #ruby
bbttxu has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
A124 has quit [Quit: reboot]
asobrasil has joined #ruby
lggr has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<sheenobu> I need some ruby and event machine guidance. paste is here: http://pastie.org/4897013
<sheenobu> The TLDR is probably: do I still need locks in an EventMachine where a process can't be started while another one is happening?
<sheenobu> This is ruby 1.8.7
aantix has joined #ruby
A124 has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
TommyBotten has quit [Ping timeout: 248 seconds]
Ankhers has joined #ruby
ttt has joined #ruby
teddy_ has joined #ruby
Knodi has quit [Quit: Knodi]
<teddy_> How would you go about if you need to save a searchable/filterable Date in your database but don't always supply the month and/or day?
ttt has quit [Remote host closed the connection]
lggr has joined #ruby
dhruvasa1ar has quit [Quit: leaving]
Hamed-R has quit [Quit: Leaving]
williamherry has quit [Quit: WeeChat 0.3.7]
awarner has joined #ruby
teddy_ has quit [Quit: leaving]
AlbireoX has joined #ruby
mahmoudimus has joined #ruby
Sou|cutter has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xclite has joined #ruby
hoelzro is now known as hoelzro|away
dhruvasagar has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 246 seconds]
mahmoudimus has quit [Client Quit]
samuel02 has joined #ruby
nateberkopec has joined #ruby
rabidpraxis has joined #ruby
gvz has joined #ruby
lggr has joined #ruby
mohits has quit [Ping timeout: 246 seconds]
mmitchell has joined #ruby
wallerdev has joined #ruby
jgarvey has joined #ruby
aquaranto has joined #ruby
atmosx has quit [Quit: WeeChat 0.3.8]
lggr has quit [Ping timeout: 252 seconds]
rotev has quit [Remote host closed the connection]
TommyBotten has joined #ruby
Hanmac has joined #ruby
My_Hearing has joined #ruby
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
lggr has joined #ruby
rpetepr has joined #ruby
piotr__ has joined #ruby
<rpetepr> hey im trying to install rails for a user on our server
piotr_ has quit [Ping timeout: 260 seconds]
<rpetepr> although everything works great with just gem install rails
<rpetepr> i want to make rails available system wide
<rpetepr> and also passenger for apache support
F1skr has quit [Quit: WeeChat 0.3.9]
und3f has joined #ruby
<rpetepr> but all gems are installed in current user home folder
<rpetepr> even for root
ananthakumaran has joined #ruby
kiela has quit [Ping timeout: 265 seconds]
Neomex has joined #ruby
<rpetepr> is there a way to force rubygem to install a gem system wide ?
<_bart> Is .xpath on nokogiri documents slower than .css?
<rpetepr> _bart: no
<Xeago> _bart: the harder and worse the syntax, the faster it is in general
<Xeago> unless you do brainfuck and similar
<Muz> Potentially, depending on your use case, and page structure.
<Xeago> rpetepr: gem install --system
scalone has joined #ruby
<_bart> I get all the nodes at a specific level (/*/*/* etc.)
scalone has quit [Client Quit]
<rpetepr> Xeago thanks..im gonna try it
luckyruby has joined #ruby
<Xeago> rpetepr: I think*
<rpetepr> Xeago it returns invalid option
aquarant_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
<_bart> I doubt that is even possible in css
krawchyk has quit [Ping timeout: 248 seconds]
<Xeago> _bart: * * * ?
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Xeago> e.g. only nodes that are 3 levels deep
lggr has quit [Ping timeout: 260 seconds]
<_bart> no, one * matches everything at any level
<rpetepr> Xeago would rvm help solve this problem ?
mohamad has joined #ruby
<Xeago> rpetepr: I am not an advocate of rvm, I think gem should be able to handle it by itself
mohamad has quit [Remote host closed the connection]
<Xeago> gem install --install-dir /usr/local/lib/ruby/gems/1.8
roadt has quit [Ping timeout: 246 seconds]
asuka has quit [Ping timeout: 260 seconds]
<Xeago> or your appropriate equivalent
samphippen has joined #ruby
keltor has joined #ruby
nochamani has joined #ruby
asuka has joined #ruby
aquaranto has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
scalone has joined #ruby
Jake232 has joined #ruby
dakine has quit [Quit: Leaving]
burgestrand has joined #ruby
jprovazn is now known as jprovazn_away
Russell^^ has quit [Quit: Russell^^]
scalone has quit []
lggr has quit [Ping timeout: 248 seconds]
JonnieCache|work has quit [Ping timeout: 248 seconds]
CodeFriar has quit [Quit: Leaving...]
burgestrand1 has joined #ruby
yshh has joined #ruby
nochamani has left #ruby [#ruby]
burgestrand has quit [Ping timeout: 256 seconds]
rumba has joined #ruby
Drewch has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
freeayu has quit [Remote host closed the connection]
mikepack has joined #ruby
theRoUS has quit [Ping timeout: 240 seconds]
Drewch has joined #ruby
macmartine has joined #ruby
flashuni has joined #ruby
reuf has joined #ruby
<emdub> anyone familiar with using a LogFormatter with Logger? i'd like to be able to use a LogFormatter to prepend the class name of the class that i'm in that makes the call to write a log line, but when using a LogFormatter all my class.name's are LogFormatter, not the calling class
lggr has quit [Ping timeout: 256 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
BadLarry has joined #ruby
jerius has joined #ruby
lggr has joined #ruby
juarlex has quit [Ping timeout: 245 seconds]
davidcelis has quit [Quit: K-Lined.]
davidcelis has joined #ruby
bawer has quit [Ping timeout: 248 seconds]
und3f has quit [Quit: Leaving.]
flashuni has quit [Remote host closed the connection]
flashuni has joined #ruby
tnk1 has joined #ruby
omry__ has quit [Ping timeout: 260 seconds]
anandhegde has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
sent-hil has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
CodeFriar has joined #ruby
kiela has joined #ruby
rippa has joined #ruby
roadt has joined #ruby
davidcelis has quit [Quit: K-Lined.]
monkegjinni has joined #ruby
lggr has joined #ruby
flype has joined #ruby
rpetepr has quit [Quit: Page closed]
ffranz has quit [Quit: Leaving]
daniel_- has joined #ruby
theRoUS has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
flashuni has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
maesbn_ has quit [Remote host closed the connection]
mengu has quit [Quit: Konversation terminated!]
tagrudev has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
burgestrand1 is now known as burgestrand
_mak has quit [Remote host closed the connection]
mosez has joined #ruby
dhruvasagar has joined #ruby
blazes816 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
lggr has joined #ruby
ttt has joined #ruby
reisl has quit [Quit: Leaving]
karakedi has quit [Ping timeout: 246 seconds]
mikepack has quit [Read error: Connection reset by peer]
bbttxu has quit [Quit: bbttxu]
ttt has quit [Ping timeout: 260 seconds]
philcrissman has quit [Remote host closed the connection]
mark_locklear has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 240 seconds]
bradleyprice has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
ffranz has joined #ruby
tvw has quit [Remote host closed the connection]
adaoraul has joined #ruby
DrShoggoth has joined #ruby
samphippen has joined #ruby
<shevy> guys
<shevy> we need a sexual revolution
lggr has joined #ruby
baroquebobcat has joined #ruby
awestroke has joined #ruby
adaoraul has quit [Client Quit]
Fretta has joined #ruby
elaptics`away is now known as elaptics
deryl has quit [Ping timeout: 245 seconds]
ltsstar has quit [Ping timeout: 256 seconds]
Targen has quit [Ping timeout: 260 seconds]
vjt has quit [Ping timeout: 272 seconds]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
philcrissman has joined #ruby
<Spooner> emdub : You need to generate a new logger for each class by using a mixin. Use something like the Logging module in the 2nd comment here: http://stackoverflow.com/questions/917566/ruby-share-logger-instance-among-module-classes
lggr has quit [Ping timeout: 260 seconds]
Synthead has joined #ruby
mikepack has joined #ruby
bbttxu has joined #ruby
lggr has joined #ruby
carlyle has quit [Remote host closed the connection]
Trioke has joined #ruby
parzorep has quit [Quit: parzorep]
<emdub> Spooner: ah interesting.. ill check that out, thansk
vjt has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<Spooner> emdub : I'm referring to the second version of Logging in that comment, of course. I've used similar before, but I can't find my code ;)
<emdub> gotcha
<scx> How to comment code which shouldn't be visible in RDoc?
gregorg_taf has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
dnstbr has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
frogprince_mac has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
Hanmac has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
xyzodiac has joined #ruby
nochamani has joined #ruby
<Spooner> scx Either make it protected or use :nodoc: - also consider using yard since it is the de-facto standard nowadays.
notVert has quit [Ping timeout: 252 seconds]
voodoofish430 has joined #ruby
lggr has joined #ruby
`gregorg` has joined #ruby
voodoofish430 has quit [Read error: Connection reset by peer]
senny has quit [Remote host closed the connection]
SegFaultAX|work has joined #ruby
<scx> Spooner: i want to create rdoc from source files, but except a few lines which are commented code (for exaple: #puts debug)
`gregorg` has quit [Read error: Connection reset by peer]
ndboost has left #ruby [#ruby]
ndboost has joined #ruby
<ndboost> anyone in here familiar with cucumber
<Gate> ndboost: yes
<Gate> ndboost: you may also try #cucumber
<ndboost> something noobish im sure
samphippen has quit [Quit: Computer has gone to sleep.]
gregorg_taf has quit [Ping timeout: 248 seconds]
voodoofish430 has joined #ruby
<ndboost> okay thanks ill add that to my channel list
<ndboost> gate: feel free to add your answer on SO instead of here .. that way you get rep
lggr has quit [Ping timeout: 260 seconds]
colinbm has quit [Quit: colinbm]
<Gate> ndboost: Not an answer, but I did comment
<Gate> GL
<ndboost> thanks
<ndboost> ill try that out
gani has quit [Quit: leaving..]
gregorg_taf has joined #ruby
rubious has joined #ruby
horofox has quit [Quit: horofox]
slicslak has joined #ruby
samphippen has joined #ruby
lggr has joined #ruby
ltsstar has joined #ruby
d3vic3 has quit [Quit: leaving]
jmorton_ has joined #ruby
gregorg_taf has quit [Ping timeout: 246 seconds]
nochamani has quit [Remote host closed the connection]
cbuxton has joined #ruby
matrixise has quit [Read error: Operation timed out]
tchebb has joined #ruby
eldariof has quit [Read error: Operation timed out]
nochamani has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
Iszak has quit [Quit: User has gone to sleep.]
lggr has quit [Ping timeout: 260 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
xyzodiac has quit [Ping timeout: 240 seconds]
gregorg_taf has joined #ruby
hakunin has joined #ruby
cbuxton has quit [Ping timeout: 255 seconds]
SegFaultAX|work has quit [Ping timeout: 260 seconds]
cbuxton has joined #ruby
deadalus has quit [Ping timeout: 260 seconds]
ryanlecompte has joined #ruby
lggr has joined #ruby
ltsstar has quit [Quit: ltsstar]
`gregorg` has joined #ruby
samphippen has joined #ruby
samphippen has quit [Client Quit]
jlebrech has joined #ruby
elsifaka has quit [Quit: Veloma e!]
gregorg_taf has quit [Ping timeout: 240 seconds]
<jlebrech> Person.stub(:obedience=>true);Person.make(:sandwich)
jblack has quit [Ping timeout: 256 seconds]
deadghost has quit [Ping timeout: 240 seconds]
gregorg_taf has joined #ruby
`gregorg` has quit [Ping timeout: 246 seconds]
aquarant_ has quit [Remote host closed the connection]
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 245 seconds]
<lectrick> shevy: 1) considering pole dancing is mainstream now, i thought that was a good sign of female archetype resolution ("angel" vs. "sex bomb"). 2) for everything else there's fetlife.com
<lectrick> shevy: (responding to your comment from 45 mins ago)
<shevy> ah
<shevy> wait what
jgrevich has joined #ruby
<shevy> female archetype resolution
<shevy> ???
<shevy> lectrick, I am a simple person... can you bring this down to my level of understanind?
<shevy> understanding
<lectrick> you know, how women kind of have to choose between being "good" and "bad" even though they're two sides of the same coin
<shevy> hmmm
sent-hil has quit [Remote host closed the connection]
<shevy> you mean those women that slap you after they kiss you passionately?
<lectrick> Schwing.
<Gate> I figured the comment was just meant to say that the tech world is a sausage-fest.
<lectrick> Gate: Well that too. What else is new lol? But hey there's this http://railsgirls.com/ Watch the drooling.
<shevy> Gate man I picture the tech world as a place filled with snipers and assassins
<lectrick> It's not just a sausagefest, it's often a misogynist sausagefest
<shevy> a bit like the game assassin's creed, but you never know who is an assassin and who is a real person...
<lectrick> shevy: i like your analogy
* shevy peers at lectrick suspiciously.
lggr has joined #ruby
<shevy> I think you are an assassin
Takehiro has joined #ruby
<lectrick> hahahaha
<Gate> lectrick: I wouldn't go to the extreme of mysogynist. Only the brogineers would qualify, I think
<shevy> lectrick I am a bit bored right now... I am going through old ruby code, and trying to look at places I can improve
<lectrick> well, since we're speaking in stereotypes... lol.
<Gate> techies do tend to latch on to archetypal views of people (especially women) but I've met mysogynists and most of us don't qualify
`gregorg` has quit [Ping timeout: 245 seconds]
<lectrick> shevy: some guy pointed to his new site today. i said what was it built in. he said CakePHP. I said that's like choosing masturbation over Sex on Rails.
carlyle has joined #ruby
<lectrick> /some sarcasm there, but not 10)%
cantonic_ has joined #ruby
<lectrick> 100% even
<lectrick> I am stuck on a horrendous deep bug in the middle of a Rails 3.1 codebase upgrade
<lectrick> I want a medal after I get this suite passing on 3.1
Hanmac has joined #ruby
zigomir has quit [Quit: Leaving]
<shevy> yeah I dont really understand why people still use php
<lectrick> Gate: Yes re: your opinion on techies.
<shevy> I think it is because of .php files and how quickly you can build something
<shevy> in Ruby, learning RoR is HUGE compared to that
<lectrick> That's good. Keeps all the riffraff out
<shevy> and using .cgi instead of .php really just sucks too ... :(
<shevy> I think it is a mistake
<shevy> the entry barrier should be as low as possible
<lectrick> I agree. I was being sarcastic again.
<shevy> I really like scripting languages
<shevy> if I could pick only between C and C++ perhaps I would have never started to write anything much at all
jerius has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
<shevy> lectrick, I am among the dumb people of the population :)
SegFaultAX|work has joined #ruby
<shevy> the HTML/CSS/Javascript guys (I hate javascript though...)
<lectrick> shevy: you mean the men? :)
<shevy> hmm
<shevy> kind of yeah
<shevy> well it depends
allanm has joined #ruby
<shevy> I think designers are quite balanced between women and men
<shevy> programmers though, tend to have much higher ratio in favour of men
<lectrick> it's all good as long as nobody stands in anyone's way
<shevy> it is strange too because in university, we here tend to have more women in %, and also more women who finish with a degree
<shevy> (for most courses)
<shevy> hehe
<shevy> lectrick, do you like your boss :)
<lectrick> yep
lggr has quit [Ping timeout: 260 seconds]
<Xeago> shevy: php is made for web, ruby is not
ZubKonst_ has joined #ruby
<Xeago> most tutorials for php start with html
<Xeago> for ruby they do not :)
<lectrick> it may be that more men enjoy being analytical. it isn't useful to stereotype since some women enjoy that too. maybe not a majority, but it doesn't matter. so I say just let everyone run down the road they want to
jlebrech has quit [Remote host closed the connection]
<Xeago> because php is for web, it is bad at everything, because the web is not a homepage it has changed too much
<shevy> yeah php is really usable pretty much only for web stuff
<shevy> 8 years ago I started writing a MUD in php
<Gate> We could always get a pure-erb web frameworkd out there, and firmly debase the entire ruby community ;)
<shevy> that SUCKED ...
<lectrick> there's plenty of room for women in tech, in fact dev teams are often sorely in need of some sensitivities that women are often better at (stereotype disclaimer)
dmiller has joined #ruby
<shevy> (in fairness though, I did not finish it in ruby either... it's so much work)
* Xeago used some php for sysadmin scripts a loong time ago
<arturaz> Gate, ever heard of mod_ruby?
juarlex has joined #ruby
<lectrick> php standing for "personal homepage" seems to indicate it's web-focused
<Gate> arturaz: as in the deprecated name for passenger, or something else?
lggr has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
<arturaz> Gate, as in http://modruby.net/en/
<Xeago> lectrick: php is designed for homepages from the 1995's
ZubKonst has quit [Ping timeout: 256 seconds]
<Xeago> or older
<Xeago> it has then been monkeypatched
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<lectrick> Pretty Horrible Programming
<blazes816> php doesn't stand for personal homepage
savage- has joined #ruby
<Xeago> blazes816: the initial acronym did
<lectrick> ^^
x0F_ is now known as x0F
<Gate> its a recursive backronym
nochamani has quit [Remote host closed the connection]
<Xeago> they changed it because it got too many negative critic
<lectrick> whatever guido says
<arturaz> bah. I wish ie & safari would die
My_Hearing has joined #ruby
My_Hearing has quit [Changing host]
My_Hearing has joined #ruby
<Xeago> atm it is php hypertext processor
<lectrick> arturaz: why safari? it's ok
davidcelis has joined #ruby
<Xeago> safari is ok arturaz, it follows standards
<blazes816> interesting. didn't realize they changed what their acronym stood for.
<blazes816> not surprising
prox|a has joined #ruby
<arturaz> lectrick, until you want to set a cross-domain cookie
<Xeago> arturaz: that is a security 'feature' :)
pigggie_ has joined #ruby
<arturaz> yeah
<arturaz> sure
tekmaster has joined #ruby
<arturaz> it still deserves to die
<lectrick> yeah it is
Morkel has quit [Quit: Morkel]
JJMalina has joined #ruby
<shevy> hmm
<Xeago> arturaz: try using lynx :)
<shevy> I hope that matz makes mruby super fast
AlbireoX`Laptop has joined #ruby
<lectrick> i still have no idea how twitter messaged all my contacts by clicking a link in a hacked tweet. I thought XSS protection is the standard these days
jaylevitt has joined #ruby
<lectrick> Cross domain cookies seem like a XSS security nightmare
<arturaz> cookies and xss?
fredjean_ has joined #ruby
karstensrage has quit [Quit: changing servers]
<Xeago> arturaz: yes, cookies and xss
<lectrick> yes, since any site you trigger a request to sends the cookies for that site along
<Xeago> or actually, CORS
<lectrick> including any auth cookies you have
SegFault1X has joined #ruby
<Xeago> arturaz: do you want a solution?
<Xeago> load a hidden iframe, inject javascript to set cookie, done
<lectrick> would an iframe work?
<lectrick> boom
<Xeago> that is the 'official' workaround
<Xeago> which is well documented since 2008
<Xeago> welcome to the web :)
ryanlecompte has quit [Read error: Connection reset by peer]
tekacs has quit [Ping timeout: 246 seconds]
fortysixandtwo has quit [Ping timeout: 246 seconds]
pigggie has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
SegFaultAX has quit [Ping timeout: 246 seconds]
piotr__ has quit [Ping timeout: 246 seconds]
roadt has quit [Ping timeout: 246 seconds]
fredjean has quit [Ping timeout: 246 seconds]
fbernier has quit [Ping timeout: 246 seconds]
Jay_Levitt has quit [Read error: Connection reset by peer]
tekmaster is now known as tekacs
tommyvyo_ has quit [Ping timeout: 246 seconds]
fredjean_ is now known as fredjean
piotr_ has joined #ruby
AlbireoX has quit [Read error: Connection reset by peer]
nateberkopec has quit [Read error: Connection reset by peer]
kenneth has quit [Ping timeout: 246 seconds]
zii has quit [Ping timeout: 246 seconds]
virtualentity has quit [Ping timeout: 246 seconds]
<lectrick> i knew it. and even that is gross.
tchebb has quit [Ping timeout: 246 seconds]
fortysixandtwo has joined #ruby
tommyvyo_ has joined #ruby
roadt has joined #ruby
Takehiro has quit [Remote host closed the connection]
<Xeago> lectrick: the other option is cors in header thing
<Xeago> safari follows the http standard here strictly
fbernier has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
karstensrage has joined #ruby
karstensrage is now known as Guest53275
tchebb has joined #ruby
nochamani has joined #ruby
Rad- has quit [Ping timeout: 260 seconds]
nochamani has quit [Remote host closed the connection]
dnstbr has quit [Quit: Computer has gone to sleep.]
Neomex has quit [Ping timeout: 240 seconds]
pfaff has quit [Ping timeout: 245 seconds]
morozovm has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
havenn has joined #ruby
lggr has joined #ruby
jerius has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sneakyness_wk has joined #ruby
Jake232 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
JJMalina has quit [Quit: Linkinus - http://linkinus.com]
ffkcd_ has joined #ruby
chrismcg is now known as zz_chrismcg
timmow has quit [Quit: is having a nap]
bbttxu has quit [Ping timeout: 248 seconds]
bluenemo has quit [Ping timeout: 256 seconds]
<_bart> how do I make sure that the parameter I pass to a method and is changed in the method, does not change the original variable?
morozovm has joined #ruby
My_Hearing is now known as Mon_Ouie
<xuser> wrong channel ;)
zcreative has joined #ruby
<Hanmac> _bart: par = par.dup
<_bart> Hanmac: thanks, and doing somemethod(original_var.dup)?
Vainoharhainen has quit [Quit: Leaving...]
Elhu has quit [Quit: Computer has gone to sleep.]
apok has joined #ruby
<zcreative> Anybody know a good resource to learn ruby?
<Hanmac> yeah
Kruppe has quit [Remote host closed the connection]
deadalus has joined #ruby
<ffkcd_> api + solving programming problem is a good way to start
<ffkcd_> atleast for me
lggr has quit [Ping timeout: 260 seconds]
codeFiend has joined #ruby
bricker has joined #ruby
iamjarvo has joined #ruby
pfaff has joined #ruby
<zcreative> Thanks.
gvz has quit [Quit: leaving]
alvaro_o has joined #ruby
colinbm has joined #ruby
elaptics is now known as elaptics`away
elaptics`away is now known as elaptics
apok has quit [Read error: Connection reset by peer]
apok has joined #ruby
notVert has joined #ruby
skryking has quit [Quit: Konversation terminated!]
lggr has joined #ruby
Kruppe has joined #ruby
bigmcq77 has quit [Quit: Computer has gone to sleep.]
bigmcq77 has joined #ruby
berserkr has quit [Quit: Leaving.]
shevy has quit [Ping timeout: 252 seconds]
<_bart> Hanmac: I'm very sure it doesn't work, the original value has still been changed
c0rn_ has joined #ruby
JonnieCache|work has joined #ruby
ffkcd_ has left #ruby [#ruby]
colinbm has quit [Quit: colinbm]
Meon has joined #ruby
punkrawkR has joined #ruby
<Hanmac> _bart what kind of type is your value?
fantazo has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
nat2610 has joined #ruby
Fretta has quit [Quit: Fretta]
skryking has joined #ruby
c0rn_ has quit [Client Quit]
`gregorg` has joined #ruby
<_bart> Hanmac: nokogiri document
lggr has quit [Ping timeout: 246 seconds]
<_bart> and somewhere in the method I do piece.xpath('//text()').remove
Monie has joined #ruby
sent-hil has joined #ruby
<_bart> and later on I notice that the text in the original value is also gone
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Hanmac> ah ... you could try this: you maybe need an deep-copy Marshal.load(Marshal.dump(obj))
c0rn_ has joined #ruby
mrsolo has joined #ruby
lggr has joined #ruby
sailias has quit [Quit: Leaving.]
hadees has quit [Quit: hadees]
ncr100 has joined #ruby
jarred has joined #ruby
deadghost has joined #ruby
tomaw_ has joined #ruby
slainer68 has quit [Remote host closed the connection]
aquaranto has joined #ruby
philcrissman has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 256 seconds]
Takehiro has joined #ruby
shevy has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
frogprince has quit [Ping timeout: 248 seconds]
ianbrandt has joined #ruby
ianbrandt has quit [Excess Flood]
apok has quit [Remote host closed the connection]
ianbrandt has joined #ruby
apok has joined #ruby
<Spooner> zcreative : Maybe a better resource: http://pine.fm/LearnToProgram/?Chapter=00 or http://www.ruby-doc.org/docs/ProgrammingRuby/ (latter if you are already a good programmer in other than Ruby).
<zcreative> Spooner: THanks
lggr has joined #ruby
<zcreative> Spooner: Coming from php
<Spooner> Though the latter is a bit out of date (at least the free online version is).
<Spooner> zcreative : Good PHP programmer is an oxymoron ;)
<zcreative> Why do you think im trying out ruby? :D
<_bart> Hanac: this drives me crazy: https://gist.github.com/ec7fc1f98fa5e11cc7d1
anandhegde has quit [Quit: Linkinus - http://linkinus.com]
<_bart> Hanmac*
Hanmac has quit [Remote host closed the connection]
<Spooner> zcreative : There are also #rails and #ror and #rubyonrails channels, since I assume you are leaping into Rails then (though look at Sinatra too, depending on your needs).
elaptics is now known as elaptics`away
<zcreative> yeah, im sitting in rubyonrails atm too.
GoGoGarrett has joined #ruby
Eplemosen has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
JonnieCache|work has quit [Ping timeout: 248 seconds]
ananthakumaran has quit [Quit: Leaving.]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
<_bart> Hanmac: any idea why it's not a deep copy? .dup should be a deep copy when using nokogiri.
daniel_- has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
frogprince has joined #ruby
daniel_- has quit [Client Quit]
<Spooner> _bart : Both dup and clone explicitly only create shallow copies.
w400z has joined #ruby
w400z has quit [Client Quit]
<_bart> Spooner: the docs says otherwise
<Spooner> Which docs?
<Spooner> Ruby or Nokogiri?
lggr has quit [Ping timeout: 245 seconds]
<_bart> dup(p1 = v1) Copy this Document. An optional depth may be passed in, but it defaults to a deep copy. 0 is a shallow copy, 1 is a deep copy.
<Spooner> OK, that isn't so good.
<_bart> but it doesn't work because when I try to do .dup(1) I get, 1 argument for 0 error.
<_bart> but I think they mean duplicate_node
<_bart> Spooner: because the source ('show source') doesn't match
<Spooner> That would tend to imply that you don't have a Document that you are trying to dup?
nat2610 has quit [Quit: Leaving.]
notVert has quit [Read error: Connection reset by peer]
<_bart> undefined method `duplicate_node' for #<Nokogiri::XML::Element :(
* Spooner shrugs.
<_bart> Spooner: but ::element == ::node and that one also has dup, "Copy this node. An optional depth may be passed in, but it defaults to a deep copy. 0 is a shallow copy, 1 is a deep copy."
<_bart> Spooner: I'm confused, why doesn't this work like they state.
<blazes816> _bart: what about something like my_clone = Nokogiri::HTML(other_doc.to_s)
nat2610 has joined #ruby
sebastorama has joined #ruby
<_bart> ugly code :(
lggr has joined #ruby
<blazes816> i guess go with the prettier, non working code
<Spooner> _bart : I dunno. Yeah, I'm with blazes816 on that ;)
<_bart> In my opinion marshalling is very ugly too
<_bart> I'll resort to regexping the non-html out..
<Xeago> lol
notVert has joined #ruby
<scx> how to do: sed -r -e 's/"/\\"/g; using gsub on string?
<Spooner> Because regexps are not ugly.
<_bart> :P
horofox has joined #ruby
<Spooner> scx str.gsub /'"/g, '\"'
<scx> Spooner: thx
<Spooner> Scx it isn't right though ;(
<Spooner> '"hello"'.gsub /"/, '\"' #=> "\\\"hello\\\""
sepp2k has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby
sepp2k has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
shadoi has joined #ruby
dmiller has quit [Remote host closed the connection]
cakehero has joined #ruby
beiter has joined #ruby
nat2610 has quit [Quit: Leaving.]
<_bart> blazes816: you were right :p
jgrevich_ has joined #ruby
<_bart> my suggestion to use regexp was a joke
lggr has joined #ruby
My_Hearing has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
<Spooner> The Gordian answer, _bart , would be to do what you need to do with the full Document, before cutting out the bits you want to.
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
roadt is now known as tmttt
horofox_ has joined #ruby
nat2610 has joined #ruby
baphled has joined #ruby
dpk has joined #ruby
Mon_Ouie has quit [Disconnected by services]
My_Hearing is now known as Mon_Ouie
leehambley has left #ruby [#ruby]
<horofox_> hi
horofox_ has quit [Client Quit]
sterNiX has joined #ruby
<Spooner> hihi
rafacv has joined #ruby
sent-hil has quit [Remote host closed the connection]
<arturaz> have any of you guys tried scala and/or play?
Virunga has quit [Remote host closed the connection]
supergiantrobot_ has quit [Quit: supergiantrobot_]
horofox has quit [Ping timeout: 252 seconds]
<matti> Guys. In C extension if you need associative array, would you rather write your own or use the one from Ruby?
Meon has quit [Quit: Leaving]
<Spooner> matti : Using a Ruby one is fine unless you are extremely time-critical.
lggr has quit [Ping timeout: 240 seconds]
<matti> Spooner: Indeed.
notVert has quit [Read error: Connection reset by peer]
codefyre has joined #ruby
<matti> Spooner: And its implementation is probably more solid to what I can do in C to get a simple functionality.
<Spooner> Absolutely.
deadalus has quit [Ping timeout: 244 seconds]
<matti> Spooner: Is there a linked-list somewhere to use for conveninece in Ruby already?
lynmone has joined #ruby
<Spooner> Interestingly, Symbol#to_proc uses a super simple hashing algorithm to store pre-made procs.
<matti> Spooner: Like, for instance kernel sources offer you solid implementation of stack, hash, linked-lists etc; for you to use.
lynmone is now known as Meon
keyvan has quit [Remote host closed the connection]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
yshh has quit [Remote host closed the connection]
<Spooner> I've not needed one. They might exist...
awarner has quit [Remote host closed the connection]
<matti> Hm.
<matti> ;]
lggr has joined #ruby
notVert has joined #ruby
eldariof has joined #ruby
samphippen has joined #ruby
samphippen has quit [Client Quit]
<Xeago> matti: might linking me to their implementation?
<Xeago> it's done in c right?
jimeh has quit [Read error: Connection reset by peer]
jimeh has joined #ruby
icole has joined #ruby
<Spooner> And thumbs down to writing your own when there is something like: http://developer.gnome.org/glib/2.28/glib-Hash-Tables.html
havenn has quit [Remote host closed the connection]
codefyre has quit [Quit: Leaving]
<Spooner> Although I'm one to talk for implementing stuff in extensions that I probably should have just wrapped :$
dakine has joined #ruby
mucker has quit [Ping timeout: 240 seconds]
philcrissman has joined #ruby
deadghost has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 260 seconds]
dpk has quit [Quit: Asleep at the keyboard.]
kpshek has quit []
havenn has joined #ruby
jenrzzz has joined #ruby
zcreative_ has joined #ruby
alek_b has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
alek_b has joined #ruby
lggr has joined #ruby
sent-hil has joined #ruby
zcreative has quit [Ping timeout: 245 seconds]
zcreative__ has joined #ruby
Hanmac has joined #ruby
morozovm has joined #ruby
<rafacv> guys, i'm using headless gem in my jenkins server and I'm getting false negatives because of a race condition when two jobs start their builds at same time and headless share the Xvfb instance with the same screen number
<rafacv> the first to finish terminates Xvfb and the other build fails
peneconleche has joined #ruby
parzorep has joined #ruby
<rafacv> the author is using a tempfile with pids to control concurrency and i believe it's not the best way to achieve that
zcreative_ has quit [Ping timeout: 245 seconds]
deadghost has joined #ruby
<rafacv> I looked into File#flock to control the access to the file when both jobs happen to try the same screen name, but I had no luck
cespare has quit [Quit: WeeChat 0.3.7]
<rafacv> do you guys know of any IPC technique or semaphores implementation in ruby?
griffindy has joined #ruby
<Spooner> rafacv : I think drb or eventmachine are perhaps better ways. Sure there are many other implementations in Ruby.
slicslak has quit [Ping timeout: 244 seconds]
<Spooner> But maybe I'm not understanding your use-case.
BMF has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 244 seconds]
Spooner has quit []
cespare has joined #ruby
DracoDan has left #ruby [#ruby]
<rafacv> I'd like to guarantee that no two ruby processes running independently tries to create/write the same file at the same time
Russell^^ has joined #ruby
<rafacv> Mutexes doesn't work here because they are for threads only
lggr has joined #ruby
pradeepto has quit [Quit: Coyote finally caught me]
tvw has joined #ruby
dpk has joined #ruby
dipnlik has joined #ruby
ltsstar has joined #ruby
jcoglan has quit [Ping timeout: 255 seconds]
dipnlik has quit [Client Quit]
dipnlik has joined #ruby
Trioke_ has joined #ruby
tmttt is now known as roadt
roadt is now known as tmttt
nochamani has joined #ruby
nochamani has quit [Remote host closed the connection]
hadees has joined #ruby
ForevernadeAFK has joined #ruby
dipnlik has left #ruby [#ruby]
Trioke has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
haxrbyte has quit [Ping timeout: 246 seconds]
bbttxu has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
Neomex has joined #ruby
Forevernade has quit [Ping timeout: 240 seconds]
beiter has quit [Quit: beiter]
Russell^^ has quit [Read error: Connection timed out]
hadees has quit [Ping timeout: 246 seconds]
jmorton_ has quit [Quit: jmorton_]
lggr has joined #ruby
dakine has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
jimeh has quit [Ping timeout: 245 seconds]
Targen has joined #ruby
<kenneth> hey, what's the best way of making a hash conform to a certain standard. say, i want to only keep certain keys, throw the rest away
craq has joined #ruby
Meon has quit [Quit: Leaving]
awestroke has quit [Remote host closed the connection]
Meon has joined #ruby
<kaleido> you could do something like myhash.each { |k,v| blahblahblah }
tyfighter has joined #ruby
<kaleido> and evaluate tht way
<kaleido> but im sure theres a better way
notVert has quit [Read error: Connection reset by peer]
deadghost has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 256 seconds]
<blazes816> myhash.select{|k,v| list_of_valid_keys.include? k}
<craq> any vancouver ruby people?
hadees has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
lggr has joined #ruby
slainer68 has joined #ruby
<keltor> i occationally use ruby
<keltor> and i occationally visit vancouver
<shevy> lol
<craq> lol
<shevy> what is special about vancouver
<kaleido> the women are easy
<keltor> It's an individual place in the world
<kaleido> and mostly attractive
<kaleido> ?
<craq> looking for someone local as i have a bunch of stuff i could use some help with.. and ya, what he said.
<keltor> (well two places actually)
<keltor> (and no the women, are well ... not really particularly attractive)
<shevy> hmmm
<kaleido> ok, the barely legal girls then
<keltor> I'm from one of the Vancouvers
<shevy> then I can stay home
peneconleche has quit [Read error: Connection reset by peer]
<shevy> no ruby, no good looking girls
<shevy> no thank you
<keltor> For north america, clearly Miami, Texas and California have got the women thing down pat
jimeh has joined #ruby
<shevy> Texas! isn't it like awfully hot there
<kaleido> only 3/4 of the year
<keltor> Texas, California, and NY obviously got the Ruby thing down
<keltor> It's occationally rather hot in Texas
jrist is now known as jrist-food
<keltor> but it's not really all that bad
<shevy> I am very unproductive when it is hot :(
<keltor> trust me visit Phoenix in August
<shevy> I could not sit in front of a computer for long
<kaleido> well, they have excellent air conditioning
<keltor> shevy: inside it's 68F
evilsushi has quit [Quit: Lost terminal]
<kaleido> indoors its always 72 degrees
Tiff has joined #ruby
<kaleido> what keltor said
dnstbr has joined #ruby
<keltor> actually indoors it was hotter when i was in PEI
<keltor> because noone had AC
craq has quit [Quit: craq]
awestroke has joined #ruby
jgwong has joined #ruby
Virunga has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
atmosx has joined #ruby
peneconleche has joined #ruby
<keltor> Is ther a good library for interacting with enterprise data
<keltor> like of the non XML sort
jrajav has joined #ruby
sailias has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
beiter has joined #ruby
<matti> Xeago: ?
<Xeago> ?
lggr has joined #ruby
<Xeago> jrajav: had any success with vagrant? they eat virtualbox-vm's for lunch
<jrajav> Haven't gotten to it
Sargun has quit [Ping timeout: 256 seconds]
<jrajav> It would take a stretch of free time while I'm at work, and that's been a bit scarce lately
<keltor> I followed the railscast of vagrant and then repeated it
jrist-food is now known as jrist
<Xeago> jrajav: if you dump the vm somewhere, do I have all the information i need to boot it and login to it?
<Xeago> ifso, host it somewhere
<Xeago> and I'll see what I can do
jeff_sebring has joined #ruby
Criztian has joined #ruby
<jrajav> Oka
<jrajav> I'll transfer it to my hdd, then I can set it up as a torrent at home
dpk has quit [Quit: Asleep at the keyboard.]
Takehiro has joined #ruby
JarJar has joined #ruby
zii has joined #ruby
arturaz has quit [Ping timeout: 240 seconds]
leifmadsen has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 255 seconds]
dpk has joined #ruby
Hanmac has quit [Remote host closed the connection]
xuser has left #ruby [#ruby]
jmorton_ has joined #ruby
jgwong has quit [Ping timeout: 244 seconds]
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
lggr has joined #ruby
Sargun has joined #ruby
indel has quit [Remote host closed the connection]
<matti> Xeago: This:
<matti> [19:53:47] < Xeago> matti: might linking me to their implementation?
deadghost has joined #ruby
ori-l has joined #ruby
<matti> Xeago: You mean Hash table in Ruby?
ori-l has left #ruby [#ruby]
dakine has joined #ruby
jgwong has joined #ruby
Tiff has quit [Quit: Leaving.]
Russell^^ has joined #ruby
Russell^^ has left #ruby [#ruby]
beiter has quit [Quit: beiter]
CarlB_the_great has quit [Remote host closed the connection]
elico has quit [Quit: elico]
bbttxu has quit [Ping timeout: 246 seconds]
carlyle has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 255 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
ncr100 has quit [Ping timeout: 255 seconds]
<keltor> has = {:key_1 => "value_1", :key_2 => "value_2", ...} - Old School
<keltor> hash = Hash[key_1, value_1, key_2, value_2, ...] - New School
<keltor> YAY
vlad_starkov has quit [Remote host closed the connection]
lggr has joined #ruby
swarley has joined #ruby
<blazes816> hash = key_1: "value_1", key_2: "value_2"
tmttt has quit [Remote host closed the connection]
Targen has joined #ruby
aldodelgado has joined #ruby
<keltor> I like hashes.sort {|a,b| a[1] <=> b[1]}.each{ |hash+ print hash[0],"\n" }
<keltor> or hashes.sort_by { |a, b| b }.each { |hash| puts hash[0] }
imami|afk is now known as banseljaj
dhruvasagar has quit [Ping timeout: 252 seconds]
<Xeago> matti: yes the c source you'd use when implementing c stuff for ruby
reuf has quit [Ping timeout: 240 seconds]
cearls has joined #ruby
jeff_sebring has quit [Quit: Leaving]
<swarley> README.EXT is #1
lggr has quit [Ping timeout: 240 seconds]
kirun has joined #ruby
workmad3 has joined #ruby
carlyle has joined #ruby
Markvilla has joined #ruby
Neomex has quit [Quit: Neomex]
jimeh has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
rubious has quit [Quit: Leaving...]
Guest61241 is now known as issyl0
SegFaultAX|work has quit [Ping timeout: 252 seconds]
slicslak has joined #ruby
JustinCampbell has joined #ruby
JustinCa_ has joined #ruby
JustinCampbell has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
margle has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 244 seconds]
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
margle has joined #ruby
jimeh has joined #ruby
CarlB_the_great has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
nateberkopec has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
iamjarvo has quit [Ping timeout: 256 seconds]
reset has joined #ruby
jonatha__ has joined #ruby
JustinCa_ is now known as JustinCampbell
lggr has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 246 seconds]
luckyruby has quit [Remote host closed the connection]
luckyruby has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
c0rn_ has joined #ruby
ryanf has joined #ruby
Hanmac has joined #ruby
jeff_sebring has joined #ruby
dnstbr has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
supergiantrobot_ has joined #ruby
Takehiro has quit [Remote host closed the connection]
dnstbr has joined #ruby
mmitchell has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
ph^ has joined #ruby
rubious has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
workmad3 has joined #ruby
SegFaultAX|work has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
pdtpatrick has joined #ruby
lggr has joined #ruby
arietis has joined #ruby
jonatha__ has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
linoj has quit [Quit: linoj]
Xeago has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ruby
monkegjinni has joined #ruby
peneconleche is now known as peneconleche|awa
deadalus has joined #ruby
deadalus has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 255 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
saschagehlich has joined #ruby
morozovm has left #ruby [#ruby]
lggr has joined #ruby
<Hanmac> shevy what do you think about swimming greenhouses? ... an greenhouse on a boat powerd by solar panels?
iamjarvo has joined #ruby
swistak35_ is now known as swistak35
DrShoggoth has joined #ruby
beneggett has joined #ruby
<blazes816> you'd have to load balance the light between the powering the boat and growing flowers
<shevy> Hanmac it is a good idea
<shevy> Hanmac one problem is - how will it be maintained?
dmiller has joined #ruby
xiexie_11 has quit [Ping timeout: 256 seconds]
* Hanmac thinks about automatation ...
Xeoncross has joined #ruby
<Hanmac> blazes816 i thought that the boat could also desalt water and use it to water th plants
supergiantrobot_ has quit [Quit: supergiantrobot_]
adamkittelson has quit [Remote host closed the connection]
<blazes816> nice, as long as your desalination works correctly
<blazes816> the last thing you want is salty plants
lggr has quit [Ping timeout: 248 seconds]
<swarley> Odd topic to say the least
<Hanmac> blazes816 i also thought about to use water from the Mediterranean Sea, desalt it and use it to water the sahara ...
margle has quit [Ping timeout: 240 seconds]
otters has quit [Ping timeout: 240 seconds]
<blazes816> but then your boat needs to be sand complient
<TTilus> wouldnt that cost like arms and legs?
<blazes816> ^ exactly
<blazes816> for sand compliancy at least
bricker is now known as rb-gems
rb-gems is now known as bricker
<Hanmac> you mean the earth to plant the plants on the boat?
margle has joined #ruby
lggr has joined #ruby
<Hanmac> fuck imagination, i had the image of an oil tanker filled with earth ...
<blazes816> no no no, so the boat can traverse the sahara whilst watering it
zodiak has joined #ruby
<ghost88> /j #\FRIends*foR*evEr\
<blazes816> oil doesn't need water, so this plan is sounding a bit better
jmorton_ has quit [Quit: jmorton_]
jimeh has quit [Ping timeout: 260 seconds]
thillux_ has joined #ruby
rubious has quit [Quit: Leaving...]
<Hanmac> the boat plan and the sahara plan are indipendent but it would be funny if they are combineable
rippa has quit [Ping timeout: 246 seconds]
bbttxu has joined #ruby
Takehiro has joined #ruby
conor_ireland has joined #ruby
_7894 has joined #ruby
thillux has quit [Ping timeout: 245 seconds]
* Hanmac is VERY crazy but if this makes the world better i think it is worth :D
aldodelgado has quit [Quit: aldodelgado]
lggr has quit [Ping timeout: 260 seconds]
Hanmac has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
Hanmac has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
linoj has joined #ruby
chico_chicote has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
swarley has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
ndboost has quit [Remote host closed the connection]
lggr has joined #ruby
sterNiX has quit [Ping timeout: 244 seconds]
LBRapid has quit [Quit: Farewell.]
thaostra has joined #ruby
ryanf has quit [Ping timeout: 246 seconds]
sterNiX has joined #ruby
ghost88 has quit [Quit: leaving]
jgwong_ has joined #ruby
sent-hil has quit [Remote host closed the connection]
Rad- has joined #ruby
<shevy> the boat plan would be easier
jgwong has quit [Read error: Connection reset by peer]
geekbri has quit [Remote host closed the connection]
rubious has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
Agis__ has joined #ruby
sent-hil has joined #ruby
<Agis__> I want to make something, do you have any ideas for good starter projects?
sterNiX has quit [Read error: Connection reset by peer]
kenneth has quit [Quit: kenneth]
<Agis__> or maybe not so "starter"
<rking> Bad news, guys, Ruby isn't a programming language: http://www.geekgumbo.com/2010/08/03/javascript-and-added-semicolons/
<rking> Or at least it wasn't as of 08/2012
Eplemosen has quit [Quit: NOPE]
<blazes816> great now i have to switch to typescript
<rking> s/12/10 # Dang I hate it when I'm sarcastic and screw up some detail
aantix has quit [Ping timeout: 260 seconds]
<rking> blazes816: Nope, that doesn't exist either. Only C, C++, C#, CSS, PHP, and Java
SegFaultAX|work has quit [Ping timeout: 260 seconds]
<blazes816> but let's get serious for a moment
<blazes816> that's fucking dumb as shit
peneconleche|awa has quit [Quit: Leaving...]
<rking> Yeah the blog post is a joke
rumba has quit [Quit: Page closed]
lggr has joined #ruby
GoGoGarrett has joined #ruby
ryanf has joined #ruby
Meon_ has joined #ruby
zcreative__ has quit [Quit: zcreative__]
Meon has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
workmad3 has joined #ruby
dmiller has quit [Remote host closed the connection]
adamkittelson has quit [Remote host closed the connection]
CarlB_the_great has quit [Remote host closed the connection]
whitenoise has joined #ruby
<whitenoise> hey guys, is there a support channel for the unicorn gem?
Kesava has joined #ruby
jenrzzz has joined #ruby
rubious has quit [Quit: Leaving...]
kenneth has joined #ruby
iamjarvo has quit [Ping timeout: 240 seconds]
daniel_- has joined #ruby
<atmosx> whitenoise: you can ask here, if someone knows and is *alive* he'll answer
lggr has quit [Ping timeout: 246 seconds]
fmcgeough has quit [Quit: fmcgeough]
CarlB_the_great has joined #ruby
TheSciz has joined #ruby
nagib has joined #ruby
mwilson` has quit [Excess Flood]
Kesava has quit [Client Quit]
Xeago has joined #ruby
mwilson` has joined #ruby
<whitenoise> well, i'm trying to serve a Sinatra app through the unicorn gem, also using Nginx.
lggr has joined #ruby
<whitenoise> I configured as multiple tutorials/unicorn website says
<whitenoise> yet the site is getting served really slowly, and then it hangs at a certain point and does not load any further.
<atmosx> whitenoise: karida.ath.cx <--- it's nginx + unicorn + sinatra (octopress) :-)
<whitenoise> was wondering if someone else has encountered this
<asteve> what character is ^A?
<TheSciz> what server are you running?
<atmosx> ah nope
<atmosx> works everything fine here
<atmosx> whitenoise: you're using system sockets?
<whitenoise> atmosx, yep
rubious has joined #ruby
<whitenoise> atmosx, unix sockets, and nginx and unicorn read from the same one, of course.
<atmosx> what system you on?
<whitenoise> and if i just do 'ruby app.rb'
<whitenoise> it runs great
<whitenoise> so I know it's somewhere in the unicorn or nginx configuration.
<whitenoise> atmosx, debian 6
rubious has quit [Client Quit]
<whitenoise> ruby-1.9.3-p194
<burgestrand> asteve: probably arrow up or something like that
<atmosx> I just run unicorn --listen /tmp/whate.sock -D and then bind nginx to the socket and it's okay...
<atmosx> reads the config.ru
samuel02 has quit [Remote host closed the connection]
<burgestrand> Ah no that is ^[[A.
<atmosx> whitenoise: same config here
<burgestrand> asteve: could be CTRL-A if you are reading some instructions somewhere.
Xeago has quit [Remote host closed the connection]
<whitenoise> atmosx, the listen/sock path is in the unicorn.conf
<whitenoise> nginx also binds to that same .sock file in /etc/nginx/nginx.conf
<whitenoise> you specify it again on command line?
<atmosx> whitenoise: I don't the unicorn.conf at all
<atmosx> whitenoise: trying to use it created issues, although it's pretty striaght-forward didn't work for me.
<whitenoise> atmosx, don't you need to use a unicorn.conf if you want to have it auto boot?
<atmosx> whitenoise: ah I didn't configure the server to autoboot, but I'm sure I don't need it.
JarJar has quit [Read error: Connection reset by peer]
ncr100 has joined #ruby
<whitenoise> atmosx, yeah. this is the staging server for the latest Logans Roadhouse server
<atmosx> you can work out an rvm-wrapper that rill execute the command and an nginx startup script that will wait for unicorn to run first...
<whitenoise> true, but unicorn.conf should be working..
JarJar has joined #ruby
<atmosx> I'm hungy, I'd work out some chicken
<atmosx> whitenoise: well, it should but my config is pretty simple/straight so no ugly hacks
<atmosx> I'm on FreeBSD
lggr has quit [Ping timeout: 252 seconds]
ph^ has quit [Remote host closed the connection]
<atmosx> anyway going to watch breaking bad s3, cya later
Hanmac has quit [Remote host closed the connection]
<whitenoise> atmosx, if nginx and unicorn are running as different users, will that jack it up?
ph^ has joined #ruby
<atmosx> whitenoise: no, in my case unicorn runs as a user (me) and nginx .. I think ... wait
<atmosx> nginx as nobody
<whitenoise> atmosx, if i do 'curl localhost' it works mostly, freezes at some point, then just drops.
<whitenoise> i'm thinking that's a hint as well
lggr has joined #ruby
<atmosx> whitenoise: r you using any firewall?
JonnieCache|work has joined #ruby
eldariof has quit []
<whitenoise> atmosx, nah
dakine has quit [Remote host closed the connection]
<whitenoise> atmosx, it's a cloud server off in rackspace. no firewall configured
Hanmac has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
<atmosx> ahm..
<atmosx> nginx is your only option?
<atmosx> you could try lighttpd to see if the problem is unicorn
awestroke has quit [Remote host closed the connection]
onibox has joined #ruby
dpk has joined #ruby
bigmcq77 has quit [Quit: Computer has gone to sleep.]
jenrzzz has quit [Ping timeout: 255 seconds]
awestroke has joined #ruby
onibox has quit [Client Quit]
robertotauille has quit [Quit: Leaving...]
jimeh has joined #ruby
Targen has quit [Ping timeout: 255 seconds]
bigmcq77 has joined #ruby
JarJar has left #ruby ["Leaving"]
lggr has quit [Ping timeout: 256 seconds]
macmartine has joined #ruby
Virunga has quit [Remote host closed the connection]
mark_locklear has quit [Remote host closed the connection]
linoj has quit [Ping timeout: 245 seconds]
philcrissman has quit [Remote host closed the connection]
GoGoGarrett has quit [Remote host closed the connection]
asteve has quit []
lggr has joined #ruby
JonnieCache|work has quit [Ping timeout: 240 seconds]
jimeh has quit [Quit: bye]
jmorton_ has joined #ruby
awestroke has quit [Remote host closed the connection]
mensvaga has quit [Remote host closed the connection]
monkegji_ has quit [Remote host closed the connection]
Takehiro has joined #ruby
nohonor has joined #ruby
Hanmac has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
chico_chicote has quit [Quit: Page closed]
ephemerian has joined #ruby
lggr has joined #ruby
Hanmac has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
carloslopes has quit [Quit: Leaving.]
devl has joined #ruby
robustus has quit [Quit: ZNC - http://znc.in]
workmad3 has quit [Quit: Lost terminal]
kpshek has joined #ruby
carlyle has quit [Remote host closed the connection]
SegFaultAX|work has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
cearls has quit [Remote host closed the connection]
margle has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
timonv has quit [Remote host closed the connection]
lggr has joined #ruby
baphled has quit [Ping timeout: 255 seconds]
jamjam has joined #ruby
sailias has quit [Quit: Leaving.]
reuf has joined #ruby
jrist is now known as jrist-dogwalk
bricker is now known as everyone
everyone is now known as bricker
answer_42 has quit [Quit: WeeChat 0.3.9]
Ysgard has joined #ruby
ropz has joined #ruby
sent-hil has quit [Read error: Connection reset by peer]
deadghost has quit [Ping timeout: 246 seconds]
sent-hil has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
baphled has joined #ruby
devl has left #ruby ["Konversation terminated!"]
SegFaultAX|work has quit [Ping timeout: 244 seconds]
whitenoise has quit [Quit: Leaving]
tommyvyo has joined #ruby
My_Hearing has joined #ruby
sent-hil has quit [Remote host closed the connection]
<Agis__> how can I get the array index that I'm at inside an each loop?
h4mz1d has joined #ruby
lggr has joined #ruby
Kuhni has joined #ruby
fermion has quit [Quit: P]
<Kuhni> Hello mighty wizards of the Ruby language
<Kuhni> Anyone here interested in helping me out with a script for RPGMaker (they're written in Ruby RGSS3)?
Mon_Ouie has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
<shevy> guys
<shevy> I write a log file right now
<shevy> problem is, my "app", can be spawned several times, so right now it overwrites the earlier log file
iamjarvo has joined #ruby
<shevy> any suggestion how to manage log files? my current idea is to make use of the PID of the ruby program ... and somehow store it that way
<blazes816> you're instincts are good
<blazes816> I'd do something like my_app_name.log.#{pid}
<blazes816> or my_app_name.#{pid}.log
sent-hil has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
hadees has quit [Quit: hadees]
joshman_ has quit [Ping timeout: 260 seconds]
joeycarm_ has quit [Remote host closed the connection]
joeycarmello has joined #ruby
<Agis__> any ideas what's wrong with this code? http://pastie.org/4899122
bapa has quit [Ping timeout: 260 seconds]
<Agis__> I get an test.rb:7:in `[]': no implicit conversion from nil to integer (TypeError)
lggr has joined #ruby
<blazes816> Agis__: you need each_with_index
<blazes816> not each
Ace- has joined #ruby
Rad- has quit [Quit: Leaving]
dmiller has joined #ruby
TheSciz has quit []
<Ace-> hi
<Agis__> oh yeah
<blazes816> hello
Ace- has quit [Client Quit]
<Agis__> thx
<blazes816> np
Rad- has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
eldios has joined #ruby
codeFiend has quit [Quit: codeFiend]
beiter has joined #ruby
beiter has quit [Client Quit]
chrishunt has joined #ruby
Criztian has quit [Remote host closed the connection]
thaostra has quit [Quit: Leaving]
eldios has left #ruby [#ruby]
jrajav has quit []
sebastorama has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 248 seconds]
invisime has quit [Quit: Leaving.]
justinmcp has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
_nitti has joined #ruby
justinmcp has quit [Remote host closed the connection]
bapa has joined #ruby
deadghost has joined #ruby
carlyle has joined #ruby
lggr has joined #ruby
cakehero has joined #ruby
ForevernadeAFK is now known as Forevernade
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
leehambley has joined #ruby
<leehambley> I wonder if someone can help me, i'm trying to make a call to find something in MongoDB, they don't have a blocking call (lame.) so I have to try and recreate those semantics myself, I've been trying with an "until result = mongo.find(......)", i've tried all sorts of wizardry with Timeout#timeout and Thread.pass,e tc
bbttxu has quit [Quit: bbttxu]
Ankhers has quit [Remote host closed the connection]
jrist-dogwalk is now known as jrist
lggr has quit [Ping timeout: 260 seconds]
Enchilada has joined #ruby
<Enchilada> Is Ruby a good replacement for sed/awk?
* Hanmac says maybe
<Enchilada> I don't have time to learn everything under the sun.
<Enchilada> hmm ok
jgarvey has quit [Quit: Leaving]
<leehambley> Enchilada: in some cases, it can be - but more often than not it's a terribly *slow* substitute
carlyle has quit [Ping timeout: 245 seconds]
<leehambley> but the answer is "it depends"
<Enchilada> ok
sepp2k has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 246 seconds]
<Hanmac> Enchilada learning ruby is good, you can do mostly everything you could in other languages ... you could even make 3D-Games in ruby
jrist is now known as jrist-bbl
<Enchilada> heh
lggr has joined #ruby
thone has joined #ruby
Meon__ has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
daniel_- has quit [Ping timeout: 240 seconds]
jmorton_ has quit [Quit: jmorton_]
Ysgard has quit [Quit: Leaving]
hadees has joined #ruby
bassclef has joined #ruby
bapa has quit [Ping timeout: 256 seconds]
pygmael has quit [Quit: pygmael]
Guedes0 has joined #ruby
saschagehlich has quit [Ping timeout: 255 seconds]
_nitti has quit [Remote host closed the connection]
<bassclef> anyone have any idea when i use json gem i get the follow error /Users/fluffheadsr/.rvm/gems/ruby-1.9.3-p125/gems/json-1.7.5/lib/json/ext/parser.bundle: undefined class/module Encoding (ArgumentError)?
Meon_ has quit [Ping timeout: 260 seconds]
jmorton_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
<pdtpatrick> bassclef: maybe post the full error along with how you are trying to use it. Someone might be able to better that way.
<bassclef> pdt yep one sec
alanp has joined #ruby
alanp has quit [Read error: Connection reset by peer]
ZubKonst_ has quit [Remote host closed the connection]
ltsstar has quit [Quit: ltsstar]
alanp has joined #ruby
lggr has joined #ruby
Ysgard has joined #ruby
Takehiro has joined #ruby
Ysgard has quit [Client Quit]
atmosx has left #ruby ["WeeChat 0.3.8"]
stopbit has quit [Quit: Leaving]
CarlB_the_great has quit [Remote host closed the connection]
alanp_ has quit [Ping timeout: 256 seconds]
bricker has quit [Ping timeout: 246 seconds]
jmorton_ has quit [Quit: jmorton_]
daniel_- has joined #ruby
internet_user has quit [Remote host closed the connection]
Spooner has joined #ruby
<bassclef> ohh
<bassclef> i think i know
<bassclef> lol
deryl has joined #ruby
jamjam has quit [Ping timeout: 256 seconds]
<bassclef> maybe?
<bassclef> one sec
[Neurotic] has joined #ruby
rtl_ has quit [Ping timeout: 240 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
bradleyprice has quit [Remote host closed the connection]
<bassclef> figured it out ><
<bassclef> forgot i'm on my macbook pro
<bassclef> and using rvm
<bassclef> !#/usr/bin/ruby is wrong
lggr has quit [Ping timeout: 260 seconds]
<pdtpatrick> #!/usr/bin/env ruby :)
BMF has quit [Remote host closed the connection]
otters has joined #ruby
<bassclef> ya ya thanks :)
havenn has joined #ruby
ltsstar has joined #ruby
sailias has joined #ruby
Rad- has quit [Read error: Connection reset by peer]
lggr has joined #ruby
bapa has joined #ruby
ltsstar has quit [Client Quit]
cbuxton has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
falieson has joined #ruby
<falieson> do you see a loop in here somewhere? I only have 300 rows and its been going for a few minutes now -> http://pastie.org/4899261
tommyvyo has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
arietis has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
shadoi has quit [Quit: Leaving.]
bbttxu has joined #ruby
DrShoggoth has quit [Quit: Leaving]
lggr has quit [Ping timeout: 240 seconds]
<pdtpatrick> is i always greater than 0 ?
<falieson> is what always greater than 0 ?
<falieson> it's taking about 20s per row
<falieson> but its going
sailias has quit [Quit: Leaving.]
dangerousdave has quit [Quit: Leaving...]
<falieson> completed 43 out of 280 rows….
jeffreybaird has quit [Quit: jeffreybaird]
<falieson> running localhost, i'm just dumbfounded right now
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
* falieson laughs
lggr has joined #ruby
<pdtpatrick> maybe run some profiling and see what's the hold up.
<falieson> profiling? like peppering some puts
<falieson> ?
<falieson> the only thing its doing is that right_join. I'm just surprised that a join statement is so intensive
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
<falieson> then again… the join statement is matching two text-fields
<falieson> so think that's it?
Dreamer3 has quit [Quit: Computer has gone to sleep.]
<Spooner> pdtpatrick : We don't usually manually loop like that with while and i -= 1. Instead: i.downto(1) do |i|...end
<pdtpatrick> ?
<bassclef> anyone have any idea why this is telling me that my api has moved to a new URL, i'm pretty sure my code points to that URL correct? https://gist.github.com/3823722
rtl has joined #ruby
tvw has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 240 seconds]
<pdtpatrick> sounds like it is saying -- whatever site you're hitting has moved "300" error.
uris_ has joined #ruby
tvw has joined #ruby
bapa has quit [Ping timeout: 255 seconds]
nat2610 has quit [Quit: Leaving.]
<pdtpatrick> Spooner: I didn't ask a looping question. I think you were referring to falieson
dnstbr has quit [Quit: Computer has gone to sleep.]
<Spooner> Oh, I'm sorry. You are right. Comment about "while" was at falieson
<bassclef> no its giving me a 301 redirect pdt, or were you talking to someone else?
chrishunt has quit [Ping timeout: 246 seconds]
<pdtpatrick> bassclef: what's the full site you are trying to hit? im only seeing three octets up there. Is there a fourth ?
nat2610 has joined #ruby
kpshek has quit []
uris has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
justinmcp has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
scx has quit [Ping timeout: 245 seconds]
mmitchell has joined #ruby
Dreamer3 has joined #ruby
swarley has joined #ruby
rubious has joined #ruby
havenn has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
mmitchel_ has joined #ruby
<bassclef> yea
<bassclef> i just didnt wanna post my ip's to the world
<bassclef> the api is there
<bassclef> i got past that i think
<bassclef> i'm getting a 400 bad request back now
<bassclef> so that's abetter result :)
lggr has quit [Ping timeout: 260 seconds]
conor_ireland has quit [Quit: conor_ireland]
<pdtpatrick> cool deal :)
mmitchell has quit [Ping timeout: 248 seconds]
<bassclef> a little unsure how to format json in ruby
ncr100 has quit [Ping timeout: 256 seconds]
conor_ireland has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
bzprod has joined #ruby
lggr has joined #ruby
mmitchel_ has quit [Ping timeout: 260 seconds]
Hanmac has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
kirun has quit [Quit: Client exiting]
F1skr has joined #ruby
<falieson> Spooner: thanks, i'll look into that
sailias has joined #ruby
davidcelis has quit [Quit: K-Lined.]
<Spooner> bassclef : Format json in Ruby?
<bassclef> something like that
<Spooner> As it uses there, you just #to_json it ;)
lggr has quit [Ping timeout: 248 seconds]
<Synthead> with optionparser, if I set an option as --thislongoption, but run my script as --thislongoptio, it doesn't fail with OptionParser::InvalidOption. Why?
<bassclef> spooner
<bassclef> yes, but i'm unsure how to have 2 values in one section, they don't show an example
tvw has quit [Read error: Connection reset by peer]
<Spooner> Two values?
<bassclef> like "params" => "users" => @user,"password" => @pass
<bassclef> think i got it though
bzprod has quit [Quit: Leaving...]
scx has joined #ruby
aquaranto has quit [Remote host closed the connection]
<Spooner> Oh, you mean nesting your hashes. h = {"a" => { "b" => { "c" => "d"}}} would be valid (and h["a"]["b"]["c"] == "d" in this case).
<bassclef> yes
<bassclef> thanks
lggr has joined #ruby
chrishunt has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
shadoi has joined #ruby
ckrailo has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
uris_ has quit [Quit: leaving]
<falieson> Spooner: "we usually do i.downto(1) do |i| … end , is there something on ruby's end that it would process that significantly faster than the current way? like i said its taking 20s+ to do each row… and its only 280 rows
uris has joined #ruby
sailias has quit [Quit: Leaving.]
<Spooner> falieson : It isn't a speed thing, but a style thing.
lggr has joined #ruby
<falieson> haha, well I suppose I'll get more stylish as I go
<Spooner> You do seem to be making a lot of database requests in the loop. They will take 99.99999% of the processing time.
<falieson> its interesting you were just talking about hash tags
bier has quit [Ping timeout: 248 seconds]
dmiller has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
chrxn has joined #ruby
nightfalcon has joined #ruby
<falieson> I have a conditional matrix with 48 possibilities and I'm afraid that I have to right an if then statement for each one
<falieson> *to write an
<chrxn> You have that right.
<falieson> lol
mxweas has joined #ruby
<falieson> it seems like there should be a better way to do it...
<Spooner> falieson : You almost definitely don't need to use a 48-condition if/else unless something is very wrong.
<chrxn> You may choose to exercise it, if you dare.
<falieson> haha
elux has joined #ruby
sheenobu has left #ruby [#ruby]
Foxandxss has joined #ruby
Xeago has quit [Remote host closed the connection]
<chrxn> A conditional matrix, huh?
Takehiro has joined #ruby
<falieson> well same overall project I've been working on for a week now. I have about 10K pieces of text (tweets) which were analyzed over 3 questions. question 1 has 2 responses, q2 8responsibilities, and q3 3 responsibilities
<falieson> I want to count how many times each of the 3x2x8 possibilities were selected…. each day
<Spooner> OH yeah, that "thing" ;)
<falieson> haha yeah
<falieson> I'm finally too the fun part! analysis
<chrxn> That problem doesn't seem as complex as you think it is, I think :-)
<falieson> haha probably not
quazimodo has quit [Ping timeout: 244 seconds]
<falieson> at least once each day's results are counted, its done . just planning to store 48 rows per day into another table and then reference the data statically
<chrxn> It sounds like you need to just set up three filters that feed each other and feed each tweet into them
lggr has quit [Ping timeout: 246 seconds]
<chrxn> bah
Takehiro has quit [Ping timeout: 248 seconds]
<falieson> hmm
icole has quit [Remote host closed the connection]
<chrxn> you already analyzed them, you just need to count
<falieson> yeah, just need to count
<chrxn> that's even easier
<chrxn> !
dmiller has joined #ruby
<falieson> i thought it should be easy...
<chrxn> What structure are the results stored in?
recycle has joined #ruby
samflores has joined #ruby
<Spaceghostc2c> French, probably.
samflores has quit [Client Quit]
<blazes816> Non!
lggr has joined #ruby
<falieson> lol
<falieson> chrxn: http://pastie.org/4899475
Chryson has joined #ruby
leehambley has quit [Quit: leehambley]
hadees has joined #ruby
iamjarvo has quit [Ping timeout: 256 seconds]
bier has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
slainer68 has quit [Remote host closed the connection]
Enchilada has quit [Quit: Enchilada]
lggr has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9]
VegetableSpoon has joined #ruby
<falieson> not what you were asking for?
<chrxn> Yeah, that's enough
<chrxn> I'm thinking
nari_ has joined #ruby
Knodi has joined #ruby
<falieson> ok =) yeah, i've been trying to figure this out all day
<falieson> I probably could have counted it by hand… or at least running N sql calls. haha
<falieson> what about using group in mysql?
carlyle has joined #ruby
<falieson> but i would still need to do the if/then statements
<chrxn> i think i have something for ya, let me right it really quick
<falieson> correctomundo!
lkba has quit [Ping timeout: 240 seconds]
<falieson> if you dare
<chrxn> hey, what does the actual data in the analysis table look like?
<falieson> can I send you a dummy .xls?
cbuxton has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
<chrxn> i cant dcc
JonnieCache|work has joined #ruby
nagib has quit [Quit: nagib]
<falieson> k, i'll put it up somewhere
<chrxn> ok
jimeh has quit [Ping timeout: 255 seconds]
sent-hil has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
BMF has joined #ruby
<falieson> chrxn:
lggr has joined #ruby
<falieson> chrxn: that's what I'm thinking it will look like, i'm open to alternatives though… but I think that will be the easiest way to later do graphs against the mysql table
joofsh has quit [Ping timeout: 246 seconds]
<chrxn> hmmm
bricker has joined #ruby
<Spooner> You could generate graphics from the database directly, but I'm not sure how. Usually done in webby Railsy things and I'm no web guy.
mrsolo has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
<falieson> Spooner: yeah that's what i'll do later once i get the data. I don't want to dynamically draw the graphics because the data for September 19th isn't going to change
<Spooner> You have a very linear interpretation of time then.
ckrailo has quit [Quit: Computer has gone to sleep.]
<falieson> people can't tweet backwards in time
My_Hearing has quit [Ping timeout: 246 seconds]
<chrxn> This is an example of what you think it should look like?
baroquebobcat has quit [Quit: baroquebobcat]
ephemerian has quit [Quit: Leaving.]
<chrxn> Or is this something you have already
<falieson> chrxn: yeah, there's 8 options for policy
My_Hearing has joined #ruby
<falieson> chrxn: so thats what i'm thinking it will look like but i'm open to alternatives
<falieson> chrxn: just what i came up with my own limited understanding of the world
mrsolo has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
<falieson> but its going to be the same 2x8x3 options everyday…
<chrxn> Okay, l think that using associations, you could make this easier on yourself later
<chrxn> btw, have you ever heard of datamapper?
<falieson> chrxn: its an ORM right? I'm using sequel
<chrxn> You're right. Sequel is along the same lines
<chrxn> I'm not too familiar with sequel
<chrxn> anyways, let me sketch what i'm thinking
lkba has joined #ruby
lggr has joined #ruby
<falieson> sweet
<chrxn> one resource may have contributed to more than one row if more than one policy was discussed? or is it one for one?
sent-hil has joined #ruby
sent-hil has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
<falieson> 1 to 1
<chrxn> perfect
<falieson> yeah, i tried to simplify it as much as possible
lggr has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
rakunHo has joined #ruby
Knodi has quit [Quit: Knodi]
chendo__ has quit [Ping timeout: 255 seconds]
bricker has quit [Ping timeout: 260 seconds]
skogis has quit [Ping timeout: 260 seconds]
chendo_ has joined #ruby
pskosinski has quit [Ping timeout: 256 seconds]
tbrock has joined #ruby
<tbrock> hey guys, is there a way to avoid requiring 'test/unit' at the top of all my tests
<tbrock> shouldn't i be able to require it in my fakefile and then use it in all the test tasks
tommyvyo has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
lggr has joined #ruby
jeffreybaird has joined #ruby
bigkm has joined #ruby