Re: data structure creation time in cljs

2013-11-06 Thread David Nolen
`vector` is now inlined in master, should be >10X faster for (vector 1)

David


On Tue, Nov 5, 2013 at 10:38 PM, kovas boguta wrote:

> I'm trying to optimize zippers for clojurescript. My benchmark is
> implementing the combinator systems from
>
> https://www.wolframscience.com/nksonline/page-102
>
> which heavily stress both navigating and modifying the tree.
>
> A major hotspot seems to be data structure creation time, which can be
> between 10 and 200x slower than jvm. I'm using Chrome 30.0.1599.101 .
>
> Vectors:
> (time (dotimes [x 100]  ( vector x)))
> cljs: 2175 msecs
> clj: 11.414 msecs
>
> strangely, apply is faster for cljs :
> (time (dotimes [x 100]  (apply vector [x])))
> cljs: 1175 msecs
> clj: 64.919 msecs
>
> into gives about the same result for cljs.
>
> Creating a datastructure literal (eg [x]) is about 5x slower in cljs
> over clj, which I would take, however in the zipper case the number of
> children can vary dynamically.
>
> Lists:
> (apply list [x]) is about 2x faster than the vector case in cljs, and
> within about 5x of the jvm speed. Unless there is a better idea, I may
> try a specialized list-oriented zipper and see how it performs.
>
> Records:
> Creation is about ~10x slower than in clj. What's weird is that
> creating hashmaps is actually marginally faster than creating records
> (however, records still have much faster field access, so I'm using a
> record-based zipper implementation)
>
> (defrecord Test [a])
> (time (dotimes [x 100] (Test. x)))
> cljs: 60 msecs
> clj: 7.00 msecs
>
> Is there a trick to speed up vector and/or record creation? Should I
> look into a custom datastructure?
>
> Any ideas welcome.
>
> Thanks!
>
> --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.


Re: [ANN] Jig

2013-11-06 Thread julius
Another question, using jig,  the connection/db/cache/storage will be 
everywhere in our code as a parameter of functions, is it flexible? 
,currently I prefer to managing those side effect at one place but will not 
spread out to our other core functions.

Thanks

On Saturday, October 12, 2013 12:23:41 AM UTC+8, Malcolm Sparks wrote:
>
> A few months ago, Stuart Sierra blogged about the workflow he follows for 
> building Clojure applications.
>
> "One of the great pleasures of working with a dynamic language is being 
> able to build a system while simultaneously interacting with it. "
> -- http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded
>
> Since then I've been using this workflow for my own projects, and found it 
> to be amazingly effective. 
>
> I've added some extra features, and the result is Jig, which builds on 
> Stuart's work in the following ways :-
>
>- Multiple components can each contribute to the 'system' map
>- Components are started in dependency order
>- Components are specified and configured in a config (edn) file
>- Jig can host 'plain old' Leiningen projects - Jig will even 'reload' 
>them too e.g. if their project.clj dependencies change.
>- Jig can host multiple projects simultaneously
>
> There's a small but growing list of optional re-usable components that 
> provide extra functionality :-
>
>- Pedestal services support. Jig provides the system map and 'url-for' 
>function in the service context.
>- Nginx cache purging on reload
>- Git pull prior reload
>- Reload via JMX
>- nREPL
>- Stencil cache purging
>- Firefox remote control support for 'browser refresh on reload'
>
> I know others are working on similar designs. I'd be interested to hear 
> what people think and whether this is useful.
>
> Thanks,
>
> Malcolm
>
> PS: Jig can be found here: https://github.com/juxt/jig
>
>
>
>

-- 
-- 
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/groups/opt_out.


Re: [ANN] Jig

2013-11-06 Thread julius
+1

On Friday, October 18, 2013 7:30:20 AM UTC+8, zcaudate wrote:
>
> Would it be possible to put up a video of a typical workflow example with 
> pedestal. It's quite difficult for me to piece everything together just by 
> reading the documentation.
>
> Chris
>

-- 
-- 
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/groups/opt_out.


What are effective ways to debug Clojure code?

2013-11-06 Thread Jeffrey Charles
I'm interested in hearing how people who use Clojure in production are 
debugging their code, particularly those who use Emacs.

