https://www.kernel.org/doc/Documentation/process/coding-style.rst
https://stackoverflow.com/questions/1675351/typedef-struct-vs-struct-definitions
interface Lookup<T = any> { | |
[key: string]: T | |
} | |
type IsType<U> = <T>(arg: T & any) => arg is Narrow<T, U> | |
type Narrow<T, U> = [T] extends [Any] ? U : [T] extends [U] ? Extract<T, U> : U | |
type PlainObject<T> = Exclude<T & Lookup, Function | readonly any[]> | |
const is = { | |
arr: Array.isArray as IsType<readonly any[]>, |
/* dust/source/dust/windowmanager/intern/wm_cursors.c */ | |
/** | |
* Custom Cursor Description | |
* ========================= | |
* | |
* Each bit represents a pixel, so 1 byte = 8 pixels, | |
* the bytes go Left to Right. Top to bottom | |
* the bits in a byte go right to left | |
* (ie; 0x01, 0x80 represents a line of 16 pix with the first and last pix set.) | |
* |
GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle, | |
GHOST_GLSettings glSettings) | |
{ | |
GHOST_ISystem *system = (GHOST_ISystem *)systemhandle; | |
return (GHOST_ContextHandle)system->createOffscreenContext(glSettings); | |
} |
Implementing Algebraic Effects in C “Monads for Free in C”
Microsoft Research Technical Report MSR-TR-2017-23 Daan Leijen Microsoft Research Updated by Kielan Lemons [email protected]
Abstract. We describe a full implementation of algebraic effects and handlers as a library in standard and portable C99, where effect operations can be used just like regular C functions. We use formal operational semantics to guide the C implementation at every step where an evaluation context corresponds directly to a particular C execution context. Finally we show a novel extension to the formal semantics to describe optimized tail resumptions and prove that the extension is sound. This gives two orders of magnitude improvement to the performance of tail resumptive operations (up to about 150 million operations per second on a Core [email protected])
Check what is the max no of user_watches being set currently
$ cat /proc/sys/fs/inotify/max_user_watches
Check what is the max no. of inotify instances which correspond to the no. of allowed Watch Services instances.
$ cat /proc/sys/fs/inotify/max_user_instances
import * as React from 'react'; | |
enum ActionTypes { | |
TogglePopover, | |
ClosePopover, | |
SetButton, | |
SetButtonId, | |
SetPanel, | |
SetPanelId, |
class Bar { name: string; constructor(name: string) { this.name = name; } } class Foo extends Bar{ constructor(name: string) { super(name); } getName() {
import * as React from 'react'; | |
import Head from 'next/head'; | |
import Layout from '../components/Layout'; | |
import ProjectCard from '../components/ProjectCard'; | |
/* | |
inline style jsx not globals.css is where css vars | |
and root css styles are being read | |
submenu border is not found | |
has --accents-2: #333; | |
backup color #fff |
https://drafts.csswg.org/css-syntax-3/#input-byte-stream | |
CSS parsing | |
The process consists of | |
bytes->stream codepoints->stream tokens->parse css syntax output | |
The output is a CSSStyleSheet object. | |
1. User agent recieves a stream of bytes | |
(typically coming over the network or | |
from the local file system). |