Norfolk Developers Magazine: AI

Paul Grenyer from Paul Grenyer

The first issue of the Norfolk Developers magazine (outside  of a conference) is out now and free to download!

This issue focuses on A.I., a topic we thought a good one to kick off with as everyone has an opinion about Artificial Intelligence, it affects our daily lives (see Dom Davis’ column about arguments with Alexa) and it gave us an excuse to use the awesome robot image on the front cover too.

It is because of people like you that we have  such a thriving tech community in Norwich and Norfolk, a community that has turned our Fine City into a Tech City. Without this passionate and dedicated community, there would be no reason for writers to contribute to this magazine, there would be no market for local companies to place adverts for, there would be no events to report from. Mainly, there would be no one to read it so thank you

Visual Lint 6.0.5.285 has been released

Products, the Universe and Everything from Products, the Universe and Everything

Visual Lint 6.0.5.285 is now available. This is a recommended maintenance update for Visual Lint 6.0, and includes the following changes:
  • Added PC-lint Plus specific compiler indirect files co-rb-vs2008.lnt and co-rb-vs2010.lnt.
  • co-rb-vs2013.lnt and co-rb-vs2015.lnt now undefine the preprocessor symbols _CPPRTTI, _CPPUNWIND and _NATIVE_WCHAR_T_DEFINED which are hardcoded in the Gimpel supplied compiler indirect files. These definitions should not be hardcoded as Visual Lint will automatically define these symbols where required by the project configuration.
  • Added additional suppression directives to the PC-lint Plus indirect file rb-win32-pclint10.lnt.
  • Fixed a bug in the expansion of project variables within the "Command Line" page in the Analysis Configuration Dialog.
  • If a category with no issues (e.g. "Internal Errors" in PC-lint Plus) is selected in the Message Lookup Display the "Title" and "Description" fields will now be correctly cleared.
  • When multiple views of a file is opened for editing in VisualLintGui, the contents of the views are now correctly synchronised.
  • VisualLintGui now captions the MDI child window tabs correctly when there are multiple instances of the same file open.
  • Fixed a bug in VisualLintGui which prevented MDI windows from being correctly configured if more than one view of a particular file was open.
  • Added a "Window | Close" command to VisualLintGui. The Ctrl+W accelerator and MDI tab "Close" command are now mapped to this command rather than "File | Close".
  • Fixed a bug in the VisualLintGui "Window | Close All" and "Window | Close All Except" commands which manifested when more than one view of a particular file was open.
  • The VisualLintGui "Window | New" command is now disabled if the active MDI child window is a web browser window.
  • Updated the PC-lint Plus message database to reflect changes in PC-lint Plus RC2.
Download Visual Lint 6.0.5.285

HTML5 CSS Toolbar + zoomable workspace that is mobile-friendly and adaptive

Andy Balaam from Andy Balaam's Blog

I have been working on a prototype level editor for Rabbit Escape, and I’ve had trouble getting the layout I wanted: a toolbar at the side or top of the screen, and the rest a zoomable workspace.

Something like this is very common in many desktop applications, but not that easy to achieve in a web page, especially because we want to take care that it adapts to different screen sizes and orientations, and, for example, allows zooming the toolbar buttons in case we find ourselves on a device with different resolution from what we were expecting.

In the end I’ve gone with a grid-layout solution and accepted the fact that sometimes on mobile devices when I zoom in my toolbar will disappear off the top/side. When I scroll back to it, it stays around, so using this setup is quite natural. On the desktop, it works how you’d expect, with the toolbar staying on screen at all zoom levels.

Here’s how it looks on a landscape display:

and portrait:

Read the full source code.

As you can see from the code linked above, after much fiddling I managed to achieve this with a relatively small amount of CSS, and no JavaScript. I’m hoping it will behave well in unexpected scenarios, because the code expresses what I want fairly closely.

The important bits of the HTML are simple – a main div, a toolbar containing buttons, and a workspace containing some kind of work:

<div id="main">
    <div id="toolbar">
        <button></button><button></button><button></button><button></button><button></button><button></button><button></button><button></button>
    </div>
    <div id="workspace">
        <div id="work">
        </div>
    </div>
</div>

The keys bits of the CSS are:

/* Ensure we take up the full height of the page. */
html, body, #main
{
    height: 100%;
}

