Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Daniel
Couldn't occurrence typing catch the error in that example, since evil-atom-reset! can only return an atom wrapping a keyword? I guess the problem I had is that the optional typing moniker seems misleading since it forces you to annotate vars. I had visions of gradually assigning types to

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Jozef Wagner
How about annotating clojure.core API. Is it needed, provided, optional? On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: Hi, After 10 months and 26 0.1.x releases of transitioning core.typed from an ambitious student project, I am finally comfortable

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
I see optional typing as the opposite of mandatory typing. You don't need to pass a type checker to get a program semantics. Typed Clojure offers a particular flavour of optional typing: gradual typing. My interpretation of gradual typing is some of your code is rigorously statically typed, some

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
Hi, Roughly 1/3 of clojure.core is annotated and comes included with core.typed. They are unchecked annotations. https://github.com/clojure/core.typed/blob/master/src/main/clojure/clojure/core/typed/base_env.clj#L658 You can lookup types via cf at the REPL. (clojure.core.typed/cf +) ;= (Fn

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
Also you can add missing annotations via ann. (ann ^:no-check clojure.core/+ ) Core vars observe the same rules as all vars: they must be annotated. Thanks, Ambrose On Thu, Aug 29, 2013 at 3:44 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, Roughly 1/3 of

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Nils Grunwald
Congratulations and thanks for your work! On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: Hi, After 10 months and 26 0.1.x releases of transitioning core.typed from an ambitious student project, I am finally comfortable recommending core.typed for

Re: [ANN] Cloc 0.1.0 - Leiningen plugin to serve project API docs through a local web server

2013-08-29 Thread Shantanu Kumar
Hi Jaley, This is pretty cool, thanks for sharing! The only nit I'd like to pick is, you may like to mention the version on README as 0.1.0 instead of 0.1.0-SNAPSHOT. Shantanu On Thursday, 29 August 2013 03:34:59 UTC+5:30, Jaley wrote: Hi! Cloc is a small web app to serve API

Re: [ANN] Cloc 0.1.0 - Leiningen plugin to serve project API docs through a local web server

2013-08-29 Thread Nils Grunwald
Thanks, this is very useful! Can't wait for the Firefox compatibility ;) Nils Grunwald On Thursday, August 29, 2013 12:04:59 AM UTC+2, Jaley wrote: Hi! Cloc is a small web app to serve API documentation, packaged as a Leiningen plugin. The idea is that you run one command, `lein cloc` from

Re: ClojureScript: Keyword Breaking Change Around the Corner

2013-08-29 Thread Thomas Heller
Hey, this sounds interesting. I just tried it on my project but it seems to be missing several keywords in the constants_table.js. Dumb example: the code tries to use cljs.core.constant$keyword$1064 , which does not exist. Will try to investigate, just a heads up. /thomas On Wednesday,

Re: stringify the name of an interned function

2013-08-29 Thread Erebus Mons
Tassilo Horn wrote: erebus.m...@gmail.com writes: What am I missing here? Functions don't really have names. A function may be bound to a var, and that has a name (:name metadata, to be precise). That said, since function's get compiled to classes you could twiddle with the class

Re: Emacs Clojure mode : No syntax highlighting for #_

2013-08-29 Thread Laurent PETIT
2013/8/29 Joel Holdbrooks cjholdbro...@gmail.com: I would imagine it is intended since #_ is a reader macro. #_ is not intended for commenting. Rather, it instructs the Clojure Reader to ignore entirely the subsequent form. This is much different from the comment macro (which simply takes any

Re: [ANN] Cloc 0.1.0 - Leiningen plugin to serve project API docs through a local web server

2013-08-29 Thread Jaley
@Shantanu - ah good spot, thanks! Maybe next I should make a tool to make sure README.md files are up to date :) @Nils - I'll fix Firefox at the weekend I hope. It's probably completely obviously from looking at the ClojureScript code, but I have absolutely no idea what I'm doing when it comes

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Christian Sperandio
Is there any perf improvement to use static typing in Clojure? Like we can see with Groovy 2.x and its static mode. 2013/8/29 Nils Grunwald nils.grunw...@gmail.com Congratulations and thanks for your work! On Thursday, August 29, 2013 12:28:35 AM UTC+2, Ambrose Bonnaire-Sergeant wrote:

Re: ClojureScript: Keyword Breaking Change Around the Corner

2013-08-29 Thread Thomas Heller
Ok, It not longer seems possible to do incremental compiles, by which I mean compile all files once, change one file, then compile again. The constants table will then be incomplete. But since I'm using my own build-tool that might just be my fault, would be good if someone else could double

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Michael Klishin
2013/8/29 Christian Sperandio christian.speran...@gmail.com Is there any perf improvement to use static typing in Clojure? core.typed is not a compiler, it's a type annotation/checker implemented as a library. If you are familiar with Erlang, it is to Clojure what Dialyzer is to Erlang. --

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Christian Sperandio
Ok... Another question, the checking is done only once (while compiling) ? Or, it's done while the runtime? 2013/8/29 Michael Klishin michael.s.klis...@gmail.com 2013/8/29 Christian Sperandio christian.speran...@gmail.com Is there any perf improvement to use static typing in Clojure?

Re: stringify the name of an interned function

2013-08-29 Thread Tassilo Horn
Erebus Mons erebus.m...@gmail.com writes: I am reading in a csv-file, and then transform the attributes into a hash-map: __ name,property1,property2,etc John,drunk,stinks,etc. etc.

Re: eval/macros with functions with metadata

2013-08-29 Thread Jamie Brandon
I certainly like that better than the binding solution, especially if hotspot can potentially inline the functions. It still tricky to do that in a macro, especially when the code to be evaled depends on the current lexical scope, but I can maybe work around that. Thanks. On 29 August 2013 04:50,

Re: stringify the name of an interned function

2013-08-29 Thread Erebus Mons
Tassilo Horn wrote: Erebus Mons erebus.m...@gmail.com writes: I am reading in a csv-file, and then transform the attributes into a hash-map: __ name,property1,property2,etc John,drunk,stinks,etc. etc.

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
With Clojure the lines blur between compile time and runtime. The clearest way to put it is that type checking is explicitly called at the REPL or in a unit test. Usually this is done during development iterations or testing time. Re: performance improvements: Michael is correct. Interestingly

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Daniel
If you can do that, why not return the literal representation of the type hinted function? For the repl you could provide a function that interns the type-hinted function into the namespace by evaluating the literal representation first. From there it's easy to provide something like

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
I don't think it would be possible to reconstruct the original forms in general, you would need to reverse macroexpansion to provide a form that has at least a passing familiarity with the original form. Otherwise you would get fully macroexpanded forms. That's a lot of work! On Thu, Aug 29,

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Daniel
Those forms won't be in the namespace you're evaluating? Yeah, it's probably a lot of work, but it sounds neat. :-) On Thursday, August 29, 2013 9:07:26 AM UTC-5, Ambrose Bonnaire-Sergeant wrote: I don't think it would be possible to reconstruct the original forms in general, you would

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
Well I'm sure people wouldn't be happy if their call to (+ a b c) was suddenly turned into (clojure.lang.Numbers/add (clojure.lang.Numbers/add a b) c) :) On Thu, Aug 29, 2013 at 10:57 PM, Daniel doubleagen...@gmail.com wrote: Those forms won't be in the namespace you're evaluating? Yeah,

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Maik Schünemann
On Thu, Aug 29, 2013 at 5:01 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Well I'm sure people wouldn't be happy if their call to (+ a b c) was suddenly turned into (clojure.lang.Numbers/add (clojure.lang.Numbers/add a b) c) :) the expresso [1] optimizer can be used for

Re: Preferred way of binding jdbc connections

2013-08-29 Thread Lyn Headley
Hi Shantanu, that was perfect, thanks. I note that this article only deprecates dynamic scoping in libraries, so my conclusion is that what I am considering is not an antipattern. Indeed, Stuart Sierra says the same: Applications can manage their own resources, and only the application

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Alex Baranosky
Imo, there's nothing easy about writing something like Slamhound. Even after many iterations it can't handle macros, because ultimately they're impossible, without some kind of hints specifically added for Slamhound (or for Typed Clojure) :) -- -- You received this message because you are

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Daniel
Yeah, it's pretty much impossible unless you limit yourself to a manageable subset of Clojure. The easy part I was referring to was the Leiningen plugin, not the whole kit n' caboodle. On Thursday, August 29, 2013 11:02:17 AM UTC-5, Alex Baranosky wrote: Imo, there's nothing easy about

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-29 Thread Ambrose Bonnaire-Sergeant
Just pushed 0.2.1 based on feedback from the video on HN. https://github.com/clojure/core.typed/blob/master/CHANGELOG.md Thanks, Ambrose On Thu, Aug 29, 2013 at 6:28 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Hi, After 10 months and 26 0.1.x releases of transitioning

