Fork me on GitHub
#clojure-europe
<
2022-09-09
>
robert-stuttaford05:09:32

haha, i grew up with British parents who couldn't imagine tea any other gosh darn way 😅

👀 1
lemontea05:09:14

I’m grokking re-frame to prepare a cheatsheet… so they’ve got co-effect. My instinct tells me it’s something from the world of advanced type system (basically anything in Haskell from monad onwards)…

lemontea05:09:31

(comprehending advanced type system can be very brain-draining and interactive visualisation will help a lots!)

lemontea05:09:24

(though… I think creating those interactive visualisation in the first place is even more draining, so, kudos to those who did it)

lemontea05:09:07

(and in the bottom of the page: > The obvious inspiration is Bret Victor’s work on http://worrydream.com/#!/ExplorableExplanations and his http://worrydream.com/#!/ScientificCommunicationAsSequentialArt demo. But I actually learned about these only later when I started working on this! I’m glad Bret is having such a long lasting and wide influence 😍)

robert-stuttaford05:09:27

Bret Victor is great!

lemontea06:09:18

yup, sadly LightTable didn’t pan out 😕

lemontea06:09:27

at the end of the day, vscode + Calva + code-server is good enough…

robert-stuttaford06:09:13

we still have lots of innovative stuff happening - look at Clerk and DataRabbit for instance!

👍 1
lemontea06:09:23

ar yes… good morning~

borkdude07:09:39

mr-ng... I noticed a lot of tools use -ng in their names, what does this even mean?

Carlo07:09:19

next-gen maybe?

lemontea07:09:58

seems to be… otoh, if it’s a prefix, then probably Angular

lemontea07:09:25

(don’t wanna touch angular with a three foot pole)

😄 1
Ben Hammond07:09:32

bad experiences?

Ben Hammond07:09:44

I've never got round to using it but often wondered...

lemontea07:09:26

Imagine spending lots of time figuring out the principles of Angular v1… and just when you finally figured it out, Angular v2 is out…

Ben Hammond07:09:09

that's the story of my entire computing career

😆 1
Ben Hammond07:09:36

the next job always requires you to learn a new stack

lemontea07:09:41

that’s… sad 🤧

lemontea07:09:52

but then, JS ecosystem churn isn’t news

Ben Hammond07:09:57

is it? I thought that was normal and healthy

lemontea07:09:25

definitely not at the rate of churn in the period 2010-2017

simongray07:09:25

I’m also one of the unfortunate ones who has deal with angular. Not by choice, but we have to modify some software written using the (old) Angular that we run on our servers.

Ben Hammond07:09:41

what are the problems with it?

lemontea07:09:06

we signed up to be developer, not superheros who doesn’t need to sleep

1
lemontea07:09:39

(aside: I latter learned that heroic programming is an anti-pattern)

Ben Hammond07:09:02

the dark side of Ego driven programming

Ben Hammond07:09:31

actually its pretty much all dark side isn't it

Ben Hammond07:09:55

caring about the quality of your work thats that upside of EDD

lemontea08:09:21

you mean problems with Angular? It may have improved since then. But the legacy of two-way bindings hurt a lots

lemontea08:09:01

(for v1) Also having its own dependency injection framework, mix in some module system before the JS community settled down on the modern solution

lemontea08:09:19

in short, it feels like they take complexity as a virtue and not a necessary evil

lemontea08:09:14

or they just don’t care because they can just throw an army of developer as if the reserve is infinite

Ben Hammond08:09:25

or they started writing the project before a consensus had been reached, and did their own thing

lemontea08:09:06

ya, starting too early is part of the problem too

lemontea08:09:20

anyway, in JS no one is completely immune

Ben Hammond08:09:26

> in short, it feels like they take complexity as a virtue and not a necessary evil you wonder if those bonkers Google interview question are selecting for this

lemontea08:09:19

wait… why are the interview’s “difficulty level” heating up like that in the first place? :thinking_face:

lemontea09:09:22

wow… that’s some SICP level material right there…

pez09:09:32

SickP 😃

plexus11:09:04

I didn't know you could directly instantiate a MapEntry in cljs

plexus11:09:58

I guess in Clojure you can (clojure.lang.MapEntry/create :key :val). Never looked into that

plexus11:09:11

oh and MapEntry extends AMapEntry which extends APersitentVector. I knew map entries were very vector-like but I didn't know they literally are vectors.

plexus11:09:36

(conj (clojure.lang.MapEntry/create :key :val) :x)
;; => [:key :val :x]

pez13:09:27

Just so I understand, a MapEntry is a tuple of [key val] implemented as a regular Clojure vector?

plexus20:09:39

Yes, a mapentry is a value type containing a single key-value, map implantations store these mapentries. It's what you get back when you iterate over a map or when you use find. It's what allows you to use clojure.core/key and value. It behaves it many ways like a two element vector, hence why you can destructure it, eg (for [[k v] m] ...)

🙏 1
plexus20:09:14

What I didn't realize is that the implementation shares the same base class as other vector implementations

pez21:09:57

So cool with these insights on the implementations you share, @plexus! Thanks! 🙏 I just watched your zippers talk and had several wow moments and almost physically felt things go click in my brain. I hope some of it sticks!

simongray08:09:12

clojure.zip is another WOW implementation

👀 1
simongray08:09:34

check out the implementation of a zipper

simongray08:09:58

recursion done right is always so simultaneously impressive and hard to grasp

thomas08:09:04

Morning lovely people

simongray08:09:07

@plexus Did a really great presentation on clojure.zip once.

plexus10:09:49

It also makes me so happy when people reference that talk, I was hoping to demystify and popularize clojure.zip, and I like to think it has helped at least a little to make it more well known

😍 1
plexus10:09:34

This was at the Denver Clojure meetup, "The Den of Clojure", really cool bunch of folks

lemontea11:09:27

btw, totally unrelated to clojure, but it seems that a reasonably large class of Monad misconception can be summed up as “I know you are a practically minded developer. While you’re not completely wrong in that it is one possible application/instantiation of some Monad, Monad is way more general than that”

reefersleep11:09:56

I read one description of Monads that gave me the impression that it’s really “just” like an interface like you know from the Java OO sense. I wonder why I haven’t seen that comparison before. Maybe I’m way off target, though. I’ve never gotten around to programming explicitly with Monads yet.

lemontea11:09:15

kind of, but there’s also the Monad law - any custom Monad you define is required to satisfy those law. Breaking them can have consequences as Haskell can auto-derive some other functions from the one you supply, but it assume that the laws hold up. In case you’re wondering, it won’t/can’t check the law through the type inference engine as those law are algebraic identity at the level of values and not types. Not sure if dependent typing can do this though.

lemontea12:09:01

I forgot where I read it from, but Monad is causing so much grief in Haskell for learner, that there’re ppl reflecting on why and what can be done to improve. A tentative conclusion is that it is an unlucky convergence of: 1. Monad being the first “sudden barrier” that requires the simultaneous mastery of several novel skillsets, each of which is already not easy in itself, and 2. Monad being a huge gateway/chokepoint - although Monad is “hard”, it is already “easy” from pov of advanced Haskell. Clearing Monad will open a whole world of intermediate+ topics in Haskell.

reefersleep13:09:49

I think the “Monad law” that you mention is what I meant by interface equivalent, if not in implementation, then in spirit.

reefersleep13:09:05

But I’m out of my depth 🙂

reefersleep13:09:18

The bit I’ve heard sounds innocent enough. “We’ve established a convention that is exactly like this, and it affords us a lot of nice stuff”.

reefersleep13:09:02

Of course, it’s more of a mouthful if you’re already busy learning the syntax and conventions of a new language, runtime and ecosystem (like Haskell)

mccraigmccraig14:09:18

the monad laws are constraints (in addition to those in the monad type-class) which can't be captured by (at least) haskell's type system i've got no idea whether it's even possible (or known to be impossible) to capture those constraints in any static type system, but "interface in spirit" works as a description for me

👌 1
slipset17:09:05

So a monad is, as you say, an interface and a set of laws. Or you could call them invariants. Or you could simply say that there could be a sort of test suite that certifies a thing as a monad. Then of course there is the mental overhead of the practicality of such a general abstraction.

🤓 1
reefersleep18:09:03

tbh I'm surprised to learn that it's not enforced by Haskell's type system. I guess I just assumed they'd gel because of how I've heard the type system praised.

slipset18:09:08

It’s interesting with the static typing people. Whatever invariants they cannot express in their type system they call laws.

😂 1
reefersleep18:09:52

As an aside, the last time I tried coding in a static language, I had a terrible time. OTOH I often get bit by the open endedness of Clojure (bites sometimes self inflicted)

reefersleep18:09:59

I feel like I'm sometimes missing an ergonomic language construct for closed enumerations, for one thing. But I could construct it myself; I just haven't arrived at the shape of what I'm dreaming about just yet.

reefersleep18:09:17

'case' is often what I want.

lemontea11:09:17

(I think a lots of pain and grievance can be avoided if the “kernel of truth” part is emphasised more)

lread11:09:56

!morning!

simongray12:09:53

not morning with a side-effect

1
💯 1
simple_smile 2
lemontea12:09:06

wait, is it “(not morning) with a side-effect” or “not (morning with a side-effect)” :face_with_monocle:

lread12:09:42

maybe not next generation morni with a side effect

borkdude12:09:38

not-morning is morning, loosely quoting the Heart Sutra

borkdude12:09:49

good monad btw

lemontea12:09:30

jargon overflow, I’m dying… 😖😅

lemontea12:09:39

oh, and “Heart Attack Sutra” - don’t do things that are too many steps above one’s current ability

reefersleep14:09:09

Most important sentence I wrote today: “Less code is better code”

reefersleep14:09:20

More important than all the code I wrote 😛

borkdude14:09:45

Do you also count macro-expansions?

reefersleep20:09:49

All code, including macros, is equally suitable for deletion 😛

borkdude20:09:18

I wasn't talking about the macro, but about the expansion. A tiny macro can expand in a huge wall of code ;)

reefersleep20:09:07

Yes yes, I know, I was being facetious. Sorry:sweat_smile:

lemontea14:09:07

this remind me of something like the zip file bomb (and in my high school’s computer club they teach us fork bomb)

lemontea14:09:37

a bit off-topic, there’s also that time I was tasked with updating some excel file. I didn’t know that excel can be used as a poor man’s database, and just updated a formula ~10 minutes before end of office hour… my workstation locked up… not fun 😖

RAMart18:09:59

Sunday marks exactly three months since :clojureU 2022. I wonder if anything good will happen then. 😜

👀 4
🎬 3
bananadance 2