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

Rethinking Mocking: DIY Approach vs. Frameworks on examples in PHP and Typescript - SarvenDev (sarvendev.com)

In the landscape of software testing, the choice between a do-it-yourself (DIY) approach to mocking and utilizing mocking frameworks is a pivotal decision for programmers. While mocking is indispensable for code reliability, its overuse or incorrect implementation can introduce complexities and fragilities within test suites....

leanpub, to typescript
@leanpub@mastodon.social avatar

Node-OPCUA by example Edition 2024 by Etienne Rossignon is on sale on Leanpub! Its suggested price is $249.00; get it for $90.99 with this coupon: https://leanpub.com/sh/6suslYva

kubikpixel, to webdev
@kubikpixel@chaos.social avatar

Comparing TypeScript state management solutions:

State management in frontend development deals with maintaining the state or data knowledge across multiple application components. It’s an essential concept while working with frontend JavaScript and TypeScript frameworks and libraries.

⌨️ https://blog.logrocket.com/comparing-typescript-state-management-solutions/


kubikpixel, to webdev
@kubikpixel@chaos.social avatar
frankel, to typescript
@frankel@mastodon.top avatar
cdoremus, to node
@cdoremus@hachyderm.io avatar
toxi, (edited ) to genart
@toxi@mastodon.thi.ng avatar

Fantasy console update: Just added & polished some more of these examples from last year and you can play with them here:

https://demo.thi.ng/umbrella/fantasy-console/

Instructions:

  • Press 1 - 6 to select/launch/reset any of the examples
  • Press Space to download screenshot
  • Apart from the raster bars and lissajous curve all other demos can be interacted with via mouse
  • Open the browser console to see the (already transpiled) source code of all examples

Example #1: Scribble & color cycling
Hold down left mouse button to cycle the colors (the current palette is also always shown in bottom-left corner). Nice, powerful oldskool effect, which is actually easier to do with these indexed, non-RGB pixel buffers[1]

Example #2: Lissajous bobs
The spheres are actually 2x2 tiles of 8x8 pixel sprites with one color slot chosen as transparency. Drawing 100 spheres here, but could be a lot more...

Example #3: Raster bars
This oldskool effect is achieved via HSYNC interrupts only, i.e. no lines are being drawn — for every single pixel row we simply change the color value of the first palette entry. The text is also only being drawn once, at startup...

Example #4: Particle system
Simple particle system (2k particles) with the emitter position linked to the mouse. 6% probability for larger particles.

Example #5: Random pattern
Classic oldskool generative art, here by defining 4 custom bitmap font characters and then drawing a single randomly chosen char per frame

Example #6: Bitmap font editor
Select a character on the RHS to edit in the left box. Left click to set a pixel, right click to clear it. Press Delete to clear the char entirely. The system supports proportional width fonts and the little red triangle can be moved horizontally to adjust the width of each char... Clicking on the Save button will download a JSON file of the font's binary data (9 bytes per char: width + 8 data bytes)

cirrus, to typescript
@cirrus@mstdn.social avatar

Been going down a rabbit hole today trying to get , , manifests and to all hold hands and sing kumbaya.

Send help.

How's your day going?

daishi, to reactjs
@daishi@fosstodon.org avatar

Fine-grained updates with TC39 signals in React? 🤯

Another experimental feature in use-signals. https://github.com/dai-shi/use-signals

⚠️NEVER EVER USE IT IN PRODUCTION⚠️

#ReactJS #React #JavaScript #TypeScript #Signals

video/mp4

hongminhee, to fediverse
@hongminhee@todon.eu avatar

is an server framework in & . It aims to eliminate the complexity and redundant boilerplate code when building a federated server app, so that you can focus on your business logic and user experience.

The key features it provides currently are:

• Type-safe objects for Activity Vocabulary (including some vendor-specific extensions)
client and server
• HTTP Signatures
• Middleware for handling webhooks
protocol

If you're curious, take a look at the Fedify website! There's comprehensive docs, a demo, a tutorial, example code, and more:

https://fedify.dev/

kubikpixel, to webdev
@kubikpixel@chaos.social avatar
janriemer, to rust

C++ will be taken over by #Rust.

What will be the Rust-equivalent for #JavaScript?

I mean #TypeScript is a very good first step, but it's basically the C++ for C.

So in short:
C => C++
JavaScript ≈> TypeScript
C++ => #RustLang
JavaScript => ???

I think it will be a looong way to go, but maybe, maybe we'll see more and more #WebAssembly in the #frontend, but not quite sure yet.

#WASM #ProgrammingLanguage #CPlusPlus #C

