This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-27
Channels
- # announcements (1)
- # aws (8)
- # babashka (77)
- # babashka-sci-dev (8)
- # beginners (29)
- # biff (2)
- # calva (13)
- # cljs-dev (1)
- # clojure (42)
- # clojure-europe (205)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (58)
- # conjure (9)
- # data-science (7)
- # datalevin (19)
- # datomic (3)
- # emacs (7)
- # fulcro (15)
- # gratitude (8)
- # lsp (52)
- # meander (3)
- # membrane (92)
- # off-topic (12)
- # re-frame (16)
- # reagent (4)
- # reitit (15)
- # releases (1)
- # sci (30)
- # shadow-cljs (34)
- # tools-deps (5)
- # xtdb (17)
Good morning 🙂
It rains! A lot, too. Lovely.
Good morning
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: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.
(Incidentally, where is initing
in clojure.core, when we have completing
?)
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
if one defined a function that does the equivalent of (comp vec conj)
there would probably be 0 difference
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 ;)
I wonder if TypeScript will create a similar schism into the JS community like Scala did with higher kinded types etc
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
in x years dynamic languages will be back in vogue for the simple reason that cultural trends are cyclic, so the schism is inevitable
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
good morning! (* -> *) -> *
twinkle twinkle little star~ 💫 (lovely “kind”/“higher kinded type”)
no escape hatch: criticised for being rigid and inflexible have escape hatch: people keep abusing it…
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
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 ;)
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~
btw. Sometimes, at night, I thought to myself: “why can’t different typing systems accept their differences and just get along with each other?”
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
aka “is technological superiority and one-up-manship really that important?” (seen it from both side of the camps)
like, presenting if that is the only way: https://twitter.com/jdegoes/status/1574503176597913635
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/
I read part of this article many years ago: https://degoes.net/articles/modern-fp
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
It’s one of the most interesting piece I’ve read, blending advanced pattern in static typing with thoughts in alternative web app architecture
So… technical competence/talent is not necessarily correlated with moral character. Well, business is business, sigh.
There's a higher frequency of weirdos among programmers. Not all of them are bound to be agreeable :man-shrugging:
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/
I like how weather is a supercomputing problem rather than a big data problem (AFAICT)
(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)
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
my own uneducated guess is that HPC is kind of a legacy thing that already exists long before modern ML/AI/big data
(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)
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
anyway, back on topic - ya I agree that having “physical constraint” makes scientific computing problems more “grounded” than the big data ones
we seem to have dodged the rain so far here (without even having to ride bicycles quickly between the drops)
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
(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)
Also in that book: “Japanese Researcher thanking their super-computer ‘for their tireless works and service over the years’ ”
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
https://clojure.org/guides/install_clojure#_linux_instructions is what I usually use
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
It’s especially nice on Windows. The official Clojure install there is a powershell module, which can be problematic.
@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
@U04V15CAJ that’s reallllyyy clever (in a good way)
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>
(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)
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 😂
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.
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
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.
Hmm, bb
0.9.161 .. I ought to upgrade that 🙂
0.10.163 -- how recent is that?
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…
… oh I think I kind of remember: on docker/specially restricted env., installing linuxbrew
is an exercise in catch-22
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.
Heh, I can understand that.
I also have a macos script that I used in CircleCI when I didn't have deps.clj yet, to install the official tooling
https://github.com/babashka/babashka/blob/master/script/install-clojure It might need a little updating but you can probably curl and run it
(cont’d) - specifically installing linuxbrew
with a passwordless sudo setup is… interesting.
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.
@UE21H2HHD Any reason you try to run CLI stuff on Windows native rather than use WSL2?
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
I’ve often been surprised by wee oversights in my libs that need a little extra love for proper Windows native support.
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...
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).
Ah yeah, If I were developing on Windows I’d use WSL2. But still make sure all my poop works on Windows native.
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.
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.
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).
@U04V15CAJ “overpriced overspec-ed” <- 👀
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! 🙂 ).
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.
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
basically throwing $$ at problem, or “it isn’t a problem if it can be solved with $$”
(keeping in mind that Apple’s cash reserve is like 1% of the USA’s GDP) (it’s not a correct analogy, but still)
(opinion: having $$ to get an overspec’ed machine allows you to be more “crazy” in your dev. env. setup)
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!!).
(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)
(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”)
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!
I had a PowerBook 160 before that.
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!
Yeah, I owned an Apple laser printer -- that was a serious "treat" to myself back then!
(setting up new personal dev machine - I find something like coder
where you’d spin up isolated dev env. to be a nice idea)
(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!
)
4. Install intellij and cursive*
Or maybe better, install emacs, get angry few times, remove emacs
I thought that once you start using emacs, spacetime itself is bent and now you’re in a parallel universe
It def boost your ego and make you feel like better programmer
at least that's how I felt
Didn't get that vibe from other programmers tho
I sometimes think about that, I would not get along with me from two years ago
two years... shiet, probably even from yesterday
makes me wonder - is there some programming language/tooling/whatever that will make you experience “ego death”?
It reminds me about this "holy" language called HolyC and TempleOS
(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…)
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)
Oh man, I felt like shit when I tried to do a task in that haskell codebase
@U0281QDFE1X That’s an unusual situation! (having to learn Haskell for work)
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
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 🙂