clojure-uk

A place for people in the UK, near the UK, visiting the UK, planning to visit the UK or just vaguely interested to randomly chat about things (often vi and emacs, occasionally clojure). More general the #ldnclj
dharrigan 2020-08-27T06:32:36.080100Z

Good Morning

djm 2020-08-27T06:51:40.080300Z

πŸ‘‹

mccraigmccraig 2020-08-27T07:09:29.080700Z

!mΓ₯ningΒ‘

yogidevbear 2020-08-27T07:12:53.080900Z

Morning πŸ˜„

alexlynham 2020-08-27T07:41:46.081Z

morning

alexlynham 2020-08-27T07:42:02.081100Z

@mccraigmccraig yeah that's one thing that's irking me about typescript atm

alexlynham 2020-08-27T07:42:16.081200Z

the fact i have to write types, then data validation and maintain both

alexlynham 2020-08-27T07:42:42.081300Z

makes the language feel toy-like since a lot of errors/ user data issues are ofc runtime

alexlynham 2020-08-27T07:43:19.081400Z

and both typescript and purescript (the latter to a lesser extent) have this problem big time cos at runtime, it's just minified JS so all bets are off if you don't have any runtime checking

mccraigmccraig 2020-08-27T07:58:14.084800Z

last time i looked, lux had a nice typesafe library for automatically producing encoders/decoders from types ... not sure whether that's something that can be replicated in other hm-typed langs, or if it depends on some features of lux, like types being expressed as regular datastructures or the full compiler state also being a regular datastructure and available to macros https://github.com/LuxLang/lux/blob/master/stdlib/source/poly/lux/data/format/json.lux

mccraigmccraig 2020-08-27T08:01:18.086100Z

and the decoders return an error-handling type, so runtime errors are catered for

alexlynham 2020-08-27T09:37:22.086200Z

ah I thought lux was dead

alexlynham 2020-08-27T09:37:51.086300Z

but it looks moderately active

alexlynham 2020-08-27T09:38:28.086400Z

i think i'm back to my regular 'why don't people just use lisp' or at least a data oriented lang frustration

alexlynham 2020-08-27T09:38:56.086700Z

all we do with line of business apps is shuffle around data, so why do we spend so much time messing around with things that aren't that

alexlynham 2020-08-28T09:33:58.104200Z

viva la revolucion

thomas 2020-08-30T15:55:33.111400Z

πŸ˜‚

alexlynham 2020-08-27T09:39:10.086900Z

very noticeable that that's not an issue i have when working in clj

mccraigmccraig 2020-08-27T09:41:53.088900Z

i don't think lux is dead, eduardo still seems to be pretty focused on it, and from the look of it he's achieved quite a lot - but it's also been changing massively (which may be a good thing), so i wouldn't try writing any real code on it yet

mccraigmccraig 2020-08-27T09:46:03.089400Z

also @bronsa has some quite strong opinions about lux syntax πŸ™‰

2020-08-27T10:04:26.089700Z

Morn'

alexlynham 2020-08-27T10:20:16.089800Z

strong opinions... negatively?

dharrigan 2020-08-27T10:27:04.090Z

Hear! Hear!

2020-08-27T10:37:42.090300Z

Morning All!

mccraigmccraig 2020-08-27T10:37:47.090400Z

negatively, but about the aesthetics of the syntax rather than anything functional i think...

2020-08-27T10:38:19.091Z

Does anyone have an opinion on core.async these days?

mccraigmccraig 2020-08-27T10:38:27.091100Z

and the lux syntax certainly looks very different to other lisps

2020-08-27T10:38:48.091300Z

prediction: at least one person prefers manifold streams

mccraigmccraig 2020-08-27T10:40:21.091500Z

lol, i have my issues with both core.async and manifold, although i've used manifold a lot more heavily

πŸ‘ 1
2020-08-27T10:41:41.091800Z

we're considering using callbacks for an internal API as it will probably be sufficient and simpler, but core.async is also being considered

mccraigmccraig 2020-08-27T10:41:52.092Z

i think core.async makes for a poor promise abstraction, but is good for co-ordinating streams of things

mccraigmccraig 2020-08-27T10:42:22.092200Z

for an API call returning a single result a promise is a better fit i think

mccraigmccraig 2020-08-27T10:42:49.092400Z

for an API returning streams of things (like a websocket) then core.async is a good fit

mccraigmccraig 2020-08-27T10:43:37.092600Z

i prefer the promise for the API because [1] promises compose easily and [2] error-handling is built in and also composes well

2020-08-27T10:44:00.092800Z

core async's killer feature is backpressure If you need backpressure then its a good choice If not, then it isnt

πŸ‘ 1
2020-08-27T10:44:54.093Z

er, or if you are using cljs in a browser, thats a killer feature too (might be out of date on that one)

mccraigmccraig 2020-08-27T10:46:25.093200Z

for cljs api calls from a browser i'd go with promises over core.async too - funcool/promesa wraps them nicely

πŸ‘ 2
mccraigmccraig 2020-08-27T10:48:15.093500Z

but for websocket messages and streams of events in the browser - core.async is a good fit there

bronsa 2020-08-27T10:57:27.093800Z

:) It's been too many years since I last looked at lux to remember much about what I thought about it

alexlynham 2020-08-27T12:15:35.094Z

also if you do have a thing that core.async does work well with, combining abstractions like transducers etc is a breeze

alexlynham 2020-08-27T12:15:38.094200Z

imo a little easier to handle lotsa stuff using that (like you say w/ the example of a stream) vs promises/promise chains

alexlynham 2020-08-27T12:17:01.094400Z

unless you get deep into craig's world of streams & monads