Re: Enhanced Primitive Support

2010-06-18 Thread Rich Hickey
On Jun 18, 2010, at 10:18 PM, Mark Fredrickson wrote: So far most of the action has concerned arithmetic ops (+, -, *, /). Will these new semantics include the bit-shift operators? I vote yes. My use cases for bit ops would benefit from primitive ops. On a related note, my use cases call for s

Re: compiling the instructions of a simple vm into a function

2010-06-18 Thread Eugen Dück
Thanks Nicolas, your first variant resembles the generated code much closer than my initial approach, which is great. I need the eval though, to be able to pass in non literals. In my real program I'm reading the instructions from a binary file. So if I want to be able to do something like this:

Re: Enhanced Primitive Support

2010-06-18 Thread dmiller
> Yes, it's easy to imagine a world where people who want efficient code > have to jump through hoops to get it. OTOH, you can just say (num some- > expr) to force it to be boxed, if you want assurance of an Object > initializer. Which will be the more common need? > >From the wiki page "Enhanced

Re: Enhanced Primitive Support

2010-06-18 Thread MarkSwanson
> I have to say I'm in the 'pay for what you use' camp - you need a box,   > you ask for one. If I don't (and neither do any of those loops), why   > should I have to do extra work to avoid it? +1 Barely worth mentioning: :s /non-prime/non-primitive/g -- You received this message because you a

Re: Enhanced Primitive Support

2010-06-18 Thread MarkSwanson
> :s /non-prime/non-primitive/g Oh, nvm. You were referring to '. Cheers. -- 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 patien

Re: Basic toolset for non-Java programmer

2010-06-18 Thread rzeze...@gmail.com
While not reflective of the entire community, here's my suggestions. > > - Build tools: There seem to be things like ant, maven, leiningen. How > do they relate to each other? Is there an "obvious" best answer or > should I be expecting to check them all out depending on my needs? In > that case,

Re: Keyboard Input in Applets

2010-06-18 Thread rob levy
For the sake of anyone who finds this thread in a search at some point, here is the actual answer to my original question: 1. It doesn't matter whether you extend Applet or JApplet, at least for my purposes so far, it seems. JApplet is swing, and solves some of the bugginess found in awt (such a

Re: Basic toolset for non-Java programmer

2010-06-18 Thread rob
My attitude toward debugging is decidedly non-Java, but I find the best thing to do is break your problem into small enough pieces that you can experiment with them rapidly in the REPL. For certain stuff that is hard to test in the repl (such as aspects of applet development for example and other

Re: Enhanced Primitive Support

2010-06-18 Thread Mark Engelberg
I'm confused. In the latest scheme, what is the eventual plan for handling a recur to a loop element that was initialized with a primitive? Are boxed numbers automatically coerced to the primitive? Would a long be coerced to a double, or double to long? Under what scenarios will you get a warnin

Re: Clojure script in the classpath

2010-06-18 Thread rzeze...@gmail.com
On Jun 18, 6:15 pm, Paul Moore wrote: > I've just seen a couple of postings which, if I'm not mistaken, imply > that it's possible to have a Clojure script in my classspath. Is that > right? Yes, you can have .clj files on your classpath. In fact, you can pretty much have anything on your classp

Re: classpath and require

2010-06-18 Thread rzeze...@gmail.com
On Jun 18, 5:00 pm, Mohammad Khan wrote: > C:\Projects.clj>java -cp > c:\clojure-contrib\clojure-contrib.jar;c:\clojure\clojure.jar clojure.main > Clojure 1.1.0-alpha-SNAPSHOT > user=> (require 'examples.introduction) > java.io.FileNotFoundException: Could not locate > examples/introduction__ini

Re: Enhanced Primitive Support

2010-06-18 Thread Tim Daly
Is it possible to follow the Common Lisp convention of proclaim/declaim/declare in order to specify types? Mark Engelberg wrote: Thanks for the responses. Going back to the naive factorial function: (defn fact [n] (if (zero? n) 1 (* n (fact (dec n) Right now, user=> (fact 40) 81591528324

<    1   2