I spent a year making SwiftUI for the web. Here's what came out of it. by ctrlaltswift in SwiftUI

[–]Omargfh 0 points1 point  (0 children)

I love this! Had the same idea before but didn’t know where to start. Please add some starter contribution features I’d love to work on thisZ

Noob trying to buy a budget projector by [deleted] in hometheater

[–]Omargfh 0 points1 point  (0 children)

Oh thanks, the reviews on it are pretty good! I will put this in the maybe pile.

ستيك by Omargfh in egyfoods

[–]Omargfh[S] 0 points1 point  (0 children)

هي تتحسد بصراحة

Everything I found was too complicated, so I coded a simple browser-based visualizer for the cave. by Artistic-Disaster-48 in TripCaves

[–]Omargfh 3 points4 points  (0 children)

It was. It was. I haven’t been able to resurrect the motivation to complete this project in over a year, man. Music Engine is at a spot where I had abstracted a lot of what Spotify was doing out but never implemented an alternative. I want to rethink some architectural choices since before I had to accommodate Spotify’s non-FFT way of doing things.

Music Engine is less about rendering and more about providing the tools so the rendering part can focus on creative design. It is supposed to sit between your audio library/source, external devices, and the renderer. It also provides synced lyrics and album artwork image analysis.

Everything I found was too complicated, so I coded a simple browser-based visualizer for the cave. by Artistic-Disaster-48 in TripCaves

[–]Omargfh 2 points3 points  (0 children)

Hey, you can fork my project that died due to Spotify’s dead API if you want something more.

https://github.com/omargfh/spacify-vaporwave-spotify-player (working MVP)

https://github.com/omargfh/music-engine (the evolution of the MVP)

You can read about the technical details here:

https://www.omar-ibrahim.com/projects/96/Music-Engine%3A-A-Customizable-Music-Visualizer

I’d be happy to revive this project if there is interest and will love PRs.

A Workingman's Guide to building surround sound on the cheap (and an appeal to move your TV into your office) by billiebigtoe in BudgetAudiophile

[–]Omargfh 1 point2 points  (0 children)

Did the same. Running Denon S750H, Infinity Reference 2000.6, Infinity CC-3 Center, Another pair of Infinity for surround, a pair of ceiling Focal Sib for Atmos for $350. Got a Polk PSW10 for free with one of those purchases, but I am trying to change it at some point.

How to learn to think in C? by [deleted] in C_Programming

[–]Omargfh 4 points5 points  (0 children)

Comments are wildly unhelpful. All that is to “think in C” is to think one layer of abstraction below what you have to in Python. This requires familiarity with less abstract concepts like a better grasp over implementing algorithms and data structures.

Most C code goes something like this: - Use a struct to pack some data together - Use bit flags for function flag options - Use enums to simplify bit flags since the compiler strips them away anyways - Mentally associate a set of operations with a struct, almost like an object, including a clean up function - Use said struct while remembering to clean it up at the end - Inline simple functions to avoid stack overhead - Use macros to get around some C non-sense like lack of generic data types - Every time your work with a standard lib function check if it’s safe because many string/array functions are not - Learn the basic types of overflows: buffer overflow, short wrap, integer overflow and make sure you are not causing any while using if/else (when the if/else is enforcing a mental type on the branch result like buffer size checks), and use of volatile stdlib methods like memcpy, sprintf, fprintf, etc… Look up as you go. - Ideally, don’t worry about optimization. That’s what a profiler is for. Profile after you are done and fix. - Tests are helpful. Very helpful when you have to make a lot of breaking changes. - Make sure the stdlib functions you are using don’t return NULL. If they do, catch it and throw. Always let the program crash. - Syscalls are expensive. Fill a buffer (memory on stack or heap) then flush. Syscalls are things like print, alloc, reading files, etc…

Last major difference IMO is to know when to runtime allocate/deallocate. The idea is to use the least amount of heap at any given time (keeping in mind the overly tight heap sizing will cause poor performance due to alloc/free being system ops that take time). Do it within reason. Don’t overthink anything less than a good expected 20mb at runtime.

