News for hackers. Stuff that matters.
Re:Announcing Rust 1.6 by valarauca1 on Thursday January 21, 2016 @05:26PM (#10948994)
Actually managed to sneak some Rust into production. Nobody cares what language you wrote the DLL in, just that it does what the docs say it should do.
Re:Announcing Rust 1.6 by erickt on Thursday January 21, 2016 @07:09PM (#10949650)
Wonderful! Are you able to say which company you deployed this in, and if you've run into any trouble? And by DLL, was this in Windows? I can't recall if we've heard of any Windows users putting rust into production yet. We're quite interested in making sure our production users don't run into any problems. If you'd prefer to not speak in public, you could reach out to our private channel, [email protected]. Best of luck!
Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @12:39AM (#10950980)
"Are you able to say which company you deployed this in?"

"Actually managed to sneak some Rust into production."

"...sneak some Rust..."

"...sneak..."

There's your answer on that one. ;) Others might be quite useful, though.

Re:Announcing Rust 1.6 by valarauca1 on Friday January 22, 2016 @07:46AM (#10952359)
Truth is its a developer tool that just provides basic logging for debugging. Its not sexy, and its not actually shipping out of the shop. Just a few members of my dev team have adopted it. And it was written on company time, so the company technically owns it.

I Work in an aging framework for electronics testers written in a combination of C#/VB/LabVIEW its highly asychronous nature make debugging the system an issue.

Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @12:46PM (#10954308)
"And it was written on company time, so the company technically owns it."

I figured this and you possibly breaking the rules were the reasons for discretion. I also figured you were forced to use aging crap that motivated you to try alternatives. A painful, but common, thing in industry. Hence, me reminding the other commenter not to expect a source reference on it. ;)

"I Work in an aging framework for electronics testers written in a combination of C#/VB/LabVIEW its highly asychronous nature make debugging the system an issue."

I usually try to drop papers or articles at moments like these but have nothing relevant. There's only a few articles in my collection on asynchronous systems (outside I/O) because they're so hard to verify. I did find a few resources. Would have to know if the problem is communications, data, what before I could attempt suitable references for you.

You probably already do one of my base recommendations here: tracing flows and input validation on them. The equivalent of asserts on input and/or monitors with read access to global state comparing data/states against ranges or rules in a policy. Taint-methods are also helpful where you tag data in the datatype with details about where it's been and whats happened. That's more advanced and I'm not sure there's libraries available for those platforms. The other technique they can easily handle: I did it in VB long ago.

"Screw diamonds: legacy systems are forever."

That's friggin' great. Need to make a meme image out of that with some COBOL or RPG on it. :)

Re:Announcing Rust 1.6 by valarauca1 on Friday January 22, 2016 @02:20PM (#10954940)
> There's only a few articles in my collection on asynchronous systems (outside I/O) because they're so hard to verify.

GRR isn't hard just time consuming. Yes its not fully verified

>I also figured you were forced to use aging crap that motivated you to try alternatives.

I'm actually a polygot programmer trying to pay the bills. Working in aging tester frameworks pays a lot more then web development. I like Rust b/c its basically C-With-A-Type-System. Its still very easy to reason about how the Cee-LangVM will handle your code.

But yes. Working in a code base from the 80's and switching to Rust is lovely.

:.:.:

The core purpose is exception logging. A lot of the exceptions will get mutated/modified before being reported. "Servo drive failed." is a lot less useful then "Servo communication fault 0x274077343" which I've memorized to tell me that a power surged knocked a comport off line.

Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @02:30PM (#10955010)
Oh shit, replied to you at exact time you replied to me here:

https://news.ycombinator.com/item?id=10954970

"GRR isn't hard just time consuming. Yes its not fully verified"

I believe it now after pulling papers. I even know exactly how hard it is and what parts are decidable.

" Working in aging tester frameworks pays a lot more then web development."

Makes sense. It's why I advise against commodity jobs. The niche or unpopular stuff usually pays better. Not always, but usually.

"The core purpose is exception logging. A lot of the exceptions will get mutated/modified before being reported. "Servo drive failed." is a lot less useful then "Servo communication fault 0x274077343" which I've memorized to tell me that a power surged knocked a comport off line."

Hmm. That's more straight-forward than most async. Just detail-oriented work as you said. The taint idea of tracking exact sequence of mutations combined with design-by-contract tracks of function call contexts would certainly help that. How much I can't say as your combination of tech obscures it. Don't know enough Labview mainly. Microsoft has things like Spec# and verifiers for C# part with VB6 easy to ignore if you keep logic out of it.

So, you're in better shape than many doing multi-language, legacy work. At least as far as verification concerns.

Re:Announcing Rust 1.6 by valarauca1 on Friday January 22, 2016 @03:02PM (#10955207)
>Don't know enough Labview mainly

Don't learn it. Its a terrible language, and a worse IDE. Yeah you'll learn over 6 figures with 2 years experience. But you'll waste a lot of time debugging issues with the runtime itself, also the langauge itself isn't consistent which can lead to extreme headaches/development lagging. But NI will compensate lost development time with free hardware so companies love it.

The tools for tracing/testing in Labview are annoying and kinda primitive. Hence why a separate callable logger is useful. Mainly in Labview all functions start out as heap allocated monands wrapped in a mutex. So basically every function has state initially. You then have to opt-out of this to get a pure function.

>Hmm. That's more straight-forward than most async

Well yes. We're not exactly concerned with verification of the asynchronous system. Just making sure everything happens in the right order, and each thread is actually doing what its commended to do.

At a certain level you can abuse asynchronous systems to make certain measurements easier. Just assume your input has a half-Gaussian input lag level, and suddenly a 200 sample moving average becomes sufficient for smoothing data not jumping though hoops of fire doing weird data synchronization.

Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @03:55PM (#10955565)
"But NI will compensate lost development time with free hardware so companies love it."

WOW! I never even thought about that business angle to dealing with shoddy tech. Thanks for the warnings.

"Well yes. We're not exactly concerned with verification of the asynchronous system. Just making sure everything happens in the right order, and each thread is actually doing what its commended to do."

Glad you at least have an easy approach to dealing with that nonsense. :)

Re:Announcing Rust 1.6 by valarauca1 on Friday January 22, 2016 @05:17PM (#10955938)
>WOW! I never even thought about that business angle to dealing with shoddy tech. Thanks for the warnings.

Well most companies don't supply hardware and software. Also NI's hardware is great, best in the business. Their software is complete poop.

Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @02:24PM (#10954970)
OK. So, thanks to your comment, I looked up a bunch of CompSci and stuff on asynchronous verification to see what old and cutting edge methods are. Looks like it's a mostly solved problem at the conceptual level. Even found a method from NASA for Globally-Asynchronous, Locally-Synchronous (GALS) which I keep stumbling into in hardware.

So, good news, there's a number of techniques for various aspects of this at a range of mathematical abilities. Might be able to make an informal, knock-off of one or more for your use case. The bad news is that I found more papers than I wanted to thoroughly read. Not filtering them myself. If you want, I'll drop you a link to an archive or links to individual papers for you to skim at your own pace. If not, that's cool too as I needed them in my collection anyway for high-assurance, asynchronous systems. Especially given all the uptake on async in mainstream.

So, it was great you replied with those details regardless. Might have inspired a future, bullet-proof system in an unusual instance of the Butterfly Effect. ;)

Re:Announcing Rust 1.6 by valarauca1 on Monday January 25, 2016 @07:58AM (#10966894)
>Might have inspired a future, bullet-proof system in an unusual instance of the Butterfly Effect. ;)

That'd be nice :D

Re:Announcing Rust 1.6 by eterm on Thursday January 21, 2016 @06:14PM (#10949314)
Said no one who has to maintain others' software.
Re:Announcing Rust 1.6 by humanrebar on Thursday January 21, 2016 @06:32PM (#10949424)
It's a fair point, but there's a lot of write-only Perl, PHP, and C out there. Let's make sure we don't hold new Rust code to a higher standard that that stuff.
Re:Announcing Rust 1.6 by awwaiid on Thursday January 21, 2016 @07:23PM (#10949739)
Don't forget Python and R and C++ and JS and ... hmm. Almost like the language doesn't have much to do with it so much as the writer. But I digress!
Re:Announcing Rust 1.6 by zenlikethat on Thursday January 21, 2016 @06:56PM (#10949577)
Ideally we should hold all new code to a higher standard than that. All programmers spend much more time reading code than writing it.

Likewise, Rust is not finalized as a language yet. That means whoever has to maintain the original commenter's code is likely to be in for a rough time if and when they ever attempt to bump the Rust version.

Re:Announcing Rust 1.6 by steveklabnik on Thursday January 21, 2016 @07:03PM (#10949616)
> Rust is not finalized as a language yet.

It is just as finalized as any other language.

> if and when they ever attempt to bump the Rust version.

If the parent is using a stable release, like this 1.6 is, then bumping the version should be all they need to do. (Unless they're relying on a safety hole for some reason; we do fix those)

Re:Announcing Rust 1.6 by zenlikethat on Thursday January 21, 2016 @09:31PM (#10950382)
Fair enough- I wasn't familiar with Rust's backwards compatibility guarantees and had heard a bit about breakage, so thanks for pointing that out.
Re:Announcing Rust 1.6 by Manishearth on Thursday January 21, 2016 @10:53PM (#10950652)
Rust development was done in public (unlike Go or Swift which started out privately), so we had a very long 0.x period which was public and had tons of breakages where the language designers tinkered with just about every tradeoff.

So it's easy to see where you get the impression that Rust is prone to breakages, but that doesn't happen anymore.

Re:Announcing Rust 1.6 by steveklabnik on Thursday January 21, 2016 @09:37PM (#10950400)
No worries. Every 1.x+1 is backwards compatible with 1.x, modulo some details. Usually breakage is mentioned in the context of the nightly ecosystem, which has no particular guarantee. We also reserve the right to fix soundness bugs, though we try to make upgrading easy in those situations of and when they occur (we've only had one or two so far).
Re:Announcing Rust 1.6 by dasfasf on Thursday January 21, 2016 @10:32PM (#10950575)
Rust is not as finalized as any of the languages whose semantics are completely defined by a standard document. There is no definitive answer to the question of what a great many pieces of Rust do beyond checking out rustc from the commit date and examining the LLVM IR.
Re:Announcing Rust 1.6 by steveklabnik on Thursday January 21, 2016 @10:49PM (#10950635)
There are a very small number of languages which have those things. They are useful and we want them, but I think it's _generally_ an unreasonable standard overall.
Re:Announcing Rust 1.6 by dasfasf on Thursday January 21, 2016 @11:36PM (#10950768)
Not if you weight by use. C, C++, Java, Javascript, and C# all have specs. Among the most popular languages, it's really only the scripting languages that have the "as our implementation does" perspective on specification. I've always used languages that have standard documents, and communities that think those standard document are very important, so rather than being unreasonable, I think of complete language documentation as the natural state of the world.

Incidentally, this isn't really a criticism, but it's precisely because I don't see Rust as finalized that it isn't. A language that's finalized but not specified is just poorly documented.

Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @12:55AM (#10951022)
Most of those languages had no clear, formal spec early on. Especially C and C++: one getting started with UNIX and ad hoc code with the other starting as C w/ Classes plus some extra features from other languages. IIRC, Java's initial mandates hurt it because they were terrible quality in a number of areas and took up to a 15x (yes, times) performance hit in some measurements I saw. JavaScript were two, competing implementations with a ship-first mentality with a bit of it standardized later with vendor-specific stuff left in. C# did have a language specification on v1.0 whose quality I have no knowledge of. I do know they internally beta'd it starting in the late 90's. So, it was done similar to Rust but privately for years before that spec.

So, I'm not seeing your examples as relevant or a critique. Most were in use and changing [to their benefit] before any spec was created. Three of those very publicly, one privately. Another sucked partly thanks to formalizations with lots of money driving adoption. I think you should read Gabriel's Worse is Better essays... several rather than just the first... to see why pushing a partly done or evolving system is right approach for growth & accelerated improvements. Lipner at Microsoft, inventor of successful Security Development Lifecycle, incidentally thought the same thing.

Least Rust team is trying to fix problems and evolve in a robust way. That's quite rare for mainstream stuff that I've seen.

Re:Announcing Rust 1.6 by dasfasf on Friday January 22, 2016 @09:23AM (#10952821)
To be honest, I'm not seeing your pointing this out as relevant. I never claimed Rust should have a spec at this point in its life, or claimed any other language had a spec at an equivalent point in its life, and I explicitly disclaimed any criticism. I objected only to the statement that Rust is "just as finalized as any other language". Talking about other languages' youth and whether being specified early is a good thing is especially disingenuous, since the topic of the thread was whether Rust was a good candidate to use now, compared against other languages as they exist now, not making some kind of "fair" comparison against their early versions.
Re:Announcing Rust 1.6 by nickpsecurity on Friday January 22, 2016 @12:34PM (#10954204)
"I objected only to the statement that Rust is "just as finalized as any other language"."

I might have been too hasty there. Your context and this quote makes much more sense. I say something similar to them myself. Yet, they've already entered a 1.0 mode where they're not breaking stuff with much of it documented in guides. That's not formal but pretty final on language itself. Standard libraries and other tooling are where most of their work is right now.

So, I don't feel it's an accurate statement but it's close if we're talking the language. I prefer to say the core language is pretty stable or something like that.

Re:Announcing Rust 1.6 by steveklabnik on Friday January 22, 2016 @12:23AM (#10950924)
Yes. Those are all old, established languages. And while they do have a _lot_ of use, there are also a significant number of languages which see heavy amount of use that have no spec. And as you mention, it's not exactly a criticism; it depends on where you fall on the maturity scale of languages you wish to use.

It's only unreasonable due to Rust's young age. At Rust's age, none of those languages had a specification either.

Re:Announcing Rust 1.6 by kibwen on Friday January 22, 2016 @01:13AM (#10951083)
In fact, C didn't have a specification for the first 17 years of its existence. :)
Re:Announcing Rust 1.6 by pjmlp on Friday January 22, 2016 @02:47AM (#10951358)
I wouldn't see this as positive.

This fact is the major reason behind the whole undefined behavior story in C and its derived languages.

When the standard came to be, no vendor wanted to give up on the semantics that gave their compiler some kind of advantage.

So all those little issues were tucked into undefined bucket.

Re:Announcing Rust 1.6 by kibwen on Friday January 22, 2016 @01:59PM (#10954791)
Indeed, I'm hoping that Rust begins a push for standardization no later than five years from now, with a formal spec ratified no later than ten (which may sound like a long timeframe, but that would still put it ahead of the average standardization curve). And we're already making a head start on a few necessary aspects of a specification, such as formally proving that our type system is actually as strong as we think it is.
Re:Announcing Rust 1.6 by pcwalton on Friday January 22, 2016 @02:40AM (#10951334)
Developing a standard for Rust would have incredibly few practical consequences, given that there are no alternative implementations. It would, however, consume a lot of people's time. That time could be spent on things with practical impact, such as compilation speed improvements, stabilization of features, and better optimization.

The reason why Rust was stabilized in advance of a standard is that stabilization had an immediate practical consequence: ceasing to break code. A standard, by contrast, would have virtually no practical use.

Re:Announcing Rust 1.6 by jeffdavis on Thursday January 21, 2016 @09:56PM (#10950464)
He said it's documented. That tells me it's probably easier to maintain than many other approaches.
Re:Announcing Rust 1.6 by valarauca1 on Friday January 22, 2016 @07:47AM (#10952365)
There is also a test suite b/c cargo makes it stupidly easy to write tests.

I actually find myself pining for the simplicity of #[test] in other languages. It makes the Write->Test->Write loop so much faster.

Re:Announcing Rust 1.6 by blantonl on Thursday January 21, 2016 @07:01PM (#10949606)
This is where grey-bearded consultants make their bank....