Re: Opposite function to cons, but in terms of construction, not destruction.

2011-12-14 Thread Alan Malloy
On Dec 13, 8:37 pm, Cedric Greevey cgree...@gmail.com wrote: On Tue, Dec 13, 2011 at 11:25 PM, Alan Malloy a...@malloys.org wrote: On Dec 13, 7:56 pm, Stephen Compall stephen.comp...@gmail.com wrote: On Tue, 2011-12-13 at 16:28 -0800, Alan Malloy wrote: As you can see, only as many

Re: Opposite function to cons, but in terms of construction, not destruction.

2011-12-14 Thread Cedric Greevey
On Wed, Dec 14, 2011 at 3:12 AM, Alan Malloy a...@malloys.org wrote: On Dec 13, 8:37 pm, Cedric Greevey cgree...@gmail.com wrote: On Tue, Dec 13, 2011 at 11:25 PM, Alan Malloy a...@malloys.org wrote: On Dec 13, 7:56 pm, Stephen Compall stephen.comp...@gmail.com wrote: On Tue, 2011-12-13 at

Re: Lazy-seq of a binary file

2011-12-14 Thread Cedric Greevey
On Wed, Dec 14, 2011 at 12:04 AM, Simone Mosciatti mweb@gmail.com wrote: Thank you so much, just one last thing, why you use a char-array ? Reader returns chars. If I want use a byte-array, and no map all the whole sequence ? Use an InputStream rather than a reader if you're reading

Re: Opposite function to cons, but in terms of construction, not destruction.

2011-12-14 Thread Alan Malloy
On Dec 14, 1:18 am, Cedric Greevey cgree...@gmail.com wrote: On Wed, Dec 14, 2011 at 3:12 AM, Alan Malloy a...@malloys.org wrote: On Dec 13, 8:37 pm, Cedric Greevey cgree...@gmail.com wrote: On Tue, Dec 13, 2011 at 11:25 PM, Alan Malloy a...@malloys.org wrote: On Dec 13, 7:56 pm, Stephen

Re: Opposite function to cons, but in terms of construction, not destruction.

2011-12-14 Thread Alan Malloy
On Dec 14, 2:22 am, Alan Malloy a...@malloys.org wrote: On Dec 14, 1:18 am, Cedric Greevey cgree...@gmail.com wrote: On Wed, Dec 14, 2011 at 3:12 AM, Alan Malloy a...@malloys.org wrote: On Dec 13, 8:37 pm, Cedric Greevey cgree...@gmail.com wrote: On Tue, Dec 13, 2011 at 11:25 PM,

ANN: core.memoize v0.5.1

2011-12-14 Thread Fogus
core.memoize v0.5.1 Release Notes = core.memoize is a new Clojure contrib library providing the following features: * An underlying `PluggableMemoization` protocol that allows the use of customizable and swappable memoization caches that adhere to the synchronous

Re: ANN: core.memoize v0.5.1

2011-12-14 Thread Linus Ericsson
Wov! There have been some great and very educational blog posts on how to improve the memoization functionality for various use-cases but this makes it even more effort free to use the techniques. This is brilliant! Thank you! /Linus 2011/12/14 Fogus mefo...@gmail.com core.memoize v0.5.1

Re: Baltimore Functional Programming

2011-12-14 Thread Gary Trakhman
We've scheduled a beer night at Max's in Fells point tonight at 7:30. If you haven't already, check out the mailing list: http://groups.google.com/group/baltimorefp Here's the announcement: http://baltimorefp.wordpress.com/2011/12/09/first-beer-night/ On Nov 28, 6:38 pm, Gary Trakhman

Re: multiple return values

2011-12-14 Thread Tom Faulhaber
Razvan, I believe that proxy actually only creates a new class per call site, not per instance. However, I can't completely swear to this. Anyone with more detailed knowledge than I have want to comment? Assuming I'm right,, you should be fine to have lots of instances. HTH, Tom On Dec 13,

Re: Leiningen and Cake

2011-12-14 Thread Timothy Washington
Hey there, I see there's been progress made on Leiningen, and wanted to chime in wrt overall features. I've been recording a few small things that would make life easier. 1) The first is being able to pass many tasks to lein. So I would prefer A. instead of B. - A) lein clean deps - B)

help with web server

2011-12-14 Thread labwork07
I have the following web server that I pieced together from code snippets so I'm not sure how everything works really but most of it works. Now, I want to put a file for download in download.html. I tried all kinds of href specs but nothing works. Where should I put my file for download?

