Fork me on GitHub
#yada
<
2017-04-07
>
imre12:04:24

I see the path segment thing surfaces again 馃檪

imre13:04:51

I would love to fork bidi and add path segment support but haven't had the time so far

dominicm14:04:01

Why should bidi be path segment aware? I don't really see the use-case?

imre14:04:41

it is possibly an edge case but when you don't take segments into account you cannot do proper url en/decoding

dominicm14:04:57

How do other libraries solve this (do they)

imre14:04:00

I haven't researched other libs I'm afraid

imre14:04:52

the url spec does talk about specs though and that url encoding of paths should be on a per-segment basis

imre14:04:59

it perhaps goes against the principles of bidi but I was thinking a

[["foo" "bar/baz"] :handler]
notation could work instead of
["foo/bar%2Fbaz" :handler]

imre14:04:40

where "foo" and "bar/baz" define segments and you could apply segment-based rules

imre14:04:37

you'll still need to be able to define path-level rules like "take all the remaining segments into a vector" and stuff like that

imre14:04:52

which kinda reminds me of the regexy part of spec

imre14:04:56

but again, this might be too complex for a routing library

dominicm14:04:04

MOAR VECTORS!

imre14:04:36

what else can you do when a path is a sequence of segments, really? 馃檪

geek-draven14:04:47

I'm having some issues running a yada project as an uberjar, it runs fine from the repl, but as soon as I try and run it from the jar, it fails without an error? The -main only fires off `(yada/listener routes {:port 8090})`

borkdude14:04:55

@geek-draven Maybe you can reproduce it in an isolated project which you can share with us?

geek-draven15:04:20

@borkdude Sure, I can strip it down to a couple of pages, I've disabled the database element in case it was an issue

geek-draven15:04:25

If anyone can help, here's a link to the repo: https://bitbucket.org/geek-draven/yada_test

borkdude20:04:29

We would like to pass an option to cheshire, :escape-non-ascii true. Is there a better way than overriding all the defmethods? https://github.com/juxt/yada/blob/master/ext/json/src/yada/json.clj#L19

borkdude20:04:27

We have a data source that has line separators in text, which is invalid on the client

borkdude20:04:05

@geek-draven How should I start your project without java -jar? lein run exits silently, which should do the same I think as in the uberjar

geek-draven20:04:12

@borkdude I was running (-main) from inside the repl. I've been looking at the edge project and it looks like there's a lot more to it than just setting up the listener

geek-draven20:04:46

this is my first yada project, so I'm still very new to it

borkdude21:04:01

@geekplux I think you need the same approach as with Component in production: https://github.com/stuartsierra/component#entry-points-in-production

geek-draven21:04:57

Thanks, taking a look at that at the moment

geek-draven21:04:23

@borkdude Thanks, for your help with this. I now have the slimmed down project working with some Frankenstein code that I took from Edge, will clean it up and add it to the main project in the morning