- Pastebot
- GIF Brewery
- Slack
- Keynote/Pages/Numbers
- 1Password
- OmniFocus 3
- Airmail 3
- iA Writer
| Why do compilers even bother with exploiting undefinedness signed overflow? And what are those | |
| mysterious cases where it helps? | |
| A lot of people (myself included) are against transforms that aggressively exploit undefined behavior, but | |
| I think it's useful to know what compiler writers are accomplishing by this. | |
| TL;DR: C doesn't work very well if int!=register width, but (for backwards compat) int is 32-bit on all | |
| major 64-bit targets, and this causes quite hairy problems for code generation and optimization in some | |
| fairly common cases. The signed overflow UB exploitation is an attempt to work around this. |
| //app/Models/Page.php | |
| <?php | |
| namespace App\Models; | |
| use A17\Twill\Models\Behaviors\HasBlocks; | |
| use A17\Twill\Models\Behaviors\HasSlug; | |
| use A17\Twill\Models\Behaviors\HasMedias; | |
| use A17\Twill\Models\Behaviors\HasRevisions; |
Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube
We're getting Constructable Stylesheets. This seems like an intuitive value to obtain when importing CSS from JavaScript, since it's the DOM's representation of a Stylesheet:
import stylesheet from './style.css';
console.log(stylesheet); // CSSStyleSheetNo such system is in place to allow this to work (see [whatwg/loader]), however frontend build tooling has congregated around this approach as a mechanism for bringing CSS assets into the JavaScript module graph. There are many benefits to be obtained from moving CSS into this graph, however the most important is that imported CSS can be attributed to the consuming JS Module. This allows it to be bundled, optimized, and potentially dead-code-eliminated leveraging static analysis performed on the surrounding module graph.
| module.exports = (babel, options = {}) => { | |
| const { types: t } = babel; | |
| return { | |
| name: "optimize-tagged-templates", | |
| visitor: { | |
| TemplateLiteral(path) { | |
| for (let i=0; i<path.node.expressions.length; i++) { | |
| const expr = path.node.expressions[i]; | |
| let isLiteral = t.isStringLiteral(expr); |
| { | |
| "name": "rsms dark v2 mono", | |
| "author": "rsms", | |
| "variables": { | |
| "red": "hsl(5, 0%, 50%)", | |
| "orange": "hsl(27, 0%, 50%)", | |
| "yellow": "hsl(60, 0%, 50%)", | |
| "green": "hsl(150, 0%, 43%)", | |
| "cyan": "hsl(180, 0%, 50%)", | |
| "blue": "hsl(210, 0%, 50%)", |
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
| export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
| export const render=(e,d,t=d.t||(d.t={}),p,r,c,m,y)=> | |
| // arrays | |
| e.map?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
| // components | |
| e.t.call?(e.i=render((render.c=e).t(Object.assign({children:e.c},e.p),e.s=t.s||{},t=> | |
| render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),d.t=t=e):( | |
| // create notes | |
| m=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
| // diff props |
| import React, { useEffect } from "react" | |
| import { META_DESCRIPTION } from "../../util" | |
| export const Page: React.FC<{ | |
| title?: string | |
| metaDescription?: string | |
| }> = props => { | |
| useEffect(() => { | |
| document.title = props.title ?? "Execute Program" |
