Skip to content

Instantly share code, notes, and snippets.

View bobbicodes's full-sized avatar
💭
Moved to bobbicodes on Codeberg

Bobbi Towers bobbicodes

💭
Moved to bobbicodes on Codeberg
View GitHub Profile
@bobbicodes
bobbicodes / nsfDriver.js
Last active March 2, 2024 17:57
NSF Driver - Assembles an NES ROM from music data
const nsfFormat = [0x4e, 0x45, 0x53, 0x4d, 0x1a]
const version = 1
let totalSongs = 1
let startingSong = 1
const loadAdr = [0x00, 0x80]
const initAdr = [0x00, 0x80]
const playAdr = [0x09, 0x80]
function pad32(string) {
let name = []
@bobbicodes
bobbicodes / notes.md
Last active June 26, 2023 05:07
Inline evaluation design notes
  • Trying to implement eval-top-level-form is harder than I thought.
    • It seems so simple... just find the form the cursor is in and evaluate it.
    • I can think of 2 ways:
      • use the clojure reader to pop each form off that doesn't have the cursor in it.
        • Where this gets tricky is keeping track of where the cursor is when we are chopping off code, we could count the forms as they are removed and reposition the cursor, but then we have to deal with whitespace and seems like a mess
      • begin at the cursor and expand outward in both directions until we have the entire form
    • I like the second one, it avoids needing to use the reader, feels like it could be done more functionally, and also matches the problem more intuitively I think. Meaning, we look at the cursor and expand outwards.
    • Hold on... I think that doesn't even make sense! The only way we really know that the form is top level is that its enclosing form is the document itself. So we really have to look at the whole thing.
    • So I have this:
@bobbicodes
bobbicodes / lecture-1.md
Last active May 28, 2023 22:36
Micrograd lecture

Intro

hello my name is andre and i've been training deep neural networks for a bit more than a decade and in this lecture i'd like to show you what neural network training looks like under the hood so in particular we are going to start with a blank jupiter notebook and by the end of this lecture we will define and train in neural net and you'll get to see everything that goes on under the hood and exactly sort of how that works on an intuitive level

micrograd overview

now specifically what i would like to do is i would like to take you through building of micrograd now micrograd is this library that i released on github about two years ago but at the time i only uploaded the source code and you'd have to go in by yourself and really figure out how it works so in this lecture i will take you through it step by step and kind of comment on all the pieces of it

@bobbicodes
bobbicodes / exercism-clojure-2.md
Last active April 29, 2023 20:42
Clojurists Together project update #2

Inline evaluation via SCI

I'm very excited about this feature because it transforms the online editor into a proper interactive Clojure environment. When the track was first launched in 2021 we received some valuable feedback from fellow Clojurists, who said that the online editor was quite lacking to someone familiar with using an editor connected REPL. I too consider this an inseparable part of the Clojure development experience, so this is something I've wanted to do for a long time.

Once I prototyped the desired behavior using Nextjournal's clojure-mode, the next task was to figure out how to best integrate it into the existing Ruby on Rails/React application while making as minimal impact on the codebase as possible. The first thing I tried was to use scittle to load SCI via the `

@bobbicodes
bobbicodes / codemirror.cljs
Last active April 16, 2023 11:40
Inline eval with Codemirror 6 and scittle
(require '[clojure.string :as str])
(declare cm)
(defn eval-string [s]
(when-some [code (not-empty (str/trim s))]
(try {:result (js/scittle.core.eval_string code)}
(catch js/Error e
{:error (str (.-message e))}))))
@bobbicodes
bobbicodes / graph.clj
Last active April 3, 2023 05:13
Clojure syllabus concept graph
(ns server.core
(:require [ring.adapter.jetty :as jetty]
[ring.middleware.resource :refer [wrap-resource]]
[com.phronemophobic.clj-graphviz :refer [render-graph]]
[hiccup.page :refer [html5]]
[clojure.data.json :as json]
[clojure.pprint :as pp]))
(def exercises (:concept (:exercises (json/read-str (slurp "https://raw.githubusercontent.com/exercism/clojure/main/config.json") :key-fn keyword))))
@bobbicodes
bobbicodes / core.clj
Last active March 27, 2023 09:26
bobbi.codes server
(ns ring-app.core
(:require [clojure.java.shell :as sh]
[ring.adapter.jetty :as jetty]
[ring.util.response :as response]
[ring.middleware.resource :as resource]
[clojure.pprint :as pprint]))
(defonce server (atom nil))
(defn cents
@bobbicodes
bobbicodes / devjourney.md
Created January 10, 2023 23:51
DevJourney Podcast preparation notes

DevJourney Podcast outline

It's incredibly timely to be doing this now, because up until this very month, I thought it was a bit of a stretch to call me "successful".

Most of my experience in software is through volunteering for Exercism and even when you contacted me about doing this, I was technically unemployed.

This just changed a couple of weeks ago, when I received my first sponsorship to work on open source!

In preparation for this, I kind of accidentally got addicted to your podcast, and have spent a huge amount of time listening to the back episodes, trying to recognize common themes, and thinking about what qualities are expresses by my favorite guests.

@bobbicodes
bobbicodes / social-media.md
Created January 1, 2023 00:15
Social media and psychological exploitation

Social media has become an integral part of our daily lives, with billions of people around the world using platforms like Facebook, Instagram, and Twitter on a regular basis. These networks have revolutionized the way we communicate and share information, but they have also been criticized for the way they exploit our psychological vulnerabilities to keep us hooked. In this article, we'll explore how each of the major social networks targets a different part of our psychology to keep us coming back for more.

Facebook is the oldest and largest of the social networks, with over 2.8 billion monthly active users as of 2021. It is designed to foster connection and community, and it does this by tapping into our need for social validation and belonging. When we see our friends and family posting about their lives and accomplishments, we feel a sense of connection and validation. This is reinforced by the "like" and comment feature, which gives us a hit of dopamine every time someone engages with our content. Face

* red chili peppers (green ones are unripe)
* 1 can chipotles in tomato sauce
* 1 can corn
* 2-3 large onions (or more smaller ones)
* 12 oz plant-based protein (Impossible Sausage is great)
* 1 pkg Lipton onion soup mix
* Beans/lentils
* pearl barley
* potatoes
* many many cloves of garlic