Programming

Slashdot's Interview With Swift Creator Chris Lattner 85

You asked, he answered! The creator of Apple's Swift programming language (and a self-described "long-time reader/fan of Slashdot") stopped by on his way to a new job at Tesla just to field questions from Slashdot readers. Read on for Chris's answers...
Programming

New Release Of Nim Borrows From Python, Rust, Go, and Lisp (fossbytes.com) 199

An anonymous reader writes: "Nim compiles and runs fast, delivers tiny executables on several platforms, and borrows great ideas from numerous other languages," according to InfoWorld. After six years, they write, Nim is finally "making a case as a mix of the best of many worlds: The compilation speed and cross-platform targeting of Go, the safe-by-default behaviors of Rust, the readability and ease of development of Python, and even the metaprogramming facilities of the Lisp family..."

Fossbytes adds that Nim's syntax "might remind you of Python as it uses indented code blocks and similar syntax at some occasions. Just like Rust and Go, it uses strong types and first class functions... Talking about the benchmarks, it's comparable to C. Nim compiler produces C code by default. With the help of different compiler back-ends, one can also get JavaScript, C++, or Objective-C.

There's an improved output system in the newest release, and both its compiler and library are MIT licensed. Share your thoughts and opinions in the comments. Is anybody excited about writing code in Nim?
Republicans

Trump Says He's Going To 'Get Apple To Build a Big Plant In the United States' (arstechnica.com) 471

In a Tuesday interview with The New York Times, President-elect Donald Trump said that he would incentivize Apple to "build a big plant in the United States, or many big plants in the United States." Ars Technica reports: Trump indicated to columnist Thomas Friedman that he is going to double-down on bringing factory jobs back to America, especially in the Rust Belt from Michigan to Pennsylvania.

FRIEDMAN: Are you worried, though, that those companies will keep their factories here, but the jobs will be replaced by robots?
TRUMP: They will, and we'll make the robots, too. [laughter]
TRUMP: It's a big thing, we'll make the robots, too. Right now we don't make the robots. We don't make anything. But we're going to. I mean, look, robotics is becoming very big and we're going to do that. We're going to have more factories. We can't lose 70,000 factories. Just can't do it. We're going to start making things.

Trump continued, saying that he had received a call from Apple CEO Tim Cook. As the president-elect recounted: "...and I said, 'Tim, you know, one of the things that will be a real achievement for me is when I get Apple to build a big plant in the United States, or many big plants in the United States, where instead of going to China, and going to Vietnam, and going to the places that you go to, you're making your product right here.' He said, 'I understand that.' I said: 'I think we'll create the incentives for you, and I think you're going to do it. We're going for a very large tax cut for corporations, which you'll be happy about.' But we're going for big tax cuts, we have to get rid of regulations, regulations are making it impossible. Whether you're liberal or conservative, I mean, I could sit down and show you regulations that anybody would agree are ridiculous. It's gotten to be a free-for-all. And companies can't, they can't even start up, they can't expand, they're choking."
A report from Nikkei last week said that Apple is exploring the idea of making iPhones in the United States, but the company has realized that it will cost more than double to make the shiny new gadgets at home.
Mozilla

Rust Implements An IDE Protocol From Red Hat's Collaboration With Microsoft and Codenvy (infoworld.com) 49

An anonymous reader quotes InfoWorld: Developers of Mozilla's Rust language, devised for fast and safe system-level programming, have unveiled the first release of the Rust Language Service, a project that provides IDEs and editors with live, contextual information about Rust code. RLS is one of the first implementations of the Language Server Protocol, co-developed by Microsoft, Codenvy, and Red Hat to standardize communications between IDEs and language runtimes.

It's another sign of Rust's effort to be an A-list language across the board -- not only by providing better solutions to common programming problems, but also cultivating first-class, cutting-edge tooling support from beyond its ecosystem...

The Rust Language Service is "pre-alpha", and the whole Language Service Protocol is only currently supported by two IDEs -- Eclipse and Microsoft's Visual Studio Code. Earlier InfoWorld described it as "a JSON-based data exchange protocol for providing language services consistently across different code editors and IDEs," and one of the Rust developers has already developed a sample RLS client for Visual Studio Code.
Books

O'Reilly Gives Away Free Programming Ebooks (oreilly.com) 87

An anonymous Slashdot reader writes: There's now a section on OReilly.com offering free ebooks about computer programming. There's four free Java ebooks and seven about Python, as well as an "Other" section which contains ebooks like C++ Today, Swift Pocket Reference, and Why Rust? But there's also some broader categories for Open Source and Software Architecture ebooks, as well as separate sections for their free ebooks about Data, Security, Web Development, and the Internet of Things.
Programming

Are Flawed Languages Creating Bad Software? (techcrunch.com) 531

"Most software, even critical system software, is insecure Swiss cheese held together with duct tape, bubble wrap, and bobby pins..." writes TechCrunch. An anonymous reader quotes their article: Everything is terrible because the fundamental tools we use are, still, so flawed that when used they inevitably craft terrible things... Almost all software has been bug-ridden and insecure for so long that we have grown to think that this is the natural state of code. This learned helplessness is not correct. Everything does not have to be terrible...

Vast experience has shown us that it is unrealistic to expect programmers to write secure code in memory-unsafe languages...as an industry, let's at least set a trajectory. Let's move towards writing system code in better languages, first of all -- this should improve security and speed. Let's move towards formal specifications and verification of mission-critical code.

Their article calls for LangSec testing, and applauds the use of languages like Go and Rust over memory-unsafe languages like C. "Itâ(TM)s not just systemd, not just Linux, not just software; the whole industry is at fault."
Operating Systems

Canonical Releases Snapcraft 2.14 For Ubuntu With New Rust Plugin, Improvements (softpedia.com) 44

Marius Nestor, reporting for Softpedia News: Canonical, through Sergio Schvezov, has had the great pleasure of announcing the release and general availability of Snapcraft 2.14 Snap creator tool for the Ubuntu 16.04 LTS (Xenial Xerus) operating system. Coming hot on the heels of Snapcraft 2.13, the new 2.14 maintenance update is here to introduce a bunch of new plugins, namely rust, godeps, and dump. You can find more information about each one by running the "snapcraft help " command in a terminal window. Also new in the Snapcraft 2.14 release is support for alternate relocation mechanisms in the "make" plugin (for example, you can use DESTDIR alternatives), as well as many improvements to the "go" plugin, such as support for local sources, which are now preferred instead of fetching new ones, and proper handling of the source entry. The list of improvements implemented in Snapcraft 2.14 continues with support for building a kernel Snaps for multiple hardware architectures using a single snapcraft.yaml file, support for "oneshot" daemons, better wiki parser source management, as well as proper setting of "shebangs" and support for requirement files in the "python" plugin.
Firefox

Firefox 48 Released With Multi-Process Support, Mandatory Add-On Signing (softpedia.com) 236

Mozilla on Tuesday released Firefox v48, touted as one of the most important updates the browser has ever received. With the new version, Firefox starts migrating users to using mullti-process threads (e10s, Electrolysis), and it is also the first version to ship with Rust component. In addition, Firefox is now also making add-on signing mandatory. From a Softpedia article: Announced last year, Electrolysis, e10s, or multi-process support is Firefox's ability to process core browser operations separately from the content viewed on a Web page. Multi-process support allows a page to crash without bringing the entire browser down with it and improves the browser's overall performance. e10s rollout will take place in two phases, first in Firefox 48, and it will finish in Firefox 49, set for release on September 13, 2016. Mandatory add-on signing refers to Firefox preventing users from installing any add-ons that have not been approved by Mozilla's testers. This is something similar to what Chrome employs, but Firefox users have been spoiled all these years, always having the capability of installing any add-on they've desired. Rust is a programming language that's a revamped and improved version of C++ but that protects developers from accidentally including dangerous memory bugs in their code. It achieves this by how the language was constructed and by how developers write the code.
Programming

