Clojurians
#hoplon
<
2016-07-03
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

myguidingstar11:07:16

fyi I just tried Tonsky's Rum react library with Javelin. Code became much more declarative. Thank you all

micha14:07:34

@myguidingstar: do you have an example to look at?

myguidingstar15:07:13

sure. I'm making a simple gist

myguidingstar15:07:11

hmm, too bad. There's no service like codepen for Clojurescript that allows us to specify arbitrary build dependencies

myguidingstar15:07:21

or at least popular libraries with any version

micha15:07:48

oh interesting, i see it

micha15:07:08

it's adding watches at the side effect layer, where it interacts with the dom directly

micha15:07:18

similar to what hoplon does

micha15:07:33

the rum/react part

micha15:07:57

that's legit

myguidingstar15:07:13

among the Reactjs hype in Cljs community, Reagent is more famous :slightly_smiling_face:

jumblerg16:07:25

noteworthy use of the term toolkit rather than framework from tim fox to describe vertx:

Another important point is that Vert.x is toolkit, not a container or "framework". That means you can use it within your existing application to give it the Vert.x super powers. For example you can use it within your Spring application, and many users do.
perhaps hoplon should adopt this sort positioning statement, esp in light of the previous conversation.

jumblerg16:07:18

javelin, castra, hoplon, etc. are designed to work together, but can all be used independently of each other in the some sense.

micha16:07:26

@jumblerg: almost ready with a solution to the page ns business

jumblerg16:07:39

@micha: awesome

jumblerg16:07:03

that thing has had me cursing for years.

jumblerg16:07:36

yeah, much better!

jumblerg16:07:07

adding metadata to the existing ns macro will make tooling happy.

jumblerg16:07:37

more lisp-can-doit-ey.

micha16:07:02

the ns macro is very un-LCDI

micha16:07:13

it's its own little non-lisp interpreter

jumblerg16:07:16

this much is true

jumblerg16:07:52

but it is more clojurey, at any rate

jumblerg16:07:00

warts and all

micha16:07:05

it's a thing

micha16:07:10

that much is true

jumblerg16:07:56

hijacking my symbols is not LCDI

micha16:07:57

all this does is create the html file and .cljs.edn file in boot-hoplon

jumblerg16:07:16

its terrorism

micha16:07:23

you can choose different symbols

micha16:07:46

it's not like hoplon hijacks your symbols lol

micha16:07:57

it has its own symbols

micha16:07:25

this should solve that though

jumblerg16:07:26

i def a symbol, p. i tell p to do a thing. hoplon page puts a gun to p and forces it to do something else.

jumblerg16:07:46

call it whatever you want.

jumblerg16:07:35

hoplon is evil, obviously.

jumblerg16:07:22

(in a god-hates-computers sort of way)

jumblerg16:07:22

i think the key difference between the page macro vs reserved words or even an implicit :refer :all is that it shadowed me instead of the other way around.

micha16:07:08

that's just the way cljs works

micha16:07:19

nothing to do with the page thing

micha16:07:04

all it does is add :refer names to the :require clauses

jumblerg16:07:15

(def comp "foo")
WARNING: comp already refers to: #'clojure.core/comp in namespace: boot.user, being replaced by: #'boot.user/comp
#'boot.user/comp
boot.user=> comp
"foo”

micha16:07:34

that's clojure

micha16:07:47

clojure has full namespace support

micha16:07:05

in cljs there aren't namespaces like that at runtime

jumblerg16:07:14

it will at least warn me

micha16:07:33

i mean how so

micha16:07:43

the page thing isn't doing anything with names

micha16:07:48

it's just adding :refer

micha16:07:58

so warnings and all that are left to the cljs compiler

jumblerg16:07:18

(def comp "foo")
foo
comp
function cljs$core$comp(var_args){ var args9221 = []; var len__6905__auto___9248 = arguments.length; var i__6906__auto___9249 = (0); while(true){ if((i__6906__auto___9249 < len__6905__auto___9248)){ args9221.push((arguments[i__6906__auto___9249])); var G__9250 = (i__6906__auto___9249 + (1)); i__6906__auto___9249 = G__9250; continue; } else { } break; } var G__9227 = args9221.length; switch (G__9227) { case 0: return cljs.core.comp.cljs$core$IFn$_invoke$arity$0(); break; case 1: return cljs.core.comp.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); break; case 2: return cljs.core.comp.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; case 3: return cljs.core.comp.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); break; default: var argseq__6924__auto__ = (new cljs.core.IndexedSeq(args9221.slice((3)),(0),null)); return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__6924__auto__); } }

jumblerg16:07:40

interesting, i never made that distinction before.

micha16:07:13

in clojure namespaces are first-class objects

micha16:07:26

in cljs they only exist in the compiler

micha16:07:12

the cljs repl provides a limited extension so you can do things like require or see metadat on vars etc

micha16:07:50

but there is no refer function for instance

jumblerg16:07:41

well, i learned something interesting here

jumblerg16:07:08

doesn’t make getting violated by the page macro any more pleasant though :slightly_smiling_face:

micha16:07:33

shhh just let it happen

jumblerg16:07:58

um, harder?

micha16:07:08

ok i think we're in business here

micha16:07:16

going to push a new version of boot-hoplon

jumblerg16:07:18

clearly lol

jumblerg16:07:24

most excellent

jumblerg16:07:08

i suspect this will also make certain individuals who like to use the more feature-laden development tools happy as well.

micha16:07:47

i don't think you'd be using that stuff in the page namespace usually

micha16:07:05

you'd be using those tools in the namespaces with your implementations

micha17:07:13

like my index.cljs.hl file usally doesn't have any real logic in it, it just assembles things from other namespaces

jumblerg17:07:45

i was just hearing from some folks using ides that were made uphappy by the page up top instead of the ns declaration.

micha17:07:30

those people probably never even tried it

micha17:07:37

it's just a thing to write in a hacker news comment

jumblerg17:07:57

mine often has everything if i’m doing a small static thing

jumblerg17:07:06

if i’m doing a larger app, then it is pretty small

micha17:07:07

if you have to hardcode everything into your ide then i don't know what to tell you

jumblerg18:07:06

what’s the advantage of the :hoplon/refer in the metadata?

micha18:07:36

that's the same as the page thing, but you construct your own namespace

micha18:07:12

separating the things :hoplon/refer :all is another option there

jumblerg18:07:01

what do you mean by constructing your own namespace?

micha18:07:34

you give it your own name

micha18:07:48

rather than hoplon creating the namespace file

micha18:07:57

this is a .cljs file

micha18:07:36

maybe it makes sense to fork cljs compiler actually

micha18:07:40

to support :refer

micha18:07:55

then all the tools would work better

leontalbot18:07:25

@micha seems like a positive change the ns thing