aral, (edited ) to SmallWeb
@aral@mastodon.ar.al avatar

Recorded the first video with my new setup last night, about Kitten’s new Streaming HTML workflow.

(And, unlike most quick demos, it doesn’t ignore accessibility.)

It’ll be part of a long blog post dissecting exactly how it works, step by step.

Here’s a little peek before that.

Let me know what you think :)

:kitten: 💕

https://vimeo.com/920601063

(You can install Kitten and play along: https://codeberg.org/kitten/app#getting-started)

pawelgrzybek, to programming
@pawelgrzybek@mastodon.social avatar

✨ New post

Clearly, you missed my article that I published yesterday. No worries, here it is!

https://pawelgrzybek.com/node-js-added-utility-for-text-formatting-you-may-not-need-chalk-anymore/

schizanon, to node
@schizanon@mas.to avatar

Node.js now has a built-in API for styling text

(similar to chalk, picocolors, etc)

https://nodejs.org/docs/latest/api/util.html#utilstyletextformat-text

thisismissem, to programming
@thisismissem@hachyderm.io avatar

Handlebars.js is the worst templating language in existence, but, if you have to use it, and need some sort of "global" value in your templates, e.g., a csrf_token, then you can use this:

https://gist.github.com/ThisIsMissEm/014a2d6ddb0ba53bebfb7be04870c46b

I'm sorry for writing this code, it's a horrible hack. But maybe it'll be useful to you.

aral, to SmallWeb
@aral@mastodon.ar.al avatar

You can now create HTML and CSS fragments in Kitten.

This introduces two new file extensions (.fragment.html and .fragment.css) and you can import these fragments into your pages and into other components and fragments as if they were JavaScript modules*.

HTML fragments also support slots.

Example:

https://codeberg.org/kitten/app/src/branch/main/examples/html-and-css-fragments

*Thanks to Kitten’s behind-the-scenes use of a custom ES Module Loader.

[Screenshot of terminal window showing hx (Helix Editor) with two panes. Left pane, selected, shows source of Markup.fragment.html: I’m some HTML from Markup.fragment.html.

${SLOT} I’m some other HTML Markup.fragment.html.

${SLOT.other} I’m yet more HTML Markup.fragment.html.

Right pane shows source of Styles.fragment.css: /* I’m some CSS / :root { --accent-colour: red; --border-width: 2px; } div { border: var(--border-width) solid var(--accent-colour); margin: 1em; padding: 1em; } / Show slotted divs with a different colour. */ div > div { border-color: lightpink; } ](https://s3-eu-central-1.amazonaws.com/mastodon-aral/media_attachments/files/112/032/044/950/950/448/original/5b1d6e886eccdcd6.png)

aral,
@aral@mastodon.ar.al avatar
paladin, to php German
@paladin@mastodon.online avatar

Your daily php-dev fitness:

composer selfupdate && composer global update && npm -g i npm npm-check-updates && ncu -g

You are welcome ;)

f3rno64, to mastodon
@f3rno64@linux.social avatar

Hello everyone! 👋

I am excited to announce that I have just joined , and this marks my first post here! 🎉

As a software engineer, I hope to connect with like-minded individuals and build new friendships. 🤝

My work primarily involves developing modern web applications using and .

If you share similar interests and would like to connect, please hit me up, and let's chat! 😊

magpiemarket, to programming
@magpiemarket@fosstodon.org avatar

Officially pivoting to for our backend! The repo should be updated to reflect that soon.

https://codeberg.org/MagpieMarket/magpie-market-prototype/issues

aral, to SmallWeb
@aral@mastodon.ar.al avatar

Heads up: if you were playing with Kitten¹ on macOS, you might have noticed that some of the commands were exiting with a truncated header.

This has now been fixed and all commands should look and work exactly the same on macOS as they do on Linux.

:kitten: 💕

¹ https://codeberg.org/kitten/app

rstacruz, to programming
@rstacruz@hachyderm.io avatar

Been using Volta for a long time now to manage my setup, but been slowly feeling like it's being made redundant with Corepack becoming more mature.

I switched to Mise for a few weeks and found a few interesting things 😀

https://ricostacruz.com/posts/mise-vs-volta

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
aral, (edited ) to programming
@aral@mastodon.ar.al avatar

In case you’re using Node’s fs.watch() directly instead of using a library*, take heed that it doesn’t give you atomic events for file changes.

If a file is being saved, you’ll get one event for every time a chunk is written to the file system. So you have to debounce your event handler.

e.g., https://codeberg.org/kitten/app/src/commit/579aeabd0ad02768fa62142fa660d25577da33c5/examples/markdown-preview/index.page.js#L195

pdxmisfit, to programming
@pdxmisfit@lvb.io avatar

I am not a programmer. I know it's JS for backend stuff, among other things, but that's about all I know.

I need to set up some machines for an internal customer that have NVM and NodeJS and Angular.

I found an role to accomplish this… but it says to clone in into the "roles" directory of the project.

gives me hives, even though I'm not a beginner.

Is repo-in-a-repo okay? or am I just asking for trouble?

@b0rk
@geerlingguy

arendjr, to typescript
@arendjr@mstdn.social avatar

Received an invite for the https://jsr.io beta. This looks like a potential winner!

  • First-class @deno_land support
  • ESM-only
  • Built-in
  • Auto-doc generation from your TS sources
  • Seamless publishing from Actions
  • integration

Especially the part where you can just publish your TypeScript package without transpilation, and they handle /NPM compatibility is pretty big for IMO.

leanpub, to devops
@leanpub@mastodon.social avatar

Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python by Arnaud Weil is free with a Leanpub Reader membership! Or you can buy it for $11.99! http://leanpub.com/k8s

rednafi, to python
@rednafi@fosstodon.org avatar

My team at Wolt is looking for a staff+ engineer proficient in either or .

The position is fully remote as long as you live in or willing to relocate to Stockholm, Berlin, or Helsinki. If you know someone who might be a great fit, I’d love to have a chat.

https://careers-wolt-com.translate.goog/ja/jobs/staff-backend-engineer-(node.js-or-python)/2ea1b8d?_x_tr_sl=ja&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=sc&_x_tr_hist=true

wervice, to programming
@wervice@fosstodon.org avatar

I'm working on a JS script that lets you manage packages on Linux (and maybe also Windows) from , as part of Zentrox. I'll see how it goes. If it works fine, I'll try to make it a small library.

teleclimber, to programming
@teleclimber@social.tchncs.de avatar

I made a contribution to browserslist:

https://github.com/browserslist/browserslist/pull/819

I have been trying to get the Lume static site generator to run inside a sandbox, but I have been running into all kinds of issues: some modules written for assume they have read permissions for the entire disk, and error out when you run them with restrictive permissions. Any project that uses + (ie most build systems) will hit this.

https://github.com/browserslist/browserslist/issues/813

1/2

leanpub, to devops
@leanpub@mastodon.social avatar

Learn Kubernetes & Docker - .NET Core, Java, Node.JS, PHP or Python by Arnaud Weil is free with a Leanpub Reader membership! Or you can buy it for $11.99! http://leanpub.com/k8s

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

Official trailer: “Node.js: The Documentary”
@nodejs
https://www.youtube.com/watch?v=SfWPqr04srM

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

Node.js community debate intensifies over enabling Corepack by default and potentially unbundling npm
@sarahgooding @SocketSecurity
https://socket.dev/blog/node-community-debates-enabling-corepack-unbundling-npm

julia, to random

Just a few script tags. As a treat.

o76923,
@o76923@kitty.social avatar

@julia

Apparently I am too late already exists. It advertises that you can now enjoy the power of in the browser.

Is it too late to join team Sand was not Meant to Think?

minioctt, (edited ) to Software Italian

La dualità del fixare (o, in generale, far funzionare il ?):

  • Perdi almeno 1 ora buona appresso ad un oscurissimo (spoiler: la codifica del testo centra sempre in tutti questi bug, in realtà estremamente stupidi), facendo svariati test e tentando varie opzioni prima sensate, e poi senza senso perché altrimenti non sai nemmeno come continuare. 🤥️
  • Nel frattempo si è fatto in culo, ti prepari per andare a e nel frattempo pensi, ma niente… a metà spegni ormai il PC, finisci di prepararti, e continui a , e solo a quel punto un’idea ovvia viene in testa. Troppo tardi ormai. 💀️

E poi ancora, perché le non sono mai abbastanza:

  • Giustamente nel letto ti irrequieti e non prendi , perché il cervello non prende pace senza vedere il finalmente risolto dopo tutta la passata, anche scommettendo che l’ appena venuta è giusta al 100%. 🥴
  • Però prima o poi il sonno lo prendi, e dopo ore arriva la dopo, in cui la sveglia suona e… pensi “zzzzzzz voglio stare nel lettino ancora, tanto la in mente l’ho risolta, chi me lo fa fare di ammazzarmi a prima mattina [prima mattina: le 9:30, ndr.]”. 🥹

Insomma, è una . Non se ne esce. Comunque si, il mio era : stavo cercando di caricare nella galleria cloud di tramite la REST, ma ricevevo sempre un rest_upload_sideload_error… controllo gli header, tutti giusti; cerco in giro, poca roba che non mi aiuta; provo come mettere gli header lowercase, ancora niente; tento di settare a mano content-type parziali o estensioni file arbitrarie, e ovviamente non risolvo. 🤯️

Però, noto che un caricamento da curl, anziché dal mio JS, va a buon fine. Allora, provo a caricare verso un server netcat in entrambi i modi, così da poter vedere al volo i dati della trasmissione , e noto una differenza stronzetta: il corpo generato dal mio è molto più grosso del peso normale del file… quindi qualcosa lo sta corrompendo E qui, però, mi sono ribloccata. 🤔️

Solo poi, quando ormai avevo chiuso tutto come ho detto, ci ho pensato: ma io, nella parte del che legge i trasmessi dal client, vado a castare tutto ad una stringa; sarà questa la causa? …E, ricordandomi di altri simili capitati in , capisco subito che è così. Detto in breve: la del testo centra sempre e rovina ogni cosa. Se esistesse solo l’ASCII, ecco che castare dati binari a stringhe non causerebbe alcun danno. E invece abbiamo deciso che i devono supportare nella loro codifica migliaia di discutibili, come tutti quelli emoji. E io, dopo aver apportato questo , devo ora continuare a programmare. Non. Se. Ne. Esce. 😭️

https://octospacc.altervista.org/2024/02/09/insetti-utf-nel-mio-codice/

indutny, (edited ) to programming
@indutny@fosstodon.org avatar

Looks like there is going to be a Node.js documentary soon! Apparently there is even a honorary mention of yours truly. Although I don't know if it there is going to be more than my avatar in the documentary 🤣 Will have to see once it is released!

https://www.youtube.com/watch?v=SfWPqr04srM

minioctt, to web Italian

Colpo di estremamente radicale per risolvere un annoso : il creare una data , che non abbia bisogno di grande interattibilità (vedi un social network, o un CMS), senza dover mantenere 2 separate e quindi impazzire, facendola funzionare sia con un che totalmente senza… ossia, come unire in una sintesi circa accettabile i due maggiori paradigmi del ? 🤔️

  • Quello antico, delle prime , dove il server genera tutto l’HTML e il browser lo visualizza com’è, spesso con (quasi) zero (vedi la Spacc BBS). 📦️
  • Quello moderno, dove nel si espongono API (spesso JSON REST), e il fronte viene sviluppato a parte come app che gira totalmente lato , con il che richiede pezzetti di dati e fa i suoi iperprocessamenti. 💱️

Ormai quello antico non si usa quasi mai per nuovi, perché gli svantaggi sono pesanti appena si vuole andare un po’ più in là: per tappare i buchi nel progetto medio si finirebbe a dover scrivere talmente tanto , che a questo punto era meglio fare tutto nel secondo modo, senza menzionare i modelli e le da esporre nel server che altrimenti non si sarebbero implementati. Però, le webapp antiche girano bene anche sul computer tascabile meno performante (average Ximi), sui browser vecchi, e spesso sono le uniche che vanno quando tutto il resto ti lascia a piedi. D’altro canto però, anche se in teoria quella potrebbe funzionare , magari mostrando dati cachabili, se è sviluppata in modo attaccato al server ecco allora che non si può fare nulla: muore il server, muore tutto. 💣️

Quindi la mia paxxerella, dato che devo fare banalmente una come frontend per un altro servizio già esistente, ma voglio i vantaggi appena millantati: sviluppare con i paradigmi in un framework JS adatto, che giri sia in Node che nel browser. A quanto pare, qualcuno ci ha pensato prima, e qualcosa di già fatto ho trovato (Express+FrontExpress, Koa+Koa-Client, Rill)… ma è tutta roba ormai abbandonata, che o non funziona (ho provato) o ha altre . Te pareva che trovavo mai qualcosa di buono già pronto… Però, in un quarto d’ora ho tirato su uno scheletrino, giusto per poter partire per questa via. ☠️

Rapido : questo (giusto da , non fa nulla se non mostrare questo testo e far navigare tra pagine) gira sia come server su , che come script in una pagina totalmente , e l’esperienza non cambia. Percepisco il potenziale, continuerò così. 😤️https://octospacc.altervista.org/2024/02/07/frontendare-lato-client-come-fossimo-nel-backend/

simplescreenrecorder-2024-02-07_17.05.35

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • thenastyranch
  • Durango
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • cisconetworking
  • Youngstown
  • mdbf
  • slotface
  • osvaldo12
  • GTA5RPClips
  • kavyap
  • megavids
  • InstantRegret
  • everett
  • cubers
  • vwfavf
  • normalnudes
  • tacticalgear
  • tester
  • ethstaker
  • khanakhh
  • modclub
  • Leos
  • anitta
  • JUstTest
  • All magazines