HNHacker News
TopNewBestAskShowJobs

WildUtah

5,164 karma · joined March 18, 2010

submissionscomments
WildUtah··on In Defense of C++
They're duals, actually

No, actually, they're not. Just try allocating a lot of looped structure RAM and see.

WildUtah··on In Defense of C++
Indeed, according to these "ref counting is gc" folks, free(void *) is a garbage collector, so C has always been garbage collected since 1970.
WildUtah··on In Defense of C++
Yes, except the canonical map is—surprising the users of other collection frameworks—an ordered, balanced tree. So std::map::find() is O(ln n) while std::unordered_map::find() is O(1).
WildUtah··on In Defense of C++
I still love 'with-open-file and its sisters in LISP. Get that resource in one line and it's guaranteed to be cleaned up right without ever thinking about it again. Then you have total freedom to use it however you want and the results destructure themselves.
WildUtah··on In Defense of C++
Steve Miller and Don Henley seem like such easygoing guys on stage. Surely the purists aren't so touchy.
WildUtah··on In Defense of C++
You can write a reference counter in three short lines of code that works the same as shared_ptr<T> or Swift. A modern automatic garbage collector requires a threading library plus tens of thousands of lines of intricate code. We're not comparing like with like here.
WildUtah··on In Defense of C++
Anyone can define a bat as a bird because it's an animal with wings that flies. But you'll soon find that isn't a useful conceptual distinction.
WildUtah··on In Defense of C++
Garbage collection could prove to be a dead end. Rust and Swift are prospering as the latest cool things because they don't have any. Decades from now we may be hearing about garbage collection as a vastly expensive experiment that simply didn't pan out.

The clever combination of declarative management for common cases and reference counting for complicated cases looks like the winner in the long run.

WildUtah··on In Defense of C++
Wish I could. The hours I've spent reading the formal committee proposals and specs would have been better spent on video games and junk food.

But there will be books, and good ones. Next year probably. The compilers aren't even ready yet.

WildUtah··on In Defense of C++
C++ type inference and first class lambdas and flexible typed tuples have made it possible to create a real useful type system into C++ programs now. It's quite pleasant.

But it robs a lot of much slower languages of their best value proposition. You can now do it all in C++ with correctness guarantees and still run 10x faster than most strong typed systems.

WildUtah··on In Defense of C++
Reference counting isn't garbage collection. It's the opposite of garbage collection. With reference counting, which is optional in C++ and can be opted out of in Swift, you keep track of your allocations and release them when you're done with them. With garbage collection an outside program decides when you're done with memory and deals with it for you on its terms.

It's true that there can be unlimited work done in reference counting. Of course, it's true there can be unlimited work in any function of any program. [0] With reference counting a programmer can fix the amount of work to be done and when in deterministic fashion. With garbage collection, there is no such power. The gc decides when it will work and you cannot control or predict the interruption.

You cannot produce serious interactive or time sensitive control software like that. You certainly can't write system software like that.

[0] https://en.wikipedia.org/wiki/Halting_problem

WildUtah··on In Defense of C++
C++14 (and higher) feels like coding in Go or Python.

C++17 is so full of good stuff I'm considering beta compilers just to get it. Soon Python and Ruby won't have any advantages left in writing beautiful, clear, correct, bug-free, and easy to read code and C++ will still run 200x faster.

WildUtah··on In Defense of C++
a lot of implementation leverage (e.g. garbage collection)

Putting garbage collection in that basket is controversial and lately the evidence is piling up against it.

Notice how new important growing languages like Swift and Rust don't have garbage collection and programmers don't miss it. GC is more and more restricted to low performance languages like Python, Javascript, and Ruby and a few specialized highly tuned and expensively engineered exceptions like the JVM and obscure LISP engines.

And if you've ever tried to program responsive, interactive, predictable, or time-critical systems, you know that GC is ruinous and awful for those applications. Meanwhile languages like Rust, Swift, and C++ can be used for everything from systems programming to games to low power mobile apps to scripting.

WildUtah··on Not Everyone in Tech Cheers the H-1B Visa Program
Trump won Ohio 51-43. If that swings all the way back into competitive territory, his re-election is doomed anyway. Just because a state is a swing state with a regular Republican (like Ohio or Colorado) doesn't mean it's a swing state when a very abnormal Republican like Trump is running.
WildUtah··on Ask HN: Why not introduce foreign Real Estate tax in California?
Why not?

The same reason everything in California is screwed up: Proposition 13 prohibits fixing it.

WildUtah··on Not Everyone in Tech Cheers the H-1B Visa Program
OH and CA aren't swing states.
WildUtah··on Not Everyone in Tech Cheers the H-1B Visa Program
Immigrants are less likely to get caught, not more law abiding. In my city we have persistent problems where crime victims won't report to the police because they're illegal just like the criminals.

