Re: [ANN] Leiningen 2.5.1 released

2015-01-15 Thread Mike Thompson

Reported here:  https://github.com/technomancy/leiningen/issues/1800

The workaround is to remove any "wget" or "curl" in your PATH, which will 
force lein.bat to use powershell (when downloading from github).


On Monday, January 12, 2015 at 9:25:26 PM UTC+11, Jean Niklas L'orange 
wrote:

> Hi there,
>
> On Monday, January 12, 2015 at 3:22:46 AM UTC+1, hba wrote:
>>
>> The message comes from wget [1] and to fix it i uninstalled it to let 
>> leiningen-win-installer [2] use curl instead. 
>>
>
> If it's more sensible to use curl over wget on Windows by default, then 
> I'd like to have one of you creating a new issue in the lein issue 
> tracker[1]. 
>
> It's probably also possible to use the %HTTP_CLIENT% environment variable 
> to solve this. If the Windows shell works anything like bash, then this 
> should be something like
> SET HTTP_CLIENT="call curl -f -L -o"
>
> [1]: https://github.com/technomancy/leiningen/issues
>
> -- Jean Niklas
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: remote nrepl/gorilla + port forwarding

2015-01-15 Thread Jony Hudson
Hi Sam,

 I think `lein gorilla :ip 0.0.0.0 :port 5` should work (it works on my 
machine). And if your router is forwarding 5 to that machine correctly 
then it should be accessible from outside. `lein gorilla :ip ROUTER_IP 
:port 5` shouldn't work because ROUTER_IP isn't an IP address bound to 
the machine, so it will not be able to run a server on it.

More importantly, though, DO NOT DO THIS!!! The reason is that this will 
give full access (with the privileges of the user running Gorilla) to 
anyone on the internet. Stuff like reading, deleting all of your files etc 
:-( Gorilla doesn't have any form of authentication mechanism built in, and 
the server mode is really meant for trusted access only. If you want to run 
Gorilla over a non-trusted network then you should set it up to use some 
form of authentication.

The solution I usually use for this sort of thing is to tunnel through SSH. 
So, first of all make sure you can access SSH on THAT_COMPUTER ... if your 
router allows you to forward 5 external to 22 on THAT_COMPUTER then 
that would work. If you can't control the target port then you might need 
to run the SSH server on a different port (5).

Once you've got SSH running then you can run the Gorilla server on the 
internal (loopback) IP i.e. the default setting. This is not accessible 
from outside the machine, but it is accessible by the SSH server which is 
running on the machine. So you can then use ssh tunnelling to access this 
port from the outside machine.

So:

- set up router to forward ssh
- run `lein gorilla :port 6` on THAT_COMPUTER
- on the remote machine `ssh -L 8090:127.0.0.1:6 -p 5 
me@ROUTER_IP`. This connects to the SSH server on 5, and tells it to 
route traffic from the local machine's port 8080 to the remote machine's 
port 6, which is the port that Gorilla is running on. This will be done 
by the ssh server, internal to the remote machine, so does not need Gorilla 
to be externally accessible.
- then you should be able to securely access Gorilla on the remote machine 
at `http://localhost:8090/...`. SSH will route this as described above.

A diagram would really help here with all of the ports, but hopefully you 
get the idea :-)


Jony

On Thursday, 15 January 2015 01:01:56 UTC, Sam Raker wrote:
>
> I've got a computer with a bunch of clojure code on it, sitting at home on 
> my home network. I've configured my router to forward port 5 on that 
> computer to port 5 on the router itself, so that, at least in theory, 
> ROUTER_IP:5 should be forwarded to THAT_COMPUTER:5, if that makes 
> sense. I've done this same thing for a number of other things, including 
> SSH, MySQL, etc.
>
> When I'm at home, I can fire up `lein gorilla :ip THAT_COMPUTER :port 
> 5` and then go to http://THAT_COMPUTER:5/worksheet.html, or, more 
> directly, `lein repl :headless THAT_COMPUTER:5`/`lein repl :connect 
> THAT_COMPUTER:5`, and it works. I'm trying to do the same from 
> not-at-home, no dice. (For the curious: I can SSH into THAT_COMPUTER, but 
> the connection is REALLY slow.)
>
> I've tried `lein gorilla :ip ROUTER_IP :port 5` (from THAT_COMPUTER), 
> but get a java.net.BindException about not being able to assign the 
> requested address--which makes sense--but `lein gorilla :ip 0.0.0.0 :port 
> 5` doesn't seem to work either. Same with `lein repl :headless :host 
> 0.0.0.0.0 :port 5`. 
>
>
> Any suggestions? Is this just not a thing I can do with these tools at 
> this point in their development? Is this a thing that should just work and 
> possibly my dumb router or some other thing is screwing it up?
>
>
>
> Thanks!
> -sam
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure/West 2015 Call for Presentations

2015-01-15 Thread Alex Miller
Just to be clear, "Clojure" should be read in a big tent way here to include 
ClojureScript and anything Clojure-related of course. ClojureScript talks 
desired!!

Alex

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: remote nrepl/gorilla + port forwarding

2015-01-15 Thread Sam Raker
Oh genius. Thanks! (Also thanks for pointing out the MASSIVE security hole 
I was trying to create for myself.)

On Thursday, January 15, 2015 at 6:19:04 AM UTC-5, Jony Hudson wrote:
>
> Hi Sam,
>
>  I think `lein gorilla :ip 0.0.0.0 :port 5` should work (it works on 
> my machine). And if your router is forwarding 5 to that machine 
> correctly then it should be accessible from outside. `lein gorilla :ip 
> ROUTER_IP :port 5` shouldn't work because ROUTER_IP isn't an IP address 
> bound to the machine, so it will not be able to run a server on it.
>
> More importantly, though, DO NOT DO THIS!!! The reason is that this will 
> give full access (with the privileges of the user running Gorilla) to 
> anyone on the internet. Stuff like reading, deleting all of your files etc 
> :-( Gorilla doesn't have any form of authentication mechanism built in, and 
> the server mode is really meant for trusted access only. If you want to run 
> Gorilla over a non-trusted network then you should set it up to use some 
> form of authentication.
>
> The solution I usually use for this sort of thing is to tunnel through 
> SSH. So, first of all make sure you can access SSH on THAT_COMPUTER ... if 
> your router allows you to forward 5 external to 22 on THAT_COMPUTER 
> then that would work. If you can't control the target port then you might 
> need to run the SSH server on a different port (5).
>
> Once you've got SSH running then you can run the Gorilla server on the 
> internal (loopback) IP i.e. the default setting. This is not accessible 
> from outside the machine, but it is accessible by the SSH server which is 
> running on the machine. So you can then use ssh tunnelling to access this 
> port from the outside machine.
>
> So:
>
> - set up router to forward ssh
> - run `lein gorilla :port 6` on THAT_COMPUTER
> - on the remote machine `ssh -L 8090:127.0.0.1:6 -p 5 
> me@ROUTER_IP`. This connects to the SSH server on 5, and tells it to 
> route traffic from the local machine's port 8080 to the remote machine's 
> port 6, which is the port that Gorilla is running on. This will be done 
> by the ssh server, internal to the remote machine, so does not need Gorilla 
> to be externally accessible.
> - then you should be able to securely access Gorilla on the remote machine 
> at `http://localhost:8090/...` . SSH will 
> route this as described above.
>
> A diagram would really help here with all of the ports, but hopefully you 
> get the idea :-)
>
>
> Jony
>
> On Thursday, 15 January 2015 01:01:56 UTC, Sam Raker wrote:
>>
>> I've got a computer with a bunch of clojure code on it, sitting at home 
>> on my home network. I've configured my router to forward port 5 on that 
>> computer to port 5 on the router itself, so that, at least in theory, 
>> ROUTER_IP:5 should be forwarded to THAT_COMPUTER:5, if that makes 
>> sense. I've done this same thing for a number of other things, including 
>> SSH, MySQL, etc.
>>
>> When I'm at home, I can fire up `lein gorilla :ip THAT_COMPUTER :port 
>> 5` and then go to http://THAT_COMPUTER:5/worksheet.html, or, 
>> more directly, `lein repl :headless THAT_COMPUTER:5`/`lein repl 
>> :connect THAT_COMPUTER:5`, and it works. I'm trying to do the same from 
>> not-at-home, no dice. (For the curious: I can SSH into THAT_COMPUTER, but 
>> the connection is REALLY slow.)
>>
>> I've tried `lein gorilla :ip ROUTER_IP :port 5` (from THAT_COMPUTER), 
>> but get a java.net.BindException about not being able to assign the 
>> requested address--which makes sense--but `lein gorilla :ip 0.0.0.0 :port 
>> 5` doesn't seem to work either. Same with `lein repl :headless :host 
>> 0.0.0.0.0 :port 5`. 
>>
>>
>> Any suggestions? Is this just not a thing I can do with these tools at 
>> this point in their development? Is this a thing that should just work and 
>> possibly my dumb router or some other thing is screwing it up?
>>
>>
>>
>> Thanks!
>> -sam
>>
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-15 Thread Steve Miner
Alpha5 works for me.

I noticed that the doc-string for *unchecked-math* doesn't mention the 
:warn-on-boxed behavior.  

Suggestion:  "While bound to true, compilations of +, -, *, inc, dec and the 
coercions will be done without overflow checks. While bound to :warn-on-boxed, 
a warning will be emitted when compilation uses boxed math. Default: false."


-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] dformat 0.1.0

2015-01-15 Thread David Sargeant
Looks really useful.  I would recommend using (fn [] ...) instead of #(...) 
here: 
https://github.com/zirkonit/dformat/blob/master/src/dformat/core.clj#L115.  
Makes the code more readable.

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] dformat 0.1.0

2015-01-15 Thread Luc Préfontaine
Euuh ? I was expecting to find %5 and above and a bunch of embedded forms

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] dformat 0.1.0

2015-01-15 Thread Steve Miner
Clever.  The doc-strings for dformatter and dformat could use a little work.  
Remember, people will use (doc whatever) in the REPL so “same as above” isn’t 
very useful.  Also, the dformatter doc implies more arguments than it actually 
takes.  The order of arguments to dformat seems backwards to me -- usually the 
"format" arg comes before the value to be formatted.

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojurescript to target JVM?

2015-01-15 Thread Adam Clements
I've been looking at getting my startup time down on my Clojure on android
app (it needs to be at least an order of magnitude smaller before I can
ship), and revisited this as a potential candidate. The biggest friction
point was that I would have to change which libraries I use and revisit all
the java interop to make it work nicely as clojurescript.

This got me wondering, would a hybrid approach work? If Rhino can use java
classes, could we rework the clojurescript emitter to emit javascript
corresponding to jvm clojure with rhino's java interop? Presumably if only
the javascript primitives were used and the java objects and interop
retained, the resulting rhino compiled bytecode would be fairly reasonable?
What's more, all the var indirection could be removed and macro
transformations baked in, making it less dynamic and workable for proguard
optimisation even if google's closure compiler didn't work very well with
it.

It's a fairly roundabout approach, and it might be that it would be quicker
to just implement a static production-mode compiler for clojure and skip
the clojurescript hack, but let me know if you think there would be some
mileage in using this to get something working in the short term.

Adam

On Sat Nov 22 2014 at 04:29:47 Sam Beran  wrote:

> The code is still half-baked, but in leu of a blog post or code, I can
> summarize my reasoning and approach:
>
>
> *ClojureScript is Designed With UI Responsiveness In Mind*
>
> At present, JVM Clojure is not currently suitable for Android development.
>  Since Android applications are structured around ephemeral Activities,
> any startup penalty over 250 ms is simply unacceptable. Current benchmarks
> [1] are showing 2-5 seconds of startup time, and I have seen no
> straightforward advice on how to achieve an order-of-magnitude increase in
> startup performance. ClojureScript (and JavaScript) is designed from the
> ground up with startup speed in mind. ClojureScript can be used to create
> responsive user interfaces on Android.
>
>
> *Selecting a Host Runtime*
>
> In order to run ClojureScript on Android, I considered the following
> options for host runtimes:
>
>- *Android WebView * - we can achieve reasonable startup times with a
>WebView, however any data must be serialized and deserialized in order to
>communicate between a WebView and Java. Even worse, any long-running object
>lifecycles must be manually managed, since we cannot rely on garbage
>collection to maintain object references between the host VM and those of
>the WebView.
>- *V8 (JNI) - *I briefly considered compiling a V8 runtime to host
>ClojureScript. Startup speed would probably outperform the WebView. This
>would be a lot of work to develop a nice bridging mechanism. Object
>lifecycle management is better than WebView, but still not ideal. With no
>C++ or JNI background, I could tell very quickly that this would not be a
>"weekend project".
>- *Rhino* - Rhino is a lightweight JavaScript runtime for the JVM.
>Execution speed is not fast, and since Rhino is not actively maintained, it
>will probably never support ES6 - not huge concerns for ClojureScript.
>Since Rhino is a pure-Java runtime, there is very little overhead when
>communicating between JS<-> Java, and Java GC can be used to maintain
>object lifecycles.
>- *Nashorn *- the successor to rhino. Not an option until Android
>supports InvokeDynamic.[2]
>
>
>
> *Achieving Fast Startup on Rhino*
>
> When I initially ran ClojureScript on Rhino, Startup speed was around 8-10
> seconds - even worse than JVM Clojure! Some quick measurements indicated
> that the bulk of the time was spent with Rhino parsing the JS sources for
> cljs/core.js. I was pleased to discover that Rhino supports bytecode
> precompilation via the jsc utility [3]. I was able to precompile the
> ClojureScript output to bytecode, and achieve *much faster startup -
> around 150ms on device*. This is well within the target performance
> range, and is fast enough to eliminate any noticeable UI lag.
>
> One hurdle I ran into is the 64k method size limit for Java classes. Since
> jsc compiles all .js files to a single method in a Java class, compiling
> cljs/core.js caused errors when compiling to bytecode. I was able to get
> around this by splitting the JS files in half during the build process
> until they were small enough to compile. *I have since implemented some
> optimizations which bring the startup overhead of ClojureScript down to <
> 100 ms.*
>
>
> *Pure ClojureScript Android Applications*
>
> Since I am precompiling the ClojureScript sources, I can also generate
> Java classes using ClojureScript macros. Here is an example of an Android
> Activity written in ClojureScript. This activity is compiled to Java in a
> similar manner to Clojure's gen-class mechanism:
>
> (ns cljs-hello.core
> (:require-macros [lambdroid.compile :refer [java-class]]))
>
> (java-class
> 

Properly parse clojure source code?

2015-01-15 Thread zirkonit
I'm thoroughly confused. If I want to parse clojure code from string 
without evaluating or caring a lot about its context, I'm out of luck.

EDN tools choke on reader macros ( #(blah % blah) is not valid EDN ), yet 
more context-aware tools like read-string with *read-eval* set to false 
choke on namespace-specific tokens like ::om/pass.

What would be a best choice to parse Clojure code into analyzable data 
structure while both parsing all of it (so, not just clojure.edn/read), 
_and_ not going the entire namespaces/shadowing/etc dance?

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Properly parse clojure source code?

2015-01-15 Thread Thomas Heller
https://github.com/clojure/tools.reader is probably your best bet.

On Friday, January 16, 2015 at 12:13:22 AM UTC+1, zirkonit wrote:
>
> I'm thoroughly confused. If I want to parse clojure code from string 
> without evaluating or caring a lot about its context, I'm out of luck.
>
> EDN tools choke on reader macros ( #(blah % blah) is not valid EDN ), yet 
> more context-aware tools like read-string with *read-eval* set to false 
> choke on namespace-specific tokens like ::om/pass.
>
> What would be a best choice to parse Clojure code into analyzable data 
> structure while both parsing all of it (so, not just clojure.edn/read), 
> _and_ not going the entire namespaces/shadowing/etc dance?
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Properly parse clojure source code?

2015-01-15 Thread Andy Fingerhut
I agree that tools.reader is probably the best way to go.

The following note is off the top of my head without double-checking the
details, so please take it with a bit of "needs verification of details"
thought.

Even with tools.reader, I believe you either need to eval ns forms, or do
your own parsing of ns forms to be able to read things like ::om/pass, with
namespace aliases in the keywords.  e.g. see documentation for *alias-map*
http://clojure.github.io/tools.reader/#clojure.tools.reader/*alias-map*

Andy


On Thu, Jan 15, 2015 at 3:21 PM, Thomas Heller  wrote:

> https://github.com/clojure/tools.reader is probably your best bet.
>
>
> On Friday, January 16, 2015 at 12:13:22 AM UTC+1, zirkonit wrote:
>>
>> I'm thoroughly confused. If I want to parse clojure code from string
>> without evaluating or caring a lot about its context, I'm out of luck.
>>
>> EDN tools choke on reader macros ( #(blah % blah) is not valid EDN ), yet
>> more context-aware tools like read-string with *read-eval* set to false
>> choke on namespace-specific tokens like ::om/pass.
>>
>> What would be a best choice to parse Clojure code into analyzable data
>> structure while both parsing all of it (so, not just clojure.edn/read),
>> _and_ not going the entire namespaces/shadowing/etc dance?
>>
>  --
> 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 with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Properly parse clojure source code?

2015-01-15 Thread Reid McKenzie
If what you want is a parser not a reader, I reworked this [1] recently 
and to the limits of my testing it's "correct" in that it parses every 
reader construct I thought of to throw at it. You could improve it, I 
believe that #() nesting is supported by this grammar, but I was trying 
not to complicate evaluation semantics with the parser grammar too much. 
Debugging ANTLR grammars is not what I'd call friendly.


A "useful" subset of this grammar with nicer evaluation semantics is 
used, a reader implemented and tested here [2]


[1] https://github.com/antlr/grammars-v4/blob/master/clojure/Clojure.g4
[2] https://github.com/oxlang/oxlang/blob/master/resources/grammar/Oxlang.g4

Reid

On 01/15/15 17:21, Thomas Heller wrote:

https://github.com/clojure/tools.reader is probably your best bet.

On Friday, January 16, 2015 at 12:13:22 AM UTC+1, zirkonit wrote:

I'm thoroughly confused. If I want to parse clojure code from string
without evaluating or caring a lot about its context, I'm out of luck.

EDN tools choke on reader macros ( #(blah % blah) is not valid EDN
), yet more context-aware tools like read-string with *read-eval*
set to false choke on namespace-specific tokens like ::om/pass.

What would be a best choice to parse Clojure code into analyzable
data structure while both parsing all of it (so, not just
clojure.edn/read), _and_ not going the entire
namespaces/shadowing/etc dance?

--
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 with
your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.


--
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] dformat 0.1.0

2015-01-15 Thread Mike Haney
I completely agree that the order of arguments is backwards - precludes the use 
of 'partial'.

Other than that, good job.  Very clever idea.

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] dformat 0.1.0

2015-01-15 Thread Carl Cotner
Exactly my first reaction! :-)

Great idea, zirkonit!

Carl


On Mon, Jan 12, 2015 at 4:52 PM,  wrote:

> It seems so obvious in retrospect... :) Good job.
>
> On Monday, January 12, 2015 at 4:43:08 PM UTC-5, zirkonit wrote:
>>
>> A tiny library, my first open-source Clojure release. Removes some
>> head-scratching when formatting dates (is it  or ? or YYY?) by
>> building date format strings automatically based on a sample. For example:
>>
>> (dformat date "March 1, 1999")   ;; "June 9, 2011"
>> (dformat date "Jan 1, 1999") ;; "Jun 9, 2011"
>> (dformat date "Jan 01")  ;; "Jun 09"
>> (dformat date "Sunday, May 1, 2000") ;; "Thursday, June 9, 2011"
>> (dformat date "Sun Aug 5")   ;; "Thu Jun 9"
>> (dformat date "12/31/99");; "06/09/11"
>> (dformat date "DOB: 12/31/2000") ;; "DOB: 06/09/2011"
>> (dformat date "March 15, 1999")  ;; "June 09, 2011"
>>
>>
>> https://github.com/zirkonit/dformat
>>
>> All comments are welcome!
>>
>  --
> 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 with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.