Re: Beginners question - emacs & compiling tests

2013-05-30 Thread Adam Getchell
On Tuesday, March 19, 2013 4:22:59 PM UTC-7, John SJ Anderson wrote: > > > I had this same issue when working through the tutorial. The text > makes it sound like you should replace the entire contents of the test > file, but that's not the case -- you just need to replace the (deftest > ...)

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Dax Fohl
(or the slightly hackier but probably easier version: create a tool that translates a subset of Clojure to RPython) On Friday, May 31, 2013 10:26:56 AM UTC+8, Dax Fohl wrote: > > So what I'm gathering (I'm still trying to grok) is that clojure-metal is > an approach that somewhat parallels PyPy,

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Dax Fohl
So what I'm gathering (I'm still trying to grok) is that clojure-metal is an approach that somewhat parallels PyPy, except in Clojure, and except that instead of defining a type-inferrable subset RClojure, you instead define an internal DSL via mjolnir that allows you to specify the types withi

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-30 Thread David Jacobs
That's true -- that's why I wrote up the Letters debugging mini-library for Ruby (lettersrb.com). However, there's friction there, too, and a surprising number of people don't think to do this. On Thursday, May 30, 2013 at 5:25 PM, Timothy Baldridge wrote: > Not really true, most of my progr

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-30 Thread Timothy Baldridge
Not really true, most of my programs contain this function: (defn debug [x] (pprint x) x) Now I can do this: (comp foo debug bar) Also, with some reader literal magic, I could write something to let me do this: (myfunc foo #dbg bar) On Thu, May 30, 2013 at 6:12 PM, David Jacobs wrote:

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-30 Thread David Jacobs
Two more things: 1) printing is often not a viable option for lazily eval-ed sequences or async processes -- the output gets jumbled! And believe me, when a new Clojure dev sees that for the first time, he/she wants to quit. 2) printing is terrible for elegant clojure code -- thing (comp f g h

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-30 Thread Raoul Duke
for a long time haskell did not have a debugger. that sucked, imho. -- -- 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 wi

Re: "I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-30 Thread David Jacobs
I'm just catching up on this discussion. I think that, regardless of whether any one coder uses them, debuggers are useful to a large subset of people. Even though Clojure likes us to be immutable, there are often times where we would like to debug the mutable parts of our code with something b

Re: cyclic dependencies out of nowhere?

2013-05-30 Thread atkaaz
I posted to make sure others reading it know not to start looking for a solution, since it was found - so saving their time. Also, I was sure you were going to post it as soon as you had the time (for the same reason, at least). I didn't mean to call you out or anything; I see making mistakes&fai

Re: cyclic dependencies out of nowhere?

2013-05-30 Thread Jim - FooBar();
hehe :) yep, I found it...some stupid class files had been left along with the java source files and they were interfering with the proper class files (under target/classes) since they were both under the classpath!!! I felt very stupid for having done this and that's why I didn't post back w

Re: Leiningen on CLR

2013-05-30 Thread Plínio Balduino
Thank you, mr. Kumar. Plinio On Thu, May 30, 2013 at 4:23 PM, Shantanu Kumar wrote: > > > > On Thursday, 30 May 2013 19:27:34 UTC+5:30, Plinio Balduino wrote: >> >> Hi there >> >> I'm playing with Clojure CLR (good job, guys) and I miss something like >> Leiningen. I quickly saw Kumar's lein-cl

Re: newbie question about symbols

2013-05-30 Thread Brian Craft
ah, thanks. On Thursday, May 30, 2013 2:48:00 PM UTC-7, cjeris wrote: > > Commas are whitespace in Clojure. If you are looking for the unquote > operator, it is ~. > > user=> (first `(~+ 5)) > # > > peace, Chris > > > On Thu, May 30, 2013 at 5:42 PM, Brian Craft > > wrote: > >> What's up with t

Re: cyclic dependencies out of nowhere?

2013-05-30 Thread atkaaz
looks like you found it: https://github.com/jimpil/Clondie24/commit/16f92fccc0c65d3c250b7a880649b940f792ea92 On Thu, May 30, 2013 at 11:25 PM, Jim - FooBar(); wrote: > Hi everyone, > > I've re-arranged some code in a project of mine and it seems I've > introduced cyclic dependencies...It doesn'

Re: newbie question about symbols

2013-05-30 Thread Chris Jeris
Commas are whitespace in Clojure. If you are looking for the unquote operator, it is ~. user=> (first `(~+ 5)) # peace, Chris On Thu, May 30, 2013 at 5:42 PM, Brian Craft wrote: > What's up with the 3rd result here? > > user=> (symbol? +) > false > user=> (symbol? clojure.core/+) > false > u

newbie question about symbols

2013-05-30 Thread Brian Craft
What's up with the 3rd result here? user=> (symbol? +) false user=> (symbol? clojure.core/+) false user=> (symbol? (first `(,+ 5))) true user=> (first `(,+ 5)) clojure.core/+ -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread atucker
Thanks for this! I do see now that it's probably a little trickier than I first thought :) Still, like you, I am left with the feeling it might be possible to do well... On Thursday, 30 May 2013 21:25:27 UTC+1, Gary Trakhman wrote: > > Well, ref-counting in C++ is used by something like smart-

Gloss parsing question

2013-05-30 Thread Alexander Duscheleit
Hi, I'm trying to parse a "binary" file with the help of gloss. My problem is, the data is in a format that gloss seeminglydoesn't deal with at all. The file start with a plaintext header, followed by some binary data, which may be compressed in various formats. What I'm trying to do is parse the

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Gary Trakhman
I might have missed some details about the implementation of smart pointers there, (whoops, I guess I failed the C++ interview), but I think it's got the basic idea. On Thu, May 30, 2013 at 4:27 PM, atucker wrote: > Wait... maybe I do :) Perhaps I was thinking that you needn't increment > the

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread atucker
Wait... maybe I do :) Perhaps I was thinking that you needn't increment the refcount of a node when you're just looking at it, but only if you're going to return it or attach it to something else... Sorry to know so little... On Thursday, 30 May 2013 21:00:59 UTC+1, atucker wrote: > > Hi! I

cyclic dependencies out of nowhere?

2013-05-30 Thread Jim - FooBar();
Hi everyone, I've re-arranged some code in a project of mine and it seems I've introduced cyclic dependencies...It doesn't make sense though! I get the following message: => (load-file "src/Clondie24/games/chess.clj") Exception Cyclic load dependency: [ /Clondie24/lib/core ]->/Clondie24/game

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Gary Trakhman
Well, ref-counting in C++ is used by something like smart-pointers, the implementation uses operator overloading to overload the pointer dereference operator *, and it manages an internal pointer to the actual value. Instantiating a smart-pointer increases the count for that object, and once that

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread atucker
Hi! I'm an interested spectator but understand very little :) I wonder if anyone would take a moment to explain? E.g. I can't see why reading from a data structure should ever lead to a change in the refcounts. A On Thursday, 30 May 2013 15:56:42 UTC+1, tbc++ wrote: > > There are two things I

Re: Future/Promise and not using threads

2013-05-30 Thread David Pollak
Paul, Thanks... but I want the opposite of delay. Basically, I do not want to consume a thread waiting for a Future to be satisfied. I want to continue a computation on a different thread once the Future/Promise is satisfied. Why? Think of a web app that's serving either a long poll or a web soc

Re: Future/Promise and not using threads

2013-05-30 Thread Paul deGrandis
Oh! I see, you want promises with callbacks (which you want to be futures). Once a promise is delivered, you want to kick off a future (in Clojure, futures consume a thread from the thread pool to do their work). It's been discussed before: https://groups.google.com/forum/?fromgroups=#!topic/cl

Re: Future/Promise and not using threads

2013-05-30 Thread David Nolen
You might find this work in progress interesting then: http://github.com/clojure/core.async On Thu, May 30, 2013 at 3:46 PM, David Pollak wrote: > Paul, > > Thanks... but I want the opposite of delay. > > Basically, I do not want to consume a thread waiting for a Future to be > satisfied. I wan

.Net Engineer --- Atlanta, GA --- Full Time --- USC or GC

2013-05-30 Thread Dhruv Kumar
*Dear Associate,* *Please check the below requirement and advise us the right consultant’s along with Rate, Availability, Contact Details, Current Location & Visa Status.* *It’s an immediate requirement please sent me the suitable resumes ASAP. Please make sure the candidate has all the required sk

Re: Future/Promise and not using threads

2013-05-30 Thread Paul deGrandis
I'm not entirely sure what you're trying to accomplish in a larger context, but perhaps you're looking for something like this? (delay (deref (future (and (Thread/sleep 2000) (+ 1 2) ... or maybe you want just `delay` Cheers, Paul On Thursday, May 30, 2013 6:09:02 AM UTC-7, David Pollak w

Re: Leiningen on CLR

2013-05-30 Thread Shantanu Kumar
On Thursday, 30 May 2013 19:27:34 UTC+5:30, Plinio Balduino wrote: > > Hi there > > I'm playing with Clojure CLR (good job, guys) and I miss something like > Leiningen. I quickly saw Kumar's lein-clr, but I don't know if it could be > used in a production environment (or explaining better, in a

Re: Use of io!

2013-05-30 Thread Gary Trakhman
Well, more seriously, I would be against any facility that prevents me from doing something potentially useful that I might want to do. Sprinkling potential problem spots with io! might make more sense in an application than a library. On Thu, May 30, 2013 at 1:27 PM, Gary Trakhman wrote: > Wha

Re: ref-history-count always return 0?

2013-05-30 Thread Josh Kamau
Thanks guys. I have been able to get the ref-history-count greater than 0 by increasing ref-min-history to something greater than 0 and by using long (using Thread/sleep) running transactions. Now i get it Josh On Thu, May 30, 2013 at 6:01 PM, Neale Swinnerton wrote: > > On Thu, May 30, 2013

Re: Use of io!

2013-05-30 Thread Gary Trakhman
What if you really want the 'bad' effects on retries? We need io! versions and non-io! versions of side-effect functions :-) On Thu, May 30, 2013 at 1:24 PM, Sean Corfield wrote: > On Thu, May 30, 2013 at 1:10 AM, Alex Baranosky > wrote: > > Do any of you ever use io! ? I've never used it, bu

Re: Use of io!

2013-05-30 Thread Sean Corfield
On Thu, May 30, 2013 at 1:10 AM, Alex Baranosky wrote: > Do any of you ever use io! ? I've never used it, but could see using it if > I had a transaction-heavy application. > > On Wed, May 29, 2013 at 11:43 PM, Michael Klishin > wrote: >> The point is to mark side-effecting code so that you can'

Re: [GSoC] core.matrix NDArray project feature requests

2013-05-30 Thread Dmitry Groshev
Thank you. I've found it yesterday, too; just in time :) On Wednesday, May 29, 2013 7:42:58 AM UTC+4, Ben Mabey wrote: > > On Tue May 28 02:40:33 2013, Dmitry Groshev wrote: > > Sorry, I wasn't clear enough in my proposal. > > > > I've mentioned clojurecheck [1] in it and the possibility of ext

Re: A blocking lazy sequence populated by multiple worker threads

2013-05-30 Thread Artem Boytsov
Hello, Colin, I suspected I should turn to existing Java concurrency constructs. Thank you very much for your response, and this is what I'm going to do. I was just hoping there's some Clojure idiomatic way to solve this, using agents, futures, promises, refs, and other Clojure stuff. For examp

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Gary Trakhman
Yes, it's a half-baked idea, but I'm curious if it might be worth an experiment. re: a) yea, I suspected this could get pretty bad, and your comment about having to mutate counts while traversing it definitely amplifies the effect of it. b) real-time is about latency and jitter and such, if throug

Re: ref-history-count always return 0?

2013-05-30 Thread Neale Swinnerton
On Thu, May 30, 2013 at 3:05 PM, Josh Kamau wrote: > > I am trying to understand (ref-history-count ref) . I thought it counts > the number of "old" values in the ref. But in all my tests, its always > returning zero. How is it used? > In clojure's STM, history is created only when required. Thi

Re: ref-history-count always return 0?

