Skip to content

Instantly share code, notes, and snippets.

Bend vs Reality

TLDR: I understand the proposal of Bend, but when the efficiency reduction is so big that a RTX 4090 is only 7x faster on a near-optimal scenario than 2 cores of a M3 Max in a language like JavaScript, you should probably not take it.

On the otherhand, easy to use, but opt-in, parallel languages such as OCaml exists and they can compete, so you should likely take those. If you need even more performance, Rust could likely beat the RTX 4090 results on a mobile CPU.

Of course future optimizations should improve Bend results, but my goal here is to show that the current results are not as impressive as they may look, likely a JIT would make the RTX 4090 results 10x faster, but an RTX 4090 still uses at least 100 times more power than a single M3 core at any instant, additionally in principle GPUs are better for purely parallel tasks.

Also this example is a very parallelism friendly, this is both against Bend and in favour of it, most real code is not pure and not a purely binary alg

Como Pensar

Ler e entender um pouco desse artigo. https://wiki.c2.com/?FeynmanAlgorithm

  • Reconhecer como você pensa
  • Descrever métodos que você usa para pensar
  • Entender métodos diferentes de pensar
  • Fazer perguntas sobre tudo(incluindo sobre perguntas)

Perguntas

Examples

[@import stdlib.http.v1];

(x => y => (x_plus_y: x + y) => );

((A, x))
(f: () -> (A: *, x: A)) =>
  (A, x) = (f ());
defmodule Quine do
@header "defmodule Quine do\n @header \""
@indent """
def indent(str) do
str
|> String.split(\"\\n\")
|> Enum.map(&(\" \" <> &1))
|> Enum.join(\"\\n\")
end
@kimjoaoun
kimjoaoun / permissoes.md
Last active January 14, 2022 14:39
Entendendo o sistema de permissoes do Linux

Em Linux todos os arquivos carregam um conjunto de permissões, elas que dizem para o sistema operacional que tipo de operação pode ser executada sobre um arquivo e quem pode executar essas operações. Todo arquivo tem instruções acerca de 3 grupos:

  • owner - Permissões que o dono do arquivo possui

  • group - Permissões que os usuários que fazem parte de determinado grupo possuem.

  • all users - Permissões que todos os usuários cadastrados naquele computador possuem.

owner é aquele que é dono do arquivo. Geralmente - porém não sempre, lembre-se que em Linux aplicações podem operar como um usuário -, este é o indivíduo que criou o arquivo.

name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
MIX_ENV: test
@fnky
fnky / stripe-keys-and-ids.tsv
Last active March 30, 2025 17:52
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@ilyazub
ilyazub / puppeteer-reuse-cookie-in-http-request-from-node.js
Last active January 9, 2025 11:06
Reuse `puppeteer` cookies in `tough-cookie` and `got`
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active April 19, 2025 14:37
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@MauricioMoraes
MauricioMoraes / access_postgresql_with_docker.md
Last active August 30, 2024 05:21
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf