This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-22
Channels
- # architecture (1)
- # aws (3)
- # beginners (78)
- # boot (33)
- # cider (49)
- # cljs-dev (3)
- # clojure (82)
- # clojure-berlin (2)
- # clojure-dusseldorf (14)
- # clojure-gamedev (75)
- # clojure-italy (15)
- # clojure-nl (2)
- # clojure-poland (9)
- # clojure-russia (1)
- # clojure-spec (11)
- # clojure-uk (91)
- # clojurescript (17)
- # core-async (2)
- # cursive (1)
- # data-science (3)
- # datascript (34)
- # datomic (13)
- # docs (2)
- # duct (32)
- # emacs (8)
- # fulcro (95)
- # instaparse (17)
- # jobs (2)
- # jobs-discuss (1)
- # jobs-rus (4)
- # leiningen (1)
- # luminus (1)
- # lumo (4)
- # mount (1)
- # nrepl (1)
- # off-topic (98)
- # onyx (13)
- # portkey (12)
- # re-frame (10)
- # reagent (11)
- # remote-jobs (4)
- # rum (3)
- # shadow-cljs (34)
- # specter (7)
- # sql (1)
- # tools-deps (8)
momomo
Morning!
Bore da
(trying to re-lurk here as I’m rolling off my non-clojure client, so 🤞 maybe I could be back in the real world next? Probably not, but at least I’m tinkering with some clojure code again)
Morning everyone
@otfrom thanks 🙂 I mainly stopped wandering by because it just depressed me! Though I have found that es6 is at least a slightly palatable language, at least you get destructuring and immutable.js
and easy lambdas
#{:easy-lambdas :persistent-data-structures :decent-macros :hm-or-similar-type-checking :no-global-namespace :pattern-matching}
are my ideal foundational lang features @korny... ur getting 3.5/6 with es6 (destructuring counting for half a pattern-matching point) which is not awful... clojure scoring 4.5/6 (i can't bring myself to use core.match, so i'm not giving a full point) feels considerably better... i can only dream of what a 6/6 lang would be like
can you tell me more about why you don’t use core.match? I’ve tried to use it before and failed - I never quite got my head around what I was doing wrong before I decided I was losing more time than I stood to gain from it.
i found the syntax awkward, and it may also be that without a type-checker to tell you when you haven't covered all the cases pattern-matching is less useful
I’d substitute :optional-hm-or-dependent-or-magic-type-checking
- I love type checking where I need it, and only where I need it. I hate it when it gets in my way. Vast amounts of work at $client is mapping JSON to intermediate types, manipulating them, and spitting out more JSON.
The main thing that really annoys me in Java land is the lack of persistent data structures. It’d be quite easy for Oracle to do this - they could probably steal most of the Scala stuff without pain, and just give persistent vs mutable versions of the main data structures. But instead, they’ve hacked in a mutable alternative to reduce
because reduce
doesn’t work nicely without persistent structures. https://docs.oracle.com/javase/tutorial/collections/streams/reduction.html#collect
morning morning
Morning All! Unsolicited share of the day 'cos I just had to solve this and I wanted to "write it down" somewhere and then realised that other people might care too... https://gist.github.com/maleghast/eeff990fb9619aed96f81035443a2dc4
(How to copy a table and all its data from one Database to another under PostgreSQL)
I’d substitute :optional-hm-or-dependent-or-magic-type-checking
- I love type checking where I need it, and only where I need it. I hate it when it gets in my way. Vast amounts of work at $client is mapping JSON to intermediate types, manipulating them, and spitting out more JSON.
"Vast amounts of work at $client is mapping JSON to intermediate times, manipulating them, and spitting out more JSON." - this does not sound like the FUN TIMES 😞
@korny surely if you are dealing with a set of JSON types (rather than some application specific types) that all works nicely with static checking ?
but, like, we started with xml, everyone hated it, and now we’re going back the full circle ¯\(ツ)/¯
@lady3janepl were you never exposed to the delights of ASN.1 ?
spent a brief period in Java way back when, so I was exposed to the wonders of everything in xml, then xhtml, then some people thought xslt and xpath would be good ideas…
incidentally, if any of you know a better tool than xpath for expressing a path on a tree, I’d be grateful 😄
i think ASN.1 was probably ancient before any of those things were born...
if you don't let your tree-nodes have attributes then it's much easier
but xpath has been ok on the few occasions i've needed to use it
I don’t mind xpath myself, but a) people scream with terror if you mention it b) the usual libraries are not very efficient
The main thing that really annoys me in Java land is the lack of persistent data structures. It’d be quite easy for Oracle to do this - they could probably steal most of the Scala stuff without pain, and just give persistent vs mutable versions of the main data structures. But instead, they’ve hacked in a mutable alternative to reduce
because reduce
doesn’t work nicely without persistent structures. https://docs.oracle.com/javase/tutorial/collections/streams/reduction.html#collect
I remember when I started here, and we were were of the first teams to be doing functional stuff,and we were using xquery
git reflog
do you use magit
someone showed me M-x magit-reflog
it has saved me a few times
when I've messed things up in gits
I was attempting to do a rebase.... but then accidentally did a commit/push of the changes I made for the merge... not doing a git rebase --continue
There are git commands I just avoid completely. I really don’t care if my git history is “messy” if it means I never have to fix another broken rebase.
On the subject of #{:easy-lambdas :persistent-data-structures :decent-macros :hm-or-similar-optional-type-checking :no-global-namespace :pattern-matching}
- are there any other mainstream-ish languages that have a subset of these? It’d be great to see a grid of where languages like rust/elixir/kotlin/golang (basically, all the cool languages I’ve been to busy to try) fit on this scale.
i've filled in the langs i know @korny https://docs.google.com/spreadsheets/d/1T3Hw7_b5DwMYUmY5AjKHi2U2aL5cBHMR1madm7FpbG8/edit#gid=0
ruby has hamster: https://github.com/hamstergem/hamster (and has had for a long time) but it doesn’t have nearly the popularity of immutable.js
feel free to update the sheet!
actually I’d also add :easy-laziness
to that list, though it’s trickier to define… maybe :lazy-sequences
? But there are languages with a sequence abstraction, where it’s still a PITA to actually turn a function into a lazy sequence
I hadn’t met lux before - looks like it has the simple mental model of Haskell, combined with the popular and easy to learn syntax of clojure? 😉
add more features too... those were just the ones which came to my mind... some are obvs overlapping, e.g. if you have macros+lambdas then you have laziness
lux is very new - i've been following it for a while... it's awesome, but probably not a beginners lang... @bronsa had some pretty strong opinion on its syntax
Haskell doesn’t need macros for laziness. I don’t know whether the other macro facilities it has would count as easy.
right, haskell builds it in to the lang...
if the macro facility lets you do large-scale rewrites like applicative-do or core.async sanely then i'd say it's decent
I’m only half joking with “the easy to learn syntax of clojure” - I love Clojure’s syntax, and it’s what makes the macros so powerful. But it’s by far the biggest barrier to entry the language has, for the casual developer.
applicative-do was a compiler mod to rewrite the do notation. core.async would just use do notation
@minimal applicative-do was a compiler-mod in haskell. it's a macro in clojure https://github.com/funcool/cats/blob/master/src/cats/core.cljc#L413
I can run a dev workshop and show people golang or scala or rust or many others, and people will go “ooh, that could be fun”. I show them clojure and they go “what’s with the parentheses?“ 😞
I'm never really sure if it is the "casual developer" or the "interface damaged algol experienced" developer
@mccraigmccraig yeah it’s a fun read in cats