Emulator basics: a stack and register machine

Emulator basics: a stack and register machine

We’ll make the following registers available for modification and use by the program(mer):

The register is used by the virtual machine for tracking the location of the last entry in the stack. After every instruction the virtual machine will increment the value in this register — except for a few special instructions like and . Without memory addresses it’s a simple function:

We need to do some hacking to support memory addresses:

This instruction will combine both registers and store the result in the first, then increment the register.

Source: notes.eatonphil.com

Versioning Your Home Directory

Versioning Your Home Directory

Bonus points for making it a public repository so others can take a look at your stuff and possibly get inspiration for improvements in their workflow, just make sure you don’t commit any private keys. As you can see, it contains my , a directory with various scripts and some other stuff I’ve created while doing what I do best, fidgeting around a computer. You can start your own version by simply initializing a Git repository in your home directory.

Source: martinovic.blog

Master of the Game (1998)

Master of the Game (1998)

If anyone has more history in computer games, Crick hasn’t met him. The son of a Nobel Prize winner, Crick was among the first in the door when the video game business exploded in the early 1980s. “The idea that you could sell a computer game was beyond anyone’s comprehension at that time,” said Crick, whose beard is graying, although he wants his age kept secret.

Source: crick.com

A restaurant owner who asked for 1-star Yelp reviews

A restaurant owner who asked for 1-star Yelp reviews

In 2014, chef Davide Cerretini advertised a special that would forever change his fate: Anyone who left his restaurant a 1-star review on Yelp would get 25% off a pizza. Yelp rebuffed Cerretini’s extortion claims, instead attributing the removal of positive Botto Bistro reviews to the platform’s algorithm, which routinely filters reviews based on a number of criteria (which are not public). In a few days’ time, Botto Bistro’s Yelp page attracted more than 2,300 1-star ratings (95% of its total reviews) extolling the good food, proper service, and rustic ambiance.

Source: thehustle.co

FCC vote paves way for budget cap on all universal-service broadband programs

FCC vote paves way for budget cap on all universal-service broadband programs

The Federal Communications Commission has preliminarily voted to cap spending on the FCC’s Universal Service programs, which deploy broadband to poor people and to rural and other underserved areas. Pai’s plan, as we previously reported, would set a combined cap of $11.4 billion on the four programs that make up the Universal Service Fund (USF). FCC Republican Commissioner Michael O’Rielly defended the combined cap for all Universal Service programs.

Source: arstechnica.com

Pictures show cracks in Ayrshire nuclear reactor

Pictures show cracks in Ayrshire nuclear reactor

Media playback is unsupported on your device

Media captionPictures show cracks appear in the nuclear reactor [EDF Energy]
The first pictures have emerged of cracking in the graphite bricks which make up the core of nuclear reactors at Hunterston B Power Station in Ayrshire. Image caption

The reactor core is made up of 3,000 bricks and the cracks run the full length of 1 in 10 of them

The company accepts that the cracking is ‘life-limiting’ for the reactor but will not say what it believes to be a limit beyond which it would be unsafe to operate. Image caption

The two reactors at Hunterston B can generate enough electricity to power 1.8 million homes.

Source: www.bbc.com

Sharing Books with My Dad in Prison

Sharing Books with My Dad in Prison

Standing in the dusty basement of Freebird after packing up dozens of books bound for Texas—which operates one of the toughest book policies in the country—I ask Beena Ahmed, a Books Through Bars NYC coordinator, why she thinks prison authorities resist efforts to improve access. Undoubtedly, these private vendors would benefit from any policy that forced the prison population to only procure books through their services. Access to books in prison isn’t the only problem; censorship is broad and the motives for banning books arbitrary.

Source: lithub.com

Many Swiss farmers use honor system to sell their products

Many Swiss farmers use honor system to sell their products

This is how the honesty system works: at a Swiss farm stand near Signy Avenex, every pumpkin has a price tag on it. Christiane Baumgartner, the co-owner of the farm, said to Business Fondue that many farmers in Switzerland can sell products using the honor system because most people are honest. Apart from running her own self-service store, Baumgartner buys many products from other local unmanned farm stands or shops.

Source: www.businessfondue.com

Types and Tests

Types and Tests

On the other hand, since I’m not using a static type system my tests make no sense if I don’t assume that the elements in the result set come from the source list. If you call this function from a module that you wrote with tests, using something as effective as the TDD discipline, you won’t be passing or negative numbers, or any other form of invalid arguments. This is the crux of the argument between Mark and I. I claim that the number of tests required are only those tests that are necessary to describe the correct behavior of the system.

Source: blog.cleancoder.com

LLVM Adding Support for IBM Mass Library for Power Vectorization

LLVM Adding Support for IBM Mass Library for Power Vectorization

A new addition to the LLVM code-base this week is initial support for IBM’s MASS vectorization library.IBM Mathematical Acceleration Subsystem (MASS) are a set of libraries with optimized versions of frequently-used mathematical functions and vectorized to make use of POWER hardware’s high core/thread counts. Those wanting to learn more about the MASS libraries can do so on IBM.com The LLVM code provides initial support for vectorization using the MASS vector library routines when using the -vector-library=MASSV for the LLVM compiler stack.The review of this IBM MASS vectorization library optional support has been ongoing for a while but now merged . It will be interesting to benchmark when time allows on the Raptor Blackbird / Talos II to see if using this vectorization library makes a meaningful difference at this stage.This addition is in the Git/SVN code for this fall’s LLVM 9.0 release.

Source: www.phoronix.com