Re: Leiningen and Cake

2011-12-14 Thread Timo Mihaljov
On 12/14/2011 06:37 PM, Timothy Washington wrote: 1) The first is being able to pass many tasks to lein. So I would prefer A. instead of B. * A) lein clean deps * B) lein clean lein deps You can chain commands by separating them with a comma: lein clean, deps -- Timo -- You

Re: Leiningen and Cake

2011-12-14 Thread Phil Hagelberg
On Wed, Dec 14, 2011 at 8:37 AM, Timothy Washington twash...@gmail.com wrote: 2) Also, It'd be nice to have a way of listing installed leiningen plugins, instead of ls on ~/.lein/plugins 3) I'd love to fire up a lein repl src/my-code.clj, and have passed in code execute before I get to the

Re: multiple return values

2011-12-14 Thread Alan Malloy
Correct, just like closures and reifies. On Dec 14, 7:33 am, Tom Faulhaber tomfaulha...@gmail.com wrote: Razvan, I believe that proxy actually only creates a new class per call site, not per instance. However, I can't completely swear to this. Anyone with more detailed knowledge than I have

Re: Leiningen and Cake

2011-12-14 Thread Timothy Washington
Oh nice, I hadn't realised 1) was already in there. And I've created the issues. I'll certainly begin to dig into leiningen code, and see in what ways I can push these forward. - https://github.com/technomancy/leiningen/issues/351 - https://github.com/technomancy/leiningen/issues/352

letrec

2011-12-14 Thread Razvan Rotaru
Hi, Is there a reliable implementation of letrec in clojure? Anybody using it? I have found a post from 2008, with an implementation which I don't understand (and it's said to be slow), and which I don't know whether to trust.(It's also supposed to be slow). Thanks, Razvan -- You received this

Re: letrec

2011-12-14 Thread Kevin Downey
lazy-seq and letfn should cover anything you would need letrec for On Wed, Dec 14, 2011 at 11:09 AM, Razvan Rotaru razvan.rot...@gmail.com wrote: Hi, Is there a reliable implementation of letrec in clojure? Anybody using it? I have found a post from 2008, with an implementation which I don't

Re: letrec

2011-12-14 Thread Razvan Rotaru
I don't quite understand why people are saying this. Anyway, It's not enough for me. On Dec 14, 9:13 pm, Kevin Downey redc...@gmail.com wrote: lazy-seq and letfn should cover anything you would need letrec for On Wed, Dec 14, 2011 at 11:09 AM, Razvan Rotaru razvan.rot...@gmail.com

Re: letrec

2011-12-14 Thread David Nolen
On Wed, Dec 14, 2011 at 2:53 PM, Razvan Rotaru razvan.rot...@gmail.comwrote: I don't quite understand why people are saying this. Anyway, It's not enough for me. What can't you solve your problem with what was suggested? David -- You received this message because you are subscribed to the

help with webserver

2011-12-14 Thread labwork07
I'm using a combination of clojure, enlive and jetty. I want to be able to serve arbitrary files. Can somebody show me an example? -- 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

Re: help with webserver

2011-12-14 Thread Chris Granger
If you used Noir (www.webnoir.org), anything you put into the resources/public/ directory would be accessible from a url. So for example, if I had resources/public/hey.mp4 and accessed http://my-site/hey.mp4 I would get it. Cheers, Chris. On Dec 14, 12:46 pm, labwor...@gmail.com wrote: I'm

Re: letrec

2011-12-14 Thread Razvan Rotaru
letfn defines functions. I'm just defining some values. The values contain anonymous functions which need to refer to other values.I know there are workarounds for this, but this means I must change the interface. Razvan On Dec 14, 9:56 pm, David Nolen dnolen.li...@gmail.com wrote: On Wed, Dec

Re: help with webserver

2011-12-14 Thread Mark Rathwell
Generally, in production, jetty or tomcat would be fronted by a web server like nginx or apache httpd, and those would be setup to serve your static files. In development, or if you just don't want to set that up, with Compojure you can use compojure.route/files to serve static files [1]. Or, as

Re: letrec

2011-12-14 Thread David Nolen
Do you have a minimal example of what you are trying to do? On Wed, Dec 14, 2011 at 3:53 PM, Razvan Rotaru razvan.rot...@gmail.comwrote: letfn defines functions. I'm just defining some values. The values contain anonymous functions which need to refer to other values.I know there are