@media all and (orientation:landscape)
{
    /* On a wide screen, it's a grid with 2 columns,
       and the toolbar can scroll downwards. */
    #main
    {
        display: grid;
        grid-template-columns: 5em 1fr;
    }
    #toolbar
    {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media all and (orientation:portrait)
{
    /* On a tall screen, it's a grid with 2 rows,
       and the toolbar can scroll right. */
    #main
    {
        display: grid;
        grid-template-rows: 5em 1fr;
    }
    #toolbar
    {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }
}

That replaces an awful lot of code in my first attempt, so I’m reasonably happy. If anyone has suggestions about how to make “100%” really mean 100% of the real device width and height, let me know. If I do some JavaScript I can make Mobile Firefox fit to the real screen size, but Mobile Chrome (and, I assume, Mobile Safari) lie to me about the screen size when zoomed in.

The public release of PC-lint Plus is imminent!

Products, the Universe and Everything from Products, the Universe and Everything

The PC-lint Plus beta test phase is now complete, with three release candidates having been issued since the beginning of September by Gimpel Software (the PC-lint Plus vendor). The following statement has just appeared on the Gimpel website:

PC-lint Plus Release is Imminent

Our testing of PC-lint Plus is nearing completion and we expect a formal release of the product during the 4th quarter of 2017. Unlike PC-lint and FlexeLint, licensing of PC-lint Plus will be based on a Team License. To get a quote, please send an email to sales@gimpel.com with your company information, and a brief description of the Team, including the name of your Team and the number of developers (including consultants) that will be working on the source code that PC-lint Plus will be analyzing.

What is PC-lint Plus?

PC-lint Plus is a rewrite of PC-lint from the ground up. It combines the clang framework with Gimpel Software's 30+ years of static analysis experience to provide a product that supports the latest C and C++ standards and implements the leading edge analysis technology that Gimpel Software is known for. While PC-lint Plus is a new offering from Gimpel Software, it is largely backward compatible with PC-lint /FlexeLint. In particular, most of the same options and messages are supported by PC-lint Plus, indirect files work the same way, and flagship features such as Value Tracking, User-defined Function Semantics, and Strong Types are all available and many features have been significantly enhanced. Read More
While we are waiting for full details we are continuing our testing of the release candidates and (in particular) refining the PC-lint Plus compiler configuration and suppression files installed with Visual Lint. As with PC-lint 9.0, in due course we aim to include a full set of indirect files in the Visual Lint installer - including compiler indirect files for all versions of Visual Studio back to Visual C++ 6.0 - regardless of whether Gimpel provide them (so far PC-lint Plus only includes compiler indirect files for Microsoft Visual Studio 2012, 2013 and 2015). We have already authored compiler indirect files for Visual Studio 2008 and 2010, and others will follow. If you already have a PC-lint Plus RC installation, Visual Lint 6.0 can already analyse projects using both the 32 bit (pclp32.exe) and 64 bit (pclp64.exe) versions of PC-lint Plus and already includes a number of other features (for example multicore per-project analysis) to specifically support PC-lint Plus installations. If you have any specific queries about PC-lint Plus support, just let us know.

Further Still On A Calculus Of Differences – student

student from thus spake a.k.

For some time now my fellow students and I have been whiling away our spare time considering the similarities of the relationships between sequences and series and those between the derivatives and integrals of functions. Having defined differential and integral operators for a sequence sn with

  Δ sn = sn - sn-1

and
  n
  Δ-1 sn = Σ si
  i = 1
where Σ is the summation sign, we found analogues for the product rule, the quotient rule and the rule of integration by parts, as well as formulae for the derivatives and integrals of monomial sequences, being those whose terms are non-negative integer powers of their indices, and higher order, or repeated, derivatives and integrals in general.

We have since spent some time considering how we might solve equations relating sequences to their derivatives, known as differential equations when involving functions, and it is upon our findings that I shall now report.

Just::Thread Pro v2.5.0 released with coroutines support

Anthony Williams from Just Software Solutions Blog

I am pleased to announce that Just::Thread Pro v2.5.0 has been released. This adds support for gcc 7, clang 4.0 and clang 5.0, but the big change with this version is the support for coroutines with Microsoft Visual Studio 2017, and clang 5.0 on ubuntu when used with libc++ 5.0.

Just::Thread Pro is our C++ concurrency extensions library which provides an Actor framework for easier concurrency, along with concurrent data structures: a thread-safe queue, and concurrent hash map, and a wrapper for ensuring synchronized access to single objects.

It also includes the new facilities from the Concurrency TS:

Coroutines support is here!

V2.5.0 adds support for coroutines with Microsoft Visual Studio 2017 and clang 5.0. This means that you can now use co_await to wait for a std::experimental::future, and can create coroutines that return a std::experimental::future.

Supported compilers

Just::Thread Pro is now fully supported on the following compiler/OS combinations (32-bit and 64-bit):

  • Microsoft Visual Studio 2015 for Windows
  • Microsoft Visual Studio 2017 for Windows
  • gcc 5 for Ubuntu 14.04 or later
  • gcc 6 for Ubuntu 14.04 or later
  • gcc 7 for Ubuntu 14.04 or later
  • clang 3.8 for Ubuntu 16.04 or later
  • clang 3.9 for Ubuntu 16.04 or later
  • clang 4.0 for Ubuntu 16.04 or later
  • clang 5.0 for Ubuntu 16.04 or later with libc++ or libstdc++
  • gcc 5 for Fedora 22 and 23
  • gcc 6 for Fedora 24 and 25
  • gcc 7 for Fedora 26
  • clang 3.8 for Fedora 24
  • clang 3.9 for Fedora 25
  • clang 4.0 for Fedora 26

Just::Thread Pro v2.2 is also supported with the Just::Thread compatibility library on the following compiler/OS combinations:

  • Microsoft Visual Studio 2005, 2008, 2010, 2012 and 2013 for Windows
  • TDM gcc 4.5.2, 4.6.1 and 4.8.1 for Windows
  • g++ 4.3 or later for Ubuntu 9.04 or later
  • g++ 4.4 or later for Fedora 13 or later
  • g++ 4.4 for Centos 6
  • MacPorts g++ 4.3 to 4.8 on MacOSX Snow Leopard or later

All licences include a free upgrade to point releases, so if you purchase now you'll get a free upgrade to all 2.x releases of Just::Thread Pro. Purchasers of the older Just::Thread library (now called the compatibility library) may upgrade to Just::Thread Pro for a small fee.

Posted by Anthony Williams
[/ news /] permanent link
Tags: , , ,

| Stumble It! stumbleupon logo | Submit to Reddit reddit logo | Submit to DZone dzone logo

Comment on this post

Follow me on Twitter

Emacs 25.3 released

Timo Geusch from The Lone C++ Coder&#039;s Blog

Emacs 25.3 was released on Monday. Given that it’s a security fix I’m downloading the source as I write this. If you’re using the latest Emacs I’d recommend you update your Emacs. The vulnerability as been around since Emacs 19.29, you probably want to upgrade anyway. Build instructions for Ubuntu and friends are the same […]

The post Emacs 25.3 released appeared first on The Lone C++ Coder's Blog.

maven-assembly-plugin descriptor for a simple tarball with dependencies

Andy Balaam from Andy Balaam&#039;s Blog

Today I was trying to make a simple tarball of a project + its dependent jar using the maven-assembly-plugin. I know this is a terrible way to do anything, but hey, just in case someone else wants to do something just as terrible, here are my pom.xml and assembly.xml (the assembly descriptor):

$ tree
.
├── assembly.xml
├── pom.xml
└── src
    └── main
        └── java
            └── AssemblyExample.java
$ cat pom.xml
<project
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>myproject</artifactId>
    <name>My Projects</name>
    <version>0.1</version>
    <build><plugins><plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2.1</version>
        <configuration><descriptors>
            <descriptor>assembly.xml</descriptor>
        </descriptors></configuration>
        <executions> <execution>
            <phase>package</phase>
            <goals><goal>attached</goal></goals>
        </execution></executions>
    </plugin></plugins></build>
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.2</version>
        </dependency>
    </dependencies>
</project>
$ cat assembly.xml
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
    <id>ap3</id>

    <formats>
        <format>tar.gz</format>
    </formats>

    <includeBaseDirectory>true</includeBaseDirectory>

    <dependencySets>
        <dependencySet>
            <outputDirectory>jars</outputDirectory>
            <scope>runtime</scope>
        </dependencySet>
    </dependencySets>

</assembly>
$ mvn package
...
[INFO] Compiling 1 source file to /home/andrebal/Desktop/assemblyexample/target/classes
[INFO] 
...
[INFO] Building jar: /home/andrebal/Desktop/assemblyexample/target/myproject-0.1.jar
...
[INFO] --- maven-assembly-plugin:2.2.1:attached (default) @ myproject ---
[INFO] Reading assembly descriptor: assembly.xml
[INFO] Building tar : /home/andrebal/Desktop/assemblyexample/target/myproject-0.1-ap3.tar.gz
...
[INFO] BUILD SUCCESS
$ tar -tzf target/myproject-0.1-ap3.tar.gz 
myproject-0.1/jars/slf4j-log4j12-1.7.2.jar
myproject-0.1/jars/slf4j-api-1.7.2.jar
myproject-0.1/jars/log4j-1.2.17.jar
myproject-0.1/jars/myproject-0.1.jar