Skip to content

Instantly share code, notes, and snippets.

View simongray's full-sized avatar

Simon Gray simongray

View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active April 26, 2024 09:36
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

(ns app.mappy
#?(:cljs (:require-macros app.mappy))
(:require #?(:clj [datascript.core :as d]) ; database on server
#?(:clj [clojure.data.csv :as csv])
[hyperfiddle.electric :as e]
[hyperfiddle.electric-dom2 :as dom]
[hyperfiddle.electric-ui4 :as ui]
#?(:cljs ["@openlayers-elements/core/ol-map" :as ol-map])
#?(:cljs ["@openlayers-elements/maps/ol-layer-openstreetmap" :as ol-layer-openstreetmap])
#?(:cljs ["@openlayers-elements/core/ol-layer-vector" :as ol-layer-vector])

React.js interop POC — Electric Clojure

20220729.photon.reagent.react.interop.mp4
@derhuerst
derhuerst / list.md
Last active July 17, 2023 12:55
VPS price & performance comparison
@nwh
nwh / naur.md
Created July 20, 2021 22:52 — forked from dpritchett/naur.md
Programming as Theory Building

Programming as Theory Building

Peter Naur, 1985

(copied from http://alistair.cockburn.us/ASD+book+extract%3A+%22Naur,+Ehn,+Musashi%22)

Introduction

The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.

React Native + macOS + Clojurescript

image

Project Catalyst

Since the recent release of Catalina, macOS has shipped with the ability to allow iOS/iPAD apps to run on macOS without any modification via a featureset known as Project Catalyst.

This is exciting, as writing React Native + Clojurescript apps as a target for the desktop is much more compelling than a pure Electron app (imo).

@joyheron
joyheron / custom-elements.cljs
Last active January 22, 2020 10:02
Define Custom Elements in ClojureScript
;; Solution based on https://stackoverflow.com/questions/50295703/create-custom-elements-v1-in-es5-not-es6
(defn define-element! [name on-connect]
(let [my-el (fn [] (this-as this (.construct js/Reflect js/HTMLElement #js [] (.-constructor this))))
_ (set! (.. my-el -prototype) (.create js/Object (.-prototype js/HTMLElement)))
_ (set! (.. my-el -prototype -constructor) my-el)
_ (.setPrototypeOf js/Object my-el js/HTMLElement)
_ (set! (.. my-el -prototype -connectedCallback) on-connect)]
(.define js/customElements name my-el)))
(define-element! :my-element #(.log js/console "hi!"))
Goal CSS 3 XPath
All Elements * //*
All P Elements p //p
All Child Elements p>* //p/*
Element By ID #foo //*[@id=’foo’]
Element By Class .foo //*[contains(@class,’foo’)]
Element With Attribute *[title] //*[@title]
First Child of All P p>*:first-child //p/*[0]
All P with an A child Not possible //p[a]
Next Element p + * //p/following-sibling::*[0]
@lagenorhynque
lagenorhynque / interceptors-into-the-core-of-pedestal.md
Last active November 11, 2022 07:11
Interceptors: Into the Core of Pedestal

Interceptors

Into the Core of Pedestal


カマイルカ🐬/laʒenɔʁɛ̃k/

(defprofile lagénorhynque
@pesterhazy
pesterhazy / react_cljs_es6_classes.cljs
Last active November 7, 2021 17:54
ClojureScript: bare React with ES6 classes (extending React.Component, no createClass or reagent)
(ns demo.react-cljs-es6-classes
(:require [goog.object :as gobj]))
;; Demo of using bare React using ES6 classes (without createClass or reagent)
;;
;; Equivalent of Javascript/JSX:
;;
;; class MyComponent extends React.Component {
;; constructor(props) {
;; super(props);