Re: letrec

2011-12-14 Thread Razvan Rotaru
Yes. Assuming I have following macros: (button :id b1 :listener #(...)) = (let [b1 (new JButton)] ...) (panel [:id p1] (button :id b1 ...) (button :id b2 ...)) = (let [p1 (new JPanel) b1 (button :id b1 ...) b2 (button :id b2 ...)] ...) How to make the listener in b1 refer to b2? Razvan On Dec

Re: Re: help with webserver

2011-12-14 Thread labwork07
Thanks everybody. Adding a resources route did work. The link below was helpful: http://stackoverflow.com/questions/7816465/serving-static-files-with-ring-compojure-from-a-war On , Mark Rathwell mark.rathw...@gmail.com wrote: Generally, in production, jetty or tomcat would be fronted by a web

Re: Re: help with webserver

2011-12-14 Thread labwork07
Thanks everybody. Adding a resources route did work. The link below was helpful: http://stackoverflow.com/questions/7816465/serving-static-files-with-ring-compojure-from-a-war On , Mark Rathwell mark.rathw...@gmail.com wrote: Generally, in production, jetty or tomcat would be fronted by a web

Clojure videos no longer downloadable

2011-12-14 Thread Phil Hagelberg
So I recently went to clojure.blip.tv to download a video, and I noticed my account had been deleted. Apparently they are requiring all logins to go through facebook. Is there a way we could provide video downloads to people who don't have facebook accounts? -Phil -- You received this message

Re: Clojure videos no longer downloadable

2011-12-14 Thread Sean Corfield
I don't know if it helps but I subscribe to the Clojure podcast in iTunes and it has downloaded all the episodes: http://itunes.apple.com/us/podcast/clojure/id275488598 I don't know how/if that relates to the blip.tv access point. Sean On Wed, Dec 14, 2011 at 3:30 PM, Phil Hagelberg

Re: Clojure videos no longer downloadable

2011-12-14 Thread Phil Hagelberg
On Wed, Dec 14, 2011 at 4:07 PM, Sean Corfield seancorfi...@gmail.com wrote: I don't know if it helps but I subscribe to the Clojure podcast in iTunes and it has downloaded all the episodes: http://itunes.apple.com/us/podcast/clojure/id275488598 Is there a way to get at them with a browser?

Obscure bug (?) in clojurescript, probably related to lazy seqs

2011-12-14 Thread Dave Sann
Hi all, I came across an obscure behaviour in clojurescript. The original function is used to tabulate, as a list of lists, non overlapping sub-sequences. I stripped out the unessential parts from my code to get the following. It doesn't do anything specific - but exhibits similar behaviour

Re: Clojure videos no longer downloadable

2011-12-14 Thread Baishampayan Ghose
Every video has an RSS feed which can be mechanically constructed given the URL. So for http://blip.tv/clojure/rich-hickey-unveils-clojurescript-5399498, the RSS feed is at http://blip.tv/rss/flash/5399498 IIRC, the RSS feed has the URL to the actual video. Regards, BG On Thu, Dec 15, 2011 at

Re: Lazy-seq of a binary file

2011-12-14 Thread Simone Mosciatti
Ok thank you so much, i got it. Thanks again ;-) Simone On Dec 14, 3:22 am, Cedric Greevey cgree...@gmail.com wrote: On Wed, Dec 14, 2011 at 12:04 AM, Simone Mosciatti mweb@gmail.com wrote: Thank you so much, just one last thing, why you use a char-array ? Reader returns chars. If I

want to make a 'debug' function, how to get current source and line number?

2011-12-14 Thread jaime
Hello there, I want to write a function named debug which will print out date- time msg + current source-line + etc. info, but I don't know how to get the current source and line number of the running point (just like what REPL does when encounter any exceptions) ... Got any ideas? Thanks! --

Re: namespace what?

2011-12-14 Thread David Brunell
Do you have a complete program that you are trying to get working, along with errors? The examples.core namespace was chosen at random; you could call it whatever you want. It refers to the namespace in which your main program runs. In order to have clarity.component recognized, you need to

Re: namespace what?

2011-12-14 Thread Tassilo Horn
jayvandal s...@ida.net writes: Hi, I don't understand your question, but... I think I understand namespace and then I don't! I try to run this example (ns examples.core (use [clarity.component :as c])) The syntax of ns is (ns examples.core (:use [clarity.component :as c]))