Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Yes I have. On Sat, Jul 4, 2015 at 9:27 AM David Nolen wrote: > Thanks! Have you submitted your Contributor Agreement? > http://clojure.org/contributing > > David > > On Sat, Jul 4, 2015 at 12:17 PM, Raymond Huang <12ay.hu...@gmail.com> > wrote: > >> I've updated the ticket with patch taken from Clojure's implementation of >> `CharacterReader`. Can I get some feedback on the implementation? >> >> Cheers >> >> > Filed in http://dev.clojure.org/jira/browse/CLJS-1299 >> >> -- >> Note that posts from new members are moderated - please be patient with >> your first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojurescript+unsubscr...@googlegroups.com. >> To post to this group, send email to clojurescript@googlegroups.com. >> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Thanks! Have you submitted your Contributor Agreement? http://clojure.org/contributing David On Sat, Jul 4, 2015 at 12:17 PM, Raymond Huang <12ay.hu...@gmail.com> wrote: > I've updated the ticket with patch taken from Clojure's implementation of > `CharacterReader`. Can I get some feedback on the implementation? > > Cheers > > > Filed in http://dev.clojure.org/jira/browse/CLJS-1299 > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
I've updated the ticket with patch taken from Clojure's implementation of `CharacterReader`. Can I get some feedback on the implementation? Cheers > Filed in http://dev.clojure.org/jira/browse/CLJS-1299 -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Filed in http://dev.clojure.org/jira/browse/CLJS-1299 Thanks for the quick feedback. On Fri, Jun 5, 2015 at 9:51 AM David Nolen wrote: > Please file a bug in JIRA for the first case. > > Thanks! > David > > On Fri, Jun 5, 2015 at 8:22 AM, Francis Avila > wrote: > >> Your first issue with cljs.reader looks like a bug. >> >> Your second issue is because clojure/java has a distinct char type but >> clojurescript/javascript does not. In cljs, the character literal syntax >> produces a one-character string, but in clj it produces a 16-bit unsigned >> int interpreted as a utf-16 character. >> >> -- >> Note that posts from new members are moderated - please be patient with >> your first post. >> --- >> You received this message because you are subscribed to the Google Groups >> "ClojureScript" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojurescript+unsubscr...@googlegroups.com. >> To post to this group, send email to clojurescript@googlegroups.com. >> Visit this group at http://groups.google.com/group/clojurescript. >> > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
Re: [ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Please file a bug in JIRA for the first case. Thanks! David On Fri, Jun 5, 2015 at 8:22 AM, Francis Avila wrote: > Your first issue with cljs.reader looks like a bug. > > Your second issue is because clojure/java has a distinct char type but > clojurescript/javascript does not. In cljs, the character literal syntax > produces a one-character string, but in clj it produces a 16-bit unsigned > int interpreted as a utf-16 character. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
Your first issue with cljs.reader looks like a bug. Your second issue is because clojure/java has a distinct char type but clojurescript/javascript does not. In cljs, the character literal syntax produces a one-character string, but in clj it produces a 16-bit unsigned int interpreted as a utf-16 character. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.
[ClojureScript] Inconsistent handling of \space in Clojure & ClojureScript
I'm trying to serialize some maps in Clojure and then reading it back into a map in Clojure Script. Occasionally my maps uses `\space` in lieu of an empty string like " ". I notice that in Clojure Script, it doesn't know how to interpret \space using reader/read-string Example 1: In Clojure: entangle.single=> (pr-str {:foo \space}) "{:foo \\space}" Then, deserializing in ClojureScript: entangle.client => (reader/read-string "{:foo \\space}") # Error: Map literal must contain an even number of forms at Function.cljs.reader.reader_error.cljs$core$IFn$_invoke$arity$variadic (http://localhost:1/public/js/out/cljs/reader.js:156:8) at cljs$reader$reader_error (http://localhost:1/public/js/out/cljs/reader.js:152:33) at cljs$reader$read_map (http://localhost:1/public/js/out/cljs/reader.js:436:26) at cljs$reader$read (http://localhost:1/public/js/out/cljs/reader.js:810:34) at cljs$reader$read_string (http://localhost:1/public/js/out/cljs/reader.js:837:25) Conversely, trying to serialize in ClojureScript and then deserializing in the server works: Example 2: ClojureScript: entangle.client=> (pr-str {:foo \space}) "{:foo \" \"}" Deserializing this in the server: entangle.single=> (read-string "{:foo \" \"}") {:foo " "} Why is this the case? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojurescript+unsubscr...@googlegroups.com. To post to this group, send email to clojurescript@googlegroups.com. Visit this group at http://groups.google.com/group/clojurescript.