I am having issues quickly locating problems in my Clojure code that are 
identified by automated integration test failures. As an example, I had a 
Midje test that would make an HTTP call into my application running 
Compojure and Liberator on Ring on Jetty and I'd get an error back in a 
stacktrace in my shell running the Ring process. I got to a somewhat useful 
error of not being able to find a terminator for a JSON object which I 
correctly divined was actually that the request body was empty. My usual 
approach to debugging these sorts of problems in C# and Visual Studio is to 
set the built-in debugger to break on CLR exceptions and then run the 
integration test with my debugger attached to the web server process and 
take a look at the exception and local variables starting at the bottom of 
the stack and going up the stack until I spot something funky. I'm 
completely lost in figuring out how to do something similar in Clojure and 
Emacs or a shell, that is to say, running something that will pause 
execution and let me examine the exception and in-scope variables on a 
stack frame by stack frame basis with source code context (bonus points if 
it's a REPL).

One thing I've taken a look at is ritz and ritz-nrepl but I seem to get 
errors when I try to use them. Specifically, "Symbol's value as variable is 
void: nrepl-mode-map" which seems to be an already reported issue. As well, 
the Github repositories don't appear to have been updated in several months 
which makes me pessimistic that these libraries will be meaningfully 
maintained and as a result, I feel uncomfortable relying on them.

Another thing I looked at was George Jahad's Clojure Debug Toolkit which 
also doesn't seem to have gotten any love in the last few years and has 
pretty minimal public documentation around using it..

While playing around with functions in the REPL usually does the job, 
sometimes the bugs and their locations are not obvious or they're at 
integration points where the input is a complicated object. I'd like to 
know what other developers who use Clojure do when they need to debug 
something and a REPL in a namespace with minimal execution context doesn't 
seem to do the trick.

-- 
-- 
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/groups/opt_out.


Re: Testing with Angular.js, Clojurescript and Purnam - Code and Part 1

2013-11-06 Thread zcaudate
I've since realised the other reason why I like posting on the clojure 
group
>
>  
- The clojurescript group for whatever reason does not take html format... 
it makes the post look super ugly.

-- 
-- 
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/groups/opt_out.


[ANN] purnam 0.1.8 - native javascript essentials for clojurescript (documentation out!!!)

2013-11-06 Thread zcaudate
I'm really happy that I have finish documenting my new-ish clojurescript 
library.

You can find it here: 

http://docs.caudate.me/purnam/

-

purnam

is a *clojurescript* library designed to provide better 
clojurescript/javascript interop, testing and documentation tools to the 
programmer. It also has very comprehensive modules for 
angular.js
 applications.

Current projects requiring interface with external javascript libraries 
will greatly benefit from this library. 'Pure' clojure/clojurescript 
libraries will also benefit with its unit-testing and documentation 
workflows. The library was written to solve a number of pain points that I 
have experienced in clojurescript development:
Better JS Interop

The first pain point was having to deal with the clojurish (.dot syntax) for 
javascript interop as well as a lack of functionality when working with 
native js objects. This made it especially hard for working with any 
external js library. Purnam offers:

   - purnam.cljs  - functions 
   for native objects and arrays
   - purnam.js  - a set of macros 
   allowing javascript-like syntax for better interop
   - purnam.types  - clojure 
   protocols for native objects and arrays

In-Browser Testing

The second pain point was the lack of testing tools that worked within the 
browser. Even though testing withphantom.js  was 
fine for non-browser code, I wanted something with more debugging power and 
so unit testing is integrated with the karma 
test 
runner using two different test styles:

   - purnam.test  - testing 
   using jasmine  syntax
   - purnam.test.sweet  - 
   testing using midje  syntax (compatible 
   with midje-doc )

Angularjs on Clojurescript

The third pain point was the code bloat I was experiencing when developing 
and testing *angular.js* code using javascript. It was very easy to 
complect modules within large *angular.js*applications and I wanted to use 
clojure syntax so that my code was smaller, more readable and easier to 
handle. Purnam offers:

   - purnam.angular  - a 
   simple dsl for eliminating boilerplate*angular.js*
   - purnam.test.angular - 
   testing macros for eliminating more boilerplate test code for services, 
   controllers, directives and filters

Integrated Documentation

The fourth pain point was the lack of documentation tools for clojurescript 
as well as clojure. purnam is compatible 
withmidje-doc so 
that the integrated testing and 
documentationworkflow 
can 
be also used in clojurescript.

-- 
-- 
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/groups/opt_out.


Re: [ANN] Jig

2013-11-06 Thread Malcolm Sparks
Hi Tim,

It's interesting you're thinking about browser-connected repls. Today I 
added clojurescript support to Jig, it's pushed to master but I haven't 
documented the config options yet, but below is an example. Nothing fancy 
like crossovers yet, it's basically a thin wrapper over ClojureScript's 
compiler, the config options map directly to the options given to the 
compiler.

  :cljs-builder
  {:jig/component jig.cljs/Builder
   :jig/project "../my-proj/project.clj"
   :source-path "../my-proj/src-cljs"
   :output-dir "../my-proj/target/js"
   :output-to "../my-proj/target/js/main.js"
   :source-map "../my-proj/target/js/main.js.map"
   :optimizations :simple
   :pretty-print true
;;   :clean-build true
   }

Another built-in component can figure out, given the dependencies, what 
files to serve and on which server to serve it from.

  :cljs-server
  {:jig/component jig.cljs/FileServer
   :jig/dependencies [:cljs-builder :web]
   :jig.web/context "/js"
   }

which depends on some Ring or Pedestal routing and Jetty or other 
webserver, but you're likely to have that configured already :-

  :server
  {:jig/component jig.web.server/Component
   :io.pedestal.service.http/port 8000
   :io.pedestal.service.http/type :jetty
   }

  :web
  {:jig/component jig.web.app/Component
   :jig/dependencies [:server]
   :jig/scheme :http
   :jig/hostname "localhost"
   :jig.web/server :server
   }

That's it really. I think Jig makes an ideal platform for building and 
serving clojurescript, in comparison to Leiningen plugins. Firstly, there's 
no JVM start-up cost, the point of Jig is to keep the JVM running all the 
time, so there's no need for the once/auto service that lein-cljsbuild 
offers. Secondly, serving the resulting Javascript files is straight 
forward, and built in, so no 'lein ring server' requirement either.. With 
Leiningen, you either have to build routes to the javascript into your own 
app, or run lein ring server, but then Leiningen doesn't make it easy to 
run multiple services concurrently. Thirdly, there's no file-system 
polling, and services that depend on the clojurescript compilation can be 
started as soon as the compilation is complete.

One thing that lein-cljsbuild does really well is multiple build configs. 
I've decided to use a single build configuration, to keep implementation 
easier and a direct mapping to the clojurescript compiler, but of course 
you can add different builds by just adding (differently configured) 
components to the Jig config. This would benefit from being able to 
initialize and start components in parallel, where possible. Unlike 
cljsbuild, Jig components are started serially, in reverse dependency 
order. Does anyone know of existing algorithms that can walk a dependency 
tree in parallel?

Feel free to take Jig in different directions though, I'm just letting you 
know my current thoughts. The single REPL to multiple projects idea might 
have to be rethought - it seems the prevailing wind is in the direction of 
multiple REPL connections per editor/IDE.

On Thursday, 7 November 2013 01:09:53 UTC, frye wrote:
>
> Too right. 
>
> Yes, wrt the multi-project / classpath thing, running isolated test for a 
> particular project is only one aspect. I also have an eye to running a i) 
> browser-connected repl and ii) debugger for a particular project. So those 
> things, along with iii) running tests, make very high, the attractiveness 
> of having that isolation. 
>
> I'll try to put those in github issues. And also pick at the problem 
> myself when I get some cycles. I think it would add a powerful feature to 
> the tool. Anyways... :) 
>
>
> Tim Washington 
> Interruptsoftware.ca  / 
> Bkeeping.com
>  
>
>
> On Tue, Nov 5, 2013 at 4:33 AM, Malcolm Sparks 
> > wrote:
>
>> Hi Tim,
>>
>> The tests in JUXT accounting are using clojure.core.test. I'm fairly sure 
>> Midje's :autotest feature does something dynamic to determine the tests to 
>> run and that may not work with Jig's classloading approach. For example, if 
>> something uses (System/getProperty "java.class.path") it will just get the 
>> Jig source directories because, for external projects, Jig must load these 
>> using a child class-loader. I need to spend some time with Midje to work 
>> out what it's doing.
>>
>> Having multiple lein projects loaded in the same JVM, and integrated with 
>> each other, is not a common Clojure mode of usage today. However, the 
>> Immutant team (and others) have done a lot of the groundwork and I think 
>> the various caveats I've listed on Jig's README.md about 'external 
>> projects' are going to be ironed out over time as these issues become 
>> better understood. I expect that Brian never saw this as a use-case.
>>
>> In the absence of a mailing list right now, please log any issues you see 
>> as GitHub issues and I'll do my best to fix them.
>>
>> Thanks again for sending in this really useful feedback.
>>
>> 

