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

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

peterwestmacott08: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.

dominicm10:03:27

It's 4500 loc?

peterwestmacott11:03:17

“woah” good or “woah” bad?

peterwestmacott11:03:22

Clojure’s Compiler.java runs to almost 9k lines.

peterwestmacott11: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.

peterwestmacott11:03:44

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

peterwestmacott11:03:18

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

peterwestmacott11: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

peterwestmacott11: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)

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

peterwestmacott12: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. 😉

peterwestmacott15: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 🙂