Re: Type annonations in clojure.instant/print-date result in speedup of 3

2013-10-09 Thread Andy Fingerhut
Thanks for checking, Alexander. I have created ticket CLJ-1277 with a patch that improves the performance of the case you found, as well as for java.sql.Timestamp printing that also had reflection in it nearly identical to what you found. http://dev.clojure.org/jira/browse/CLJ-1277 Feel free

Re: Regarding http://clojuredocs.org

2013-10-09 Thread Mark Engelberg
Sometimes, it's also useful to be able to take things out. I keep seeing people get confused by clojuredocs references to contrib libraries that have completely different names now. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Regarding http://clojuredocs.org

2013-10-09 Thread Andy Fingerhut
For all but the few functions and macros added to Clojure since 1.3, ClojureDocs can be as actively maintained as people choose to update it. I add new facts that come to my attention there every so often, e.g.: http://clojuredocs.org/clojure_core/clojure.core/subs http://clojuredocs.org/

Question about vector-of

2013-10-09 Thread Mark Engelberg
(def a (conj (vector-of :long) 1 2 3) (inc (a 1)) Is Clojure smart enough to figure out that (a 1) is a primitive long and call the fast primitive version of inc? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Regarding http://clojuredocs.org

2013-10-09 Thread Bruce Wang
On Thu, Oct 10, 2013 at 1:44 PM, Mark Engelberg wrote: > On Tue, Oct 8, 2013 at 9:55 PM, Bruce Wang wrote: > >> The official docs is at http://clojure.org/documentation, >> http://clojure.github.io/clojure/ >> >> >> > Sure, but the nice thing about clojuredocs is that it includes examples > for m

Re: Regarding http://clojuredocs.org

2013-10-09 Thread Mark Engelberg
On Tue, Oct 8, 2013 at 9:55 PM, Bruce Wang wrote: > The official docs is at http://clojure.org/documentation, > http://clojure.github.io/clojure/ > > > Sure, but the nice thing about clojuredocs is that it includes examples for most of the functions and for a while, it was updated more frequently

Re: GSoC Report: CinC, port of the clojure compiler in clojure

2013-10-09 Thread Mikera
Good point Timothy - 100% agreed on the value of hard facts / benchmarks. Though I think it's still useful to have some discussions first, in order to determine where to start / what to benchmark / where the problems are likely to be hiding. Good research should start with an understanding of t

Re: [ANN] Public Early Access Program for Cursive, the IntelliJ-based Clojure IDE

2013-10-09 Thread Colin Fleming
Yeah, that's on my list to do very shortly - it'll make starting debug REPLs much easier, too, as well as allowing saved configurations for various remote servers. Cheers, Colin On 9 October 2013 19:13, wrote: > Oh thanx, didn't see it up there. I guess there are million things you > have in m

Re: GSoC Report: CinC, port of the clojure compiler in clojure

2013-10-09 Thread Mikera
On Wednesday, 9 October 2013 20:29:46 UTC+8, Mikhail Kryshen wrote: > Nicola Mometto > writes: > > > I don't think that's what Mike was talking about. > > Say we have (defn x ^long [] 1), clojure will use the IFn$L and emit an > > "public long invokePrim()" method. > > > > When we do (defn y

Re: How to type hint a String array?

2013-10-09 Thread Qiu Xiafei
Thanks, Jim. On Wed, Oct 9, 2013 at 9:27 PM, Jim - FooBar(); wrote: > On 09/10/13 14:12, Jim - FooBar(); wrote: > >> ps: also, non-primitive arrays are hinted like this if I'm not mistaken: >> #^"[Ljava.lang.String;" >> > > actually you can use both #^ & ^ in regular 'defn' > > Jim > > > > > > >

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Denis Labaye
Show interactive programing with the REPL. For example implementing a data transformation function incrementally in the REPL. By starting with an example of input. And successively bringing it closer to the final output. (Threading macros work great for that). I showed it to a few java developer

Re: [ANN] Show the latest version of the library on your Github README page

2013-10-09 Thread Alexander Yakushev
The inability to select the text in SVG comes from tag limitations. The following two ways of embedding SVG image into the webpage allows selecting text in both Webkit browsers and Firefox (in the latter via double-clicking and then right-click->Copy): https://clojars.org/leiningen/latest-vers

Re: [ANN] Show the latest version of the library on your Github README page

2013-10-09 Thread Christopher Allen
Thank you for this! What could be done to make the text highlightable/copyable? On Tuesday, October 8, 2013 6:25:07 AM UTC-7, Alexander Yakushev wrote: > > Have you ever felt annoyed to update the README after you released a new > version of your project? Have your users ever struggled to make t

Re: boolean java interopt puzzle/bug?!

2013-10-09 Thread Pablo Nussembaum
Thanks for the help and clarifications. My problem is that I'm working on a tool, as a part of my thesis, to randomly execute annotated java classes to try discover its behavior. So if a class has a (b|B)oolean field and I read its value using reflection it returns (

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Sean Corfield
Another very useful "getting started" plugin is lein-try: https://github.com/rkneufeld/lein-try Then you can do stuff like: lein try [quil "1.6.0"] ;; taken from the quil getting started wiki: (use 'quil.core) (sketch :setup (fn [] (background 20) (ellipse 50 50 80 80)) :title "The moon del

Re: ▶ Datomic: up and running - YouTube

2013-10-09 Thread Jernau
Thanks for the nice complement mimmo! When I created the screencast I announced it in the Datomic group, but I didn't think to do it here too. Though because I introduce the database via a TDD Clojure project, hopefully it's relevant (and useful) for folks here as well. Cheers, James On Wedn

Re: Type annonations in clojure.instant/print-date result in speedup of 3

2013-10-09 Thread Alexander Kiel
Hi Andy, http://dev.clojure.org/jira/browse/CLJ-1080 has not the same type hints as I propose. You can see my patch here: https://github.com/alexanderkiel/clojure/compare/instant-type-hints I have an additional type hint at thread-local-utc-date-format and I use java.text.DateFormat instea

Go block and call back functions

2013-10-09 Thread Gary Zhao
Hello I'm wondering where the call back function will run in a go block. For example, if I use http-kit asynchronous mode, I will register a call back function. If I call http/get within a goroutine, will the callback run in the same goroutine or an arbitrary thread? Also, since goroutine can'

London Clojure opportunities

2013-10-09 Thread David Shroder
I hold my hands up immediately and make it clear I am a recruiter! Please before you automatically assume I am a typical recruiter and block me from any correspondence ever take a look at my linkedin profile! I am engaged on a search for Clojure and Clojurescript developers for central London

Re: Type annonations in clojure.instant/print-date result in speedup of 3

2013-10-09 Thread Andy Fingerhut
Could you take a look at the patch on ticket CLJ-1080 and see if it contains all of the improvements you mention? Let me know if it doesn't, and we can look at combining your improvements into that patch. http://dev.clojure.org/jira/browse/CLJ-1080 Andy On Wed, Oct 9, 2013 at 8:57 AM, Alex

Type annonations in clojure.instant/print-date result in speedup of 3

2013-10-09 Thread Alexander Kiel
Hi, I have a web service returning edn representations containing many java.util.Date values. Using a profiler, one Hot Spot is inside the clojure.instant/print-date function. The relevant reflections warnings are: Reflection warning, instant.clj

Re: [ANN] Grenchman, for running Clojure code quickly

2013-10-09 Thread John D. Hume
On Wed, Oct 9, 2013 at 2:32 AM, Zack Maril wrote: > How does this vary from flatland/drip? > -Zack > Grenchman connects to a JVM-with-nrepl you previously launched. Repeated invocations from the command line will hit that same JVM, potentially building up state over time, and Grenchman knows not

Re: GSoC Report: CinC, port of the clojure compiler in clojure

2013-10-09 Thread Timothy Baldridge
One of the problems with these sort of discussions is the total lack of hard facts. Words such as "could do this" or "doesn't do that" when referring to HotSpot are very rarely backed up by actual benchmarks, or ASM printouts. I would imagine that any serious attempt at an optimization layer will b

Re: How to type hint a String array?

2013-10-09 Thread Jim - FooBar();
On 09/10/13 14:12, Jim - FooBar(); wrote: ps: also, non-primitive arrays are hinted like this if I'm not mistaken: #^"[Ljava.lang.String;" actually you can use both #^ & ^ in regular 'defn' Jim -- -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Softaddicts
I hate "quirks", too many things to achieve, less time remaining, less brain estate to remember quirks :) Luc P. > Oh! > > I don't hate JavaScript ;-) > > I'm not a Clojure programmer, (and not a ClojureScript programmer). But I > usually program in C#, Java, PHP and JavaScript. I know Lisp, R

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Angel Java Lopez
Oh! I don't hate JavaScript ;-) I'm not a Clojure programmer, (and not a ClojureScript programmer). But I usually program in C#, Java, PHP and JavaScript. I know Lisp, Ruby and Python, but I don't "work" with them, only toy projects. I found JavaScript the most flexible programming language (les

Re: How to type hint a String array?

2013-10-09 Thread Jim - FooBar();
From the 1.3 docs: ;; Currently Clojure does not permit type hints of arrays, e.g. ^ints as ;; argument types or return types in a definterface. This may be enhanced ;; later. Jim ps: also, non-primitive arrays are hinted like this if I'm not mistaken: #^"[Ljava.lang.String;" On 09/10/13

How to type hint a String array?

2013-10-09 Thread Qiu Xiafei
Clojure provide built-in type hint for primitive types such as: ^ints, ^doubles, but how to type hint an array of arbitrary Class? The following way dosn't work, too: user=> (definterface MyInterface #_=> (^"[Ljava.lang.String" method1 [])) user.MyInterface user=> (.method1 (reify MyInterfa

Re: GSoC Report: CinC, port of the clojure compiler in clojure

2013-10-09 Thread Mikhail Kryshen
Nicola Mometto writes: > I don't think that's what Mike was talking about. > Say we have (defn x ^long [] 1), clojure will use the IFn$L and emit an > "public long invokePrim()" method. > > When we do (defn y [] (let [a (x)] a) the compiler will call .invokePrim > instead of invoke. > > If we red

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Softaddicts
Yeah but I hate JavaScript so no wonder it's not on the list. I do however code in ClojureScript and avoid JS interop like the plague as much as possible :) I had to deal too much with browser based GUIs before things like JQuery and similar things came to life or because the back end framework d

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Softaddicts
That's what I said earlier, I need to find some type to dive into it. As far as Scala is concerned, it's not on my list of items to learn. Too Java-ish to me and clunky. It's not because you mix all the latest features in a single language that the result is a significant landmark. It took a sign

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread bernardH
Thanks for all the feedback. I had already made sure that LightTable is already installed, and the plug-in for eclipse (that they already use). But I don't expect too much trouble on this front as they are already somewhat proficient (with even some converts to the church of Emacs ☺). Cheers,

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Phillip Lord
Laurent PETIT writes: > 2013/10/9 Phillip Lord >> A persistant REPL would be nice (although, of course, as most evaluative >> programmers restart periodically to avoid a balked environment, it might >> introduce problems as well). >> >> A nice simple environment is key, but with a good path to mo

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Angel Java Lopez
And JavaScript is missing (OK, "a dozen scripting language") But today, JavaScript is very important in the picture. Even Clojure has ClojureScript On Wed, Oct 9, 2013 at 8:36 AM, Dennis Haupt wrote: > especially haskell & scala are missing in your list :) > as long as you haven't at least seen

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Dennis Haupt
especially haskell & scala are missing in your list :) as long as you haven't at least seen haskell, you haven't seen the creme de la creme of statically typed languages 2013/10/9 Softaddicts > Let's see: > > strong data typing: > > Fortran > Cobol > Pl/1 > Pascal > C/C++ > Java > C# > Ruby > >

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Softaddicts
Let's see: strong data typing: Fortran Cobol Pl/1 Pascal C/C++ Java C# Ruby à la carte data typing or no data typing at all: Basic (more or less depending on the implementation) Lisp Clojure A dozen assemblers A dozen scripting languages And I probably forgot some while excluding the ones I wo

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Phillip Lord
John Gabriele writes: > Thanks Phil! Didn't know you could do that! Wrote up some notes on getting > it working: > That's useful! Phil -- -- You received this message because you are subscribed to the Google Groups "Clo

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Dennis Haupt
let's see... really used: sql java javascript basic pascal/delphi scala experimented with: logo (some old language intended to teach people to make their first steps) haskell kotlin clojure seen in action: php groovy still prefer smart static typing :D 2013/10/9 Nando Breiter > >> The best

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Nando Breiter
> > > The best explanation of these misunderstandings I've come across is "What > to Know Before Debating Type Systems": > > http://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/ > > I have learned quite a lot from reading this article and following this discussion, particularly that "typ

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Laurent PETIT
2013/10/9 Phillip Lord > > > Nando Breiter writes: > > To me, this begins to look more like a "user interface" issue than > strictly > > a programming issue. The folks who do interface design have a technique - > > "pretend it's magic". What would the solution look like if it was > "magic" ( > >

Re: Teaching Clojure to students (how ?)

2013-10-09 Thread Phillip Lord
Nando Breiter writes: > To me, this begins to look more like a "user interface" issue than strictly > a programming issue. The folks who do interface design have a technique - > "pretend it's magic". What would the solution look like if it was "magic" ( > setting all programming considerations a

Re: Regarding http://clojuredocs.org

2013-10-09 Thread Marek Kubica
On Tue, 8 Oct 2013 21:55:08 -0700 Andy Fingerhut wrote: > Those who created ClojureDocs.org made some progress towards > rewriting the server side code in Clojure (it was originally > developed in Ruby on Rails, IIRC), but have found it challenging to > find enough time to finish that work. I re

Fwd: ▶ Datomic: up and running - YouTube

2013-10-09 Thread Mimmo Cosenza
Another very nice and useful screencast by James Trunk. Everything become easy to understand when he explains it. mimmo https://www.youtube.com/watch?v=ao7xEwCjrWQ -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: [ANN] Grenchman, for running Clojure code quickly

2013-10-09 Thread Zack Maril
How does this vary from flatland/drip? -Zack On Tuesday, October 8, 2013 9:49:16 PM UTC-5, Phil Hagelberg wrote: > > When we've polled Leiningen users in the past[1], the #1 pain point > people always report is its startup time. While there have been a number > of strategies suggested to reduce