2013-05-30 Thread xumingmingv
ref-count only increment when one of the following occurs: * min-history > 0 * ref-read-faults > 0 && current-ref-history-count < max-history-count. ;; ref-count increment because min-history > 0 (let [r (ref 1 :min-history 1) f1 (future (dosync (Thread/sleep 1000) (

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Timothy Baldridge
There are two things I see that reduce the viability of ref-count GCs with Clojure: a) Clojure is insanely alloc heavy. Look at the source of the data structures, merging two hash-maps (for instance) requires about 2-3 allocations per assoc, per kv in the merged map: (merge map1 map2) allocs = ~(

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Gary Trakhman
At first glance, those issues seem like they could be mitigated, so I think I see room here for some real-time ref-counted clojure. I imagine it'd still have a lot of allocations so it wouldn't be that great for low-memory systems. On Thu, May 30, 2013 at 9:44 AM, Jean Niklas L'orange wrote: >

Re: query edn

2013-05-30 Thread Giacomo Cosenza
thanks Marc. I'll take a look at it Obviously I intended json, non jason.. mimmo On May 30, 2013, at 4:05 PM, Marc Limotte wrote: > Take a look at the 11 minute diatomic query video: > http://www.datomic.com/videos.html#query > That may be what you're looking for, I believe it can work wit

Re: query edn

2013-05-30 Thread Marc Limotte
Take a look at the 11 minute diatomic query video: http://www.datomic.com/videos.html#query That may be what you're looking for, I believe it can work with local Clojure data sets (e.g. eval'ed EDN) without any connection to a Datomic database. Marc On Thu, May 30, 2013 at 7:56 AM, Mimmo Cosenza

ref-history-count always return 0?

2013-05-30 Thread Josh Kamau
(def my-ref (ref 1)) (defn update-my-ref [new-value] (dosync (alter my-ref #(+ % new-value)) (ref-history-count my-ref))) Hi guys ; I am trying to understand (ref-history-count ref) . I thought it counts the number of "old" values in the ref. But in all my tests, its always return

Leiningen on CLR

2013-05-30 Thread Plínio Balduino
Hi there I'm playing with Clojure CLR (good job, guys) and I miss something like Leiningen. I quickly saw Kumar's lein-clr, but I don't know if it could be used in a production environment (or explaining better, in a dev environment for a production application) and if there is any other solution.

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Jean Niklas L'orange
On Thursday, May 30, 2013 2:21:36 PM UTC+2, Gary Trakhman wrote: > > I just thought about this recently, but does the value-oriented nature of > clojure mostly void the need for a cycles-aware GC? It seems like you > won't ever have cycles without identities, or pointers (java references). >

Re: clojure-west videos clarification

2013-05-30 Thread Jim - FooBar();
On 30/05/13 13:17, Benjamin R. Haskell wrote: On Thu, 30 May 2013, Jim - FooBar(); wrote: Hi all, I just stumbled upon this: http://clojurewest.org/news/2013/5/29/clojurewest-2013-videos-1.html but I have a question! Can anyone clarify (maybe Alex?) what the dates right next to the presentat

Re: Future/Promise and not using threads

2013-05-30 Thread David Pollak
Okay... I wrote my own: https://github.com/projectplugh/plugh/blob/master/src/plugh/util/misc.clj#L51 One can register for on-done and on-fail. I'll work on adding fail-fast and also map (so one can transform the future and execute code when the transformed future has been realized/delivered/fini

Re: A blocking lazy sequence populated by multiple worker threads

2013-05-30 Thread Colin Yates
Nice. On 30 May 2013 12:57, John D. Hume wrote: > On May 30, 2013 4:12 AM, "Colin Yates" wrote: > > ; the following would need to reify itself to be a Runnable, not got > that far yet :) > > (defn execute [job result-queue] (let [result (job)] (.put result-queue > result))) > > > > A no-args f

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Dax Fohl
So what do you see as the advantage in going the clojure-metal path? Is it that RPython is such a pain to debug that it ends up not being worth it in the end? Is the tradeoff essentially being able to do things exactly how you want in LLVM versus having to put up with warts that might not quit

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Gary Trakhman
I just thought about this recently, but does the value-oriented nature of clojure mostly void the need for a cycles-aware GC? It seems like you won't ever have cycles without identities, or pointers (java references). Maybe this would be a problem only when you need identities, ie deftype or defp

Re: clojure-west videos clarification

2013-05-30 Thread Benjamin R. Haskell
On Thu, 30 May 2013, Jim - FooBar(); wrote: Hi all, I just stumbled upon this: http://clojurewest.org/news/2013/5/29/clojurewest-2013-videos-1.html but I have a question! Can anyone clarify (maybe Alex?) what the dates right next to the presentation topic mean? Are they when the talk was giv

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Timothy Baldridge
No, you're not missing something. In the past I've turned down the idea of using RPython due to the lack of threading support. But in the past year major, major headway has been made (as you mentioned) so perhaps RPython isn't as crazy of an idea after all. As far as a GC goes, yes, RPython can us

Re: A blocking lazy sequence populated by multiple worker threads

2013-05-30 Thread John D. Hume
On May 30, 2013 4:12 AM, "Colin Yates" wrote: > ; the following would need to reify itself to be a Runnable, not got that far yet :) > (defn execute [job result-queue] (let [result (job)] (.put result-queue result))) > A no-args fn is both a perfectly good Callable and a perfectly good Runnable,

query edn

2013-05-30 Thread Mimmo Cosenza
Hi, is there an already defined query language for EDN as we have for JASON? Is there an already defined data modeling language for EDN as we have for jason? Does someone working on it? Do Datomic/Datalogic have something similar to be used/adapted? Thanks so much Mimmo -- -- You rec

clojure-west videos clarification

2013-05-30 Thread Jim - FooBar();
Hi all, I just stumbled upon this: http://clojurewest.org/news/2013/5/29/clojurewest-2013-videos-1.html but I have a question! Can anyone clarify (maybe Alex?) what the dates right next to the presentation topic mean? Are they when the talk was given or when the talk will be released on infoq?

Re: [ANN] peridot 0.2.1 released

2013-05-30 Thread Nelson Morris
Thanks for posting the link. I'll have to make sure to follow an ANN guide instead of memory next time. On May 29, 2013 11:40 PM, "Michał Marczyk" wrote: > https://github.com/xeqi/peridot > > > On 30 May 2013 06:13, Michael Klishin wrote: > > > > 2013/5/30 Nelson Morris > >> > >> peridot is a l

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Dax Fohl
I've got no idea about RPython itself, but the PyPy toolchain takes an interpreter for any language specified in RPython, and generates a native interpreter for that language, complete with JIT, garbage collection, etc. (Here's an example http://morepypy.blogspot.com/2011/04/tutorial-writing-i

Re: What is the status of Clojure on LLVM or C?

2013-05-30 Thread Michael Klishin
2013/5/30 Dax Fohl > Am I missing something? What are the downsides of this approach? is RPython garbage collected? Key ideas in Clojure pretty much assume memory management is not something you have to worry about. What about concurrency primitives? Clojure builds its reference types on top

Re: [ANN] lein-pedantic is now deprecated

2013-05-30 Thread Bruce Durling
I've been using it as well. so +1 cheers, Bruce On Thu, May 30, 2013 at 10:07 AM, Murtaza Husain wrote: > > +1 for both features. Nelson thanks for the plugin, I have been using it on > my projects. > > > On Thursday, May 30, 2013 9:11:17 AM UTC+5:30, tbc++ wrote: >> >> +1 for both features, it

Re: Future/Promise and not using threads

2013-05-30 Thread Gary Trakhman
by the second future, I mean an instance of http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html , which just has to conform to the interface, and doesn't actually have to execute on a different thread. Clojure's 'future' function returns an instance of one of these that uses

Re: Future/Promise and not using threads

2013-05-30 Thread Gary Trakhman
Maybe an easy solution: wrap the first future in another future that blocking-derefs, then performs your extra computation? Do an extra 'realized?' check for the optimization you mention. That would still consume threads in the case that it's not realized, but I think it gets you what you want.

Re: A blocking lazy sequence populated by multiple worker threads

2013-05-30 Thread Colin Yates
Can you not use http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html? That will provide the blocking element. To execute N (i.e. 10 in your example) use a http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html. The 'glue' w

Re: Future/Promise and not using threads

2013-05-30 Thread Mark Engelberg
According to this article, Clojure does not yet have this facility: http://java.dzone.com/articles/promises-and-futures-clojure This is something that is being worked on and discussed, though: http://dev.clojure.org/display/design/Promises https://groups.google.com/forum/#!topic/clojure-dev/7BKQi9

Re: [ANN] lein-pedantic is now deprecated

2013-05-30 Thread Murtaza Husain
+1 for both features. Nelson thanks for the plugin, I have been using it on my projects. On Thursday, May 30, 2013 9:11:17 AM UTC+5:30, tbc++ wrote: > > +1 for both features, it really helps for major version upgrades on large > projects. > > > On Wed, May 29, 2013 at 8:35 PM, Brian Tatnall >

Re: Use of io!

2013-05-30 Thread Josh Kamau
Thanks guys. Now i understand its for "marking" functions containing io so that they blow up if they are used inside transactions. I am still learning clojure and i have decided to take some time to understand every function in the core API. Josh. On Thu, May 30, 2013 at 11:10 AM, Alex Baranosk

Re: Has anyone here played with Wisp?

2013-05-30 Thread Kris Jenkins
PS: I've created an Emacs major-mode for wisp: https://github.com/krisajenkins/wisp-mode On Monday, 27 May 2013 11:09:56 UTC+1, Kris Jenkins wrote: > > I've played around with it a fair bit and it's got promise. Despite > appearances, it's not really a Clojure - as David says it's missing a lot

Re: Use of io!

2013-05-30 Thread Alex Baranosky
Do any of you ever use io! ? I've never used it, but could see using it if I had a transaction-heavy application. On Wed, May 29, 2013 at 11:43 PM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > 2013/5/30 Josh Kamau > >> Whats the point of using io! inside dosync if all it does is make

Re: GSOC Algebraic Expressions

2013-05-30 Thread Maik Schünemann
Great resource! I hope you don't mind if I steal ideas from it :) On Thu, May 30, 2013 at 8:42 AM, Jonas wrote: > This is a very interesting project. I look forward to following its > development. > > I did a presentation[1] on the implementation of the kibit[2] rule system > a few weeks ago wh