This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
@dnolen: Yeah, I assume they want the rights to it. (Nothing on their website, but I’m assuming that’s the case.)
Wow. Jelly stains. Thoughts on JavaScript, LISP & Play https://youtu.be/AnzMEdC2FDk
@mfikes: I think that was just after cljsbuild appeared, good REPL story, source maps - non-existent
just bootstrapped cljs
eval working in the browser!
I never thought it would happen
is it known to work with advanced optimization?
@ericnormand: David said bootstrapped would only work with :none
and :simple
thanks
I looked around in the docs, but couldn't find it
can I help out by recording it somewhere?
That’s a good question. I don’t even think the new cljs.js
stuff or things about bootstrapped even have a page for stuff like this.
Perhaps it could just go as notes to the existing compiler options page (where :none
et. al. are described.)
was thinking here: https://github.com/clojure/clojurescript/wiki/Bootstrapped-ClojureScript-FAQ
In truth, that page was created to answer the frequently asked question about whether bootstrapped ClojureScript means we can develop without Java.
The other place is https://github.com/clojure/clojurescript/wiki/Compiler-Options#optimizations
you say "the new cljs.js"
where is that?
or what is it?
That is the new namespace that contains the support for making use of bootstrapped ClojureScript.
I'm trying to make an embeddable compiler widget for my blog
and my courses
but it's kind of big to put on the blog
I just took the browser/cljs_bootstrap/dev.cljs
and modified it
oh, nice
I did not see that
interesting
The overall goal is, if you want to use bootstrapped ClojureScript, you can simply make use of that cljs.js
and call, maybe eval-str
it can load libraries
I can't see needing that just yet
I really wanted a textbox that people could try to implement map
in
Planck is using it here, if you are looking for another example client https://github.com/mfikes/planck/blob/master/ClojureScript/planck/src/planck/core.cljs#L97
I think Joel Martin recently updated http://ClojureScript.net to use cljs.js
is state to hold def
's and things?
the environment, that is
I’m not sure…. I think source map info is dropped in there. I haven’t looked in the state atom yet to see what’s really in there
so you just need to create an empty one and keep using it?
I just started the Jelly Stains video
and I'm amazed by how small @dnolen's hair is
well, it would be nice if advanced worked
would be much smaller
is there a reason cljs.js/compile would always return ""
?
or, rather, always return "" when compiling a literal value
thanks
what does context do?
It is telling it the context of what is being evaluated. Like expression, statement, return. AST concepts. So for a REPL you are giving it an expression to evaluate. Especially a literal like 1
but now it's throwing an assertion error
not sure why
my fault
wrong number of arguments 😞
FWIW, David has only recently (a day or so ago) finished coding up that stuff and Joel Martin and I have been trying it, finding defects, logging JIRAs.
thanks
hmmmmm
it's amazing this works
still some things I don't understand
but they'll have to wait till morning
thanks so much!
this is awsome!
does anyone know how to bring other namespaces into the compiler environment? (e.g. clojure.core)
@mhuebert: In Planck: https://github.com/mfikes/planck/blob/master/ClojureScript/planck/src/planck/core.cljs#L101
@mhuebert: Neither. See the demo at the bottom of http://blog.fikesfarm.com/posts/2015-07-16-fast-javascriptcore-desktop-clojurescript-repl.html
@mfikes so for browser usage, the load-fn needs to find js or cljs source for whatever path is required
To make Planck be useful, my plan is to implement I/O facilities and other stuff as well as making it support this
Usage: planck [init-opt*] [main-opt] [args]
With no options or args, runs an interactive Read-Eval-Print Loop
init options:
-i, --init path Load a file or resource
-e, --eval string Evaluate expressions in string; print non-nil values
main options:
-m, --main ns-name Call the -main function from a namespace with args
-r, --repl Run a repl
path Run a script from a file or resource
- Run a script from standard input
-h, -?, --help Print this help message and exit
The init options may be repeated and mixed freely, but must appear before
any main option.
Paths may be absolute or relative in the filesystem
@mhuebert: For any JavaScript environment, in order to support requiring code, *load-fn*
needs to be properly implemented. The requirements of that function are documented fairly well.
@mfikes: yeah I’ve been going over those docs. I’m a bit confused about what kind of string to return for, say, clojure.core.
@mfikes: as a basic example, (ns cljs.user (:require clojure.core :refer [shuffle]))
@mfikes yeah, that would be it. I can type in (clojure.core/shuffle [1 2 3 4]) and that works too but maybe its mapped to cljs.core/shuffle
@mhuebert: Interesting. I’ve never gone down that path. There is this: http://dev.clojure.org/jira/browse/CLJS-1362
if I eval-str (fn[{:keys [a b]}] nil ) I get warnings - WARNING: Use of undeclared Var cljs.core/not
for not, apply, hash-map, get
@dnolen: How safe is cljs.analyzer
for tooling to use? Boot-cljs currently uses *cljs-warning-handlers*
, *cljs-warnings*
and with-warning-handlers
.
They are used to check if any warnings happened during the build.
@juhoteperi we recently discussed this in #C07UQ678E , cljs.analyzer
changes often and tooling should use cljs.analyzer.api
instead.
@juhoteperi: (that is in general, boot-cljs might have special needs)
Yeah using api namespaces would be preferred, but it doesn't currently provide anything for this use case.
Has anyone experienced [object Object] is not iSeqable
error ?
i was trying to do this (for [i vector-of-list] [:custom-reagent-component i])
@juhoteperi: it’s not safe to use at all. if you use it you should expect your library to break all the time.
@juhoteperi: if there’s something people need start opening enhancement tickets + patches.
@juhoteperi: for example changes likes this https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer/api.clj#L20-L29
now users don’t have to know about the cljs.env
namespace, or have a confusing name that clashes with analysis environments, etc.
Are there any spread-sheet library in Cljs like http://handsontable.com ?
@lazy-lambda: It probably means that vector-of-list is not a sequence, since for
requires a sequence and (seq? []) => false
@bensu: the vector-of-list
thing was actually an atom and I forgot to deref it. Silly Me. I should have updated here though. Thanks.
Does anyone know of a way to pass figwheel a port number at runtime?
Or, barring that, to assert a leiningen option at runtime?
@chancerussell I think that is configurable: https://github.com/bhauman/lein-figwheel#figwheel-server-side-configuration but maybe I didn't understand your question?
Yeah, I’m just looking for a way to set it at launch, rather than by modifying project.clj
I've not used figwheel directly; I've always used chestnut. There are two ports one for the HTTP server and one for websockets. If you are using the Chestnut template you can control the HTTP port via the PORT env variable.
Hmm, tried but no luck. May have to just use sed the project.clj
Cool, I’ll check on how Chestnut does it.
Thanks!