Ali Naci Erdem

Personal Blog

  • Computers
  • DIY
  • GitHub
  • LinkedIn
  • itch.io
  • Support Me

JavaScript

Change desktop resolution with node.js FFI

24th May 2021 / Leave a Comment

I use my desktop workstation as a home-server of sorts. It is great to game in the comfort of your living room, on the TV, with your favorite game pad if you have an Apple TV (or any other compatible device). This is possible using a variety of software; Steam Link, Rainway or if you … [Read more…]

Posted in: Computers Tagged: ffi, ffilib, foreign function call, game streaming, In home streaming, JavaScript, js, moonlight, napi, node, Node-API, node-ffi, nodejs, NVIDIA, rainway, steam link, User32, Windows

The problem with async generators

21st January 2020 / 1 Comment

Let’s imagine that we want to manage cancellation of an async operation using generator functions in javascript. When a secondary event occurs, we can listen for it and force the generator function to return by calling its return method and handle cleanup in the finally block, which will always run before a generator returns. Say … [Read more…]

Posted in: Computers Tagged: async, cancel, cancellation, generator, iterator, JavaScript, js, promise, race, redux-saga, yield

Quick and dirty animaton with async/await

10th June 2018 / Leave a Comment

Animation is a pain if you do not know how it is implemented. Basically, you are updating a value with respect to time. This is generally done by calculating the time elapsed since the last frame and interpolating this value between its initial and final values. The interpolation needn’t be linear, there are many such … [Read more…]

Posted in: Computers Tagged: animation, async, asynchronous, await, Coroutine, event loop, frame, JavaScript, js, Programming, requestanimationframe, yield

Shadow DOM is still somewhat shady

22nd October 2017 / Leave a Comment

I was recently building a web app using Polymer 2.0 and need to include some SVG assets for wider resolution support. As you may know, Polymer fully supports native shadow DOM with the 2.0 version. When using a shadow DOM context, the style tag will apply the given CSS rules inside the shadow context. This … [Read more…]

Posted in: Computers Tagged: css, dom, JavaScript, js, polymer, Programming, Scope, shadow dom, style, web components
1 2 Next »