Clojure and Python Flask

2021-01-09 Thread Pascal Dutilleul
? Kind regards, Pascal -- 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

Re: Why does unquote clone values?

2014-07-04 Thread Pascal Germroth
Hi Atamert, I'm not an expert but I believe REPL does compile the forms you enter to > bytecode. It compiles an fn form into a JVM class that implements IFn. It > also compiles a quoted form (such as `(fn ...) ) but this time it takes the > form of a list (as in (list ...) ), IOW it's still dat

Re: Why does unquote clone values?

2014-07-03 Thread Pascal Germroth
y. Using a benchmark to do so was way too indirect anyway, I believe my problem may have something to do with the failure of (eval `(str ~(Object.))) Cheers, -- pascal -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: Why does unquote clone values?

2014-07-03 Thread Pascal Germroth
On Thursday, July 3, 2014 6:15:32 PM UTC+1, adrian...@mail.yu.edu wrote: > I'm not sure I understand what you're saying here. :( Your example is > simply benchmarking the same bit of code in each form. Why would evaluating > one explicitly affect that benchmark? Your original example called eval

Re: Why does unquote clone values?

2014-07-03 Thread Pascal Germroth
On Thursday, July 3, 2014 5:19:56 PM UTC+1, adrian...@mail.yu.edu wrote: > > You're going down a rabbit hole here. Evaluating forms at runtime will > always result in a slower execution time than a function that doesn't > evaluate a form at runtime. > I thought that was the whole point of Clo

Re: Why does unquote clone values?

2014-07-03 Thread Pascal Germroth
nction { /* ... static constructor getting clojure.core/= ... */ Object x; public F(Object o) { x = o } public Object invoke( Object y ) { /*basically*/ return (bool (= x y)) } } So why does f4 behave almost like f2/f3?! Cheers, -- pascal -- You received this message because you are subsc

Re: Why does unquote clone values?

2014-07-02 Thread Pascal Germroth
It gets even weirder. I tried this hoping it would create a closure like f1 does: (defn f4 [x] (eval `(let [[x#] ~@[[x]]] (fn [y#] (= x# y#) And indeed using no.disassemble in my test cases f1 and f4 always create the same bytecode: a clojure.la

Why does unquote clone values?

2014-07-02 Thread Pascal Germroth
? And why doesn't splice unquoting ~@[x] appear to clone the vector, but *does* clone the map?! Is there a way to pass all values per reference into a quote, to get exactly the same behaviour as f1? Cheers, -- pascal -- You received this message because you are subscribed to the Google Gr

How to debug redefinitions of classes

2014-06-26 Thread Pascal Germroth
thread from the loader? (clojure.core/load "/clojure/zip") CompilerException java.lang.IllegalArgumentException: Will not redefine... TL;DR are there more tracing options to figure out what is being (re-)loaded? Cheers, -- pascal -- You received this message because you ar

Re: Find source/location of anonymous function by name

2014-05-10 Thread Pascal Germroth
line(".") . " ["/g Fixing the bug, and then just removing the names again: :%s/TRACE-[0-9]* //g But I'm still interested if there's a pure clojure generated-name to location solution I could just call from the REPL. Cheers, -- pascal -- You received this messag

Find source/location of anonymous function by name

2014-05-10 Thread Pascal Germroth
f a closure like "myparser/fn--106751"? It's not defined as a var, so (source) doesn't work. Cheers, -- pascal -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

What does ^{} actually translate to?

2014-05-08 Thread Pascal Germroth
uot;doc" (with-meta #(inc %) {:x 4})) (meta f4) ; {:x 4} Cheers, -- pascal -- 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 - p

Re: clojure.zip: skip a node

2014-05-06 Thread Pascal Germroth
ter if you're interested. > > Alex > > > On Monday, May 5, 2014 6:01:04 PM UTC-5, Pascal Germroth wrote: >> >> Hi, >> >> I'm using clojure.zip to edit a tree by visiting each location using >> zip/next, possibly using zip/replace to alter the tree

clojure.zip: skip a node

2014-05-05 Thread Pascal Germroth
what I really would like to do is iterate backwards through the tree, starting at the end, using zip/prev; but there's also no function to just jump to the end as far as I can tell) Cheers, -- pascal -- You received this message because you are subscribed to the Google Groups "Cl

Re: Noob Question - Clojure number rounding

2012-09-11 Thread Pascal Chatterjee
representable decimal result. java.math.BigDecimal.divide > (BigDecimal.java:1603) Is there a way of sending the scale to the bigdec function instead of setting it afterwards? It doesn't seem so from the docs.. // Pascal. On Wednesday, 23 March 2011 20:59:18 UTC+1, Brenton wrote: > >

Re: Teaching beginners to program using an interactive ClojureScript REPL

2012-07-17 Thread Pascal Chatterjee
is something everyone does when programming for the very first time, so I think it's pretty important to have *def* up front :) // Pascal -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

Re: talking to machines: Teaching beginners to program with an interactive ClojureScript REPL

2012-07-16 Thread Pascal Chatterjee
Oops, double post, can someone delete this? On Saturday, 14 July 2012 18:03:16 UTC+2, Pascal Chatterjee wrote: > > Hey everyone, > > I've made a website <http://talkingtomachines.org> that embeds an > interactive ClojureScript REPL that I'd like to try and use to t

Re: Teaching beginners to program using an interactive ClojureScript REPL

2012-07-16 Thread Pascal Chatterjee
r so for now I've just glossed over it and hoped no-one will notice :) Do you guys have any ideas on other ways to tackle it? // Pascal. On Monday, 16 July 2012 16:48:25 UTC+2, Erlis Vidal wrote: > > I really like it. > > The feature to select and have the doc is super! Also

Teaching beginners to program using an interactive ClojureScript REPL

2012-07-16 Thread Pascal Chatterjee
provements to the content or architecture of the site, write to me here or send me a pull request :) I think ClojureScript opens up a lot of possibilites for teaching people to code in a powerful language right in the browser, and I'd love to see where we can take this. // Pascal. -- Pa

talking to machines: Teaching beginners to program with an interactive ClojureScript REPL

2012-07-16 Thread Pascal Chatterjee
ents I'm more than happy to hear them, in text or code form :) // Pascal. -- 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 moderate

Re: offtopic - where are you come from? (poll)

2008-10-18 Thread Pascal
Paris, France (but born Montreal, Canada) --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email t

Re: packaging App (cross-platform) without scripts, only jar

2008-10-02 Thread Pascal
Hi all, for Michael Beauregard, > Is there a reason why setting the "Main-Class" field in the jar's manifest > doesn't work. It work, and since the manifest had to be edited to set the Class-Path why not set correctly the Main-Class ? maybe if my main class would be called "Main" instead of "Lau

packaging App (cross-platform) without scripts, only jar

2008-09-20 Thread Pascal
I needed a single jar file that if you double clicked on it (be in Mac OS X or Windows) it will just launch my Clojure App. No CLASSPATH or bash or anything, cross platform. I didn't found anything like these so I just made it (I know it's not difficult, let say this is for Newbie!) The archi i