Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #2430 > unrolled thread
| Started by | Sniper Abandon <sathish.salem.1984@gmail.com> |
|---|---|
| First post | 2011-04-07 01:44 -0500 |
| Last post | 2011-04-11 09:07 -0500 |
| Articles | 20 on this page of 27 — 14 participants |
Back to article view | Back to comp.lang.ruby
can we use direct ruby instaed of javascript ? Sniper Abandon <sathish.salem.1984@gmail.com> - 2011-04-07 01:44 -0500
Re: can we use direct ruby instaed of javascript ? Dhruva Sagar <dhruva.sagar@gmail.com> - 2011-04-07 01:52 -0500
Re: can we use direct ruby instaed of javascript ? Michal Suchanek <hramrach@centrum.cz> - 2011-04-07 08:00 -0500
Re: can we use direct ruby instaed of javascript ? Sniper Abandon <sathish.salem.1984@gmail.com> - 2011-04-07 02:33 -0500
Re: can we use direct ruby instaed of javascript ? Dhruva Sagar <dhruva.sagar@gmail.com> - 2011-04-07 03:17 -0500
Re: can we use direct ruby instaed of javascript ? Mike Stephens <rubfor@recitel.net> - 2011-04-07 07:28 -0500
Re: can we use direct ruby instaed of javascript ? Peter Zotov <whitequark@whitequark.org> - 2011-04-07 07:50 -0500
Re: can we use direct ruby instaed of javascript ? Peter Zotov <whitequark@whitequark.org> - 2011-04-07 15:37 -0500
Re: can we use direct ruby instaed of javascript ? Julian Leviston <julian@coretech.net.au> - 2011-04-07 23:46 -0500
Re: can we use direct ruby instaed of javascript ? Josh Cheek <josh.cheek@gmail.com> - 2011-04-08 08:03 -0500
Re: can we use direct ruby instaed of javascript ? Johnny Morrice <spoon@killersmurf.com> - 2011-04-08 08:20 -0500
Re: can we use direct ruby instaed of javascript ? Johnny Morrice <spoon@killersmurf.com> - 2011-04-08 08:34 -0500
Re: can we use direct ruby instaed of javascript ? Michal Suchanek <hramrach@centrum.cz> - 2011-04-11 04:45 -0500
Re: can we use direct ruby instaed of javascript ? Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-11 05:34 -0500
Re: can we use direct ruby instaed of javascript ? Michal Suchanek <hramrach@centrum.cz> - 2011-04-11 07:59 -0500
Re: can we use direct ruby instaed of javascript ? William Rutiser <wruyahoo05@comcast.net> - 2011-04-11 09:48 -0500
Re: can we use direct ruby instaed of javascript ? Johnny Morrice <spoon@killersmurf.com> - 2011-04-11 11:53 -0500
Re: can we use direct ruby instaed of javascript ? Johnny Morrice <spoon@killersmurf.com> - 2011-04-11 11:57 -0500
"of" keyword? inverse dot syntax... Julian Leviston <julian@coretech.net.au> - 2011-04-08 03:34 -0500
Re: "of" keyword? inverse dot syntax... Josh Cheek <josh.cheek@gmail.com> - 2011-04-08 07:52 -0500
Re: "of" keyword? inverse dot syntax... Ryan Davis <ryand-ruby@zenspider.com> - 2011-04-08 14:02 -0500
Re: "of" keyword? inverse dot syntax... Vincent Manis <vmanis@telus.net> - 2011-04-08 20:42 -0500
Re: "of" keyword? inverse dot syntax... Yossef Mendelssohn <ymendel@pobox.com> - 2011-04-09 18:13 -0500
Re: can we use direct ruby instaed of javascript ? Peter Zotov <whitequark@whitequark.org> - 2011-04-08 04:47 -0500
Re: can we use direct ruby instaed of javascript ? Alexey Petrushin <axyd80@gmail.com> - 2011-04-09 22:58 -0500
Re: can we use direct ruby instaed of javascript ? Josh Cheek <josh.cheek@gmail.com> - 2011-04-11 08:17 -0500
Re: can we use direct ruby instaed of javascript ? Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-11 09:07 -0500
Page 1 of 2 [1] 2 Next page →
| From | Sniper Abandon <sathish.salem.1984@gmail.com> |
|---|---|
| Date | 2011-04-07 01:44 -0500 |
| Subject | can we use direct ruby instaed of javascript ? |
| Message-ID | <7698971be5bff34f106ae0323b85f847@ruby-forum.com> |
Hi Ninjas, i am a ROR Developer . I feel happy to develop in ROR over other frameworks because of the simplicity of Ruby Language For browser side code i am using Javascript/ActionScript . but i would like to use Ruby in browser side also (instead of Javascript/ActionScript) Is there any way to do this ? or Is there any active development /future plan to implement Ruby VM on browser engine (instead of javascript/actionscript engines ) ? if yes? then i also want to join in that community/dev team . if not? please some body initiate a plan to develop a Ruby VM for browser engine (so i can join with you) i know already that prototype/jquery frameworks are there but those are not looking like pure ruby code Anyone have an Idea/Suggestion/Intrest ? please let me know by Mokkai @ TLI -- Posted via http://www.ruby-forum.com/.
[toc] | [next] | [standalone]
| From | Dhruva Sagar <dhruva.sagar@gmail.com> |
|---|---|
| Date | 2011-04-07 01:52 -0500 |
| Message-ID | <BANLkTinvixb_nRE_ky5HRBFD0b_P8FLHhg@mail.gmail.com> |
| In reply to | #2430 |
[Note: parts of this message were removed to make it a legal post.] Hi, I am sure there are quite a few projects out there to do what you wish to. Quite sometime back I came across this - http://ejohn.org/blog/ruby-vm-in-javascript/ <http://ejohn.org/blog/ruby-vm-in-javascript/>That should help you out, I haven't used it or worked on it extensively, but it is close to what you wish to do. On Thu, Apr 7, 2011 at 12:14, Sniper Abandon <sathish.salem.1984@gmail.com>wrote: > Hi Ninjas, > > i am a ROR Developer . > I feel happy to develop in ROR over other frameworks because of the > simplicity of Ruby Language > > For browser side code i am using Javascript/ActionScript . > but i would like to use Ruby in browser side also (instead of > Javascript/ActionScript) > Is there any way to do this ? > or > Is there any active development /future plan to implement Ruby VM on > browser engine (instead of javascript/actionscript engines ) ? > if yes? then i also want to join in that community/dev team . > if not? please some body initiate a plan to develop a Ruby VM for > browser engine (so i can join with you) > i know already that prototype/jquery frameworks are there but those are > not > looking like pure ruby code > > Anyone have an Idea/Suggestion/Intrest ? > please let me know > > by > > Mokkai @ TLI > > -- > Posted via http://www.ruby-forum.com/. > > -- Thanks & Regards, Dhruva Sagar <http://dhruvasagar.net> ---------------------------- Technical Developer - Mentor, Artha42 Innovations Pvt. Ltd. <http://www.artha42.com/> Become an expert in Rails. Join our 3 day Rails workshop and learn Ruby, Rails 3, Cucumber and Git. http://www.railspundit.com
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@centrum.cz> |
|---|---|
| Date | 2011-04-07 08:00 -0500 |
| Message-ID | <BANLkTi=BYhtjST30fZ3auwLE3qUi3R5JKg@mail.gmail.com> |
| In reply to | #2431 |
On 7 April 2011 08:52, Dhruva Sagar <dhruva.sagar@gmail.com> wrote: > Hi, > > I am sure there are quite a few projects out there to do what you wish to. > Quite sometime back I came across this - > http://ejohn.org/blog/ruby-vm-in-javascript/ > > <http://ejohn.org/blog/ruby-vm-in-javascript/>That should help you out, I > haven't used it or worked on it extensively, but it is close to what you > wish to do. > Another option to use might be JRuby. Java plugin is quite standard in browsers these days. HTH Michal
[toc] | [prev] | [next] | [standalone]
| From | Sniper Abandon <sathish.salem.1984@gmail.com> |
|---|---|
| Date | 2011-04-07 02:33 -0500 |
| Message-ID | <9f88b9ab42170944b96ef074a44aa1d7@ruby-forum.com> |
| In reply to | #2430 |
thx , but i thing HotRuby is dead. There are no updates from last 3 years -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Dhruva Sagar <dhruva.sagar@gmail.com> |
|---|---|
| Date | 2011-04-07 03:17 -0500 |
| Message-ID | <BANLkTin9WEr3e3EcyEfMj6_SW9hQAGDJNQ@mail.gmail.com> |
| In reply to | #2433 |
[Note: parts of this message were removed to make it a legal post.] Hmmm, I only know of that. On Thu, Apr 7, 2011 at 13:03, Sniper Abandon <sathish.salem.1984@gmail.com>wrote: > thx , but i thing HotRuby is dead. There are no updates from last 3 > years > > -- > Posted via http://www.ruby-forum.com/. > > -- Thanks & Regards, Dhruva Sagar <http://dhruvasagar.net> ---------------------------- Technical Developer - Mentor, Artha42 Innovations Pvt. Ltd. <http://www.artha42.com/> Become an expert in Rails. Join our 3 day Rails workshop and learn Ruby, Rails 3, Cucumber and Git. http://www.railspundit.com
[toc] | [prev] | [next] | [standalone]
| From | Mike Stephens <rubfor@recitel.net> |
|---|---|
| Date | 2011-04-07 07:28 -0500 |
| Message-ID | <39dafadfde0e5543c1b1c5325643f337@ruby-forum.com> |
| In reply to | #2430 |
If you have been to any large corporate's offices of late, you would notice that pcs are so locked down it's surprising you're still allowed to touch the keyboard. If you tried to require such users to load Ruby, you would immediately lose a huge target audience. Would all those employees wait until they got home to user your site, or log on to a more friendly competitor? If you want to code in Ruby, I suggest you need to think about a pe-processor that turns Ruby into JavaScript prior to sending the page. -- Posted via http://www.ruby-forum.com/.
[toc] | [prev] | [next] | [standalone]
| From | Peter Zotov <whitequark@whitequark.org> |
|---|---|
| Date | 2011-04-07 07:50 -0500 |
| Subject | Re: can we use direct ruby instaed of javascript ? |
| Message-ID | <a15f52a23b74fa2e803f796204c2c31e@mail.whitequark.org> |
| In reply to | #2430 |
On Thu, 7 Apr 2011 15:44:50 +0900, Sniper Abandon wrote: > Hi Ninjas, > > i am a ROR Developer . > I feel happy to develop in ROR over other frameworks because of the > simplicity of Ruby Language > > For browser side code i am using Javascript/ActionScript . > but i would like to use Ruby in browser side also (instead of > Javascript/ActionScript) > Is there any way to do this ? I have a project called ColdRuby which is essentially a Ruby 1.9 bytecode to JavaScript translator. It cannot (yet) even load mspec/RubySpec, but is already somewhat usable. http://github.com/whitequark/coldruby -- WBR, Peter Zotov.
[toc] | [prev] | [next] | [standalone]
| From | Peter Zotov <whitequark@whitequark.org> |
|---|---|
| Date | 2011-04-07 15:37 -0500 |
| Subject | Re: can we use direct ruby instaed of javascript ? |
| Message-ID | <f2bd41732314686b9da54fedf61e213a@mail.whitequark.org> |
| In reply to | #2453 |
On Fri, 8 Apr 2011 01:48:58 +0900, Chad Perrin wrote: > On Thu, Apr 07, 2011 at 09:50:14PM +0900, Peter Zotov wrote: >> On Thu, 7 Apr 2011 15:44:50 +0900, Sniper Abandon wrote: >> > >> >i am a ROR Developer . I feel happy to develop in ROR over other >> >frameworks because of the simplicity of Ruby Language >> > >> >For browser side code i am using Javascript/ActionScript . but i >> >would like to use Ruby in browser side also (instead of >> >Javascript/ActionScript) Is there any way to do this ? >> >> I have a project called ColdRuby which is essentially a Ruby 1.9 >> bytecode to JavaScript translator. It cannot (yet) even load >> mspec/RubySpec, but is already somewhat usable. >> >> http://github.com/whitequark/coldruby > > I don't see any license listed. Did I overlook it? The Ruby license, of course. It is implicit. (Indeed, I just forgot to add it to git. Fixed already.) -- WBR, Peter Zotov.
[toc] | [prev] | [next] | [standalone]
| From | Julian Leviston <julian@coretech.net.au> |
|---|---|
| Date | 2011-04-07 23:46 -0500 |
| Subject | Re: can we use direct ruby instaed of javascript ? |
| Message-ID | <99220FC9-DD3C-43A7-B219-D8F320FBE7F8@coretech.net.au> |
| In reply to | #2485 |
I think it might be actually quite interesting for the original poster to take some of FONC's work such as OMeta, and then the Rubinius project... and use it to build Ruby in OMeta, which could then be used quite easily to plug this Ruby implementation in OMeta into the JavaScript implementation OMeta which is already existing... For an example of SmallTalk already written in OMeta/JS (ie SmallTalk running inside Javascript, through OMeta), please see: http://tinlizzie.org/ometa/ometa-js-old/ Given that JavaScript is pretty much the *only* fully realised cross-browser cross-platform implemented programming language that we have available to us (ie guaranteed to be on EVERY machine for the last 10 years), and also given that so much work is continually put into making these interpreters fast and small, I think writing things on top of JavaScript is a brilliant idea. The other interesting thing about targeting OMeta as an implementation language for a VM in Ruby, while incredibly technically challenging, is that it would be infinitely rewarding, as there are versions of OMeta written in most common programming languages already (which means the target language base of the Ruby implementation in OMeta would grow without any additional effort on the part of the programmers)... people are writing OMeta implementations in various languages, and there are already ones written in: OMeta itself, C#, SmallTalk, Scheme, Lisp, Python and Ruby (I'm fairly sure there are some written in id.st (or Cola, whatever you want to call it) as well ;-)) Just my two cents. "You are now able to program any browser in the world with any language you want" http://www.youtube.com/watch?v=YEx4jfdFp1k Julian. ---------------------------------------------- Buy my new album! 16 Sep 2010: http://itunes.apple.com/au/album/erste-zeit/id393326346 On 08/04/2011, at 12:01 PM, Chad Perrin wrote: > On Fri, Apr 08, 2011 at 05:37:49AM +0900, Peter Zotov wrote: >> On Fri, 8 Apr 2011 01:48:58 +0900, Chad Perrin wrote: >>> >>> I don't see any license listed. Did I overlook it? >> >> The Ruby license, of course. It is implicit. >> (Indeed, I just forgot to add it to git. Fixed already.) > > I haven't looked closely enough to know which way this goes, but one of > two sets of conditions are likely to apply here: > > 1. It's "implicit" because it incorporates Ruby Licensed code in a way > that requires the Ruby License to be applied to the whole project. In > this case, you violate the terms of the license if you do not include the > license text with the code. > > 2. It's not "implicit", and needs license notification. > > I'm not a lawyer, but I spend a lot of time trying to avoid giving > lawyers reason to contact me with bad news. > > -- > Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
[toc] | [prev] | [next] | [standalone]
| From | Josh Cheek <josh.cheek@gmail.com> |
|---|---|
| Date | 2011-04-08 08:03 -0500 |
| Message-ID | <BANLkTik4HHa=yFM2T75YEjYm8wsh=d7eQQ@mail.gmail.com> |
| In reply to | #2502 |
[Note: parts of this message were removed to make it a legal post.] On Thu, Apr 7, 2011 at 11:46 PM, Julian Leviston <julian@coretech.net.au>wrote: > I think it might be actually quite interesting for the original poster to > take some of FONC's work such as OMeta, and then the Rubinius project... and > use it to build Ruby in OMeta, which could then be used quite easily to plug > this Ruby implementation in OMeta into the JavaScript implementation OMeta > which is already existing... > > For an example of SmallTalk already written in OMeta/JS (ie SmallTalk > running inside Javascript, through OMeta), please see: > > http://tinlizzie.org/ometa/ometa-js-old/ > > Given that JavaScript is pretty much the *only* fully realised > cross-browser cross-platform implemented programming language that we have > available to us (ie guaranteed to be on EVERY machine for the last 10 > years), and also given that so much work is continually put into making > these interpreters fast and small, I think writing things on top of > JavaScript is a brilliant idea. > > The other interesting thing about targeting OMeta as an implementation > language for a VM in Ruby, while incredibly technically challenging, is that > it would be infinitely rewarding, as there are versions of OMeta written in > most common programming languages already (which means the target language > base of the Ruby implementation in OMeta would grow without any additional > effort on the part of the programmers)... people are writing OMeta > implementations in various languages, and there are already ones written in: > > OMeta itself, C#, SmallTalk, Scheme, Lisp, Python and Ruby (I'm fairly sure > there are some written in id.st (or Cola, whatever you want to call it) as > well ;-)) > > Just my two cents. > > "You are now able to program any browser in the world with any language you > want" > http://www.youtube.com/watch?v=YEx4jfdFp1k > > Julian. > > That is incredibly cool! But can you really implement *any* language? What about languages that are completely different from javascript? In Haskell, for example, everything happens lazily, data is immutable, there is a complex type system. Can you really map this right to javascript? (or am I misunderstanding OMeta?)
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-08 08:20 -0500 |
| Message-ID | <20110408142041.1bad84cd@fractal> |
| In reply to | #2529 |
> That is incredibly cool! But can you really implement *any* language? > What about languages that are completely different from javascript? > In Haskell, for example, everything happens lazily, data is > immutable, there is a complex type system. Can you really map this > right to javascript? (or am I misunderstanding OMeta?) My take here is full of handwaving. I'll admit I've never of O-Meta before. Comp sci point of view: OMeta is turing complete? If so then by universality it is possible. Further, OMeta can run C#, it doesn't take a huge stretch of the imagine to say it can run C. Haskell can compile to C*. Therefore it can run Haskell. The best way to do it though would be to port the STG-Machine** into O-meta. Fun! * Check the list of GHC features http://www.haskell.org/ghc/ ** See "Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine", Simon Peyton Jones 1992. The link on SPJ's website is dead unforunately :( I've been tempted to port STG into ruby before. Or maybe just G-Machine because it's simpler. It just sounds like a fun little project. Sorry for yet another random long interjection on functional programming. SIGH.
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-08 08:34 -0500 |
| Message-ID | <20110408143427.4e0b6932@fractal> |
| In reply to | #2529 |
> In Haskell, for example, everything happens lazily, data is > immutable, there is a complex type system. Also, if you've already proved the program shouldn't crash due to type errors, you don't need to check any types as you run.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@centrum.cz> |
|---|---|
| Date | 2011-04-11 04:45 -0500 |
| Message-ID | <BANLkTi=txcYb7-cK3A_Xtk9FLbZ0Djz_Dg@mail.gmail.com> |
| In reply to | #2529 |
On 8 April 2011 15:03, Josh Cheek <josh.cheek@gmail.com> wrote: > On Thu, Apr 7, 2011 at 11:46 PM, Julian Leviston <julian@coretech.net.au>wrote: > >> I think it might be actually quite interesting for the original poster to >> take some of FONC's work such as OMeta, and then the Rubinius project... and >> use it to build Ruby in OMeta, which could then be used quite easily to plug >> this Ruby implementation in OMeta into the JavaScript implementation OMeta >> which is already existing... >> >> For an example of SmallTalk already written in OMeta/JS (ie SmallTalk >> running inside Javascript, through OMeta), please see: >> >> http://tinlizzie.org/ometa/ometa-js-old/ >> >> Given that JavaScript is pretty much the *only* fully realised >> cross-browser cross-platform implemented programming language that we have >> available to us (ie guaranteed to be on EVERY machine for the last 10 >> years), and also given that so much work is continually put into making >> these interpreters fast and small, I think writing things on top of >> JavaScript is a brilliant idea. >> >> The other interesting thing about targeting OMeta as an implementation >> language for a VM in Ruby, while incredibly technically challenging, is that >> it would be infinitely rewarding, as there are versions of OMeta written in >> most common programming languages already (which means the target language >> base of the Ruby implementation in OMeta would grow without any additional >> effort on the part of the programmers)... people are writing OMeta >> implementations in various languages, and there are already ones written in: >> >> OMeta itself, C#, SmallTalk, Scheme, Lisp, Python and Ruby (I'm fairly sure >> there are some written in id.st (or Cola, whatever you want to call it) as >> well ;-)) >> >> Just my two cents. >> >> "You are now able to program any browser in the world with any language you >> want" >> http://www.youtube.com/watch?v=YEx4jfdFp1k >> >> Julian. >> >> > That is incredibly cool! But can you really implement *any* language? What > about languages that are completely different from javascript? In Haskell, > for example, everything happens lazily, data is immutable, there is a > complex type system. Can you really map this right to javascript? (or am I > misunderstanding OMeta?) > This is incredibly cool but can you really translate any language into machine code? What about languages that are completely different from machine code? In Haskell, for example, everything happens lazily, data is immutable, there is a complex type system. Can you really map this right to machine code? (Or am I misunderstanding your question?) Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Phillip Gawlowski <cmdjackryan@googlemail.com> |
|---|---|
| Date | 2011-04-11 05:34 -0500 |
| Message-ID | <BANLkTimHpx3mSpURHF1ZdL1gz55Y=aqXuw@mail.gmail.com> |
| In reply to | #2620 |
On Mon, Apr 11, 2011 at 11:45 AM, Michal Suchanek <hramrach@centrum.cz> wrote: > > This is incredibly cool but can you really translate any language into > machine code? Of course. Otherwise, the code wouldn't be executed on a CPU, after all. The question is if you can implement every feature a language has, but that's more about how much work and workarounds you are willing to invest (dynamic code is a touch harder, but since there's JRuby which started before the JVM had any sort of dynamic capabilities at all..), rather than pure ability. See also: "Compiler" and "bytecode" or "intermediary language". ;) After all, a programming language is a construct, an abstraction, that allows us to instruct computers to do Stuff(tm), without us having to lower ourselves to the CPU's level. ;) The question is kind of like asking if computers can represent text, or do substraction of irrational numbers, when all they do is binary addition. ;) -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@centrum.cz> |
|---|---|
| Date | 2011-04-11 07:59 -0500 |
| Message-ID | <BANLkTinEoQUUJ-xiFfiAqt2aykdDPXDdhQ@mail.gmail.com> |
| In reply to | #2625 |
On 11 April 2011 12:34, Phillip Gawlowski <cmdjackryan@googlemail.com> wrote: > On Mon, Apr 11, 2011 at 11:45 AM, Michal Suchanek <hramrach@centrum.cz> wrote: >> >> This is incredibly cool but can you really translate any language into >> machine code? > > Of course. Otherwise, the code wouldn't be executed on a CPU, after all. > And since it can execute on something as limited and poorly designed as x86 assembly I see no reason it could not run on OMeta, whatever it is. Creating something worse than x86 assembly for running code might be a sort of a challenge in itself. Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | William Rutiser <wruyahoo05@comcast.net> |
|---|---|
| Date | 2011-04-11 09:48 -0500 |
| Message-ID | <4DA314AF.3040408@comcast.net> |
| In reply to | #2620 |
On 2011-04-11 5:45 AM, Michal Suchanek wrote > > This is incredibly cool but can you really translate any language into > machine code? > What about languages that are completely different from machine code? > In Haskell, for example, everything happens lazily, data is immutable, > there is a complex type system. Can you really map this right to > machine code? (Or am I misunderstanding your question?) Yes but some language features would depend on a run-time library. The compiler-interpreter dichotomy is better thought of as a continuum. Bill Rutiser
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-11 11:53 -0500 |
| Message-ID | <20110411175322.3248bd48@fractal> |
| In reply to | #2634 |
> Yes but some language features would depend on a run-time library. That would be the STG machine I was talking about, which definitely could be ported. I'd it'd be easier to first compile Haskell into a bytecode representation, which you make OMeta interpret. That means you could use an existing compiler frontend. And just port the run-time library in OMeta. TBH for the effort if you wanted Haskell in the browser, it'd probably be less convoluted to write a plugin. (In Haskell?) Cheers Johnny
[toc] | [prev] | [next] | [standalone]
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Date | 2011-04-11 11:57 -0500 |
| Message-ID | <20110411175725.35810560@fractal> |
| In reply to | #2637 |
On Tue, 12 Apr 2011 01:53:26 +0900 Johnny Morrice <spoon@killersmurf.com> wrote: > > Yes but some language features would depend on a run-time library. > > That would be the STG machine I was talking about, which definitely > could be ported. Sorry, I'm an idiot. Had a brainfart... really you could write a naive STG machine interpreter in OMeta, which would constitute run-time support Equally you could just compile it further.
[toc] | [prev] | [next] | [standalone]
| From | Julian Leviston <julian@coretech.net.au> |
|---|---|
| Date | 2011-04-08 03:34 -0500 |
| Subject | "of" keyword? inverse dot syntax... |
| Message-ID | <4006B64C-7234-4F0D-B37C-427480E5D35D@coretech.net.au> |
| In reply to | #2485 |
Hi,
Consider this:
some_data.to_s.split("\n").each{|item| puts item}
how about an alternative syntax for the dot operator:
each{|item| puts item} of split("\n") of to_s of some_data
or, more intelligently:
this_school.students.addresses.map{|address| a.all_as_one_sentence}
map{|address| all_as_one_sentence of address} of addresses of students of this_school
Just wondering if this is a possibility? :)
julian.
[toc] | [prev] | [next] | [standalone]
| From | Josh Cheek <josh.cheek@gmail.com> |
|---|---|
| Date | 2011-04-08 07:52 -0500 |
| Subject | Re: "of" keyword? inverse dot syntax... |
| Message-ID | <BANLkTinL8nz112458LjeLGFBwZFMaHZX4Q@mail.gmail.com> |
| In reply to | #2519 |
[Note: parts of this message were removed to make it a legal post.]
On Fri, Apr 8, 2011 at 3:34 AM, Julian Leviston <julian@coretech.net.au>wrote:
> Hi,
>
> Consider this:
>
> some_data.to_s.split("\n").each{|item| puts item}
>
> how about an alternative syntax for the dot operator:
>
> each{|item| puts item} of split("\n") of to_s of some_data
>
> or, more intelligently:
>
> this_school.students.addresses.map{|address| a.all_as_one_sentence}
>
> map{|address| all_as_one_sentence of address} of addresses of students of
> this_school
>
> Just wondering if this is a possibility? :)
>
> julian.
>
I don't think my brain would be very fond of this, I like starting with the
thing I know and applying a series of transformations to it via methods to
turn it into the thing I want. I feel like I'd have to keep jumping to the
right to see what I have, and then back to the left to see what I'm doing to
it.
join of map(&:name) of students
join of map(&:name) of courses
They are the same until the very end, so you can't know what you're talking
about until after you're done talking about it.
But maybe if I experienced I'd become more familiar some way of thinking
that fits better with this syntax. Maybe in practice, it would only be used
in situations like `name of student` where it feels natural and the context
is straightforward, and not in situations like `join of array` where join is
an action rather than an attribute.
IDK, I'd try it out if someone went and did it, but I don't think I'd
advocate that someone put forth the effort to do it otherwise (though it
might not be very difficult, might just require a handful of lines of yacc
or something)
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.ruby
csiph-web