Sponsor

DigitalOcean offers the simplest, most developer-friendly cloud platform. It’s optimized to make managing and scaling apps easy with an intuitive API, multiple storage options, integrated firewalls, load balancers and more. Plus - DigitalOcean’s community provides over 2,000 tutorials to help you stay up to date the latest open source software, languages, and frameworks.

Get started with a new user credit for Morning Cup of Coding readers.

Articles

(Jul 01) #math

Before CPUs had built-in functions for trigonometric functions like sine and cosine, developers had to create their own. And while on the surface this may sound like a trivial problem, in reality a lot of these functions had to be approximated because of the constraints of the environment they were used in (like Video Games). In this article we learn about 4 different approximations to sine that are increasingly better than the one before.

(Jul 03) #golang

Anybody who's been reading our newsletter knows how much I'm a fan of compilers and programming language theory. Well, in this deep dive, author Eli Bendersky digs into Go's internals to show us how we can add new types of statements in the language. He walks us through all the different steps we need to know in order to accomplish this.

(Jul 02) #hacks #compression #algorithms

Apparently there's an interesting hack in the ZIP compression algorithm whereupon one can create a file that inflates from a measly 42.374 bytes all the way up to 4.5 PB. In this article David Fifield shows us how to create such a hack and explains why this happens in the first place.

(Jul 04) #php

Another new feature that will be released in PHP 7.4 this September is Preloading. Essentially what this allows us to do is preload a file in memory so that later calls to those files happen instantly. In this article Brent goes a little deeper.

-- * --

Programming language of the day: Regent. "Regent discovers dataflow parallelism in sequential code by computing a dependence graph over tasks, like the one below. Tasks execute as soon as all dependencies are satisfied, and can be distributed automatically over a cluster of (possibly heterogeneous) machines. Because execution follows the original sequential semantics of the code, Regent programs are easy to read and understand."

-- * --

And that''s it for today! Discuss this issue at our subreddit r/morningcupofcoding.

Did you like what you read? Let us know by clicking one of the links below.

Liked - Disliked

I hope you enjoyed reading the latest issue of Morning Cup of Coding. If you did, consider supporting us by becoming a patron (Patreon) for perks like ad-free issues, or via a one-time donation via PayPal.

Cheers,

Pek