Fork me on GitHub
#hoplon
<
2016-08-17
>
beatngu1312:08:09

Hey guys! I’m trying to dynamically add/remove a CSS class via :class (cell= {:has-error invalid-iz?}) where (defc= invalid-iz? (nil? (re-matches #"|[a-z]{4}[0-9]{4}" iz))). Hence, empty strings and strings like “abcd1234“ should return true. This works fine in my Clojure REPL but doesn’t in Clojurescript. What am I missing?

beatngu1312:08:34

*should return false

dm312:08:55

I'd do (defc= valid-iz? (or (= iz "") (re-matches #"[a-z]{4}[0-9]{4}" iz))). However, not sure why your method wouldn't work

dm312:08:19

did you check the actual value of iz and whether the regex works the same in Javascript?

beatngu1312:08:09

Yes, the value of iz is fine.

beatngu1313:08:16

Is the regex syntax in ClojureScript different?

dm313:08:10

the regex implementation is different

beatngu1313:08:07

Maybe I should read that first… 😊

beatngu1313:08:06

#“^$|[a-z]{4}\d{4}“ did the trick!

beatngu1313:08:33

Sorry for being off topic, thought it might has something to do with my cells.

onetom14:08:28

@alandipert, @micha: what's holding back the next hoplon release?

onetom14:08:23

should it really be considered alpha still? i have the sense that there are a few production apps now out there which are using it without serious issues, so i would release a 6.0.1 for example

onetom14:08:11

are you using the current master at adzerk or you are still on alpha16?

micha15:08:24

we use the stable release version at adzerk

micha15:08:39

have you been using master without problems?

micha15:08:53

we use the latest alpha release

micha15:08:06

sorry misunderstood the question 🙂

micha15:08:37

there is this branch that i'd like to maybe include in the stable release: https://github.com/hoplon/hoplon/tree/responsive-layout-attributes-micha

onetom15:08:57

im using hoplon-ui which by default pulls in alpha16, but it throws a warning about html-object because jumblerg is actually using it with master (but deployed as alpha16, i guess)

onetom15:08:42

but i just gave it a try on our current hoplon ui code and hoplon/master seems even snappier than alpha16

micha15:08:56

excellent

onetom15:08:48

i read the commit msg about ICustomAttribute but didnt quite understand it but given we are using hoplon ui atm, it doesn't seem like an interesting feature for me personally. it would be good though if hoplon ui would be that easy to extend 🙂

flyboarder15:08:13

@micha I did a rebase on boot-hoplon for the jquery split, that could also be worked in, should I rebase against the attributes branch for hoplon too?

micha15:08:02

@flyboarder: perhaps keeping them separate is easier?

micha15:08:38

we should get together and decide how we feel about these changes, maybe add your 👍 to the PR if you like it?

micha15:08:52

i'll make some PRs for features in my branches too

micha15:08:00

and make a milestone for 6.0.0 stable

flyboarder15:08:22

cool, online meet-up for the next hoplon version?

flyboarder16:08:48

Anyone wanna suggest a tentative date/time?

flyboarder17:08:35

Thanks Alan!

sdegutis18:08:37

Hi. Is Hoplon very similar to Reagent?

alandipert18:08:35

@sdegutis: there are some similarities, yes. haven't used reagent a ton myself, maybe others could speak to the differences

sdegutis18:08:34

Why does that template use Clojure 1.7?

sdegutis19:08:01

Oh wow, this whole template has out of date things. It literally doesn't work as of right now.

alandipert19:08:29

@sdegutis: looks like it works if you change clojure to 1.8.0 in build.boot and boot.properties, and then change the ring dep to 1.5.0

sdegutis19:08:37

Great, thanks.

sdegutis19:08:22

@alandipert: Should BOOT_CLOJURE_VERSION=1.7.0 also be 1.8.0 in boot.properties?

sdegutis19:08:10

@alandipert: awesome, I got it working thanks to you.

sdegutis19:08:47

Does Hoplon have anything to generate CSS, or is it assumed something else (Less, SASS, Garden, etc) will be used for that?

micha19:08:18

yes ^^ but you can also use inline styles very well

micha19:08:46

(div :css (cell= {:color my-color-cell}) "foop")

sdegutis19:08:55

Inline styles is okay for small things but not for reusable styles.

micha19:08:59

hoplon/ui leverages this

sdegutis19:08:10

Ah, I'll figure out what hoplon/ui is.

dm319:08:34

CSS is like GOTO, while hoplon/ui is like structured programming with functions 🙂