Skip to content

Instantly share code, notes, and snippets.

View jgcmarins's full-sized avatar

João Marins jgcmarins

View GitHub Profile
@sibelius
sibelius / agile-questions.md
Last active July 4, 2024 19:47
agile-questions
  • do you use feature flags? expand
  • do you use git flow?
  • have you decoupled deploy from release? https://www.honeycomb.io/blog/deploys-wrong-way-change-user-experience
  • do you use sprints?
  • do you have automated tests?
  • do you do refactoring?
  • do you use types (typescript)?
  • how do you manage the project?
  • do you have daily meetings? expand
  • do you have written documentation?

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

@jean-leonco
jean-leonco / _index.tsx
Last active May 11, 2024 20:32
Remix Simple Authentication
import { redirect, type LoaderFunctionArgs } from '@remix-run/node'
import { Form, useLoaderData } from '@remix-run/react'
import { sessionCookie } from '../session.server'
export async function loader({ request }: LoaderFunctionArgs) {
const cookieHeader = request.headers.get('Cookie')
const cookie = await sessionCookie.parse(cookieHeader)
if (!cookie) {
return redirect('/login')
}
@sibelius
sibelius / PixDynamic.tsx
Created October 20, 2023 01:07
useOpenpix
import { useEffect, useState } from 'react';
const value = 100;
const PixDynamic = () => {
const [giftbackValue, setGiftbackValue] = useState(null);
const [giftbackHash, setGiftbackHash] = useState(null);
const [shopperId, setShopperId] = useState(null);
const [modal, setModal] = useState<boolean>(true);
@jgcmarins
jgcmarins / decision-matrix.md
Created September 25, 2023 14:49
Looking for a new career opportunity? Use this table to create a ranking of all job offers

Table of concepts and definitions

Concept Definition
Autonomy How well will this company give me autonomy to do my job?
Freedom How much freedom will I have to balance work and personal life?
Responsibilities What level of responsibilities will I have, and how extensive will they be?
Culture How well does this company's culture align with my values, and how open is the company to allowing me to contribute to the culture I believe in?
Tech Stack How closely does the tech stack used by this company align with my preferences, and to what extent is the company willing to allow me to use the stack I prefer?
Personal Growth How big is the potential of this company to help me keep growing?
@sibelius
sibelius / questions.md
Last active March 20, 2023 22:46
How would you answer that? send in a reply or to me in a DM

1. What is your name, location, and age?

2. Are you currently employed? When would you be available to start?

3. Can you briefly describe (1 to 2 paragraphs) your professional experience? Where have you worked before, what were your responsibilities, etc.?

4. This position requires prior experience in management and leadership. Have you ever led a team in an Engineering Manager or similar role?

5. How would you ensure the efficient delivery of high-quality software products within tight deadlines?

import { Router } from 'next/router';
import { useEffect } from 'react';
import { publicConfig } from '~/shared/config';
import { trpc } from '~/utils/trpc';
let initVersion = publicConfig.GIT_COMMIT;
function useDetectVersionChange() {
const healthQuery = trpc.health.useQuery(undefined, {
refetchInterval: 10_000,
@Amorim33
Amorim33 / barycentrics.md
Last active December 14, 2022 14:35
Busca com Coordenadas Baricêntricas - cpp, openGL.

Exercício de Programação da disciplina de Matrizes, Vetores e Geometria Analítica da EACH-USP

Aluisio Amorim

Estruturas e variáveis globais:

// estrutura para representar um ponto no plano cartesiano
typedef struct {
  double x, y;
} CartesianPoint;
@vit0rr
vit0rr / boolean-churchEncoding.ts
Last active October 30, 2022 00:52
Church encoding of True, False and Or
type TRUE = <A>(a: A) => <B>(b: B) => A;
type FALSE = <A>(a: A) => <B>(b: B) => B;
type OR = <A extends TRUE | FALSE>(a: A) => <B extends TRUE | FALSE>(b: B) => TRUE | FALSE;
// (λx.λy.x)
const TRUE: TRUE = a => b => a;
console.log(TRUE(1)(0));
// (λx.λy.y)
const FALSE: FALSE = a => b => b;
@sibelius
sibelius / woovi_job.md
Last active June 11, 2024 20:47
Woovi Job Description