Re: CPU & platform for best compilation performance

2017-08-24 Thread Daniel Compton
Ah right, I missed that 0.5.13 was released. I've opened
https://github.com/bhauman/lein-figwheel/issues/597 to discuss the caching
issue further.

On Fri, Aug 25, 2017 at 8:44 AM Maarten Truyens <
maarten.truy...@siteffects.be> wrote:

> Thanks for the response!
>
> Isn't that change already active in I noticed the change in 0.5.13? I
> actually tried that release, but it did not make a difference for me. I
> still need to have the DevTools visible, with "Disable cache" flagged in
> the Network Panel, to avoid situations where a modification that was
> correctly picked up by Figwheel, would suddenly get lost again when I
> perform a hard refresh of the page. (I never fully investigated this issue,
> because I assumed that it was perhaps linked to the fact that I have to
> disable the "reload-clj-files" for CLJC-files, to avoid that a single
> change in a CLJC would cause a full recompile of all CLJS files — which is
> unmanageable if half your codebase consists of CLJC files...).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CPU & platform for best compilation performance

2017-08-24 Thread Maarten Truyens
Thanks for the response! 

Isn't that change already active in I noticed the change in 0.5.13? I 
actually tried that release, but it did not make a difference for me. I 
still need to have the DevTools visible, with "Disable cache" flagged in 
the Network Panel, to avoid situations where a modification that was 
correctly picked up by Figwheel, would suddenly get lost again when I 
perform a hard refresh of the page. (I never fully investigated this issue, 
because I assumed that it was perhaps linked to the fact that I have to 
disable the "reload-clj-files" for CLJC-files, to avoid that a single 
change in a CLJC would cause a full recompile of all CLJS files — which is 
unmanageable if half your codebase consists of CLJC files...). 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CPU & platform for best compilation performance

2017-08-24 Thread Daniel Compton
Hi Maarten

Once https://github.com/bhauman/lein-figwheel/pull/586 is released, that
should improve your browser load time somewhat, as you won't need to do
empty your cache and do a hard reload.

On Thu, Aug 24, 2017 at 4:27 AM  wrote:

> Shot in the dark, but dependent namespace compilation may be the source of
> your CLJS compiler slowdowns if you have tons of namespaces. Try seeing
> what happens when you set :recompile-dependents to false in the CLJS
> compiler options.
>
>
> On Wednesday, August 23, 2017 at 11:54:44 AM UTC-4, Maarten Truyens wrote:
>>
>> Hi all,
>>
>> My codebase (mix of CLJ, CLJS and CLJS) is about fifty thousand lines of
>> code, and compilation times are starting to interfere with my workflow
>> happiness. In addition, Chrome Devtools is becoming somewhat sluggish due
>> to the high number of separate namespaces loaded through Figwheel.
>>
>> My current machine is a 6-core Mac Pro 3.5 Ghz Xeon ("late 2013"). For
>> quite a while I have been investigating whether a switch to another machine
>> and/or platform would be interesting from a workflow speed point of view.
>> However, aside from Timothy Pratley's article on the AMD Ryzen 1800x (
>> http://timothypratley.blogspot.in/2017/03/ryzen-is-for-programmers.html),
>> I have trouble finding information that is relevant for us Clojure
>> programmers.
>>
>> I would summarize my research as follows:
>> * single-core performance is most important, so that it is probably the
>> case that a 4-core CPU with a higher single-thread speed is preferable to
>> an 6/8/10-core CPU with a slower single-thread speed;
>> * as from 4 cores, there are hardly any speedups to be expected for
>> having more cores in CLJ or even (parallel) CLJS builds;
>> * the Ryzens are great value, but their single-core performance is
>> usually 10-20% below the top of the line Intels;
>> * according to the many Phoronix benchmarks, Linux and OSX have about the
>> same performance, although there are some interesting deviations for some
>> workflows (even up to 30 - 40%);
>> * the single-core performance difference between my current CPU and the
>> single-core top of the line (i7700K, i7-7800X or i7-7820X) seems to be
>> between 20-40%
>>
>> While a 50% performance increase would be enough to warrant the time
>> investment & cost of switching, my fear is that the real-world speed-up
>> will probably be more like a meager 20%.
>>
>> Ignoring cost considerations and performance outside CLJ development:
>> what CPU and platform would you recommend?
>>
>> Many thanks!
>>
>> Maarten
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure rookie vs parsing

2017-08-24 Thread sventrax001
Thanks so much for the useful and informative advice.
Again due to my rookie-ness I was struggling to adapt my old ANTLR grammar 
to instaparse (and did not come back to read new feedback bad me). While 
from the docs instaparse offers more flexibility than ANTLR, the cost is 
dealing with much lower level

Will give a try to Hiccup. The forest-examples.cljc file seems to be what I 
need.