Programming Language Gurus Converge on 'Curry On' Conference (curry-on.org) 88

Videos are now online from this week's Curry On conference, which incuded talks by programming pioneers Larry Wall and Matthias Felleisen, as well as speakers from Google, Twitter, Facebook, Microsoft, and Oracle. Dave Herman from Mozilla Research also talked about building an open source research lab, while Larry Wall's keynote was titled "It's the End of the World as We Know It, and I Feel Fine."

Billing itself as a non-profit conference about programming languages and emerging computer-industry challenges, this year's installment included talks about Java, Rust, Scala, Perl, Racket, Clojure, Rascal, Go and Oden. Held in a different European city each year, the annual conference hopes to provoke an open conversation between academia and the larger technology industry.
Firefox

Mozilla Will Ship Its First Rust Component In Firefox 48 (softpedia.com) 167

An anonymous reader quotes a report from Softpedia: Mozilla announced today plans to ship its first ever Rust code with the production releases of Firefox. The first ever Rust components will arrive in Firefox 48, scheduled for release on August 2, 2016. After teasing Rust features last year, the Mozilla Foundation announced today that Firefox 48 would contain a new media stack component that's entirely coded in Rust. The first Firefox component to feature Rust code was not chosen at random because media components often execute malicious code when parsing multimedia files. "This makes a memory-safe programming language like Rust a compelling addition to Mozilla's tool-chest for protecting against potentially malicious media content on the Web," says Dave Herman, Director of Strategy at Mozilla Research. During tests of this Rust-based media component in Firefox's unstable builds, Mozilla says that after one billion uses they have yet to see a crash or issue in the Rust media component. Last month, Mozilla released the first versions of Servo, a minimal browser created in Rust code alone. At around the same time, Microsoft open-sourced Checked C, an extension to the C programming language that brings new features to address a series of security-related issues.
Microsoft

Microsoft Open-Sources 'Checked C,' A Safer C Version (softpedia.com) 208

An anonymous reader writes from a report via Softpedia: Microsoft has open-sourced Checked C, an extension to the C programming language that brings new features to address a series of security-related issues. As its name hints, Checked C will add checking to C, and more specifically pointer bounds checking. The company hopes to curb the high-number of security bugs such as buffer overruns, out-of-bounds memory accesses, and incorrect type casts, all which would be easier to catch in Checked C. Despite tangible benefits to security, the problem of porting code to Checked C still exists, just like it did when C# or Rust came out, both C alternatives.
Businesses

Tesla Suspension Breakage: It's Not The Crime, It's The Coverup (dailykanban.com) 271

schwit1 quotes a report from Daily Kanban: For several months now, reports have circulated in comment sections and forum threads about a possible defect in Tesla's vehicles that may cause suspension control arms to break. Many of those reports appeared to come from a single, highly-motivated and potentially unreliable source, a fact which led many to dismiss them as crankery. But as more reports of suspension failure in Teslas have come in, Daily Kanban has investigated the matter and can now report on this deeply troubling issue. Our investigation began in earnest upon reading a thread titled "Suspension Problem on Model S" in the Tesla Motors Club forum. The original poster (OP) in that thread described the suspension in his 2013 Model S (with 70,000 miles) failing at relatively low speed, saying the "left front hub assembly separated from the upper control arm." Images of the broken suspension components showed high levels of rust in the steel ball joint and the OP reported being told by Tesla service center employees that the "ball joint bolt was loose and caused the wear," which was "not normal." Because his Tesla was out of warranty, the repair was reportedly sent to Tesla management for consideration. According to a subsequent post by the OP, Tesla management refused to repair the broken suspension under warranty despite the "not normal" levels of wear reported by the service techs. Then, just days later, the OP reported that Tesla had offered to pay 50% of the $3,100 repair bill in exchange for his signature on a "Goodwill Agreement" which he subsequently posted here (a scan of the stock agreement can be found here). That agreement included the following passage:

"The Goodwill is being provided to you without any admission of liability or wrongdoing or acceptance of any facts by Tesla, and shall not be treated as or considered evidence of Tesla's liability with respect to any claim or incidents. You agree to keep confidential our provision of the Goodwill, the terms of this agreement and the incidents or claims leading or related to our provision of the Goodwill. In accepting the Goodwill, you hereby release and discharge Tesla and related persons or entities from any and all claims or damages arising out of or in any way connected with any claims or incidents leading or related to our provision of the Goodwill. You further agree that you will not commence, participate or voluntarily aid in any action at law or in equity or any legal proceeding against Tesla or related persons or entities based upon facts related to the claims or incidents leading to or related to this Goodwill." [Emphasis added]

This offer, to repair a defective part in exchange for a non-disclosure agreement, is unheard of in the auto industry. More troublingly, it represents a potential assault by Tesla Motors on the right of vehicle owners to report defects to the National Highway Traffic Safety Administration's complaint database, the auto safety regulators sole means of discovering defects independent of the automakers they regulate.
Reuters also reports today that U.S. auto safety investigators are reviewing reports of suspension problems in Tesla Motors Inc's Model S cars.
Chrome

The Future of Firefox is Chrome (theregister.co.uk) 243

An anonymous reader writes: Mozilla seems to think a new future for Firefox [lies in Chrome]. While they claim that it is only about new ways of browser design, it is also an open secret that they are running into more and more problems lately with web compatibility. [Senior VP Mark Mayo caused a storm by revealing that the Firefox team is working on a next-generation browser that will run on the same technology as Google's Chrome browser. The project, named Tofino, will not use Firefox's core technology, Gecko, but will instead plumb for Electron, which is built on the technology behind Google's rival Chrome browser, called Chromium.] The benefit of Chromium/Electron would be that it is a solution they could pull much faster forward than their own Servo plans [Servo being Mozilla's Rust-based web engine]. What the real outcome of all this will be, only Mozilla knows so far. But inside Mozilla there is much resistance against such plans... Interesting times are ahead.
Open Source

Rust-Based Redox OS Devs Slam Linux, Unix, GPL 354

Freshly Exhumed writes: Redox OS, a project on GitHub aimed at creating an alternative OS able to run almost all Linux executables with only minimal modifications, is to feature a pure Rust ecosystem, which they hope will improve correctness and security over other OSes. In their own words, 'Redox isn't afraid of dropping the bad parts of POSIX, while preserving modest Linux API compatibility.' They also level harsh criticisms at other OSes, saying "...we will not replicate the mistakes made by others. This is probably the most important tenet of Redox. In the past, bad design choices were made by Linux, Unix, BSD, HURD, and so on. We all make mistakes, that's no secret, but there is no reason to repeat others' mistakes." Not stopping there, Redox documentation contains blunt critiques of Plan 9, the GPL, and other mainstays.
IOS

More Devs Now Use OS X Than Linux, Says Survey (9to5mac.com) 532

An anonymous reader writes from an article on 9to5Mac: Stack Overflow reports that more developers now use OS X than Linux as their primary OS, and that if the trend continues, fewer than half of all developers will be using Windows next year. The site says it carried out "the most comprehensive developer survey ever conducted," with more than 56,000 coders across 173 countries taking part.
The survey also mentioned more were still developing for Android than iOS -- 61.9% versus 47.5%. However, almost a third of developers are using Swift, which was also the second most loved language after Rust.
Mozilla

Mozilla's New Servo Browser Will Hit Alpha In June 2016 (softpedia.com) 95

An anonymous reader writes: Mozilla has announced it is releasing the first alpha versions of its Servo browser this upcoming June. The project uses browser.html for the browser's UI and Rust for the browser's core. There's a similarity between how Microsoft launched Spartan (Edge) and how Mozilla is launching Servo now. While many might think Mozilla is sneakily working on a Firefox replacement, Mozilla has also invested quite a lot in Firefox these days, like WebExtensions and e10s, and it may be more plausible that Servo might slowly be integrated in Firefox to replace Gecko, rather than replace Firefox altogether, like Microsoft did with Edge to IE.
Earth

Windmill Blade Molds 3D Printed By National Labs (energy.gov) 70

MountainLogic writes: Last year ORNL produced a 3D printed Shelby. This year, the National Labs are using the mother of all 3D printers to make windmill molds cheaper and faster to produce in the US. The size of the current 150 foot utility scale blades are being extended with these techniques. US DOE is providing a leading role to advance US manufacturing technology and competitiveness. Welcome back rust belt, we missed you.
Programming

Rust 1.6 Released (rust-lang.org) 75

An anonymous reader writes: The Rust team has announced the release of version 1.6 of their programming language. The biggest new feature is that libcore — the Rust core library — is now stable. "Rust's standard library is two-tiered: there's a small core library, libcore, and the full standard library, libstd, that builds on top of it. libcore is completely platform agnostic, and requires only a handful of external symbols to be defined. Rust's libstd builds on top of libcore, adding support for memory allocation, I/O, and concurrency. Applications using Rust in the embedded space, as well as those writing operating systems, often eschew libstd, using only libcore." Other features worth noting: Crates.io disallows wildcards for dependencies, there are a ton of stabilized APIs, timer functions that use milliseconds have been deprecated, and the parser will warn you if a failure was caused by Unicode characters that look similar but are interpreted differently.
Java

Java Named Top Programming Language of 2015 (dice.com) 358

Nerval's Lobster writes: What was the most popular programming language of 2015? According to the people behind the TIOBE Index, Java took that coveted spot, winning out over C, Python, PHP, and other languages. "At first sight, it might seem surprising that an old language like Java wins this award," read TIOBE's note accompanying the list. "Especially if you take into consideration that Java won the same award exactly 10 years ago." Yet Java remains essential not only for businesses, it continued, but also consumer-centric markets such as mobile development (i.e., Google Android). That being said, even big languages can tumble. (Dice link) Objective-C tumbled from third place to 18th in the past 12 months, thanks to Apple's decision to replace it with Swift. In 2016, TIOBE expects that "Java, PHP (with the new 7 release), JavaScript and Swift will be the top 10 winners for 2016. Scala might gain a permanent top 20 position, whereas Rust, Clojure, Julia and TypeScript will also move up considerably in the chart." What has been your most-used (or best-loved) programming language of the last 12 months?
Programming

Ask Slashdot: Is it Practical To Replace C With Rust? 437

interval1066 writes: I've heard of rust from various sources around the net for a few years and never paid it much mind, there are so many new languages out now since my early days doing C programming, which what I've stuck to and made me my career. Now I'm heading a project that uses a RoR application to control a large series of sensors and controls in a manufacturing process. Naturally I want to talk to the hardware using a GEM extension written in C, as I've done before.

But another engineer who is not a fan of C (seems few younger engineers are) said he could write the extensions needed easily in Rust. Seems like this is a thing. I took a closer look at rust and it looks to me like another attempt at "C" without pointers, except rust does have a kind of pointer, it appears. I like its ranking on a list of fastest languages, and it seems pretty simple with an initial tool footprint that is quite small.

But what are the trade offs? Another language, and one that few engineers know (much like Vala, which I like very much but has the same small user base). What if I need another engineer to work on the code? I pretty much know what I can expect from C/C++, rust is a huge unknown, what if I run onto a roadblock? The engineer pushing for rust is emphatic, should I bulldoze him or take the plunge?

Slashdot Top Deals