Hakon|mbp has quit [Read error: Connection reset by peer]
tbuehlmann has quit []
joooooo has joined #ruby-lang
Caius has joined #ruby-lang
setmeaway has quit [Ping timeout: 246 seconds]
seanstickle has joined #ruby-lang
joooooo has quit [Read error: Connection reset by peer]
setmeaway2 has quit [Read error: Connection reset by peer]
setmeaway has joined #ruby-lang
QaDeS_ has joined #ruby-lang
setmeaway2 has joined #ruby-lang
<zenspider>
how many of you guys use CDPATH ?
QaDeS has quit [Ping timeout: 245 seconds]
<drbrain>
I do
<zenspider>
you don't count
andrewhl has quit [Remote host closed the connection]
<drbrain>
☹
setmeaway has quit [Ping timeout: 250 seconds]
tenderlove has joined #ruby-lang
QaDeS_ has quit [Quit: Ex-Chat]
ezkl has joined #ruby-lang
setmeaway2 has quit [Read error: Connection reset by peer]
joooooo has joined #ruby-lang
joooooo has quit [Read error: Connection reset by peer]
joooooo has joined #ruby-lang
<imperator>
not i; what's it fer?
ezkl has quit [Client Quit]
saLOUt has quit [Quit: Konversation terminated!]
sepp2k has joined #ruby-lang
drdr has joined #ruby-lang
rmascarenhas has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
<tintin>
drbrain: Hi brain, how are you?
<tintin>
tenderlove: Hi love
brianpWins has quit [Quit: brianpWins]
* tintin
is reading the file , compile.c
jakko has joined #ruby-lang
perryh_away is now known as perryh
<zenspider>
imperator: you even use unix these days? I thought you were all windows all the time?
<imperator>
zenspider, my desktop is actually snow leopard, though i have a solaris, ubuntu and xp vm on it, too
ben_m` has joined #ruby-lang
<imperator>
my laptop is windows
drdr has quit [Quit: Page closed]
<imperator>
i have a windows bootcamp partition on the desktop, mainly for playing games
<tintin>
ruby on windows? Why? What's wrong using ruby on linux system?
<tintin>
It's a pain to use rails on windows
ben_m has quit [Ping timeout: 246 seconds]
<zenspider>
imperator: what shell do you use?
<imperator>
on windows? cmd shell
<zenspider>
gah. no. I'd NEVER ask that question. :P
<imperator>
although i guess i just downloaded a new one that's a little nicer i should start using
<tintin>
bash
<imperator>
oh, on osx i use the terminal/bash
<zenspider>
imperator: ah. cool. then `man bash` and look for CDPATH. I find it really useful. writing up a blog post about it now.
<tintin>
I have a question
<zenspider>
you have many. most of them bad
banisterfiend has joined #ruby-lang
<tintin>
Both php and ruby are written in C, some say php is faster than ruby, how is it possible, what makes some programmin language faster or slower, both writen in C ~
<zenspider>
many more sleeps in ruby
<imperator>
tintin, architecture
<tintin>
If we can know the reason of being slower or faster, then we can make the ruby faster changin/customizing/editing ruby source code
arooni-mobile has joined #ruby-lang
<imperator>
sometimes we can; sometimes we can't
<tintin>
Why can't we?
<lianj>
better use php as its faster
<zenspider>
yup
<tintin>
"use other language" , that's not a solution
<imperator>
zenspider, looked at CDPATH; dunno, guess i feel like it would just confuse me
Z33K|Lux has joined #ruby-lang
<tintin>
Rather we can do something in ruby source code to improve.
<imperator>
tintin, feel free to submit patches if you feel that way; make sure they're tested
<drbrain>
I have my the directory with all my git repositories in CDPATH
<tintin>
I will use github to do pull request, but that's a long way to go
<lianj>
remove all the locks!
tomzx has joined #ruby-lang
<drbrain>
so I can cd mechanize; cd net-http-persistent; etc.
<tintin>
imperator: What's wrong with ruby architecture?
<tintin>
Doe mruby have different architecture to solve these problems?
<tintin>
S/Doe/Does
ben_m` is now known as ben_m
<zenspider>
this is painful
<imperator>
tintin, how fast is fast enough?
<tintin>
zenspider: What? What is painful?
<tintin>
imperator: I don't know how they measure fast or slowness, but i heard and read in many websites, they say php is faster, they have some benchmarks result though
<lianj>
you either trolling or beeing too naive
gix has quit [Ping timeout: 265 seconds]
<zenspider>
lianj: not mutually exclusive?
<imperator>
tintin, oh, you "heard" that did you?
ben_m has quit [Quit: Leaving]
<tintin>
imperator: I heard and read from websites
tenderlove has quit [Remote host closed the connection]
bryancp has quit [Remote host closed the connection]
<tintin>
imperator: What's wrong with ruby architecture?
<lianj>
you question is more complex, same as you stating "some ppl say"
<tintin>
zenspider: That README.EXT, This document explains how to make extension libraries for Ruby.
<tintin>
zenspider: I'm not going to do extension, rahter , i'm trying to debug and prinf(); values from c code
<lianj>
some ppl say php is "a fractal of bad design", they have lots of followers
gix has joined #ruby-lang
udzinari has joined #ruby-lang
<tintin>
Please leave all argument, i just want to work with ruby source code
<tintin>
I'm trying to understand ruby source code , how it works internally
<imperator>
why?
<postmodern>
tintin, use gdb to debug extensions
<tintin>
Can you provide some good documentation to debug ruby source code(.c cod)
jakko has quit [Ping timeout: 246 seconds]
<postmodern>
tintin, gdb
<tintin>
imperator: What's wrong with working with ruby source code?
<tintin>
postmodern: Yes, i'm using gdb
<postmodern>
tintin, use break points instead of printf()s
<postmodern>
tintin, also consider using FFI if you just need to bind to a library
<oddmunds>
a google alert is another way of saying i love you.
<dominikh>
zenspider: sure, hold on a second
<mikkelb>
*cuz it's finger lickin' good*
<dominikh>
oh, february of this year as well
<mikkelb>
*it's finger lickin' good*
<mikkelb>
yeah bwoy
macmartine has joined #ruby-lang
<tintin>
What are you talkin about?
<tintin>
Why is July 2011?
<tintin>
Or February this year?
<zenspider>
tintin: we show plenty of respect to newcomers.... 1) it sounds like you're not a newcomer... and 2) you've outstayed your welcome by a long shot. 3) Your inability/unwillingness to look up ANYTHING on your own makes you a help vampire. See http://slash7.com/2006/12/22/vampires/ -- Please read and follow "If You’re a Help Vampire…"
<tintin>
How many years did it take for you to understand ruby source code?
kurko__ has quit [Quit: This computer has gone to sleep]
<zenspider>
I certainly didn't come to any understanding by asking imperator a million inane questions in rapid succession.
macmartine has quit [Remote host closed the connection]
<imperator>
well, he did, but it was in #sex
<zenspider>
that's TOTALLY different
<imperator>
true
<tsou>
zenspider: hah, nice link ;)
Boohbah has joined #ruby-lang
<imperator>
zenspider, man, i didn't realize she posted that 6 years ago already; now i feel old
<tintin>
I didn't say that i'm new comer for ruby, but newbie to understand ruby "source code"
<tintin>
Try to grep from logs with my nickname about ruby source code question, not about using ruby related question
<tintin>
I didn't start asking question about ruby source code from 2011 , :) lol
<tintin>
lianj: dominikh ^
<dominikh>
if you're not new to ruby, and started using it last year, why did you have to ask if it's a functional programming language just recently?
<erikh>
trollpires I tell ya
<dominikh>
plus it's _besides the point_. your inability to help yourself is the point.
<erikh>
they're gonna be a thing
<erikh>
like black frames and skinny jeans
<tintin>
dominikh: Did i ask it here?
neoesque has joined #ruby-lang
<dominikh>
yes. bad planning on your side I guess.
<tintin>
dominikh: What's wrong with that question? Because theere are some misconception among many , even among you about the definition of functional programming language
<imperator>
erikh, i wear my black frames without lenses
<dominikh>
2012-02-19.log:2012-02-19 03:56:05 manhunter hi, is ruby functional language or procedural language?
<erikh>
imperator: hawt
<tintin>
Yes, that's ok because wikipedia definition can be confusing
<dominikh>
plonk
<tintin>
for functional and procedural language
<erikh>
dominikh: sounds like the right approach
<erikh>
now how do I do that in weechat?
<tintin>
Definitely dominikh is against me for some reason,
<erikh>
it's /filter or something right?
<tintin>
erikh: What do you want to do in weechat?
<seanstickle>
I see our local immigrant from Trollheim is still in residence
<tintin>
erikh: Weechat logs are in .weechat/logs
<erikh>
dominikh: nvm, got it
<dominikh>
erikh: /ignore add ~manhunter@unaffiliated/manhunter freenode (assuming your server is named freenode) – or play with filter if you don't want to completely throw away the messages
<whitequark>
dominikh: haha, that's nice one however. he uses a Ruby grammar in Lisp. I wonder where he got that. Emacs mode maybe?..
<jaimef>
String#should is from shoulda gem?
<dominikh>
whitequark: it states the source of the grammar in the repo description. and no, the emacs mode doesn't have a proper grammar at all
<erikh>
jaimef: probably, or rspec.
<jaimef>
ahh right
<whitequark>
cout: * Pathetically, ridiculously slow (ok, compiler-compilers are hard...)
<whitequark>
* Error handling is very minimal right now.
<whitequark>
erm
* erikh
whips up the magical parser that nobody's built
<erikh>
well volunteered
<whitequark>
hm I have an idea
<whitequark>
rubinius should have a parser
agilob has quit [Ping timeout: 252 seconds]
<erikh>
probably!
<whitequark>
well just guessing :)
* jaimef
thought matz wrote one in elisp
<dominikh>
the ruby-mode for emacs just uses a bunch of "get it right 99% of the time for syntax highlighting" regular expressions.
<dominikh>
there's zero understanding of the language itself in there
<whitequark>
dominikh: maybe. I just recall matz talking about ruby-mode and that "there probably would be C curly braces in Ruby if I couldn't write a emacs mode for do..ends"
<erikh>
mruby probably has a nice, minimal parser
* erikh
checks
<erikh>
haha maybe not
nazty has joined #ruby-lang
<erikh>
there's a lot of extra stuff in there though
<erikh>
fsvo "extra"
bryancp has joined #ruby-lang
<Harzilein>
erikh: hmm
msaffitz has joined #ruby-lang
<whitequark>
yeah, rubinius has a very nice and complete parser without all of the weird stuff like racc
<whitequark>
gem install melbourne
agilob has joined #ruby-lang
_whitelogger has joined #ruby-lang
bfreeman has joined #ruby-lang
tintin has quit [Ping timeout: 272 seconds]
tintin has joined #ruby-lang
tomzx has quit [Killed (rowling.freenode.net (Nickname regained by services))]
wpaulson has joined #ruby-lang
pygmael has quit [Quit: pygmael]
<zenspider>
jaimef: just popping back in... you figure it out?
msaffitz has joined #ruby-lang
<jaimef>
zenspider: yeah
<jaimef>
had to think... feels good should do it more often :P
<dominikh>
more people should do it
<zenspider>
you might want scan instead of split
<zenspider>
"2 + 2".split(/\b/).map(&:strip)
<zenspider>
that's a seriously limited thing... it couldn't do strings for example
<zenspider>
but at some point, you'll need something more complex. look at strscan
<whitequark>
I have finally decided on the design of the compiler
<zenspider>
cool
<whitequark>
first, a little analogy. in C, a compiler has three passes: parsing, which produces the exact AST which needs to be codegen'd, translation, which turns the AST into an IR, and optimization, which transforms IR into the same IR but more fast. I intentionally omit everything that comes next
<whitequark>
e.g. with LLVM, you can just run the resulting IR
<whitequark>
in Ruby, you cannot do that, as the process which is analogous to parsing C code is turing complete by itself
<whitequark>
so, I'll just write a Ruby interpreter in Ruby which will load everything into a virtual image. after this stage, the class hierarchy will be formed out of regular Ruby objects, and the method bodies will be stored as unoptimized ASTs
<whitequark>
at a certain point, the compiler (I'm tempted to call this process "cross-compiling", as it has some similarites to the well-known process) is called
<zenspider>
in this case the term is bootstrapping.
igotnolegs has joined #ruby-lang
<zenspider>
you might want to read the paper on the history of squeak, if you haven't already
<whitequark>
yeah, it depends on which camp you are in
brianpWins has joined #ruby-lang
<whitequark>
hm, I'll do
<zenspider>
also the papers by ungar on self
<whitequark>
well, when the compiler is called, it does a whole-program target-independent optimization (DHM inference, and then beta-reduction and eta-expansion, basically), and launches a target-specific codegen
<whitequark>
key parts of this approach are: first, the standard library will differ across targets. Fixnum implementation would be vastly different for x86 codegen (no, I won't actually make one), JavaScript codegen and small-scale ARM codegen
<whitequark>
while this makes the language "less Ruby", it also allows one to build efficient applications. it's a tradeoff, but mandating the strict support in all case won't work for, well, all cases
<whitequark>
of course, the target-dependent behavior should be reimplemented for the bootstrap process.
<whitequark>
second, target-specific codegens could also restrict available features
<whitequark>
it isn't hard for JavaScript codegen to provide const_set and define_class at all (just extend a {}), but for ARM codegen it would impose a huge runtime penalty (i.e. loading entire constant tree in RAM)
<whitequark>
so, a small-scale ARM codegen could just omit this functionality (as an advanced variant, omit it if it is not used). you don't really want to define classes at runtime there.
<whitequark>
unlike the traditional JIT approach, the fact that it is entirely Ruby-aware allows to make more strong decisions
umttumt has quit [Remote host closed the connection]
<zenspider>
sounds like you have a nice project
chendo_ has quit [Quit: Leaving...]
chendo_ has joined #ruby-lang
<whitequark>
yeah, I think so :)
bryancp has quit [Remote host closed the connection]
<whitequark>
the JavaScript backend is more of a collateral outcome, it's just very easy to write
sandbags has quit [Read error: Connection reset by peer]
<whitequark>
I badly want to get anything better than C in embedded world. something that can be compiled statically, be fast, and _still_ be a proper safe language
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
<whitequark>
if you can do static analysis, you can make amazing things. e.g. if a certain allocated object doesn't escape its current scope, then you can allocate it on the stack, saving heap access
<whitequark>
I thought that Lisp folks might already done that, but no: there are no sane implementations of anything similar
jakko has quit [Ping timeout: 246 seconds]
slyphon has quit [Quit: WeeChat 0.3.7]
<whitequark>
I'd even introduce optional typing. it seems that even the best compilers (Closure, for example) still work better with explicit typing information, and I can easily see where this could help a lot in Ruby
<whitequark>
e.g. a single #send on an unspecified type could destroy every method lookup optimization in the entire program
<whitequark>
tintin: if you explore Ruby MRI code a lot, consider using http://rxr.whitequark.org/, it was done specifically for that task
<whitequark>
btw, what's wrong with that value?
<whitequark>
it refers to a heap-allocated object as expected
livinded has quit [Ping timeout: 246 seconds]
<tintin>
gdb ./ruby, then (gdb)run > ctrl+c > (gdb)break rb_ary_initialize > (gdb)continue > arr=Array.new(3) > arr[0]=100 > puts arr[0] > ctrl+d > (gdb)print ary = $1 = 137753640 , how is 137753640 calculated? It should return 100
<zenspider>
whitequark: the self runtime has some very powerful concepts in it you might want to look at. maybe not something you want in an embedded system... but I could maybe see persisting an optimized system and re-running it in an embeddded system.
<zenspider>
we're not here to teach you everything about how ruby internals work. you CLEARLY have not read README.EXT as I suggested last night. and you CLEARLY don't have any intention of actually doing any of the learning you need on your own
<zenspider>
at this point, I'm highly tempted to ban you... let you stay in here, but not speak
<tintin>
zenspider: I have read README.EXT
<seanstickle>
I thought we all knew tintin was a troll. He's been asking this Ruby internals "I just want to learn" spiel for the last 2 months.
woollyams has joined #ruby-lang
<bnagy>
amen
<zenspider>
you've given me absolutely no reason not to. you haven't bothered to learn ruby. you haven't bothered to learn C. and you want us to somehow teach you both of them
<tintin>
No,
<tintin>
I know both C and ruby very well
<zenspider>
no, you really don't
<zenspider>
if you knew it "very well", you wouldn't have asked the questions you did last night.
<drbrain>
tintin: or right now
corsican has quit [Read error: Operation timed out]
wpaulson has joined #ruby-lang
<tintin>
I was confuse, should i add this line directly in source code (array.c) then re-compile-reinstall "TYPE(ary)"
<whitequark>
reading the logs, yes, I see why do you say so.
<tintin>
whitequark: http://rxr.whitequark.org/mri/source/array.c , specifying line with link is not possible here, but searching facility is good, to paste code with line number i'm using github now
brunocoelho has quit [Remote host closed the connection]
livinded_ has joined #ruby-lang
<whitequark>
zenspider: the squeak article is quite interesting, but why do they treat graphics as a first-class concept? Apple specifics?
<whitequark>
I won't consider bitblt an essential instruction, at least now
<whitequark>
ah wait, smalltalk vm was the single application running on the machine. now it makes sense.
<whitequark>
The real challenge, however, involves operations between RGB and table-based color depths. In such cases, or when wanting more control over the color conversion, the client can supply BitBlt with a color map. This map is sized so that there is one entry for each of the source colors, and each entry contains a pixel in the format expected by the destination. It is obvious how to work with this for source pixel sizes of 8 bits or less (map si
<whitequark>
err, sorry for the accidental noise
kurko_ has quit [Quit: Saindo]
msaffitz has quit [Quit: Computer has gone to sleep.]
perryh is now known as perryh_away
<zenspider>
whitequark: that's smalltalk for ya. learn the history of smalltalk to see why they consider it essential
zmack has joined #ruby-lang
<whitequark>
yeah, I see now
srawlins has joined #ruby-lang
<srawlins>
anyone willing to help me compile custom ruby 1.9 sources? I'm taking MRI and re-implementing bignum; i get a segfault linking miniruby...
<whitequark>
zenspider: do you have links to Ungar's pdfs handy? I can't find them easily
<whitequark>
srawlins: why would you want to do that?
<srawlins>
i think equal parts: for speed, and add'l functionality
seanstickle has quit [Quit: Nihil sub sole novum]
<whitequark>
what functionality do you miss and why cannot you implement it in Ruby?
<whitequark>
as per speed, IMO it's already fast enough
<whitequark>
I'd say it cannot be made faster easily
<srawlins>
i disagree
<zenspider>
srawlins: segfault on linking?!?
<srawlins>
i think writing a bridge to an existing C bignum library could be pretty cheap, and yield great results
<zenspider>
I'm confused srawlins... why reimplement bignum? it's already C
<whitequark>
bignum in MRI is an existing C library
<srawlins>
well... sorry. maybe not on linking. last two lines in `make` are linking miniruby
<srawlins>
so what i've done is replace bignum.c with a new file, taken care of all of the initial compilation problems. the new file requires mini-ruby.h
<srawlins>
so ive been wrestling with getting the build scripts to incorporate mini-gmp.h, so var i've just added it to common.mk
<zenspider>
ok... ANY segfaults coming from an unadulterated ruby. :)
<srawlins>
right
<whitequark>
zenspider: thanks
umttumt has joined #ruby-lang
<zenspider>
srawlins: I'd suggest starting off by building up a separate ext
<srawlins>
i have
<zenspider>
call it xbignum or somesuch but leave the old bignum around
<srawlins>
i have, the gmp gem
<zenspider>
ok. I thought you might be ripping out bignum and fully replacing it
<zenspider>
too big a jump
<srawlins>
sure
<srawlins>
it looked to me like atomic.h was recently added to ruby, so i looked in svn log for what else was committed at the same time as atomic.h, the new file
<zenspider>
I'm not familiar
<srawlins>
i think it was just common.mk... and vm_core.h, and signal.c
<whitequark>
header files aren't compiled as standalone entities
<srawlins>
er-- yeah. mini-gmp.h and mini-gmp.c
<whitequark>
references to them in the build system is only for dependency checking
<zenspider>
1 year old now. hrm. I'm falling behind :)
msaffitz has joined #ruby-lang
<srawlins>
gdb shows that miniruby is segfaulting very early on, main.c:37, into eval.c:52...
<srawlins>
if anyone could explain what miniruby is, that might help.
<zenspider>
it's ruby without any extra linkage
<zenspider>
normally the exts are linked in statically
<srawlins>
ah, like many fewer standard libs? no yaml, ncurses, ...
<zenspider>
look at Makefile:170
<zenspider>
and Makefile:175
<zenspider>
EXTOBJS is excluded on the miniruby link
mistym has quit [Remote host closed the connection]
<zenspider>
oddly tho, DMYEXT is included... so maybe that's so you can tweak the build to test against your one extension
<srawlins>
hmm ok, thats interesting
<zenspider>
the ext build system requires ruby, so they link miniruby and then use that to run the build scripts (extconf.rb and the like)
telemachus has quit [Remote host closed the connection]
<srawlins>
ok... im still guessing that i need to add mini-gmp.h to more of these build variables, like $(MAINLIBS) or $(LIBS)
<srawlins>
i'll poke around there for a while. thanks for that tip
<zenspider>
are you not building into ext/whatever ?
<whitequark>
you definitely don't need to add .h file to *LIBS
<srawlins>
or mini-gmp.o...
<zenspider>
srawlins: I think you're too far in.
<srawlins>
haha
<zenspider>
cp -r ext/{bigdecimal,newbigdecimal}
<zenspider>
tweak the extconf.rb
<srawlins>
im not building into ext/whatever. i was hoping for a very subtle rip-out bignum.c, replace with different bignum.c,
<zenspider>
srawlins: like I said before... too big a jump
<zenspider>
classes are dynamic in ruby. take advantage of that
perryh_away is now known as perryh
<srawlins>
hmm ok, so that would result in a cext, but one thats kind of "core", like fiddle, or psych
scampbell has quit [Quit: Ex-Chat]
<zenspider>
the problem with doing bignum is the auto-promotion/demotion between it and fixnum. I think you're going to have a hard time of this without a LOT of retrofitting to get gmp structs in there
<zenspider>
I don't know shit about gmp tho
<whitequark>
zenspider: srawlins is right, cext isn't applicable here
<whitequark>
bignum is one of core classes and it is treated specially in the core
<whitequark>
i.e. auto promotion/demotion
<whitequark>
you _need_ to link it within
<srawlins>
yeah that auto-promotion/demotion feature is neat
<whitequark>
srawlins: don't forget to write compatible marshalling routines
<whitequark>
otherwise your ruby won't be interoperable
<srawlins>
hmm... i wrote the rb_big_pack and rb_big_unpack(), i wonder if marshal uses those, or has its own methods
<srawlins>
there's a bug open in ruby core stating that bignum is not self-contained in bignum.c; in order to reimplement, code would have to be changed in multiple files
<srawlins>
the goal being a single-file api for bignum
<zenspider>
the list isn't that bad... but yeah. it's going to have to be multiple files
burgestrand has quit [Quit: Leaving.]
<zenspider>
luckily, most of it is done via macros
<srawlins>
haha
<whitequark>
well, I'm pretty sure it segfaults in your own code
<whitequark>
run the failing command under gdb
<zenspider>
like, time is a good example of how it interacts but does so entirely through macros. if you get the macros right, it should be pretty easy (for time)
<zenspider>
RBIGNUM_SIGN, RBIGNUM_DIGITS, RBIGNUM_LEN and you're 90% there
<zenspider>
I'd STILL be tempted to say do this as an ext first
<srawlins>
i've done gdb, it fails at main.c:37 calling eval.c:52 calling inits.c:20 calling random.c:1280 calling random.c:1269 calling make_seed_value() in string.h
<zenspider>
add to_x in bignum. play from there.
<srawlins>
very early in the program
<whitequark>
zenspider: the only thing which is bugging me in smalltalk is the completely crazy thing they do with method names
<zenspider>
you mean the wonderful thing they do with method names, of course
<whitequark>
zenspider: it took me literally hours to understand that quadMultiply: i1 and: i2 maps to a single method named "quadMultiply:and:"
<whitequark>
well, I didn't say it is bad :) just very unusual
<whitequark>
I never seen anything similar before
<zenspider>
srawlins: cheat. override RandomSeed with a fixed seed for now
<zenspider>
whitequark: it's fucking brilliant
<srawlins>
hmm, not a bad idea
<zenspider>
and self does it too :)
<zenspider>
srawlins: make sure the fixed seed is a fixnum. :P
<whitequark>
zenspider: I just wish someone would explain that explicitly
<whitequark>
also, the "become" method is an optimization nightmare
<zenspider>
it's only there for string hashes and hash bins
<zenspider>
whitequark: also: brilliant
<zenspider>
also: self has it too
<whitequark>
yeah, I heard a lot of praises to Smalltalk IDEs like VisualAge
<whitequark>
and yes, it's cool, but should be used sparsely.
<zenspider>
personally, I think static analysis is a mistake... I keep pointing out that self does this stuff too because java and javascript are fast BECAUSE self is fast
<whitequark>
zenspider: you don't avoid it when you have 16K of RAM
<whitequark>
and both Sun JVM and V8 are HUGE memory hogs
<whitequark>
trading runtime for memory is one option
S2kx has joined #ruby-lang
<whitequark>
trading runtime for compile time and features is another one
<whitequark>
you don't have one solution for everything.
d3vic3 has quit [Ping timeout: 245 seconds]
<zenspider>
that's why I said that persisting an optimized runtime might be a neat option
<whitequark>
well, that's why I am doing it :)
<zenspider>
I don't mean doing static analysis. I mean doing runtime optimizations on a system with resources. then persisting it and running just the optimized code on the embedded system
<whitequark>
static analysis is a form of optimization, no?
S1kx has quit [Ping timeout: 245 seconds]
<zenspider>
I dunno about self. but smalltalk has run on tiny systems for sure
<zenspider>
it's a lame form imo. too self limiting (no pun)
<whitequark>
I've ported PICOBIT to ARMs
d3vic3 has joined #ruby-lang
<whitequark>
it's unwieldy slow and still has all the limitations I plan to impose. I just don't see a way to run a system with e.g. open Fixnum on 16K of RAM
<whitequark>
it is technically possible, but it's a tar pit
<whitequark>
which optimizations would you suggest?
zmack has quit [Remote host closed the connection]
<whitequark>
remember, no JITing (most embedded systems are realtime; besides that, not enough RAM/ROM anyway); program code executed from ROM
<sepp2k>
whitequark: If anything static analysis is a means of enabling certain forms of optimization. Just analyzing the code by itself doesn't make it faster. Also that's only one of its applications. </pedantic-mode>
<whitequark>
sepp2k: I fully agree.
outsmartin has joined #ruby-lang
<zenspider>
I guess I'm not describing my idea well enough. I mean _exactly_ JITing ... just not on the target system
<whitequark>
if it's not running on target system, it's AOT, and it's exactly what I'm doing :)
perryh is now known as perry
<whitequark>
JIT means that you include profiling code and then optimize hot parts with runtime info (e.g. type specialization)
<zenspider>
you can stay in here and read... but you can't talk anymore. once you leave this room... you can't come back in.
<whitequark>
zenspider: well, at least we understand each other now. I'm not in the mood for discussing the strict meaning of JIT anyway
M4g1c5t0rM1 has quit [Remote host closed the connection]
<deryl>
was wondering when that was going to kick in :)
telemachus has joined #ruby-lang
<whitequark>
zenspider: or wait, do you suggest collecting the runtime info from target system?
<zenspider>
<tintin> Hi <tintin> I'm sorry <zenspider> nope <zenspider> too late
macmartine has joined #ruby-lang
<whitequark>
just let him RIP already. that's obvious trolling
<deryl>
he didn't last long in the rails channel so he came here. think he did it a bit in the #ruby channel and lost there too
<deryl>
some people just don't learn :shrug:
<zenspider>
nope. they don't
rmascarenhas has quit [Quit: leaving]
<dominikh>
he was a pain in #freenode and #defocus and whereever else he goes, too.
yxhuvud has joined #ruby-lang
<deryl>
oh well, a little vacation might make him value the channel resource a bit more in the future.
<deryl>
but anyways, its 1am. time for this tired ass to hit the bed. night all.
<dominikh>
2012-06-10.log:2012-06-10 16:02:39 tintin fuck that rule, make a new rule to force all channel operator to ban someone for at most one month
<zenspider>
later deryl
<dominikh>
I can see where he is coming from :D
<dominikh>
2012-06-10.log:2012-06-10 15:56:28 tintin is it a good idea to create new freenode account as the current account got banned from several channels?
<deryl>
tintin: no, the good idea is not to act the fool in channels so you don't get banned in the first place.
<dominikh>
(those are logs from #freenode btw)
r0bby_ is now known as robbyoconnor
l0st1 has joined #ruby-lang
<erikh>
this drama is now concluded
<erikh>
please return your tray tables to their upright positions
AndChat| has quit [Ping timeout: 252 seconds]
<erikh>
also, I'm always late to the party
<dominikh>
yep
<erikh>
I was playing team fortress, and kicking ass.
<erikh>
anyhow back to being antisocial.
<dominikh>
everybody can kick ass in team fortress :P
<zenspider>
dominikh: between you and whitequark I expect EVERYTHING to be properly archived and searchable. :P
<zenspider>
and by EVERYTHING... I do mean everything. Not just this silly irc stuff
<erikh>
send it all to loggly
<erikh>
we're using it for syslog at work, it does the job
<zenspider>
as a complete aside... omg grains of paradise are awesome.
<erikh>
what is that?
<zenspider>
african spice like black pepper but with a lot more dimensions to it
<erikh>
aha, pepper
<dominikh>
zenspider: of course.
<zenspider>
but not actually related to pepper as I understand it
<erikh>
"Grains of paradise are to some extent used in veterinary practice but for the most part illegally to give a fictitious strength to malt liquors, gin and cordials".
<zenspider>
nom nom nom
<erikh>
sounds fun, but I get confused by mac and cheese
bearlulz has quit [Quit: Computer has gone to sleep.]
tenderlove has joined #ruby-lang
<whitequark>
zenspider: I'm still curious to hear which exact optimizations would you suggest for the embedded case
tenderlove has quit [Remote host closed the connection]
outsmartin has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 244 seconds]
bearlulz has joined #ruby-lang
stardiviner has joined #ruby-lang
burgestrand has joined #ruby-lang
l0st1 has quit [Quit: leaving]
msaffitz has quit [Quit: Computer has gone to sleep.]
dalekurt has quit [Quit: Zzz...]
tintin has quit [Quit: tintin]
Nekka has quit [Quit: WeeChat 0.3.8]
<zenspider>
bye bye tin tin... rip
andrewhl has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
<erikh>
zenspider: what was the wirth book you recommended earlier?
<drbrain>
OOOH
<erikh>
?
<drbrain>
through dirty string manipulation tricks I can unzip one inflate stream per CPU in parallel!
srbartlett has quit [Remote host closed the connection]
<whitequark>
or just use printf.
<bnagy>
yeah I'm using printf :) sec let me build
<kke>
suggestions for continuous integration? i think i've tried most of them now, none of them seems to install cleanly without trickery, most projects seem kind of dead, all of them share pretty much the same functionality and "why should you use X instead of Y, because we're keeping it simple!" catchphrase
<whitequark>
kke: github uses hudson (java)
<whitequark>
nuff said
<whitequark>
well there's also travis
<kke>
travis is impossible to set up
<whitequark>
depends on your task anv env
<kke>
but it's the only active project on github
<whitequark>
travis is a bit enterprisey
<kke>
yeah and requires vm's and all kinds of strange stuff on the host
<kke>
many people seem to have changed from cruisecontrol to integrity, but itegrity seems to have even less features than cruisecontrol
<whitequark>
both dead
<bnagy>
whitequark: you're right :D
<bnagy>
16 vs 24
<bnagy>
16 on ruby
* whitequark
celebrates success of his telepathic skills
<whitequark>
okay. now...
<kke>
heidi was easy to get running and i like the hooks setup, but there's only cronjob based builder
cmaujean_ has joined #ruby-lang
<kke>
i'd like it to build via post commit hooks so the dev gets a notification if the commit was poop
<bnagy>
whitequark: maybe _WIN32 is defined for some reason?
<bnagy>
whitequark: btw when I said 'the crash is because' I meant the second crash, after I fixed the size bug, the origial bug is definitely in the ffi lib itself, anyway, good day's work
<erikh>
I used that little trial to build the nginx module
<horesman>
erikh: so what does that do that mirb doesnt ?
<erikh>
nothing really
<erikh>
it was just a way to learn mruby
dhruvasagar has quit [Ping timeout: 265 seconds]
<horesman>
oh ok
<erikh>
I could use some helpers if you're interested in something like this
dhruvasagar has joined #ruby-lang
<erikh>
basically I want to get it working with rack and then probably put it down
<horesman>
erikh: can it do multi line expressions?
<erikh>
in what sense?
<horesman>
def hello
<horesman>
puts "baby"
<horesman>
end
<erikh>
yes
<horesman>
cool, how?
<erikh>
it's embeddable ruby
mikkelb has quit [Read error: Connection reset by peer]
<horesman>
tha's the tricky part when writing a ruby repl ;)
<erikh>
like lua
<erikh>
only not
<erikh>
oh
<erikh>
mine isn't an mirb
<erikh>
it's more like a `ruby`
<erikh>
that's why I was confused, ruby wouldn't be very useful with single-line expressions
<horesman>
erikh: i maen if it's interactive like irb
<erikh>
it's not
<erikh>
it's just ./foo test.rb
<horesman>
oh
<horesman>
i thought u had written an mirb clone
<horesman>
oh cool
<erikh>
no, I just adapted a small interpreter from mirb to see how it was put together
schroedinbug has joined #ruby-lang
<erikh>
it wouldn't be ruby if it was documented
<horesman>
h so you wrote your own version of the 'ruby' executable
<erikh>
yep.
<horesman>
nicre
RORgasm has joined #ruby-lang
<erikh>
nginx has a rich i/o library, and mruby has next to nothing
<horesman>
erikh: how hard would it be to make the script become interactive on exception?
<erikh>
probably easy
<erikh>
look at the last few lines of that gist
<erikh>
it catches the exception and outputs it
<erikh>
it can even trap parse errors
<horesman>
erikh: can you drop into the binding of the exception?
<erikh>
not sure.
<erikh>
I haven't gotten that far with the guts yet
<horesman>
erikh: i wrote a thing like your interpreter (i guess :P) but instead of running the file direclty in ruby, it passes the file through the pry repl
<erikh>
this nginx thing is kind of a way to learn
<horesman>
erikh: so i can do things like turn it interactive on exception, and drop into the exact context of the exception (even if it's a c exception(
<erikh>
right
<horesman>
erikh: if u built dropping into interactive mode on exception that would be pretty impressive
<erikh>
well, I think I'm going to finish the nginx thing first.
<erikh>
mruby has no real i/o layer to speak of
<erikh>
nginx has a rich one
<erikh>
this should make for good sex
<horesman>
cool mind if i take your script and maybe mess with it to add that feature
<horesman>
ah ok
<erikh>
sure
<erikh>
if you want it broken into a few pieces, check out the nginx code
<horesman>
erikh: i gues sit's got something like ripper? :P
<oddmunds>
mruby might be the solution to the "no one can play the games i wrote in ruby" situation
<bastilian>
i want to have an array with three values. is there a another way then [1,2,3], because the values get build by another method which is always the same.
chrismcg is now known as zz_chrismcg
<heftig>
Array.new(3) { method }
<heftig>
e.g. Array.new(10) { rand }
<bastilian>
heftig: awesome. must have missed that in the api-doc. thanks.
jperry2 has joined #ruby-lang
Criztian has joined #ruby-lang
wmoxam has joined #ruby-lang
RORgasm has joined #ruby-lang
kaspernj_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 264 seconds]
heftig has quit [Quit: leaving]
cjs226 has quit []
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
RORgasm has quit [Ping timeout: 245 seconds]
kaspernj has quit [Ping timeout: 245 seconds]
umttumt has quit [Remote host closed the connection]
umttumt_ has joined #ruby-lang
tommyvyo has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
mytrile has joined #ruby-lang
dvorak has quit [Ping timeout: 245 seconds]
sailias has joined #ruby-lang
mistym has quit [Remote host closed the connection]
srbartlett has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
woollyams has joined #ruby-lang
sailias has quit [Quit: Leaving.]
jxie has quit [Quit: leaving]
rippa has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
mistym has joined #ruby-lang
ttilley_off is now known as ttilley
jimmy1980 has quit [Ping timeout: 244 seconds]
virunga has joined #ruby-lang
riffraff has quit [Quit: Leaving]
robbyoconnor has quit [Ping timeout: 246 seconds]
jimmy1980 has joined #ruby-lang
saLOUt has quit [Ping timeout: 265 seconds]
mytrile has quit [Read error: Connection reset by peer]
mytrile has joined #ruby-lang
wmoxam has quit [Quit: leaving]
hynkle has quit [Read error: Connection reset by peer]
Jake232 has quit [Quit: Computer has gone to sleep.]
bastilian has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
sora_h is now known as s0ra_h
fra000 has quit [Quit: Leaving]
tjadc has quit [Ping timeout: 265 seconds]
tbuehlmann has joined #ruby-lang
benjammin891 has joined #ruby-lang
digitalbane has joined #ruby-lang
bfreeman has joined #ruby-lang
JohnBat26 has quit [Remote host closed the connection]
vmoravec has quit [Quit: Leaving]
vmoravec has joined #ruby-lang
cantonic_ has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 265 seconds]
cantonic_ is now known as cantonic
cdt has quit [Quit: Ex-Chat]
Criztian_ has joined #ruby-lang
dfr|mac has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
piyush has quit [Ping timeout: 246 seconds]
imperator has joined #ruby-lang
veex has quit [Ping timeout: 246 seconds]
<imperator>
ged, ping
andrewhl has joined #ruby-lang
kristofferrr has quit [Quit: ❤]
kurko_ has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
benjammin891 has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 244 seconds]
ttilley_off is now known as ttilley
kurko_ has joined #ruby-lang
ces has joined #ruby-lang
carloslopes has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
dejongge has joined #ruby-lang
dejongge has quit [Client Quit]
badfish129 has joined #ruby-lang
florentg2 has quit [Ping timeout: 246 seconds]
workmad3 has quit [Read error: Operation timed out]
florentg2 has joined #ruby-lang
<dfr|mac>
Hey guys, I'm a bit confused about Module#remove_const. Does it return the value of the constant removed or the previous set value? I'm not parsing the description of it right :(
<dfr|mac>
I basically want to do something like: k = Object.remove_const(:Foo); yield; Object.const_set :Foo, k
<dfr|mac>
but seems like I'm getting 'nil' as k
dejongge has joined #ruby-lang
kaspernj_ has quit [Quit: Leaving]
benjammin891 has joined #ruby-lang
florentg2 has quit [Client Quit]
florentg2 has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
cantonic has quit [Read error: Connection reset by peer]
<whitequark>
I've already seen (and reported) similar issues with pngs.
<drbrain>
whitequark: it's in support of #6492
<yorickpeterse>
Are there any linter tools similar to Pelusa/Reek but capable of detecting whitespace and such? So far I've been unable to find if Reek/Pelusa support this
<drbrain>
whitequark: since there's no zlib maintainer, I'll probably commit them next week
<whitequark>
very good
<whitequark>
I've seen lots of Net::HTTP changes lately. could you describe them in a nutshell?
qwerxy has quit [Read error: Operation timed out]
<drbrain>
I want to add parts of mechanize and net-http-persistent into ruby
<drbrain>
so redirects and stuff are handled properly
<drbrain>
so I've been making patches for stuff I can push all the way down to net/http
yannis has quit [Quit: yannis]
<bougyman>
does that stuff belong in net/http?
imperator has joined #ruby-lang
<drbrain>
bougyman: parts of it do, parts of it don't
<drbrain>
bougyman: transparent Content-Encoding handling does, redirection does not (since it can cross connections)
<bougyman>
that's what I was thinking
<dfr|mac>
apeiros_: hmm. I think the issue is that there's autoload involved. The specific module in question is I18n (from active_support)
<dfr|mac>
and seems like the culprit is that active_support defines: autoload :I18n, 'active_support/i18n' to define that constant....
<dfr|mac>
I'm not really sure what's going on =/
<bougyman>
yet another reason i'm happy I never use active support
<dfr|mac>
bougyman: I don't think it's activesupport's fault, rather autoload maybe
<bougyman>
dfr|mac: it's a combination
<dfr|mac>
bougyman: how can you tell without figuring out the culprit? Sounds like you just don't like activesupport and blame it by default ;)
<bougyman>
dfr|mac: right.
<bougyman>
i didn't have production apps break because of it or anything, many times, i'm just judging with no experience in it.
<dfr|mac>
bougyman: I've actually commented the whole requires of the lib/active_support.rb except for the autoload part of the i18n, so I don't think the other stuff is even loaded anymore. :)
<dfr|mac>
bougyman: oh, I'm just talking about this specific issue I have, not AS in general. I don't mind your AS hate, just not sure if it's applicable to this specific case :)
<dfr|mac>
bougyman: actually the only reason I have to deal with it is because I'd like to test rails integration of my gem =/
RORgasm has quit [Remote host closed the connection]
kvs has quit [Ping timeout: 248 seconds]
Asher has joined #ruby-lang
sailias has quit [Quit: Leaving.]
saLOUt has quit [Quit: Konversation terminated!]
cdt has joined #ruby-lang
<imperator>
ruh-oh, redcarpet no likey msvc++
* imperator
investigates
<imperator>
25 open issues in redcarpet, that's not very encouraging
lele has quit [Ping timeout: 260 seconds]
fayimora has quit [Ping timeout: 264 seconds]
coryf_ has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
coryf has quit [Ping timeout: 246 seconds]
butchanton has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
kurko_ has quit [Ping timeout: 246 seconds]
Jake232 has joined #ruby-lang
<imperator>
unresolved external symbol _snprintf referenced
<whitequark>
I accidentally wrote the best actionscript 3 decompiler in the world.
<whitequark>
on a file which no other decompiler can parse, it only fails 38 methods of 7297
carloslopes has quit [Quit: Leaving.]
<imperator>
which is weird, since both have_func('snprintf') and have_func('_snprintf') return true
<imperator>
alright, what's the difference between redcarpet and sundown?
<imperator>
looks like it was fixed in sundown...same author, both look like markdown parsers
vesan_ has joined #ruby-lang
vesan has quit [Read error: Connection reset by peer]
<imperator>
blargh, it's fixed in the latest git repo, just hasn't been released yet
<rue>
Yay
<imperator>
whitequark, impressive, yet scary
<imperator>
may i ask what you needed something like that for?
RORgasm has joined #ruby-lang
Asher has quit [Quit: Leaving.]
Jake232 has quit [Quit: Computer has gone to sleep.]
cdt has quit [Ping timeout: 246 seconds]
<whitequark>
imperator: I was paid to write it, and I've been able to publish it under MIT. Besides that, it was a very interesting exercise of working with ASTs and implementing nontrivial CFA/DFA
<whitequark>
e.g. my CFA pass can recognize all forms of if(), while(), do..while(), switch(), including those with labels.
<whitequark>
did you know that JavaScript has labels? i.e. a: while(f()) { while(g()) { break a; } }
brianpWins has joined #ruby-lang
<imperator>
don't think i knew that - for goto's ?
rockpapergoat has quit [Remote host closed the connection]
<whitequark>
well, not quite. it allows you to break/continue not only the innermost loop, but any
<whitequark>
also, apart from the source code in text form, it can output it as a stream of tokens
hynkle has quit [Ping timeout: 244 seconds]
<whitequark>
think of IDA.
<imperator>
ah, so like ruby's try/catch then
<whitequark>
throw/catch? yeah, kind of
<whitequark>
in C you would use goto
<imperator>
well, that's basically what try/catch does right? let's you create a label to break out of inner loops
<rue>
It’s not exactly the same
<whitequark>
you can't continue to an outer loop with throw/catch
<whitequark>
that is, not directly
<imperator>
whitequark, sorry i'm not familiar with "IDA"
<imperator>
taking away eval....hm, don't think that's going to go over well
<erikh>
twitter's down for me so I have to bug you gys
cdt has quit [Ping timeout: 246 seconds]
<whitequark>
imperator: well, it depends on stuff. I don't remove eval _completely_, mind you. it's only available during the bootstrap phase.
<whitequark>
e.g. Rails do use eval a lot while _loading_, but do not do that at _runtime_
<imperator>
oh? i thought a lot of that stuff was happening at runtime; what do i know
<whitequark>
and on some backends (e.g. JavaScript one), define_method can be available, through that will substantially reduce effectiveness
<erikh>
class reloading in development mode would probably break
<whitequark>
erikh: indeed, and my compiler isn't supposed to support that
msaffitz has joined #ruby-lang
<erikh>
fair enough
<whitequark>
imperator: the _exec family is still there.
<whitequark>
having a fully fledged parser and compiler at runtime is _very_ expensive
achiu has joined #ruby-lang
<whitequark>
e.g. on an embedded target, or even in browser it's unacceptable
gregf has quit [Quit: WeeChat 0.3.8]
kurko_ has quit [Ping timeout: 246 seconds]
<erikh>
ocaml seems to do it pretty well
Carnage\ has joined #ruby-lang
<whitequark>
erikh: would ocaml run on 16K of RAM? I intend to support such a target.
<erikh>
probably not.
<whitequark>
would [translated] ocaml run _fast_ (without substantial pauses) on a modern JS engine?
<whitequark>
that is, while evaluating code, resetting caches and so on
<erikh>
ocaml is one of the fastest runtimes out there
<imperator>
16k? what uses so little ram in practice these days?
<whitequark>
imperator: lots of stuff. every low-power, low-cost CPU
<erikh>
err
<whitequark>
STM32F103RB as a precise example
<erikh>
nothing that can handle a unix api
<whitequark>
yes
<whitequark>
I don't intend to have POSIX-related stuff in the first place. we already have three good runtimes for that.
tjadc has joined #ruby-lang
<whitequark>
I intend to be able to efficiently cross-compile Ruby code to memory- and CPU-limited targets
<whitequark>
Emscripten-ing a 16MB libruby is _not_ acceptable.
kurko_ has joined #ruby-lang
<whitequark>
a browser is indeed limited in both cpu and memory terms. yeah, at desktops you have V8 and gigs of RAM (Twitter still manages to be slow as a dog)
<whitequark>
but on mobile browsers you don't, for example
<imperator>
whitequark, you mention array as a "typing black hole" - i seem to recall zenspider using ruby-inline to optimize it for integer types, for example
<whitequark>
imperator: well, I don't say it cannot be optimized, but generic Ruby arrays are indeed heterogenous
<imperator>
true
<whitequark>
I plan to employ different techniques
<whitequark>
for example, a syntactically created array which won't be mutated or passed to other arrays or something like that will be converted to Tuple
<whitequark>
which is typed
<whitequark>
this will fix things like a, b = b, a
<whitequark>
Rubinius already uses tuples for similar concerns, through they don't type them
<whitequark>
as a different one, mostly for embedded devices (JavaScript has much smaller penalties), I'll add "typed arrays"
<whitequark>
e.g. instead of a = [] you'll write a = Array.typed(Fixnum).new()
<whitequark>
this won't even result in runtime checks if you'll use it correctly (that is, only save values which are statically inferred to be Fixnums)
<whitequark>
even better
<whitequark>
as I will do static expansion, you'll be able to write code which runs on both regular rubies and static compiler just by adding ifs()
<whitequark>
no magic comments, no syntax changes
<whitequark>
if defined?(Foundry); a = Array.typed(Fixnum).new; else a = []; end
<whitequark>
Foundry (the name for my compiler) will expand defined?(Foundry) to true, as it's defined at compile time
<whitequark>
and then optimize the whole if to just the first branch
flak has joined #ruby-lang
<whitequark>
program-wide eta-expansion is another huge win. let me show you
flak is now known as Guest51801
rippa has quit [Read error: Connection reset by peer]
<whitequark>
this will be (literally. no pseudocode.) my method lookup implementation (it doesn't handle singleton classes for simplicity. still good as a first approximation): http://pastie.org/4127981
<whitequark>
in interpreted mode (bootstrapping), it will just execute the if() and its contents recursively until it will find a method. everything is simple.
<whitequark>
in compiled mode, it will look at what class self (and thus super) is. when it knows the class, it can expand respond_to? call
<whitequark>
after expanding respond_to? and if(), it can expand the __send__ call
<whitequark>
this process will be repeated recursively until a method will be found.
<whitequark>
even better, in the case where the type of self is _not_ known, the fallback implementation will still be used.
<whitequark>
in the case where the whole program will have no fallbacks, there will be no respond_to? calls recorded
dejongge has quit [Ping timeout: 246 seconds]
<whitequark>
thus, a tree-shaker will determine that method tables have no references, and just exclude them from the resulting image.
<whitequark>
voila, a statically compiled ruby executable with no method lookup overhead.
<whitequark>
of course, this will require using typed arrays/hashes and so, but _everything_ is better than programming in C.
<whitequark>
zenspider: also, after reading your Squeak article I realized that if I'd write the compiler itself in the typed dialect, I'll be able to compile it to LLVM bitcode efficiently and receive a VM for free.
<whitequark>
in a certain sense, I'm trying to take Rubinius approach at the next level.
tommyvyo has joined #ruby-lang
sailias has joined #ruby-lang
<whitequark>
s,your Squeak article,Squeak article you have linked to,
Guest51801 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sailias has quit [Client Quit]
rippa has joined #ruby-lang
sailias has joined #ruby-lang
ilyam has joined #ruby-lang
Carnage\ has quit [Read error: Connection reset by peer]
<whitequark>
erm... comments?
Carnage\ has joined #ruby-lang
KINGSABRI has joined #ruby-lang
<KINGSABRI>
Good day
digitalbane has quit [Ping timeout: 248 seconds]
<imperator>
whitequark, i think we're still absorbing it. :)
<KINGSABRI>
Anyone know about simple REPL to make console in an application
<darix>
imperator: i think the optimizing array via ruby inline was an article from drbrain
<KINGSABRI>
some thing like ripl but ripl no longer supported
<imperator>
whitequark, sounds very cool; i guess i'm a little hesitant to jump on the bandwagon, because people have talked about making these sorts of optimizations in the past, then they disappear
<whitequark>
well, I'm not asking you to do anything, at least not at this point
<darix>
KINGSABRI: look at what pry is using?
<imperator>
but, i'm hopeful :)
<imperator>
darix, i think that's a different article, but similar
<whitequark>
until I flesh out the basic architecture it's an one-man project
<whitequark>
and, well, I'm doing this for six months already :)
<KINGSABRI>
yes pry is great but I need something simple ,, am using pry as my irb. I need to create an application with simple console
<darix>
KINGSABRI: you could check what pry is using to implement the repl
digitalbane has joined #ruby-lang
<KINGSABRI>
darix, thanks ,, I'll check it again
KINGSABRI has quit [Quit: Leaving]
benanne has joined #ruby-lang
benjammin891 has quit [Ping timeout: 246 seconds]
ilyam has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
KINGSABRI has joined #ruby-lang
<imperator>
whitequark, i look forward to it :)
bearlulz has quit [Quit: Computer has gone to sleep.]
tjadc_ has joined #ruby-lang
tjadc_ has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 252 seconds]
tjadc has quit [Remote host closed the connection]
benjammin891 has joined #ruby-lang
sepp2k has joined #ruby-lang
davpoind has quit [Quit: Be back later]
msaffitz has quit [Quit: Computer has gone to sleep.]
zmack has joined #ruby-lang
publicvoid__ has quit [Ping timeout: 240 seconds]
msaffitz has joined #ruby-lang
indeterminate has quit [Quit: It's too late. You've awakened the gazebo. It catches and eats you.]
hinbody has joined #ruby-lang
wpaulson has joined #ruby-lang
sailias has joined #ruby-lang
francisfish has joined #ruby-lang
publicvoid__ has joined #ruby-lang
erics has joined #ruby-lang
kvs has joined #ruby-lang
outsmartin has quit [Quit: Leaving.]
cdt_ has joined #ruby-lang
workmad3 has joined #ruby-lang
Skif has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
msaffitz has quit [Quit: Computer has gone to sleep.]
rmascarenhas has joined #ruby-lang
Jake232 has joined #ruby-lang
gregf has joined #ruby-lang
kain has quit [Quit: Sto andando via]
judofyr has joined #ruby-lang
rowanu has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
sailias has quit [Ping timeout: 240 seconds]
wmoxam has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
IPGlider has joined #ruby-lang
Fullmoon has quit [Quit: Fullmoon]
florentg2 has quit [Quit: florentg2]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 276 seconds]
digitalbane has left #ruby-lang [#ruby-lang]
workmad3 has quit [Ping timeout: 245 seconds]
msaffitz has joined #ruby-lang
wallerdev has joined #ruby-lang
ttilley is now known as ttilley_off
rmascarenhas has quit [Quit: leaving]
qwerxy has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
jgerry has joined #ruby-lang
<drbrain>
imperator: check what libraries were used by extconf.rb in mkmf.log vs what you get when linking
<imperator>
drbrain, in reference to rubyinline you mean?
<drbrain>
imperator: I might be a bit behind, in reference to "imperator: unresolved external symbol _snprintf referenced"
<imperator>
drbrain, oh, it's fixed in latest git repo; they added some #ifdef macros
andrewhl has quit [Remote host closed the connection]
<drbrain>
ah, ok
mark_locklear has quit [Remote host closed the connection]
<imperator>
yard gem was complaining, that's how that whole bit got me started