Fork me on GitHub
#clojure-uk
<
2021-07-06
>
dharrigan06:07:46

Good Morning!

djm06:07:15

šŸ‘‹

alexlynham12:07:27

really enjoying rust atm actually, more than expected

alexlynham12:07:43

emacs editing experience Not Bad:tm: either

Aron12:07:03

what are you writing in it?

alexlynham13:07:34

very elementary wrangling of smart contracts

Conor13:07:40

Ah, planning a classic A Lynham rugpull. Very smart

alexlynham14:07:52

rug pull? moi?

Conor13:07:51

Cryptocurrency people deserve to have their money taken off them

šŸ‘ 4
djm13:07:18

Reminds me of https://corecursive.com/064-ethereum-rescue-with-dan-robinson/ which was fascinating (ā€œSmart Contract Rescueā€)

alexlynham14:07:08

ooh this looks interesting. a bit like the 'ethereum is a dark forest' blog post (although that one was a bit overdramatic lol)

greg13:07:39

I haven't tried rust, although I've spend writing C++ several years. Both Rust and C++ target similar niches, and looking at the syntax, it looks very similar, sharing similar paradigms, sharing some of the ballasts. I'm not sure would I look at Rust unless I needed write anything very high efficient.

greg13:07:16

Clojure is a such beautiful language, so elegant and so easy to work with data. Even if you need higher efficiency, Clojure with GraalVM should cover most of the cases. If it is not enough, then I would look for other languages

alexlynham13:07:21

idk, if you're happy writing in ML like languages, and if you are tolerant of monads and Either(s) then rust is loads less painful than C++ etc (imho) modern tooling, good editor experience, great package manager, haskell-like smart compiler hints and errors etc, like I say, not bad at all

alexlynham14:07:42

when I have to do nodejs stuff I still habitually reach for cljs/re-frame as ofc i love paredit and lispy stuff, but i really have fallen out of love with JVM clojure i think plus, natch, not an option for what i'm doing atm, it's rust or go and rust is a lot better than go lol

greg14:07:28

Can you tell more what led you to dropping Clojure JVM apart of not being a good fit for the current task?

alexlynham14:07:46

a few technical reasons, but at its core, ergonomics

greg14:07:49

What did you switch to for writing backend stuff?

alexlynham14:07:10

the selling point of JVM clojure is "interact with java packages" cool, i see why that's a thing if you're invested in java ecosystem i hate java interop in clojure so šŸ¤· and other build systems and tooling in other languages are so much slicker

alexlynham14:07:23

for backend stuff? mainly node

alexlynham14:07:38

so a bit of cljs for my own stuff, typescript for paid work, now a bit of rust

alexlynham14:07:03

build system is nicer, there's a library for everything, no JVM hassle

alexlynham14:07:21

obviously deeply subjective šŸ™‚

greg14:07:38

sure, I was just curious šŸ˜‰

alexlynham14:07:03

i mean, if i needed to work with certain things, then i'd consider using jvm clj again

alexlynham14:07:09

like, err.... kafka, for example

alexlynham14:07:30

(probably cassandra too, actually)

greg14:07:18

Yeah, I haven't wrote much Cljs, but I understand what you mean. The JS libs APIs are more Clojurish than Java's. Plus all that deployment platforms: serverless, Firestore functions, CloudFlare workers... I've got an impression that is easier and faster to ship stuff in JS ecosystem. I've been thinking for a while to switch to Cljs but I haven't done it yet.

greg14:07:54

What's your current setup for cljs (editor, build tool, cloud provider)?

alexlynham15:07:36

emacs/shadow-cljs (w/npm)/aws (serverless)

alexlynham15:07:57

shipping serverless functions is pretty quick in cljs but it might be even faster using typescript if you use fp-ts and go strongly typed functional. obviously no runtime guarantees but monads x typescript compiler is relatively safe and relatively easy to work with, so a decent trade-off for backend services imo

alexlynham15:07:52

you're essentially right though, the js community has been going more towards functional/immutable over the last few years and it really means the level of pain with interop there is decreasing

greg15:07:43

