Skip to content

Instantly share code, notes, and snippets.

@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
{"ISO 693-3":"aaa","Language Name":"Ghotuo","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaa"}
{"ISO 693-3":"aab","Language Name":"Arum","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aab"}
{"ISO 693-3":"aac","Language Name":"Ari","Language Family":"Trans-New Guinea","Subgrouping":"Gogodala-Suki","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aac"}
{"ISO 693-3":"aad","Language Name":"Amal","Language Family":"Sepik","Subgrouping":"Iwam","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aad"}
{"ISO 693-3":"aaf","Language Name":"Aranadan","Language Family":"Dravidian","Subgrouping":"Southern","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaf"}
{"ISO 693-3":"aai","Language Name":"Miniafia Oyan","Language Family":"Austronesian","Subgrouping":"Malayo-Pol
@eugeneyan
eugeneyan / mandelbrot-mojo.md
Last active April 4, 2024 15:52
Benchmarking Mojo vs. Python on Mandelbrot sets

Mandelbrot in Mojo with Python plots

Not only Mojo is great for writing high-performance code, but it also allows us to leverage huge Python ecosystem of libraries and tools. With seamless Python interoperability, Mojo can use Python for what it's good at, especially GUIs, without sacrificing performance in critical code. Let's take the classic Mandelbrot set algorithm and implement it in Mojo.

We'll introduce a Complex type and use it in our implementation.

Mandelbrot in python

@kconner
kconner / macOS Internals.md
Last active April 22, 2024 21:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

Why not: from Common Lisp to Julia

This article is a response to mfiano’s From Common Lisp to Julia which might also convey some developments happening in Common Lisp. I do not intend to suggest that someone coming from a Matlab, R, or Python background should pickup Common Lisp. Julia is a reasonably good language when compared to what it intends to replace. You should pickup Common Lisp only if you are interested in programming in general, not limited to scientific computing, and envision yourself writing code for the rest of your life. It will expand your mind to what is possible, and that goes beyond the macro system. Along the same lines though, you should also pickup C, Haskell, Forth, and perhaps a few other languages that have some noteworthy things to teach, and that I too have been to lazy to learn.

/I also do not intend to offend anyone. I’m okay with criticizing Common Lisp (I myself have done it below!), but I want t

@steveruizok
steveruizok / findSnapPoints.ts
Last active June 23, 2023 01:50
Find the snap points between a bounding box and several other bounding boxes.
interface TLBoundsWithCenter {
minX: number
midX: number
maxX: number
minY: number
midY: number
maxY: number
width: number
height: number
}
@dangerous
dangerous / gist:98b2b158b5625f837b8bdce43a965b3f
Created October 14, 2021 07:09
First 10000 reddit users sourced from karmalb
1. kn0thing
2. spez
3. third
4. fifth
5. fourth
6. agentorange
7. chickenlittle
8. erzengel
9. fizzypop
10. madmax2
@brendanzab
brendanzab / gist:d41c3ae485d66c07178749eaeeb9e5f7
Last active July 19, 2023 04:28
My personal list of Rust grievances (September 2021)

September 2022:

This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.

Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.

My personal list of Rust gr

@saurabh2590
saurabh2590 / problem_statement.md
Last active March 15, 2021 09:56
Hands On Session

Problem statement

Suppose, you have these input list of tuples (an ‘old’ one and a ‘new’ one):

_old = [
    ('A', 1, 2, 3),
    ('B', 1, 2, 3),
    ('D', 1, 2, 3),
    ('E', 1, 3, 3),
    ('F', 1, 2, 3),
    ('G', 1, 2, 3),
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme