Re: Funding Clojure 2010

2009-12-15 Thread Mike Meyer
I'm sorry, but I find the whole "donate" thing a little off-putting. I've just started looking into Clojure, and the thought that the key developer might just stop working on it doesn't exactly give me a warm fuzzy feeling. Now the evaluation will have to include looking at the community, and tryin

Re: Clojure analysis

2009-12-17 Thread Mike Meyer
On Thu, 17 Dec 2009 10:26:03 -0800 (PST) Santhosh G R wrote: > > You warn that you learn languages "just for the fun of it". I would be > > curious to know how much time you spent learning Clojure... > > I have been working with Scheme for the past 5 years. I think this is a critical element!

Re: Clojure analysis

2009-12-18 Thread Mike Meyer
On Fri, 18 Dec 2009 00:44:02 -0500 Luc Préfontaine wrote: > Mike, I think that the whole issue about Lisp creates a big cloud about > Clojure. Yes, it does. When I mention that, people tend to shudder. > If you sum up Clojure as being a Lisp because of what it look likes and > use only this to

Re: Parenthesis Inference

2009-12-18 Thread Mike Meyer
On Fri, 18 Dec 2009 19:07:43 + Martin Coxall wrote: > For each line that is not within a vector, and does not have an opening > parenthesis, infer an opening parenthesis at the start of the line. Remember > the level of indentation, and infer a closing parenthesis at the end of the > line

Re: Parenthesis Inference

2009-12-19 Thread Mike Meyer
On Sat, 19 Dec 2009 14:22:22 + Martin Coxall wrote: > On 19 Dec 2009, at 13:50, Stefan Kamphausen wrote: > > * Reason. They could have been taken away in more than 50 years of > > history. Guess what, they are still there. > Guess what? NOBODY uses Lisp. Because of those parens. You've over

Re: Advice for someone coming from an OO world?

2009-12-19 Thread Mike Meyer
On Fri, 18 Dec 2009 08:55:13 -0800 (PST) IslandRick wrote: > Can anyone here offer some advice to those who are too ingrained in > using an object-oriented hammer on every nail they see? I know Rich > and Stuart have some good design examples around (I've read many), but > if there are any tutori

defmethod question....

2009-12-27 Thread Mike Meyer
First, an aside: I was pleasantly surprised to find that the defmulti dispatch function could itself be polymorphic. Well, surprised isn't the right word - I half expected it to work. But it's always nice when new tools follow POLA. Which leads to a question where Clojure doesn't seem to follow PO

Re: defmethod question....

2009-12-28 Thread Mike Meyer
On Sun, 27 Dec 2009 08:59:53 -0800 (PST) Jason Wolfe wrote: > > That doesn't seem to be possible - I can't find a function that > > accepts a PersistentStructMap and returns the symbol passed to struct > > so it knows the keylist to use for the arguments. Nor could I find the > > magic incantatio

Re: Clojure and c++ and a bit more

2009-12-31 Thread Mike Meyer
On Thu, 31 Dec 2009 13:01:35 -0800 (PST) nathaniel wrote: > BTW, does anyone know what kind of GC algorithms (reference counting > or thread- based or what) are used by other Lisps? Reference-counting GC's in most LISPs are pretty much a thing of the past. Between needing to do cycle detection a

Re: Language similarities

2010-01-01 Thread Mike Meyer
On Fri, 1 Jan 2010 13:45:43 -0300 Angel Java Lopez wrote: > I would like to add Ada exception management. I don't know if there were > previous work on the field. Any info? I worked with Algol, but I don't > remember if something like exceptions was present those days. Any early Lisp > exception

Re: Lift equivalent

2010-01-02 Thread Mike Meyer
On Sat, 2 Jan 2010 07:01:20 -0800 (PST) ngocdaothanh wrote: > Scala has Lift with many advanced features: > http://blog.lostlake.org/index.php?/archives/16-Web-Framework-Manifesto.html > http://blog.lostlake.org/index.php?/archives/25-Why-the-world-needs-another-web-framework.html There are defi

Re: Matt Raible: "Why is Clojure better than Scala or Groovy?"

2010-01-17 Thread Mike Meyer
On Fri, Jan 15, 2010 at 8:22 PM, Julian wrote: > Matt Raible - Spring Expert and Java consultant posted the following > entry to Twitter: > "Why is Clojure better than Scala or Groovy?" How about two reasons to learn Clojure instead? 1) Clojure is (a) LISP. According to Eric Raymond, "LISP is wo

Re: Debugging in Clojure

2010-01-22 Thread Mike Meyer
On Fri, 22 Jan 2010 10:08:45 +0200 Miron Brezuleanu wrote: > Hello, > > On Fri, Jan 22, 2010 at 3:14 AM, ajay gopalakrishnan > wrote: > > > Hi, > > > > I usually debug by adding println statements. How can I achieve the same > > effect in Clojure. I don't think I can introduce println at arbit

Re: Debugging in Clojure

2010-01-22 Thread Mike Meyer
On Fri, 22 Jan 2010 17:25:39 -0800 ajay gopalakrishnan wrote: > I dont mind using println. The problem is that needs to be inside a do or > when ... and that is not really part of my code. When the time comes to > remove the prints, i need to remove all these do blocks too. I can leave > them as

Re: Full Disclojure - I Need Topics!

2010-01-26 Thread Mike Meyer
On Sun, 24 Jan 2010 23:11:50 -0800 (PST) mac wrote: > > On 25 Jan, 06:50, Mark Engelberg wrote: > > Debugging techniques, including: > > * How to make sense of Clojure's stack traces. > > * How to use Java debugging and profiling tools with Clojure. > > +1 for this. I haven't had the energy to

Re: apply macro to 'argument' list?

2010-01-28 Thread Mike Meyer
On Thu, 28 Jan 2010 15:08:18 -0800 Raoul Duke wrote: > > You can sometimes avoid the use of a macro by using alternative evaluation > > strategies, whether that's provided by odd calling semantics, by pervasive > > laziness (e.g., one can implement `if` in Haskell using a function), or by > > man

Question: Clojure & concurrency in large-scale problems.

2010-01-28 Thread Mike Meyer
On Thu, 28 Jan 2010 14:56:05 -0800 (PST) Francis Lavoie wrote: > I found that blog post that make a comparison between python and > clojure. > http://www.bestinclass.dk/index.php/2009/10/python-vs-clojure-evolving/ Note that the author has several of his facts wrong about Python, and looks at no

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-06 Thread Mike Meyer
On Sat, 6 Feb 2010 18:25:47 -0800 (PST) Constantine Vetoshev wrote: > On Feb 6, 1:06 pm, Peter Schuller wrote: > > But the practical issue > > remains that if I want to write some software that I want sysadmins in > > various situations to want to use effortlessly (in my case, a backup > > tool)

A couple of namespace questions

2010-02-13 Thread Mike Meyer
I've got two questions about namespaces; one is pretty clojure-specific, the other possibly more related to java's classpath stuff. First, is there either a way to use names that exist in clojure.core? I.e., if wanted variable called map, can I get it somehow? If not, is there an idiom for such na

Question about how I got run?

2010-02-14 Thread Mike Meyer
So, the next question - possibly another name-space question. Is there any way to tell if inside a .clj file if it was invoked as a script by clojure.main, vs. being loaded for use elsewhere? What I'd like to do is make my unit tests usable in two modes: While working on a bug, I'd like to be abl

Re: Question about how I got run?

2010-02-15 Thread Mike Meyer
On Sun, 14 Feb 2010 22:32:45 -0800 (PST) ataggart wrote: > On Feb 14, 6:47 pm, Mike Meyer 620...@mired.org> wrote: > > So, the next question - possibly another name-space question. > > > > Is there any way to tell if inside a .clj file if it was invoked as a > &

Re: Question about how I got run?

2010-02-16 Thread Mike Meyer
On Tue, 16 Feb 2010 11:13:28 -0800 (PST) Daniel Werner wrote: > On Feb 16, 2:12 am, Mike Meyer 620...@mired.org> wrote: > > Wouldn't be hard to do, either. Just bind *script-name* (or some such) > > to the path in script-opt, and let the client decide if it's the sa

Re: Question about how I got run?

2010-02-16 Thread Mike Meyer
On Tue, 16 Feb 2010 02:35:03 +0100 Michał Marczyk wrote: > On 16 February 2010 02:12, Mike Meyer > wrote: > > To bad. It's really handy, especially as it starts trickling into > > system modules. You get one file that provides the simple command line > > usage plus

Re: STM with deeper structure

2010-02-20 Thread Mike Meyer
On Sat, 20 Feb 2010 17:27:34 -0800 (PST) "sailormoo...@gmail.com" wrote: > Hi : > > Say, I have a (def *a (ref {:b [{:c 5}]})) . > I want to add 1 to the :c inside, how would I write? > (Note: the value 5 is in (:b 0 :c), while 0 is the array index) > > (dosync (alter *a __ )) ; ple

Map transmogrification functions?

2010-02-21 Thread Mike Meyer
In working through a recent project, I realized that Clojure has a nice collection of functions for working with maps. However, it doesn't seem to have analogues of some of the important sequence tools (filter and map most noticeably, probably others). Given that map will take a map as a collectio

Re: Map with multiple keys?

2010-02-23 Thread Mike Meyer
On Tue, 23 Feb 2010 16:09:29 -0800 (PST) Base wrote: > Hi All - > > So this may be an extraordinary dumb question (even for me...) but is > there such a thing as a map with compound keys? > > For example lets say that I have a data set that looks like > > CatGender item-Id'

Re: let and nesting

2010-02-25 Thread Mike Meyer
On Thu, 25 Feb 2010 16:28:05 -0800 (PST) kuniklo wrote: > One of my least favorite things about common lisp was the degree of > nesting it required for sequential variable definitions. For common > code like this: > > (let (a vala) > (b valb) > ... do something with a & b... > (le

Re: Extract tested stuff from REPL, can i ?

2010-02-27 Thread Mike Meyer
On Sat, 27 Feb 2010 03:42:04 -0800 (PST) uap12 wrote: > Hi! > I have installed ClojureBox with Emacs. > I test to write stuff, direct in the REPL, so is there som easy way of > get the function defined out, > i know i should write them in a src-file first but i would be nice > when just testing t

Re: difference between if/when

2010-02-28 Thread Mike Meyer
On Sun, 28 Feb 2010 14:18:50 -0800 Richard Newman wrote: > This is an interesting point, though -- does "unless" communicate > something slightly different to* "when not", despite being > functionally identical? And is the distinction important enough to > justify a move towards a confusing

Milters?

2010-03-01 Thread Mike Meyer
Anyone doing milters in clojure? Are they reasonable to do on the JVM? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- 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

Re: objects, interfaces and library design

2010-03-03 Thread Mike Meyer
On Wed, 3 Mar 2010 09:47:09 -0800 (PST) cageface wrote: > I've been reading through the examples of "OO" in clojure using multi- > methods and they certainly seem very flexible and powerful. I'm > wondering, however, how people handle interface & library design. If > people can implement "objects

Re: Some basic guidance to designing functional vs. state parts of app

2010-03-03 Thread Mike Meyer
On Wed, 3 Mar 2010 14:20:56 -0800 (PST) Armando Blancas wrote: > > > On Mar 2, 8:34 pm, Sophie wrote: > > Do I design a single "World" ref whose state changes with time to > > different worlds, so adding a new Applicant or even adding a new Skill > > to an existing Applicant results in a new W

Re: Data manipulation question

2010-03-05 Thread Mike Meyer
animals] (map (fn [{:keys [animal sound number-of-feet]}] (map #(hash-map :animal %1 :sound %2 :number-of-feet %3) (split animal #"\s") (split sound #"\s") (split number-of-feet #"\s"))) animals)) which

Re: Long post with some questions about getting started...

2010-03-19 Thread Mike Meyer
On Fri, 19 Mar 2010 07:21:50 -0700 (PDT) Sean Devlin wrote: > > I'm having an interesting (to me) question around a using REPL.  Once > > it's shut down, where does this code go?  I feel like I'm in the old > > TRS-80 volatile coding days where you write some code, and if you shut > > down you've

Re: Long post with some questions about getting started...

2010-03-19 Thread Mike Meyer
On Fri, 19 Mar 2010 18:26:24 -0700 Terje Norderhaug wrote: > > > > *) InterLISP and some others were more like SmallTalk, or MS BASIC, in > >that you edited code at the REPL and saved the entire > >workspace. That did add power - I've never seen a file-based LISP > >whose error handler

Re: separating ui and content in clojure

2010-03-20 Thread Mike Meyer
On Sat, 20 Mar 2010 08:11:49 -0700 (PDT) strattonbrazil wrote: > I'd like to separate my ui Swing/JOGL from the content, so my code is > relatively unaware of the UI around it. For example, I create a > global context that holds on my content. I then make a UI that when > the user does some int

Re: separating ui and content in clojure

2010-03-21 Thread Mike Meyer
[Context recovered from top-posting.] On Sun, 21 Mar 2010 10:31:58 -0700 Josh Stratton wrote: > On Sat, Mar 20, 2010 at 8:51 AM, Mike Meyer > wrote: > > On Sat, 20 Mar 2010 08:11:49 -0700 (PDT) > > strattonbrazil wrote: > > > >> I'd like to separate my

Re: Can I GPL my Clojure project?

2010-03-27 Thread Mike Meyer
Ok, I'm not a copyright lawyer. I have spent a lot of time over the past three decades looking at licenses, and talking them over with lawyers, so I'd have no qualms acting on the advice below. But if you're serious about this, you need to talk to a real copyright lawyer. On Sat, 27 Mar 2010 18:44

Re: Can I GPL my Clojure project?

2010-03-29 Thread Mike Meyer
[Format recovered from top posting.] On Mon, 29 Mar 2010 17:36:42 -0400 Aaron Cohen wrote: > On Mon, Mar 29, 2010 at 5:24 PM, Phil Hagelberg wrote: > > On Sat, Mar 27, 2010 at 9:55 PM, Mike Meyer > > wrote: > >> 5) Can I distribute a jar file for my Clojure project und

Re: Clojure Concurrency Screencast Available

2010-04-20 Thread Mike Meyer
On Tue, 20 Apr 2010 06:47:05 -0700 (PDT) Mark Hamstra wrote: > Craig, I'm not Craig, but he's not answered yet, so... > I enjoyed you presentations, but I have a bit of a tangent question. > I'm still new to slime, so it's not a comfortable environment for me > yet. What I am wondering is how

Re: Datatypes and Protocols update

2010-04-24 Thread Mike Meyer
On Sat, 24 Apr 2010 06:51:18 -0700 (PDT) MarkSwanson wrote: > >> You can no > >> longer take a generic approach to information processing. This results > >> in an explosion of needless specificity, and a dearth of reuse." > > > For this reason, I've always found appealing languages which let you

Funcalls vs. lists (Was: Clojure Concurrency Screencast Available)

2010-05-02 Thread Mike Meyer
On Sun, 02 May 2010 13:06:56 +1000 Alex Osborne wrote: > e writes: > > Can you imagine how disruptive it would be at this point to do it the > > other way around?  If you were starting out today without any Lisp > > baggage, it seems TOTALLY obvious to me that lists would have been (1 > > 2 3), a

Re: Funcalls vs. lists (Was: Clojure Concurrency Screencast Available)

2010-05-02 Thread Mike Meyer
On Sun, 2 May 2010 14:52:17 -0700 (PDT) Jarkko Oranen wrote: > On May 2, 11:14 pm, Mike Meyer 620...@mired.org> wrote: > > On Sun, 02 May 2010 13:06:56 +1000 > > To get behavior similar to the vector constructs, you want to use > > list, which works like vector, except

Re: last-var-wins: a simple way to ease upgrade pain

2010-05-06 Thread Mike Meyer
On Wed, 5 May 2010 23:22:06 -0700 gary ng wrote: > On Wed, May 5, 2010 at 10:34 PM, Meikel Brandmeyer wrote: > > I'm deeply suspicious of such a behaviour. Why would + on a > > date mean adding days? Why not hours? minutes? seconds? > > months? years? I would always prefer plus-days over such a

Re: Annoying auto-signature

2010-05-11 Thread Mike Meyer
[format recovered from top postgin.] > > > On May 7, 2:13 am, Mibu wrote: > > > Am I the only one driven mad by the new auto-appended signature to > > > every message in this group ("You received this message because you > > > are subscribed...")? It started on April 16th. Is there a way a > > >

Re: How do I run a script? This has me stumped.

2010-05-15 Thread Mike Meyer
On Sat, 15 May 2010 21:54:53 +0200 Peter Schuller wrote: > > I am running the following command line: > > > > c:\apps\jdk1.6.0\bin\java.exe -server -cp "C:\apps\clojure-1.2.0\\lib > > \clojure-1.2.0-master-SNAPSHOT.jar;C:\apps\clojure-1.2.0\\lib\clojure- > > contrib-1.2.0-SNAPSHOT.jar" clojure.ma

Re: How do I run a script? This has me stumped.

2010-05-15 Thread Mike Meyer
On Sat, 15 May 2010 22:13:17 +0200 Peter Schuller wrote: > > Which leads to the question: what's in Blah.clj? In particular, > > there's nothing in clojure that automatically run things in the script > > file; you have to explicitly invoke the main function at the end of > > the script. If you don

Re: convert this to loop/recur?

2010-05-17 Thread Mike Meyer
On Mon, 17 May 2010 14:36:23 -0700 (PDT) Base wrote: > Hi All - > > I am trying convert a function to use loop/recur and am getting the > dreded > > "java.lang.UnsupportedOperationException: Can only recur from tail > position (repl-1:414)" error > > (at least dreded for newbies...) The "tail

Re: Clojure on Android

2010-05-20 Thread Mike Meyer
[Format recovered from top posting. > On Thu, May 20, 2010 at 3:21 PM, rob levy wrote: > > On Thu, May 20, 2010 at 12:37 PM, David Blubaugh < > > davidblubaugh2...@gmail.com> wrote: > >> Has anyone yet ported clojure to the android cellphones at this > >> time ?? I want to develop applications f

Re: do clojure and la(tex) have something in common ?

2010-05-23 Thread Mike Meyer
On Sun, 23 May 2010 06:55:50 -0700 (PDT) faenvie wrote: > today i read this statement in a blog-post: > > "... remarkably (La)TeX is much better suited for composing and > distributing most types of documents than any other modern > word processor on the market that I am aware of. Just like > pr

Re: do clojure and la(tex) have something in common ?

2010-05-25 Thread Mike Meyer
On Mon, 24 May 2010 11:50:41 -0700 (PDT) faenvie wrote: > hello mike, > hello tim > > thank you for this detailed insights into your experience > and knowledge. > > lately i had to implement a generator for a big catalog of > products and i used docbook for it, but that was not a > satisfying e

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Mike Meyer
On Wed, 26 May 2010 19:47:25 +0200 Peter Schuller wrote: > > chomp => rtrim > > (rtrim "foo\n") => "foo" is much more clear to me, plus it leaves the > > door open for trim and ltrim functions should the need arise. > > I like this. And in general I often fine the entire trio useful, and > adopt

Re: do clojure and la(tex) have something in common ?

2010-05-27 Thread Mike Meyer
On Thu, 27 May 2010 09:47:58 -0400 Tim Daly wrote: > Bill Hart, from the Sage project, said: > "Another thing I've been enjoying lately is literate >programming. Amazingly it turns out to be faster to >write a literate program than an ordinary program >because debugging takes almost

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-30 Thread Mike Meyer
On Mon, 31 May 2010 10:53:45 +0930 Antony Blakey wrote: > > On 31/05/2010, at 10:44 AM, Marc Spitzer wrote: > > also lets not forget about LD_LIBRARY_PATH issues, > No Mac or Windows user would encounter these. You forget that the Mac is a Unix box. It supports LD_LIBRARY_PATH. In an ideal wor

Clojure android activity?

2017-06-23 Thread Mike Meyer
Is there still any activity in the clojure-android space? The clojure-android mail list is largely inactive, seems like the developers of lein-droid haven't done anything in months (1.7.0-r4 is still used in the templates), and the numerous references If ind for an android-clojure web site are

Re: apply with constructors

2010-06-02 Thread Mike Meyer
On Wed, 2 Jun 2010 13:33:30 +0200 Konrad Hinsen wrote: > Constructors calls translate directly to Java constructor calls, meaning that > the number of arguments must be known at compile time. > > Assuming your constructor takes a fixed number of arguments, the easiest > solution to your proble

Re: Clojure on the tiobe index

2010-06-04 Thread Mike Meyer
On Fri, 4 Jun 2010 11:59:46 -0700 (PDT) BerlinBrown wrote: > I don't think tiobe is all accurate index of anything. But when you > look at the actual rankings, they seem to line up, especially for the > mainstream languages. > > I could see where Delphi ranks high on the list. "Go" is a little

Re: Complex type in clojure

2010-06-08 Thread Mike Meyer
On Tue, 8 Jun 2010 06:33:25 -0700 (PDT) Steven Devijver wrote: > On 8 jun, 05:47, Daniel wrote: > > These notation arguments are compelling. > > > > I'm not convinced. The notation would only work for literals, and how > often would one write literal complex numbers? > > For non-literals the no

Re: Complex type in clojure

2010-06-08 Thread Mike Meyer
On Tue, 8 Jun 2010 10:27:28 -0700 (PDT) Steven Devijver wrote: > On 8 jun, 16:38, Mike Meyer 620...@mired.org> wrote: > > > > Why? It isn't supported for rationals or exponents. Or are you > > claiming that because we support "3/4" we should also support &

Re: Complex type in clojure

2010-06-08 Thread Mike Meyer
[context tossed due to top posting.] On Tue, 8 Jun 2010 14:12:52 -0700 (PDT) Jason Smith wrote: > Why not just treat is as a vector, do vector math operations on it, > and be done with it? 1+2j is equivalent to [1 2]. 1+2j represents a > 2-D vector, does it not? Not only does this handle imag

Re: Non-tail recursion (Clojure way to hierarchies)

2010-06-15 Thread Mike Meyer
On Tue, 15 Jun 2010 03:24:08 -0700 (PDT) Quzanti wrote: > You can use recur to build a hierarchy. What do you mean by you can't > use it as it is not the last statement? Exactly that. recur in some sense terminates the current call, and hence is required to be the last statement in the call. >

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
"Nicolas Oury" wrote: >On the other hand, having boxed by default is a very significant slowdown >(10% on the strange program I tried, that had already a lot of annotations, >probably 20% or more on most programs), that can never be addressed : you >can't write annotations on every single line o

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
"Nicolas Oury" wrote: >I tried it on my program. Very few arithmetic, most of it with annotation. >10% Can we see the source? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 11:00:39 +0100 Nicolas Oury wrote: > There is a bit of arithmetic involved everywhere, and around 2-3 double > operations per function in the part choosing the instance of rule to apply. That still sounds arithmetic-heavy to me. In looking through my code, I find three differ

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 10:43:36 -0400 David Nolen wrote: > On Sat, Jun 19, 2010 at 5:13 AM, Mike Meyer < > mwm-keyword-googlegroups.620...@mired.org> wrote: > > > > > > Were those real world programs, or arithmetic benchmarks? Most real world > > programs I see

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
While I generally favor correct over fast (worrying about fast before you're correct is a good sign that you're engaged in premature optimization), I'm still trying to figure out the tradeoffs here. Especially since most LISPs & other dynamic languages don't seem to run into this issue - or at leas

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 20:20:48 +0100 Nicolas Oury wrote: > Not "ordinary" code. 10^19 is big. No, Aleph-2 is big. Any non-infinite number you can name in your lifetime is small ;-). Pretty much any time I really need integer speed, I also deal with numbers that can get much larger than 10^19th, b

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 22:27:05 +0100 Nicolas Oury wrote: > On Sat, Jun 19, 2010 at 10:15 PM, Mike Meyer wrote: > > Pretty much any time I really need integer speed, I also deal with > > numbers that can get much larger than 10^19th, because I tend to be > > doing combinat

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 20:13:07 -0400 David Nolen wrote: > On Sat, Jun 19, 2010 at 4:10 PM, Michał Marczyk > wrote: > > (defn fact [n] > > (loop [n n r 1] > >(if (zero? n) > > r > > (recur (dec n) (* r n) > > Huh? That doesn't look like it's going to work at all. > > 1) 1 is pr

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
On Sat, 19 Jun 2010 20:40:13 -0400 David Nolen wrote: > Mark and Mike you fail to address my deeper question. Maybe because you've failed to ask in your hurry to claim code is non-idiomatic or calling our example rhetoric. > I've been using > many different Clojure libraries all day long with t

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
"Rob Lachlan" wrote: >Actually, Mike, your two functions work just fine. (Equal branch). >Mind you I checked that out over two hours ago, so this information >might be out of date. > >Rob > >On Jun 19, 6:59 pm, Mike Meyer > (defn count-in [value col] >

Re: Enhanced Primitive Support

2010-06-19 Thread Mike Meyer
"Rob Lachlan" wrote: >Because the compiler is upset that it doesn't know what n is. r is a >long, but n is ???. The following works: > >(defn ^:static fact [^long n] > (loop [n n r 1] >(if (zero? n) > r > (recur (dec n) (* r n) > >Or see Dnolen's version above. But yeah, I

Factorial (Was: Enhanced Primitive Support)

2010-06-20 Thread Mike Meyer
On Sun, 20 Jun 2010 13:27:01 -0400 David Nolen wrote: > On Sun, Jun 20, 2010 at 12:57 PM, Luke VanderHart > wrote: > > > anything that would mean I'd have to explain the intricacies of > > primitives, boxing, hinting and casting in an "Intro to Clojure" > > course. As much as humanely possible,

Re: Enhanced Primitive Support

2010-06-20 Thread Mike Meyer
"David Nolen" wrote: >On Sun, Jun 20, 2010 at 8:19 PM, Mark Engelberg >wrote: > >> My favorite option of those proposed is: >> +, *, -, inc, dec auto-promote. >> loop/recur is changed so that primitive bindings are boxed. >> +',*',-',inc',dec' give error upon overflow. >> A new construct, loop'

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 14:34:44 +0100 Nicolas Oury wrote: > On Tue, Jun 22, 2010 at 2:00 PM, Daniel Gagnon wrote: > > > If we base the decision on the average guy not writing high performance > > numeric apps, then we should also base it on the fact that he does not need > > more than a long in 99

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Mon, 21 Jun 2010 21:44:04 -0700 Mark Engelberg wrote: > The new uber-loop is fantastic. > > So I guess the main point still to be finalized is whether the default > arithmetic ops will auto-promote or error when long addition > overflows. I think calling them "default" gives the wrong idea h

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 10:46:05 -0400 Rich Hickey wrote: > --- > The claim that this primitive stuff is just for numeric-intensive > applications is outrageous and false, and ignores the implementation > of Clojure itself to an embarrassing degree. I've worked my tail off > to reduce th

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 18:56:30 +0100 Nicolas Oury wrote: > On Tue, Jun 22, 2010 at 6:43 PM, Mike Meyer < > mwm-keyword-googlegroups.620...@mired.org> wrote: > > > > > > Everyone has to realize the math you are advocating for the default, > > > on non-ta

Re: Enhanced Primitive Support

2010-06-22 Thread Mike Meyer
On Tue, 22 Jun 2010 21:07:39 -0400 Garth Sheldon-Coulson wrote: > I would, however, like to throw some support behind Mike Meyer's suggestion > that the arbitrary precision numeric tower use names like add, sub, mul, > div, inc, dec, while the "default" ops keep the symbolic names. I think it > w

Re: State of Clojure web development

2010-06-24 Thread Mike Meyer
> 1. Have you written, or are you writing, a web application that uses > Clojure? What does it do? roman candle is a web app designed to let me control X10 plc components from any web-capable device, using the X10 firecracker controller. It's still in very early development, and hasn't been given

Re: Enhanced Primitive Support

2010-06-24 Thread Mike Meyer
[Not really about enhanced primitive support - more about optimization on the jvm.] On Tue, 22 Jun 2010 01:47:26 -0400 David Nolen wrote: > Yet consider this, If I'm writing OpenGL code in Penumbra I will have quite > a bit of code that amounts to the following: > > ; 630 msecs > (dotimes [_ 10

Re: Duplicate key bug in hash-maps

2010-06-25 Thread Mike Meyer
On Fri, 25 Jun 2010 15:36:31 +0200 Michael Wood wrote: > On 25 June 2010 12:27, Tim Robinson wrote: > > I tried Clojure via Githhub today. > > > > Anyone notice this bug that hadn't existed in Version 1.1 > > > > user=> #{:item1 {:a "A" :b "B"} :item2 {:a "A" :b "B"}} > > java.lang.IllegalArgume

Re: Duplicate key bug in hash-maps

2010-06-25 Thread Mike Meyer
On Fri, 25 Jun 2010 10:31:57 -0400 Stuart Halloway wrote: > Duplicate keys in maps/sets are disallowed in literals and factory functions, > where data is generally literal & inline and therefore likely represents > coder error: > > ; all disallowed > #{:a :a} > {:a 1 :a 2} > (hash-map :a 1 :a

Re: Duplicate key bug in hash-maps

2010-06-25 Thread Mike Meyer
On Fri, 25 Jun 2010 11:37:32 -0400 Stuart Halloway wrote: > (2) The need for both flavors. If there wasn't a flavor that rejected > duplicate keys, somebody would surely ask for it. I guess it makes as much sense as anything, given that you don't want to get into -unique or some such. But it d

Re: Enhanced primitive support - redux

2010-06-25 Thread Mike Meyer
I'll reiterate a question I asked a while back, but was never answered: Are the bit-bashing operators (bit-*) going to get the same treatment as the arithmetic operators? I would expect that many of the fields that benefit if the latter to be fast would also benefit from the former being fast, and

Re: Enhanced primitive support - redux

2010-06-26 Thread Mike Meyer
[Format recovered from top posting.] "Nicolas Oury" wrote: >On Sat, Jun 26, 2010 at 7:59 AM, B Smith-Mannschott >wrote: > >> This was suggested on the previous thread on this topic as well, but >> I don't think it was pointed out that *Java already does this*. Doesn't matter if clojure is boxing

Re: Converting list to Map

2010-06-27 Thread Mike Meyer
On Sat, 26 Jun 2010 15:54:34 -0700 (PDT) hsarvell wrote: > I tried to find something in core / on Google to do this but didn't, > here is what I have anyway: > > (defn lst-to-map [lst] >(reduce > (fn [hsh chunk] > (assoc hsh (first chunk) (last chunk))) > (hash-map) >

Re: the joys of lisp

2010-06-27 Thread Mike Meyer
On Sun, 27 Jun 2010 11:58:16 -0700 (PDT) cageface wrote: > When I read about new "features" in other languages that would be > simple macros in Lisp I just have to smile: > http://docs.python.org/dev/reference/compound_stmts.html#with Many in the Python community consider this an advantage of Py

Re: the joys of lisp

2010-06-27 Thread Mike Meyer
On Sun, 27 Jun 2010 12:41:36 -0700 (PDT) cageface wrote: > Python definitely seems to be the product of a very different design > philosophy than Lisp. I've always felt it was too prescriptive. > Omitting features that *might* be misused in an effort to keep the > language simple seems to have ba

Re: Newb Question

2010-06-28 Thread Mike Meyer
On Sun, 27 Jun 2010 11:22:15 -0700 (PDT) José Luis Romero wrote: > Hi! I am learning the core of clojure, and so far, I am loving it. But > I am not a lisp programmer (python, java, among others), but never > functional programming. I am practicing with codingbat.com, coding the > exercises on cl

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Sun, 27 Jun 2010 17:58:01 -0400 Greg wrote: > This weekend I've been diving head-first into Clojure, and I've documented a > lot of the sticking points that I've run into as a n00b. > > I'd like to share them with the community here, in the hopes that we might be > able to improve the getti

Re: the joys of lisp

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 11:21:24 -0700 (PDT) cageface wrote: > On Jun 28, 11:09 am, Daniel Gagnon wrote: > > That feature would *not* be a simple macro. It isn't simply a call to .close > > on whatever object, it's an arbitrary cleanup procedure on any object that > > implements the feature. The who

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 15:13:27 -0400 Daniel Gagnon wrote: > > This is the question I had on the blog post- what is meant by a "newbie"? > > Specifically, what sort of newbie is Clojure wanting to attract? One of the > > "complaints" the original poster had was that you had a choice of editors. > >

Re: the joys of lisp

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 12:18:58 -0700 (PDT) cageface wrote: > On Jun 28, 12:04 pm, Mike Meyer 620...@mired.org> wrote: > > The Python approach leads to more readable > > code:http://www.mired.org/home/mwm/papers/readability.html > > You don't seem to be very sympath

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 15:17:04 -0400 David Nolen wrote: > There is some truth to what you say. Java does bring quite a bit of > incidental complexity to the table but I think between lein and clj these > are being addressed well. They are not "officially sanctioned" but in the > case of lein, it's u

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 16:40:57 -0400 Lee Spector wrote: > > On Jun 28, 2010, at 4:29 PM, Brian Schlining wrote: > > > > Was the CLJ project (http://github.com/liebke/clj) mentioned on this > > thread? It seems like it might be handy for those who want to teach Clojure > > in the classroom. It h

Re: the joys of lisp

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 13:20:28 -0700 (PDT) cageface wrote: > On Jun 28, 1:10 pm, Mike Meyer 620...@mired.org> wrote: > > Not true as I understand "the Lisp way". You also need to reread the > > last paragraph again. > I actually agree with you that the typ

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 17:42:33 -0400 Daniel Gagnon wrote: > > > > Wrong/Misinformed ideas: > > - Clojure 1.1 is not out of date. While it may seem to an outsider that you > > need to be on 1.2 you would be very wrong. 1.2 certainly brings great things > > to the table but they are built upon having

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Mon, 28 Jun 2010 19:54:31 -0700 (PDT) Jason Smith wrote: > I just have to mention that what some people on this thread are asking > for may just not be feasible. The Java legacy behind Clojure can't > realistically be hidden. Nor should it be. > > Clojure is very tied to the JVM, with all i

Re: Clojure's n00b attraction problem

2010-06-28 Thread Mike Meyer
On Tue, 29 Jun 2010 00:19:26 -0400 Lee Spector wrote: > The editor issue is key when we're talking about an environment for newcomers. Yup. The ideal situation should be to let them use whatever text editor they're comfortable with. You really only need two things for writing clojure code: paren

  1   2   3   4   >