pulled an all nighter for my first ever hackathon and somehow shipped a working solana telegram bot
no prior rust or anchor experience. learned it on the fly, fought windows toolchain issues for 3 hours, almost gave up twice
but Magic Game TG is live on devnet rn. you predict if SOL goes up or down in 30 seconds and win 1.9x your bet. fully onchain, real tx signatures, bot manages everything
built on @magicblock ephemeral rollup which basically lets you run game state at zero fees in real time then settle back to solana. actually insane tech once you get it
18 submissions total. no idea if i place but honestly just finishing and submitting felt like winning lol
if you wanna try it → /magic_game_tg_bot
first hackathon down 🫡
So TradingView gives you like 3-5 alerts on free tier. most platforms are the same tbh. you hit the limit, they want your credit card. i thought, why is this so hard? alerts are just... comparisons. price hits X, send notification. how is that a premium feature?
anyway, that frustration turned into a weekend project that turned into something i actually learned a ton from. not gonna sell you on the bot. gonna tell you what i ran into building it.
---
the idea was simple. the execution wasn't.
conceptually it's easy right:
- get crypto prices
- compare to user's target
- send telegram message
yeah. except "get crypto prices" means handling 2000+ trading pairs in real time. and "compare" means doing it fast enough that the alert actually matters. and "send telegram message" means you need users, auth, subscriptions, state...
it compounds quickly
the websocket decision, and why one connection matters
first instinct is to open a websocket per coin you're tracking. makes sense mentally. BTC gets its own connection, ETH gets its own, etc.
don't do this.
binance lets you subscribe to multiple streams on a single persistent connection. if you open one connection per pair you're watching, you hit rate limits fast, you're managing thousands of connections, and your server memory is cooked.
the move is a single websocket that subscribes to everything, a firehose. one pipe, all the data comes through, you filter in-process.
```
ws://stream.binance.com/stream?streams=btcusdt@ticker/ethusdt@ticker/...
```
one connection. 2000+ streams. way cleaner.
lesson: always check if the API supports multiplexed streams before opening multiple connections.
the latency problem i didn't expect
i'm coming from C++ background. i honestly thought TypeScript was gonna be a bottleneck. like i was mentally prepared for "yeah js is slow deal with it."
turns out for this kind of IO-heavy work? it's fine. event loop handles it well. the latency wasn't coming from TypeScript at all.
it was coming from PostgreSQL.
every time a price update came in, i was hitting the DB to check alert thresholds. postgres is great but it's not built for sub-millisecond lookup on every single price tick. and when you're getting thousands of price updates per second... that adds up.
the fix was Redis Sorted Sets (ZSets).
here's the concept: you store alert thresholds as scores in a sorted set. when a price update arrives, you run one ZRANGEBYSCORE call to find all alerts that should trigger. no full table scan. O(log n) lookup. instant.
```
// store alert: user wants notification if BTC hits 70000
ZADD alerts:BTCUSDT 70000 "userId:alertId"
// when price update comes in at 70050:
ZRANGEBYSCORE alerts:BTCUSDT -inf 70050
// returns all alerts that should have fired
```
postgres still handles persistence. redis handles the hot path. different tools for different jobs.
lesson: don't use your main database for real-time lookups. postgres is for storage. redis is for speed.
---
decoupling with pub/sub, why it matters
another thing i got wrong early: the websocket handler was doing everything. receive price -> check alerts -> send telegram notification. all in one flow.
problem: telegram API calls are slow-ish. network latency, rate limits, etc. if you're doing that inline with the price ingestion, you're slowing down the whole pipeline.
Redis Pub/Sub fixes this. the websocket handler just publishes price updates to a channel. a completely separate subscriber process listens, evaluates alerts, fires notifications. they never block each other.
```
// price handler just does this:
redis.publish('price:BTCUSDT', JSON.stringify({ price: 70050 }))
// notification service subscribes and handles it separately
redis.subscribe('price:BTCUSDT', (message) => {
// evaluate + notify here
})
```
price ingestion never waits for notifications. clean separation.
lesson: if two things have different latency requirements, decouple them. pub/sub is the move.
the stack i'd recommend for something like this
if you're building a real-time notification system or bot — here's what actually worked:
use:
- websockets for live data (not polling — polling is painful at scale)
- Redis ZSets for threshold/range lookups
- Redis Pub/Sub for decoupling producers from consumers
- PostgreSQL for user data, subscriptions, persistence
- Prisma for type-safe DB access (saved me a lot of stupid bugs)
- PM2 for process management in prod
- Winston for logging (structured logs in prod, readable in dev)
avoid:
- hitting your main DB on every incoming event
- opening one connection per data stream
- doing notification delivery inline with data ingestion
- console.log in production (use a real logger)
the subscription thing
cause it's a real product, not just a side project, i added Telegram Payments for premium tiers. free users get 30 alerts. paid users get unlimited.
telegram's payment API is actually pretty clean tbh. you handle the payment webhook, verify it, update user record in postgres. the tricky part is state management during the payment flow — user starts checkout, closes app, comes back. you need to handle that gracefully.
redis TTL sessions helped here too. temporary state with automatic expiry. if the user abandons checkout, the session just disappears. no cleanup needed.
what i'd do differently
1. start with the data model. i refactored my alert schema twice cause i didn't think through the threshold direction logic early enough. zsets handle long/short automatically by score ordering but i had to rethink how i structured user alerts around it.
2. instrument earlier. i added Winston logging late. flying blind before that. add logging from day one — you'll thank yourself when something breaks at 2am.
3. write a proper .env.example immediately. not after the project is done. immediately. future you will forget what env vars exist.
who should build something like this
if you're learning backend and want a project that actually teaches you something — real-time systems are it. you run into problems you don't get from CRUD apps:
- how to handle high-frequency data
- how to keep latency low
- how to separate concerns properly
- how production tooling (logging, process management, monitoring) actually matters
it's a different class of problem. and honestly more fun than building another todo app.
anyway. that's what building this taught me. the tech isn't magic, it's just knowing which tool solves which problem. websockets for live data, redis for speed, postgres for persistence, pub/sub for decoupling.
if you're building something similar and get stuck, dm me on x. always down to talk systems stuff.
Enmilo retweeted
Replying to @sciencegirl
Humanity itself. We're trying our best to make this place unhabitable.
Enmilo retweeted
Curiosity drives human progress.
From the wheel to quantum computing, every breakthrough began with someone asking "Why?" and "How?"
I'm driven by curiosity to understand:
- How modern machines think
- How quantum particles exist in superposition
- The nature of consciousness
- The mysteries of the cosmos
If you're curious too, about technology, science, philosophy, or the unknown, let's connect and explore together.
Because the future belongs to those who never stop asking questions.
Enmilo retweeted
Replying to @celestaracosmos
Whoever is reading this, I wish this winter arc would be the biggest comeback of your life.
Enmilo retweeted
Alibaba just dropped Qwen 2.5 Max, and it's DESTROYING ChatGPT in benchmarks.
(And it's completely open-source.)
Here's why AI developers are freaking out: First, the numbers that matter:
✅ 95% accuracy on complex queries
✅ 10M+ pieces of content generated
✅ 10,000+ apps already powered
✅ 20+ languages supported
But that's not even the crazy part...
Qwen 2.5 is BEATING GPT-4 where it matters most:
Mathematical reasoning: Superior.
Code generation: Outperforms previous models
Multimodal AI: Strong text-to-image understanding
Efficiency: Lower resource usage than competitors
And you can customize it HOWEVER you want.
Here's the killer advantage:
ChatGPT = Locked behind OpenAI's infrastructure.
DeepSeek = Good, but weaker reasoning
Qwen 2.5 = Open-source + Advanced capabilities + ZERO licensing costs
500+ enterprises have already customized it for their specific needs.
The 3 game-changing features developers are obsessed with:
🔹 Writes & debugs code like a senior engineer
🔹 Processes text + images simultaneously
🔹 Deploys on YOUR infrastructure (not theirs)
This is what true AI freedom looks like.
Real talk: Why this matters for YOU If you're:
• A developer → Full control & customization
• A researcher → No API restrictions
• A business → Lower costs, higher flexibility
Qwen 2.5 just became your competitive advantage.
The timing is PERFECT:
2025 is the year open-source AI goes mainstream.
DeepSeek R1 dropped in January.
Qwen 2.5 Max just launched.
The proprietary model monopoly is officially over.
Qwen 2.5 proves you don't need to pay OpenAI to get GPT-4 level performance.
Open-source AI just caught up.
And it's only getting better from here.
Want to learn how to actually USE these models?
Check out Alibaba's Free OpenCV BootCamp and start building real AI applications.
The future of AI is open-source. Don't get left behind.
Like this tweet? RT the tweet to help other developers discover Qwen 2.5
Follow me for more AI insights that actually matter.
Enmilo retweeted
Replying to @_devJNS
The Legend. The Myth. The Conqueror. Presenting the language of languages: C++.
Enmilo retweeted
ChatGPT Atlas: My First Impressions (At a glance)
-> Feels like a natural sidekick, blending AI without overpowering.
-> Solid foundation, but expected early glitches.
-> Could challenge Google by redefining browsing.
-> First Impressions
Just tried OpenAI's new AI browser, ChatGPT Atlas, which was launched yesterday. It's Chromium-based with seamless ChatGPT integration for a more interactive web. Feels minimalist and promising for productivity, but as v1, it's Mac-only and has bugs.
-> Key Features
Sidebar for real-time queries on pages (summaries, comparisons). Agent mode lets AI handle tasks like forms or bookings.
Browser memories personalize based on history (optional). Supports Chrome extensions, split-screen chats, and conversational search.
-> My Experience
Onboarding was quick, and importing from Chrome was easy. Agent mode nailed simple tasks like summarizing videos, but lagged on complex ones like email navigation.
Sidebar shines for quick insights, but hits blocks on sites like NYT. Overall, collaborative feel, but needs polish.
-> Pros
Intuitive UI, time-saving integration, human-like agent for modals/forms, native macOS perks like 2FA autofill. Lowers the AI barrier for casual users.
-> Cons
Buggy (e.g., high RAM, vision fails in agent), privacy worries with memories, no ad blocking, site blocks (e.g., Amazon, NYT), CMD+T annoyance, Mac-only for now.
-> Conclusion
It does not mean Google will fall behind, it's obvious there are eras in everything, and if Google is prepared, they can steer through it.
Enmilo retweeted
Why check the weather like a normal person when you can spend 6 hours building a CLI app to do it for you?
Built a Weather CLI with C++, CURL, and OpenWeatherMap API.
Because we don't just Google things, we engineer solutions to simple problems





















