Re: [ClojureScript] Re: How does Clojurescript compilation scales with CPU?

2020-01-17 Thread Khalid Jebbari
the compilation times, even tiny namespaces can take a long time to compile > if some macro just takes a long time to do its thing. > > On Friday, January 17, 2020 at 11:18:21 AM UTC+1, Khalid Jebbari wrote: >> >> Thanks for the detailed answer. Does it somewhat mean that spli

Re: [ClojureScript] Re: How does Clojurescript compilation scales with CPU?

2020-01-17 Thread Khalid Jebbari
gt; If you really really want to torture your CPU you can try > https://github.com/mfikes/fifth-postulate or > https://github.com/mfikes/coal-mine to compare. > > HTH, > Thomas > > On Friday, January 17, 2020 at 5:29:06 AM UTC+1, Khalid Jebbari wrote: >> >> Hello, &g

[ClojureScript] How does Clojurescript compilation scales with CPU?

2020-01-16 Thread Khalid Jebbari
Hello, We're using the parallel build option, and I noticed the difference in speed between my laptop and other laptops is basically proportional to the difference in speed of the CPUs (based on notebookcheck's benchmarks). I have 4C/8T 7700HQ CPU and my colleagues have a 8565U iirc (some have

Re: [ClojureScript] Re: Question about code-splitting and loading of dependent modules.

2019-02-04 Thread Khalid Jebbari
ducible example and report it. > > > On Monday, February 4, 2019 at 12:01:23 PM UTC+1, Khalid Jebbari wrote: >> >> I realize it's much better if I give the complete configuration. >> >> latest ClojureScript stable 1.10.516 >> deps.edn alias: {:cljs {:main-opt

[ClojureScript] Re: Question about code-splitting and loading of dependent modules.

2019-02-04 Thread Khalid Jebbari
every file) but the runtime behavior is incorrect. My problem is that when I load :page3 with (loader/load :page3 my-callback), I see a requests to components1.js with response 200 OK, but no request to page3.js after, and my-callback is not executed. On Friday, February 1, 2019 at 1:01:33

Re: [ClojureScript] Re: Question about code-splitting and loading of dependent modules.

2019-02-02 Thread Khalid Jebbari
I did this already in all modules. I noticed I had to add to the :main namespace (loader/set-loaded! :cljs-base) On Sat, Feb 2, 2019, 10:49 AM Thomas Heller In standard CLJS you must add a manual call to let the runtime know that > your module finished loading. > > (cljs.loader/set-loaded! :a) >

Re: [ClojureScript] Re: Question about code-splitting and loading of dependent modules.

2019-02-01 Thread Khalid Jebbari
figure it. > > On Friday, February 1, 2019 at 1:11:20 PM UTC+1, Khalid Jebbari wrote: >> >> In case it wasn't clear, the javascript file for :cljs-base is included >> as a script tag in the html, and it loads :a. >> >> On Friday, February 1, 2019 at 1:01:33 PM

[ClojureScript] Re: Question about code-splitting and loading of dependent modules.

2019-02-01 Thread Khalid Jebbari
In case it wasn't clear, the javascript file for :cljs-base is included as a script tag in the html, and it loads :a. On Friday, February 1, 2019 at 1:01:33 PM UTC+1, Khalid Jebbari wrote: > > Hello, > > I create 3 modules in the :modules configuration, say :cljs-base, :a &

[ClojureScript] Question about code-splitting and loading of dependent modules.

2019-02-01 Thread Khalid Jebbari
Hello, I create 3 modules in the :modules configuration, say :cljs-base, :a & :b, and know that module :a depends on code in the module :b (and in :cljs-base of course). If I manually load only :a with `(cljs.loader/load :a)`, will it automatically load :b? My local testing seems to show that

[ClojureScript] Re: ANN: ClojureScript 1.10.516

2019-02-01 Thread Khalid Jebbari
I get it. Maybe in the future the type inference could inform the Closure Compiler of the types, so that it could emit smaller code ? Really curious about it. On Friday, February 1, 2019 at 11:06:49 AM UTC+1, Thomas Heller wrote: > > > > On Friday, February 1, 2019 at 5:54:13 AM U

[ClojureScript] ANN: ClojureScript 1.10.516

2019-01-31 Thread Khalid Jebbari
Congrats David and all contributors! Not a feedback but a question: does the new type inference have an influence on the generated JS code ? Can it make bundles smaller ? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message

[ClojureScript] Re: ANN: ClojureScript 1.10.439

2018-11-07 Thread Khalid Jebbari
Reporting build-times changes, in a ~15loc CLJ/CLJS/CLC project, on a 8-cores CPU machine, with :parallel-build always true and timings as reported by :compiler-stats true, using boot-cljs. I've run each build at least twice to check for variations. With CLJS 1.10.339 - :optimizations :none

Re: [ClojureScript] Re: Creating a map entry

2018-10-18 Thread Khalid Jebbari
Ooops, silly me... Thanks for catch. On Thu, Oct 18, 2018, 4:55 PM Alex Miller wrote: > > > On Thursday, October 18, 2018 at 4:07:32 AM UTC-5, Khalid Jebbari wrote: >> >> >> PS: I couldn't get clojure cli to download criterium to run the >> benchmark, so I

[ClojureScript] Code-splitting and closure libs problem ?

2018-03-07 Thread Khalid Jebbari
Hello, I have a problem with one of the CLJS split module I lazy load. This CLJS split depends on a manually written Closure library in Javascript, itself depending on another manually written Closure lib. When the split loads and is executed, it successfully loads its Closure dependency but

Re: [ClojureScript] Code-splitting question

2018-02-24 Thread Khalid Jebbari
t; You must specify :depends-on - the compiler will not do this for you. > > David > > On Fri, Feb 23, 2018 at 1:06 PM, Khalid Jebbari <khalid.jebb...@gmail.com> > wrote: > >> Hello, >> >> Say I have 2 namespaces in CLJS/CLJC, A and B. A requires B explicitl

Re: [ClojureScript] Re: Code-splitting question

2018-02-24 Thread Khalid Jebbari
.com> a écrit : > I answered a similar question a while ago: > https://groups.google.com/d/msg/clojurescript/Gk1XA0aIxJM/Ixu45z-wkEoJ > > > On Friday, February 23, 2018 at 7:06:43 PM UTC+1, Khalid Jebbari wrote: >> >> Hello, >> >> Say I have 2 namespaces in CL

[ClojureScript] Code-splitting question

2018-02-23 Thread Khalid Jebbari
Hello, Say I have 2 namespaces in CLJS/CLJC, A and B. A requires B explicitly. I want to produce a js file for each namespace, A.js and B.js. So I use the code-splitting feature, and create a dedicated module entry for each namespace, :A and :B. What's exactly the difference between

Re: [ClojureScript] Problems with code-splitting

2018-02-05 Thread Khalid Jebbari
Bug filed: https://github.com/boot-clj/boot-cljs/issues/183 On Monday, February 5, 2018 at 5:22:58 PM UTC+1, Khalid Jebbari wrote: > > I managed to create a minimal reproduction repository. It’s definitely a > problem of Boot-cljs, not of the CLJS compiler itself. > > The rep

Re: [ClojureScript] Problems with code-splitting

2018-02-05 Thread Khalid Jebbari
the problem. On Saturday, February 3, 2018 at 2:37:18 PM UTC+1, Khalid Jebbari wrote: > > No I'm really lazy loading from another namespace, our `yoda.tracking` > where all happens. This ns doesn't `require` at all the lazy loaded module, > it just `resolve` it. I will work on a minima

Re: [ClojureScript] Problems with code-splitting

2018-02-03 Thread Khalid Jebbari
No I'm really lazy loading from another namespace, our `yoda.tracking` where all happens. This ns doesn't `require` at all the lazy loaded module, it just `resolve` it. I will work on a minimal repro case based on boot-cljs next week. Thanks for your attention. -- Note that posts from new

[ClojureScript] Problems with code-splitting

2018-01-29 Thread Khalid Jebbari
Hello, I'm trying to package all our trackers code (think Google analytics and the likes) into different splits so that they don't make base JS package too big and don't slow down time to interactive. Good idea, right ? Our strategy is basically to write the trackers code in Javascript first

[ClojureScript] Problems with code splitting

2018-01-29 Thread Khalid Jebbari
Hello, I'm trying to package all our trackers code (think Google analytics and the likes) into different splits so that they don't make base JS package too big and don't slow down time to interactive. Good idea, right ? Our strategy is basically to write the trackers code in Javascript first

[ClojureScript] Scripting with Clojure(Script) : Plain Clojure ? Node.js ? Boot ? Planck ? Pixie ?

