Re: hash-map initialization issue

2013-03-31 Thread JvJ
...even cheezier, use do #(do {:foo %}) On Saturday, 30 March 2013 23:58:31 UTC-4, JvJ wrote: > > Here's a cheezy hack, use identity. > > #(identity {:foo %}) > > On Thursday, 28 March 2013 17:51:10 UTC-4, Ryan wrote: >> >> Thanks for your explanation Jonathan. I am still a bit confused however >

Re: hash-map initialization issue

2013-03-31 Thread Alex Baranosky
There's also 'for' (defn my-function [foo-id a-keyword a-list] (for [m a-list] {:foo_id foo-id (keyword a-keyword) (:BAR_KEY m)})) On Sun, Mar 31, 2013 at 12:57 AM, JvJ wrote: > ...even cheezier, use do > #(do {:foo %}) > > > On Saturday, 30 March 2013 23:58:31 UTC-4, JvJ wrote: >> >> He

Re: Invoke a specific multimethod

2013-03-31 Thread Chas Emerick
Just copy/paste from my Counterclockwise REPL. :-) - Chas On Mar 30, 2013, at 11:54 PM, JvJ wrote: > Also, nice syntax highlighting! How'd you do that? > > On Saturday, 30 March 2013 23:54:03 UTC-4, JvJ wrote: > get-method. Thanks, that was exactly what I was looking for! > > On Saturday, 30

Re: Persistent Data Structures for Objective-C/LLVM

2013-03-31 Thread Matthias Benkard
I implemented persistent, array-mapped Patricia trees in C a while ago: https://matthias.benkard.de/journal/118 It should be relatively straight-forward to build some Objective-C classes on top of that. (There's a reason the memory management routines are named bpt_{retain, release, deallo

What's the difference between a "sequence" and a "seq"?

2013-03-31 Thread Alice
On http://clojure.org/lazier, Changed: (rest aseq) - returns a logical collection (Sequence) of the remaining items, not (necessarily) a seq rest simply calls RT.more and here's the code of RT.more: static public ISeq more(Object x){ if(x instanceof ISeq) return ((ISeq) x).more();

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread Roberto Mannai
Hello, Should one have Powershell pre-installed? The wizard does not complete successfully the "self-install" step, although it seems as it is not aware of it. When running "lein self-install" manually, I get a DotNetMethodException (*). Now I'd guess this is an issue of lein.bat, not of your ins

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread David Powell
Interesting. Yes this is a problem with lein.bat rather than the installer. Leiningen recently added support for powershell because it was assumed that powershell would always be installed, but in fact that isn't the case. The installer bundles curl as a fallback for when powershell isn't instal

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread David Powell
Also, can you check what version of powershell you have? powershell -Command echo $host.version -- Dave -- -- 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 mem

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread Roberto Mannai
C:\Users\Roberto Mannai\.lein\bin>powershell -Command echo $host.version Major Minor Build Revision - - - 2 0 -1 -1 I'm doing some test, the problem seems to be this line: powershell -Command "& {param($a,$f) (new-object System.Net.WebClient).DownloadFile

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread David Powell
> powershell -Command "& {param($a,$f) > (new-object System.Net.WebClient).DownloadFile($a, $f)}" %~2 %~1 > Ah, yeah. %~1 and %~2 strip the quotes off the parameters, which isn't a good idea. Something like this should work: > powershell -Command "& {param($a,$f) > (new-object System.Net.WebCli

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread Kemar
Using lein.bat with powershell I found two issues: First, there is the aforementioned {param($a,$f) (new-object System.Net.WebClient).DownloadFile ($a, $f)} DotNetMethodException. This could be solved by starting the Command Prompt as an Administrator (shift + right-click on the cmd.exe,

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread David Powell
Hi, But there is a second problem. It (apparently) tries two save the jar file > in > C:\Users\\.lein\self-installs\leiningen-x.y.z-standalone.jar > > But it looks like it doesn't deal correctly with spaces in the path. If > your Username > were to be "John Doe", only the part in front of the spac

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread Roberto Mannai
On Sun, Mar 31, 2013 at 5:23 PM, David Powell wrote: > I think that this patch fixes the issue: > https://github.com/djpowell/leiningen/commit/bd9e2e25508cfc01889057349b133941ff4fc379 > > It seems that quotes around powershell parameters on the command-line need > to be triple-double-quoted :) T

Re: ANN: Windows installer for Leiningen

2013-03-31 Thread David Powell
> That's correct, now it works! :) > Great. The patch has been accepted by leiningen, so it should be in the next release. > IMHO the patch should be just the line 83 of your file, the other > quoted variables are URLs (which cannot have spaces). Note that > :DownloadFile, when calls powershell

Re: ANN: no.disassemble, a runtime bytecode disassembler

2013-03-31 Thread Gary Trakhman
Ritz's debugger approach looks much more thorough and doesn't require invasive extra dependencies as far as I can tell. If I had known it existed, I probably wouldn't have bothered :-). One major weakness of my approach is it doesn't take into account class-unloading through garbage collectio

[ANN] clj-time 0.5.0 and repo/org change

2013-03-31 Thread Sean Corfield
clj-time 0.5.0 was recently released which includes the following changes: * update Joda Time to 2.2 * update default version of Clojure to 1.5.1 (still supporting 1.2.1 onward) * add: last-day-of-the-month, first-day-of-the-month, number-of-days-in-the-month, today-at and periodic-seq from Michae

Re: hash-map initialization issue

2013-03-31 Thread Ryan
Thanks for your input guys Ryan On Sunday, March 31, 2013 11:11:08 AM UTC+3, Alex Baranosky wrote: > > There's also 'for' > > (defn my-function [foo-id a-keyword a-list] > (for [m a-list] > {:foo_id foo-id (keyword a-keyword) (:BAR_KEY m)})) > > > On Sun, Mar 31, 2013 at 12:57 AM, JvJ >w

Re: Quirk with printing regexps

2013-03-31 Thread Mark Engelberg
On Sat, Mar 30, 2013 at 11:33 AM, Mark Engelberg wrote: > On Thu, Mar 28, 2013 at 6:36 PM, Andy Fingerhut > wrote: > >> (defn print-regex-my-way [re] >> (print "#regex ") >> (pr (str re))) >> >> That might be closer to what you want. >> > > Yes. That does the trick. That extra level of conv

Re: Quirk with printing regexps

2013-03-31 Thread Andy Fingerhut
If you print it as a string, then want to read it back in and convert back to a regex, you must read it as a string, then call re-pattern on it. That should preserve the original meaning. Printing it as a string, and trying to read it as a regex by prepending it directly with # before the " of th

Re: Quirk with printing regexps

2013-03-31 Thread Mark Engelberg
On Sun, Mar 31, 2013 at 10:46 PM, Andy Fingerhut wrote: > If you print it as a string, then want to read it back in and convert back > to a regex, you must read it as a string, then call re-pattern on it. That > should preserve the original meaning. > > Printing it as a string, and trying to read