MurphyA/hacker-news huggingface dataset:
Show HN: Open-Source Solana Trading Lib with 15 DEX Support and MEV Protection
by madgik | 2025-09-14 07:02:57+00:00
Hi HN!

I've been building trading bots on Solana for a while now, and I kept running into the same problem: every DEX has its own SDK, API quirks, and integration complexity. You'd spend days just to support all Raydium pools, then more days for Meteora pools, then even more for the new launchpads like Heaven, Sugar, Boop etc. Each one required different approaches for pool discovery, slippage handling, and transaction building.

Some of you might ask, why not using Jupiter? Well, they decided to close source their binary and make it paid 5-10k/mo, which a lot of solo devs can't handle...

So I built solana-trade - a unified library that handles all of this complexity behind a single, clean API. You can trade on like 15 different DEXs & launchpads (Pump.fun, Pump Swap, Raydium AMM/CLMM/CPMM, Orca Whirlpools, Meteora DLMM/DAMM, and many others) with the same function calls.

The architecture is modular - each DEX gets its own client that implements a common interface. The main SolanaTrade class handles provider selection, transaction building, and routing. It's all built in Typescript.

A key feature is the MEV protection integration. Rather than just supporting standard RPC, it can route transactions through Jito, Nozomi, or Astralane based on tip amounts and availability. The library automatically selects the best provider or lets you specify one explicitly.

The transaction building is fairly sophisticated - it handles compute budget optimization, priority fees, automatic pool discovery with caching, and includes a 0.15% development fee on buys (which can be disabled). Everything is designed to be production-ready rather than just a proof of concept.

I also built a CLI interface that wraps the programmatic API. You can install it globally with npm and start trading from the command line immediately, which has been useful for quick testing and automation scripts.

The technical challenge was mostly around the inconsistencies between DEX SDKs. Some use different slippage formats, others have different ways of specifying pools, and the transaction instruction building varies significantly. I ended up creating adapter patterns for each one while maintaining a consistent external interface.

It's published on NPM as "solana-trade" so you can try it right away. The CLI works out of the box for basic trading, and the programmatic API handles more complex scenarios like getting unsigned transactions for manual processing.

I'm particularly interested in feedback, and curious if there are other DEXs or features that would be valuable to add. The codebase is MIT licensed and I'd welcome contributions, especially from teams running other DEXs who might want to integrate their protocols.

NPM: https://www.npmjs.com/package/solana-trade

GitHub: https://github.com/FlorianMgs/solana-trade
by pjmlp | 2025-09-14 07:03:29+00:00
It has already multiple times,

Managed C++, C++/CLI, C++/CX, C++ Builder, Unreal C++

But those aren't extensions or approaches WG21 cares about having.

The C++11 GC design didn't even took those experiences into consideration, thus it got zero adoption, and was dropped on C++20.
by stevekemp | 2025-09-14 07:04:22+00:00
For the structure I "solved" that problem by creating folders with three main files:

Websites/foo.com/username Websites/foo.com/password Websites/foo.com/email

Sometimes I add "/notes" with unstructured text contents, and for a few special cases I created a file "/json" with some machine-readable things in JSON format.

It's not perfect, and I do dislike the way that the metadata isn't encrypted, but on the whole I'm happy with the solution.
by mykowebhn | 2025-09-14 07:04:36+00:00
> Mountains are objectively aesthetically pleasing to humans

Not sure about that. I find them aesthetically pleasing, and probably most people do, but I know at least one person who remains unmoved when looking at mountain scenery. Of course I find that strange, but there it is.

So not sure about the "objectively". Maybe "Mountains are aesthetically pleasing to MOST humans"
by zahlman | 2025-09-14 07:04:44+00:00
> If somebody says "when you jump off a cliff, you fall," that's not "justifying" anything.

It is when you say it of someone who was pushed rather than jumping.

There is no rational line of reasoning in which being shot is a natural consequence of supporting the right to bear arms. Hundreds of millions of Americans support the right to bear arms on at least some level.
by mihaic | 2025-09-14 07:04:48+00:00
I think the biggest problem in arguing against tech and social media is that it in truth you rely on counterfactual positions, which describe how the world would look without that thing.

A world without online dating for instance wouldn't just be the same as now, except without those apps. Now forms of socializing would emerge, which you could argue are more local and healthier for society.

When talking about social media, I now ignore the more powerful arguments of how better the world could be without people spending hours on their smartphones, and focus on the problem that it's a surogate for socialization where everyone wants to sell you something, which most people seem to agree is wrong.
by krrishd | 2025-09-14 07:05:02+00:00
USDC gets me 4% on Coinbase, and USDB and other Bridge-issued custom stablecoins also give the customer rewards that they can pass onto the holder (thanks to MMF/similar cash equivalents behind the scenes etc).

But yes - this is why banks want to prevent stablecoin issuers from being allowed to grant rewards
by aetherspawn | 2025-09-14 07:05:04+00:00
It would be awesome if someone could fund a free open source version of Simulink (as a VSCode plugin or something like that) so that we can build normal software using model-based design. Games, shaders, ML, reactive UI, applications like these…

Simulink is getting more expensive every year, and licensing is a huge barrier to open source models.

Edit: basically, we want Dyad (https://juliahub.com/products/dyad) except free.
Show HN: Countdown Builder – Create Custom Countdown Timers for Email Campaigns
by mehedimi | 2025-09-14 07:05:16+00:00
I built Countdown Builder as a lightweight way to add urgency to email campaigns.

Most ESPs don’t provide native countdown timers, and existing solutions are either clunky, expensive, or not very customizable. Countdown Builder lets you:

Design a countdown timer (fonts, colors, styles)

Preview in real-time

Generate a snippet to embed directly into your email

Use cases: flash sales, product launches, webinars, or any campaign where showing “time left” works better than just saying it.

I’d love feedback from this community on:

Edge cases I might have overlooked (email client compatibility, etc.)

Features you’d expect if you were to use this

Any gotchas you’ve faced embedding dynamic content in email

This is my first attempt at building a tool in this space, so I’m very open to ideas and critique.
by adrian_b | 2025-09-14 07:07:36+00:00
I have set my clock on UTC on all my workstations, desktops and laptops for many decades. This has been particularly convenient on the laptops used in business trips.

For many years, when I still had some other clocks besides those included in computers or mobile phones, e.g. wall clocks or wrist watches, those were also set in UTC, thus with no change between winter and DST.

I prefer to keep in mind the current offset of my local time from UTC, and also the offsets of a couple of places where people with whom I communicate frequently are located, and to add those offsets mentally to the displayed UTC time when that happens to be necessary in order to synchronize to some external event, like a meeting or the opening hours of some place. I schedule my own activities, e.g. eating or sleeping, in UTC.

This habit was triggered decades ago by the fact that I found much more annoying the hour change of all clocks to/from DST than changing in my mind the current offset of the local time from UTC, and also by the fact that the local time does not correspond with the solar time anyway, because I an not located on the center of the time zone, so if I want to know when it is noon, I have to also keep in mind the offset of the solar time from local time, which changes when DST applies. At least with UTC, that offset remains constant.

I do not consider myself dumb :-)

On the contrary, I consider that the legal time is designed for people who are so dumb that they cannot remember that during summer they should wake up and go to work earlier than in winter, the same as their ancestors did for many millennia. To be fair, their ancestors did not use a clock for this, but they woke up depending on the rising sun, which took care of this automatically.
by general1465 | 2025-09-14 07:10:40+00:00
From what is practically used - you have things like CoDeSys where you can program PLC or Matlab Simulink which is heavily used in science and in automotive development or infamous LabView spaghetti the moment when program will get just a little bit more complex.

All are using blocks with input and output which are either having predefined function or you can define the block function with a code. Reading these programming schematics is sometimes great to understand the high level of how program is working with input data (left) towards output (right). However the moment you will introduce loops, visual programming will just fall apart like a glass hit by a hammer.
by aborsy | 2025-09-14 07:11:03+00:00
The OS protections apply to all applications. In addition, the job of agents like gpg-agent or ssh-agent is to protect secret keys while they are cached (like preventing OS writing keys to swaps). You can configure them to erase keys after a certain time, require user’s confirmation for each key operation, store gpg keys in internal TPM or external hsm, and would talk to the agent through specific sockets.

Unlike browser-based password managers, the agents don’t continuously interact with the browser code and remote elements (probably don’t have network access at all).

One area that matters that I forgot to mention in my comment below is that, as a result of all above, Pass doesn’t check the domains and doesn’t protect against phishing. There might be extensions, but at that point, you might as well use keepassxc.
by pjmlp | 2025-09-14 07:11:22+00:00
You right, because the main companies with OSes that contribute to the surviving compilers that still care about ISO, are now focused elsewhere.

Apple with Swift, Google with Go, Java/Kotlin, Rust, Microsoft with C#, Go, Java and Rust.

Most modules stuff on GCC was done by a single developer, if I am not mistaken.

Notice how Visual C++ blog posts are mostly about game development related improvements, Visual Studio tooling.

Everyone else their compilers are still stuck on C++14, or C++17 if lucky.
by bubblyworld | 2025-09-14 07:11:51+00:00
I mean, it really depends. I'm writing models for some energy traders at the moment, and things were simple enough in the mvp that we could hand-roll our optimisations. But when we started having to map real contracts it got out of hand super fast. Linear constraints solvers have been a godsend, it makes adding new types of contacts and constraints really easy (and supports almost arbitrary kinds of optimisations).

It's just never as easy as "don't do this" or "always do this". But yeah, I agree with your gist, right tools for the right job and all that. Most of the time you don't know all requirements up front and it can make sense to hedge your bets in the interest of speed until you do.
by codethief | 2025-09-14 07:12:32+00:00
Memory isolation doesn't really help, though. If you have a malicious process running under the same user account as your password manager, it's still game over since that process could e.g.

- capture keyboard input - capture your screen - silently install browser extensions to capture your credentials - modify your shell config, .desktop files, $PATH, … to have you e.g. call a backdoored version of your password manager, or put a modified version of sudo on your $PATH that logs your password (=> root access => full memory access) - …
by neilv | 2025-09-14 07:13:04+00:00
You can use it as an SSH terminal. :)

In grad school, I ended up borrowing an old teal Indigo2, with graphics upgrade, that my research group had sitting around, to use from my dorm room, mainly as a terminal.

(I owned almost nothing in the world at the time, not even a computer, having shed my possessions in a "Gattaca" kind of way, of not saving anything for the swim back from grad school. But an SGI Indigo2 is more than powerful enough to be an SSH terminal, and my electricity use wasn't metered. And, unlike the laptops I'd borrowed, no one would want the Indigo2 back.)

Getting IRIX installed involved multiple installation tapes (or was it CD-ROMs?) that some kind person in the lab happened to still have.

An admin later offered to give me this Indigo2 that I was borrowing, but they first needed me to bring it back in for inventory. Around then, I'd finally built (or was about to build) a Linux box, and hauling the Indigo2 and its huge CRT anywhere was a chore without a car, and I'd soon be graduating, and moving away lightly. So I carted the Indigo2 back across campus, and left it for good. Hopefully it ended up with someone who preserved it, as the author here does.
by apparent | 2025-09-14 07:13:43+00:00
When I was an intern years ago I went to an event at a hotel in LA. I didn't know what room the event was in, so I approached the concierge, described the event I was there for, and he immediately whisked me to an upper floor, where I began to talk with the other guests. It took about 10 minutes for me to realize that while the people there were also interns, and we were in the same field, they were from a particular company, whereas my event was for an industry group. They had just been flown in from all over the country, so it didn't seem odd to them to see a new face (we were all new faces).

