Fork me on GitHub
#clojure-europe
<
2021-10-07
>
pez06:10:35

Good morning.

dharrigan06:10:09

Good Morning!

borkdude06:10:05

I hoped we could get an almost as good a 👋 streak as in #clojure-nl yesterday but whatevs :-)

waving 1
pez07:10:26

Morning!

otfrom07:10:45

Happy birthday @jasonbell

3
🎉 2
simongray08:10:43

today I’m debugging some messy frontend state. Not my favourite activity.

otfrom08:10:16

what is the FE built in?

simongray08:10:06

FE built in?

simongray08:10:38

it’s plain reagent, but I made some “clever” code to derive state using make-reaction and it’s bugging out

simongray08:10:09

make-reaction is still completely undocumented even though it’s the core of reagent..

borkdude08:10:44

@simongray you've probably thought about this, but when using re-frame, using make-reaction isn't usually necessary. when I find myself needing this, I realize I've reached the reagent -> re-frame size of my project

Rachel Westmacott11:10:35

either I've never reached that size of project or always managed without make-reaction.

simongray11:10:27

I don’t think it’s a “size of project” thing as much as it is a “kind of project” thing. It’s a library first of all (not a situated application) of adaptive UI widgets where reagent atoms/cursors are used in a fairly idiosyncratic way. I have some utility code for syncing reagent state since I don’t want the library to be dependent on Re-frame. This was the code that was giving me a head ache (now fixed): https://github.com/kuhumcst/stucco/commit/a1126126876f2d78a4ab3bfd168f9d5ae423026e

simongray11:10:20

Basically, the implementation code uses this utility function as a way to bind the index of two views together. In Re-frame you would create a subscription, but this would be a project-specific solution tied to specific instances, while my library needs a generic way of doing this for any piece of reagent state (ratom, cursor, etc.).

val_waeselynck20:10:35

Please folks, let's not assume re-frame is the only natural path from Reagent - re-frame has significant limitations.

☝️ 1
simongray08:10:34

yeah, the re-fram equivalent would probably be subscriptions, but I don’t use re-frame for this project

simongray08:10:04

It’s a bit experimental to be honest. Re-frame’s paradigm of a single directed data transformation graph doesn’t really fit the problem space well.

thomas08:10:55

👋

👋 1
genRaiy09:10:07

Morning

🐶 1
dharrigan09:10:36

What breed of dog is that?

dharrigan09:10:54

The tail curve reminds me of a Shiba Inu.

genRaiy18:10:19

it's a mix of unknown breeds so a mutt 🙂

simongray09:10:02

I fixed my messy frontend. Mornings really are best for debugging. Afternoons probably better spent on refactoring.

👍 1
borkdude09:10:23

depends on who you are ;)

simongray09:10:51

Perhaps 😛 I find that I spend many afternoons rerunning code attempting to fix a bug before I get off. The next morning that complex issue often turns into a small change.

David Vujic11:10:54

Morning! Today I’m coding Python, pretending it is clojure 🤓 Today is a “slack” day at the company and I’m experimenting with a library called toolz that brings functional concepts into the language. Also, I’m converting Clojure code from the excellent talk “Clojure in a Nutshell” by @james to Python. I am planning to write something about this, or recording a short video. Perhaps both 😄

aw_yeah 1
1
David Vujic15:10:48

Here’s an 8 minute video, where I have copied James approach and code examples, to try out the functional abilities of Python: https://www.youtube.com/watch?v=VHS9wtNcnE4

❤️ 1
val_waeselynck21:10:18

toolz looks great! I'm volunteering on a project in Python these days, I might sneak it in some day.

👍 1
pez13:10:02

Yesterday, to give myself some relief from the Windows hell I was visiting, I mixed it up with writing myself some zsh functions to make rebasing my git branches from some other branch on origin a bit less error prone: rebob - rebase branch on branch. 😃 https://gist.github.com/PEZ/f8d1c9d1184efa9e6ea929e7da69efce

🤯 1
2
pez13:10:20

I know, just some simple alias will often do, but I needed something a bit more robust and with an audit trail I can easily follow.