Re: [ANN] Jig

2013-11-06 Thread Timothy Washington
Too right.

Yes, wrt the multi-project / classpath thing, running isolated test for a
particular project is only one aspect. I also have an eye to running a i)
browser-connected repl and ii) debugger for a particular project. So those
things, along with iii) running tests, make very high, the attractiveness
of having that isolation.

I'll try to put those in github issues. And also pick at the problem myself
when I get some cycles. I think it would add a powerful feature to the
tool. Anyways... :)


Tim Washington
Interruptsoftware.ca  /
Bkeeping.com



On Tue, Nov 5, 2013 at 4:33 AM, Malcolm Sparks  wrote:

> Hi Tim,
>
> The tests in JUXT accounting are using clojure.core.test. I'm fairly sure
> Midje's :autotest feature does something dynamic to determine the tests to
> run and that may not work with Jig's classloading approach. For example, if
> something uses (System/getProperty "java.class.path") it will just get the
> Jig source directories because, for external projects, Jig must load these
> using a child class-loader. I need to spend some time with Midje to work
> out what it's doing.
>
> Having multiple lein projects loaded in the same JVM, and integrated with
> each other, is not a common Clojure mode of usage today. However, the
> Immutant team (and others) have done a lot of the groundwork and I think
> the various caveats I've listed on Jig's README.md about 'external
> projects' are going to be ironed out over time as these issues become
> better understood. I expect that Brian never saw this as a use-case.
>
> In the absence of a mailing list right now, please log any issues you see
> as GitHub issues and I'll do my best to fix them.
>
> Thanks again for sending in this really useful feedback.
>
> Regards,
>
> Malcolm
>
>
>
>
> On Monday, 4 November 2013 02:53:47 UTC, frye wrote:
>
>> Ok, some more feedback for Jig.
>>
>> *A)* Testing - Let's say I have a multi-project jig, with dependencies
>> across projects. There doesn't seem to be a way to run tests (midje
>> :autotest) for a specific project. I tried creating a Midje component (see
>> https://www.refheap.com/20442). But when I *i)* put this into
>> config.edn, and *ii)* thread through my local project component, *iii)*this 
>> only prints out the classpath directories under the
>> *jig* project. I'll want to be in the Classpath context of the project
>> that's being passed in. That way, I can :autotest for that project. Or
>> perhaps there's another way to run and autorun tests for a particular
>> project. I noticed that 
>> Juxt-Accountinghas a test suite.
>>
>> *B)* Ok, so there's just that and removing the *config/console.edn* and
>> *config/default.edn* files when writing your jig.
>>
>> *C)* And a raw *git clone g...@github.com:juxt/jig.git*, then *lein repl*,
>> then * (go)*, doesn't give working URLs ( http://<>:8091/readme , 
>> http://<>:8001/server,
>> etc )
>>
>>
>> Let me know if you want me to log these as bugs, feature requests, etc.
>> Very excited about the kind of leverage that this project can yield.
>>
>>
>> Loving this tool. Thanks.
>>
>> Tim Washington
>> Interruptsoftware.ca  / 
>> Bkeeping.com
>>
>>
>>
>> On Sat, Nov 2, 2013 at 8:18 PM, Timothy Washington wrote:
>>
>>> Ok, I actually got the compojure example working. I just had to remove
>>> the *config/console.edn* and *config/default.edn* files in my jig. They
>>> must be disrupting the config that I put in. So that's my only feedback so
>>> far.
>>>
>>> Ok, this is looking really good. Great work :)
>>>
>>> Tim Washington
>>> Interruptsoftware.ca  / 
>>> Bkeeping.com
>>>
>>>
>>>
>>>
>>>  --
> --
> 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/groups/opt_out.
>

