Skip to content

Instantly share code, notes, and snippets.

View vncsna's full-sized avatar
🏡
Working from home

Vinicius Aguiar vncsna

🏡
Working from home
View GitHub Profile

Bend vs Reality

TLDR: I understand the proposal of Bend, but when the efficiency performance 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 it can compete, so you should likely take it. 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 will make the RTX 4090 results 10x faster, but keep always in mind, a RTX 4090 still uses at least 100 times more power than a single M3 core at any instant and that in principle GPUs are better for purely parallel tasks.

Also keep in mind that this is a very friendly code to parallelism, this is both against Bend and in favour of it, most real code is not pur

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 June 14, 2024 16:40
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 April 4, 2024 23:56
Reuse `puppeteer` cookies in `tough-cookie` and `got`
@MauricioMoraes
MauricioMoraes / access_postgresql_with_docker.md
Last active May 27, 2024 01: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

@EgZvor
EgZvor / rxvt_dracula.Xresources
Last active December 11, 2021 00:00
Dracula theme for rxvt terminal
! Dracula color scheme
URxvt.foreground: #F8F8F2
URxvt.background: #282A36
URxvt.color0: #000000
URxvt.color8: #44475A
URxvt.color1: #FF5555
URxvt.color9: #FFB86C
URxvt.color2: #50FA7B
URxvt.color10: #50FA7B
URxvt.color3: #E6DB74