Skip to content

Instantly share code, notes, and snippets.

View bennn's full-sized avatar

Ben Greenman bennn

View GitHub Profile
@robole
robole / telemetry.json
Last active October 21, 2023 06:09
VS Code Telemetry
{
"vscode-core": {
"events": {
"extensionGallery:install": {
"success": {
"classification": "SystemMetaData",
"purpose": "PerformanceAndHealth",
"endPoint": "none",
"isMeasurement": true
},
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active March 18, 2024 14:57
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@brianhempel
brianhempel / remove_rightslink_images
Last active April 23, 2021 20:31
Remove ugly “RightsLink” images in PDFs from the new ACM Digital Library.
@LiberalArtist
LiberalArtist / default-lightbulb.png
Last active October 2, 2019 01:20
A Racket lightbulb for the Standard Fish Summer Competition 2019
default-lightbulb.png
@alex-hhh
alex-hhh / colormap.rkt
Last active March 21, 2022 06:51
plot color maps
#lang racket
(require racket/draw
racket/promise
plot
plot/utils
pict)
;; These color maps correspond to the Matplotlib 3.0.3 qualitative color maps
;; with the same names. See
;; https://matplotlib.org/examples/color/colormaps_reference.html
#lang scratch
(require compiler/zo-structs
(for-syntax compiler/zo-structs
racket/struct-info))
(begin-for-syntax
(define-values (exports expsyn)
(module->exports 'compiler/zo-structs))
(define struct-types
@AndiH
AndiH / tikz-arrows.pdf
Last active April 23, 2024 01:54
TikZ Arrow Tip Overview
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#lang racket
;; Updated plot library required, https://github.com/alex-hhh/plot/tree/ah/interactive-overlays
(require plot pict)
;; Helper function to add a pict as a plot overlay -- don't want to add "pict"
;; as a dependency to the "plot" package
(define (add-pict-overlay plot-snip x y pict)
(send plot-snip add-general-overlay x y
(lambda (dc x y) (draw-pict pict dc x y))
(pict-width pict)
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 6, 2024 20:05
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@guifromrio
guifromrio / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.