-- 
-- 
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 subsc

Re: data structure creation time in cljs

2013-11-06 Thread David Nolen
Yes Closure is smart enough to remove code that doesn't do anything. Try
with :simple and :static-fns true

On Wednesday, November 6, 2013, kovas boguta wrote:

> On Wed, Nov 6, 2013 at 7:36 PM, kovas boguta 
> >
> wrote:
>
> > There also seems to be some issue with laziness, where some of my big
> > list operations are getting a 0 as well.
>
> Alright I managed to figure out my laziness issue, but the thing with
> records is still a head-scratcher...
>
> --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.


Re: data structure creation time in cljs

2013-11-06 Thread kovas boguta
On Wed, Nov 6, 2013 at 7:36 PM, kovas boguta  wrote:

> There also seems to be some issue with laziness, where some of my big
> list operations are getting a 0 as well.

Alright I managed to figure out my laziness issue, but the thing with
records is still a head-scratcher...

-- 
-- 
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/groups/opt_out.


Re: data structure creation time in cljs

2013-11-06 Thread kovas boguta
Some good news and some puzzling news.

With advanced mode, the various forms of non-literal vector creation
clock in around 400msec for 1 million ops on node, which is a 2-to-5x
improvement.

Now, the puzzling bit:

Using time, I get a big fat 0 for certain kinds of operations:

(time (dotimes [x 100] (Test. x))) --> big fat 0

Again this is on node, running the script from the command line.

There also seems to be some issue with laziness, where some of my big
list operations are getting a 0 as well.

Is advanced mode somehow optimizing these things away because they
don't get used elsewhere in the program?

Pretty confusing.






On Tue, Nov 5, 2013 at 11:21 PM, David Nolen  wrote:
> Yes no benchmarking with anything other than advanced please - lots of
> optimizations kick in only for :advanced, especially around various forms of
> function invocation, :simple + :static-fns true will also give reasonable
> results however it'll mess with REPL interactivity.
>
> David
>
>
> On Tue, Nov 5, 2013 at 11:13 PM, kovas boguta 
> wrote:
>>
>> On Tue, Nov 5, 2013 at 11:05 PM, David Nolen 
>> wrote:
>>
>> > Also what optimization settings are you using?
>>
>> I guess I should try something other than the browser repl. Will retry
>> with advanced optimizations.
>>
>> --
>> --
>> 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/groups/opt_out.
>
>
> --
> --
> 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/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: Crowdfunding for full-time core.typed development

