Omar Shehata's writing
I write to help myself understand how the world works. Usually about computer graphics / math. I also write personal reflections on life & culture, and whatever I happen to be interested in that week.
Latest posts
What is the ideal information environment?
It is week 3 of me documenting the company I run!
How to hire a lawyer in the court of public opinion
Last Monday I announced that I have been running a company, now with a bit of formal paperwork, and it s called Prosocial Engineering .
Starting a company - devlog
Good morning!
Handmade GitHub Pages
This is part 2 of the "handmade computational sandbox" class. In part 1 ( https://dev.to/omar4ur/handmade-cellular-automata-1f3c ) we learned how to run a piece of JS code in a single HTML file on your computer, and how to deploy it on CodePen to share. Today we're going to use GitHub for free static hosting, instead of CodePen. CodePen is good for quick experiments, GitHub is good for long term…
Handmade Cellular Automata
This tutorial will walk you through creating & deploying your first "computational sandbox", an environment where you can define the rules of a simulation and explore the result. This is designed to be walked through together with a mentor. This is the opposite of vibe coding - in order for you to use these simulations to think & learn about the world, you need to know everything about how it…
How we grade presentation night
Presentation Night is a ~monthly event I host here in Ithaca.
Beginners can do things that experts cannot
10 years ago I wrote A Beginner's Guide to Coding Graphics Shaders . It remained the top google search result for ~7 years for the generic term graphics shader tutorial . It had hundreds of comments saying:
Open source semantic embedding, search & clustering in NodeJS
This tutorial walks you through how to do semantic embedding completely offline with open source models in NodeJS. No knowledge of AI/ML is required. Source code: https://github.com/OmarShehata/minimal-embedding-template An "embedding" is a high dimensional vector (x,y,z,...) that represents a concept. Think of it as the internal representation of words in an LLM. You can compute distances between…
Washington Post is collecting TikTok user data from its followers for public good
I wrote about communities collecting twitter user data so that we can collectively learn about ourselves, and now the Washington Post is doing the same thing!!
Twitter shut off API access; users are now volunteering their data for an open API
A lot of community applications died when API access to twitter, reddit & others was severely restricted, but they can't stop us from sharing our own data with each other!
Dall e telephone
What exactly *is* ChatGPT, if it's not a chatbot?
My rewrite of Scott Alexander's "Janus' Simulators" about the nature of LLM's
Fighting twitter's censorship of substack
Twitter refuses to display the nice preview card for substack links, but this a silly ban that is easily defeated with some basic understanding of how the internet works
Making software by "cosmic pizza order"
I used to bemoan the fact that every time I post about an idea someone tells me, "that's been done before!" now I've learned to love it
My favorite bench in Ithaca NY
"to those who shall sit here..."
Office snapshot
I love Scott Hanselman's social media presence
Everyone likes to hate on social media for being toxic/polarizing, but, apparently it doesn't have to be this way
Rosanos gift
My favorite 1980's Canadian TV show: Bits and Bytes
Reflections on whatever I'm thinking about that week (the web, culture, computer graphics, math etc)
My new radio
Scenes from egypt
Outdoor cats & epistemology
Glimpse into recent news in egypt
Build & deploy your first web app
This guide is written for students going through CodeDay Labs . You will learn: How to set up a simple web app from scratch How to deploy your applications so others can access it via a URL This tutorial is meant to teach the basic fundamentals of working with web technologies, regardless of what specific framework you might be using in the future. Step 1 - Create an HTML page We are going to…
Debugging double tap in godot
Presentation Night - Feb 7 - Recap
Highlights from the first Presentation Night
WebGL / WebGPU Jan 2023 meetup highlights
The Khronos WebGL/WebGPU meetup is a recurring online event where the folks working on these web graphics API’s share updates followed by talks from the community. Here I’ve summarized my personal highlights & takeaways from this week’s meetup. Recording link: https://www.youtube.com/watch?v=Jl06sOvMnvU For my past event recaps, see April 2022 , January 2022 , July 2021 . WebGL Updates Ken…
Mapping my ithaca
My newsletter
Better outline rendering using surface IDs with WebGL
This article builds on my previous “How to render outlines in WebGL” tutorial. I’ll explain an improved technique that eliminates most artifacts of the previous article, and gives you more control over where exactly the lines are drawn in your geometry. Below is an example of the artifacts with the previous technique (left) on the windows of the ship that are fixed using the newer method (right).…
How to use WebGPU Timestamp Query
This tutorial covers how to use WebGPU’s timestamp query to measure how much time your GPU commands take to execute. Timestamp queries are an optional WebGPU feature and may not be supported in all implementations. At the time of writing it is currently disabled in browsers for security reasons ( see discussion here ). See also: GitHub version of this tutorial . Summary Below is a summary of the…
Biking in alaska
Tell yourself better stories
My number forms
Improv math song
My favorite memory palace episodes
WebGL / WebGPU April 2022 meetup highlights
The Khronos WebGL/WebGPU meetup is a recurring event where the folks working on these web graphics API’s share updates followed by talks from the community. I’ve summarized highlights from April’s event in this article. For my past event recaps, see January 2022 , July 2021 . WebGL and WebGPU Updates Ken Russell — Google Kelsey Gilbert — Mozilla Slides Timestamp, 1:20 Wide color gamut support for…
Vite Hot Module Replacement - A Complete Example
This article explains how to set up hot module replacement (HMR) with Vite for a vanilla JS project. The goal is to be able to see changes in the code without refreshing or restarting the application. For me this is particularly useful in creative coding when I'm iteratively building a simulation and don't want to lose state as I make live changes. Complete source code for this article here:…
Seattle sunset
Notes on infinite powers
How to create bitmap fonts for Phaser JS with BMFont
This guide explains how to generate bitmap fonts from TTF or OTF files for use in PhaserJS. I'll be using BMFont which is Windows only. Why bitmap fonts? The main use case is if you're creating a pixel art game & want your text to match the retro style and have no antialiasing. Below is an example from a recent game I made. The top is the standard font rendering in Phaser. The bottom is a bitmap…
WebGPU January 2022 meetup — takeaways
WebGPU January 2022 meetup — takeaways The WebGL/WebGPU January talk is up ( https://www.youtube.com/watch?v=wYAvVUFQP2M )! I encourage you to watch full video. I’ve compiled my takeaways here (with a focus on WebGPU) so you can skim the highlights & see links to resources mentioned by the speakers all in one place. Event link where you can register for future meetups:…
Project ideas
Notes on 10 percent happier
Let it be genre defining
A still more glorious dawn awaits
Recreating light art
Do it even if you dont feel like it
My Takeaways from WebGPU July 2021 Meetup
The last WebGL / WebGPU meetup was packed with a lot of really exciting content. You can find the full 90 minute recording here . I decided to put together my takeaways here for others who want a quick glimpse of the latest updates, focusing particularly on WebGPU. You’ll find Youtube timestamps for each talk below if you’re interested in watching the full segment (which I highly recommend!)…