Skip to content

Instantly share code, notes, and snippets.

View abiduzz420's full-sized avatar
🐧
tinkering with compilery stuff

Uzair abiduzz420

🐧
tinkering with compilery stuff
View GitHub Profile
@swyxio
swyxio / final submission.md
Last active April 22, 2023 19:17
Why React is Not Reactive - React Rally CFP

This is the CFP for my React Rally talk, which was eventually accepted and given here: https://www.youtube.com/watch?v=nyFHR0dDZo0.

If you are a first time speaker, my CFP advice for new speakers is here.

Final Submission: Why React is not Reactive

Functional-reactive libraries like RxJS make it easy to understand how data changes, giving us tools to declaratively handle events and manage state. But while our render methods react to state changes, React isn’t reactive. Instead, we write imperative event-handlers, and trip up on gotchas like async setState and race conditions. Why? In this talk we build a Reactive React to show the difference between the "push" and "pull" paradigms of data flow and understand why React chooses to manage Scheduling as a core Design Principle, enabling awesome features like async rendering and Suspense!

Theme: This talk is a deep dive into React's core design principle around scheduling. Instead of abstr

(ns scratch
(:require [clojure.spec.alpha :as s]))
(def cards
[{:suite :diamonds
:value :king}
{:suite :clubs
:value 4}])
(def cards-sorted
@rohitvvv
rohitvvv / ScaryFibonacii.clj
Created January 19, 2018 18:25
Scary Fibonacci
(ns overtone.core)
(use 'overtone.live)
(use 'overtone.inst.piano)
(defn fibn
"Find nth fibonacii number"
[n]
(loop [index 0 x 1 y 1]
(if (= index n)
y
@reborg
reborg / tic-tac-toe.clj
Last active February 13, 2018 09:32
The ultimate searching winning position tic-tac-toe algo.
;; Playing with conciness and expressivity in Clojure.
;; Not an exercise in efficiency, there are better solutions.
;; It works for different NxN sizes and it's lazy, stopping
;; at the first winning combination for the given player.
(defn winner? [player game]
(let [size (count game)
idxs (range size)]
(->> [[x idx] [idx y] [idx idx] [idx (- (dec size) idx)]]
(map (fn [[x y]] ((game x) y)))
@reborg
reborg / parallel-lazy-merge-sort.clj
Last active November 28, 2017 03:03
Clojure parallel-lazy merge-sort
;; PARALLEL LAZY MERGE-SORT
;; Allows large datasets (that would otherwise not fit into memory)
;; to be sorted in parallel on a single machine.
;; Data to fetch is identified by a range of IDs. IDs are split into
;; chunks that are sent in parallel to a fork-join thread pool
;; (using reducers). A protocol allows to define a policy to fetch
;; the data for the current ID range. The chunk is sorted and saved
;; to disk. A file handle is returned from each thread pointing at
;; a temp file containing the sorted chunk. The list of file handles
@banunatina
banunatina / curl.md
Created March 3, 2016 20:40 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@parmentf
parmentf / GitCommitEmoji.md
Last active May 9, 2024 13:47
Git Commit message Emoji
@gokulkrishh
gokulkrishh / media-query.css
Last active May 8, 2024 06:59
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@hauntedhost
hauntedhost / learn-haskell.md
Last active January 30, 2022 12:58
haskell learning resources

free:

@jhermann
jhermann / git-commit-emojis.md
Last active September 23, 2023 07:09
Useful emoji for git commit messages

Useful emoji for git commit messages

If you add emoji to your commit messages for a GitHub repo, they become less boring, and you can convey the kind of change you're adding. See the full set of GitHub supported emoji here (also useful for easy copy&paste via a simple click).

Example commit message

The following is a possible scheme to use: