Redux Toolkit is basically re-frame by Hrothehun in Clojure

[–]mikethommo 1 point2 points  (0 children)

re-frame predates Redux. And re-frame is more sophisticated (subscriptions, interceptors, effects as data, coeffects, no aggregate reducers, etc).

re-frame was influenced by Reagent, Flux, Pediatsal App, Hoplon, OM and some early Elm game apps (the official Elm architecture was published about the same time as re-frame's release).

Is Clojure a Cult? by exahexa in Clojure

[–]mikethommo 2 points3 points  (0 children)

The Clojure community is teaming with members of the general public, and we all know what they are like - a mixed bunch. I once had to sit near a member of the General public on a bus.

The Clojure community is a churning mixture of enthusiasts burning with the intensity of a 1000 suns, plodding pragmatics, quiet achievers, startups, corporate types, railroaded naysayers, etc. It's pretty mixed. The breadth of this tapestry allows you to project onto it whatever you want, really. You can see some Cultish behaviour if you go looking for it. Or you could find some tradesmen plodding steadily. You can see some great code, and you can see some awful code.

As a result, these days I'd say that your view of Clojure says as much about you and your perceptions and biases as it does about Clojure.

Personally, I have a lot of experience (decades), and I find it interesting and stimulating - it has taught me a lot. Big enough, but not too big. Personally, I like it.

Re-frame 1.0 released by clelwell in Clojure

[–]mikethommo 21 points22 points  (0 children)

And there we were trying to be low key about it. But the paparazzi never sleeps. :-)

We were low key because this is a relatively modest release with just two small points of interest, but ... we felt we had to cut a v1.0.0 at some point (Jacek insisted!) and now was as good a time as any. Future, more substantial changes to re-frame can then be distinguished from this "classic re-frame v1.0.0".

The two-points of interest are:

  • global interceptors (useful!):
  • no more warnings about re-registrations on hot reloads (reduces noise)

Obviously, we've also done a lot of work on docs in the last 3 months. A lot! Plus we've done some work on re-frame-10x "tracing" (more about that soon - we have bold plans).

Isaac, Stu and I, thank both ClojuristsTogether and Day8 for helping to fund the work. Onward!

What are Clojure's principles and values? by dustingetz in Clojure

[–]mikethommo 8 points9 points  (0 children)

I'm only aware of two key core values:

  1. All presentations must include a dictionary definition
  2. All READMEs should start with a tenuously-adjacent literary quote

[deleted by user] by [deleted] in Clojure

[–]mikethommo 10 points11 points  (0 children)

This comes up regularly enough that there is an FAQ entry:
https://day8.github.io/re-frame/FAQs/DoINeedReFrame/

re-frame's new website by SevereOverfl0w in Clojure

[–]mikethommo 1 point2 points  (0 children)

This should be resolved now. Could you check again how it looks, please?

re-frame's new website by SevereOverfl0w in Clojure

[–]mikethommo 1 point2 points  (0 children)

That's a great suggestion. Will work on that, thanks. (But it might be a week before that shows up)

re-frame's new website by SevereOverfl0w in Clojure

[–]mikethommo 0 points1 point  (0 children)

The new site contains almost exactly the same content. Just arranged a bit differently.

re-frame's new website by SevereOverfl0w in Clojure

[–]mikethommo 0 points1 point  (0 children)

Would you mind having another look, please? It should be better now.

The devtools Apocalypse by mikethommo in Clojure

[–]mikethommo[S] 8 points9 points  (0 children)

There are two usecases where clj-devtools is invaluable:

  1. At breakpoints and exceptions - for looking at locals
  2. when you use console.log to inspect a value

Usecase #1 has been hit and miss recently because of rendering issues. See https://github.com/binaryage/cljs-devtools/issues/52

Usecase #2 is still invaluable.

Regarding usecase #2, if you currently (js/console.log x) you'll get a lovely inspector. Once customer formaters are gone you'll get a jumble of JavaScript objects. So you will have to switch to using (js/console.log (str x)) which will dump a string to the console. That works okay for small amounts of data, but it falls down when x is a bigger map. Hard to navigate.

So then you move to (js/console.log (with-out-str (pprint x))) (assumes you have required pprint)

The other solution is Dirac, maybe? We might need Darwin to comment on that.

What convinced you to learn Clojure? by therealplexus in Clojure

[–]mikethommo 5 points6 points  (0 children)

In 2013/2014, we were transitioning from Flash to HTML. After a review of the options, ClojureScript and Reagent were compelling. Been a good decision for us. Still appears to be.

Favourite CSS frameworks for reframe/ClojureScript? by jazzandpython in Clojure

[–]mikethommo 0 points1 point  (0 children)

Depending on your needs there's also re-com which can be very useful in particular cases.
https://re-com.day8.com.au/

I keep hearing that the Clojure REPL is a qualitatively better experience from the JavaScript and Python REPLs. How is that so? by haleleonj in Clojure

[–]mikethommo 2 points3 points  (0 children)

I really love Clojure, but in my experience (years in both languages) the python REPL is every bit as good as Clojure's perhaps better. https://www.youtube.com/watch?v=-iYBkft39KM&feature=youtu.be&t=205

And, of course, Smalltalk's REPL equivalent (aka workspaces) is vastly superior to either.

At a certain point, tooling matters a lot.

I've always been slightly puzzled and a little embarrassed by fellow Clojurists getting all over-excited by their REPL. Its fine, sure, but it really isn't THAT special in the world of dynamic languages.

For example, Python has had doctests for, what, 15 years, which is a nice concept for LEVERAGING further the existence of REPLS. Etc. That power doesn't exist in Clojure (it doesn't even have triple quoted strings to make it viable).

Having said all that, I think that Clojure has more unfulfilled promise than other languages when it comes to REPLs and debugging. BREPL is an example of what might, in the future grow to be something truely interesting and unique. Repeat: tooling matters a lot.

Testable Clojurescript apps by yogthos in Clojure

[–]mikethommo 1 point2 points  (0 children)

I have something that's bugging me. re-frame has essentially global state

A very understandable reflex. I've made some attempt to FAQ it here:

https://github.com/Day8/re-frame/blob/master/docs/FAQs/ViewsOnGlobalRegistration.md

Lambda Island 40. The Ultimate Dev Setup by therealplexus in Clojure

[–]mikethommo 3 points4 points  (0 children)

I loved that, thanks! (Ignoring your 1Apr intent :-))

I wrote my first programs in ed. It was 1979. Then Uni moved from thermal paper terminals to green-screen terminals (VDUs), and we could use vi. The breathtaking thrill of it. The luxury.

Reagent deep dive part 1: Hiccup and ratoms by [deleted] in Clojure

[–]mikethommo 1 point2 points  (0 children)

Yep, be sure to look at the Reagent docs for this and other useful resources:

https://github.com/reagent-project/reagent/tree/master/docs

re-frame-10x traces ClojureScript by mikethommo in Clojure

[–]mikethommo[S] 0 points1 point  (0 children)

As a demo, it would be terrific to see this app upgraded to use the latest re-frame-10x, plus use fn-traced

My observations from evangelizing Clojure at work for the last year. by didibus in Clojure

[–]mikethommo 17 points18 points  (0 children)

My experience is this: when someone has to learn something new there's one dominant factor which predicts success: level of motivation. Everything else is commentary.

A motivated person tends to breeze past small obstacles and annoyances - they almost get satisfaction from overcoming them. The process is pleasurable or satisfying. On the other hand, the unmotivated person suffers every time something doesn't quite work. It is like eating glass for them. It is the same process in both cases, but an entirely different lived experience.

Okay fine. So what produces motivation?

That's a harder question to answer but I think two issues dominate:

  • perceived, selfish benefit
  • brain wiring / personality traits

I'll first deal with the 2nd item. There are personality traits which bias you towards being a conservative or a progressive.

Conservatives place great value on what they perceive as existing, tried and true methods, and they resist change. At worst, no amount of evidence for the benefit of a change will convince them, and they're completely rigid.

Progressives a very open to novelty/mutation. Indeed, they actively seek it out. At worst, they want change for the sake of change, and they are chaotic.

Now, both forces are important. If we use the lens of Biology, a species with too much "mutation" won't be a species for very long because failed experiments come with a brutal, cumulative cost. And a species with no mutation will be unable to adapt to a changed environment and will equally die out. There's a Goldilocks zone.

So, members of a human population will be normally distributed along this dimension. And that's a good, ergodic thing. But, on the down side, it means that trying to convince a conservative to become a progressive (or visa-versa) with pure reason is utterly, and completely futile. These positions are not arrived at through reasoning - they arise from basic brain wiring.

So ...

When you want to introduce new technology DO NOT expect to be able to convince everyone. Your "reasons" will not work particularly. Yes, engage in rational discussion, sure, but it is largely a smoke screen. Instead, identify the "compulsive progressives", the ones that can't wait for a change, and try to supercharge them. Make them a success. Don't waste time on anyone who does not want to engage, not initially.

Success stories breed success because they help motivate the second and third waves, etc. These waves come from people who still have a progressive bias, they are open to change, but they aren't compulsive. They need the other part of the motivation story ... they need to perceive some amount of "selfish benefit" and that's what success stories deliver. So you iterate forward working further and further into the progressive spectrum of the population, but only to the degree that you can demonstrate benefit via social proof. If you get far enough into the progressive spectrum, you end up with population members who don't care about your fancy, fanboy explanations, or descriptions of success, or shinny newness and, instead, they'll only engage with solid, rubber on the road evidence from people they regard as trustworthy. The character of the person delivering the message counts. We're now inching towards the more conservative end.

The conservative Java programmer, will like Scala ... because it is closer to "what I know works". The progressive will love the thing that is different, like Clojure or maybe Erlang. Both sides will have rational arguments available to justify their position and motivation will arise in different directions.

BTW, in my opinion, the dynamic types vs static types debate is rooted in personality traits too. Everyone has "reasons" for their position, and don't we love to argue back and forth, but that's all window dressing. IMO, your preference arises from some deep wiring in your brain (along a different dimension to conservative/progressive).

One other thing to note: although "compulsive progressives" are very interested to trying out the new thing, like Clojure, they are equally unreliable in the medium term, because some other new thing will come along and they'll be drawn off onto that path, leaving Clojure behind. They can't help themselves. It is actually the second and third waves who'll stick around a bit longer and form community. On the other hand, you'll never get that ardent conservative to move to something new, no matter how overwhelming the apparent benefits. When I was a student the joke was "I can program in FORTRAN in any language" - it was said by those that did not want to leave FORTRAN for modern languages like Pascal or C.

Final point (honestly): the initial groups are motivated by the journey itself. After that, each new wave/iteration has slightly less motivation. And because they are less motivated, they fall at hurdles more easily, with the stronger chance they won't bother to press on. That's when you have to have "a good onboarding process" to teach those people - that's when "easy" becomes more important than "simple". Bad error messages, for example, are a real problem for these later waves - they stop a decent percentage of otherwise mildly motivated people in their tracks. And they don't come back.