tag:blogger.com,1999:blog-20975090.post2001975335024875881..comments2024-03-11T10:18:55.852-05:00Comments on Headius: The Compiler Is CompleteCharles Oliver Nutterhttp://www.blogger.com/profile/06400331959739924670noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-20975090.post-81265462300654232802008-03-24T06:34:00.000-05:002008-03-24T06:34:00.000-05:00Thanks for sharing!Thanks for sharing!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-36582387341931842752007-09-30T14:13:00.000-05:002007-09-30T14:13:00.000-05:00Amazing how you could work on a compiler, while pa...Amazing how you could work on a compiler, while participating (actively) in a conference and having beer in the evening (while fixing the last bug in the compiler).<BR/><BR/>Congratulations, and nice seeing you at JAOO.luposliphttps://www.blogger.com/profile/13285410918546723084noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-15475314589415187972007-09-30T11:06:00.000-05:002007-09-30T11:06:00.000-05:00Congratulations on getting the compiler finished, ...Congratulations on getting the compiler finished, this ought to shake things up a bit :)<BR/><BR/>With regards to your second compiler, how about using an accessor-style syntax for type information:<BR/><BR/>def fun(foo, bar)<BR/> returns :fun => :String<BR/> accepts :foo => :Integer, :bar => :Array<BR/> ...<BR/>end<BR/><BR/>where the action of <EM>returns</EM> and <EM>accepts</EM> would be implementation-dependent. This is obviously a more verbose approach than the bare hash, but does add some additional flexibility.Elliehttps://www.blogger.com/profile/05205879344358972314noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-78864298007599886362007-09-30T01:19:00.000-05:002007-09-30T01:19:00.000-05:00My only problem with comment based type signatures...My only problem with comment based type signatures is that they aren't amenable to use for annotating dynamically defined methods.<BR/><BR/>I think probably the best option is an explicit class method in Class, like the jsig proposals, with perhaps a NOP definition for use in regular ruby.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-75524407633379402302007-09-29T11:36:00.000-05:002007-09-29T11:36:00.000-05:00A truly great accomplishment by the whole JRuby te...A truly great accomplishment by the whole JRuby team! I'm looking forward to even more Java/JRuby goodness from Compiler #2, #3, ..., #100... ;)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-89688015502698532802007-09-29T09:33:00.000-05:002007-09-29T09:33:00.000-05:00FYI, here's the Python 3000 approach to type annot...FYI, here's the Python 3000 approach to type annotations:<BR/><BR/>def foobar(a: Integer, b: Sequence) -> String:<BR/><BR/>From Guido:<BR/><BR/>"Function and method signatures may now be 'annotated'. The core language assigns no meaning to these annotations (other than making them available for introspection), but some standard library modules may do so; for example, generic functions can use these. The syntax is easy to read"<BR/><BR/>I definitely prefer to have them inlined in some fashion. I find your proposed notation rather ugly, sorry.Daniel Bergerhttps://www.blogger.com/profile/05224445093970941579noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-88868954674023933942007-09-29T04:45:00.000-05:002007-09-29T04:45:00.000-05:00Congratulations! This is a great achievement. It i...Congratulations! This is a great achievement. It is truly amazing how quickly JRuby is evolving!Unknownhttps://www.blogger.com/profile/14088176944493012286noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-2417179191800481882007-09-29T03:26:00.000-05:002007-09-29T03:26:00.000-05:00Congratulations on a truly awesome job.I am curiou...Congratulations on a truly awesome job.<BR/><BR/>I am curious how you are handling a couple of things though,<BR/><BR/>1. evals, particularly ones where you yield self<BR/>2. dynamic class mutations, both cases like,<BR/><BR/>class MyClass<BR/> if (...)<BR/> def optionalMessage<BR/> ...<BR/> end<BR/> end<BR/>end<BR/><BR/>or a more dynamic,<BR/><BR/>def addDynamicMethod (dynamicMessage)<BR/> class_eval %{<BR/> def #{dynamicMessage}<BR/> ..<BR/> end<BR/> }<BR/>endUnknownhttps://www.blogger.com/profile/01039949530362620311noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-43865719498068818522007-09-28T22:33:00.000-05:002007-09-28T22:33:00.000-05:00This is great news. I am involved in a project tha...This is great news. I am involved in a project that looks to use JRuby for a SOAP to CORBA bridge. Ruby handles the SOAP well and Java the CORBA.War Pighttps://www.blogger.com/profile/10333252944478188995noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-89712323202363333172007-09-28T22:29:00.000-05:002007-09-28T22:29:00.000-05:00Congratulations Charlie. Your hard work and such r...Congratulations Charlie. Your hard work and such rapid progress is truly inspiring.Unknownhttps://www.blogger.com/profile/04108815911047289904noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-64152535876078879722007-09-28T18:57:00.000-05:002007-09-28T18:57:00.000-05:00Congratulations!jruby will become a first class ci...Congratulations!<BR/>jruby will become a first class citizen of java AND ruby world. I like the idea of the second compiler with lisp like optional types. Why not use a comment? With the correct mathematical order?<BR/># Integer, HashMap -> StringAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-40732285269398294922007-09-28T18:33:00.000-05:002007-09-28T18:33:00.000-05:00i like the idea of a jsignature idea.jsig :method_...i like the idea of a jsignature idea.<BR/>jsig :method_name, :result, { :operand1 => :string, :operand2 => :int, ect... };<BR/><BR/>Or something to that affect.<BR/><BR/>I have used the comment version before in PHP5 using Services API/libraries not native to PHP for generating soap service xml files. The comment solution is very messy and you have scattered siguratures all over the file structure.bluetechnxhttps://www.blogger.com/profile/02127531110871598518noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-89636445146387535642007-09-28T16:13:00.000-05:002007-09-28T16:13:00.000-05:00Excellent! Thank you guys! This is a huge accompli...Excellent! Thank you guys! This is a huge accomplishment -- you should all be very proud.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-50497787563564879992007-09-28T14:48:00.000-05:002007-09-28T14:48:00.000-05:00Congratulations!You Rock!!Congratulations!<BR/><BR/>You Rock!!David Pollakhttps://www.blogger.com/profile/16630520857988769066noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-55028590910600921702007-09-28T13:45:00.000-05:002007-09-28T13:45:00.000-05:00Congratulations ! It's simply amazing how the JRub...Congratulations ! It's simply amazing how the JRuby is evolving. <BR/><BR/>Now, take a good rest and enjoy some beers to celebrate it ! :)<BR/><BR/>Thank you for your work.Juanhttps://www.blogger.com/profile/13647599128989425747noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-14816119172610071812007-09-28T11:41:00.000-05:002007-09-28T11:41:00.000-05:00One possible advantage for a comment-based annotat...One possible advantage for a comment-based annotation is that it would be more amenable to rdoc processing.J. Whitleyhttps://www.blogger.com/profile/17649079072897089690noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-18818648839068057662007-09-28T11:31:00.000-05:002007-09-28T11:31:00.000-05:00This is super cool - much needed.1) Can you compil...This is super cool - much needed.<BR/><BR/>1) Can you compile in GUI code too - maybe Swing or something simpler? <BR/>2) Will you be posting simple "Hello World"-sized compiled examples? (And how to run the compiler from NetBeans?)<BR/>3) Can you post a simple "Hello World" of loading .rb files from a JAR right now?<BR/><BR/>Congrats - this is really revolutionary - and much needed.Brianhttps://www.blogger.com/profile/11750361403997207912noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-72931777604221058842007-09-28T11:02:00.000-05:002007-09-28T11:02:00.000-05:00anonymous 4: yep, that's about the size, though yo...anonymous 4: yep, that's about the size, though you can also load .rb files from a JAR right now too.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-34332154031195698032007-09-28T10:52:00.000-05:002007-09-28T10:52:00.000-05:00Congrats on a fantastic achievement! Things are ge...Congrats on a fantastic achievement! Things are getting REALLY interesting in JRuby world :)msphttps://www.blogger.com/profile/06091396940530707913noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-54621725603563287172007-09-28T10:15:00.000-05:002007-09-28T10:15:00.000-05:00i might be a little silly but maybe someone can he...i might be a little silly but maybe someone can help explain<BR/><BR/>does this mean i could use ruby, and have a java-like thingy ready to move to other machines?<BR/>or in other words, write in ruby but could distribute something like a .jar file or similar?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-20590876807435991742007-09-28T08:40:00.000-05:002007-09-28T08:40:00.000-05:00anonymous 2: comments would work too, but it would...anonymous 2: comments would work too, but it would require bit of additional parsing magic and might look a little ugly in the actual code. Of course, the map version isn't exactly beautiful either.<BR/><BR/>anonymous 3: performance when compiled is roughly double the interpreted performance, but there's still a lot of optimization to be done in both the compiled code and in the call logic.<BR/><BR/>okke: Of your ideas, only the convention and comment versions would meet my goal of having the same code run in both places. I think that's absolutely essential, since we have no intention of doing the whole "embrace and extend" thing in compatibility-breaking ways.Charles Oliver Nutterhttps://www.blogger.com/profile/06400331959739924670noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-20830539881040216822007-09-28T08:15:00.000-05:002007-09-28T08:15:00.000-05:00Great news!And indeed it would be a more than love...Great news!And indeed it would be a more than lovely addition when 'pure' java classes can be generated from ruby code.<BR/><BR/>About the proposed syntax. Why not open up the class method and add a method to define the java signature of a ruby method so you write something like<BR/><BR/>class MyClass {<BR/> jsignature :bla, :returns => String, :x => Integer, :y => Integer<BR/> <BR/> def bla(x,y) {<BR/> return "#{x},#{y}<BR/> }<BR/>}<BR/><BR/>A bit more verbose but better readable.<BR/><BR/>Another idea is to apply a 'by convention mechanism'<BR/><BR/>def str_bla(int_x, int_y) {<BR/> ....<BR/>}<BR/><BR/>and finally, since you control the compiler, why not introduce compiler directives using commment lines <BR/><BR/># @param x int<BR/># @param y int<BR/># @return String<BR/>#<BR/>def str_bla(int_x, int_y) {<BR/> ....<BR/>}<BR/><BR/>Or support all three ways to specify a signature. Just a few ideas ...<BR/><BR/>Nevertheless, great work!Okkehttps://www.blogger.com/profile/09887610259313782730noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-85243513038388163002007-09-28T08:07:00.000-05:002007-09-28T08:07:00.000-05:00Triply congrats...Triply congrats...Marianohttps://www.blogger.com/profile/04576024486566426295noreply@blogger.comtag:blogger.com,1999:blog-20975090.post-67600246691779513272007-09-28T07:55:00.000-05:002007-09-28T07:55:00.000-05:00Congratulations!Have you done any performance test...Congratulations!<BR/><BR/>Have you done any performance test compared to the interpreted one? Is it much faster?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20975090.post-16172310713851597362007-09-28T07:46:00.001-05:002007-09-28T07:46:00.001-05:00First of all congrats for the compiler, for sure t...First of all congrats for the compiler, for sure that's a big day.<BR/><BR/>But I should say I REALLY like your second compiler idea. This would be a fantastic way to get optional typing. I like Ruby quite much, but I'll never dismiss: in some cases (large teams and large time scales), static typing is required.<BR/><BR/>JRuby was already a good way to overcome that by allowing one to split up the code base between what should be statically constrained and should, on the contrary, allow quick prototyping. Your new compiler idea is just an other major step forward in that direction. That's great!<BR/><BR/>Raphaël ValyiRaphaël Valyihttps://www.blogger.com/profile/01805258585519968165noreply@blogger.com