2015-08-25 Thread Khalid Jebbari
Hi every one, Just starting this thread to gather feedback from people who used CLJ(S) to script and replace, you know, shell/Python/Ruby/Whatever. Pretty sure it's a dream to code AND script with CLJ(S). I know that it's possible to do it with CLJS backed by Node.js/io.js, with Boot somehow,

[ClojureScript] HTML DOM to Edn

2015-08-15 Thread Khalid Jebbari
I know that Enlive does this internally, it uses JSoup from Java to convert to plain Clojure data structure. Not sure it exposes this functionality directly though. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message

Re: [ClojureScript] Enlive-style templating in server-side clojurescript?

2015-07-07 Thread Khalid Jebbari
There is a pure javascript solution that works well on Node.js : https://github.com/substack/hyperglue From substack, a very talented Node.js developer. The concept is somehow similar to Enlive. Given an HTML file, apply transformations on selectors declaratively by passing an object. Check it

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-06-01 Thread Khalid Jebbari
Thx ! Will be an interesting read Le 1 juin 2015 à 18:00, Herwig Hochleitner hhochleit...@gmail.com a écrit : 2015-06-01 17:35 GMT+02:00 Khalid Jebbari khalid.jebb...@gmail.com: So the various states are encapsulated in a go loop? In multiple go-loops, actually. I always knew

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-06-01 Thread Khalid Jebbari
So the various states are encapsulated in a go loop ? I always knew that core.async could be used to model FSM's. Well, if you can share the code somehow, do so. Le 1 juin 2015 à 15:26, Herwig Hochleitner hhochleit...@gmail.com a écrit : Wow, big thread. I just want to offer, how I've

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-22 Thread Khalid Jebbari
: Yup, well captured. On Wed, May 20, 2015 at 6:58 AM, Khalid Jebbari khalid.jebb...@gmail.com wrote: You would want it if you want to inspect/debug/transmit/replay the whole the state of your application. Having nothing encapsulated and everything in a global state permits this. Khalid

Re: [ClojureScript] reagent-nodejs feedback request

2015-05-21 Thread Khalid Jebbari
To eliminate the need to use 2 different routers, the only possibility I see is to use a js library that works both on client and server-side. Backbone.js has a minimal router like this, you may also want to check crossroads.js or finch.js. But something tells me that you'll need to write some

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-20 Thread Khalid Jebbari
, Daniel, was modularity. Does modularity imply local state? Pondering... Jamie On May 18, 2015, at 1:26 PM, Khalid Jebbari khalid.jebb...@gmail.com wrote: I like how you break up the state machines, it has sense in web app. Page 1 has 2 widgets, page 2 has a form. Each widget/form can have a FSM

Re: [ClojureScript] Isomorphic ClojureScript

