News for hackers. Stuff that matters.

dev-ns8

Re:A few thoughts on intensity on Sunday October 25, 2026 @02:00PM (#50234196)
"One up him everytime... If he slaps you, you punch him, he punches you, you kick him, he kicks you, you stab him, he stabs you, you shoot him, he shoots you, you go kill his family" - Chael Sonnen on intensity
Re:PgDog is funded and coming to a database near you on Wednesday June 10, 2026 @01:53PM (#48480090)
Combined with a replication strategy and automated health checks, a load balancer could direct traffic to a healthy instance automatically.
Re:Nobody cracks open a programming book anymore on Monday May 25, 2026 @08:15PM (#48273433)
I recently purchased Computer Systems: A Programmer's Perspective [0] and am currently working through it with pen and paper.

I've only had peripheral exposure to writing in assembly and "systems level" programming so I'm really quite enjoying it.

[0] https://www.amazon.com/Computer-Systems-Programmers-Perspect...

Not mentioned in my initial comment, but yeah, I'm viscerally aware of the affect the time period and resources at the time have on API design in C and other languages from that time period.

The null pointer in place of the operand here just seemed like a really good quirk to point out

Besides my DA/Algo classes in College, I've never used C seriously. And you know, it's semantics like this that really make me go WTF lol....

From strtok man page... "The first time that strtok() is called, str should be specified; subsequent calls, wishing to obtain further tokens from the same string, should pass a null pointer instead."

Really?? a null pointer.. This is valid code:

  char str[] = "C is fucking weird, ok? I said it, sue me.";
  char *result = strtok(str, ",");
  char *res = strtok(NULL, ",");
Why is that ok?
Something very similar to this was pulled of by Ukraine last year

https://en.wikipedia.org/wiki/Operation_Spiderweb

Re:Finding a CPU Design Bug in the Xbox 360 on Tuesday March 17, 2026 @04:01PM (#47417545)
Wow... A speculative branch prediction path actually get's preemptively executed despite the branch outcome? No matter if the execution has side-affects??? That's quite amazing. Are modern CPUs doing speculative execution like this and just put extra safeguards around affects or do they just prefetch / decode instructions now-a-days?
Re:Helix: A post-modern text editor on Saturday March 07, 2026 @01:47PM (#47290345)
Is this macro mapped in vim or OS level? Sounds interesting.
Congrats on shipping!

Two things, does anyone else feel like 2017 was not 9 years ago and rather feels like it was just yesterday? I use a 2017 iMac running MacOS 13.7.8. It appears my hardware will not support any newer version of MacOS. For the most part, I haven't been too discouraged by this as I prefer older MacOS designs over the newer ones.

However, this is the second time in 2 days I've actually hit a wall in the Apple eco-system due to an older OS.

Last night I tried to build Ghostty to hack on a feature... it needs Xcode SDK 26 which isn't supported on Xcode 14 (latest version I'm able to install).

Now today, attempting to try this app out, I can't launch it due to being on too old of an OS.

It's really a shame because this iMac from 2017 is quite the capable machine. Absolutely no reason to upgrade it (from a hardware / performance standpoint).

Re:How fast is Go? simulating particles on a smart TV on Wednesday September 24, 2025 @10:06PM (#45368511)
"No client simulation allowed only server."

Seriously

Re:Margin Debt Surges 9.5% in June to Record High on Friday August 22, 2025 @09:32PM (#44992121)
Who knows if this is the reason that Trump is putting in place this trade war and increasing tariffs, but this paper is a very interesting perspective on why someone in the position the US is in, in regards to the global economy is extremely thought provoking [1].

Seeing as how Trump appointed the author into his political circle though could be evidence this is the ultimate goal.

The paper is quite lengthy, however, in the beginning Stephen explains this idea of the Triffin Dilemma. A country that acts as the worlds reserve currency and thus creates enormous demand for their currency for things outside of goods are at a disadvantage that exasperate their trade deficit. This is implicit for a countries currency where most global trade is settled in their dollars, not to mention the benefits of holding the world reserve currency as a value store or investment.

I've wondered since the tarifs were announced how much impact they can actually have, but besides that point what is a reserve currency country to do? Give up their reserve currency status? There are significant downsides to that as well...

[1] https://www.hudsonbaycapital.com/documents/FG/hudsonbay/rese...

Re:Margin Debt Surges 9.5% in June to Record High on Friday August 22, 2025 @09:20PM (#44992040)
Well isn't that the whole point? At a fundamental level, investment profits are a payment for the risk you take. No risk equals no profit. There are "safe" investments currently. You can get paid 4% a year roughly to hold treasuries right now. Considered a "risk free" investment (Which sure, maybe the merits can be argued).

But at the end of the day the only way to profit from an investment is taking some risk. It all comes down to pricing that risk.

Re:Resizable Structs in Zig on Saturday July 26, 2025 @07:51PM (#44697826)
Does this mean it's impossible in Zig to do strictly Stack related recursion and just by the mere inclusion of a recursive function your implicitly getting heap allocations alongside?
What is the value proposition for these form libraries? Is it scale? Is it the custom builder? How complex are people's HTML forms these days from a UX perspective?

I was browsing the code, and noticed this forms library was using Supabase, presumably a paid service if this OSS library takes off. I just can't seem to grasp why a custom form building library needs a 3rd party, managed Database included. Scale maybe?

These are genuine questions as I'm woefully unaware of the state of HTML forms / Frontend in 2025

Re:Making Postgres Distributed with FoundationDB on Friday May 23, 2025 @04:31PM (#44076357)
Super interesting project! I have zero experience writing Postgres extensions, but I was browsing a blog post about an extension the other day. I was curious what ones workflow looked like while developing a PG extension. From the little I read, it looked like you would have to recompile postgres, including your extension, then enable it just to run it. Seems like a very long feedback loop. Was I missing something?
Is there a DBMS or storage engine intended for a DBMS that does bypass the filesystem altogether? I'm not aware of any, but at the same time I don't have a full grasp of all the storage engines offered.

It almost seems like a ridiculous idea to me for a database component author to want to write there own filesystem instead of improving their DB feature set. I hear the gripes in this thread about filesystems, but they almost sound service level user issues, not deeper technical issues. What I mean by that, is the I/O strategies I've seen from the few open source storage engines i've looked at don't at all seem hindered by the filesystem abstractions that are currently offered. I don't know what a DBMS has to gain from different filesystem abstractions.

Re:Tmux – The Essentials (2019) on Tuesday March 04, 2025 @10:35PM (#43262382)
Scrolling behavior is one of my biggest gripes with tmux. I've not done enough digging on terminal emulators and multiplexers to know why this is.

Is this an inherent limitation of multiplexers or does it stem from a choice made by tmux?

Re:Tmux – The Essentials (2019) on Tuesday March 04, 2025 @10:34PM (#43262365)
I have been wrestling with having to enter scroll mode for so long now. It's so infuriating. It works without configurations on iTerm, but does not work on a single other terminal emulator I've tried.

I just tried your config setting in Ghostty and still, when I use my mouse it scrolls through zsh history, not the screen

Being an advanced scuba diver is absolutely no indication of one’s ability to freedive. You Absolutly can not compare the two besides both taking place underwater.

On top of that, even if this guide was a Divemaster which is far from guaranteed given the other safety failings from this company, being an advanced Divemaster does not equate to one’s ability to cave dive. Survivors state the lack of lighting in the boat and so I’m assuming he would have had to navigate the boat in complete dark under water. So while not exactly cave diving, it’s equatable. An activity that’s insanely dangerous to anyone, even Divemasters that don’t have cavern or cave experience.

There’s a reason there’s a grim reaper sign at the entrance of caves in popular dive locations.

This is exactly what us hunters do year after year, time and time again. Drive for hours, hike for miles. Gathering what information we can. Then at some point we have to make assumptions and commit to some scenario in hopes it pans out the way you assume.

A tremendous amount of time and effort is spent with it all riding on a few, hopefully, well placed assumptions. Sometimes it works out, sometimes it doesn't. Usually your acquaintances only hear about the times the hunt works out. Same with this. We only hear about it, because it worked out for the hunter

Re:The First Hedge Fund on Tuesday June 25, 2024 @02:06PM (#40791583)
There's also a great story that speaks more towards the detriment of using Black-Scholes as an investment thesis.

https://www.amazon.com/When-Genius-Failed-Long-Term-Manageme...

I'm not familiar with rails, so sorry if your reply above inherently answered this.. So you're enabling the tracing with a call in your controller method, but how is the tool capturing function params and returned values for sub-calls in the respective controller method?

Is it waiting for execution to return to the controller method and polling the stack trace from there?

Re:Car rental throwing away money? on Monday July 10, 2023 @12:07AM (#36661963)
I'd be interested in talking with you about this
Recently found myself in the same business. Early similar to you. Small business', strictly local.

I've got a couple high level questions for someone more seasoned than I.

Could I email you?

Re:More challenging projects every programmer should try on Monday December 21, 2020 @12:34PM (#25497176)
That's awesome! Really cool to see another knowledgeable fan of Muay Thai on this forum!
Re:More challenging projects every programmer should try on Monday December 21, 2020 @12:27PM (#25497103)
Totally unrelated, but what's the connection between your name and the famous Muay Thai fighter Yodthanong Photirat, better known as Yodsanklai Fairtex?? [1]

[1] https://en.wikipedia.org/wiki/Yodsanklai_Fairtex

We have to assume this is partly the reason for the parabolic increase in TSLA stock price don't we? Thinking out loud here, correct me if I'm wrong anywhere..

According to your second source, there was $14.5B worth of shorted shares on 1/14/2020 and the closing price for $TSLA on that day was $107.58.

According to the source below [1], as of 11/15/2020 there was $27.19B worth of short shares. Closing price 11/16 was $408.09

Shares shorted 1/14/2020: 14.5B / 107.58 = 134.78 Million Shares

Shares shorted 11/16/2020: 27.19B / 408.09 = 66.62 Million Shares

According to TSLA July 2020 10Q they had 186M shares outstanding [2] so while not the most accurate when comparing a 9 month change in Shorted shares, we can estimate in the neighborhood of 1/3rd the shares on the market were covered by short sellers.

[1] https://www.marketbeat.com/stocks/NASDAQ/TSLA/short-interest... [2]https://www.sec.gov/Archives/edgar/data//1318605/00015645902...

Re:Ask HN: Is all of FAANG like this? on Thursday July 23, 2020 @11:45AM (#23928556)
This is awesome man, truly happy for ya.

Your comment isn't the first time I have heard this advice, "Find a small non tech company and get involved" however I have previously written this advice off for w/e reason.

I now find myself in search of a new opportunity and am very much like many other commenters in this thread, highly unsatisfied with "rat race" type jobs, and if I'm not happy I don't perform up to my ability well.

I'm actually very interested in exploring your path, possibility finding a small non tech company and seeing where/ if I could add value to their organization with my software development experience.

All my previous jobs have been found via standard software development job boards though, StackOverflow, LinkedIn, homegrown software job boards, etc. Do you have any advice on finding a small non tech company that might be looking to add a software developer to their ranks?

Honestly I'd love to chat with ya personally. If you're comfortable shoot me an email otherwise any incite here would be wonderful. Email in my Bio

Older »