penginn, to javascript

好きなだけおちんちん祭りを続けることができてしまったのです。

目に見えない文字を悪用してサイトを好き放題荒らされた話 [ - Qiita ]
https://qiita.com/laineus/items/2d168a57fdbf7cd7c9c3

rauschma, to javascript
@rauschma@fosstodon.org avatar

:

This is legal syntax:
{3:3}

Why? You can use numbers as keys in object literals. That can be useful for destructuring [1]:

> const {0:a, 2:c} = ['zero', 'one', 'two'];
> a
'zero'
> c
'two'

However, this is not legal syntax:
> const x = {3};
SyntaxError: Unexpected number

Why? This is called a property value shorthand [2] and only works with names of variables.

[1] https://exploringjs.com/impatient-js/ch_destructuring.html
[2] https://exploringjs.com/impatient-js/ch_objects.html#object-literals-property-value-shorthands

toxi, to genart
@toxi@mastodon.thi.ng avatar

Little Friday night gift for a friend (& example in ): How to generate & then recursively tessellate a hex grid and visualize as SVG, all via just https://thi.ng/geom & https://thi.ng/transducers...

Demo:
https://demo.thi.ng/umbrella/geom-hexgrid/

Source code:
https://github.com/thi-ng/umbrella/blob/develop/examples/geom-hexgrid/src/index.ts

(cc @nkint)

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

Kitten bugfix release:

Please upgrade to the latest release that fixes a regression introduced into sessions object with the latest JSDB¹/JSDF² upgrade:

https://codeberg.org/kitten/app/issues/177

Persisting arbitrary objects to sessions is a supported workflow and this regression broke that.

e.g., See the Kitten Count Sessions example: https://codeberg.org/kitten/app/src/branch/main/examples/kitten-count-sessions/index.page.js

:kitten:💕

¹ https://codeberg.org/small-tech/jsdb#javascript-database-jsdb
² https://codeberg.org/small-tech/jsdb#javascript-data-format-jsdf

#Kitten #SmallWeb #web #dev #sessions #JSDB #JavaScript #database #regression

twilliability, to javascript
@twilliability@genart.social avatar

Question folks! If I use destructuring assignment as below, is an actual array allocated for the function's return value, or does the runtime recognize this and optimize it away?

Asking for a friend living in a tight loop.

const [a, b] = foo();

eikun_0903, to javascript Japanese
@eikun_0903@fedibird.com avatar
nurkiewicz, to javascript
@nurkiewicz@fosstodon.org avatar

"Top 5 Cutting-Edge #JavaScript Techniques". TL;DR:

  1. Monads (Asynchronous Operations)
  2. Declarative Programming
  3. Server-Side Caching for Improved Node.js Performance
  4. Immutability
  5. Pattern Matching

https://thenewstack.io/top-5-cutting-edge-javascript-techniques/

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

New Video – Kitten features introduced this week:

• Interactive Shell (REPL)
• Multi-page Settings
• Backup and restore (data portability)

With examples that cover components and Kitten’s built-in JavaScript database (JSDB).

https://ar.al/2024/05/23/new-kitten-features-interactive-shell-repl-multi-page-settings-and-backup-and-restore-data-portability/

:kitten:💕

slacle, to genart
@slacle@mastodon.social avatar
aral, to SmallWeb
@aral@mastodon.ar.al avatar

So! Many! Kittens!

(Going to record a demo of the new interactive shell – REPL to some – and multi-page Settings this afternoon, just planning it out now.)

Oh and is that me creating and calling web routes interactively in the REPL on a live server? Why yes, yes it is.

:kitten:💕

markstos, to javascript
@markstos@urbanists.social avatar

Is EventEmitter the GOTO of ?

stvfrnzl, to webdev
@stvfrnzl@mastodon.online avatar

I finally got for @astro working! Thanks to @henry sparking my interest for it (again) and anyone here who helped me along the way.

https://stevefrenzel.dev/posts/webmentions-in-astro-for-blog-posts/

I would appreciate lots of likes, reposts and comments so I have more data to work with hehe
😈

rauschma, to javascript
@rauschma@fosstodon.org avatar

Upcoming iterator methods:

// Without iterator methods:
const arr = Array.from(myMap.keys())
.filter(k => isPublic(k));

// With iterator methods:
const arr = myMap.keys()
.filter(k => isPublic(k))
.toArray();

(I prefer not to do .filter(isPublic) because isPublic() may gain more parameters in the future.)

https://2ality.com/2022/12/iterator-helpers.html

marmelab, to php
@marmelab@mastodon.social avatar

🎉 Exciting news! Marmelab is sponsoring the API Platform Conference 2024, the flagship event dedicated to the API Platform framework!

Join us for 2 days of talks by leading experts in , & .

📅 19 & 20 September
📍 Lille, France

Learn more: https://api-platform.com/fr/con/2024/

@cooptilleuls

scy, to javascript
@scy@chaos.social avatar

Theo on const vs let in #JavaScript:

https://youtu.be/dqmtzHB2zTM (32 min).

It's a long video, and he's basically only reacting to and commenting on Let me be https://www.epicweb.dev/talks/let-me-be (12 min) by Ryan Florence.

Theo's main point is that const doesn't mean "this value will never change" (since objects and arrays can obviously still be mutated), but that let means "pay attention, this value will be reassigned further down", and I totally agree.

