Fork me on GitHub
#clojure-europe
<
2022-06-28
>
robert-stuttaford05:06:39

hi bob!

♂️ 1
🌔 1
reefersleep07:06:39

Godmorgen 🙂

genRaiy09:06:57

Good morning

genRaiy09:06:50

Does anyone know of a good blog / doc on how to create / integrate reader tags? The docs are sparse and search fu is not finding anything

1
plexus21:06:42

On the print side I recommend lambdaisland/data-printers. Given the multiple printers (built in and libraries) it's a bit of effort to get custom types to consistently print with the right reader tags.

genRaiy08:06:58

thanks Arne

genRaiy09:06:05

I vaguely know what to do but I feel like we're missing a step by step guide (and I'll do one if we have nothing)

javahippie09:06:47

I’m not sure if it counts as a good resource, but I wrote together some issues I had and some steps I took here (also quite short): https://javahippie.net/clojure/2022/01/08/data-readers-lein.html

genRaiy09:06:24

I like it. I think there is a print-method too though, no? Also according to the docs > Reader tags without namespace qualifiers are reserved for Clojure.

javahippie09:06:18

You are right about both, it’s not comprehensive

genRaiy09:06:07

good stuff though so not meant as a 🔥

❤️ 1
javahippie10:06:05

Thanks! It took a day for me to find out the Leiningen issue, so that was the focus 😄

😆 1
mccraigmccraig10:06:50

@raymcdermott are your tags for clj only or do you need cljs support too ? (it gets more complicated if cljs support is required, and there are some limitations)

mccraigmccraig10:06:23

also, using records/types as the in-memory representation of tags caused us enough issues with our reloaded workflow that we abandoned the approach and reverted to plain maps

pez11:06:26

I'll be porting a frontend from PHP/jQuery to a REST/SPA thing, most probably using reagent and re-frame. I'm thinking I would like to do it in small steps. So maybe just part of a page is ported at some point, and then at some other point some more parts. Is this a sane approach? Anyone has experience with similar ports or just know where to find material around it?

msolli12:06:39

I just watched a video about this: https://www.youtube.com/watch?v=CcTM5BuLdQo They’re not porting to CLJS, but the tactical patterns apply nevertheless. You can proxy (using CDN or something custom) or use an iframe.

🙏 1
msolli12:06:34

I’ve sometimes heard the term “strangler pattern” for this maneuver.

👍 1
practicalli-johnny12:06:58

I’d probably build the REST API first, at least the most important parts. They can be easily tested without the frontend. Then either redirect the frontend, or just replace it in part or whole. I wouldn’t fancy mixing php/jquery and clojurescript, but its probably not as hard as I think. A lot depends if its a straight replacement or if the API should be redesigned

❤️ 2
borkdude13:06:41

Just mentioning for fun: https://blog.michielborkent.nl/using-babashka-with-php.html Someone in the comments starting porting his PHP website to Clojure using this approach as a first step. I'm not suggesting you do this, but just thought it was worth sharing in this context.

👀 1
Jakub Holý (HolyJak)13:06:14

It absolutely makes sense. We replaced a webshop one page at a time :) https://vimeo.com/145011983 If you decide to try Fulcro instead of reagent, let me know. I'd be happy to help :-)

❤️ 1
mccraigmccraig13:06:32

not particularly about porting (although we are adopting the approach while porting our cordova app to RN), but if you aren't already looking at it, https://storybook.js.org/ is well worth a look - dnolen has some vids around how vouch are using storybook+re-frame+RN , but it's equally applicable to react.js

🙏 1
1
orestis11:06:28

We are doing the same for production, migrating a Node.js/jQuery api to graphql/cljs. We ended up doing the page by page approach, but we reimplemented the surrounding chrome too. The reason being, it's hard to merge jQuery and React on the same page, and CSS is also leaking all over the place.

❤️ 1
orestis11:06:08

In the legacy app, we started defining routes that would redirect to the new app, and vice versa.

practicalli-johnny18:06:10

Continuing my miniscule efforts towards world peace, I used org-mode in Neovim today 😄

Adam Helins18:06:20

Isn't it violating the Geneva convention ?

practicalli-johnny20:06:30

No violation in my version of reality... 😄 apparently there are other versions :rolling_on_the_floor_laughing:

😄 1
plexus21:06:54

Good morning!