Categories News

Planet Code updates – Andy Balaam’s Blog

Add a comment Your comment Comments welcome. I review them manually, so there will be a delay before they appear. Markdown is allowed. To prevent spam, please type ‘Scheme’ below: Andy’s home page Categories Sitemap RSS Feed No AI was used to create this site or any of…

Read More
Categories News

Make Android Gradle display unit test failure messages

May 10, 2017 [Android, Gradle, Java, Tech, Test Driven] By default, Gradle does not show you what happened when a unit test failed: $ ./gradlew test ... MyTest > Black_is_white FAILED org.junit.ComparisonFailure at MyTest.java:6 ^^^ WHAT ACTUALLY FAILED???? ... This is insane, and can be fixed (thanks to…

Read More
Categories News

C++ iterator example (and an iterable range)

May 11, 2017 [C++, Tech] Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper To make your own iterable range in C++ that you can loop over or make a vector out of (mine is called Numbers): // Prints: // 3,4, for (auto n : Numbers(3, 5)) { std::cout << n…

Read More
Categories News

How to write a programming language ACCU talk

My talk from ACCU Conference 2017 where I describe a tiny programming language I wrote: Slides: How to write a programming language Cell source code: github.com/andybalaam/cell PakarPBN A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used…

Read More
Categories News

C++ iterator wrapping a stream not 1-1

May 17, 2017 [C++, Tech] Series: Iterator, Iterator Wrapper, Non-1-1 Wrapper Sometimes we want to write an iterator that consumes items from some underlying iterator but produces its own items slower than the items it consumes, like this: ColonSep items("aa:foo::x"); // Prints "aa, foo, , x" for(auto s…

Read More
Categories News

Basic ideas of Python 3 asyncio concurrency

May 31, 2017 [Performance, Programming Languages, Python, Tech] Series: asyncio basics, large numbers in parallel, parallel HTTP requests, adding to stdlib Update: see the Python Async Basics video on this topic. Python 3’s asyncio module and the async and await keywords combine to allow us to do cooperative…

Read More
Categories News

Python 3 – large numbers of tasks with limited concurrency

May 31, 2017 [Performance, Programming, Python, Tech] Series: asyncio basics, large numbers in parallel, parallel HTTP requests, adding to stdlib I am interested in running large numbers of tasks in parallel, so I need something like asyncio.as_completed, but taking an iterable instead of a list, and with a…

Read More