Profpatsch, to typescript
@Profpatsch@mastodon.xyz avatar

Okay, so

After spending some time with , going back to is a real hard sell, ngl

snafu, to javascript
@snafu@digitalcourage.social avatar

Why is the whole #JavaScript / #TypeScript dependency management system such a mess? Cryptic warnings all over the place, non-deterministic behavior, n different module systems and dependency management tools - crazy.

With #Java and e.g. #Maven I never have any of these problems. It's also complex, sure, but in general it works really rock solid for me.

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

Just updated all https://thi.ng/wasm-api packages, bindgen, build scripts, readmes and examples to be compatible with the brand new Zig v0.12.0 released a couple of days ago... This includes adapting to breaking changes (esp. Zig's build system) and updating the hybrid Zig/WASM/TypeScript project template:

https://github.com/thi-ng/tpl-umbrella-zig

For wasm-api user code only minor changes are required (if any), e.g. all Zig DOM event handlers need a callconv(.C) attribute now...

Happy coding!

#ThingUmbrella #Zig #Ziglang #WASM #WebAssembly #TypeScript #JavaScript #OpenSource

bart, to FunctionalProgramming
@bart@floss.social avatar

fp-ts brought advanced #FunctionalProgramming to #TypeScript. Now a related project implementing an effect system for TypeScript (effect-ts) seems to have gotten a lot of VC money. Interesting... Docs look very polished, not sure how they will make money though.

https://effect.website/

leanpub, to programming
@leanpub@mastodon.social avatar

P4NR - IoT Programmer https://leanpub.com/b/p4nr-iotprogrammer by Iniationware, Joel Krec, and Maryam Jalil is the featured bundle on the Leanpub homepage! https://leanpub.com #NodeJs #InternetOfThings #Javascript #Typescript #SoftwareEngineering #CloudComputing

hongminhee, to typescript
@hongminhee@todon.eu avatar

My short yak shaving journey is over. Lacking a decent logging library, so I created and started logging in using it, which should make inbox/outbox debugging easier starting with Fedify 0.7.0. ✌️

https://unstable.fedify.dev/manual/log

mikewink, to rust
@mikewink@mastodon.social avatar

Every day is a / day now. So far, the learning is wonderful. Coming from PHP and without a proper CS background, I learn a lot about the lower levels I normally do not care about much.

Especially, memory management and Unicode (UTF-8) are fascinating topics right now.

I am quite sure, that learning Rust will make me a better developer too. I am tempted to even look into later.

For now, I stick with Rust and the 10 more chapters in "The Book" ahead of me.

deno_land, to node
@deno_land@fosstodon.org avatar

Not sure where to start with TSConfig? Here's a quick primer 👇️

#deno #typescript

https://deno.com/blog/intro-to-tsconfig

aeveltstra, to typescript
@aeveltstra@mastodon.social avatar

Hey, devs: is there any way to compile typescript without needing NPM and Node?

Microsoft’s documentation says the easiest way to install tcl is by using NPM. That means they aren’t saying it’s the only way. But it also lacks mention of other ways.

I’m not adverse to building tcl myself if needed, or use different methods for different operating systems.

Please advise!

watzon, to golang
@watzon@watzonmanor.com avatar

Ok peeps, we're 4 months into 2024 and I've been without work this whole time so we're going to try this again. If you know of any senior software engineering positions that are actually being hired for, please drop them below.

I have 12 cumulative years of experience, so that shouldn't be an issue, and I know most of the languages in use nowadays well enough to be dangerous, but I am extremely proficient in TypeScript, Python, and Ruby. What I'd rather do more than anything though is have an opportunity to use Go professionally.

jbzfn, to node
@jbzfn@mastodon.social avatar
toxi, to FunctionalProgramming
@toxi@mastodon.thi.ng avatar

Phew... One key step closer to replicating & simplifying core https://thi.ng/rstream functionality via just standard async iterables: Just added a mult() base-operator to https://thi.ng/transducers-async [1] which allows splitting a single async iterable into multiple child async iterables (aka subscriptions, aka 1:N splitting), each of which can be added/removed dynamically and individually processed e.g. via transducers, vanilla for await() consumers, and/or used as input for downstream mult()s to construct entire graph topologies (cycles allowed) of async processors etc. Back pressure is handled by waiting for all child subscriptions to deliver the value before consuming a new one from the source...

[1] https://github.com/thi-ng/umbrella/blob/develop/packages/transducers-async/src/mult.ts

#ThingUmbrella #Async #Transducers #ReactiveProgramming #FunctionalProgramming #TypeScript #JavaScript

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