Fork me on GitHub
Daniel Tan11:06:29

in haskell, how does one translate {:lines [] :pictures []} as a composite type, ala class Page { lines; pictures;}


I’ve been writing java all week, refactoring some configs that are parsed from files to java classes, since some subset of configs is shared between different services


a week of juggling stupid class hierarchies when in clojure it would have been just loading config as data T_T


how do I sneak in clojure into a java shop?


@danieltanfh95 That would be something like data Page = Page { lines :: [Line], pictures :: [Picture] }


@vlaaad clojure is just a java dsl for configuration...


Or so I've heard from java shops who accepted it


It's only a java library

Daniel Tan12:06:26

what’s good in types vs schemas? technically type classes are just schemas?


Clojure is a Java DSL for data transformations, yeah sounds good

😄 8
😉 4

@danieltanfh95 type classes are more like protocols in Clojure

Daniel Tan12:06:02

im just trying to understand why use spec over types/protocols

Lennart Buit12:06:41

Talking as someone who likes Haskell and clojure.spec. Haskells type system is less expressive, but gives you compile time guarantees. clojure.spec is very expressive (its just arbitrary predicates, right), but because it is, usually is only offering runtime checking

Lennart Buit12:06:03

that makes spec a good fit for clojure, it does not impose the rigidity of a type system on a language that aims to be flexible

Lennart Buit12:06:07

If that makes any sense

Daniel Tan12:06:33

any thoughts on this?

Drew Verlee19:06:46

The question "does this meet specification" or "is this provable" isn't just useful at compile time concern imo. I predict more modern languages will blurr this dynamic even further.

Drew Verlee19:06:31

if you head over to future of coding slack people discuss lanagues that seem to do just this. But it takes decades for the changes to seep in. I predicate some big company will promote a language that will do this by 2030. But i have also just randomly been predicting things in hopes of getting one right for the last couple years. I predicate ill get at least one prediction right by 2025. see how easy that is...


socially, of course


Any recommendations on best practices for setting up authentication for web apps? I want something that will works both on-prem and “in the cloud”, and I’ll probably want to set up Oauth2 and 2FA eventually.

Drew Verlee21:06:04

Dont roll your own auth server. Everything past that depends on your budget, plateform, etc...

Drew Verlee21:06:31

we use keycloak which has a ton of authorization stuff that we ignore and just use auth through the tokens/claims/jwts


I’ll take a look at Keycloak, thanks 🙂

Drew Verlee16:06:25

is there a way to save the state on a ssh agent between idk computer restarts? in particular it seems i have to start the agent and add a key: e.g $(ssh-agent -s) && ssh-add -k some_key


I use keychain - for many years.


I'm working on an emacs-like editor. I have a similar windowing system to emacs with "windows" (the rectangles that divide up a screen) and "buffers": the things that go in the windows and basically provide all ui/functionality. "Buffers" in my app aren't necessarily just for displaying text and could be anything. Trying to think of a better name for "buffers" which doesn't feel right. Any ideas for a good alternative name for "buffer"? I've been using "app" but not in love with that either. Thinking about "mApp" ("mini app", implemented as clojure map), not sure how I feel about that either.


“frame” is related concept


similarly, “viewport”


Good ones. I guess atom uses "pane"

👍 8

in emacs frame is the window which can contain multiple buffers


I believe a frame in emacs is what most OSes refer to as "windows", ie the thing you drag around in main OS gui


that's right


buffer is where the important state is stored? 🙂 I call that display-state, or focus


i mean, there are only so many good words. I wouldn’t depart from historical usage unnecessarily, but it might be better to use a good descriptive word than inventing a new one or using a less apropos word


if you depart from historical editors, you can depart from their terminology


how does VSCode call them, "open file"?


I was looking at other jargon from architecture, “metope” is interesting.


this is other jargon from architecture, just because you are not familiar with it, doesn't mean it's non-existent or invalid 😛 😄


I know someone who is working on a windowing GUI library which is going to get that name probably 😉

😁 4

cool words 😎 thanks for the brainstorming help


> I never returned from my ‘sabbatical’. what a great sentence in the history of clojure book

🙂 48
rich 35
Vincent Cantin20:06:49

because there is no return in Clojure

😃 4