mort, to programming
@mort@fosstodon.org avatar

What does NVM mean by: nvm is not compatible with the "PREFIX" environment variable: currently set to "/opt/homebrew"

how can something possibly be incompatible with a generic environment variable, what does it think "PREFIX" even means?

And how does PREFIX ever end up being "/opt/homebrew"

f3rno64, to programming
@f3rno64@aus.social avatar

Hi everyone,

I'm currently looking for a new job, something remote, full-time, or contract. A freelance opportunity would be welcome as well.

I'm a senior software engineer specializing in web app development, full-stack.

I primarily work with Node.JS, React, and TypeScript, along with Python if needed. I know several other languages as well.

If you know of any open positions or opportunities, please reach out!

This is my GitHub: https://github.com/f3rno64

And LinkedIn: https://www.linkedin.com/in/crismihalache/

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

Kitten update: session IDs now available in the request.session objects you get in your routes.

Kitten lets you persist arbitrary data in session objects to make it easy to work with sessions but you cannot store custom objects (instances of custom classes) as Kitten’s default database is not aware of custom classes in your application. Now, keyed to the session id, you can store custom objects in your app’s own database.

https://codeberg.org/kitten/app#sessions

:kitten: 💕

aral,
@aral@mastodon.ar.al avatar

(The use case for this is pretty neat: keep your interface state in custom state class instances persisted in session objects and, using the Streaming HTML workflow*, send back pieces of the interface that take those state objects as their only prop. Quite a neat separation of concerns and state is maintained only on the server in those objects.)

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

Node v21.7.0 (Current): text styling, loading & parsing environment variables, and more
@nodejs
https://nodejs.org/en/blog/release/v21.7.0

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

Hey folks, I just released Auto Encrypt Localhost* v8.4.0 with better async support and updated dependencies.

https://www.npmjs.com/package/@small-tech/auto-encrypt-localhost

  • My pure JavaScript module (no mkcert, certutil, etc., required) that automatically provisions and installs locally-trusted TLS certificates for Node.js https servers.

(There seems to be an issue with tests failing on macOS, will debug that tomorrow and likely post a patch release.)

aral,
@aral@mastodon.ar.al avatar

Quick update: the failing tests were apparently because I had my VPN on on macOS (that was creating an additional IPv4 interface that was getting picked up by the tests that check that your server is accessible via a valid TLS certificate from all available local IPs).

So no patch necessary :)

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

New blog post: Streaming HTML

https://ar.al/2024/03/08/streaming-html/

Let me show you how easy it is to create a simple counter web app using the new Streaming HTML workflow in Kitten before peeling away the magic layer by layer so you learn how to make the same app using:

• HTMX & WebSockets
• Plain old JavaScript, and, finally,
• Without Kitten in pure Node.js.

Enjoy + let me know what you think.

:kitten: 💕

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

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