Re: Emacs Clojure mode : No syntax highlighting for #_

2013-08-29 Thread Joel Holdbrooks
Definitely. I would agree a choice would be nice or even another font-lock group. There have been times where I forgot about a #_ somewhere in my code and spent a moment in confusion. Highlighting definitely would have been valuable. It would be cool if code following #_ were semi-transparent or

Re: Rxjava + Clojure Users

2013-08-29 Thread Dave Ray
Hi, Thanks for your feedback on your RxJava usage. I'm glad to hear that neither of you feel too strongly about direct IFn support because... In an effort to simplify the implementation and improve the RxJava experience for all JVM-based languages, we'll be dropping direct IFn support (and

Re: Rxjava + Clojure Users

2013-08-29 Thread Cedric Greevey
On Thu, Aug 29, 2013 at 2:00 PM, Dave Ray dave...@gmail.com wrote: In the Clojure case, this will consist of a namespace, probably rx.lang.clojure, with the following helpers: (defn fn* [f]) Takes a function f, and wraps it in an object that implements all the various Rx FuncX

Re: Rxjava + Clojure Users

2013-08-29 Thread Dave Ray
Seems to work fine in my tests as long as I fully qualify it in the fn macro that uses it. What am I missing? If someone :uses or :refer-alls the ns, I'm assuming bad thing would happen, but I'm not worried about that. Dave On Thu, Aug 29, 2013 at 12:15 PM, Cedric Greevey cgree...@gmail.com

Re: too circular?

2013-08-29 Thread JvJ
I wonder if the somewhat counterintuitive concept of a named anonymous function eludes some people, or isn't properly conveyed in tutorials. On Tuesday, 27 August 2013 00:36:07 UTC-7, HamsterofDeath wrote: thx 2013/8/26 Marshall Bockrath-Vandegrift lla...@gmail.com javascript: Dennis

Re: too circular?

2013-08-29 Thread Jim - FooBar();
On 29/08/13 20:23, JvJ wrote: I wonder if the somewhat counterintuitive concept of a named anonymous function eludes some people, or isn't properly conveyed in tutorials. I only consider #(...) as an anonymous function. The longer form (fn [] (...)) has the potential of being perfectly

Re: [ANN] expresso 0.1.0 released

2013-08-29 Thread David Nolen
Very cool stuff :) How much work would it take for this to work with ClojureScript? David On Mon, Aug 26, 2013 at 4:47 AM, Maik Schünemann maikschuenem...@gmail.comwrote: Hi, I released a first version of my gsoc project expresso [1]. This is an important Milestone in my gsoc project. What

[ANN] ac-nexus (Emacs Autocomplete Source for Sonatype Nexus Maven repository servers)

2013-08-29 Thread Jürgen Hötzel
Hi, I did some work on emacs-nexus (A Nexus Client for Emacs: released two years ago): I added ac-nexus.el: An auto-complete source using the Nexus Rest API. Using this source, you can complete Artifact/Version-IDs in Leiningen project files. See the github repository and README.md for details

Re: too circular?

2013-08-29 Thread Bruno Kim Medeiros Cesar
This exact use case is covered by letfn, which creates a named fn accessible to all function definitions and the body. That even allows mutual recursive definitions without declare. Your example would be (defn fib-n [n] (letfn [(fib [a b] (cons a (lazy-seq (fib b (+ b

Re: too circular?

2013-08-29 Thread Dennis Haupt
thx again 2013/8/30 Bruno Kim Medeiros Cesar brunokim...@gmail.com This exact use case is covered by letfn, which creates a named fn accessible to all function definitions and the body. That even allows mutual recursive definitions without declare. Your example would be (defn fib-n [n]