Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Tech News - Languages

202 Articles
article-image-julia-v1-2-releases-with-support-for-argument-splatting-unicode-12-new-star-unary-operator-and-more
Vincy Davis
21 Aug 2019
3 min read
Save for later

Julia v1.2 releases with support for argument splatting, Unicode 12, new star unary operator, and more

Vincy Davis
21 Aug 2019
3 min read
Yesterday, the team behind Julia announced the release of Julia v1.2. It is the second minor release in the 1.x series and has new features such as argument splatting, support for Unicode 12 and a new ⋆ (star) unary operator. Julia v1.2 also has many performance improvements with marginal and undisruptive changes. The post states that Julia v1.2 will not have a long term support and “As of this release, 1.1 has been effectively superseded by 1.2, which means there will not likely be any further 1.1.x releases. Our good friend 1.0 is still currently the only long-term support version.” What’s new in Julia v1.2 This version supports Argument splatting (x...). It can be used in calls to the new pseudo-function in constructors. Support for Unicode 12 has been added. A new unary operator ⋆ (star) has been added. New library functions A new argument !=(x), >(x), >=(x), <(x), <=(x) has been added to assist in returning the partially-applied versions of the functions A new getipaddrs() function is added to return all the IP addresses of the local machine with the IPv4 addresses New library function Base.hasproperty and Base.hasfield  Other improvements in Julia v1.2 Multi-threading changes It will now be possible to schedule and switch tasks during @threads loops, and perform limited I/O. A new thread-safe replacement has been added to the Condition type. It can now be accessed as Threads.Condition. Standard library changes The extrema function now accepts a function argument in the same way like minimum and maximum. The hasmethod method can now check for matching keyword argument names. The mapreduce function will accept multiple iterators. Functions that invoke commands like run(::Cmd), will get a ProcessFailedException rather than an ErrorException. A new no-argument constructor for Ptr{T} has been added to construct a null pointer. Jeff Bezanson, Julia co-creator says, “If you maintain any packages, this is a good time to add CI for 1.2, check compatibility, and tag new versions as needed.” Users are happy with the Julia v1.2 release and are all praises for the Julia language. A user on Hacker News comments, “Julia has very well thought syntax and runtime I hope to see it succeed in the server-side web development area.” Another user says, “I’ve recently switched to Julia for all my side projects and I’m loving it so far! For me the killer feature is the seamless GPUs integration.” For more information on Julia v1.2, head over to its release notes. Julia co-creator, Jeff Bezanson, on what’s wrong with Julialang and how to tackle issues like modularity and extension Julia announces the preview of multi-threaded task parallelism in alpha release v1.3.0 Mozilla is funding a project for bringing Julia to Firefox and the general browser environment
Read more
  • 0
  • 0
  • 15421

article-image-python-3-7-2rc1-and-3-6-8rc1-released
Natasha Mathur
12 Dec 2018
2 min read
Save for later

Python 3.7.2rc1 and 3.6.8rc1 released

Natasha Mathur
12 Dec 2018
2 min read
Python team released Python versions 3.7.2rc1 and 3.6.9 rc1 yesterday.  Python 3.7.2rc1 is the release preview of the second maintenance release of Python 3.7. Python. 3.6.8rc1 is the release preview of the eighth and last maintenance release of Python 3.6. These latest releases include the addition of new features. Key Updates in Python 3.7.2rc1 A new C API for thread-local storage has been added in Python 3.7.2rc1. A new Thread Specific Storage (TSS) API has been added to CPython which takes over the existing TLS API within the CPython interpreter while removing the existing API. Deterministic .pyc files have been added. These .pyc files are called “hash-based”. Python still uses timestamp-based invalidation by default and does not generate hash-based .pyc files at runtime. Hash-based .pyc files can be generated with py_compile or compileall. Core support added in Python 3.7.2rc1 for typing module and generic types. Customized access to module attributes is allowed, meaning you can now define __getattr__() on modules and can call it whenever a module attribute is not found. Defining __dir__() on modules is also allowed. DeprecationWarning handling has been improved. The insertion-order preservation nature of dict objects has now become an official part of the Python language spec. Key Updates in Python 3.6.8rc1 Preserving Keyword Argument order has been added in Python 3.6.9rc1, meaning that **kwargs in a function signature is now guaranteed to be an insertion-order-preserving mapping. Python 3.6.8rc1 offers simple customization of subclass creation without using a metaclass.The new __init_subclass__ classmethod gets called on the base class when a new subclass is created. A new “secrets” module has been added to the standard library that reliably generates cryptographically strong pseudo-random values suited for managing secrets like account authentication, tokens, etc. A frame evaluation API has been added to CPython that makes frame evaluation pluggable at the C level. This allows debuggers and JITs to intercept frame evaluation before Python code execution begins. Python 3.6.8rc1 offers formatted string literals or f-strings. Formatted string literals work similarly to the format strings accepted by str.format(). They comprise replacement fields that are surrounded by curly braces. The replacement fields are expressions, that are evaluated at run time, and formatted using the format() protocol. For more information, check out the official release notes for Python 3.7.2rc1 and 3.6.8rc1. Python 3.7.1 and Python 3.6.7 released IPython 7.2.0 is out! SatPy 0.10.0, python library for manipulating meteorological remote sensing data, released
Read more
  • 0
  • 0
  • 15235

article-image-brian-goetz-on-java-futures-at-fosdem-2019
Prasad Ramesh
11 Feb 2019
3 min read
Save for later

Brian Goetz on Java futures at FOSDEM 2019

