cho.sh
2,244 notes
Liked on XI made a mistake. When Jack and I decided to organize this $100K Hackathon, my biggest concern was cheating. Unlike a regular hackathon, everyone participates from home. And because the winner is whoever makes the most PROFIT (not revenue), there are so many ways to manipulate the numbers. So I added a $99 entry fee. One thing I’ve learned from building businesses is that people tend to be more committed when they pay for something. I thought it would filter out spam, attract serious builders, and make the competition fairer for everyone. But I completely missed the other side. 3 years ago, I was a living with my apps. Today, I’m financially free. My life changed so much that somewhere along the way, I lost perspective on what $99 means to someone else. For someone in India, someone struggling to pay their bills, or someone trying to make their first dollar online, $99 can be a lot of money. And those are exactly the people I want to help! I’ve spent years sharing what I’ve learned, reviewing random people’s landing pages, and organizing free meetups around the world. Not because there’s money to make, but because I genuinely love seeing people build things and succeed. And somehow, I was so focused on keeping cheaters out that I didn’t realize I was also keeping genuine builders out. That’s my mistake. So I’ve decided to make the $100K Hackathon completely FREE :) Everyone who already paid got a full refund. I’m still worried about cheating. That problem hasn’t disappeared, and Jack and I will have to figure out better ways to verify profits and keep the leaderboard fair. But that’s our problem to solve. Thank you to everyone who shared their thoughts. Sometimes you need people to remind you of things you’ve forgotten. I genuinely hope this hackathon changes someone’s life. ❤️Liked on XIt’s time to bring back Cafe CursorPosted on Xyo @pendev i can't live share edit a .pen file? it's the most needed featurePosted on XI'm coining a word "Agentsplaining" Agents condescendingly assuming the user don't know fuck and repeating the obviousReplied on X@jayhxmo @raycast Hard to explain. It's the small detailsPosted on X@raycast iOS keyboard is insanely good. Might resub Raycast pro just cuz of thisReplied on X@ishuagra02 I saw a theory that F5.2 is a post train of 5.1, but O5.5 is a distillation of F5.5(unreleased new pretrain) and thats why O5.5 > F5.2Liked on X@anaclumos don't know what is actually improved 👀Posted on Xam i the only one underimpressed with 5.2 fableReplied on X@bvvst great minds think alike https://t.co/YRFWhb1mcOLiked on XClaude Fable 5.2 is out and it's the perfect time to run this god-level prompt on your codebase: "I want you to audit our codebase, is anything here unnecessary, overly complicated in our current setup, or based on weak assumptions? Challenge them. - What can be deleted entirely? - What can be simplified now that unnecessary pieces are gone? Then make the changes. Prefer deleting over simplifying, simplifying over optimizing, and optimizing over automating. This product is being used by thousands of customers, do not cut any corners." This prompt is one I run often and leads to the best results.Replied on X@akshayadinesh19 @bot can we please BYOM for botsLiked on XTo be fair, the Chinese models have a much lower refusal rateLiked on XF*CK IT, im creating a library of AI slop indicators. my feed is full of taste larpers. stay tuned https://t.co/5Muv8nQRm3Liked on XJENSEN! THATS NOT WHAT WE MEANT BY CHINESE MODELS!!!!!!!Liked on Xmy parents had to declare bankruptcy when I was a kid, so they had every reason to pressure me towards a more stable career path instead, they were so patient with me, even as i failed startup after startup for years so getting to tell my mom that everything turned out okay was a really special moment :) for those who can't read Korean, her first message roughly translates to: "Really!!! Congratulations my son. So much :') Thank you God!" i know I've been posting about my exit for like a week now, but it really is a big deal for me and my family! i'll share more about how this all happened and some tactical advice later this week, but for now i'm just riding out all the emotions to quote my mom, thank you God!!!!Liked on X@thefarmers_Dog it stands for Egg GzampleLiked on X🦍 Introducing Memorilla: memory as a modality for LLMs Memorilla turns everything a frozen LLM needs to remember into just 16 memory embeddings ⚡ It uses up to 4,212× fewer tokens and is 27× faster than full context inference while more accurate 🎯 Pushes the Pareto frontier over RAG and agentic memory in personalization, long-document and knowledge QA A thread 🧵:Liked on XThere's a huge product opportunity downstream of Tailscale etc too. At @tldraw we've started designing for "high trust networks" and it's been a beautiful thing. 1. Features that would be a nightmare on the internet are okay on my computer and mostly okay on private networks. Websites that execute user-generated scripts, control production systems, allow for users to send desktop notifications, spend tokens, or directly prompt my agent. Crazy stuff that would only make sense if everyone was in a committed polycule. 2. When everyone on the server can be trusted to have _external_ reasons for good behavior (eg keeping their job, or maintaining friends, family, church, mafia org), the software can be designed in a default social way. Most apps default to isolation, low horizontal visibility, highly restricted collaboration. Makes sense if the social contracts are inside of the app, but if you can trust that they live outside of the app then you can get wild. Example being small group chat names as an emergent comedy phenomenon because anyone in the group can change the name. 3. This can work for commercial products, too, not just internal stuff. Security matters more than ever but the way we've seen that manifest is that more companies are more confident in their own solutions than anything we could provide, to the point where owning data and access is a better value proposition than having it managed. Always has been true for big companies but now even small companies can get a good secure network set up pretty easily, and the hooks we need to build are easy enough. tldraw offline got us started down this road (and shout out to @pendev for first introducing me to the idea of desktop + mcp). We've been bringing that product to private networks and it's been exciting to see how much we can get away with. Keep an eye outReplied on X@saradu birds eye viewLiked on XApplications close in 2 days!! If you have a cool bio idea, and $5-10k will go a long way for you, please apply!!! https://t.co/NCvmrNC53cLiked on XWe've been early adopters of Rust since 2018 and a lot of our infra, voice tech, and even some of the current client is already Rust, the holy grail was getting the whole client there. That means Electron goes away, and so does React Native, mobile keeps native UI but shares app code with desktop via Rust. We hope to get it into testing with users soon™. (And it's not Tauri, it's GPUI, so good guess everyone.) Alright, back to staring at the WoW Forever login screen.Reposted on XOh boy. https://t.co/X7SSskGuGvLiked on XRIP .si domain squatters
Python vs C++ (May 2024)

Python vs C++ (May 2024)

Warning

Over a year old. May be outdated

This is my story from my team project.

Our team project was to create a Shazam for Videos. You have a pile of videos, approximately 30 hours in length. Given a 30-second video clip (which may have different resolution/color space/sampling rate/extension, etc.), we must identify the video it is included in and find the timestamp where that clip starts.

I was pretty confident would be very suitable for this task. There's a mantra in software engineering

Don't blame [language] for being slow. It's your code that's slow.

I can't exactly find out who first said this, but fair enough, I've seen so many cases. Python's nice syntax and wrapped APIs often give you additional time to plug and play higher-order speed improvements, such as multiprocessing and producing faster code, given the same human hours. Multiprocessing in C++ is a hassle. In Python you can convert a single-processed program into a multi-processed one in less than 20 minutes.

Python will have PIL and OpenCV, already battle-tested, and throwing in some simple optimizations would be more than enough. I also thought Python's syntax would've 10x our dev time, and I am sure we will have to use Python in the end.

I've done some initial research and used (v. ahash, dhash) to investigate audio matching, SIFT (scale-invariant feature transform), etc. A naive calculation took around 10 minutes to identify a video with decent accuracy, and I made some optimizations to skip frames (around 30 frames per time, using prime numbers). I also threw in multiprocessing, ending up with around 80% accuracy in around 40 seconds. If I reduce the skip-frames (used for optimizations), accuracy climbed to 90% at double the runtime. A typical make-a-compromise situation, but I was proud and thought I could've called it a day.

Then there was Louis. Louis was the opposite type of developer than I was. Maybe I was the type of startup engineer who values dev-hour efficiency more, whereas he was the type of performance engineer who values CPU-cycle efficiency more. He was adamant that we had to move to C++ due to performance issues. To be fair, we did need a little better performance-accuracy. We needed near-100% in less than a minute, but I thought we would throw in more algorithms, such as audio profiling, to improve the accuracy while cutting some fat here and there (such as preprocessing) to make things faster.

Louis still insisted that we move to other languages, such as C++ or Rust. I think mentioning Rust (Pythonic syntax with very fast speed) was just a catalyst to bring the topic onto the table because none of us had prior experience, and we still needed to finish the project within a few days. It was pretty clear that he wanted to rewrite the code in C++, despite the already-implemented pretty-good Python version.

I must admit I was slightly offended at first. He was condescending about other languages, like he didn't get why real engineers use anything other than C++. He was also slightly condescending on OS other than Windows because other OSs cannot make code run fast because they don't have VS, and he was into the VS ecosystem (which makes sense, that's the industry de facto for C++ and it's only on Windows).

804F38

But then, I admitted to "experimenting" with the idea. "We can spend the next day or two seeing if converting to C++ improves things." Maybe the reason why I was so embracing was because I was so confident inside that he wouldn't make it. I'd already combined multiple features and thrown in multiprocessing that nearly-8x-ed the speed. Coding signal processing in C++ will be a pain on the one hand, and implementing multiprocessing to improve the speed will be another pain on the other hand.

Perhaps that was why I agreed so nonchalantly to his suggestion.

Then, a day passed, and he not only finished the implementation but also made the speed 20x faster than the Python version. I was mindblown because "Python is fast enough" is true for most cases I've seen. In most cases, the bottleneck was networking, I/O, or something else. In this case, I thought the main bottleneck was the hardware I/O, which we needed to probe and read in video frames of 30 hours.

Louis proved me wrong.

Yes, debugging was painful, but Sammie and Ishu did a brilliant job catching bugs. At one point we were using perceptual hashing completely wrong, but nonetheless the code was indexing source videos, extracting features, and comparing them to the clip videos in a few seconds. It was so fast we could've easily punched up the skip frames, from indexing 1 in 30 frames in Python to 1 in 3 in C++, and still could've finished the operation in 4 seconds.

Based on the graders' responses during the final demo, it was clear no one came close to our runtime. We were probably the most accurate (I bet everyone else's accuracy was near-correct) but at least ten times faster than other teams.

This is completely against my understanding of technology. "Modern-day processors are fast enough, and tools/languages don't matter, it's the algorithm and programmer's code that makes things slow," so I'm unsure how to extrapolate this. Maybe it's just Louis is an exceptional programmer who codes C++ at the same speed as others write Python. Maybe the realm of signal processing makes C++ and its processing extremely efficient. Maybe it's our trust and teamwork that I did a proof-of-concept and got the knack of strategies, Louis led the C++ development, and Sammie and Ishu were able to failproof the C++ code. Maybe the stars aligned just the right amount.

I still think if any of these factors were ever so slightly off, the outcome would be a major failure, just as many team projects. People get into arguments, don't trust each other, and have debacles. But even then, somehow with some luck, we got a perfect implementation in the fastest form possible.

It was such an eerie experience that I was proved wrong, but yet I felt so happy.

Backlinks2