2013-11-06 Thread Rich Morin
On Sep 27, 2013, at 09:51, Ambrose Bonnaire-Sergeant wrote:
> I have started a crowdfunding campaign to support full-time work
> on Typed Clojure.
> 
> Please share!
> 
> http://www.indiegogo.com/projects/typed-clojure

With only five (5) days left, the Typed Clojure campaign still needs
$47,400 to meet the "stretch goal" of supporting Ambrose for a full
year of development.  I think Ambrose is offering Typed Clojure fans
a real bargain here and we _definitely_ should take him up on it.

If you've been waiting for the right time to contribute, this is it!

-r

 -- 
http://www.cfcl.com/rdm   Rich Morin   r...@cfcl.com
http://www.cfcl.com/rdm/resumeSan Bruno, CA, USA   +1 650-873-7841

Software system design, development, and documentation


-- 
-- 
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/groups/opt_out.


Re: ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-06 Thread David Nolen
Oh, the speed of incremental compilation is now dependent on tools
preserving the complier environment information - Chas Emerick should be
cutting a release of lein-cljsbuild that does this when ClojureScript
0.0-2014 hits Maven Central.


On Wed, Nov 6, 2013 at 3:09 PM, David Nolen  wrote:

> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> New release version: 0.0-2014
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "0.0-2014"]
>
> There are a number of significant enhancements in this
> release. We finally have relative source maps! This should be big
> for people integrating ClojureScript with existing web
> based workflows.
>
> Under the hood Chas Emerick has improved how the analyzer works making
> it thread safe. This make the compiler considerably more robust and
> eliminates some race conditions in the browser REPL support.
>
> Incremental compilation is enhanced both with and without source
> maps. In particular we now tag ClojureScript compiled JavaScript files
> with the version of the compiler used - this should make transitioning
> to a new version of the compiler considerably less frustrating - stale
> files will get compiled.
>
> For those people using the compiler internals directly you will likely
> encounter breakage. If anyone feels inclined to outline a more stable
> interface to internals please get involved in leading an incremental
> process towards a stable and flexible API for tool builders.
>
> Enhancements:
> * relative source map paths, all original sources will be copied to
>   :ouput-dir this should make integrating with web workflow much simpler.
> * runtime obtainable compiler version number, *clojurescript-version* now
>   available at runtime as a string
>
> Bug fixes:
> * CLJS-643: make the ClojureScript compiler (more) idempotent
> * CLJS-662: CLJS files compiled from JARs get lost from source map
> * CLJS-661: (try ... (catch :default e ...) ...)
> * CLJS-627: Add warnings on function arity problems
> * CLJS-654: Quit repljs on ^D, don't loop on nil
> * CLJS-659: tag compiled files with compiler version
> * CLJS-642: deftype/record should not emit goog.provide
> * CLJS-648: persistent assoc/conj on a transient-created collision node
> * CLJS-631: Use ana/namespaces for shadowing vars
> * CLJS-641: js* overflow for large inputs
> * CLJS-645: parse-ns needs to include 'constants-table as a dep
> * CLJS-646: single segment namespaces and reify don't work
> * CLJS-521: pass along entire repl environment when loading dependencies
>
>

-- 
-- 
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/groups/opt_out.


ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-06 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code.

README and source code: https://github.com/clojure/clojurescript

New release version: 0.0-2014

Leiningen dependency information:

[org.clojure/clojurescript "0.0-2014"]

There are a number of significant enhancements in this
release. We finally have relative source maps! This should be big
for people integrating ClojureScript with existing web
based workflows.

Under the hood Chas Emerick has improved how the analyzer works making
it thread safe. This make the compiler considerably more robust and
eliminates some race conditions in the browser REPL support.

Incremental compilation is enhanced both with and without source
maps. In particular we now tag ClojureScript compiled JavaScript files
with the version of the compiler used - this should make transitioning
to a new version of the compiler considerably less frustrating - stale
files will get compiled.

For those people using the compiler internals directly you will likely
encounter breakage. If anyone feels inclined to outline a more stable
interface to internals please get involved in leading an incremental
process towards a stable and flexible API for tool builders.

Enhancements:
* relative source map paths, all original sources will be copied to
  :ouput-dir this should make integrating with web workflow much simpler.
* runtime obtainable compiler version number, *clojurescript-version* now
  available at runtime as a string

Bug fixes:
* CLJS-643: make the ClojureScript compiler (more) idempotent
* CLJS-662: CLJS files compiled from JARs get lost from source map
* CLJS-661: (try ... (catch :default e ...) ...)
* CLJS-627: Add warnings on function arity problems
* CLJS-654: Quit repljs on ^D, don't loop on nil
* CLJS-659: tag compiled files with compiler version
* CLJS-642: deftype/record should not emit goog.provide
* CLJS-648: persistent assoc/conj on a transient-created collision node
* CLJS-631: Use ana/namespaces for shadowing vars
* CLJS-641: js* overflow for large inputs
* CLJS-645: parse-ns needs to include 'constants-table as a dep
* CLJS-646: single segment namespaces and reify don't work
* CLJS-521: pass along entire repl environment when loading dependencies

