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
nofxxxx has quit [Ping timeout: 251 seconds]
Mike has joined #ruby-lang
nofxxxx has joined #ruby-lang
Mike is now known as Guest40369
qpingu has joined #ruby-lang
virunga has joined #ruby-lang
Guest40369 has left #ruby-lang [#ruby-lang]
s0ra_h is now known as sora_h
nertzy has quit [Quit: Leaving]
Guest40369 has joined #ruby-lang
Guest40369 has left #ruby-lang [#ruby-lang]
headius has joined #ruby-lang
mikenz has joined #ruby-lang
mikenz_ has joined #ruby-lang
mikenz_ has quit [Client Quit]
mikenz00001 has joined #ruby-lang
nofxxx has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
nofxxxx has quit [Ping timeout: 240 seconds]
nofxxxx has joined #ruby-lang
nofxxx has quit [Ping timeout: 252 seconds]
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
sora_h is now known as s0ra_h
naz has quit [Read error: Connection reset by peer]
justinseiter has joined #ruby-lang
headius has quit [Quit: headius]
Guedes has joined #ruby-lang
S1kx has joined #ruby-lang
S2kx has quit [Ping timeout: 264 seconds]
<zenspider> flibitijibibo: aaaand... nothing.
krzkrzkrz has joined #ruby-lang
krz has quit [Ping timeout: 246 seconds]
krzkrzkrz is now known as krz
gsav has joined #ruby-lang
krzkrzkrz has joined #ruby-lang
justinseiter has quit [Ping timeout: 248 seconds]
krz has quit [Ping timeout: 250 seconds]
krzkrzkrz is now known as krz
mikenz00001 has quit [Quit: Page closed]
imperator has quit [Quit: Leaving]
lcdhoffman has quit [Quit: lcdhoffman]
<zenspider> RAWR!
<zenspider> holy shit
<zenspider> I'm down to just ruby2ruby not being parsable by ruby19parser
savage- has quit [Read error: Operation timed out]
qpingu has quit [Quit: Leaving.]
headius has joined #ruby-lang
S1kx has quit [Read error: Connection reset by peer]
qpingu has joined #ruby-lang
<zenspider> oooh... and that one looks like it might be easy too!
<zenspider> god this new process is awesome
S1kx has joined #ruby-lang
<zenspider> very very very efficient
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
<ged> zenspider: Which new process?
mrsolo has quit [Quit: Leaving]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<zenspider> I've got a new script called ruby_parse_extract_errors which "magically" reduces the code being parsed down to the combination of methods that will cause the parse error
mistym has quit [Remote host closed the connection]
<zenspider> as such, I can scan through my projects using a simple shell script and it'll spit out all the errors reduced down as much as possible
mistym has joined #ruby-lang
mistym has joined #ruby-lang
<zenspider> then extracting the essence of the error is really easy
<ged> Wow, neat!
<zenspider> that, and I have some scripts to normalize racc vs yacc output to make things much more clean and comparable so I can hone in on where things went wrong ...
<zenspider> takes me a couple minutes instead of an hour
<zenspider> aaaand there goes the last one!
<ged> Very nice.
<zenspider> holy crap. I can parse all my projects using the 1.9 parser ... finally
spuk has joined #ruby-lang
nofxxxx has quit [Ping timeout: 255 seconds]
gix has quit [Ping timeout: 264 seconds]
krzkrzkrz has joined #ruby-lang
<zenspider> ruby_parser 3.0.0.a5 released
<zenspider> rawr
virunga has quit [Quit: Sto andando via]
ltd has quit [Ping timeout: 256 seconds]
krz has quit [Ping timeout: 246 seconds]
krzkrzkrz is now known as krz
gix has joined #ruby-lang
dous has quit [Remote host closed the connection]
krzkrzkrz has joined #ruby-lang
nertzy has joined #ruby-lang
lcdhoffman has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
krz has quit [Ping timeout: 252 seconds]
krzkrzkrz is now known as krz
bryancp has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
bryancp has joined #ruby-lang
nofxxxx has joined #ruby-lang
headius has quit [Quit: headius]
timepilot has joined #ruby-lang
towski has quit [Remote host closed the connection]
<burgestrand> Can I build a gem for another platform than my current one?
<burgestrand> Or, how?
yugui is now known as yugui_zzz
bfreeman_ has joined #ruby-lang
bfreeman has quit [Read error: Connection reset by peer]
jtoy has quit [Quit: jtoy]
s0ra_h is now known as sora_h
bfreeman_ has quit [Client Quit]
Nisstyre has quit [Read error: Connection reset by peer]
yugui_zzz is now known as yugui
Nisstyre has joined #ruby-lang
flibitijibibo has left #ruby-lang ["Left Channel"]
justinseiter has joined #ruby-lang
ryanf has quit [Quit: Lost terminal]
ryanf has joined #ruby-lang
verbad has joined #ruby-lang
sora_h is now known as s0ra_h
wallerdev has quit [Read error: Connection reset by peer]
snorkdude has joined #ruby-lang
neoesque has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
t4nkd has quit [Quit: Linkinus - http://linkinus.com]
Manhose has quit [Quit: Gone fishing]
savage- has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
hahuang65 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
gsav has quit [Ping timeout: 260 seconds]
neocoin has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
headius has joined #ruby-lang
gsav has joined #ruby-lang
ltd has joined #ruby-lang
igotnolegs has joined #ruby-lang
nertzy has quit [Quit: Leaving]
tcopp has joined #ruby-lang
lcdhoffman has joined #ruby-lang
timepilot has quit [Quit: timepilot]
andrewhl has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
toretore has quit [Quit: Leaving]
gsav has quit [Ping timeout: 246 seconds]
ramonmaruko has joined #ruby-lang
tcopp has left #ruby-lang [#ruby-lang]
s0ra_h is now known as sora_h
tcopp has joined #ruby-lang
tcopp has left #ruby-lang [#ruby-lang]
sevvie has quit [Quit: sevvie]
gsav has joined #ruby-lang
sevvie has joined #ruby-lang
bfreeman has joined #ruby-lang
andrewhl has joined #ruby-lang
yugui is now known as yugui_zzz
guns has joined #ruby-lang
guns has quit [Quit: guns]
guns has joined #ruby-lang
WillMarshall has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
justinseiter has quit [Quit: Leaving]
snorkdude has quit []
snorkdude has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
ryanf has quit [Quit: leaving]
sora_h is now known as s0ra_h
ylluminate has quit [Quit: Bye!]
akira989 has joined #ruby-lang
s0ra_h is now known as sora_h
igotnolegs has quit [Ping timeout: 255 seconds]
igotnolegs has joined #ruby-lang
gsav has quit [Ping timeout: 248 seconds]
sevvie has quit [Quit: sevvie]
sora_h is now known as s0ra_h
sevvie has joined #ruby-lang
nullthreat has joined #ruby-lang
headius has quit [Quit: headius]
verbad has quit []
symm-_ has joined #ruby-lang
dv310p3r has joined #ruby-lang
sevvie has quit [Quit: sevvie]
gsav has joined #ruby-lang
gsav has quit [Ping timeout: 260 seconds]
snorkdude has quit [Ping timeout: 260 seconds]
heftig has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
jbsan has quit [Quit: JB.. OUT!]
dv310p3r has quit [Ping timeout: 260 seconds]
Rezwan has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Z33K|Lux has joined #ruby-lang
chimkan_ has joined #ruby-lang
gsav has joined #ruby-lang
chimkan_ has quit [Client Quit]
burgestrand has quit [Ping timeout: 255 seconds]
akira989 has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
gsav has quit [Ping timeout: 264 seconds]
burgestrand has joined #ruby-lang
tenderlove has joined #ruby-lang
akira989 has joined #ruby-lang
codewrangler has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Weems has joined #ruby-lang
jbsan has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
ruurd has joined #ruby-lang
gsav has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
gsav has quit [Ping timeout: 248 seconds]
skinny_m has quit [Quit: ZNC - http://znc.sourceforge.net]
no_i_wont has joined #ruby-lang
akira989 has joined #ruby-lang
gsav has joined #ruby-lang
sora_h is now known as s0ra_h
zmack has joined #ruby-lang
hibariya has quit [Ping timeout: 244 seconds]
gsav has quit [Ping timeout: 246 seconds]
burgestrand has quit [Quit: Leaving.]
kain has quit [Quit: This computer has gone to sleep]
kain has joined #ruby-lang
sevvie has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
robbyoconnor has joined #ruby-lang
Fullmoon has joined #ruby-lang
rutkla has joined #ruby-lang
WillMarshall has quit [Read error: Connection reset by peer]
mikenz has quit [Quit: Leaving.]
heftig has joined #ruby-lang
zmack has quit [Remote host closed the connection]
dous has quit [Remote host closed the connection]
gsav has joined #ruby-lang
tomzx_ has joined #ruby-lang
wallerdev has joined #ruby-lang
WillMarshall has joined #ruby-lang
andrewhl has quit [Remote host closed the connection]
andrewhl has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
andrewhl has quit [Remote host closed the connection]
andrew___ has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
Fretta has quit [Quit: Fretta]
leriksenau has joined #ruby-lang
s0ra_h is now known as sora_h
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
kristofferrr has joined #ruby-lang
neoesque has quit [Quit: Bye!]
rutkla has quit [Ping timeout: 240 seconds]
umttumt has joined #ruby-lang
neoesque has joined #ruby-lang
rubyjunkie has joined #ruby-lang
savage- has quit [Remote host closed the connection]
<kristofferrr> Hi guys, I'm having a problem with .first() not selecting the amount of results passed to it. Code and further explanation at http://pastie.org/private/8tgsguxtzk5mwdubid4q4q - anyone got an idea what's going on?
Oloryn_lt2 has quit [Read error: Connection reset by peer]
sora_h is now known as s0ra_h
banisterfiend has joined #ruby-lang
andrew___ has quit [Remote host closed the connection]
kitallis has joined #ruby-lang
savage- has joined #ruby-lang
dous has joined #ruby-lang
solars has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
workmad3 has joined #ruby-lang
WillMarshall has quit [Read error: Connection reset by peer]
ruurd has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
tenderlove has quit [Remote host closed the connection]
kalleth has quit [Ping timeout: 252 seconds]
leriksenau has quit [Remote host closed the connection]
Z33K|Lux has quit []
leriksenau has joined #ruby-lang
rutkla has joined #ruby-lang
rubyjunkie has quit [Ping timeout: 264 seconds]
tomzx_ has quit [Ping timeout: 246 seconds]
vmoravec has quit [Remote host closed the connection]
dc5ala has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
headius has joined #ruby-lang
diegoviola has quit [Ping timeout: 264 seconds]
srbartlett has quit [Remote host closed the connection]
gsav has quit [Ping timeout: 252 seconds]
savage- has quit [Remote host closed the connection]
leriksenau has quit [Quit: leriksenau]
s0ra_h is now known as sora_h
heftig has quit [Ping timeout: 272 seconds]
umttumt has quit [Remote host closed the connection]
headius has quit [Quit: headius]
umttumt has joined #ruby-lang
Machiavelli43 has joined #ruby-lang
sora_h is now known as s0ra_h
brianpWins has quit [Quit: brianpWins]
sevvie has quit [Quit: sevvie]
jxie has quit [Quit: leaving]
Machiavelli43 has left #ruby-lang [#ruby-lang]
mssola has joined #ruby-lang
judofyr has joined #ruby-lang
kain has quit [Quit: This computer has gone to sleep]
cha1tanya has quit [Ping timeout: 255 seconds]
robin850 has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
gnufied has joined #ruby-lang
zmack has joined #ruby-lang
zmack_ has joined #ruby-lang
<ramonmaruko> Hello, is it possible to get the ctime of a File with a nanosecond precision for 1.8.7?
zmack has quit [Ping timeout: 260 seconds]
fgomez has quit [Ping timeout: 260 seconds]
kalleth_ has joined #ruby-lang
kalleth_ has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
<rue> You can try #to_f if the underlying system supports it, but I’m not certain
cantonic_ has joined #ruby-lang
<ramonmaruko> tried ctime.to_f and it still doesn't detect the difference between the two points in time I'm interested in
<ramonmaruko> works fine for 1.9.2, however
Criztian has joined #ruby-lang
cantonic has quit [Ping timeout: 252 seconds]
cantonic_ is now known as cantonic
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
zz_chrismcg is now known as chrismcg
Hakon has joined #ruby-lang
dous has quit [Remote host closed the connection]
physicist has joined #ruby-lang
physicist has quit [Client Quit]
robotmay has joined #ruby-lang
umttumt has quit [Remote host closed the connection]
cdt has joined #ruby-lang
qwerxy has joined #ruby-lang
symm-_ has left #ruby-lang [#ruby-lang]
gnufied has quit [Quit: Leaving.]
nagato has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
sepp2k has joined #ruby-lang
gnufied has joined #ruby-lang
s0ra_h is now known as sora_h
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
woollyams has joined #ruby-lang
sora_h is now known as s0ra_h
charlies_ has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
neocoin has joined #ruby-lang
neocoin has quit [Read error: Connection reset by peer]
neoesque has quit [Quit: Bye!]
dRbiG has quit [Ping timeout: 252 seconds]
virunga has joined #ruby-lang
dRbiG has joined #ruby-lang
LnL has joined #ruby-lang
jordan` has quit [Ping timeout: 248 seconds]
jordan` has joined #ruby-lang
jxie has joined #ruby-lang
s0ra_h is now known as sora_h
charlies_ is now known as charliesome_
judofyr_ has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
abletony84 has joined #ruby-lang
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
facest has quit [Ping timeout: 255 seconds]
faces has joined #ruby-lang
<abletony84> Hi, I just did a "gem install rails" here on OpenBSD, but I'm getting zsh: command not found: rails - anybody know what's up? I've never had to add any paths to dotfiles for this kinda stuff.
LnL has quit [Quit: Leaving]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
guns has quit [Ping timeout: 246 seconds]
<kristofferrr> I'm having a problem with .first() not selecting the amount of results it should. Code and further explanation at http://pastie.org/private/8tgsguxtzk5mwdubid4q4q - has anyone got an idea about what's going on?
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby-lang
<jasiek> where can i find more information about the rb_exc_new* family of functions? i'm trying to modify the behavior of the built-in Enumerator class.
<whitequark> use the source, Luke
rolfb has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<jasiek> is it simply a convenience function?
<banisterfiend> jasiek: use the 'ack' utility
<banisterfiend> or whitequark's website :)
<whitequark> jasiek: yeah, kind of
<jasiek> is there a code style guide for mri's source?
<whitequark> nothing I knew about
<whitequark> well, just look at how it's done already and do the same
<whitequark> sometimes it's pretty arbitrary.
<jasiek> ok
sora_h is now known as s0ra_h
chendo_ has quit [Quit: Leaving...]
BlackShadow has joined #ruby-lang
Axsuul has quit [Ping timeout: 248 seconds]
charliesome_ is now known as kharliesome
BlackShadow has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
kharliesome is now known as charlie_some
<yorickpeterse> jasiek: Ruby doesn't really have any formal coding guidelines
<yorickpeterse> which I'd say is a bit of a bummer but also understandable
nofxxxx has quit [Ping timeout: 252 seconds]
akira989 has quit [Ping timeout: 250 seconds]
judofyr_ has left #ruby-lang [#ruby-lang]
judofyr has joined #ruby-lang
<judofyr> jasiek: it uses this indentation-style, which can look kinda weird unless your editor has the hard tab is set to 8 spaces
<jaska> hard tab.. *shiver*
virunga has quit [Quit: Sto andando via]
mikenz has joined #ruby-lang
mikenz has left #ruby-lang [#ruby-lang]
akira989 has joined #ruby-lang
rolfb has quit [Quit: Leaving...]
gnufied has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
mwjcomputing has joined #ruby-lang
apeiros_ has joined #ruby-lang
krz has quit [Quit: krz]
s0ber has quit [Ping timeout: 248 seconds]
andrew___ has joined #ruby-lang
andrew___ has quit [Remote host closed the connection]
andrew___ has joined #ruby-lang
andrew___ has quit [Remote host closed the connection]
AlHafoudh has joined #ruby-lang
abletony84 has quit [Quit: leaving]
gsav has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
bryancp has joined #ruby-lang
virunga has joined #ruby-lang
BlackShadow has joined #ruby-lang
kristofferrr has quit [Ping timeout: 240 seconds]
ryez has joined #ruby-lang
rolfb has joined #ruby-lang
gnufied1 has joined #ruby-lang
gnufied has quit [Read error: Connection reset by peer]
abletony84 has joined #ruby-lang
<abletony84> Anybody know why the libv8 gem won't build? https://gist.github.com/3226160 - it says "Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher" but I already have gcc-4.6.2.
kvirani has joined #ruby-lang
Jake232 has joined #ruby-lang
<Jake232> How can is it that with nokogiri I can run MyModule::MyClass(html_string), and it works
<Jake232> without calling a metohod?
<Jake232> NokoGiri::HTML(html) does the same as NokoGiri::HTML.parse(html)
<judofyr> Jake232: Nokogiri.HTML(html) also works
toretore has joined #ruby-lang
<judofyr> Jake232: class Nokogiri; def self.HTML(s) … end end
<judofyr> it's just a regular method
<virunga> abletony84: did you put the gcc's path in the PATH env variable?
<rue> Ninjaboy!
<judofyr> Jake232: although it's not used often, :: can be used to call class methods: s = String::new
<Jake232> But what about the ::, that's for namespacing? You can't call a method with it can you?
<Jake232> Oh
<Jake232> That explains it then
<rue> I kinda prefer to use the #parse… it looks weird just namespaced
<Jake232> I pressumed that Nokogiri::HTML was a class, rather than a method
<judofyr> it's a class too
<judofyr> Nokogiri::HTML is a class, Nokogiri::HTML() is a method call
<abletony84> virunga: yup
<judofyr> methods and classes lives in different namespaces
<Jake232> So I can have a class with the same name as a method?
<judofyr> as long as the class name is uppercase, yes
<Jake232> And, parenthesis are optional in ruby, so how would it know whether you wanted the method or the class?
<whitequark> Jake232: when method begins with an uppercase letter, no way
<judofyr> Jake232: parenthesis are not optional when you use :: and the method begins with an uppercase
<apeiros_> judofyr: you can even call normal methods with it
<Jake232> Ahh, where can I read up on this? I've never even seen uppercase methods before
<Jake232> and I've been using Ruby for months now
<rue> You should always, always, use parentheses with the capitalized methods
<apeiros_> ruby-1.9.3-p194:001:0>> "hello"::upcase # => "HELLO"
<rue> Just for clarity.
<apeiros_> and it's superugly IMO
<judofyr> apeiros_: makes sense. I've never seen it before though.
<judofyr> apieros*
<rue> Like Integer("1") and so on…
<rue> Hahaa
<apeiros_> Jake232: um, method names are only restricted to start with [A-Za-z_]
<apeiros_> other than that, I'm not aware of any limitation
<judofyr> well, strictly speaking method names can be anything as long as you use send/define_method…
<apeiros_> and those limitations even only apply to methods you want to be able to invoke without send. with send, every valid symbol is a valid method name afair
<judofyr> ;)
kvirani has quit [Remote host closed the connection]
<oddmunds> apeiros_: what about methods named [], +, etc?
<judofyr> oddmunds: ah, those are special :)
<judofyr> +@, -@ are even more special
<oddmunds> they're not normal methods?
tommyvyo has joined #ruby-lang
<apeiros_> they're normal methods with special syntax
<judofyr> yes
<oddmunds> ruby is so consistent – on the surface
dous has quit [Remote host closed the connection]
<rue> 1.-@
<apeiros_> heh
<judofyr> they don't follow the [A-Za-z_]-rule
<judofyr> rue: +1.-@.!
<rue> !
<judofyr> +1.-@.!::!
<apeiros_> lets say ruby sacrifices a little bit of consistence for a little bit of convenience.
<oddmunds> 1.O
<apeiros_> I'd say it's nicer to be able to write x = -a instead of x = a.negative
<apeiros_> (or negated? whatever)
<oddmunds> yeah
<oddmunds> does the can you write '- a' or does it have to be '-a'?
<rue> Try it
<judofyr> +0.-@::!? ?::1
<oddmunds> -"does the"
<rue> Should always -a, of course.
<darix> apeiros_: i think there was already a discussion to allow more characters in method names and such. so you could actually use the lambda symbol
<rue> darix: You can
<apeiros_> darix: I don't know how it is in 1.9, but in 1.8, you could
<workmad3> apeiros_: you can use unicode characters in method and variable names in 1.9
<apeiros_> only with `# encoding: utf-8`, I assume?
<apeiros_> same as in 1.8 then
<apeiros_> (there it was $KCODE)
<Jake232> Using the actual lambda sign just seems wrong
<Jake232> and awkward
<workmad3> apeiros_: probably... it's a bit hard to read utf8 characters from the source if it's being read as ASCII :)
<whitequark> Jake232: not for me, for example
<oddmunds> i like the lambda
<Jake232> I dont even know how to do a lambda sign
<whitequark> apeiros_: $KCODE did not affect the way identifiers were read
<apeiros_> whitequark: you know that `alias` does not need symbols?
<apeiros_> `alias λ lambda` is valid
<whitequark> Jake232: I've configured XCompose, so it's bound to <Ralt> l a
<whitequark> apeiros_: yeah, that's jn oldust a habit
<whitequark> damned ISP. just an old habit.
<whitequark> apeiros_: (KCODE) it just affected the way strings were compared or something like that. it's very different from 1.9 encodings.
<apeiros_> whitequark: it affected more. but yes, it's vastly different from #encoding in 1.9
hynkle has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
<apeiros_> somehow I intended to do tons of things when coming home - and now I sit here… bored…
<oddmunds> what cool things?
<Jake232> I have tons of things I need to do, and yet have done none of them
<apeiros_> hm… play sc2 ladder, play d3, work on a js sc2 build-order simulator, work on my one-page addressbook app, …
<apeiros_> Jake232: I talk about fun things! of course there's also a ton of things I *should* do :-/
foor has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
<Jake232> The difference is we need to launch the new beta next week, and it;s like 50% done, and has been worked on for 2months
<Jake232> 1week to finish the other 50%
<Jake232> ;)
BlackShadow has quit [Remote host closed the connection]
<apeiros_> ah well, I got a day off today (national holiday) and was in holidays on monday & tuesday
banisterfiend has quit [Read error: Connection reset by peer]
<apeiros_> so work starts again tomorrow.
foor has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
banisterfiend has joined #ruby-lang
<Jake232> I've been putting of work this morning, I need to do some eventmachine work, which means callbacks
<Jake232> zzz
<Jake232> evented programming is the worst
<whitequark> em-synchrony?
<Jake232> Yea, for some of the stuff
<whitequark> apeiros_: I had a fun idea while working on my static ruby compiler
<whitequark> if I already have CPS IR I could just dump it as-is to the target language of choice
<whitequark> javascript or even just ruby
<whitequark> and magically convert imperative code to evented
<whitequark> because CPS is basically the shit you're required to write in order to use explicitly evented I/O
<Jake232> CPS?
<whitequark> continuation-passing style
nofxx has joined #ruby-lang
<Jake232> haha, wikipedied it, saw functional programming style stuff everywhere
<Jake232> decided to close the tab
<Jake232> :D
<whitequark> *shrug* functional programming is the stuff you need to know if you want to write anything fast
<whitequark> i.e. _not_ MRI.
<whitequark> basically V8 and JVM both use SSA, which is essentially the exactly same thing as CPS
<rue> Jake232: Simply put, you pass in the next action to whatever method you’re invoking
<whitequark> for SSA, you draw fancy graphs and arrows. for CPS, you write sexps.
<Jake232> Yea, I've been planning to look into the functional programming stuff, never got round to it yet
carloslopes has joined #ruby-lang
<whitequark> underneath the looks, it's exactly same thing.
<whitequark> hm
<Jake232> I'll get recommened a good resource at some point, and likely decide to take a look
<apeiros_> whitequark: oy, I think that's slightly over my head :(
<whitequark> I'd recommend reading http://wingolog.org/ for that
<whitequark> he describes V8's internals in a really nice and understandable way
<whitequark> basically that guy's articles is the reason I decided to jump in and try to write a good compiler
certainty has quit [Ping timeout: 244 seconds]
<whitequark> never had any regret for that :D
<whitequark> http://github.com/whitequark/furnace-avm2 is a side project based on the same ideas
<Jake232> I don't think particulary many people use Ruby where they need gaurenteed speed though
<Jake232> Or if they do, it's ussually a library with C bindings
<whitequark> Jake232: and I think there's no real reason for that, except that no one has written a fast enough Ruby yet
<whitequark> well, there's a nuance, as usual: my implementation will probably never run Rails, at least not in foreseeable future
<Jake232> It's the same with all dynamic languages, not just Ruby, and you're correct, I guess that is the reason. I think the reason people enjoy dynamic lanuages though for the ease of use and the fact they do things for you
<Jake232> is what makes them so incredibly hard to make fast
<whitequark> but if you need something to crank the data with the speed of C, it'll be the right tool to use
<whitequark> Jake232: look up Smalltalk or Scheme implementations
<whitequark> some of them are _very_ fast
<whitequark> 1.5x slower than C, for example
<whitequark> both are incredibly dynamic
Mon_Ouie has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby-lang
<workmad3> whitequark: both of them have also had a long, long time to get good VMs for the language
<Jake232> Pythons PyPy is nice, however it restricts the 'dynamicness' of the language significantly
<whitequark> workmad3: indeed. and Ruby isn't particularly new either
zenspider has quit [Read error: Connection reset by peer]
<workmad3> whitequark: true, but the main implementation has only recently moved to using a VM internally
<whitequark> *shrug* so what? MRI's main goal is being a reference
<Jake232> Rubinius has made a good go at making Ruby faster right? I've never used it
<Jake232> but from what I've heard it's significanlty faster
<whitequark> in my experience, it's 2x slower than MRI at real workloads
sepp2k1 has joined #ruby-lang
<whitequark> depends heavily on the workload, I've measured that on my decompiler
AlHafoudh has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<workmad3> whitequark: yeah, I was meaning more that, while the language isn't new (although still newer than smalltalk and scheme), the runtime technology is still quite young in comparison
<whitequark> it's so CPU and GC-heavy so it checks your RAM better than memtest86+
<whitequark> workmad3: basic principles of translating and optimizing dynamic languages didn't change significantly in last 20 years or so
<whitequark> maybe 30.
<rue> You can’t lump dynamic languages together
s0ber has joined #ruby-lang
<whitequark> Lars Bak and his excellent JVM/V8 work is all based on his thesis from beginning of '90's
<Harzilein> hi
sepp2k has quit [Ping timeout: 264 seconds]
<Harzilein> is there a nice gem that allows me to replace huge static case or elsif with something dynamic?
<Harzilein> i'd like that replaced with something object oriented, so the matcher captures can be separated
burgestrand has joined #ruby-lang
<whitequark> rue: of course
sevvie has joined #ruby-lang
<whitequark> rue: but implementing a good compiler is a research-heavy task in the first place
rippa has joined #ruby-lang
<whitequark> the implementation itself isn't easy too, but the hardest part was determining the principles. it's done already.
<rue> Eugh
<whitequark> with LLVM, you also have like half of optimizing done for you, too
<rue> That’s really just not true
<Jake232> You make it sound like a easy task ;)
<whitequark> you don't need to care about peculiarities of your target architecture. just focus on your language
<whitequark> rue: what exactly?
<Harzilein> anyome?
<Harzilein> anyone*
<rue> In the case of 85% Ruby, maybe. But shit just doesn’t get ‘done for you’ if the model doesn’t fit
<rue> Harzilein: You can hide the stuff, and go with something like consts[tt].call, and stuff methods or procs in there
<rue> But that’s not necessarily any better.
<whitequark> rue: everything that generates x86 code will benefit from generic x86 optimizations
<whitequark> substitute x86 for any arch that LLVM supports, and that's what I mean
<whitequark> LLVM doesn't understand anything about your dynamic language, of course.
<rue> I don’t think Ruby’s problem is x86 optimization
<whitequark> that's up to you. but at least you get spared of writing numerous backends for every architecture out there
<Harzilein> rue: well, it'd already be sufficient if it allows for easy compositing of the list of matchers throug monkey-patching, of course some kind of full-blown dsl would be nice as well
<whitequark> rue: of course. but any implementation which is going to be fast should do JIT or AOT, and that's pretty much solved for you.
<rue> Assuming your runtime model supports it
<whitequark> exactly
<rue> I mean, you’re not wrong about the benefits of LLVM
<rue> But it’s *so* far from being a magic bullet it’s not funny
<whitequark> I never said it's a magic bullet
<whitequark> it's an excellent tool for translating your pseudocode to target assembly. just that and nothing more
<rue> Let’s say that your initial statement could be read as slightly too optimistic.
<whitequark> ok
<whitequark> as per runtime model, my plan is to support AOT targets only.
<whitequark> JIT is a domain of Rubinius and JRuby, and they do it really well. I'm no match for JVM dev team.
mztriz has joined #ruby-lang
<whitequark> but I'm pretty sure that I will be able to make a translator which will allow you to program a microcontroller with 8 kilobytes of RAM in Ruby.
<rue> In a subset of Ruby
<whitequark> let's say that the word "Ruby" refers to the ISO-standardized language
<whitequark> then it's a subset.
<whitequark> but frankly, C just sucks too much
<whitequark> brb
<Harzilein> mirah on microcontrollers sounds nice
<abletony84> my brother kicking it live at the grandstar check it out http://www.youtube.com/watch?v=yFLkYabbpWs
Defusal has joined #ruby-lang
Defusal has quit [Changing host]
Defusal has joined #ruby-lang
<abletony84> sorry for the interruption
mistym has joined #ruby-lang
ryez has quit [Ping timeout: 245 seconds]
tjadc has joined #ruby-lang
charlie_some has quit [Quit: Textual IRC Client: www.textualapp.com]
dv310p3r has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
burgestrand has joined #ruby-lang
<darix> Jake232: there was a pypy based php prototype announced not long ago
bcardarella has left #ruby-lang [#ruby-lang]
<Jake232> Yea, I saw it
<Jake232> but PHP sucks
<darix> no question on that... though the question is ... pypy based ruby?
<Jake232> That would be interesting
<Jake232> Just need somebody to put up some money to sponsor somebody to develop it ;)
certainty has joined #ruby-lang
postmodern has quit [Quit: Leaving]
dabradley has quit [Quit: WeeChat 0.3.5]
bryancp has joined #ruby-lang
bytephilia has joined #ruby-lang
slyphon has joined #ruby-lang
alexkane has joined #ruby-lang
tomzx has joined #ruby-lang
dv310p3r has quit [Ping timeout: 260 seconds]
tomzx has quit [Ping timeout: 250 seconds]
dabradley has joined #ruby-lang
dv310p3r has joined #ruby-lang
outoftime has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 250 seconds]
kvirani has joined #ruby-lang
sailias has joined #ruby-lang
judofyr has quit [Read error: Connection reset by peer]
andkerosine has joined #ruby-lang
wmoxam_ has joined #ruby-lang
<andkerosine> Awesome or terrible?
judofyr has joined #ruby-lang
<cout> terrible
<cout> wait, let me look at it first
<yorickpeterse> andkerosine: needs more obfuscation
<andkerosine> Obfuscation?
<andkerosine> It looks like a shell stream?
<yorickpeterse> as in, even less descriptive method names :)
<whitequark> EPIC
<yorickpeterse> (I'm mostly joking here)
<yorickpeterse> But the idea is pretty neat
<andkerosine> whitequark: Can't tell if serious...
<yorickpeterse> andkerosine: can't you replace `-> arg` with just `->`?
<yorickpeterse> Or is that meant to call Proc#arg?
<cout> andkerosine: it's interesting, but if something goes wrong, debugging is going to be a pain
<andkerosine> It certainly /looks/ pretty, but that's not supposed to count for much.
dous has joined #ruby-lang
<cout> that's no problem though if you're like me and write perfect code the first time every time :)
Jay_Levitt has joined #ruby-lang
erikh has quit [Ping timeout: 252 seconds]
<whitequark> andkerosine: well, I'm serious that it's epic indeed
<whitequark> "epic" != "good for any actual use"
<andkerosine> Raskell?
<cout> whitequark: um, epic means big
<whitequark> cout: ah.
<whitequark> whatever
<andkerosine> yorickpeterse: Unless I've misunderstood how this works, the Procs need to keep chaining and taking a single argument until they get to the <, where the cumulative Proc is the one that gets applied.
<whitequark> bonus points for adding arguments to the mix
<whitequark> let me try doing it
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
<andkerosine> Involves monkey-patching Array to behave differently when the first element is a Symbol, unless I've overlooked something.
<whitequark> oh, I'm going to use a slightly different approach
<andkerosine> Higher-precedence operator, then?
<whitequark> almost done
<judofyr> what are you talking about? link?
dc5ala has joined #ruby-lang
<whitequark> judofyr: https://gist.github.com/3227131
sailias has quit [Ping timeout: 246 seconds]
s0ber has quit [Ping timeout: 246 seconds]
<yorickpeterse> andkerosine: ah
<whitequark> andkerosine: https://gist.github.com/3227302
coryf has joined #ruby-lang
coryf has quit [Remote host closed the connection]
coryf has joined #ruby-lang
<judofyr> andkerosine: https://gist.github.com/3227310
<judofyr> ooh
<judofyr> whitequark: I like the #.()
<whitequark> judofyr: you've also missed a few corner cases I think
<judofyr> whitequark: yeah, I realize now
<andkerosine> Heh, I was going to use #/.
<andkerosine> Bad idea, in hindsight.
erpuds has joined #ruby-lang
runeb has joined #ruby-lang
<rue> andkerosine: Just say no.
<judofyr> whitequark: this should be better: https://gist.github.com/3227310
<andkerosine> I have. Just a little experiment that came to mind.
Criztian has quit [Remote host closed the connection]
<judofyr> whitequark: actually, #call is better than #[] since Symbol#[] is already defined
<judofyr> there
neocoin has joined #ruby-lang
<whitequark> judofyr: yeah
sailias has joined #ruby-lang
sailias has quit [Client Quit]
sailias has joined #ruby-lang
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
Mchl has joined #ruby-lang
gsav has quit [Ping timeout: 260 seconds]
enebo has joined #ruby-lang
savage- has joined #ruby-lang
Flock has joined #ruby-lang
rodj has joined #ruby-lang
gsav has joined #ruby-lang
rutkla has quit [Ping timeout: 255 seconds]
gnufied1 has quit [Quit: Leaving.]
gnufied has joined #ruby-lang
gnufied has quit [Client Quit]
savage- has quit [Remote host closed the connection]
ruurd has quit [Quit: Leaving...]
dhruvasa1ar has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<Hakon> lol raskell
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
erikh has joined #ruby-lang
bytephilia has quit [Ping timeout: 248 seconds]
Berglund has joined #ruby-lang
<Harzilein> any lightweight idea how to make the search in my ast in this paste a bit more sane? http://paste.debian.net/181506
tubbo`work has joined #ruby-lang
<Harzilein> the duncan beevers version of rbnarcissus has those hash matchers but there are some missing
mistym has quit [Remote host closed the connection]
tubbo`work has quit [Client Quit]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
dc5ala has quit [Quit: Ex-Chat]
bfreeman has quit [Quit: bfreeman]
ttilley is now known as ttilley_off
savage- has joined #ruby-lang
erichmenge has joined #ruby-lang
<virunga> Harzilein: instead of using iterators you could use has_value? or value?
<virunga> maybe not..
<virunga> i'm wrong :P
<apeiros_> aaaah, `require File.join(File.dirname(__FILE__), 'lib/alias_method_chain')` <-- kill it with fire
<apeiros_> require 'alias_method_chain' # anything else means you're doing it wrong.
carloslopes has quit [Quit: Leaving.]
headius has joined #ruby-lang
justinseiter has joined #ruby-lang
<apeiros_> I mean why the hell don't you full-path require 'nokogiri' too? would be totally sane… (not)
<Harzilein> apeiros_: nokogiri is a gem, rbnarcissus is not, and i can live with including it with my source
<apeiros_> @urls={}; @urls[:tplink]=URI "http://10.0.0.1" --> just @urls={:tplink => URI "http://10.0.0.1"}
<Harzilein> apeiros_: my source is not a gem yet either so it does not feel wrong to use it
<apeiros_> Harzilein: your source doesn't need to be a gem to use sane requires
<workmad3> Harzilein: require_relative at the very least
<Harzilein> workmad3: thanks for pointing that method out to me :)
<Harzilein> uhm... is require actually a method? or is it a keyword?
dhruvasagar has quit [Ping timeout: 240 seconds]
<apeiros_> a method
<apeiros_> Kernel#require
<apeiros_> so is require_relative
<apeiros_> there are very few keywords in ruby
<apeiros_> anyway, that code makes me twitch too much. I'll pursuit something that's more enjoyable
dhruvasagar has joined #ruby-lang
qwerxy has quit [Read error: No route to host]
qwerxy_ has joined #ruby-lang
[1]Flock has joined #ruby-lang
cha1tanya has quit [Quit: आलोच..]
dous has quit [Remote host closed the connection]
Flock has quit [Ping timeout: 264 seconds]
sepp2k1 has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
justinseiter has quit [Ping timeout: 252 seconds]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
jbwiv has joined #ruby-lang
mistym has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
m3nd3s has quit [Client Quit]
robotmay has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
heftig has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
ttilley_off is now known as ttilley
m3nd3s_ has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
m3nd3s has quit [Ping timeout: 252 seconds]
bryancp has joined #ruby-lang
m3nd3s_ has quit [Client Quit]
m3nd3s has joined #ruby-lang
Fretta has joined #ruby-lang
incomethax has joined #ruby-lang
ruurd has joined #ruby-lang
bglusman has joined #ruby-lang
ttilley is now known as ttilley_off
judofyr has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
[1]Flock has quit [Quit: HydraIRC -> http://www.hydrairc.com <- s0 d4Mn l33t |t'z 5c4rY!]
chrismcg is now known as zz_chrismcg
<certainty> andkerosine: awesome idea
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<andkerosine> I like the aesthetics, but it's a terrible idea. : )
Jake232 has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby-lang
dous has joined #ruby-lang
<certainty> andkerosine: nah, it isn't. Symbolic computation :p
<certainty> i'm not serious of course. But it shows some great oportunities. Could be a neat part of a dsl
justinseiter has joined #ruby-lang
<andkerosine> Everything's better with a fancy name.
ttilley_off is now known as ttilley
<andkerosine> It actually is kind of reasonable for relatively simple chains, but allowing for arguments or other more dynamic behavior quickly makes it too ugly to defend.
<andkerosine> It's really unfortunate that operators can't begin on a new line, or it might actually be feasible.
butchanton has joined #ruby-lang
carloslopes has joined #ruby-lang
brianpWins has joined #ruby-lang
tenderlove has joined #ruby-lang
dv310p3r has quit [Ping timeout: 260 seconds]
erikh has quit [Quit: ZNC - http://znc.sourceforge.net]
kvirani has quit [Remote host closed the connection]
<whitequark> andkerosine: \ will help you.
<whitequark> as in:
<whitequark> 5 \
<whitequark> + 10
<andkerosine> Then why not just:
<andkerosine> 5 +
<andkerosine> 10
sevvie has quit [Quit: sevvie]
sevvie has joined #ruby-lang
dv310p3r has joined #ruby-lang
qwerxy_ has quit [Ping timeout: 244 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
qwerxy has joined #ruby-lang
cdt has quit [Quit: Ex-Chat]
bfreeman has joined #ruby-lang
tjadc has quit [Read error: Connection reset by peer]
kain has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
erichmenge has joined #ruby-lang
rolfb has joined #ruby-lang
zmack_ has quit [Remote host closed the connection]
erichmenge has quit [Client Quit]
abletony84 has quit [Quit: leaving]
workmad3 has quit [Ping timeout: 264 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
codewrangler has joined #ruby-lang
sora_h is now known as s0ra_h
rolfb has quit [Quit: Linkinus - http://linkinus.com]
future_chimp has quit [Quit: Leaving]
sevvie has quit [Quit: sevvie]
virunga has quit [Ping timeout: 250 seconds]
dv310p3r has quit [Ping timeout: 264 seconds]
savage- has quit [Read error: Connection reset by peer]
savage- has joined #ruby-lang
<jasiek> how do i report a feature i'd like to have added to mri? i've a working patch ready.
ttilley is now known as ttilley_off
<banisterfiend> jasiek: cool what does it do
mr_porter_duff has joined #ruby-lang
krz has joined #ruby-lang
<jasiek> adds a method called source to StopIteration that returns the enumerator responsible for raising an exception. useful for when you iterate over a number of collections (merging multiple files, etc)
cha1tanya has quit [Ping timeout: 240 seconds]
fgomez has joined #ruby-lang
fgomez has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
dv310p3r has joined #ruby-lang
fgomez has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
ttilley_off is now known as ttilley
dv310p3r has quit [Max SendQ exceeded]
dv310p3r has joined #ruby-lang
rutkla has joined #ruby-lang
lsegal has joined #ruby-lang
<cout> jasiek: submit a patch to the bug tracker and it will automatically email ruby-core, where it will be discussed
erichmenge has joined #ruby-lang
<andkerosine> Are there any active Assembly channels, or do people tend to just go to ##c?
<cout> depends on the platform, probably
<andkerosine> That makes sense.
kvirani has joined #ruby-lang
<cout> I avoid ##c due to the troll that hang out there
<cout> trolls
<banisterfiend> cout: are you friendly with Zhivago? :P
qwerxy has quit [Quit: offski]
<andkerosine> God, he's such a knowledgeable dick. : )
dous has quit [Remote host closed the connection]
<banisterfiend> he's also op on #lisp
BlackShadow has joined #ruby-lang
<cout> banisterfiend: used to be
<cout> banisterfiend: he was helpful, once upon a time, but now he's cranky and talks down to everyone
<banisterfiend> yeah he's jaded as f*ck
dhruvasa1ar has quit [Quit: leaving]
erikh has joined #ruby-lang
wallerdev has joined #ruby-lang
<cout> sad, really
<cout> but if I were still doing C programming after all these years, I might be the same
<cout> ruby saved me from myself :)
owen1 has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
<owen1> is it better to use instance method or class method? is instance method easier to test?
m3nd3s_ has joined #ruby-lang
<vbatts> drbrain: <3
erikh has quit [Quit: ZNC - http://znc.sourceforge.net]
rutkla has quit [Ping timeout: 240 seconds]
<vbatts> i just stumbled upon your QuickCert page, which concisely does what i was about to do :)
m3nd3s has quit [Ping timeout: 244 seconds]
erikh has joined #ruby-lang
butchanton has joined #ruby-lang
BlackShadow has quit [Remote host closed the connection]
tommyvyo has joined #ruby-lang
bryancp has joined #ruby-lang
towski has joined #ruby-lang
<drbrain> vbatts: :D
s0ra_h is now known as sora_h
m3nd3s_ has quit [Ping timeout: 240 seconds]
jtoy has quit [Quit: jtoy]
<erikh> heh, my kernel decided to take out my fs journal while crashing
<erikh> mount -o remount,rw /; tune2fs -O ^has_journal /dev/xvda2; shutdown -r now; tune2fs -j /dev/xvda2
<erikh> fwmfw
<erikh> ftmfw
<certainty> all people on #lisp are elite of course :p
<certainty> as are people on #scheme
<certainty> especially Ria<TAB>, well he's actually really smart
rutkla has joined #ruby-lang
gsav has quit [Ping timeout: 248 seconds]
justinseiter has quit [Quit: Leaving]
Hakon has quit [Quit: Leaving...]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<cout> owen1: instance methods are almost always better
m3nd3s has joined #ruby-lang
<cout> owen1: if you find yourself wanting to use a class method, then you should ask yourself whether it makes sense to make a new object
<apeiros_> owen1: class methods are quite often a code smell
* certainty uses class methods when i really just need a namespace
<apeiros_> certainty: and why don't you add the method to the class of the objects your "method" operates on?
<certainty> apeiros_: because it is a method that works on a more general concept like Enumerables
<apeiros_> certainty: that doesn't really answer the question
<apeiros_> Enumerable is a perfect example that a generic concept can work very well with a wide range of classes without having to resort to class methods…
<bougyman> when do you use class methods, apeiros_ ?
<bougyman> i use them for very specific things, mostly delegation and constructor customizations.
<certainty> apeiros_: i generally don't want to add methods to every class that falls in a given category. Why should i do that?
mr_porter_duff has left #ruby-lang [#ruby-lang]
<apeiros_> bougyman: 2 biggest use cases are convenience constructors and if I have an inheritance model with metadata on the subclasses (similar to AR)
<bougyman> yep yep
<apeiros_> certainty: that's what you have modules for
<bougyman> same thing
<apeiros_> certainty: again, see Enumerable as prime example
<certainty> apeiros_: take a concept that isn't currently expressed by a module or class
<apeiros_> certainty: make a concrete example
<bougyman> i think we wouldn't need class methods for the latter if we had generic dispatch, apeiros_.
<apeiros_> you're writing functions instead of methods. you should ask yourself why you don't make use of 'self'
<certainty> apeiros_: you're right a module would probably be a better place, but then i had to include it in every class that uses the method no?
<apeiros_> certainty: yes. again, just like Enumerable
mztriz has quit [Quit: Leaving]
<apeiros_> alternatively you should have a class that takes any of those classes' instances as value and provides the methods as instance methods (something akin a presenter pattern)
<bougyman> I do sometimes use a module for grouping generic functions.
<certainty> apeiros_: Enumerable is widespread already though. That's not the case with concepts that don't have a representation yet
<apeiros_> certainty: and if you really really don't want to write proper methods, do it at least like e.g. Math does it. use a module and make your functions module_function's
<bougyman> yep
<apeiros_> certainty: so?
<bougyman> that's exactly what I meant.
gsav has joined #ruby-lang
<apeiros_> bougyman: though with Math I quite don't understand why they didn't add it to e.g. Numeric as ordinary methods
andrew___ has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
<certainty> apeiros_: yes, you're probably right about the modules. What is the big difference between putting it in the Class vs. the Modul?
<apeiros_> certainty: include Math; sin(x) # can't do that with methods on a class
<certainty> apeiros_: you can extend
<apeiros_> no you can't
<apeiros_> obj.extend SomeClass # raises
<certainty> bad wording, i mean inherit as in <
<apeiros_> that's not the same
<apeiros_> you force yourself to inherit from a specific class
sora_h is now known as s0ra_h
<apeiros_> suddenly you have an odd inheritance chain just to get some methods…
<apeiros_> or worse, you're forced to decide from what to inherit, based on class methods that'd become available…
<certainty> apeiros_: you don't need to. You can just du YourClass.meth(some_value)
<certainty> do even
<apeiros_> yes. that was not the point.
<apeiros_> the point was that you can include a module and don't have to use the full qualification.
<apeiros_> Math.sin(x) works too
<apeiros_> but why'd you do that repeatedly if you can just include Math and go with sin(x)?
<certainty> apeiros_: i fail to see why that is a requirement
<apeiros_> *sob*
<apeiros_> whatever. your code.
<certainty> apeiros_: i'm serious. What is the advantage? I don't get it.
<apeiros_> what's more readable? `sin(x)*sqrt(z)+PI` or `Math.sin(x)*Math.sqrt(z)+Math::PI`?
<certainty> apeiros_: certainly the first. So it's about readabilÃity?
brunocoelho has joined #ruby-lang
<apeiros_> yes. also less to write. of course you can always fully write out your namespace. but that's annoying if it's just a couple of helper functions.
<apeiros_> but I remain at: having pseudo-functions (functions don't make use of self, as opposed to methods), you're probably having a code smell and your function should belong somewhere else as method
S1kx has quit [Ping timeout: 240 seconds]
<apeiros_> that's (one reason) why we have OOP after all. we can do some pseudo-oop with C + structs + long function names too…
<certainty> apeiros_: i see that the module version has the advantage that it can be used in both ways.
S1kx has joined #ruby-lang
<certainty> apeiros_: well i'm not sure that methods are always a good way to handle things. I mean methods that belong to a certain Class and always have a self
<certainty> there are object systems that do this quite differently which work equally well
<apeiros_> as said, show a concrete case…
<apeiros_> I don't deny that there are other object systems that use different paradigms
<apeiros_> but this is #ruby-lang, not #arbitrary-lang
<certainty> apeiros_: in ruby that's not so much of a problem as you can reopen classes. But in other systems it would be hard to specialize for classes after they have been defined
<apeiros_> if you don't use a language's specific features, why use it at all? there's no point.
<certainty> apeiros_: i usually do want to use its features. But i also seek to see al its features
<certainty> which is not always easy as this discussion shows
<certainty> i had a very different view on class methods till now
S1kx has quit [Client Quit]
RickHull has joined #ruby-lang
<certainty> apeiros_: to wrap this up. I'll think twice if i want to put a method into a class or a module next time. Thanks for the inspiration
<apeiros_> yw
erichmenge has joined #ruby-lang
<RickHull> i've got tree data in postgres. every row has a parent id. i want to build a web interface for this, with expanding nodes. so the user clicks a node to expand its children. the tree is too big to deliver in one shot, so the webserver will query the db on every expansion
jtoy has joined #ruby-lang
<RickHull> i'm not too comfortable with js/ajax, so my default would be to just rebuild the tree on the server with each expansion
<RickHull> that said, what are the options these days for the client to maintain the tree?
<RickHull> websockets?
<RickHull> ajax?
<bougyman> websockets is nice and easy
<bougyman> ajax requires polling, you're better with websockets.
<RickHull> what's a good way to start with websockets? i haven't decided on a webserver or framework
sgonyea has joined #ruby-lang
brunocoelho has quit [Remote host closed the connection]
<sgonyea> Hi, is it possible to take a rake task :foo and have another task run before :foo?
tenderlove has quit [Remote host closed the connection]
<RickHull> i'm pretty comfortable with rails but padrino seems interesting
henk has left #ruby-lang ["WeeChat 0.3.6"]
<sgonyea> ie, something else defines "foo" ... but before foo runs, I want another task to set some stuff up.
<sgonyea> Ideally while being able to just do "rake foo"
<apeiros_> sgonyea: task :foo => :run_this_one_before
<apeiros_> and it's fine if there are multiple `task :foo`'s lying around
<apeiros_> they don't redefine the task. multiple "mentions" just add stuff
<RickHull> oh i just remember tenderlove had a post about SSE in rails
<RickHull> i wonder if SSE is helpful here, need to reread
<apeiros_> SSE?
guns has joined #ruby-lang
guns is now known as Guest91772
Guest91772 has quit [Client Quit]
<RickHull> server sent events
<apeiros_> o0
<apeiros_> gotta read up on that
<RickHull> the client has no opportunity to respond
<RickHull> just a one-way thing
<RickHull> i'm just learning about it
<apeiros_> but since your client's action is what causes the rebuild - why not ajax?
<apeiros_> websockets are only of use if the server is what causes an action…
<RickHull> yeah i think that's right
<apeiros_> depending on what you intend to do, I'd probably just send the tree to some levels deep. e.g. 2 levels for the root, and upon every click get 2-3 levels of the currently expanded subtree.
<RickHull> when you get to a leaf (likely a list of sibling leaves), have e.g. 2 checkboxes for favorite / ignore
<RickHull> for each leaf
<RickHull> that's pretty much it
<RickHull> i'm sure i'll try to add the ability to send mail next
<RickHull> i'm not sure why you want 2-3 levels, if you're getting data on every click
<RickHull> i would think every click, you get just the children
jtoy has quit [Quit: jtoy]
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
scampbell has joined #ruby-lang
mistym has joined #ruby-lang
erpuds has quit [Quit: erpuds]
robin850 has quit [Quit: Konversation terminated!]
s0ra_h is now known as sora_h
mk03 has joined #ruby-lang
Leeky is now known as Leeky_afk
Axsuul has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
sora_h is now known as s0ra_h
workmad3 has joined #ruby-lang
erpuds has joined #ruby-lang
uniosx has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Berglund has quit [Quit: Computer died.]
uniosx has quit [Quit: Page closed]
virunga has joined #ruby-lang
[1]jonah has joined #ruby-lang
ruurd has quit [Quit: Leaving...]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
workmad3 has quit [Ping timeout: 248 seconds]
uniosx has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
rippa has quit [Ping timeout: 250 seconds]
sailias has quit [Quit: Leaving.]
mistym has quit [Remote host closed the connection]
s0ra_h is now known as sora_h
mssola has quit [Quit: Konversation terminated!]
akira989 has quit [Remote host closed the connection]
mistym has joined #ruby-lang
chimkan_ has joined #ruby-lang
qwerxy has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
postmodern has joined #ruby-lang
carloslopes has quit [Quit: Leaving.]
andrew___ has quit [Remote host closed the connection]
kvirani has quit [Remote host closed the connection]
chimkan__ has joined #ruby-lang
chimkan_ has quit [Read error: No route to host]
imajes has quit [Excess Flood]
chimkan__ has quit [Ping timeout: 252 seconds]
imajes has joined #ruby-lang
erpuds has quit [Quit: erpuds]
Skif has quit [Ping timeout: 240 seconds]
sora_h is now known as s0ra_h
erpuds has joined #ruby-lang
sevvie has joined #ruby-lang
sevvie has quit [Client Quit]
hynkle has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mistym has joined #ruby-lang
naz has joined #ruby-lang
workmad3 has joined #ruby-lang
Hakon has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
mr_porter_duff has joined #ruby-lang
kain has quit [Quit: This computer has gone to sleep]
MrWGW has quit [Ping timeout: 244 seconds]
Berglund has joined #ruby-lang
kain has joined #ruby-lang
qwerxy has quit [Quit: offski]
scampbell has quit [Quit: Ex-Chat]
Berglund has quit [Client Quit]
MrWGW has joined #ruby-lang
mistym has quit [Remote host closed the connection]
erichmenge has quit [Quit: Be back later]
rutkla has quit [Ping timeout: 255 seconds]
wmoxam_ has quit [Quit: leaving]
erpuds has quit [Quit: erpuds]
headius_ has joined #ruby-lang
headius has quit [Ping timeout: 248 seconds]
headius_ is now known as headius
s0ra_h is now known as sora_h
loincloth has joined #ruby-lang
<loincloth> hi everybody
lcdhoffman has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
<loincloth> if i send a Mechanize::Page#body to a Logger#info or similar, i see '\n', '\r' and '\t' printed in the log.. how can I replace those with the equivalent escape sequences so I see those characters' formatting in the log?
thone_ has joined #ruby-lang
thone has quit [Read error: Connection reset by peer]
<loincloth> i'm trying to craft one regexp to use with one gsub call, but having difficulty
<loincloth> it occurs to me just now that maybe a more verbose gsub with a block that checks what was matched and returns the appropriate escape character might be the way to go
<loincloth> I was hoping something like gsub(/\\\\([nrt])/, "\#{$1}
<loincloth> ")
<loincloth> would work, but yeah..
nofxxx has joined #ruby-lang
<loincloth> oh woof.. think i was just doing it wayyyy wrong
tonni has quit [Ping timeout: 246 seconds]
<loincloth> yeah.. forgot i was running everything through a log helper which was .inspect-ing everything
<loincloth> carry on...
kain has quit [Ping timeout: 240 seconds]
tonni has joined #ruby-lang
nofxx has quit [Ping timeout: 248 seconds]
woollyams has quit [Quit: Computer has gone to sleep.]
krz has quit [Quit: krz]
uniosx has left #ruby-lang [#ruby-lang]
bglusman has quit [Remote host closed the connection]
tenderlove has quit [Remote host closed the connection]
sora_h is now known as s0ra_h
akira989 has joined #ruby-lang
tenderlove has joined #ruby-lang
[1]jonah has quit [Quit: Try HydraIRC -> http://www.hydrairc.com <-]
krz has joined #ruby-lang
<rue> Glad we could help
enebo has quit [Quit: enebo]
ahf has quit [Ping timeout: 252 seconds]
JoshWines has joined #ruby-lang
dv310p3r has quit [Ping timeout: 246 seconds]
butchanton has quit [Quit: Leaving.]
ahf has joined #ruby-lang
ahf has quit [Changing host]
ahf has joined #ruby-lang
akira989 has quit [Remote host closed the connection]
akira989 has joined #ruby-lang
oddmunds has quit [Ping timeout: 264 seconds]
headius_ has joined #ruby-lang
headius has quit [Ping timeout: 252 seconds]
headius_ is now known as headius
akira989 has quit [Ping timeout: 252 seconds]
BlackShadow has joined #ruby-lang
incomethax has quit [Quit: Leaving.]
benanne has joined #ruby-lang
justinseiter has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
VGoff is now known as VGoff_afk
andkerosine has quit [Quit: Leaving.]
Hakon has quit [Quit: Leaving...]
postmodern_ has joined #ruby-lang
WillMarshall has joined #ruby-lang
postmodern has quit [Ping timeout: 255 seconds]
postmodern_ has left #ruby-lang [#ruby-lang]
postmodern has joined #ruby-lang
WillMarshall has quit [Client Quit]
s0ra_h is now known as sora_h
Rezwan has joined #ruby-lang
woollyams has joined #ruby-lang
nofxxxx has joined #ruby-lang
nofxxx has quit [Ping timeout: 246 seconds]
imajes has quit [Excess Flood]
nofxx has joined #ruby-lang
imajes has joined #ruby-lang
nofxxxx has quit [Ping timeout: 252 seconds]
akira989 has joined #ruby-lang
chendo_ has joined #ruby-lang
nofxxx has joined #ruby-lang
enebo has joined #ruby-lang
nofxx has quit [Ping timeout: 248 seconds]
brianpWins has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
nagato has joined #ruby-lang
outoftime has quit [Quit: Leaving]
burgestrand has quit [Quit: Leaving.]
Rezwan has quit [Ping timeout: 276 seconds]
judofyr has joined #ruby-lang
<judofyr> anyone here who likes flip-flops?
<judofyr> actually, just have a look at this: https://gist.github.com/3230984
banisterfiend has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 255 seconds]
virunga has quit [Ping timeout: 252 seconds]
benanne has quit [Quit: kbai]