Community
Chat Logs
Saturday, May 16, 2026
- bluephaleth: yesteday the primate web machine automatically redeployed
- blueis that configured somewhere?
- bluealso hi
- bluealso, we need to change the deployment branch to 0.38, I accidently floated the unready 0.39 post
- blueI edited the Container image with --branch=0.38 on the git clone, but that did nothing
- phalethhi blue
- phalethno, I did the redeployment last evening
- blueoh ok, that makes sense
- phalethI'm trying deno for the primate website
- blueI took out the 0.39 post for now so we don't need to change the branch, although technically speaking the docs contain some changes
- blueI hope that by 0.39, it'll be all managed by repopack so I could quickly change that, and I do prefer we stay on tsgo for now
- blueI mean by 0.40*
- phalethyeah, we should stay on tsgo
- phalethdo you know if this error https://upaste.de/raw/TbM comes from rcompat are would you be able to fix it?
- bluegenerally speaking until I "branch", I prefer the website to be on master, but after branching and concentrating on breaking stuff, I usually have the website point to the latest version
- blueso that should be easy with RP
- bluelet me look
- bluehm, that feels like deno not recognising that as a node import
- blueshould be "node:http", strictly speaking
- bluecould you paste line 117 here?
- phalethyeah, but it's an uglified code
- phalethdeno does not seems to like pnpm
- blueyeah. though there is `deno install`, fwiw
- phalethso there is a lot on that one line https://upaste.de/raw/AiH
- blueit's just deno is notoriously bad with symlinks and monorepos
- phalethok, but does deno install work with all those dependencies that have ^workspace as a version in package.json?
- blueno
- blueawait (Wo(a) ? import("https") : import("http"))
- bluethis seems wrong, it shouldn't end up in the deno bundle
- phaleththat's where the error comes from yes
- phalethit's not deno bundling it, it's pnpm
- phalethI'm just trying to run it with deno
- blueoh. yes, that has slim changes of working
- bluepnpm will bundle it for node
- blueyou know, maybe we should enable cross-building
- bluenpx primate build --target=deno
- bluethat's what you're looking for, right?
- phalethI have no idea, is that a thing?
- bluelet me show you
- phaleththe thing is there are these ^workspace deps in package json
- bluehttps://github.com/primate-run/primate/blob/master/packages/core/src/private/build/server/index.ts#L75
- blueyou see that line?
- blueif you build with pnpm, it'll be "node"
- bluethese conditions after which branch of rcompat is taken
- bluewhat you essentially want, is to able to say that you're building with pnpm, but the resulting bundle should be for deno
- blueas a quickhack, try changing taht line to "deno"
- blueso
- phalethok
- blue...conditions.deno
- bluethis would force rcompat to take deno paths where available
- blueand that http import would disappear
- phalethhttps://upaste.de/raw/r9r
- blueyes, that's not going to work because I haven't coded it yet
- blueinstead, edit it in the file
- phalethare there no universal package names for all runtimes?
- phalethor is npm:http the one?
- blueyes but you don't want that
- phalethor node:http one that deno can recognize
- blueyou want deno native abstractions
- blueDeno.serve
- phalethah, ok
- bluercompat is intentionally incompatible there
- bluebecause if you're on deno, you shuld take the deno path
- blueanywy, so to src/private/build/server/index.ts
- blueand change line 75 to `...conditions.deno`
- bluethen rebuild core
- blueand try again
- bluego to*
- blueI can edit that deno target fairly easily, but we'd better first test this
- phalethok, new error https://upaste.de/raw/rL7
- blueyes, you're not running it with deno
- phalethoh, right
- phalethhabit
- phalethyeah, that works
- phaleth$ deno run -A npm:primate serve
- phaleth» app url http://0.0.0.0:6161
- bluegreat. and it's using native deno functions
- blueI
- blueI
- blueI'll add crossbuilding to 0.39
- bluethat's a great idea
- bluebuild with bun, run with deno ;P
- phalethok, I'll just put that patch to the Containerfile for now
- bluealrighty
- phalethbuild with node run with deno
- phalethok, the 0.39 blogpost is gone
- blueya, I removed it
- phalethblue: can you merge some of those merge requests?
- phalethI mean pull requests
- phalethespecially the new one
- blueyes, will do phaleth
- bluephaleth: https://github.com/primate-run/primate/commit/08bbbe8d1231393060cb9fb8655b6ec949ee1593
- nevetcore: add crossbuilding · primate-run/primate@08bbbe8
- blueyou can drop your patch and use --target=deno
- blueI merged 2/3 of the prs
- bluehttps://github.com/primate-run/primate/pull/273
- nevetwebsite: remove unused dev dependencies by phaleth · Pull Request #273 · primate-run/primate
- bluethis I'm inclined to reject because I need the devdeps for the snippets, unless you have a better idea
- phalethok, I've closed that one
- bluetell me if that crossbuilding patch worked for you
- blueso I've built the angular app (apps/angular) for node, deno and bun
- phalethyeah, trying that now
- blueI get 3434572 bytes for bun, 3434973 bytes for deno and 3508428 bytes for node
- bluenote though I haven't explored all deno/bun APIs, and rcompat does have some deps which could end up in bun/deno
- phaleth{"stream":"[1/2] STEP 12/13: RUN npx -y primate build --target=deno\n"}
- phaleth{"stream":"\u001b[1m\u001b[38;2;255;165;0mPRIMATE\u001b[0m\u001b[0m \u001b[38;2;255;165;0m0.39.0-pre\u001b[0m \n\n"}
- phaleth{"stream":"✓ build path \u001b[2m/app/primate/apps/website/build\u001b[0m\n"}
- phalethlooks good
- bluegreat
- blueyou know, the differences between the frontends are staggering
- bluean angular app is 3.3mb, react 1.1m, svelte clocks in at 458K
- blueand I do have @lucide/svelte in svelte which I don't in react/angular, that is a hugebutt icon library, not sure how much of it ends up in the bundle
- bluereally I should check
- phalethyeah, the website is fine, the blog page responds fast now
- blueso without lucide, deno is 436K
- phalethright, I wish there was client side framework that was small
- bluebun is same
- bluenode is 508K, ew
- bluewell I guess that answers the question, node pulls in busboy and ws
- blueyou'd really expect a runtime in 2026 to support websockets and formdata properly
- bluebut still, 436K is way too much
- phalethif it's server side bundle then I don't care
- bluelet me check the website, it should be much large b/c of shiki
- bluelarger*
- blueoof, 15M
- blueI feel like there's room for optimisation there, this can't be all the markdown files. I think it's shiki mostly
- bluein dev mode though, the server is 4.7M which is still too much
- bluethe docs dir is 736.0 KiB
- blueI guess that compiles to a lot of HTML?
- blueso an idea I have for the website so it's faster in dev mode, is to not bundle in the .md files, but import from source directly
- bluethat also means esbuild doesn't need to recreate 4.7M when I change a single md
- blueideally really, in dev mode the server.js should be tiny
- blueso basically in the end it's all in memory, right. whether it's a 4.7 file or the different md imports held by esbuild
- bluebut the point being, if you change a single md, esbuild should immediately recompile it only
- blueanother cool idea would be to compile-on-demand, that would also speed up dev mode
- blueso if I never access /docs/i18n, it doesn't get compiled, no idea how to do that though
- phalethare .md files currently bundled and the html is generated at runtime per request?
- phalethfor prod I mean
- blueyes, basically
- bluehttps://github.com/primate-run/primate/issues/253
- nevetProposal: `--target=static` (SSG output + client-only runtime) · Issue #253 · primate-run/primate
- bluethat's why we have this
- phalethah, ok, so that's why bun was struggling there with the response time https://images4.imagebam.com/b9/ae/45/ME1D4GWQ_o.png now deno deployed over an hour ago is fast enough
- phalethno need to rewrite bun in rust when we can just use deno
- blueheh
- bluethe thing is, phaleth
- blueif we land https://github.com/primate-run/primate/issues/253
- nevetProposal: `--target=static` (SSG output + client-only runtime) · Issue #253 · primate-run/primate
- bluewe technically don't really need node/deno/bun to run it
- bluejust to build it
- phalethyeah, that'd be great
- blueit'll just be a bunch of html files
- bluethat nginx can serve
- blueI don't know how fetch navigation would then work, but maybe it's not necessary
- bluethe delta between loading the entire html page, essentially if woff/css is externalised, vs loading 'just' the md content as html in json, isn't very big
- bluewe would need a bit of dynamics, for theme change (probably localstorage again?)
- phalethyeah, that's the thing, client side rendering would always result in flash
- blueya
- bluetechnically could compile both dark and light separately, and have nginx deliver one based on the cookie? is that a thing? I dunno
- phalethnginx can read headers and decide on paths based on that, the web browser could store theme to local storage and set a custom header
- phalethbut that'd require nginx specific configuration
- bluethat's great, then potentially we could solve that
- phalethI think it's just better not to bother storing the theme, but always take whatever theme the browser is set to, the theme switch can still remain on the website
- phalethbut does the browser send that information on every request? no clue
- blueif it's a cookie, yes
- phalethactually css can detect that: @media (prefers-color-scheme: dark) { ... }
- phalethhttps://caniuse.com/?search=prefers-color-scheme
- nevet"prefers-color-scheme" | Can I use... Support tables for HTML5, CSS3, etc
- phalethyeah, so then always load css first and that's it, no reason to bother doing anything server side
- phalethI guess I should try that
- blueya
- phalethI guess this is the solution https://caniuse.com/?search=light-dark
- nevet"light-dark" | Can I use... Support tables for HTML5, CSS3, etc
- phalethok, that just doesn't solve the flash problem either
- bot<discord:blue> Ya
- bluedreamreal: I think markdown db makes a lot of sense if I can have it flattened/rendered down into the bundle, in production
- bluethe one angle I haven't got sorted out yet is reloading the page in dev mode, because that'd require fs watching of the .md files