Re: Reduce + merge-with error on lazy sequence of maps
Thanks James, There was definitely a missing aggregation step in there. I appreciate your eyeballing it. Best, Nathan -- 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/d/optout.
No eval in ClojureScript!?
Dear ClojureScript users and team! Without "eval" function ClojureScript can't be recognized as a full-fledged LISP. "Code as data" paradigm can't be implemented without "eval". What purpose of code constructed programmatically, if it can not be evaluated?! In that sence plain old JavaScript is more LISP than ClojureScript. Am I right? May be I have mised something important in that problem? Sincerely, Ru -- 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/d/optout.
Re: No eval in ClojureScript!?
ClojureScript has cljs.js/eval, which while not as convenient as clojure.core/eval, can accomplish the same effect. The reason why ClojureScript doesn't have a standard eval is because it adds a huge amount of overhead for relatively little gain. You need to load the entire ClojureScript compiler in your browser. Most of the time that's simply not necessary. - James On 13 February 2016 at 15:25, ru wrote: > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > > -- > 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/d/optout. > -- 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/d/optout.
Re: No eval in ClojureScript!?
Clojurescript does have eval, in the cljs.js namespace: https://crossclj.info/ns/org.clojure/clojurescript/1.7.228/cljs.js.cljs.html#_eval Take a look at http://yogthos.net/posts/2015-11-12-ClojureScript-Eval.html for an example and https://swannodette.github.io/2015/07/29/clojurescript-17/ for some more details on dynamic compilation of clojurescript code in clojurescript. On Sat, 13 Feb 2016 at 15:25 ru wrote: > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > > -- > 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/d/optout. > -- 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/d/optout.
Re: No eval in ClojureScript!?
LISP implementations often have a compiler and an interpreter simulteniously. As I know LISP interpreter is a very simple program and often used as an example in classes. Maybe ClojureScript should include such interpreter for such important task as evaluation of dinamically generated code? -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
Re: No eval in ClojureScript!?
All we know that JIT is a Just In Time compiler and that JIT is an important part of Java compiler nowerdays. Maybe JIT ideas can be applied to ClojureScript "eval problem" solution? -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
Re: No eval in ClojureScript!?
While eval is an important part of Clojure, it's also very rarely used. I've been working with Clojure for almost eight years now, and I've written 60 Clojure libraries. Despite that, I've used eval less than half a dozen times. Having a way of evaluating ClojureScript in ClojureScript is a nice milestone that shows the maturity of the technology, and it's useful for doing things like writing REPLs and interactive examples. But most of the time it's simply not necessary. - James On 13 February 2016 at 16:30, ru wrote: > LISP implementations often have a compiler and an interpreter > simulteniously. As I know LISP interpreter is a very simple program and > often used as an example in classes. Maybe ClojureScript should include > such interpreter for such important task as evaluation of dinamically > generated code? > > -Ru > > суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > >> Dear ClojureScript users and team! >> >> Without "eval" function ClojureScript can't be recognized as a >> full-fledged LISP. "Code as data" paradigm can't be implemented without >> "eval". What purpose of code constructed programmatically, if it can not be >> evaluated?! In that sence plain old JavaScript is more LISP than >> ClojureScript. Am I right? May be I have mised something important in that >> problem? >> >> Sincerely, >> Ru >> > -- > 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/d/optout. > -- 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/d/optout.
Re: No eval in ClojureScript!?
First thing that comes to my mind is MAXIMA Computer Algebra Program from LISP ecosystem. That is a system for the manipulation of symbolic and numerical expressions, including differentiation, integration and many other useful things. It will be nice to have such a power in ClojureScript, is'nt it? I don't think that all those symbolic comutations can be simply programmed without eval. -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
Re: No eval in ClojureScript!?
ru, eval is there in clojurescript. It's just in a separate namespace. This is a good thing, because it leads to big space savings in the regular case. -- 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/d/optout.
Re: No eval in ClojureScript!?
That I understand. Only one more question. Can I unload ClojureScript Compiler after I done with "eval"? This scenario is suitable very well to my task. -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
Re: No eval in ClojureScript!?
On 13 February 2016 at 17:11, ru wrote: > First thing that comes to my mind is MAXIMA Computer Algebra Program from > LISP ecosystem. That is a system for the manipulation of symbolic and > numerical expressions, including differentiation, integration and many > other useful things. It will be nice to have such a power in > ClojureScript, is'nt it? Honestly, I think you'd usually want to use macros for tasks like that. There's a much higher incentive to use macros over eval in ClojureScript, as although there are disadvantages associated with macros, they also allow for a lot of precomputation. This is particularly important in a browser environment, where ClojureScript is most often used. On 13 February 2016 at 17:50, ru wrote: > That I understand. Only one more question. Can I unload ClojureScript > Compiler after I done with "eval"? This scenario is suitable very well to > my task. > I don't believe you'd want to. The primary cost of including the compiler for the browser is the time taken to download and execute the javascript. I guess you could unbind the references and let it GC, but I don't think there'd be much point in doing that. - James -- 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/d/optout.
Re: No eval in ClojureScript!?
I think macros can't be of much help in my task. I am working on project rete4frame (https://github.com/rururu/rete4frames) and now want to port it to ClojureScript. It is CLIPS-like expert system shell with simplified version of RETE algorithm. It has its own language with LISP syntax and it is a superset of Clojure/ClojureScript in a sence that it contains inside rule descriptions pieces of arbitrary Clojure/ClojureScript code. Work of system consists of two phases: Translation and Run. I use "eval" during Translation phase in Clojure to get pieces of code "executeble" on Run phase. So, I need solution how it can be done in ClojureScript. -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
Re: No eval in ClojureScript!?
If you need eval then you need to be OK with pulling in a lot of code and giving up Closure advanced optimizations and dead code elimination. Whatever small size savings an interpreter might offer, it would still suffer from this fundamental problem. David On Sat, Feb 13, 2016 at 1:58 PM, ru wrote: > I think macros can't be of much help in my task. I am working on project > rete4frame (https://github.com/rururu/rete4frames) and now want to port > it to ClojureScript. It is CLIPS-like expert system shell with simplified > version of RETE algorithm. It has its own language with LISP syntax and it > is a superset of Clojure/ClojureScript in a sence that it contains inside > rule descriptions pieces of arbitrary Clojure/ClojureScript code. Work of > system consists of two phases: Translation and Run. I use "eval" during > Translation phase in Clojure to get pieces of code "executeble" on Run > phase. So, I need solution how it can be done in ClojureScript. > > -Ru > > суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: >> >> Dear ClojureScript users and team! >> >> Without "eval" function ClojureScript can't be recognized as a >> full-fledged LISP. "Code as data" paradigm can't be implemented without >> "eval". What purpose of code constructed programmatically, if it can not be >> evaluated?! In that sence plain old JavaScript is more LISP than >> ClojureScript. Am I right? May be I have mised something important in that >> problem? >> >> Sincerely, >> Ru >> > -- > 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/d/optout. > -- 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/d/optout.
Re: No eval in ClojureScript!?
On 13 February 2016 at 18:58, ru wrote: > I think macros can't be of much help in my task. I am working on project > rete4frame (https://github.com/rururu/rete4frames) and now want to port > it to ClojureScript. It is CLIPS-like expert system shell with simplified > version of RETE algorithm. It has its own language with LISP syntax and it > is a superset of Clojure/ClojureScript in a sence that it contains inside > rule descriptions pieces of arbitrary Clojure/ClojureScript code. > If you do have a use-case that absolutely requires eval and cannot be done in a different way, then cljs.js/eval is probably the thing you want. - James -- 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/d/optout.
Re: No eval in ClojureScript!?
Many thanks for the explanations. I will be experimenting to deside where to go further. -Ru суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: > > Dear ClojureScript users and team! > > Without "eval" function ClojureScript can't be recognized as a > full-fledged LISP. "Code as data" paradigm can't be implemented without > "eval". What purpose of code constructed programmatically, if it can not be > evaluated?! In that sence plain old JavaScript is more LISP than > ClojureScript. Am I right? May be I have mised something important in that > problem? > > Sincerely, > Ru > -- 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/d/optout.
[ANN] boot-new 0.4.0 -- Templates AND Generators for Boot!
What / Where? Boot new — a task to produce new projects from Boot and/or Leiningen templates! boot-new 0.4.0 — https://github.com/seancorfield/boot-new Updates? Now supports generators to add / modify code in the current project! Add a new namespace with: boot new –g ns=foo.bar.quux Add a new function with: boot new –g defn=foo.bar.quux/my-func Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- 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/d/optout.
Re: conditional logic implemented as pattern-matching and restructuring in the signature of the function
To add to the list, I wrote `defpatterned` for /Functional Programming for the Object-Oriented Programmer/. https://github.com/marick/patterned There are probably many others. Moving pattern matching closer to `clojure.core` might be a good thing for a roadmap. I'm pretty excited by pattern-matching in Elixir - seems more than a novelty. Colin Taylor wrote: Defm does this too though I've never got round to fully finishing it. (defm file-or-string-fn [] ([File] (println "It's a file")) ([s :- String] (println "It's a string " s)) (["magic"] (println "It's magic")) ([_] (println "It's a " (type _1 -- 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/d/optout.
Re: No eval in ClojureScript!?
Ru, Take a look at the approach used by Clara (https://github.com/rbrush/clara-rules.) It works in both Clojure and ClojureScript. It translates the DSL using eval at macro-expansion time to generate the productions - see defsession. Will take a look at rete4frames again when I get a chance. Good luck! Alan On Saturday, February 13, 2016 at 10:58:47 AM UTC-8, ru wrote: > > I think macros can't be of much help in my task. I am working on project > rete4frame (https://github.com/rururu/rete4frames) and now want to port > it to ClojureScript. It is CLIPS-like expert system shell with simplified > version of RETE algorithm. It has its own language with LISP syntax and it > is a superset of Clojure/ClojureScript in a sence that it contains inside > rule descriptions pieces of arbitrary Clojure/ClojureScript code. Work of > system consists of two phases: Translation and Run. I use "eval" during > Translation phase in Clojure to get pieces of code "executeble" on Run > phase. So, I need solution how it can be done in ClojureScript. > > -Ru > > суббота, 13 февраля 2016 г., 18:25:46 UTC+3 пользователь ru написал: >> >> Dear ClojureScript users and team! >> >> Without "eval" function ClojureScript can't be recognized as a >> full-fledged LISP. "Code as data" paradigm can't be implemented without >> "eval". What purpose of code constructed programmatically, if it can not be >> evaluated?! In that sence plain old JavaScript is more LISP than >> ClojureScript. Am I right? May be I have mised something important in that >> problem? >> >> Sincerely, >> Ru >> > -- 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/d/optout.
Re: Chaining compojure routes
For more info on core/context see: https://github.com/weavejester/compojure/wiki/Nesting-routes Alan On Friday, February 12, 2016 at 2:40:30 PM UTC-8, JvJ wrote: > > I'm just starting to use ring/compojure to create web apps. > > One thing I would like to do is have an updatable collection of apps that > can be accessed based on the URL input. > > For example, if I have an app named "foo", then website.com/foo would > redirect to that app. > > So far, I have the following implementation: > > (def route-m > {"foo" (routes (GET "/foo" [] "Hello Foo!")) >"bar" (routes > (GET "/bar/baz" [] "Hello Foo!") > (GET "/bar/quux" [] "Hello Quux!"))}) > > (def test-r > (routes >(GET "/hey" > [] > "HEY!") >(GET "/:app*" [app] > (route-m app > > > The issue with this method is the fact that the "sub-routes" need to have > the full path instead of just the sub-path. For example, "foo" needs to > define its routes in terms of "foo/..." instead of just "/...". > > Is there any way around this? > > Thanks. > -- 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/d/optout.