Fork me on GitHub
#hoplon
<
2016-07-01
>
adamw06:07:23

@jumblerg: woo, thanks! +1

jumblerg13:07:41

@micha: i think we should rework the page macro in hoplon so that the element constructors need to be imported explicitly

jumblerg13:07:01

:refer :all if you want the current behavior

jumblerg13:07:07

more like the ns macro

alandipert13:07:39

maybe just switch to the ns macro with metadata on the NS to denote html file name?

alandipert13:07:10

at least, we could start to support that and still support page

micha13:07:24

yeah i like it

micha13:07:29

also perhaps the hoplon compiler can add :refer :all capability

micha13:07:00

in the :require clauses

micha13:07:48

@jumblerg you can achieve what you want now though

micha13:07:29

with :refer-hoplon :exclude

jumblerg13:07:41

all my code looks like this

jumblerg13:07:59

(page "index.html"
  (:refer-clojure
    :exclude [-])
  (:refer-hoplon
    :exclude [elem rt title input form b s section])
  (:require
    [clojure.string         :refer [capitalize]]
    [hoplon.ui              :refer [elem image video *data*]]
    [hoplon.ui.attrs        :refer [- c r s b d]]
    [hoplon.material        :refer [field action-button]]
    [hoplon.material.colors :as c :refer [white teal grey grey-300 black]])
  (:require-macros
    [hoplon.ui :refer [button form window]]))

jumblerg13:07:42

and the exclude list keeps growing, typically each time one of the implicitly added primitives bites me.

alandipert13:07:59

maybe use a separate task? like do string templating basically

alandipert13:07:27

my thinking is maybe there are more general ways to deal with ns and page nonsense

alandipert13:07:22

are you doing this in lots of files?

jumblerg13:07:12

anytime i have an .hl file

jumblerg13:07:20

i mean, take just about any word you’d use to describe a user interface abstraction, and there’s some semantic html tag for it that gets jammed into your namespace and clobbers it.

alandipert13:07:54

it's the hoplon tradition

jumblerg13:07:52

yep. and our designer in residence, @chromalchemy, just joined in.

jumblerg13:07:28

to the extent that hazing is a tradition.

micha16:07:48

@jumblerg: a boot task could be the best solution