drbrain_ changed the topic of #ruby-lang to: Ruby 1.9.3-p385: http://ruby-lang.org (ruby-2.0.0-rc2) || Paste >3 lines of text on http://gist.github.com
mjio has quit []
ryanf has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
Guest41942 is now known as ddd
slyphon has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.90 [Firefox 16.0.1/20121026125834]]
agile has joined #ruby-lang
bfont has joined #ruby-lang
mjio has joined #ruby-lang
bfont has left #ruby-lang [#ruby-lang]
idkazuma has quit [Remote host closed the connection]
arubin has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
datanoise has quit [Ping timeout: 256 seconds]
__BigO__ has joined #ruby-lang
havenwood has joined #ruby-lang
bfont has joined #ruby-lang
jtoy has quit [Quit: jtoy]
thufir_ has joined #ruby-lang
WillMarshall has joined #ruby-lang
imajes has quit [Excess Flood]
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
imajes has joined #ruby-lang
mercwithamouth has joined #ruby-lang
mercwith1mouth has joined #ruby-lang
tsou_ has joined #ruby-lang
tsou has quit [Ping timeout: 260 seconds]
datanoise has joined #ruby-lang
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kurko__ has joined #ruby-lang
WillMarshall has joined #ruby-lang
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
therod has quit [Quit: Leaving...]
his_shadow has joined #ruby-lang
b1rkh0ff has quit [Ping timeout: 240 seconds]
ryanf has joined #ruby-lang
his_shadow has quit [Remote host closed the connection]
his_shadow has joined #ruby-lang
nXqd has quit [Ping timeout: 255 seconds]
Averna has joined #ruby-lang
intellitech has joined #ruby-lang
sepp2k has joined #ruby-lang
kurko__ has quit [Ping timeout: 244 seconds]
idkazuma has joined #ruby-lang
kurko__ has joined #ruby-lang
srbaker has joined #ruby-lang
yianna has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
marr has quit [Ping timeout: 255 seconds]
havenwood has quit [Remote host closed the connection]
therod has joined #ruby-lang
his_shadow has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
mantono has quit [Ping timeout: 248 seconds]
mantono has joined #ruby-lang
klebervirgilio has quit [Read error: Connection reset by peer]
therod has quit [Ping timeout: 245 seconds]
klebervirgilio has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
klebervirgilio has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
sailias has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 244 seconds]
mjio has quit []
thufir_ has quit [Quit: Leaving.]
idkazuma has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
klebervi_ has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
therod has joined #ruby-lang
bovi_ has quit [Ping timeout: 264 seconds]
setmeaway has quit [Ping timeout: 248 seconds]
Vektor has joined #ruby-lang
therod has quit [Ping timeout: 264 seconds]
jxie_ has quit [Quit: leaving]
slyphon has quit [Quit: slyphon]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sailias has quit [Quit: Leaving.]
kurko__ has quit [Quit: Computer has gone to sleep.]
bryno has quit [Quit: brb]
amerine has joined #ruby-lang
mjio has joined #ruby-lang
stardiviner has joined #ruby-lang
emocakes has quit [Quit: emocakes]
voker57 has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
slyphon has joined #ruby-lang
mantono has quit [Ping timeout: 276 seconds]
bryno has joined #ruby-lang
mantono has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
datanoise has quit [Ping timeout: 276 seconds]
mjio has quit []
amerine has quit [Quit: Computer has gone to sleep.]
mjio has joined #ruby-lang
mjio has quit [Client Quit]
mjio has joined #ruby-lang
mantono has quit [Read error: Connection timed out]
bfont has quit [Quit: bfont]
setmeaway has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
mantono has joined #ruby-lang
bfont has joined #ruby-lang
postmodern has joined #ruby-lang
bfont has quit [Client Quit]
thufir_ has joined #ruby-lang
datanoise has joined #ruby-lang
lcdhoffman has joined #ruby-lang
mantono has quit [Ping timeout: 260 seconds]
aspro has joined #ruby-lang
mantono has joined #ruby-lang
stevechiagozie has quit [Quit: Computer has gone to sleep.]
stevechiagozie has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
idkazuma has joined #ruby-lang
mantono has quit [Ping timeout: 245 seconds]
tylersmith has quit [Quit: tylersmith]
charliesome has joined #ruby-lang
krz has joined #ruby-lang
apeiros has joined #ruby-lang
apeiros_ has quit [Read error: Connection reset by peer]
pkrnj has joined #ruby-lang
klebervi_ has quit [Remote host closed the connection]
klebervirgilio has joined #ruby-lang
klebervirgilio has quit [Ping timeout: 240 seconds]
chimkan has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
kurko__ has joined #ruby-lang
brianpWins has joined #ruby-lang
Aria has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
aspro has quit [Quit: Bye!]
kurko__ has quit [Quit: Computer has gone to sleep.]
gtemma11 has joined #ruby-lang
CacklingPanda has joined #ruby-lang
methods has joined #ruby-lang
jbsan has quit [Quit: JB.. OUT!]
methods has left #ruby-lang [#ruby-lang]
srbaker has joined #ruby-lang
dvorak has quit [Ping timeout: 252 seconds]
srbaker has quit [Client Quit]
dvorak has joined #ruby-lang
CacklingPanda has left #ruby-lang [#ruby-lang]
srbaker has joined #ruby-lang
beho has joined #ruby-lang
srbaker has quit [Client Quit]
imajes has quit [Excess Flood]
beho has quit [Remote host closed the connection]
imajes has joined #ruby-lang
dvorak has quit [Ping timeout: 252 seconds]
dvorak has joined #ruby-lang
chimkan has quit [Ping timeout: 248 seconds]
srbaker has joined #ruby-lang
adam12 has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
adam12 has joined #ruby-lang
chimkan_ has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
chimkan_ has left #ruby-lang [#ruby-lang]
idkazuma has quit [Remote host closed the connection]
amerine has joined #ruby-lang
socialcoder has joined #ruby-lang
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
brianpWins has quit [Quit: brianpWins]
kurko__ has joined #ruby-lang
jonahR has quit [Quit: jonahR]
kain has quit [Quit: exit]
mantono has joined #ruby-lang
kurko__ has quit [Ping timeout: 252 seconds]
kurko__ has joined #ruby-lang
Vektor has quit []
kgrz has quit [Quit: Computer has gone to sleep.]
beho has joined #ruby-lang
mantono has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby-lang
beho has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
mantono has joined #ruby-lang
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
rippa has joined #ruby-lang
slyphon has quit [Quit: slyphon]
socialcoder has left #ruby-lang [#ruby-lang]
mantono has quit [Ping timeout: 245 seconds]
kurko__ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Bosox20051 has quit [Quit: Leaving]
maxmanders has quit [Ping timeout: 252 seconds]
kain has joined #ruby-lang
maxmanders has joined #ruby-lang
kain has quit [Remote host closed the connection]
kain has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
jbsan has joined #ruby-lang
dankest has joined #ruby-lang
sagebeard has quit [Ping timeout: 252 seconds]
Sinestro has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
r0bby_ is now known as robbyoconnor
noop has joined #ruby-lang
thone_ has joined #ruby-lang
chendo__ has joined #ruby-lang
dankest has quit [Read error: Connection reset by peer]
thone has quit [Ping timeout: 248 seconds]
dankest has joined #ruby-lang
dankest has quit [Client Quit]
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby-lang
KA_ has quit [Quit: KA_]
KA_ has joined #ruby-lang
slyphon has joined #ruby-lang
dankest has joined #ruby-lang
xcombelle has joined #ruby-lang
KA_ has quit [Client Quit]
ridget has joined #ruby-lang
amerine has quit [Quit: Computer has gone to sleep.]
tonni has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
slyphon_ has joined #ruby-lang
slyphon has quit [Ping timeout: 256 seconds]
slyphon_ is now known as slyphon
methods has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
brianpWins has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
stonerfish has joined #ruby-lang
methods has joined #ruby-lang
bzalasky has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
mjio has quit []
bzalasky has quit [Remote host closed the connection]
ridget has quit [Remote host closed the connection]
dedis has joined #ruby-lang
dankest is now known as dankest|away
tonni has joined #ruby-lang
dankest|away is now known as dankest
rippa has joined #ruby-lang
beho has joined #ruby-lang
bzalasky has joined #ruby-lang
nXqd has joined #ruby-lang
maxmanders has quit [Ping timeout: 252 seconds]
rue|w has joined #ruby-lang
maxmanders has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 255 seconds]
rippa has quit [Ping timeout: 240 seconds]
maxmanders has quit [Ping timeout: 252 seconds]
ioga_wrk has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby-lang
charliesome_ has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
chendo__ has quit [Quit: Computer has gone to sleep.]
yobiflare has quit [Ping timeout: 256 seconds]
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
nXqd has quit [Ping timeout: 255 seconds]
ioga_wrk has joined #ruby-lang
maxmanders has quit [Ping timeout: 248 seconds]
maxmanders has joined #ruby-lang
dhruvasagar has joined #ruby-lang
slyphon has quit [Quit: slyphon]
gtemma11 has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
nXqd has joined #ruby-lang
datanoise has joined #ruby-lang
ddv has joined #ruby-lang
methods has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 255 seconds]
stonerfish has quit [Quit: Leaving.]
methods has left #ruby-lang [#ruby-lang]
beho has quit [Remote host closed the connection]
Sinestro has quit [Quit: Computer has gone to sleep.]
JohnBat26 has joined #ruby-lang
Qfwfq has quit [Quit: Lost terminal]
mmuehlberger has joined #ruby-lang
gnufied has joined #ruby-lang
bzalasky has joined #ruby-lang
megha has joined #ruby-lang
apeiros_ has joined #ruby-lang
wmoxam has quit [Ping timeout: 244 seconds]
Averna has quit [Quit: Leaving.]
tonni has quit [Remote host closed the connection]
mantono has joined #ruby-lang
dr_bob has joined #ruby-lang
Qfwfq has joined #ruby-lang
Qfwfq has joined #ruby-lang
Qfwfq has quit [Changing host]
bzalasky has quit [Remote host closed the connection]
agarie has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
wallerdev has quit [Quit: wallerdev]
tonni has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
dzhulk has quit [Quit: Leaving.]
jstemmer has joined #ruby-lang
chendo_ has joined #ruby-lang
marr has joined #ruby-lang
faces has joined #ruby-lang
chendo_ has quit [Client Quit]
mistym has quit [Remote host closed the connection]
nXqd_ has joined #ruby-lang
face has quit [Ping timeout: 256 seconds]
blacktulip has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
nXqd has quit [Ping timeout: 255 seconds]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
fuzzy8balls has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
zmack has joined #ruby-lang
bzalasky has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
noop has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
lsegal has joined #ruby-lang
lsegal has quit [Client Quit]
lsegal has joined #ruby-lang
lsegal has quit [Client Quit]
xcombelle has quit [Remote host closed the connection]
retro|cz has joined #ruby-lang
nXqd_ has quit [Quit: leaving]
nXqd has joined #ruby-lang
skade has joined #ruby-lang
noop has joined #ruby-lang
workmad3 has joined #ruby-lang
<yorickpeterse> Morning
yobiflare has joined #ruby-lang
francisfish has joined #ruby-lang
agarie has joined #ruby-lang
hackeron has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 255 seconds]
hackeron has joined #ruby-lang
bzalasky_ has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
charliesome has quit [Read error: Operation timed out]
charliesome has joined #ruby-lang
klebervirgilio has joined #ruby-lang
agarie has quit [Remote host closed the connection]
klebervirgilio has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
klebervirgilio has joined #ruby-lang
therod has joined #ruby-lang
kcassidy has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
klebervirgilio has quit [Ping timeout: 276 seconds]
datanoise has joined #ruby-lang
Asher has quit [Quit: Leaving.]
chekcmate has joined #ruby-lang
datanoise has quit [Ping timeout: 245 seconds]
dzhulk has joined #ruby-lang
Asher has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
eban has quit [Quit: WeeChat 0.3.8]
eban has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
tbuehlmann has joined #ruby-lang
beho has joined #ruby-lang
workmad3 has joined #ruby-lang
eban has quit [Quit: WeeChat 0.3.8]
eban has joined #ruby-lang
Spakman_ has left #ruby-lang [#ruby-lang]
dankest has quit [Quit: Leaving...]
dankest has joined #ruby-lang
bzalasky_ has quit [Remote host closed the connection]
ryez has joined #ruby-lang
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
Asher has quit [Quit: Leaving.]
r0bgleeson has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 252 seconds]
dankest has quit [Quit: Leaving...]
cultureulterior_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
mantono has quit [Remote host closed the connection]
Wardrop has joined #ruby-lang
<Wardrop> In the following example, does anyone know to get a reference to "Test" in the context of the included comment:
<Wardrop> class Test; class << self
<Wardrop> # How do I get a reference to "Test" from here
<Wardrop> end
<Wardrop> doing anything like "self.class" or "self.superclass" seem to get object associated with the singleton_class, not the actual class.
<yorickpeterse> That's because you're already evaluating code on class level
<yorickpeterse> Though I'm not entirely sure how to get it without explicitly using "Test"
<Wardrop> Indeed, that's the problem.
<Wardrop> I'm surprised that the singleton class seems to have no exposed relationship to it's actual class.
emocakes has joined #ruby-lang
chendo_ has joined #ruby-lang
dr_bob has quit [Read error: Connection reset by peer]
<Wardrop> No one knows?
<manveru> hm_
gnufied has quit [Quit: Leaving.]
klebervirgilio has joined #ruby-lang
<Wardrop> I've decided to put it in as a feature request. I'm hoping someone will say that request and tell me how to do it, but I have a feeling it's going to have to be added.
gnufied has joined #ruby-lang
klebervirgilio has quit [Read error: Connection reset by peer]
klebervirgilio has joined #ruby-lang
<manveru> yeah, i don't see any way atm
<manveru> there must be a pointer to the original class somewhere in C, but if there is it's not exposed to ruby
<manveru> maybe check rubinius?
dankest has joined #ruby-lang
<manveru> meh, it's C++ ins rbx too :(
io_syl has quit [Quit: Computer has gone to sleep.]
chendo_ has quit [Ping timeout: 252 seconds]
sush24 has joined #ruby-lang
<dbussink> manveru: we might be able to expose it some way in rbx if it's really useful :)
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chendo_ has joined #ruby-lang
<darix> Wardrop: why do you need it?
b1rkh0ff has joined #ruby-lang
Qwak has joined #ruby-lang
beiter has joined #ruby-lang
sush24 has quit [Read error: Connection reset by peer]
<Wardrop> darix: Give me a sec, I may have found a work-around.
dankest has quit [Quit: Leaving...]
<apeiros_> hm
* apeiros_ just learned a new attack vector…
<apeiros_> "I need to change the smoke detector"
dr_bob has joined #ruby-lang
judofyr has joined #ruby-lang
vlad_starkov has joined #ruby-lang
datanoise has joined #ruby-lang
<Wardrop> darix: here's what I was trying to do. Show's how I fixed it. https://gist.github.com/Wardrop/4976817
gnufied1 has joined #ruby-lang
gnufied has quit [Read error: Connection reset by peer]
datanoise has quit [Ping timeout: 276 seconds]
dzhulk has quit [Quit: Leaving.]
<judofyr> Wardrop: you shouldn't create a method called #hash as it's already being used by e.g. hashtables
xcombelle has joined #ruby-lang
<judofyr> Wardrop: { SomeClass => 1 } == TypeError: can't convert Hash into Integer
<Wardrop> Yeah. I've already got a #to_hash method which returns a merged hash, where as #hash provides access to the local internal hash.
<Wardrop> I should think of a better name though
<Wardrop> Yeah I actually just wrote that code as an example. It probably doesn't work :)
<Wardrop> Sorry
xcombelle has quit [Read error: Connection reset by peer]
<judofyr> Wardrop: oh, don't be sorry, it was just a FYI because it can cause problems later ;)
<Wardrop> Oh sorry, I thought you ran the code and it didn't work. I now realise that you were given an example of how overriding #hash is bad
xcombelle has joined #ruby-lang
<Wardrop> Anyway, this is all for a class called "InheritableStruct". It's basically a struct implemented as a class singleton, where values of parents can be overridden by children.
<Wardrop> This will end up going into the web framework I'm working on called Scorched.
<judofyr> Wardrop: #hash is also a terrible name. you shouldn't name stuff based on the types. #attributes might be better ;)
<injekt> or to_hash
<injekt> which is something in 2.0 anyway, a hash representation of an object
<Wardrop> I like #attributes, thanks :)
s1n4 has joined #ruby-lang
krz has quit [Quit: krz]
jxie has quit [Quit: leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
carloslopes has joined #ruby-lang
s1n4 has quit [Quit: leaving]
Banistergalaxy has joined #ruby-lang
mantono has joined #ruby-lang
Qfwfq has quit [Ping timeout: 255 seconds]
beho has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
Rubennn has joined #ruby-lang
gix has quit [Ping timeout: 252 seconds]
beiter has quit [Quit: beiter]
jtoy has joined #ruby-lang
gix has joined #ruby-lang
nkr has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 255 seconds]
vlad_starkov has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
zmack has quit [Remote host closed the connection]
Wardrop has quit [Quit: Wardrop]
zmack has joined #ruby-lang
beho has joined #ruby-lang
<chekcmate> injekt: hey big guy
goatish_mound has joined #ruby-lang
My_Hearing has joined #ruby-lang
<injekt> chekcmate: hey
<yorickpeterse> injekt: he wants you
<chekcmate> injekt: my boss is absent, i haz free time and im tinkering some ruby daemon, basically a tiny tcpserver
<chekcmate> maybe i dont know the right term, but when doing system calls via that tcpserver, how would you guys get the return?
<chekcmate> i now write it to a file (you know, like "ls > foo.txt" writes the return into foo.txt)
Mon_Ouie has quit [Ping timeout: 245 seconds]
<chekcmate> and afterwards read it
<chekcmate> so the client gets the return
<chekcmate> but how do you actually do that?
<chekcmate> yorickpeterse: don't be jealous, coming to you next time :)
<yorickpeterse> Don't worry, I'm already occupied
<yorickpeterse> by the one %1
jtoy has quit [Quit: jtoy]
<chekcmate> :>
<yorickpeterse> well, probably something like 0.00000000001% but you get the idea
<yorickpeterse> fuck, now I want to know
<chekcmate> hahaha
<chekcmate> hm... Win32::Registry invites to add a daemon to the registry..
jtoy has joined #ruby-lang
<yorickpeterse> Apparently I'm occupied by the 0.00000000014285714285%
<chekcmate> :D
<chekcmate> yorickpeterse are there ruby trojans?
<yorickpeterse> You mean activesupport?
* yorickpeterse runs
<chekcmate> no, basically...
<chekcmate> at all
<yorickpeterse> Not that I know of
<yorickpeterse> Though sometimes Ruby is used for script kiddie toolkits
<judofyr> Metasploit ;)
<chekcmate> yea, that has lots of rubyish stuff in it
<yorickpeterse> that's probably because those people are too lazy to learn a real programming language such as Node.js
MartynKeigher has quit [Ping timeout: 245 seconds]
<chekcmate> "i386-mingw32"
<chekcmate> wasn't that mswin?
gustavnils has joined #ruby-lang
noop_ has joined #ruby-lang
ruurd has joined #ruby-lang
MartynKeigher has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
ruurd has quit [Read error: Connection reset by peer]
dzhulk has joined #ruby-lang
kgrz has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
vlad_starkov has quit [Remote host closed the connection]
beiter has joined #ruby-lang
<certainty> is there a method that traverses an enumerable and returns the result of the first block that evaluated to a truthy value?
<lianj> .find
<certainty> find returns the element not the value of the block no?
<lianj> true
<certainty> something like map(:something).compact.first
<certainty> only in one metod that stops as soon elt.something is truthy
<lianj> there prolly is something but i usually just do a each with break inside if i need that behavior
<certainty> hmm possible, i can just return
<judofyr> certainty: don't think it's there already
<judofyr> certainty: I've used used pattern before: foo.each { |bar| return yield(bar) || next }
<judofyr> although it's a bit magic
<certainty> moar magic :)
<judofyr> not often you have both yield, return and next in the same expression
<lianj> :D
dustint has joined #ruby-lang
<judofyr> certainty: in Ruby 2.0: foo.lazy.map { |x| x * 2 }.find { |x| x }
lcdhoffman has joined #ruby-lang
<lianj> hmmm
<judofyr> hmmm?
<certainty> judofyr: nice
<judofyr> or, you can do the same without lazy now
<certainty> i wish Object defined identity
<yorickpeterse> y u no use #find(&:x)
tonni has quit [Remote host closed the connection]
<certainty> thet you could be more ideomatic like foo.lazy.map{|x| x + 2}.find(&:identity)
<lianj> judofyr: is there a nice 2.0 feature writeup?
<certainty> idiomatic, even
<judofyr> lianj: there's always https://github.com/ruby/ruby/blob/trunk/NEWS
<sush24> how does thread.backtrace work? http://pastebin.com/iiwnKi17
<sush24> it says undefined
<certainty> yorickpeterse: #find(&:x)?
<judofyr> sush24: what Ruby version is that? (try RUBY_DESCRIPTION)
<yorickpeterse> certainty: that's the same as find { |x| x {
<yorickpeterse> err }
<yorickpeterse> eh wait
<yorickpeterse> no it's not
* yorickpeterse bangs head
<certainty> :)
<sush24> judofyr, oh wait… 1.8.7 on a mac
<judofyr> sush24: ;)
<sush24> :)
<sush24> thanks
<certainty> judofyr: i'll use the map-find combination, thanks
mr_white has joined #ruby-lang
KA__ has joined #ruby-lang
<lianj> certainty: but without lazy it processes all map before starting with find
<certainty> lianj: yepp, that's ok. the enumerable has a small fixed amount of members
MartynKeigher has quit [Excess Flood]
yobiflare has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
gnufied1 has quit [Quit: Leaving.]
datanoise has joined #ruby-lang
cupakromer has joined #ruby-lang
dzhulk has quit [Quit: Leaving.]
MartynKeigher has joined #ruby-lang
jbsan has quit [Quit: jbsan]
gnufied has joined #ruby-lang
jbsan has joined #ruby-lang
srbaker has joined #ruby-lang
KA__ has quit [Quit: KA__]
<chekcmate> when I get `fork': fork() function is unimplemented on this machine (NotImplementedError) is ffi-1.4.0.gem the correct one?
scampbell has joined #ruby-lang
<yorickpeterse> wat
<injekt> windows?
<injekt> you can't fork on winblows
lcdhoffman has quit [Ping timeout: 248 seconds]
<chekcmate> aw
<chekcmate> right
<injekt> maybe you dont need fork though, it's usually over used
<chekcmate> hm, was tinkering with the daemons gem...
<apeiros_> hu?
<apeiros_> fork overused?
<apeiros_> since when?
<injekt> eh, wrongly used I should say
<injekt> like, whenever I've seen it used
<apeiros_> o0
<chekcmate> win32utils => process?
<apeiros_> such as?
<judofyr> fork { exec("echo", "am I doing it right?") }
tonni has joined #ruby-lang
<chekcmate> ah... i thought daemons uses the win32utils in order to achieve this on windows
Banistergalaxy has quit [Ping timeout: 248 seconds]
<yorickpeterse> The only good use of fork is `def Ὂ3; Process.fork { Ὂ3 }; end; Ὂ3`
<yorickpeterse> (that's a Unicode bomb btw for those using a lesser IRC client)
Banistergalaxy has joined #ruby-lang
<apeiros_> and the 3 is part of the bomb? :)
lcdhoffman has joined #ruby-lang
<yorickpeterse> I have no idea
<yorickpeterse> I can't Unicode apparently
<apeiros_>
<apeiros_> this?
<judofyr> that's probably more like it
<judofyr> def
<chekcmate> looks like a bomb
<judofyr> bingo
<apeiros_> wth, only "FORK AND KNIFE", no "FORK" :(
<apeiros_> well then…
<chekcmate> now all makes sense
<apeiros_> def
<apeiros_> fork-and-knife-bomb it is!
<chekcmate> hahhh :D
<yorickpeterse> apeiros_: empty
<apeiros_> yorickpeterse: lesser irc client/font/os :-p
<chekcmate> webclient hurray
<yorickpeterse> it's a shame you can't use `:)` for method names
lcdhoffman has quit [Ping timeout: 248 seconds]
<yorickpeterse> def :); fork { :) }; end; :)
<yorickpeterse> even better doing that lisp style
<yorickpeterse> (defn :) (fork(Isuckatlisp)))(:))
<yorickpeterse> something like that
<chekcmate> █
imperator has joined #ruby-lang
<chekcmate> have some ☕, yorickpeterse
<yorickpeterse> hahahaha I found one
<yorickpeterse> why this shit is even in the Unicode table is a mystery
<yorickpeterse> also my font doesn't render it :<
kgrz has joined #ruby-lang
Qwak has quit []
<chekcmate> lol
<chekcmate>
maxmanders has quit [Quit: Computer has gone to sleep.]
l0st1 has joined #ruby-lang
maxmanders has joined #ruby-lang
<yorickpeterse> Oh Unicode, you lovely over-engineered piece of shit
<yorickpeterse> wtf
<oddmunds>
<oddmunds> i think most of these are asian in origin
<whitequark> yeah, emoji.
postmodern has quit [Ping timeout: 264 seconds]
<chekcmate> are there lists for those chars which break lines too?
<chekcmate> can't remember their name
<yorickpeterse> dat URL
workmad3 has quit [Ping timeout: 252 seconds]
<chekcmate> yorickpeterse: someone told the correct name here... you know, the ones which fucked up some peoples irc
<yorickpeterse> Oh, those
<yorickpeterse> also a fun one: the bell character
<chekcmate> yes, I thought about them yesterday and noticed I did not remember their name
<chekcmate> can you tell me the correct term?
<yorickpeterse> Sadly I don't
<chekcmate> breast, nipples; milk, suckle
<yorickpeterse> wat
<chekcmate> it's not a show-character, it's a chinese meaning-character :D
sush24 has quit [Ping timeout: 276 seconds]
* yorickpeterse should get back to work
stevechiagozie has joined #ruby-lang
<chekcmate> no.. I'm out of work, I need someone to annoy
<jtoy> is it safe if multiple threads are writing to the same file?
<yorickpeterse> no
<yorickpeterse> Not without a mutex
<yorickpeterse> Unless you don't care for write order
<jtoy> i don't care about the write order,each thread is writing 1 line though
<jtoy> at a time
<apeiros_> jtoy: write order doesn't mean "order of lines"
<apeiros_> it means "at any character"
<jtoy> right now i just have the threads throw the data into a queue and then another single thread pulling from the queue and writing to the file , is that the fastest way?
<jtoy> apeiros_: ok, then that does matter
<apeiros_> using a queue is a sane approach IMO, yes
<apeiros_> whether it's the fastest - no idea
sush24 has joined #ruby-lang
<jtoy> apeiros_: is the only alternative a mutex ? queues are the only way i've done threading
jbsan has quit [Quit: jbsan]
[[johnonymous]] has joined #ruby-lang
toretore has quit [Read error: Connection reset by peer]
<yorickpeterse> Queues don't ensure a single thing writing at once
<yorickpeterse> Unless there's only one worker
jbsan has joined #ruby-lang
<jtoy> yorickpeterse: i know, i have 1 worker who's only job is to read from thread and write the data
<yorickpeterse> When it comes to threads, whenever you read/write data to a single location you'll most likely need a mutex
toretore has joined #ruby-lang
<yorickpeterse> jtoy: in that case, no
<yorickpeterse> since there's only one worker active at a time
<yorickpeterse> However, I'd still do it in case you want to scale up to multiple workers
<apeiros_> yorickpeterse: I was assuming that he writes a complete "package" to the queue
<apeiros_> and then the queue very much ensures that those stay in one piece
<jtoy> i have a pool of other threads that push data onto the queue, it seems like idont need the mutex?
<apeiros_> jtoy: just make sure that you write atomic pieces to the queue. i.e. anything that must not be interspersed with other data must be written to the queue in one piece.
<jtoy> apeiros_: yes, it is complete. the data on the queue is all that is written to the file
dhruvasagar has quit [Ping timeout: 260 seconds]
jbsan has quit [Quit: jbsan]
QaDeS has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
chekcmate has quit [Quit: Page closed]
__BigO__ has joined #ruby-lang
tonni has quit [Remote host closed the connection]
Steve-W has quit [Quit: "Farewell"]
nkr has quit [Quit: Linkinus - http://linkinus.com]
jxie has joined #ruby-lang
arubin has joined #ruby-lang
anildigital_work has quit [Ping timeout: 256 seconds]
akamike has quit [Ping timeout: 260 seconds]
anildigital_work has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
KA__ has joined #ruby-lang
GarethAdams has joined #ruby-lang
<certainty> mutex all along
<jtoy> certainty: you mean its already doing a mutex with the queue?
<certainty> nope
<certainty> the queue is synchronized but you need to synchronize the access to the file
<jtoy> i don't even see why i need the mutex, i have 100 threads doing work and they put data into a queue, then a single thread worker reads off of that and writes, no one else accesses the file
dr_bob has quit [Quit: Leaving.]
<certainty> so auire the mutex, write the line (flush it uif you don't have line-buffering), and release the mutex
<andrewvos> Anyone having an issue install gems?
<certainty> aquire,even
<certainty> jtoy: ah you have a single worker that does the write?
<certainty> i thought you had multiple writers
<jtoy> no
<certainty> then you don't need to synchronize the access to the file
<jtoy> i could have the workers write directly, but i imagine it would be slower then using a queue
<jtoy> certainty in general is that correct?
<certainty> jtoy: what is correct? that it's slower?
sush24 has quit [Quit: Leaving]
dr_bob has joined #ruby-lang
<jtoy> certainty: that a queue with one writer is faster then 100 threads and muteness to write a file
imperator has joined #ruby-lang
<certainty> it does basically the same, so i don't expect it to be faster. but it is a better abstraction, that scales better
davidbalber|away is now known as davidbalbert
<certainty> the workers don't have to care how the stuff is written or by whome
<certainty> qeues are good :)
<certainty> lockfree qeues are better :)
stonerfish has joined #ruby-lang
QaDeS has quit [Ping timeout: 240 seconds]
Steve-W- has joined #ruby-lang
<jtoy> certainty: I'm just using the queue class from threaded, not sure if i should be using better ones
<certainty> that's ok
<certainty> don't optimize prematurely
<jtoy> certainty: ok, if i need it later, what would be the library I should look into?
Steve-W- has quit [Client Quit]
enebo has joined #ruby-lang
Qfwfq has joined #ruby-lang
asdfqwer has joined #ruby-lang
thoughtfulgoblin has joined #ruby-lang
QaDeS has joined #ruby-lang
sush24 has joined #ruby-lang
<thoughtfulgoblin> hi i've got some code that's running really slow.. basically for remove duplicate points and check for points that have duplicate timestamps and id's but different values
<thoughtfulgoblin> if it's a 1000 points it's really fast
yfeldblum has joined #ruby-lang
<thoughtfulgoblin> but if it's 140,000 points it takes 20 minutes
<thoughtfulgoblin> how can i work out what the bottleneck is?
<yorickpeterse> wow, that's a fuckton of code
<yorickpeterse> Unrelated, use somewhat shorter method names
<yorickpeterse> remove_duplicates_from_ready_for_insertion_data_for_particular_data_series is way too long
<yorickpeterse> plus the name makes no sense
Qfwfq has quit [Ping timeout: 255 seconds]
<yorickpeterse> Also, what defines a "point" in this case?
carloslopes has quit [Remote host closed the connection]
<thoughtfulgoblin> in the context of the application it makes a lot of sense, and me and my colleagues are a big fan of using code as documentation
<lianj> code as documenatation is fine. method names as sentences not
<rue> It’s still a bit long
Steve-W has joined #ruby-lang
<yorickpeterse> either way, if you want to filter out duplicates for a large dataset you'll want to use a Hash [...]
<yorickpeterse> What you'd do is remap the dataset to a Hash with the keys set to a certain identifier, the values being the points
<yorickpeterse> If the key already exists, skip it, if not, add it
<rue> Looks like you’re traversing over and over, so yeah… a hash would probably work.
<yorickpeterse> Then you can just call some_hash.values and bam
<lianj> .group_by
<thoughtfulgoblin> https://gist.github.com/anonymous/b7519ed905202ade5bf2 << each one of those is a point
<thoughtfulgoblin> that's from my unit tests... but that's the general format.. a point is just a hash of values
<yorickpeterse> unique = {}; rows.each { |row| unique.key?(row.id) ? next : unique[row.id] = row }; unique.values
<yorickpeterse> something like that
<rue> Mm, #group_by might work well, too
Banistergalaxy has quit [Ping timeout: 248 seconds]
Steve-W has left #ruby-lang [#ruby-lang]
megha has quit [Ping timeout: 240 seconds]
baba has joined #ruby-lang
<thoughtfulgoblin> does group_by get rid of unique values?
<thoughtfulgoblin> sorry create unique values
dabradley has quit [Quit: WeeChat 0.3.8]
<thoughtfulgoblin> oh i see, group_by :data_series_id, :datatime_utc
baba is now known as hack
Banistergalaxy has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
io_syl has joined #ruby-lang
dabradley has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
wallerdev has joined #ruby-lang
vlad_starkov has joined #ruby-lang
chimkan has joined #ruby-lang
<andrewvos> Does rvm mess with `bundle`?
Uranio has joined #ruby-lang
athaeryn has joined #ruby-lang
athaeryn has left #ruby-lang [#ruby-lang]
JohnBat26 has quit [Read error: Operation timed out]
rippa has joined #ruby-lang
dzhulk has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
carloslopes has joined #ruby-lang
chimkan__ has joined #ruby-lang
zmack has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 244 seconds]
chimkan__ is now known as chimkan
srbaker has joined #ruby-lang
carloslopes has quit [Ping timeout: 248 seconds]
nXqd has joined #ruby-lang
srbaker has quit [Client Quit]
<injekt> yes
<injekt> rvm messes with everything
<injekt> :D
<jtoy> injekt: I just tested slop on another box with auto create and got the same error, Im going to look into it later today
carloslopes has joined #ruby-lang
<injekt> jtoy: ok great, feel free to create an issue if you find something
<andrewvos> injekt: Oh Jesus Christ
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 264 seconds]
srbaker has joined #ruby-lang
yfeldblum has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
cored has quit [Ping timeout: 255 seconds]
lun_ has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
spuk has joined #ruby-lang
mr_white has quit [Read error: Connection reset by peer]
mr_white has joined #ruby-lang
mr_white has quit [Read error: Connection reset by peer]
mr_white has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
srbaker has joined #ruby-lang
beiter has quit [Quit: beiter]
nertzy has joined #ruby-lang
Nisstyre-laptop has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby-lang
<injekt> aye
judofyr has quit [Remote host closed the connection]
stonerfish has quit [Quit: Leaving.]
hack is now known as megha
stonerfish has joined #ruby-lang
dhruvasagar has joined #ruby-lang
krohrbaugh has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
noop has quit [Ping timeout: 255 seconds]
noop_ has quit [Ping timeout: 256 seconds]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
kcassidy has left #ruby-lang [#ruby-lang]
bzalasky has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
bzalasky has quit [Remote host closed the connection]
b1rkh0ff has quit [Read error: Connection reset by peer]
Nisstyre-laptop has quit [Quit: Leaving]
lcdhoffman has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby-lang
dr_bob has left #ruby-lang [#ruby-lang]
stardiviner has joined #ruby-lang
amerine has joined #ruby-lang
akamike has joined #ruby-lang
__butch__ has joined #ruby-lang
gregmoreno has joined #ruby-lang
Qwak has joined #ruby-lang
b1rkh0ff has joined #ruby-lang
beiter has joined #ruby-lang
tylersmith has joined #ruby-lang
sush24 has quit [Remote host closed the connection]
solars has quit [Ping timeout: 252 seconds]
sush24 has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
therod has quit [*.net *.split]
neurodamage has quit [*.net *.split]
Silex has quit [*.net *.split]
totallymike has quit [*.net *.split]
bougyman has quit [*.net *.split]
nibbo has quit [*.net *.split]
tpope has quit [*.net *.split]
knu has quit [*.net *.split]
wizonesolutions has quit [*.net *.split]
jaska has quit [*.net *.split]
bougyman has joined #ruby-lang
bougyman has quit [Changing host]
bougyman has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has quit [Changing host]
wizonesolutions has joined #ruby-lang
krz has joined #ruby-lang
__BigO__ has joined #ruby-lang
therod has joined #ruby-lang
jaska has joined #ruby-lang
knu has joined #ruby-lang
totallymike has joined #ruby-lang
nibbo has joined #ruby-lang
neurodamage has joined #ruby-lang
tpope has joined #ruby-lang
Silex has joined #ruby-lang
chimkan has quit [Ping timeout: 248 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
stonerfish has quit [Ping timeout: 276 seconds]
nkr has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
stonerfish has joined #ruby-lang
geopet has joined #ruby-lang
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
Flock_of_Smeagol has joined #ruby-lang
l0st1 has quit [Quit: leaving]
workmad3 has joined #ruby-lang
swav_ has quit [Remote host closed the connection]
geopet has quit [Quit: geopet]
skade has joined #ruby-lang
eydaimon has joined #ruby-lang
<eydaimon> trying to parse a csv file with this character: 'Æ' but I keep getting the error: 'invalid byte sequence in UTF-8'. my code is: "CSV.foreach(file, headers: true, encoding: "UTF-8") do |row| ... "
<eydaimon> any ideas?
krohrbaugh1 has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
krohrbaugh1 has joined #ruby-lang
havenwood has joined #ruby-lang
Flock_of_Smeagol has left #ruby-lang ["Leaving"]
krohrbaugh has quit [Ping timeout: 276 seconds]
mercwith1mouth has joined #ruby-lang
mercwithamouth has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
agile has quit [Remote host closed the connection]
cupakromer has quit []
swav_ has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
lun_ has quit [Remote host closed the connection]
KA__ has quit [Quit: KA__]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
badeball has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 240 seconds]
swav_ has quit [Remote host closed the connection]
kgrz has quit [Quit: Computer has gone to sleep.]
lcdhoffman has joined #ruby-lang
xcombelle has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
krohrbaugh1 has quit [Quit: Leaving.]
bzalasky_ has joined #ruby-lang
agarie has joined #ruby-lang
nXqd has quit [Read error: Connection reset by peer]
Qwak has quit []
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
<yfeldblum> eydaimon, parse only validly-encoded files?
<eydaimon> no life at all here today?
<eydaimon> oh, gee
<eydaimon> So Æ is not a valid character?
<eydaimon> As far as I know, it's a norweigian character
<yfeldblum> eydaimon, not if it's a single byte; Unicode has such a glyph, but it must be encoded in multiple bytes in UTF-8
<darix> eydaimon: well ... Æ might be a valid character
<darix> but you can encode it in other charsets too
<darix> so maybe it is just encoded in correct utf-8
cored has quit [Ping timeout: 252 seconds]
<eydaimon> according to vim: encoding=utf-8
<yfeldblum> eydaimon, if you're on ubuntu, there is: http://manpages.ubuntu.com/manpages/precise/en/man1/isutf8.1.html
cultureulterior_ has quit [Quit: cultureulterior_]
sailias has joined #ruby-lang
<eydaimon> not on ubuntu
<eydaimon> on osx
<eydaimon> but I reckon vim should know
agarie has quit [Remote host closed the connection]
cored has joined #ruby-lang
<darix> eydaimon: if you copy the file and edit out the character ... it works?
retro|cz has joined #ruby-lang
<eydaimon> darix: yes
<darix> another test would be recode/iconv the file and see if the encode it differently
<eydaimon> I tried replacing it with ø (another danish character) and still it's bad
<eydaimon> and the ø is easy to make on a mac.. it's just alt+o
brianpWins has joined #ruby-lang
Rarrikins_o_q_c has joined #ruby-lang
<darix> eydaimon: 1.9?
<darix> also tried reading the file before and passing the file object to the CSV.open?
<yfeldblum> eydaimon, these characters are not valid single-byte sequences in UTF-8
Stilo has joined #ruby-lang
<eydaimon> darix: 1.9.3
<yfeldblum> eydaimon, single-byte sequences in UTF-8 do not include any bytes above 127
Bosox20051 has joined #ruby-lang
<darix> yfeldblum: vim is utf-8 aware ... so it would probably add the right amount of bytes
<eydaimon> yfeldblum: who said they're single-byte?
<yfeldblum> eydaimon, are they not?
<eydaimon> I don't think Æ is, no
<eydaimon> if I just open pry, and paste it, I get: \U+FFC3
tonni has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
datanoise has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
marr has quit [Ping timeout: 252 seconds]
thufir_ has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
<darix> eydaimon: i would try reading it with file.open and then just passing the result from that
<eydaimon> darix: alright. thanks
<eydaimon> darix: no better
<eydaimon> if you feel like trying :/
<darix> uhm
<darix> put a encoding: UTF-8 comment after the shebang line maybe?
<darix> what locale settings in the calling shell?
<eydaimon> what'st he syntax for that again? :encoding UTF-8: ?
sduckett_ has joined #ruby-lang
<eydaimon> : # encoding: UTF-8 #.
krohrbaugh has joined #ruby-lang
<eydaimon> ok, doing that made it work
<eydaimon> so now why doesn't it work with an external file
kgrz has joined #ruby-lang
<darix> eydaimon: locale ?
lun_ has joined #ruby-lang
sduckett has quit [Ping timeout: 248 seconds]
<eydaimon> locale?
<darix> type "locale" in your shell and see
[[johnonymous]] has quit [Quit: Computer has gone to sleep.]
justinram has joined #ruby-lang
dankest has joined #ruby-lang
setmeaway2 has joined #ruby-lang
setmeaway has quit [Read error: Connection reset by peer]
<eydaimon> utf-8 all over the place
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<darix> ok
banisterfiend has joined #ruby-lang
<darix> can you gist the sample example script for reading from extern?
workmad3 has quit [Ping timeout: 244 seconds]
<eydaimon> just replace parse with foreach, and DATA with the filename
<eydaimon> but
<eydaimon> I created my own csv
<eydaimon> with the character
<eydaimon> and that worked
nkr has quit [Read error: Connection reset by peer]
<eydaimon> according to "file" the line I'm trying to parse is: ISO-8859
<eydaimon> freaking windows
joevandyk has joined #ruby-lang
therod has quit [Read error: Connection reset by peer]
<eydaimon> aha
nkr has joined #ruby-lang
<darix> so when you pass the latin1/latin2 encoding to the .foreach call ... works then?
<eydaimon> got it
<eydaimon> no, i'd tried that too
<eydaimon> but I finally got it
<eydaimon> open file in vim then, set filenecoding=utf8
<eydaimon> worked
<eydaimon> saved the file, and viola
totallymike has quit [Read error: Operation timed out]
<darix> ok
<eydaimon> thanks for your help
totallymike has joined #ruby-lang
heftig has quit [Quit: Quitting]
nXqd has joined #ruby-lang
davidbalbert is now known as davidbalber|away
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
heftig has joined #ruby-lang
mmuehlberger has quit [Quit: mmuehlberger]
mmuehlberger has joined #ruby-lang
drbrain has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
krz has quit [Quit: krz]
badeball has joined #ruby-lang
judofyr has joined #ruby-lang
justinram has quit [Remote host closed the connection]
agarie has joined #ruby-lang
beho has quit [Ping timeout: 245 seconds]
badeball has quit [Quit: leaving]
mistym has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
stevechiagozie has joined #ruby-lang
badeball has joined #ruby-lang
Rarrikins has joined #ruby-lang
Rarrikins_o_q_c has quit [Ping timeout: 256 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
badeball has quit [Quit: leaving]
Squarepy has joined #ruby-lang
Squarepy has quit [Changing host]
Squarepy has joined #ruby-lang
judofyr has quit [Read error: No route to host]
rippa has quit [Ping timeout: 240 seconds]
judofyr has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby-lang
swav has joined #ruby-lang
swav has quit [Remote host closed the connection]
badeball_ has joined #ruby-lang
geopet has joined #ruby-lang
badeball_ has quit [Quit: leaving]
badeball has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
marr has joined #ruby-lang
beho has joined #ruby-lang
slyphon has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby-lang
__butch__ has joined #ruby-lang
JEisen has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
dankest has joined #ruby-lang
mantono has quit [Ping timeout: 255 seconds]
lun_ has joined #ruby-lang
Uranio has quit [Quit: while you reading this, a kitty dies]
justinram has joined #ruby-lang
Rarrikins has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
hackeron has quit [Read error: Operation timed out]
badeball has quit [Quit: leaving]
badeball has joined #ruby-lang
davidbalber|away is now known as davidbalbert
benanne has joined #ruby-lang
hackeron has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<jtoy> with the Queue class in threads ,should we check the size of the queue before reading from it? otherwise sometimes I get deadlocks
<apeiros_> o0
<apeiros_> you should not get deadlocks on dequeueing
<apeiros_> *dequeuing
slyphon has quit [Quit: slyphon]
<zzak> there was a bug with Queue deadlocking not too long ago
<apeiros_> must be the word with the most vowels in a row…
<whitequark> apeiros_: http://xkcd.com/853/
<zzak> rediculously dequeueing
swav has joined #ruby-lang
<jtoy> am I supposed to call THread.exit when my thread is done? I thought leavings its while loop is good enough
<apeiros_> oh, interesting, both are correct, queueing and queuing
<apeiros_> whitequark: hahè
<apeiros_> hah!
<jtoy> haha
<apeiros_> whitequark: his chart is a lie, though
swav has quit [Remote host closed the connection]
<whitequark> apeiros_: proof?
<apeiros_> it makes it look as if there were words with 50+ consecutive vowels
thufir_ has quit [Quit: Leaving.]
Rarrikins has joined #ruby-lang
maxmanders has joined #ruby-lang
<jtoy> from /usr/local/lib/ruby/1.9.1/thread.rb:189:in `block in pop'
JEisen has quit [Quit: JEisen]
mantono has joined #ruby-lang
mistym has joined #ruby-lang
agile has joined #ruby-lang
drbrain has joined #ruby-lang
carloslopes has joined #ruby-lang
Ridders24 has joined #ruby-lang
<Ridders24> how do you stop an Ocra converted script from closing once its finishing running?
agile has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
<theoros> anyone know why system("time sleep 2") returns instantly?
<theoros> on OS X it behaves as i expect
<theoros> system("sleep 2") is also fine
drbrain_ has joined #ruby-lang
<theoros> and `time sleep 2` in my shell is also fine!
<theoros> huh. `time sleep 2` in irb: Errno::ENOENT: No such file or directory - time sleep 2
mmuehlberger has quit [Quit: mmuehlberger]
datanoise has quit [Ping timeout: 252 seconds]
slyphon has joined #ruby-lang
drbrain has quit [Ping timeout: 264 seconds]
<theoros> hm, i guess it might be something to do with builtins vs not
<My_Hearing> Does sleep work in your shell?
<theoros> sure
My_Hearing is now known as Mon_Ouie
swav has joined #ruby-lang
kvs has quit [Ping timeout: 248 seconds]
<Mon_Ouie> Not sure about your problem, but a simple work-around: use Kernel#sleep instead of using an external program
geopet has quit [Quit: geopet]
<theoros> well, i'm not trying to sleep :)
<theoros> system("time -p ./foo/bar") and i guess it can't see `time` because it's a builtin or something
kvs has joined #ruby-lang
* apeiros_ can see the time output just fine
<theoros> yes, this works fine on a different machine (OS X), but on this machine type -a time says it's a keyword, so that's useful
<andrewvos> Maybe rvm patches 'time' too
<theoros> i guess i will rely on Benchmark.realtime and assume the cost of system() is negligible
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
swav has quit [Ping timeout: 248 seconds]
mercwith1mouth has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
dustint has quit [Ping timeout: 256 seconds]
dustint has joined #ruby-lang
kvs has quit [Quit: ZNC - http://znc.in]
krohrbaugh has joined #ruby-lang
datanoise has joined #ruby-lang
adambeynon has joined #ruby-lang
jbsan has joined #ruby-lang
fushi has joined #ruby-lang
crankharder has quit [Remote host closed the connection]
solars has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
ddd has quit [Read error: Connection reset by peer]
ddd has joined #ruby-lang
ddd is now known as Guest71844
mistym has quit [Read error: Connection reset by peer]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
dankest has quit [Quit: Linkinus - http://linkinus.com]
dankest_ios has joined #ruby-lang
dankest_ios has quit [Client Quit]
yobiflare has joined #ruby-lang
Stilo has joined #ruby-lang
dankest has joined #ruby-lang
skade has joined #ruby-lang
kvs has joined #ruby-lang
fushi has quit [Quit: fushi]
gustavnils has quit [Quit: Textual IRC Client: www.textualapp.com]
crankharder has joined #ruby-lang
lcdhoffman has joined #ruby-lang
s1kx has joined #ruby-lang
s1kx has quit [Changing host]
s1kx has joined #ruby-lang
anonymuse has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
agile has joined #ruby-lang
goatish_mound is now known as rsl
kvs has quit [Quit: ZNC - http://znc.in]
kvs has joined #ruby-lang
dustint_ has joined #ruby-lang
beiter has quit [Quit: beiter]
stevechiagozie has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby-lang
dustint has quit [Ping timeout: 276 seconds]
nkr has quit [Quit: Linkinus - http://linkinus.com]
mercwith1mouth has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
yobiflare has quit [Ping timeout: 256 seconds]
stevechiagozie has joined #ruby-lang
carloslopes has joined #ruby-lang
Bosox20051 has quit [Quit: Leaving]
chendo_ has joined #ruby-lang
Ridders24 has quit [Ping timeout: 276 seconds]
carloslopes has quit [Ping timeout: 248 seconds]
chendo_ has quit [Client Quit]
lcdhoffman has quit [Quit: lcdhoffman]
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
joevandyk has joined #ruby-lang
workmad3 has joined #ruby-lang
scampbell has quit [Quit: Leaving]
Ridders24 has joined #ruby-lang
crudson has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Ridders24 has quit [Ping timeout: 256 seconds]
drbrain has joined #ruby-lang
febuiles has joined #ruby-lang
febuiles has quit [Changing host]
febuiles has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
drbrain has quit [Client Quit]
drbrain has joined #ruby-lang
mr_white has quit [Remote host closed the connection]
drbrain has quit [Client Quit]
drbrain has joined #ruby-lang
drbrain has quit [Client Quit]
drbrain has joined #ruby-lang
drbrain has quit [Client Quit]
yobiflare has joined #ruby-lang
febuiles has quit [Quit: febuiles]
kurko__ has joined #ruby-lang
Badabing|2 has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 248 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
Squarepy has quit [Quit: Leaving]
dankest has quit [Ping timeout: 252 seconds]
drbrain has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
jonahR has joined #ruby-lang
dustint_ has quit [Ping timeout: 240 seconds]
bzalasky_ has quit [Remote host closed the connection]
drbrain has quit [Client Quit]
methods has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
datanoise has quit [Ping timeout: 252 seconds]
soypirate has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
idkazuma has joined #ruby-lang
nXqd has quit [Ping timeout: 252 seconds]
__BigO__ has quit [Remote host closed the connection]
rc- has joined #ruby-lang
mjio has joined #ruby-lang
yfeldblum has joined #ruby-lang
Banistergalaxy has quit [Remote host closed the connection]
drbrain_ is now known as drbrain
lcdhoffman has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
asdfqwer has quit [Read error: Operation timed out]
Banistergalaxy has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Badabing|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
joevandyk has quit [Quit: joevandyk]
joevandyk has joined #ruby-lang
methods has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
davidbalbert is now known as davidbalber|away
solars has quit [Ping timeout: 264 seconds]
joevandyk has quit [Quit: joevandyk]
therod has joined #ruby-lang
athaeryn has joined #ruby-lang
athaeryn has left #ruby-lang [#ruby-lang]
enebo has quit [Quit: enebo]
datanoise has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
dankest has joined #ruby-lang
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has quit [Remote host closed the connection]
davidbalber|away is now known as davidbalbert
havenwood has joined #ruby-lang
stevechiagozie has quit [Quit: Computer has gone to sleep.]
benanne has quit [Quit: kbai]
Banistergalaxy has quit [Ping timeout: 248 seconds]
davidbalbert is now known as davidbalber|away
dzhulk has quit [Quit: Leaving.]
Banistergalaxy has joined #ruby-lang
havenwood has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
beho has quit [Remote host closed the connection]
retro|cz has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
imajes has quit [Excess Flood]
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
imajes has joined #ruby-lang
anonymuse has quit [Quit: Leaving...]
tbuehlmann has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
arubin has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dankest has quit [Quit: Leaving...]
apeiros_ has quit [Remote host closed the connection]
srbaker has quit [Client Quit]
huydx_ has joined #ruby-lang
rue has quit [Read error: Connection reset by peer]
rue has joined #ruby-lang
huydx has quit [Ping timeout: 260 seconds]
huydx_ is now known as huydx
tylersmith has left #ruby-lang [#ruby-lang]
tylersmith has joined #ruby-lang
tylersmith has quit [Read error: Connection reset by peer]
retro|cz has joined #ruby-lang
Averna has joined #ruby-lang
jonahR has quit [Quit: jonahR]
tylersmith has joined #ruby-lang
earthquake has quit [Quit: earthquake]
baba has joined #ruby-lang
megha has quit [Ping timeout: 255 seconds]
stevechiagozie has joined #ruby-lang
Rarrikins_w has joined #ruby-lang
bzalasky_ has joined #ruby-lang
<zenspider> theoros: try system("time", "sleep", "2")
<zenspider> theoros: or: system("time sleep 2;")
Rarrikins has quit [Ping timeout: 255 seconds]
<zenspider> theoros: or: system("/usr/bin/time sleep 2")
<zenspider> the latter is what I'm currently using because I want -l