This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-09
Channels
- # announcements (10)
- # aws (7)
- # babashka (28)
- # babashka-sci-dev (53)
- # beginners (11)
- # clojure (43)
- # clojure-europe (100)
- # clojure-morsels (1)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojure-russia (2)
- # clojure-spec (13)
- # clojure-uk (7)
- # clojurescript (13)
- # conjure (21)
- # datalevin (3)
- # emacs (46)
- # etaoin (4)
- # events (2)
- # fulcro (36)
- # graphql (7)
- # gratitude (1)
- # interceptors (13)
- # jobs-discuss (3)
- # kaocha (13)
- # membrane (3)
- # minecraft (2)
- # nbb (8)
- # off-topic (135)
- # pathom (30)
- # podcasts-discuss (1)
- # re-frame (24)
- # releases (1)
- # shadow-cljs (26)
- # sql (16)
- # squint (6)
- # tools-deps (4)
- # xtdb (8)
haha, i grew up with British parents who couldn't imagine tea any other gosh darn way đ
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)âŚ
a quick search and this: http://tomasp.net/coeffects/
(comprehending advanced type system can be very brain-draining and interactive visualisation will help a lots!)
(though⌠I think creating those interactive visualisation in the first place is even more draining, so, kudos to those who did it)
(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 đ)
Bret Victor is great!
morning!
we still have lots of innovative stuff happening - look at Clerk and DataRabbit for instance!
bad experiences?
I've never got round to using it but often wondered...
Imagine spending lots of time figuring out the principles of Angular v1⌠and just when you finally figured it out, Angular v2 is outâŚ
the next job always requires you to learn a new stack
is it? I thought that was normal and healthy
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.
what are the problems with it?
the dark side of Ego driven programming
actually its pretty much all dark side isn't it
caring about the quality of your work thats that upside of EDD
you mean problems with Angular? It may have improved since then. But the legacy of two-way bindings hurt a lots
(for v1) Also having its own dependency injection framework, mix in some module system before the JS community settled down on the modern solution
or they just donât care because they can just throw an army of developer as if the reserve is infinite
or they started writing the project before a consensus had been reached, and did their own thing
> 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
wait⌠why are the interviewâs âdifficulty levelâ heating up like that in the first place? :thinking_face:
I guess in Clojure you can (clojure.lang.MapEntry/create :key :val)
. Never looked into that
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.
Just so I understand, a MapEntry is a tuple of [key val]
implemented as a regular Clojure vector?
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] ...)
What I didn't realize is that the implementation shares the same base class as other vector implementations
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!
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
This was at the Denver Clojure meetup, "The Den of Clojure", really cool bunch of folks
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â
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.
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.
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.
I think the âMonad lawâ that you mention is what I meant by interface equivalent, if not in implementation, then in spirit.
But Iâm out of my depth đ
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â.
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)
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
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.
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.
Itâs interesting with the static typing people. Whatever invariants they cannot express in their type system they call laws.
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)
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.
'case' is often what I want.
(I think a lots of pain and grievance can be avoided if the âkernel of truthâ part is emphasised more)
wait, is it â(not morning) with a side-effectâ or ânot (morning with a side-effect)â :face_with_monocle:
oh, and âHeart Attack Sutraâ - donât do things that are too many steps above oneâs current ability
Most important sentence I wrote today: âLess code is better codeâ
More important than all the code I wrote đ
All code, including macros, is equally suitable for deletion đ
I wasn't talking about the macro, but about the expansion. A tiny macro can expand in a huge wall of code ;)
Yes yes, I know, I was being facetious. Sorry:sweat_smile:
this remind me of something like the zip file bomb (and in my high schoolâs computer club they teach us fork bomb)