HNHacker News
TopNewBestAskShowJobs

emadda

341 karma · joined November 27, 2019

https://enzom.dev
submissionscomments
emadda··on Printing Music with CSS Grid
Cool, I often use grid for precise placement of items even for small widgets like toggle buttons.

If you’d like an intro into grid:

https://cssprinciples.com/3/grid/

emadda··on Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
Thanks Victor, it means a lot :)
emadda··on Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
Related: I created an interactive demo of grid principles here:

https://cssprinciples.com/3/grid/

emadda··on Hardest problem in computer science: centering things
If you want an interactive demo of how justify and align work in grid:

https://cssprinciples.com/3/grid/#justify-and-align

emadda··on Show HN: Render audio waveforms to HTML canvas using WebGPU
I did something similar with regular DOM nodes and css flex here:

https://bigwav.app

Every vertical line is a dom element.

I was considering moving to GPU rendering as the dom approach can take a long time to re render on changes.

emadda··on ADHD Productivity Fundamentals
Can I preorder your JeffFolder system?
emadda··on Show HN: Goqite, a persistent message queue Go library built on SQLite
How is this better than just using SQLite transactions directly and a task queue table?
emadda··on Interactive SQLite Documentation: Experiment with Queries in Real-Time
> Backed by the creator of SQLite.

Is this from the SQLite developers?

emadda··on Show HN: Piping logs, visualizing in a web app – just suffix "| npx logscreen"
Why would you watch logs for more than 6 months?

Do you filter them? What does the system you are watching do?

emadda··on Documentation for the JSON Lines text file format
Are there any neat log viewers that allow you to filter and tail logs in jsonl format?

I have many systems that log in this format but are quite hard to visually scan during development. I typically create ad hoc filters using jq, rg or a js script.

emadda··on Don't dry your iPhone in a bag of rice, says Apple
Who would throw out perfectly good iRice
emadda··on Monitoring latency: Cloudflare Workers vs Fly vs Koyeb vs Railway vs Render
> This is easy to verify by appending cdn-cgi/trace onto a Cloudflare-proxied domain.

Nice tip thanks

emadda··on My productivity app is a never-ending .txt file (2022)
I think it may be the kind of work that you do too. It seems his work is well suited to his system. He can manage his own tasks, and the actual complexity of the work is stored in other systems and documents (like research papers).
emadda··on My productivity app is a never-ending .txt file (2022)
You might want to try iso week numbers. Every week starts on Monday and is always 7 days.

Gives you quite a granular time reference but not too fine like days.

emadda··on Serving a website from a Git repo without cloning it
I have found Firebase hosting be quite solid for my static sites.

I usually have a ./sh directory which is like my "control panel" for the project, then I run ./sh/deploy.sh from the root which builds and does a `firebase deploy`.

Firebase handles HTTPS and seems to have the lowest latency of the CDN's I have tried, even though they all claim to be the "fastest".

I prefer to have a explicit "button" to deploy rather than working with git commits.

emadda··on UI = f(statesⁿ)
I've recently been writing a Chrome Extension.

It becomes harder when any one of your distributed event loops can be closed/shut down at any time (e.g: content script, service worker, options page).

Chrome Extensions with the newest "manifest v3" do not have persistent "background pages" any more, but have "service workers" that Chrome will terminate every 30s.

emadda··on CSS Is Logical
Another interesting rule: when margin/padding is a percentage, it is always a percentage of the width, never the height.

This makes sense, CSS layout is computed with logical rules/programming.

I think the “illogical” reputation comes from people not knowing which rules apply. They cannot see how the current layout output was calculated by the given css properties.

This is due to CSS being backwards compatible and constantly adding new ways to do things. But you can choose to use the “good parts” of the language as Douglas Crockford would say (for JS).

Also many people assume CSS would be easy and brush off that it requires a bit of effort and practise to learn the language.

I created an interactive grid explainer here if anyone is interested, I think grid is one of the good parts.

https://cssprinciples.com/3/grid

emadda··on React has grown beyond its original promise and it's causing more harm than good
Why not use a MobX state class, then just write to state.cache_date? The state is in the parent lexical scope of the components, so no prop drilling or providers.

I used to use events just like this, but once the app gets bigger it’s hard to keep track as the event keys are strings. There is no IDE support for tracking usage (functions and class properties allow jumping to and from usage).

Also MobX tracks dependencies based on reads and auto re-renders changed components. This replaces having to hook up event receivers manually to re-render.

I think there are newer mobx state management systems nowadays (Signals is the new term).

emadda··on WebAssembly Playground
I think it’s a few things:

- CPU features and system calls. Native code can leverage specific CPU features to gain performance. It has access to files and the network via OS system calls. Code compiled to WASM runs inside the WASM sandbox. It makes code slower. Getting data to/from the WASM code is harder.

- The WASM engine is right next to a “good enough” alternative (JS).

emadda··on Modern CSS One-Line Upgrades
CSS Houdini is a set of apis aimed at what you mention (create your own CSS abstractions)
emadda··on Why I created Banner Blog
Do you write your content directly in Lisp/HTML?
emadda··on Insanely Fast Whisper
I recently released https://bigwav.app

It’s whisper in the browser using WASM with an transcription annotation Ui.

emadda··on Bluesky migrates to single-tenant SQLite
How did they lock the file when re-uploading it after edits?
emadda··on Airbnb is broken, CEO says – His plans to fix it
I recently released an AirBnB search engine optimised for large monitors.

Take a look: https://stay100.app

emadda··on Post Mortem on Cloudflare Control Plane and Analytics Outage
Their uptime was eventually consistent
emadda··on Tracking SQLite Database Changes in Git
You can also convert the data to JSON using sqlite_to_json

https://github.com/emadda/transform-x#clis

emadda··on I've overlayed stays on a light pollution satellite map
It is using the Google Maps JS API.
emadda··on I've overlayed stays on a light pollution satellite map
Related: I released an AirBnB search engine optimised for desktop a few months ago.

https://stay100.app

emadda··on Flexbox Froggy
The reasons I sometimes use grid over flex:

- You can align things in 2D space, not just along a single axis (like flex). Great for the top level layout of a site/UI.

- You can have white space. I often create white space (empty grid cell) in my UI so I can add UI elements there if needed later on. Works well with elements that are conditionally rendered, as these will change flex layouts but elements assigned to a grid cell will not move.

emadda··on Localtunnel – Easily share a web service on your local development machine
I recently released https://tabserve.dev that uses a browser tab as a reverse proxy.
← PreviousPage 3 of 6Next →