This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-22
Channels
- # admin-announcements (8)
- # beginners (23)
- # boot (121)
- # cider (4)
- # clojure (19)
- # clojure-bangladesh (14)
- # clojure-berlin (3)
- # clojure-brasil (2)
- # clojure-dev (5)
- # clojure-russia (13)
- # clojure-sweden (1)
- # clojurescript (99)
- # clojutre (3)
- # datascript (2)
- # funcool (1)
- # jobs (1)
- # om (23)
- # overtone (1)
- # reagent (10)
- # spacemacs (3)
Hi All. I'm looking for a quick and easy way to have my debugging macros available in all namespaces. Essentially, to help me avoid having to add this everywhere: (:require-macros [my.macros :as my])
Should adding them into the cljs.core namespace work?
@bhauman @escherize: thanks for the kind words :) I'm glad you like it. Wish I'd get to show off figwheel more, but the UI is so simple. It is such a workflow improvement when you're building more involved UIs.
Why is it that (apply (first [+]) [5 5]) results in 10
But (apply (first '(+)) [5 5]) results in : #<Error: No protocol method ILookup.-lookup defined for type number: 5>
@jackschaedler: try
(apply (first `(~+)) [5 5])
@jackschaedler: because the +
in [+]
and '(+)
are not the same thing
user=> (first [+])
#object[clojure.core$_PLUS_ 0x638ef7ed "clojure.core$_PLUS_@638ef7ed"]
user=> (first '(x))
x
in [x]
, x is resolved to the plus function, whereas in '(x)
you're quoting a list with the symbol (unresolved) +
so, the tilde basically allows me to resolve the symbol, but allow the list to remain quoted
in this case, you could also use syntax-quote (x)` which is similar to ' except it does resolve symbols to vars
@jackschaedler: Yes, just like @ragge says, '`' is called syntax-quote and by using '~' you can resolve symbols
My use case is writing out a list of maps within unit tests. Something like '({"a" 12} {"+" +})
would you all find it gross to read (list {"a" 12} {"+" +})
instead?
I haven't been clojuring long enough to know if it's preferred to use the syntax quote or list constructor
k, I'll go with the (list...)
construction for now
thanks for your help!
Hi everyone, I plan to write a blog post aimed at making ClojureScript accessible to JavaScript developers. The idea is to provide answers to concerns that JavaScripters may have regarding ClojureScript adoption (e.g "Is there reasonable tooling?" / "is it accessible to non-academics?" / "is it yet another compile-to-js fad?" / "is there a library for doing <X>?" / etc.). It will probably be in the form of a FAQ . Is there such a resource out there already?
@val_waeselynck: I'm not sure about a central resource. But this faq would be great to have. The ClojureScript wiki is getting better and better.
@magnars: if you get a chance you might want to checkout Devcards it will make short work of the dead. I also know it's hard to set up a screencast with the browser and the app visible. The app has to be tiny. I do a split emacs with half of it onscreen with resources open in the other half.
there’s a lot of work going on there, been working on the landing page points to address some of things you mentioned
@val_waeselynck: if you are not familiar with Jekyll, it’s pretty simple. just drop a faq.md file in the site-jekyll/
folder in https://github.com/cljsinfo/site
you can look at the other .md files to see the “front-matter” that you can for choosing an html layout, etc
but yes, we would love to have some help on common concerns for JS that you were describing
if not there, the ClojureScript wiki would be a great starting point for just laying out the ideas
thanks @bhauman
@shaunlebron: I just want you to know how much I appreciate the fact that we have someone like you in the community creating such an awesome resource. Thank you, thank you, thank you!
@shaunlebron: yes absolutely thank you so much for your amazing contributions
@bhauman, @shaunlebron thanks . Let me layout some ideas on some wiki page of my own. I'll ask you for reviews and we'll see where we should put it
@val_waeselynck, that’s probably the best spot for things like this, and we’ll decide from there what goes on the website
@shaunlebron: let me add up to the encouragements. Making a good façade to ClojureScript is very important
@val_waeselynck: agreed, so important
especially now, with the growing maturity of ClojureScript this year
idk, I feel there’s a kindling enthusiasm for functional programming and immutability in the JS community thanks to React
if you look at the uptake and enthusiasm around Redux, its amazing how these ideas are spreading
now just seems like the right time to start reaching out, and showing them what sane React component syntax looks like, among other things clojure does right
man I need to look at redux then
thanks, will need to bookmark
(gotta get back to my impending failure of an entry for Ludum Dare 33)
Is anyone working on a react component that can eval clojurescript code, similar to what dnolen does here: http://swannodette.github.io/2015/07/29/clojurescript-17/
@mfikes: I think you've talked about going beyond the apple platform. Any thoughts on this?
I'd like to have two different things in a browser page: 1. an input area for a chunk of cljs code that will get eval'd, and 2. an input area that acts like a console repl with at least basic command history recall and maybe autocomplete and such.
I'd love for these to be available in a library that would keep everyone from having to reinvent the wheel.
Obviously it can be done, as dnolen shows an example of the first case on his blog post.
@meow: Yes. I am. In fact, Planck’s been updated to work on Mountain Lion, and to do that meant using the C API to JavaScriptCore. So, one small step towards portability.
But his code hasn't been abstracted into a general component that can be used elsewhere.
@meow: For Ambly: http://blog.fikesfarm.com/posts/2015-05-29-extending-ambly-to-windows-and-linux.html
I may work on such a thing myself, but I have plenty of things I'd like to be working on so would love to hear that someone else is already tackling this.
@meow: I’d be willing to help out with someone else’s, but school is starting up again and I’m hesitant to start a new project myself at this point.
@mkremins: ok, thanks. I'll let you know if I do something myself. Do you think any parts of flense would lend itself to such a thing?
only if you want a structural editor as opposed to a text editor for code input. still haven't gotten around to building some of the live-eval features I wanted flense to eventually have
well, the code that would be input would be cljs, so structural editing would be applicable
So I'm not sure how that would play out in the browser, but I am intrigued by the notion of structural editing.
here’s a brief video demo of flense doing some simple structural editing: https://www.youtube.com/watch?v=Vh9AymZsqEk
@mkremins: yes, looks interesting. I think I'll have to run it myself to fully appreciate what I'm seeing in the video.
@meow: I don’t have direct plans to implement cljs eval component, but I will definitely implement client-side eval in devtools console (cljs-devtools) when chrome devs implement this request: https://code.google.com/p/chromium/issues/detail?id=484261
btw, I think you integrate CodeMirror as a first step, it is not overkill, the library is pretty lean and easy to integrate, IMO
I did that once with Om, it wasn’t that hard: https://github.com/darwin/faceboard/blob/master/frontend/src-editor/editor/views/editor.cljs#L135
you can see it in action here: http://faceboard.io/#/board/b83e600a74da4dbf8f0b/people/patrick
As discussed with @bhauman and @shaunlebron, here's a Wiki page which answers concerns JavaScript developers may voice regarding ClojureScript adoption, in a FAQ-style. I'll add more stuff as ideas come, but I really welcome new questions and answers as well as criticism on the ones I provided. Also, since I am not a native English speaker, I probably made incorrect or poor choice of words, please feel free to suggest improvements here as well. https://github.com/vvvvalvalval/reagent-phonecat/wiki/Questions-about-ClojureScript