- 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
- use the clojure reader to pop each form off that doesn't have the cursor in it.
- 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:
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 = [] |
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
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
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 `
(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))})))) |
(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)))) |
(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 |
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.
* 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 |