ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
tenderlove has quit [Remote host closed the connection]
igotnolegs has joined #ruby-lang
Nisstyre has quit [Quit: Leaving]
sora_h is now known as s0ra_h
Nisstyre has joined #ruby-lang
s0ra_h is now known as sora_h
scampbell has quit [Remote host closed the connection]
sailias has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
Nisstyre has quit [Ping timeout: 246 seconds]
neoesque has joined #ruby-lang
dymk2 has joined #ruby-lang
<dymk2> Is it possible to access public class properties with the scope operator in Ruby?
<dymk2> EG, class Foo @@bar = "baz" end; Foo::bar?
dymk2 is now known as dymk
<apeiros> no
<apeiros> they're not properties either
<apeiros> :: is only for namespaces (that's modules & classes only) and method invocation (don't use it for method invocation, though)
fgomez has quit [Quit: Lost terminal]
<dymk> Alright, thanks
<aef> in C++ an iostream has a method #peek which hints the next character on the stream without removing it and without blocking. this way i could check if the next read would block. is there a way to do this in Ruby?
Nisstyre has joined #ruby-lang
<apeiros> aef: I'd guess getc & ungetc
<apeiros> it might be wise to change the way to tackle the problem from C++ to ruby…
<aef> i'm not a C++ programmer. but i have never found a good solution for this in Ruby
<apeiros> I wonder what problem you're trying to solve…
perryh_away is now known as perryh
<aef> i find myself often in the situation in which i need to check if a read would block to avoid blocking. otherwise i would need threading which increases complexity heavily
<aef> currently its an external process, kind of a shell, into which i send a command (a line) and want to receive all the output which is generated afterwards
<apeiros> well, getc would block too
<apeiros> read_nonblock
<apeiros> *sob* I really need to get that gist up on why cross-posting is rude and you shouldn't do it…
lsegal has joined #ruby-lang
<aef> read_nonblock is kind of unhandy. is there a good reason why there is no readline_nonblocking?
<apeiros> I'm sorry but I refuse to help cross-posters.
<aef> what is a cross poster?
<apeiros> somebody who posts the same question in multiple places.
<aef> well, why is that a problem now?
<headius> ok, my turn to ask a question
<apeiros> it's rude.
<headius> this code reads '1234567890' on MRI and '' on JRuby
<headius> File.open('foo', 'w') {|f| f.write('1234567890') }
<headius> File.open('foo', {:mode => 'a+'}) {|f| p f.read}
<headius> rdoc says a+ should position at end of file if it exists, so I'm confused why MRI would not also be EOF and produce ''
<apeiros> you're not keeping the people in the different channels that you ask up to date. people waste time. you probably don't even read answers anymore once you've got your answer somewhere else. (and don't go on to tell me that you're that one out of thousand who's different - you'd have announced that you ask in other places if you were)
ilyam has quit [Quit: ilyam]
<headius> am I crazy or does MRI's behavior not make any sense, going on what the rdoc says
ilyam has joined #ruby-lang
<aef> well maybe you're right, but I've never seen anyone having a problem with that
sora_h is now known as s0ra_h
<apeiros> headius: different pointers for read & write? just guessing, though
<headius> hmm, that would be weird
<headius> it's a theory I guess
<apeiros> aef: oh how unexpected… how many knew you were cross-posting?
<headius> it just says "positions at the end of the file"
<apeiros> and yeah, thanks for making me nobody.
<apeiros> headius: I'd have the same expectation as you
<apeiros> if that's any help
<headius> "a+" | Read-write, starts at end of file if file exists,
nofxxx has quit [Remote host closed the connection]
<headius> it's not, but I appreciate it :)
<aef> apeiros: well if they don't know, i guess they don't care anyway
<headius> actually, I suppose it is
<headius> means I should probably take it to ML
<apeiros> headius: the moment you write the position is at the end, though
<apeiros> and read will be ""
<headius> mmm
<headius> I'll have a look at how MRI actually handles this case
<headius> if I can find it
<apeiros> aef: not knowing why the behavior of somebody sucks is not equal to the behavior of that somebody not sucking
<headius> it seems unexpected to me
<apeiros> headius: I can't find a second pointer. so I guess the a+ takes effect only at the first write
<headius> weird
<apeiros> but yes, I'd say the only conclusive answer is in the source
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
<headius> this is either some funky ruby mode or a libc mode I never knew before
ilyam has quit [Ping timeout: 248 seconds]
<apeiros> aef: also the way you deal with being confronted about your behavior is telling IMO.
<aef> apeiros: i think you were just looking for a reason to start a fight. a lot of people on IRC do that. i think that's rude.
<headius> ok, so it is a libc flag
<apeiros> aef: I'm not. so don't make it into one.
<headius> docs there look like MRI description though
<apeiros> aef: I told you I won't help you. *you* asked why. I told you. so stop that line right there.
<aef> apeiros: actually you helped me, and afterwards you told me that you don't help me.
<apeiros> aef: yes, the moment I noticed you were cross-posting.
crudson1 has joined #ruby-lang
<headius> apeiros: you got it, if that first answer is correct
gix has quit [Ping timeout: 248 seconds]
<headius> definitely seems to contradict the docs though
<headius> both libc and ruby
<apeiros> headius: mhm, docs could be improved on that one I'd say
s0ra_h is now known as sora_h
<headius> hah, I found these comments in JRuby source
<headius> // TODO: append should set the FD to end, no? But there is no seek(int) in libc!
<headius> //if (modes.isAppendable()) seek(0, Stream.SEEK_END);
<headius> from the heady days of reading libc source to figure this shit out
<apeiros> ^^
<apeiros> sounds like days full of fun :-p
<apeiros> well, my fun is going to end soon…
<apeiros> I fear I won't get ruby 1.9.3 on my synology anytime soon :(
<headius> I guess I didn't understand the behavior then either
<apeiros> hmmm… but you being here gives me an idea…
<apeiros> maybe there's a sane JVM for synology
<apeiros> which I could use to run jruby…
<apeiros> I fear for its puny amounts of ram, though :-/
<headius> synology?
gix has joined #ruby-lang
<apeiros> NAS
<headius> ahh
<apeiros> with cpu & ram to run a couple of things
QoQOoO has joined #ruby-lang
<apeiros> 1.6ghz cpu & 512mb ram
<headius> what does it run?
<headius> OS-wise
<apeiros> busybox
<headius> 512 is not a lot, indeed
<headius> what's the actual processor?
<headius> ARM?
<apeiros> Marvell Kirkwood mv6282 1.6Ghz ARM Processor (Marvell ARMADA 300)
<apeiros> yes
<apeiros> you mean this is the kind of env where I should try my C webframework? :D
<headius> oh yes, I've looked at these processors
<scientes> why are we talking about ARM?
<apeiros> scientes: because I want to run ruby on it
<apeiros> there's a ruby 1.9.1, but who in his right mind wants 1.9.1?
<scientes> apeiros, it works great
<apeiros> scientes: you have a synology with ruby on it?
<scientes> apeiros, "ruby1.9.1" in debian/ubuntu IS 1.9.3
mouzone_ has quit [Changing host]
mouzone_ has joined #ruby-lang
mouzone_ is now known as muzone
<apeiros> scientes: this ain't debian/ubuntu
<scientes> that just the so-name apeiros ---ABI compat with 1.9.1
<apeiros> but *maybe* ipkg uses the same stupid naming…
<scientes> oh, well then maybe its actually 1.9.1
<lianj> apeiros: why not compile it?
<scientes> apeiros, probably, its not stupid
<headius> " For these offerings, development is free, but royalties are required upon deployment on anything other than general purpose systems. "
<headius> no idea what that means
<headius> but it sounds like fiddling around with it would be fine
<apeiros> scientes: ok. let me rephrase: confusing
<scientes> apeiros, its that ruby C modules built for 1.9.3 will run on 1.9.1
woollyams has joined #ruby-lang
<scientes> apeiros, its only confusing, cause they didn't fallow GNU versioning, in that they broke binary compatibility between 1.9 and 1.9.1 (probably for good reasons)
<headius> jruby works fine on those embedded javase from oracle
<apeiros> headius: cool
<apeiros> already 0300 here, though. So I'll try it when I come back on sunday
<apeiros> headius: thanks for the link! :)
<scientes> and then didn't call the next version 1.9.1.2, which would also be sane, if quite long
<headius> sure :)
<scientes> and is versioning i've seen before too, like v8 js uses that
<apeiros> scientes: sadly it's indeed 1.9.1:
<apeiros> ruby -v
<apeiros> ruby 1.9.1p243 (2009-07-16 revision 24175) [arm-linux-eabi]
<apeiros> :'(
<scientes> apeiros, why are you using ipkg on such a powerful system?
<apeiros> headius: Java SE Embedded 7, the topmost I guess?
<scientes> use emdebian
<scientes> if you have limited space
savage- has quit [Remote host closed the connection]
<apeiros> scientes: limited space? haha, it's a NAS, it's got 12TB of space :) ram & cpu are the issue. I won't run emdebian as synology's software probably won't run on it :(
<headius> apeiros: yeah, that would perform best
<headius> invokedynamic etc
<scientes> apeiros, it probably would, you just just run debian in a chroot
<scientes> and then have sanity
<apeiros> great. will definitively give it a shot on sunday
<scientes> its all linux
<scientes> which is the beauty
<scientes> otherwise just install gcc, and compile ruby from source
<apeiros> scientes: yeah, tried that. running into problems, though.
<apeiros> scientes: but if you've got experience there, I'll probably love to talk to you, should the jruby approach fail…
<scientes> apeiros, if you can't get ruby compiled you will never get c extensions compiled, and you need a sane environment that a chroot will give you
<scientes> and jruby also needs to compile c extenstion
<apeiros> phew, chroot is installed. at least one thing…
<headius> most of jruby's extensions are not in C and require no compilations
<scientes> apeiros, its probably just busybox chroot, anyways its just a wrapper for a syscall
<apeiros> the only relevant gems with C extensions are available in a jruby-c-free-version afaik
<scientes> apeiros, install debootstrap via ar and tar (manually from deb package)
<scientes> and then unpack a debian chroot
<apeiros> (nokogiri, imagemagick, json)
sora_h is now known as s0ra_h
<scientes> apeiros, what OS is this?
<apeiros> busybox
Jay_Levitt has quit [Ping timeout: 246 seconds]
<scientes> well i know that
<headius> imagemagick might be the only sticker, but depending on what you want to do with it there's alternatives
<scientes> but with ipkg?
<headius> the others are fine
<scientes> you would be alot happier just installing debian
<lianj> just use archlinuxarm in the chroot..
tomb_ has quit [Ping timeout: 246 seconds]
<apeiros> ok. I'll drop those words when I'm back on sunday. but now I've got to get the 3h of sleep that I've got left :)
<apeiros> cya guys & thx for showing me some options
retro|cz has joined #ruby-lang
cczona has joined #ruby-lang
cczona has left #ruby-lang [#ruby-lang]
<headius> have fun
apeiros has quit [Remote host closed the connection]
<headius> a
s0ra_h is now known as sora_h
tomb_ has joined #ruby-lang
towski has quit [Remote host closed the connection]
seanstickle has quit [Quit: Nihil sub sole novum]
srbartlett has joined #ruby-lang
sora_h is now known as s0ra_h
<headius> ah-ha, found it
<headius> we had a File.open path that seeked to end of file right away
<headius> which it seems like we SHOULD do, but apparently libc docs are lying
dymk2 has joined #ruby-lang
ilyam has joined #ruby-lang
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
dymk has quit [Ping timeout: 246 seconds]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
ilyam has quit [Quit: ilyam]
petercooper has joined #ruby-lang
srbartlett has quit [Remote host closed the connection]
QoQOoO has quit [Read error: Connection reset by peer]
woollyams has quit [Quit: Computer has gone to sleep.]
QoQOoO has joined #ruby-lang
QoQOoO has quit [Client Quit]
QoQOoO has joined #ruby-lang
headius has quit [Quit: headius]
Bwild has joined #ruby-lang
deryl has joined #ruby-lang
richardjortega has left #ruby-lang [#ruby-lang]
QoQOoO has quit [Read error: Connection reset by peer]
headius has joined #ruby-lang
JustinCampbell has quit [Remote host closed the connection]
QoQOoO has joined #ruby-lang
qpingu has quit [Quit: Leaving.]
s0ra_h is now known as sora_h
QoQOoO has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
sailias has quit [Ping timeout: 246 seconds]
petercooper has quit [Remote host closed the connection]
QoQOoO has joined #ruby-lang
fgomez has quit [Quit: Lost terminal]
fgomez has joined #ruby-lang
fgomez has quit [Client Quit]
sepp2k has joined #ruby-lang
sora_h is now known as s0ra_h
jackhammer|AFK is now known as jackhammer2022
andrewhl has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
orend_ has joined #ruby-lang
jtoy has quit [Quit: jtoy]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
fgomez has joined #ruby-lang
cha1tanya has quit [Ping timeout: 252 seconds]
crudson1 has left #ruby-lang [#ruby-lang]
macmartine has joined #ruby-lang
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
weeb1e_ has joined #ruby-lang
weeb1e has quit [Ping timeout: 245 seconds]
NuclearLucifer has quit [Ping timeout: 248 seconds]
ozzloy has quit [Remote host closed the connection]
ozzloy_ has joined #ruby-lang
tomb_ has joined #ruby-lang
tomb_ has quit [Client Quit]
NuclearLucifer has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
wpaulson has joined #ruby-lang
banisterfiend has joined #ruby-lang
yugui_zzz is now known as yugui
banisterfiend has quit [Ping timeout: 246 seconds]
QoQOoO has quit [Remote host closed the connection]
deryl has quit [Quit: deryl]
QoQOoO has joined #ruby-lang
QoQOoO has quit [Read error: Connection reset by peer]
neoesque has quit [Quit: Bye!]
macmartine has quit [Quit: Computer has gone to sleep.]
tomb_ has joined #ruby-lang
s0ra_h is now known as sora_h
krz has joined #ruby-lang
woollyams has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
yugui is now known as yugui_zzz
benjammin891 has joined #ruby-lang
charlies_ has joined #ruby-lang
mjbjr has joined #ruby-lang
jtoy has joined #ruby-lang
neoesque has joined #ruby-lang
diegoviola has quit [Quit: leaving]
iamjarvo has joined #ruby-lang
QoQOoO has joined #ruby-lang
QoQOoO has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
mjbjr has left #ruby-lang ["Leaving"]
rippa has joined #ruby-lang
cantonic_ has joined #ruby-lang
srbartlett has joined #ruby-lang
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
setmeaway has quit [Ping timeout: 246 seconds]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
srbartlett has quit [Remote host closed the connection]
QoQOoO has joined #ruby-lang
dhruvasagar has joined #ruby-lang
QoQOoO has quit [Remote host closed the connection]
Z33K|Lux has joined #ruby-lang
setmeaway has joined #ruby-lang
yugui_zzz is now known as yugui
benjammin891 has quit [Quit: Leaving]
savage- has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
headius has quit [Quit: headius]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby-lang
jackhammer2022 has quit [Read error: Connection reset by peer]
jackhammer2022 has joined #ruby-lang
kvirani has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
tomb_ has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
brianpWins has joined #ruby-lang
qpingu has joined #ruby-lang
ruurd has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
banisterfiend has joined #ruby-lang
Z33K|Lux has quit []
QoQOoO has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
ruurd has quit [Quit: Leaving...]
QoQOoO has quit []
QoQOoO has joined #ruby-lang
Fretta has quit [Quit: Fretta]
woollyams has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 245 seconds]
x0F has quit [Read error: Connection reset by peer]
threedaymonk has quit [Ping timeout: 240 seconds]
threedaymonk has joined #ruby-lang
Silex has quit [Ping timeout: 240 seconds]
x0F has joined #ruby-lang
Silex has joined #ruby-lang
banisterfiend has joined #ruby-lang
dc5ala has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 264 seconds]
krz has quit [Quit: krz]
outsmartin has joined #ruby-lang
headius has joined #ruby-lang
QoQOoO has quit [Remote host closed the connection]
jtoy has quit [Quit: jtoy]
charlies_ is now known as charliesome
andrewhl has quit [Remote host closed the connection]
outsmartin has quit [Quit: Leaving.]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dymk2 has quit [Ping timeout: 246 seconds]
areil has joined #ruby-lang
pemeon has joined #ruby-lang
iamjarvo has joined #ruby-lang
perryh is now known as perryh_away
ruurd has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
yugui is now known as yugui_zzz
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
yugui_zzz is now known as yugui
qpingu has quit [Quit: Leaving.]
yugui is now known as yugui_zzz
anildigital has quit [Changing host]
anildigital has joined #ruby-lang
workmad3 has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 264 seconds]
QoQOoO has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
ruurd has quit [Quit: Leaving...]
iamjarvo has quit [Ping timeout: 255 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
fgomez has quit [Ping timeout: 245 seconds]
gsav has quit [Ping timeout: 245 seconds]
andkerosine has joined #ruby-lang
<andkerosine> ObjectSpace.each_object.to_a.select { |o| o.to_s == 'main' }.size # => 3
<andkerosine> What's going on here?
gsav has joined #ruby-lang
<drbrain> andkerosine: there's main (the object) and "main" the string that main (the object) prints
<drbrain> I'm not sure about the third one
<drbrain> something most be duping the string, since I see [String, Object, String] if I print their classes
<drbrain> String#to_s doesn't dup
<andkerosine> ObjectSpace.each_object.to_a.select { |o| o.to_s.size == 4 && o.to_s[0..2] == 'mai' } # => ["main", main]
<andkerosine> Which means ObjectSpace was picking up on the newly declared string... from within the enumeration?
<drbrain> probably
<andkerosine> Are blocks eagerly evaluated?
zmack has joined #ruby-lang
<andkerosine> I mean, they must be for that to be case, but I can't quite wrap my head around how that would work under the hood.
<drbrain> to_a should nail it down, but there may be an extra copy for some reason
mssola has joined #ruby-lang
tooky has joined #ruby-lang
the-newsman has joined #ruby-lang
<the-newsman> i cannt start loading file, loading module . i dunno why the irb gives me error message
<the-newsman> aany1 to help me ?
<andkerosine> Have you recently installed Rubinius?
<andkerosine> drbrain: I assumed at first that perhaps a separate interpreter gets started up for a moment to handle some strange edge cases, but main having a to_s makes much more sense.
tooky has quit [Remote host closed the connection]
<drbrain> andkerosine: I haven't
tooky has joined #ruby-lang
<drbrain> the-newsman: you have given no specifics, such as what you typed or what error you recieved
<andkerosine> Heh, my question was for the-newsman.
<andkerosine> Installing Rubinius gave me a bit of trouble with certain imports at first, so I thought that might be his issue.
QoQOoO has quit [Remote host closed the connection]
neoesque has quit [Quit: Bye!]
<drbrain> it's my bedtime
<andkerosine> I will save my other interesting question for some other time, then. : )
<andkerosine> Rest well.
tooky has quit [Ping timeout: 260 seconds]
sora_h is now known as s0ra_h
ruurd has joined #ruby-lang
wpaulson has quit [Ping timeout: 252 seconds]
wpaulson has joined #ruby-lang
henrikhodne has joined #ruby-lang
cantonic has quit [Quit: cantonic]
joast has quit [Ping timeout: 250 seconds]
zmack has quit [Remote host closed the connection]
banisterfiend has joined #ruby-lang
tbuehlmann has joined #ruby-lang
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
pemeon has quit [Read error: Connection reset by peer]
tonni has quit [Remote host closed the connection]
outsmartin has joined #ruby-lang
zmack has joined #ruby-lang
Abdulsattar has joined #ruby-lang
s0ra_h is now known as sora_h
Abdulsattar has quit [Quit: Leaving]
heftig has quit [Ping timeout: 240 seconds]
heftig has joined #ruby-lang
yugui_zzz is now known as yugui
neoesque has joined #ruby-lang
sora_h is now known as s0ra_h
yugui is now known as yugui_zzz
postmodern has quit [Quit: Leaving]
lbrent has joined #ruby-lang
zmack has quit [Remote host closed the connection]
pemeon has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Remote host closed the connection]
henrikhodne has quit [Quit: Computer has gone to sleep.]
jumpingcloud has quit [Ping timeout: 260 seconds]
jumpingcloud has joined #ruby-lang
s0ra_h is now known as sora_h
ryez has joined #ruby-lang
Axsuul has quit [Ping timeout: 255 seconds]
jumpingcloud has quit [Ping timeout: 245 seconds]
ruurd has quit [Quit: Leaving...]
jumpingcloud has joined #ruby-lang
solars has joined #ruby-lang
lele has quit [Ping timeout: 260 seconds]
stardiviner has joined #ruby-lang
whyme has joined #ruby-lang
kristofferrr has joined #ruby-lang
deryl has joined #ruby-lang
jxie has quit [Quit: leaving]
<andkerosine> methods - Object.methods # => [:public, :private, :include]
<andkerosine> Where's :protected?
thone has joined #ruby-lang
<whitequark> andkerosine: if you're executing that at toplevel, then it's not forwarded
<whitequark> I dunno why
jumpingcloud has quit [Ping timeout: 264 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
<andkerosine> Is it just that main's setup never makes use of it?
bglusman has joined #ruby-lang
<whitequark> mhm
<whitequark> define "main's setup"
thone_ has quit [Ping timeout: 248 seconds]
<whitequark> the code which sets up `main' does not define this method, yes
<andkerosine> Right, but it /does/ define #public and #private, right?
<whitequark> exactly
jumpingcloud has joined #ruby-lang
<andkerosine> #protected isn't defined on Module or Class either, so where does it come from?
<whitequark> > Class.private_methods.grep /protected/
<whitequark> => [:protected]
<whitequark> or, more strictly
<andkerosine> Ah, duh. I was only checking #methods.
<whitequark> > Kernel.private_methods(false).grep /protected/
<whitequark> actually, #public and #private are private too
<andkerosine> Kernel and main being disjunct seems... odd, at the very least.
<whitequark> bbl
<whitequark> well, main is a hack
<andkerosine> That'll do it. : )
<whitequark> and include,private,public are a hack too
<whitequark> I don't quite comprehend a reason for defining a private toplevel method.
<whitequark> maybe perl ancestry or so.
<andkerosine> Food for thought. Don't let me keep you.
jumpingcloud has quit [Ping timeout: 248 seconds]
fgomez has joined #ruby-lang
sepp2k has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
yugui_zzz is now known as yugui
ridders57354 has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
ridders57354 has quit [Quit: Page closed]
bglusman has quit [Remote host closed the connection]
iamjarvo has joined #ruby-lang
seanstickle has joined #ruby-lang
pemeon has quit [Read error: Connection reset by peer]
joast has joined #ruby-lang
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
outsmartin has quit [Quit: Leaving.]
htroyack has joined #ruby-lang
n9yty has joined #ruby-lang
Leeky is now known as Leeky_afk
Leeky_afk is now known as Leeky
davidbalbert is now known as stud_beefpile
maxwell has joined #ruby-lang
stud_beefpile is now known as davidbalbert
maxwell has left #ruby-lang [#ruby-lang]
maxwell has joined #ruby-lang
maxwell has quit [Client Quit]
andrewhl has joined #ruby-lang
<ryez> \using Ruby in data warehouse? any example?
iamjarvo has quit [Ping timeout: 255 seconds]
<ryez> oh, I don't need an example, just want to know if there's anyone doing it with ruby
groszek has joined #ruby-lang
ruurd has joined #ruby-lang
<erikh> zzak: you there?
<groszek> hi. how would i go if i need to force numeric type to be UInt32? e.g. in this: http://slexy.org/raw/s21tZWWkqh i need to make sure "h" is uint32 ...
<groszek> otherwise the results are wrong
<lianj> you want a binary string out of it?
<groszek> normally it returns a number in uint range
<groszek> eg. "test" => 4282592 (this works as expected), "test test" => -1545581088 (and here i have broken result of 167600963210720)
<lianj> ["test test".bytes.inject(0){|i,e| (i*0x21)+e }].pack("I").unpack("i")[0]
<lianj> btw thats not uint
<groszek> hmmm interresting solution, thank you
<groszek> its an algorithm i'm rewriting 3rd time, from python to javascript to ruby, haha.
jtoy has joined #ruby-lang
jtoy has quit [Client Quit]
verbad has joined #ruby-lang
verbad has quit [Client Quit]
Defusal_ has joined #ruby-lang
yugui is now known as yugui_zzz
verbad has joined #ruby-lang
rippa has joined #ruby-lang
Defusal has quit [Ping timeout: 260 seconds]
verbad_ has joined #ruby-lang
kitallis has joined #ruby-lang
ridders24 has joined #ruby-lang
verbad has quit [Client Quit]
<ridders24> hey guys, im struggling with a simple script to show file size of a directory - http://pastie.org/4295085 it wont show C:'s file size and keeps seeking random files and then errors
<ridders24> ive also tried Dir.glob, but the result =0
verbad has joined #ruby-lang
neoesque has quit [Quit: Bye!]
verbad has quit [Client Quit]
bglusman has joined #ruby-lang
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ridders24> any ideas?
bglusman has quit [Remote host closed the connection]
tomb_ has joined #ruby-lang
bglusman has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
tomb_ has quit [Client Quit]
bglusman has quit [Remote host closed the connection]
areil has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 260 seconds]
Albot has joined #ruby-lang
Albot has left #ruby-lang [#ruby-lang]
<andrewvos> ridders24: Try "C:/" ?
ruurd has quit [Quit: Leaving...]
outsmartin has joined #ruby-lang
gsav has joined #ruby-lang
Cidiomar has joined #ruby-lang
<the-newsman> hello guys, any1 here itnersted in modules and mixins ?
lsegal has joined #ruby-lang
<the-newsman> lsegal
<lsegal> the-newsman
<ridders24> andrewvos: ive tried that, still does not work
<andrewvos> lsegal
<lsegal> andkerosine
<lsegal> oh damn
<andrewvos> groszek
<lsegal> completion fail
<lsegal> are we playing a highlight game?
<andrewvos> Joke ruined. I'm outta here.
<lsegal> me too
lsegal has quit [Client Quit]
<andrewvos> ridders24: Try Dir.glob("C:/*")
<andrewvos> ridders24: Try Dir.glob("C:/**/*") if you want to recursively search all directories in a path.
<ridders24> nope still does it
<andrewvos> ridders24: Let's see your new code
<ridders24> andrewvos: im trying to write a hostmonitor script to display available drive size on networked servers and UNC paths, is this the best aproach im trying?
<the-newsman> andkerosine, can i private u ?
<the-newsman> andrewvos, can i private u ?
<andrewvos> the-newsman: No
<andrewvos> ridders24: What about `du`?
<the-newsman> andrewvos then can u help me in here ?
<ridders24> andrewvos: what du?
<andrewvos> the-newsman: Maybe. I'm not promising anything though
<andrewvos> ridders24: Oh wait sorry, Windows.
<the-newsman> andrewvos , http://pastebin.com/8L8crqSp when i load this file and i puts( greet )i got error message
<canton7> ridders24, Find.find doesn't add on the beginning of the path
<ridders24> andrewvos: http://pastie.org/4295085
<canton7> although actually File.stat shouldn't care...
<andrewvos> ridders24: Use File.size(f)?
<andrewvos> Oh wait it does the same thing
<ridders24> ok
<andrewvos> the-newsman: Use "self.greet" instead of "MYModule.greet"
<rue> For Windows, you can use rand as a du replacement
<ridders24> i thought i had a script that did this with win32ole but i cant seem to find it
<andrewvos> oh rue
<ridders24> or get the examples on the net to work
arooni-mobile has joined #ruby-lang
<rue> Well, it’s true…
<rue> Ooh, Asterix in the Olympics
<andrewvos> rue: You have been banned from the Olympics.
<rue> Wouldn’t surprise me
<andrewvos> Damnit I said it too.
wallerdev has joined #ruby-lang
<ridders24> andrewvos: what can I use instead?
sandbags has quit [Remote host closed the connection]
<the-newsman> any1 to help me for modules ?
<the-newsman> andrewvos i did not ask what should i use. i asked why puts(greet) give error
<andrewvos> the-newsman: Pro Tip: Don't be a dick when someone helps you.
<the-newsman> andrewvos ok i am pussy. sorry :D
<the-newsman> but actually i am doing as a book says.
<the-newsman> it should give me no error
agilob has quit [Ping timeout: 252 seconds]
<the-newsman> i wonder why the refernce give this error
cha1tanya has joined #ruby-lang
cha1tanya has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
cha1tanya has quit [Quit: आलोच..]
agilob has joined #ruby-lang
scampbell has joined #ruby-lang
verbad_ has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
agilob has quit [Ping timeout: 252 seconds]
cantonic has joined #ruby-lang
agilob has joined #ruby-lang
n9yty has quit [Quit: n9yty]
wallerdev has quit [Quit: wallerdev]
cantonic has quit [Client Quit]
Asher has quit [Quit: Leaving.]
agilob has quit [Ping timeout: 252 seconds]
agilob has joined #ruby-lang
<andrewvos> rue: Are you Danish?
brianpWins has joined #ruby-lang
<rue> No
<andrewvos> Damn, may have to rethink my response. Was going to call you a "dirty Danish liquorice monger"
agilob has quit [Ping timeout: 252 seconds]
brianpWins has quit [Quit: brianpWins]
Cidiomar has quit [Quit: Tchau pra quem fica]
ruurd has joined #ruby-lang
ridders24 has quit [Ping timeout: 264 seconds]
bglusman has joined #ruby-lang
agilob has joined #ruby-lang
brianpWins has joined #ruby-lang
agilob has quit [Ping timeout: 252 seconds]
whyme has quit [Quit: WeeChat 0.3.8]
bglusman has quit [Remote host closed the connection]
jackhammer2022 has joined #ruby-lang
agilob has joined #ruby-lang
sepp2k has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jxie has joined #ruby-lang
agilob has quit [Ping timeout: 252 seconds]
agilob has joined #ruby-lang
bglusman has joined #ruby-lang
outsmartin has quit [Quit: Leaving.]
<rue> They might be, for all I know
<rue> But, indubitably, liquorice (and salmiac) is dominated by the Finns, Swedes, and Netherlandese
bglusman has quit [Remote host closed the connection]
orend_ has quit [Ping timeout: 245 seconds]
S2kx has quit [Read error: Connection timed out]
n9yty has joined #ruby-lang
n9yty has quit [Client Quit]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
ryanf has quit [Ping timeout: 264 seconds]
frem has quit [Ping timeout: 244 seconds]
frem has joined #ruby-lang
gsav has quit [Ping timeout: 252 seconds]
jxie has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
kennyvb has joined #ruby-lang
ilyam has joined #ruby-lang
ilyam has quit [Client Quit]
seanstickle has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
cldwalker has quit [Quit: Connection closed for inactivity]
jstemmer has quit [Quit: leaving]
sora_h is now known as s0ra_h
neocoin has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
gsav has joined #ruby-lang
jxie has joined #ruby-lang
jxie has quit [Remote host closed the connection]
jxie has joined #ruby-lang
ryanf has joined #ruby-lang
ryanf has quit [Ping timeout: 255 seconds]
ridders24 has joined #ruby-lang
ryanf has joined #ruby-lang
kain has quit [Read error: Connection reset by peer]
havenn has joined #ruby-lang
kain has joined #ruby-lang
tbuehlmann has quit []
ruurd has joined #ruby-lang
verbad has joined #ruby-lang
ryanf has quit [Quit: leaving]
ruurd has quit [Client Quit]
ThatDudeGuy_ has joined #ruby-lang
havenn has quit [Remote host closed the connection]
ridders24 has quit [Quit: Leaving]
brianpWins has quit [Ping timeout: 240 seconds]
ThatDudeGuy_ has quit [Quit: Quit]
kitallis has joined #ruby-lang
verbad has quit [Remote host closed the connection]
headius has quit [Quit: headius]
ridders24 has joined #ruby-lang
<ridders24> how to do output my results into a html page?
seanstickle has quit [Quit: Nihil sub sole novum]
kennyvb has quit [Read error: Connection reset by peer]
kennyvb has joined #ruby-lang
<andrewvos> ridders24: Use sinatra?
Axsuul has joined #ruby-lang
qpingu has joined #ruby-lang
Asher has joined #ruby-lang
gsav has quit [Ping timeout: 260 seconds]
mssola has quit [Quit: Konversation terminated!]
iamjarvo has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
<erikh> zzak: ping ping
gsav has joined #ruby-lang
ridders24 has quit [Ping timeout: 248 seconds]
heftig has quit [Quit: leaving]
heftig has joined #ruby-lang
Hakon has joined #ruby-lang
<scientes> how should I cache open-uri?
<andkerosine> scientes: Single or repeat process?
<scientes> andkerosine, rails 2.3 controller
<scientes> youtube api calls
<andkerosine> MongoDB goes very well with saving JSON for later retrieval.
<erikh> set up a caching proxy?
<scientes> that overkill
<andkerosine> If you want to be able to query the JSON without making another API call, a database makes the most sense.
<andkerosine> You could simulate one with a hash, I suppose, but that might eat memory pretty quickly depending on how much data you're grabbing.
gsav has quit [Ping timeout: 255 seconds]
bglusman has joined #ruby-lang
<scientes> i also want second-request expiration, so when it expires it still send the stale info, but fetches the new one for the next request
<andkerosine> Add your own fields to the results?
<scientes> it just means it creates a thread to update the cache
headius has joined #ruby-lang
ridders24 has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
eddified has joined #ruby-lang
gsav has joined #ruby-lang
<eddified> found this little snippet on stackoverflow: str = "String"; str.chars.sort_by(&:downcase).join
<eddified> my question is, how does scoping work with the :downcase symbol so that it can be turned into a block? If I run this in irb, i would expect it to not work because downcase isn't a method on main. But it does work. I undertstand that '&' passes it as a block, but how does it find the correct String#downcase block to pass?
<Mon_Ouie> :downcase is a symbol, not a method
<eddified> right..
<eddified> ok, so how can it be turned into a block?
<eddified> is that what is going on? i thought the '&' means "turn this symbol into a block"
<Mon_Ouie> some_method(&obj) passes obj as a block to some_method, calling #to_proc on obj to convert it
<eddified> yeah....
<Mon_Ouie> So if you want to use some_method(&:foo), since :foo is a symbol, Symbol#to_proc must be defined
<eddified> what is this "#to_proc" you speak of? you mean, WhateverClass#to_proc ?
<Mon_Ouie> And Symbol#to_proc is basically proc { |recv, *args, &block| recv.public_send(self, *args, &block) }
<eddified> k, parsing
<eddified> ..
<eddified> thx
<eddified> neat.
<eddified> thanks
voker57 has quit [Read error: Connection reset by peer]
imajes has quit [Excess Flood]
andkerosine has left #ruby-lang [#ruby-lang]
imajes has joined #ruby-lang
brianpWins has joined #ruby-lang
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
bglusman has quit [Ping timeout: 248 seconds]
gsav has quit [Read error: Connection reset by peer]
andrewhl has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
ridders24 has quit [Quit: Leaving]
gsav has joined #ruby-lang
ruurd has joined #ruby-lang
headius has quit [Quit: headius]
rippa has quit [Ping timeout: 248 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #ruby-lang
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
igotnolegs has joined #ruby-lang
deryl has joined #ruby-lang
lele has joined #ruby-lang
jackhammer2022 has quit [Read error: Connection reset by peer]
the-newsman has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby-lang
kennyvb has left #ruby-lang [#ruby-lang]
coryf has joined #ruby-lang
lbrent has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby-lang
s0ra_h is now known as sora_h
iamjarvo has quit [Quit: Computer has gone to sleep.]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
sora_h is now known as s0ra_h
htroyack has quit [Excess Flood]
TheMoonMaster has quit [Excess Flood]
TheMoonMaster has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 260 seconds]
neocoin has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
kristofferrr has quit [Quit: ❤]
Kellin has quit [Ping timeout: 276 seconds]
woollyams has joined #ruby-lang
headius has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
coryf has quit [Remote host closed the connection]
brianpWins has quit [Read error: Connection reset by peer]
brianpWins has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
headius has quit [Quit: headius]
r0bby has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
robbyoconnor has quit [Ping timeout: 246 seconds]
jd has joined #ruby-lang
jd has quit [Changing host]
jd has joined #ruby-lang
Jade has quit [Ping timeout: 246 seconds]
qpingu has quit [Quit: Leaving.]
vish has joined #ruby-lang
arooni-mobile has joined #ruby-lang
vish has quit [Client Quit]
vish has joined #ruby-lang
htroyack has joined #ruby-lang
gregmoreno has joined #ruby-lang
ViperMaul has quit [Ping timeout: 245 seconds]
Rizzle has joined #ruby-lang
gregmore_ has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 245 seconds]
akira989 has quit [Remote host closed the connection]
<eddified> Mon_Ouie: ok, how does Symbol#to_proc get 'recv' ?
<eddified> ah i think i get it.
<eddified> i think i get it better this time.