I eventually realized the error and quietly excused myself to look for the industry group meeting (which sadly lacked the delicious catered food and open bar that the first event had). Fortunately I made my exit before the higher-ups had arrived, as they would have quickly realized I was in the wrong place.
by junto | 2025-09-14 07:14:59+00:00
We need to be asking ourselves this exact question.

The primary goal is control. Facebook de-anonymized the internet user to a name, email address and their contacts and connections, and sold that data to control outcomes, manipulate elections, topple governments, and sell advertising.

Centralized generative AI profiles take that to the next level. They don’t just know your name, email address and identity, but also the way you think, your interests and your innermost thought patterns.

This data is the pinnacle of manipulation and control. It’s an authoritarian wet dream. It will be sold to insurance and healthcare wishing to revoke insurance claims and repeal coverage. It will be sold to governments looking for citizens that are “non-compliant”, to potential employers to weed out the “unworthy” and “non-compatible candidates”. We should all be terrified. The future is dystopian. This is no longer a movie script.

When I think about the script of the Matrix and all those humans lying in pods being used as batteries, I now realize that the first people to enter them probably did willingly, because TikTok and Fox News told them to. We are fucked.
by user34283 | 2025-09-14 07:15:07+00:00
People who ask such questions aren't stupid enough to be in crypto.

It's easy to unravel the entirety of crypto:

Who is willing to spend any money for crypto? It's the same people who want to profit from reselling crypto at a higher price.

That's all there is to it. If you understand this, you also understand why the system eventually has to fail, leaving holders with trillions in losses that funded the profits people took out of the system.
by rkomorn | 2025-09-14 07:15:24+00:00
A lot of this is driven by the user's behavior, not just advertising, though.

"The algorithm" is going to give you more of what you engage with, and when it comes to sponsored content, it's going to give you the sponsored content you're most likely to engage with too.

I'd argue that, while advertising has probably increased the number of people posting stuff online explicitly designed to try and generate revenue for themselves, that type of content's been around since much earlier.

Heck, look at Reddit or 4chan: they're not sharing revenue with users and I'd say they're at least not without their own content problems.

I'm not sure there's a convincing gap between what users "want" and what they actually engage with organically.
by jg2007 | 2025-09-14 07:16:17+00:00
Cursor recently published a new blog outlining how they train models. Interestingly, the blog does not clarify how they handle opt-out user data and/or business user data -- exact phrasing: "[cursor's] model runs on every user action, handling over 400 million requests per day. As a result, we have a lot of data about which suggestions users accept and reject. This post describes how we use this data to improve Tab using online reinforcement learning."

As a matter of fact, the wording sounds like all cursor user data (opt-in and opt-out alike) are being used.

Anyone knows what's going on behind the scenes?
by WalterBright | 2025-09-14 07:17:30+00:00
No, I haven't kept track of the reports I've seen. They all had array bounds as the #1 error encountered in shipped code.

Edit: I just googled "causes of memory safety bugs in C++". Number 1 answer: "Buffer Overflows/Out-of-Bounds Access"

"Undefined behavior in C/C++ code leads to security flaws like buffer overflows" https://www.trust-in-soft.com/resources/blogs/memory-safety-...

"Some common types of memory safety bugs include: Buffer overflows" https://www.code-intelligence.com/blog/memory_safety_corrupt...

"Memory Safety Vulnerabilities 3.1. Buffer overflow vulnerabilities We’ll start our discussion of vulnerabilities with one of the most common types of errors — buffer overflow (also called buffer overrun) vulnerabilities. Buffer overflow vulnerabilities are a particular risk in C, and since C is an especially widely used systems programming language, you might not be surprised to hear that buffer overflows are one of the most pervasive kind of implementation flaws around." https://textbook.cs161.org/memory-safety/vulnerabilities.htm...
by WalterBright | 2025-09-14 07:22:35+00:00
Using D does not require a garbage collector. You can use it, or not, and you can use the GC for some allocations, and use other methods for other allocations.

D has a lot of very useful features. Memory safety features are just one aspect of it.

> The awkward standard library schism.

???

Don't underestimate the backing of a large and powerful organization.
by jayd16 | 2025-09-14 07:22:36+00:00
The tone of the article feels really preachy and full of itself without even fully understanding why Blueprints work well for games.

Killer features that come to mind are:

You can drag and drop asset references instead of relying on textual tokens.

You can build a framework where incorrect code does not fit together, or pins dont connect, or draggables do not allow for blocking. It's a much better feedback to a certain type of person than a textual error.

Then the article seems to go on and on about knowing how to make a great visual programming language despite not producing one.
by oftenwrong | 2025-09-14 07:22:45+00:00
In many systems it is reasonable not to include a zone. Usually that goes hand-in-hand with the desire to use a more compact representation, such as storing a numerical timestamp with a customary interpretation (usually UTC or TAI). If you must store a string, you may as well include a zone. Using ambiguously-zoned timestamps is an invitation for bugs. I feel your pain.
by ipnon | 2025-09-14 07:24:18+00:00
The apparatus we call GFW is really a Chinese CDC for memes. The CDC expects novel strains of bird flu every year, it’s okay, they closely monitor the situation, research the novel strains, cull risky populations, and develop vaccines for worst case scenarios. GFW expects novel strains of anti-CCP viral memes every year, it’s okay, they closely monitor the situation, they analyze the meme for spreaders and origin, they use the new meme to gauge changes in public sentiment, they fine or jail or imprison particularly quarrelsome netizens, and in the worst case scenario they prepare narrative shifts or outright censorship to maintain a net that is deemed healthy. It’s meme epidemiology, with mind viruses instead of RNA viruses.
by burnt-resistor | 2025-09-14 07:26:05+00:00
Your mind appears closed and you're not interested in having a normal conversation because you don't have any valid points. Best of luck to you.

I worked with Japanese and Germans in the field, so I guess you don't know what you're talking about and are projecting your biases. The owner of the company was a Jewish Moroccan expat who contributed greatly to the field. Please have a look inside yourself before confessing your issues.
by tsimionescu | 2025-09-14 07:26:30+00:00
Trademark law exists to protect consumers from counterfeit goods. Basically, it exists to allow consumers to recognize the goods of someone they have established trust with. If I know I like Coca Cola, I can just buy any bottle that has the Coca Cola trademark and know what I'm getting, instead of worrying I'll get a completely different beverage.

This gets more complicated when multiple companies are selling services for the same open source software, because you want all of them to be able to say what their services are for, but you don't want one of them to tarnish the reputation of the software itself. But as long as all the companies are actually selling services for the same software, like in the case of WPEngine and the other company here, consumers are better served and informed if both call it WordPress.
by MattJ100 | 2025-09-14 07:26:35+00:00
Interestingly, it was what pushed me back into it. Even just capturing family stuff, the limitations of smartphone cameras were always niggling, the article gives one example of why, but focal length is just one of the things you gain more control over with a real camera.

I realised a big reason I defaulted to my phone was simply that it's always there in my pocket, while my "real" camera was a burden to carry around. Related to the popular photography maxim that "the best camera is the one you have with you".

One day, after "seeing" some good shots in my head and totally missing them due to phone camera limitations, I decided I had to fix it. I started with an RX100 (I got the M3 secondhand at a decent price), which is as pocketable as a phone and immediately improved things for me.

Eventully that reminded me how much I enjoyed real photography, and now I often cart a big camera and multiple lenses around with me again. Oh well :)
by tomhow | 2025-09-14 07:27:20+00:00
We've banned this account for repeatedly making abusive comments and ignoring multiple appeals to stop.

It's fine to criticize major tech companies and their leaders and investors, people do that every day on HN. But vile comments like this about anybody obviously cannot be tolerated here if we are to have any standards at all. Please stop registering accounts to post this kind of dreck.