This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-01
Channels
- # aleph (4)
- # arachne (24)
- # beginners (231)
- # boot (4)
- # cider (63)
- # clara (36)
- # cljs-dev (57)
- # clojure (195)
- # clojure-dev (12)
- # clojure-gamedev (2)
- # clojure-greece (1)
- # clojure-italy (10)
- # clojure-poland (4)
- # clojure-spec (36)
- # clojure-uk (65)
- # clojurescript (133)
- # core-async (8)
- # core-logic (2)
- # cursive (18)
- # data-science (3)
- # datomic (58)
- # defnpodcast (3)
- # duct (2)
- # emacs (2)
- # fulcro (27)
- # graphql (3)
- # hoplon (18)
- # jobs (2)
- # jobs-discuss (10)
- # jobs-rus (1)
- # lumo (1)
- # mount (6)
- # nyc (2)
- # off-topic (27)
- # pedestal (13)
- # re-frame (71)
- # reagent (105)
- # reitit (4)
- # ring (2)
- # ring-swagger (1)
- # rum (10)
- # shadow-cljs (172)
- # spacemacs (24)
- # sql (26)
- # tools-deps (1)
- # uncomplicate (4)
- # unrepl (51)
- # vim (3)
- # yada (11)
Morning And welcome @wesley.hall
Mornings!
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.
Not really clojure related (but definitely āthinking about softwareā related), I have so much respect for this:
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.
Welcome @wesley.hall š
āwoahā good or āwoahā bad?
Clojureās Compiler.java runs to almost 9k lines.
Iāve havenāt used the website, so I donāt know if itās impressive to achieve it in 4500 lines of PHP.
Yeah, something of that order. The comments on the tweet are a maelstrom of opinion, naturally.
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 š
I also wouldnāt be so comfortable deploying such a thing, which I think is why Iām enjoying his success so much.
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.ā
I think I have a large distrust of myself, and lean on libraries to be repeatable ways to get things right.
Does anyone know of an easy way to add custom encoders to pr-str
?
With clojure.edn/read-string
I can pass custom :readers
, but for the writing part Iām scratching my head.
(obvs. I can tree-walk and manually encode things, but that seems a little sub-optimal)
@peterwestmacott you can extend print-method
Oh, yes. That looks like the ticket. Thank you!
@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)
āc.l.lā ?
which is one of the worst programming communities I've ever had the misfortune of being involved in
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
thereās this nice blog post by dr tarver about that type of community http://www.shenlanguage.org/lambdassociates/htdocs/blog/bipolar.htm
The hard problems are often people-problems.
āelpaā? - is that an emacs thing?