This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-14
Channels
- # arachne (5)
- # architecture (2)
- # bangalore-clj (7)
- # beginners (96)
- # boot (34)
- # braveandtrue (1)
- # cider (12)
- # cljs-dev (38)
- # cljsrn (59)
- # clojure (326)
- # clojure-dev (35)
- # clojure-greece (1)
- # clojure-italy (6)
- # clojure-russia (47)
- # clojure-spec (16)
- # clojure-uk (25)
- # clojurescript (136)
- # core-async (18)
- # cursive (18)
- # datascript (2)
- # datomic (28)
- # dirac (6)
- # emacs (4)
- # garden (3)
- # hoplon (28)
- # instaparse (1)
- # jobs (4)
- # juxt (1)
- # lein-figwheel (10)
- # liberator (1)
- # mount (3)
- # off-topic (39)
- # om (16)
- # om-next (1)
- # onyx (15)
- # pedestal (9)
- # proton (1)
- # random (1)
- # re-frame (48)
- # reagent (8)
- # ring-swagger (4)
- # rum (3)
- # specter (5)
- # sql (3)
- # unrepl (273)
- # untangled (27)
- # vim (4)
- # yada (7)
https://github.com/oakes/paren-soup <-- is it just me, or is this fucking brilliant ?
Wow that is pretty impressive.
That mixed with https://microsoft.github.io/monaco-editor/ could make for a very sweet clojure editor
sweeet
From the website: > Nightlight is an editor you run inside your Clojure projects. Instead of being a separate application like traditional editors and IDEs, it's just a library that you add to your project. It spins up a web server and provides a completely browser-based interface to edit your code. > By running inside your project, it has complete access to the running state of your program. The ambition is to create something that follows the Lisp and Smalltalk tradition, blurring the line between your tools and your code to provide unprecedented interactivity.
Amazing
I need to try this out!
the instructions aren't completely clear, there's a few boot dependencies it doesn't list
if you're familair with boot, it won't be a problem; if not, I can help you get it working
I use leiningen. It worked out of the box. Setup took literally 4 minutes.
Awesome! One issue I ran into with boot (not sure if leiningen has this problem) is that if you don't provide an index.html, it'll just say "Not Found" instead of "hey, provide a index.html"
anyone doing anything with the Serverless framework?
I’m toying with module processing and Mobiledoc-kit — are there any known limitations with regards to cyclic require()
statements? (these two reqiure each other: https://github.com/bustlelabs/mobiledoc-kit/blob/master/src/js/utils/cursor/position.js & https://github.com/bustlelabs/mobiledoc-kit/blob/master/src/js/utils/cursor/range.js)
@si14 not that I’m aware of but I’d be curious to see what that looks like
@martinklepsch yeah, so do I :)
Hello 🙂 I'm Hyesoo. I would like to apply GSoC 2017 Clojure project based on idea "Add cool features to KLIPSE" from (http://clojure-gsoc.org/project-ideas.html). I wrote a proposal for KLIPSE project.(https://groups.google.com/forum/#!topic/clojure/-V6YdOdoNdU) Could anybody check out and give me feedback? I am happy and open to listen any advice or ideas. Thank you very much. Have a happy day 🙂
question: can i dispatch on multimethods for showing different reagent components according to some dispatch function? It doesn't seem to work, or i'm doing something wrong... is it supported at all?
reagent wasn't build to work like that
you can just use a case
(or similar) with components
Help an old clojurist out: What's the current state of the art for running clojurescript scripts on the linux command line? I work in devops and would like to have some Clojurescript available for little one-off scripts. cljs->node or planck on linux?
If you are on Ubuntu, you can apt-get
http://blog.fikesfarm.com/posts/2017-02-11-apt-get-install-planck.html
@ghadi Lumo doesn’t have nearly as much docs as Planck
but it shares most command line opts
Thanks for all the advice guys. Do you have to do a lot more async
things to use fs abstractions in node? Or is there a way to do stuff like tree-seq
to enumerate directories?
I don't know about the Lumo / Node side, but Planck has planck.core/file-seq
which acts like the Clojure one.
@ghadi every fs
function in Node has a synchronous counterpart
here’s a file-seq
implementation: https://github.com/anmonteiro/lumo/blob/master/src/cljs/bundled/lumo/util.cljs#L190
(ignore js/$$LUMO_GLOBALS.
)
fs
and path
would be (js/require “fs”)
and (js/require “path")
https://github.com/oakes/html-soup <-- anyone have a set of css files to use with html-soup for formatting cljs data as hiccup ?
Anyone working with re-frame
know a good pattern to bootstrap the initial db depending on different build profiles?
@johnnyillinois : is https://www.martinklepsch.org/posts/parameterizing-clojurescript-builds.html what you're looking for?
I'll check thanks!
I think this would work @qqq
@johnnyillinois : awesome! @martinklepsch writes good stuff
Has this bug already been reported? TypeError: goog.string.format is not a function
? This function works in the second last release of cljs.
@hlolli probably not a bug, can you show what you’re requiring and importing?
works for me:
cljs.user=> (require '[goog.string :as str])
nil
cljs.user=> (import '[goog.string format])
nil
cljs.user=> (format "%s" "foo")
"foo"
yes this works for me too @anmonteiro, I guess the cause was that I did not require it, and then probably the older version was more foriging then.
that’s the wrong explanation for what you’re seeing
the fact that something works if you don’t require it may happen if your dependency order allows it
once you add a new namespace your dependency order may shuffle around which causes the error you’re seeing now
yes, well I see this as a good thing then, that it prevents me from using unimported functions. But sadly much code hangs on this (very) bad habit.
folks, my google-fu is failing me, and I don’t see anything relevant in the CLJS google group: does anyone know how to resolve the (I assume common?) issue with phantomjs crashing when using async cljs.test
tests?
Ran 7 tests containing 22 assertions.
0 failures, 0 errors.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
@ddellacosta are you running the latest phantomjs?
oh, let me confirm @darwin
yeah, looks like I’m on the latest
note that I only see the crashing behavior when I add a test using the async
feature of cljs.test
I’m also using async tests with phantomjs and it does not crash on me, so it must be something more specific
huh okay, that’s a clue
are you using it with core.async in particular (as I am) or just to test async behavior otherwise?
if the former, any chance I could persuade you to paste in an example test?
(cutting out some wrapping code) mine looks like this:
37│ (test/async done
38│ (go
39│ (d/page* c
40│ (-> app-state-fixture
41│ (assoc-in [:dashboard :initialized?] false)
42│ (assoc-in [:authenticated :hostnames] [”"])
43│ (assoc :websocket-ready? true)))
44│ (is (= m/LoadDashboard
45│ (type (async/<! c))))
46│ (done))))
c
is a core.async channel, but I suppose that’s obvious
I’m using both, for example here: https://github.com/binaryage/chromex/blob/master/test/chromex/test/chrome_port.cljs#L25
this one is shorter: https://github.com/binaryage/chromex/blob/master/test/chromex/test/chrome_storage_area.cljs#L12
huh okay, not different overall but I wonder if the fact that I’m defining/initializing the channel outside of the async
block is signficant
it’s a bit of a cargo-cult hunch but let’s see
huh, okay, well I guess I’ll review your code further and see if maybe there’s some cleanup you’re doing that I’m not
sorry, what do you mean? Are you referring to mine or yours?
oh well in any case guess it makes sense for me to whittle it down until I can isolate what causes it, if that’s what you meant. Thanks @darwin! I think this should get me a lot closer
yeah, basically trying that now
it does for the record, but simply adding in go
to the mix breaks things
there seem to be a ton of mistakes in closure i18n (number format, at least). Is this known? https://github.com/google/closure-library/blob/master/closure/goog/i18n/numberformatsymbols.js#L1889
so something weird is going on
@isak have you tried to actually clone closure-library repo and look at it in a decent UTF-8 supporting text editor?
@darwin and if you try to give the correct format manually, it chokes. (`.` as thousands sep)
I barely remember I used to have similar problems and it turned out I didn’t include javascript file with proper UTF-8 encoding in <script> tag
Is it possible to get a different macro evaluated depending on clj/cljs? So if I build with cljsbuild
, then one macro is used, with clj, another one.
My use case is, that I have some code that uses conditional reads for a function, but now I’d actually want to use a macro instead of the function
@grav inside macro you can definitely detect if you are in clojure, cljs or self-hosted cljs, and emit code depending on it
Is there any way to access the js/Error message when using thrown?
for clojure.test?