apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
havenwood has quit [Remote host closed the connection]
pskosinski has quit [Quit: pskosinski]
chris2 has quit [Quit: Lost terminal]
chris2 has joined #ruby-lang
chris2 has quit [Client Quit]
chris2 has joined #ruby-lang
GarethAdams has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
dingus_khan has quit [Remote host closed the connection]
JpC0utur3 has quit [Ping timeout: 276 seconds]
dingus_khan has joined #ruby-lang
sepp2k has quit [Quit: Leaving.]
xxaM has joined #ruby-lang
cofin has quit [Quit: cofin]
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
justinmburrous has quit [Remote host closed the connection]
cofin has joined #ruby-lang
nazty has joined #ruby-lang
benxao has joined #ruby-lang
glebm has quit [Ping timeout: 240 seconds]
D9 has quit [Ping timeout: 240 seconds]
glebm has joined #ruby-lang
marr has quit [Ping timeout: 245 seconds]
gmci has quit [Read error: Connection reset by peer]
toretore has quit [Quit: Leaving]
teleological has joined #ruby-lang
gmci has joined #ruby-lang
havenwood has joined #ruby-lang
machuga|away is now known as machuga
gmci has quit [Read error: Connection reset by peer]
runeb has joined #ruby-lang
gmci has joined #ruby-lang
<brownies> hello
teleological has quit [Remote host closed the connection]
<brownies> i have an array that looks like this... [true, false, true, false, true] (for example)
<brownies> and i want to AND together all the things
<brownies> so i wrote my_array.reduce("&&".to_sym)
<brownies> and that broke everything
<brownies> undefined method `&&' for true:TrueClass
<brownies> what am i missing? shouldn't that work?
<erikh> mmm
<erikh> do you want to use it in a conditional or something?
<brownies> there's a bit more of a backstory... i'm writing a custom matcher for RSpec that checks if a given Hash includes a bunch of keys
<erikh> ok
<erikh> Are you familiar with Enumerable#all?
<brownies> so this array is all the keys and i'm doing array_keys.map { |key| hash.include?(key) }.reduce("&&".to_sym)
<erikh> keys.all? { |k| hash.has_key?(k) }
<brownies> oh cool
<brownies> so i will do that
<brownies> erikh: but i still don't understand why calling reduce on an array full of bools like that would break. what's the deal there?
<erikh> what breaks
<erikh> you still haven't mentioned exactly what happens
<brownies> well, like i said... it throws that undefined method '&&' error... see a few lines up
<erikh> oh
<erikh> and those are actually t/f
<erikh> ?
<brownies> just throw [true, false].reduce("&&".to_sym) into the console
<erikh> not some other thing?
<erikh> right, but && isn't a method
<brownies> and you get NoMethodError: undefined method `&&' for true:TrueClass
<brownies> oh, it isn't? but if i do .reduce(:+) on an array of integers (for example) it works fine.
<erikh> && ends up calling <=> I think and ensuring it's 0
dingus_khan has quit [Remote host closed the connection]
<erikh> ri Comparable
<brownies> why would && want to ensure it's 0? isn't it just a straight binary operator on two booleans?
<hagabaka> brownies: && is not a method, it's only an operator
bitkiller has left #ruby-lang ["Tired"]
<erikh> hagabaka: does it work against <=> or is it just t/f?
<erikh> I'm not sure now
<brownies> hagabaka: but i am saying that [1, 2, 3, 4].reduce(:+) works as you would expect
<brownies> so why is this different?
<hagabaka> you could use :'&' instead, because method & works like operator && for booleans
<brownies> aha
<brownies> yeah, i just saw that in the docs for TrueClass
<hagabaka> brownies: it's different because there's no && method
<brownies> perhaps a bit daft, but... why not?
<hagabaka> reduce(:+) uses the method +, you can do 1.call(:+, 2) and get 3
<erikh> not everything is a method
<erikh> most things are
<erikh> which is good, but some aren't.
<zenspider> whitequark: oi. need hints
<brownies> so it's an operator but not a method? wild. so where is it defined then?
<hagabaka> ruby has everything true except nil and false
<hagabaka> and boolean operators have to be fixed to enforce that
wmoxam has joined #ruby-lang
dingus_khan has joined #ruby-lang
nathanst_ has quit [Ping timeout: 264 seconds]
<hagabaka> brownies: also "all?" is probably better than reduce(:+&)
nathanstitt has joined #ruby-lang
<brownies> hagabaka: it's just reduce(:&) isn't it? and yeah, i did write it as all? but i still want to learn what's going on with the other way
<hagabaka> yeah
kstuart has quit [Read error: Operation timed out]
teleological has joined #ruby-lang
dhruvasagar has joined #ruby-lang
MouseTheLuckyDog has joined #ruby-lang
<MouseTheLuckyDog> Hello
<MouseTheLuckyDog> Sorry.
<MouseTheLuckyDog> Is there a way of doing something like #ifdef #else #endif ?
<brownies> hagabaka: erikh: thanks for the help.
<hagabaka> no problem
<erikh> enjoy
<MouseTheLuckyDog> I have a program where I am going to have to tweak the first part which takes a long time to run, but the second part is going to have to be modified a lot first. So I want to do: Something liike: #ifdef FIRST ; do_first_part; save variables as YAML #else load_variables; do_second_part #endif
teleological has quit [Remote host closed the connection]
wmoxam has quit [Quit: Lost terminal]
Markvilla has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dingus_khan has quit [Remote host closed the connection]
JpC0utur3 has joined #ruby-lang
dingus_khan has joined #ruby-lang
glebm has quit [Ping timeout: 255 seconds]
glebm has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
cofin has quit [Quit: cofin]
dhruvasagar has quit [Ping timeout: 264 seconds]
JpC0utur3 has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby-lang
GeissT has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
setmeaway2 has quit [Ping timeout: 264 seconds]
glebm has quit [Ping timeout: 240 seconds]
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Ping timeout: 245 seconds]
mdedetrich has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
gmci has quit [Read error: Connection reset by peer]
gmci has joined #ruby-lang
dingus_khan has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 255 seconds]
gmci has quit [Read error: No route to host]
benxao has quit [Remote host closed the connection]
gmci has joined #ruby-lang
machuga is now known as machuga|away
jackhammer2022 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
dingus_khan has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
faces has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
jsullivandigs has joined #ruby-lang
dingus_khan has joined #ruby-lang
justinmburrous has joined #ruby-lang
gmci has quit [Read error: No route to host]
dhruvasagar has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
gmci has joined #ruby-lang
justinmburrous has quit [Remote host closed the connection]
dingus_khan has quit [Remote host closed the connection]
chana has joined #ruby-lang
thiagoborges has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
gmci has quit [Read error: Connection reset by peer]
r0bby has joined #ruby-lang
chana has quit [Quit: chana]
chana has joined #ruby-lang
io_syl has quit [Ping timeout: 264 seconds]
MartynKeigher2 has quit [Excess Flood]
gmci has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
io_syl has joined #ruby-lang
MartynKeigher has joined #ruby-lang
gmci has quit [Read error: Connection reset by peer]
gmci has joined #ruby-lang
sush24 has joined #ruby-lang
gmci has quit [Read error: No route to host]
chana has quit [Quit: chana]
JpC0utur3 has joined #ruby-lang
gh0zt has joined #ruby-lang
<gh0zt> Is there a way to download a static copy of a bunch of rubygems that a particular ruby program depends on so that I can burn them to a backup dvd that I may need to use in environments that are offline?
sush24 has quit [Ping timeout: 264 seconds]
sush24 has joined #ruby-lang
hogeo has joined #ruby-lang
gmci has joined #ruby-lang
gmci has quit [Read error: Connection reset by peer]
gmci has joined #ruby-lang
gmci has quit [Read error: Connection reset by peer]
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
lsegal has joined #ruby-lang
runeb has quit [Remote host closed the connection]
<hdm> gh0zt: look at bundle / freeze
<hdm> (bundler)
gmci has joined #ruby-lang
spuk has joined #ruby-lang
Jefferson has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
hhatch has joined #ruby-lang
<zenspider> ARGH... it worked last night
<erikh> ?
sush24 has quit [Quit: This computer has gone to sleep]
havenwood has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 248 seconds]
savagecroc has joined #ruby-lang
<zenspider> erikh: trying to get a PR from whitequark working and I HAD it passing tests last night but now it is borked
smook has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
<erikh> ugh, sorry man
vlad_starkov has joined #ruby-lang
dhruvasagar has joined #ruby-lang
snafoo_ has joined #ruby-lang
<gh0zt> hdm: thanks
snafoo has quit [Ping timeout: 260 seconds]
sush24 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<erikh> gh0zt: there's also one similar to bundle --deployment that completely eliminates the need for rubygems
<erikh> I imagine it could be nice for those situations.
Senjai has quit [Ping timeout: 255 seconds]
Senjai has joined #ruby-lang
Senjai has joined #ruby-lang
<gh0zt> cool
<erikh> I forget what it's called though. let me look it up.
<erikh> --standalone
nathanstitt has quit [Quit: I growing sleepy]
rippa has joined #ruby-lang
teleological has joined #ruby-lang
smook has quit [Ping timeout: 255 seconds]
smook1 has joined #ruby-lang
io_syl has joined #ruby-lang
rsync has joined #ruby-lang
pygmael has quit [Read error: Operation timed out]
mdedetrich has quit [Quit: Computer has gone to sleep.]
sush24 has quit [Ping timeout: 248 seconds]
rsync has quit [Quit: rsync]
PaulePanter has joined #ruby-lang
teleological has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
ikrima has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
JpC0utur3 has quit [Ping timeout: 264 seconds]
zmike has joined #ruby-lang
r0bby_ has joined #ruby-lang
nertzy has joined #ruby-lang
mistym_ has joined #ruby-lang
solars has joined #ruby-lang
havenn_ has joined #ruby-lang
ged_ has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
swav has joined #ruby-lang
weeb1e_ has joined #ruby-lang
tonni_ has joined #ruby-lang
jayne| has joined #ruby-lang
adambeynon has joined #ruby-lang
wasnotrice_ has joined #ruby-lang
matti_ has joined #ruby-lang
znouza has joined #ruby-lang
hackeron has joined #ruby-lang
io_syl_ has joined #ruby-lang
bryno has joined #ruby-lang
Rubennn_ has joined #ruby-lang
charliesome_ has joined #ruby-lang
vgoff has joined #ruby-lang
antbody has joined #ruby-lang
coffeeju1 has joined #ruby-lang
Guedes0 has joined #ruby-lang
charliesome has quit [Ping timeout: 276 seconds]
io_syl has quit [Ping timeout: 276 seconds]
perry has quit [Ping timeout: 276 seconds]
Guu has quit [Ping timeout: 276 seconds]
charliesome_ is now known as charliesome
tonni has quit [Ping timeout: 276 seconds]
Guest85414__ has quit [Ping timeout: 276 seconds]
mihar has quit [Ping timeout: 276 seconds]
davidbalbert has quit [Ping timeout: 276 seconds]
havenwood has quit [Ping timeout: 276 seconds]
faces has quit [Ping timeout: 276 seconds]
beawesomeinstead has quit [Ping timeout: 276 seconds]
mistym has quit [Ping timeout: 276 seconds]
singpolyma has quit [Ping timeout: 276 seconds]
znouza_ has quit [Ping timeout: 276 seconds]
hackeron_ has quit [Ping timeout: 276 seconds]
nertzy3 has quit [Ping timeout: 276 seconds]
Rubennn has quit [Ping timeout: 276 seconds]
swav_ has quit [Ping timeout: 276 seconds]
bri has quit [Ping timeout: 276 seconds]
ged has quit [Ping timeout: 276 seconds]
eban has quit [Ping timeout: 276 seconds]
GitNick has quit [Ping timeout: 276 seconds]
matti has quit [Ping timeout: 276 seconds]
matti_ is now known as matti
r0bby has quit [Ping timeout: 276 seconds]
coffeejunk has quit [Ping timeout: 276 seconds]
wudofyr___ has quit [Ping timeout: 276 seconds]
weeb1e has quit [Ping timeout: 276 seconds]
Guedes has quit [Ping timeout: 276 seconds]
wasnotrice has quit [Ping timeout: 276 seconds]
kotp has quit [Ping timeout: 276 seconds]
jayne has quit [Read error: Connection reset by peer]
mihar_ has joined #ruby-lang
eban has joined #ruby-lang
davidbalbert has joined #ruby-lang
GitNick has joined #ruby-lang
perry has joined #ruby-lang
perry is now known as Guest89192
faces has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
postmodern has quit [Quit: Leaving]
singpolyma has joined #ruby-lang
Guest89192 has left #ruby-lang [#ruby-lang]
solars has quit [Ping timeout: 240 seconds]
zmike has quit [Quit: Выходжу]
wudofyr___ has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
stamina has joined #ruby-lang
<whitequark> zenspider: hello
<whitequark> the PR likely needs updating. there is a lot of upstream changes that I need to backport.
<whitequark> though, it should work to some degree or another... what's the problem?
LordzFc has joined #ruby-lang
smook1 has quit [Ping timeout: 255 seconds]
LordzFc has left #ruby-lang [#ruby-lang]
<Olipro> are there any good documents on how ruby handles threading in 1.9.3?
<Olipro> I'm spinning up multiple threads under linux and I'm noticing that Ruby itself is spinning up multiple *processes*
<whitequark> Olipro: how do you check that?
<Olipro> I can see them in htop, churning away at the work
<Olipro> it's certainly not a 1:1 threads-processes ratio
<Olipro> but considering that my code *only* threads and does no forking whatsoever... yeah
jayne| is now known as jayne
<whitequark> Olipro: there's a setting in htop... [x] Show threads or smth like that
<whitequark> basically, in linux, processes are created with a fork() syscall and threads with a clone() syscall
<whitequark> they differ in that fork() creates a completely new virtual memory mapping (which is initially identical to that of the parent process), whereas clone() makes the "subprocess" refer to the same virtual memory space as the parent
<whitequark> http://linux.die.net/man/2/clone → CLONE_THREAD
sush24 has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Max SendQ exceeded]
mdedetrich has joined #ruby-lang
savagecroc has quit [Remote host closed the connection]
smook1 has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
sush24 has quit [Quit: This computer has gone to sleep]
LinkedoT has quit [Quit: This computer has gone to sleep]
smook1 has quit [Ping timeout: 255 seconds]
<Olipro> whitequark: so something can be a thread even if it has a separate PID?
<whitequark> Olipro: F2 → Display options → Hide userland threads
<whitequark> if those processes disappear, they were threads.
dhruvasagar has quit [Ping timeout: 255 seconds]
<Olipro> and look at that :)
Senjai has quit [Remote host closed the connection]
tonni_ has quit [Remote host closed the connection]
buzzmore has joined #ruby-lang
_whitelogger has joined #ruby-lang
_whitelogger has joined #ruby-lang
_whitelogger__ has joined #ruby-lang
_whitelogger__ has joined #ruby-lang
_whitelogger__ has joined #ruby-lang
_whitelogger___ has joined #ruby-lang
_whitelogger___ has joined #ruby-lang
_whitelogger___ has joined #ruby-lang
_whitelogger___ has joined #ruby-lang
_whitelogger__ has quit [Remote host closed the connection]
_whitelogger has quit [Remote host closed the connection]
_whitelogger___ has quit [Remote host closed the connection]
joonty has quit [Quit: WeeChat 0.3.7]
mdedetrich has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ruby-lang
_whitelogger has joined #ruby-lang
kstuart has joined #ruby-lang
kstuart has joined #ruby-lang
_whitelogger has quit [Remote host closed the connection]
mdedetrich has joined #ruby-lang
<MouseTheLuckyDog> In pry, what would be the command to continue running if I entered pry from a "binding.pry" in a program?
<whitequark> ^D
<apeiros> or "exit"
<MouseTheLuckyDog> How about just executing the next five lines?
* MouseTheLuckyDog hates learning from video, he forgets all the commands.
dhruvasagar has joined #ruby-lang
<zenspider> whitequark: oi. you alive?
<whitequark> zenspider: yep
<zenspider> ok. I got fucked earlier because I was out in the middle of nowhere and had an N way merge and nothing was passing tests.
<zenspider> now that I'm home and have access to my backups, I'm back to a clean state and I understand what's broken
<zenspider> I've added a TON of tests for my 2.0 work
<zenspider> and if I merge those tests back to your fork, they fail in a bunch of places. I don't know your lexer well enough to start digging into it.
vlad_starkov has joined #ruby-lang
<whitequark> zenspider: that's unsurprising
<whitequark> as I've said the upstream lexer advanced quite a bit
<zenspider> I think the first thing I need is to expand my assert_lexer (or whatever) to also assert the lex state at each step
mdedetrich has quit [Ping timeout: 276 seconds]
<zenspider> I really really wish there was a ragel mode for emacs
<zenspider> doesn't appear to be one
<zenspider> in and of itself, that's surprising
<whitequark> zenspider: one thing you should have in mind, the lexer's still about 2x slower than your regexp lexer on typical ruby code
<whitequark> though I know how to fix that for all the cases which matter
mdedetrich has joined #ruby-lang
<whitequark> in a nutshell... ruby's regexp engine is quite a bit faster than invoking #ord on each character consecutively and then doing an indirect dispatch
<whitequark> there are two possible improvements
<whitequark> first, ragel's generated code kind of sucks. I'm planning to improve the generators and upstream that for ragel7, but no time yet
vlad_starkov has quit [Ping timeout: 248 seconds]
<whitequark> second, as it is not possible to dynamically generate ragel FSMs (similarly to how you dynamically generate regexps in tokadd_string), I have to handle all cases of strings/heredocs/etc generally and slowly
<whitequark> I think that special-casing ' and " will give quite a bit of speed improvement.
benanne has joined #ruby-lang
mdedetrich has quit [Client Quit]
<zenspider> heredocs are suuuuch a bitch
<whitequark> nested heredocs!
<whitequark> ugh
<zenspider> nested heredocs WITH calls on them. line number info? go fuck yourself!
<zenspider> I have a special case regexp for non-interpolated strings that helped a ton
<whitequark> zenspider: and I have not only line number info for them, but also correct column info
<zenspider> probably gave me one of my biggest speed boosts in the whole of ruby_parser
<whitequark> for any combinations of nested heredocs, insane leading dots, everything.
<zenspider> ugh
sush24 has joined #ruby-lang
<whitequark> ok. lemme try to update that PR with the upstream patches
<zenspider> if it is easy, yes please
dhruvasagar has quit [Ping timeout: 276 seconds]
<whitequark> yuck, a 1622 line patch. what could go wrong
<zenspider> ok. I've merged my changes back to your branch and got it down to:
<zenspider> 1490 runs, 7193 assertions, 21 failures, 4 errors, 73 skips
elia has joined #ruby-lang
<zenspider> I should do another merge pass between the test dirs now that I know I'm not insane
<zenspider> or corrupted
vlad_starkov has joined #ruby-lang
<zenspider> elsif src.scan(/\"(#{ESC_RE}|#(#{ESC_RE}|[^\{\#\@\$\"\\])|[^\"\\\#])*\"/o) then
<zenspider> and
<zenspider> elsif src.scan(/\'(\\.|[^\'])*\'/) then
<whitequark> zenspider: it's somewhat simpler with ragel
<zenspider> the cases where I returned tSTRING straight up, instead of tSTRING_BEG etc
<whitequark> most of the time is spent in method calls for each single character in the string, to verify that it is not the closing delimiter
<whitequark> special-casing ' and " for that should be trivial, if wordly
<zenspider> *nod*
workmad3 has joined #ruby-lang
<whitequark> ok. for reference this is the diff between your lexer.rl and upstream one: https://gist.github.com/whitequark/a737342537a80fb01ed0
<whitequark> if you export your updated tree somehow I'll try to backport the changes
<whitequark> it's mostly trivial, sans the interface difference between P and RP
<zenspider> what do you mean by "export your updated tree"?
<zenspider> you mean push?
<zenspider> I'm pushed
<whitequark> zenspider: yes
<zenspider> all pushed as of friday
<zenspider> the only thing I've done since then is poke at your patch
<whitequark> didn't you just say you merged my PR with your recent changes?
<whitequark> or maybe I misunderstood
<zenspider> I'm trying to understand this from both directions... I've "merged" your lexer into my code... I've also merged my test changes into a checkout of your fork. Neither have resulted in any commits yet. just poking.
<whitequark> ok. I'd like to make use of your new tests while backporting lexer changes. So, to avoid duplicating work, can you push your current tree somewhere?
<zenspider> all my new tests are up
<zenspider> I've got a new way to figure out what parts of the grammar & lexer (old) were untested and have been generating a ton of new tests that way
<whitequark> have you seen my trick for computing code coverage on racc grammars?
<whitequark> it requires 2.0 for TracePoint but can be backported to 1.9
<whitequark> if you use set_trace_func
<zenspider> nice
<zenspider> ok. I'm fading... need sleep.
<whitequark> I think I poked you on twitter... my parser has 100% grammar coverage
jinie has quit [Quit: ZNC - http://znc.in]
<whitequark> ok. I'll see what can I do to update the PR.
<zenspider> thank
<zenspider> you
jinie has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Guest85414__ has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
<erikh> <3
<apeiros> holy poo long class name: ActiveRecord::Associations::CollectionProxy::ActiveRecord_Associations_CollectionProxy_Project
<apeiros> that's nice in the docs: @return [ActiveRecord::Associations::CollectionProxy::ActiveRecord_Associations_CollectionProxy_Project<MyModel>] - try to stick to 80 cols with that :D
<whitequark> wow
<apeiros> oh, actually that seems to be automatically generated
<apeiros> interesting
<apeiros> look at the last part of the name: _Project (it's a collection of projects)
<whitequark> even longer than org.apache.xmlrpc.server.RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory
<apeiros> oh, java guys will be envious of this name then
<erikh> haha
<erikh> neither of you have used spring, have you?
marr has joined #ruby-lang
<erikh> java guys have no class name envy
<erikh> AbstractFactoryManagerAbstractFactory
<whitequark> and org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
<whitequark> >Convenient proxy factory bean superclass for proxy factory beans that create only singletons.
<whitequark> >Convenient
<erikh> yeah, EJB is bad too.
perry has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby-lang
kstuart has quit [Ping timeout: 255 seconds]
<yorickpeterse> whitequark: wat
<yorickpeterse> I also never got the FactoryFactory thing
dwainfaithfull has joined #ruby-lang
dhruvasagar has joined #ruby-lang
buzzmore has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
setmeaway2 has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
<erikh> it's a scoping thing
<erikh> a factory that wraps a factory
<erikh> etc
<whitequark> it should have been a lambda
<erikh> well
<erikh> you can blame sussman for that
buzzmore has joined #ruby-lang
<erikh> err, or gosling
<erikh> they of all people should know too
<whitequark> sussman? the author of SICP?
<erikh> I'm thinking of guy steele I think
<whitequark> ok. sussman & steele. scheme authors
<whitequark> why?
<erikh> steele also helped design java
<erikh> with gosling
<whitequark> what
<whitequark> I find that hard to believe
<erikh> believe it.
<whitequark> In 1994, Steele joined Sun Microsystems and was invited by Bill Joy to become a member of the Java team after the language had been designed, since he had a track record of writing good specifications for existing languages. He was named a Sun Fellow in 2003.
<erikh> gosling's responsible for lisp machines and one of the earlier emacs
<whitequark> AFTER the language has been designed
<erikh> feh
<erikh> that's like saying rob pike had nothing to do with C
<erikh> splitting hairs.
<whitequark> I wonder how anyone with FP experience could design that abomination
<whitequark> that's just insane
<erikh> you realize they both have a fleet of money trucks now, right/
<whitequark> yea
<erikh> not everyone is after the ivory tower
<whitequark> it's not about the ivory tower
<erikh> also, from everything I've been told, Sun was a pretty awesome place to work
<erikh> regardless of what they were working on.
<erikh> and, at the time java was made, things like the jvm were relatively cutting-edge tech
<whitequark> well, whatever
<yorickpeterse> whitequark is jelly
<erikh> definitely jelly.
<whitequark> what?
<erikh> hahah
<erikh> you're so serious sometimes
<erikh> worse than dominikh
<erikh> it's cute.
<whitequark> meh
<erikh> please break again vagrant
<erikh> I need pain tonight
dhruvasagar has joined #ruby-lang
<whitequark> and jvm is just a self vm clone ;)
<erikh> I also need more motivation to replace this POS
<dominikh> erikh: here's a totally not serious "fuck you"
<erikh> dominikh: haha
<yorickpeterse> #serious-lang
<erikh> #umad-lang
<whitequark> erikh: btw, you seem to have more experience with java than me
<whitequark> tell me this one thing
sepp2k has joined #ruby-lang
<erikh> whitequark: not by much, tbh
<erikh> I haven't touched real java in like, a decade
<erikh> just some small-time android stuff.
<erikh> (Which is hard to call "Real java")
<whitequark> I always assumed that java worked for this use case: gather a thousand of monkeys, make them write a huge and nonsense business application no one in their sane mind will care about
<whitequark> and get *some* result
<whitequark> does it?
<erikh> would you rather write C++ or java
<whitequark> I mean, if you have that in mind, a lot of design decisions in java start to make perfect sense
<whitequark> erikh: it depends
<erikh> keep in mind we're talking about C++ from 15 years ago
sush24 has quit [Ping timeout: 264 seconds]
<whitequark> it still depends
<erikh> when the STL was... not to be relied on
<whitequark> s,STL,everything,
<erikh> and borland was still a very big player
<erikh> and g++ had the only real-world full STL implementation
<erikh> etc.
<erikh> java solved a lot of problems back then and lit a fire under the asses of a lot of other software companies.
<erikh> then, EJB and XML happened
<erikh> honestly, I think most of the hatred of java stems from those two things.
<erikh> it's not a terrible language until you get mired in all the enterprise crap
<erikh> I actually like its packaging system quite a bit.
<whitequark> java has excellent tooling
<whitequark> however the language itself is incredibly bland
<erikh> if you want java done right, check out the android build system
<whitequark> the object system is a joke
<erikh> well, yeah. it's supposed to be bland.
<whitequark> yeah, android does it right in a lot of places
sush24 has joined #ruby-lang
<erikh> Go is bland too. it's a feature of those languages.
<erikh> Java:C++::Go:C
<erikh> and I totally got my colons backwards but whatever
<erikh> holy christ vagrant
dhruvasagar has quit [Ping timeout: 246 seconds]
<whitequark> i guess the part I hate most is how Java blindly slaps its not-really-OOP
<whitequark> on everything
<whitequark> a lot of OOP hate seems to stem out of the way java (and C++, partly) do it
<whitequark> the funny thing is that both of them are not OO languages
<erikh> how can this thing be so slow
<erikh> I mean, are there some sleep 100's in there
<erikh> just so I can pay $80 to have them removed
<erikh> I hate this software so much and my shit is still not ready yet
<erikh> whitequark: it's OOP, it's just not smalltalk
<erikh> it's more like C++ OOP
<whitequark> erikh: it doesn't have message forwarding
<erikh> which isn't great
<erikh> well it has no message paradigm period
<whitequark> exactly
<whitequark> which means
<erikh> C++ is more or less the same way
<whitequark> it's not OO.
<erikh> that's like saying scheme isn't a lisp because it doesn't have macros
<whitequark> um, it does?
<erikh> it does?
<whitequark> yeah
<erikh> I thought it didn't
<erikh> oh well
<whitequark> and if it didn't
<erikh> I believe you. I don't know scheme.
<whitequark> I would totally be with you on "scheme is not a lisp"
<erikh> I just thought it didn't
<erikh> feh
<erikh> we can beat this argument to death (and raggi and I have)
<erikh> or we can just agree to disagree
<whitequark> well
<erikh> is that kay saying what OOP is?
<whitequark> yeah
<erikh> I'm kind of multitasking pretty hard atm
<whitequark> "messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things"
<whitequark> C++ has... neither of three
<erikh> people are welcome to disagree though
<erikh> and move forward with whatever they do
<whitequark> they could
<erikh> that's the great thing about software, and sometimes it's also the horrible thing about software.
<erikh> like, vagrant here
<whitequark> however, lack of the mentioned features does cause a lot of pain to C++ and Java developers
<erikh> doesn't fucking boot vms in parallel on virtualbox
<erikh> even though I have code that does it, reliably, and it's about 80% faster
<erikh> we're talking 5 minute boots down to 1.5 minutes
<erikh> for multiple vms
<erikh> I don't know
<erikh> I'm just pissed at vagrant
<erikh> the only reason I have so much time to chat is because of how slow it is
<erikh> whitequark: most java devs are cheap
<erikh> so guys like charles nutter and rich hickey are real snowflakes
<erikh> and the azul folks.
<erikh> I'm going outside to smoke
<erikh> if this vm isn't booted by then
<whitequark> yeah, but that's kinda unrelated
<erikh> I'm going up to SF
<erikh> and beating mitchell to a pul
<erikh> op
<erikh> asdfjil
<erikh> [so mad
<erikh> it's just sitting there, at a prompt
<erikh> vagrant has no idea it's up
<yorickpeterse> have you tried turning it off and on again?
<erikh> yorickpeterse: die
<erikh> [puppet] Waiting for cleanup before exiting...
<yorickpeterse> erikh: in about 65 years
<erikh> makes no attempt to clean things up
<erikh> vm is still running
<erikh> and I'm supposed to pay for this
marr has quit [Read error: Connection reset by peer]
jsullivandigs has joined #ruby-lang
ryez_ has joined #ruby-lang
sush24 has quit [Ping timeout: 248 seconds]
sush24_ has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
jsullivandigs has quit [Ping timeout: 264 seconds]
dwainfaithfull has quit [Ping timeout: 252 seconds]
<erikh> I've had a lot of caffeine, sorry
schaerli has joined #ruby-lang
dwainfaithfull has joined #ruby-lang
notak has joined #ruby-lang
sush24_ has quit [Ping timeout: 264 seconds]
benxao has joined #ruby-lang
sush24_ has joined #ruby-lang
mdedetrich has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
dwainfaithfull has quit [Read error: No route to host]
schaerli has quit [Remote host closed the connection]
MaddinXx has joined #ruby-lang
hogeo_ has joined #ruby-lang
buzzmore has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nveselinov_ has quit [Read error: Connection reset by peer]
hogeo has quit [Ping timeout: 255 seconds]
notak has quit [Read error: Connection reset by peer]
sush24_ has quit [Ping timeout: 246 seconds]
notak has joined #ruby-lang
sush24_ has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
dwainfaithfull has joined #ruby-lang
sush24_ has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
smook1 has joined #ruby-lang
jonahR has quit [Quit: jonahR]
notak has quit [Read error: Connection reset by peer]
notak has joined #ruby-lang
ryez_ has quit [Quit: Page closed]
mbj has joined #ruby-lang
shinh has quit [Read error: Connection reset by peer]
buzzmore has joined #ruby-lang
shinh has joined #ruby-lang
buzzmore has quit [Max SendQ exceeded]
schaerli has joined #ruby-lang
gmci has quit [Ping timeout: 255 seconds]
schaerli has quit [Ping timeout: 255 seconds]
supaiku has joined #ruby-lang
supaiku has quit [Client Quit]
supaiku has joined #ruby-lang
schaerli has joined #ruby-lang
jinie is now known as jinie_
jinie_ is now known as jinie
jinie is now known as jinie_
sush24 has joined #ruby-lang
Guest66975 has quit [Quit: leaving]
solars has joined #ruby-lang
notak has quit [Read error: Connection reset by peer]
notak has joined #ruby-lang
gmci has joined #ruby-lang
_chad_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
_chad_ has left #ruby-lang [#ruby-lang]
toretore has joined #ruby-lang
notak has quit [Read error: Connection reset by peer]
notak has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
notak has quit [Read error: Connection reset by peer]
notak has joined #ruby-lang
mbj has quit [Ping timeout: 246 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
symm- has joined #ruby-lang
faces has quit [Read error: No route to host]
sush24 has joined #ruby-lang
apeiros has quit []
apeiros has joined #ruby-lang
mbj has joined #ruby-lang
havenn_ has quit [Remote host closed the connection]
Guest72502 has left #ruby-lang [#ruby-lang]
matson has joined #ruby-lang
mbj_ has joined #ruby-lang
mbj has quit [Ping timeout: 255 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sush24 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
verto has joined #ruby-lang
shinh has quit [Read error: Connection reset by peer]
dwainfaithfull has quit [Quit: dwainfaithfull]
S2kx has quit [Quit: Leaving]
sush24 has quit [Quit: This computer has gone to sleep]
sush24 has joined #ruby-lang
justinmburrous has joined #ruby-lang
shinh has joined #ruby-lang
machuga|away is now known as machuga
sepp2k has quit [Quit: Leaving.]
dhruvasagar has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 248 seconds]
sush24 has joined #ruby-lang
JpC0utur3 has joined #ruby-lang
verto has quit [Quit: Textual IRC Client: www.textualapp.com]
GeissT has quit [Quit: AdiIRC is updating to v1.9.1 Beta Build (060613) 32 Bit]
vlad_sta_ has joined #ruby-lang
GeissT has joined #ruby-lang
smook1 has quit [Ping timeout: 255 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
gja has quit [Quit: This computer has gone to sleep]
symm- has quit [Ping timeout: 246 seconds]
alessio has joined #ruby-lang
alessio has quit [Client Quit]
vlad_starkov has joined #ruby-lang
glebm has joined #ruby-lang
AlessioRocco has joined #ruby-lang
AlessioRocco has quit [Client Quit]
AlessioRocco has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 264 seconds]
alessio_rocco has joined #ruby-lang
beawesomeinstead has quit [Changing host]
beawesomeinstead has joined #ruby-lang
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
mihar_ has quit [Ping timeout: 255 seconds]
mihar has joined #ruby-lang
S1kx has joined #ruby-lang
mbj_ has quit [Quit: leaving]
mbj has joined #ruby-lang
jsullivandigs has joined #ruby-lang
AlessioRocco has quit [Remote host closed the connection]
jsullivandigs has quit [Ping timeout: 264 seconds]
alessio_rocco has quit [Remote host closed the connection]
benanne has quit [Quit: kbai]
zmike has joined #ruby-lang
zmike has joined #ruby-lang
smook1 has joined #ruby-lang
LinkedoT has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
FiXato has quit [Read error: Connection reset by peer]
alessio_rocco has joined #ruby-lang
FiXato has joined #ruby-lang
jsullivandigs has joined #ruby-lang
machuga is now known as machuga|away
alessio has joined #ruby-lang
teleological has joined #ruby-lang
alessio has quit [Remote host closed the connection]
alessio_rocco has quit [Remote host closed the connection]
enebo has joined #ruby-lang
LinkedoT has quit [Quit: This computer has gone to sleep]
LinkedoT has joined #ruby-lang
smook1 has quit [Ping timeout: 255 seconds]
smook1 has joined #ruby-lang
Squarepy has joined #ruby-lang
enebo has quit [Quit: enebo]
<whitequark> erikh: btw, scheme did not have macros until r5rs (1998)
<whitequark> they were in spec appendix in r4rs (1991), though
schaerli has quit [Remote host closed the connection]
schaerli has joined #ruby-lang
ruby-lang847 has joined #ruby-lang
chana has joined #ruby-lang
xiesx has joined #ruby-lang
thiagoborges has joined #ruby-lang
ruby-lang847 has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby-lang
wallerdev has joined #ruby-lang
smook1 has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby-lang
teleological has quit [Remote host closed the connection]
chana has quit [Quit: chana]
JpC0utur4 has joined #ruby-lang
JpC0utur3 has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 0.3.9]
JpC0utur3 has joined #ruby-lang
JpC0utur4 has quit [Ping timeout: 246 seconds]
xiesx has quit [Ping timeout: 250 seconds]
kstuart has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
jxie has joined #ruby-lang
<Olipro> is Rubinius 1.9 friendly or not?
<Olipro> the website states "1.9 is on the post 1.0 list" - except the latest stable is 1.2.4
Johz has joined #ruby-lang
<whitequark> it depends
schaerli has quit [Remote host closed the connection]
mbj has quit [Ping timeout: 240 seconds]
mbj has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
tbuehlmann has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
jonahR has joined #ruby-lang
apeiros has quit []
hakunin_ is now known as hakunin
vlad_starkov has joined #ruby-lang
apeiros has joined #ruby-lang
jxie has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
rippa has joined #ruby-lang
rob_rock has joined #ruby-lang
sush24 has quit [Ping timeout: 255 seconds]
sush24 has joined #ruby-lang
wallerdev has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
crackity_jones has joined #ruby-lang
<hdm> anyone around who has been able to successfully build and link against a static mswin32 (Visual C) ruby 1.9.3+ library?
smook1 has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
JpC0utur3 has quit [Ping timeout: 240 seconds]
arubin has joined #ruby-lang
mbj has joined #ruby-lang
Jefferson has joined #ruby-lang
JpC0utur3 has joined #ruby-lang
hogeo has joined #ruby-lang
hogeo_ has quit [Ping timeout: 264 seconds]
furbage has joined #ruby-lang
elia has joined #ruby-lang
jkubecki has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
furbage has quit [Quit: furbage]
benanne has joined #ruby-lang
jacktrick has joined #ruby-lang
workmad3 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
<MouseTheLuckyDog> If you wanted to enter ( and later modify ) a multiple line statement in pry, how would you do it?
wallerdev has joined #ruby-lang
nveselinov has joined #ruby-lang
dwainfaithfull has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
schaerli has joined #ruby-lang
pskosinski has quit [Ping timeout: 264 seconds]
schaerli has quit [Remote host closed the connection]
dwainfaithfull has quit [Quit: dwainfaithfull]
thebastl has joined #ruby-lang
pskosinski has joined #ruby-lang
thebastl has quit [Remote host closed the connection]
jkubecki has quit [Remote host closed the connection]
jacktrick has quit [Quit: Leaving]
pskosinski has quit [Ping timeout: 252 seconds]
ia___ has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
mbj has quit [Remote host closed the connection]
lguardiola has joined #ruby-lang
hdm has quit [Ping timeout: 264 seconds]
Jefferson has quit [Quit: Leaving]
jsullivandigs has quit [Ping timeout: 240 seconds]
kstuart has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
sush24 has quit [Ping timeout: 264 seconds]
mbj has joined #ruby-lang
jkubecki has joined #ruby-lang
jkubecki has quit [Ping timeout: 255 seconds]
Johz has quit [Quit: Erm. That's probably the internet going. Again.]
firstdayonthejob has quit [Ping timeout: 248 seconds]
kstuart has joined #ruby-lang
crackity_jones has quit [Quit: Computer has gone to sleep.]
tonni has joined #ruby-lang
brianpWins has joined #ruby-lang
LinkedoT has quit [Quit: This computer has gone to sleep]
atmosx has joined #ruby-lang
runeb has joined #ruby-lang
Rizzle has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby-lang
dwainfaithfull has joined #ruby-lang
supaiku has quit [Quit: Verlassend]
elia has quit [Quit: Computer has gone to sleep.]
jkubecki has joined #ruby-lang
LinkedoT has joined #ruby-lang
runeb has quit [Remote host closed the connection]
tomzx_mac has joined #ruby-lang
vlad_starkov has joined #ruby-lang
jkubecki has quit [Ping timeout: 276 seconds]
mdedetrich has joined #ruby-lang
imperator has joined #ruby-lang
LinkedoT has quit [Ping timeout: 255 seconds]
LinkedoT has joined #ruby-lang
intellitech has joined #ruby-lang
jonahR has quit [Quit: jonahR]
MartynKeigher has quit [Quit: http://www.martynkeigher.com]
MartynKeigher has joined #ruby-lang
rob_rock has quit [Quit: Sto andando via]
sepp2k1 has joined #ruby-lang
zmike has quit [Quit: Выходжу]
sepp2k has quit [Ping timeout: 276 seconds]
LinkedoT has quit [Quit: This computer has gone to sleep]
notak has quit [Quit: notak]
vlad_starkov has quit [Remote host closed the connection]
benanne has quit [Quit: kbai]
heftig has quit [Quit: Quitting]
heftig has joined #ruby-lang
imperator has quit [Ping timeout: 246 seconds]
LinkedoT has joined #ruby-lang
workmad3 has joined #ruby-lang
lsegal has joined #ruby-lang
jkubecki has joined #ruby-lang
jsullivandigs has joined #ruby-lang
<andrewvos> MouseTheLuckyDog: edit
guns has joined #ruby-lang
jkubecki has quit [Ping timeout: 246 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
cofin has joined #ruby-lang
symm- has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 255 seconds]
imperator has joined #ruby-lang
<yorickpeterse> whitequark: ping
brianpWins has quit [Quit: brianpWins]
alessio has joined #ruby-lang
brianpWins has joined #ruby-lang
Bosox20051 has joined #ruby-lang
alessio has left #ruby-lang [#ruby-lang]
arocco has joined #ruby-lang
arocco has quit [Remote host closed the connection]
alessio has joined #ruby-lang
alessio has quit [Remote host closed the connection]
arocco has joined #ruby-lang
atmosx has quit [Read error: Connection reset by peer]
arocco has quit [Remote host closed the connection]
arocco has joined #ruby-lang
jonahR has joined #ruby-lang
<whitequark> yorickpeterse: pong
<yorickpeterse> whitequark: the AST structure of optional assignments is inconsistent with normal assignments. Example:
<yorickpeterse> `number = 10` leads to (lvasgn :number (int 10))
<yorickpeterse> however, `number ||= 10` leads to this:
<yorickpeterse> (or-asgn (lvasgn :number) (int 10))
<yorickpeterse> (note the lvasgn variable and value being separate)
<yorickpeterse> instead of the value being nested in the lvasgn
<whitequark> oh, indeed
rippa has quit [Ping timeout: 240 seconds]
<whitequark> it's explained in AST_FORMAT
<whitequark> basically, the lvasgn case is there just for orthogonality with a lot of similar cases
<whitequark> namely masgn, argument tricks, etc
<whitequark> think about this
<whitequark> self.a ||= 10
ikrima has joined #ruby-lang
<whitequark> then think about this
<whitequark> self.a, self[10] = *foo
<whitequark> simple case uses (lvasgn :name value), all complex cases use the same pattern of so-called "incomplete lhs"
<whitequark> ie, the assignment without the last part of it, that is the value.
<yorickpeterse> I'd prefer the value to be nested though
<yorickpeterse> it makes dealing with it a lot easier
<whitequark> in the case of masgn it is impossible
<whitequark> in the case of def f((a, b), c) it is impossible
<yorickpeterse> e.g. in my case I'm using a stack based/context system (stacks are created based on the context) which in this case won
<yorickpeterse> * won't work
<yorickpeterse> eh, how's that related to or-assignments?
<yorickpeterse> you can't do mass or-assignments anyway
LinkedoT has quit [Ping timeout: 276 seconds]
<whitequark> it's conceptually the same
<yorickpeterse> well, in the case of masgn it doesn't pose a problem though
LinkedoT has joined #ruby-lang
<yorickpeterse> Because one action (e.g. the callback "on_masgn") takes a pair of variables and values and can then link these
<yorickpeterse> with or-asgn that becomes more tricky, at least in my case
<whitequark> in the case of or-asgn or and-asgn it's the same.
<whitequark> the action you perform is quite complex anyway.
<whitequark> eg self.a.b ||= 1 is not equivalent to self.a.b = self.a.b || 1
<whitequark> even @a ||= 1 isn't equivalent to @a = @a || 1
teleological has joined #ruby-lang
<yxhuvud> @a || @ = 1 is closer though.
machuga|away is now known as machuga
<whitequark> yxhuvud: not really
<whitequark> it will emit a warning, ||= won't
<whitequark> semantic difference.
<yorickpeterse> still not sure how this justifies the odd or-asgn structure though
<yorickpeterse> at least odd when compared to regular asgn nodes
<yxhuvud> whitequark: I wrote closer, not exact.
joevandyk has joined #ruby-lang
<yxhuvud> if false; @a = nil; end; @a || @a = 1 is even closer to the mark.
<whitequark> yorickpeterse: it makes more sense than (or-asgn (ivasgn :@a (int 1)))
<whitequark> yxhuvud: no, ivars don't work that way
<whitequark> you confuse them with locals in this context.
<yorickpeterse> whitequark: I'd disagree with you there, but I guess that's due to my use case
<whitequark> yorickpeterse: parser's ast is heavily geared towards evaluators.
<whitequark> more specifically... evaluators with great error reporting
<yorickpeterse> This particular AST actually makes that harder
<yorickpeterse> at least when you're using stacks
<whitequark> 95% of stuff you would ever want to do with ruby includes partial evaluation, including your use case
<yorickpeterse> (for the values)
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<whitequark> how so?
<yorickpeterse> Ok, so I handle assignments as following:
<yorickpeterse> whenever, for example, a `lvasgn` node is reached a new stack is created, this stack is used for the values of this variable. Upon processing the child nodes (= the value(s)) the nodes are evaluated and the values pushed on to the stack created earlier on [...]
<yorickpeterse> Once done the callback "after_lvasgn" is executed, which is used to pop the values and store them along with the variable
teleolog_ has joined #ruby-lang
jkubecki has joined #ruby-lang
<yorickpeterse> This particular or-asgn syntax means that I have to jump through extra hoops in "on_or_asgn" (or "after_or_asgn") to associate values with variables, instead of setting some kind of switch that determines if existing vars should be overwritten or not
<yorickpeterse> I'm perfectly fine with "Fuck you, it stays this way" but I figured I'd at least know the reason behind it :)
<yorickpeterse> it just means there's more work for me
<whitequark> i guess you're like the only person doing evaluation this way
<whitequark> why stacks?
<yorickpeterse> The tl;dr of that is basically "it makes things a *hell* of a lot easier"
<yorickpeterse> e.g. there's no god method for some process, everything is done in small steps
<yorickpeterse> e.g. on_int processes integers (when needed), nothing more. on_lvasgn just takes values and slaps them in a named container
<yorickpeterse> Previously I had a big bunch of methods that took care of all this, which was a nightmare
teleological has quit [Ping timeout: 246 seconds]
<yxhuvud> whitequark: my main point remain though, that self.a.b ||= 1 is closer to self.a.b || self.a.b = 1. That is, that there will be no assignment if the left side is true.
<yorickpeterse> lets see if I can find an example
workmad3 has quit [Ping timeout: 248 seconds]
<whitequark> yxhuvud: no
<whitequark> in the case of ||=, self.a is called exactly one time
<yorickpeterse> whitequark: https://github.com/YorickPeterse/ruby-lint/blob/master/lib/ruby-lint/definitions_builder.rb#L439-L467 example method that used to take care of variable assignments in a (too) generic way
<whitequark> yorickpeterse: wait until you have to deal with self.a.b ||= c
akahn has quit [Ping timeout: 264 seconds]
<whitequark> basically you have to unpack the send, figure out the receiver, evaluate it once, call the .b, examine result, call .c, append a = and call .b=
<yorickpeterse> meh, I already did that in the past for certain nodes
<whitequark> all from (or-asgn (send (send (self) :a) :b) (send nil :c))
<yorickpeterse> wasn't that much of a pain
jkubecki has quit [Ping timeout: 248 seconds]
<yxhuvud> whitequark: yes. But self.a.b= is only called if self.a.b.
<whitequark> yorickpeterse: now look at that or-asgn node I posted
<whitequark> see how it resembles the assignment *syntactically*?
<whitequark> it's called AST for a reason
<yorickpeterse> hmm
<whitequark> remember how I also have to take care of the source maps?
<whitequark> plus, if you'd compactify it the way you want... what should be the selector? b ? b= ?
<whitequark> oh and before you ask. I know that (ivasgn :@a) means assignment and (send whatever :b) means access and not assignment.
<whitequark> however stripping a = sign is hell of a lot nastier than appending
firstdayonthejob has joined #ruby-lang
<whitequark> and you have to dispatch over the node type anyway
<whitequark> so I figured it's a minor yet justified inconsistency
GeissT_ has joined #ruby-lang
<whitequark> yxhuvud: oooh I got your point. you're totally right
<whitequark> we were talking about different things
<whitequark> @a || @a = 1. totally read that as @a = @a || 1
GeissT has quit [Read error: Connection reset by peer]
<yxhuvud> sorry, I couldn't help myself. I've seen too many books claim that foo ||= bar expands to foo = foo || bar
<whitequark> yeah yeah, you're correct and this is indeed a very common mistake
<yxhuvud> you still get the warning though, but at least the end result mathces more often
<whitequark> well, the semantics is still different wrt/ evaluation count
<whitequark> you can expand that lexically but you have to introduce a binding
<whitequark> basically you need hygienic macros ;)
benanne has joined #ruby-lang
<yxhuvud> yes please.
* whitequark shrugs
<whitequark> you can take parser and unparser and add hygienic macros to ruby
<whitequark> however I don't think this is worthy
<whitequark> ruby's syntax is far too overloaded as it is
<yxhuvud> true, I guess.
<yxhuvud> at least there is not all that new stuff being added all the time. not like python that seem to get a new syntactic feature every time I look.
<yorickpeterse> I think it's time for ActiveMacro
<whitequark> python actually got more of syntax right
<whitequark> but it's object model and execution environment in general is a total clusterfuck
<whitequark> global functions? magic global functions? changing class of an object to something unrelated? __dict__? full of wtf.
JpC0utur3 has quit [Ping timeout: 248 seconds]
<whitequark> and they actually managed to make class variables which are even more fucked up than ruby's. and default arguments
<whitequark> well I think I need to shut up
<yorickpeterse> __lol__
<whitequark> that too
<yxhuvud> how can class variables be more fucked up than @@s?
<whitequark> yxhuvud: aiui, python class variables leak into instance context
<whitequark> for example, if you write self.a... you access instance variable a, or if there's none, then a class variable a
<whitequark> and it also plays somehow with inheritance.
<whitequark> what is this, javascript?
machuga is now known as machuga|away
<yorickpeterse> implying JS has proper inheritance
dwainfaithfull has quit [Quit: dwainfaithfull]
<whitequark> you can also arbitrarily change inheritance chains at runtime
workmad3 has joined #ruby-lang
<yxhuvud> they have a more powerfull variant of inheritance, yes. I have nothing against prototype inheritance as such, even if js sometimes kinda fails at convenience. but having just a few parts of what prototype inheritance needs but not all of it adds more confusion than it is worth.
notak has joined #ruby-lang
<whitequark> more powerful? I'd say less strict
<yxhuvud> there is a difference?
<whitequark> in my view, yes
<whitequark> if a feature is present to be almost always either neglected or abused... it doesn't bring power
<whitequark> it brings problems
imperator has quit [Ping timeout: 245 seconds]
<whitequark> while you can solve right about any perf problem with a good JIT and enough of inline caches, taking ability to reason about semantics away from people sucks
<whitequark> obj = Foo.new; operate(obj); obj.class # => Bar
<whitequark> not cool dude
jefus has joined #ruby-lang
<yxhuvud> heh
jefus has quit [Read error: Connection reset by peer]
<whitequark> it's already bad with dynamic typing; it's already bad with singleton classes and method redefinition
<whitequark> don't make it even worse.
<yxhuvud> so what do you think of instance_eval/exec? That is a somewhat similar situation
<whitequark> which use cases of instance_exec do you have in mind?
burge has joined #ruby-lang
JpC0utur3 has joined #ruby-lang
<yxhuvud> well, the basic one where you take one piece of code defined in one context and execute it in a totally different. I've seen that abused quite heavily
<whitequark> yup... I'm totally against it
<whitequark> use "do |config|; config.foo = 1; config.bar = 2; end"
<whitequark> however it seems to be quite popular among rubyists
hhatch has quit [Ping timeout: 264 seconds]
<whitequark> in foundry (my ruby-like statically compiled language) I did some choices on these matters... for example, you can do instance_eval, but only lexically
<whitequark> (well, specific details are still up to consideration, but you will NOT able to take a random block and just substitute self under its feet. nope.)
<whitequark> there are also three totally magic methods in ruby
<whitequark> block_given?, binding, and local_variables
<yxhuvud> personally I think that is somewhat fine, though the given example where you can't even be certain what self will be from one row to another.
symm- has quit [Ping timeout: 252 seconds]
<yxhuvud> well blocks are pretty magical in general, considering their status as argument or not.
<whitequark> don't think so
<whitequark> you can say that block is just another argument which is not always described lexically
<whitequark> yield is a keyword. block_given? should have been a keyword, too.
<whitequark> I think it's a keyword in jruby
<yxhuvud> oh. hmm.
<workmad3> yxhuvud: self won't change between lines, it can only change within a whole block of code
jacktrick has joined #ruby-lang
<yxhuvud> workmad: the linked code tries to eval it on a different reciever if the first one doesn't have the method.
thiagoborges has quit [Ping timeout: 264 seconds]
<workmad3> yxhuvud: that doesn't actually change self though
<yxhuvud> semantics. what one line perceives as self may not be what the next one does.
<workmad3> wrong... self does not change
<workmad3> just because there's a method missing hook that will try to send a method off to a different object doesn't alter that
<yxhuvud> my point is that you don't know what self will be in a given method call.
<workmad3> and it's important because when you do an ivar lookup, it's always on self
jackhammer2022 has joined #ruby-lang
scottschecter has quit [Ping timeout: 264 seconds]
elia has joined #ruby-lang
enebo has joined #ruby-lang
glebm has quit [Ping timeout: 264 seconds]
jkubecki has joined #ruby-lang
Bosox20051 has quit [Quit: Leaving]
jkubecki has quit [Ping timeout: 248 seconds]
Squarepy has quit [Quit: Leaving]
scottschecter has joined #ruby-lang
<erikh> herpin' and derpin'
<erikh> whitequark: do you ever sleep
<erikh> also <3
teleolog_ has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
<whitequark> erikh: sometimes
enebo has quit [Quit: enebo]
<whitequark> what's with the sudden love?
<erikh> I love everybody
<whitequark> good
<erikh> been a git committing fiend this weekend
<erikh> although I didn't make time to do the rubygems stuff I wanted to
brianpWins_ has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
<erikh> perhaps later this week if I'm up to it.
<whitequark> look at you! what did you commit, YOU BASTARD!!
<erikh> tons of puppet refactors at $new_job
* whitequark headdesks
<whitequark> did you seriously call me too serious half a day ago
<erikh> feh
<erikh> I've had 2 hours of sleep myself
<erikh> after 24 hours or so of awakeness
<erikh> so I'm a little loopy
brianpWins has quit [Ping timeout: 264 seconds]
matti has quit [Ping timeout: 264 seconds]
stamina has quit [Ping timeout: 264 seconds]
brianpWins_ is now known as brianpWins
<whitequark> actually I get way less serious if I don't sleep
<whitequark> it's funny
<erikh> but yeah, fair call
<erikh> why can't rbenv hit, like anything other than ftp.ruby-lang.org
<whitequark> I think all the great ideas I ever had, I've got after some sleep deprivation. 20 hours, something along these lines.
matti has joined #ruby-lang
matti has quit [Changing host]
matti has joined #ruby-lang
<erikh> er, ruby-build.
stamina has joined #ruby-lang
<erikh> it's not like it checks the sig anyhow
<whitequark> it's also good for talkin', and for some really weird reason I get +10 to foreign language voice recognition. counterintuitively
<whitequark> like, suddenly start to understand all the lyrics. hilarity ensues
<erikh> yeah, actually I tend to be most productive whne I'm a little groggy
<erikh> might be because I tend to overcompensate with caffeine
<whitequark> (and "how the fuck did I listen to this for years without even noticing")
<whitequark> no, I don't do any caffeine
<erikh> whitequark: you're describing hallucinating
<erikh> :P
<whitequark> plays badly with my heart
<erikh> ah, yeah.
<whitequark> for some reason
<erikh> I got lucky at cardiovascular lotto
<whitequark> and/or brain. well. I just feel like shit.
<erikh> I should totally be dead
<whitequark> dunno which organs precisely get hit.
<whitequark> so there isn't much sense in doing it
<erikh> given that I'm overweight, smoke a ton and drink tons of coffee / red bull
<whitequark> you're... in your forties?
<erikh> nah, 35.
burge has quit [Quit: Textual IRC Client: www.textualapp.com]
<erikh> getting a "pro" e-cig kit next week with some 24mg liquid
<whitequark> in a dozen years you will get retribution for everything. hope you'll be in a country with state medical coverage <3
<erikh> eh, my dad did similar things at my age
<erikh> we're just built like that I guess.
<erikh> kind of hard to explain. I mean, I've been a smoker for close to 20 years now, no more stressed than most healthy people running up two flights of stairs at the BART stations here.
glebm has joined #ruby-lang
<erikh> I'm not saying smoking is a good idea, I'm just saying I've gotten pretty lucky in that regard.
<erikh> alright, heading home, back in 30 or so.
havenwood has joined #ruby-lang
<whitequark> erikh: you may actually be correct here
<whitequark> (i just lost connectivity with all overseas internet for two minutes. scary two minutes it were)
<whitequark> hmm. I recall reading an article in russian in 2002 which described a gene which both caused addiction AND protected the smoker from some of the side effects
<whitequark> I even found it, though it doesn't list any notable sources
havenwood has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 248 seconds]
akahn has joined #ruby-lang
Spaceghost|work has quit [Remote host closed the connection]
mbj has quit [Quit: leaving]
pipework has joined #ruby-lang
joevandyk has quit [Quit: joevandyk]
<erikh> well, emphysema runs with us
<erikh> but it's late onset
<erikh> grandfather was that way too
<erikh> but he was a marine all his life so it's kind of hard to say it was just genetics.
bzalasky has joined #ruby-lang
x0f has joined #ruby-lang
imperator has joined #ruby-lang
x0f_ has quit [Ping timeout: 245 seconds]
cofin has quit [Quit: cofin]
hogeo_ has joined #ruby-lang
hogeo has quit [Ping timeout: 248 seconds]
jkubecki has joined #ruby-lang
jkubecki has quit [Ping timeout: 264 seconds]
bzalasky has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
benanne has quit [Quit: kbai]
stamina has quit [Ping timeout: 255 seconds]
bzalasky has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
cofin has joined #ruby-lang
arocco has quit [Remote host closed the connection]
imperator2 has joined #ruby-lang
teukka has quit [Ping timeout: 245 seconds]
teukka has joined #ruby-lang
hogeo_ has quit [Remote host closed the connection]
imperator has quit [Ping timeout: 264 seconds]
jsullivandigs has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
imperator2 has quit [Ping timeout: 248 seconds]
brianpWins has quit [Quit: brianpWins]
GitNick has quit [Quit: ZNC - http://znc.in]
machuga|away is now known as machuga
vlad_starkov has joined #ruby-lang
LinkedoT has quit [Quit: Leaving]
x0f has quit [Ping timeout: 240 seconds]
x0f has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
x0f has quit [Ping timeout: 255 seconds]
x0f has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
jkubecki has joined #ruby-lang