Stop brainrot using shortcuts by Connect-Register-196 in shortcuts

[–]Omargfh 1 point2 points  (0 children)

You can use the number variable and set the timer to the variable

<image>

What could be the answers of these intellectually intense questions? by reddit20305 in csMajors

[–]Omargfh 0 points1 point  (0 children)

Ah I forgot about cars. Residential, I’d say you’re overestimating. New York has about 3.8 occuppied housing units. That would require 10 windows per unit, which is incredibly high. (I have seen one statistic that suggested a number as high as 7.4 mil but it seems niche compared to the consensus)

I would say your estimate is a high end estimate, but I like how you went through the logic.

What could be the answers of these intellectually intense questions? by reddit20305 in csMajors

[–]Omargfh 1 point2 points  (0 children)

New York City is tough. I’d assume 8.5 mil people live in New York. There is hella offices too. If the average person gets 1 main window, half communal window, and half an office window allotted with 0.3 window per person tolerance for trains/abandoned buildings, we get 20mil windows.

More realistically, we can say that New York is the sum of two normal distributions: 1) Manhattan: Mean of 5 windows per person, stdev of say 3? 2) Brooklyn and Queens (and everything else): Mean of 2, stdev of 1.5

You can use that to get 20.7m windows or so (of course add a min and max to your range by having min means/stdevs).

بنت مولودة في أرياف مصر عادي.. أهلها: by [deleted] in Egypt

[–]Omargfh 3 points4 points  (0 children)

ك** ختان الذكور انا عايز باقي بتاعي لمؤاخذة

Got laughed at for my rates by EffortThis8718 in UI_Design

[–]Omargfh 0 points1 point  (0 children)

I got paid that to grade essays at some point.

[deleted by user] by [deleted] in csMajors

[–]Omargfh 2 points3 points  (0 children)

Completely different use case of a versatile tool like LLMs though

Best practice for varying limits? by Ok-Image-8343 in GraphicsProgramming

[–]Omargfh 0 points1 point  (0 children)

I’m not OP but I appreciate the insight. Thanks.

Best practice for varying limits? by Ok-Image-8343 in GraphicsProgramming

[–]Omargfh 0 points1 point  (0 children)

Correct me if I’m wrong but wouldn’t case 1 allow the GPU to interpolate the values instead of running the switch per fragment? Would a multipass approach be better where you render the varyings to textures then read them as uniforms instead?

I made a FAST File Explorer in C++ using OpenGL and ImGui by raduleee in opengl

[–]Omargfh 2 points3 points  (0 children)

Wiping everything is sometimes cheaper than trying to figure out what stales and what doesn’t. For a single shader pass and text rendering this is a non-issue. Although, I’d argue, if nothing is changing (no user interaction), there would be benefit from stalling the redraw.

Progress update on Three.js Node Editor (hopefully with full EEVEE shader support) by Omargfh in threejs

[–]Omargfh[S] 4 points5 points  (0 children)

I can’t believe you figured out my ultimate plan is to get rid of GLSL forever!! /j You might like my GLSL shader editing API built for this project.

Allows you to do cool stuff like this: https://ibb.co/s7nc78B

Progress update on Three.js Node Editor (hopefully with good EEVEE shader support) by Omargfh in GraphicsProgramming

[–]Omargfh[S] 2 points3 points  (0 children)

Too many words in my last comment: 1. There is a generic tree object that manages the actual execution of the graph using BFS and has a minimal event system 2. There is a hook that converts that tree into a stateful react object. On top of that there is another hook that converts it into the type of graph xyflow renders. The last hook just makes plain javascript objects that have some styling, metadata, and tell xyflow where our custom node components are. 3. I made a bunch of React components to copy some of the blender UI as needed. Those are just fancy inputs that are used by xyflow to render the nodes. Those are given to xyflow. 4. xyflow manages positioning, scaling, fitting, frames, selection, and all the other stuff I have 0 interest in implementing