klebervirgilio has quit [Read error: Connection reset by peer]
klebervirgilio has joined #ruby-lang
joevandyk has joined #ruby-lang
fire is now known as firewall
creese has joined #ruby-lang
bzalasky has joined #ruby-lang
tomzx_mac has joined #ruby-lang
<creese>
I can't install ree-1.8.7 on Ubuntu 12.04. It is the same situation described here: http://pastebin.com/E5P3yLM4
<havenwood>
creese: Do you *really, really* need to use 1.8.7?
<havenwood>
creese: It was deprecated due to its advancements being fully replaced by 1.9. 2.0 is a better choice yet. :D
<creese>
well, I'm doing work for a client that uses 1.8.7 and I haven't been able to get rails server to start on my dev box so I'm trying to reproduce their setup as closely as a I can
<creese>
it may not matter, but I don't know what is keeping me from starting the server
<havenwood>
creese: Gotcha. (If you haven't already, be sure to remind client that 1.8's End-of-Life is coming fast, June.
<havenwood>
)
<havenwood>
creese: No more security updates, so pretty important to update.
joevandyk has quit [Quit: joevandyk]
<creese>
hmm
<creese>
well I can't get to to compile so about ready to give up
<havenwood>
creese: Could try RVM to get it working, but I'd prolly just test in vanilla 1.8.7 and beg them to update. :P
<creese>
the problem isn't rbenv, if I dl the tarball, I still won't be able to compile
wmoxam has quit [Read error: Connection reset by peer]
<creese>
it requires a package that is deprecated and the new one doesn't work
<creese>
when you say "vanilla" you mean non enterprise?
wmoxam has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
<havenwood>
ya
jxie has joined #ruby-lang
<creese>
that worked
krohrbaugh has joined #ruby-lang
kurko_ has joined #ruby-lang
jackhammer2022 has joined #ruby-lang
<havenwood>
creese: Should be good enough for specs/tests as long as you aren't doing profiling stuff, i'd imagine.
ryanf has quit [Quit: leaving]
MehLaptop has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
datanoise has joined #ruby-lang
tenderlove has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
pepper_chico has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
methods has left #ruby-lang [#ruby-lang]
AndChat| has quit [Ping timeout: 255 seconds]
Banistergalaxy has joined #ruby-lang
sailias has joined #ruby-lang
MehLaptop has joined #ruby-lang
datanoise has quit [Ping timeout: 250 seconds]
<creese>
do older versions of rails get security updates or do you get the updates by moving to the newest version of rails?
Banistergalaxy has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby-lang
jxie has quit [Remote host closed the connection]
glebm has quit [Ping timeout: 240 seconds]
bzalasky has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
bzalasky has joined #ruby-lang
EvilJStoker has quit [Excess Flood]
glebm has joined #ruby-lang
jxie has joined #ruby-lang
sailias has quit [Quit: Leaving.]
jxie has quit [Client Quit]
bzalasky has quit [Remote host closed the connection]
jxie has joined #ruby-lang
dankest has quit [Quit: Leaving...]
pepper_chico has quit [Quit: Computer has gone to sleep.]
EvilJStoker has joined #ruby-lang
pepper_chico has joined #ruby-lang
EvilJStoker has quit [Excess Flood]
macmartine has joined #ruby-lang
EvilJStoker has joined #ruby-lang
EvilJStoker has quit [Excess Flood]
EvilJStoker has joined #ruby-lang
sush24 has joined #ruby-lang
creese has left #ruby-lang [#ruby-lang]
MehLaptop has quit [Remote host closed the connection]
Domon has joined #ruby-lang
pepper_chico has quit [Quit: Computer has gone to sleep.]
kurko_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 240 seconds]
justinseiter has joined #ruby-lang
kurko_ has joined #ruby-lang
<freedrull>
depends how old
srbaker has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby-lang
MehLaptop has joined #ruby-lang
bzalasky has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
jackhammer2022 has quit [Read error: Connection reset by peer]
sduckett has joined #ruby-lang
spuk has quit [Ping timeout: 245 seconds]
sush24 has quit [Ping timeout: 250 seconds]
sush24 has joined #ruby-lang
Domon has quit [Remote host closed the connection]
sebasoga has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby-lang
<hakunin>
I'm in irb, and I have a string that contains some binary data. I want to turn this data into a literal, assign to a constant, but I'm not sure how to get a valid ruby literal from this binary string. What would be proper way?
bzalasky has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
<eam>
hakunin: what do you mean literal?
wmoxam has quit [Quit: leaving]
neverminding has joined #ruby-lang
neverminding has quit [Client Quit]
rbevers has joined #ruby-lang
kurko_ has quit [Ping timeout: 276 seconds]
kurko_ has joined #ruby-lang
<hakunin>
eam: literal binary data
rbevers has quit [Read error: Connection reset by peer]
<hakunin>
i guess binary string
<hakunin>
cause i need to concatenate it to a string
<hakunin>
(another binary string)
<eam>
if you want to concatenate two strings, try +
<hakunin>
:)
rbevers has joined #ruby-lang
rbevers has quit [Client Quit]
chendo_ has quit [Ping timeout: 240 seconds]
intellitech has joined #ruby-lang
<hakunin>
eam: i'm trying to write a binary string literal in a ruby file, should i just write something like this STR = "\x00\x00\x00\tpHYs\x00\x00.#\x00\x00.#\x01x\xA5?v"
<hakunin>
eam: that doesn't even seem right, the way it's displayed in irb
<eam>
it looks ok to me, I guess I don't understand what's wrong
<eam>
the \x00 is a way to escape a null character
sduckett has quit [Ping timeout: 245 seconds]
dorei has quit []
chendo_ has joined #ruby-lang
spuk has joined #ruby-lang
robbyoconnor has joined #ruby-lang
mistym has quit [Remote host closed the connection]
datanoise has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby-lang
robbyoconnor has quit [Remote host closed the connection]
amerine has quit [Ping timeout: 260 seconds]
amerine has joined #ruby-lang
klebervirgilio has quit [Remote host closed the connection]
torrieri has joined #ruby-lang
klebervirgilio has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
datanoise has quit [Ping timeout: 272 seconds]
<RickHull>
hakunin: a string is a string. are you comfortable with encodings?
<RickHull>
i myself live more in the 1.8 world where all strings are binary/ascii8bit
klebervirgilio has quit [Ping timeout: 250 seconds]
<RickHull>
if you have a binary value inside a string, it's a string
<RickHull>
you can assign it a variable or a constant. it's still a string
<RickHull>
there's nothing tricky about it
<RickHull>
unless you want to talk about encodings
dankest has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 248 seconds]
r0bgleeson has joined #ruby-lang
joevandyk has joined #ruby-lang
<RickHull>
what's a way to monitor a file, e.g. doing a blocking read on something like gets
<RickHull>
i.e. take an action when a new line is written to the logfile
<RickHull>
right now, gets returns nil on EOF, whereas i would prefer it to block
<RickHull>
readpartial says it will block on no data... hmm
torrieri has quit [Quit: Leaving...]
<hakunin>
RickHull: oh hey
<RickHull>
hakunin: binary strings are generally not problematic. are you getting the value from outside your program, like hardcoding into a string literal?
<hakunin>
RickHull: eam: i think you guys underestimate my question a little (my poor explanation). I have some binary data I just generated in irb session, and I want to copy it from the terminal into a text editor to assign it to a ruby constant
<RickHull>
best way to c/p binary is in hex format
<RickHull>
dump the binary to hexadecimal
<RickHull>
copy
<RickHull>
paste
<RickHull>
convert the hex back to binary
<hakunin>
RickHull: how would you do that last part? how would it even show up as a literal?
<RickHull>
pack and unpack will do that with the right incantation
<hakunin>
RickHull: pack is the source of that data in irb, but i want to freeze it in packed form
Domon has joined #ruby-lang
<eam>
hakunin: you should probably encode it in something simple like base64
<RickHull>
yeah base64 is equivalent but more compact
<RickHull>
hex is easier to read by "hand"
<hakunin>
if i store base64 in constant i'd have to do decode every time i read it
amerine has quit [Quit: Computer has gone to sleep.]
<RickHull>
you can store binary in a constant
<eam>
RickHull: you want to implement tail -f?
<hakunin>
basically i just want a bunch of bytes in a constant
<RickHull>
eam basically
torrieri has joined #ruby-lang
<hakunin>
i need literal representation of bytes of data
<RickHull>
hakuninn, imagine str = "\x00"
<RickHull>
str now holds the null byte
<eam>
RickHull: stat the file, when it gets bigger, read again
<eam>
sleep in between
<RickHull>
you can assign that value to a constant or whatever
<RickHull>
eam ew
<RickHull>
i don't want to sleep / poll
<eam>
RickHull: eh that's the mechanism unix offers you
<hakunin>
RickHull: hm, ok just need to convert it from the way it's represented in irb somehow then
<RickHull>
i just want to read and block until there is data
<hakunin>
RickHull: ionotify type of thing? must it be os-independent?
<RickHull>
frankly i don't think inotify is appropriate either
<RickHull>
i can block on a socket read. i.e. read(1)
<eam>
that's because a socket is a stream
<RickHull>
but on a file there is that pesky EOF and read exits / blows up
huydx has joined #ruby-lang
<eam>
RickHull: you can use a fifo
<eam>
but the semantics of plain files are that they have ends
<RickHull>
that's fine except apache keeps appending to it
<RickHull>
so the end is quite fictional
<eam>
well, not entirely
<RickHull>
i would like to read until there is a newline available
mistym has quit [Remote host closed the connection]
<RickHull>
what's the fifo story?
intellitech has quit [Quit: intellitech]
<hakunin>
RickHull: why not actually open a pipe to tail -f stdout?
<RickHull>
assume i'm trying to read the next line that comes into apache access.log
<RickHull>
hakunin: not sure i follow
<RickHull>
i want ruby to read on the io, and give me a line when there's one avilable
<RickHull>
and then i want ruby to process that line
nXqd has joined #ruby-lang
<eam>
RickHull: mkfifo /tmp/myfifo; echo hello world > /tmp/myfifo # blocks ; in another terminal cat /tmp/myfifo
<hakunin>
RickHull: spawn a tail -f on the file via popen to read from its stdout
<eam>
RickHull: if you'd like socket semantics from a named file
<eam>
tail -f will stat and poll
<RickHull>
so it just does the dirty work?
<hakunin>
did not know about tail -f implementation
<RickHull>
i don't mind outsourcing the dirty work
<eam>
you can use abstraction to do the messy stuff or you, but that's how it's gotta happen
<RickHull>
but i'd rather do it more cleanly, fifo sounds interesting
<eam>
RickHull: essentially a named |
<RickHull>
the other way i guess is to literally pipe the log file?
<RickHull>
i'd like to have the option of passing the filename so i can seek to the end
<eam>
yeah, apache has a popen'd logger function
<RickHull>
rather than potentially reprocessing a massive file
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<RickHull>
it just seems to me that there should be a way to open a file for reading and block until i get a newline
<RickHull>
er
<RickHull>
open a file for reading, seek to the end, and block until i get a newline, reeturning the new data
<eam>
there is if you use someone else's code to do it, but at at system level the readline function doesn't exist
sush24 has quit [Quit: This computer has gone to sleep]
<RickHull>
is that what "readline" does?
<eam>
yeah
<RickHull>
interesting
<RickHull>
so i could install the readline package right?
<RickHull>
now what?
<hakunin>
RickHull: the easiest to me seem either popen to tail or redirect log stream in the logging app if you have control over that, but eam knows all these fun things, and generally seems awesome
<RickHull>
hakunin: yeah i agree somewhat
<RickHull>
but i'm thinking it's more decoupled to just pass the filename to the processor
<RickHull>
processor seeks to end and blocks until data
<eam>
RickHull: I meant IO.readline
<RickHull>
it raises EOFError
<RickHull>
i want it to block
<eam>
you can't get that, you'll have to write your own class which handles it and produces an IO.readline-like interface (or find a gem which has done so)
<RickHull>
:why:
<eam>
unix doesn't provide a way to block on reaching EOF
<hakunin>
but it doesn't blcok, it runs up to 100%
<hakunin>
cpu
<RickHull>
i'll just poll every second
<hakunin>
(wtf is with my typing)
<RickHull>
next if file.eof?
<RickHull>
i was really hoping to avoid such filthiness
tomzx_mac has quit [Ping timeout: 276 seconds]
<eam>
you'll really be best off popen()ing tail -F like hakunin suggested if you want something simple
postmodern has joined #ruby-lang
noop has joined #ruby-lang
mistym has quit [Remote host closed the connection]
thebastl has joined #ruby-lang
<RickHull>
yeah... polling works. ugh
<RickHull>
thanks xdD
<RickHull>
xD
<RickHull>
eam: curious, how do you know that "unix doesn't provide a way to block on reaching EOF" ?
bryno has quit [Quit: leaving]
<hakunin>
crazy night today, managed to patch a png stream on the fly, and nobody to talk to about it :(
<RickHull>
eam: i don't doubt it at all. but i don't have that insight. where is it documented or inferred from ?
sn0wb1rd has quit [Quit: sn0wb1rd]
<eam>
RickHull: I'm pretty familiar with it
<RickHull>
ok, let's say i don't believe you
<RickHull>
how would you convince me?
MehLaptop has quit [Remote host closed the connection]
<eam>
read(2)?
<RickHull>
sure
<RickHull>
i don't mean to make you jump through hoops
<RickHull>
reading...
<eam>
no worries, I appreciate curiosity
<RickHull>
don't you agree that the way i would like to operate is useful
achiu has quit [Ping timeout: 246 seconds]
<RickHull>
?
<RickHull>
not whining, just curious if i'm on the wrong track
<hakunin>
i'm surprised select doesn't block
<RickHull>
oh select might work here, hm
<eam>
yes, it's just not something that fits the model. The idea of "blocking until more data is written" well, perhaps the data won't be written past the end of the file?
<RickHull>
yeah i get that perspective, but it's rather constrictive
<RickHull>
esp given the nature of logfiles
<eam>
or perhaps the file is O_APPEND but is truncated
<RickHull>
i think select is the "answer"
<hakunin>
it's actually a good point, if you received an EOF character, wouldn't it be logically inconsistent to keep pushing data? what is it "foobarEOFbazEOF" what kind of EOF is that, NOT AN EOF AT ALL
<RickHull>
it's an EOF at this particular moment
<RickHull>
i'm ok with that
<eam>
there isn't an EOF character, at the system level
<hakunin>
eam: i didn't mean character
<hakunin>
i just said it
<hakunin>
for some reason
<RickHull>
it was illustrative
<RickHull>
if not totally accurate
joevandyk has quit [Quit: joevandyk]
<eam>
sorry, I wasn't sure if you were referring to the ascii value of EOF
<RickHull>
i think it's useful to know that you're banging against the end of the pipe
<RickHull>
but you should be able to, protocol wise, wait until the pipe gets longer or the end opens up
<RickHull>
(choose your metaphor, heh)
<hakunin>
i said that i'm surprised select won't work because of this: "select always returns immediately when used on a file stream: You can always read EOF from that file stream, so your ruby process ends up spinning while it waits for the file to update."
<eam>
you can use notify style triggers (system specific) to see if a file has been interacted with
<eam>
but that's about it
<RickHull>
yeah
<RickHull>
i've done taht before
<hakunin>
you know perhaps you could poll only after EOF
<hakunin>
to avoid spinning
<RickHull>
it just seems kludgey
<RickHull>
i'd just rather block, oh well
sn0wb1rd has joined #ruby-lang
firewall has quit [Ping timeout: 256 seconds]
<RickHull>
i'm actually surprised to find out that i can't, because unix
tonni has quit [Remote host closed the connection]
<eam>
it's one of those things
<RickHull>
yeah
achiu has joined #ruby-lang
<RickHull>
i'm all about constraints
<hakunin>
it almost feels like security issue
<RickHull>
and i bet this is a useful one in many regards
tylersmith has quit [Quit: tylersmith]
<hakunin>
you reach a certain location on disk, it says "do not read further", and closes the stream to make sure you don't. if file changes, the understanding of "further" updates, so you are allowed then, but not while streaming blindly. I am totally making this up.
nooblet has joined #ruby-lang
nooblet has quit [Client Quit]
benlovell has joined #ruby-lang
bodhi32 has joined #ruby-lang
benlovell has quit [Client Quit]
havenwood has quit [Remote host closed the connection]
tonni has joined #ruby-lang
bodhi32 has quit [Quit: Leaving]
bryno has joined #ruby-lang
intellitech has joined #ruby-lang
glebm has quit [Ping timeout: 276 seconds]
glebm has joined #ruby-lang
mjio has quit []
tonni has quit [Ping timeout: 250 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
wallerdev has quit [Quit: wallerdev]
tonni has joined #ruby-lang
nertzy2 has joined #ruby-lang
wardrop has quit [Quit: wardrop]
Wardrop_ is now known as Wardrop
nXqd has quit [Ping timeout: 252 seconds]
iamjarvo has quit [Quit: Leaving.]
nertzy has quit [Ping timeout: 240 seconds]
lele|w has quit [Ping timeout: 264 seconds]
L0rdShrek____ has quit [Read error: Operation timed out]
torrieri has quit [Ping timeout: 250 seconds]
nertzy3 has joined #ruby-lang
nertzy2 has quit [Ping timeout: 255 seconds]
nXqd has joined #ruby-lang
bpot has quit [Ping timeout: 256 seconds]
klebervirgilio has joined #ruby-lang
herpless has quit [Ping timeout: 240 seconds]
pnr has left #ruby-lang [#ruby-lang]
Mon_Ouie has joined #ruby-lang
Spaceghost|cloud has quit [Ping timeout: 245 seconds]
klebervirgilio has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby-lang
dreinull_ has quit [Ping timeout: 248 seconds]
guilleiguaran has quit [Ping timeout: 252 seconds]
beho has joined #ruby-lang
drumond19 has quit [Remote host closed the connection]
nertzy3 has quit [Ping timeout: 250 seconds]
tbuehlmann has joined #ruby-lang
MehLaptop has joined #ruby-lang
krz has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 276 seconds]
jigfox has quit [Quit: jigfox]
dhruvasagar has joined #ruby-lang
nertzy has joined #ruby-lang
JohnBat26 has joined #ruby-lang
guilleiguaran has joined #ruby-lang
wardrop_ has joined #ruby-lang
drumond19 has joined #ruby-lang
apeiros_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
charliesome_ has joined #ruby-lang
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
drumond19 has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
ilyam has quit [Quit: ilyam]
RickHull has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
ryanf has joined #ruby-lang
solars has joined #ruby-lang
beho has quit [Remote host closed the connection]
solars has quit [Client Quit]
solars has joined #ruby-lang
xalei has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
tonni has joined #ruby-lang
jigfox has joined #ruby-lang
klebervirgilio has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
nXqd_ has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
klebervirgilio has quit [Ping timeout: 245 seconds]
MehLaptop has quit [Ping timeout: 255 seconds]
ryanf has quit [Ping timeout: 240 seconds]
kristofferrr has joined #ruby-lang
vlad_starkov has joined #ruby-lang
amerine has joined #ruby-lang
pygmael has joined #ruby-lang
vmoravec has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
<judofyr>
wait, I thought that wasn't supposed to create a MatchData object?
<charliesome>
yeah of course it does
<yorickpeterse>
http://eval.in/11921 heh, one of the cases where the AST is somewhat sane
<charliesome>
judofyr you mean you expected mri to be efficient?
<judofyr>
charliesome: trolololol
benlovell has joined #ruby-lang
<yorickpeterse>
http://eval.in/11923 this is one of the things that annoy me of Ripper, though it makes perfect sense as to why it does that
<judofyr>
yorickpeterse: the Ripper AST isn't really an AST though. it's more like "random stuff that happens if you use a silly default function to the callbacks"
<charliesome>
ripper gives shit output
<charliesome>
yorickpeterse: imagine if you could ruby-lint over real legit methods
<yorickpeterse>
The output is really, really specific to the needs of MRI
<yorickpeterse>
charliesome: hint: it can
<yorickpeterse>
in a limited way though
<charliesome>
how?
<charliesome>
o
<charliesome>
when/if i actually do this iseq -> ast thing you can!
<yorickpeterse>
To solve the problem of C code and such I import stuff from the runtime
<yorickpeterse>
That at least gives me info on parameters and such
<yorickpeterse>
I've been thinking of abusing #source_location to extract the actual code but haven't gotten to it yet
<yorickpeterse>
Also because that won't work for C code
<charliesome>
imagine the amazing ORMs you could do if you could decompile a block's bytecode to an ast
apeiros has joined #ruby-lang
klebervirgilio has quit [Read error: Connection timed out]
<yorickpeterse>
Either that's very hard or next to impossible
<charliesome>
yorickpeterse: hm?
<yorickpeterse>
Because an AST isn't a 1:1 mapping of the bytecode
<charliesome>
decompiling bytecode to an ast?
<charliesome>
it's entirely possible
<charliesome>
the bytecode is super high level
<yorickpeterse>
You can do it, but it will be something that looks different than the original AST
<charliesome>
not in mri he he he
<dbussink>
yorickpeterse: did you guys check out how the mutant gem does it?
<yorickpeterse>
mutant?
apeiros_ has quit [Ping timeout: 245 seconds]
<charliesome>
well some ultra high level things like regex local var stuff comes out differently
<dbussink>
it basically uses the rubinius parser wrapper into a gem
<charliesome>
but you end up getting a simpler AST
<dbussink>
and uses that ast to transform stuff
klebervirgilio has joined #ruby-lang
dhruvasagar has quit [Quit: Lost terminal]
<yorickpeterse>
dbussink: you mean the melbourne Gem?
<dbussink>
yorickpeterse: it uses the mutant-melbourne gem
<yorickpeterse>
Hm, I recall melbourne doesn't store column numbers
<yorickpeterse>
hence I couldn't use it
<yorickpeterse>
Same goes with basically every other parser out there
krz has quit [Quit: krz]
klebervirgilio has quit [Ping timeout: 255 seconds]
<dbussink>
yorickpeterse: ah, well, would be nice to add perhaps then :)
<dbussink>
what are you using columns for?
klebervirgilio has joined #ruby-lang
io_syl has joined #ruby-lang
<yorickpeterse>
They're pretty crucial for adding notifications :)
<yorickpeterse>
"Undefined variable on line 205" isn't very helpful if that line has a lot of stuff on it
io_syl has quit [Client Quit]
cultureulterior has joined #ruby-lang
<dbussink>
ruby has gotten away with it for a long time already :P
<yorickpeterse>
Ripper is annoying but at least it allows me to say "Undefined variable on line 205, column 5" without having to use regular expressions to figure the column out myself
<yorickpeterse>
Somewhere in the back of my head I want to extract these bits into a more generic "Ruby compiler" toolkit
<yorickpeterse>
though that won't happen for at least another year
<yorickpeterse>
Then hopefully one day people stop writing parsers in regular expressions and just use that to save them 80% of the work
Mon_Ouie has quit [Ping timeout: 255 seconds]
dzhulk has joined #ruby-lang
<dbussink>
yorickpeterse: it shouldn't be that hard with what for example melbourne provides and add things like comments and column numbers
<dbussink>
although you have to muck with parse.y from mri, but it'll be as compatible as you'll get
beiter has quit [Quit: beiter]
<yorickpeterse>
dbussink: I talked with brixen about Melbourne and he mentioned they are rewriting it
<yorickpeterse>
So for the time being I'll stick with Ripper
<dbussink>
it's going to be split up in 1.8, 1.9 and 2.0 gems
<yorickpeterse>
However, the moment somethings comes along that works on the different platforms and is somewhat sane I'll use it
<yorickpeterse>
Yeah
<dbussink>
that's also why there is mutant-melbourne atm, so they can continue with that
<charliesome>
yorickpeterse: are they keeping the name melbourne?
<charliesome>
i'm quite attached to that name personally
<dbussink>
it's been called melbourne for quite some time already
<yorickpeterse>
charliesome: as far as I know, yes
<yorickpeterse>
also move to a real country
<charliesome>
oi
<charliesome>
easy mate
<yorickpeterse>
I'll smash ya
<charliesome>
you're dead
<yorickpeterse>
haha
<judofyr>
maybe I should write an Oslo gem
<judofyr>
doesn't sound so catchy though
<charliesome>
judofyr: ruby already has all the functionality
<judofyr>
zzak? Hey, zzak? zzak? zzak! zzak O'Conners? zzak O'Conners, I thought that was you!
tonni has quit [Remote host closed the connection]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
melter has joined #ruby-lang
<zzak>
:D
jmeeuwen has joined #ruby-lang
<judofyr>
BING!
<zzak>
judofyr: whats next for tilt? camping support?
<judofyr>
zzak: :D
<judofyr>
zzak: well, I have a 1.3.5 bug fix release pending
<judofyr>
zzak: and 1.4 is encodings
JohnBat26 has quit [Ping timeout: 272 seconds]
<zzak>
judofyr: awesome
<zzak>
judofyr: keep up the good work!
<zzak>
judofyr: one of the burlington ruby conf organizers is a huge fan of camping and shoes, you should come give a talk on camping or whatever! http://burlingtonruby.com/
<judofyr>
zzak: /me actually looks up Vermont on the map
<judofyr>
so *that's* where it us
tomzx_mac has quit [Ping timeout: 272 seconds]
<zzak>
its there
blacktulip has joined #ruby-lang
<judofyr>
is*
<judofyr>
zzak: is it nice?
linc01n has joined #ruby-lang
<judofyr>
zzak: in august?
thone has quit [Ping timeout: 272 seconds]
thone_ has joined #ruby-lang
<zzak>
beautiful
djwonk has joined #ruby-lang
<judofyr>
"Your subscription to our list has been confirmed."
<zzak>
:D
<judofyr>
maybe maybe
DanielZ has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<judofyr>
banisterfiend: I was actually wondering about that recently…
joevandyk has joined #ruby-lang
<judofyr>
didn't knew about __callee__
<banisterfiend>
it's very cool, i've been wanting this for a while
<judofyr>
banisterfiend: what do you want to use it for?
<zzak>
banisterfiend: someone had but im not sure they did it right
<zzak>
rb_f_callee_name and rb_f_method_name
<banisterfiend>
judofyr: use it in pry to get the right method object. basically if someone gives us a Binding we want to find the method captured by that binding, you can generally use __method__ and then method(__method__) to get the Method object, but that breaks down in cases the method has been renamed
<zzak>
judofyr: i am working my way through k&r now
<judofyr>
zzak: cool. how is it?
gustavnils has joined #ruby-lang
<banisterfiend>
judofyr: we can still find it by scanning the method table and looking for a method of the same source_location etc, but it's nicer if we can just call method(__callee__)
<judofyr>
banisterfiend: won't the method object be the same?
<zzak>
judofyr: very good, but confusing. i worked through the intro chapter and going back and doing the exercises now
<judofyr>
banisterfiend: or do you want to show the right method name?
<zzak>
dont like how they reference "the old way", before ansi, so much but youll have that with a 20 year old book
<banisterfiend>
judofyr: i'm thinking of this situation: class Hello; def hello; binding; end; alias_method :old_hello, :hello; def hello; "blah "blah; end; end
<judofyr>
banisterfiend: ah, right
<judofyr>
banisterfiend: I guess this occurs in alias_method_chain?
<banisterfiend>
judofyr: exactly :( so it's too common for us to ignore
<judofyr>
banisterfiend: has anyone integrated Pry with Rack?
<judofyr>
banisterfiend: I know about charliesome's better_errors, but that's just caller_of_binding, right?
mercwithamouth has quit [Ping timeout: 256 seconds]
nXqd has joined #ruby-lang
<zzak>
whitequark: awesome thanks, i prefer deadtree books for some reason
apeiros_ has joined #ruby-lang
<whitequark>
k&r is old enough to be fossilized :D
<zzak>
petrefied
gnufied has joined #ruby-lang
carloslopes has joined #ruby-lang
willywos has joined #ruby-lang
<whitequark>
oh right
<apeiros_>
what does the cooper say? "he was peterfied!" (petrified ;-p)
<whitequark>
apeiros_: I didn't get that
cyri_ has joined #ruby-lang
<apeiros_>
no worries. it's lame anyway.
<zzak>
lol
<apeiros_>
zzak wrote "petre-fied", I read it as "peter-fied", and the cooper is from peter cooper. no, it doesn't make much sense :)
<whitequark>
oh :D
* whitequark
has just realized that fossilized and petrified correspond to same adjective in russian
<whitequark>
or maybe that's participle
zmack has joined #ruby-lang
madish has quit [Quit: ChatZilla 0.9.90 [Firefox 16.0.1/20121026125834]]
sush24 has quit [Quit: This computer has gone to sleep]
zmack has quit [Remote host closed the connection]
mercwithamouth has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
tdy_ has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
<mehwork>
i know ruby doesn't have a ++ operator but how come in pry> when i do i = 10 then do i++ i now says 20, but only the first time i type i, then it goes back to 10?
<mehwork>
it seems to double any number temporarily
sailias1 has joined #ruby-lang
sailias has quit [Ping timeout: 245 seconds]
<whitequark>
mehwork: it's parsed as i.+(+i)
<apeiros_>
mehwork: you can see that it's continuation prompt
<apeiros_>
well, at least in my config, I can see
<apeiros_>
[4] pry(main)> i++
<apeiros_>
[4] pry(main)* i
<apeiros_>
the * means "continued expression"
<apeiros_>
and then what whitequark says - the thing becomes i++i, which is i.+(i.+@())
mytrile has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
mistym is now known as mistym_meeting
<whitequark>
+@ is an unary plus
melter has quit [Ping timeout: 245 seconds]
<darix>
mehwork: i+=1
MaddinXx has quit [Remote host closed the connection]
runeb has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
gregmoreno has joined #ruby-lang
<mehwork>
practice = p "Thanks #{whitequark} #{aperios_}"; puts "Sorry, I just need all the practice I can get right now. Which is why I said #{pracrtice}"
benlovell has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
<mehwork>
undefined local variable pracrtice :(
sailias1 has quit [Ping timeout: 272 seconds]
benlovell has quit [Client Quit]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 245 seconds]
gregmoreno has quit [Ping timeout: 245 seconds]
<darix>
mehwork: also the return value of "p" is not really interesting. ;)
joevandyk has quit [Quit: joevandyk]
knoxy has joined #ruby-lang
<mehwork>
practice = "Thanks #{whitequark} #{aperios_}"; puts "#{practice}. Sorry, I just need all the practice I can get right now."
<mehwork>
practice += ' darix'
<apeiros_>
and now I'm an aperios :-p
* mehwork
gives whole new meaning to pryrc
iamjarvo1 has quit [Quit: Leaving.]
<darix>
apeiros_: better than being an inkjet!
<darix>
^^
<apeiros_>
or fried judo
<darix>
i wonder if he has the hilight configured for it by now ;)
<apeiros_>
judofry, have you a highlight on fried judo?
<apeiros_>
*do you have
<apeiros_>
blehnglish
levifig has quit [Excess Flood]
levifig has joined #ruby-lang
bzalasky has joined #ruby-lang
<whitequark>
inkjet
jigfox has quit [Quit: jigfox]
<mehwork>
i still don't get what the . operator does in this context. e.g., pry> i = 10 pry> i . pry* i => (0+10i)
francisfish has quit [Remote host closed the connection]
<banisterfiend>
mehwork: your pry prompt is pretty feeble ;)
<mehwork>
why do dynamic languages like ruby have to return something rather than nothing from methods? I.e., why couldn't ruby be designed to return void from its methods?
Eising has quit [Ping timeout: 252 seconds]
Eising has joined #ruby-lang
sebasoga has joined #ruby-lang
sebasoga has quit [Read error: Connection reset by peer]
<apeiros_>
mehwork: and the difference between void and nil being?
<apeiros_>
ruby is designed this way to make coding in it convenient/comfortable
<mehwork>
nil.class # => NilClass. but void wouldn't belong to anything and in C is illegal to try to evaluate against
<bougyman>
ruby isn't C
<mehwork>
i know i'm just curious on a theoretical level if it would be possible
<bougyman>
no. methods return their last evaluated statement
<mehwork>
becaues the articles i read just say "ruby and dynamic languages like it, _have_ to return something, which is why they return nil"
<mehwork>
bougyman: ok, that makes sense then
<bougyman>
and even an empty method will return nil
<bougyman>
def foo;end; foo => nil
<apeiros_>
mehwork: such a "value" would make no conceptional sense in ruby. the absence of a value is represented by nil already.
justinram has joined #ruby-lang
ilyam has quit [Quit: ilyam]
<mehwork>
right, i'm just more curious as to if it's possible to create such a non value in a non statically typed language
<apeiros_>
mehwork: javascript has undefined
pygmael has quit [Quit: pygmael]
<apeiros_>
but javascript has non-object primitives
mercwithamouth has quit [Ping timeout: 256 seconds]
sepp2k1 has quit [Remote host closed the connection]
djwonk has quit []
amerine has joined #ruby-lang
davidbalbert is now known as davidbalber|away
injekt has quit [Ping timeout: 246 seconds]
injekt has joined #ruby-lang
shtirlic has quit [Ping timeout: 260 seconds]
benlovell has quit [Quit: Zzz]
Guest43432 has left #ruby-lang [#ruby-lang]
Criztian has quit [Remote host closed the connection]
<Paradox>
guess ill just use rbenv to delete it and reinstall
<Paradox>
i only have like 20 gems
<Paradox>
oh nvm, heh
srbaker has quit [Quit: Computer has gone to sleep.]
zigidias has joined #ruby-lang
<havenwood>
Paradox: I had 2.0.1 probs too >.>
mistym has quit [Remote host closed the connection]
alessio_rocco has quit [Quit: leaving]
alessio_rocco has joined #ruby-lang
<havenwood>
Paradox: No issues with 2.0.2 :)
<Paradox>
yeah, i'm recompiling it now so i can easily update
<Paradox>
i tried the various downgrade strategies
<Paradox>
and they didnt work and this requires less mental work on my part
<Paradox>
slower but hey
alessio_rocco has quit [Client Quit]
<Paradox>
gives me time to have a beer
<Paradox>
:D
alessio_rocco has joined #ruby-lang
<havenwood>
Paradox: I actually did the same, use chruby so i just rebuilt Ruby 2 from source to get RubyGems 2.0.0 (was feeling lazy) and ran my gem install script.
<Paradox>
thats basically what i did
alessio_rocco has quit [Client Quit]
alessio_rocco has joined #ruby-lang
<Paradox>
`rbenv global 1.9.3-p374;rbenv uninstall 2.0.0-p0; rbenv install 2.0.0-p0`
<Paradox>
yay for fish shell
__Big0__ has quit [Remote host closed the connection]
alessio_rocco has quit [Client Quit]
alessio_rocco has joined #ruby-lang
jondot has quit [Ping timeout: 276 seconds]
davidbalbert is now known as davidbalber|away
alessio_1occo has joined #ruby-lang
mantono has quit [Quit: Don't panic]
ohcomely has quit [Quit: Leaving...]
breakingthings has quit []
torrieri has quit [Quit: Leaving...]
outoftime has quit [Quit: Leaving]
outoftime has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 240 seconds]