2025/03/01

2025-03-01 00:01:09 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 248 seconds)
2025-03-01 00:02:18 +0100 <haskellbridge> <Liamzee> hope this is not too obnoxious, but do single-library webapp applications exist?
2025-03-01 00:02:48 +0100 <haskellbridge> <Liamzee> as in, you define your program in objects / datatypes, then you use different compile functions to render the objects / datatypes to backend, frontend (multiplatform)?
2025-03-01 00:03:59 +0100 <c_wraith> there are attempts in that direction, but they're all still pretty awkward to use.
2025-03-01 00:04:10 +0100 <haskellbridge> <Liamzee> honestly this might be something haskell is good for
2025-03-01 00:04:16 +0100 <haskellbridge> <Liamzee> due to lazy evaluation
2025-03-01 00:04:40 +0100 <c_wraith> like https://github.com/obsidiansystems/obelisk is along those lines
2025-03-01 00:04:46 +0100 <haskellbridge> <Liamzee> because in a strict language, if you have the server components of objects
2025-03-01 00:04:50 +0100 <c_wraith> But I think it's not really maintained anymore
2025-03-01 00:05:07 +0100 <haskellbridge> <Liamzee> they have to be fully evaluated, or rendered as tokens
2025-03-01 00:05:28 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-03-01 00:05:43 +0100 <haskellbridge> <Liamzee> whereas in Haskell, due to lazy evaluation and a concept of action, you don't have to evaluate the datatype parts, and this is completely native and idiomatic to haskell (well, not the object aspect)
2025-03-01 00:06:18 +0100 <haskellbridge> <Liamzee> whereas you're looking at macros and tokens (which require ADTs to be remotely reasonable) in other languages
2025-03-01 00:06:29 +0100 <haskellbridge> <Liamzee> erm, don't have to evaluate the backend server actions
2025-03-01 00:07:08 +0100 <c_wraith> It doesn't *really* work that way, thanks to needing to compile eagerly
2025-03-01 00:07:40 +0100 <c_wraith> obelisk's trick is to change the libraries grabbed by a particular name depending on what it's targeting
2025-03-01 00:08:33 +0100michalz(~michalz@185.246.207.222) (Remote host closed the connection)
2025-03-01 00:10:06 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 272 seconds)
2025-03-01 00:11:49 +0100takuan(~takuan@d8D86B601.access.telenet.be) (Ping timeout: 244 seconds)
2025-03-01 00:12:32 +0100 <haskellbridge> <Liamzee> i mean it can be done on a function level
2025-03-01 00:13:30 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2025-03-01 00:16:44 +0100 <geekosaur> it's possible to pick a backend at runtime by using something like environment variables, but this turns out to require low level enough hackery that it has to be done in C/C++ even though conceptually it's just populating a struct of function pointers (because populating that struct requires dlopen/dlsym)
2025-03-01 00:16:59 +0100fp(~Thunderbi@87-92-155-24.rev.dnainternet.fi) (Ping timeout: 244 seconds)
2025-03-01 00:19:23 +0100dolio(~dolio@130.44.140.168) (Quit: ZNC 1.9.1 - https://znc.in)
2025-03-01 00:19:52 +0100Pozyomka(~pyon@user/pyon) (Quit: WeeChat 4.5.1)
2025-03-01 00:20:07 +0100Pozyomka(~pyon@user/pyon) pyon
2025-03-01 00:20:49 +0100bilegeek(~bilegeek@2600:1008:b083:f9b:4ea6:8944:ad90:a41f) (Ping timeout: 260 seconds)
2025-03-01 00:20:54 +0100dolio(~dolio@130.44.140.168) dolio
2025-03-01 00:24:11 +0100 <haskellbridge> <Liamzee> tbh i mean it's just free monad interpreter, but have different interpreter functions
2025-03-01 00:26:05 +0100bilegeek(~bilegeek@123.sub-174-228-103.myvzw.com) bilegeek
2025-03-01 00:27:32 +0100wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2025-03-01 00:28:30 +0100dolio(~dolio@130.44.140.168) (Quit: ZNC 1.9.1 - https://znc.in)
2025-03-01 00:29:30 +0100dolio(~dolio@130.44.140.168) dolio
2025-03-01 00:30:05 +0100 <geekosaur> well, except ideally you don't want to have to statically compile in every backend
2025-03-01 00:30:07 +0100k_hachig_(~k_hachig@bras-base-toroon0247w-grc-123-70-29-50-103.dsl.bell.ca) k_hachig
2025-03-01 00:31:19 +0100poscat(~poscat@user/poscat) (Ping timeout: 260 seconds)
2025-03-01 00:32:39 +0100poscat(~poscat@user/poscat) poscat
2025-03-01 00:33:05 +0100 <haskellbridge> <Liamzee> but is my hunch correct, that, say, there is value in being able to define your frontend and your backend at the same time?
2025-03-01 00:35:07 +0100 <geekosaur> one would think so, but then one must ask why only obelisk did so and it's pretty much dead. I wonder if there's a "lessons from" somewhere
2025-03-01 00:35:27 +0100remexre(~remexre@user/remexre) remexre
2025-03-01 00:35:41 +0100 <haskellbridge> <Liamzee> reflex received an update in january
2025-03-01 00:35:56 +0100 <haskellbridge> <Liamzee> i'd see reflex's mistakes as being, #1, nix-bound, #2, FRP
2025-03-01 00:36:00 +0100 <haskellbridge> <Liamzee> overloaded the novelty budget
2025-03-01 00:36:28 +0100 <haskellbridge> <Liamzee> being lens/optics-based makes it dumb enough for commodity programmers, being cabal-based means that you don't require learning nix on top of everything else
2025-03-01 00:37:29 +0100 <haskellbridge> <Liamzee> also iirc Obsidian had a business model of providing support for users, which isn't good for uptake
2025-03-01 00:37:42 +0100 <geekosaur> not sure I'd call them mistakes considering their website suggests they have a decent number of commercial users
2025-03-01 00:39:28 +0100 <haskellbridge> <Liamzee> actually they're doing better than i remembered
2025-03-01 00:40:34 +0100 <haskellbridge> <Liamzee> https://hackage.haskell.org/package/reflex
2025-03-01 00:41:03 +0100 <haskellbridge> <Liamzee> obsidian does direct work, but they also got screwed by being bound to 8.8 because of the old GHCJS being abandonware
2025-03-01 00:41:13 +0100Googulator79(~Googulato@2a01-036d-0106-14b2-c443-5a96-b49d-1dd5.pool6.digikabel.hu) (Quit: Client closed)
2025-03-01 00:41:26 +0100Googulator79(~Googulato@2a01-036d-0106-14b2-c443-5a96-b49d-1dd5.pool6.digikabel.hu)
2025-03-01 00:44:29 +0100 <haskellbridge> <Liamzee> the reflex package was also updated last month
2025-03-01 00:44:40 +0100Sgeo_(~Sgeo@user/sgeo) Sgeo
2025-03-01 00:46:45 +0100Sgeo__(~Sgeo@user/sgeo) Sgeo
2025-03-01 00:47:44 +0100Sgeo(~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
2025-03-01 00:49:12 +0100Sgeo_(~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
2025-03-01 00:50:52 +0100alfiee(~alfiee@user/alfiee) alfiee
2025-03-01 00:51:19 +0100messewix(~jmc@user/messewix) messewix
2025-03-01 00:51:48 +0100 <haskellbridge> <Liamzee> thanks for the discussion!
2025-03-01 00:52:16 +0100 <c_wraith> there's still room for something like obelisk when the new JS backend for GHC stabilizes
2025-03-01 00:52:32 +0100 <c_wraith> But yeah, being dependent on ghcjs definitely hurt it
2025-03-01 00:53:25 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 248 seconds)
2025-03-01 00:53:37 +0100 <c_wraith> obelisk also needed a better story for server-side services - a way to say "this calculation needs to run on the server. If this is a client, make a remote call"
2025-03-01 00:54:08 +0100 <c_wraith> doing that was a major pain point when I tried it out
2025-03-01 00:55:14 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 260 seconds)
2025-03-01 00:55:30 +0100 <haskellbridge> <Liamzee> data Object = MkObject {frontend :: FrontEnd, client :: ClientCode, backend :: BackEnd}
2025-03-01 00:55:45 +0100yegorc(~yegorc@user/yegorc) yegorc
2025-03-01 00:57:00 +0100 <c_wraith> that doesn't work when you have to compile eagerly
2025-03-01 00:58:00 +0100 <c_wraith> Do you want to compile the postgres driver into your frontend?
2025-03-01 00:58:03 +0100yegorc(~yegorc@user/yegorc) ()
2025-03-01 00:58:07 +0100 <c_wraith> No?
2025-03-01 00:58:21 +0100 <c_wraith> Well then, you need to have different dependencies on each target
2025-03-01 00:58:33 +0100 <haskellbridge> <Liamzee> libraries
2025-03-01 00:58:45 +0100 <c_wraith> so... different dependencies on each target?
2025-03-01 00:58:48 +0100 <haskellbridge> <Liamzee> ah, yes, i see what you mean
2025-03-01 00:59:26 +0100 <haskellbridge> <Liamzee> no, but if the functions aren't used at all, shouldn't they be excluded from the binary?
2025-03-01 00:59:36 +0100 <c_wraith> Only at link time
2025-03-01 00:59:44 +0100 <c_wraith> They have to have built before that.
2025-03-01 01:00:18 +0100ell(~ellie@user/ellie) ellie
2025-03-01 01:01:07 +0100 <haskellbridge> <Liamzee> you could hack it with CPP, i suppose
2025-03-01 01:01:14 +0100 <c_wraith> You can do better than that
2025-03-01 01:01:42 +0100 <c_wraith> You can put platform-specific stuff in separate trees and conditionally include those trees depending on platform in cabal
2025-03-01 01:02:05 +0100 <c_wraith> But it involves a lot of manual work, and a good platform would have a better abstraction for that.
2025-03-01 01:02:15 +0100 <haskellbridge> <Liamzee> but the entire point is so that you're building full stack in one module, one module at a time
2025-03-01 01:02:43 +0100 <haskellbridge> <Liamzee> tbh with CPP, you don't actually need Haskell
2025-03-01 01:06:10 +0100 <haskellbridge> <Liamzee> https://en.wikipedia.org/wiki/Isomorphic_JavaScript
2025-03-01 01:06:16 +0100 <haskellbridge> <Liamzee> also this is basically what i was looking for, oh well
2025-03-01 01:12:33 +0100 <haskellbridge> <Liamzee> that also brings miso into play, which advertises itself as isomorphic
2025-03-01 01:14:30 +0100Everything(~Everythin@46.211.105.36) (Quit: leaving)
2025-03-01 01:36:37 +0100alfiee(~alfiee@user/alfiee) alfiee