Fork me on GitHub
#clojure-uk
<
2018-03-01
>
thomas08:03:16

moin moin from a very cold and windy Rotterdam....

Rachel Westmacott08:03:42

Random core function of the day:

-------------------------
clojure.core/set-validator!
([iref validator-fn])
  Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a
  side-effect-free fn of one argument, which will be passed the intended
  new state on any state change. If the new state is unacceptable, the
  validator-fn should return false or throw an exception. If the current state (root
  value if var) is not acceptable to the new validator, an exception
  will be thrown and the validator will not be changed.

maleghast08:03:14

Morning everyone šŸ™‚

danm09:03:57

I'm starting to get feeling back in my toes

danm09:03:02

I'm not sure I want this

chrjs10:03:22

Not really clojure related (but definitely ā€œthinking about softwareā€ related), I have so much respect for this:

dominicm10:03:50

I think those are so few and far between though, no?

dominicm10:03:12

Not you say that's not impressive!

chrjs10:03:44

Of course. Iā€™m not advocating either for PHP or for a 4,500 loc file being the whole app. Thatā€™s horrible. But itā€™s a real point in favour of ruthless pragmatism - this guy knew how to write an app with a single monolithic php file and he shipped it, and now itā€™s working for him. I canā€™t not respect that.

guy10:03:35

Welcome @wesley.hall šŸ‘‹

dominicm10:03:27

It's 4500 loc?

Rachel Westmacott11:03:17

ā€œwoahā€ good or ā€œwoahā€ bad?

Rachel Westmacott11:03:22

Clojureā€™s Compiler.java runs to almost 9k lines.

Rachel Westmacott11:03:10

Iā€™ve havenā€™t used the website, so I donā€™t know if itā€™s impressive to achieve it in 4500 lines of PHP.

maleghast11:03:02

@chrjs @dominicm - Indeed, got to offer a hat off to that achievement...

chrjs11:03:31

Yeah, something of that order. The comments on the tweet are a maelstrom of opinion, naturally.

maleghast11:03:26

The comments are surprisingly pleasant / civil for as far as I read down the page, but I expect that this will be Medium-ed to death and suddenly there will be a lot more opinions... He's making money, the code's been the same for years and has a huge up-time history, good for him. I wouldn't feel comfortable with it, but I am hugely risk-averse and aware of the potential issues, so I guess I don't have a keen enough sense of execution over implementation to be an entrepreneur šŸ˜‰

chrjs12:03:38

I also wouldnā€™t be so comfortable deploying such a thing, which I think is why Iā€™m enjoying his success so much.

dominicm11:03:37

I wonder if a library would have been much quicker...

dominicm11:03:44

There's some things which are repeatable.

chrjs11:03:27

Probably. I donā€™t think the moral here is that a 4500 loc PHP file is the path to product success. I just tip my hat to the reverse attitude: ā€œYeah I could have learned Laravel. While you do that, Iā€™ll just be here making a fortune on the dumbest thing that might work.ā€

jasonbell11:03:57

Sometimes #jfdi is the best course of action.

dominicm11:03:14

For sure. There's a definite scale here.

dominicm11:03:43

I think I have a large distrust of myself, and lean on libraries to be repeatable ways to get things right.

Rachel Westmacott11:03:44

Does anyone know of an easy way to add custom encoders to pr-str?

Rachel Westmacott11:03:18

With clojure.edn/read-string I can pass custom :readers, but for the writing part Iā€™m scratching my head.

Rachel Westmacott11:03:46

(obvs. I can tree-walk and manually encode things, but that seems a little sub-optimal)

bronsa11:03:13

@peterwestmacott you can extend print-method

Rachel Westmacott11:03:50

Oh, yes. That looks like the ticket. Thank you!

otfrom11:03:01

@dominicm I think that desire to lean on libraries to get things right is one of the main differences between clojure and other lisp cultures (and why so many of the old c.l.l crew dislike clojure)

Rachel Westmacott11:03:34

ā€œc.l.lā€ ?

guy11:03:04

maybe common lisp language?

sundarj11:03:38

didn't know cancer patients had such strong opinions of clojure

sundarj11:03:48

first search result šŸ˜›

otfrom11:03:31

comp.lang.lisp on usenet

otfrom11:03:53

which is one of the worst programming communities I've ever had the misfortune of being involved in

bronsa11:03:34

itā€™s not even as bad as it used to be now

otfrom11:03:59

people have written long posts on how common lisp helps antisocial people create big systems without having to co-operate w/anyone and thus it attracted those kinds of people

bronsa11:03:37

back when erik naggum was still alive and xah lee was active ā€” ā€œfunā€ times

otfrom11:03:02

I won't use any of Xah's stuff b/c of how he was there

bronsa11:03:24

not much to miss tbh

otfrom11:03:05

same w/Erik

maleghast11:03:33

There are politics EVERYWHERE, huh? *mind blown*

bronsa11:03:33

thereā€™s this nice blog post by dr tarver about that type of community http://www.shenlanguage.org/lambdassociates/htdocs/blog/bipolar.htm

Rachel Westmacott12:03:25

The hard problems are often people-problems.

otfrom14:03:34

mmm... the smell of blowing away your elpa dir in the afternoon.

otfrom14:03:47

good way of testing to make sure my install code still works. šŸ˜‰

Rachel Westmacott15:03:48

ā€œelpaā€? - is that an emacs thing?

otfrom15:03:59

emacs lisp package archives

maleghast16:03:49

@otfrom - What's MELPA then..?

otfrom16:03:28

Milkypostman's ELPA

maleghast16:03:29

Modern..? More..? Moderately Interesting..?

maleghast16:03:53

Milkypostman - yes of course, that should have been clear to me from the beginning...

maleghast16:03:02

Thx though šŸ™‚