6,699 karma · joined Jul 18, 2012 (14y ago) · 1,967 submissions
Backend-focused full-stack engineer with 8+ years of experience, mostly focused on Go, Rust, and TypeScript, but open to other options.
Resume: https://drive.google.com/file/d/1VNC272B3n7ZEfppMHkm2wGgaINwYl4Av/view
comment 5y ago · link · parent
"Log data: Information that your browser automatically sends whenever you visit the Site (“log data”). Log data includes your Internet Protocol address, browser type and settings, the date and time of your request, and how you interacted with the Site."
Then there's also this section:
"Online Tracking and Do Not Track Signals: We and our third party service providers may use cookies or other tracking technologies to collect information about your browsing activities over time and across different websites following your use of the Site."
I would assume that "other tracking technologies" includes IP addresses.
comment 5y ago · link · parent
(I don't have any relationship to HN)
comment 5y ago · link · parent
People who don't save a boatload by getting the license-optimized CPU will invariably choose to buy the 24-core one, which helps AMD by making it easier for them to keep up with the demand for the 16-core variant, and the 16-core variant gets an unusually nice profit margin. Win win.
This is not the first time AMD or Intel have offered a weird inverse-pricing jump like this... I highly doubt it is a typo.
My other comment reiterates some of these points a different way: https://news.ycombinator.com/item?id=26469182
comment 5y ago · link · parent
As I said below the article in the comments:
> If I were to speculate, I would strongly guess that the actual reason is licensing. AMD knows that more people are going to want the 16 core CPUs in order to fit into certain brackets of software licensing, so AMD charges more for those to maximize profit and availability of the 16 core parts. For those customers, moving to a 24 core processor would probably mean paying significantly more for whatever software they're licensing.
This is the more compelling reason to me, and it matches with server processors that Intel and AMD have charged more for in the past.
"Even vs odd" affecting the difficulty of the binning process just sounds extremely arbitrary... definitely not likely to affect customer prices, given how many other products are in AMD's stack that don't show this same inverse pricing discrepancy.
comment 5y ago · link · parent
I'm also pretty certain the article is benchmarking against the 10x copy file for the actual benchmarks.
See this example command in the article:
time $PROGRAM <kjvbible_x10.txt >/dev/null
So, even if you had the exact same hardware, I'm pretty sure your program would only be a bit faster than the unoptimized C# version. However, it's possible that your machine is a lot slower than what's used in the article, and your program is actually pretty fast -- but without more points of comparison, we just don't know. You haven't run the other benchmark programs on your hardware and posted the results.comment 5y ago · link · parent
For starters, ints aren't normally "allocated" (in the heap sense). Go is value oriented, not reference oriented.
I feel like the bigger change in the code was avoiding the allocation of the string for each word in the source text, and instead passing the byte slice directly to the point where it was used as the map key. Since strings are immutable, when you convert a byte slice to a string, it must be copied into a new immutable backing slice so that no one else can touch it. The exception is that the compiler optimizes map accesses where the key is a string type, but the code is converting a byte slice into a string at the point of using it as a map key. The compiler elides that conversion, making it a no-op, and instead just passes the byte slice in, since the hash map can make a copy of the string if it needs to, but it will otherwise avoid the unnecessary allocation and copying that converting this would otherwise require.
I feel like that's where the big difference is. Heap allocating the integers and storing references in the map doesn't feel like it's actually doing anything here, although storing pointer values in maps can be useful in certain scenarios.
comment 5y ago · link · parent
comment 5y ago · link · parent
Unless it's actually not that simple?
You could at least make constructive criticism instead of just dismissively saying that all solutions suck. ("Tons of dependencies", "complexity", and "perplexing" are not actionable criticisms... they're highly subjective opinions.)
comment 5y ago · link · parent
I don't know which category epoll fits into, but it seems like it should be treated optimistically, since epoll is used for non-blocking I/O.
https://utcc.utoronto.ca/~cks/space/blog/programming/GoSched...
comment 5y ago · link · parent
Without measuring 10k, 20k, 30k of each and seeing how the memory usage changes, we are seriously comparing apples to oranges here.
Go's allocator will hold onto a decent chunk of memory just to amortize the cost of reaching out to the operating system. Just asking the operating system how much memory the Go application is using doesn't tell the whole story in this benchmark.
Is it 3x or 30x? The author certainly doesn't know based on taking a single data point from each application.
Goroutines are more memory efficient than full OS threads, but they're also cheaper to spawn and the Go runtime can optimize for certain common use cases very effectively.
I've also personally had serious difficulty in the past with getting Linux distros to let me launch tens of thousands of OS threads. Long before I run out of memory, I hit various limits that block the program from spawning additional threads. Some of them can be adjusted, but I never managed to spawn threads arbitrarily up to the amount of memory that was available... probably just my own failing, but that alone is reason enough not to spawn an unbounded number of OS threads.
comment 5y ago · link · parent
That's just not how encryption works...
Also, a malicious actor being able to point a multi-ton rocket filled with explosive fuel the wrong direction would be far worse than the system continuing the mission autonomously.
Now imagine human spaceflight missions where the command stream can be hijacked by anyone with an SDR. Yeah, not happening.
The command stream better be authenticated, and if you're doing cryptographic message authentication, you might as well encrypt the payload so no one else can read it anyways.
> The rocket might be designed to ignore commands coming from the wrong direction and/or signal strength.
You want to talk about something error prone "getting in the way of legitimate commands"? That would be an unbelievably error prone approach. Oh, the rocket accidentally rolled on its axis a few degrees? Ignore all commands to correct it!
Encryption and authentication are extremely reliable.
comment 5y ago · link · parent
If that isn’t what you want to happen, you go to the Settings app and turn off those toggles. (But I wish they would have a matching statement on screen that clarifies their changes are permanent until you change them again.)
Temporary toggles being in the control center is great. Most of the time that I quickly disconnect from WiFi or Bluetooth, it’s to solve some immediate, temporary issue.
The settings aren’t “changing themselves” — they’re doing what you asked them to do. The written message tells you what you asked them to do in order to teach new users what these buttons do.
comment 5y ago · link · parent
From the developer’s point of view, the values would always be there, just unused. The compiler would just make them disappear at compile time if unused.
comment 5y ago · link · parent
I already addressed how you’re apparently giving up all of the benefits of Zig’s error handling system to do this. That level of convention breaking isn’t a good sign for anything. The current convention really is that bad, from my point of view.
The obvious solution’s extremely tiny overhead could “easily” be avoided in the almost non-existent cases where it matters.
I want robust software by default, not software where I have to use side channel hacks to get the information I need by default... but maybe that’s just me. (And everyone else who upvoted that GitHub issue)
Of course Zig programmers would be unlikely to see the issue here — naturally the people left are the ones who don’t see the problem. People like myself who know from past experience how problematic not having error context is are likely to just avoid Zig until it meets our minimum requirements.
That’s not a problem for existing Zig users — it works for them — but it is annoying to people like me who think Zig otherwise has a number of interesting aspects.
comment 5y ago · link · parent
comment 5y ago · link · parent
I believe the solution has been clearly presented to those who are listening, and the downsides are so much smaller than the status quo.
If people on the language team are unwilling to provide developers with the tools to make more robust software because of something like 64 bytes of stack memory... I find that pretty shocking. And yes, I mean that it is extremely difficult to diagnose and fix issues in production software when you only get back a static error value that lacks the dynamic error context that a payload would provide. I’ve been there, done that. Do not want that again.
Such a strong viewpoint (avoiding such error payloads) could at least focus more on the technical aspects of how best to implement the elision of unused error payloads instead of just broadly opposing the concept, since it should be obvious how beneficial those payloads are, and the only question is how to remove them for developers who literally cannot spare dozens of bytes of stack memory. (Which I find hard to believe outside of AVR or PIC microcontrollers, which is probably not the best use case to be optimizing for in a new language.)
Elision is an optimization that can be added later. It’s not obvious that it can’t be done, and there’s no clear reason that it has to be solved first... I just don’t think anyone would actually care enough to implement it once they see how nonexistent the negative impacts are, but it would be a cool optimization.
But, maybe everyone who upvoted the apparently most upvoted GitHub issue on the Zig repo (including myself) is just completely wrong and this obvious solution is actually secretly terrible. It’s entirely possible.
Your comment has not really done anything to help me believe that I’m wrong, though, unfortunately.
But, as I’m basically “no one” in this context, my opinion probably doesn’t really matter.
comment 5y ago · link · parent
The standard Go toolchain cannot compile for microcontrollers, so the size of binaries that it produces is irrelevant.
Just like there are many compilers for C, there are multiple compilers for Go with different priorities.
comment 5y ago · link · parent
I think it's simply an outdated oversimplification in 2021 to say that microcontroller projects "normally" don't want heap allocations at all.
TinyGo also makes it relatively easy to avoid heap allocations because you can change a compiler flag to make heap allocations a compiler error^1, if that's required for a particular project.
^1: https://tinygo.org/usage/important-options/ (look at -gc=none)
Another interesting link: https://tinygo.org/compiler-internals/heap-allocation/
comment 5y ago · link · parent
How can you argue that not having access to string index where the JSON was unparseable is better than having access to it? I read through issues/2647, and I read through the "existing pattern", and it just seems obvious to me that containing the error information in the error is better than trying to hack it through side channels.
If A -> B, and B returns an error through a side channel, then A can use it and "what's so bad about that?"
But this doesn't seem to scale very well.
If A is refactored to use an intermediate function X, then it just doesn't work. A -> X -> C would mean that...
X cannot use Zig's normal error handling syntax to automatically propagate this error that A is better equipped to handle, unless we're going to further stipulate that A must pass this Diagnostics struct into X which then must pass it into B.
If we now assume that X calls into two fallible functions, B and C, and each of them provide their own diagnostics structs, then X will have to take in two "out" arguments that provide the diagnostics, and every single caller of X will have to provide those two values.
You see how this goes. It just doesn't seem scalable.
Why not take the current design to its logical conclusion of simply having every function return a Boolean indicating whether it succeeded or not, and then require the caller to look into some "out" argument to determine what the error was? Obviously, that would be extremely annoying.
A tagged error union containing the diagnostic error values is just a minor evolution of the current design that brings huge wins for language ergonomics.
For errors that don't need to carry a value, there is no additional cost: they compile and work exactly as they do today.
For errors that carry a value, the size of the error struct is only the size of the largest error value (plus the tag, of course), not the product of all possible error values, so the global error set will never grow to be enormous unless you have some very weird error type. In which case, you can solve this problem by fixing that error type.
So, I'm not deeply versed in Zig, but I have personally argued in favor of Zig's async design, which seems exceptionally interesting. I had not realized until now how limiting the error system implementation was, but I had superficially appreciated how much less verbose it was than Rust's where you tend to hand write these error enums, or use a bunch of code gen. However, errors benefit tremendously from having the ability to supply payloads.
No one is required to act on the payloads within the errors, but no one is able to if they don't exist.
comment 5y ago · link · parent
There are various conference presentations about it that show it in action.
comment 5y ago · link · parent
I definitely appreciate that the core is open source, but using the open source version is less fun than it sounds. You really want to use the freeware proprietary VS Code to get a good experience.
If we're going to be using a proprietary text editor anyways, then I wish Sublime Text and its community were still as active as they used to be.
comment 5y ago · link · parent
If the author identified malicious repos on user accounts that were created solely to make those malicious repos... it seems like something the author should have reported to GitHub. I wonder if GitHub would actually do anything, though.
comment 5y ago · link · parent
Which headset did you switch to?
I bought the HyperX CloudX Flight (what a name) wireless gaming headset about three months ago, and I was shocked at how much latency I could feel in something that was supposed to be a dedicated gaming headset.
There's no inherent reason that a wireless headset has to have more latency than a wired headset, analog wireless being the extreme example of no added latency, but a purpose-built wireless headset seems like it would use some digital wireless protocol that is optimized for low latency, instead of buffering something like 100ms of audio in the channel. That ~100ms to ~150ms of latency really impacts reaction times.
So, I could switch to a wired headset... I just wish I could find a wireless headset that didn't suck. Microsoft just recently introduced their new "Xbox Wireless Headset", which looks awesome, but... the absence of any latency specification is not encouraging.
comment 5y ago · link · parent
The OP's whole comment fails to mention Starship a single time, which is probably not a competitor you want to bring up with investors since it is designed to do just about everything, but acting like SpaceX hasn't been publicly developing Starship for years now is weird to me. Starship development is moving fast.
Regardless of the above, I am really excited to see more activity in the New Space scene. The market will be so big that it shouldn't be a winner-takes-all market... there seems to be plenty of room for more companies to grow the space market faster. The more the merrier.
I just want people to be transparent about current realities... and using present tense for something that seemingly doesn't actually exist, ignoring the existence of Starship, claiming to be the first launch vehicle to offer "down-mass"? hmm.
comment 5y ago · link · parent
From what I've seen of benchmarks online, DO's droplets have better sustained (and often overall) performance than Lightsail, and this looks to be the reason why.
(Which isn't to say people should avoid Lightsail, but I don't think Lightsail is the obvious 1:1 replacement for DO that a couple of people in this thread want it to be. Lightsail intentionally restricts various things to avoid cannibalizing their normal AWS sales.)
comment 5y ago · link · parent
That’s been my experience, at least.