Why does instaparse not throw errors? Curious about the reasoning behind 
this design. 
-Zack

On Wednesday, June 12, 2013 9:46:06 AM UTC-4, JeremyS wrote:
>
> Hi puzzler,
>
> I have a project <https://github.com/JeremS/cljss-core/tree/v0.4.0> that 
> I have been meaning to be useable from Clojure and ClojureScript. To do so 
> I am using lein-dalap <http://birdseyesoftware.github.io/lein-dalap.docs/>
> .
>
> I totally agree with you about the issues you have foreseen. The protocols 
> aren't exactly the same, the java specific parts would need to be rewritten 
> in cljs, I don't know how much work it would need to have the incremental 
> vector working in cljs since hashing isn't 
> 'embedded' in JavaScript (cljs uses the google closure libraries for 
> that). lein-dalap <http://birdseyesoftware.github.io/lein-dalap.docs/> helps 
> resolve some of these issues but not all of them. 
> (cljx<https://github.com/lynaghk/cljx> might 
> also be an alternative)
>
> I will totally add a request on github. I know it's a big wish to see 
> instaparse in cljs and I'd love to contribute as best I can.
>
> I'd also like to give a little rationale for the cljs adaptation. I am a 
> big fan of LightTable, which I use most of the time now. LT is written
> in ClojureScript and I can't wait to see the plugin system released in 
> future versions. Using instaparse to extend it would be really neet since 
> it supports ABNF grammar and, as your wiki taught me, ABNF makes for 
> standard grammars that we can find on the internet. It  would be nice to 
> exploit directly these grammar in LT using instaparse. 
>
> Another useful use case is in browser editors for syntaxes like markdown. 
> I have read a blog post considering markdown potentially armful and arguing 
> in favour of the wiki creole syntax. There is an EBNF grammar for creole...
>
> Last but very not the least, there are some very inspiring talks from Alan 
> Kay that advocate lisp philosophy of programming, 
> molding the language to your problem and coding in a language that suits 
> the domain of the problem. Instaparse is a great 
> tool to generate our own languages and I am coding some ClojureScript code 
> at the moment so call me biased... :)
>
> Cheers,
>
> Jeremys
>
>
>
> On Wednesday, June 12, 2013 12:09:56 AM UTC+2, puzzler wrote:
>>
>> Honestly I hadn't yet given it any thought.  Thanks for the interest in 
>> having it on Clojurescript.  Here are a few issues that come to mind:
>>
>> 1.  To achieve performance, I've spent time coding custom data structures 
>> that implement various Clojure and Java interfaces.  I haven't done much 
>> with Clojurescript, but my impression is that the ecosystem of protocols is 
>> completely different, so I imagine that could be a pain to transfer over.
>>
>> 2.  I don't know much about the performance of Javascript/Clojurescript's 
>> underlying data structures.  For example, in Java, the substring operation 
>> used to be O(1), but recently, much to my dismay, they changed it to O(n).  
>> That change was annoying, and it means I'm going to have to rework some 
>> code to deal with that, but at least I heard about it and can take it into 
>> account.  But in Javascript I don't even *know* the performance 
>> characteristics of its strings and substring operation.  What other 
>> Javascript performance gotchas don't I know about?
>>
>> 3. I'm assuming that due to the above, it won't be as simple as just 
>> recompiling the code for Clojurescript.  I have no idea what's involved 
>> with maintaining a code base for the two target languages simultaneously.  
>> Sounds non-trivial, although maybe it won't seem so intimidating once 
>> things have settled down and I'm not making quite so many performance 
>> tweaks and feature enhancements to the code.
>>
>> In any case, please add your request as a github issue, so I don't forget 
>> about it.
>>
>> On Tue, Jun 11, 2013 at 8:06 AM, JeremyS <jschof...@gmail.com> wrote:
>>
>>> Hi Puzzler,
>>>
>>> I was wondering if you planned to port Instaparse to ClojureScript. I 
>>> know it's asking a lot, but I am one of those who would love
>>> to be able to run it in a browser or in node.js...
>>>
>>> Cheers,
>>>
>>> Jeremys.
>>>
>>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to