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
ryanf has joined #ruby-lang
charlies_ has joined #ruby-lang
charlies_ is now known as charliesome
benanne has quit [Quit: kbai]
Assurbanipal has joined #ruby-lang
<seydar> drbrain: did you ever play with ruby-llvm?
AlHafoudh has quit [Quit: Computer has gone to sleep.]
nazty has joined #ruby-lang
ryanf has quit [Ping timeout: 264 seconds]
mjio has quit []
<drbrain> seydar: I haven't
<seydar> i really wish evan didn't have a family and instead spent his time on irc
<seydar> he is the wise wizard whom i seek
<drbrain> o_O
BlaXpirit has quit [Quit: Quit Konversation]
thinkdevcode has quit [Remote host closed the connection]
<seydar> that one's unrelated to evan and llvm
<drbrain> ha
seydar has quit [Quit: leaving]
kurko_ has joined #ruby-lang
kurko_ has quit [Client Quit]
kurko_ has joined #ruby-lang
Ale has joined #ruby-lang
Ale has left #ruby-lang [#ruby-lang]
thone has quit [Ping timeout: 246 seconds]
thone has joined #ruby-lang
havenn has joined #ruby-lang
ryanf has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
jackhammer2022 has joined #ruby-lang
mjio has joined #ruby-lang
sailias has joined #ruby-lang
ryanf has quit [Ping timeout: 252 seconds]
BigO_ has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
swarley has joined #ruby-lang
sailias has quit [Quit: Leaving.]
xyzodiac has joined #ruby-lang
codewrangler has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
codewrangler has quit [Remote host closed the connection]
Assurbanipal has quit [Quit: Konversation terminated!]
mjio has quit []
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
ryanf has joined #ruby-lang
swarley has quit [Ping timeout: 264 seconds]
ruby-lang619 has joined #ruby-lang
ryanf has quit [Ping timeout: 255 seconds]
ruby-lang619 has quit [Quit: Page closed]
justinram has joined #ruby-lang
blacktulip has quit [Read error: Operation timed out]
blacktulip has joined #ruby-lang
havenn has joined #ruby-lang
BigO_ has joined #ruby-lang
Croms has quit [Ping timeout: 265 seconds]
mjio has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
srbaker has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
Croms has joined #ruby-lang
havenn has quit [Remote host closed the connection]
Croms has quit [Read error: Connection reset by peer]
Dennis_ has joined #ruby-lang
postmodern has joined #ruby-lang
elephants has joined #ruby-lang
ryanf has joined #ruby-lang
thinkdevcode has joined #ruby-lang
elephants has quit [Remote host closed the connection]
devn has quit [Read error: Operation timed out]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
devn has joined #ruby-lang
no_i_wont has quit [Quit: ZNC - http://znc.sourceforge.net]
mephux has quit [Remote host closed the connection]
bryanl has quit [Quit: bryanl out]
no_i_wont has joined #ruby-lang
bryanl_ has joined #ruby-lang
bryanl_ is now known as bryanl
elephants has joined #ruby-lang
mephux has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 252 seconds]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
cantonic has quit [Quit: cantonic]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephant_ has joined #ruby-lang
elephant_ has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
meizaps has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
methods has joined #ruby-lang
Glass_saga has joined #ruby-lang
gregmore_ has joined #ruby-lang
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
elephants has quit [Read error: Connection reset by peer]
elephants has joined #ruby-lang
elephants has quit [Remote host closed the connection]
elephants has joined #ruby-lang
elephants has left #ruby-lang [#ruby-lang]
lcdhoffman has joined #ruby-lang
hahuang65 has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
VegetableSpoon has quit [Quit: Leaving]
ryanf has joined #ruby-lang
spuk has quit [Changing host]
spuk has joined #ruby-lang
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
svyatov has quit [Quit: svyatov]
Fretta has joined #ruby-lang
ryanf has quit [Ping timeout: 264 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Client Quit]
jayne has quit [Read error: Connection timed out]
jayne has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
methods has quit [Quit: Leaving.]
havenn has joined #ruby-lang
havenn has quit [Ping timeout: 264 seconds]
Glass_saga has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
Glass_saga has quit [Remote host closed the connection]
jayne has quit [Read error: Connection timed out]
swarley has joined #ruby-lang
Glass_saga has joined #ruby-lang
Glass_saga has quit [Remote host closed the connection]
ryanf has joined #ruby-lang
Fretta has quit [Quit: Fretta Be Gone!]
Glass_saga has joined #ruby-lang
areil has joined #ruby-lang
jayne has joined #ruby-lang
krz has joined #ruby-lang
ryanf has quit [Ping timeout: 265 seconds]
jayne has quit [Read error: Connection timed out]
swarley has quit [Ping timeout: 252 seconds]
Dennis_ has quit [Read error: Connection reset by peer]
Croms has joined #ruby-lang
ryanf has joined #ruby-lang
knu has quit [Remote host closed the connection]
WillMarshall has joined #ruby-lang
knu has joined #ruby-lang
ryanf has quit [Quit: broken pipes |||]
gregmore_ has quit [Remote host closed the connection]
gregmore_ has joined #ruby-lang
ryanf has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmor__ has joined #ruby-lang
gregmore_ has quit [Read error: Connection reset by peer]
wyhaines has joined #ruby-lang
BigO_ has quit [Remote host closed the connection]
gregmoreno has quit [Ping timeout: 240 seconds]
rekky has joined #ruby-lang
<imperator> whitequark, $SAFE was a hack borrowed from Perl afaik
gregmor__ has quit [Ping timeout: 255 seconds]
gregmoreno has joined #ruby-lang
ryanf has quit [Ping timeout: 255 seconds]
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
<imperator> i think ruby's cgi lib uses taint/safe
<imperator> i think compartmentalized code seems a better approach; something like http://search.cpan.org/~rgarcia/Safe-2.33/Safe.pm
rohit has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
jackhammer2022 has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
gregmore_ has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 240 seconds]
gregmoreno has joined #ruby-lang
gregmore_ has quit [Read error: Connection reset by peer]
gregmore_ has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
gregmoreno has quit [Ping timeout: 252 seconds]
blazes816 has quit [Quit: blazes816]
afgeneralist has joined #ruby-lang
<ttilley> whitequark: your ruby cross-reference site has been an invaluable reference. thanks again for the heads up. greatly appreciated.
ryanf has joined #ruby-lang
<postmodern> is there a performance benefit to freezing objects?
<drbrain> postmodern: nope
<postmodern> ok good to know
kurko_ has quit [Ping timeout: 252 seconds]
afgeneralist has quit [Ping timeout: 276 seconds]
kurko_ has joined #ruby-lang
<imperator> they're colder, so they run more efficiently
<meizaps> /statusbar window remove act
<meizaps> ahhhhh
methods has joined #ruby-lang
diegoviola has quit [Quit: leaving]
<whitequark> imperator: yeah, I recommend freezing the entire ObjectSpace
<imperator> my ruby is liquid cooled
<imperator> Liquid Cooled Ruby (TM)
seanstickle has quit [Quit: seanstickle]
<rohit> postmodern, Aren't you the one who opened this issue: https://github.com/carlhuda/bundler/issues/2121 ?
<rohit> postmodern, Will you be working on a patch?
<postmodern> rohit, probably not
<postmodern> rohit, i use rubygems-tasks which does this correctly
* whitequark zzzzz
<rohit> postmodern, ok cool, will label it as needs-patch.
rekky has quit [Quit: rekky]
chimkan has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
rohit has quit [Ping timeout: 240 seconds]
gregmore_ has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 260 seconds]
burgestrand has joined #ruby-lang
kurko_ has joined #ruby-lang
methods has quit [Quit: Leaving.]
methods has joined #ruby-lang
kurko_ has quit [Read error: Connection reset by peer]
ebouchut has joined #ruby-lang
kurko_ has joined #ruby-lang
tonni_ has joined #ruby-lang
afgeneralist has joined #ruby-lang
tonni has quit [Ping timeout: 240 seconds]
rohit has joined #ruby-lang
dc5ala has joined #ruby-lang
gnufied has joined #ruby-lang
kurko_ has quit [Ping timeout: 245 seconds]
wyhaines has quit [Remote host closed the connection]
burgestrand has quit [Ping timeout: 264 seconds]
kurko_ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
methods has quit [Quit: Leaving.]
WillMarshall has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wyhaines has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
wyhaines has quit [Remote host closed the connection]
kurko_ has joined #ruby-lang
gregmoreno has joined #ruby-lang
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
ebouchut has quit [Quit: This computer has gone to sleep]
gregmoreno has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: Computer has gone to sleep.]
voker57_ has joined #ruby-lang
voker57 has quit [Ping timeout: 246 seconds]
qwerxy has joined #ruby-lang
chimkan has quit [Quit: chimkan]
Dennis_ has joined #ruby-lang
Croms has quit [Read error: Connection reset by peer]
afgeneralist has quit [Ping timeout: 265 seconds]
<rohit> For rubygems is this a valid source of guides/info: http://docs.rubygems.org/
<rohit> I was going to submit a PR to change the more info url from gem --help which currently points to docs.rubyforge.org but it redirects to the above. Shouldn't it now point to http://guides.rubygems.org ?
areil_ has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
areil has quit [Ping timeout: 252 seconds]
chimkan has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
Blaster has joined #ruby-lang
Blaster has left #ruby-lang [#ruby-lang]
thinkdevcode has joined #ruby-lang
mjio has quit []
burgestrand has joined #ruby-lang
b6 has joined #ruby-lang
qwerxy has quit [Quit: offski]
<b6> hi, i'm exporting GEM_HOME and GEM_PATH, but gem(1) keeps putting stuff in ~/.gem.
CaptainJet has quit []
cirwin has joined #ruby-lang
shtirlic has joined #ruby-lang
shtirlic_ has quit [Read error: Connection reset by peer]
kennyvb has quit [Ping timeout: 245 seconds]
kennyvb has joined #ruby-lang
yikem has joined #ruby-lang
JohnBat26 has joined #ruby-lang
sush24_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
SoAwesomeMan has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
apeiros_ has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
areil_ has quit []
Mon_Ouie has quit [Ping timeout: 256 seconds]
yikem has quit [Quit: Computer has gone to sleep.]
siori has joined #ruby-lang
siori has quit [Remote host closed the connection]
siori has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
r0bgleeson has quit [Ping timeout: 248 seconds]
b6 has left #ruby-lang ["*"]
bluepojo has quit [Quit: Leaving.]
gnufied has quit [Quit: Leaving.]
hakunin has joined #ruby-lang
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Client Quit]
areil has joined #ruby-lang
cirwin has quit [Ping timeout: 240 seconds]
stardiviner has joined #ruby-lang
solars has joined #ruby-lang
romeroabelleira has joined #ruby-lang
chimkan has quit [Quit: chimkan]
rohit has quit [Quit: Leaving]
romeroabelleira has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
BlaXpirit has joined #ruby-lang
Averna has quit [Quit: Leaving.]
<yorickpeterse> Morning
cirwin has joined #ruby-lang
dr_bob has joined #ruby-lang
rue|w has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
eb has joined #ruby-lang
facest has quit [Ping timeout: 248 seconds]
ebt has quit [Ping timeout: 248 seconds]
faces has joined #ruby-lang
mars777 has quit [Quit: mars777]
aetcore has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
rippa has joined #ruby-lang
nettsundere has joined #ruby-lang
gnufied has joined #ruby-lang
mars777 has joined #ruby-lang
rippa has quit [Ping timeout: 264 seconds]
mars777 has quit [Quit: mars777]
justinram has quit [Remote host closed the connection]
rolfb has joined #ruby-lang
agarcia has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
siori has quit [Remote host closed the connection]
siori has joined #ruby-lang
BlaXpirit has quit [Quit: Quit Konversation]
siori has quit [Ping timeout: 252 seconds]
bluepojo has joined #ruby-lang
apeiros_ has joined #ruby-lang
vondruch has joined #ruby-lang
vondruch has left #ruby-lang [#ruby-lang]
GarethAdams has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
cirwin has quit [Ping timeout: 240 seconds]
eb has quit [Read error: Operation timed out]
eb has joined #ruby-lang
zmack_ has joined #ruby-lang
shtirlic_ has joined #ruby-lang
zz_chrismcg is now known as chrismcg
zmack_ has quit [Remote host closed the connection]
adambeynon has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
solars has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
wils0n has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 256 seconds]
wils0n has quit [Ping timeout: 264 seconds]
mytrile has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
workmad3 has joined #ruby-lang
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<andrewvos> The code crashes if you execute it as is, but if you uncomment the rescue then it silently fails.
<andrewvos> Does this seem insane?
zmack has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<andrewvos> Sorry, better example https://gist.github.com/4147490
<workmad3> andrewvos: not that surprising actually, when you look at it ;)
<workmad3> andrewvos: in the 'does-not-fail' example, @blocks stays empty...
<andrewvos> OMG
<andrewvos> Wait hold on
<andrewvos> workmad3: Oh ffs I am such a total douchebag.
<workmad3> it's monday
Pntkl has joined #ruby-lang
Pntkl has quit [Ping timeout: 244 seconds]
cultureulterior_ has joined #ruby-lang
bluepojo has quit [Quit: Leaving.]
masterkorp has left #ruby-lang ["WeeChat 0.3.2"]
siori_ has joined #ruby-lang
siori_ has quit [Ping timeout: 256 seconds]
blacksoul has joined #ruby-lang
spike|spiegel has joined #ruby-lang
tjadc has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
ishe has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
rohit has joined #ruby-lang
ishe has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
JohnBat26 has joined #ruby-lang
tjadc has quit [Quit: No Ping reply in 180 seconds.]
tjadc has joined #ruby-lang
madish has joined #ruby-lang
kurko_ has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
m3nd3s has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
gokul has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
sepp2k has joined #ruby-lang
gokul has quit [Client Quit]
shtirlic_ has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
vesan has joined #ruby-lang
Axsuul has quit [Ping timeout: 250 seconds]
postmodern has quit [Quit: Leaving]
kurko_ has quit [Ping timeout: 252 seconds]
* erikh is speechless
kurko_ has joined #ruby-lang
<yorickpeterse> erikh: doesn't "DATA" point to the executed file and not the last required one?
blacksoul has quit [Ping timeout: 260 seconds]
<yorickpeterse> At least that would that gist imply
<erikh> no, everything about that is retarded
sharma__ has quit [Quit: This computer has gone to sleep]
rsl has joined #ruby-lang
<erikh> DATA is the IO representation of ARGF as a stream. ISTR it being more like perl's DATA (which is actually useful)
<andrewvos> Is that a bug?
<andrewvos> erikh: What if you remove the __END__ something else part?
heftig has quit [Quit: leaving]
<erikh> andrewvos: no, it's not a bug
<erikh> kind of helps if you know perl
jgomez has joined #ruby-lang
beiter has joined #ruby-lang
judofyr has joined #ruby-lang
rohit has quit [Ping timeout: 240 seconds]
sush24_ has joined #ruby-lang
Dennis_ has quit [Ping timeout: 264 seconds]
dr_bob has quit [Ping timeout: 240 seconds]
dr_bob has joined #ruby-lang
<Silex> in a classic ABC design, can I simply raise NotImplementedError in the base class or is that reserved for system use?
runeb- has joined #ruby-lang
runeb- is now known as runeb
<judofyr> Silex: raising NotImplementedError is fine IMO
<Silex> thanks
rolfb has joined #ruby-lang
krz has quit [Quit: krz]
rohit has joined #ruby-lang
carloslopes has joined #ruby-lang
diegoviola has joined #ruby-lang
mwjcomputing has joined #ruby-lang
rkk has joined #ruby-lang
kurko_ has quit [Ping timeout: 276 seconds]
kurko_ has joined #ruby-lang
imperator has joined #ruby-lang
<rkk> Hi everybody
<rkk> I'm going to make a presentation about Ruby tomorrow
<rkk> but I don't want to introduce those you can find in books
<rkk> any advice?
<yorickpeterse> "those" what
<rkk> like syntax
<yorickpeterse> well, pretty much every bit of syntax has been discussed in a book/article at least once
<yorickpeterse> Also you're much better off teaching the reasoning for using Ruby, what makes it cool, etc, than just the syntax
r0bgleeson has joined #ruby-lang
<rkk> yes, that's what i want
byteminister has joined #ruby-lang
<yorickpeterse> Well, do your homework then :)
rohit has quit [Ping timeout: 245 seconds]
<rkk> just a little 'cool' syntax is enough i think
<imperator> good morning
<rkk> good evening from China ^_^
<yorickpeterse> rkk: [10, nil, 'bar'].reject(&:nil?) # => [10, 'bar']
<yorickpeterse> stuff like that
solars has quit [Ping timeout: 264 seconds]
<charliesome> i've found that when giving presentations, it's usually a good idea to start preparing earlier than the day before
<rkk> I've made one
<rkk> but don't think it's good enough...
<apeiros_> reject(&:nil?) --> compact
<yorickpeterse> charliesome: don't logic him too much
<apeiros_> @ yorickpeterse & rkk
byteminister has quit [Client Quit]
<yorickpeterse> apeiros_: eh?
<charliesome> yorickpeterse: [1, nil, 2, nil, 3].compact #=> [1,2,3]
byteminister has joined #ruby-lang
<charliesome> does this channel have an evaluator bot?
<rkk> hmm
<yorickpeterse> charliesome: aah
<yorickpeterse> And no, it does not
r0bgleeson has quit [Ping timeout: 256 seconds]
<charliesome> evaluator bots are always handy, i might fix that
<rkk> ok, i should go, thx guys
Glass_saga has quit [Remote host closed the connection]
rkk has quit [Quit: Leaving]
Glass_saga has joined #ruby-lang
trainhappy has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 260 seconds]
<yorickpeterse> charliesome: I think this channel has a no bot policy
<charliesome> ah
<charliesome> that's a shame :(
<imperator> corundum, are you a bot?
<corundum> yes, i am a bot
<charliesome> corundum: are you actually about?
<corundum> dunno
<charliesome> a bot*
<imperator> corundum, quickref?
<apeiros_> this channel has a one bot policy
<yorickpeterse> corundum: what is the meaning of life
<corundum> but what is <reply>
<yorickpeterse> what the
<charliesome> corundum: are you sentient?
<corundum> no clue
<erikh> in the past drbrain's been pretty direct about 'corundum is the only bot'
<erikh> but you should ask him
<charliesome> corundum needs to be able to evaluate ruby code then!
<andrewvos> Put an evaluator bot on heroku?
<andrewvos> Sounds like something that would make people write a lot of code in here ;/
<charliesome> i already have one
<charliesome> it lurks in #ruby, but not here
rohit has joined #ruby-lang
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
rohit has quit [Read error: Connection reset by peer]
rohit has joined #ruby-lang
<andrewvos> charliesome: name?
<charliesome> andrewvos: eval-in
<charliesome> andrewvos: if you type >> puts 1 + 2 it should respond
<andrewvos> charliesome: sleep 1_000_000_000 :)
<charliesome> andrewvos: it has 1 second wall time limit
<judofyr> andrewvos: require 'timeout'
<andrewvos> Ooh
solars has joined #ruby-lang
<byteminister> can someone explain what it means to write "class << self" in ruby
<charliesome> judofyr: try alarm(1); :D
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
<judofyr> byteminister: it means "open the singleton class"
<judofyr> byteminister: but that probably doesn't help much? :)
<byteminister> I am well aware of the singleton pattern, I'm coming from jav
<byteminister> java
agarcia has quit [Ping timeout: 245 seconds]
<apeiros_> byteminister: not the same
<judofyr> byteminister: every object in Ruby has a singleton class (also called metaclass)
<judofyr> byteminister: short story: that defines a class method
rohit has quit [Quit: Leaving]
<andrewvos> jav - A derogatory term for a Java developer?
<judofyr> byteminister: `def self.foo; end` is just a shortcut for `class << self; def foo; … end end`
<byteminister> Aaaa, now I get it. I was aware of the def obj.method syntax
<judofyr> byteminister: long story: every time you call `obj.foo`, Ruby will first check obj's singleton class for any methods.
<judofyr> so by defining methods in the singleton class, you can define methods on a single object
lcdhoffman has joined #ruby-lang
<judofyr> a = "123"; def a.what; size; end; a.what # => 3
r0bgleeson has joined #ruby-lang
<byteminister> so only one instance of that object will exist everytime we instantiate it
<charliesome> byteminister: forgot what you know about the word 'singleton' - it means something totally different in ruby
<judofyr> byteminister: it has nothing to do with the singleton pattern
<yorickpeterse> stuff like `class << self do; ...; end` is basically a shorter way of adding a bunch of class methods
<charliesome> byteminister: a singleton class is a class that only has a single instance
<yorickpeterse> without having to prefix each definition with `self`
<charliesome> byteminister: every object is an instance of its own singleton class
srbaker has joined #ruby-lang
<charliesome> well.. almost every object
stardiviner has quit [Ping timeout: 240 seconds]
<byteminister> I see. :) Interasting world is this ruby land. So module is a class too ?
<apeiros_> Module is
<apeiros_> modules aren't
<judofyr> a module is an object
<judofyr> so they have singleton classes :)
<spike|spiegel> byteminister: class is a module.
<apeiros_> and Class inherits from Module
<judofyr> byteminister: if it makes any sense: when you do a = "123", a is *actually* not an instance of String. it's an instance of a's singleton class (which is a subclass of String).
<spike|spiegel> Class.ancestors => [Class, Module, Object, Kernel, BasicObject]
<charliesome> it's interesting that even though Class inherits from Module, you can't pass a class to include
<apeiros_> spike|spiegel: "x is a subclass of y" is not the same as "x is a y"
<judofyr> byteminister: but this is all rather funky stuff. most people just learn that `def self.foo` defines a class method and `class << self; … end` is a way to define several class methods
<byteminister> aha, ok , so every class has it's meta class, reminds me of the prototype object in javascript
<judofyr> charliesome: I think I've tweeted it: Liskov would *not* approve of the Module <-> Class relationship
<spike|spiegel> apeiros_: it kind of is, common norm :) Class.is_a? Module
<judofyr> byteminister: every *object* has its own meta class :)
<charliesome> judofyr: haha very true
<charliesome> retweeted even though it's a year and a half old
dr_bob1 has joined #ruby-lang
<byteminister> I think I get it 90 %
beiter has quit [Quit: beiter]
<charliesome> judofyr: also of the relationship between Fixnum, Symbol and Object
joschi_ has joined #ruby-lang
<byteminister> I'm still confused with class << self syntax, because the class has no name
<apeiros_> spike|spiegel: Class.instance_of? Module # => false
trainhappy has quit [Ping timeout: 240 seconds]
trainhappy has joined #ruby-lang
<charliesome> apeiros_: shouldn't that be true?
<byteminister> Class is instance of itself
<apeiros_> no
<spike|spiegel> apeiros_: doh, that's meh, Car is a Vehicle, true?
<spike|spiegel> consistency, please.
<charliesome> oh right, instance_of? doesn't search ancestors
<apeiros_> charliesome: is_a? checks for class and ancestry, instance_of? only for class
pabs_ has joined #ruby-lang
nibbo_ has joined #ruby-lang
benteaa_ has joined #ruby-lang
llakey_ has joined #ruby-lang
<charliesome> ruby needs an alias from is_a? to is_an?
<apeiros_> charliesome: heh, got bothered by that too
<charliesome> x.is_a?(Array) kills me every time
rhizmoe_ has joined #ruby-lang
<apeiros_> charliesome: I think that's the point where you just accept that ruby is a programming language, not a natural language.
agile has quit [Ping timeout: 240 seconds]
r0bgleeson has quit [Ping timeout: 245 seconds]
<imperator> you can always use .kind_of?
agile has joined #ruby-lang
<spike|spiegel> ruby should have .should_of? as a joke
<byteminister> hehe :D
dr_bob1 has quit [Quit: Leaving.]
<charliesome> there's an entire category for jokes on redmine
<byteminister> judofyr,spike,* thanks for explaining
<imperator> or Array ===
fireglow- has joined #ruby-lang
bastl_ has joined #ruby-lang
mislav has joined #ruby-lang
dr_bob1 has joined #ruby-lang
dr_bob has quit [Read error: Connection reset by peer]
bastl has quit [Ping timeout: 252 seconds]
foca has quit [Ping timeout: 252 seconds]
joschi has quit [Ping timeout: 252 seconds]
pabs has quit [Ping timeout: 252 seconds]
eban has quit [Ping timeout: 252 seconds]
nibbo has quit [Ping timeout: 295 seconds]
llakey has quit [Ping timeout: 295 seconds]
mroth has quit [Ping timeout: 295 seconds]
tallship has quit [Ping timeout: 295 seconds]
rhizmoe has quit [Ping timeout: 251 seconds]
benteaa has quit [Ping timeout: 295 seconds]
fireglow has quit [Ping timeout: 343 seconds]
mitchty has quit [Ping timeout: 365 seconds]
fireglow- is now known as fireglow
foca_ has joined #ruby-lang
mitchty_ has joined #ruby-lang
<byteminister> I love ruby, the only thing I hate about it right now is more or less cryptic stack traces / error logs
<spike|spiegel> that's like joda something.... 5 == var instead of var == 5, to avoid accidentally assigning
<judofyr> byteminister: I'd recommend just thinking about `class << self; def foo; … end end` as class methods for now. after you've used Ruby for a while you get a better understanding about the whole object module.
dr_bob1 has quit [Client Quit]
abuiles has quit [Read error: Connection reset by peer]
eban1 has joined #ruby-lang
tallship has joined #ruby-lang
no_i_wont has quit [Ping timeout: 241 seconds]
abuiles has joined #ruby-lang
dr_bob has joined #ruby-lang
sailias has joined #ruby-lang
<byteminister> ok
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
no_i_wont has joined #ruby-lang
VGoff has quit [Ping timeout: 259 seconds]
<judofyr> byteminister: you'll get better at reading stack traces too. but it's often difficult when you're dealing with other libraries (like Rails) and you do weird stuff.
trainhappy has quit [Ping timeout: 240 seconds]
tallship has quit [Remote host closed the connection]
VGoff has joined #ruby-lang
<byteminister> yes, exactly with rails, or if you have some broken dependencies
tallship has joined #ruby-lang
mroth has joined #ruby-lang
mroth has quit [Changing host]
mroth has joined #ruby-lang
mroth has joined #ruby-lang
<judofyr> byteminister: because there's no static typing, many typical typing errors can end up rather cryptic
<byteminister> yes, I think maybe it wouldn't be so bad if it had static types + type inference , probably some meta capabilities of the language would get lost, but maybe that's a good thing :D
<apeiros_> you're aware that such languages exist?
<byteminister> scala ?
<byteminister> duby ?
<byteminister> :D
BlaXpirit has joined #ruby-lang
<byteminister> jruby ? :D
workmad3 has joined #ruby-lang
<byteminister> correction, duby is now called mirah i think..
<charliesome> on the other hand, you have languages like haskell with static typing and very good type inference that also put out cryptic errors
<charliesome> the only difference is the cryptic errors happen at compile time rather than run time
chimkan has joined #ruby-lang
schaerli has joined #ruby-lang
<mislav> what's the difference between this chan and #ruby?
<workmad3> mislav: a -lang suffix...
<byteminister> :D
<mislav> :P
<mislav> are those channels for different purposes?
<yorickpeterse> This one is official, the other one isn't
<spike|spiegel> hopefully, internal discussions here? and general ruby talk there?
<charliesome> spike|spiegel: it seems like that's true to some extent
<mislav> so this is about the language itself, and the other should be about using the language?
<charliesome> #ruby-lang seems much more technical than #ruby, if you know what i mean
<yorickpeterse> mislav: not per se
<spike|spiegel> mislav: I'd like to see it that way, but there seems to be overlap
<mislav> ok, say I have a question about making persistent HTTP connections over SSL with Ruby, which chan do I go to?
<yorickpeterse> This one
piggy_ has joined #ruby-lang
<mislav> :)
<mislav> ok I still don't get the difference but I'll hang around in here.
<spike|spiegel> just join both, 2 > 1
<mislav> byteminister: I'm already using that lib, and it seems to work fine in benchmarks with tons of threads and even more requests. however when it gets deployed to Passenger in production, errors about not being able to open a connection start to happen.
<byteminister> hmm, do you have ssl enabled on production web server ?
<mislav> even from a production server, a simple script that tries to simulate the load to API hosts doesn't have problems with persistent connections, and there's a significant speedup over non-persistent (duh). but in Passenger workers environment, things are not rainbows.
<mislav> byteminister: ssl is everywhere, both on the app and API hosts it talks to
<mislav> as it should be.
<spike|spiegel> mislav: so ssl doesn't terminate at the web server?
<spike|spiegel> then, you need a way to do the TLS session ticketing
<imperator> #ruby is a honeypot ;)
<mislav> spike|spiegel: hm? can you be more clear
<spike|spiegel> mislav: your ruby process gets encrypted request?
<mislav> spike|spiegel: no. my ruby process (app running on passenger) *makes* encrypted requests to other hosts. works fine without persistent HTTP.
sailias has quit [Quit: Leaving.]
<mislav> switch to net-http-persistent, and suddenly there are "too many connection resets" exceptions. https://github.com/drbrain/net-http-persistent/issues/19#issuecomment-9847525
<yorickpeterse> mislav: I know nothing about net-htt-persistent but can't you close the connection manually?
<yorickpeterse> Or are you already doing that?
<mislav> yorickpeterse: I'm not doing anything manually. I let net-http handle both connecting and reconnecting. I never want to close any connection because I want a single connection to get used as much as possible.
<yorickpeterse> hmm
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
<spike|spiegel> mislav: API end point, you know if they keep connection open forever? I doubt it
<mislav> if a single Passenger worker gets 10 requests in 1 minute, I want that worker to keep the connection to API host open so it can avoid the SSL handshake 10 times. (well, 9 times to be more exact.)
carloslopes has quit [Remote host closed the connection]
<mislav> spike|spiegel: they don't, they can keep the connection for about 14 seconds. but after that, net-http-persistent should handle reconnecting
<spike|spiegel> ah, so the library is failing you
<mislav> it's the purpose of the library.
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
masterkorp has joined #ruby-lang
<masterkorp> hello
<mislav> spike|spiegel: yeah, but I can't reproduce with isolated scripts, even with severe delays between requests. a script handles everything gracefully. in the app environment, however, things are a mess.
<masterkorp> Can anyone explain me the on method ?
Banistergalaxy has joined #ruby-lang
<mislav> masterkorp: it seems to be a method named "on" provided by the Events::Emitter module. it takes a symbol argument and a block.
<mislav> what more do you want to know?
<masterkorp> thanks
carloslopes has joined #ruby-lang
<masterkorp> Why is it called with include inside the class an not on require ?
<yorickpeterse> it is
jgomez has quit [Quit: Leaving]
AndChat| has quit [Ping timeout: 264 seconds]
mistym has quit [Remote host closed the connection]
<masterkorp> derp derp derp
<masterkorp> sorry
<yorickpeterse> np
<spike|spiegel> mislav: the library doesn't seem to differentiate SSL related errors, it's catching any OpenSSL::SSL::SSLError and throwing "too many connection resets"
m3nd3s has quit [Remote host closed the connection]
Uranio has joined #ruby-lang
<spike|spiegel> but atleast says the class name in the message
carloslopes has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 248 seconds]
chimkan has joined #ruby-lang
r0bgleeson has joined #ruby-lang
<mislav> spike|spiegel: the errors in the message I'm getting are Timeout::Error and EOFError. why would they be handled by SSLError handler?
<mislav> also, the responsibility of net-http-persistent is to try repeat GET requests, and it doesn't seem to be doing that.
byteminister has quit [Remote host closed the connection]
chimkan has quit [Client Quit]
<erikh> mislav: drbrain is the current maintainer; might want to hit him up at reasonable pacific time hours
chimkan has joined #ruby-lang
<mislav> erikh: I did post that comment on the issue and pinged him a couple of times.
wyhaines has joined #ruby-lang
<erikh> ah ok
<erikh> I know he's been pretty busy with work lately.
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<mislav> what are EOFErrors anyway in context of HTTP?
outoftime has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<mislav> server closed the connection prematurely before finishing writing out the response?
dr_bob has quit [Read error: No buffer space available]
dr_bob has joined #ruby-lang
xyzodiac has joined #ruby-lang
<erikh> mislav: socket
<erikh> yeah
<mislav> so it's a "fuck you" from the server basically
<erikh> very likely
xyzodiac has quit [Client Quit]
slyphon has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 252 seconds]
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
schaerli has joined #ruby-lang
sush24_ has quit [Ping timeout: 260 seconds]
heftig has joined #ruby-lang
xyzodiac has joined #ruby-lang
sush24_ has joined #ruby-lang
xyzodiac has quit [Client Quit]
runeb has quit [Ping timeout: 250 seconds]
xyzodiac has joined #ruby-lang
agarcia has joined #ruby-lang
<andrewvos> I just wrote the following code: "def within css, options => {}" and then got the error "Duby extensions not configured"
<andrewvos> Is ruby trying to tell me to stop smoking?
<yorickpeterse> that should be `options = {}`
<andrewvos> yorickpeterse: Yeah I know
<yorickpeterse> and yes, you need to stop smoking crack while coding
anannie has joined #ruby-lang
<andrewvos> You're not the boss of me!
rolfb has quit [Quit: Linkinus - http://linkinus.com]
retro|cz has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
<erikh> people still use duby?
mislav has quit [Ping timeout: 246 seconds]
<andrewvos> lolduby
Glass_saga has quit [Remote host closed the connection]
<erikh> no, duby is the old name for mirah
Glass_saga has joined #ruby-lang
slyphon has joined #ruby-lang
spuk has quit [Remote host closed the connection]
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
justinram has joined #ruby-lang
sailias has joined #ruby-lang
pvh has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
justinram has quit [Read error: Connection reset by peer]
justinram has joined #ruby-lang
dkannan has quit [Ping timeout: 260 seconds]
topaz has joined #ruby-lang
topaz has quit [Changing host]
topaz has joined #ruby-lang
mccraig has quit [Ping timeout: 260 seconds]
cldwalker_ has quit [Ping timeout: 260 seconds]
dkannan has joined #ruby-lang
cldwalker_ has joined #ruby-lang
<andrewvos> Ahh
dedis has quit [Read error: Operation timed out]
anildigital_work has joined #ruby-lang
pvh has joined #ruby-lang
mccraig_ has joined #ruby-lang
beiter has joined #ruby-lang
vlad_starkov has joined #ruby-lang
judofyr has quit [Read error: No buffer space available]
<erikh> hah
<erikh> I hope that was a joke quit
judofyr has joined #ruby-lang
mupilot has quit [Quit: mupilot]
<erikh> because if judofry's irc client just ran out of memory i'm gonna lol
<andrewvos> I didn't see
* apeiros_ hands judofry some bufferspace
<judofyr> what?
<erikh> judofyr (~judofyr@195.159.219.65) has quit (Read error: No buffer space available)
<andrewvos> haha
<andrewvos> judofyr: The 90s called, they want your computer back!
<erikh> don't irc on a commodore
<andrewvos> their*
<heftig> er, could that be an error message from the server, instead?
<heftig> like the Ping timeout
<heftig> I mean, you also have "Read error: Connection reset by peer"
<charliesome> aw i'm sad to see autoload is going
<heftig> that's definitely a server error
m3nd3s has joined #ruby-lang
|Vargas| has quit [Ping timeout: 250 seconds]
<erikh> dominikh: halp
<erikh> show us your irc powers
<heftig> erikh: user-specified quit messages are preceded by Quit:, aren't they?
<judofyr> but no, my client didn't crash
<erikh> heftig: err, depends on the ircd and how you phrase your quit message IIRC
<erikh> which is pretty much par for irc as a protocol in general
<erikh> "depends on the ircd"
srbaker has quit [Quit: Computer has gone to sleep.]
siori has joined #ruby-lang
<whitequark> charliesome: iirc there were some grave issues with thread safety
slyphon has quit [Ping timeout: 245 seconds]
<charliesome> whitequark: not all of us use threads!
<judofyr> whitequark: but wasn't it the same issues with #require?
<judofyr> (damn grammar)
siori has quit [Remote host closed the connection]
<judofyr> *didn't #require have the same issues?
<erikh> did matz actually, truly lay the hammer down?
<erikh> it was discussed but I don't remember a "here's a commit that guts it"
<erikh> right
<erikh> that's the discussion
<whitequark> charliesome: I guess the proper way is to make #require faster.
<charliesome> require is a joke at the moment
<judofyr> indeed
<erikh> the whole chain of events that gets code into the ruby interpreter is a joke
<charliesome> should not take half a second to load up pry
<erikh> well that's because pry doesn't use kernel.require
<erikh> at least far from directly
<charliesome> because everyone and their dog has patched require
<erikh> no
<erikh> nothing in a stock ruby 1.9 run uses kernel.require
<judofyr> 0.324s here for pry :/
<erikh> directly
<erikh> that's because it's called Kernel.gem_original_require by the time the first require is executed
<erikh> and I will leave you to figure out where that comes from
<erikh> but be warned, you may get ill
b3nt_pin has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mistym has quit [Remote host closed the connection]
b3nt_pin has joined #ruby-lang
<charliesome> rubygems contributes a fair bit to the startup time
<judofyr> erikh: Kernel.require is left alone
<judofyr> charliesome: I've shown you quickgem?
<charliesome> judofyr: yeah
<judofyr> charliesome: was it you who wrote xgem?
<charliesome> i hacked up xgem too remember
<charliesome> yea
<judofyr> yes
<charliesome> i dunno who had the brilliant idea of loading and evaling a separate file for every single installed gem whenever ruby starts up
<judofyr> damn Gem::Specification#each
<judofyr> quickgem turns `pry -e exit` into 0m0.278s
<judofyr> 0.050 s :/
mars777 has joined #ruby-lang
<charliesome> damn jruby and its concurrency
<erikh> judofyr: no, it's not
<erikh> unless you turn off rubygems that is
<erikh> it's aliased. would you like to see the code that does it?
stardiviner has joined #ruby-lang
<erikh> (and redefined)
<charliesome> erikh: please no :p
<judofyr> erikh: Kernel.require is the same, Kernel#require is modifed
ryanlecompte has quit [Remote host closed the connection]
<erikh> holy pedantic batman
<yorickpeterse> def super_require(*args); return Kernel.respond_to?(:gem_original_require) ? gem_original_require(*args) : require(*args); end
<yorickpeterse> hurrdurr
<erikh> nobody uses Kernel.require
ryanlecompte has joined #ruby-lang
dkannan is now known as dkannan_
<judofyr> Kernel.method(:require).source_location # => nil
dkannan_ has quit [Excess Flood]
<judofyr> here at least
<erikh> yorickpeterse: I think your code will break with bundler if you do that
<erikh> but don't hold me to that
dkannan has joined #ruby-lang
<judofyr> while `method(:require).source_location` points to rubygems/custom_require.rb
<erikh> yep
<erikh> which is all anyone cares about
<yorickpeterse> judofyr: source_location doesn't work very well for C methods
<erikh> so, yeah.
<yorickpeterse> erikh: it wasn't meant to be worth using :)
<judofyr> yorickpeterse: exactly. so I think Kernel.require isn't modified by RubyGems :)
<imperator> require 'net/*' :-P
<charliesome> night everybody
<judofyr> charliesome: night? where are you located?
<erikh> go ahead and write your libraries using Kernel.require
<charliesome> judofyr: australia
<judofyr> charliesome: really?
<charliesome> ya
<judofyr> how come I didn't knew that…
<judofyr> charliesome: so, you Australian all know each other right? you know Bluebie?
<charliesome> can't say i do
<judofyr> bummer
<charliesome> anyways seeya later
malev has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<judofyr> yeah
<yorickpeterse> What's the difference between Kernel.require and Kernel#require? Besides of course one being a class and the other being an instance method
<judofyr> no idea
<whitequark> yorickpeterse: somewhere in sources: "module_method :require"
<erikh> yorickpeterse: module_function most likely
<whitequark> er module_function
<erikh> or the C equiv
<yorickpeterse> Ah, so they do exactly the same thing (minus when patches)?
<yorickpeterse> * patched
<whitequark> yeah
<erikh> very likely
<yorickpeterse> heh
<erikh> some back story, so in early releases of 1.9 there was this thing called gem_prelude that attempted to do what custom_require does in C
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<erikh> it had bugs and was extremely hard to modify
<erikh> so since rubygems 1.6 or so, it detects it and breaks it
<erikh> and then does what you have now
<erikh> gem_prelude technically still exists I think
<erikh> and probably still runs
<erikh> the whole require path is just a colossal C.F.
<whitequark> erikh: gem_prelude isn't C code afaik, it's a chunk of Ruby embedded into the interpreter
<erikh> eh?
<yorickpeterse> I don't see Matz saying "Fuck yo backwards compatibility" in a mayor release anytime soon
<whitequark> yorickpeterse: aaand http://rxr.whitequark.org/mri/source/class.c#1421
<yorickpeterse> ah
gnufied has quit [Quit: Leaving.]
xyzodiac has quit [Ping timeout: 252 seconds]
mwjcomputing has quit [Quit: Leaving]
grzywacz has joined #ruby-lang
<whitequark> wtf does it actually do?..
heftig has quit [Quit: leaving]
<erikh> it basically supplies the load path
<erikh> and defers to rubygems if rubygems is actually used
rippa has joined #ruby-lang
<erikh> the problem IIRC is that it activates the latest gem installed regardless of its dependencies
<erikh> which is not what rubygems does
BigO has joined #ruby-lang
<erikh> it's been a few years now though
<erikh> so my memory is a little fuzzy
gsav has joined #ruby-lang
gsav has quit [Client Quit]
gnufied has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
* imperator releases win32-file-attributes into the wild
rue|w has quit [Ping timeout: 276 seconds]
xyzodiac has joined #ruby-lang
m3nd3s has quit [Read error: Connection reset by peer]
m3nd3s has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
znake has joined #ruby-lang
<ddfreyne> *hordes of wild win32-file-attributes trample imperator*
carloslopes has joined #ruby-lang
<judofyr> erikh: I thought the current gem_prelude.rb simply required RubyGems
chimkan has quit [Quit: chimkan]
xyzodiac has quit [Ping timeout: 265 seconds]
xyzodiac has joined #ruby-lang
<erikh> it does
<erikh> I checked earlier
eban1 has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Ping timeout: 276 seconds]
mwjcomputing has joined #ruby-lang
gsav has joined #ruby-lang
swiftos has joined #ruby-lang
<swiftos> Hi, i've a problem with TCPSock and Serial: I read byte from serial and send them to a TCPClient, but byte received have nothing to do with byte sent
<judofyr> erikh: where is gem_prelude.rb installed btw?
<swiftos> can someone explain me ?
beiter has quit [Quit: beiter]
<judofyr> swiftos: Serial?
<swiftos> judofyr: serialport (with the serialport gem). I read one byte received from a serial port and whant to send it through TCP
<erikh> judofyr: it's at the root of lib
<erikh> and I want to say it's done at interpreter init
<yorickpeterse> swiftos: what have you tried? Also, put some code in a pastebin
<erikh> but I'd have to look
dedis has joined #ruby-lang
<judofyr> erikh: I don't find it in /Users/magnus/.rbenv/versions/1.9.3-p286/lib
methods has joined #ruby-lang
Brainix has joined #ruby-lang
Brainix has left #ruby-lang [#ruby-lang]
<swiftos> here it is http://pastebin.com/JrwvG3kq yorickpeterse
<yorickpeterse> swiftos: the braces are not needed
<yorickpeterse> This is Ruby, not c/php/javascript/etc
<swiftos> yorickpeterse: i'm new to ruby ^^, but thank you for the tip
slyphon has joined #ruby-lang
<yorickpeterse> swiftos: 1. I think there's a syntax error since you're missing a closing brace
<yorickpeterse> 2. loop is blocking so the second one won't be executed
<yorickpeterse> At least not while they're in the same thread
<judofyr> I think it's two different files
<swiftos> yorickpeterse: it's 2 different scripts
<yorickpeterse> ah
<swiftos> yep
<swiftos> just bad copy/pasta for missing brace
<yorickpeterse> Ok, and your problem is?
alvaro_o has joined #ruby-lang
<judofyr> swiftos: IO#write takes a string
<judofyr> if you give it an int, it will convert it to a string with #to_s
<swiftos> some outputs http://pastebin.com/ipKs0SZn
<judofyr> swiftos: so when you receive 0x18, you're sending it as "24" later
<swiftos> judofyr: I was thinking to something like that, since i'm new to ruby, i don't know all subtilities ^
<judofyr> swiftos: if you just want to pass it along, you could use #readchar instead: char = serial.readchar; socket << char
<judofyr> or socket.write(char)
<judofyr> (it's an alias)
<swiftos> Ok, i'll try, thank you judofyr
mislav_ has joined #ruby-lang
<judofyr> swiftos: or, if you want to receive a byte, use #chr to convert it to a string when you send it: byte = serial.getbyte; socket << byte.chr
<erikh> judofyr: maybe it's built into something else
<erikh> it's been around 2 years since I last worked with rubygems, or had to deal with this issue
Brainix has joined #ruby-lang
<judofyr> erikh: strings ruby | grep rubygems
<judofyr> yeah, it's bundled
<judofyr> require 'rubygems.rb' if defined?(Gem)
<swiftos> judofyr: Thank you very much, it's working with char ^^ i'm happy now
<judofyr> swiftos: nice!
sio has joined #ruby-lang
<judofyr> swiftos: also, if you just want to copy chars, I think that IO.copy_stream is simpler: IO.copy_stream(serial, client)
<judofyr> that should pipe everything from serial into client
tjadc has quit [Ping timeout: 252 seconds]
<swiftos> judofyr: Nice nice^^ i'll try it too
<judofyr> not sure if it works with the serial gem though
<swiftos> ok, i'll try, so I learn
<swiftos> but at the end, the script has to write every traffic between serial and tcp in a database file, so the char options is the right, i think
<judofyr> ah, yeah
<judofyr> swiftos: also, performance will be better if you use #readpartial (if the serial sends lots of bytes): while chunk = serial.readpartial(1024); client << chunk; end
<judofyr> swiftos: readpartial blocks until there's some data available, then it returns the +n+ first bytes
<judofyr> swiftos: so if it's only sending one byte at a time, `chunk` will always just be one byte
<judofyr> but if it suddenly sends out 100 (and it gets buffered in the kernel), then you get all 100 at once
<erikh> it's basically read() from C.
voker57_ has quit [Read error: Connection reset by peer]
grzywacz has quit [Ping timeout: 240 seconds]
thinkdevcode has quit [Remote host closed the connection]
AlHafoudh has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
<whitequark> synchronous I/O sucks
<swiftos> judofyr: I only send max 65byte and receive only 32 at a time...i'll check performance later because it doesn't really matter for me
<judofyr> swiftos: okay. but it's good to know about #readpartial anyway :)
<whitequark> (and I didn't say "blocking")
<judofyr> whitequark: I always mess up blocking vs synchronous I/O
<swiftos> judofyr: :) ok...i've a lot to learn ^^
<judofyr> whitequark: what's the difference again?
datanoise has quit [Ping timeout: 252 seconds]
<judofyr> whitequark: async I/O means you get a signal when there's I/O? while non-blocking is just returning at once if there's nothing available?
mupilot has joined #ruby-lang
piggy_ has quit [Remote host closed the connection]
<whitequark> judofyr: blocking I/O is a property of your code, synchronous I/O is a property of the OS
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
<judofyr> whitequark: explain?
<whitequark> for example you cannot, even with O_NONBLOCK, avoid waiting for the hard drive to seek a certain track
<whitequark> the OS _will_ block the syscall.
<judofyr> ah, right
<whitequark> (in fact O_NONBLOCK doesn't do anything for files on local block devices.)
schaerli has quit [Remote host closed the connection]
<whitequark> whereas in Windows NT(r) every I/O request is asynchronous by nature
<judofyr> hm… how does seek work with select/poll?
<whitequark> judofyr: select/poll do not work with files
<erikh> sure they do
<erikh> they aren't very useful, but they do
<whitequark> erikh: it's a noop
<whitequark> the purpose of select/poll is to avoid waiting for I/O to be completed, and in this case you will wait anyway
<judofyr> hm… I didn't knew that
<erikh> they work on file descriptors. it's an important distinction because several blocking streams are presented as files
chimkan_ has joined #ruby-lang
<whitequark> so in my opinion they don't work, at least not as intended.
<erikh> like almost everything in /dev, unix sockets, etc
<judofyr> what about /dev/random?
<erikh> yep
<erikh> they don't care about files
<whitequark> judofyr: pseudofiles don't count. I was only talking about real drives
<erikh> they care about something lower level than files
<whitequark> *real files
<judofyr> :)
<erikh> a unix socket's a real file
<erikh> so is your whole /dev list
ryanlecompte has quit [Remote host closed the connection]
<erikh> and /proc on some systems.
stardiviner has quit [Ping timeout: 250 seconds]
<whitequark> erikh: please, exec yourself with -no-pedantic :)
<erikh> this is lower level than files
svyatov has joined #ruby-lang
znake has quit [Quit: Linkinus - http://linkinus.com]
<whitequark> or this could continue forever
<zzak> does this still work for my iomega zip drive?
<erikh> well stop explaining it in terms of files
<whitequark> ok ok
<judofyr> whitequark: so #read_nonblock(1) on a file will actually block until the seek is done?
<whitequark> judofyr: yes.
<erikh> i/o works on file descriptors. it doesn't give a shit about what creates the fds
grzywacz has joined #ruby-lang
grzywacz has quit [Changing host]
grzywacz has joined #ruby-lang
<whitequark> you can see the disastrous consequences of that if you try to use FUSE
<whitequark> and the software which serves the filesystem hangs in some way or another
<judofyr> erikh: but different fd behaves differently
<whitequark> or it's SSHFS and network is slow, etc.
<erikh> judofyr: eh? what kind of different fd's are there?
<whitequark> erikh: you're correct in that userspace posix I/O functions don't give a shit about the source of fds
<judofyr> erikh: different as in "backed by file", "backed by socket" etc.
<whitequark> erikh: you're not correct in that kernel function which get called when you invoke userspace posix I/O functions don't care about FD types.
<whitequark> because they obviously do.
<judofyr> whitequark: do you know if libuv uses async I/O?
<whitequark> judofyr: it doesn't
<erikh> argh
<judofyr> so the whole async file API is kinda moot?
<whitequark> there are several problems
<erikh> whitequark: what happens when you try to read() over nfs
<whitequark> judofyr: first, for a long time linux AIO was implemented in glibc with pthreads and blocking I/O, which obviously didn't scale at all
gnufied has quit [Quit: Leaving.]
<whitequark> judofyr: now we have kernel AIO, but it only works for actual block-device-backed fds AND it bypasses filesystem cache completely
<whitequark> so it's mostly used by databases with their own cache layers
gix has quit [Read error: Connection reset by peer]
mupilot has quit [Quit: mupilot]
<whitequark> and nothing else, or at least nothing I remember
<judofyr> interesting
<whitequark> erikh: the kernel fetches the backing structure for that fd and invokes a corresponding method on it.
<erikh> what method?
<erikh> which kernel?
<erikh> what about userspace nfs implementations?
<erikh> are we still talking about files here?
<whitequark> erikh: see above: I'm talking about kernel-space Linux I/O
mupilot has joined #ruby-lang
<erikh> you are making an assertion about how one kernel, under one implementation and probably for one file system and probably for one specific type of file is handled when the descriptor for said file after opening is passed to a polling function
outoftime has quit [Quit: Leaving]
<erikh> there's a reason descriptors exist
<whitequark> erikh: one kernel and one implementation, exactly
<erikh> but you're using the phrase "files" and completely muddying up the point
piggy_ has joined #ruby-lang
piggy_ has left #ruby-lang [#ruby-lang]
<masterkorp> erikh: http://i.imgur.com/7vMgW.jpg
piggy_ has joined #ruby-lang
<whitequark> erikh: explain it better than I do, then. don't waste time trying to contradict every single word I say
<erikh> i/o operates on file descriptors.
<whitequark> especially that both you and I understand what did I actually say, and there was nothing technically wrong with it
<piggy_> whitequark: there are men who would pay you good money to scold them the way you just did then
<masterkorp> erikh: oops sorry
<judofyr> I'm just going to paste what you said earlier:
<judofyr> 16:02 erikh: holy pedantic batman
<judofyr> :)
fletch` has joined #ruby-lang
<erikh> argh
mislav_ has quit [Remote host closed the connection]
<whitequark> erikh: yeah, it does. is that all? do you say that how exactly it operates under given conditions is irrelevant?
chimkan___ has joined #ruby-lang
gnufied has joined #ruby-lang
<erikh> whitequark: I'm saying it's foolish to make assumptions about how file descriptors work based on what created them
gix has joined #ruby-lang
<swiftos> so, working time is over.
<whitequark> erikh: that's not an assumption, that's a fact
<swiftos> Thank you again judofyr for your help
<erikh> whitequark: ok, so, I have a 2TB file served over nfs
<judofyr> swiftos: you're welcome! I usually hang out here :)
<swiftos> judofyr: i'll come back for sure ^^
<swiftos> bye
<erikh> on a modem
swiftos has quit [Quit: leaving]
<erikh> still ready to tell me select is going to always return the same value for that fd every call?
<andrewvos> Dyammm the_silver_searcher is really fast!
<whitequark> erikh: I've never used nfs in my whole life, so no, but I'll go and check it now.
chimkan_ has quit [Ping timeout: 252 seconds]
<andrewvos> Right, no more ack for me.
<whitequark> erikh: you could note that I did say "local block device-backed files".
<whitequark> that does not include nfs.
xyzodiac has quit [Ping timeout: 246 seconds]
malev has quit [Ping timeout: 256 seconds]
<erikh> I seem to recall you saying that select/poll do not work with files
<erikh> anyhow
datanoise has joined #ruby-lang
xyzodiac has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
justinram has quit [Remote host closed the connection]
<whitequark> erikh: btw
<whitequark> yes I am going to say that select() when used on an NFS FD in that setting will return the same value each time
<erikh> ok
<erikh> which NFS implementation? which version of NFS?
davidbalber|away has quit [Quit: ZNC - http://znc.in]
havenn has joined #ruby-lang
<erikh> you're still missing the point.
<whitequark> erikh: as stated above, "modern Linux kernel"
davidbalbert has joined #ruby-lang
<whitequark> no I am not. I'm not working with abstract POSIX implementations
<whitequark> I am working with real software with real implementation-defined behavior
<erikh> but you are, unless you're running in kernel space
piggy_ has quit [Ping timeout: 250 seconds]
headius has joined #ruby-lang
<whitequark> I don't give a flying fuck about what *could* happen with fds theoretically when I have a particular setting and I want to know if that syscall will block or not
<whitequark> and the fact is, that syscall will, and that does have very important consequences.
<erikh> that's the whole point though. fd's make it so that you don't have to give a flying fuck
<erikh> and you're abandoning that because linux
<erikh> and that's foolish
<whitequark> erikh: so please deploy something with an NFS link
ryanlecompte has joined #ruby-lang
<whitequark> on linux
<whitequark> and don't give a f about that
<whitequark> and get fired when it hangs.
xyzodiac has quit [Ping timeout: 240 seconds]
<whitequark> this is, for example, the precise reason we use S3 for file storage in our webapp instead of NFS, through all our servers are in one LAN segment.
<erikh> because NFS on linux is a pile of ass?
<whitequark> erikh: so what?
<erikh> or because it's pretty tightly coupled with the nss system?
judofyr has quit [Remote host closed the connection]
<whitequark> it's like saying "x86 has an awful instruction set"
<erikh> or you just like slow network i/o
<erikh> no, it's not
<whitequark> yeah it does, and it's not like you could realistically use something else.
<erikh> sure you can. netapp makes an NFS appliance and pretty much every non-linux nfs implementation is non-ass.
<erikh> it's pretty easy to get a linux box to kernel panic if it has nfs mounts
<whitequark> erikh: hm, define "appliance"
LanceHaig has joined #ruby-lang
<erikh> it's a box. that you install. in a data center.
<whitequark> yeah
<imperator> solaris ftw :)
<whitequark> and the problem is with the CLIENT nfs implementation
<whitequark> because it fucking blocks when it shouldn't
<erikh> oh, right. you're still using linux
<erikh> sorry, forgot
xyzodiac has joined #ruby-lang
anannie has quit [Remote host closed the connection]
<whitequark> now you're missing the point completely :)
<erikh> so the solution to all your problems is that the file descriptor abstraction is bollocks because you only use one operating system and make tons of assumptions about how it works, so naturally all client code ever written has no reason to do anything differently.
<erikh> and if you have any problems with the one true unix system, you just avoid that feature
<erikh> gotcha.
<mitchty_> I've seen places use cifs over nfs on linux due to the stupid blocking behavior
<erikh> nfs is a total piece of shit on linux. it's really bad.
<whitequark> no. what I am saying is that file descriptor abstraction is broken on Linux when you're operating with regular files because you cannot poll on these.
<erikh> you can poll on them
<whitequark> no you fucking cannot, because that's useless
<whitequark> "can invoke poll(2) syscall" != "can poll"
<erikh> cannot and "probably pointless" are two different things
<erikh> what about "regular files" in /proc ?
<whitequark> erikh: in fact you are talking complete bullshit
<whitequark> Regular files shall always poll TRUE for reading and writing.
<whitequark> so
rekky has joined #ruby-lang
<erikh> does it blow up?
<whitequark> there is no single standards-compliant nfs implementation which can poll() on files
<whitequark> with a sensible result.
<erikh> argh
<whitequark> and yeah, they will all block.
<erikh> of course they will
<whitequark> POSIX specifies poll() behavior in terms of the way the fd was created
<erikh> can you point out in this link where calling poll on a regular file will cause the universe or your program to explode?
<whitequark> erikh: it doesn't, and I never said that
<erikh> you said it cannot poll
<erikh> The poll() function shall support regular files, terminal and pseudo-terminal devices, FIFOs, pipes, sockets and [XSR] STREAMS-based files. The behavior of poll() on elements of fds that refer to other types of file is unspecified.
<erikh> right above where you cited.
<whitequark> yeah
grzywacz has quit [Ping timeout: 240 seconds]
riffraff has joined #ruby-lang
grzywacz has joined #ruby-lang
grzywacz has quit [Changing host]
grzywacz has joined #ruby-lang
blazes816 has joined #ruby-lang
melter has joined #ruby-lang
rhizmoe_ has quit [Quit: leaving]
gregmoreno has joined #ruby-lang
<whitequark> erikh: let's just do something useful instead.
zmack has quit [Remote host closed the connection]
piggy_ has joined #ruby-lang
piggy_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend> injekt: yo
<banisterfiend> injekt: hey i'm using slop 'commands' (the git log -1 type thing), how do i get the parameters passed to a command?
<erikh> whitequark: I am, the test runs just take forever
<erikh> so I've got a lot of time to troll you
r0bgleeson has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
fletch` has quit [Ping timeout: 240 seconds]
firefux has joined #ruby-lang
<banisterfiend> dsafsdfasdf
<banisterfiend> asdfasd
Mon_Ouie has quit [Read error: No buffer space available]
<andrewvos> banisterfiend: Quite.
<firefux> banisterfiend: good idea
gnufied has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby-lang
anannie has joined #ruby-lang
maz-dev has joined #ruby-lang
<imperator> hm, forgot how to resize a pointer in ffi...
afgeneralist has joined #ruby-lang
ericwood_ has left #ruby-lang [#ruby-lang]
maz-dev has left #ruby-lang [#ruby-lang]
ericwood has joined #ruby-lang
tbuehlmann has joined #ruby-lang
MaddinXx has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
vmoravec has joined #ruby-lang
kentos has joined #ruby-lang
cirwin has joined #ruby-lang
phlipper has joined #ruby-lang
chimkan___ has quit [Quit: chimkan___]
icooba has joined #ruby-lang
ozzloy_ has left #ruby-lang [#ruby-lang]
schaerli has joined #ruby-lang
chimkan_ has joined #ruby-lang
jgomez has joined #ruby-lang
tockitj_ has joined #ruby-lang
phlipper has left #ruby-lang ["Linkinus - http://linkinus.com"]
<tockitj_> if method is defined in proc (which is defined in module N1), and proc is executed inside module/class N2.. where will method be defined ?
<banisterfiend> tockitj_: the 'self' of the proc
<banisterfiend> it doenst matter where it's executed if you do a normal 'call', if you use instance_exec/class_exec though, it could be defined anywhre
<tockitj_> what is self of the proc ? (object where it is defined?)
<tockitj_> what if proc is cloned elsewhere ?
<tockitj_> if it is converted to method in another namespace ?
<tockitj_> do lambdas behave the same ?
__butch__ has joined #ruby-lang
<banisterfiend> tockitj_: no, all that matters is where the proc was defined
<banisterfiend> tockitj_: lambdas behave the same with respect to this
<tockitj_> cloning does not affect it ? would not procs self change in that case ?
<banisterfiend> no, why would the self change?
<tockitj_> well new proc is created in another object ?
<banisterfiend> tockitj_: by cloning you mean #dup or #clone right?
<tockitj_> yes
<banisterfiend> that wont change anything, dups and clones are pretty superficial things
<tockitj_> hmmz.. they should not be.. these are fundamental operations
<banisterfiend> tockitj_: i can't think what you even expect Proc#clone to do
<tockitj_> ok.. so it has 'lexical' scoping
__butch__ has quit [Ping timeout: 276 seconds]
eban1 has joined #ruby-lang
__butch__ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
voker57 has joined #ruby-lang
justinram has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
<whitequark> erikh: hehe
<whitequark> I prefer to profile my test runs while my tests run
<whitequark> not that they run any better, but at least I get an impression that I'm doing something worthwhile
<whitequark> _and_ I do not switch to reading reddit
Jad has joined #ruby-lang
<whitequark> well, actually they're under 50s on this i7 down from 6m on previous...
<banisterfiend> whitequark: what machine are yu running?
Jad is now known as Guest47669
<whitequark> banisterfiend: asus ux32vd
Guest47669 has left #ruby-lang [#ruby-lang]
<banisterfiend> whitequark: this is a sandybridge? how much ram did u pack in it?
wallerdev has joined #ruby-lang
<whitequark> has every benefit of macbook air without any of its drawbacks
<whitequark> 10g currently
<whitequark> it's ivy bridge
vlad_starkov has quit [Read error: Connection reset by peer]
<whitequark> will probably be 18g when someone'll make 16g ddr3 sodimm's
<banisterfiend> whitequark: except u only have 24Gb ssd afaict
cultureulterior_ has quit [Quit: cultureulterior_]
<whitequark> banisterfiend: and I can install any 2.5" drive I want
jgomez has quit [Ping timeout: 264 seconds]
<banisterfiend> it does look pretty good
<whitequark> I've yet to replace my HDD, but that's mainly due to laziness and the fact that with LVM I just shuffle my partitions around
<whitequark> when I need more speed
wallerdev has quit [Client Quit]
<whitequark> it is plain awesome. you won't believe your eyes when you'll look at its fullhd ips lcd
<whitequark> and you won't be able to look at old tn lcds ever again without crying
sn0wb1rd has joined #ruby-lang
Mon_Ouie has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
wallerdev has joined #ruby-lang
q560 has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
mistym is now known as mistym_lunch
chimkan_ has quit [Quit: chimkan_]
banisterfiend has joined #ruby-lang
<banisterfiend> whitequark: but it has nothing on retina, right?
sush24_ has quit [Quit: This computer has gone to sleep]
heftig has joined #ruby-lang
mupilot_ has joined #ruby-lang
mupilot_ has quit [Client Quit]
chrismcg is now known as zz_chrismcg
q560 has quit [Quit: Page closed]
m3nd3s has quit [Read error: Connection reset by peer]
m3nd3s_ has joined #ruby-lang
retro|cz has quit [Ping timeout: 244 seconds]
mupilot has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Remote host closed the connection]
muiefreenode has joined #ruby-lang
muiefreenode has left #ruby-lang [#ruby-lang]
chimkan has joined #ruby-lang
muiefreenode has joined #ruby-lang
chimkan has quit [Ping timeout: 256 seconds]
muiefreenode has quit [Quit: Page closed]
<whitequark> banisterfiend: huh?
<whitequark> it's basically the same as retina
codewrangler has joined #ruby-lang
<whitequark> mbp is 220dpi, ux32vd is 180dpi
xyzodiac has quit [Quit: Computer has gone to sleep.]
<whitequark> note that mbp is 15" while ux32vd is 13"; the difference isn't any big anyway.
lcdhoffman has quit [Quit: lcdhoffman]
Ashkin has joined #ruby-lang
runeb has joined #ruby-lang
Carnage\ has joined #ruby-lang
unsymbol has quit [Ping timeout: 252 seconds]
runeb has quit [Remote host closed the connection]
brianritchie has joined #ruby-lang
unsymbol has joined #ruby-lang
brianritchie has quit [Client Quit]
outoftime has joined #ruby-lang
xyzodiac has joined #ruby-lang
Nisstyre has joined #ruby-lang
thatdutchguy has joined #ruby-lang
jgomez has joined #ruby-lang
Bediko has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
seanstickle has joined #ruby-lang
seanstickle has quit [Client Quit]
tenderlove has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
cultureulterior_ has quit [Quit: cultureulterior_]
ebouchut has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
sn0wb1rd has quit [Client Quit]
riffraff has quit [Quit: Leaving]
areil has quit [Remote host closed the connection]
cultureulterior_ has joined #ruby-lang
diegoviola has quit [Ping timeout: 246 seconds]
cultureulterior_ has quit [Client Quit]
xyzodiac has quit [Quit: Computer has gone to sleep.]
Oren has joined #ruby-lang
cirwin has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby-lang
pabs_ has left #ruby-lang [#ruby-lang]
sn0wb1rd has joined #ruby-lang
pabs has joined #ruby-lang
grzywacz has quit [Quit: :wq]
chendo has quit [Read error: Operation timed out]
sn0wb1rd_ has joined #ruby-lang
sn0wb1rd has quit [Read error: Connection reset by peer]
sn0wb1rd_ is now known as sn0wb1rd
Uranio has quit [Quit: WeeChat 0.3.8]
chendo has joined #ruby-lang
madish_ has joined #ruby-lang
nazty has quit [Read error: Operation timed out]
nazty has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby-lang
madish has joined #ruby-lang
robbyoconnor has joined #ruby-lang
brianpWins has joined #ruby-lang
mupilot has joined #ruby-lang
aetcore has joined #ruby-lang
ryanf has joined #ruby-lang
zmack has joined #ruby-lang
madish_ has quit [Ping timeout: 264 seconds]
madish_ has joined #ruby-lang
Oren has quit [Quit: qwebirc exception: Buffer overflow.]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Max SendQ exceeded]
AlHafoudh has joined #ruby-lang
carloslopes has quit [Read error: Connection reset by peer]
madish has quit [Ping timeout: 250 seconds]
carloslopes has joined #ruby-lang
codewrangler has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
codewrangler has joined #ruby-lang
chendo has quit [Ping timeout: 252 seconds]
cultureulterior_ has joined #ruby-lang
madish has joined #ruby-lang
codewrangler has quit [Client Quit]
codewrangler has joined #ruby-lang
codewrangler has quit [Remote host closed the connection]
codewrangler has joined #ruby-lang
chimkan has joined #ruby-lang
mupilot has quit [Quit: mupilot]
madish_ has quit [Ping timeout: 260 seconds]
carloslopes has quit [Ping timeout: 260 seconds]
madish_ has joined #ruby-lang
nemonic has joined #ruby-lang
runeb has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
madish has joined #ruby-lang
afgeneralist has quit [Ping timeout: 252 seconds]
runeb has quit [Ping timeout: 265 seconds]
B|aster has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 256 seconds]
zmack has quit [Remote host closed the connection]
madish_ has quit [Ping timeout: 250 seconds]
madish_ has joined #ruby-lang
carloslopes has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
tbuehlmann has quit []
seydar has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
davidbalbert is now known as davidbalber|away
madish has joined #ruby-lang
cirwin has joined #ruby-lang
madish has quit [Client Quit]
madish has joined #ruby-lang
mrsolo has joined #ruby-lang
madish_ has quit [Ping timeout: 255 seconds]
buscapepe has joined #ruby-lang
madish has quit [Ping timeout: 240 seconds]
svyatov has quit [Quit: svyatov]
banisterfiend has quit [Read error: Connection reset by peer]
nemonic has quit [Quit: WeeChat 0.3.7]
swarley has joined #ruby-lang
r0bglees0n has joined #ruby-lang
aetcore has quit [Remote host closed the connection]
chimkan__ has joined #ruby-lang
s0ber_ has joined #ruby-lang
rekky has quit [Quit: rekky]
nazty has quit [Read error: Connection reset by peer]
fireglow- has joined #ruby-lang
gregmore_ has joined #ruby-lang
comboy_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
cultureulterior_ has quit [Quit: cultureulterior_]
jMCg_ has joined #ruby-lang
pryno has joined #ruby-lang
chris2_ has joined #ruby-lang
lucas_ has joined #ruby-lang
shaman42_ has joined #ruby-lang
thinkdevcode has joined #ruby-lang
dumfries has joined #ruby-lang
znz_v0 has joined #ruby-lang
bastl has joined #ruby-lang
rekky has joined #ruby-lang
buscapepe has quit [Ping timeout: 246 seconds]
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
JohnBat26 has quit [*.net *.split]
chimkan has quit [*.net *.split]
r0bgleeson has quit [*.net *.split]
gregmoreno has quit [*.net *.split]
fireglow has quit [*.net *.split]
bastl_ has quit [*.net *.split]
comboy has quit [*.net *.split]
chris2 has quit [*.net *.split]
dumfries_ has quit [*.net *.split]
s0ber has quit [*.net *.split]
shaman42 has quit [*.net *.split]
lzhz_ has quit [*.net *.split]
jMCg has quit [*.net *.split]
lucas has quit [*.net *.split]
znz_v has quit [*.net *.split]
bryno has quit [*.net *.split]
fireglow- is now known as fireglow
chimkan__ is now known as chimkan
s0ber_ is now known as s0ber
xyzodiac has joined #ruby-lang
cirenyc has joined #ruby-lang
lzhz has joined #ruby-lang
rekky has quit [Client Quit]
m3nd3s_ has quit [Remote host closed the connection]
buscapepe has joined #ruby-lang
mupilot has joined #ruby-lang
JohnBat26 has joined #ruby-lang
towski has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
rippa has quit [Ping timeout: 255 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
chendo has joined #ruby-lang
davidbalber|away is now known as davidbalbert
<zzak> whitequark: i love my ux31a, but i wish i got the 256gb hd
thinkdevcode has quit [Remote host closed the connection]
<zzak> theres a 13" retina now right?
mistym_lunch is now known as mistym
bluepojo has joined #ruby-lang
<seydar> i think i'm going crazy. i'm including a module but not all of the modules methods are being included
<seydar> trying to get a repro
slyphon has quit [Ping timeout: 245 seconds]
bluepojo has quit [Client Quit]
runeb has joined #ruby-lang
<zzak> whitequark: i wish i had at least 8gb of ram too
BigO has quit [Read error: Connection reset by peer]
melter has quit [Remote host closed the connection]
BigO has joined #ruby-lang
bluepojo has joined #ruby-lang
bluepojo has quit [Client Quit]
jgomez has quit [Ping timeout: 246 seconds]
<seydar> basically what i'm learning the hard way yet again is that method redirection is really really hard to do
runeb has quit [Ping timeout: 256 seconds]
jMCg_ is now known as jMCg
chris2_ is now known as chris2
sn0wb1rd has quit [Quit: sn0wb1rd]
sn0wb1rd has joined #ruby-lang
diegoviola has joined #ruby-lang
afgeneralist has joined #ruby-lang
diegovio1a has joined #ruby-lang
diegoviola is now known as Guest14386
diegovio1a is now known as diegoviola
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
Guest14386 has quit [Ping timeout: 260 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
aetcore has joined #ruby-lang
datanoise has quit [Ping timeout: 276 seconds]
weeb1e has joined #ruby-lang
solars has joined #ruby-lang
Carnage\ has quit [Read error: Connection reset by peer]
Carnage\ has joined #ruby-lang
seydar has quit [Quit: leaving]
datanoise has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
runeb has joined #ruby-lang
<imperator> zzak, didn't i kick you? :-P
carloslopes has quit [Remote host closed the connection]
sepp2k1 has joined #ruby-lang
chimkan has quit [Quit: chimkan]
sepp2k has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
buscapepe has quit [Ping timeout: 246 seconds]
Nisstyre has quit [Ping timeout: 246 seconds]
Nisstyre has joined #ruby-lang
benanne has joined #ruby-lang
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
mjio has joined #ruby-lang
chimkan_ has joined #ruby-lang
postmodern has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<andrewvos> How does ruby do garbage collection? I mean, how does it know what variables it can dispose of?
GarethAdams has joined #ruby-lang
<andrewvos> A link would be an acceptable answer
<darix> andrewvos: it tracks which variables still have references in active code?
<andrewvos> darix: How though.
<andrewvos> .-?
s0ber_ has joined #ruby-lang
<andrewvos> .=?*
schaerli has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<yorickpeterse> andrewvos: this is known as the black magic of garbage collectors
<Kero> no, not with regexps like /.=?*/
robbyoconnor has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
s0ber has quit [Ping timeout: 246 seconds]
<darix> http://timetobleed.com/garbage-collection-slides-from-la-ruby-conference/ <- this is linked from the first posting and is a pretty nice presentation
<andrewvos> No, I mean how exactly does it work. How can you know what variables aren't in scope anymore?
<heftig> i believe it does periodic mark and sweep
s0ber_ is now known as s0ber
<heftig> andrewvos: stack frames are garbage-collected as well, AFAIK
<andrewvos> heftig: Yeah I get that. But I'm wondering how exactly an item could be marked "not reachable from anywhere"
<heftig> you start with the context of every thread, following every reference, marking as you go
<heftig> everything not marked afterwards can be disposed
banisterfiend has joined #ruby-lang
<Kero> andrewvos: the run-time knows all objects; it allocated them, so it knows
qpingu has joined #ruby-lang
<andrewvos> Kero: Yeah fair enough, but you need to know every single place this variable could be used.
workmad3 has joined #ruby-lang
<heftig> it knows
<andrewvos> hehe
<Kero> that part heftig answered :)
<andrewvos> heftig: How?
<heftig> why wouldn't it?
<andrewvos> heftig: Well I guess I'm asking the wrong question.
<andrewvos> heftig: I need to know more about how Ruby keeps track of each context I guess.
<andrewvos> I kind of want to build a mini-ruby for learning.
<andrewvos> Ooh shit dinner time.
<andrewvos> Thanks
Darkspiel has quit [Remote host closed the connection]
Hakon has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
musl has quit [Quit: WeeChat 0.3.9.2]
dr_bob has joined #ruby-lang
rue has quit [Ping timeout: 245 seconds]
pcboy_ has quit [Ping timeout: 256 seconds]
rue has joined #ruby-lang
tenderlove has joined #ruby-lang
melter has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<andrewvos> Right where were we :)
<andrewvos> So I guess there's some sort of structure. Ruby parses code and keeps it in a trie I guess, and then different branch types have different rules for variable scope?
<andrewvos> tree*
<zenspider> ruby_parser 3.0.4 released
<drbrain> andrewvos: that describes ruby 1.8
<drbrain> andrewvos: ruby 1.9+ is similar, but the tree gets transformed to bytecode
seydar has joined #ruby-lang
<zenspider> (and thrown out)
<seydar> anyone have any experience with ruby-llvm?
pcboy_ has joined #ruby-lang
<andrewvos> drbrain: Why does it get converted to bytecode? (Or can you offer any resources)
<drbrain> andrewvos: it is easier to optimize byte code (and a VM) over a tree-walking interpreter
sn0wb1rd has joined #ruby-lang
<drbrain> andrewvos: but it's usually easier to write a tree-walking interpreter
<andrewvos> drbrain: I would imagine so.
<andrewvos> drbrain: When you say "easier" you mean performance?
<drbrain> in terms of getting it working in the first place
<andrewvos> No I mean "it is easier to optimize byte code (and a VM) over a tree-walking interpreter"
<drbrain> oh, yes
<andrewvos> drbrain: Hmm, I want to try make a language for fun. I guess I'll go with the tree approach then.
<andrewvos> I suppose I shouldn't even be worrying about garbage collection at this point.
<rue> You should use an Abstract Syntax Trie, just because
runeb has quit [Remote host closed the connection]
<andrewvos> rue: Is it web-scale?
sn0wb1rd has quit [Ping timeout: 246 seconds]
<rue> Could write code like de foo(meh ; beg; danjer; resc Exc => x; e
<drbrain> danjer
robbyoconnor has quit [Ping timeout: 246 seconds]
<drbrain> rue: resc => resq
<rue> You’d need a second pass for that
jaimef has quit [Excess Flood]
<andrewvos> What are good parsers in c?
sailias has quit [Quit: Leaving.]
jaimef has joined #ruby-lang
<zzak> imperator: haha
s0ber_ has joined #ruby-lang
s0ber has quit [Ping timeout: 248 seconds]
s0ber_ is now known as s0ber
cirenyc has quit [Quit: Linkinus - http://linkinus.com]
<drbrain> andrewvos: lots of people use yacc/bison, but not because it's good
<darix> andrewvos: ragel?
<drbrain> andrewvos: I ported a kpeg parser from C to ruby
<drbrain> it was pleasant
datanoise has quit [Ping timeout: 246 seconds]
<drbrain> err, peg parser
<drbrain> darix: yes, I ported https://github.com/jgm/peg-markdown to kpeg
<andrewvos> drbrain: I've been looking at bison now actually.
<andrewvos> drbrain: I'm trying to learn some more C too.
<drbrain> andrewvos: LALR grammars are tricky to debug
blacktulip has quit [Remote host closed the connection]
<andrewvos> drbrain: What are the other type of parsers?
<andrewvos> drbrain: Disregard that, I can Google this stuff.
<drbrain> andrewvos: PEG parsers are popular
<drbrain> and ANTLR
<seydar> andrewvos: LR(k)
<drbrain> I bet zenspider could tell you which parser books to read
<darix> andrewvos: ragel is used e.g. in mongrel (and servers based on its parser) and e.g. lighty2
<seydar> oh speaking of parsers, i recently discovered whittle (https://github.com/d11wtq/whittle) and i really enjoy using it
<banisterfiend> andrewvos: there's a coursera course on compiler construction
<banisterfiend> andrewvos: it's pretty awesome, it gives you a background on the actual mathematics, you learn to mathematically prove that a regex matches a certain string, etc
<andrewvos> zenspider: Halp
musl has joined #ruby-lang
<banisterfiend> and build up the basic regex operators from first principles
musl has quit [Client Quit]
<andrewvos> banisterfiend: I do not know coursera. I'll take a look
<banisterfiend> andrewvos: ill find u a link, one sec
<andrewvos> Thanks dude
<zenspider> what's up?
<banisterfiend> it's basically video lectures from stanford
musl has joined #ruby-lang
<darix> now you woke him up :p
AlHafoudh has quit [Quit: Computer has gone to sleep.]
<zenspider> I'm trying to download the new git/perforce setup so you fuckers will stop bugging me :P
<andrewvos> zenspider: Looking for some good reads on language parsing
<zenspider> andrewvos: what sorts?
mupilot has quit [Quit: mupilot]
<andrewvos> zenspider: Well, I'm looking to build a language and parse it in C. Want to learn more C, which is why I want to do it in C.
ebouchut has quit [Quit: This computer has gone to sleep]
<andrewvos> zenspider: So anything that pops into your head :)
<zenspider> what sort of language?
<andrewvos> langauge=programming language
<zenspider> a clusterfuck like ruby?
<andrewvos> zenspider: Something rubyish I suppose
<zenspider> or something more normal?
mupilot has joined #ruby-lang
<andrewvos> Hmm, for starters I just want to get methods working really.
<andrewvos> I guess I'll work up from there.
burgestrand has joined #ruby-lang
<zenspider> well... the absolute best imhfo is Compiler Construction by Niklaus Wirth, but the man was anal about keeping things clean. It covers LL parsing only but it is amazing.
<zenspider> you can find the PDF for free online these days
<zenspider> but I love the paper version because it is TINY
<zenspider> he taught from that book... it's well proven
sn0wb1rd has joined #ruby-lang
<zenspider> you'll prolly need to go PDF because it'd cost more to ship it to you than to buy it
<banisterfiend> andrewvos: are u going to do everything from scratch? your own lexer ? your own parser? or use a generator thingy?
<andrewvos> zenspider: Thanks I'll dig around amazing
<andrewvos> amazon*
<darix> andrewvos: osx?;)
<andrewvos> banisterfiend: Well, I would like to have the parser done by some other library because it doesn't really interest me that much.
<darix> hmm
<andrewvos> zenspider: £80!
<zenspider> if you want the latest and greatest, I'd suggest poking at ometa out of the vpri group. it can do non-textual parsing so you can write transformative grammars for your trees
<andrewvos> zenspider: Oh wait, I can get it used for 20
peterc has joined #ruby-lang
<zzak> zenspider: what about the dragon book?
<andrewvos> darix: osx?
<zzak> havent read it myself, but heard good things
<zenspider> I dislike the dragon book for actual learning / use. it's more of an overly comprehensive survey and for that it is great
<zenspider> ometa is also LL-ish...
<whitequark> I'd highly recommend EOPL3 on these topics
<whitequark> and ragel+racc for writing real-world parsers in ruby
<zenspider> if you really want something as ridiculously complex as ruby, then you're prolly gonna have to go with LR, which I don't like, but works
<andrewvos> zzak: Broken link
chimkan_ has quit [Quit: chimkan_]
<andrewvos> zenspider: Well, if I were to rewrite ruby I wouldn't include a lot of stuff. Either way, I don't intend this to ever get anywhere.
<eam> I'm curious, what are the top syntax changes you'd make (either add or remove) if you had a green field?
benanne has quit [Quit: kbai]
<zenspider> afaik, ragel will only work for lexing highly regular absolutely static languages... as soon as you need to communicate between the lexer and the parser you're screwed
<seydar> zenspider: why don't you like LR?
<andrewvos> Heh, tricky question. The obvious answer would be shit like flip flops. Remove anything not in widespread use.
<zenspider> seydar: it is retarded
lcdhoffman has quit [Quit: lcdhoffman]
<zenspider> I'd remove heredocs staight off
<andrewvos> zenspider: Whaa?
<andrewvos> You don't use heredocs?
<whitequark> zenspider: communicate as in what?
<andrewvos> zenspider: That look like it?
<zenspider> I didn't say I don't use them. I said I'd remove them
<zzak> andrewvos: yah
<andrewvos> Why don't you like them?
<zenspider> andrewvos: that PDF above is 200 for me
<zenspider> you should just go with that for now
<andrewvos> zzak: Thanks
<zenspider> if you can't get to it, I can mirror it
<andrewvos> zenspider: Maybe a good idea in case I give up :)
chimkan has joined #ruby-lang
<zenspider> andrewvos: rsyncing...
<zenspider> whitequark: the ruby parser and lexer bidirectionally communicate to maintain state. it's _horrible_
<zenspider> we're just shy of perl in terms of unparsability
<andrewvos> zenspider: Thanks!
<whitequark> zenspider: only thing I could think of is the static environment
<whitequark> and I'm pretty sure that can be easily implemented in a ragel lexer if needed
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
datanoise has joined #ruby-lang
<seydar> zenspider: eloquently stated. any specific complaints?
sn0wb1rd has quit [Quit: sn0wb1rd]
bluepojo has joined #ruby-lang
Averna has joined #ruby-lang
svyatov has joined #ruby-lang
<zenspider> seydar: compare EBNF with yacc/bison/pretty-much-any-LR-system ... EBNF is MUCH more readable / understandable / maintainable and works MUCH more like how you'd code / think
<zenspider> that R is a bitch
datanoise has quit [Ping timeout: 246 seconds]
thatdutchguy has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
gsav has quit [Ping timeout: 260 seconds]
<crankharder> why doesn't this work? and is there a better pattern to follow such that i can define a constant in subclasses that ets used in a method in the parent class. i dont have much intention of instantiating and using the method in the parent class: https://gist.github.com/4e41812f68b608ad8fd1
lcdhoffman has joined #ruby-lang
<whitequark> zenspider: what do you think of Coco/R?
<andrewvos> crankharder: Use a method?
<whitequark> I recall finding it quite nice but very unfinished
<whitequark> er wait, you wrote it
valeri_uF0 has joined #ruby-lang
Bediko has left #ruby-lang [#ruby-lang]
meise_ has quit [Ping timeout: 240 seconds]
jMCg has quit [Ping timeout: 252 seconds]
akahn has quit [Ping timeout: 252 seconds]
randym has quit [Ping timeout: 240 seconds]
valeri_ufo has quit [Ping timeout: 240 seconds]
bluepojo has quit [Quit: Leaving.]
mupilot has quit [Quit: mupilot]
jMCg has joined #ruby-lang
meise has joined #ruby-lang
<andrewvos> Awkwaaard
kurko_ has quit [Quit: Computer has gone to sleep.]
<seydar> hahahaha
runeb has joined #ruby-lang
retro|cz has joined #ruby-lang
<cirwin> crankharder: constant lookup uses the currently open class, not the class of self: http://cirw.in/blog/constant-lookup
randym has joined #ruby-lang
<zenspider> whitequark: yeah. lacks polish. definitely in line with wirth's philosophy tho... considering wirth used to guest lecture for the coco/r author
chendo has quit [Ping timeout: 250 seconds]
mistym has quit [Remote host closed the connection]
* zenspider keeps wishing crankharder would rename to cranksmarter
<seydar> does anyone know david holroyd's irc nick?
chendo has joined #ruby-lang
<zenspider> I didn't write coco/r. I wrote coco/r(uby). and yeah. it sucks. I mostly did it as an exercise to port crazy C code to ruby
<zenspider> it works (well... worked), but it has no doco or anything
akahn has joined #ruby-lang
datanoise has joined #ruby-lang
runeb has quit [Ping timeout: 256 seconds]
afgeneralist has quit [Ping timeout: 256 seconds]
<seydar> anybody have any experience with ruby-llvm
mwjcomputing has joined #ruby-lang
<andrewvos> banisterfiend: Shit that coursera stuff looks amazing.
sn0wb1rd has joined #ruby-lang
thatdutchguy has joined #ruby-lang
<banisterfiend> andrewvos: yeah, and it doesnt skimp on the math too, so u get a deep understanding of regular languages and so on
<banisterfiend> (it's not hard math)
datanoise has quit [Ping timeout: 264 seconds]
chimkan has quit [Quit: chimkan]
BigO has quit [Remote host closed the connection]
Hakon has quit [Quit: Leaving...]
<andrewvos> Yeah, as you guessed I'm not the best at math.
Carnage\ has quit []
<banisterfiend> it's really easy, im not even sure you can call it math really, it's a kind of an algebra he derives for working with regular expressions
davidbalbert is now known as davidbalber|away
thatdutchguy has quit [Remote host closed the connection]
<andrewvos> banisterfiend: Cool. Wondering how to get all these videos on an iPhone or something.
dankest has joined #ruby-lang
chimkan_ has joined #ruby-lang
<zenspider> it's discrete math
<andrewvos> I think watching them at work might get me into a spot of trouble.
jgomez has joined #ruby-lang
<whitequark> zenspider: yeah, I meant coco/ruby
Hakon has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
aetcore has quit [Remote host closed the connection]
solars has quit [Ping timeout: 248 seconds]
Hakon has quit [Quit: Leaving...]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
r0bglees0n has quit [Ping timeout: 255 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
headius has quit [Quit: headius]
tockitj_ has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang