A simple method of measuring audio latency (2018) - <AUTHOR> http://blog.nirbheek.in/2018/04/a-simple-method-of-measuring-audio.html <comment><USER2> > So the simplest reliable implementation is to have only one wave traveling > down the pipeline at a time. If we send a wave out, say, once a second, we > can wait about one second for it to show up, and otherwise presume that it > was lost.

This is incidentally a problem also faced by radar systems: if more than one radar pulse is in flight at a time, it's not possible to uniquely distinguish an echo.

One solution is to not send single-frequency pulses, but instead send chirps ([https://en.wikipedia.org/wiki/Chirp](https://en.wikipedia.org/wiki/Chirp)). These pulses _can_ overlap, since the end of one pulse and the beginning of the next can be distinguished by their frequency components.

> But unlike network packets, we lose all context once the waves leave our > pipeline and we have no way of uniquely identifying each wave.

It would take additional processing, but this (which causes the above problem) could also be remedied by encoding real information (a sequence number) into the packet using ordinary signal modulation techniques.

</comment><comment><USER3> I've used jack_iodelay to do the exact same thing, and it works great.

More information on it and audio latency in general can be found in the Ardour manual here:

[http://manual.ardour.org/synchronization/latency-and- latency...](http://manual.ardour.org/synchronization/latency-and-latency- compensation/)

</comment><comment><USER4> Or you can put a microphone close to the speaker and measure the frequency of the generated tone.

<comment><USER5> While clever and elegant, this method does suffer from the flaw that all multiples of f=1/latency will also resonate.</comment></comment>


Dear HN: Please Fucking Hire Me To Do Anything - <AUTHOR> http://i.imgur.com/vB27cd2.jpg

<comment><USER2> "I'm good at communicating." Really? If I were your prospective employer, I'd be wondering just how often the f-bomb finds its way into your communications, and why you thought it was appropriate to drop twice in a job appeal. Please take this as a constructive criticism of your approach.

<comment><AUTHOR> An employer who thought the f-bomb in a hacker news post spoke poorly of my communicative abilities would not be my ideal employer.

</comment></comment><comment><USER3> "On the other hand, JPEG may not be as well suited for line drawings and other textual or iconic graphics, where the sharp contrasts between adjacent pixels can cause noticeable artifacts. Such images may be better saved in a lossless graphics format such as TIFF, GIF, PNG, or a raw image format. The JPEG standard actually includes a lossless coding mode, but that mode is not supported in most products."

[https://en.wikipedia.org/wiki/Jpeg](https://en.wikipedia.org/wiki/Jpeg)

<comment><AUTHOR> Yep, this is not the stuff I'm good at. Correct.

</comment></comment><comment><USER4> This is the wrong approach -- why not take a job as an ESL teacher (you won't find many people here hiring for that) by searching in the right channels?

<comment><AUTHOR> I'm looking for other jobs too. I can do lots of things.

<comment><USER4> Your ad seems to suggest desperation -- "I need cash right now." That's not a bad thing to say, but when you're in that situation you should be playing in your wheelhouse.

If you're not desperate, you should reword your ad to emphasize the fact that you're trying to broaden your search.

There's an incoherence in the message.

</comment></comment></comment><comment><USER5> I think you got balls for this posting, however I agree with ynoclo. Although the f-bomb is an attention getter it is also a turn off since you could have-- at the very least--used asterisks for an equally attention grabbing title and omitted it entirely from your profile.

</comment><comment><USER6> Do a startup translating Terms of Service documents (like fb needs to do) and other business related webpage stuff.

</comment><comment><USER7> do you have a visa?

<comment><USER8> redditor since 2 minutes ago. Oops, wrong community.

<comment><AUTHOR> Huh? Oh, the visa asking guy, not me, right?

<comment><USER9> He's referring to visaking (his username is green, meaning new)</comment></comment></comment></comment>


The anonymous Silicon Valley satire that has stumped tech world insiders - <AUTHOR> https://www.washingtonpost.com/news/morning-mix/wp/2015/12/02/the-anonymous-silicon-valley-satire-that-has-stumped-tech-world-insiders/ <comment><USER2> Self-referential, technology-focused and shaped texts like this make me wonder what the new, dominant school of thought will be for this generation's western literature.

Post-modernism [1] has been considered "dead" for about 10-15 years with no discernible movement coalescing to replace it. SV, entrepreneurship, and startup culture have had such a profound effect on the west that it would be hard for authors today to ignore the tropes and heroes of this movement, which is what these anonymous authors have addressed head on.

Will kids in high school 30 years from now still be reading Salinger, Vonnegut, McCarthy, Orwell, Heller, Faulkner, Steinbeck and other classics? Or will there be some literary movement borne out of SV culture to supplement these classic texts?

[1] [https://en.wikipedia.org/wiki/Post- postmodernism](https://en.wikipedia.org/wiki/Post-postmodernism)

<comment><USER3> > SV, entrepreneurship, and startup culture have had such a profound effect on > the west

Only in your tiny bubble. People seriously believe this?

<comment><USER4> The bubble exists, but it's ludicrous to believe that SV startups don't have profound effects outside it. What % of people use Google, or Facebook, or Android/iOS every day in the west?

<comment><USER5> I think it's important to differentiate between the effects the products these companies create have, and the effects the companies themselves have on world/US culture.

Clearly the products have had a profound impact on culture, but I think the impact would have been the same if they had been developed by Exxon or Halliburton.

As far as the cultural impact of the companies themselves, I think it's been modest at best.

<comment><USER4> > Clearly the products have had a profound impact on culture, but I think the > impact would have been the same if they had been developed by Exxon or > Halliburton.

But Exxon or Halliburton couldn't have developed these products. They wouldn't even try and fail to develop these kinds of products.

<comment><USER6> I think your missing the point. The idea is that it didn't really matter who made the product; it was the product itself that had the "profound impact on culture".

<comment><USER7> The product and the company that created it cannot be separated in terms of origination. The product required those specific inputs to exist. As such, it was the company that created the profound impact on the culture. To remove that connection is to pretend the product could have been created by any given corporation and corporate culture.

<comment><USER6> Maybe the difference is more subtle than I thought. The culture of a company like Google may be very tolerant and open, it may value self-actualization and support of individuality. This culture could be critical to the creation of Google products, like Search and GMail. It could even be said that products like Search and GMail could _only_ have been created by a company with the cultural values that Google possesses. Other organizations with different cultures may not even have been able to understand enough about how these products work to even try to produce them.

I believe the question is: "Do the cultural values of a company like Google impact the values (or culture) of their customers through their use of Google's products?"

I would argue that no, they do not. People want to find out where they can buy the cheapest dog food or recipes for something they need to cook. For sure, Google's may present articles that they might not otherwise see, but that's as far as I believe this goes; this other content need not be consistent with Google's values (very often it isn't). Ditto with GMail, I wouldn't think the culture of Google, as expressed through GMail, will make much of an impact on their customers at large.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I bought the kindle edition and I don't get the hype about this book at all. First of all it's barely a book, it's not even a novella, it's pretty much zine length. It's a 10-15 min read. I'm thinking I made a mistake in getting the electronic version since the charm seems to be in the physicality of it. There is some cleverness in the story but it's so brief that the real phenomenon here is not poignant satire, instead it's how the zine was delivered to its initial recipients and that it got their attention in the first place.

<comment><USER9> I'm surprised you felt that way. I only read the (linked) introduction so far and I was bent over laughing. The story, punctuated by the tweets, is _hysterical_. I don't see how the length ( _Candide_ was also short) or physicality of it matters. I find that it is, indeed, poignant satire, and that is enough for me.

<comment><USER8> Most of the story and the best jokes are in the articles about the book and the included text.

<comment><USER9> I remember once, years ago, a member of a 70's band (Jethro Tull?) being asked if he watched MTV. When he replied, "Yes," the commentator remarked that he was surprised that this person liked that music. The band member's eyes widened in horror and said, "I watch the news. That doesn't mean I like what I see."

I guess I love the book for the same reason that I hate HN, despite that I check it daily. Silicon Valley has had tremendous success financially, if not technically, and that has spawned with it a strange micro-culture that is easy to skewer when you take just a few steps away from it.

<comment><USER8> I didn't say the skewering was the problem. The book barely scratched the surface of the material that's out there.

</comment></comment></comment></comment></comment><comment><USER10> From the headline, I thought this was going to be a piece about who runs @StartupLJackson

<comment><USER11> I'm pretty sure there are a wide number of people who know who SLJ is.

<comment><USER12> .. _large_ number of people..

<comment><USER11> You're right. Shoot.

</comment></comment></comment></comment><comment><USER13> Got a good laugh at this: "When it comes to any sort of stunt that gets a lot of attention on social media, all roads lead back to Taco Bell or Mountain Dew."

</comment><comment><USER14> from the text: "Crooks never tweeted. He never retweeted. But he had developed his own, impassioned way of favoriting."

This is great.

</comment><comment><USER15> "We were promised flying cars and all we got was 140 characters"

Peter Thiel

I bet in Peter to be one of the authors of the book.

<comment><USER11> There are a lot of quotes in there from a ton of people. I'm actually in there, and I'm neither famous nor do I know who put the book out.

<comment><USER16> I read on your blog that you were getting off HN. Glad to see that's not true.

<comment><USER11> I'm trying to get off HN like it's an abusive significant other. I don't know why, and I don't think it's healthy, but somehow I keep coming back for more.

<comment><USER17> We're sorry. We didn't mean to take your productivity out to the back and throw it under the lawnmower. Twice. Can't you procrastinate with us, just a little, please, for old times sake? It'll only take a minute. You can stay for a minute, right?

Hey, did you see there's a new release of Dwarf Fortress out? You should look at some of the engineering behind the B-29 cannon system. Isn't it interesting how the human body responds to long-term microgravity? How would you like to buy a South Dakota hamlet? Do you think malware could effectively exploit any flaws in multiprocessor computing?

<comment><USER18> that made my day. really.

</comment></comment></comment></comment></comment></comment><comment><USER19> This is off topic, but why is WaPost only giving me 30% of my screen in which to view the article: [http://i.imgur.com/QwnLoIh.png](http://i.imgur.com/QwnLoIh.png)

I sometimes wish these news publications would just use Medium or similar blogging platforms.

<comment><USER11> The rest of the page is ads. I presume you have adblocker turned on.

<comment><USER20> And publishers are surprised we use ad blockers...

</comment></comment></comment><comment><USER21> I know who wrote it... Hint: He was very active on HN on Feb/2015!

<comment><USER22> > He was very active on HN on Feb/2015!

Hence the inspiration.

</comment></comment><comment><USER23> Some think this might be why the lucky stiff.

[https://twitter.com/leahculver/status/671713994441293824](https://twitter.com/leahculver/status/671713994441293824)

<comment><USER24> It doesn't _not_ seem like something _why would do.

</comment></comment><comment><USER25> All I can think of when reading this is to ask myself whether or not the work that I do is good for my mental stability.

</comment><comment><USER26> This reminds me a little of "Being or Nothingness" by _Joe K_ (hehe) [http://lukemuehlhauser.com/the-riddle-of-being-or- nothingnes...](http://lukemuehlhauser.com/the-riddle-of-being-or-nothingness)

<comment><USER27> Joe K's _BorN_ is a great read. Love Hofstadter's quote on the matter:

"People who are normal, i.e., sane, sensible, don't try to open lines of communication with total strangers by writing them a series of disjointed, weird, cryptic messages."

</comment></comment><comment><USER28> This was a really great essay, very funny. Before I jump in with the rest of you claiming "sv echo chamber", I'd like to point out that these tweets can be made to look like asshats and can be made out to be inspirational and telling of a the silicon valley mind set. These are the bourgeoisie that are looking for that perfect work/life balance and want to see future push forward, though usually by building really simple technologies. They have the opportunity to become senile or play with philosophy because they are doing everything in the power to bet big.

As much as this essay shows how alien their world is to my own, it also shows what successful marketing/operations people think about while pushing for success.

</comment><comment><USER29> >> that has stumped tech world insiders

... and bored anyone not in the SV echo chamber.

</comment><comment><USER30> Another discussion about the piece: [https://news.ycombinator.com/item?id=10652145](https://news.ycombinator.com/item?id=10652145)

</comment><comment><USER31> Yawn. Just more Millennial narcissism.

<comment><USER32> In the tweets?

</comment></comment><comment><USER33> There are quite a few young founders getting trampled to death by llamas (users) after being (easily) influenced by tweets (and essays...) from thought-leaders.

</comment><comment><USER34> So if there are really only 140 copies, how long until the book is put online?

<comment><USER35> It links to a copy in the article: [https://fusiondotnet.files.wordpress.com/2015/06/iterating-g...](https://fusiondotnet.files.wordpress.com/2015/06/iterating- grace_digitized_small.pdf)

<comment><USER36> The article also notes that the essay has been picked up by a publisher (now available on Amazon for $5 - $8), so I presume this copy is not authorized.</comment></comment></comment>


Lawsuit: Apple turned iPhone 3Gs into "iBricks" to boost iPhone 4 - <AUTHOR> http://arstechnica.com/apple/news/2010/11/lawsuit-apple-turned-iphone-3gs-into-ibricks-to-boost-iphone-4.ars

<comment><USER2> Yup, 4.0 sucked for the 3G. Kind of appalling QA for a company like Apple to let that slip out. The 3G at that point was two generations behind, seemingly giving Apple no large incentive to fix the performance problems.

But you know what? _They did anyway._. The 4.1 release made these phones (including mine) usable again. I still think they screwed up badly, but I give them props for fixing the problem reasonably quickly when there were clear incentives for not doing so.

<comment><USER3> 4.1 made it better but definitely does not completely fix the problem. My 3G iPhone is still significantly slower than it was pre iOS4.

<comment><USER4> Can someone sue Microsoft for slowing my computer with Windows 7? They don't provide any easy tools to downgrade and preserve my data... It's almost like they want me to but a new computer with Windows 7 -- another duplicated license to what I already own.

<comment><USER5> I don't think that is a fair comparison. Going out of your way to buy a new version of Windows (which has clear hardware requirements) and slapping it on old hardware is much different than syncing your phone and following directions for a standard upgrade.

<comment><USER6> Windows performance can suck on hardware well above the "minimum system requirements", and this has taught most computer users to know that new features come at a price.

Mac OS X's trend of new releases being faster on the same hardware is a shockingly rare exception to the norm, and due to Apple's habit of releasing features before they're optimized. (The whole Quartz system took several releases to get up to acceptable performance, and Spotlight also made very significant gains after the initial release.)

<comment><USER4> Obviously they weren't taught well enough to know that iOS 4 would slow things down, too :/.

</comment></comment></comment></comment></comment></comment><comment><USER7> Good luck to her proving malice. Claiming that the product isn't fit for purpose would seem to be pretty straight forward but I'm not sure how she's going to prove that they did it intentionally to increase iPhone 4 sales.

<comment><USER8> Considering they have to prove it was unsuitable for purpose and intent I would expect just proving unsuitably for purpose is their fall back position.

<comment><USER7> I'm not sure fall backs work that well in law. In some cases the fact you failed to make one argument undermines your overall position. I think generally you're better off focusing on what you can prove.

</comment></comment></comment><comment><USER9> Apple had two choices: release iOS4 for 3G and let it run slowly, or require 3GS+ to run iOS4. They went with the first option. My bet is that if they'd gone with the second, she would have sued them for obsoleting her 3G too quickly.

<comment><USER10> Those weren't their only two choices, since iOS 4.1 fixed the performance problems with the 3G. (Not that this suit has any merit, especially in light of that.)

<comment><USER11> If they needed time to fix those problems, then this would delay release of iOS4 and iPhone 4.

</comment></comment></comment><comment><USER12> Does Apple come across as a company that needs to resort to such tactics to force people to buy new phones? They build better devices (faster, more memory, better battery) that in themselves are enough to entice users to upgrade if they desire. The accusations of this lawsuit are honestly more likely of cell carriers (here's looking at you, Verizon).

<comment><USER13> Yes. I mean, the term "resort" is pretty pejorative, but having worked with Apple products in both the design (video/audio composition and editing) and education (5,000+ UG), Apple's 'planned obsolescence' is pretty devastating. The two ready-to-hand examples:

LogicPro - the migration from a dongle-based system to a non-dongle system was an utter nightmare where some people were able to maintain their old license and pay the upgrade price while others couldn't.

PPC -> Intel - the migration in driver architecture was a nightmare across the entire Apple ecosystem. "Better/faster/just works" did not apply here at all. As a classic example: the version of Final Cut released shortly after the architecture switch was unable to run natively on Intel. Shortly after the Universal Binary version was released, Apple broke compatibility with After Effects plugins and instead replaced it with FxPlugin and once again caused a huge disruption.

So yes, it does in fact seem like the sort of thing Apple would do.

<comment><USER14> For an overwhelming majority of applications out there, it really was just "recompile and it works" or even using Rosetta for the interim, until the developer got around to it. Apple even created a script that automatically converted scalar types into an architecture-safe equivalent (int -> NSInteger, for example).

Final Cut, Adobe CS and a few other major products are the exception to the migration, not the rule. I've spoken to people who used to work on Final Cut. It has one of the largest codebases that I've ever heard of. Plus, Final Cut wasn't done in Objective-C and Cocoa. It is a C++ application with a completely custom UI, done by Macromedia over a decade ago. Its not even a full 64-bit application yet.

</comment></comment></comment><comment><USER10> The performance problems affected the older models of iPod touch, too, didn't they? And the updated iPod touch (with retina display/camera/etc) wasn't out then, so it's clear Apple wasn't pushing people to upgrade to the brand new model in that case. Besides, the performance problems were cleared up with iOS 4.1.

</comment><comment><USER15> People would have been so miffed if they would have told them iOS 4 wasn't available for the 3G.

"OMG, they are forcing us to upgrade!"

What would they have them do? Send out free (better) hardware everytime they update iOS in a major way? That just doesn't seem right.

<comment><USER16> People would have been miffed, and left with a iPhone that still worked (just like owners of the first generation iPhone).

</comment></comment><comment><USER17> Just curious what kind of damages is Ms Wofford is able to get from such lawsuit if she wins? an iPhone 4 or millions? The lawyer costs more than an iPhone 4 right?

<comment><USER18> Based on the outcome of the scratched nano lawsuit, it should go something like this:

All iPhone 3 owners will get a $10 Apple store credit.

The lawyers will get about $10 million in cash.

Ms. Wofford, as the lead plaintiff, will get a bonus of about $10k in cash.

<comment><USER19> This plus the Buzz case really underlines how broken the class action tort system is. "Hey, we're the lawyers, we work for you, that's why we get ten million and you get ten thousand, and if you don't like it we'll go work for someone else."

</comment></comment></comment><comment><USER20> I was using my 3G until 2 weeks ago running iOS 4. Not the best experience early on with 4.0 but it got quite a bit better with subsequent releases.

</comment><comment><USER5> I'll admit, I upgraded my 3G to the 4 because of how uselessly slow it was. I wonder if I can get a piece of the class action?

</comment><comment><USER21> I don't think this really has any ground. It's not like you were forced to upgrade to iOS 4.

<comment><USER22> The upgrade is practically automatic. iTunes nags you every time you plug in an out-of-date iPhone and only requires a single click. That and the jump from 3.3.1 to 4.x is an absolute night-and-day _excruciating_ difference in speed and usability.

<comment><USER23> Only the jump to 4.0 is excruciating; 4.1's performance is on-par with 3.1.3

<comment><USER5> It merely helped in my situation. If 3.1.3 ran at 100%, 4.0 ran at 40-50% and 4.1 bumped it back up to 60-70% at best (in my experience).</comment></comment></comment></comment>


Shed Skin: An experimental (restricted) Python-to-C++ compiler - <AUTHOR> http://code.google.com/p/shedskin/

<comment><USER2> Sounds like an interesting project. I wonder, however, if writing code in this subset of python is better than directly using a compiled, statically typed language.

The subset is just so tiny. No _a and_ *k, no nested functions. Most decorators won't work either.

<comment><USER3> If you're concerned about the loss of expressiveness, a related project to look into is RPython, which afaik allows you to program in a less restricted subset of Python and still compile down to efficient C code. When writing in RPython, you break your program down into 2 phases:

1.) An initialization phase which is PURE Python, so you can do all the dynamic/introspective/metaprogramming magic you want

2.) A main phase which is a restricted static subset of Python, which is much more Java/C#-like

Here's an abstract and paper about it: [http://www.disi.unige.it/person/AnconaD/papers/Recent_abstra...](http://www.disi.unige.it/person/AnconaD/papers/Recent_abstracts.html#AACM- DLS07)

</comment></comment><comment><USER4> It is interesting to see how the author handle memory management issue.</comment>


Ask PG: Delay YC app deadline ~1 day for NorthEast weather? - <AUTHOR>

Many without power in NYC and elsewhere in the north east, would be great to have an extra day or two to submit apps to avoid having to scramble for cell service, etc, find a way to submit by tomorrows deadline. Would definitely be appreciated by many I believe. <comment><USER2> It's being considered: <http://news.ycombinator.com/item?id=4715829></comment>


Rust 1.40 - mark-simulacrum https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html <comment><AUTHOR> The continuing improvements to procedural macros are great!

I do a fair amount of integration with C, and the work the rust team is doing for procedural macros has helped _a lot_. Being able to use them in an extern blocks will surely help more.

Like many, I have a wish list that I complain about sometimes, but I feel bad about complaining because rust has done so much to improve my use case I don't know where to begin. I should write up a blog post about all of the difficulty I had, and how each release since around 1.28 has introduced features that solved these problems one by one.

To me, Rust/C interop is the killer feature. Not only is it a low-level language that can be used instead of C, it can also be used to _extend_ C applications. I'm sure it was not easy to do this well, but what a great strategic decision by the rust team to spend the effort on it!

<comment><USER2> Can you recommend any good blog or tutorial on integrating C/Python and newer releases of Rust?

<comment><AUTHOR> I didn't use much except for the official docs (book and reference). Googling around shows some promising material.

Release notes are helpful -- when you see something added related to C, it's a strong hint to read about the new feature.

Macro features are important because rust has sophisticated macros and C macros are closer to text replacement. So when trying to emulate a C header, you need to do a lot of macro magic in rust sometimes.

Sorry that I don't have more to offer from personal experience.

</comment></comment></comment><comment><USER3> Using #[non_exhaustive] on enums is going to be general bad practice, just as many in c++ consider 'default' switch cases bad practice.

When a new state is added to an enum, we _want_ the code to not compile so that we can fix all the places that need updating.

<comment><USER4> That is why there are two versions available. The default matches the behavior you describe and is the default because for small projects it is the right decision.

However sometimes you are a dependency and you want to give up this restriction to gain the ability to add things without having to bump your major version number.

By far the most common example is error enums which don't necessarily need all of their downstream crates to handle every error, they likely are bucketing most of them anyway and non_exhaustive ensures they support that.

<comment><USER5> Since the developer of a library has no insight into my application, they have no idea how important an exhaustive match is or isn't in any given piece of code I'm writing.

This is a decision library users should be making, not library writers.

<comment><USER6> It seems like the main issue is consent. If you're using a library in a way the author didn't agree to, that's fine, but you don't get any guarantee it will keep working after an upgrade.

If you want to do that, you could edit your own copy of the library's source code and nobody will mind. Maybe that's enough?

It seems like you shouldn't be able to publish a crate where you're using an upstream library in a way they don't consent to, because now you're involving others in this dispute. A basic requirement for publishing to a shared open source ecosystem should be that you're resolving any disputes you have with upstream libraries and not just going your own way.

</comment></comment></comment></comment><comment><USER7> I don't personally use Rust (yet) but I love seeing its progress!

Congrats to everyone who has been contributing to Rust, it's definitely moving the language forward!

<comment><USER8> There hasn't been a single Rust job posting in the entire region of Denmark where I live in 2019, so it's probably fair to say that almost no one uses it.

The progress is still cool though.

<comment><USER9> The main reason is many companies have a lot of C/C++ devs or other devs learned Rust, so they don't have to hire new Rust programmer. There are many places using Rust, you should check this out: [https://www.rust- lang.org/production/users](https://www.rust-lang.org/production/users)

<comment><USER10> The above is also certainly non-exhaustive. Google isn't on the list, and they are using rust in fuchia.

<comment><USER11>
        #[non_exhaustive]
        https://www.rust-lang.org/production/users

There you go.

<comment><USER10> lmao

</comment></comment></comment></comment></comment></comment><comment><USER12> The #[non_exhaustive] feature makes me unreasonably happy. It is a problem I hadn't even realized might occur, and the solution is very elegant, forcing depending code to be sufficiently general.

<comment><USER13> For enums at least, I'm not recommending it's use (yet), as with _Nonexhaustive you can make sure you caught all cases internally. Matching on _Nonexhaustive as a _user_ of the library is of course a bad idea. There've been proposals to a lint like #[deny(reachable)] to make such checks possible for #[non_exhaustive] as well but it seems that nothing has happened yet: [https://github.com/rust- lang/rust/issues/44109#issuecomment-...](https://github.com/rust- lang/rust/issues/44109#issuecomment-521781237)

<comment><USER14> _> For enums at least, I'm not recommending it's use (yet), as with _Nonexhaustive you can make sure you caught all cases internally._

I don't think this is necessary. The attribute in question is applied to an enum variant, and that variant's constructor is then given only crate-wide visibility. This looks to be simply a compiler-enforced codification of the pattern you're describing.

<comment><USER13> It can both be applied to enum variants as well as to entire enums. I meant the latter case. From the release announcement:

> A perhaps more important aspect of #[non_exhaustive] is that it can also be > attached to enums themselves. An example, taken from the standard library, > is Ordering

For example, take this _Nonexhaustive enum case here: [https://github.com/est31/rcgen/blob/d6b84d3d9d51b088dd672975...](https://github.com/est31/rcgen/blob/d6b84d3d9d51b088dd672975e68dcbcc286e347a/src/lib.rs#L172)

A little bit further down, I'm matching on the enum in the to_oid function. I'd prefer if I got an error or at least a warning pointing to the match if I added a new enum case and didn't update the match statement.

<comment><USER15> non_exhaustive only affects downstream code, within the crate you can still treat it exhaustively. For example in this playground[0] if you build in test mode the match works inside the crate, but fails in the doc-test because that is treated as external code.

[0]: [https://play.rust- lang.org/?version=stable&mode=debug&editio...](https://play.rust- lang.org/?version=stable&mode=debug&edition=2018&gist=6ab1c7f5a94ca85915b114f97246b170)

<comment><USER13> Oh that's an interesting point, I didn't know that. I guess I'll use #[non_exhaustive] then after all.

</comment></comment></comment></comment></comment></comment><comment><USER16> Wonderful! Any further news on evolution of the Rust Language Server? I'm still hoping ~Santa~ Annual Gift Man will bring me a considerably crisper, more accurate IDE-like experience to my favourite non-Intellij editor.

<comment><USER17> Have you seen rust-analyzer? That's effectively it.

<comment><USER16> No I don't think I was aware of this. I've been playing with VSCode -> RLS Plugin -> RLS. It looks like this is not that, so I'm pretty excited to check it out.

Thanks for sharing!

<comment><USER18> Unfortunately you still have to compile it from source instead of install an extension from the store, and there's no autoupdate.

But the experience is vastly better. I deleted RLS immediately. And it's not that hard to install either.

<comment><USER19> Analyser runs at 400% cpu constantly for me.

<comment><USER20> Have you tried a recent build? They fixed a few issues around cpu usage over the past few months

</comment></comment></comment></comment></comment></comment><comment><USER21> I'm a little confused by the decision to make breaking changes to the borrow checker in Rust 2015. Wasn't the whole point of Rust 2015 to allow old code that wasn't compatible with 2018's changes to compile? If keeping strict Rust 2015 source-compatibility was too burdensome for the compiler maintainers, why not just remove Rust 2015 entirely and tell everyone to use the auto-upgrader tools?

<comment><USER17> The only reason that breaking changes were allowed to be made was that they fixed soundness issues.

<comment><USER14> To elaborate, the original borrow checker that launched with Rust 1.0 had edge cases that could only be resolved with a drastically different analysis pipeline. As a result, it wasn't able to properly reject some patterns that were disallowed by the conceptual model. Over the course of several years this new analysis pipeline was developed and the borrow checker was rewritten to use it, which now properly rejects these patterns. But three years is plenty of time for code in the wild to begin relying on edge cases, so there's been a year-long deprecation cycle to warn anyone who might not have updated their code by now.

<comment><USER21> Right, I guess I had it in my head that the Rust 2015-vs-2018 divide _was that deprecation cycle_.

<comment><USER14> The difference between Rust 2015 and 2018 is less than most people think. Originally, yes, Rust 2018 was used to push the new borrow checker without affecting code using Rust 2015. But unlike a "version" that gets deprecated and left behind, a Rust edition perpetually continues to be supported and benefit from improvements with every compiler release. But this means that in order to support different borrow checkers in different editions the compiler had to continue to ship with both borrow checkers, which, considering how much code that is and the aforementioned bugs, was an intractable proposition in the long term.

</comment></comment></comment></comment></comment><comment><USER22> Woah, todo! is going to come in handy considering the wordiness of unimplemented!. However, weirdly enough, the documentation claims it has been stabilized in 1.39. Why is that?

<comment><USER17> It's just a bug. Would you like to file one or would you like me to?

<comment><USER22> I'll send a PR, one moment.

<comment><USER17> Awesome, thanks!

</comment></comment></comment></comment><comment><USER23> I like the IDEA but the implementation is not the good one.

Instead, this is what will be elegant:

        pub enum SearchOption {
            Left,
            Full,
        }

        pub enum SearchOptionBeta:SearchOption {
            Rigth,
        }

Yep, extending struct and enums.

This mean MATCH touch "SearchOption" as the "stable" API and the inner crate touch SearchOptionBeta. When SearchOptionBeta need magic is that it match SearchOption too. Later is just a matter of replace one for the other.

And this is even useful for more than to stabilize certain fields or arms...

<comment><USER24> I'd personally do this:

      pub enum SearchOption {
          Left,
          Full,
          Beta(SearchOptionBeta),
      }

      #[non_exhaustive]
      pub enum SearchOptionBeta {
          Right
      }

<comment><USER23> Yeah, this is how could be done with this, but also show why is a poor abstraction.

If enums were abled to be extended:

      match e: SearchOptionBeta {
       SearchOptionBeta:: Left, Rigth, Full
      }

</comment></comment></comment><comment><USER25> Can somebody elaborate on the #[non_exhaustive] use case inside a private struct? Wouldn't a separate crate not be able to use the struct if it was in another crate?

<comment><USER26> The point is that the struct is public, _and_ the fields are public, but users of the crate cannot directly _create_ a new instance of the struct (without going through a function call in the module). This allows users to access the struct fields, but they cannot do any operations that would break if a new field is introduced.

</comment></comment><comment><USER27> let x = Bar::Variant { a: 42 }; //~ ERROR

Of course it's an error, as Bar doesn't have a field called ,,a''

<comment> mark-simulacrum Thanks for pointing this out! Unfortunately, unlike most of our docs we don't yet have testing in place for the code examples on the blog. I've just pushed up a fix though so once that propagates this should be fixed.

</comment></comment><comment><USER28> Can you cross compile for another platform?

<comment><USER29> Yes: [https://github.com/rust-embedded/cross](https://github.com/rust- embedded/cross)</comment></comment>


Thinking of creating or joining a startup? Run through this questionnaire first. - <AUTHOR> https://docs.google.com/document/d/1fr8G26eBfqcZKpoQ27MLfKIIcSqspK5QObOOQD1XgCk/edit

<comment><AUTHOR> This youtube video digs into the questions a bit more. <http://youtu.be/AEZejqNNV00>.</comment>


Why Teach Programming with BASIC - <AUTHOR> http://www.kickstarter.com/projects/1319327833/clubcompy-kids-heart-computers/posts/46045 <comment><USER2> I learned to program with BASIC when I was young, but can't imagine why I would teach someone to program using BASIC when Python is available as an alternative.

<comment><USER3> If your goal is doing something practical with the machine, Python is certainly a better choice than BASIC. On the other hand, from an educational standpoint, BASIC shares an important trait with Pascal: It doesn't do much out of the box. In BASIC you have to do some work to extract the minimum element of a list, swap two numbers, maintain a resizable array and any number of other trivial "algorithms" that Python's language features and libraries provide. Is it so hard to see that more sophisticated languages can take away opportunities to learn the fundamentals from scratch and gain an intuitive grasp of algorithm design?

<comment><USER4> The problem is, without a lot out of the box, kids just aren't going to stay interested.

HELLO THERE

HELLO THERE

HELLO THERE

HELLO THERE

HELLO THERE

HELLO THERE

^C

just isn't interesting anymore.

Simplicity is important, but you should be able to do complex things in a simple manner. At least, that's the approach that I'm taking with Hackety.

<comment><USER5> I don't think you need to worry about that. I had played entertaining video games before I started programming, and never produced anything of similar quality. None of the games I made came anywhere close to resembling the glitz and glamor of the media or video games I loved. It's easy to look back at the 1980s and see nothing but drabness, and conclude that programming provided a competitive entertainment experience, but that's not what it was like at the time. Sometimes I'd borrow a new game disk from somebody, boot from the 5.25" floppy, and the graphics would _blow me away_. Nothing like the crappy graphics I could make. I wrote programs to solve math programs, generate mathematical patterns on the screen, quiz me on my schoolwork, and do simple text-based games that were already lame by the previous decade's standards. Unless you were truly exceptional, the games you wrote for yourself did not compare at all with the excitement of games you could buy for a PC or an Apple II, and even the truly exceptional kids who created entertaining video games had to be willing to slog through hours of hard, unglamorous work. Kids today who expect programming to be entertaining the same way movies and video games are entertaining will do exactly what those kids did in the eighties: turn up their nose at programming and do something else. Kids who enjoy programming will program.

<comment><USER4> I'm right there with you man. That was me, too. My first computer experience was Adventure, and I basically made text adventures for the first few years I was programming.

That said, Pong in Shoes is 50 lines. It's pretty simple, and gives you an actual game. I wrote the basics of a SNS era RPG, and it was around 300 or so. I don't think this is a bad thing.

</comment></comment></comment></comment></comment><comment><USER6> "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." ~Edsger W. Dijkstra

<comment><USER7> I learned with BASIC back in the early 90s when I was still very young.

Dijkstra was right :(

<comment><USER8> I learned BASIC on an Apple II+ and I don't think Dijkstra was right on that one. It's really a different path than the one Dijkstra endorses, but it's not more or less wrong than any other.

</comment></comment></comment><comment><USER9> What could they possibly need $25K for? As far as I can tell, all it is is a web app + a magazine/book.

<comment><USER10> $25k is 500 one-year subscriptions. That's the point at which the printed magazine makes economic sense.

</comment></comment><comment><USER11> _This project will only be funded if at least $25,000 is pledged by Wednesday Dec 29, 6:19am EST_

At only $815 so far, they have a long way to go in half a day

<comment><USER10> That's okay--we're willing to revise our strategy. If the Kickstarter approach doesn't work, we'll try something else.

</comment></comment><comment><USER12> BASIC on the Apple II was my first programming language and I loved it at the time. Once my kids are a little older, I'm going to start with Ruby. One thing that was very helpful learning basic on the old Apple was that you could use the command line to examine variables and also program on the fly. This is similar to Ruby's IRB. Being able to tinker with a program without having to compile first is very instructive and most of all fun!</comment>


Ask HN: How to Handle Failed Startup on Resume/Interviews?  - <AUTHOR>

My startup failed to attract investment capital, and I'll be back in the job market. How have you handled explaining a failed venture on your resume, as well as during the interview process? <comment><USER2> You have a finished product that you released to the public. That's further than most ever get and shouldn't be considered a "failed" startup. Display it proudly.

</comment><comment><USER3> Just be honest in the interview. If it failed, say that it failed. Admitting you are lacking in some aspects doesn't sound bad at all.

You might or might not put that into your resume.

<comment><USER4> I would put any factual evidence of skills / experience gained into your resume, the fact that it succeeded or failed is irrelevant and should be left out and brought up in the interview as required.

</comment></comment><comment><USER5> Say you failed, but what you learned for the experience.. Recruiters don't really care what you did, but how you did and what you learned for it.

</comment><comment><USER6> This may sound a little counter-intuitive, but failed startups are great! Going through the process of failing is one of the most valuable learning experiences, and employers recognize that. Be honest when discussing it. Talk about the mistakes you made, what you learned, and how it's made you a better engineer.

</comment><comment><USER7> Focus on whatever positive things came from that experience and how those things can benefit a potential employer.

<comment><USER8> I echo this statement. Don't forget to specifically identify experiences from your start-up that are applicable to the job you're applying for (sales, project management, coding, etc).

</comment></comment><comment><USER9> You should be proud on your start-up. A startup experience may have exposed you to all aspects of a project workflow and not just limited to technical/design sight of it. Let your interviewer know those points and it could work well in your favour.</comment>


Over-engineering is under-engineering - <AUTHOR> https://www.baldurbjarnason.com/notes/under-engineering-websites/ <comment><USER3> There's just a generalized lack of understanding about web technology among web developers. I don't think many web developers even pay attention to browser features until they are popularized by some new framework.

Frontend developers are bad, but backend developers are guilty too. While frontend developers are breaking scrolling and the back button, backend developers are busy breaking authentication, security, and caching.

I think the only solution is to form some kind of developer's association dedicated to training and best practices. I hesitate to say "union," because the problem of over-under-engineering could be our fault, not necessarily our employers' (although pressuring new grads to deliver code at the same pace as their peers may contribute). It would be great if there were more bootcamps that just trained frontend devs on the latest HTML, CSS, and plain Javascript before WASM and React abstract the frontend away entirely.

<comment><USER4> >training and best practices <...> the problem of over-under-engineering

That's what you have to have once you throw a bunch of tools, planks and screws at first graders and let them go. In my 20s I used few local enterprise solutions to help local micro-businesses do their accounting. The base system was obviously dumb and too restrictive to create "apps (tm)", but it did its job very well. One specific thing about it was that it was infinitely hard (read: know C++/COM _and_ be able to investigate platform issues) to create extensions for it and/or manipulate basic blocks like you can do with web trinity. The result is that no one went that long route of dominating the market with shady solutions that have value from non-tech faces, but are technically crap.

Seeing what some devs could do even in these conditions, I can tell that it was a good state of things for the tasks that platform meant to solve.

I may seem jump on topics on this one, but to not write a poem, look: Perl's tmtowtdi is highly criticized, but what web allows is a "there are infinite ways to do it" paradigm with no basic blocks or "best practices" like you name it.

Summed up: if you're writing apps that do edit objects, there is no room for custom element offsets, scroll handlers, sql statements (except select for few cases) and knowledge of http cookies, headers, urls, etc. If you can't define a datascheme with two clicks, draw a form layout by hand and write final logic after 5 minutes, deploying in half a hour, without caring what platforms/databases/browsers/ languages/frameworks/backups/ maintenance/ides do you choose, then there is no room for business or app logic in your head.

>the latest HTML, CSS, and plain Javascript

Today it is like chasing specifics of plain 80386 assembly — the knowledge that ages faster than you can read on it from zero to top professional experience. If things didn't get better in a decade, then it is a dead end. Plank, screw and hammer problem never gets old.

<comment><USER5> Excellent comment. The way we program for the web is ridiculous currently: the abstraction level is way too low.

> Today it is like chasing specifics of plain 80386 assembly

I suspect the fetishization of the unholy Web trinity (HTML/CSS/JS) is impacting the ability of devs to imagine a better workflow. Case in point: Electron. Rather than take some of the lessons learned from the web stack, such as immediate mode UI being a decent default, they just crammed _all_ of it into a Chromium shell and declared it The New Way To Write Desktop Apps.

If the web is your first platform you've spent a lot of time on, then what I'm writing will probably just sound grumpy. And part of it is! But, on the other hand, when something new comes along, it may render all of your intimate JS knowledge useless because it isn't JS, and you need to be able to let that knowledge go. Even if the web as a platform sticks around, history shows that whatever comes next might be less powerful than using raw HTML/CSS/JS, but it doesn't really matter for getting most things done.

<comment><USER6> > whatever comes next might be less powerful

So webassembly doesn't come next?

<comment><USER5> Whatever comes next may not afford all the little nitty-gritty things you can do via HTML/CSS/JS. Imagine a VB for the web that hides that stuff in a better conceptual model: you lose the ability to do some things (potentially) but get the ability to do other things more easily.

</comment></comment></comment></comment></comment><comment><USER7> I don't know if I'm making this up, but doesn't overengineering classically refer to the engineering practice of having wide safety margins or "unnecessarily" high performance?

Like, making the bridge twice as strong as it should need to be, or making the car faster than it's wise to go.

That's different from typical software overengineering, which usually doesn't make the product measurably better, just more complicated.

<comment><USER8> They are fundamentally the same thing.

A bridge built to be twice as strong is measurably better in the sense that it is stronger, yet no better in the sense that it doesn't achieve its purpose any better. Yet, to make it stronger will involve complicating the design (having a bridge that is twice as strong out of coincidence is just luck - <USER2> over engineering).

Comparatively, reimplementing form fields is better in the sense that the experience is more customizable. However, it is no better in the sense that it doesn't actually help the user fill out a form any easier. Again, the over engineering adds complexity.

In both cases, the added complexity has costs which would have been best avoided altogether.

<comment><USER9> Yes and no.

Speaking of bridges, you are IMHO a bit too extreme, a "double strength" bridge is definitely bad-engineering.

Over-engineering is (as an example) using a modified asphalt to pave the bridge (very good for adherence when raining and on cold, snowy places) in a warm climate country where it rarely rains, and never snows.

The good old definition of (construction) engineering norms is (maybe was) revolving around representing the reasonable cost for the society of reasonable levels of "safety" and "convenience" (both rather difficult to establish BTW).

When it comes to computing (and similar) the problem is often what I call the "because I can" syndrome, on the web there is an over-complication (maybe more accurate than over-engineering) on an increasing number of sites, which as an example if you have poor connection or not the latest OS and browser, reduce the number of visitors (or the quality of their experience) and this is the "under-engineering", as the site (while possibly offering a superb experience to someone accessing it with a given connection/Os/browser) will be inaccessible or only partially working to a not-so-trifling number of potential customers, so the site does not deliver fully what is supposed to, so maybe more accurately, it is over-complication that makes the result be under-performing.

</comment></comment></comment><comment><USER10> I think that what you're reaching for is wrongly engineered. Some of the big frameworks go through huge effort for non (or small requirements). I continue to be amazed at the nonsense about hot-loading and time-travel debugging that people think are framework requirements - while requirements like good bundling or actual debugger support which doesn't blow up on trivial examples go unfixed for years. It's those framework non-requirements which fuel the idea that the frameworks create bloat.

It's all about minimizing the effect of the non-requirements, careful choice of a minimal set of sensible enough frameworks, and then rigorous agile prioritization at the application end.

<comment><USER3> I've adapted to this team anti-pattern by becoming relentlessly skeptical and cynical in my work. I don't let anyone tell me something is "trivial" or "easy" in programming unless I've actually seen it (meaning, with my own eyes, not reading about it on a blog), and protest untested ideas from coworkers vigorously, even if that person is a developer on my team whom I respect. I kind of hate this solution because it makes me automatically resistant to anything new whatsoever, but I hate it less than some of the code I've been forced to write to fill in gaps left by some flavor-of-the-month tech.

<comment> g-b-r It's a good attitude as long as it doesn't turn you into a old coot stuck to his vb6. It's good to always be skeptic, but don't let that stop you trying new things.

</comment></comment></comment><comment><USER11> Salient quote:

> To pick a specific example: the problem with an over-engineered form is that > the amount of code required to replace no engineering (i.e. native form > controls with basic styling) is enormous and almost always only partially > successful (i.e. under-engineered).

> They are under-engineered because they are over-engineered—tried to replace > native controls.

> This is the basic argument against most forms of website over-engineering: > scroll-jacking, manipulating history with pushState, completely customised > form controls, etc.

> Recreating browser features will almost always be both under- and over- > engineered.

<comment><USER3> The worst thing about reimplementing native controls (and what everyone misses) is that those native controls don't go away. Instead, their behavior becomes undefined as the system grows around the reimplementation.

</comment></comment><comment><USER12> To me it's simple. A lot of web developers pretentiously covet complexity because it makes them feel smart to wield it. Plus, they never really learned that engineering is the divination of simplicity from complexity. They don't get over-engineering, because isn't that just more of a good thing?

<comment><USER13> That's not entirely wrong, but I think that engineers fall prey to negativity bias [1] in this area. There are tons of really complex tools that we don't hate on because we barely notice that we're using them. They're either things well-engineered enough that the complexity is mostly hidden (think JQuery equivalents), or less well-built things that we learned so early, or use so frequently, that we rarely notice having to deal with their complexity/poor engineering.

[1] [https://en.wikipedia.org/wiki/Negativity_bias](https://en.wikipedia.org/wiki/Negativity_bias)

<comment><USER14> jQuery is a nice example. It was a pleasure to use and useful from the start on. Whereas with some of the modern Javascript frameworks you have to create a huge machine before anything can get done.

<comment><USER15> Then just use JQuery? Nobody is stopping you. Those modern frameworks are excellent if you're making anything bigger than a blog.

</comment></comment></comment></comment><comment><USER16> If you've read the article, this quote sort of stings in the sense that the article is mostly about labels within frontend development and backend developers are then accused of breaking caching!

 _There are only two hard things in Computer Science: off by one errors, cache invalidation and naming things._ \- Phil Karlton

... more at [https://github.com/globalcitizen/taoup](https://github.com/globalcitizen/taoup)

<comment><USER17> It's better when the punchline comes at the end.

</comment></comment><comment><USER18> > We share custody over the bratty toddler — custom elements.

Now that Apple has declared veto against the `is` attribute, I think the author should be prepared to give up on that claim.

      <input is="my-fancy-input" type="text"/>

This will not work. To assign behavior to the input via Custom Elements, your only remaining option is to create a whole new element.

      <my-fancy-input/>

This might append a normal `input` element to the Shadow DOM, but still won't make the form accessible or even just behave naturally without substantal over-engineering. Custom Elements have become a cause the major concern identified by the article.

> Recreating browser features will almost always be both under- and over- > engineered.

This problem is identified in the Custom Elements specification already [1] so the browser vendors are simply not with us here.

[1] [http://w3c.github.io/webcomponents/spec/custom/#custom- eleme...](http://w3c.github.io/webcomponents/spec/custom/#custom-elements- autonomous-drawbacks)</comment>


Using Rust in Windows - <AUTHOR> http://www.jonathanturner.org/2017/03/rust-in-windows.html <comment><USER2> Also, if using VS2017, you may also have to set the env var `VisualStudioVersion` to `15.0` to get some cmake-using crates (libssh2-sys, etc) to build. See [https://github.com/alexcrichton/cmake- rs/pull/16#issuecommen...](https://github.com/alexcrichton/cmake- rs/pull/16#issuecomment-285932296)

(Note that 15.0 == VS2017, not VS2015)

<comment><USER3> Or run Cargo from the VS 2017 developer command prompt

</comment></comment><comment><USER4> I recently switched to using Windows full-time. It started off using the Linux subsystem, but then I accidentally trashed it. So I'm now using native Windows. Powershell is surprisingly easy to adapt to, and while I still use vim often, I've been enjoying occasional use of VS: Code.

Most stuff Just Works, but there are still some rough edges. A lot of them are simply "I'm not used to the Windows Way" yet instead of Rust problems, though.

<comment><USER5> How did you manage to trash the WSL? I'm not suggesting that it's hard to do or anything, just genuinely curious.

<comment><USER4> I decided to try using VS: Code (which was installed under Windows) to work on my projects. Opening a file ends up trashing it entirely. This is actually expected behavior; I just wasn't aware :(

<comment><USER6> What? Files get trashed by just opening them? _This_ is supposed to be expected behaviour?

<comment><USER4> Yes. Native windows doesn't know how to read the filesystem, so it totally screws up the metadata.

It's actually kinda hard to even do; the files are hidden by default, so you have to really go snooping to do this.

Linux -> Windows works just fine. Windows -> Linux, not so much.

</comment></comment></comment></comment></comment><comment><USER7> Thanks. I made a complementary guide to use the visual studio build tools 2017. [http://lustysociety.org/programming/how_to_rust_language_vis...](http://lustysociety.org/programming/how_to_rust_language_visual_studio_2017_windows_10)

</comment><comment><USER8> It's way too hard to get anything that requires OpenSSL to work, I decided not to write Rust code on my windows PC because of that. I remember the process of just getting it to work as really painful and time consuming. Other than that I really enjoy writing rust code on my Linux machine.

<comment><USER9> Fwiw, native-tls [0] is intended to solve this problem for the set of uses involving TLS (e.g. hyper [1], reqwest) by using the defacto standard on the platform you're on. This means no openssl is necessary on Windows.

Longer term, I would like to see some way for a crate consumer to optionally replace openssl with ring [2] where possible. But that's a harder problem, figuring out a common interface, specifying two crates satisfy that interface and are swappable by cargo...classic package management problems really.

[0] [https://github.com/sfackler/rust-native- tls](https://github.com/sfackler/rust-native-tls)

[1] [https://docs.rs/hyper-native- tls/0.2.2/hyper_native_tls/](https://docs.rs/hyper-native- tls/0.2.2/hyper_native_tls/)

[2] [https://github.com/briansmith/ring](https://github.com/briansmith/ring)

<comment><USER10> Rustls[1] is a work in progress to build a TLSv1.3 Server in 100% safe Rust. Uses Ring for crypto.

It could use more contributors/eyes/auditors. It works out of the box on Windows currently.

[1] [https://github.com/ctz/rustls](https://github.com/ctz/rustls)

</comment></comment></comment><comment><USER11> Visual Studio Code has a pretty decent Rust extension: [https://marketplace.visualstudio.com/items?itemName=kalitaal...](https://marketplace.visualstudio.com/items?itemName=kalitaalexey.vscode- rust)

<comment><USER4> Note that this is the up-to-date fork of the older "RustyCode" extension.

</comment></comment><comment><USER12> Does is also work with the Free-Software MinGW toolchain?

That would make it possible to generate Windows binaries without having to run a Windows VM, through cross-compiling, using e.g. MXE: [http://mxe.cc/](http://mxe.cc/)

<comment><USER13> It does. It supports mingw on windows as well as cross-compiling from linux using cargo (rust's package manager and build tool). Installing mingw-w64 from my distribution's package manager and telling cargo where to find its linker and assembler was all I needed to cross compile stand alone windows binaries of some command line tools I wrote.

</comment></comment><comment><USER14> Been working with Rust on Windows for almost a year now.

My go-to is VSCode + Rust plugin. You get the same debugging as VS2015 via C++ plugin(they both use the same backend). Only time I need to drop over to MSVC is if I need data breakpoints or look at disassembly(usually when I'm dealing with a C library that's misbehaving).

VSCode rust plugin gets you racer, rustfmt and a bunch of other goodies(cargo test/check right in the IDE).

<comment><USER15> Have you found any good resource on setting up the debugger for rust in VSCode? I've been having issues getting this running smoothly and have found very little support online

<comment><USER4> I am literally fighting with this right now. LLDB is not a happy camper.

<comment><USER14> Yeah, MSVC target tends to work much better(although viewing of some more complex types doesn't work yet).

<comment><USER4> I'm using the MSVC build of Rust. That doesn't preclude using lldb as a debugger.

<comment><USER14> Yeah, I meant MSVC debug backend.

</comment></comment></comment></comment></comment></comment><comment><USER16> What's the situation with using the Windows API from Rust? Are you down at the Win32 API level, or can you even do that?

<comment><USER17> Winapi-rs [1] is the de-facto binding for the Windows API and covers a lot of them (but not yet complete). I don't see a significant project for higher- level bindings.

[1] [https://github.com/retep998/winapi- rs/](https://github.com/retep998/winapi-rs/)

</comment></comment><comment><USER18> I should really find some time to upgrade to VS2017, my understanding is it's a bit faster than VS2015, not just the install. Can anyone comment on this, I always found VS to be a beast, even on an SSD, HDDs being nearly unbearable.

I really do like VS Code though... looks like there's some work going there.

<comment><USER19> VS17 has an option to "quick load" projects. It loads up in a jiffy (unlike it's previous versions), but you cannot use some of the IDE features.

I seriously hope they add a lazy load feature in the future.

<comment><USER20> Isn't quick load just a rename of lazy load, based on your description?

<comment><USER19> Nope, apparently quick load doesn't load several IDE features at all. What I mean by lazy load is that it should incrementally load the IDE features after the IDE starts.

<comment><USER21> Jeez, the obvious optimization would have been to load some of the features first and then load the rest, but to not load them at all? That's not very useful.

<comment><USER20> Well, as a back-seat commenter I agree with you but they probably had a good reason to not do it. Most likely something to do with development complexity. There's a ton of smart people working on Visual Studio, I'm willing to trust their judgment on this :)

<comment><USER21> Well, they definitely had good reason, it's just that the feature isn't very useful without the extra work. Although, I don't know exactly how much functionality is missing, so I might be wrong.

<comment><USER20> Well, it might just be laying the groundwork for lazy loading. They probably thought some people might find it useful even as a "half feature".

<comment><USER21> Yeah, that seems like the most reasonable explanation. It sounds like the answer was just "deadline".

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> Instead of VS try out IntelliJ IDEA with Rust plugin: [https://intellij- rust.github.io](https://intellij-rust.github.io)

It gives you the comfort features known from the IntelliJ platform and doesn't add phonehome telemetry to your exe files (like VS2k15).

<comment><USER23> Have you got a source for the telemetry inside the compiled binary claim?

<comment><USER24> It was something a specific patch version (of Update 2, iirc) did which was blown way out of proportion. The CRT in that version sent two events on startup and shutdown to the windows event tracing/profiling framework. (Which show up in performance analysis tools like WPA.) People just latched onto the scary name.

<comment><USER20> To make things even worse (even funnier?), GCC also has something like this, I believe it's this feature: [https://gcc.gnu.org/onlinedocs/gcc/Instrumentation- Options.h...](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)

<comment><USER25> Profiling is not telemetry. Telemetry implies that events are supposed to be transmitted off-site (tele + metry = remote + measuring). Profiling writes a local file with statistics.

</comment></comment></comment></comment></comment><comment><USER19> I personally prefer lxss. While it has some limitations, I am yet to face issues with rust projects. You can also use Intellij-based IDEs with a rust plugin and run `bash` in the command prompt accompanying the IDE. It feels like working on Linux ^_^

<comment><USER26> Well, because the userland IS Linux (or what people refer to as Linux on the desktop).

But binaries are also ELF binaries and can only be run with lxss. How do you deploy to Windows customers who are not developers?

<comment><USER27> You dev on linux, try your best to write in a cross-platform way - then only once you've got something that works and you're fairly motivated to actually do something with it, go through the hassle to make a Windows build.

</comment></comment></comment><comment><USER28> Is VisualRust still active? It seems dead or moving very slowly. I know there's some commits going into the project, but their last release was over a year ago.</comment>


This Satellite Could Be Beaming Solar Power Down from Space by 2025 - <AUTHOR> http://motherboard.vice.com/blog/this-satellite-could-be-beaming-solar-power-down-from-space-by-2025

<comment><AUTHOR> A note on the introduction: There's actually no evidence that there ever was a "solar death ray" created by, designed by or otherwise envisaged by Archimedes.</comment>


Clever PNG Optimization Techniques - <AUTHOR> http://www.smashingmagazine.com/2009/07/15/clever-png-optimization-techniques/?1

<comment><USER3> Great article, it is rather photoshop centric though.

PNG is a really neat format to produce from code when you're trying to visualize datastructures as well, and some of these optimization tricks can be used with the GD library as well when you select the image type.

If you produce a lot of those images the bandwidth savings can be quite considerable.

<comment><USER4> They're good tips but unless you're addressing a large audience on 28k or less of bw then you're just as well to use pngcrush and be done as this will give you nearly all the optimisation with barely any time spent.

<comment><USER5> I like optipng better, it's based on pngcrush, but with some extra features and better defaults.

<comment><USER4> Just did a single test - 6MB file for an advert I did yesterday. 10K bigger with optiPNG than with pngcrush (using defaults) and took longer to process with optiPNG. I'm not bothered enough to test further ...

Also the optiPNG website doesn't say it's based on pngcrush, it does appear to have started by using the same methods though.

</comment></comment></comment></comment><comment><USER6> Extremely useful if you are a photoshop guy and you need to slim down a website. People aren't paying as much attention to shaving kilobytes off of the size of a webpage anymore, but given the number of mobile devices with data access, it is still a very big deal.

<comment><USER7> If your site design relies so heavily on graphics, you are probably not doing _all_ you could to optimize it. And if your site _content_ is so heavily image-centric, then the burden is on your users to get equiped for the experience.

<comment><USER8> If we're already talking about website optimization lets mention the obvious.

<http://developer.yahoo.com/performance/rules.html>

</comment></comment></comment><comment><USER9> Here's a neat app for optimizing PNGs after saving:

<http://news.ycombinator.com/item?id=676973>

</comment><comment><USER10> Why not use JPEG unless you really need transparency?

<comment><USER5> Because JPEG is a horrendous format for these types of pictures.

Using it is a mark of an inexperienced graphic designer.

Use JPEG if you photographed a real life object with a camera. ALL other images (for the web) should be PNG.

Oh, and the reason it's horrendous is that it makes the images blurry - <USER2> larger! And you can no longer realistically edit the image once JPEG touched it. (For example change a color: use a color picking tool, can't do it once jpeg touched it.)

<comment><USER11> I disagree. There are enough cases where a JPG image looks the same but has a smaller file size. There is no reason to not use JPEG in that case. You are overexaggerating with the "blurry and larger" part. Using PNG just because is a mark of an inexperienced graphic designer to me. Know your options and choose the right one.

Just keep the original work file (which surely is not a PNG either) and change that if you have to.

<comment><USER5> Obviously you should use jpeg for a photo.

For a non photo the only time jpeg would be smaller is if it's a dithered image. And since you shouldn't use a dithered image anyway, I maintain what I said.</comment></comment></comment></comment>


Ask HN: How to deal with female name on resume? - <AUTHOR> I'm a female working in the finance/tech industry. Applying to companies, I'm worried that the gendered name on my resume might be poisoning employers' perception of me: http://whatwouldkingleonidasdo.tumblr.com/post/54989171152/how-i-discovered-gender-discrimination.<p>Do you believe that this kind of name-based bias is strong enough that I should somehow change my resume to show something other than my name? Also, I'm working with a recruiter, should I tell him my concern? <comment><USER2> I would suggest you do further research before making a decision. It is possible it will hurt you. It is also possible that it will screen out toxic work environments where you wouldn't really want to be. Before deciding whether to go with initials or not, if it were me, I would see if I could come up with something on that angle of things.

From what I have read, some women are leaving tech to get away from the horribly misogynistic work environments they have endured. There are some real horror stories out there. If this can be used as a means to screen out potentially toxic work places, it might be a more efficient use of your time to go ahead and use the female name and let them not waste your time on interviews and what not.

Best of luck.

(I will add that I am a woman, fwiw.)

<comment><USER3> I agree with Mz that your going to screen out the toxic places by being honest.

As a guy who has done hiring in the past, if I see a woman who has 5+ years in the industry I'm automatically going to talk to her. Theres a lot of bullshit out there, and you have probably put up with a fair bit more of it than most other people/men. If your still here and still looking for a job its probably because you want to be in the industry and like what you do.

</comment></comment><comment><USER4> > I'm working with a recruiter...

Don't waste your energy with a some bozo recruiter.

Instead focus your search on networking with senior executive level women. Most companies (even in male dominate tech) have a few well positioned women. And most get the Girl Power Network thing.

Check out Women in Technology for an event near you>[http://witi.meetup.com/](http://witi.meetup.com/) ; and www.womenintechnology.org

Also, The 25 Most Powerful Women in Finance for some additional target ideas... [http://www.americanbanker.com/women-in- banking/gallery/the-2...](http://www.americanbanker.com/women-in- banking/gallery/the-25-most-powerful-women-in-finance-2013-1062210-1.html)

<comment><USER3> There are lots of firms who ONLY get decent engineers through recruiters.

Techical recruiting is HARD, and honestly if your a small shop, with limited HR going outside to get talent may be your only option.

<comment><USER4> The typical business model for a recruiter has the company pay him a fee for placement. He does NOT work for job-seekers, but rather tries to broker a match.

Most companies (especially small shops) would rather source a potential hire through their own channels, than pay a headhunter fee.

</comment></comment></comment><comment><USER5> I don't think it's worth being concerned about (and I do believe we have a big problem with gender bias in this industry), but if _you_ think it's a problem, it's going to be one whether or not it really is, because it'll impact your confidence. So, to ease your mind and table this issue: just use your first initial instead of your first name. Super common, people do it all the time.

</comment><comment><USER6> I'd argue it is more likely to help you in tech' than hurt you. Companies are falling all over themselves to bring in more women.

No clue on finance however.

<comment><USER7> > Companies are falling all over themselves to bring in more women.

In the HN echo chamber maybe. I still think hiring managers are thinking "maternity leave" especially in the US.

<comment><USER6> Which is odd as the US offers no maternity leave. A handful of states have a little but it is often UNPAID maternity leave making it all but worthless.

<comment><USER8> > Which is odd as the US offers no maternity leave. A handful of states have a > little but it is often UNPAID maternity leave making it all but worthless.

That's a bit confused.

The US requires unpaid maternity (and other) leave via FMLA; a few states also provide some degree of _paid_ maternity leave. (In both cases, "maternity" is overly specific, but included, in what is generally described -- as in the title of FMLA -- as "family and medical leave".) [0]

[0] [http://www.ncsl.org/research/labor-and-employment/state- fami...](http://www.ncsl.org/research/labor-and-employment/state-family-and- medical-leave-laws.aspx)

<comment><USER6> FMLA has so many loopholes it may have well not exist at all:

[http://www.dol.gov/whd/regs/compliance/1421.htm#2a](http://www.dol.gov/whd/regs/compliance/1421.htm#2a)

Plus let's be honest, unpaid maternity leave is worthless even if the FMLA worked (it doesn't). That isn't maternity leave, that's "job assurance" if people cannot afford to take leave, they won't. Its as simple as that.

The US is by far the worst western country when it comes to guaranteeing that mothers and fathers will be able to spend time with their kids in the all important first year. Don't even get me started on how bad the US treats single parents.

<comment><USER8> Upthread, you claimed:

(1) The US has no national maternity leave provision, and (2) A few states provide maternity leave, but even that is only unpaid.

The fact is, the US _does_ have a national unpaid maternity leave provision, and a few states provide _paid_ maternity leave.

> FMLA has so many loopholes it may have well not exist at all

FMLA covers about 60% of all employees, and is used by about 13% annually. So, while it certainly doesn't cover everyone, it certainly has considerably more effect than if it did not exist at all.

> Plus let's be honest, unpaid maternity leave is worthless even if the FMLA > worked (it doesn't). That isn't maternity leave, that's "job assurance" if > people cannot afford to take leave, they won't.

Its true that unpaid maternity leave obviously isn't as good as paid leave, and people are less likely to take it at all, and likely to take less of it than they would if the lead were paid. That doesn't change the fact that the existence of FMLA as a national source of unpaid maternity leave makes your early claim that there was no US national maternity leave, even unpaid, false, nor does it change the fact that the existence of state _paid_ maternity leave programs makes your further claim that the few states that offered maternity leave offered only unpaid leave _also_ false.

> The US is by far the worst western country when it comes to guaranteeing > that mothers and fathers will be able to spend time with their kids in the > all important first year.

That's rather clearly true, but not what you claimed upthread, and, more importantly, would have been _irrelevant_ where you made the claim upthread about the nonexistence of required maternity leave in the US, since the US's _relative_ position on maternity leave is immaterial to the issue, which is that hiring managers might avoid hiring women because they might take maternity leave. Since most positions _are_ covered by FMLA, and since FMLA _does_ provide for maternity leave that employees have a right to take, hiring managers might well be considering that, _even if_ the US maternity leave provisions are poor compared to every other developed (not just "western") country.

<comment><USER6> Congratulations you've nitpicked my remark to death.

But I won't conceded that what the US calls "Maternity Leave" is not in fact it by any modern standard of the term, it is nothing more than a job assurance program that even according to you only reaches 60% of people. And out of them few can afford it (and even them not for its full duration).

A handful of US states offer legitimate Maternity Leave and they should be congratulated for that. The federal government should be ashamed, FMLA is pathetic, and their inaction lets people (both parents & children) down daily.

To be honest I'm not exactly sure what point you're trying to make. That the US is awesome? That maternity leave is fine? That you just want to be "right?" If it is the first two points then we'll never reach consensus and if it is the last point then this is all a waste of time.

<comment><USER8> > To be honest I'm not exactly sure what point you're trying to make.

That your fact claims upthread (to wit that the US has no national mandatory maternity leave, including unpaid, and that the small number of states that provide more than what is nationally mandated require only unpaid leave) are false and the conclusion they were offered upthread to support (that it is not plausible that US hiring managers would act based on the concern that female applicants might demand maternity leave) is unjustified, since the US has a national mandate that covers most employees for unpaid maternity leave and the handful of states that require something more than the national minimum provide paid leave, and, whether or not those are _good_ maternity leave mandates, they do exist, employees might make use of them, and hiring managers might well act based on sex-based assumptions about which candidates would be more likely to avail themselves of those mandatory leave programs.

<comment><USER9> Someone1234's claims might be overstated, but it's not the crime that you're making it out to be.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> Do you want to work at a company where it matters?

<comment><USER11> A thousand times this. It makes me sad that you have to worry about this :(. But if there's that strong a bias against your name, you probably don't want to end up actually being present there.

My advice, working at an enterprise SaaS company: stick to your guns, and be proud of your name! Good companies (like ours :) ) are actively seeking women for technical positions to correct the bias.

<comment><USER12> What's the name of your company?

</comment></comment></comment><comment><USER13> I don't think any reputable company does recruitment based on names. In fact, most of the big name companies are trying to get more woman into workforce to balance any bias there might be.

</comment><comment><USER14> This is a tough one. What everyone assumes is that a only blatantly sexist person will dismiss your resume because of a female name. Obviously, such people will flunk you in the interview.

The problem is it completely ignores people who honestly don't believe they are sexist (and may even consider themselves feminist), but suffer from an unconscious bias. These people might be fine to work for and not be biased (or blatantly so) in the rest of the hiring process.

I never thought of orchestras as havens of gender bias, but they totally were:

[http://www.theguardian.com/women-in- leadership/2013/oct/14/b...](http://www.theguardian.com/women-in- leadership/2013/oct/14/blind-auditions-orchestras-gender-bias)

And I'm sure the judges certainly didn't consider themselves as sexist.

It's totally up to you, but an easy solution is to use initials, such as AJ instead of Allison Jane. For some reason, we almost always assume initials belong to a man.

As for the recruiter, hopefully they know some stats about diversity, including if they are trying to improve it. But in general, a recruiter does not want to submit someone who won't pass the interview.

</comment><comment><USER15> Researchers in the US have demonstrated that black names (many blacks have names like Tyrone and Aleisha which white people doesn't) are discriminated against ([http://www.nber.org/digest/sep03/w9873.html](http://www.nber.org/digest/sep03/w9873.html)).

It's not far-fetched to speculate that employers would likewise value female and male names differently. I'm just guessing but it feels to me like in the software industry, there may be a bias against females for managerial and project leader positions. Otoh, there is a clear bias in favor of females for bottom-rung coder positions. It's not uncommon to see language in job ads that they would like to see female applications.

</comment><comment><USER16> I say do an experiment with initials if you can't find an existing study. Try askscience on reddit for previous studies.

I bet it does affect interview rates.

But in general people hire for 'cultural' fit which means like them, so if you find a female who is hiring then that is bonus points, for some men it is minus points, but other things matter too like your perceived social class, what school you went to, etc.

But you can't do anything about that stuff so best is to give them the benefit of the doubt in terms of being able to judge you on your merits. But I think people do want to click with their hires regardless of official policy. You might be able to bond over technical details in your field or baseball teams or whatever.

</comment><comment><USER17> No. Never. Be who you are and be extremely happy not to have to work for/with people that think it is OK to filter out candidates based on the name or gender.

Years ago, I was in the very unique situation of helping with the recruitment of my own boss. When interviewing a woman, the CTO asked if she was planning to have more kids. Her reaction was a very quick and assertive "Would you ask me the same question if I wasn't a woman?". I was embarrassed by the question and loved the answer. She was hired and we had a great working relationship for the years after.

I think it is very much OK to put people on the spot when similar questions come up.

</comment><comment><USER18> I don't think this is a real common occurrence or something you should be worried about (but I am also male). And like ellisv said, in the few times it does would you really want to work at that type of place? My 2 cents, be yourself and don't hide anything.

If you really feel it is hurting you though, then try using your first initial. But either way, neither would stop you from getting an interview with any company I have been apart of if you had the qualifications, and I think that's true at most any reputable company.

</comment><comment><USER19> I've never even thought about this when applying for jobs and didn't notice my name negatively affecting my chances (aside from a female name I also have a very foreign sounding name even though English). I figure if someone is going to discriminate against you based on your name/implied gender/whatever that company is probably not one you want to be working for anyway.

</comment><comment><USER20> I don't think there is nothing to worry about. I mean your not me a dude with 95% looking female name. For the most part most of my interviews went well though one army research organization one was a bit weird. I think at the time they were "ok we have to ask questions, but lets not make it awkward".

</comment><comment><USER21> I'd be concerned. If you're lucky, an androgynous name like Robin or Jo can help you. Otherwise, maybe use an initial?

Once you get an interview, it becomes harder to avoid the discrimination. But at least you can get through the resume filter.

Its probably too much, to ask you to change your name.

<comment><USER22> I have a friend whose last name triggers porn spam filters.

<comment><USER23> [https://en.wikipedia.org/wiki/Scunthorpe_problem](https://en.wikipedia.org/wiki/Scunthorpe_problem)

<comment><USER22> His name really is just like that.

</comment></comment></comment></comment><comment><USER24> initials instead of full name maybe? I doubt it's an issue for finance, more for tech perhaps? Depends on what role it is and what level you are at. It matters less than it used to. There's more important things on a resume to determine if you get an interview. Tailoring resumes to company and role is more important.

</comment><comment><USER25> The common way to do this in literature is using an alias. 'Little Bobby Tables' is probably available again...

<comment><USER21> Strangely, that one is _always_ available in the database!

</comment></comment><comment><USER26> I guess you should also find a way to change your look to trick the manager during the in person interview.

<comment><USER21> We've hired people without ever once meeting them! Remote workers, online interviews, accepted and get to work. But we're a company that creates remote- worker tools, so we're well-placed to make that happen.

<comment><USER26> Without even a skype/hangout session? Without getting their actual name/gender for legal purposes?

<comment><USER27> Here's a question. How anonymous can an employee be? For the U.S. It seems like you need to get a Social Security number for tax purposes. Is a name also required?

<comment><USER28> Employers are required to verify that the employee is eligible to work in the U.S., meaning they're a citizen or else have the proper kind of visa, and are not in the country illegally. And most companies will also do background checks. So yeah, you'll need to give your name, and probably a Xerox of your passport or driver's license, when you sign on to a company.</comment></comment></comment></comment></comment>


VC Funding Spelled Backwards - <AUTHOR> http://mattmaroon.com/?p=361 <comment><USER2> gnidnuF CV

Sorry, but i've been holding myself back from doing that for about half an hour now. I caved.

<comment><USER3> Whoops, clicked the down arrow but meant to click up. For what it's worth, consider yourself +2 karma.

</comment></comment><comment><USER4> "Had Xobni taken $1 million instead of 4, they'd all be buying beach houses right now. On the other hand, Microsoft might come back and offer the $40 or $50 million it would take to make the VCs agree (I think it would be a good idea for them to do so) and they'll be buying beach house and Bentleys."

Let's say an angel would invest at the same valuation as the VC, then for $1M they would get 12.5% of the company. That would mean that when acquired for $20M, founders are left with $17.5M. For VCs with 50% stake and $40M acquisition founders are left with $20M. Not sure where Bentley's come from.

<comment><USER5> you overestimate the price of bentleys

</comment></comment><comment><USER6> the MS offer was not that high when you factor in how many people work at xobni. i've heard some tech acquirers say they initially value a startup at $1M per engineer before factoring in the value of the actual product. xobni is up to what, 14 or 15 people now?

<comment><USER7> 15 people, all engineers?

<comment><USER8> I'd actually be really curious what their engineer to executive to support staff ratio is.

<comment><USER3> Theoretically executive support staff has some value too. I mean, outside of the hacker crowd anyway, those people are viewed as useful.

<comment><USER8> Oh, sure, I could use some support staff, but I could use hackers more.

</comment></comment></comment></comment></comment><comment><USER9> Why MS just not go ahead and copy Xobni? it is not like they would need to get users, they are already there.</comment>