Creighton, I've been meaning to thank you for kioo, so - Thanks!
I've always been a big fan of the Enlive/Enfocus method of templating, and was
excited to see kioo when David added it to the OM readme the other day.
Planning on putting it through its paces this weekend with a POC of a fairly
I've been all-in on clojure for about 6 months now, spending every free
moment learning and working in it. Paul Graham's writings played a big part in
my choice to invest in a lisp, so this is an interesting question.
After some reflection, I can say yes, clojure has had a substantial impact
Yes! This is good stuff.
Over the weekend, I started working on using Om for a potential real world
project and I quickly encountered the need for higher order polymorphic
components. Then I started worrying that maybe I had missed some fundamental
concept of Om/React and was complecting.
IMO, you definitely have your priorities straight, and I would question
whether Om ever needs to add a lot of sugar. When building any non-trivial
app, you will most likely end up creating your own abstractions anyway.
On Jan 28, 2014 7:59 PM, David Nolen dnolen.li...@gmail.com wrote:
People
Looks good to me, the code clearly expresses your intent. Just a couple minor
formatting suggestions:
Line 9 - put each let binding on a new line, it's more readable
Also, move the comments to doc strings. This was a habit it took me awhile to
get used to as well, but I think it is
I was blown away by David Nolen's articles on CSP using core.async when I first
read them last fall, and the concepts have stuck with me and really started to
shape my thinking on designing UI components.
De-complecting UI concerns into event stream handling, event stream processing,
and ui
I've noticed that I don't see any of my component's display names in the React
devtools. I tried running omchaya (wonderful sample app, BTW), and none of
their display names were showing up either, even though they set the display
name on all their components.
I have the latest React devtools
Good to know. Thanks.
I wondered why you hadn't added it to the documentation and tutorial - that
would explain it.
--
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
Interesting. Very interesting. (taps fingers together and laughs maniacally).
Something like this is working its way up my to-do list, so I look forward to
checking it out.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this
This is a really neat idea - thank you for taking the time to write this and
share it.
For awhile I've been telling people to look at Datomic Free because it
provides such a nice way to structure and query your data, even if you don't
use the full Datomic solution.
It looks like this library
Nikita,
I'll be happy to work with you to improve performance as needed. Anything from
providing metrics to giving you access to the code or my data sets to test
against.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this
-python-client
But nothing in ClojureScript itself.
Have I missing something? It seems so odd there are no examples out there.
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed
in action.
I'm seeking an example of a ClojureScript client talking to a headless nRepl.
--
Mike
--
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
Lighttable is written in Clojurescript and can connect to Nrepl, so you could
look at their source code to see how they do it. The Clojure plugin is where
you would need to look.
https://github.com/LightTable/Clojure
--
Note that posts from new members are moderated - please be patient with
of the CLJS
logic database which might well change everything (again). Does anyone else
find the pace of change brutal these days? So many learning curves.
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because
I would imagine Brandon Bloom's response to a similar question in the Clojure
group is applicable to the ClojureScript implementation of of core.async:
https://groups.google.com/forum/#!searchin/clojure/close$20channel/clojure/Zr1FmmE2cpQ/F6m9Ye_n1VoJ
--
Note that posts from new members are
I would imagine Brandon Bloom's response to a similar question in the Clojure
group is applicable to the ClojureScript implementation of of core.async:
https://groups.google.com/d/msg/clojure/Zr1FmmE2cpQ/B_6MV2sTP8wJ
--
Note that posts from new members are moderated - please be patient with
One thing I found instructive is David Nolen's “Minecraft” port
http://swannodette.github.io/2013/06/10/porting-notchs-minecraft-demo-to-clojurescript/
In David's post he claimed that 400 lines would drop by 200 with real keyword
support—it did; you can see this with the latest compiler.
Also
?
(In python, for example, all strings less than 3 chars are interned. Are
there rules in CLJS?)
2. Should this be relied upon going forward, or is it an implementation detail
that may change at any moment?
--
Mike
--
Note that posts from new members are moderated - please be patient
anyone implemented something similar?
Do you mean you want to implement something like this example (of 5 dependent
pickers):
http://www.minddigital.com/wp-content/uploads/2013/12/sample-Image.jpg
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first
://github.com/pleasetrythisathome/om-server-rendering.
I'm trying to evaluate the require dependencies/files in Nashorn so that I
can then call an arbitrary function within a namespace (in this case,
render-to-string).
Mike Thompson's example of :optimization :none testing was helpful
Thanks Max! The unsigned char / _Bool type distinction is probably the root
cause.
I did a little digging and found that exported BOOL properties are _supposed_
to be handled correctly. JSExport.h indicates
BOOL: values are converted consistently with valueWithBool/toBool.
where
I filed a rdar, and Apple engineering confirmed the inherent limitation with
the 32-bit runtime:
“Objective-C internally treats BOOL as int, so we can't do anything nicer.”
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this
I have an iOS app in the App Store where the view controllers and other code
are written in ClojureScript instead of Objective-C. Otherwise, it is a native
app, based on storyboards. The JavaScript is running in JavaScriptCore,
manipulating UI elements via the Objective-C / JavaScript bridge.
Just for completeness, I note that you could also have done this:
(defn weeks-view [calendar]
(fn [calendar];; calendar added here
(let [weeks (partition 7 calendar)]
[:tbody.weeks (for [week weeks]
[week-view week])])))
--
Note that
Hi Dylan,
I have no experience with PhoneGap / Cordova. I avoided that stack presuming
that the resulting app is essentially like a packaged web app.” I wanted to
instead produce an effectively native app where (ideally) the only difference
is that instead of the underlying implementation
I've taken a different approach which I think has really worked well, so I
thought I would share it.
The inspiration for my approach came from this article
http://tonsky.me/blog/datascript-chat, in which he uses Datascript, core.async,
and uses React directly for rendering (using Sablano for
Om and Reagent have different approaches to managing state, but that analogy is
pretty close. If you are partial to Om, look into Ian Eslick's derive library,
which he discusses in another recent thread on this group. It takes a similar
approach to what I've described using Om and NativeStore
In the namespaces chapter of ClojureScript: Up and Running, bottom of pg. 57,
it indicates
ClojuresScript does not support circular references between namespaces.
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message
Quick question - does om/ref-cursor only take a cursor as input (as shown in
the tutorial), or can it take any value? For example, can I compute a value
based on different parts of the app state and then create a ref cursor from
that? If so, what are the consistency guaranties, i.e. is the
That makes sense, thanks.
--
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 emails from it, send an
Here are a few things I've picked up working on a large Clojure/Clojurescript
app the last several months. Some of this is just personal opinion or what
works for me, so as usual YMMV.
1) Reagent vs Om - I went back and forth (several times) between these two
early in the project. I'm using
Reagent is more than just a thin veneer over React. It does quite a bit of
work, just as Om does. This is subjective, but Reagent feels more easy than
simple to me. Sometimes, that’s what you want; sometimes it’s not. But: I’ve
barely touched Reagent myself, so take that with a large grain
Is it true that om really wants to manage the entire application state in a
single atom. So we might have an atom map structured with keys referencing
each functional area {:car-search {} :patient-search {} ...}? I understand
that this isn't inefficient as components receive a cursor into
On Wednesday, October 29, 2014 3:48:35 PM UTC-5, Scott Nelson wrote:
When using Om's cursors I had a number of top level entries in the app state
(i.e. things like current route, error messages, current user, etc.). Mike,
how are you modeling these kind of singleton objects as DataScript
Sounds like a IE8 issue. I've never seen anything like that low performance,
even on mobile. Are you using any polyfills or shims?
Check out the section Browser Support and Polyfills here:
http://facebook.github.io/react/docs/working-with-the-browser.html
--
Note that posts from new members
Right, this is standard asynchronous programming. It takes awhile to wrap your
head around it if you haven't done much of it before.
It looks like you are using the session namespace from Dmitri's examples
(excellent starting point, BTW). Since this is already wrapping a reagent
atom, the
It really depends on the context. Some data you might want to pre-load once
and be done with it. This is usually good for more static data or app
configuration. Most data you need to load on-demand. An example from my
job-tracking app I'm currently working on: based on the logged in user,
the array into a list:
(defn ls-dir
[path]
(let [files (.readdirSync fs path)
len (alength files)]
(for [i (range len)] (aget files i
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you
is
really significant.
If you want to mix `:none` with a unittest framework, then this may help:
https://github.com/mike-thompson-day8/cljsbuild-none-test-seed
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because
On Friday, November 28, 2014 3:21:09 AM UTC+11, Kyle Cordes wrote:
On Thu, Nov 27, 2014 at 7:08 AM, Colin Yates colin.ya...@gmail.com wrote:
Mike, that's brilliant. Downloading it now.
It is a great thing to have handy, and it is also points to another
example of the problem I
well.
I've found it a delight to use.
Here's the library: https://github.com/reagent-project/reagent
Here's the overall project: https://github.com/reagent-project
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received
/javelin, than OM.
--
Mike
--
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 emails from it, send
There's nothing wrong or inefficient with using a single atom for your state in
Reagent. I do that more often than not, and it works fine. As I understand
it, the Reagent model is this: when you deref an atom, that is Reagent's cue
to re-render any components that reference that atom
No problem, glad I can help. Feel free ask more questions as you work on your
port, either here or on the reagent-project list.
--
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
There's a nice example of how to do this here:
http://yogthos.net/posts/2014-07-15-Building-Single-Page-Apps-with-Reagent.html
About.halfway through the article, he implements a multi-select list component,
which is basically the pattern you are looking for.
--
Note that posts from new
Good stuff.
Has anyone tried using Clojurescript with AWS Lambda?
--
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
Personally, I would have a hard time justifying Angular for new work,
especially if it's a commercial project. Given recent announcements from the
devs, you are left with a choice of using the 1.x versions, which will not be
compatible going forward, or planning around the 2.x release which
Yes, Sean has switched to Reagent and has been very active in its recent
development. I also use Reagent most of the time, as well as a newer library
called Rum that I find quite interesting. I've used Om quite a bit in the
past, and they're all great libraries, just depends on your
Try the :pseudo-names compiler option to see what the :advanced code is
referring to
(https://github.com/clojure/clojurescript/wiki/Compiler-Options#pseudo-names).
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message
Brendan makes some good points. Obviously I have a strong preference for
Clojurescript (and this IS a CLJS list), but my intention was not to promote
exceptionalism and I apologize if it came across that way.
I have always viewed the relationship between React and Clojurescript as
symbiotic
1. There is no need to fork React now or in the future because React is a
library specified for one purpose, not a framework that can get bloated over
time.
Now - I don't see any benefit that would justify that.
Future - Who knows? I never claimed to have a crystal ball. My 2 cents is
FYI, Kioo works with Reagent as well.
--
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 emails from
On Sunday, February 8, 2015 at 12:11:22 AM UTC+11, Colin Yates wrote:
Reading Dynamic Children in
https://facebook.github.io/react/docs/multiple-components.html might
provide clarity.
I think the key needs to be globally unique (where globally refers
to the set of rendered elements rather
Could you give more details? Are you looking for client-side only
authentication, or can you authenticate on the server. There are a lot of
options, so more details on your requirements would help narrow down the
choices.
--
Note that posts from new members are moderated - please be patient
The short answer is that React is doing the heavy lifting for you.
Conceptually, you can just think of it as your app rendering the entire DOM on
every state change. It is a very functional approach, because you can think of
rendering as a pure function that takes your app state as input and
Yeah, I guess client vs server side was confusing. I think Oauth is what
people usually think of as client side, although technically authentication is
still happening on a server (just not yours). My point was more that with a
SPA (which I assume is what you are building if using Om) there
Well, Reagent and Om will trigger the renders for you as well, and even batch
renders.
What sounds novel about your approach is doing the same thing for canvas and
webgl. Are you saying you have a library that does this for the dom, canvas,
and webgl all at once? That I would be interested
Always glad to help.
Probably the biggest caveat with React is that you have to break old habits of
trying to directly manipulate the DOM, and be careful with other libraries like
jQuery that directly manipulate the DOM. It is possible to integrate things
like jQuery components with React,
Also, see:
https://github.com/clojure/clojurescript/wiki/Compiler-Options#static-fns
--
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
I have a question for you (or anyone else):
I have a lot of demo code I would like to share from my last project, and
permission to do so minus certain proprietary bits. I see 2 main ways of
sharing the code:
1) extract several demo apps, removing the proprietary info and maybe
simplifying
I might do that, since I promised some examples of Rum I might as well knock
out both.
Hang in there just a little longer - I'm between jobs right now and I've been
busy getting out resumes. After I get them out to all the companies on my
list, I will be focusing on demo apps.
--
Note that
I came up with a compromise I think will work well. I'm going to simplify the
app a bit, remove proprietary parts, and then release the whole app as an
example. Then I'll use it as a basis for a series of tutorials for exploring
more advanced options.
--
Note that posts from new members are
Don't be embarrassed- even if you think it's over engineered or won't work out
or whatever, you still tried something different - that's more than 90% of
people can say. I've been curious about your approach since you first
mentioned it, even though I wondered about its feasibility. I'm glad
David - care to share those ideas with us? I for one would be interested in
hearing the feedback you gave them.
--
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
I'm not really interested in their specific implementation, but the overall
approach is interesting. I'm not interested in using GraphQL - we already have
good options for describing the shape of our data, like Herbert and Schema. If
you use Datomic, there's even the option to build your
I've spent the last few days digging into Rum (insert hangover joke here) and
it's awesome!
I started out porting a non-trivial Reagent app to Rum, which ended up taking
only a few hours by utilizing the rum/reactive mixin. Of course, during this
process I saw several places where taking a
I'll be able to answer that better after this weekend. I'm working on porting
my current paid project to Rum, based on what I learned from experimenting with
it over the last few days. Based on how that goes I will make the decision
whether to use Rum or stick with Reagent for the rest of
So just to be clear, this is a compiler change only? There are no proposed
changes to namespace loading, i.e. if you load a namespace and the module
hasn't been loaded yet, it will just fail?
That's fine with me, I just want to make sure everyone's on the same page.
--
Note that posts from
First, I want to point out that I am NOT knocking Reagent at all. I have used
it for months now and I like the library and have been a very vocal proponent
of it on this group and elsewhere. For many if not most apps, it's all you
will ever need.
That being said, there are 2 challenges I am
There are 2 use cases I would like to see supported by this:
1) generating multiple apps from the same code base. For my current project,
there is the main web app, an admin interface, and a mobile (Cordova) version.
There is a lot of shared code, and currently I am just cheating and building
Hi Jonathon, try the :pseudo-names compiler option [1] to get more insight into
what might be going wrong with your is not a function error.
[1] https://github.com/clojure/clojurescript/wiki/Compiler-Options#pseudo-names
--
Note that posts from new members are moderated - please be patient
a Blob in the first place.
--
Mike
--
Mike
--
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 emails
, make it a function which reads a value out of app-db (which was
put there via event handlers and user interaction)?
--
Mike
--
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
. It certainly
works!
With re-frame I tried to not have that problem in the first place (so then I
didn't need a solution for it).
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed
The approach used by om-sync (optimistic update) is the right approach, IMO.
I'm a big fan of Firebase, and one of the things it gives you for free is
optimistic updates, and it works with any front-end library, not just Om.
With Firebase, it's really easy - just register listeners for your
On Wednesday, March 18, 2015 at 1:09:12 PM UTC+11, Mike Haney wrote:
In my experience, using component local state seems harmless enough in the
beginning, but I almost always find a need to move it to global state as an
app matures. A few common examples:
- text input: local state works
navigation of the
resulting source fairly easy. Its always seems pretty clear where to look for
something.
Mike Haney's code might also provide some guidance:
https://github.com/mdhaney/homesale-clj/tree/master/src/homesale
Your example has the complication of using resumablejs, but I can see
On Monday, March 16, 2015 at 7:35:40 PM UTC-4, Josh Nursing wrote:
I am being frustrated in trying out the latest Clojurescript release on Mac
OS X Yosemite. Not sure what I am doing wrong. I follow the Getting Started
instructions and get this error on launching java -cp cljs.jar:src
://github.com/clojure/clojurescript/wiki/Patches#testing-patches
- Mike
On Mar 17, 2015, at 12:56 AM, Kristján Oddsson kodds...@gmail.com wrote:
I'm battling something similar to CLJS-1124 and so I wanted to try to figure
out if I could make some changes to the compiler myself and maybe even
at reactconf, they appear to be heading in the
derived data all the way down kinda direction themselves. The data from
declarative queries flowing via Relay/GraphQL into components. Etc, etc.
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You
You might want to check out this article:
https://github.com/Day8/re-frame/wiki/Alternative-dispatch%2C-routing-%26-handling
Using techniques MikeT describes there, it should be possible to slowly migrate
your app to re-frame rather than undertake a rewrite. For instance, it should
be
If that is true, then it is a problem, indicative either of a widespread
lack of discipline among the tool makers or (more likely) a strong need for
some additional well-specified (and maintained!) APIs in the compiler for
tools to hook into.
Sometimes it is just a simple bug or lack
I'm really enjoying re-frame. I've tried several different architectures over
the last 6 months and ended up with something about 80% similar to the re-frame
approach. The key piece missing for me was reactions - there is absolutely no
documentation on them in Reagent, but knowing about them
Read the whole README for re-frame and it will all make more sense.
I don't think reactions are pub/sub - usually those are implemented using atom
watches. The event dispatch mechanism, however, is like pub/sub. I noticed
the library uses core.async, so they very well may be using core.async
. In the future there might be many, who knows. re-frame and a reagent
reusable component library are different layers.
--
Mike
--
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
On Tuesday, March 10, 2015 at 3:35:19 AM UTC+11, marc fawzi wrote:
one glance at the re-frame wiki (searched for: reaction)
https://github.com/Day8/re-frame/search?utf8=%E2%9C%93q=reaction
and I realize now it's some form of pub-sub ... so I can guess the kind of
abstraction Mike
then use
whatever fancy reusable components you want on top of that. Don't get the two
confused -- they are different layers.
--
Mike
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed
On Tuesday, March 10, 2015 at 2:03:00 PM UTC+11, Mike Thompson wrote:
On Tuesday, March 10, 2015 at 2:14:42 AM UTC+11, Mike Haney wrote:
I'm really enjoying re-frame. I've tried several different architectures
over the last 6 months and ended up with something about 80% similar to the
re
Hi Roger,
Are you using a REPL and is console output going to your REPL? (Some REPL
implementations queue asynchronously printed output and only print it when a
response to a form evaluation needs to be printed.)
- Mike
On Mar 8, 2015, at 3:15 PM, Roger Gilliar roger.gill...@googlemail.com
On Sunday, March 8, 2015 at 5:51:06 PM UTC+11, Nils Blum-Oeste wrote:
Thanks Mike, I had seen that already. IMHO it does not really explain this
properly because props are only used in the render function in that example
but not in the lifecycle hooks.
My current solution is to use
)
--
Mike
--
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 emails from it, send an email
On Sunday, March 8, 2015 at 8:10:07 AM UTC+11, Nils wrote:
Ilya, did you figure something out to do this in a nicer way?
I am struggling with this too.
This should help:
https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components#form-3-a-class-with-life-cycle-methods
--
Note that
On Sunday, March 8, 2015 at 10:11:43 PM UTC+11, Mike Thompson wrote:
How would you allow an event handler to register for all events? Right now
each one is required to explicitly register for each event via keyword. I
have modified re-frame to allow handlers to also register a function
.
You could implement whatever routing system you wanted operating out of that
one handler.
--
Mike
--
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
On Saturday, March 14, 2015 at 2:52:45 PM UTC+11, AndyR wrote:
On Friday, March 6, 2015 at 11:28:59 PM UTC-5, Mike Thompson wrote:
re-frame is a pattern for writing SPAs, using Reagent.
https://github.com/Day8/re-frame
[...]
- pushes Reagent's FRP capabilities (via use of reaction
On Friday, March 13, 2015 at 1:31:01 PM UTC+11, Mike Thompson wrote:
On Friday, March 13, 2015 at 6:04:21 AM UTC+11, Jamie Orchard-Hays wrote:
As I'm starting to explore re-frame in a playground app, one of my first
questions is how does one namespace handlers in a medium to large app
:foo/update-name
)
Is this your approach Mike, or do you handle it differently?
Let's say you have N panels which you'd like to treat as separate for some
reason. These panels might be different tabs, dialogs, popups, etc.
Under src/panels, we create a folder for each panel
chapters in on
reagent/js-library patterns.
--
Mike
--
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
Perhaps the same: http://dev.clojure.org/jira/browse/CLJS-1105
http://dev.clojure.org/jira/browse/CLJS-1105
Fixed with a recent commit:
https://github.com/clojure/clojurescript/commit/4bcc95175e4282d43ed74bf0abd670550fc40140
1 - 100 of 266 matches
Mail list logo