Notation for Social Deduction Games

Notation for Social Deduction Games

Spy Thriller’s original inspiration was a fully offline role-play in which players were assigned to teams and given a simple mission of delivering an object to a target. As teams raced to compete there was plenty of scope for trusting the wrong people either by mistake or through (friendly) malicious play, and to complete the wrong mission meant losing the game. The original instructions went something like this:

Randomly divide players into teams consisting of a captain, a mate and one or more yeomen.

Source: omnisplore.wordpress.com

Show HN: A minimal and idiomatic WebSocket library for Go

Show HN: A minimal and idiomatic WebSocket library for Go

While I believe nhooyr/websocket has a better API than existing libraries, both gorilla/websocket and gobwas/ws were extremely useful in implementing the WebSocket protocol correctly so big thanks to the authors of both. Furthermore, nhooyr/websocket has support for newer Go idioms such as context.Context and also uses net/http’s Client and ResponseWriter directly for WebSocket handshakes. If you want a library that gives you absolute control over everything, this is the library, but for most users, the API provided by nhooyr/websocket will fit better as it is nearly just as performant but much easier to use correctly and idiomatic.

Source: github.com

Why a Traffic Flow Suddenly Turns into a Traffic Jam (2013)

Why a Traffic Flow Suddenly Turns into a Traffic Jam (2013)

In setting out to understand how a phantom traffic jam forms, we first have to be aware of the many effects present in real traffic that could conceivably contribute to a jam: different types of vehicles and drivers, unpredictable behavior, on- and off-ramps, and lane switching, to name just a few. In macroscopic, or “fluid-dynamical,” models, each driver—interpreted as a traffic-fluid particle—observes the local density of traffic around her at any instant in time and accordingly decides on a target velocity: fast, when few cars are nearby, or slow, when the congestion level is high. In macroscopic traffic models, jamitons are the mathematical analog of detonation waves, which naturally occur in explosions.

Source: nautil.us

An Archaeologist Challenges Mainstream Scientific Thinking (2017)

An Archaeologist Challenges Mainstream Scientific Thinking (2017)

And in January, a Université de Montréal PhD candidate, Lauriane Bourgeon, and her colleagues published a new study on Bluefish Caves bones in the journal PLOS One, confirming that humans had butchered horses and other animals there 24,000 years ago. The new findings, says Quentin Mackie, an archaeologist at the University of Victoria in British Columbia who was not a member of the team, are prompting the first serious discussion of Bluefish Caves—nearly 40 years after its excavation. Twenty years later, in 2017, a Université de Montréal team reported new evidence of a human presence at Bluefish Caves 24,000 years ago, just as Cinq-Mars had contended.

Source: www.smithsonianmag.com

The Lost Art of Deadline Writing

The Lost Art of Deadline Writing

Bat meets ball, the essential atomic encounter—and Runyon puts the sound of it, the briefest, most prodigious syllable, right in the center of his column. The surprise and delight of The Great American Sports Page, John Schulian’s selections from a century’s worth of newspaper columns about baseball, boxing, football, gymnastics, and (in one case) swimming the English Channel, is how often it happens—how often the writers connect, how often the prose approaches the condition of flat-out poetry. Or Joe Palmer, in 1951, summoning a vision of the racehorse Man o’ War in motion: “Great chunks of sod sailed up behind the lash of his power.”

Source: www.theatlantic.com

I draw figures for my mathematical lecture notes using Inkscape

I draw figures for my mathematical lecture notes using Inkscape

For ex­am­ple, sup­pose you’re work­ing on the fol­low­ing fig­ure in Inkscape:

To in­clude this fig­ure in a LaTeX doc­u­ment, you’d go to File › Save As, se­lect ‘pdf’ as the ex­ten­sion and then press Save which makes the fol­low­ing di­a­log pop up:

Choos­ing ‘Omit text in pdf and cre­ate LaTeX file’, will save the fig­ure as pdf+LaTeX. When I’m tak­ing notes dur­ing a lec­ture, I need to be able to add a fig­ure with­out dis­rupt­ing my flow, and not spend time open­ing Inkscape, search­ing for the cor­rect di­rec­to­ry, typ­ing the LaTeX code for in­clud­ing the fig­ure man­u­al­ly and so on. The styles I use for draw­ing fig­ures are quite sim­ple:

These op­tions com­bined give the fol­low­ing table of com­mon­ly used styles:

As ap­ply­ing these styles is some­thing I do very fre­quent­ly, I want it to be fast, but using the de­fault short­cuts in Inkscape takes too long.

Source: castel.dev

The bible of doing business with the city of New York

The bible of doing business with the city of New York

The first issue of The City Record, on June 24, 1873, listed a procurement notice for a steamboat engine for the Department of Charities and Corrections. In between lies the vast history of the city and of The City Record, a bottomless trove of municipal minutiae and legally required announcements that calls itself the “Official Journal of the City of New York.” While most New Yorkers have never read, or even heard of, this city-published paper, it is indispensable to many city officials and to those seeking city contracts.

Source: www.nytimes.com

Breweries Helped Keep a Pre-Columbian Empire Together

Breweries Helped Keep a Pre-Columbian Empire Together

Two decades ago, a team of archaeologists excavating the empire’s southernmost administrative center, Cerro Baúl, stumbled upon a unique Wari site: an ancient brewery. By comparing rare elements in these pot shards to the unique elemental compositions of nearby soils, Williams’s team found that the vessels’ clay came from a site about five miles from the brewery. For those looking to create a little unity today, Chicago’s Field Museum, Williams’s home institution, has partnered with an area brewery to create a chicha de molle-inspired Wari Ale, incorporating Peruvian peppercorns and blue corn.

Source: www.atlasobscura.com

PostgreSQL Features to Try

PostgreSQL Features to Try

Starting with version 10, PostgreSQL natively supports sharding of a table into multiple child tables, based on a partition key value computed from one or more column values. You can query and insert at the parent level, and PostgreSQL will route it to the appropriate child table, have a look:

First, we insert two rows:

We can see that the rows are actually inserted into the child tables:

But queries can be done on the parent, returning combined result:

Partitioning is in some ways similar to inheritance (query at parent level), but there are differences too (partition parent contains no data, for example). Here is a table that uses an array column:

Assuming each row represents a blog post, each having a set of tags, here is how we can list all the posts that have both “postgres” and “go” tags:

The usage of the array type here makes for concise data modelling and simpler queries.

Source: pgdash.io

An Unexpected Bible of Million-Dollar Opportunities

An Unexpected Bible of Million-Dollar Opportunities

The first issue of The City Record, on June 24, 1873, listed a procurement notice for a steamboat engine for the Department of Charities and Corrections. In between lies the vast history of the city and of The City Record, a bottomless trove of municipal minutiae and legally required announcements that calls itself the “Official Journal of the City of New York.” While most New Yorkers have never read, or even heard of, this city-published paper, it is indispensable to many city officials and to those seeking city contracts.

Source: www.nytimes.com