#const #let

toxi, (edited ) to typescript
@toxi@mastodon.thi.ng avatar

Useful snippet for computing pixel dimensions from paper sizes (both metric (DIN) and (US) imperial presets included) using https://thi.ng/units, an elaborate & powerful unit converter/calculator/DSL for all SI dimensions:

Full list of predefined constants:
https://github.com/thi-ng/umbrella/tree/develop/packages/units#constants

dethos, to security
@dethos@s.ovalerio.net avatar
aral, to SmallWeb
@aral@mastodon.ar.al avatar

:kitten: 🎉

Kitten now has a lovely new multi-page Settings screen and… drumroll… a new 🐢 interactive shell (REPL) for you to play with the running state of your Small Web site/app/place and debug your app, inspect/manipulate its database, etc.

I plan on recording demos of each of them tomorrow but you can play with them now.

And here’s a little tutorial to get you started with the shell:

https://codeberg.org/kitten/app#kitten-s-interactive-shell

💕

Screenshot of Kitten running in terminal: 🌍 Domain https://localhost 📂 Source /var/home/aral/Projects/kitten/app/examples/file-uploads 💾 Databases /var/home/aral/.local/share/small-tech.org/kitten/databases 🐢 To launch an interactive shell, press the [s] key. Server is running and listening for connections… s 🐢 Launching interactive shell ctrl-d to exit; .help for assistance A good place to start is to run the .ls command to see the keys of the global kitten object: » 💡.ls is an alias for Object.keys(kitten) [ 'version', 'domain', 'port', 'app', 'databaseDirectory', 'projectIdentifier', 'deploy', 'WebSocket', 'html', 'libraries', 'page', 'events', 'css', 'js', 'markdown', 'md', 'safelyAddHtml', 'sanitise', 'uploadsDirectory', '_db', 'uploads', 'package', 'db' ] 🐱 💬 kitten.db.images[0] Proxy [ { path: '/uploads/1a6c2612-057d-435b-83c7-7157b4add982/', altText: 'Screenshot of Draw Together sketch that reads Free Gaza!' }, { get: [Function: bound getHandler], set: [Function: bound setHandler], defineProperty: [Function: bound definePropertyHandler], deleteProperty: [Function: bound deletePropertyHandler] } ] 🐱 💬

stefan, to javascript
@stefan@stefanbohacek.online avatar

I've been really enjoying working with Wikidata lately, setting up automated accounts like @libraries, @parks, and @lighthouses.

To see what else you can do with Wikidata, and to learn how to use it, check out a tutorial I put together: https://stefanbohacek.com/blog/making-a-map-of-unesco-world-heritage-sites/

#tutorial #wikidata #LearnToCode #javascript

zalasur, to javascript
@zalasur@mastodon.surazal.net avatar

It's been almost a decade since I've done a live coding stream. This will be fun!

Today I'll be migrating my website from React to Lit, which is a lightweight framework built around web components. I have the scaffolding set up mostly, so now it's time to get this done.

Come watch. Ask questions in chat! You don't need to create an account, just a username is needed to participate.

https://video.surazal.net/w/5S7FPXJMZh1i1eqZLY9mcV

craigabbott, to javascript
@craigabbott@a11y.info avatar

I was today years old and 4 hours down when I learned you cannot deep clone an instance of a #JavaScript class 😩

chipx86, to Discord
@chipx86@mastodon.online avatar

Hey, developers: The @reviewboard team's starting a new #Discord for devs to hang out, chat, and share what you're building.

https://discord.gg/saMCqHEZ

We have channels for #django, #python, #javascript / #typescript, #opensource, #gamedev, and more.

You don't need to use or contribute to Review Board to hang out. (But you can follow development there, if you want.)

We hope to see people come in and hang out. The aim is a friendly, diverse community of devs.

Feel free to pass along the invite!

a11yclub, to CSS
@a11yclub@mastodon.social avatar

Just in: Alongside @karlgroves and @erikKroes, @5t3ph will also be offering a workshop in Amsterdam on 9 June:

Beyond : Requirements for Accessible Components

Participation in half-day workshops costs from € 25, full-day workshops from € 50. Further workshops can be added at any time. Get your tickets: https://ti.to/tollwerk/accessibility-club-summit-2024

More info: https://accessibility.club/event/accessibility-club-summit-2024#schedule-2024-06-09

MaxArt2501, to javascript
@MaxArt2501@mastodon.social avatar

A response to @cferdinandi 's recent post(s) on JavaScript and Web Components:
https://dev.to/maxart2501/javascript-is-not-the-problem-k4e

I know he didn't explain his position in details, so a 1800-word article sounds a little unfair, but I think dry and sharp statements need adequate context and analysis.

decompwlj, to mathematics
@decompwlj@mathstodon.xyz avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • DreamBathrooms
  • ethstaker
  • InstantRegret
  • Youngstown
  • magazineikmin
  • osvaldo12
  • slotface
  • khanakhh
  • rosin
  • kavyap
  • everett
  • tacticalgear
  • JUstTest
  • ngwrru68w68
  • GTA5RPClips
  • cisconetworking
  • mdbf
  • cubers
  • Durango
  • anitta
  • modclub
  • normalnudes
  • tester
  • Leos
  • provamag3
  • lostlight
  • All magazines