-- 
-- 
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/groups/opt_out.


ANN Langohr 1.6.0 is released

2013-11-06 Thread Michael Klishin
Langohr is a small, feature complete Clojure client for RabbitMQ
that embraces AMQP 0-9-1 model [1].

1.6.0 is primarily a bug fix release.

Change log:
http://blog.clojurewerkz.org/blog/2013/11/05/langohr-1-dot-6-0-is-released/

1. http://clojurerabbitmq.info
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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/groups/opt_out.


Re: What font is used for Clojure on clojure.org?

2013-11-06 Thread Tim Visher
Thanks, Tom!

Here's what I did with it:
https://github.com/clojure-emacs/cider/issues/399#issuecomment-27878950


On Wed, Nov 6, 2013 at 11:56 AM, Tom Hickey  wrote:
> Hi Tim,
>
> That is Avenir 65 Medium.
>
> Cheers,
> Tom Hickey
>
>
> On Wednesday, November 6, 2013 11:06:24 AM UTC-5, Tim Visher wrote:
>>
>> I'm looking for it to incorporate it into a cIDEr logo I'm playing with.
>>
>> --
>>
>> In Christ,
>>
>> Timmy V.
>>
>> http://blog.twonegatives.com/
>> http://five.sentenc.es/ -- Spend less time on mail
>
> --
> --
> 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/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: What font is used for Clojure on clojure.org?

2013-11-06 Thread Tom Hickey
Hi Tim,

That is Avenir 65 Medium.

Cheers,
Tom Hickey

On Wednesday, November 6, 2013 11:06:24 AM UTC-5, Tim Visher wrote:
>
> I'm looking for it to incorporate it into a cIDEr logo I'm playing with. 
>
> -- 
>
> In Christ, 
>
> Timmy V. 
>
> http://blog.twonegatives.com/ 
> http://five.sentenc.es/ -- Spend less time on mail 
>

-- 
-- 
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/groups/opt_out.


Re: abysmal multicore performance, especially on AMD processors

2013-11-06 Thread Timothy Baldridge
You should also specify how many cores you plan on devoting to your
application. Notice that most of this discussion has been about JVM apps
running on machines with >32 cores. Systems like this aren't exactly common
in my line of work (where we tend to run greater numbers of smaller servers
using virtualization), but perhaps they are in yours.

Timothy Baldridge


On Wed, Nov 6, 2013 at 8:45 AM, Michael Klishin  wrote:

> 2013/11/6 Dave Tenny 
>
>> (To contrast the lengthy discussion and analysis of this topic that is
>> *hopefully* the exception and not the rule)
>
>
> Some of the comments reveal that part of the problem is in part with JVM
> memory allocator
> which has its throughput limits.
>
> There are known large commercial systems entirely in Clojure that
> demonstrate excellent latency
> (and, likely, throughput). I believe Factual, Runa/Stables Labs and
> Prismatic posted various numbers here but don't
> have the links handy.
>
> Feel free to start a separate thread to collect some feedback.
> --
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
> --
> --
> 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/groups/opt_out.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
-- 
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/groups/opt_out.


What font is used for Clojure on clojure.org?

2013-11-06 Thread Tim Visher
I'm looking for it to incorporate it into a cIDEr logo I'm playing with.

--

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail

-- 
-- 
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/groups/opt_out.


Re: abysmal multicore performance, especially on AMD processors

2013-11-06 Thread Michael Klishin
2013/11/6 Dave Tenny 

> (To contrast the lengthy discussion and analysis of this topic that is
> *hopefully* the exception and not the rule)


Some of the comments reveal that part of the problem is in part with JVM
memory allocator
which has its throughput limits.

There are known large commercial systems entirely in Clojure that
demonstrate excellent latency
(and, likely, throughput). I believe Factual, Runa/Stables Labs and
Prismatic posted various numbers here but don't
have the links handy.

Feel free to start a separate thread to collect some feedback.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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/groups/opt_out.


Re: abysmal multicore performance, especially on AMD processors

2013-11-06 Thread László Török
Hi,

I believe Clojure's original mission has been giving you tools for handling
concurrency[1] in your programs in a sane way.
However, with the advent of Reducers[2], the landscape is changing quite a
bit.
If you're interested in the concurrency vs. parallelism terminology and
what language constructs supporting them are available, [3] should give you
a very good overview.
I understand, I haven't actually answered you're question, but I wasn't
sure whether you're referring to concurrency or parallelism. :)

Las

[1] http://clojure.org/concurrent_programming
[2]
http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
[3]
http://clojure-doc.org/articles/language/concurrency_and_parallelism.html


2013/11/6 Dave Tenny 

