apeiros_ changed the topic of #ruby-lang to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
mrfelix has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has quit [Ping timeout: 276 seconds]
torrieri has quit [Ping timeout: 252 seconds]
bzb has quit [Quit: I hate to quit but my bladder's full. :-(]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
ahs3- has joined #ruby-lang
kain has quit [Quit: exit]
pib1978 has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
tesseract has left #ruby-lang [#ruby-lang]
megha has quit [Ping timeout: 255 seconds]
_slowhands has left #ruby-lang [#ruby-lang]
vlad_starkov has joined #ruby-lang
Guest17638 has joined #ruby-lang
sepp2k has quit [Read error: Connection reset by peer]
alessio_rocco has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Quit: Textual IRC Client: www.textualapp.com]
tylersmith has quit [Quit: tylersmith]
torrieri has joined #ruby-lang
krohrbaugh has quit [Read error: Operation timed out]
__butch__ has quit [Quit: Leaving.]
halorgium is now known as muigrolah
torrieri has quit [Ping timeout: 257 seconds]
idkazuma has quit [Remote host closed the connection]
sailias has joined #ruby-lang
<ahs3-> A question from a newbie, what is the difference in: puts "#{var}" and : puts var ... The only reason i ask is because when var is read from an array: var=array1[0] they are displayed differently? When the "" are used it displays the entire array, without them it displays correctly. Any ideas to what this noob is doing wrong?
agarie has joined #ruby-lang
agarie has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
mbj has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: Leaving]
sirbrillig has left #ruby-lang [#ruby-lang]
norplr has joined #ruby-lang
dankest has quit [Quit: Linkinus - http://linkinus.com]
setmeaway has quit [Ping timeout: 245 seconds]
mjio has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
TheNotary has quit [Quit: Leaving]
muigrolah is now known as halorgium
cirenyc has joined #ruby-lang
lsegal has joined #ruby-lang
<pskosinski> >> a = [1, 2, 3, 4, 5]; puts a[2]; puts "#{a[2]}"
<eval-in> pskosinski => 3 ... (http://eval.in/16559)
<pskosinski> ahs3-: Like this? ^ http://eval.in/16559
<pskosinski> I guess that you have a bug, if I understand correctly how your code should look like.
torrieri has joined #ruby-lang
torrieri has quit [Ping timeout: 245 seconds]
Domon has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
r0bgleeson has quit [Ping timeout: 264 seconds]
pskosinski has quit [Quit: pskosinski]
<ahs3-> yes exactly
<ahs3-> oops he left
krohrbaugh has joined #ruby-lang
sailias has quit [Quit: Leaving.]
krohrbaugh has quit [Client Quit]
io_syl has quit [Quit: Computer has gone to sleep.]
nikky has joined #ruby-lang
cheri has joined #ruby-lang
ando has joined #ruby-lang
relrod has joined #ruby-lang
TheNotary has joined #ruby-lang
Swimming_Bird has quit [Ping timeout: 276 seconds]
GeissT has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
GeissT has quit [Read error: Connection reset by peer]
GeissT has joined #ruby-lang
torrieri has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
spuk has joined #ruby-lang
torrieri has quit [Ping timeout: 256 seconds]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Read error: Operation timed out]
headius has joined #ruby-lang
agarie has joined #ruby-lang
lcdhoffman has joined #ruby-lang
asahi has joined #ruby-lang
krohrbaugh has joined #ruby-lang
torrieri has joined #ruby-lang
cheri has quit [Ping timeout: 245 seconds]
torrieri has quit [Ping timeout: 248 seconds]
baba has joined #ruby-lang
Guest17638 has quit [Ping timeout: 260 seconds]
drumond19 has quit [Ping timeout: 264 seconds]
drumond19 has joined #ruby-lang
rx_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
rx_ has left #ruby-lang [#ruby-lang]
swygue has joined #ruby-lang
asahi has quit [Quit: Leaving.]
agile has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 245 seconds]
io_syl has joined #ruby-lang
Wardrop has joined #ruby-lang
<Wardrop> Does ruby provide a method for Array/Enumerable that returns the first true value? #find isn't quite what I want, as it returns the array element rather than the actual truthy value of the block.
<lianj> > [1,2].find{|i| i > 1 }
<lianj> >> [1,2].find{|i| i > 1 }
<eval-in> lianj => 2 (http://eval.in/16580)
torrieri has joined #ruby-lang
<Wardrop> lianj: I'd want it to return true in that case, not the element.
<lianj> .any?
mahat has joined #ruby-lang
<Wardrop> lianj: #any? is also no good, as it just returns true/false. I want return the actual truthy value, let me give an example.
swav has quit [Remote host closed the connection]
<lianj> >> [1,2].find{|i| i > 1 }
<eval-in> lianj => 2 (http://eval.in/16581)
<lianj> does what you want then
<Wardrop> ['cat', 'dog', 'horse'].find { |v| 'roof' if v == 'dog' }
<Wardrop> lianj: Can you see the different in that example. It's not returning true, and it's not returning 'dog', it's returning the result of the block.
edder has joined #ruby-lang
edder has quit [Remote host closed the connection]
<lianj> yes, thats different from how you explained it
<Wardrop> lianj: It is hard to explain
torrieri has quit [Ping timeout: 245 seconds]
<lianj> >> ['cat', 'dog', 'horse'].find { |v| v == 'dog' } && 'roof'
<eval-in> lianj => "roof" (http://eval.in/16582)
krohrbaugh has quit [Quit: Leaving.]
<Wardrop> lianj: I really needs to be the return value of the block for it to work in my library.
<lianj> ['cat', 'dog', 'horse'].map{|v| 'roof' if v == 'dog' }.find{|i| i }
<lianj> ['cat', 'dog', 'horse'].map{|v| 'roof' if v == 'dog' }.compact.first
<lianj> you can always roll your own .each
<Wardrop> lianj: The problem there is that I want to short-circuit. If I have a large array, and a truth value in encountered early, I don't want to process the remainder.
<lianj> you can always roll your own .each
<Wardrop> lianj: I have a work-around, I just wanted to check that there wasn't already a method provided in ruby.
rippa has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
krohrbaugh has joined #ruby-lang
woollyams has joined #ruby-lang
mahat has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 240 seconds]
thufir_ has joined #ruby-lang
botton has joined #ruby-lang
botton has left #ruby-lang [#ruby-lang]
baba has quit [Ping timeout: 260 seconds]
baba has joined #ruby-lang
torrieri has joined #ruby-lang
bzalasky_ has joined #ruby-lang
stardiviner has joined #ruby-lang
torrieri has quit [Ping timeout: 248 seconds]
edder has joined #ruby-lang
stardiviner has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby-lang
celinedior has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
edder has quit [Quit: Textual IRC Client: www.textualapp.com]
srbaker has joined #ruby-lang
Quatrerwin has joined #ruby-lang
divout has joined #ruby-lang
ledestin has joined #ruby-lang
<ledestin> what was the iterator class?
<Wardrop> ledestin: Enumerable or Enumerator
<ledestin> Wardrop: ty
torrieri has joined #ruby-lang
torrieri has quit [Changing host]
torrieri has joined #ruby-lang
torrieri has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby-lang
rippa has joined #ruby-lang
baba has quit [Ping timeout: 245 seconds]
krohrbaugh has quit [Quit: Leaving.]
<ledestin> ruby -e '10.times { Thread.new { loop { 2*2 } } }; gets' uses only one core. any ideas?
<ledestin> what I mean there's still 75% of CPU idle
<ledestin> 4 cores I have
<Wardrop> ledestin: Ruby MRI has a global interpreter, meaning only one thread can run at a time. Multi-threadinging in Ruby is really only useful for operations involving some kind of blocking IO.
<Wardrop> global interpreter lock*
<ledestin> it used to be threads were implemented via processes, no?
<Wardrop> Other Ruby implementations such as JRuby and Rubinius don't have global interpreter locks.
<ledestin> :(
<Wardrop> ledestin: The only way you can use run multiple Ruby threads at the same time under MRI is to be running multiple processes, such as via forking.
andersbr has joined #ruby-lang
<ledestin> Wardrop: ok, thanks
<ledestin> it's pretty bad :(
<Wardrop> ledestin: This will likely change at some point in the future. Maybe Ruby 3.0.
<brixen> ledestin: you may want to check out https://github.com/celluloid
<firefux> or eventmachine
<Wardrop> Until recently, Ruby hasn't been that performance orientated. Most applications that require Ruby to perform efficiently are web applications, and that lends itself to multi-process and multi-threaded concurrency, so it becomes a non-issue for the most part.
<firefux> it can be expensive hardware wise
<firefux> something that can take one server in Java can take 30 severs in MRI
<Wardrop> firefux: I find that to be a little exaggerated. Ruby 2.0 is pretty quick. JRuby is still a little quicker, but the margin isn't great. The only hardware penalty incurred by Ruby's lack of concurrent threading is memory. Multiple processes use more memory than multi-thread, but then copy-on-write and other fork-friendly features ease that.
lcdhoffman has quit [Quit: lcdhoffman]
Averna has joined #ruby-lang
<perry> is anyone here older than 60 years? :) I'm looking to interview a late adult for an assignment. shouldn't take very long :)
<Wardrop> perry: "late adult" would imply you're looking for a dead adult?
<ledestin> thanks guys
<perry> Wardrop, no just over 60
<firefux> Wardrop: well, yes, application servers like puma are helping to tackle this problems
<headius> the margin for jruby varies considerably depending on the code
<firefux> Wardrop: we need more thread safe gems
<firefux> :)
krohrbaugh has joined #ruby-lang
<headius> for "simple" code that doesn't use a lot of closures, etc, jruby can be many times faster than Ruby 2.0
jg has joined #ruby-lang
<Wardrop> firefux: I'm sure developers will give higher priority to thread-safety once MRI supports threaded concurrency.
<firefux> headius: why is that?
<headius> why does it vary or why is it that much faster?
<firefux> headius: both actually :)
jerrytgarcia has joined #ruby-lang
<headius> well, jruby actually has a JIT, via the JVM…so where we've managed to map Ruby to normalish JVM constructs, the JVM can optimize it much better than MRI
torrieri has joined #ruby-lang
<firefux> ah you are a jruby dev, nice :)
<firefux> headius: wouldn't it be simpler if the ruby world move completely to jruby? :)
<headius> indeed
skade has joined #ruby-lang
<firefux> headius: startups time can be a issue
<headius> yeah, I wish we could do more there…it's really the only big issue with moving to jruby for many people
torrieri has quit [Ping timeout: 245 seconds]
sevenseacat has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
yfeldblum has quit [Ping timeout: 272 seconds]
<firefux> headius: are you guys working on 2.0 support/
<firefux> ?
<headius> yeah, we've implemented most of it except for prepend and refinements
<headius> we probably won't do those in the jruby 1.7.x series
mistym has quit [Remote host closed the connection]
rx has joined #ruby-lang
jonahR has joined #ruby-lang
sevenseacat has left #ruby-lang [#ruby-lang]
andersbr has quit [Quit: andersbr]
stef_204 has joined #ruby-lang
tonni has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Ping timeout: 245 seconds]
tonni has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
lguardiola has quit [Ping timeout: 248 seconds]
lguardiola has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
krohrbaugh has quit [Quit: Leaving.]
dhruvasagar has joined #ruby-lang
yfeldblum has joined #ruby-lang
krohrbaugh has joined #ruby-lang
skade has joined #ruby-lang
headius has quit [Quit: headius]
dhruvasagar has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
brianpWins has joined #ruby-lang
torrieri has joined #ruby-lang
torrieri has quit [Ping timeout: 256 seconds]
rx has quit [Quit: Computer has gone to sleep.]
bzalasky_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
lguardiola has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
rippa has joined #ruby-lang
nyuszika7h_ is now known as nyuszika7h
Domon has quit [Ping timeout: 272 seconds]
Domon has joined #ruby-lang
krz has joined #ruby-lang
celinedior has quit [Quit: celinedior]
mbj has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 240 seconds]
mytrile has joined #ruby-lang
torrieri has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
mbj has quit [Read error: Connection reset by peer]
io_syl has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby-lang
dagobah has joined #ruby-lang
Nuru has joined #ruby-lang
Nuru is now known as jgro
jgro is now known as cgor
cgor has quit [Client Quit]
srbaker has quit [Quit: Computer has gone to sleep.]
Wardrop has quit [Quit: Wardrop]
tonni has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
krohrbaugh has quit [Quit: Leaving.]
agarie has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
solars has joined #ruby-lang
jonuts has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
jonahR has quit [Quit: jonahR]
tonni has joined #ruby-lang
dbussink has quit [Quit: bye]
dbussink has joined #ruby-lang
skade has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
apeiros has quit [Read error: No route to host]
apeiros has joined #ruby-lang
closer has joined #ruby-lang
closer009 has quit [*.net *.split]
arsemyonov has joined #ruby-lang
krohrbaugh has joined #ruby-lang
apeiros has quit [Ping timeout: 256 seconds]
djwonk has quit []
mbj has joined #ruby-lang
dhruvasagar has joined #ruby-lang
lele|w has quit [Ping timeout: 246 seconds]
krohrbaugh has quit [Read error: Operation timed out]
lele|w has joined #ruby-lang
apeiros has joined #ruby-lang
torrieri has joined #ruby-lang
TheNotary has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby-lang
alessio_rocco has joined #ruby-lang
<injekt> moin
mbj has quit [Read error: No route to host]
matled- has joined #ruby-lang
<ruskie> k
matled has quit [Read error: Connection reset by peer]
matled- is now known as matled
torrieri has quit [Ping timeout: 240 seconds]
jonuts has quit [Read error: Operation timed out]
jonuts has joined #ruby-lang
samuelkadolph has quit [Ping timeout: 252 seconds]
marr has joined #ruby-lang
samuelkadolph has joined #ruby-lang
maxmanders has joined #ruby-lang
TheNotary has joined #ruby-lang
solars has joined #ruby-lang
blacktulip has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
<jonuts> account help
<jonuts> doh wrong window
bin7me has joined #ruby-lang
maxmanders has joined #ruby-lang
mjio has quit []
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
woollyams has quit [Ping timeout: 264 seconds]
tbuehlmann has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
Averna has quit [Quit: Leaving.]
judofyr has joined #ruby-lang
Averna has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
intellitech has quit [Ping timeout: 258 seconds]
brianpWins has quit [Quit: brianpWins]
sush24 has joined #ruby-lang
codejury has quit [Remote host closed the connection]
tjaco has joined #ruby-lang
torrieri has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 252 seconds]
chendo__ has joined #ruby-lang
torrieri has quit [Ping timeout: 252 seconds]
TheNotary has quit [Ping timeout: 245 seconds]
thufir_ has quit [Quit: Leaving.]
tbuehlmann has quit [Ping timeout: 252 seconds]
r0bgleeson has joined #ruby-lang
apeiros has quit [Read error: Operation timed out]
chendo__ has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby-lang
chendo_ has joined #ruby-lang
mossplix has joined #ruby-lang
TheNotary has joined #ruby-lang
Averna has quit [Quit: Leaving.]
charliesome_ has joined #ruby-lang
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
gnufied has quit [Quit: Leaving.]
GarethAdams has joined #ruby-lang
mossplix has quit [Ping timeout: 252 seconds]
dhruvasa1ar has joined #ruby-lang
intellitech has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby-lang
gnufied has joined #ruby-lang
face has joined #ruby-lang
mossplix has quit [Quit: mossplix]
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
sush24 has quit [Read error: Connection reset by peer]
mossplix has joined #ruby-lang
faces has quit [Ping timeout: 260 seconds]
toretore has joined #ruby-lang
kgrz has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
oneirophren has joined #ruby-lang
nertzy2 has quit [Ping timeout: 245 seconds]
sush24 has joined #ruby-lang
jonuts has quit [Quit: WeeChat 0.3.8]
maxmanders has joined #ruby-lang
krohrbaugh has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
Criztian has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
mossplix has quit [Ping timeout: 252 seconds]
krohrbaugh has quit [Ping timeout: 246 seconds]
tjaco has quit [Ping timeout: 246 seconds]
torrieri has joined #ruby-lang
mossplix has joined #ruby-lang
<judofyr> hey folks
<judofyr> what's up?
kgrz has quit [Quit: Computer has gone to sleep.]
sush24 has quit [Ping timeout: 260 seconds]
torrieri has quit [Ping timeout: 264 seconds]
sush24 has joined #ruby-lang
mossplix has quit [Ping timeout: 260 seconds]
beiter has joined #ruby-lang
arsemyonov has quit [Quit: arsemyonov]
yfeldblum has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
dhruvasa1ar is now known as dhruvasagar
sush24 has joined #ruby-lang
mossplix has joined #ruby-lang
jg has quit [Ping timeout: 255 seconds]
kgrz has joined #ruby-lang
smt has joined #ruby-lang
setmeaway has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
halorgium is now known as muigrolah
maxmanders has joined #ruby-lang
<charliesome> judofyr: howdy
<ledestin> guys, what performance you're getting with memcached? how many sets per second?
mossplix has quit [Ping timeout: 252 seconds]
beiter has quit [Ping timeout: 272 seconds]
beiter has joined #ruby-lang
ruby-lang280 has joined #ruby-lang
thufir_ has joined #ruby-lang
sush24 has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
ruby-lang280 has quit [Client Quit]
sush24 has joined #ruby-lang
mossplix has joined #ruby-lang
<darix> ledestin: how many do you get?
<ledestin> I was getting 200000 in like 8 seconds with dalli
<ledestin> now I'm using memcached gem, it's better
<ledestin> million in a sec
<ledestin> in 4 sec
baba has joined #ruby-lang
<ledestin> it's about right
muigrolah is now known as halorgium
mossplix has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
mossplix has joined #ruby-lang
bin7me has quit [Quit: Verlassend]
wallclockbuilder has joined #ruby-lang
halorgium is now known as muigrolah
workmad3 has joined #ruby-lang
wallclockbuilder has quit [Remote host closed the connection]
ubersapiens has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
waxjar has quit [Ping timeout: 258 seconds]
hakunin has joined #ruby-lang
torrieri has joined #ruby-lang
bin7me has joined #ruby-lang
<darix> ledestin: and now the killer question: how many req/s do you expect to need for your app?
dkannan has joined #ruby-lang
tbuehlmann has joined #ruby-lang
<charliesome> judofyr: how good are why's videos
torrieri has quit [Ping timeout: 256 seconds]
m4t- has quit [Ping timeout: 245 seconds]
waxjar_ has joined #ruby-lang
Domon has quit [Remote host closed the connection]
<ledestin> darix: 200000/sec is ok
<judofyr> charliesome: heh, they're a big quirky
<charliesome> they're amazing
jxie has quit [Ping timeout: 258 seconds]
jxie has joined #ruby-lang
<charliesome> metaclasses wrapping my singleton objects in a deep unyielding embrace
<judofyr> :D
priodev has quit [Ping timeout: 258 seconds]
<judofyr> charliesome: you've read http://the-least-surprised.judofyr.net/#1 right?
<darix> ledestin: did you optimize your server for many requests? is the firewall running? are the conntrack settings set up to cover many requests
<darix> ledestin: did you consider using bulk operations
<darix> so many questions
<darix> also you will really need 200k r/s ?
<ledestin> darix: it's 1 client doing many sets
<ledestin> I have no idea how to optimize
m4t- has joined #ruby-lang
<charliesome> "maybe ruby will have excelsior unicode support by then"
<ledestin> what does it have to do with firewall?
<judofyr> charliesome: I always wanted to write a web framework called Super Fjord
<darix> ledestin: iptables likes to use conntrack ... default conntrack settings are kinda silly for many small requests
<darix> so the table likes to overflow which then slows down new connections
maxmanders has quit [Quit: Computer has gone to sleep.]
<darix> i wonder if memcache clients can use keepalive
priodev has joined #ruby-lang
maxmanders has joined #ruby-lang
mossplix has quit [Ping timeout: 252 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
face has quit [Read error: Connection reset by peer]
faces has joined #ruby-lang
face has joined #ruby-lang
faces has quit [Read error: Connection reset by peer]
<judofyr> darix: Facebook uses UDP for GET requests
<darix> judofyr: that's the other option.
<judofyr> in general, this is a great paper for scaling with memcached: https://www.usenix.org/conference/nsdi13/scaling-memcache-facebook
<judofyr> charliesome: so, you think _why will return tomorrow? :)
<charliesome> judofyr: oh????
<charliesome> when did this happen
<judofyr> charliesome: http://whytheluckystiff.net/
arsemyonov has joined #ruby-lang
<darix> judofyr: that sounds we should have a party
<charliesome> judofyr: i don't think so
<charliesome> why is gone forever
<ledestin> darix: I read that no bulk set is supported
<judofyr> charliesome: SPOOL/PRESENTLY says something like "Nothing to see here yet. Wait 2 days"
maxmanders has quit [Quit: Computer has gone to sleep.]
<tsion> Apparently the SPOOL/PRESENTLY file on that website contains the message "This thing will open in two days. Which means it isn't open right now. Sorry, it just isn't." according to a hackernews comment.
mossplix has joined #ruby-lang
<tsion> judofyr beat me to it.
nkr has joined #ruby-lang
<darix> ledestin: wrong. the binary protocol is supposed to support it, and dalli is using that protocol.
<yorickpeterse> Lemon, y u such a bish
<ledestin> darix: I'm using memcached now that dally is so slow
<yorickpeterse> tempted to just use Bison because fuck this shit
<ledestin> darix: I'll try
<yorickpeterse> functions without header definitions? YEAH GREAT IDEA
muigrolah is now known as halorgium
grandy has quit [Ping timeout: 258 seconds]
nmeum has quit [Ping timeout: 258 seconds]
apeiros has quit [Ping timeout: 245 seconds]
tjaco has joined #ruby-lang
<darix> yorickpeterse: why do you use lemon in first place?:p
madb055 has joined #ruby-lang
mossplix has quit [Ping timeout: 260 seconds]
<yorickpeterse> Because the syntax is less retarded than Bison's
<judofyr> charliesome: what are you up to now? working on something cool? :)
<charliesome> judofyr: still toiling away on slash
<charliesome> starting to get a couple of people interested
<judofyr> charliesome: interesting
<charliesome> now i need to do all the boring parts of writing a language, like doing docs and shit like that :(
<judofyr> charliesome: I've never really seen the point of basing a language fully on web-stuff (e.g. PHP)
<judofyr> seems useful for small scale
<charliesome> yeah that's the point
<charliesome> currently if you want a small scale thing
<charliesome> where you don't want to have to mess around with app servers or anything
<charliesome> you either use php, or cgi scripts
<charliesome> and cgi sucks
<charliesome> and so does php
torrieri has joined #ruby-lang
<darix> charliesome: couldnt you just write a fastcgi that basically handles .rb files like .php
<darix> shouldnt take too many lines of code
<charliesome> darix: you could, but i also want something that can start up again on each request
<darix> well how much the fastcgi app caches/optimizes ... i would expect in normal mode it would just throw away everything as php does
maxmanders has joined #ruby-lang
torrieri has quit [Ping timeout: 240 seconds]
<whitequark> darix: lemon also features far better memory management.
<whitequark> and generally saner than bison
<judofyr> whitequark: I agree: it was saner to add lineno to all AST-nodes and handle the optimization in the backend :)
dustint has joined #ruby-lang
<whitequark> judofyr: ;)
cored has quit [Ping timeout: 252 seconds]
cored has joined #ruby-lang
smt has left #ruby-lang [#ruby-lang]
Reville has joined #ruby-lang
xcombelle has joined #ruby-lang
jonuts has joined #ruby-lang
krohrbaugh has joined #ruby-lang
thufir_ has quit [Quit: Leaving.]
retro|cz has quit [Ping timeout: 264 seconds]
tbuehlmann has quit [Ping timeout: 272 seconds]
nertzy has joined #ruby-lang
tbuehlmann has joined #ruby-lang
oneirophren has quit [Ping timeout: 256 seconds]
krohrbaugh has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
codejury has joined #ruby-lang
sailias has joined #ruby-lang
workmad3 has quit [Ping timeout: 272 seconds]
m4t- has quit [Ping timeout: 245 seconds]
torrieri has joined #ruby-lang
m4t- has joined #ruby-lang
maxmanders has joined #ruby-lang
benlovell has quit [Quit: Computer has gone to sleep.]
<whitequark> judofyr: btw... any luck with parser?
torrieri has quit [Ping timeout: 264 seconds]
MrYale has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
tonni has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
<yorickpeterse> ooh, there's bison++
benlovell has joined #ruby-lang
<whitequark> yorickpeterse: y u need bison?
<yorickpeterse> hm, but last commit was in 2011
<yorickpeterse> whitequark: Lemon's generated code is a bit meh
<whitequark> yorickpeterse: as in?
<yorickpeterse> for example, the header it generates doesn't contain the function declarations
<yorickpeterse> So now my compiler is bitching
<whitequark> yorickpeterse: patch lemon?
<yorickpeterse> ...
<yorickpeterse> Hm, I wonder what would take more time
<whitequark> what? it's not exactly hard
jg has joined #ruby-lang
<yorickpeterse> also, I'm working around it using ye olde cat and an extra file
<whitequark> yorickpeterse: remind me please. what language are you working for? judofyr writes something templating-related, charliesome writes slash, whatever it is
Reville has quit [Quit: Reville]
<yorickpeterse> I'm just messing around with my own brogramming language
<yorickpeterse> I needed an excuse to mess with Ragel, C/C++, Lemon, etc
<whitequark> ah
* whitequark giggles
<whitequark> slash's internal architecture seems to be inspired by MRI
gnufied has joined #ruby-lang
sailias has quit [Quit: Leaving.]
<charliesome> lolz
<charliesome> what of it m8
<charliesome> MRI with a worse GC
MrYale has quit [Quit: MrYale]
mytrile has quit [Remote host closed the connection]
<whitequark> charliesome: I was tempted to use "brain-damaged" instead of "inspired" :p
jg has quit [Ping timeout: 264 seconds]
flexd has quit [Ping timeout: 258 seconds]
<whitequark> to be serious, I think it suits the goal of the language fine. you don't need anything fancier for the use case.
<charliesome> yeah thats my thinking
<charliesome> if i have something simpler thats easier to work with
<judofyr> whitequark: I'm interested though: how would you level-up the implementation? :)
jxpx777 has quit [Quit: Leaving...]
<charliesome> the gc doesn't need to be fancy because if it runs more than once during a request then wat
<whitequark> judofyr: I won't, see above
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
torrieri has joined #ruby-lang
<whitequark> man. rubinius is slow. 1.8.7 is 2s, rubinius-2.0.0-weekly20130412-d19 is 71s
<whitequark> on my testsuite
<tsion> What part is slowing it down?
<dbussink> whitequark: sounds like something fixable
<dbussink> whitequark: can you open an issue with a repro?
<judofyr> sweet, tmm1 has started committing: https://github.com/ruby/ruby/commits?author=tmm1
<whitequark> dbussink: sure. I'll try to write a representative benchmark
tonni has joined #ruby-lang
KM has joined #ruby-lang
Guest88304 has quit [Read error: Connection reset by peer]
KM is now known as Guest98572
vlad_starkov has joined #ruby-lang
flexd has joined #ruby-lang
<yorickpeterse> > The gram.h file generated by Lemon contains #define statements that map symbolic terminal symbol names into appropriate integer values. (A value of 0 for the second argument is a special flag to the parser to indicate that the end of input has been reached.)
<judofyr> maybe there's still hope for MRI
<yorickpeterse> THERE'S NO GRAM.H FILE
torrieri has quit [Ping timeout: 264 seconds]
<whitequark> judofyr: MRI is with us to stay for decades.
<judofyr> whitequark: yeah. although everybody likes to hate on MRI, it's often good enough
<judofyr> whitequark: I mean, I love JRuby whenever I need to interact with the Java-world (or want proper threading), but for most of the time MRI just works fine
<whitequark> judofyr: oh, this is one common fallacy
<judofyr> whitequark: hm. how?
GarethAdams has joined #ruby-lang
<whitequark> comparing languages or implementations does not make sense for common tasks. another way: if you can write X in Y, and X is good, that doesn't say anything about Y, except that Y is (probably) turing-complete.
<whitequark> a corollary of that is how fib() benchmarks, and most benchmarks in general, have very little sense when applied to real-world tasks
workmad3 has joined #ruby-lang
noop has quit [Remote host closed the connection]
<whitequark> it somewhat makes sense to compare two language implementations implementing at least the same set of features, on the *same* code performing in the *same* environment
<judofyr> whitequark: sure, I just feel like there's a JRuby/rbx-crowd that thinks MRI is fundamentally broken and is just waiting for "the rest" to realize it. (not saying that the jruby/rbx guys themselves think that)
<whitequark> s,fundamentally broken,performs well on a less broad set of tasks, and they're right
<judofyr> that is true
Criztian has quit [Remote host closed the connection]
<whitequark> I think part of the issue is that languages/implementations are very abstract by their nature. how do you compare almost anything else? by weight, color, amount of inflicting pain, rudeness, etc, etc. these are very shallow and simple metrics
<judofyr> I feel there's the same sentiment with Node.js: people who think callback-driven style sucks and is waiting for the rest to realize it
<charliesome> nobody tell joedamato that whitequark said mri isn't fundamentally broken
<judofyr> and that in itself is okay
<whitequark> judofyr: disagree about nodejs
<judofyr> :D
<whitequark> there are at least two facets. one can be ignored, the other cannot be
tonni has quit [Remote host closed the connection]
<whitequark> the one that can be ignored is the fundamental single-threadedness. I mean people write websites with PHP, it *clearly* doesn't matter that much
mbj has joined #ruby-lang
<whitequark> the one that cannot be is `errback'. when was the last time you wrote it correctly? then, please count the ratio of correctly placed and tested errbacks : missed errbacks.
<whitequark> the difference between them is that first is a technical issue, and the second is a human interaction issue, at their core
<whitequark> (not to say that you can combine callback-driven style and threads. just not on js)
plurt has joined #ruby-lang
<whitequark> *can't.
tonni has joined #ruby-lang
apeiros has joined #ruby-lang
tonni has quit [Remote host closed the connection]
<whitequark> there's also the terminology issue. when something which is intrinsically not ACID comes and calls itself a database
retro|cz has joined #ruby-lang
<whitequark> should we call both C++ and Ruby just "programming languages" at all?
<whitequark> the term is so broad it doesn't exactly make sense anymore, don't you think so?
<whitequark> you convey very little, if any, information when you say "X is a programming language."
krohrbaugh has joined #ruby-lang
<apeiros> whitequark: why not? it's a good distinction from e.g. natural and structural languages
<apeiros> or what would you call them?
* apeiros maybe missed too much of the backlog :-/
<whitequark> apeiros: irclog.whitequark.org
<apeiros> was already going there :D
krz has quit [Quit: krz]
<judofyr> btw, if someone need some chill background music/sounds: Thallus just released a new album http://ritmosportivo.bandcamp.com/album/truly-yours
<ddfreyne> the irclog gives a really nice interface
krohrbaugh has quit [Ping timeout: 264 seconds]
<whitequark> ddfreyne: :D
<whitequark> judofyr: also re crowd
<whitequark> I think there are at least two contexts. If you're from the "get shit done" camp, you can take right about any language for which you can hire a programmer, and will still be able to do that 5y later.
<whitequark> if you're from "let's design better languages/impls" camp, then MRI is indeed fundamentally broken
<whitequark> it's just that fundamentals are different :)
<ddfreyne> I certainly consider myself to be in the latter camp
<ddfreyne> It’s also the reason why I would like to build my own programming language, but… it’s hard :(
torrieri has joined #ruby-lang
<whitequark> it's more like distinct universes than camps... judging by, well, the internet
<whitequark> which is sad.
scampbell has joined #ruby-lang
carloslopes has joined #ruby-lang
<judofyr> whitequark: we need more people in the last camp who can explain the advantages to the people in the first camp. like, show *actual* before/after code.
torrieri has quit [Ping timeout: 248 seconds]
<ddfreyne> I believe that languages/practices in the former camp *can* get you up and running a lot faster than languages/practices in the latter camp. It’s trivial to build a simple working web app in PHP
alessio_rocco has quit [Ping timeout: 245 seconds]
<ddfreyne> That doesn’t mean it’s secure, maintainable, fast, … etc though. Usually it really isn’t. That gap needs to be bridged, but that’s really hard
nyuszika7h has joined #ruby-lang
<whitequark> ddfreyne: maintainable and fast are "opinionated". secure, however, isn't.
<whitequark> I am going to say that any web app which is not secure just should not exist.
arsemyonov has quit [Read error: Connection reset by peer]
<whitequark> I wonder how much of them that excludes.
<ddfreyne> whitequark: maintainability especially is really important for long-lived apps
mistym has joined #ruby-lang
<whitequark> ddfreyne: you *can* maintain 100KLOC of complicated perl code.
<whitequark> is it "maintainable"? your CFO decides.
<whitequark> not CTO.
<whitequark> however, your webapp either will happily --;DROP TABLE students;--Bob or not.
<ddfreyne> yeah.
carloslopes has quit [Remote host closed the connection]
skade has joined #ruby-lang
carloslopes has joined #ruby-lang
<judofyr> and now to something completely different: why does GitHub place all directories are the top? http://c.judofyr.net/patch/github-browser-sorting/
<ddfreyne> I find it very interesting how many project suffer from maintainability issues though
xcombelle has quit [Remote host closed the connection]
<ddfreyne> I have to admit that I’m looking for “magic recipes” that can be used to build a long-lasting architecture
<ddfreyne> it’s one of my main interests at the moment…
<whitequark> ddfreyne: I think it helps to watch the history of high-quality opensource projects
<gnufied> and what happens to nanoc? now I know why it has been seg faulting during compile
<gnufied> :-)
<whitequark> ddfreyne: and main thing I've inferred from that is that the only constant is change.
<ddfreyne> whitequark: How do you mean, watch history? Not their commit history, surely? (Too many irrelevant changes)
<whitequark> ddfreyne: commit history inclusive.
<ddfreyne> gnufied: nokogiri + libxml2 2.9 segfaults :)
<whitequark> ddfreyne: watch for major refactorings, discussions of them in the ML, etc.
<ddfreyne> whitequark: Everything changes, which makes things really hard, but the art is, as I see it, to make change more controllable
<ddfreyne> Modularize as to minimize ripple effects through code, for instance
<whitequark> ddfreyne: yep. the architecture must be modular, *and* the contributors must not be afraid of change.
<whitequark> Linux has had plenty of ripple effects through code
<whitequark> they even have an automated tool to replace parts of C source with pattern-matching
<whitequark> Coccinelle or smth like that.
<judofyr> ddfreyne: I was trying to use nanoc in a library and was disappointed with how many things/paths were hardcoded
grandy has joined #ruby-lang
<ddfreyne> judofyr: Yeah, it’s really not ideal… pretty much because of historical reasons
mistym has quit [Remote host closed the connection]
<ddfreyne> One of the *major* changes in nanoc 4.x, architecture-wise, is to eliminate global state entirely. There is a *lot* of hidden global state (classes with class vars, filesystem access, ENV access, …)
nmeum has joined #ruby-lang
<ddfreyne> So I’m pushing all that stuff to the edge of nanoc so it can be plugged in easily
<whitequark> judofyr: ok... I think I'm going to finish the ruby20.y today
<whitequark> got some time for it
<ddfreyne> judofyr: It’s great when used standalone, but in a library it isn’t (yet)
georgedrummond has joined #ruby-lang
georgedrummond has quit [Remote host closed the connection]
<ddfreyne> judofyr: what were you planning on building btw?
georgedrummond has joined #ruby-lang
georgedrummond has left #ruby-lang [#ruby-lang]
arsemyonov has joined #ruby-lang
discopig has joined #ruby-lang
<ddfreyne> judofyr: One thing that is scheduled is to build a GUI on top of nanoc, but for that to work nicely, nanoc needs to library-ized
tbuehlmann has quit [Quit: Quitting.]
postmodern has quit [Quit: Leaving]
<ddfreyne> I only have so much time to work on that, though… :)
<judofyr> whitequark: yeah, please do. I don't think I have much time today.
<judofyr> ddfreyne: I just wanted tool to take a bunch of .md-files and generate some .html-files
<tsion> ddfreyne: How does nanoc compare to jekyll?
<judofyr> ddfreyne: kinda like what `rdoc` (I was going to use it for documentation)
<tsion> I just looked it up, I hadn't heard of it before.
<ddfreyne> tsion: jekyll is a tool for simple sites and blogs, while nanoc is a lot more powerful
<ddfreyne> judofyr: an idea I would like to work towards is to let nanoc act quite similar to make/rake, which would make your .md-to-.html quite easy
swygue has quit [Read error: Connection reset by peer]
mytrile has joined #ruby-lang
<ddfreyne> judofyr: I am also dropping the concept of item identifiers and letting them be filenames instead, so you can do compile '/about.md' ; filter :erb ; write '/about.html' ; end
<ddfreyne> That’s not yet implemented though
apeiros has quit [Ping timeout: 256 seconds]
jg has joined #ruby-lang
breakingthings has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
swygue has joined #ruby-lang
<ddfreyne> I’ve already deleted a lot of code. Feels great :D
torrieri has joined #ruby-lang
<darix> judofyr: you can even do a nice image gallery with nanoc
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
dr_bob has joined #ruby-lang
noop has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
skade has quit [Read error: Operation timed out]
torrieri has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
m4t- has quit [Ping timeout: 245 seconds]
<whitequark> gui?
<whitequark> who needs guis
idkazuma has joined #ruby-lang
<ddfreyne> whitequark: Quite a few people have come to me and asked whether nanoc had a GUI, because their companies’ PR people don’t know how to use a terminal ;)
cored has quit [Ping timeout: 256 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
kain has joined #ruby-lang
m4t- has joined #ruby-lang
<whitequark> ddfreyne: makes sense
<whitequark> however that's going to be a PITA for you
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
<whitequark> I'm not aware of a nice way to make GUIs with ruby.
<injekt> pfft
<ddfreyne> whitequark: Web GUI probably
<ddfreyne> Not ideal, but the best we can do while remaining cross-platform
wmoxam has joined #ruby-lang
<whitequark> not counts as nice but yeah I see the point
<whitequark> not sure if the browser is a better common denominator than tcl/tk
vlad_starkov has quit [Remote host closed the connection]
sailias has joined #ruby-lang
skade has quit [Read error: Operation timed out]
<darix> whitequark: tcl/tk and nice gui
<darix> i dont know
<whitequark> darix: it's ugly because motif
ykk` has joined #ruby-lang
ykk` has quit [Remote host closed the connection]
<injekt> haha tcl/tk and 'nice gui' should not be used in the same sentence
<darix> injekt: ^5
twintail has joined #ruby-lang
<whitequark> however applying a nicer theme while keeping the same api is not a significant effort by any measure
<injekt> unless it's, "you can possible get a nice gui with tcl/tk"
<darix> whitequark: WX might be a decent start or even GTK/Qt directly
<injekt> can't* dammit
krohrbaugh has joined #ruby-lang
<whitequark> darix: Gtk/Qt don't work with Ruby
<darix> whitequark: why not?
<darix> as far as i know there are bindings
<whitequark> you kinda have bindings for both of them but it's a nightmare to get up and running even on the *nix
<whitequark> whereas tcl/tk mostly just works
<whitequark> I don't understand why do I have to explain this at all...
<darix> whitequark: because not everyone is as wise as you are.
<darix> and they wont catch up if you wont explain things.
thone has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
thone_ has quit [Ping timeout: 245 seconds]
m4t- has quit [Ping timeout: 245 seconds]
m4t- has joined #ruby-lang
bin7me has quit [Ping timeout: 264 seconds]
<whitequark> darix: I'm talking about the tcl/tk and themes here.
<whitequark> I think I had a related link somewhere.
<whitequark> you can probably do better
<whitequark> like this: http://wiki.tcl.tk/37257
<whitequark> :p
<whitequark> darix: they?
<darix> i wouldnt call either of those screenshots nice
dhruvasagar has quit [Ping timeout: 252 seconds]
cored has quit [Ping timeout: 256 seconds]
<whitequark> darix: 'clam' is okay-ish
ykk` has joined #ruby-lang
<whitequark> an application looking bland is far, far better than an application which randomly segfaults (ruby-gtk2), would not compile without jumping through hoops (ruby-qt and variants), and won't work on windows unless you try really damn hard (both).
<whitequark> ruby-gtk2 might have advanced since the time I've used it. but I don't find it very likely.
<whitequark> ruby-qt was still the same half a year ago.
mbj has quit [Read error: No route to host]
<ykk`> ooo had to install gtk2 to play a mud recently and it was hell to install
<whitequark> yeah...
<whitequark> ykk`: hm what client was that? I think I wrote a mud client with ruby-gtk2
torrieri has joined #ruby-lang
<whitequark> but it was a loooong time ago
<ykk`> lich
<ykk`> for gemstone
<whitequark> oh.
<ykk`> a simutronics game
<ykk`> what mud did you play
<whitequark> ykk`: a russian one
<ykk`> oh.
<whitequark> a very far descendant of circlemud
<whitequark> I think they rewrote it completely several times
<whitequark> oh wow, it's still alive. someone plays muds in 2013?
<ykk`> which one? mine is still around :P though not many play
<whitequark> ykk`: mud.ru
<ykk`> its just fun to write ruby scripts and watch your character kill things.. or rather.. read about your character killing things
<whitequark> heh
<whitequark> it's open-source now, interesting: https://bitbucket.org/Posvist/mud/
<whitequark> it's... C++ now? huh.
<whitequark> ddfreyne: hm. what if you select aqua?
torrieri has quit [Ping timeout: 245 seconds]
<ddfreyne> whitequark: The screenshots are a thousand years old. Haven’t tried.
spuk has quit [Read error: Operation timed out]
<ykk`> see ya guys later
ykk` has quit [Quit: ykk`]
vbatts|work has joined #ruby-lang
<whitequark> ddfreyne: it does seem to me that it works ok with aqua
<ddfreyne> whitequark: maybe
chrismar035 has joined #ruby-lang
chrismar035 has quit [Client Quit]
dkannan has quit [Quit: dkannan]
mistym has quit [Remote host closed the connection]
andersbr has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
synthetix has joined #ruby-lang
tbuehlmann has joined #ruby-lang
arsemyonov has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
alessio_rocco has joined #ruby-lang
pkondzior___ has joined #ruby-lang
outoftime has joined #ruby-lang
twintail has quit [Quit: Leaving.]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
arsemyonov has joined #ruby-lang
TvL2386 has joined #ruby-lang
bin7me has joined #ruby-lang
jonuts has quit [Ping timeout: 264 seconds]
jbsan has quit [Quit: JB.. OUT!]
divout has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
Criztian has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
andersbr has quit [Quit: andersbr]
robbyoconnor has quit [Ping timeout: 248 seconds]
ubersapiens has quit [Ping timeout: 245 seconds]
krohrbaugh has joined #ruby-lang
mistym_ has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
divout has joined #ruby-lang
GarethAdams has quit [Quit: Linkinus - http://linkinus.com]
vlad_starkov has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
kgrz has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
headius has joined #ruby-lang
jacktrick has joined #ruby-lang
torrieri has joined #ruby-lang
realDAB has joined #ruby-lang
TheNotary has quit [Ping timeout: 252 seconds]
bin7me has quit [Quit: Verlassend]
cored has quit [Ping timeout: 256 seconds]
torrieri has quit [Ping timeout: 256 seconds]
gnufied has quit [Quit: Leaving.]
tdy_ has quit [Ping timeout: 252 seconds]
tdy_ has joined #ruby-lang
swav has joined #ruby-lang
lguardiola has joined #ruby-lang
wesside has joined #ruby-lang
erpuds has joined #ruby-lang
GeissT has quit [Quit: MillBroChat AdIRC User]
enebo has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
TheNotary has joined #ruby-lang
|Vargas| has quit [Quit: ...]
Asher has quit [Quit: Leaving.]
athaeryn has joined #ruby-lang
dr_bob has quit [Ping timeout: 272 seconds]
alessio_rocco has quit [Remote host closed the connection]
<athaeryn> Question: I'm trying to load a file with YAML.load_file. The file is in ~/some_directory but I'm running the Ruby file as an executable in ~/bin, so it tries to load the file from ~/bin, where it doesn't exist. Can I load the file without hard-coding the absolute path?
<athaeryn> Happy to provide whatever parts of the code I'm using as necessary.
gnufied has joined #ruby-lang
solars has quit [Read error: Operation timed out]
<mistym> athaeryn: Not sure what you mean exactly. You want to do it relative to your current location, e.g. "../some_directory/foo.yaml"?
<athaeryn> mistym: Right, but the file is being run from ~/bin so it's looking there.
<mistym> athaeryn: Right. You can supply the path along with the filename, I mean, if the location of that other directory relative to ~/bin is always going to be the same
<athaeryn> mistym: Right, but I don't know if it always will be the same, so I was just wondering if you can get the path of the actual file that's being run. It's symlinked into ~/bin, that's probably important info.
<athaeryn> mistym: the executable is symlinked, not the yaml file.
<mistym> athaeryn: __FILE__ lets you access the path of the script itself.
<athaeryn> mistym: that was the first thing I tried, but it's returning ~/bin
<mistym> Well, it'd be ~/bin/script.rb specifically
<athaeryn> mistym: Right.
<mistym> File.join(__FILE__,'..','..','foo.yaml')
swav_ has joined #ruby-lang
<athaeryn> That's just going up two directories from ~/bin though, isn't it?
<r0bgleeson> mistym: ugly
<tsion> mistym: File.expand_path('../../foo.yaml', __FILE__)
judofyr has quit [Remote host closed the connection]
<r0bgleeson> athaeryn: File.expand_path "~/bin/bar"
swav has quit [Read error: Connection reset by peer]
<athaeryn> mistym: File.readlink(__FILE__) maybe?
<r0bgleeson> what's wrong with "~/bin" - ruby expands that for you.
<r0bgleeson> and the rest of the path is hardcoded anyway.
<athaeryn> I'm trying to find a file in the directory where the script in ~/bin is symlinked to.
vbatts|work has left #ruby-lang [#ruby-lang]
<athaeryn> I think File.readlink works
<tsion> athaeryn: File.expand_path will do File.readlink for you (even more than one level of symlinks).
<r0bgleeson> never heard of that method before
<mistym> tsion: True! Hardcoding '/' won't work for Windows though, no? (Not that that matters for most people)
<tsion> I'm not sure.
<tsion> Does anyone have windows handy to test it on?
<athaeryn> File.expand_path is giving me /Users/manderson/bin/vimanage, File.readlink is giving me /Users/manderson/git/dotfiles/vimanage (which is what I want)
Luwe has joined #ruby-lang
<r0bgleeson> I don't have windows. OSX here
<mistym> tsion: Huh, looks like '/' does work in Windows. The other way around ('\' on Unix) doesn't work.
<tsion> mistym: cool
<injekt> yeah / works on windows always has
torrieri has joined #ruby-lang
<mistym> Oh, I guess '/' is always the file sep on Windows? Dir['c:\foo\*'] doesn't work in Windows
<injekt> or not always apparently
<injekt> mistym: no
<injekt> which is why you should probably use File.join because it uses File::SEPARATOR
<tsion> athaeryn: Hmm... I was sure File.expand_path did that, but I guess I was confused.
<tsion> Quite confused, because I remember testing that and realizing I didn't need to use File.readlink.
<athaeryn> tsion: Hmm... interesting!
rippa has joined #ruby-lang
GarethAdams has joined #ruby-lang
torrieri has quit [Ping timeout: 245 seconds]
lguardiola has quit [Quit: Leaving]
<mistym> injekt: Good to know. And yeah, that's why I suggested File.join
sirfilip has joined #ruby-lang
<sirfilip> morning
<injekt> mistym: oh sorry I yeah I didn't read back enough
TheNotary has quit [Quit: Leaving]
Asher has joined #ruby-lang
discopig has quit [Quit: discopig]
nkr has quit [Ping timeout: 252 seconds]
benlovell has quit [Quit: Computer has gone to sleep.]
wallclockbuilder has joined #ruby-lang
lguardiola has joined #ruby-lang
dhruvasagar has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
dustint has quit [Ping timeout: 255 seconds]
apeiros has joined #ruby-lang
oneirophren has joined #ruby-lang
bothra has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 260 seconds]
wallclockbuilder has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
torrieri has joined #ruby-lang
realDAB has quit [Quit: realDAB]
joast has quit [Quit: Leaving.]
torrieri has quit [Ping timeout: 252 seconds]
* whitequark wonders
<whitequark> I can envision a few new syntactic forms for Ruby
<whitequark> def :"#{attr}=", for example
ubersapiens has joined #ruby-lang
<whitequark> or ... (plain ...), which expands to "raise NotImplementedError"
<whitequark> also ... "will be added in 10.2" -> raise NotImplementedError, "will be added in 10.2"
<whitequark> not sure if any of the above is a good idea though
<whitequark> the former could add some sense to the nested def thingy
joast has joined #ruby-lang
jacktrick has quit [Quit: Leaving]
dhruvasagar has joined #ruby-lang
<GarethAdams> whitequark: three dots, or one ellipsis?
<GarethAdams> ... …
<ubersapiens> hey guys can i ask a ruby/rails database question here
<GarethAdams> ubersapiens: sure, but #rubyonrails is a more focused channel
<whitequark> GarethAdams: three dots. ellipsis would require unicode, and I don't want that.
<ubersapiens> im in week 4 of a web dev bootcamp...for my first project i will build a web app that uses a google maps api to plot football pitches around london...users will register/log in...they will have the maps on the main page (plug in their location to get nearby terrains) and tabs with a profile, add a football pitch, and an about page...my question is...i have been talk postgresql only...but i think mongo would be better...ideas
<whitequark> ubersapiens: if you have a plain old webapp, use SQL.
<whitequark> if you *know* why SQL won't work for you, use something else.
krohrbaugh has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 276 seconds]
pskosinski has joined #ruby-lang
krohrbaugh has quit [Client Quit]
krohrbaugh has joined #ruby-lang
ubersapiens has quit [Ping timeout: 245 seconds]
kgrz has quit [Ping timeout: 260 seconds]
vardaman has joined #ruby-lang
__butch__ has joined #ruby-lang
io_syl has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
Luwe has quit [Ping timeout: 256 seconds]
twintail has joined #ruby-lang
sirfilip has left #ruby-lang [#ruby-lang]
sush24 has quit [Quit: This computer has gone to sleep]
mytrile has joined #ruby-lang
dhruvasagar has joined #ruby-lang
carloslopes has joined #ruby-lang
ubersapiens has joined #ruby-lang
cirenyc has quit [Ping timeout: 248 seconds]
torrieri has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mbj has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 276 seconds]
torrieri has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 246 seconds]
mbj_ has joined #ruby-lang
swav_ has quit [Remote host closed the connection]
mbj_ has quit [Client Quit]
Gaelan has joined #ruby-lang
<injekt> yeah, it's all about having sold reasoning
ubersapiens has quit [Ping timeout: 245 seconds]
<injekt> you think mongo would be better? why? tell your boss that
robbyoconnor has joined #ruby-lang
solars has joined #ruby-lang
dagobah has quit [Remote host closed the connection]
andersbr has joined #ruby-lang
<whitequark> injekt: hm? sold reasoning?
<firefux> its webscale
* whitequark slaps firefux around a bit with a large trout
vlad_starkov has quit [Remote host closed the connection]
mytrile has quit [Remote host closed the connection]
Luwe has joined #ruby-lang
r0bby has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
r0bby has quit [Read error: Connection reset by peer]
* zzak hopes to catch some trout after work tonight :D
r0bby_ has joined #ruby-lang
twintail has quit [Quit: Leaving.]
oneirophren has quit [Ping timeout: 256 seconds]
tenderlove has joined #ruby-lang
Luwe has quit [Ping timeout: 246 seconds]
tylersmith has joined #ruby-lang
Asher has quit [Quit: Leaving.]
gix has joined #ruby-lang
Uranio has joined #ruby-lang
sush24 has joined #ruby-lang
tomzx_mac has joined #ruby-lang
torrieri has joined #ruby-lang
arsemyonov has quit [Read error: Connection reset by peer]
breakingthings has quit []
r0bby_ has quit [Ping timeout: 245 seconds]
andredublin has joined #ruby-lang
<r0bgleeson> postgres is awesom
<r0bgleeson> +e
torrieri has quit [Ping timeout: 248 seconds]
Gaelan has quit [Remote host closed the connection]
benwoody has joined #ruby-lang
andredublin has left #ruby-lang [#ruby-lang]
bzalasky has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
bzalasky has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
madb055 has quit [Ping timeout: 272 seconds]
tdy_ has quit [Quit: WeeChat 0.4.0]
andredublin has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
carloslopes has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby-lang
torrieri has joined #ruby-lang
tdy_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
quazimodo has joined #ruby-lang
brianpWins has joined #ruby-lang
rsl has quit [Ping timeout: 245 seconds]
yxhuvud has joined #ruby-lang
oneirophren has joined #ruby-lang
yxhuvud2 has quit [Ping timeout: 256 seconds]
<whitequark> yay! parser supports 2.0 now.
<tsion> whitequark: nice work
<whitequark> thanks
rsl has joined #ruby-lang
tjaco has quit [Ping timeout: 264 seconds]
<whitequark> >> def foo(**q) q; end; foo(bar: 1)
<eval-in> whitequark => {:bar=>1} (http://eval.in/16677)
<whitequark> >> def foo(**) end; foo(bar: 1)
<eval-in> whitequark => /tmp/execpad-51a576c732ca/source-51a576c732ca:2:in `<main>': unknown keyword: bar (ArgumentError) (http://eval.in/16678)
<whitequark> lolrubby
mbj has quit [Read error: Connection reset by peer]
<tsion> whitequark: Is there any kind of sense behind that? Why is def foo(**) even legal syntax?
<whitequark> tsion: y u asking me?
<whitequark> ruby commit logs say something like '** is accepted but semantics is undefined yet'
<tsion> Handy.
<whitequark> heh
jonahR has joined #ruby-lang
dc5ala has joined #ruby-lang
mrsolo has joined #ruby-lang
<tsion> whitequark: Hmm, apparently there's bare * too. I didn't know about that.
<whitequark> tsion: yeah
<whitequark> "accept stuff and ignore it"
<whitequark> def foo(*); puts "foo called"; super; end
JohnBat26 has quit [Ping timeout: 276 seconds]
carloslopes has quit [Ping timeout: 245 seconds]
idkazuma has quit [Remote host closed the connection]
dustint has joined #ruby-lang
sepp2k has joined #ruby-lang
Gaelan has joined #ruby-lang
dhruvasagar has joined #ruby-lang
oneirophren has quit [Ping timeout: 256 seconds]
Gaelan has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby-lang
erpuds has quit [Quit: erpuds]
benanne has joined #ruby-lang
_carloslopes has joined #ruby-lang
workmad3 has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
retro|cz has quit [Ping timeout: 260 seconds]
carloslopes has quit [Ping timeout: 245 seconds]
<r0bgleeson> whitequark: congrats on the release.
<whitequark> r0bgleeson: thanks
srbaker has quit [Quit: Computer has gone to sleep.]
rippa has quit [Ping timeout: 240 seconds]
jonahR has left #ruby-lang [#ruby-lang]
rippa has joined #ruby-lang
symm- has joined #ruby-lang
srbaker has joined #ruby-lang
_carloslopes has quit [Ping timeout: 256 seconds]
gnufied has quit [Quit: Leaving.]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
srbaker has quit [Client Quit]
srbaker has joined #ruby-lang
mistym is now known as mistym_comix
Uranio has quit [Quit: while you reading this, a kitty dies]
vlad_starkov has joined #ruby-lang
Gaelan has joined #ruby-lang
andredublin has quit [Remote host closed the connection]
jg has quit [Ping timeout: 245 seconds]
Gaelan has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 245 seconds]
andredublin has joined #ruby-lang
workmad3 has quit [Ping timeout: 246 seconds]
torrieri has joined #ruby-lang
tesseract has joined #ruby-lang
baba has quit [Ping timeout: 240 seconds]
megha has joined #ruby-lang
thepugautomatic has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
torrieri has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
andersbr has quit [Quit: andersbr]
dankest has joined #ruby-lang
ternit has joined #ruby-lang
ternit has left #ruby-lang [#ruby-lang]
Etros has joined #ruby-lang
torrieri has joined #ruby-lang
carloslopes has joined #ruby-lang
torrieri has quit [Client Quit]
torrieri has joined #ruby-lang
thepugautomatic has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
Gaelan has quit [Ping timeout: 245 seconds]
_carloslopes has joined #ruby-lang
carloslopes has quit [Read error: Connection reset by peer]
Criztian has joined #ruby-lang
benanne has quit [Quit: kbai]
dc5ala has quit [Quit: Ex-Chat]
Etros has quit []
judofyr has joined #ruby-lang
synthetix has quit [Read error: Connection reset by peer]
oneirophren has joined #ruby-lang
tjaco has joined #ruby-lang
imajes has quit [Excess Flood]
<judofyr> whitequark: here's how the backend ended up looking: https://github.com/judofyr/mockle.rb/blob/master/lib/mockle/backend.rb
imajes has joined #ruby-lang
<whitequark> judofyr: looks good
musl has quit [Quit: WeeChat 0.4.0]
<judofyr> whitequark: no error recovery from weird lineno though. and here's the parser: https://github.com/judofyr/mockle.rb/blob/master/lib/mockle/parser.y
musl has joined #ruby-lang
oneirophren has quit [Ping timeout: 256 seconds]
musl has quit [Client Quit]
<whitequark> statement I WANT TO WRITE EVERYTHING IN CAPS
<whitequark> (sorry)
<judofyr> whitequark: :D
vardaman has quit [Remote host closed the connection]
<whitequark> judofyr: I guess you don't care about perf hit from recreating all the nodes twice?
<whitequark> first without lineno, second with it
<whitequark> it won't be big though.
<judofyr> whitequark: correct. I actually had this earlier: https://github.com/judofyr/mockle.rb/commit/0627afa16fabd2fdb5b88b8e2d2ab62071229db9
<whitequark> mmm
<whitequark> yeah
<whitequark> overall, looks good either :)
<whitequark> also I believe you can use '(' in racc
<judofyr> hm? where have I used that?
<whitequark> judofyr: you didn't
<whitequark> you wrote LPAREN
<judofyr> oh
<whitequark> which is ugly
JohnBat26 has joined #ruby-lang
<whitequark> I've no idea why zenspider replaced all the ',' with tCOMMAs and so on in parse.y
agile has joined #ruby-lang
sush24 has quit [Ping timeout: 255 seconds]
Gaelan has joined #ruby-lang
sush24 has joined #ruby-lang
Gaelan has quit [Ping timeout: 264 seconds]
jg has joined #ruby-lang
Asher has joined #ruby-lang
MaddinXx has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
divout has quit [Quit: Leaving.]
tenderlove has quit [Remote host closed the connection]
athaeryn has left #ruby-lang [#ruby-lang]
Gaelan has joined #ruby-lang
mistym_comix is now known as mistym
torrieri has quit [Quit: Leaving...]
faramir has joined #ruby-lang
forrest has joined #ruby-lang
maxmanders has joined #ruby-lang
tonni has joined #ruby-lang
swav has joined #ruby-lang
dankest has quit [Quit: Leaving...]
jg has quit [Ping timeout: 245 seconds]
malev has joined #ruby-lang
TheNotary has joined #ruby-lang
kgrz has quit [Quit: Computer has gone to sleep.]
mytrile has joined #ruby-lang
shtirlic has quit [Read error: Operation timed out]
shtirlic has joined #ruby-lang
mbj has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
musl has joined #ruby-lang
torrieri has joined #ruby-lang
krohrbaugh has joined #ruby-lang
madb055 has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
andersbr has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
mytrile has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
krohrbaugh has quit [Client Quit]
judofyr has quit [Read error: No route to host]
krohrbaugh has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
swav has quit [Remote host closed the connection]
krohrbaugh1 has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 252 seconds]
rippa has quit [Ping timeout: 240 seconds]
yxhuvud has quit [Quit: Nettalk6 - www.ntalk.de]
solars has joined #ruby-lang
yalue has quit [Read error: Connection reset by peer]
mbj_ has joined #ruby-lang
mbj has quit [Ping timeout: 264 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
srbaker has joined #ruby-lang
tenderlove has joined #ruby-lang
mbj_ is now known as mbj
skade has quit [Ping timeout: 256 seconds]
kgrz has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
skade has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby-lang
tjaco has quit [Read error: Operation timed out]
MaddinXx has quit [Remote host closed the connection]
swav has joined #ruby-lang
yfeldblum has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
vlad_starkov has quit [Remote host closed the connection]
andredublin has left #ruby-lang [#ruby-lang]
scampbell has quit [Remote host closed the connection]
swav has quit [Remote host closed the connection]
_carloslopes has quit [Remote host closed the connection]
mistym is now known as mistym_meeting
sailias has quit [Quit: Leaving.]
torrieri has quit [Quit: Leaving...]
s0ber has quit [Read error: Connection reset by peer]
kgrz has quit [Quit: Computer has gone to sleep.]
s0ber has joined #ruby-lang
mbj has quit [Ping timeout: 256 seconds]
stef_204 has joined #ruby-lang
krohrbaugh1 has quit [Quit: Leaving.]
Gaelan has quit [Remote host closed the connection]
kgrz has joined #ruby-lang
torrieri has joined #ruby-lang
swav has joined #ruby-lang
erpuds has joined #ruby-lang
athaeryn has joined #ruby-lang
pkrnj has joined #ruby-lang
<athaeryn> I was here earlier with a question that I thought was resolved, but it's still a problem. It could be that I'm just not going about things the right way.
<athaeryn> I like to make scripts in a ~/git/directory structure, and then symlink them in to ~/bin so they're in my path.
<athaeryn> But when I try to require a file that's in the directory of the script, it looks in ~/bin instead of ~/git/directory.
<athaeryn> Is the way I'm doing things weird or is there a way to fix this?
<whitequark> how do you require it?
<athaeryn> Just "require"
<whitequark> RUBY_VERSION?
<athaeryn> ruby-2.0.0-p0
<whitequark> how do you set up $LOAD_PATH?
<athaeryn> I don't? Lol.
<whitequark> well, '.' is not in $LOAD_PATH by default
<athaeryn> Okay.
<whitequark> so neither ~/bin nor ~/git/directory would be on the lookup path.
<athaeryn> Do I just have to use require_relative or is there a better/different way?
<whitequark> try require_relative?
tenderlove has quit [Remote host closed the connection]
<athaeryn> It's working.
<athaeryn> I had forgotten about it until just now. :P
<injekt> whitequark: oops I meant solid
<whitequark> injekt: I think I forgot any context.
wallerdev has joined #ruby-lang
<athaeryn> whitequark: so just using require_relative is the best way then?
<whitequark> athaeryn: why not?
<athaeryn> whitequark: just wasn't sure if that was the right way. I saw some code the other day where someone was doing something like: $:.unshift(File.dirname(__FILE__), '/../../src/')
<whitequark> athaeryn: require_relative is recent addition
<whitequark> 1.9.2 or 1.9.3 I think
<athaeryn> Ah.
<athaeryn> That code *was* two years old. :)
swav has quit [Remote host closed the connection]
<r0bgleeson> injekt: donno, from what I read it sounds like MongoDB isn't that great but for a few things it is
<injekt> r0bgleeson: not sure, I've usually avoided mongodb because of the crap that comes out of some people about it
<injekt> r0bgleeson: but I'm pretty much in love with postgres so maybe that helps too
<ryanf> some people still like to do the $:.unshift thing because it makes it easier to change the structure of your project without breaking things
<r0bgleeson> yeah I enjoy postgres
<ryanf> but for simple use cases, require_relative is probably fine
<ryanf> if you end up doing like require_relative "../../some_other_dir/file", that's not ideal
<athaeryn> ryanf: what exactly is the unshift thing doing? (not sure how to google '$:')
<r0bgleeson> athaeryn: $: == $LOAD_PATH
<athaeryn> r0bgleeson: ah, gotcha
<r0bgleeson> >> $: == $LOAD_PATH
<eval-in> r0bgleeson => true (http://eval.in/16681)
Gaelan has joined #ruby-lang
<r0bgleeson> is Ruby 1.0 available through that bot?
<whitequark> 10>> puts "foo"
<eval-in> whitequark => /tmp/execpad-e1d65f890943/source-e1d65f890943:2: NameError: undefined method `puts' for main(Object) (http://eval.in/16682)
<whitequark> yes.
<r0bgleeson> 10> $LOAD_PATH
<r0bgleeson> 10>> $LOAD_PATH
<eval-in> r0bgleeson => [".", "/execpad/interpreters/ruby-1.0-971225//lib/ruby", "/execpad/interpreters/ruby-1.0-971225//lib/ruby/i686-linux"] (http://eval.in/16683)
<r0bgleeson> 10>> $:
<eval-in> r0bgleeson => [".", "/execpad/interpreters/ruby-1.0-971225//lib/ruby", "/execpad/interpreters/ruby-1.0-971225//lib/ruby/i686-linux"] (http://eval.in/16684)
<athaeryn> So is the File.dirname(__FILE__) stuff necessary or can you just unshift '.' onto there
<ryanf> 10>> Object.constants.count
<eval-in> ryanf => /tmp/execpad-6273d08bdf86/source-6273d08bdf86:2: NameError: undefined method `constants' for Object(Class) (http://eval.in/16685)
<ryanf> haha
<athaeryn> ..apparently not so much..
Gaelan has quit [Remote host closed the connection]
<whitequark> ryanf: 1.0 basically had no introspection whatsoever
<athaeryn> The $:.unshift doesn't follow symlinks, thought, does it?
<ryanf> athaeryn: I'm pretty sure __FILE__ should give you the original path, not the symlinked one
<ryanf> so you don't really need to worry about symlinks
<ryanf> actually I think the symlink thing may have been a red herring in the first place
<ryanf> tbh
<athaeryn> If I do 'puts __FILE__' in the script and run it it prints out ~/bin
<athaeryn> so idk...
<athaeryn> and by '~/bin
<whitequark> >> foo=1; send :local_variables
<eval-in> whitequark => [:foo] (http://eval.in/16686)
<whitequark> >> foo=1; method(:local_variables).call
<eval-in> whitequark => [:foo] (http://eval.in/16687)
<athaeryn> I mean /Users/manderson/bin/script
skade has quit [Ping timeout: 256 seconds]
<injekt> >> foo=1; -> { local_variables }.()
<eval-in> injekt => [:foo] (http://eval.in/16688)
<injekt> >> RUBY_DESCRIPTION
<eval-in> injekt => "ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]" (http://eval.in/16689)
blacktulip has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 245 seconds]
<lianj> eval-in: fix your exceptions output shit
dhruvasagar has quit [Ping timeout: 264 seconds]
imajes has quit [Excess Flood]
beiter has quit [Quit: beiter]
srbaker has quit [Quit: Computer has gone to sleep.]
imajes has joined #ruby-lang
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
<athaeryn> Yeah, looking it to, __FILE__ will give you the directory of the symlink, not the linked file.
<athaeryn> So you'd have to do something like: FILE = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
<athaeryn> and then use FILE
dustint has quit [Ping timeout: 264 seconds]
<apeiros> you actually have to do that in a loop
<whitequark> File.readlink
<whitequark> oh wait
tenderlove has joined #ruby-lang
<athaeryn> apeiros: Right, but for this case it's not going to have more than one level
<injekt> >> require 'pathname'; Pathname.new(__FILE__).realpath
<eval-in> injekt => #<Pathname:/tmp/execpad-84ab233fe665/source-84ab233fe665> (http://eval.in/16690)
<athaeryn> injekt: beautiful
symm- has quit [Ping timeout: 245 seconds]
<injekt> I dont really like pathname, but I forgot why
<athaeryn> injekt: haha
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<spike|spiegel> because it's horribly slow?
<spike|spiegel> (or was)
<whitequark> wasn't it rewritten in C
<injekt> I dont think so
<injekt> ah maybe
<injekt> yeah
<injekt> the ruby source is a little odd
<whitequark> what in stdlib isn't
imajes has quit [Excess Flood]
<injekt> tru.dat
imajes has joined #ruby-lang
<injekt> debug.rb
<injekt> dat fat method
<spike|spiegel> gc everywhere!
tylersmith has quit [Quit: tylersmith]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
imajes has quit [Excess Flood]
krohrbaugh has joined #ruby-lang
imajes has joined #ruby-lang
lguardiola has quit [Ping timeout: 256 seconds]
krohrbaugh has quit [Client Quit]
faramir has quit [Ping timeout: 245 seconds]
krohrbaugh has joined #ruby-lang
Gaelan has joined #ruby-lang
forrest has quit [Quit: Leaving]
athaeryn has quit [Remote host closed the connection]
dankest has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 256 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
tesseract has quit [Ping timeout: 264 seconds]
Gaelan has quit [Remote host closed the connection]
torrieri has quit [Quit: Leaving...]
wesside has quit [Quit: Computer has gone to sleep.]
enebo has quit [Quit: enebo]
headius has quit [Quit: headius]
outoftime has quit [Quit: Leaving]
Wardrop has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
Gaelan has joined #ruby-lang
<whitequark> injekt: debug.rb is pretty good
bzalasky has joined #ruby-lang
mistym_meeting has quit [Remote host closed the connection]
<whitequark> huh, it uses callcc
<whitequark> also, "wat expression"
enebo has joined #ruby-lang
postmodern has joined #ruby-lang
krohrbaugh has joined #ruby-lang
vlad_starkov has joined #ruby-lang
chendo_ has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
benanne has joined #ruby-lang
andersbr has quit [Quit: andersbr]
snarfmason has quit [Quit: Textual IRC Client: www.textualapp.com]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
idkazuma has joined #ruby-lang
andersbr has joined #ruby-lang
andersbr has quit [Client Quit]
tylersmith has joined #ruby-lang
torrieri has joined #ruby-lang
snarfmason has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
toretore has quit [Quit: Leaving]
<r0bgleeson> 10>> while true do; end
<eval-in> r0bgleeson => /tmp/execpad-b80fd6675bd0/source-b80fd6675bd0:3: syntax error (http://eval.in/16703)
<r0bgleeson> 20>> while true do; end
<eval-in> r0bgleeson => (http://eval.in/16704)
<r0bgleeson> interesting
<whitequark> r0bgleeson: have you seen the RHG chapter 11?
<r0bgleeson> nope
<whitequark> explains some of the weird parts of ruby's syntax
spuk has joined #ruby-lang
andersbr has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
Swimming_Bird has quit [Max SendQ exceeded]
Swimming_Bird has joined #ruby-lang
<r0bgleeson> whitequark: that's a long blog post. i will try read it over the coming days :)
<r0bgleeson> burned out from work
Wardrop has left #ruby-lang [#ruby-lang]
charliesome has joined #ruby-lang
<r0bgleeson> whitequark: the introduction is interesting though
<r0bgleeson> whitequark: are you building your own ruby VM?
<whitequark> a ruby dialect, indeed.
pkrnj has joined #ruby-lang
<r0bgleeson> whitequark: cool
<r0bgleeson> whitequark: why isn't mruby suitable?
<whitequark> r0bgleeson: mruby isn't supposed to be embedded into devices; rather, into applications (like lua)
<r0bgleeson> ah i see
benanne has quit [Quit: kbai]
<whitequark> GC, no support for interrupts, no machine word datatype, etc, etc
<whitequark> wasn't designed with embedded devices in mind
<r0bgleeson> what sort of devices do you want it to run on?
<whitequark> r0bgleeson: the primary target is arbitrarily small 32-bit microcontrollers, first and foremost ARM.
<whitequark> as in, arbitrarily low amount of RAM, ROM and clock speed.
krohrbaugh has joined #ruby-lang
<whitequark> 16-bit maybe, 8-bit maybe but both aren't worth that much IMO.
<r0bgleeson> cool
<r0bgleeson> id love to get some devices to play around with
kain has quit [Quit: exit]
<whitequark> r0bgleeson: Maple Leaf is good for beginners
krohrbaugh has quit [Remote host closed the connection]
<whitequark> Arduino-compatible, also one of our targets
<r0bgleeson> cool
<r0bgleeson> ill check it out
<r0bgleeson> ive heard of arduino a lot
<whitequark> Arduino is a toy
<whitequark> a neat toy but just that
<whitequark> with Foundry (my dialect) you are not limited by a simplistic environment
<r0bgleeson> alright
<r0bgleeson> are you going to support the same syntax?
<whitequark> same as in Arduino? no, of course
<whitequark> neither syntax nor runtime.
<r0bgleeson> sorry, as ruby
<whitequark> (runtime/stdlib)
<whitequark> ah
<whitequark> initially, I'm using a slightly enhancened Ruby parser
sepp2k has quit [Remote host closed the connection]
<whitequark> sometimes, I think, I'll redesign it somewhat but it's fine for now
<r0bgleeson> have you seen duby/mirah?
<whitequark> of course
<r0bgleeson> "with several users and real-world applications using it for core components"
<r0bgleeson> really small adoption
saxy has joined #ruby-lang
enebo has quit [Quit: enebo]
<whitequark> yeah. I don't consider it interesting
<whitequark> it's basically syntactic sugar over existing languages.
marr has quit [Ping timeout: 245 seconds]
<whitequark> (or, over existing bytecode.)
<whitequark> whereas Foundry incorporates its own type system, specifically developed to support most common Ruby patterns
<r0bgleeson> yeah, id probably just use jruby if i wanted ruby on the JVM
idkazuma has quit [Remote host closed the connection]
<whitequark> or java
<whitequark> if not :)
<whitequark> ok, good night
<r0bgleeson> probably not :p
<r0bgleeson> g'night.
dustint has joined #ruby-lang
idkazuma has joined #ruby-lang
pkrnj has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]