Fork me on GitHub
#beginners
<
2018-06-25
>
joshkh10:06:11

how can i get bidi to recognize a # prefix in the browser? this doesn't seem to work...

(def routes ["#/" {""      :home
                  "about" :about}])

curlyfry14:06:28

@joshkh Just a guess since i don't use bidi, but maybe you have to add a slash before the #?

(def routes ["/#/" {""      :home
                  "about" :about}])

joshkh15:06:42

tried that, no dice unfortunately

joshkh15:06:28

hmm, there's a long standing issue without a resolution https://github.com/juxt/bidi/issues/120

ScArcher18:06:01

I’m trying to create a simple re-frame SPA and I’m having a problem with binding input fields to database values. It works fine on load, but when I modify one field, then modify the next, the first loses it’s value.

ScArcher18:06:30

I’m also using figwheel and if i print the “db” in the repl it doesn’t look like it is getting updated.

ScArcher18:06:42

I’m not sure if the db in the repl is the same one as in the browser or not.

Logan Powell19:06:55

Qq: How would I filter by a type?

dpsutton19:06:29

can you show us what you are calling a type?

Logan Powell19:06:46

e.g., PersistentArrayMap?

dpsutton19:06:21

does map? work for you then?

dpsutton19:06:15

does the (source map?) help?

dpsutton19:06:19

ah. well good then 🙂

dpsutton19:06:31

you can see exactly what its doing so you can make your own type predicates

Logan Powell19:06:44

that's a good idea!

dpsutton19:06:38

doc and source are fantastic ways to get up to speed with language idioms pretty quickly. happy coding 👍

Logan Powell19:06:21

I didn't even think of that. Thank you for the super friendly and quick reply!

Logan Powell19:06:38

You guys are the best

zlrth20:06:22

false
user> \u2013
\–
user> (= \u2013 \-)
false
user> (= \- \-)
true
user> 
why doesn’t \u2013 equal \-? and, what comparison function should i use to get the equality i want?

zlrth20:06:55

user> (= (eval \u2013) \-)
false

hiredman20:06:08

they aren't equal

mfikes20:06:19

One is a tidbit wider right? 🙂

zlrth20:06:00

d’oh! of course

hiredman20:06:01

user=> (int \u2013)
8211
user=> (int \-)
45
user=> 

mfikes20:06:06

One is \u002d

zlrth20:06:21

that’s the whole reason i’m doing this task! the en-dash wasn’t properly encoded! again, d’oh.

zlrth20:06:07

thanks everybody!

mfikes20:06:38

Any time—dashes are awesome!

justinlee20:06:35

I see what you did there.