This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-08
Channels
- # beginners (52)
- # boot (230)
- # cider (67)
- # clojure (166)
- # clojure-canada (1)
- # clojure-dev (91)
- # clojure-japan (6)
- # clojure-korea (1)
- # clojure-russia (2)
- # clojure-uk (10)
- # clojurescript (222)
- # core-async (27)
- # datomic (5)
- # editors (13)
- # euroclojure (12)
- # ldnclj (10)
- # off-topic (12)
- # om (16)
- # onyx (4)
- # other-lisps (2)
- # overtone (1)
- # re-frame (4)
- # sim-testing (1)
@jwm: Clojure programmers don’t very often, one place where it makes some sense is AWS Lambda where the startup time might be an advantage over the JVM.
Hi I'll be doing some streaming of a graph visualizer with cljs+emacs at http://www.twitch.tv/escherize/ in a minute or two
@jrychter: nice website. wonder what's your experience of dealing with css in writing a component?
@rui.yang: Semantic UI does 99% of that for me. For customizations, I tend to use their theming system (although the npm/gulp build tools are terrible). I try to stick to out-of-the box look as much as I can, to cut costs.
@jrychter: so basically when writing a component, you'll have to choose the css framework. and the component will be tight to the css framework.
@rui.yang: yes, I write everything with one CSS framework in mind. I can't see another way, you'd end up with components trying to be everything to everyone. Plus, I rather like how the resulting code looks like:
[:div.required.field
[:label "Login"]
[:div.ui.icon.input
(ui/autofocused-element :input {:type "text" :value (:login @local-state)
:autoCapitalize "off"
@rui.yang: I used to try to write universal libraries all the time. Now I focus on apps, and when you do that (on a schedule), you tend to choose more practical solutions.
@dnolen: Had been hanging to see the video on Om Next. I'm currently going through Living Clojure and feel like I am picking up Clojure well and thoroughly enjoy it and the community. I'd love to start playing with Om Next as soon as it is released is there an approximate ETA for it or is that yet to be announced?
@grounded_sage: maybe by end of summer? But not sure. There’s no rush on my end. There’s a lot of little design details to get right.
I'm also feeling like I am partially at a crossroads. I have purchased some Meteor books and dived into Meteor/JS as my first introduction to programming but upon diving further into Clojure I feel like this is the space to be. I intended on using Meteor to build my start-up, perhaps doing some hybrid stuff, but with DDP and Mongo I'm unsure whether I will end up with more of a headache. Has anyone built a forum with Clojure/Script? as that is essentially half of what my MVP will need and Telescope is an ok implementation.
@dnolen: awesome thanks! I'm just going to helping my partner build her law firm using Clojure for a while to get some experience under my belt with it. Perhaps I will stick with basic ClojureScript for the front end as I wait for Om Next to come out before doing more full on things for her business. Then after that I plan to build my start-up. So will be some time away
@grounded_sage: not aware of anyone specifically building a forum with Clojure(Script)
@grounded_sage: people also love Reagent, it quite nice and does more out of the box
I’m curious to see what the other React bindings end up doing around the Relay/Falcor ideas
Yea I'm pretty excited where things are going. I'm actually finding it easier to learn programming concepts from using Clojure and involving myself in the community.
@grounded_sage I completely agree - getting involved with the community has increased my learning significantly
common_creative: i would definitely argue against meteor (if you need somebody to argue against it anyway!)
i used it in a medium-sized project at the behest of a client last year and hated every minute of it
@acron: coming from having no programming experience at the start of the year to where I am now I am very impressed with what I have achieved with my spare time. Although I spent a lot of time and some money in the JS and Meteor community. It seems that Clojure will give me a 10x investment from what pure JS could give me. JS community seems like a lot of hackers, whereas Clojure is a lot of thinkers.
@comma: I was really invested in Meteor and defending it for some time, but things keep getting messier (more stuff to learn which I have little faith in) which I think is due to the large population of hackers in the JS community in general and the very basis of the language not having been well thought out. The reach is the only benefit I see now.
common_creative: i wouldn’t blame meteor’s shortcoming on anybody but the meteorjs team. javascript has its issues yes, but there are many well thought-out projects, look at react!
@comma: True. Perhaps it is because their scope is too large? They are essentially trying to pull in everything JS has to offer and create a glue that makes it easier to choose what [tech / stack?] to use.
I just noticed that cljs's implementation of the clojure.string library is less forgiving than the clojure version. For example, in clojure you can do something like:
boot.user=> (string/replace :this-thing "-" "")
":thisthing"
Just wondering if that is by design or if cljs should accept keywords as string function args?
Just noticed that clojuredocs doesn't have a link to the source code for anything but the core library. Bummer.
@dnolen: It is rather curious that the clojure implementation even points out CharSequence in the docstring:
4. When a function is documented to accept a string argument, it
will take any implementation of the correct *interface* on the
host platform. In Java, this is CharSequence, which is more
general than String. In ordinary usage you will almost always
pass concrete strings. If you are doing something unusual,
e.g. passing a mutable implementation of CharSequence, then
thread-safety is your responsibility."
But then they call .toString
on every string argument so I guess .toString
is really the interface that they expect.Anyhow, to modify a keyword in cljs I should explicitly call name
, modify it, then (keyword result-string)
back into a keyword.
Is calling directly the clj-form
instead of using the match
macro from core.match a bad idea?
@kongeor: it’s not a part of the docs or a really a public thing, so use at your own risk.
In an effort to find a good excuse to learn cljs (since I can't quite learn it through my place of work yet 😠), I'm going to be spending some time over the next couple of months to create a couple of libs that the cljs ecosystem currently lacks
I'm looking to port this little bit of code to CLJS: http://webaudio.github.io/web-audio-api/#a-bitcrusher-node
but am not sure how to approach the fact that the worker is defined in a separate JS file.
I would think that you would build a separate target in cljsbuild (assuming cljsbuild) and then load that file from your main JS.
do you think there no way to make the AudioWorker use functions/code defined in the same file?
@dnolen: Thanks. If there a clean approach to load the patterns from a config file or a db ?
@kongeor: if it’s the only way to do what you want, then go for it, but note that stuff might change and you may have to change your stuff if you upgrade at some point.
@dnolen: and I guess creating a macro that will expand the code from the config data so it can use the match
macro is not possible either, right ?
@comma: I’ve got a close friend who I’m learning to code with who is enamoured with meteor. Could I hear some more of your thoughts about what you didn’t (and maybe what you did) like about it?
sooheon: my main issue with it was the lack of modules or imports or anything of the like so there’s just a massive reliance on making everything global, your state, your vendor libraries, etc
even cljs is getting npm modules working right now but meteorjs won’t let you use them at all
so you end up with hacks like https://atmospherejs.com/cosmos/browserify
also i couldn’t get over having server and client directives in the same file with a simple if (isServer())
block to tell what worked where
I see. I guess at the point of us both being beginners with small projects, those issues are harder to see
@sooheon: for sure, but when those issues do crop up, you will have a big "a-ha" moment
my advice to beginners is to learn those lessons on your own, then youll understand and appreciate thinks like proper modular composition
At last !
Hey everyone. Is there any way I can access stuff that's in the cljs.* namespaces from regular clojure code?
@malabarba: Clojure will only load .clj and .cljc, ClojureScript will only load .cljs and .cljc
oh, there is a way to start a cljs repl with cider. I have not been successful with that.
@malabarba: take a look at gtrak/cljs-tooling
https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/util/cljs.clj
Cider debug wraps around the nrepl eval op, and it adds a reader macro to the *data-readers*
map
No, I can't block, but I think I can rewrite the blocking logic in terms of callbacks.
I would love to maximize code portability across current and future clj impls, like if clj-in-clj ever happens, and everything shares a tools.analyzer-AST, then I only have to write autocompletion once.
Yes, it would be very coupled to piggieback, and AFAIK that's the only way to use cider with cljs
So if you know of a better way to integrate nrepl middleware with cljs, please share :-)
but in general and long-term, I think it'd be awesome to have an nrepl server hosted in cljs.
@malabarba: not sure what you mean, ClojureScript REPLs work more or less like the Clojure REPL
the state of ClojureScript REPLs outside of the standard ones is something I now refuse to touch
@dnolen I guess I got that impression from having to start a cljs rhino repl inside a clj repl. But maybe that's not the orthodox way?
@malabarba: I take it you have not read the Quick Start
you do need a script to kick off a ClojureScript REPL but that’s because we don’t know what REPL you want to use.
i don't care much about the details of the protocol, but nrepl provides valuable hooks for extension, using eval for everything tooling-related is a non-starter.
being able to push that code down into server level means editors have less work to do to implement common functionality, vim-fireplace is already a client to cider-nrepl for some things. So even though it's possible to have a workflow without it (I write coffeescript in emacs with no repl), cider is one of the things I really miss about clojure.
to be honest I’m not a huge fan of nREPL I think it does too much and adds too much indirection. I’m personally excited to see how Socket REPL ends up if it goes anywhere. If it does we’ll replicate that in ClojureScript.
the middlewares themselves are a small part of cider-nrepl, just being able to pass data around is enough.
cider can probably support messages with evaling a reader literal or something similar.
it seems like the socket-repl design will be enough, negotiating multiple connections sounds like the hard part.
hi, quick question, what's the name of that Clojurescript library that's a very thin layer on React?
thanks, I was unable to find/spell it's name, hehe
om next video: https://www.youtube.com/watch?v=ByNs9TG30E8
Om next looks really nice! Love the datomic pull api like queries