That quickly adds up to lower crime statistics in illegal communities. It does not mean less crime in those communities.

In fact, it creates conditions for ongoing gang crime operations unchallenged in those communities.

WildUtah··on Not Everyone in Tech Cheers the H-1B Visa Program
Just given the timing of the business cycle, Trump is likely to face a recession or at least a stagnation by the time he's working on reelection in 2020. There's very little he can do about it now: Most economists believe it takes almost four years for fiscal policy to affect the business cycle and two years for monetary policy. And Trump won't be appointing his own Federal Reserve chairman to set monetary policy until 2018 at the earliest.

But Trump can take action that will open up jobs and raise wages for American workers even in the face of a recession. He can deport illegal aliens and cut off the H-1B and L cheap professional visa categories. That would create a lot of working class and lower-tier professional jobs for Americans fast.

WildUtah··on Not Everyone in Tech Cheers the H-1B Visa Program
No. Lots of people who haven't thought about the consequences for their nation or their families or who simply don't care agree with you.

It's especially common among young people that want to display their virtuous radicalism and who haven't ever really had to pay for the bad consequences of anyone's actions.

WildUtah··on How Unix erases things when you type a backspace while entering text
But try remapping C-w in bash. The tty remaps it on the very next line. You'll have to stty werase unmap it to be able to change it in your read line .inputrc.

So the tty cooking still has charge of some things.

WildUtah··on Using tmux properly
Put your dotfiles under version control. Open a repository for them on github. A complete personal install on a fresh box is just useradd and git clone away. Two commands to paradise.

Google dotfiles in git. It's easier than you think.

WildUtah··on Google must turn over foreign-stored emails pursuant to a warrant, court rules
If you start behaving like that, expect foreign governments/clients to ban/boycott american providers.

If it were a real concern to anyone, the EU countries would have simply used their big stick and started banning Google and Microsoft from doing business until they cleaned up their acts.

And they'd have done it years ago.

As long as it's the US government violating your privacy, those EU countries are perfectly happy to see their data privacy laws neutered.

WildUtah··on Google must turn over foreign-stored emails pursuant to a warrant, court rules
Neither is search and seizure about a possessory interest. It's about privacy and security. Even in the eighteenth century it was about "persons, papers, and effects." It was always an information security question.
WildUtah··on Tested: The truth behind the MacBook Pro's 'terrible' battery life
Apple sure is trying _really hard_ to get me to switch.

Yes. It sure doesn't look like Apple is going to relent on the silly touchbars, the $300 price bump you pay for the touchbars, the shrunken batteries, and ongoing trials they subject us to.

The only saving grace for them is that Dell XPS machines don't really cost much less. Similarly outfitted 15" units cost a couple hundred dollars less than Apple's. Pre-touchbar they'd actually cost more.

WildUtah··on Tested: The truth behind the MacBook Pro's 'terrible' battery life
I used to have a laptop with a built-in tiny hardware volume dial. It was hooked directly into the power to the amp and speakers so it worked instantly even if the machine was bogged down with loud busy autoplay video web sites or other awfulness.

I'd pay extra for another one like that.

WildUtah··on Tested: The truth behind the MacBook Pro's 'terrible' battery life
Surprisingly the virtual escape key hasn't bothered me as much as I thought it would, even in vim.

Put this

    ino kj <Esc>
in your .vimrc and instead of escape, just hit the j and k keys quickly to leave insert mode. It's a life changer.
WildUtah··on Why Silicon Valley Is So Nervous About H-1B Reform
Foreign doctors can't even get licenses to practice in the USA. That's how they prevent getting socked with H-1B floods and maintain the highest wages for doctors in the world.

Too bad engineers can't organize like that to protect ourselves.

WildUtah··on Why Silicon Valley Is So Nervous About H-1B Reform
70-80% of H-1Bs are migrant server coolie workers for ultra-cheap mass labor camp shops. The Silicon Valley companies see the entire quota eaten up by those el cheapo slave drivers.

With a real salary floor, the qualified engineers that serious companies want to import will find it much easier to obtain spots under the quota. The low wage cheaters will be cut out of the lottery and productive businesses will get those slots instead.

It's probably the best thing that could happen to companies that want to import actual qualified smart engineers from overseas.

WildUtah··on Incorporating a limited company in Germany
Imagine how nasty Amazon would be and how much money they would lose if they just blamed their users for bugs of that magnitude. That's how Europe's tax authorities are running their business.

And the USA isn't all that much better.

WildUtah··on Former Norway PM held at Washington airport over 2014 visit to Iran
Prime minister of tiny Norway is about as powerful and important as a small city mayor in the USA.

Do retired small city mayors travel in first class on diplomatic passports and expect to be free from customs and immigration rules that apply to everyone else? They do not.

He isn't a fairytale prince. When he loses his post, he can travel on legitimate documents like the rest of us.

← PreviousPage 4 of 34Next →