This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-26
Channels
- # aws (1)
- # beginners (15)
- # boot (30)
- # cider (13)
- # cljsrn (16)
- # clojure (458)
- # clojure-dev (15)
- # clojure-france (131)
- # clojure-greece (124)
- # clojure-korea (2)
- # clojure-spec (42)
- # clojure-uk (115)
- # clojure-ukraine (1)
- # clojurescript (103)
- # component (18)
- # cryogen (1)
- # datomic (4)
- # dirac (3)
- # figwheel (1)
- # funcool (13)
- # hoplon (60)
- # luminus (2)
- # off-topic (2)
- # om (28)
- # onyx (45)
- # parinfer (28)
- # pedestal (1)
- # proton (23)
- # re-frame (18)
- # reagent (36)
- # ring (1)
- # ring-swagger (5)
- # untangled (13)
- # vim (9)
ok, I have yet to try the other one yet so thanks for the update
not that I know anything, but wouldn't that be "when-let?"
@vigilancetech with-let
returns the bound element. In the example that would be canvas-elem
.
hmm... know where I refer them from?
I think I tired that, and hoplon.hoplon, and google 😕
ah, ok, I'll try that micha
yup, its there. Canvas-elem is automatically in the namespace in a *.hl file apparently.
but no love on getting it to render: 67Uncaught Error: Invalid child of type function HTMLCanvasElement() { [native code] } with values (#<Cell: :top>).
im still half-way reading thru the discussion, but let me add some thoughts to > what about when Lein-hoplon comes around? Do we merge that too? by @flyboarder there is the example of https://github.com/weavejester/environ which supports both a boot task and a lein plugin the boot task was separate before under https://github.com/danielsz/boot-environ our situation might be different, but i think it is a good and small example which might help to understand the situation
@onetom they key thing that clarified for me is: the boot-hoplon/lein-hoplon tasks/plugins will always be backward compatible
and if they ever aren't, there's a bug and we need to push a new version
acknowledging this gets us out of all the maven-related reasons i could think of to need separate deps
@dm3 im still using boot-hoplon
to generate the index.html
& index.html.js
but im entertaining the idea of just doing that manually, so it's explicit and there is no magic hoplon_app_pages
namespace is created (which i still cant remember how is it called exactly)
but otherwise im just referring [hoplon.core :as h]
and [hoplon.ui :as hui]
with a few frequently used :refer
s and otherwise use explicite namespace alias prefixes when referencing symbols.
i have a src/template.cljs
just as a reference where i can copy-paste the boilerplate from:
(ns template
(:refer-clojure :exclude [+ - * /])
(:require
; Assign NS aliases and refer most common symbols
[javelin.core :as j :refer [cell]
:refer-macros [cell= defc defc= cell-let with-let]]
[hoplon.core :as h :refer [defelem when-tpl if-tpl case-tpl for-tpl]]
[hoplon.ui :as hui :refer [elem]]
[hoplon.ui.attrs :refer [+ - * / c r pt em px d]]
[hoplon.material :as mui :refer [container row paper]
:refer-macros [form-with]]
[hoplon.material.colors :as c]))
@alandipert you mean backward compatible amongst major versions, right?
so when we renamed holpon.core/meta
to hoplon.core/html-meta
we should have incremented hoplon's major version number, but the released hoplon jar would contain an unchanged boot-hoplon task?
the hoplon jar would contain the task that is guaranteed to work with that specific version ofhoplon
in other words, if you have a project that uses hoplon version X and you use boot-hoplon from hoplon version X, and you update hoplon to version Y your project will still build with no changes
Imo merging boot-hoplon
into hoplon
is a good idea to avoid incompatibility issues. What really troubles me is having to use it. Just having it laying there is just some .clj
files that will go into a jar if one uses such a thing for deploying, if it helps someone I don't see the problem.
Okay, I don't think you always want to maintain backwards compatibility. You might want to rename a flag, alter the behavior of a flag to fix a bug which no everyone sees as a bug, and stuff like that. What would you do I that case? Increment the major number for the sake of boot hoplon task and release a jar with an unchanged Hoplon implementation?
I think that's what the semantic versioning process recommends but it also suggests that something major might have changed in the Hoplon runtime
Which I know is a consequence of ppl treating version numbers primarily as marketing tools, but still...
but it tells you that a feature that you may be using has changed in an incompatible way
Here is an other scenario: Boot 2.7 comes out which makes some options obsolete. What would you do in that case?
i've been looking around on how to use repl to debug hoplon stuff but didn't get very far
boot.user=> (ns hoplon.app-pages._index_DOT_html)
`
i've got to this but then can't really figure out how to reference my functionspages
generate pages, and it's not supposed to be used from other namespaces or pages.
A page has a (page "index.html)
declaration on the top of the file. A namespace has a (ns my-cool-namespace.core)
declaration.
@chbm: it is more for convenience than a requirement
You can just use hoplon like any other lib, but then you must refer things manually
how can Castra’s ring middleware work with an exception reporting type middleware? It doesn’t propagate errors.
The only way I can see to insert exception reporting into a Castra backend is to split the castra middleware in two and inserting my exception reporting in between: https://gist.github.com/AdamFrey/f489f8d7f6a3a63b64ee29e5dc6ca8a3 This is pretty fragile to any changes in Castra, though 😞