<rohit>
I was going to submit a PR to change the more info url from gem --help which currently points to docs.rubyforge.org but it redirects to the above. Shouldn't it now point to http://guides.rubygems.org ?
areil_ has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
areil has quit [Ping timeout: 252 seconds]
chimkan has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
Blaster has joined #ruby-lang
Blaster has left #ruby-lang [#ruby-lang]
thinkdevcode has joined #ruby-lang
mjio has quit []
burgestrand has joined #ruby-lang
b6 has joined #ruby-lang
qwerxy has quit [Quit: offski]
<b6>
hi, i'm exporting GEM_HOME and GEM_PATH, but gem(1) keeps putting stuff in ~/.gem.
CaptainJet has quit []
cirwin has joined #ruby-lang
shtirlic has joined #ruby-lang
shtirlic_ has quit [Read error: Connection reset by peer]
kennyvb has quit [Ping timeout: 245 seconds]
kennyvb has joined #ruby-lang
yikem has joined #ruby-lang
JohnBat26 has joined #ruby-lang
sush24_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
SoAwesomeMan has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
apeiros_ has quit [Remote host closed the connection]
chimkan has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
areil_ has quit []
Mon_Ouie has quit [Ping timeout: 256 seconds]
yikem has quit [Quit: Computer has gone to sleep.]
siori has joined #ruby-lang
siori has quit [Remote host closed the connection]
siori has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
<byteminister>
so only one instance of that object will exist everytime we instantiate it
<charliesome>
byteminister: forgot what you know about the word 'singleton' - it means something totally different in ruby
<judofyr>
byteminister: it has nothing to do with the singleton pattern
<yorickpeterse>
stuff like `class << self do; ...; end` is basically a shorter way of adding a bunch of class methods
<charliesome>
byteminister: a singleton class is a class that only has a single instance
<yorickpeterse>
without having to prefix each definition with `self`
<charliesome>
byteminister: every object is an instance of its own singleton class
srbaker has joined #ruby-lang
<charliesome>
well.. almost every object
stardiviner has quit [Ping timeout: 240 seconds]
<byteminister>
I see. :) Interasting world is this ruby land. So module is a class too ?
<apeiros_>
Module is
<apeiros_>
modules aren't
<judofyr>
a module is an object
<judofyr>
so they have singleton classes :)
<spike|spiegel>
byteminister: class is a module.
<apeiros_>
and Class inherits from Module
<judofyr>
byteminister: if it makes any sense: when you do a = "123", a is *actually* not an instance of String. it's an instance of a's singleton class (which is a subclass of String).
<charliesome>
it's interesting that even though Class inherits from Module, you can't pass a class to include
<apeiros_>
spike|spiegel: "x is a subclass of y" is not the same as "x is a y"
<judofyr>
byteminister: but this is all rather funky stuff. most people just learn that `def self.foo` defines a class method and `class << self; … end` is a way to define several class methods
<byteminister>
aha, ok , so every class has it's meta class, reminds me of the prototype object in javascript
<judofyr>
charliesome: I think I've tweeted it: Liskov would *not* approve of the Module <-> Class relationship
<spike|spiegel>
apeiros_: it kind of is, common norm :) Class.is_a? Module
<judofyr>
byteminister: every *object* has its own meta class :)
<apeiros_>
charliesome: is_a? checks for class and ancestry, instance_of? only for class
pabs_ has joined #ruby-lang
nibbo_ has joined #ruby-lang
benteaa_ has joined #ruby-lang
llakey_ has joined #ruby-lang
<charliesome>
ruby needs an alias from is_a? to is_an?
<apeiros_>
charliesome: heh, got bothered by that too
<charliesome>
x.is_a?(Array) kills me every time
rhizmoe_ has joined #ruby-lang
<apeiros_>
charliesome: I think that's the point where you just accept that ruby is a programming language, not a natural language.
agile has quit [Ping timeout: 240 seconds]
r0bgleeson has quit [Ping timeout: 245 seconds]
<imperator>
you can always use .kind_of?
agile has joined #ruby-lang
<spike|spiegel>
ruby should have .should_of? as a joke
<byteminister>
hehe :D
dr_bob1 has quit [Quit: Leaving.]
<charliesome>
there's an entire category for jokes on redmine
<byteminister>
judofyr,spike,* thanks for explaining
<imperator>
or Array ===
fireglow- has joined #ruby-lang
bastl_ has joined #ruby-lang
mislav has joined #ruby-lang
dr_bob1 has joined #ruby-lang
dr_bob has quit [Read error: Connection reset by peer]
bastl has quit [Ping timeout: 252 seconds]
foca has quit [Ping timeout: 252 seconds]
joschi has quit [Ping timeout: 252 seconds]
pabs has quit [Ping timeout: 252 seconds]
eban has quit [Ping timeout: 252 seconds]
nibbo has quit [Ping timeout: 295 seconds]
llakey has quit [Ping timeout: 295 seconds]
mroth has quit [Ping timeout: 295 seconds]
tallship has quit [Ping timeout: 295 seconds]
rhizmoe has quit [Ping timeout: 251 seconds]
benteaa has quit [Ping timeout: 295 seconds]
fireglow has quit [Ping timeout: 343 seconds]
mitchty has quit [Ping timeout: 365 seconds]
fireglow- is now known as fireglow
foca_ has joined #ruby-lang
mitchty_ has joined #ruby-lang
<byteminister>
I love ruby, the only thing I hate about it right now is more or less cryptic stack traces / error logs
<spike|spiegel>
that's like joda something.... 5 == var instead of var == 5, to avoid accidentally assigning
<judofyr>
byteminister: I'd recommend just thinking about `class << self; def foo; … end end` as class methods for now. after you've used Ruby for a while you get a better understanding about the whole object module.
dr_bob1 has quit [Client Quit]
abuiles has quit [Read error: Connection reset by peer]
eban1 has joined #ruby-lang
tallship has joined #ruby-lang
no_i_wont has quit [Ping timeout: 241 seconds]
abuiles has joined #ruby-lang
dr_bob has joined #ruby-lang
sailias has joined #ruby-lang
<byteminister>
ok
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
no_i_wont has joined #ruby-lang
VGoff has quit [Ping timeout: 259 seconds]
<judofyr>
byteminister: you'll get better at reading stack traces too. but it's often difficult when you're dealing with other libraries (like Rails) and you do weird stuff.
trainhappy has quit [Ping timeout: 240 seconds]
tallship has quit [Remote host closed the connection]
VGoff has joined #ruby-lang
<byteminister>
yes, exactly with rails, or if you have some broken dependencies
tallship has joined #ruby-lang
mroth has joined #ruby-lang
mroth has quit [Changing host]
mroth has joined #ruby-lang
mroth has joined #ruby-lang
<judofyr>
byteminister: because there's no static typing, many typical typing errors can end up rather cryptic
<byteminister>
yes, I think maybe it wouldn't be so bad if it had static types + type inference , probably some meta capabilities of the language would get lost, but maybe that's a good thing :D
<apeiros_>
you're aware that such languages exist?
<byteminister>
scala ?
<byteminister>
duby ?
<byteminister>
:D
BlaXpirit has joined #ruby-lang
<byteminister>
jruby ? :D
workmad3 has joined #ruby-lang
<byteminister>
correction, duby is now called mirah i think..
<charliesome>
on the other hand, you have languages like haskell with static typing and very good type inference that also put out cryptic errors
<charliesome>
the only difference is the cryptic errors happen at compile time rather than run time
chimkan has joined #ruby-lang
schaerli has joined #ruby-lang
<mislav>
what's the difference between this chan and #ruby?
<workmad3>
mislav: a -lang suffix...
<byteminister>
:D
<mislav>
:P
<mislav>
are those channels for different purposes?
<yorickpeterse>
This one is official, the other one isn't
<spike|spiegel>
hopefully, internal discussions here? and general ruby talk there?
<charliesome>
spike|spiegel: it seems like that's true to some extent
<mislav>
so this is about the language itself, and the other should be about using the language?
<charliesome>
#ruby-lang seems much more technical than #ruby, if you know what i mean
<yorickpeterse>
mislav: not per se
<spike|spiegel>
mislav: I'd like to see it that way, but there seems to be overlap
<mislav>
ok, say I have a question about making persistent HTTP connections over SSL with Ruby, which chan do I go to?
<yorickpeterse>
This one
piggy_ has joined #ruby-lang
<mislav>
:)
<mislav>
ok I still don't get the difference but I'll hang around in here.
<mislav>
byteminister: I'm already using that lib, and it seems to work fine in benchmarks with tons of threads and even more requests. however when it gets deployed to Passenger in production, errors about not being able to open a connection start to happen.
<byteminister>
hmm, do you have ssl enabled on production web server ?
<mislav>
even from a production server, a simple script that tries to simulate the load to API hosts doesn't have problems with persistent connections, and there's a significant speedup over non-persistent (duh). but in Passenger workers environment, things are not rainbows.
<mislav>
byteminister: ssl is everywhere, both on the app and API hosts it talks to
<mislav>
as it should be.
<spike|spiegel>
mislav: so ssl doesn't terminate at the web server?
<spike|spiegel>
then, you need a way to do the TLS session ticketing
<imperator>
#ruby is a honeypot ;)
<mislav>
spike|spiegel: hm? can you be more clear
<spike|spiegel>
mislav: your ruby process gets encrypted request?
<mislav>
spike|spiegel: no. my ruby process (app running on passenger) *makes* encrypted requests to other hosts. works fine without persistent HTTP.
<yorickpeterse>
mislav: I know nothing about net-htt-persistent but can't you close the connection manually?
<yorickpeterse>
Or are you already doing that?
<mislav>
yorickpeterse: I'm not doing anything manually. I let net-http handle both connecting and reconnecting. I never want to close any connection because I want a single connection to get used as much as possible.
<yorickpeterse>
hmm
Glass_saga has quit [Remote host closed the connection]
Glass_saga has joined #ruby-lang
<spike|spiegel>
mislav: API end point, you know if they keep connection open forever? I doubt it
<mislav>
if a single Passenger worker gets 10 requests in 1 minute, I want that worker to keep the connection to API host open so it can avoid the SSL handshake 10 times. (well, 9 times to be more exact.)
carloslopes has quit [Remote host closed the connection]
<mislav>
spike|spiegel: they don't, they can keep the connection for about 14 seconds. but after that, net-http-persistent should handle reconnecting
<spike|spiegel>
ah, so the library is failing you
<mislav>
it's the purpose of the library.
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
masterkorp has joined #ruby-lang
<masterkorp>
hello
<mislav>
spike|spiegel: yeah, but I can't reproduce with isolated scripts, even with severe delays between requests. a script handles everything gracefully. in the app environment, however, things are a mess.
mistym has quit [Remote host closed the connection]
<masterkorp>
derp derp derp
<masterkorp>
sorry
<yorickpeterse>
np
<spike|spiegel>
mislav: the library doesn't seem to differentiate SSL related errors, it's catching any OpenSSL::SSL::SSLError and throwing "too many connection resets"
m3nd3s has quit [Remote host closed the connection]
Uranio has joined #ruby-lang
<spike|spiegel>
but atleast says the class name in the message
carloslopes has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 248 seconds]
chimkan has joined #ruby-lang
r0bgleeson has joined #ruby-lang
<mislav>
spike|spiegel: the errors in the message I'm getting are Timeout::Error and EOFError. why would they be handled by SSLError handler?
<mislav>
also, the responsibility of net-http-persistent is to try repeat GET requests, and it doesn't seem to be doing that.
byteminister has quit [Remote host closed the connection]
chimkan has quit [Client Quit]
<erikh>
mislav: drbrain is the current maintainer; might want to hit him up at reasonable pacific time hours
chimkan has joined #ruby-lang
<mislav>
erikh: I did post that comment on the issue and pinged him a couple of times.
wyhaines has joined #ruby-lang
<erikh>
ah ok
<erikh>
I know he's been pretty busy with work lately.
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<mislav>
what are EOFErrors anyway in context of HTTP?
outoftime has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
<mislav>
server closed the connection prematurely before finishing writing out the response?
dr_bob has quit [Read error: No buffer space available]
dr_bob has joined #ruby-lang
xyzodiac has joined #ruby-lang
<erikh>
mislav: socket
<erikh>
yeah
<mislav>
so it's a "fuck you" from the server basically
<erikh>
very likely
xyzodiac has quit [Client Quit]
slyphon has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 252 seconds]
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
schaerli has joined #ruby-lang
sush24_ has quit [Ping timeout: 260 seconds]
heftig has joined #ruby-lang
xyzodiac has joined #ruby-lang
sush24_ has joined #ruby-lang
xyzodiac has quit [Client Quit]
runeb has quit [Ping timeout: 250 seconds]
xyzodiac has joined #ruby-lang
agarcia has joined #ruby-lang
<andrewvos>
I just wrote the following code: "def within css, options => {}" and then got the error "Duby extensions not configured"
<andrewvos>
Is ruby trying to tell me to stop smoking?
<yorickpeterse>
that should be `options = {}`
<andrewvos>
yorickpeterse: Yeah I know
<yorickpeterse>
and yes, you need to stop smoking crack while coding
<yorickpeterse>
What's the difference between Kernel.require and Kernel#require? Besides of course one being a class and the other being an instance method
<judofyr>
no idea
<whitequark>
yorickpeterse: somewhere in sources: "module_method :require"
<erikh>
yorickpeterse: module_function most likely
<whitequark>
er module_function
<erikh>
or the C equiv
<yorickpeterse>
Ah, so they do exactly the same thing (minus when patches)?
<yorickpeterse>
* patched
<whitequark>
yeah
<erikh>
very likely
<yorickpeterse>
heh
<erikh>
some back story, so in early releases of 1.9 there was this thing called gem_prelude that attempted to do what custom_require does in C
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<erikh>
it had bugs and was extremely hard to modify
<erikh>
so since rubygems 1.6 or so, it detects it and breaks it
<erikh>
and then does what you have now
<erikh>
gem_prelude technically still exists I think
<erikh>
and probably still runs
<erikh>
the whole require path is just a colossal C.F.
<whitequark>
erikh: gem_prelude isn't C code afaik, it's a chunk of Ruby embedded into the interpreter
<erikh>
and defers to rubygems if rubygems is actually used
rippa has joined #ruby-lang
<erikh>
the problem IIRC is that it activates the latest gem installed regardless of its dependencies
<erikh>
which is not what rubygems does
BigO has joined #ruby-lang
<erikh>
it's been a few years now though
<erikh>
so my memory is a little fuzzy
gsav has joined #ruby-lang
gsav has quit [Client Quit]
gnufied has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
* imperator
releases win32-file-attributes into the wild
rue|w has quit [Ping timeout: 276 seconds]
xyzodiac has joined #ruby-lang
m3nd3s has quit [Read error: Connection reset by peer]
m3nd3s has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
znake has joined #ruby-lang
<ddfreyne>
*hordes of wild win32-file-attributes trample imperator*
carloslopes has joined #ruby-lang
<judofyr>
erikh: I thought the current gem_prelude.rb simply required RubyGems
chimkan has quit [Quit: chimkan]
xyzodiac has quit [Ping timeout: 265 seconds]
xyzodiac has joined #ruby-lang
<erikh>
it does
<erikh>
I checked earlier
eban1 has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Ping timeout: 276 seconds]
mwjcomputing has joined #ruby-lang
gsav has joined #ruby-lang
swiftos has joined #ruby-lang
<swiftos>
Hi, i've a problem with TCPSock and Serial: I read byte from serial and send them to a TCPClient, but byte received have nothing to do with byte sent
<judofyr>
erikh: where is gem_prelude.rb installed btw?
<swiftos>
can someone explain me ?
beiter has quit [Quit: beiter]
<judofyr>
swiftos: Serial?
<swiftos>
judofyr: serialport (with the serialport gem). I read one byte received from a serial port and whant to send it through TCP
<erikh>
judofyr: it's at the root of lib
<erikh>
and I want to say it's done at interpreter init
<yorickpeterse>
swiftos: what have you tried? Also, put some code in a pastebin
<erikh>
but I'd have to look
dedis has joined #ruby-lang
<judofyr>
erikh: I don't find it in /Users/magnus/.rbenv/versions/1.9.3-p286/lib
<judofyr>
swiftos: so when you receive 0x18, you're sending it as "24" later
<swiftos>
judofyr: I was thinking to something like that, since i'm new to ruby, i don't know all subtilities ^
<judofyr>
swiftos: if you just want to pass it along, you could use #readchar instead: char = serial.readchar; socket << char
<judofyr>
or socket.write(char)
<judofyr>
(it's an alias)
<swiftos>
Ok, i'll try, thank you judofyr
mislav_ has joined #ruby-lang
<judofyr>
swiftos: or, if you want to receive a byte, use #chr to convert it to a string when you send it: byte = serial.getbyte; socket << byte.chr
<erikh>
judofyr: maybe it's built into something else
<erikh>
it's been around 2 years since I last worked with rubygems, or had to deal with this issue
Brainix has joined #ruby-lang
<judofyr>
erikh: strings ruby | grep rubygems
<judofyr>
yeah, it's bundled
<judofyr>
require 'rubygems.rb' if defined?(Gem)
<swiftos>
judofyr: Thank you very much, it's working with char ^^ i'm happy now
<judofyr>
swiftos: nice!
sio has joined #ruby-lang
<judofyr>
swiftos: also, if you just want to copy chars, I think that IO.copy_stream is simpler: IO.copy_stream(serial, client)
<judofyr>
that should pipe everything from serial into client
tjadc has quit [Ping timeout: 252 seconds]
<swiftos>
judofyr: Nice nice^^ i'll try it too
<judofyr>
not sure if it works with the serial gem though
<swiftos>
ok, i'll try, so I learn
<swiftos>
but at the end, the script has to write every traffic between serial and tcp in a database file, so the char options is the right, i think
<judofyr>
ah, yeah
<judofyr>
swiftos: also, performance will be better if you use #readpartial (if the serial sends lots of bytes): while chunk = serial.readpartial(1024); client << chunk; end
<judofyr>
swiftos: readpartial blocks until there's some data available, then it returns the +n+ first bytes
<judofyr>
swiftos: so if it's only sending one byte at a time, `chunk` will always just be one byte
<judofyr>
but if it suddenly sends out 100 (and it gets buffered in the kernel), then you get all 100 at once
<erikh>
it's basically read() from C.
voker57_ has quit [Read error: Connection reset by peer]
grzywacz has quit [Ping timeout: 240 seconds]
thinkdevcode has quit [Remote host closed the connection]
AlHafoudh has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
<whitequark>
synchronous I/O sucks
<swiftos>
judofyr: I only send max 65byte and receive only 32 at a time...i'll check performance later because it doesn't really matter for me
<judofyr>
swiftos: okay. but it's good to know about #readpartial anyway :)
<whitequark>
(and I didn't say "blocking")
<judofyr>
whitequark: I always mess up blocking vs synchronous I/O
<swiftos>
judofyr: :) ok...i've a lot to learn ^^
<judofyr>
whitequark: what's the difference again?
datanoise has quit [Ping timeout: 252 seconds]
<judofyr>
whitequark: async I/O means you get a signal when there's I/O? while non-blocking is just returning at once if there's nothing available?
mupilot has joined #ruby-lang
piggy_ has quit [Remote host closed the connection]
<whitequark>
judofyr: blocking I/O is a property of your code, synchronous I/O is a property of the OS
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
<judofyr>
whitequark: explain?
<whitequark>
for example you cannot, even with O_NONBLOCK, avoid waiting for the hard drive to seek a certain track
<whitequark>
the OS _will_ block the syscall.
<judofyr>
ah, right
<whitequark>
(in fact O_NONBLOCK doesn't do anything for files on local block devices.)
schaerli has quit [Remote host closed the connection]
<whitequark>
whereas in Windows NT(r) every I/O request is asynchronous by nature
<judofyr>
hm… how does seek work with select/poll?
<whitequark>
judofyr: select/poll do not work with files
<erikh>
sure they do
<erikh>
they aren't very useful, but they do
<whitequark>
erikh: it's a noop
<whitequark>
the purpose of select/poll is to avoid waiting for I/O to be completed, and in this case you will wait anyway
<judofyr>
hm… I didn't knew that
<erikh>
they work on file descriptors. it's an important distinction because several blocking streams are presented as files
chimkan_ has joined #ruby-lang
<whitequark>
so in my opinion they don't work, at least not as intended.
<erikh>
like almost everything in /dev, unix sockets, etc
<judofyr>
what about /dev/random?
<erikh>
yep
<erikh>
they don't care about files
<whitequark>
judofyr: pseudofiles don't count. I was only talking about real drives
<erikh>
they care about something lower level than files
<whitequark>
*real files
<judofyr>
:)
<erikh>
a unix socket's a real file
<erikh>
so is your whole /dev list
ryanlecompte has quit [Remote host closed the connection]
<erikh>
and /proc on some systems.
stardiviner has quit [Ping timeout: 250 seconds]
<whitequark>
erikh: please, exec yourself with -no-pedantic :)
<zzak>
does this still work for my iomega zip drive?
<erikh>
well stop explaining it in terms of files
<whitequark>
ok ok
<judofyr>
whitequark: so #read_nonblock(1) on a file will actually block until the seek is done?
<whitequark>
judofyr: yes.
<erikh>
i/o works on file descriptors. it doesn't give a shit about what creates the fds
grzywacz has joined #ruby-lang
grzywacz has quit [Changing host]
grzywacz has joined #ruby-lang
<whitequark>
you can see the disastrous consequences of that if you try to use FUSE
<whitequark>
and the software which serves the filesystem hangs in some way or another
<judofyr>
erikh: but different fd behaves differently
<whitequark>
or it's SSHFS and network is slow, etc.
<erikh>
judofyr: eh? what kind of different fd's are there?
<whitequark>
erikh: you're correct in that userspace posix I/O functions don't give a shit about the source of fds
<judofyr>
erikh: different as in "backed by file", "backed by socket" etc.
<whitequark>
erikh: you're not correct in that kernel function which get called when you invoke userspace posix I/O functions don't care about FD types.
<whitequark>
because they obviously do.
<judofyr>
whitequark: do you know if libuv uses async I/O?
<whitequark>
judofyr: it doesn't
<erikh>
argh
<judofyr>
so the whole async file API is kinda moot?
<whitequark>
there are several problems
<erikh>
whitequark: what happens when you try to read() over nfs
<whitequark>
judofyr: first, for a long time linux AIO was implemented in glibc with pthreads and blocking I/O, which obviously didn't scale at all
gnufied has quit [Quit: Leaving.]
<whitequark>
judofyr: now we have kernel AIO, but it only works for actual block-device-backed fds AND it bypasses filesystem cache completely
<whitequark>
so it's mostly used by databases with their own cache layers
gix has quit [Read error: Connection reset by peer]
mupilot has quit [Quit: mupilot]
<whitequark>
and nothing else, or at least nothing I remember
<judofyr>
interesting
<whitequark>
erikh: the kernel fetches the backing structure for that fd and invokes a corresponding method on it.
<erikh>
what method?
<erikh>
which kernel?
<erikh>
what about userspace nfs implementations?
<erikh>
are we still talking about files here?
<whitequark>
erikh: see above: I'm talking about kernel-space Linux I/O
mupilot has joined #ruby-lang
<erikh>
you are making an assertion about how one kernel, under one implementation and probably for one file system and probably for one specific type of file is handled when the descriptor for said file after opening is passed to a polling function
outoftime has quit [Quit: Leaving]
<erikh>
there's a reason descriptors exist
<whitequark>
erikh: one kernel and one implementation, exactly
<erikh>
but you're using the phrase "files" and completely muddying up the point
<whitequark>
erikh: explain it better than I do, then. don't waste time trying to contradict every single word I say
<erikh>
i/o operates on file descriptors.
<whitequark>
especially that both you and I understand what did I actually say, and there was nothing technically wrong with it
<piggy_>
whitequark: there are men who would pay you good money to scold them the way you just did then
<masterkorp>
erikh: oops sorry
<judofyr>
I'm just going to paste what you said earlier:
<judofyr>
16:02 erikh: holy pedantic batman
<judofyr>
:)
fletch` has joined #ruby-lang
<erikh>
argh
mislav_ has quit [Remote host closed the connection]
<whitequark>
erikh: yeah, it does. is that all? do you say that how exactly it operates under given conditions is irrelevant?
chimkan___ has joined #ruby-lang
gnufied has joined #ruby-lang
<erikh>
whitequark: I'm saying it's foolish to make assumptions about how file descriptors work based on what created them
gix has joined #ruby-lang
<swiftos>
so, working time is over.
<whitequark>
erikh: that's not an assumption, that's a fact
<swiftos>
Thank you again judofyr for your help
<erikh>
whitequark: ok, so, I have a 2TB file served over nfs
<judofyr>
swiftos: you're welcome! I usually hang out here :)
<swiftos>
judofyr: i'll come back for sure ^^
<swiftos>
bye
<erikh>
on a modem
swiftos has quit [Quit: leaving]
<erikh>
still ready to tell me select is going to always return the same value for that fd every call?
<andrewvos>
Dyammm the_silver_searcher is really fast!
<whitequark>
erikh: I've never used nfs in my whole life, so no, but I'll go and check it now.
chimkan_ has quit [Ping timeout: 252 seconds]
<andrewvos>
Right, no more ack for me.
<whitequark>
erikh: you could note that I did say "local block device-backed files".
<whitequark>
that does not include nfs.
xyzodiac has quit [Ping timeout: 246 seconds]
malev has quit [Ping timeout: 256 seconds]
<erikh>
I seem to recall you saying that select/poll do not work with files
<erikh>
anyhow
datanoise has joined #ruby-lang
xyzodiac has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
justinram has quit [Remote host closed the connection]
<whitequark>
erikh: btw
<whitequark>
yes I am going to say that select() when used on an NFS FD in that setting will return the same value each time
<erikh>
ok
<erikh>
which NFS implementation? which version of NFS?
davidbalber|away has quit [Quit: ZNC - http://znc.in]
havenn has joined #ruby-lang
<erikh>
you're still missing the point.
<whitequark>
erikh: as stated above, "modern Linux kernel"
davidbalbert has joined #ruby-lang
<whitequark>
no I am not. I'm not working with abstract POSIX implementations
<whitequark>
I am working with real software with real implementation-defined behavior
<erikh>
but you are, unless you're running in kernel space
piggy_ has quit [Ping timeout: 250 seconds]
headius has joined #ruby-lang
<whitequark>
I don't give a flying fuck about what *could* happen with fds theoretically when I have a particular setting and I want to know if that syscall will block or not
<whitequark>
and the fact is, that syscall will, and that does have very important consequences.
<erikh>
that's the whole point though. fd's make it so that you don't have to give a flying fuck
<erikh>
and you're abandoning that because linux
<erikh>
and that's foolish
<whitequark>
erikh: so please deploy something with an NFS link
ryanlecompte has joined #ruby-lang
<whitequark>
on linux
<whitequark>
and don't give a f about that
<whitequark>
and get fired when it hangs.
xyzodiac has quit [Ping timeout: 240 seconds]
<whitequark>
this is, for example, the precise reason we use S3 for file storage in our webapp instead of NFS, through all our servers are in one LAN segment.
<erikh>
because NFS on linux is a pile of ass?
<whitequark>
erikh: so what?
<erikh>
or because it's pretty tightly coupled with the nss system?
judofyr has quit [Remote host closed the connection]
<whitequark>
it's like saying "x86 has an awful instruction set"
<erikh>
or you just like slow network i/o
<erikh>
no, it's not
<whitequark>
yeah it does, and it's not like you could realistically use something else.
<erikh>
sure you can. netapp makes an NFS appliance and pretty much every non-linux nfs implementation is non-ass.
<erikh>
it's pretty easy to get a linux box to kernel panic if it has nfs mounts
<whitequark>
erikh: hm, define "appliance"
LanceHaig has joined #ruby-lang
<erikh>
it's a box. that you install. in a data center.
<whitequark>
yeah
<imperator>
solaris ftw :)
<whitequark>
and the problem is with the CLIENT nfs implementation
<whitequark>
because it fucking blocks when it shouldn't
<erikh>
oh, right. you're still using linux
<erikh>
sorry, forgot
xyzodiac has joined #ruby-lang
anannie has quit [Remote host closed the connection]
<whitequark>
now you're missing the point completely :)
<erikh>
so the solution to all your problems is that the file descriptor abstraction is bollocks because you only use one operating system and make tons of assumptions about how it works, so naturally all client code ever written has no reason to do anything differently.
<erikh>
and if you have any problems with the one true unix system, you just avoid that feature
<erikh>
gotcha.
<mitchty_>
I've seen places use cifs over nfs on linux due to the stupid blocking behavior
<erikh>
nfs is a total piece of shit on linux. it's really bad.
<whitequark>
no. what I am saying is that file descriptor abstraction is broken on Linux when you're operating with regular files because you cannot poll on these.
<erikh>
you can poll on them
<whitequark>
no you fucking cannot, because that's useless
<whitequark>
Regular files shall always poll TRUE for reading and writing.
<whitequark>
so
rekky has joined #ruby-lang
<erikh>
does it blow up?
<whitequark>
there is no single standards-compliant nfs implementation which can poll() on files
<whitequark>
with a sensible result.
<erikh>
argh
<whitequark>
and yeah, they will all block.
<erikh>
of course they will
<whitequark>
POSIX specifies poll() behavior in terms of the way the fd was created
<erikh>
can you point out in this link where calling poll on a regular file will cause the universe or your program to explode?
<whitequark>
erikh: it doesn't, and I never said that
<erikh>
you said it cannot poll
<erikh>
The poll() function shall support regular files, terminal and pseudo-terminal devices, FIFOs, pipes, sockets and [XSR] STREAMS-based files. The behavior of poll() on elements of fds that refer to other types of file is unspecified.
<erikh>
right above where you cited.
<whitequark>
yeah
grzywacz has quit [Ping timeout: 240 seconds]
riffraff has joined #ruby-lang
grzywacz has joined #ruby-lang
grzywacz has quit [Changing host]
grzywacz has joined #ruby-lang
blazes816 has joined #ruby-lang
melter has joined #ruby-lang
rhizmoe_ has quit [Quit: leaving]
gregmoreno has joined #ruby-lang
<whitequark>
erikh: let's just do something useful instead.
zmack has quit [Remote host closed the connection]
piggy_ has joined #ruby-lang
piggy_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend>
injekt: yo
<banisterfiend>
injekt: hey i'm using slop 'commands' (the git log -1 type thing), how do i get the parameters passed to a command?
<erikh>
whitequark: I am, the test runs just take forever
<erikh>
so I've got a lot of time to troll you
r0bgleeson has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
fletch` has quit [Ping timeout: 240 seconds]
firefux has joined #ruby-lang
<banisterfiend>
dsafsdfasdf
<banisterfiend>
asdfasd
Mon_Ouie has quit [Read error: No buffer space available]
<andrewvos>
banisterfiend: Quite.
<firefux>
banisterfiend: good idea
gnufied has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby-lang
anannie has joined #ruby-lang
maz-dev has joined #ruby-lang
<imperator>
hm, forgot how to resize a pointer in ffi...
<tockitj_>
if method is defined in proc (which is defined in module N1), and proc is executed inside module/class N2.. where will method be defined ?
<banisterfiend>
tockitj_: the 'self' of the proc
<banisterfiend>
it doenst matter where it's executed if you do a normal 'call', if you use instance_exec/class_exec though, it could be defined anywhre
<tockitj_>
what is self of the proc ? (object where it is defined?)
<tockitj_>
what if proc is cloned elsewhere ?
<tockitj_>
if it is converted to method in another namespace ?
<tockitj_>
do lambdas behave the same ?
__butch__ has joined #ruby-lang
<banisterfiend>
tockitj_: no, all that matters is where the proc was defined
<banisterfiend>
tockitj_: lambdas behave the same with respect to this
<tockitj_>
cloning does not affect it ? would not procs self change in that case ?
<banisterfiend>
no, why would the self change?
<tockitj_>
well new proc is created in another object ?
<banisterfiend>
tockitj_: by cloning you mean #dup or #clone right?
<tockitj_>
yes
<banisterfiend>
that wont change anything, dups and clones are pretty superficial things
<tockitj_>
hmmz.. they should not be.. these are fundamental operations
<banisterfiend>
tockitj_: i can't think what you even expect Proc#clone to do
<tockitj_>
ok.. so it has 'lexical' scoping
__butch__ has quit [Ping timeout: 276 seconds]
eban1 has joined #ruby-lang
__butch__ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
voker57 has joined #ruby-lang
justinram has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
<whitequark>
erikh: hehe
<whitequark>
I prefer to profile my test runs while my tests run
<whitequark>
not that they run any better, but at least I get an impression that I'm doing something worthwhile
<whitequark>
_and_ I do not switch to reading reddit
Jad has joined #ruby-lang
<whitequark>
well, actually they're under 50s on this i7 down from 6m on previous...
<banisterfiend>
whitequark: what machine are yu running?
Jad is now known as Guest47669
<whitequark>
banisterfiend: asus ux32vd
Guest47669 has left #ruby-lang [#ruby-lang]
<banisterfiend>
whitequark: this is a sandybridge? how much ram did u pack in it?
wallerdev has joined #ruby-lang
<whitequark>
has every benefit of macbook air without any of its drawbacks
<whitequark>
10g currently
<whitequark>
it's ivy bridge
vlad_starkov has quit [Read error: Connection reset by peer]
<whitequark>
will probably be 18g when someone'll make 16g ddr3 sodimm's
<banisterfiend>
whitequark: except u only have 24Gb ssd afaict
cultureulterior_ has quit [Quit: cultureulterior_]
<whitequark>
banisterfiend: and I can install any 2.5" drive I want
jgomez has quit [Ping timeout: 264 seconds]
<banisterfiend>
it does look pretty good
<whitequark>
I've yet to replace my HDD, but that's mainly due to laziness and the fact that with LVM I just shuffle my partitions around
<whitequark>
when I need more speed
wallerdev has quit [Client Quit]
<whitequark>
it is plain awesome. you won't believe your eyes when you'll look at its fullhd ips lcd
<whitequark>
and you won't be able to look at old tn lcds ever again without crying
sn0wb1rd has joined #ruby-lang
Mon_Ouie has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
wallerdev has joined #ruby-lang
q560 has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
mistym is now known as mistym_lunch
chimkan_ has quit [Quit: chimkan_]
banisterfiend has joined #ruby-lang
<banisterfiend>
whitequark: but it has nothing on retina, right?
sush24_ has quit [Quit: This computer has gone to sleep]
heftig has joined #ruby-lang
mupilot_ has joined #ruby-lang
mupilot_ has quit [Client Quit]
chrismcg is now known as zz_chrismcg
q560 has quit [Quit: Page closed]
m3nd3s has quit [Read error: Connection reset by peer]
m3nd3s_ has joined #ruby-lang
retro|cz has quit [Ping timeout: 244 seconds]
mupilot has quit [Ping timeout: 240 seconds]
JohnBat26 has quit [Remote host closed the connection]
muiefreenode has joined #ruby-lang
muiefreenode has left #ruby-lang [#ruby-lang]
chimkan has joined #ruby-lang
muiefreenode has joined #ruby-lang
chimkan has quit [Ping timeout: 256 seconds]
muiefreenode has quit [Quit: Page closed]
<whitequark>
banisterfiend: huh?
<whitequark>
it's basically the same as retina
codewrangler has joined #ruby-lang
<whitequark>
mbp is 220dpi, ux32vd is 180dpi
xyzodiac has quit [Quit: Computer has gone to sleep.]
<whitequark>
note that mbp is 15" while ux32vd is 13"; the difference isn't any big anyway.
lcdhoffman has quit [Quit: lcdhoffman]
Ashkin has joined #ruby-lang
runeb has joined #ruby-lang
Carnage\ has joined #ruby-lang
unsymbol has quit [Ping timeout: 252 seconds]
runeb has quit [Remote host closed the connection]
brianritchie has joined #ruby-lang
unsymbol has joined #ruby-lang
brianritchie has quit [Client Quit]
outoftime has joined #ruby-lang
xyzodiac has joined #ruby-lang
Nisstyre has joined #ruby-lang
thatdutchguy has joined #ruby-lang
jgomez has joined #ruby-lang
Bediko has joined #ruby-lang
cultureulterior_ has joined #ruby-lang
seanstickle has joined #ruby-lang
seanstickle has quit [Client Quit]
tenderlove has joined #ruby-lang
mwjcomputing has quit [Quit: Leaving]
AlHafoudh has quit [Quit: Computer has gone to sleep.]
cultureulterior_ has quit [Quit: cultureulterior_]
ebouchut has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
sn0wb1rd has quit [Client Quit]
riffraff has quit [Quit: Leaving]
areil has quit [Remote host closed the connection]
cultureulterior_ has joined #ruby-lang
diegoviola has quit [Ping timeout: 246 seconds]
cultureulterior_ has quit [Client Quit]
xyzodiac has quit [Quit: Computer has gone to sleep.]
Oren has joined #ruby-lang
cirwin has quit [Ping timeout: 245 seconds]
JohnBat26 has joined #ruby-lang
pabs_ has left #ruby-lang [#ruby-lang]
sn0wb1rd has joined #ruby-lang
pabs has joined #ruby-lang
grzywacz has quit [Quit: :wq]
chendo has quit [Read error: Operation timed out]
sn0wb1rd_ has joined #ruby-lang
sn0wb1rd has quit [Read error: Connection reset by peer]
sn0wb1rd_ is now known as sn0wb1rd
Uranio has quit [Quit: WeeChat 0.3.8]
chendo has joined #ruby-lang
madish_ has joined #ruby-lang
nazty has quit [Read error: Operation timed out]
nazty has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby-lang
madish has joined #ruby-lang
robbyoconnor has joined #ruby-lang
brianpWins has joined #ruby-lang
mupilot has joined #ruby-lang
aetcore has joined #ruby-lang
ryanf has joined #ruby-lang
zmack has joined #ruby-lang
madish_ has quit [Ping timeout: 264 seconds]
madish_ has joined #ruby-lang
Oren has quit [Quit: qwebirc exception: Buffer overflow.]
AlHafoudh has joined #ruby-lang
AlHafoudh has quit [Max SendQ exceeded]
AlHafoudh has joined #ruby-lang
carloslopes has quit [Read error: Connection reset by peer]
madish has quit [Ping timeout: 250 seconds]
carloslopes has joined #ruby-lang
codewrangler has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
codewrangler has joined #ruby-lang
chendo has quit [Ping timeout: 252 seconds]
cultureulterior_ has joined #ruby-lang
madish has joined #ruby-lang
codewrangler has quit [Client Quit]
codewrangler has joined #ruby-lang
codewrangler has quit [Remote host closed the connection]
codewrangler has joined #ruby-lang
chimkan has joined #ruby-lang
mupilot has quit [Quit: mupilot]
madish_ has quit [Ping timeout: 260 seconds]
carloslopes has quit [Ping timeout: 260 seconds]
madish_ has joined #ruby-lang
nemonic has joined #ruby-lang
runeb has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
madish has joined #ruby-lang
afgeneralist has quit [Ping timeout: 252 seconds]
runeb has quit [Ping timeout: 265 seconds]
B|aster has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 256 seconds]
zmack has quit [Remote host closed the connection]
madish_ has quit [Ping timeout: 250 seconds]
madish_ has joined #ruby-lang
carloslopes has joined #ruby-lang
madish has quit [Ping timeout: 246 seconds]
tbuehlmann has quit []
seydar has joined #ruby-lang
methods has left #ruby-lang [#ruby-lang]
davidbalbert is now known as davidbalber|away
madish has joined #ruby-lang
cirwin has joined #ruby-lang
madish has quit [Client Quit]
madish has joined #ruby-lang
mrsolo has joined #ruby-lang
madish_ has quit [Ping timeout: 255 seconds]
buscapepe has joined #ruby-lang
madish has quit [Ping timeout: 240 seconds]
svyatov has quit [Quit: svyatov]
banisterfiend has quit [Read error: Connection reset by peer]
nemonic has quit [Quit: WeeChat 0.3.7]
swarley has joined #ruby-lang
r0bglees0n has joined #ruby-lang
aetcore has quit [Remote host closed the connection]
chimkan__ has joined #ruby-lang
s0ber_ has joined #ruby-lang
rekky has quit [Quit: rekky]
nazty has quit [Read error: Connection reset by peer]
fireglow- has joined #ruby-lang
gregmore_ has joined #ruby-lang
comboy_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
cultureulterior_ has quit [Quit: cultureulterior_]
jMCg_ has joined #ruby-lang
pryno has joined #ruby-lang
chris2_ has joined #ruby-lang
lucas_ has joined #ruby-lang
shaman42_ has joined #ruby-lang
thinkdevcode has joined #ruby-lang
dumfries has joined #ruby-lang
znz_v0 has joined #ruby-lang
bastl has joined #ruby-lang
rekky has joined #ruby-lang
buscapepe has quit [Ping timeout: 246 seconds]
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
JohnBat26 has quit [*.net *.split]
chimkan has quit [*.net *.split]
r0bgleeson has quit [*.net *.split]
gregmoreno has quit [*.net *.split]
fireglow has quit [*.net *.split]
bastl_ has quit [*.net *.split]
comboy has quit [*.net *.split]
chris2 has quit [*.net *.split]
dumfries_ has quit [*.net *.split]
s0ber has quit [*.net *.split]
shaman42 has quit [*.net *.split]
lzhz_ has quit [*.net *.split]
jMCg has quit [*.net *.split]
lucas has quit [*.net *.split]
znz_v has quit [*.net *.split]
bryno has quit [*.net *.split]
fireglow- is now known as fireglow
chimkan__ is now known as chimkan
s0ber_ is now known as s0ber
xyzodiac has joined #ruby-lang
cirenyc has joined #ruby-lang
lzhz has joined #ruby-lang
rekky has quit [Client Quit]
m3nd3s_ has quit [Remote host closed the connection]
buscapepe has joined #ruby-lang
mupilot has joined #ruby-lang
JohnBat26 has joined #ruby-lang
towski has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
rippa has quit [Ping timeout: 255 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
chendo has joined #ruby-lang
davidbalber|away is now known as davidbalbert
<zzak>
whitequark: i love my ux31a, but i wish i got the 256gb hd
thinkdevcode has quit [Remote host closed the connection]
<zzak>
theres a 13" retina now right?
mistym_lunch is now known as mistym
bluepojo has joined #ruby-lang
<seydar>
i think i'm going crazy. i'm including a module but not all of the modules methods are being included
<seydar>
trying to get a repro
slyphon has quit [Ping timeout: 245 seconds]
bluepojo has quit [Client Quit]
runeb has joined #ruby-lang
<zzak>
whitequark: i wish i had at least 8gb of ram too
BigO has quit [Read error: Connection reset by peer]
melter has quit [Remote host closed the connection]
BigO has joined #ruby-lang
bluepojo has joined #ruby-lang
bluepojo has quit [Client Quit]
jgomez has quit [Ping timeout: 246 seconds]
<seydar>
basically what i'm learning the hard way yet again is that method redirection is really really hard to do
runeb has quit [Ping timeout: 256 seconds]
jMCg_ is now known as jMCg
chris2_ is now known as chris2
sn0wb1rd has quit [Quit: sn0wb1rd]
sn0wb1rd has joined #ruby-lang
diegoviola has joined #ruby-lang
afgeneralist has joined #ruby-lang
diegovio1a has joined #ruby-lang
diegoviola is now known as Guest14386
diegovio1a is now known as diegoviola
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
Guest14386 has quit [Ping timeout: 260 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
aetcore has joined #ruby-lang
datanoise has quit [Ping timeout: 276 seconds]
weeb1e has joined #ruby-lang
solars has joined #ruby-lang
Carnage\ has quit [Read error: Connection reset by peer]
Carnage\ has joined #ruby-lang
seydar has quit [Quit: leaving]
datanoise has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
runeb has joined #ruby-lang
<imperator>
zzak, didn't i kick you? :-P
carloslopes has quit [Remote host closed the connection]
<andrewvos>
No, I mean how exactly does it work. How can you know what variables aren't in scope anymore?
<heftig>
i believe it does periodic mark and sweep
s0ber_ is now known as s0ber
<heftig>
andrewvos: stack frames are garbage-collected as well, AFAIK
<andrewvos>
heftig: Yeah I get that. But I'm wondering how exactly an item could be marked "not reachable from anywhere"
<heftig>
you start with the context of every thread, following every reference, marking as you go
<heftig>
everything not marked afterwards can be disposed
banisterfiend has joined #ruby-lang
<Kero>
andrewvos: the run-time knows all objects; it allocated them, so it knows
qpingu has joined #ruby-lang
<andrewvos>
Kero: Yeah fair enough, but you need to know every single place this variable could be used.
workmad3 has joined #ruby-lang
<heftig>
it knows
<andrewvos>
hehe
<Kero>
that part heftig answered :)
<andrewvos>
heftig: How?
<heftig>
why wouldn't it?
<andrewvos>
heftig: Well I guess I'm asking the wrong question.
<andrewvos>
heftig: I need to know more about how Ruby keeps track of each context I guess.
<andrewvos>
I kind of want to build a mini-ruby for learning.
<andrewvos>
Ooh shit dinner time.
<andrewvos>
Thanks
Darkspiel has quit [Remote host closed the connection]
Hakon has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
musl has quit [Quit: WeeChat 0.3.9.2]
dr_bob has joined #ruby-lang
rue has quit [Ping timeout: 245 seconds]
pcboy_ has quit [Ping timeout: 256 seconds]
rue has joined #ruby-lang
tenderlove has joined #ruby-lang
melter has joined #ruby-lang
lcdhoffman has joined #ruby-lang
<andrewvos>
Right where were we :)
<andrewvos>
So I guess there's some sort of structure. Ruby parses code and keeps it in a trie I guess, and then different branch types have different rules for variable scope?
<andrewvos>
tree*
<zenspider>
ruby_parser 3.0.4 released
<drbrain>
andrewvos: that describes ruby 1.8
<drbrain>
andrewvos: ruby 1.9+ is similar, but the tree gets transformed to bytecode
seydar has joined #ruby-lang
<zenspider>
(and thrown out)
<seydar>
anyone have any experience with ruby-llvm?
pcboy_ has joined #ruby-lang
<andrewvos>
drbrain: Why does it get converted to bytecode? (Or can you offer any resources)
<drbrain>
andrewvos: it is easier to optimize byte code (and a VM) over a tree-walking interpreter
sn0wb1rd has joined #ruby-lang
<drbrain>
andrewvos: but it's usually easier to write a tree-walking interpreter
<andrewvos>
drbrain: I would imagine so.
<andrewvos>
drbrain: When you say "easier" you mean performance?
<drbrain>
in terms of getting it working in the first place
<andrewvos>
No I mean "it is easier to optimize byte code (and a VM) over a tree-walking interpreter"
<drbrain>
oh, yes
<andrewvos>
drbrain: Hmm, I want to try make a language for fun. I guess I'll go with the tree approach then.
<andrewvos>
I suppose I shouldn't even be worrying about garbage collection at this point.
<rue>
You should use an Abstract Syntax Trie, just because
runeb has quit [Remote host closed the connection]
<andrewvos>
rue: Is it web-scale?
sn0wb1rd has quit [Ping timeout: 246 seconds]
<rue>
Could write code like de foo(meh ; beg; danjer; resc Exc => x; e
<banisterfiend>
andrewvos: there's a coursera course on compiler construction
<banisterfiend>
andrewvos: it's pretty awesome, it gives you a background on the actual mathematics, you learn to mathematically prove that a regex matches a certain string, etc
<andrewvos>
zenspider: Halp
musl has joined #ruby-lang
<banisterfiend>
and build up the basic regex operators from first principles
musl has quit [Client Quit]
<andrewvos>
banisterfiend: I do not know coursera. I'll take a look
<banisterfiend>
andrewvos: ill find u a link, one sec
<andrewvos>
Thanks dude
<zenspider>
what's up?
<banisterfiend>
it's basically video lectures from stanford
musl has joined #ruby-lang
<darix>
now you woke him up :p
AlHafoudh has quit [Quit: Computer has gone to sleep.]
<zenspider>
I'm trying to download the new git/perforce setup so you fuckers will stop bugging me :P
<andrewvos>
zenspider: Looking for some good reads on language parsing
<zenspider>
andrewvos: what sorts?
mupilot has quit [Quit: mupilot]
<andrewvos>
zenspider: Well, I'm looking to build a language and parse it in C. Want to learn more C, which is why I want to do it in C.
ebouchut has quit [Quit: This computer has gone to sleep]
<andrewvos>
zenspider: So anything that pops into your head :)
<zenspider>
what sort of language?
<andrewvos>
langauge=programming language
<zenspider>
a clusterfuck like ruby?
<andrewvos>
zenspider: Something rubyish I suppose
<zenspider>
or something more normal?
mupilot has joined #ruby-lang
<andrewvos>
Hmm, for starters I just want to get methods working really.
<andrewvos>
I guess I'll work up from there.
burgestrand has joined #ruby-lang
<zenspider>
well... the absolute best imhfo is Compiler Construction by Niklaus Wirth, but the man was anal about keeping things clean. It covers LL parsing only but it is amazing.
<zenspider>
you can find the PDF for free online these days
<zenspider>
but I love the paper version because it is TINY
<zenspider>
he taught from that book... it's well proven
sn0wb1rd has joined #ruby-lang
<zenspider>
you'll prolly need to go PDF because it'd cost more to ship it to you than to buy it
<banisterfiend>
andrewvos: are u going to do everything from scratch? your own lexer ? your own parser? or use a generator thingy?
<andrewvos>
zenspider: Thanks I'll dig around amazing
<andrewvos>
amazon*
<darix>
andrewvos: osx?;)
<andrewvos>
banisterfiend: Well, I would like to have the parser done by some other library because it doesn't really interest me that much.
<darix>
hmm
<andrewvos>
zenspider: £80!
<zenspider>
if you want the latest and greatest, I'd suggest poking at ometa out of the vpri group. it can do non-textual parsing so you can write transformative grammars for your trees
<andrewvos>
zenspider: Oh wait, I can get it used for 20
peterc has joined #ruby-lang
<zzak>
zenspider: what about the dragon book?
<andrewvos>
darix: osx?
<zzak>
havent read it myself, but heard good things
<zenspider>
I dislike the dragon book for actual learning / use. it's more of an overly comprehensive survey and for that it is great
<whitequark>
I'd highly recommend EOPL3 on these topics
<whitequark>
and ragel+racc for writing real-world parsers in ruby
<zenspider>
if you really want something as ridiculously complex as ruby, then you're prolly gonna have to go with LR, which I don't like, but works
<andrewvos>
zzak: Broken link
chimkan_ has quit [Quit: chimkan_]
<andrewvos>
zenspider: Well, if I were to rewrite ruby I wouldn't include a lot of stuff. Either way, I don't intend this to ever get anywhere.
<eam>
I'm curious, what are the top syntax changes you'd make (either add or remove) if you had a green field?
benanne has quit [Quit: kbai]
<zenspider>
afaik, ragel will only work for lexing highly regular absolutely static languages... as soon as you need to communicate between the lexer and the parser you're screwed
<seydar>
zenspider: why don't you like LR?
<andrewvos>
Heh, tricky question. The obvious answer would be shit like flip flops. Remove anything not in widespread use.
<zenspider>
whitequark: the ruby parser and lexer bidirectionally communicate to maintain state. it's _horrible_
<zenspider>
we're just shy of perl in terms of unparsability
<andrewvos>
zenspider: Thanks!
<whitequark>
zenspider: only thing I could think of is the static environment
<whitequark>
and I'm pretty sure that can be easily implemented in a ragel lexer if needed
ivanoats has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
datanoise has joined #ruby-lang
<seydar>
zenspider: eloquently stated. any specific complaints?
sn0wb1rd has quit [Quit: sn0wb1rd]
bluepojo has joined #ruby-lang
Averna has joined #ruby-lang
svyatov has joined #ruby-lang
<zenspider>
seydar: compare EBNF with yacc/bison/pretty-much-any-LR-system ... EBNF is MUCH more readable / understandable / maintainable and works MUCH more like how you'd code / think
<zenspider>
that R is a bitch
datanoise has quit [Ping timeout: 246 seconds]
thatdutchguy has quit [Remote host closed the connection]
dr_bob has quit [Quit: Leaving.]
gsav has quit [Ping timeout: 260 seconds]
<crankharder>
why doesn't this work? and is there a better pattern to follow such that i can define a constant in subclasses that ets used in a method in the parent class. i dont have much intention of instantiating and using the method in the parent class: https://gist.github.com/4e41812f68b608ad8fd1
lcdhoffman has joined #ruby-lang
<whitequark>
zenspider: what do you think of Coco/R?
<andrewvos>
crankharder: Use a method?
<whitequark>
I recall finding it quite nice but very unfinished
<whitequark>
er wait, you wrote it
valeri_uF0 has joined #ruby-lang
Bediko has left #ruby-lang [#ruby-lang]
meise_ has quit [Ping timeout: 240 seconds]
jMCg has quit [Ping timeout: 252 seconds]
akahn has quit [Ping timeout: 252 seconds]
randym has quit [Ping timeout: 240 seconds]
valeri_ufo has quit [Ping timeout: 240 seconds]
bluepojo has quit [Quit: Leaving.]
mupilot has quit [Quit: mupilot]
jMCg has joined #ruby-lang
meise has joined #ruby-lang
<andrewvos>
Awkwaaard
kurko_ has quit [Quit: Computer has gone to sleep.]
<zenspider>
whitequark: yeah. lacks polish. definitely in line with wirth's philosophy tho... considering wirth used to guest lecture for the coco/r author
chendo has quit [Ping timeout: 250 seconds]
mistym has quit [Remote host closed the connection]
* zenspider
keeps wishing crankharder would rename to cranksmarter
<seydar>
does anyone know david holroyd's irc nick?
chendo has joined #ruby-lang
<zenspider>
I didn't write coco/r. I wrote coco/r(uby). and yeah. it sucks. I mostly did it as an exercise to port crazy C code to ruby
<zenspider>
it works (well... worked), but it has no doco or anything
akahn has joined #ruby-lang
datanoise has joined #ruby-lang
runeb has quit [Ping timeout: 256 seconds]
afgeneralist has quit [Ping timeout: 256 seconds]
<seydar>
anybody have any experience with ruby-llvm
mwjcomputing has joined #ruby-lang
<andrewvos>
banisterfiend: Shit that coursera stuff looks amazing.
sn0wb1rd has joined #ruby-lang
thatdutchguy has joined #ruby-lang
<banisterfiend>
andrewvos: yeah, and it doesnt skimp on the math too, so u get a deep understanding of regular languages and so on
<banisterfiend>
(it's not hard math)
datanoise has quit [Ping timeout: 264 seconds]
chimkan has quit [Quit: chimkan]
BigO has quit [Remote host closed the connection]
Hakon has quit [Quit: Leaving...]
<andrewvos>
Yeah, as you guessed I'm not the best at math.
Carnage\ has quit []
<banisterfiend>
it's really easy, im not even sure you can call it math really, it's a kind of an algebra he derives for working with regular expressions
davidbalbert is now known as davidbalber|away
thatdutchguy has quit [Remote host closed the connection]
<andrewvos>
banisterfiend: Cool. Wondering how to get all these videos on an iPhone or something.
dankest has joined #ruby-lang
chimkan_ has joined #ruby-lang
<zenspider>
it's discrete math
<andrewvos>
I think watching them at work might get me into a spot of trouble.
jgomez has joined #ruby-lang
<whitequark>
zenspider: yeah, I meant coco/ruby
Hakon has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
aetcore has quit [Remote host closed the connection]
solars has quit [Ping timeout: 248 seconds]
Hakon has quit [Quit: Leaving...]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
r0bglees0n has quit [Ping timeout: 255 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
headius has quit [Quit: headius]
tockitj_ has quit [Remote host closed the connection]