This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-29
Channels
- # announcements (4)
- # babashka (66)
- # beginners (7)
- # cljs-dev (6)
- # clojure (12)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-norway (75)
- # clojure-uk (16)
- # clojuredesign-podcast (1)
- # clojurescript (16)
- # datascript (6)
- # deps-new (2)
- # dev-tooling (40)
- # exercism (1)
- # fulcro (92)
- # hyperfiddle (25)
- # lsp (19)
- # malli (1)
- # meander (2)
- # nrepl (9)
- # off-topic (5)
- # pathom (1)
- # practicalli (1)
- # re-frame (20)
- # reitit (14)
- # releases (1)
- # sci (86)
- # shadow-cljs (216)
- # sql (13)
- # testing (4)
- # tools-deps (4)
- # vscode (3)
Morgen. Happy Friday!
Morning and happy Friday to you too!
does this always happen with typed langs ? i started out trying to port a clj/s lib to typescript and now i'm browsing https://github.com/ronami/meta-typing for all the hacks^h^h^h^h^htechniques to do transformations on types 😭
they are neat tricks, but i can't help but wish that types were plain old data structures and i could create new types with all the usual functions, like you can with https://github.com/LuxLang/lux#types
I think that typescript is unusual in that it has a turing complete type system. Which always seems a bit like missing the point of type systems to me. But it does let you write things like this:
const thing = { key: { map: ['of', 'values'] } } as const;
type ThingKeys = keyof typeof thing;
const f = (t: ThingKeys) => thing[t];
f('key');
which might come somewhere near types that are "plain old data structures"i gather haskell and scala have turing complete type systems too...
and i know lisps are unusual in having the base language available at compile-time, but lux's approach of encoding types in plain old data structures in the base language sure seems nice compared to having a completely separate and quite weird type language!
but meanwhile, i seem to be constructing filter and map functions on types with typescripts conditional recursive and mapped types, so it's a weird kinda fun 😀
it's an interesting language with some very neat ideas (e.g. monadic macros... like a state-monad where the state is the full compiler state, itself just another plain old data structure)... but it's been around for a while and doesn't seem to have gotten much momentum