> As a person who has recently been dabbling with clojure for evaluation
> purposes I wondered if anybody wanted to post some links about parallel
> clojure apps that have been clear and easy parallelism wins for the types
> of applications that clojure was designed for.  (To contrast the lengthy
> discussion and analysis of this topic that is *hopefully* the exception and
> not the rule).
>
> Any good links here?  Any high profile stuff?
>
>
>
>  --
> --
> 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/groups/opt_out.
>



-- 
László Török

-- 
-- 
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/groups/opt_out.


Re: abysmal multicore performance, especially on AMD processors

2013-11-06 Thread Dave Tenny
As a person who has recently been dabbling with clojure for evaluation 
purposes I wondered if anybody wanted to post some links about parallel 
clojure apps that have been clear and easy parallelism wins for the types 
of applications that clojure was designed for.  (To contrast the lengthy 
discussion and analysis of this topic that is *hopefully* the exception and 
not the rule).

Any good links here?  Any high profile stuff?



-- 
-- 
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/groups/opt_out.


grojure 0.10.0

2013-11-06 Thread Gavin Grover
A new version of Grojure is available:

https://github.com/gavingroovygrover/grojure

It's alpha because the grammar is still changing between versions. You will
probably find grojure useful in 2 ways:

* as an example of using the Kern combinator parsing library (by Armando
Blancas) for a more complex grammar

* ideas for syntax to put into your own Clojure-hosted language. Everything
specified here is implemented:

https://github.com/gavingroovygrover/grojure/blob/master/GRAMMAR.md

Gavin "Groovy" Grover

-- 
-- 
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/groups/opt_out.


Re: Cursive IntelliJ working on multiple Leiningen projects & require - refer :as not working

2013-11-06 Thread Niels van Klaveren
Thanks for looking into this, highly appreciated.

On Wednesday, November 6, 2013 7:49:59 AM UTC+1, Colin Fleming wrote:
>
> Right, I had a chance to take a look at this - the classpath for the REPL 
> unfortunately doesn't include the source directories of dependent modules. 
> I'll fix that in the next build.
>
> There is a workaround. In Settings->Compiler->Clojure Compiler, enable 
> "Copy Clojure source files to output path". In Settings->Compiler, if you 
> have "Use external build" selected then change the resource pattern for 
> Clojure from !?*.clj to ?*.clj. Then you can build your dependent module 
> manually (for example, by right clicking on it in the project tree and 
> selecting Make Module ''. That will copy your Clojure files to 
> the output path and they'll be picked up by the REPL then.
>
>
>
> On 6 November 2013 10:50, Colin Fleming 
> > wrote:
>
>> Hmm, there may be some problem with the classpath there - I'll take a 
>> look.
>>
>>
>> On 5 November 2013 23:53, Niels van Klaveren 
>> 
>> > wrote:
>>
>>> The namepace resolution issue vanished after upgrading Cursive and 
>>> re-opening the project after deleting the IntelliJ artifacts in it.
>>> Checkouts namespacing is recognized as well, and checkouts src 
>>> directories are nicely marked as such.
>>>
>>> However, when loading the file in the REPL I get a "Could not locate 
>>> menthy/utils_java/jdbc__init.class or menthy/utils_java/jdbc.clj on 
>>> classpath" exception for calls to the checkout project(s).
>>>
>>>
>>> On Tuesday, November 5, 2013 7:51:00 AM UTC+1, Colin Fleming wrote:
>>>
 Hi Niels,

 I've just released Cursive 0.1.05 which fixes this issue. Documentation 
 for the Leiningen support is 
 here. 
 Basically you should be able to just import your project wholesale and it 
 will automatically work out all the dependencies. Checkout dependencies 
 are 
 also transparently supported for interop with other tools. 

 Let me know if it works for you, and I'd be interested to know more 
 about your namespace resolution problems too. Feel free to drop me a mail 
 at cur...@cursiveclojure.com if you'd rather send it off-list.

 Thanks,
 Colin


 On 2 November 2013 04:44, Niels van Klaveren wrote:

> The release notes mention that working on multiple Leiningen projects 
> has been improved, but how to get it working ?
> I wondered if there's a preferred way to work on multiple Leiningen 
> projects, so changes in one are reflected in the other.
>
> - Leiningen has the option to work with the checkouts directory 
> containing a simlink (linux) / junction link (windows) to the directories 
> in question
> - CounterClockWise has the option to add the other project to the 
> project build path
>
> I got things working by using the checkout directory / junction link 
> method, and in Cursive marking the checkout source directory as a Source 
> Root.
> Is this the intended way to do it, or is there another way ?
>
> Another thing I noticed is that require :as alias and require :refer 
> aren't picked up, and all aliased / referred function calls are marked as 
> "cannot resolved be resolved" warnings.
> Any way I can get rid of those ?
>
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@**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+u...@**googlegroups.com.
>
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>

  -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com 

Re: recommended: "Java: The Good Parts"

2013-11-06 Thread Cedric Greevey
With Clojure, you can mostly ignore Java's syntax until and unless you want
or need to write a Java class to call from Clojure for some reason.

But knowing some of the major parts of the standard Java class library
(particularly java.lang, java.math, java.util, java.util.concurrent, awt.*,
and javax.swing) is useful if you're doing much interop, and the Java
classes that are common Clojure literal datatypes have additional
operations available through interop (assorted String operations;
java.math.BigDecimal.scaleByPowerOfTen(exponent); etc.)

Knowing some things about the JVM will also come in handy.



On Tue, Nov 5, 2013 at 10:32 PM, JJ  wrote:

> For another option, the http://docs.oracle.com/javase/tutorial/ was good
> enough for me in getting familiar enough with Java for Clojure. (you don't
> need most of the stuff there and depending on your experience you can get
> through the important parts in a week).
>
> Of course, I come from C and Ruby so this recommendation may be biased, C
> syntax makes Java look familiar, and Ruby OOP is useful for Java.
>
>
> On Monday, November 4, 2013 11:03:55 PM UTC-5, Rich Morin wrote:
>
>> When I first started looking into Clojure, I was dismayed to find that
>> it is deeply entangled with Java (which I had successfully avoided for
>> some decades.  You mean I have to learn FP, Lisp, _and_ Java ?!?!?
>>
>> I got some Java books, looked them over, and decided to hope that I
>> could mostly ignore the Java-based parts of Clojure.  This was not a
>> great strategy, to be sure, but it was better than diving into piles
>> of Java books (and worse).
>>
>> However, I recently ran across a tiny (200 pp) conceptual guide to Java
>> that seems to have most of the needed information (and a healthy dose
>> of opinionated advice from a highly qualified source).  I particularly
>> like the fact that the author tries hard to explain the concepts as well
>> as the details.  So, check it out...
>>
>>   Java: The Good Parts
>>   http://www.amazon.com/dp/0596803737
>>   Jim Waldo, 2010; O'Reilly Media
>>
>> -r
>>
>>  --
>> http://www.cfcl.com/rdm   Rich Morin   r...@cfcl.com
>> http://www.cfcl.com/rdm/resumeSan Bruno, CA, USA   +1 650-873-7841
>>
>> Software system design, development, and documentation
>>
>>
>>  --
> --
> 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/groups/opt_out.
>

-- 
-- 
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/groups/opt_out.


Re: data structure creation time in cljs

2013-11-06 Thread Jozef Wagner
I've just updated benchmark dependencies to reflect latest changes in 
ClojureScript. Keywords are little slower than before but otherwise there 
are no big differences.

JW

On Wednesday, November 6, 2013 5:04:26 AM UTC+1, kovasb wrote:
>
> FYI, 
>
> http://wagjo.github.io/benchmark-cljs/ 
>
> has some interesting cljs perf comparisons for various datastructures, 
> for those who haven't seen it. 
>
>
>
> On Tue, Nov 5, 2013 at 10:38 PM, kovas boguta 
> > 
> wrote: 
> > I'm trying to optimize zippers for clojurescript. My benchmark is 
> > implementing the combinator systems from 
> > 
> > https://www.wolframscience.com/nksonline/page-102 
> > 
> > which heavily stress both navigating and modifying the tree. 
> > 
> > A major hotspot seems to be data structure creation time, which can be 
> > between 10 and 200x slower than jvm. I'm using Chrome 30.0.1599.101 . 
> > 
> > Vectors: 
> > (time (dotimes [x 100]  ( vector x))) 
> > cljs: 2175 msecs 
> > clj: 11.414 msecs 
> > 
> > strangely, apply is faster for cljs : 
> > (time (dotimes [x 100]  (apply vector [x]))) 
> > cljs: 1175 msecs 
> > clj: 64.919 msecs 
> > 
> > into gives about the same result for cljs. 
> > 
> > Creating a datastructure literal (eg [x]) is about 5x slower in cljs 
> > over clj, which I would take, however in the zipper case the number of 
> > children can vary dynamically. 
> > 
> > Lists: 
> > (apply list [x]) is about 2x faster than the vector case in cljs, and 
> > within about 5x of the jvm speed. Unless there is a better idea, I may 
> > try a specialized list-oriented zipper and see how it performs. 
> > 
> > Records: 
> > Creation is about ~10x slower than in clj. What's weird is that 
> > creating hashmaps is actually marginally faster than creating records 
> > (however, records still have much faster field access, so I'm using a 
> > record-based zipper implementation) 
> > 
> > (defrecord Test [a]) 
> > (time (dotimes [x 100] (Test. x))) 
> > cljs: 60 msecs 
> > clj: 7.00 msecs 
> > 
> > Is there a trick to speed up vector and/or record creation? Should I 
> > look into a custom datastructure? 
> > 
> > Any ideas welcome. 
> > 
> > Thanks! 
>

-- 
-- 
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/groups/opt_out.