From ko1 at atdot.net Sun Oct 2 15:43:47 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 03 Oct 2005 04:43:47 +0900 Subject: [Yarv-devel] YARV Compile and Disassemble CGI Message-ID: <43403873.1060407@atdot.net> Hi, I made a cgi script that compile and disassemble ruby script to YARV instruction sequence. http://www.atdot.net/yc/ If there is any question or any bug, please ask me. Enjoy. -- // SASADA Koichi at atdot dot net // From ko1 at atdot.net Mon Oct 3 01:27:54 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 03 Oct 2005 14:27:54 +0900 Subject: [Yarv-devel] New massign tests In-Reply-To: References: <4329D179.7060302@atdot.net> Message-ID: <4340C15A.6050906@atdot.net> Hi, ? wrote: > SASADA Koichi wrote: > >> Should massign syntax return array? This behaviour is high runtime >> cost and we use these syntax at only few cases. > > > Hm, can you detect when it is done in a void context? (Similar to ruby > -we "1".) I would imagine it would keep the run-time cost low in most > cases -- it would only cause less performance if the return value is > potentially significant. (Like when a massign is the last statement of a > method.) > > Sorry if it is not as simple as that. > It's easy to detect void context or not. Yes, your solution is best for save compatibility. But it is doubtful that this specification is good language design (especially, introducing multi-value). -- // SASADA Koichi at atdot dot net // From ko1 at atdot.net Sun Oct 9 02:30:34 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Sun, 09 Oct 2005 15:30:34 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster Message-ID: <4348B90A.1060501@atdot.net> Hi, I'm making a poster for OOPSLA05 about YARV (A0 x 2). It's my first time to make posters for academic place :) http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf (now, optimization is empty) Any comments are welcome. Thanks, -- SASADA Koichi at atdot dot net From nohmad at gmail.com Sun Oct 9 10:50:05 2005 From: nohmad at gmail.com (Gyoung-Yoon Noh) Date: Sun, 9 Oct 2005 23:50:05 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> References: <4348B90A.1060501@atdot.net> Message-ID: Hi, I found a typo 'SmapleModule' in 'Ruby Language Introduction' section. Perhaps you can find it using pdf viewers's search menu. Keep up the good work, On 10/9/05, SASADA Koichi wrote: > Hi, > > I'm making a poster for OOPSLA05 about YARV (A0 x 2). It's my first > time to make posters for academic place :) > > http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf > (now, optimization is empty) > > Any comments are welcome. > > Thanks, > -- > SASADA Koichi at atdot dot net > -- http://nohmad.sub-port.net From ko1 at atdot.net Sun Oct 9 13:21:16 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 10 Oct 2005 02:21:16 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: References: <4348B90A.1060501@atdot.net> Message-ID: <4349518C.5030703@atdot.net> Hi, Gyoung-Yoon Noh wrote: > Hi, > > I found a typo 'SmapleModule' in 'Ruby Language Introduction' section. > Perhaps you can find it using pdf viewers's search menu. > > Keep up the good work, Thanks. I fixed it. -- SASADA Koichi at atdot dot net From daniel.amelang at gmail.com Sun Oct 9 14:30:41 2005 From: daniel.amelang at gmail.com (Daniel Amelang) Date: Sun, 9 Oct 2005 11:30:41 -0700 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> References: <4348B90A.1060501@atdot.net> Message-ID: 1)Looking at your ruby compared to scheme example in "Other Ruby Features": I would recommend replacing some of the '...' with something more descriptive. It's hard to tell from the example which '...' is referring to method parameters, block/lambda parameters and block/lambda body. I recommend something like this: method_name(method_args) { |lambda_args| ... } (method_name method_args (lambda (lambda_args) ...)) Just an idea. You can see that I'm trying to make it as easy as possible to see the similarities (even naming the block_args 'lambda_args', which is not totally correct, but I think appropriate for the context). 2) Same idea with the Java/Ruby comparison. In the Java example, you have "// ..." as the bodies, while the ruby example has one or two lines of descriptive comments. I would just keep it simple and use '# ... ' in the ruby also. That way you emphasize the similarity and don't introduce unnecessary differences that detract from your purpose. On the same note, consider putting the Java example on the left and the ruby on on the right (same with the scheme example), because people won't understand the ruby examples until they see the java/scheme ones *first*. So make it easier and put the familiar ones first (on the left, like English is read). So you'd have this: // Java exception handling try { // ... } catch (SomeError e) { // ... } catch (Exception e) { // ... } finally { // ... } # Ruby exception handling begin # ... rescue SomeError => e # ... rescue => e # ... ensure # ... end Again, just to make the similarities stand out. 3) Is userlevel threads really a feature? :) 4) You might want to mention other ruby libraries that are popular like distributed computing, parallel computing (MPI), SOAP, XMLRPC. These names get peoples attention more than just 'Network' or 'System Management', in my opinion. 5) 'Evil eval' should just be 'eval' I think. The issue of eval being evil is not a introductory topic, in my opinion. 6) 'grand gaol' should be 'grand goal' 7) 'these bars shows' should be 'these bars show' 8) I don't understand the sentence: 'The results show that the applications which have VM depends bottleneck is speed up obviously.' Try to rephrase it. It seems to be an important point, but it's not comprehensible. Great work! See you at RubyConf and OOPSLA. Dan Amelang From wilsonb at gmail.com Sun Oct 9 21:14:12 2005 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Sun, 9 Oct 2005 21:14:12 -0400 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> References: <4348B90A.1060501@atdot.net> Message-ID: Looks good. I found a couple more issues with the wording, though: Page 1: >># if exception was occur or not Should be "if an exception has occured" or similar. >>Smalltalk, Self and other dynamic OO language Should be "languages" Page 2: >>The results show that the applications which >>have VM depends bottleneck is speed up >>obviously. But other application (GC, Object >>Allocation, Regexp, Bignum depends) doesn't >>speedup on YARV. This is fairly hard to parse. I'd vote for something like: The results show that the speed of VM-dependent applications is greatly increased. However, other applications (those depending on GC, Object allocation, Regexp, and Bignum) are not significantly affected by YARV. Thanks; looking forward to the presentation at RubyConf. --Wilson. On 10/9/05, SASADA Koichi wrote: > Hi, > > I'm making a poster for OOPSLA05 about YARV (A0 x 2). It's my first > time to make posters for academic place :) > > http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf > (now, optimization is empty) > > Any comments are welcome. > > Thanks, > -- > SASADA Koichi at atdot dot net > From ko1 at atdot.net Sun Oct 9 23:37:04 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 10 Oct 2005 12:37:04 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: References: <4348B90A.1060501@atdot.net> Message-ID: <4349E1E0.8050001@atdot.net> Hi, I reflected your comments. Thanks, -- SASADA Koichi at atdot dot net From ko1 at atdot.net Sun Oct 9 23:38:17 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 10 Oct 2005 12:38:17 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: References: <4348B90A.1060501@atdot.net> Message-ID: <4349E229.3020104@atdot.net> Hi, I reflected your comments. reviesed version: http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf Regards, -- SASADA Koichi at atdot dot net From surrender_it at yahoo.it Mon Oct 10 03:19:05 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon, 10 Oct 2005 00:19:05 -0700 (PDT) Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> Message-ID: <20051010071906.13370.qmail@web26207.mail.ukl.yahoo.com> --- SASADA Koichi wrote: > Hi, > > I'm making a poster for OOPSLA05 about YARV (A0 x > 2). It's my first > time to make posters for academic place :) > > http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf > (now, optimization is empty) > > Any comments are welcome. > > Thanks, I am not a native english speaker but I think the lines - in "future work": "Now YARV can almost Ruby syntax, native thread support" - in "optimization for vm speedup" "Create new instructions which are embedded specific operands or combined some instructions" sounds a little bit wrong. I hope a real english speaking person can check this :) icq #69488917 __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From sdate at everestkc.net Mon Oct 10 06:49:41 2005 From: sdate at everestkc.net (Shashank Date) Date: Mon, 10 Oct 2005 05:49:41 -0500 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> References: <4348B90A.1060501@atdot.net> Message-ID: <434A4745.4000500@everestkc.net> Hi, SASADA Koichi wrote: >http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf >(now, optimization is empty) > I have not followed all the changes suggested by others, so these may be a repetitions. On Page 2: 1. In "Project Objective", the statement reads: To solve this problem, several virtual _machines has_ been developed, but none has achieved adequate performance... It should be: To solve this problem, several virtual _machines have_ been developed, but none has achieved adequate performance... 2. In "Optimization of VM Speedup", under the bullet point: Operands, Instructions Unification (a.k.a. Super Instruction), the point is: Create new instructions which are embedded specific operands or combined some instructions. It is not clear to me what you want to say about the new instructions. But by looking at the context, my guess is: Create new instructions which embed specific operands or combine some instructions. 3. Down below under "Evaluation", the statement reads: Right two graphs show results of YARV speedup ratio compared to current Ruby interpreter. I would put it as: The two graphs on the right show results of YARV speedup ratio compared to current Ruby interpreter. 4. In the same box on the left, under "Status and Future work", the Issues list: Native Thread support and run Ruby program parallel It should be: Native Thread support and run Ruby programs in parallel 5. Under the Issues list again: AOT (Ahead-of-Time) Compilation completely It should be just: AOT (Ahead-of-Time) Compilation Or: Complete AOT (Ahead-of-Time) Compilation 6. Finally, Apply other optimizations using example from Smalltalk, Self and other dynamic OO languages. Should be: Apply other optimizations using examples from Smalltalk, Self and other dynamic OO languages. The word example should be plural. Unless, of course, there is only one example. :-) Hope this helps .... wish you the very best at RubyConf 05 and OOPSLA'05. Please consider writting for "Ruby Code and Style", the online Enlgish zine we launched today (10/10/2005). Thanks, -- Shashank From sdate at everestkc.net Mon Oct 10 07:02:18 2005 From: sdate at everestkc.net (Shashank Date) Date: Mon, 10 Oct 2005 06:02:18 -0500 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <434A4745.4000500@everestkc.net> References: <4348B90A.1060501@atdot.net> <434A4745.4000500@everestkc.net> Message-ID: <434A4A3A.2040003@everestkc.net> Hi, Shashank Date wrote: >I have not followed all the changes suggested by others, so these may be >a repetitions. > > You won't feel confident about my recommendations if I'm making mistakes in my own email ;-) Should have been: "... so these may be repetitions." >Please consider writting for "Ruby Code and Style", the online Enlgish >zine we launched today (10/10/2005). > > Forgot to mention the link: http://www.artima.com/rubycs/index.html Thanks for listening, -- Shashank From kashia at vfemail.net Mon Oct 10 08:21:08 2005 From: kashia at vfemail.net (Kashia Buch) Date: Mon, 10 Oct 2005 14:21:08 +0200 Subject: [Yarv-devel] evalc.patch Message-ID: Hi, this happened after applying the evalc.patch to current ruby CVS HEAD "2005-10-09": jo:~/build/ruby john$ patch -p0 < evalc.patch patching file eval.c Hunk #2 succeeded at 905 with fuzz 2 (offset -61 lines). Hunk #3 succeeded at 921 (offset -61 lines). Hunk #4 succeeded at 956 (offset -60 lines). Hunk #5 succeeded at 4557 with fuzz 2 (offset -167 lines). Hunk #6 succeeded at 4946 with fuzz 2 (offset -174 lines). Hunk #7 succeeded at 4961 (offset -180 lines). Hunk #8 succeeded at 5175 (offset -191 lines). Hunk #9 succeeded at 5651 with fuzz 1 (offset -238 lines). Hunk #10 succeeded at 5743 (offset -236 lines). Hunk #11 succeeded at 6007 with fuzz 2 (offset -224 lines). Hunk #12 succeeded at 6026 (offset -224 lines). Hunk #13 succeeded at 6036 (offset -225 lines). Hunk #14 succeeded at 6600 (offset -254 lines). Hunk #15 succeeded at 7713 (offset -324 lines). jo:~/build/ruby john$ make ... gcc -g -O2 -fno-common -pipe -fno-common -I. -I. -c eval.c eval.c: In function `rb_call0': eval.c:5659: error: `nosuper' undeclared (first use in this function) eval.c:5659: error: (Each undeclared identifier is reported only once eval.c:5659: error: for each function it appears in.) eval.c:5659: warning: passing arg 6 of pointer to function discards qualifiers from pointer target type make: *** [eval.o] Error 1 the lines in which the error occures: if(IS_YARV_WORKING()){ if(nd_type(body) == NODE_SCOPE){ rb_warning("Ruby method is invoked under YARV environment"); } else{ return YARV_CALL0(klass, recv, id, oid, argc, argv, body, nosuper); } } nosuper isn't defined in that function, I just added a "int nosuper = 0" before that call, it compiled flawlessly, but I somehow doubt that this is really correct. Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From kashia at vfemail.net Mon Oct 10 08:21:24 2005 From: kashia at vfemail.net (Kashia Buch) Date: Mon, 10 Oct 2005 14:21:24 +0200 Subject: [Yarv-devel] evalc.patch Message-ID: Hi, me again, next error: gcc main.o libruby1.9-static.a -lpthread -ldl -lobjc -o miniruby -g -O2 -fno-common -pipe -fno-common ld: Undefined symbols: _va_init_list make: *** [miniruby] Error 1 which should be defined somehere.. jo:~/build/ruby john$ grep -r va_init_list * eval.c: va_init_list(args, n); Binary file eval.o matches evalc.patch:+ va_init_list(args, n); ... Binary file libruby1.9-static.a matches so, it seems to be the patches fault again. jo:~/build/ruby john$ nm eval.o | grep init_list U _va_init_list so, Undefined symbol in eval.o.... in ext/tk/tcltklib.c:#define va_init_list(a,b) va_start(a,b) so, adding this #define to eval.c did the trick, but again, I'm not sure weither this is the intended behaviour... Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From ko1 at atdot.net Mon Oct 10 09:28:11 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 10 Oct 2005 22:28:11 +0900 Subject: [Yarv-devel] evalc.patch In-Reply-To: References: Message-ID: <434A6C6B.8080909@atdot.net> Hi, I'm Sorry, but I have not maintained evalc.patch. Please use non-patch version (Ruby full set). I'll remove eval.c patch next release (0.3.2). Kashia Buch wrote: > Hi, > > this happened after applying the evalc.patch to current ruby CVS HEAD > "2005-10-09": > > jo:~/build/ruby john$ patch -p0 < evalc.patch > patching file eval.c > Hunk #2 succeeded at 905 with fuzz 2 (offset -61 lines). > Hunk #3 succeeded at 921 (offset -61 lines). > Hunk #4 succeeded at 956 (offset -60 lines). > Hunk #5 succeeded at 4557 with fuzz 2 (offset -167 lines). > Hunk #6 succeeded at 4946 with fuzz 2 (offset -174 lines). > Hunk #7 succeeded at 4961 (offset -180 lines). > Hunk #8 succeeded at 5175 (offset -191 lines). > Hunk #9 succeeded at 5651 with fuzz 1 (offset -238 lines). > Hunk #10 succeeded at 5743 (offset -236 lines). > Hunk #11 succeeded at 6007 with fuzz 2 (offset -224 lines). > Hunk #12 succeeded at 6026 (offset -224 lines). > Hunk #13 succeeded at 6036 (offset -225 lines). > Hunk #14 succeeded at 6600 (offset -254 lines). > Hunk #15 succeeded at 7713 (offset -324 lines). > > jo:~/build/ruby john$ make > > ... > > gcc -g -O2 -fno-common -pipe -fno-common -I. -I. -c eval.c > eval.c: In function `rb_call0': > eval.c:5659: error: `nosuper' undeclared (first use in this function) > eval.c:5659: error: (Each undeclared identifier is reported only once > eval.c:5659: error: for each function it appears in.) > eval.c:5659: warning: passing arg 6 of pointer to function discards > qualifiers from pointer target type > make: *** [eval.o] Error 1 > > the lines in which the error occures: > > if(IS_YARV_WORKING()){ > if(nd_type(body) == NODE_SCOPE){ > rb_warning("Ruby method is invoked under YARV environment"); > } > else{ > return YARV_CALL0(klass, recv, id, oid, argc, argv, body, nosuper); > } > } > > nosuper isn't defined in that function, I just added a "int nosuper = > 0" before that call, it compiled flawlessly, but I somehow doubt that > this is really correct. > > > Kash -- SASADA Koichi at atdot dot net From ko1 at atdot.net Mon Oct 10 09:31:55 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon, 10 Oct 2005 22:31:55 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <434A4745.4000500@everestkc.net> References: <4348B90A.1060501@atdot.net> <434A4745.4000500@everestkc.net> Message-ID: <434A6D4B.5020001@atdot.net> Hi, Thanks. I reflected your comments. Shashank Date wrote: > Hi, > > SASADA Koichi wrote: > > >>http://www.atdot.net/~ko1/tmp/OOPSLA05_poster.pdf >>(now, optimization is empty) >> > > > I have not followed all the changes suggested by others, so these may be > a repetitions. > > On Page 2: > > 1. In "Project Objective", the statement reads: > > To solve this problem, several virtual _machines has_ been developed, > but none has achieved adequate performance... > > It should be: > > To solve this problem, several virtual _machines have_ been developed, > but none has achieved adequate performance... > > 2. In "Optimization of VM Speedup", under the bullet point: Operands, > Instructions Unification (a.k.a. Super Instruction), > the point is: > > Create new instructions which are embedded specific operands or combined > some instructions. > > It is not clear to me what you want to say about the new instructions. > But by looking at the context, my guess is: > > Create new instructions which embed specific operands or combine some > instructions. > > 3. Down below under "Evaluation", the statement reads: > > Right two graphs show results of YARV speedup ratio compared to current > Ruby interpreter. > > I would put it as: > > The two graphs on the right show results of YARV speedup ratio compared > to current Ruby interpreter. > > 4. In the same box on the left, under "Status and Future work", the > Issues list: > > Native Thread support and run Ruby program parallel > > It should be: > > Native Thread support and run Ruby programs in parallel > > 5. Under the Issues list again: > > AOT (Ahead-of-Time) Compilation completely > > It should be just: > > AOT (Ahead-of-Time) Compilation > > Or: > > Complete AOT (Ahead-of-Time) Compilation > > 6. Finally, > > Apply other optimizations using example from Smalltalk, Self and other > dynamic OO languages. > > Should be: > > Apply other optimizations using examples from Smalltalk, Self and other > dynamic OO languages. > > The word example should be plural. Unless, of course, there is only one > example. :-) > > Hope this helps .... wish you the very best at RubyConf 05 and OOPSLA'05. > Please consider writting for "Ruby Code and Style", the online Enlgish > zine we launched today (10/10/2005). > Congratulation for your web-zine startup. Sure :) And we can collaborate about Rubyist Magazine and Ruby-CS > Thanks, > -- Shashank Regards, -- SASADA Koichi at atdot dot net From kashia at vfemail.net Mon Oct 10 10:02:31 2005 From: kashia at vfemail.net (Kashia Buch) Date: Mon, 10 Oct 2005 16:02:31 +0200 Subject: [Yarv-devel] evalc.patch In-Reply-To: <434A6C6B.8080909@atdot.net> References: <434A6C6B.8080909@atdot.net> Message-ID: Hi, so I guess the patch isn't needed anymore, better anyway. thanks Kash On Mon, 10 Oct 2005 15:28:11 +0200, SASADA Koichi wrote: > Hi, > > I'm Sorry, but I have not maintained evalc.patch. Please use non-patch > version (Ruby full set). > > I'll remove eval.c patch next release (0.3.2). > > -- Feel the love http://pinkjuice.com/pics/ruby.png From ko1 at atdot.net Wed Oct 12 04:39:16 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Wed, 12 Oct 2005 17:39:16 +0900 Subject: [Yarv-devel] making OOPSLA05 Poster In-Reply-To: <4348B90A.1060501@atdot.net> References: <4348B90A.1060501@atdot.net> Message-ID: <434CCBB4.40209@atdot.net> Hi, I Thank everyone who give me comments about my poster. I printed out my posters (A0 is too big!!) yesterday. Now I'm practicing my rubyconf presentation. See you at RubyConf2005! Regards, -- // SASADA Koichi at atdot dot net // From daniel at brockman.se Sun Oct 9 18:31:41 2005 From: daniel at brockman.se (Daniel Brockman) Date: Mon, 10 Oct 2005 00:31:41 +0200 Subject: [Yarv-devel] making OOPSLA05 Poster References: <4348B90A.1060501@atdot.net> Message-ID: <87slvajp9u.fsf@wigwam.deepwood.net> In the sample code regarding classes and methods, there is a comment that says "overload". The correct term is "override". -- Daniel Brockman From ko1 at atdot.net Sat Oct 15 11:02:20 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Sun, 16 Oct 2005 00:02:20 +0900 Subject: [Yarv-devel] RubyConf 2005 PDF Message-ID: <435119FC.7090803@atdot.net> Hi, Here is RubyConf 2005 my presentation PDF: YARV Progress Report http://www.atdot.net/yarv/RubyConf2005_ko1_YARV.pdf Thank you very much for your (audiences) attention. Regards, -- SASADA Koichi From aurelianocalvo at yahoo.com.ar Tue Oct 18 18:09:11 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Tue, 18 Oct 2005 19:09:11 -0300 (ART) Subject: [Yarv-devel] Prevent operations in yarv Message-ID: <20051018220911.23091.qmail@web50405.mail.yahoo.com> Hi all, I'm trying to implement a security manager for ruby like the java security manager. In order to achieve it, I need to be able to selectively prevent some things to ocurr: * Method definition * Method undefinition * Method redefinition * Constant definition * Constant modification * Constant undefinition * Module/Class definition * Module/Class modification * Module/Class undefinition I've tried to implement a "pure ruby" solution, but I've found that it's impossible to prevent the definition, redefinition and undefinition of a constant and it's very very tricky to prevent the other operations (for instance method redefinition can be prevented by aliasing every method and overloading the method_added method to go back to the original implementation). What would be nice is for ruby to have built in something like the feature described in http://www.rubygarden.org/ruby?EventOrientedRuby. Is it supported by yarv/rite? Can something like it be implemented with a "pure jarv" solution? (i.e. without modifying the interpreter or adding C modules). Thank you very much for your time, Aureliano. ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From ko1 at atdot.net Mon Oct 24 20:01:31 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue, 25 Oct 2005 09:01:31 +0900 Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: <20051018220911.23091.qmail@web50405.mail.yahoo.com> References: <20051018220911.23091.qmail@web50405.mail.yahoo.com> Message-ID: <435D75DB.80306@atdot.net> Hi, I want to support re-writing instruction sequence on Ruby level. ex) [ruby program] -> YARV compiler -> [YARV instruction sequence (base)] -> Ruby program (you can add it) -> [YARV instruction sequence (changed)] Using this feature, I think you can make security manager. Of course, you must know YARV instruction set. Aureliano Calvo wrote: > Hi all, > I'm trying to implement a security manager for ruby > like the java security manager. In order to achieve > it, I need to be able to selectively prevent some > things to ocurr: > > * Method definition > * Method undefinition > * Method redefinition > * Constant definition > * Constant modification > * Constant undefinition > * Module/Class definition > * Module/Class modification > * Module/Class undefinition > > I've tried to implement a "pure ruby" solution, but > I've found that it's impossible to prevent the > definition, redefinition and undefinition of a > constant and it's very very tricky to prevent the > other operations (for instance method redefinition can > be prevented by aliasing every method and overloading > the method_added method to go back to the original > implementation). > > What would be nice is for ruby to have built in > something like the feature described in > http://www.rubygarden.org/ruby?EventOrientedRuby. > > Is it supported by yarv/rite? > > Can something like it be implemented with a "pure > jarv" solution? (i.e. without modifying the > interpreter or adding C modules). > > Thank you very much for your time, > Aureliano. > > > > > > > > ___________________________________________________________ > 1GB gratis, Antivirus y Antispam > Correo Yahoo!, el mejor correo web del mundo > http://correo.yahoo.com.ar > -- SASADA Koichi at atdot dot net From aurelianocalvo at yahoo.com.ar Mon Oct 24 22:33:35 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Tue, 25 Oct 2005 02:33:35 +0000 (GMT) Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: <435D75DB.80306@atdot.net> Message-ID: <20051025023335.36869.qmail@web50411.mail.yahoo.com> Is there a way to modify the YARV instruction sequence in runtime? I would like to modify the instructions of an eval statement. Is this feature implemented or is on the to do list? Thank's in advance, Aureliano. > Hi, > > I want to support re-writing instruction sequence on > Ruby level. > > ex) > [ruby program] -> > YARV compiler -> > [YARV instruction sequence (base)] -> > Ruby program (you can add it) -> > [YARV instruction sequence (changed)] > > Using this feature, I think you can make security > manager. Of course, > you must know YARV instruction set. > > Aureliano Calvo wrote: > > Hi all, > > I'm trying to implement a security manager for > ruby > > like the java security manager. In order to > achieve > > it, I need to be able to selectively prevent some > > things to ocurr: > > > > * Method definition > > * Method undefinition > > * Method redefinition > > * Constant definition > > * Constant modification > > * Constant undefinition > > * Module/Class definition > > * Module/Class modification > > * Module/Class undefinition > > > > I've tried to implement a "pure ruby" solution, > but > > I've found that it's impossible to prevent the > > definition, redefinition and undefinition of a > > constant and it's very very tricky to prevent the > > other operations (for instance method redefinition > can > > be prevented by aliasing every method and > overloading > > the method_added method to go back to the original > > implementation). > > > > What would be nice is for ruby to have built in > > something like the feature described in > > http://www.rubygarden.org/ruby?EventOrientedRuby. > > > > Is it supported by yarv/rite? > > > > Can something like it be implemented with a "pure > > jarv" solution? (i.e. without modifying the > > interpreter or adding C modules). > > > > Thank you very much for your time, > > Aureliano. > > > > > > > > > > > > > > > > > ___________________________________________________________ > > > 1GB gratis, Antivirus y Antispam > > Correo Yahoo!, el mejor correo web del mundo > > http://correo.yahoo.com.ar > > > > > -- > SASADA Koichi at atdot dot net > ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From ko1 at atdot.net Tue Oct 25 01:19:21 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue, 25 Oct 2005 14:19:21 +0900 Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: <20051025023335.36869.qmail@web50411.mail.yahoo.com> References: <20051025023335.36869.qmail@web50411.mail.yahoo.com> Message-ID: <435DC059.70004@atdot.net> Hi, Aureliano Calvo wrote: > Is there a way to modify the YARV instruction sequence > in runtime? I would like to modify the instructions of > an eval statement. > > Is this feature implemented or is on the to do list? on to do list :) Regards, -- // SASADA Koichi at atdot dot net // From wilsonb at gmail.com Tue Oct 25 12:47:20 2005 From: wilsonb at gmail.com (Wilson Bilkovich) Date: Tue, 25 Oct 2005 12:47:20 -0400 Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: <435DC059.70004@atdot.net> References: <20051025023335.36869.qmail@web50411.mail.yahoo.com> <435DC059.70004@atdot.net> Message-ID: Does this mean that you could use RubyInline to write YARV VM instructions directly, as well? Some people are doing very interesting things by writing Java bytecode by hand. On 10/25/05, SASADA Koichi wrote: > Hi, > > Aureliano Calvo wrote: > > Is there a way to modify the YARV instruction sequence > > in runtime? I would like to modify the instructions of > > an eval statement. > > > > Is this feature implemented or is on the to do list? > > on to do list :) > > Regards, > -- > // SASADA Koichi at atdot dot net > // > > From surrender_it at yahoo.it Tue Oct 25 13:55:04 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Tue, 25 Oct 2005 10:55:04 -0700 (PDT) Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: Message-ID: <20051025175504.98115.qmail@web26201.mail.ukl.yahoo.com> --- Wilson Bilkovich ha scritto: > Does this mean that you could use RubyInline to > write YARV VM > instructions directly, as well? > Some people are doing very interesting things by > writing Java bytecode by hand. I wonder how much of that is needed in javaland but possible in ruby with metaprogramming :) icq #69488917 ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it From aurelianocalvo at yahoo.com.ar Tue Oct 25 17:25:28 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Tue, 25 Oct 2005 18:25:28 -0300 (ART) Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: <20051025175504.98115.qmail@web26201.mail.ukl.yahoo.com> Message-ID: <20051025212528.50079.qmail@web50401.mail.yahoo.com> > > Does this mean that you could use RubyInline to > > write YARV VM > > instructions directly, as well? > > Some people are doing very interesting things by > > writing Java bytecode by hand. > > I wonder how much of that is needed in javaland but > possible in ruby with metaprogramming :) > > icq #69488917 I agree that there are a lot of tasks that can be written in plain ruby but not in plain java, but I've found one thing that can't (prevent method/constant redefinition). I also believe that might be possible to give ruby better AOP support with it. Aureliano. ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From ko1 at atdot.net Tue Oct 25 17:26:41 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Wed, 26 Oct 2005 06:26:41 +0900 Subject: [Yarv-devel] Prevent operations in yarv In-Reply-To: References: <20051025023335.36869.qmail@web50411.mail.yahoo.com> <435DC059.70004@atdot.net> Message-ID: <435EA311.7020902@atdot.net> Hi, I can't imagine this feature with RubyInline. How do you use it? Wilson Bilkovich wrote: > Does this mean that you could use RubyInline to write YARV VM > instructions directly, as well? > Some people are doing very interesting things by writing Java bytecode by hand. > > On 10/25/05, SASADA Koichi wrote: > >>Hi, >> >>Aureliano Calvo wrote: >> >>>Is there a way to modify the YARV instruction sequence >>>in runtime? I would like to modify the instructions of >>>an eval statement. >>> >>>Is this feature implemented or is on the to do list? >> >>on to do list :) >> >>Regards, >>-- >>// SASADA Koichi at atdot dot net >>// >> >> > > -- SASADA Koichi at atdot dot net From surrender_it at yahoo.it Fri Oct 28 20:29:47 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Fri, 28 Oct 2005 17:29:47 -0700 (PDT) Subject: [Yarv-devel] Warning on win32 Message-ID: <20051029002947.90424.qmail@web26208.mail.ukl.yahoo.com> Hi list, I just tried compiling the latest revision on win32, and I get this warnings: In file included from thread.c:67: thread_win32.h: In function `native_thread_crteate': thread_win32.h:196: warning: passing arg 3 of `_beginthreadex' from incompatible pointer type thread_win32.h: In function `make_timer_thread': thread_win32.h:222: warning: passing arg 3 of `_beginthreadex' from incompatible pointer type which I think means that timer_thread_func() and thread_start_func_1() should be declared as returning "unsigned int" not "int". The point is that all tests pass anyway, whatever the declaration is, which IMHO means that: - we can make the compiler happy by changing declarations - or the test suite is missing a test that should cause failing :) Additional info: OS: winxp SP2 cc: gcc version 3.4.2 (mingw-special, Thread model: win32) CPU: Athlon XP YARV: revision 283 icq #69488917 ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it