Recent submissions

Comment · 3 years ago
I've done some porting of VB6 into C# with WinForms. It's actually a pretty direct mapping. I wrote a converter, and then spend a few minutes cleaning up the converted code per form. Took me a couple weeks to convert a 500KB program, which mostly involved going through and converting VB6-isms that failed to auto-convert into C#. I can't imagine trying to translate something like that into such a different language and UI environment as Python. Unfortunate that they'd reject such a thing just because C# came from Microsoft.
Comment · 4 years ago
Comment · 4 years ago
If the statement is "if (!isGreen)", it's much clearer to say "if is not green" than it is to say "if is green is false". Putting == true or == false makes you convert a clear statement "is green" into "true" or "false" instead of just being a natural English statement. It would be like saying in conversation, "I want to go to the store is false" instead of "I don't want to go to the store".
Comment · 5 years ago
A lot of the improvements are just logically extending the language to remove arbitrary restrictions. That's what most of C# 10 and 9 appear to be. So most of the features you wouldn't go out of your way to use, but instead stuff that used to be impossible is now possible. I can't say that I've ever wanted a generic attribute, or a constant interpolated string, but if I did want them, I'd be surprised when they didn't work. C# 8 was the last major new language features.
Comment · 5 years ago
StackOverflow actually has a checkbox when you ask a question that says: "Answer your own question – share your knowledge, Q&A-style" which lets you post your answer at the same time as your question.
Comment · 5 years ago
A lot of things a human can do can be found in other species, but I think the ability to read and write arbitrarily complex ideas really does set us apart, and caused a phase transition. It allows us to transmit ideas across time and space that would otherwise be lost. It allows the accumulation of knowledge that no brain is large enough to hold. Outsourcing our memories to persistent storage. Someone can write down an idea, it can be forgotten for hundreds of years, and then rediscovered and applied. It can allow one person to design something, and communicate that design to thousands of other people. Take that away, and local achievements in knowledge remain local until they are forgotten because other knowledge has takes precedent.

A beaver might instinctively know how to build a dam because it's built into its DNA, but a human can read the writings of past dam builders, learn the abstract theory of dam building, come up with their own improvements, debate those changes with other people interested in dam building, communicate their design to dam builders, and publish their work to become a permanent part of dam building literature. For a beaver to change how it builds dams, it would require a change in their DNA to pass on to future generations.

Comment · 5 years ago
And then they decided to end that line of succession. .NET Framework 4.8 is the last version of the framework. I've started experimenting with converting code to .NET 5, but it's a rather large jump compared to any previous upgrade. Going from 2.0 to 4.0 had a few minor hiccups, but going to .NET 5 is basically a rewrite of the framework and runtime, and I'm not sure how old and new assemblies will co-exist. It feels like a fragmenting of the ecosystem, where a bunch of code will be stuck on .NET 4 forever, and other code will move to the .NET 5 and later.

I'm almost expecting a few years down the road, Microsoft will go back on 4.8 being end-of-the-line for .NET 4 and start releasing new minor versions of it because of all the customer code that can't be ported to .NET 5. Or maybe it will just end up like VB6. Stuff written in it still works, and will continue to work, but it's considered a dead language.

Comment · 5 years ago
Dvorak plays pretty nice with default vi keybindings, for the most part. Both y (yank) and p (put) are on the left hand, as well as x (delete characters), . (repeat last), u (undo), q (record macro), @ (execute macro) and " (choose register). And even though d is technically on the right hand, it's still in easy stretch range of the left. You can do a lot quite quickly with those keys and a mouse. So I don't miss ctrl-c/v too much when I have vi keys available. Whereas the right hand tends to be a lot of movement keys, which are more important when not using a mouse: h (move left) l (move right), b (previous word), f (jump to character), t (jump before character), n (next search result), g (goto top/bottom/line number/etc).

The worst thing I've experienced with Dvorak is typing "ls<enter>" repeatedly. It's really painful on the pinky. Putting L on the right pinky stretch was a really bad decision.

One advantage Dvorak has over Colemak is that it's included with every OS and easy to switch to, whereas Colemak often requires a download and an install to use. And some games include Dvorak keybindings, but I haven't seen one with Colemak keybindings yet.

I learned Dvorak back in college, and got fast by playing muds. Type fast, or you're dead. Took a few months to get up to speed.

Comment · 5 years ago
So did you switch from Dvorak to Colemak? I just did a typing test on code-like things, and my typing speed is much slower, around 45 wpm, although that's normally accelerated by an IDE. I started learning Colemak for about a day a few years ago, and then decided that it wouldn't actually benefit me over Dvorak, especially because vi keybindings are quite important. Is the big improvement that it leaves {} in their original place instead of the farther reach?
Comment · 5 years ago
As a full time developer, I'm sure my typing speed directly affects my productivity (probably between 80-100 wpm in Dvorak). There are a lot of times I'm typing at full speed for hours, aided by code auto-completion and vim macros, and since the program already exists in my head, the limiting factor is how fast I can type it out. Other times not so much, I'm sitting there reading code, or debugging line by line, or whatever. But when I'm ready to code, my typing speed is the single biggest factor of how fast I can get it out.
Comment · 5 years ago
I think I figured out what it is. I turned off web assembly in Firefox to reduce my attack surface for general web browsing (I wish I could turn off Javascript completely, but that doesn't really work these days, so NoScript is as close as I can come). I think Netflix must be the only site I actually care about that won't work without WASM, so I'm fine relegating it to a separate browser with a higher exposed surface that I never use for untrusted sites.
Comment · 5 years ago
Nope, I get Error Code F7701-1003. I have Wildvine enabled, and I tried completely disabling NoScript. It's easier to just use Chrome for that one thing than have to troubleshoot the problem.
Comment · 5 years ago
I cleared my cookies in Firefox for everything Costco related, and it works now. Thanks for pointing out that it works. No clue how it got in that state.
Comment · 5 years ago
The only two places I use Chrome are Netflix and Costco. Costco's behavior is just plain weird:

"Access Denied You don't have permission to access "http://www.costco.com/" on this server."

Is this from running NoScript? Or does it affect all Firefox users? (Also the URL is https://, not http://, so the error message doesn't match the URL).

Comment · 5 years ago
Maybe you can help enlighten me on this. I've been struggling to understand the basics thermodynamics of carbon capture for quite some time.

So we have a hydro-carbon, we mix it with oxygen, and the oxygen combines with the hydrogen and the carbon, and releases heat as a byproduct. The heat energy increases the pressure of the newly created CO2. This higher pressure is placed on one side of a turbine or a piston, and we extract useful work by moving it from a high density state to a low density state, causing it to cool in the process.

Now it seems like if you want to re-concentrate that CO2, it should take at least as much work to compress it back to its original size as it released when you burned it in the first place, and probably a lot more, because the CO2 has been diffused into the general atmosphere.

To state it more succinctly, we extract work through a pressure differential, and by reversing that pressure differential, won't that require more work than we got out in the first place by the second law of thermodynamics?

I ignored the part where part of the energy is coming from the hydrogen. Is the hydrogen -> water where most of the energy is coming from, and the carbon part relatively insignificant?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton