Add this file to your AI assistant's system prompt or context to help it avoid common AI writing patterns. Source: tropes.fyi by ossama.is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Please find the full, tested version in | |
| // https://github.com/influxdata/influxdb_iox/blob/fe155e15fb2ad166aee66b0458e63c24a8128dd4/query/src/exec/task.rs#L101-L118 | |
| pub struct DedicatedExecutor { | |
| state: Arc<Mutex<State>>, | |
| } | |
| /// Runs futures (and any `tasks` that are `tokio::task::spawned` by | |
| /// them) on a separate Tokio Executor | |
| struct State { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn send-repl [& [obj]] | |
| (let [in-in (java.io.PipedInputStream.) | |
| in-out (java.io.PipedOutputStream. in-in) | |
| out-in (java.io.PipedInputStream.) | |
| out-out (java.io.PipedOutputStream. out-in) | |
| err-in (java.io.PipedInputStream.) | |
| err-out (java.io.PipedOutputStream. err-in)] | |
| (tap> {:repl/in (clojure.java.io/writer in-out) | |
| :repl/out (clojure.java.io/reader out-in) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defonce ^Logger logger (doto (Logger/getLogger "clojure") | |
| (.setUseParentHandlers false) | |
| (.addHandler | |
| (doto (ConsoleHandler.) | |
| (.setLevel Level/ALL) | |
| (.setFormatter | |
| (proxy [SimpleFormatter] [] | |
| (format [^LogRecord record] | |
| (let [sb (StringBuilder.)] | |
| (.append sb "#:log{") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| // project options | |
| "lib": [ | |
| "ESNext", | |
| "dom" | |
| ], // specifies which default set of type definitions to use ("DOM", "ES6", etc) | |
| "outDir": "lib", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory., | |
| "removeComments": true, // Strips all comments from TypeScript files when converting into JavaScript- you rarely read compiled code so this saves space | |
| "target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: test-foo test-baz | |
| build/foo.a: foo.c | |
| jpm --verbose build | |
| test-foo: build/foo.a | |
| test 42 = $(shell janet -e '(import build/foo :as foo) (print (foo/bar))') | |
| repl-foo: build/foo.a | |
| janet -e '(import build/foo :as foo)' -r |
Appologies if some of these are mis-categorized, I am a Janet newb!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # find * and + to be confusing, trying to use sequence and choice instead | |
| (def peg-simple | |
| ~{:main (capture (some :S))}) | |
| (peg/match peg-simple "hello") # => @["hello"] | |
| # from: | |
| # https://janet-lang.org/docs/peg.html | |
| (defn finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone --single-branch --depth=1 https://github.com/emacs-mirror/emacs.git | |
| cd emacs/ | |
| sudo apt install -y autoconf make gcc texinfo libxpm-dev \ | |
| libjpeg-dev libgif-dev libtiff-dev libpng-dev libgnutls28-dev \ | |
| libncurses5-dev libjansson-dev libharfbuzz-dev | |
| ./autogen.sh | |
| ./configure --with-json --with-modules --with-harfbuzz --with-compress-install \ | |
| --with-threads --with-included-regex --with-zlib --with-cairo --without-rsvg\ | |
| --without-sound --without-imagemagick --without-toolkit-scroll-bars \ | |
| --without-gpm --without-dbus --without-makeinfo --without-pop \ |
NewerOlder