Prasad Ramesh
11 Feb 2019
3 min read
At FOSDEM 2019, Java language architect Brian Goetz talks about the future of Java in the next few years. Let’s take a look at the highlights of his talk. Java has been around more than 20 years and has been declared dead by critics numerous times. They have kept the language alive by staying relevant to problems and hardware. The faster release cycle allows the Java team to work on good small features. It also helps laying the groundwork for future releases. Preview features help in risk reduction by gathering feedback. There are various projects in the works that will allow Java to adapt to higher expectations of the developers, bring value types, generic specialization, and better interoperability with native code. Switch and pattern matching He goes over the new switch statements in Java 12 with an example. The new expression switch simplifies the code a lot, by allowing not just lesser typing but also makes the code less error prone. Switch expressions is a part of a larger concept called pattern matching. It combines a test, a conditional extraction and a binding into one operation. The code looks cleaner with pattern matching as it eliminates redundant boilerplate. Project Valhalla The goal of this project is to reboot the way JVM lays out data in memory. The hardware has changed drastically in the last three decades. The cost of memory fetch versus arithmetic has increased hundreds of times. Memory efficiency is lost in between this increased cost. Alternatives like stuffing data into arrays under a single header makes the code worse. This project introduces value types that ‘codes like a class, works like an int’. Project Valhalla has been running for the past 5 years and has different phases. The current prototype is called LW1 and has the VM underpinnings validated. The next prototype called LW2 out next year should be good for experimentation. Project metropolis is also in the early stages. It's about replacing the C2 compiler with the Graal compiler. The Java team is working on a lot of features across various categories such as language productivity features, fundamental VM performance features, native interop, concurrency models etc,. They are starting to be better formed now after years of work through various projects. The bi-yearly releases help test more features than before and the limited LTS releases would help the core developers to work with better focus. Project Valhalla seems promising and could possible make Java much more memory efficient. To see code demo and explanation with QnA, you can watch the talk. 7 things Java programmers need to watch for in 2019 Netflix adopts Spring Boot as its core Java framework IntelliJ IDEA 2018.3 is out with support for Java 12, accessibility improvements, GitHub pull requests, and more
Read more
  • 0
  • 0
  • 15225

article-image-rust-1-31-is-out-with-stable-rust-2018
Prasad Ramesh
07 Dec 2018
3 min read
Save for later

Rust 1.31 is out with stable Rust 2018

