Q: Run SQL Directly on CSV Files

New windows version 1.7.4 has been released which fixes a bug that writes a warning to stdout. Any feedback is most welcomeq is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files). q treats ordinary files as database tables, and supports all SQL constructs, such as WHERE, GROUP BY, JOINs etc. 完全支持所有的字符编码 すべての文字エンコーディングを完全にサポート 모든 문자 인코딩이 완벽하게 지원됩니다 все кодировки символов полностью поддерживаютсяNon-english users: q fully supports all types of encoding. Use "-e data-encoding" to set the input data encoding, "-Q query-encoding" to set the query encoding, and use "-E output-encoding" to set the output encoding.

Link  |  View on HN

A Better Way to Implement Bit-Fields

I noticed when looking at some reference code that there are large structs full of bit-fields, and these turn out to be extremely convenient:extern volatile struct CoreGlobalRegs { volatile struct { volatile bool sesreqscs : 1; volatile bool sesreq : 1; volatile bool vbvalidoven:1; volatile bool vbvalidovval:1; volatile bool avalidoven:1; volatile bool avalidovval:1; volatile bool bvalidoven:1; volatile bool bvalidovval:1; volatile bool hstnegscs:1; volatile bool hnpreq:1; volatile bool HostSetHnpEnable : 1; volatile bool devhnpen:1; volatile unsigned _reserved12_15:4; volatile bool conidsts:1; volatile unsigned dbnctime:1; volatile bool ASessionValid : 1; volatile bool BSessionValid : 1; volatile unsigned OtgVersion : 1; volatile unsigned _reserved21:1; volatile unsigned multvalidbc:5; volatile bool chirpen:1; volatile unsigned _reserved28_31:4; } __attribute__ ((__packed__)) OtgControl; // +0x0 volatile struct { volatile unsigned _reserved0_1 : 2; // @0 volatile bool SessionEndDetected : 1; // @2 volatile unsigned _reserved3_7 : 5; // @3 volatile bool SessionRequestSuccessStatusChange : 1; // @8 volatile bool HostNegotiationSuccessStatusChange : 1; // @9 volatile unsigned _reserved10_16 : 7; // @10 volatile bool HostNegotiationDetected : 1; // @17 volatile bool ADeviceTimeoutChange : 1; // @18 volatile bool DebounceDone : 1; // @19 volatile unsigned _reserved20_31 : 12; // @20 } __attribute__ ((__packed__)) OtgInterrupt; // +0x4 // ... There is a built-in function which returns an integer type with the specified signness and bit count, and it can be used to get access to uncommon integer types like this:const i13 = @intType(true, 13);These uncommon integer types work like normal integer types. Fields with integer types take up exactly as many bits as the integer type specifies. You may notice that we do a bit of setup before declaring the struct by creating these integer types. But perhaps more integer types can be provided as primitive types, or perhaps there will be a standard library file to import and get more integer types.

Link  |  View on HN

Fast line-following robots

Curvilinear coordinatesA line-following robot lives in a curvilinear coordinate system: all measurements of position are relative to a line which has some (probably varying) curvature. Therefore instead of saying the robot has an x, y position and maybe an angle θ, I try to follow the notation I’ve seen in the robotics / automotive control literature. Here’s a little simulation:Pure Proportional ControlKp vcontrol:This is the first thing I tried, and is about as far as many people get when making line-following robots. If we know the curvature of the path we’re following, we can just add that in to our control signal. Target velocity in a curveThe above give us control targets for curvature, but don’t say anything about exactly how fast we should be driving in a turn.

Link  |  View on HN

Storing data on videotape (1975)

Storing data on videotapeOne of the problems in high-energy physics experiments is the handling and storage of large volumes of data. Since August, ESO astronomers have been making a spectroscopic study of these objects with the 1.5 m telescope at La Silla. These observations whet the appetite for the use of the ESO 3.6 m telescope now being built in collaboration with CERN. Named Comet West after its discoverer, R M West, it is anticipated that the comet will pass within 30 million kilometres of the Sun on 26 February 1976. Today, a profusion of telescopes invariably steals the show with the kind of glorious images that regularly feature on the CERN Courier Astrowatch pages.

Link  |  View on HN

Shop Safe This Holiday Season

Teddy bears that connect to the internet. Smart speakers that listen to commands. Great gifts—unless they spy on you. We created this guide to help you buy safe, secure products this holiday season.

Link  |  View on HN

Astronomers discover super-Earth around Barnard's star

Credit: Credit ESO-M. Kornmesser Astronomers have discovered a planet in orbit around one of the closest stars to the Sun, Barnard's star. The potentially rocky planet, known as Barnard's star b, is a 'super-Earth' with a mass of at least 3.2 times that of the Earth, and it orbits around its host star once every 233 days. Artist’s impression of Barnard’s Star planet under the orange tinted light from the star. Credit: IEEC/Science-Wave - Guillem RamisaAt nearly six light-years away Barnard's star is the next closest star to the Sun after the Alpha Centauri triple system. Barnard’s star is the second closest star system, and the nearest single star to us.

Link  |  View on HN

DeepMasterPrints: synthetic fingerprints matching a large number of fingerprints

Link  |  View on HN

VisBug: Brings design tool interactions and hotkeys to the browser

🤔 It's not: A competitor to design tools like Figma, Sketch, XD, etc; it's a complementto design tools like Figma, Sketch, XD, etc; Something you would use to start from scratchA design system recognizer , enforcer, enabler, or anything, enforcer, enabler, or anything An interaction prototyping toolInstallationAdd to your browserChrome ExtensionFirefox Add-on (coming soon!) They are sag positioned overtop the elements to provide the same visual feedback that design tools do. npm run build to verify your change doesn't increase output size. npm test to make sure your change doesn't break anything. to make sure your change doesn't break anything.

Link  |  View on HN

Fully self-directed replication

HistoryThe field of artificial life is often ascribed to Christopher Langton’s self-replicating loops. Comparison of replicatorsFor an n-state k-neighbour cellular automaton, there are different rules, where is the number of distinct neighbourhoods that can occur. If we look again at the video:we can see that, macroscopically, it copies itself in all four directions similar to Langton’s loops. We call this construct a metacell because it emulates a single cell in a (8-state 4-neighbour) cellular automaton using a large collection of cells in the underlying (2-state 9-neighbour) cellular automaton. Interestingly, every 2-state 9-neighbour cellular automaton can be emulated at half the speed as an 8-state 4-neighbour cellular automaton.

Link  |  View on HN

When Hospitals Merge to Save Money, Patients Often Pay More

Dignity Health and Catholic Health Initiatives, two large chains, are expected to become one of the nation’s largest groups — with 139 hospitals in 28 states — by the end of the year. And two of Texas’ biggest systems, Baylor Scott & White Health and Memorial Hermann Health System, recently announced plans to combine. Yale New Haven Health, one of the largest hospital groups in Connecticut, took over the only competing hospital in the city and has also aggressively expanded along the state’s coast. The group recently added another hospital to its collection, merging Milford with its Bridgeport location. Prices rise even more steeply when these large hospital systems buy doctors’ groups, according to Richard Scheffler, director of the Petris Center.

Link  |  View on HN