On Wednesday, August 16, 2017 at 9:51:35 PM UTC+1, Alan Thompson wrote:
>
> While Instaparse is (IMHO) the best parser for use with Clojure, you don't 
> have to start from such a low level (i.e. parsing a char stream text 
> file).  Just re-write your original problem a little and you can skip 
> writing a custom parser.
>
> In Clojure, perhaps the most popular format (certainly the tersest format) is 
> Hiccup .  It is written as a 
> series of nested vectors, where the *tag* is the first item and any 
> *attributes* are in a map that is the 2nd item.  We choose the keyword 
> *:value* to label anything on the right of the equals sign in your 
> original data.  You thus end up with this:
>
>
>
> (def ast-hiccup
>   [:HeaderRule {:value :hr-ftp}
> [:Term {:value 100}
>   [:name {:value "ftp"}]
>   [:From {:value 1}
> [:networkPort {:value "21"}]
> [:Protocol {:value 1}
>   [:Tcp {:value 1}]]]
>   [:Then {:value 1}
> [:ProtocolInspection {:value 1}
>   [:ftpRuleSet {:value "frs-ftp"}]]
> [:ServiceDataFlowId {:value 1}
>   [:payload {:value 99}] )
>
> Using the tupelo.forest library 
> ,
>  
> we can easily parse this tree of data and then issue queries on it:
>
>
> (ns tst.demo.core
>   (:use demo.core tupelo.test)
>   (:require
> [tupelo.core :as t]
> [tupelo.forest :as tf] ))
> (t/refer-tupelo)
>
> (dotest
>   (tf/with-forest(tf/new-forest)
> (let [root-hid   (tf/add-tree-hiccup ast-hiccup)
>   tree-1 (tf/hid->tree root-hid)
>   bush-1 (tf/hid->bush root-hid)
>   >> (spyx-pretty bush-1)   ; print the AST in "bush" 
> format (similar to hiccup)
>
>   networkPort-hid (tf/find-hid root-hid [:** :From 
> :networkPort])   ; find the :networkPort node
>   networkPort-value   (spyx (grab :value (tf/hid->node 
> networkPort-hid)))   ; extract the :value from it
> ]
>   (is= bush-1
> [{:value :hr-ftp, :tag :HeaderRule}
>   [{:value 100, :tag :Term}
> [{:value "ftp", :tag :name}]
> [{:value 1, :tag :From}
>   [{:value "21", :tag :networkPort}]
>   [{:value 1, :tag :Protocol}
> [{:value 1, :tag :Tcp}]]]
> [{:value 1, :tag :Then}
>   [{:value 1, :tag :ProtocolInspection}
> [{:value "frs-ftp", :tag :ftpRuleSet}]]
>   [{:value 1, :tag :ServiceDataFlowId}
> [{:value 99, :tag :payload}] )
>
>   (is= networkPort-value "21" ;  verify we found the value 
> "21"
>
> For more examples please see the forest-examples.cljc file 
> 
>  
> and the API docs .  
> More documentation forthcoming.
>
> Enjoy!
> Alan
>
>
>
> On Tue, Aug 15, 2017 at 7:11 PM, dennis zhuang  > wrote:
>
>> In my experience, instaparse + defun is a good choice. 
>>
>> https://github.com/Engelberg/instaparse
>> https://github.com/killme2008/defun/
>>
>> 2017-08-15 22:02 GMT+08:00 Gary Trakhman > >:
>>
>>> I enjoyed working with clj-antlr recently, it's a wrapper over a java 
>>> library, but gives you a fast feedback loop with an interpreter instead of 
>>> generated java code.  The 'clojurey' part is that the output is a nested 
>>> sequence, from there it's really effective to use tree zippers and 
>>> core.match to transform the parse-tree into the data structure you need. 
>>>
>>> Take a look at:
>>> https://github.com/clojure/core.match
>>> https://github.com/aphyr/clj-antlr
>>> https://www.ibm.com/developerworks/library/j-treevisit/
>>> https://github.com/akhudek/zip-visit
>>>
>>> On Tue, Aug 15, 2017 at 9:56 AM Laurens Van Houtven <_...@lvh.cc> wrote:
>>>
 Hi,


 Instaparse is a great parser generator, especially if you already have 
 a BNF.

 Sent from my iPhone

 On Aug 15, 2017, at 08:44, svent...@gmail.com  wrote:

 Thanks for your input. LFE is quite an unexpected "thing".

 What I'm trying to do, is just a "lunch time project"; something that I 
 can target without corporate constrains just as a learning exercise. 
 Furthermore I 

[ANN] Clojure 1.9.0-alpha19

2017-08-24 Thread Alex Miller
Clojure 1.9.0-alpha19 is now available.

Try it via

- Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha19
- Leiningen: [org.clojure/clojure "1.9.0-alpha19"]

1.9.0-alpha19 includes one small internal change to make the default import 
set public in RT.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.