Prasad Ramesh
07 Dec 2018
3 min read
Yesterday, Rust 1.31.0 and Rust 2018 was announced in the official blog of the programming language. Rust 1.31.0 is the first stable iteration of Rust 2018 and many features in this version are now stable. Rust 2018 Rust 2018 brings all of the work that the Rust team has been doing since 2015 to create a cohesive package. This goes beyond just language features and includes tooling, documentation, domain working groups work, and a new website. Each Rust package can be in either Rust 2015 or Rust 2018 and they work seamlessly together. Projects made in Rust 2018 can use dependencies from 2015, and a 2015 project can use 2018 dependencies. This is done so that the ecosystem doesn't split. The new features are opt-in to preserve compatibility in existing code. Non-lexical lifetimes Non-lexical lifetimes or NLL simply means that the borrow checker is now smarter, and accepts some valid code that was rejected by it previously. Module system changes People new to Rust struggle with its module system. Even if there are simple and consistent rules that define the module system, their consequences can come across as inconsistent, counterintuitive and mysterious. Hence Rust 2018 introduces a few changes to how paths work. These changes ended up simplifying the module system, and now there is better clarity as to what is going on in the module system. More lifetime elision rules Some additional elision rules for impl blocks and function definitions are added. For example: impl<'a> Reader for BufReader<'a> {    // methods go here } This can now be written like this: impl Reader for BufReader<'_> {    // methods go here } Lifetimes still need to be defined in structs. But now no longer require as much boilerplate as before. const fn There are many ways to define a function in Rust. A regular function with fn An unsafe function with unsafe fn An external function with extern fn Rust 1.31 adds a new way to qualify a function: const fn. New tools in Rust 1.31 Tools like Cargo, Rustdoc, and Rustup have been crucial in Rust since version 1.0. In Rust 2018, a new generation of tools are ready for all users— Clippy: Rust's linter. Rustfmt: A tool for formatting Rust code. IDE support: Rust is now supported in popular IDEs like Visual Studio Code, IntelliJ, Atom, Sublime Text 3, Eclipse. Tool lints "tool attributes", like #[rustfmt::skip] were stabilized in Rust 1.30. In Rust 1.31, "tool lints," like #[allow(clippy::bool_comparison)] are being stabilized. These give a namespace to lints making their tool of origin more clear. Other additions Apart from changes in the language itself, there are changes to other areas too. Documentation: "The Rust Programming Language" book has been rewritten. Domain working groups: Four new domain working groups are introduced—network services, command-line applications, WebAssembly, embedded devices. New website: There’s a new iteration of the website for Rust 2018. Library stabilizations: Some From implementations have been added to stabilize libraries. Cargo changes: In Rust 1.31 cargo will download packages in parallel using HTTP/2. Rust Survey 2018 key findings: 80% developers prefer Linux, WebAssembly growth doubles, and more Rust Beta 2018 is here GitHub Octoverse: The top programming languages of 2018
Read more
  • 0
  • 0
  • 15181

article-image-haskell-is-moving-to-gitlab-due-to-issues-with-phabricator
Prasad Ramesh
03 Dec 2018
3 min read
Save for later

Haskell is moving to GitLab due to issues with Phabricator

Prasad Ramesh
03 Dec 2018
3 min read
The Haskell functional programming language is moving from Phabricator to GitLab. Last Saturday, Haskell Consultant Ben Gamari listed down some details about the move in a mail. It started with a proposal to move to GitLab A few weeks back, Gamari wrote to the Haskell mailing list about moving the Glasgow Haskell Compiler (GHC) development infrastructure to GitLab. The original proposal wasn’t complete enough to be used but did provide a small test instance to experiment on. The staging URL https://gitlab.staging.haskell.org is ready to use. While this is not the final version of the migration, it does have most of the features a user would expect. Trac tickets are fully imported, including attachments Continuous integration (CI) is available via CircleCI The mirrors of all boot libraries are present Users can also login using their GitHub credentials if they choose to Issues in the migration There are also a few issues listed by Gamari that needs to be worked on: Timestamps associated with ticket open and close events aren't accurate Some of the milestone changes have problems on being imported Currently, CircleCI fails when forked Trac Wiki pages aren’t imported as of now Gamari said that the listed issues have either been resolved in the import tool or are in-progress to be resolved. The goal of this staging instance is to let contributors gain experience using GitLab and identify any obstacles in the eventual migration. Developers need to note that any comments, merge requests, or issues created on the temporary instance may not be preserved. The focus is on identifying workflows that will become harder under GitLab and ways to improve on them, pending issues in importing Trac, and areas that do not have documentation. Why the move to GitLab? The did not choose GitHub as stated by Gamari in another mail: “Its feature set is simply insufficient enough to handle the needs of a larger project like GHC”. The move to GitLab is due to a number of reasons. Phacility, the company that owns Phabricator has now closed support to non paying customers As Phalicity now focuses on paying customers, open-source parts used by GHC seem half finished Phabricator tool Harbormaster causing breaking CI Their surveys indicated developers leaning towards Git rather than the PHP tool Arcanist used by Phabricator The final migration will happen in about two weeks and the date mentioned is December 18. For more details, you can follow the Haskell mailing list. What makes functional programming a viable choice for artificial intelligence projects? GitLab open sources its Web IDE in GitLab 10.7 GitLab raises $100 million, Alphabet backs it to surpass Microsoft’s GitHub
Read more
  • 0
  • 0
  • 15090

article-image-golang-1-11-rc1-is-here-with-experimental-port-for-webassembly
Natasha Mathur
17 Aug 2018
3 min read
Save for later

Golang 1.11 rc1 is here with experimental port for WebAssembly!

Natasha Mathur
17 Aug 2018
3 min read
Golang team released Golang 1.11 rc1 version, earlier this week. The latest release explores features like web assembly (js/wasm ), preliminary support for modules and improved support for debuggers among others. Golang is currently one of the fastest growing programming languages in the software industry. Golang’s easy syntax, concurrency, and fast nature are few of the reasons for its popularity. It is a modern programming language, created by Google back in 2009 for the 21st-century application development. Let’s have a look at the key features that come with Golang 1.11 rc1. WebAssembly ( js/wasm) WebAssembly is different in the sense that it is not processed by a CPU directly, but instead, it is an intermediate representation which is compiled to actual machine code by the WebAssembly runtime environment. Now, Go 1.11 rc1 has added an experimental port to WebAssembly (js/wasm). Go programs used to compile to only one WebAssembly module. These modules include the Go runtime for goroutine scheduling, garbage collection, maps, etc. Because of this, the resulting size would be around 2 MB, or 500 KB compressed. Go programs can call into JavaScript with the help of new experimental syscall/js package. Now, with new GOOS value "js" and GOARCH value "wasm" added to the web assembly, Go files named *_js.go or *_wasm.go will now be ignored by Go tools except for cases when GOOS/GOARCH values are being used. The GOARCH name "wasm" is the official abbreviation of WebAssembly. The GOOS name "js" is due to the host environment that executes WebAssembly bytecode are web browsers and Node.js, both of which use JavaScript to embed WebAssembly. Preliminary support for modules Go 1.11 rc1 offers preliminary support for a new concept called “modules,” which is an alternative to GOPATH with integrated support for versioning and package distribution. With modules, developers are not limited to working inside GOPATH. Also, the version dependency information is explicit yet lightweight, and builds are more reliable. Improved support for debuggers The compiler in Go 1.11 rc1 now produces significantly accurate debug information for optimized binaries. This includes variable location information, line numbers, and breakpoint locations. Due to this, it is easier to debug binaries compiled without -N -l. There are still few limitations to the quality of the debug information which will improve with the future releases. DWARF sections have been compressed by default. This is due to the accurate debug information produced by the compiler. This is transparent to most ELF tools (like debuggers on Linux and *BSD) and is supported by the Delve debugger on all platforms.   Other changes Many direct system calls have been removed from the macOS runtime. Go 1.11 binaries are now less likely to break on upgrading macOS version because system calls are made through the proper channel (libc). Go 1.11 is expected to be released later this month. For more information, check out the official release notes. Writing test functions in Golang [Tutorial] How Concurrency and Parallelism works in Golang [Tutorial] GoMobile: GoLang’s Foray into the Mobile World
Read more
  • 0
  • 0
  • 15076
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime
article-image-clojure-1-10-released-with-prepl-improved-error-reporting-and-java-compatibility
Amrata Joshi
18 Dec 2018
5 min read
Save for later

Clojure 1.10 released with Prepl, improved error reporting and Java compatibility

Amrata Joshi
18 Dec 2018
5 min read
Yesterday the team at Clojure released Clojure 1.10, a dynamic, general-purpose programming language. Clojure treats the code as data and has a Lisp macro system. What’s new in Clojure 1.10? Java compatibility and dependencies Java 8 is the minimum requirement for Clojure 1.10. Clojure 1.10 comes with ASM 6.2 and updates javadoc links. Conditional logic has been removed in this release. Added type hint to address reflection ambiguity in JDK 11. spec.alpha dependency has been updated to 0.2.176 core.specs.alpha dependency has been updated to 0.2.44 Error Printing In Clojure 1.10, errors are categorized into various phases such as: :read-source: It is an error thrown while reading characters at the REPL or from a source file. :macro-syntax-check: It is a syntax error found in the syntax of a macro call, either from the spec or from a macro which throws IllegalArgumentException, IllegalStateException, or ExceptionInfo. :macroexpansion: All the errors thrown during macro evaluation are termed as macroexpansion errors. :compile-syntax-check: It is a syntax error caught during compilation. :compilation: It is a non-syntax error which is caught during compilation. :execution: Any error thrown at the execution time is termed as execution error. :read-eval-result: An error thrown while reading the result of execution is categorized as read-eval-result error. :print-eval-result: An error thrown while printing the result of execution is termed as print-eval-result error.Protocol extension by metadata This release comes with a new option, :extend-via-metadata. When :extend-via-metadata is true, values can extend the protocols by adding metadata. The protocol implementations are first checked for direct definitions such as, defrecord, deftype, reify. Further,they are checked for metadata definitions, and then for external extensions such as, extend, extend-type, extend-protocol. Tap Clojure 1.10 comes with tap, a shared and globally accessible system used for distributing a series of informational or diagnostic values to a set of handler functions. It can be used as a better debug prn and for facilities like logging. The function tap> sends a value to the set of taps. The tap function may block (e.g. for streams) and would never impede calls to tap>. Indefinite blocking ly may cause tap values to drop. Read string capture mode This release comes with read+string function that not only mimics read but also captures the string that is read. It returns both the read value and the whitespace-trimmed read string. This function requires a LineNumberingPushbackReader. Prepl (alpha) Prepl, a new stream-based REPL, comes with structured output that is suitable for programmatic use. In prepl, forms are read from the reader and return data maps for the return value (if successful), output to *out* (possibly many), output to *err*(possibly many), or tap> values (possibly many). Other functions in Clojure 1.10 include, io-prepl, a prepl bound to *in* and *out*, which works with the Clojure socket server and remote-prepl, a prepl that can be connected to a remote prepl over a socket Datafy and nav The clojure.datafy function features data transformation for objects. The datafy and nav functions can be used to transform and navigate through object graphs. datafy is still in alpha stage. Major bug fixes ASM regression has been fixed in this release. In the previous release, there were issues with deprecated JDK APIs, which has been fixed. The invalid bytecode generation for static interface method calls have been fixed. Redundant key comparisons have been removed from HashCollisionNode. This release reports correct line number for uncaught ExceptionInfo in clojure.test. Many users have appreciated the efforts taken by the Clojure team for this project. According to most of the users, this release might prove to be a better foundation for developer tooling. Users are happy with the updated debug messages and bug fixes. One user commented on HackerNews, “From the perspective of a (fairly large-scale at this point) app developer: I find it great that Clojure places such emphasis on backwards compatibility. The language has been designed by experienced and mature people and doesn't go through "let's throw everything out and start again" phases like so many other languages do.”  Though few users still prefer occasional updates instead so that they get better APIs. Rich Hickey, the creator of Clojure language has been appreciated a lot for his efforts even by the non Clojurists. One of the users commented on HackerNews, “Rich's writing, presentations, and example of overall conceptual discipline and maturity have helped me focus on the essentials in ways that I could not overstate. I'm glad (but not surprised) to see so much appreciation for him around here, even among non-Clojurists (like myself).” Though REPLs use the ubiquitous paradigm of stdio streams and are efficient, their major downside is of mingling evaluation output with printing output (the "Print" step). Few users are linking this project with the unrepl and are confused if the design works for the projects. Clojure is stable and it doesn’t have a static type system. Also, users are not happy with the changelog. However, this release has raised a few questions among the developer community. One of the big questions here is if PREPLs would replace remote APIs someday? It would be interesting to see if that really happens with the next set of Clojure releases. Get more information about Clojure 1.10 on Clojure. ClojureCUDA 0.6.0 now supports CUDA 10 Clojure 1.10.0-beta1 is out! Clojure for Domain-specific Languages – Design Concepts with Clojure  
Read more
  • 0
  • 0
  • 15074

article-image-c-8-0-to-have-async-streams-recursive-patterns-and-more
Prasad Ramesh
14 Nov 2018
4 min read
Save for later

C# 8.0 to have async streams, recursive patterns and more

Prasad Ramesh
14 Nov 2018
4 min read
C# 8.0 will introduce some new features and will likely ship out the same time as .NET Core 3.0. Developers will be able to use the new features with Visual Studio 2019. Nullable reference types in C# 8.0 This feature aims to help prevent the null reference exceptions that appear everywhere. They have riddled object-oriented programming for half a century now. The null reference exceptions stop developers from using null in ordinary reference types like string. They make these types non-nullable. They are warnings, however, not errors. On existing code, there will be new warnings. Developers will have to opt into using the new feature at the project, file, or source line level. C# 8.0 will let you express your “nullable intent”, and throws a warning when you don’t follow it. string s = null; // Warning: Assignment of null to non-nullable reference type string? s = null; // Ok Asynchronous streams with IAsyncEnumerable<T> The async feature that was from C# 5.0 lets developers consume and produce asynchronous results. This is in straightforward code, without callbacks. This isn’t helpful when developers want to consume or produce continuous streams of results. For example, data from an IoT device or a cloud service. Async streams are present for this use. C# 8.0 will come with IAsyncEnumerable<T>. It is an asynchronous version of the existing IEnumerable<T>. Now you can await foreach over functions to consume their elements, then yield return to them in order to produce elements. async IAsyncEnumerable<int> GetBigResultsAsync() {    await foreach (var result in GetResultsAsync())    {        if (result > 20) yield return result;    } } Ranges and indices A type Index is added which can be used for indexing. A type index can be created from an int that counts from the beginning. It can be alternatively created with a prefix ^ operator that counts from the end. Index i1 = 3;  // number 3 from beginning Index i2 = ^4; // number 4 from end int[] a = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; Console.WriteLine($"{a[i1]}, {a[i2]}"); // "3, 6" C# 8.0 will have an added Range type consisting of two Indexes. One will be for the start and one for the end. They can be written with an x..y range expression. Default implementations of interface members Currently, once an interface is published members can’t be added anymore without breaking all its existing implementers. With the new release, a body for an interface member can be provided. If somebody doesn’t implement that member, the default implementation will be available instead. Allowing recursive patterns C# 8.0 will allow patterns to contain other patterns. IEnumerable<string> GetEnrollees() {    foreach (var p in People)    {        if (p is Student { Graduated: false, Name: string name }) yield return name;    } } The pattern in the above code checks that the Person is a Student. It then applies the constant pattern false to their Graduated property to see if they’re still enrolled. Then checks if the pattern string name to their Name property to get their name. Hence, if p is a Student who has not graduated and has a non-null name, that name will yield return. Switch expressions Switch statements with patterns a powerful feature in C# 7.0. But since they can be cumbersome to write, the next C# version will have switch expressions. They are a lightweight version of switch statements, where all the cases are expressions. Target-typed new-expressions In many cases, on creating a new object, the type is already given from context. C# 8.0 will let you omit the type in those cases. For more details, visit the Microsoft Blog. ReSharper 18.2 brings performance improvements, C# 7.3, Blazor support and spellcheck Qml.Net: A new C# library for cross-platform .NET GUI development Microsoft announces .NET standard 2.1
Read more
  • 0
  • 0
  • 15042

article-image-net-announcements-preview-2-of-net-core-2-2-and-entity-framework-core-2-2-c-7-3-and-ml-net-0-5
Savia Lobo
13 Sep 2018
5 min read
Save for later

.NET announcements: Preview 2 of .NET Core 2.2 and Entity Framework Core 2.2, C# 7.3, and ML.NET 0.5

Savia Lobo
13 Sep 2018
5 min read
Yesterday, the .NET community announced the second preview of .NET Core 2.2 and the Entity Framework 2.2. They also released C# version 7.3 and ML.NET 0.5. Let’s have a look at the highlights and features of each of these announcements. .NET Core 2.2 Preview 2 .NET Core 2.2 Preview 2 can be used with Visual Studio 15.8, Visual Studio for Mac and Visual Studio Code. Following are two highlights of this release. Tiered Compilation Enabled The tiered compilation is enabled by default. The tiered compilation was available as part of the .NET Core 2.1 release. During that time, one had to enable tiered compilation via application configuration or an environment variable. It is now enabled by default and can be disabled, as needed. In the image below, the baseline is .NET Core 2.1 RTM, running in a default configuration, with tiered compilation disabled. The second scenario has tiered compilation. One can see a significant request-per-second (RPS) throughput benefit with tiered compilation enabled. The numbers in the chart are scaled so that baseline always measures 1.0. Such an approach makes it very easy to calculate performance changes as a percentage. The first two tests are TechEmpower benchmarks and the last one is Music Store, a frequent sample ASP.NET app. Platform Support .NET Core 2.2 is supported on the following operating systems: Windows Client: 7, 8.1, 10 (1607+) Windows Server: 2008 R2 SP1+ macOS: 10.12+ RHEL: 6+ Fedora: 27+ Ubuntu: 14.04+ Debian: 8+ SLES: 12+ openSUSE: 42.3+ Alpine: 3.7+ Read about the .NET Core 2.2 Preview 2 in detail, on Microsoft blog. Entity Framework Core 2.2 Preview 2 This preview includes a large number of bug fixes and two additional important previews, one is a data provider for Cosmos DB and the second one, new spatial extensions for .NET’s  SQL Server and in-memory providers. New EF Core provider for Cosmos DB This new provider enables developers (familiar with the EF programming model) to easily target Azure Cosmos DB as an application database. It also includes global distribution, elastic scalability, ‘always on’ availability, very low latency, and automatic indexing. Spatial extensions for SQL Server and in-memory This implementation picks the NetTopologySuite library that the PostgreSQL provider uses as the source of spatial .NET types. NetTopologySuite is a database-agnostic spatial library that implements standard spatial functionality using .NET idioms like properties and indexers. The extension then adds the ability to map and convert instances of these types to the column types supported by the underlying database, and usage of methods defined on these types in LINQ queries, to SQL functions supported by the underlying database. Read more about the Entity Framework Core 2.2 Preview 2 on the Microsoft blog. C# 7.3 C# 7.3 is the newest point release in the 7.0 family. Along with new compiler options, there are two main themes to the C# 7.3 release One provides features that enable safe code to be as performant as unsafe code. The second provides incremental improvements to existing features. New features that support the theme of better performance for safe code: Access to fixed fields without pinning. Easy Reassign ref local variables. Use of initializers on stackalloc arrays. Easy use of fixed statements with any type that supports a pattern. One can use additional generic constraints. The new compiler options in C# 7.3 are: -publicsign to enable Open Source Software (OSS) signing of assemblies. -pathmap to provide a mapping for source directories. Read more about the C# 7.3 in detail in its documentation notes. ML.NET 0.5 The .NET community released ML.NET version 0.5. ML.NET is a cross-platform, open source machine learning framework for .NET developers. This version release includes two key highlights: Addition of a TensorFlow model scoring transform (TensorFlowTransform) Starting from this version, the community plans to add support for Deep Learning in ML.NET. Following this, they introduced the TensorFlowTransform which enables taking an existing TensorFlow model, either trained by the user or downloaded from somewhere else, and get the scores from the TensorFlow model in ML.NET. This new TensorFlow scoring capability doesn’t require one to have a working knowledge of TensorFlow internal details. The implementation of this transform is based on code from TensorFlowSharp. One can simply add a reference to the ML.NET NuGet packages in thier .NET Core or .NET Framework apps. Under the covers, ML.NET includes and references the native TensorFlow library which allows writing code that loads an existing trained TensorFlow model file for scoring. New ML.NET API proposal exploration The new ML.NET API offers more flexible capabilities than what the current LearningPipeline API offers. The LearningPipeline API will be deprecated when this new API is ready. The new ML.NET API offers attractive features which aren’t possible with the current LearningPipeline API. These include: Strongly-typed API  takes advantage of C# capabilities. This helps errors to be discovered in compilation time along with improved Intellisense in the editors. Better flexibility: This new API provides a decomposable train and predict process, eliminating rigid and linear pipeline execution. Improved usability: This new API makes direct call to the APIs from user’s code. No more scaffolding or insolation layer creating an obscure separation between what the user/developer writes and the internal APIs. Entrypoints are no longer mandatory. Ability to simply score with TensorFlow models: One can also simply load a TensorFlow model and score by using it without needing to add any additional learner and training process. Better visibility of the transformed data: User’s have better visibility of the data while applying transformers. As this API inclusion will be a significant change in ML.NET, the community has started an open discussion where users can provide their feedback and help shape the long-term API for ML.NET. Users can share their feedback on ML.NET GitHub repo. Read more about ML.NET 0.5 in detail, on Microsoft blog. Task parallel library for easy multi-threading in .NET Core [Tutorial] Use App Metrics to analyze HTTP traffic, errors & network performance of a .NET Core app [Tutorial] Microsoft’s .NET Core 2.1 now powers Bing.com  
Read more
  • 0
  • 0
  • 15012

article-image-clojure-1-10-0-beta1-is-out
Bhagyashree R
08 Oct 2018
3 min read
Save for later

Clojure 1.10.0-beta1 is out!

Bhagyashree R
08 Oct 2018
3 min read
On October 6, the release of Clojure 1.10.0-beta1 was announced. With this release, Clojure 1.10 will now be considered feature complete and only critical bug fixes will be addressed. Changes introduced in Clojure 1.10 Detecting error phase Clojure errors can occur in five distinct phases, which include read, macroexpand, compile, eval, and print. Clojure and the REPL can now identify these phases in the exception and/or the message. The read/macroexpand/compile phases produce a CompilerException and indicate the location in the caller source code where the problem occurred. CompilerException now implements IExceptionInfo and ex-data reports exception data including the optional keys: :clojure.error/source: Name of the source file :clojure.error/line: Line in source file :clojure.error/column: Column of line in source file :clojure.error/phase: This indicates the phase (:read, :macroexpand, :compile) :clojure.error/symbol - Symbol being macroexpanded or compiled Also, clojure.main now contains a new function called ex-str that can be used by external tools to get a repl message for a CompilerException to match the clojure.main repl behavior. Introducing tap tap, a shared and globally accessible system, is used for distributing a series of informational or diagnostic values to a set of handler functions. It acts as a better debug prn and can also be used for facilities like logging. Read string capture mode A new function, read+string is added that not only mimics read, but also captures the string that is read. It then returns both the read value and the (whitespace-trimmed) read string. prepl (alpha) This is a new stream-based REPL with a structured output. These are the new functions that are added in clojure.core.server: prepl: It is a REPL with structured output (for programs). io-prepl: A prepl bound to *in* and *out* suitable for use with the Clojure socket server. remote-prepl: A prepl that can be connected to a remote prepl over a socket. prepl is now alpha and subject to change. Java 8 or above required Clojure 1.10 now requires Java 8 or above. The following are few of the updates related to this change and Java compatibility fixes for Java 8, 9, 10, and 11: Java 8 is now the minimum requirement for Clojure 1.10 Embedded ASM is updated to 6.2 Reliance on jdk166 jar is removed ASM regression is fixed Invalid bytecode generation for static interface method calls in Java 9+ is now fixed Reflection fallback for --illegal-access warnings in Java 9+ is added Brittle test that fails on Java 10 build due to serialization drift is fixed Type hint is added to address reflection ambiguity in JDK 11 Other new functions in core To increase the portability of the error-handling code, the following functions have been added: ex-cause: To extract the cause exception ex-message: To extract the cause message To know more about the changes in Clojure 1.10, check out its GitHub repository. Vue.js 3.0 is ditching JavaScript for TypeScript. What else is new? Java 11 is here with TLS 1.3, Unicode 11, and more updates Rust 2018 RC1 now released with Raw identifiers, better path clarity, and other changes
Read more
  • 0
  • 0
  • 14839
article-image-rust-language-server-rls-1-0-releases
Fatema Patrawala
21 Aug 2018
2 min read
Save for later

Rust Language Server, RLS 1.0 releases with code intelligence, syntax highlighting and more

Fatema Patrawala
21 Aug 2018
2 min read
The Rust Language Server 0.130.5 announces its first 1.0 release candidate. The 1.0 release is available on the nightly and beta version and will be available with stable Rust version from 3rd September this year. RLS 1.0 will be able to handle most small and medium sized projects with certain limitations and improvements. Major highlights of this release are syntax highlighting, syntactic code completion and code intelligence.To easily install RLS you can install an extension of your favorite editor, for example: Visual Studio Code Atom Sublime Text Eclipse What’s new in RLS 1.0 release Syntax highlighting Each editor does its own syntax highlighting Code completion Code completion is syntactic, performed by Racer. Because it is syntactic there are many instances where it is incomplete or incorrect. Errors and warnings Errors and other diagnostics are displayed inline. Exactly how the errors are presented depends on the editor. Formatting By Rustfmt (which is also at the 1.0 release candidate stage). Clippy Clippy is installed as part of the RLS. You can turn it on with a setting in your editor or with the usual crate attribute. Code intelligence The RLS can do the following: type and docs on hover goto definition find all references find all implementations for traits and concrete types find all symbols in the file/project renaming (this will not work where a renaming would cause an error, such as where the field initialisation syntax is used) change glob imports to list imports For more information visit the release notes page. Rust 2018 Edition Preview 2 is here! Rust and Web Assembly announce ‘wasm-bindgen 0.2.16’ and the first release of ‘wasm-bindgen-futures’ Rust 1.28 is here with global allocators, nonZero types and more
Read more
  • 0
  • 0
  • 14770

article-image-go-introduces-generic-codes-and-a-new-contract-draft-design-at-gophercon-2019
Vincy Davis
29 Jul 2019
3 min read
Save for later

Go introduces generic codes and a new contract draft design at GopherCon 2019

Vincy Davis
29 Jul 2019
3 min read
Update: On 31st July, Ian Lance Taylor posted in detail explaining the benefits and costs of including generics in Go. He also briefly discussed the draft design to convey how generics is going to be added to the Go language. Taylor says “Our goal is to arrive at a design that makes it possible to write the kinds of generic code, without making the language too complex to use or making it not feel like Go anymore.” Check out the Goland blog for more details. On 26th July at GopherCon 2019, Ian Lance Taylor introduced generics codes in Go. He briefly explained the need, implementation and benefits from generics for the Go language. Next, Taylor reviewed the Go contract design draft which included addition of optional type parameters to types and functions. https://twitter.com/ymotongpoo/status/1154957680651276288 https://twitter.com/lelenanam/status/1154819005925867520 Taylor also proposed guidelines for implementing generic design in Go. https://twitter.com/chimeracoder/status/1154794627548897280 In all the three years of Go surveys, lack of generics has been listed as one of the three highest priorities for fixing the Go language. Taylor defines generic as “Generic programming which enables the representation of functions and data structures in a generic form, with types factored out.” Generic code is written using types, which are specified later. An unspecified type is called as type parameter. A type parameter offers support only when permitted by contracts. A generic code imparts strong basis for sharing codes and building programs. It can be compiled using an interface-based approach which optimizes time as the package is compiled only once. If a generic code is compiled multiple times, it can carry compile time cost. Some of the many functions that can be written generically in Go include - Image Source: Source graph Go already supports two generic data structures which are built using Slice and Map languages. Go requires data structures to be written only once and then reused after putting it in a package. The contract draft design states that since Go is designed to support programming, a clear contract should be maintained between a generic code and a calling code. With the new changes, users may find the language more complex. However, the Go team expects users to not write generic code themselves, instead use packages that are written by others using generic code. Developers are very happy that the Go generics proposal is simple to understand and enables users to depend on the already written generic packages. This will save them time as users need not rewrite type specific functions in Go. https://twitter.com/lizrice/status/1154802013982449666 https://twitter.com/protolambda/status/1155286562659282952 https://twitter.com/arschles/status/1154793543149375488 https://twitter.com/YvanDaSilva/status/1155432594818969600 https://twitter.com/mickael/status/1154799370610466816 Users have also admired the new contract design draft by the Go team. https://twitter.com/miyagawa/status/1154810546002153473 https://twitter.com/t_colgate/status/1155380984671551488 https://twitter.com/francesc/status/1154796941227646976 Head over to the Google proposal page for more details on the new contract draft design. Read More Ian Lance Taylor, Golang team member, adds another perspective to Go being Google’s language Is Golang truly community driven and does it really matter? Go User Survey 2018 results: Golang goes from strength to strength, as more engineers than ever are using it at work
Read more
  • 0
  • 0
  • 14726

article-image-rust-1-28-is-here-with-global-allocators-nonzero-types-and-more
Sugandha Lahoti
03 Aug 2018
2 min read
Save for later

Rust 1.28 is here with global allocators, nonZero types and more

Sugandha Lahoti
03 Aug 2018
2 min read
The Rust team has announced a new version of their popular programming language. Mozilla's Rust system programming language has always been focused on safety, speed, and concurrency. This release adds more power to these features. Rust 1.28 provides more flexibility and ease to memory allocation with global allocators and NonZero types. Global allocators Global allocators allow a developer to define the memory allocation system used by a Rust program.  Previously, Rust did not allow changing the way memory is obtained, which prevented some use cases. With Rust 1.28, the #[global_allocator] attribute is stable. This attribute will allow Rust programs to set their allocator to the system allocator, as well as define new allocators by implementing the GlobalAlloc trait. Better error message formatting Rust’s compiler has traditionally provided verbose and explicit error messages, along with suggestions for how to fix the problem.  Rust 1.28 introduces more detailed notes about why some error conditions arise. The entire list of formatting changes is available on Github. Library stabilizations NonZero types are now a stable addition to the language. NonZero number types are wrappers around the standard unsigned integer types: NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, and NonZeroUsize. This provides easier to anticipate memory allocations and optimize program data placement. A number of other libraries have also been stabilized; you can see the more detailed release notes for full details. Cargo features Rust’s cargo utility no longer lets users publish crates with build scripts that modify the src directory for an application. This eliminates bugs during the compilation process. For more detailed release notes along with code snippets, you can read the Rust Language blog. Will Rust Replace C++? Say hello to Sequoia: a new Rust based OpenPGP library to secure your apps Eclipse IDE’s Photon release will support Rust
Read more
  • 0
  • 0
  • 14594
article-image-michael-barr-releases-embedded-c-coding-standards
Prasad Ramesh
17 Aug 2018
4 min read
Save for later

Michael Barr releases embedded C coding standards

Prasad Ramesh
17 Aug 2018
4 min read
Every C programmer has ideas about writing better C code. Comment first, agile, use this compiler etc. The Barr Group recently released a coding standards guideline for embedded C, which is also available as a freely downloadable ebook. The guidelines are grouped rules that fall under 8 broad categories (general, comments, white space, module, data type, procedure, variable and statements). Michael Barr is the CTO and co-founder of Barr Group. He has a Masters in electrical engineering, was an adjunct professor in electrical engineering/computer science and founded a company called Netrino and the Barr group for embedded systems consulting. He was also the Editor-in-Chief of the Embedded Systems Programming magazine. He has decades of experience so this should prove to be a great reference guide. What are these C guidelines about? C is pretty open-ended and leaves a lot of space of misuse. That is, a lot of bad code can be written in C. Any programming language can’t really prevent bad code, people have different approaches, some less efficient than the others. In the guidelines, Barr lists ways to change habits while coding. He states in his guideline book “The reliability, readability, efficiency, and sometimes portability of source code is more important than programmer convenience.” His also talks about MISRA C, the 20-year-old guideline created to promote more reliable programming. MISRA still is the gold standard for many embedded programmers. But MISRA avoids many issues of style, indentation, naming conventions, casings, and so on. But Barr does not shy away from any of that. It’s good to follow rules It isn’t uncommon for programmers to overlook the simple stuff. For example, they don’t bother with using braces for simple statements just because the language allows you to do so. Rule 1.3 states that all blocks however trivial should be enclosed in braces. The reasoning is “There is considerable risk associated with the presence of empty statements and single statements that are not surrounded by braces. Code constructs like this are often associated with bugs when nearby code is changed or commented out. This risk is entirely eliminated by the consistent use of braces. The placement of the left brace on the following line allows for easy visual checking for the corresponding right brace.” The employer owns the software/code you write. The employer would naturally expect you to follow the best known industry standards for the code to be least buggy and maintainable as possible. In addition, the C language is also not standard throughout, different compilers can produce different runtimes from the same code. This happens even if your code is clean and adhering to all ISO standards. Write legible code The code you write will most likely be used in the future. A short but dense code block can make you feel clever but will lack legibility. We are way past the times to bother about extra lines of code or comments taking up floppy disk space. Write for readability, comment generously, indent your loops and compound statements. Many seasoned programmers may already know or practice many of the rules stated in the book. But nonetheless it can serve as a really good reference guide for beginners and veterans alike. There are eight sections of rules with subsections in them. These were just some of the ideas presented in the guidelines, you can get the free PDF download or and if your prefer, the paperback version is available on Amazon. The 5 most popular programming languages in 2018 Polymorphism and type-pattern matching in Python [Tutorial] Qml.Net: A new C# library for cross-platform .NET GUI development
Read more
  • 0
  • 0
  • 14564

article-image-python-software-foundation-and-jetbrains-python-developers-survey-2018
Prasad Ramesh
07 Feb 2019
2 min read
Save for later

Python Software foundation and JetBrains’ Python Developers Survey 2018

Prasad Ramesh
07 Feb 2019
2 min read
The Python Software Foundation and JetBrains conducted a Python survey to find the latest trends, usage, adoption in the Python community. There were more than 20,000 participants from over 150 countries. The Python Developers Survey 2018 was conducted for the second time in collaboration after the first one in 2017. Language usage From the Python survey, 84% of the developers stated that they use it as their primary language while the other 16% used it as a secondary language. This is up from the 79% of developers using Python as primary from 2017. About 50% of Python users also use JavaScript while other languages like C/C++, Java, and C# are used lesser than 2017. Bash/Shell is also being used more by Python developers. Python uses 60% of the respondents said that they use Python for both work and personal uses. 21% exclusively for personal, educational or side projects and 19% for work. 58% of Python users use the language for data analysis which is 8% more than last year. 52% use Python for web development and 43% for DevOps/system administration. Machine learning uses also saw an uptick of 7% and stands at 38%. In general, Python is used in data analysis applications more than for Web Development. The above numbers where multiple areas were available as choices. When there was only a single response available, web development was the most popular answer with 27%. Data analysis stood at 17% and machine learning at 11%. Interestingly, if you consider ‘data science’ data analysis and machine learning combined then most Python users are in this area totaling 28%. Python versions in use Python 3 is seeing larger adoption with 84% compared to 75% from 2017. Python 2 stands at 16% and will lose support from the core team next year. Major libraries are already dropping support for Python 2. Frameworks and libraries In web frameworks, Flask and Django were the most popular with 47% and 45%. In data science packages, NumPy was the most used with 62%. pandas and Matplotlib stand at 51% and 46%. To know more in-depth results of the Python survey, you can visit the JetBrains website. pandas will drop support for Python 2 this month with pandas 0.24 Python steering council election results are out for January 2019 Python 3.8.0 alpha 1 is now available for testing
Read more
  • 0
  • 0
  • 14438
Modal Close icon
Modal Close icon