srbaker has quit [Quit: Computer has gone to sleep.]
Gaelan has joined #ruby-lang
r0bby_ has quit [Ping timeout: 258 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Client Quit]
<whitequark>
18>> proc { |a, &b| b }.call { 1 }
<eval-in>
whitequark => /tmp/execpad-a07f9a2f73b0/source-a07f9a2f73b0:2: wrong number of arguments (0 for 1) (ArgumentError) ... (http://eval.in/15028)
<whitequark>
since when does 1.8 accept block arguments to blocks?..
<whitequark>
18>> proc { |&foo.bar| }.call { 2 }
<eval-in>
whitequark => /tmp/execpad-4db5c07c0d0c/source-4db5c07c0d0c:2: undefined local variable or method `foo' for main:Object (NameError) ... (http://eval.in/15030)
<whitequark>
lolwhat
dingus_khan has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
Gaelan has joined #ruby-lang
dankest has quit [Quit: Leaving...]
<whitequark>
18>> break()
<eval-in>
whitequark => /tmp/execpad-fa32fa0558e3/source-fa32fa0558e3:3: void value expression (http://eval.in/15031)
<whitequark>
wat, why is this an error
<whitequark>
18>> a && ()
<eval-in>
whitequark => /tmp/execpad-a5d8be2fc2bc/source-a5d8be2fc2bc:2: undefined local variable or method `a' for main:Object (NameError) (http://eval.in/15032)
<whitequark>
some of the annoying to implement parts are justified. but not much of them.
<whitequark>
there's also the part where a line of code can have three different meanings depending on unlimited preceding and one line of subsequent context
postmodern has quit [Quit: Leaving]
<lianj>
but thats the beauty
<lianj>
:P
<whitequark>
then please stop using this beauituful language for any real work, kthxbye
<lianj>
thats nice, i always define constants like that
<whitequark>
grrr
* whitequark
bites lianj
snafoo__ has quit [Quit: Leaving]
<lianj>
ruby gives you more features and you hate the
<lianj>
*them
<whitequark>
exactly. less is more.
<lianj>
not for the code golfing language #1
<whitequark>
the key word is "me". it's not about *me*. it's about collaboration, and featuritis makes collaboration harder, for various reasons
<lianj>
writing runnable but wtf ruby code saves your job
<whitequark>
not that the opposite extreme "there's only one way to do it" doesn't work either. first, because you are not clever enough to design it correctly, and second, because people will hate you anyway
* whitequark
slaps lianj around a bit with a large trout
<lianj>
im off, it late, and sorry for being such an ass
<whitequark>
please, place the "Coding & Collaboration Antipatterns" back to the shelf, it's harming your consciousness.
skade has quit [Quit: Computer has gone to sleep.]
krohrbaugh has quit [Quit: Leaving.]
chessguy has quit [Read error: Connection reset by peer]
chessguy has joined #ruby-lang
r0bby_ has joined #ruby-lang
bzalasky has joined #ruby-lang
skade has joined #ruby-lang
r0bby_ has quit [Client Quit]
rippa has joined #ruby-lang
crynix has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
skade has quit [Quit: Computer has gone to sleep.]
bzalasky has quit [Remote host closed the connection]
kain has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
Gaelan_ has joined #ruby-lang
Gaelan has quit [Read error: Connection reset by peer]
Gaelan_ has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
bzalasky has joined #ruby-lang
myappleguy has quit [Quit: Leaving.]
Gaelan has quit [Ping timeout: 258 seconds]
krohrbaugh has joined #ruby-lang
Andromeda has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
<TTilus>
whitequark: there sure are quite a few dark corners in ruby
<TTilus>
i remember one particular that bit me once
Andromeda has quit [Read error: Connection reset by peer]
Andromeda has joined #ruby-lang
<TTilus>
out of scope "next"
<whitequark>
huh?
sush24 has joined #ruby-lang
jg_ has joined #ruby-lang
ootoovak has joined #ruby-lang
pcboy__ has joined #ruby-lang
<TTilus>
basically def foo; ...; arr.each { bar }; ...; end; def bar; ...; next; ...; end
<TTilus>
that was 1.8
<TTilus>
1.9 doesnt allow that anymore
ootoovak has quit [Client Quit]
ootoovak has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
<TTilus>
that bar was extracted from foo and later on got called from elsewhere too
pcboy_ has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby-lang
<TTilus>
after that daemons started flying out of my nose
mistym has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
Gaelan has joined #ruby-lang
<rue>
Ooh, I like that error const trick.
<rue>
I’m gonna start using it
<rue>
You know, when I can write Ruby again…
<TTilus>
"can"? whats keeping you from?
mistym has quit [Remote host closed the connection]
ericmathison has joined #ruby-lang
stonerfish has joined #ruby-lang
Gaelan has quit [Ping timeout: 255 seconds]
ryanf_ has joined #ruby-lang
ryanf_ has quit [Client Quit]
charliesome has joined #ruby-lang
<whitequark>
TTilus: heh
ootoovak has quit [Quit: ootoovak]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
tsion has joined #ruby-lang
dhruvasagar has joined #ruby-lang
torrieri has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby-lang
heftig has quit [Quit: Quitting]
mytrile has joined #ruby-lang
Gaelan has joined #ruby-lang
<rue>
TTilus: Lack of time…
torrieri has quit [Quit: Leaving...]
stonerfish has quit [Quit: Leaving.]
<rue>
Work is FRP coffeescript (which is fun), and spare time is consumed by other things
<whitequark>
rue: link?
<whitequark>
FPR coffeescript is either total bullshit or quite interesting
<whitequark>
*FRP
sush24_ has joined #ruby-lang
torrieri has joined #ruby-lang
sush24 has quit [Ping timeout: 256 seconds]
wallerdev has quit [Quit: wallerdev]
unlikely_monkey has quit [Remote host closed the connection]
<apeiros>
FRP?
<whitequark>
apeiros: functional reactive programming, I assume
<apeiros>
o0
<apeiros>
thx
<whitequark>
a really neat concept
<whitequark>
I'd call it a generalization of the signal-slot system found in Qt, Gtk, etc
<whitequark>
however from what I understand, it still needs quite a bit of polishing before it is (if ever) applicable to large real-world systems
<rue>
It works pretty well.
<rue>
And MS has it on WP, through .Net’s Rx at least
<rue>
And I think they might support rxjs there too
Gaelan has quit [Ping timeout: 258 seconds]
<charliesome>
.net has some cool stuff going for it, but its a shame it's so windows centric
crynix has quit [Remote host closed the connection]
<rue>
Mm, '92
<r0bglees0n>
charliesome: yeah, F# looks cool
<rue>
whitequark: I like it a lot. Decomposing/combining/etc. the streams into data flows requires a change in thinking, but I find it a very good model
bzalasky has quit [Remote host closed the connection]
solars has joined #ruby-lang
<whitequark>
rue: I agree here
agarie_ has quit [Remote host closed the connection]
chendo has joined #ruby-lang
ootoovak has quit [Quit: ootoovak]
heftig has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
<rue>
But yes, things have conspired to the point that I wasn’t even aware that 2.0 was out…
postmodern has joined #ruby-lang
ootoovak has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
pygmael has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
Burgestrand has joined #ruby-lang
pygmael has quit [Client Quit]
woollyams has joined #ruby-lang
pygmael has joined #ruby-lang
chendo has quit [Quit: Computer has gone to sleep.]
mytrile has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
My_Hearing has joined #ruby-lang
pygmael has quit [Quit: pygmael]
nyuszika7h_ is now known as nyuszika7h
Andromeda has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
andromeda25 has joined #ruby-lang
<whitequark>
rue: um, it's in the topic for... ages
<rue>
I don’t read the topic?
<whitequark>
isn't it on the top of window somewhere?
<whitequark>
like, it's hard to not read it unless you specifically avoid that
andromeda25 has quit [Remote host closed the connection]
Andromeda has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
Gaelan has joined #ruby-lang
* whitequark
idly wonders what's up with moscow metro [underground?]
<whitequark>
like 1.5 years ago I suddenly started to see policemen everywhere. back in the days, there weren't much of them, but that didn't take long to escalate
<whitequark>
today, they're like every 25 meters, and with helmets and bulletproof vests
<whitequark>
and it's not like something's happening, they just stay there and do nothing.
<whitequark>
also, tons of CCTV cameras. I think they aim for 100% coverage
<rippa>
whitequark: I usually see police in helmets on days of sport events
<rippa>
nera Sportivnaya station
* whitequark
checks the news
<whitequark>
no, no sport events, it seems. fukushima?.. didn't expect that
Gaelan has quit [Ping timeout: 240 seconds]
wizonesolutions has quit [Quit: No Ping reply in 180 seconds.]
<eval-in>
whitequark => /tmp/execpad-1e224fde3598/source-1e224fde3598:2: NameError: undefined local variable or method `methods' for main(Object) (http://eval.in/15058)
<whitequark>
what
<injekt>
aye
<whitequark>
what the fuck
<whitequark>
how are you supposed to use that
<injekt>
:D
<injekt>
10>> __id__
<eval-in>
injekt => /tmp/execpad-852eb5a898f6/source-852eb5a898f6:2: NameError: undefined local variable or method `__id__' for main(Object) (http://eval.in/15059)
<eval-in>
r0bglees0n => /tmp/execpad-b61285a51e3a/source-b61285a51e3a:2:in `rescue in <main>': $! is a read-only variable (NameError) ... (http://eval.in/15068)
<tsion>
whitequark: Wasn't working on embedded system the goal of mruby? How does this compare?
<whitequark>
Foundry [the language] won't use complete Ruby syntax, just the sane parts, but I'm writing and contributing to the community an universal and good parser because that's a neat thing to do.
<whitequark>
tsion: no
<whitequark>
tsion: mruby is for embedding into applications on desktops/servers.
<tsion>
Ok
<whitequark>
this is a terminological confusion
<tsion>
It's been a while since I read anything about mruby.
skade has joined #ruby-lang
<whitequark>
(today's smartphones are in the cateogry of desktops/servers, btw)
<whitequark>
you technically can use mruby on microcontrollers but that doesn't make any sense
<whitequark>
hrm I think it's disallowed in the arg context
<injekt>
yeah
<whitequark>
>> ->{}.((1 until 1))
<eval-in>
whitequark => /tmp/execpad-201fce2f6d4e/source-201fce2f6d4e:2:in `block in <main>': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/15091)
<whitequark>
this is probably the most complicated parser on earth
<injekt>
>> loop until loop loop "de doop"
<eval-in>
injekt => /tmp/execpad-f2e9f7dfe5e0/source-f2e9f7dfe5e0:2:in `loop': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/15096)
<whitequark>
I mean srsly
woollyams has joined #ruby-lang
<whitequark>
you're going to deliberately try and stack complex concepts on top of each other to exceed this, and even then it's not a given that you succeed
<whitequark>
most certainly you'll just screw it up :D
<injekt>
\o/
maxmanders has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
<whitequark>
mbj: I've almost finished covering keywords with tests
<whitequark>
now, there are block args and method/command calls with complex args
<whitequark>
left
<whitequark>
also the weird "begin..end while" thingy which is so evil I need to radically change the way parser works, ugh
ootoovak has joined #ruby-lang
<mbj>
whitequark: nice, I'll go through the commits later
vlad_starkov has joined #ruby-lang
<mbj>
whitequark: isnt begin end while just like "single_statement while" ?
<whitequark>
mbj: no :(
<whitequark>
it's like do{}while in C
<whitequark>
but just for that exact form, "begin..end while". not eg "( ) while", which has almost the same parse tree
<mbj>
whitequark: heh
<mbj>
whitequark: Bad luck
tbuehlmann has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
alessio_rocco has quit [Remote host closed the connection]
jvrmaia has joined #ruby-lang
<My_Hearing>
Didn't they want to remove that behavior at some point?
My_Hearing is now known as Mon_Ouie
<whitequark>
Mon_Ouie: maybe
baba has quit [Quit: WeeChat 0.4.0]
<whitequark>
yay 72.15% grammar coverage
<whitequark>
up from 69.98%!
lewis1711 has joined #ruby-lang
<Burgestrand>
If I release two platform-specific gems for x86_64-linux and universal-linux on rubygems, which one will have precedence if I install it on a 64-bit linux system?
myappleguy has joined #ruby-lang
skade has quit [Ping timeout: 264 seconds]
Gaelan has joined #ruby-lang
lewis1711 has left #ruby-lang [#ruby-lang]
mytrile has quit [Remote host closed the connection]
Gaelan has quit [Ping timeout: 245 seconds]
fire has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Andromeda has quit [Remote host closed the connection]
cored has quit [Ping timeout: 240 seconds]
skade has joined #ruby-lang
krohrbaugh has joined #ruby-lang
cored has joined #ruby-lang
Burgestrand has quit [Quit: Burgestrand]
wallclockbuilder has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 255 seconds]
maxmanders has joined #ruby-lang
jxie has quit [Quit: leaving]
maxmanders has quit [Client Quit]
cored has quit [Ping timeout: 258 seconds]
symm-_ has quit [Ping timeout: 256 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
dhruvasagar has quit [Read error: Operation timed out]
wasserspiegel has joined #ruby-lang
dhruvasagar has joined #ruby-lang
postmodern has quit [Quit: Leaving]
cored has quit [Ping timeout: 256 seconds]
cored has joined #ruby-lang
singpolyma has quit [Quit: Lost terminal]
dc5ala has quit [Quit: Ex-Chat]
cored has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby-lang
cored has joined #ruby-lang
Gaelan has joined #ruby-lang
ootoovak has quit [Quit: ootoovak]
Gaelan has quit [Ping timeout: 256 seconds]
heftig has joined #ruby-lang
wallclockbuilder has quit [Remote host closed the connection]
wallclockbuilder has joined #ruby-lang
ootoovak has joined #ruby-lang
ootoovak has quit [Client Quit]
tsion has quit [Quit: Leaving]
woollyams has quit [Quit: Computer has gone to sleep.]
adambeynon has joined #ruby-lang
soknee has joined #ruby-lang
chessguy has joined #ruby-lang
<whitequark>
yorickpeterse: YAY!!!
<whitequark>
5.
<whitequark>
and it's not me, it's zenspider's "test_wtf_7" and "raise "no3" which he's gonna fix himself
skade has quit [Quit: Computer has gone to sleep.]
<eval-in>
lianj => /tmp/execpad-a607d080d05b/source-a607d080d05b:2:in `<main>': undefined local variable or method `i' for main:Object (NameError) (http://eval.in/15238)
<zachlatta>
Is that any better than [1,2].each_do |i| p i end
<zachlatta>
?
<lianj>
yea, that what most people use
<zachlatta>
I'm sorry for misunderstanding, but for that do most people use each_do or for?
krohrbaugh has quit [Read error: Operation timed out]
alessio_rocco has quit [Remote host closed the connection]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
TheNotary has joined #ruby-lang
mytrile has joined #ruby-lang
<canton7>
yeah, the scoping is about it, plus #each is more idiomatic
vlad_starkov has joined #ruby-lang
intellitech has quit [Quit: intellitech]
dingus_khan has joined #ruby-lang
ootoovak has joined #ruby-lang
Swimming_Bird has quit [Ping timeout: 276 seconds]
tallship has joined #ruby-lang
tallship has quit [Remote host closed the connection]
tallship has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
dingus_khan has quit [Ping timeout: 256 seconds]
Andromeda has joined #ruby-lang
woollyams has joined #ruby-lang
Andromeda has quit [Ping timeout: 255 seconds]
wmoxam has quit [Ping timeout: 245 seconds]
dingus_khan has joined #ruby-lang
melter has quit [Quit: Client exiting]
woollyams has quit [Quit: Computer has gone to sleep.]
ootoovak has quit [Quit: ootoovak]
ootoovak has joined #ruby-lang
ootoovak has quit [Client Quit]
sepp2k has quit [Remote host closed the connection]
<dingus_khan>
zachlatta: according to what I've read in Eloquent Ruby, it's idiomatically correct to use each-do over a for loop, but they both technically work...?
intellitech has joined #ruby-lang
krohrbaugh has joined #ruby-lang
norio has quit [Remote host closed the connection]
unlikely_monkey has joined #ruby-lang
dingus_khan has quit [Ping timeout: 264 seconds]
krohrbaugh has quit [Read error: Operation timed out]
tylersmith has quit [Quit: tylersmith]
spuk has quit [Ping timeout: 260 seconds]
srbaker has joined #ruby-lang
spuk has joined #ruby-lang
ootoovak has joined #ruby-lang
dingus_khan has joined #ruby-lang
soknee has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<TheNotary>
dingus_khan, My understanding is that each-do is encouraged over for loops. In fact (in 1.9 at least) for loops are wildly more efficient than .each, yet most rubyist don't use for loops unless they're attempting to achieve a specific benchmark.
soknee has quit [Client Quit]
<TheNotary>
my philosophy thus far is do it pretty, and counter-efficiently, and in most cases that works out great. I've recently been thinking more about efficiency upon working on a public gem though... I'm not sure if i'm going to replace the each loops or not now that you mention it. I actually forgot about that aspect of ruby.
oddmunds has quit [Ping timeout: 252 seconds]
<whitequark>
TheNotary: huh wat, wildly more efficient?..
<TheNotary>
in any regard, Java is a much more suitible language if you'd like to write some ugly code ;) It's almost manditory per syntax
<TheNotary>
well... let me google this, it's like 2x faster isn't it though?
unlikely_monkey has quit [Remote host closed the connection]
<whitequark>
this is really strange, because for loops are a syntactic sugar for each..do :)
<whitequark>
but lemme verify
<TheNotary>
hmm... I'm not finding anything... I don't know what language I could be thinking of if not... oh... jquery duh
Swimming_Bird has joined #ruby-lang
<lianj>
whitequark: for i in [1,2]; end; p i vs [1,2].each{|i| }; p i
<lianj>
cant be only syntactic sugar
Swimming_Bird has quit [Max SendQ exceeded]
<TheNotary>
nvm, I'm completely wrong if this is news to whitequark
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
<whitequark>
lianj: well, for some value of syntactic sugar
<whitequark>
it does rebind the variable indeed but that's about the only difference