2015-05-20 Thread Khalid Jebbari
can be to a beginner I would personally stick with the Om/Reagent isomorphic path (nashorn or node) On Wed, May 20, 2015 at 6:56 AM, Khalid Jebbari khalid.jebb...@gmail.com wrote: Javascript developer speaking. The problem with isomorphic apps the Node.js way (not the Meteor way

Re: [ClojureScript] Isomorphic ClojureScript

2015-05-20 Thread Khalid Jebbari
be a path to ideological stuckness ... :) On Wed, May 20, 2015 at 7:11 AM, Khalid Jebbari khalid.jebb...@gmail.com wrote: @David, I didn't know this feature. Good to know ! @Marc : it's a matter of trade-offs. Node.js and the JVM are very different platforms. If developer convenience is very

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
to the routing state and then switch to a new state based on whatever rules and definitions you've set. Or maybe I'm missing something. I haven't built an FSM in a while. :) Sean On Monday, May 18, 2015 at 6:07:22 PM UTC+8, Khalid Jebbari wrote: Trying to push forward the discussion

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
Indeed, the combination of all states/transitions could lead to something unreadable and unmanageable. I was talking about that with a colleague the other day. Don't have a solution (yet), I'm still learning and reading about FSM. As I was saying in my previous post, having some sort of

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
not a hierarchical one... Subgraphs dont have to be entangled with the global graph Sent from my iPhone On May 18, 2015, at 10:26 AM, Khalid Jebbari khalid.jebb...@gmail.com wrote: I like how you break up the state machines, it has sense in web app. Page 1 has 2 widgets, page 2 has a form. Each

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
Am reading Horrocks' book. Did you ? Le 19 mai 2015 à 06:17, Mike Thompson m.l.thompson...@gmail.com a écrit : On Tuesday, May 19, 2015 at 3:13:23 AM UTC+10, Daniel Kersten wrote: From my understanding of it: Use higher level states and decouple them somewhat from the data. For

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
-hierarchical-fsm-vs-stack-based-fsm On Mon, May 18, 2015 at 1:28 PM, Khalid Jebbari khalid.jebb...@gmail.com wrote: Thanks for the clarification, I didn't about them. Now I need even more reading and thinking :) Le 18 mai 2015 à 22:23, Marc Fawzi marc.fa...@gmail.com a écrit : Back

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
=DlxaVdfLJo3aoAT-_4CYBQved=0CC0Q6AEwAg#v=onepageqf=false On Mon, May 18, 2015 at 1:51 PM, Khalid Jebbari khalid.jebb...@gmail.com wrote: Regarding SFSMs, it looks like the top-level states would be URLs (in a well behaved application), and the nested ones would be for any widgets inside the pages

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Khalid Jebbari
Trying to push forward the discussion about Web UI with state machines. I came up with the following decomposition of the core components of a web application : - application state - application data - business logic - ui logic - event processing - presentation layer - routing In this schema,

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-14 Thread Khalid Jebbari
написал: Finite state machines are a useful modeling tool, but when implemented in code they can involve a lot of boilerplate and complexity. These days I prefer Rx-like paradigms for sophisticated handling of asynchronous events. e On Wed, May 13, 2015 at 5:54 AM, Khalid Jebbari khalid

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-14 Thread Khalid Jebbari
Generating a functional state machine from a diagram is awesome. Generating a diagram from the code of a state machine is awesome too. But state diagram are only 1 of the 2 visual representations of state machines AFAIK. The other is the state transition table :

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-14 Thread Khalid Jebbari
In the case of global app state combined with a state machine, where would the URL be stored ? Should it be considered a trigger/event of the state machine ? Should it be stored in the state as any other data ? Le 15 mai 2015 à 03:22, Marc Fawzi marc.fa...@gmail.com a écrit : Thanks Brutha!

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-13 Thread Khalid Jebbari
I understand the relationship between state machines and event-log/CQRS. A program could just translate the UI events into events stored in an event log, and let them be consumed continually by a state machine. You would basically reduce the events log using the state machine as a reduction

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-13 Thread Khalid Jebbari
.). tldr - the symmetry of CLJ and CLJS make it easier (for me at least) to put non-trivial logic on the front end On 13 May 2015 at 13:06, Khalid Jebbari khalid.jebb...@gmail.com wrote: I understand the relationship between state machines and event-log/CQRS. A program could just translate

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-13 Thread Khalid Jebbari
I just watched the video. Wow. Having a live statechart is even better than what I imagined. It reminds me somehow of the NoFlo JavaScript project. This would be an awesome lib to have... (Am I suggesting you should open source this statechart stuff ? :D). Seriously thank you for the pointers.

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-13 Thread Khalid Jebbari
I have a question for you Kevin : when you modeled your logic with a state machine, were you able to unit test it outside of the browser ? (Sorry if the answer is in the video, I haven't watched it yet) Le 14 mai 2015 à 00:00, Kevin Lynagh ke...@keminglabs.com a écrit : In addition to the

[ClojureScript] Re: Reagent TodoMVC

2015-04-24 Thread Khalid Jebbari
On Friday, April 24, 2015 at 7:04:13 AM UTC+2, marc fawzi wrote: http://todomvc.com/examples/reagent/ https://github.com/tastejs/todomvc/blob/master/examples/reagent/readme.md :) Nice to have an example in the official TodoMVC repo. -- Note that posts from new members are moderated

[ClojureScript] Re: [ANN] cljs-pikaday, a reagent date picker

2015-04-07 Thread Khalid Jebbari
Thx for the link to closureplease. Will help a lot ! -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups ClojureScript group. To unsubscribe from this group and stop receiving

Re: [ClojureScript] re-frame - sanity check for re-usable components

2015-03-27 Thread Khalid Jebbari
On Friday, March 27, 2015 at 2:39:37 PM UTC+1, Jamie Orchard-Hays wrote: Does it make sense to pass the reusable component's context as an argument to it? ie, (defn ReusableComponent [some-context] ) Jamie On Mar 27, 2015, at 8:54 AM, Colin Yates colin.ya...@gmail.com wrote:

[ClojureScript] Re: react - performance difference between hiding or removing elements?

2015-03-27 Thread Khalid Jebbari
On Friday, March 27, 2015 at 2:40:45 PM UTC+1, Colin Yates wrote: I realise this is one of those 'it depends', but in general, is it recommended to hide elements in react or not render them? For example, I have an SPA with a bunch of top-level pages. Each page has a number of tabs, each

Re: [ClojureScript] re-frame - sanity check for re-usable components

2015-03-27 Thread Khalid Jebbari
If you're more interesed into the pattern I described, you can read more here : https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0. This is really where the React.js community is headed. -- Note that posts from new members are moderated - please be patient with your first

[ClojureScript] Re: react - performance difference between hiding or removing elements?

2015-03-27 Thread Khalid Jebbari
By the way, he developped a nice tool (and open-sourced it!) to measure perf based on a lot of criteria : http://yellowlab.tools/ -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google

Re: [ClojureScript] re-frame - sanity check for re-usable components

2015-03-27 Thread Khalid Jebbari
m.l.thompson...@gmail.com wrote: On Saturday, March 28, 2015 at 12:58:17 AM UTC+11, Khalid Jebbari wrote: On Friday, March 27, 2015 at 2:39:37 PM UTC+1, Jamie Orchard-Hays wrote: Does it make sense to pass the reusable component's context as an argument to it? ie, (defn

Re: [ClojureScript] re-frame - sanity check for re-usable components

2015-03-27 Thread Khalid Jebbari
a presentation about re-frame port of ANgular's phonecat example, the reusable smart components presentation will be based on RAW Reagent, nothing added. Stay tuned. On Fri, Mar 27, 2015 at 10:58 AM, Khalid Jebbari khalid.jebb...@gmail.com wrote: If this approach suits you better, fine

[ClojureScript] Re: ClojureScript Google Closure Module support

2015-02-18 Thread Khalid Jebbari
Browserify : https://github.com/substack/node-browserify Factor-bundle : https://github.com/substack/factor-bundle -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups

[ClojureScript] Re: ClojureScript Google Closure Module support

2015-02-18 Thread Khalid Jebbari
Haven't tried yet the new modules compilation strategy, but I know a very good strategy available in the JS world with Browserify and its plugin factor-bundle. Basically, factor-bundle analyses all the emitted code and put in a single file every single module (written like node modules) that

Re: [ClojureScript] Re: ClojureScript Google Closure Module support

2015-02-18 Thread Khalid Jebbari
Thanks for the clear explanation. It's pretty clear I should play with it to see how it goes. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups ClojureScript group. To

[ClojureScript] Re: File uploads in ClojureScript + React

2015-02-14 Thread Khalid Jebbari
On Saturday, February 14, 2015 at 3:26:53 PM UTC+1, Michiel Borkent wrote: I am currently looking at the options for supporting file uploads in several browsers in a ClojureScript SPA. My first attempt was posting a form with a file upload with cljs-http. This didn't work because the

[ClojureScript] Re: Touch events and React.js/Om

2015-02-09 Thread Khalid Jebbari
No need to fiddle with other libs or complicated build steps, React js handle this very well. Simply handle the touchend event and preventDefault(). In React's JSX syntax : div onClick={myHandler} onTouchEnd={myHandler}.../div myHandler: function(event) { event.preventDefault(); ...

[ClojureScript] Re: Touch events and React.js/Om

2015-02-09 Thread Khalid Jebbari
I didn't notice any usability issue of this kind. Touching triggers touchend and no click, clicking on desktop triggers click normally, and scrolling triggers none of them. Maybe our use cases were different, hence the need for you to introduce fastclick. -- Note that posts from new members

Re: [ClojureScript] Re: ANN: Om 0.8.6, Hello CLJSJS

2015-02-02 Thread Khalid Jebbari
Indeed, data is better than app. Khalid aka DjebbZ @Dj3bbZ On Mon, Feb 2, 2015 at 10:49 AM, Sebastian Bensusan sbe...@gmail.com wrote: Thanks Khalid, The way I see it, Om has three concepts regarding state: 1. The global state defined with atom. Named `app-state` 2. The cursor passed to

[ClojureScript] Re: ANN: Om 0.8.6, Hello CLJSJS

2015-02-01 Thread Khalid Jebbari
On Sunday, February 1, 2015 at 9:16:05 PM UTC+1, Sebastian Bensusan wrote: I changed the tutorial to use a new version of the figwheel template https://github.com/bhauman/figwheel-template. When the new template is published to Clojars we can update the Om wiki. I'll move on to the