I think JS was always more functional and more data oriented then Java. In terms of interop, it is quite natural to use maps to hold function parameters in JS. You can't do that in Java. All the builders, all the patterns to just handle data.

greg15:07:45

Had you been emacs user prior jumping into Clojure? I've been thinking about investing in learning it, but I'm not sure is it worth it (I'm using Cursive and works really nice).

alexlynham15:07:39

tbh if you have a setup that works, just use that

alexlynham15:07:11

i learned clojure for a project, to a deadline in 2014 when cursive was alpha or maybe didn't exist, other devs used emacs so i learned emacs

alexlynham15:07:43

i've grown to love it and use it for other langs since but it's got a learning curve that's pretty wild if you're not needing it across multiple machines/OS's, etc

greg15:07:29

yeah, agree, got similar conclusions. I think I would enjoy it, it is just it is quite an investment. Most probably I'll wait with learning it until I end up in a team using emacs.

seancorfield16:07:36

I used Emacs on and off for close to 20 years, but switched to Atom and then VS Code -- and I think VS Code is great, with Calva (although I turn off the nREPL UI and use Clover with a Socket REPL for all my code eval needs).

seancorfield16:07:30

Some people just love Emacs -- and use it for a lot more than just editing. Other people just find it to be a huge time sink and an exercise in frustration šŸ™‚

šŸ˜‚ 2
alexlynham16:07:56

there's things i like about it, and things i don't tbh, but i like that it feels familiar, whatever language i'm in, and it's relatively uncluttered when i need to work

alexlynham16:07:27

but i am weird and typically also have one to two instances of sublime text open with all the buffers i don't want to think about right now

alexlynham16:07:07

so i apparently have 6 projects open in sublime right now so i can sort of browse code, but only one open in emacs, the one i'm working on right now

seancorfield17:07:37

I usually have two or three VS Code instances open: one for work, one for OSS, and sometimes one for whatever random project I'm investigating or helping a beginner with. I like that I can just say code . and open up a new instance for that folder.

mccraigmccraig14:07:51

the no-gc-through-type-safety thing that rust does looks pretty compelling to me

alexlynham14:07:00

yeah carp is really cool

alexlynham14:07:11

we had a talk on that at LL in the spring

alexlynham14:07:01

it may be that medium term carp is where i gravitate, but the mindshare for packages etc in rust is decent, not sure whether carp will get there... lisp doomed to be niche etc

mccraigmccraig14:07:26

yeahino, mindshare is super important. i don't get why anyone writing a language would write anything other than a lisp, but the universe doesn't agree with me

šŸ˜‚ 2
šŸ‘ 2
rickmoynihan16:07:05

With the possible exception of when you want a prolog šŸ˜†

mccraigmccraig16:07:41

i kan haz lispy prolog plz ?

rickmoynihan16:07:59

Well I guess you can in the form of something like shenā€¦ And you can always use something like core.logic or minikanren; if thatā€™s sufficientā€¦ However, Prolog has a similar culture to Lisp; it was a GOFAI language for symbolic computation, it has an equally big culture and history of meta programming, and itā€™s super easy to do, itā€™s also got a minimal syntax etc. So mixing the two feels less minimal, and more like a kitchen sink. That said Iā€™ve never used shen (though have used core.logic a fair bit).

mccraigmccraig17:07:42

i'm not looking for a kitchen-sink language - i'm just confused why non-lisp language syntaxes even exist, since lisp syntaxes make it so much easier to manipulate the language as data

mccraigmccraig17:07:12

so i just want all the languages to keep their differing semantics and switch to a lisp syntax šŸ˜€

mccraigmccraig17:07:21

but i've never done anything more than toy examples in prolog, maybe its syntax is just as easy as lisp

mccraigmccraig17:07:43

e.g. i see stuff like https://gitlab.haskell.org/ghc/ghc/-/wikis/applicative-do and i think "if only you'd used a lispy syntax for your haskells, that would just be a macro and y'all wouldn't have to wait around for the compiler to change or be dependent on non-standard compiler extensions"

alexlynham14:07:59

my thoughts exactly