Re: [ClojureScript] [OM] om/update! vs. reset!

2015-03-18 Thread Moritz Ulrich
`update!' and `transact!' work on cursors, not atoms. See https://github.com/omcljs/om/wiki/Cursors Yehonathan Sharvit writes: > In Om, what is the advantage of calling om/update! instead of reset! > Same question for om/transact! and swap! > > Is it only the stuff with korks and tag or is ther

Re: [ClojureScript] Trouble with null values from onKeyPress in React/Om

2015-03-04 Thread Moritz Ulrich
If you log it to the console like this, Chrome (at least) will print it interactively and update it if something changes. React uses a pool of event objects and invalidates (= resets everything to null) as soon as the handler is done. This is also problematic when putting events into a core.async

Re: [ClojureScript] ExceptionInfo No such namespace: cljsjs.react at line 1 when using piggieback

2015-02-02 Thread Moritz Ulrich
David Nolen writes: > I fixed this in ClojureScript master. The fix will appear in the next > release. The original 'No such namespace: cljsjs.react' error? I still see this with 0.0-2755 (and with a build from current master). Happens with piggieback standalone (`cemerick.piggieback/cljs-repl)`

Re: [ClojureScript] having trouble with source maps

2015-01-25 Thread Moritz Ulrich
Marc Fawzi writes: > I did some reading on enabling source maps for other languages (more > material exists for e.g. coffeescript) and I think the problem is that lein > cljsbuild is not adding that special comment to index.html to tell the > browser about the source map > > //# sourceMappingURL=

Re: [ClojureScript] ANN: ClojureScript 0.0-2719, JavaScript Dependencies

2015-01-24 Thread Moritz Ulrich
David Nolen writes: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > README and source code: https://github.com/clojure/clojurescript > > New release version: 0.0-2719 > > Leiningen dependency information: > > [org.clojure/clojurescript "0.0-2719"] > > ClojureScrip

Re: [ClojureScript] question about om patterns

2015-01-20 Thread Moritz Ulrich
Ivan Willig writes: > Hello, > > I am struggling with how to best represent the common UI pattern where > there is a collection of objects and a single "active/current" object. > Often there is a form where the user can edit the "active" object. > > I find myself saving a reference to the curren

Re: [ClojureScript] Question about consistency of om cursors in event handlers

2014-10-12 Thread Moritz Ulrich
Am 12.10.2014 21:33 schrieb "Leon Grapenthin" : > > Regarding this ( https://github.com/swannodette/om/wiki/Basic-Tutorial#debugging-om-components) section of the om tutorial: > > Couldn't the click handler in theory delete a version of the contact that has not been rendered to the user? > > E. g.

Re: [ClojureScript] immutability and clojurescript

2014-08-16 Thread Moritz Ulrich
and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. -- Moritz Ulrich pgp8_4wgQD4M8.pgp Description: PGP signature

Re: [ClojureScript] Clojurescript live editing with Emacs Cider

2014-08-16 Thread Moritz Ulrich
subscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. -- Moritz Ulrich -- Note that posts from new members are moderated - please be patient with your first post. --- You r

Re: [ClojureScript] Om performance problems

2014-08-09 Thread Moritz Ulrich
ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojurescript+unsubscr...@googlegroups.com. > To post to this group, send email to clojurescript@googlegroups.com. > Visit this group at http://groups.google.com/group/clojurescript. -- Moritz Ulrich pgp2HIcGehc83.pgp Description: PGP signature

Re: [ClojureScript] Is there a Base64 encode/decode library for Clojurescript?

2014-08-08 Thread Moritz Ulrich
We use goog.crypt.base64 at work. On Sat, Aug 9, 2014 at 12:06 AM, Jonathon McKitrick wrote: > Or an easy way to integrate an existing JS library? > > -- > Note that posts from new members are moderated - please be patient with your > first post. > --- > You received this message because you are

Re: [ClojureScript] om cursors and protocols

2014-07-29 Thread Moritz Ulrich
protocol and then call that protocol > method from an om component ? the problem is that I'm getting an error > calling the protocol method because the type now is not the given type but > om.core/MapCursor. -- Moritz Ulrich pgpUekvJc6kWM.pgp Description: PGP signature

Re: [ClojureScript] web development server

2014-07-26 Thread Moritz Ulrich
For simple stuff I usually load the html-file via file://. This works in most cases, but you'll have to use weasel[1] if you want to use the REPL. [1]: https://github.com/tomjakubowski/weasel On Sat, Jul 26, 2014 at 11:24 AM, Paul Cowan wrote: > I want to create a simple reagent component. > > I

Re: [ClojureScript] Re: Om project download size

2014-07-26 Thread Moritz Ulrich
Use :advanced compilation as shown in the manual for Om. You also might want to read some more about ClojureScript and how it's compiled etc. We have a fairly big project at work. Without gzip, the whole application.js payload is 600k (including React and everything else), with gzip it's down to 1

Re: [ClojureScript] anchor in om

2014-07-09 Thread Moritz Ulrich
On Wed, Jul 9, 2014 at 1:14 PM, Makoto H. wrote: > (dom/li nil >(dom/a #js {:className "#"} "menu1")) You want :href, not :className. -- 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

Re: [ClojureScript] Re: Modal implementation

2014-06-29 Thread Moritz Ulrich
What should such a library provide? There are many different ways to create UI from ClojureScript (raw DOM access, React/Om, dommy), and a modal dialog is pretty easy to do in any of these. Plus, you can just use the CSS from bootstrap if you're not so much into it. Google Closure (which comes wit

Re: [ClojureScript] [ANN] Secretary 1.2.0

2014-06-28 Thread Moritz Ulrich
Thanks for your work on this! It's really valuable software for some personal and professional projects for me. Am 27.06.2014 21:04 schrieb "Joel Holdbrooks" : > Secretary, the client-side router for ClojureScript, is now version 1.2.0 > > FIXED - bug with empty route triggering a match on first a

Re: [ClojureScript] Re: Errors using multiple Om cursors

2014-06-27 Thread Moritz Ulrich
What would transact! or update! on such a cursor without a path do then? Am 26.06.2014 20:46 schrieb "jsims" : > On Thursday, June 26, 2014 1:11:26 PM UTC-5, Roger Gilliar wrote: > > The first button does not receive a cursor but a map containing cursors. > The following works for button 1: > > >

Re: [ClojureScript] Re: templating for clojurescript react libraries

2014-06-22 Thread Moritz Ulrich
What's so special about JSX that isn't possible with kioo or sablono? On Sun, Jun 22, 2014 at 4:20 AM, Paul Cowan wrote: > I think until it is markup the disconnect is far too removed to be > practical. I think we need jsx or nothing > > > On Sunday, June 22, 2014, Creighton Kirkendall > wrote:

Re: [ClojureScript] How to include external libs for ClojureScript tests

2014-06-21 Thread Moritz Ulrich
If you use :optimizations :whitespace, you can pass a :preample like: :preamble ["react/react.min.js"] That will prepend react to the generated om_app.js. On Sat, Jun 21, 2014 at 12:36 PM, Roger Gilliar wrote: > I followed to instructions on the cljsbuild page. My project file now looks > like

Re: [ClojureScript] Advice on how to update data in an OM component

2014-06-15 Thread Moritz Ulrich
World isn't in scope, therefore it's nil, :data is nil and (count nil) is zero. Am 15.06.2014 13:27 schrieb : > I have change initstate to this: > > (defn world-view [data owner opts] > (reify > om/IInitState > (init-state [_] > {:world []}) > > om/IWillMount > (will-

Re: [ClojureScript] [ANN] Secretary 1.1.1

2014-05-25 Thread Moritz Ulrich
Thanks for the quick bugfix release! I really enjoy secretary for its purpose :-) Am 24.05.2014 19:17 schrieb "Joel Holdbrooks" : > Secretary, a client-side routing library for ClojureScript, is now 1.1.1 > > FIXED: bug when passed a record as route-params (Thanks Mortiz Ulrich!) > > https://githu

Re: [ClojureScript] Foolproof Emacs + Browser Repl instructions?

2014-05-20 Thread Moritz Ulrich
Fully agreeing here. My experience with weasel is pretty good, with the exception of some problems with company-mode which result from exceptions in the completion code. Those are - as far as I see - thrown from cider-nrepl because there's usually some mismatch between the data cider-nrepl expects

Re: [ClojureScript] Om Scrim

2014-05-02 Thread Moritz Ulrich
I did this with a div with some special id, using CSS to set position: absolute, top: 0, left: 0, and width/height 100%. On Fri, May 2, 2014 at 9:46 PM, Ashton Kemerling wrote: > I'm rewriting a few things in Om to learn more, but I'm having a hard time > figuring out how to make a scrim using o

Re: [ClojureScript] ANN: Om 0.6.1, moving towards independently addressable components

2014-04-26 Thread Moritz Ulrich
Could it be that 0.6.1 doesn't trigger a re-render of a component when just `:opts' has changed? I have a parent component with passes a boolean (`:selected?') down to it's children in the `:opts'-map. The parent-component's `render' is called, but the children's isn't anymore. I understand that t

Re: [ClojureScript] Re: ANN: cljs-time 0.1.3

2014-04-23 Thread Moritz Ulrich
It might still be good to merge the projects, providing an at least partially common api via two different implementations. On Wed, Apr 23, 2014 at 6:16 PM, Gary Trakhman wrote: > CLJX-ing this sounds hard. Clj-time is less CLJ and more Joda. > > > On Wed, Apr 23, 2014 at 12:14 PM, Joel Holdbroo

Re: [ClojureScript] Wrong script order

2014-04-07 Thread Moritz Ulrich
The problem here seems to be that Clojurescript doesn't know anything about the dependencies of your application. Try adding a :require statement. On Sun, Apr 6, 2014 at 6:42 PM, Ivan Schuetz wrote: > I have a cljs file that depends on another. But the compiled script is > inserting the scripts

Re: [ClojureScript] Om cursors, external updates and internal data transformations, and future behavior

2014-04-05 Thread Moritz Ulrich
I used secretary[1] in combination with simple #-urls to do the job. [1]: https://github.com/gf3/secretary/ On Sat, Apr 5, 2014 at 2:17 PM, wrote: > On Friday, April 4, 2014 12:25:53 AM UTC+3, David Nolen wrote: >> On Thu, Apr 3, 2014 at 5:22 PM, Sean Corfield wrote: >> >> >> >> >> In the case

Re: [ClojureScript] Re: Convert javascript library call to clojurescript call (to canvasjs)

2014-03-30 Thread Moritz Ulrich
Also note that you can replace the call to `clj->js' with #js. On Sun, Mar 30, 2014 at 9:32 PM, Creighton Kirkendall wrote: > It should look something like this. > > (def chart (js/CanvasJS.Chart. "chartContainer" >(clj-js {:title {:text "Fruits sold in First > Qu

Re: [ClojureScript] What would be the difference between Sablono and Reagent?

2014-03-04 Thread Moritz Ulrich
you give a concreate example if possible? > > Thanks! > > Le mardi 4 mars 2014 14:20:05 UTC-5, Moritz Ulrich a écrit : >> I think you want to compare Om and Reagent. Sablono is a hiccup-like >> >> library to write DOM structures using ClojureScript data structures,

Re: [ClojureScript] What would be the difference between Sablono and Reagent?

2014-03-04 Thread Moritz Ulrich
I think you want to compare Om and Reagent. Sablono is a hiccup-like library to write DOM structures using ClojureScript data structures, targeting both Om and Reagent. On Tue, Mar 4, 2014 at 8:15 PM, Leon Talbot wrote: > Why would I choose one or the other? > > Thanks! > > -- > Note that posts f

Re: [ClojureScript] What about React?

2014-02-26 Thread Moritz Ulrich
or anything else - Om/React will always generate the same UI for you - "Correct" event handling React implements correct (as specified by W3) in all browser. No IE-specific hacks needed. You *can* use components just like dumb templates which just display the data they receive. You also have the *option* to make them smarter by adding behavior / local state. -- Moritz Ulrich pgpF9iPuHpVmR.pgp Description: PGP signature

Re: [ClojureScript] Best way to pass/read a complete EDN string to clojurescript from the page.

2014-02-23 Thread Moritz Ulrich
Won't get renamed with ^:export metadata. Am 23.02.2014 00:09 schrieb "Boris Kourtoukov" : > Would that still work with advanced compilation? I can't quite recall if > you-app.core/start would be renamed by Google closure compiler? > > -- > Note that posts from new members are moderated - please b

Re: [ClojureScript] Best way to pass/read a complete EDN string to clojurescript from the page.

2014-02-22 Thread Moritz Ulrich
What about providing a your-app.core/start-application which takes a edn-string as a parameter, then adding a

Re: [ClojureScript] ANN: Weasel 0.1.0, a WebSocket REPL env for ClojureScript

2014-02-19 Thread Moritz Ulrich
Chas Emerick writes: > On Wed 19 Feb 2014 08:11:57 AM EST, Moritz Ulrich wrote: >> >> Tom Jakubowski writes: >> >>> Connecting a ClojureScript REPL to certain Javascript environments - like >>> those served to a browser but not over HTTP, e.g. in a Chrom

Re: [ClojureScript] ANN: Weasel 0.1.0, a WebSocket REPL env for ClojureScript

2014-02-19 Thread Moritz Ulrich
owledge suggests I’ve screwed up the copyright/licensing. I just tested it in a small pet-project I have and it works really good. It also doesn't seem to suffer from the AdBlock problems the 'normal' Clojurescript browser-repl has. Thanks, and keep up the good work! -- Moritz Ulrich pgp24DbnHCuZs.pgp Description: PGP signature

Re: [ClojureScript] Reagent port of the Om tutorial

2014-01-25 Thread Moritz Ulrich
Jonas Enlund writes: > On Saturday, January 25, 2014 9:49:56 AM UTC+2, David Nolen wrote: >> Nice. I do consider the non-modularity of `update-contacts!` here to be one >> of the big things I try to address in Om. The Reagent `update-contacts!` >> knows too much. In Om, it doesn't matter at all

Re: [ClojureScript] OM/Reagent Handling client/server synchronization

2014-01-24 Thread Moritz Ulrich
On Sat, Jan 25, 2014 at 12:37 AM, David Nolen wrote: > Haven't thought it through but synchronization between client/server is > definitely something I'm interested in. Hopefully not for Om! :) I don't think Om should handle that sort of stuff - It might easily grow into a monolithic framework if

Re: [ClojureScript] Re: [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-12 Thread Moritz Ulrich
t more about your plans? :) -- Moritz Ulrich pgpRWZto3443S.pgp Description: PGP signature

Re: [ClojureScript] ANN: Om, a ClojureScript binding to Facebook's React

2013-12-20 Thread Moritz Ulrich
hen following the React tutorial. I really look forward to using this library for some private and (hopefully) work-related projects in the future. Cheers! -- Moritz Ulrich pgpVHUbQkg_ju.pgp Description: PGP signature