-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language guide #2
Comments
Thanks very much for the pointer about a language guide, and for making a start. I've put this on my todo list. The language is actually smaller than it appears. The stuff you see in the Isla code examples is a mix of core language features (only assignment and instantiation, at the moment), built in types (like Some specifics: Tokens like
Thanks again for your suggestion and starting document. It's really nice that you are interested. |
@maryrosecook Great. To my other point: I'd be happy to help with a lexer / parser implementation in Javascript. I really think there could be some very engaging ways to teach programming in the browser without having to make calls to a clojure backend all the time. Not having a formal language guide is of course the big blocker for that because I don't want to stray from your vision for the language :) |
That would be so great! I think you are totally right: a client side implementation would really help with teaching. I am going to continue work on the language guide right this second. I will try and have something for you by tomorrow night. |
Would it make sense to write the other lexer/parser in ClojureScript, rather than pure JavaScript? I know even less ClojureScript than I do Clojure, but I wonder if that might allow for some degree of code reuse? Of course, now that I think about it, ClojureScript isn't self-hosting (yet), so you wouldn't eliminate the need for the JVM, which might defeat the purpose. |
Yes, it would allow quite a lot of code reuse. And it would be possible to produce a client-side-only environment, which would be great for deployment. But, as you say, a JVM would still be required to work on the Isla language itself. I chose to write the compiler in Clojure because I wanted to learn Clojure. I think JS is probably a better all-round implementation language. Isla is not that complicated, so its compiler doesn't need to be written in a heavy duty language. Speed of execution is almost irrelevant. And the language environment is suited to the web, because that is where it will have the greatest reach. |
Personally I agree with @maryrosecook
Given the limited number of keywords I think lexing and parsing would be pretty straight forward with pure JS. Newlines are significant which also simplifies things. Naturally I'm biased here, but I've written a lexer / parser for Gherkin in the past and it wasn't much trouble. Got through most of it in 2 days. |
I think if a JS compiler were written, it would be a net win. So, if you'd like to go for it, @indexzero , please do. I'd be excited to help out. I plan to continue implementing a compiler in Clojure just for my own education. |
@indexzero I have bashed out a language guide. Let me know if I've missed out any information you need. I have only written a guide for the language itself. I have not, yet, written the documents that describe the story writing environment or the story playing environment. I'm can't really do these yet, because both are in a great amount of flux as I experiment with stuff. Let me know if this is a problem and I can start making some concrete decisions sooner rather than later. https://github.com/maryrosecook/isla/blob/master/languageguide.md |
@maryrosecook Nice! I'll take a stab at the lexer this weekend. Should I fork? Or just create an |
I think fork. I think it would be cool to keep both compilers in the same repository, for now. Then, a canonical compiler can emerge. I'm really excited to see what you come up with. |
@maryrosecook Pretty much done with the Javascript lexer.
Next up is parsing. The sample syntax in
I would have expected:
to be required before the |
Fantastic! This is so exciting. Thanks very much for getting involved with the project. That's a good question about hallway items. The way this works is that (By the way, list is also a type, so if you want to instantiate a variable as a list, you would go Is that clear? |
@maryrosecook Got it. But shouldn't the |
Great point. The I will prioritise writing the Isla story environment guide today and tomorrow to make clearer the way this all works. |
@indexzero Hiya. I've bashed out the Isla story environment guide. Let me know if anything is unclear, or if you need more information and I'll get straight back to you. |
Excellent project! Story environment guide now at https://github.com/maryrosecook/isla/wiki/Story-environment-guide |
Ah. Thanks. However, things have been changing in my head, recently. I'm probably going to abandon the story environment. I'm still working on the core language, but I think the interactive text adventures are probably the wrong way to go. I have been teaching Isla to a bunch of non-programmers. With each one, the conversation went something like this: Me: "So, you now know the whole Isla language." What I realised was that the story telling environment requires the programmer to learn a ton of facts that have nothing to do with programming. Further, non-programmers are not excited about making something in a genre they have never heard of. I've got some ideas about what will replace the story telling environment. I'll say more about this soon. |
Interesting - I'm not sure what the best forum for this is - I thought 'the But even if 'the story' is compelling, it doesn't mean it's wrong to On 24 October 2012 13:44, Mary Rose Cook notifications@github.com wrote:
|
I have decided to try allowing the Isla language to plug in to demos/environments/examples written in JavaScript. Imagine a planet simulator written in JS by an experienced programmer. They model a sun and a centre of gravity that allows planets to whirl around it. A child then uses Isla to define the planets: color, density, size, starting position. The simulator sucks in the Isla code, evaluates it and sets up the specified planets. I am probably going to change the canonical Isla compiler to be the JS one I've been working on. JS is much better suited to the above idea. It runs on both browser and server. It has a ton of libraries that are good for visual output. I think this let people write all sorts of JS plugin environments that will hopefully interest children. On 24 Oct 2012, at 13:14, BigEd notifications@github.com wrote:
|
Sounds great! On Thursday, 25 October 2012, Mary Rose Cook wrote:
|
First Fascinating stuff. I really like your creativity here. I got turned onto computers through logo when I was 6 so teaching languages always have a special place in my heart.
Have you begun to formalize the language guide yet? It's usually one of the first things to do in these situations before going off an implementing all the language features.
Based on reading the code base and some example code:
That's all I got right now. Have you considered a Javascript version of the parser? It would make playing this in the browser much easier.
The text was updated successfully, but these errors were encountered: