Fork me on GitHub
#clojure-europe
<
2022-09-27
>
RAMart05:09:03

:spock-hand: 🥐

agigao06:09:41

Morning ☀️

teodorlu07:09:14

Good morning fellow Clojurians!

teodorlu07:09:51

heard said on the plaice conveniently named "Clojurians"

otfrom07:09:24

Clojeurs? Clojurites? Clojnicians? Clojurtects?

❤️ 2
reefersleep07:09:58

Good morning 🙂

reefersleep07:09:19

It rains! A lot, too. Lovely.

otfrom08:09:01

il ne pleut pas aujourd'hui

thomas09:09:19

is that the one day in the year it isn't raining in :flag-scotland: ?

otfrom09:09:43

I think you have us confused with the west coast temperate rain forests

thomas09:09:08

easy mistake to make..

otfrom09:09:38

tho not sure how you can tell it is raining when you live underwater 😉

thomas09:09:41

you can't (I think)

thomas09:09:12

But the question I had was... does it rain between the raindrops?

otfrom09:09:09

not if you cycle fast enough

😮 1
lemontea15:09:35

non-birthday? (Alice in Wonderland)

genRaiy13:09:27

Good morning

genRaiy13:09:26

dumb question ... `

(update m :records (comp vec conj) record)
is there a better way that (comp vec conj) cos it's :man-shrugging::skin-tone-2:

Rachel Westmacott08:09:37

This is where I start wishing that update knew about triple arity reducing functions (like transducers use). That way you could use the 'initing' arity of your function to provide the initial value.

Rachel Westmacott08:09:07

(Incidentally, where is initing in clojure.core, when we have completing?)

Rachel Westmacott08:09:32

Also, there are no dumb questions! (should have started with that)

1
borkdude13:09:38

(fnil conj [])

genRaiy13:09:31

is it any better?

genRaiy13:09:06

where is conjv 😉

borkdude13:09:48

Better along which axis? Performance? Yes

user=> (time (let [m {}] (dotimes [i 100000000] (update m :foo (fnil conj []) 1))))
"Elapsed time: 2471.120667 msecs"
nil
user=> (time (let [m {}] (dotimes [i 100000000] (update m :foo (comp vec conj) 1))))
"Elapsed time: 6362.53825 msecs"
nil

borkdude13:09:22

Not that it will probably matter ;)

genRaiy14:09:22

if one defined a function that does the equivalent of (comp vec conj) there would probably be 0 difference

genRaiy14:09:46

and so I might just make conjv for the 😆

borkdude14:09:51

The difference is just that checking nil is cheaper than calling vec every time

genRaiy14:09:29

ah, ok - good to know

genRaiy14:09:46

so conjv should used fnil 🙂

😂 1
lread14:09:01

good morning! or it deep ends?

borkdude14:09:25

the plot deepens

simple_smile 2
borkdude14:09:03

I just tweeted something about advanced type systems encouraging breaking changes as a reaction to a Scala tweeter, but then I removed it. Thought I would just save the energy today ;)

☀️ 2
genRaiy14:09:40

oh man, one must pity rather than scorn

borkdude14:09:17

I wonder if TypeScript will create a similar schism into the JS community like Scala did with higher kinded types etc

genRaiy14:09:01

TS seems very committed to compatibility

borkdude14:09:37

I don't mean language incompatibility but community incompatibility: everyday JS devs suddenly being confronted with advanced type system constructs that lead to inscrutable code for some

Dimitar Uzunov14:09:32

in x years dynamic languages will be back in vogue for the simple reason that cultural trends are cyclic, so the schism is inevitable

borkdude14:09:51

And then we are way ahead of the curve... or wait...

Ben Sless14:09:46

By then, Typed Clojure will become the common dialect

🎉 1
borkdude14:09:40

It will be the Lisp for the Commons

🔥 2
Ben Sless15:09:28

Can't wait for Clojure to get conditions and save-lisp-and-die so common lispers will finally have absolutely nothing to claim as their own

lemontea15:09:55

good morning! (* -> *) -> * twinkle twinkle little star~ 💫 (lovely “kind”/“higher kinded type”)

borkdude15:09:13

newtype RichT = whatever -> whatever

lemontea15:09:21

you mean… 😨… anyscript? 😱

borkdude15:09:03

Yep, I literally had that name in my mind for an hour or so :)

borkdude15:09:41

great minds alike ;)

lemontea15:09:46

no escape hatch: criticised for being rigid and inflexible have escape hatch: people keep abusing it…

borkdude15:09:54

do you mean head , fromJust and `unsafePerformIO` 😨

😄 1
lemontea15:09:13

also, I rmb about half a decade ago when the debate of static vs dynamic typing is still raging, one argument put forth by the static typing ppl is that: dynamic typing isn’t more powerful than static typing, it is just a crippled static typing system where everything is uni-typed as something like any

lemontea15:09:11

unfortunately, they’re right… just not in the way they intended to I guess

borkdude15:09:17

this is true in theory, but in practice it always comes down the user experience. if you try to do dynamic typing in Haskell, it works, but it's very cumbersome ;)

lemontea15:09:31

it’s like the lisp drama again: “wait, this is just a theoretic argument, and theory is different from practise…” That pal who are just excited to tinker with new toys goes weeeeeeeeeeee~

lemontea15:09:26

unsafePerformIO: I’ll pretend not to know you exist…

slipset15:09:18

It's a shame that any? wasn't named whatever?

borkdude15:09:38

Perhaps on the list for 1.12?

slipset15:09:54

Or is whatever perhaps a better name for do?

lemontea15:09:57

btw. Sometimes, at night, I thought to myself: “why can’t different typing systems accept their differences and just get along with each other?”

borkdude15:09:57

Don't get me wrong: I have nothing against type systems. But I have something against claiming that if you want FP to win, you must push static typing

lemontea15:09:17

aka “is technological superiority and one-up-manship really that important?” (seen it from both side of the camps)

otfrom15:09:22

makes me glad that I blocked him a long, long time ago. https://meta.plasm.us/posts/2020/07/25/response-to-john-de-goes/

👀 1
borkdude15:09:23

but you're right, it isn't worth reacting to it

lemontea15:09:12

let me look up something

lemontea15:09:31

(on my horribly lagging mbp)

lemontea15:09:47

quite disappointed to hear it is coming from him specifically…

lemontea15:09:57

I read part of this article many years ago: https://degoes.net/articles/modern-fp

Ben Sless17:09:09

Why does it make me think of aws api in clojure?

Daniel Craig15:09:33

Yeah for clojure to make it big it needs better libraries that students will be interested in, and a better story around windows installation for the benefit of students

👍 1
💯 1
lemontea15:09:48

It’s one of the most interesting piece I’ve read, blending advanced pattern in static typing with thoughts in alternative web app architecture

lemontea15:09:12

I thought he is different……

lemontea15:09:47

So… technical competence/talent is not necessarily correlated with moral character. Well, business is business, sigh.

Ben Sless17:09:28

There's a higher frequency of weirdos among programmers. Not all of them are bound to be agreeable :man-shrugging:

borkdude15:09:16

OK, enough about that :) What's the weather like at your side of the planet? ;-)

lemontea15:09:39

Maybe drink a can of iced coffee on the balcony?

lemontea15:09:50

Mostly hot and humid

❤️ 1
borkdude15:09:31

A lot of rain here and cold for the time of year

lemontea15:09:27

The weather is a complex dynamical system

otfrom15:09:35

I'd rather not discuss John de Goes and any of his ideas if possible (I'll stop talking about him now too) https://meta.plasm.us/posts/2020/07/25/response-to-john-de-goes/

upvote 3
🆗 1
lemontea15:09:40

it’s fascinating to math ppl

otfrom15:09:01

I like how weather is a supercomputing problem rather than a big data problem (AFAICT)

lemontea15:09:38

wait, what’s their difference exactly?

lemontea15:09:09

(more specifically, I’m puzzled at why with HPC you’ve got a large cluster of powerful CPU, While for AI it’s GPU - why can’t we use one for the other)

otfrom15:09:53

ooh, I think (and I'm not a supercomputing person and not even a big data person any more) Is that big data is about using commodity hardware to solve problems that can be split into smaller ones where the results of things can be combined (monoid like things), whereas supercomputing is where the problem space requires having all of this on the same machine and possibly memory space

otfrom15:09:17

but I really don't know enough about it HPC or supercomputing

lemontea15:09:04

my own uneducated guess is that HPC is kind of a legacy thing that already exists long before modern ML/AI/big data

lemontea15:09:19

and that’s before the advent of GPGPU (General purpose GPU?)

lemontea15:09:26

(recalling that GPU is originally for Graphics, and then due to ppl wanting to do some very custom shading algorithm they opened up “compute shader” that let you in principle do any numerical computation, then someone hacked it for AI)

lemontea15:09:38

maybe it’s an ecosystem thing - in principle you can convert it to work on gpu, but no one wants to have to reinvent everything when it’s working just fine on legacy hpc

lemontea16:09:25

anyway, back on topic - ya I agree that having “physical constraint” makes scientific computing problems more “grounded” than the big data ones

lemontea16:09:48

though “big data”/“statistics” can also be fun in their way

borkdude15:09:41

I like how this channel can turn the weather into an interesting topic :)

clojure-spin 1
❤️ 1
otfrom16:09:02

we seem to have dodged the rain so far here (without even having to ride bicycles quickly between the drops)

lemontea16:09:12

ar you mean that. I remember reading a math puzzle book in junior high school’s library - one of the problem have you shows that the faster you move, the less you’re impacted by the rain

lemontea16:09:21

an Early example of mathematical modelling

lemontea16:09:24

(to be clear: “serious” problems like these are the exception rather than the rule in those puzzle books for fun. A more typical one is like doing origami or water jug etc)

lemontea16:09:44

Also in that book: “Japanese Researcher thanking their super-computer ‘for their tireless works and service over the years’ ”

lemontea16:09:05

btw, is there a way to install the official clojure toolings without going through brew? I find brew to be quite heavy weight and difficult to adapt to different situations

otfrom16:09:44

I diff the script against the last one (which is the one I read, it is only short)

lemontea16:09:08

so… boils down to a bunch of files in the zip, correct?

lread17:09:43

Depends what you are doing but I often find bb clojure nice too.

lread17:09:40

But then you’ll need to install babashka, yeah? So maybe not too helpful?

lemontea17:09:58

looks great! Let’s see if I get this right: the official way is that the tooling is a jar with a wrapper bash script, but bash scripts may break in nonstandard situations, so, the library cited above convert even that “bash script” into a jar also to solve this

lread17:09:02

It’s especially nice on Windows. The official Clojure install there is a powershell module, which can be problematic.

borkdude17:09:34

@U6L5FFL95 yes, the core tool is a jar which is the same with deps.clj, it's only the wrapper that is re-implemented and this functions as a single thing you can download and just run

lread17:09:40

(It’s = either deps.clj or bb clojure)

lemontea17:09:20

@U04V15CAJ that’s reallllyyy clever (in a good way)

borkdude17:09:53

bb clojure is essentially the same thing: it uses deps.clj as well

lemontea17:09:50

having also installed other mainstream programming languages, I think a good next step for the state of clojure tooling will be eg: get it accepted into things like sdkman (last time I checked lein is inside of it but not clj ). Or even apt-get install <lang-version-manager>

lemontea17:09:51

(I like sdkman a lots - it has an “easy” installation, then I can use it to install Java/JVM and manage its upgrade/uninstall/etc)

borkdude17:09:41

You could propose this in #tools-deps maybe

lemontea17:09:32

wait - I’m not in that channel. At the rate this is going, my channel list will grow (or glow?) like a Christmas Tree soon 😂

borkdude17:09:30

you could also go to http://ask.clojure.org

😅 1
seancorfield17:09:43

I'm curious about your thoughts on brew? I mean, yeah, the maintainers have "interesting" opinions on how dependencies should work -- hence Clojure has an official tap that is not controlled by the brew team -- but it seems a pretty convenient way to get a range of dev tools installed and kept easily up to date.

borkdude17:09:45

FWIW, I'm also using the brew one - I mentioned deps.clj as an alternative if for whatever reason the official installer doesn't work out

borkdude17:09:11

In bb tasks, I do use the built-in deps.clj one since it works cross-platform

seancorfield17:09:22

I use Linuxbrew (on WSL2) so I can easily install and switch between multiple versions of the Clojure CLI. I have 30 different versions of the CLI on my laptop -- useful for testing stuff.

seancorfield17:09:47

Hmm, bb 0.9.161 .. I ought to upgrade that 🙂

seancorfield17:09:10

0.10.163 -- how recent is that?

lread17:09:17

I also use brew. I use deps.clj or bb clojure on Windows native.

borkdude17:09:38

0.10.163 is the newest

lemontea17:09:15

maybe it’s just me, but here’s why I tend to avoid brew: • On Mac, brew works fine - until it decides to refresh all packages without asking you, and some of them involves source recompilation, which almost killed my machine outright. • On Linux, I forgot a lots of it (since I rarely use it) but I have vague memory of poor UX (having to search things myself) and lots more compile-from-source thing…

lemontea17:09:58

… oh I think I kind of remember: on docker/specially restricted env., installing linuxbrew is an exercise in catch-22

borkdude17:09:47

$ echo $HOMEBREW_NO_AUTO_UPDATE
1

lemontea17:09:28

ya I later found that out… but it is too late

seancorfield17:09:05

I don't like using a virtual dev env. I like mine on "bare metal". I use Docker for "services" tho' -- like our dev stack needs Percona 5.7. ElasticSearch 7.17.2, and Redis 4.0 -- I don't want to install any of that.

lemontea17:09:10

cause the bad impression is already burned into my memory

seancorfield17:09:56

Heh, I can understand that.

borkdude17:09:58

I also have a macos script that I used in CircleCI when I didn't have deps.clj yet, to install the official tooling

borkdude17:09:26

https://github.com/babashka/babashka/blob/master/script/install-clojure It might need a little updating but you can probably curl and run it

lemontea17:09:48

(cont’d) - specifically installing linuxbrew with a passwordless sudo setup is… interesting.

borkdude17:09:24

(created that script since the linux installer didn't work for me in macos)

borkdude17:09:41

(and brew was way too slow in CI to use)

lread17:09:02

Side Note: I’d rather use official tooling on Windows native but deps.clj and bb clojure are just soooo much easier on me. If the core team finds the time, I wonder if they might just switch to a deps.clj solution someday. Or bless it as an official way to launch clojure cli.

seancorfield17:09:29

@UE21H2HHD Any reason you try to run CLI stuff on Windows native rather than use WSL2?

borkdude17:09:56

Windows native CI

lread17:09:00

For continuous integration tests. I develop on macOS.

borkdude17:09:14

Why use Windows native CI? bb, clj-kondo, ...

borkdude17:09:06

And there are still people who would rather not use WSL2 and even Powershell, and prefer to use cmd.exe or have to because of corporate constraints. So it's good that there is a way

lread17:09:35

I’ve often been surprised by wee oversights in my libs that need a little extra love for proper Windows native support.

seancorfield17:09:16

Oh, I'm not denying the value of having Windows native tools for those who need them. I'm always just curious as to why someone would choose PS/cmd over WSL2 these days...

👍 3
seancorfield17:09:00

Our stack is very Linux-focused so that kept me on macOS until WSL2 got mature enough to switch away from Mac (and I'd been an Apple customer for 30 years).

lread17:09:12

Ah yeah, If I were developing on Windows I’d use WSL2. But still make sure all my poop works on Windows native.

borkdude17:09:14

I have an overpriced overspec-ed PC that I now use exclusively to test things for Windows: cmd.exe, powershell and WSL2. It's surprising how often I still turn it on to check things :) I used to use it for heavy tasks for work.

lread17:09:43

My iMac has still got legs, but is getting old. Might switch it over to Linux sometime. Currently do my manual Linux and Windows verifications/whatevers in Parallels VMs.

seancorfield17:09:25

My last iMac was late 2012 and the SSD HD was failing (such that Disk Repair couldn't repair it and so I couldn't update the O/S either).

lemontea17:09:47

@U04V15CAJ “overpriced overspec-ed” <- 👀

seancorfield17:09:40

My previous iMac had two HD failures. The one before that had a screen failure. Apple hardware is nowhere near as reliable as it used to be, years ago. Some of my early Apple laptops ran just fine for 10-15 years with zero problems (except being horribly underpowered after several O/S upgrades! 🙂 ).

lread18:09:14

My iMac is Late 2013 but was a beast when new, inherited it from a failed startup as part of agreement to help them shut operations down.

lread18:09:24

Yeah, we still have a 2009 macbook pro that works ok.

lemontea18:09:35

My mbp got a swollen battery right before AppleCare expires, and they’d help me do a complete checkup and replaced the battery, the casing, the fan, almost like replacing the whole thing with a new one

lemontea18:09:21

basically throwing $$ at problem, or “it isn’t a problem if it can be solved with $$”

lemontea18:09:51

(keeping in mind that Apple’s cash reserve is like 1% of the USA’s GDP) (it’s not a correct analogy, but still)

lemontea18:09:59

(opinion: having $$ to get an overspec’ed machine allows you to be more “crazy” in your dev. env. setup)

seancorfield18:09:51

Re: swollen batteries -- oh boy, I've had so many of those over the years with my more recent MBPs. Batteries were never a problem in older Mac laptops (one of my first was a 520c -- the first color one!!).

lemontea18:09:46

(why it is an incorrect analogy: in economics, cash reserve is a “stock” variable while GDP is a “flow” variable and they are of different “type” and shouldn’t be directly compared - at least not without some qualification)

lemontea18:09:28

(possible qualification: “…with that reserve, it is possible for Apple to stand-in as an emergency fund if the activity of the entire USA is shutdown and withstand about a week”)

lread18:09:18

https://everymac.com/systems/apple/powerbook/specs/mac_powerbook520c.html: > The Apple Macintosh PowerBook 520c features a 25 MHz 68LC040 processor, 4 MB or 12 MB of RAM, and a 160 MB, 240 MB, or 320 MB hard drive in a sleek portable case with a 9.5" color dual-scan display. > The PowerBook 500 series introduced the “trackpad” -- where the cursor followed the movement of your finger on a “pad” rather than a plastic ball. A little piece of history there!

seancorfield18:09:20

I upgraded mine to 20MB RAM and thought it was so high performance! 😆

🚀 2
seancorfield18:09:11

I had a PowerBook 160 before that.

lread11:09:50

Wow, the trackball! And not a color screen but supported a color monitor. The first company I worked at equipped staff with original Macintoshes. Was pretty darn exciting at the time. And they had a real laser printer on the network. It was so cool!

seancorfield14:09:39

Yeah, I owned an Apple laser printer -- that was a serious "treat" to myself back then!

lread14:09:06

Yeah, those babies were not cheap!

lemontea16:09:33

(setting up new personal dev machine - I find something like coder where you’d spin up isolated dev env. to be a nice idea)

lemontea17:09:25

(summary of my personal “happy-path” on a clean ubuntu: 1. Install nvm or n, then use it to install npm and node 2. Install sdkman, use it to install java and lein 3. Use npm to install shadow-cljs - preferably project-local 4. Install VSCode using your preferred method, then install Calva extension 5. Install external tools as needed (`docker` etc when you’re doing backend projects with other components - even something like minikube is okay too) 6. Enjoy coding! )

Mateusz Mazurczak18:09:42

4. Install intellij and cursive*

Ben Sless18:09:50

I'm starting to lean toward nix

2
lemontea18:09:58

oh… no religious war please 🙏😅

👹 1
Mateusz Mazurczak18:09:22

Or maybe better, install emacs, get angry few times, remove emacs

Ben Sless18:09:57

You're right, let's argue on wether pineapple belongs on pizza

lemontea18:09:26

I thought that once you start using emacs, spacetime itself is bent and now you’re in a parallel universe

lemontea18:09:33

the usual law of physics no longer applies

Mateusz Mazurczak18:09:47

It def boost your ego and make you feel like better programmer

Mateusz Mazurczak18:09:13

at least that's how I felt

lemontea18:09:26

yes, but “you” is no longer “you” (since there’s a timeline split that occured)

Mateusz Mazurczak18:09:28

Didn't get that vibe from other programmers tho

Mateusz Mazurczak18:09:46

Isn't that kinda with every decision you make? 😄

💯 3
Mateusz Mazurczak18:09:43

I sometimes think about that, I would not get along with me from two years ago

Mateusz Mazurczak18:09:01

two years... shiet, probably even from yesterday

lemontea18:09:57

makes me wonder - is there some programming language/tooling/whatever that will make you experience “ego death”?

Mateusz Mazurczak18:09:09

It reminds me about this "holy" language called HolyC and TempleOS

lemontea18:09:38

(but do it in moderation - if it’s too much, you may end up feeling “it doesn’t really matter if I don’t program at all” and leave this field altogether…)

Mateusz Mazurczak18:09:40

Haha 😄 Now when I think about this, I felt ego death when I had to learn haskell for work, having no background with functional programming (only java and angular)

Mateusz Mazurczak18:09:22

Oh man, I felt like shit when I tried to do a task in that haskell codebase

lemontea18:09:30

@U0281QDFE1X That’s an unusual situation! (having to learn Haskell for work)

Ben Sless18:09:45

Probably APL, Forth, and if we're at real disagreeable characters, Hoon

lemontea18:09:24

APL and Forth… I secretly thought they’d make for some cool scene in a movie, depicting it as something used by actual intergalactic aliens

seancorfield18:09:48

I was very enamored of APL in the early '80s -- I encountered it where I worked for my "sandwich year" at university and then for my final year undergrad project, I wrote an APL interpreter (in Pascal). My department bought an APL character golfball for the Diablo printer/terminal so that I could experience it properly 🙂

robert-stuttaford18:09:54

my emacs experience was 'holy shit i made it'

❤️ 1