View what_teaching_could_be
Today, I’d like to put kids in the richest possible environment and let them choose.
It would not be school, with formal classes, summer breaks, and so on.
It would be a safe place that is open all the time.
A place where one might, or might not, encounter people reading aloud in one hall or organizing a puppet show,
with home-made puppets or building a saltwater aquarium with bacterial filters. It would have zoomable
binocular microscopes by the doors to the play areas, so that found leaves and rocks could be examined closely.
I’d want kids to take breaks whenever they feel like it, to play outside or sit with a book in a corner —
even if they kept that up for a year or more. They know who they are and what they need better than we ever will.
View gogo
~ > cat ~/bin/gogo
echo "Good morning Jack!"
echo "******************"
echo "Checking out master..."
git checkout master
echo "Pulling changes..."
reup # my version of this
View gist:35bf12f29c24991523db

The Anatomy of an Onyx Program

In this tutorial, we'll take an in-depth view of what's happening when you execute a simple Onyx program. All of the code can be found in the Onyx Starter repository if you'd like to follow along. The code uses the development environment with HornetQ and ZooKeeper running in memory, so you don't need additional dependencies to run the example for yourself on your machine.

The Workflow

At the core of the program is the workflow - the flow of data that we ingest, apply transformations to, and send to an output for storage. In this program, we're going to ingest some sentences from an input source, split the sentence into individual words, play with capitalization, and add a suffix. Finally, we'll send the transformed data to an output source.

Let's examine the workflow pictorially:

View gist:5d6910c160fc3caa2365
user=> (load-file "src/flow_combine/core.clj")
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See for more info.
[{:n -2} {:n 0} {:n 2} {:n 4} {:n 5} {:n 6} {:n 8} :done]
#onyx.system.OnyxDevelopmentEnv{:logging-config #onyx.logging_configuration.LoggingConfiguration{:file "onyx.log", :config nil}, :log #onyx.log.zookeeper.ZooKeeper{:config {:hornetq/mode :vm, :hornetq.server/type :vm, :hornetq/server? true, :zookeeper/address "", :zookeeper/server? true, :zookeeper.server/port 2186, :onyx/id #uuid "afc875f7-2978-489e-aac4-84e527fa7889"}, :prefix #uuid "afc875f7-2978-489e-aac4-84e527fa7889", :conn #<ZooKeeper State:CLOSED sessionid:0x14ca93bb3a400
View gist:abc50985b12f08684a5c
Thoughts on
1. Better than previous readings (though those were good too! Maybe just too quick?)
2. For visual learners, picturing/seeing chunk of lines is very useful.
2a. This becomes less clear across function calls. Any help in those cases? Similarly, investigation of hard to follow ownership examples will likely be valuable.
3. A 3-4 point quick summary to figure out ownership in any context would be helpful. Not sure how possible this is, but if the essentials can be boiled down to something easily remembered and applied, the overall understanding can grow from repeated application of the correct rules.
4. Know of any editor support for showing ownership? At least in very simple cases it seems straightforward.
5. lifetime, ownership, borrow, etc. They seem to be good choices, but generic enough that they don't help until you already understand things. It might be easier to really nail home the concept and then finally say "and that? That's borro
View gist:23b5de780226d6309194
2.2.0 :058 > def action
2.2.0 :059?> if true
2.2.0 :060?> puts "call some api thing" && return
2.2.0 :061?> end
2.2.0 :062?> puts "does this happen"
2.2.0 :063?> end
=> :action
2.2.0 :064 > action
=> nil
2.2.0 :065 > def action
View points.rb
require "fiddle"
require "fiddle/import"
module RustPoint
extend Fiddle::Importer
dlload "./libpoints.dylib"
extern "Point* make_point(int, int)"
extern "double get_distance(Point*, Point*)"
View gist:a78916919aad71133faa
puts "Example 1: No rescue inside loop"
5.times do |i|
p i
raise "loop stops here"
rescue => e
puts "error caught here: #{e}"
View gist:e625f3a839cae2cc19e6
> factorial n = \
| if n < 1 then 1 \
| else n * factorial (n-1)
[1 of 1] Compiling Repl ( repl-temp-000.elm )
Parse error at (line 6, column 1):
unexpected "i"
expecting newline or spaces
> factorial n = \
| if n < 1 then 1 \
View gist:9884820

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell: 80% completion here is fine if you feel your attention waning, the next thing will address hammering in things like functors and monads via typeclasses. this will hammer in the lessons in a very direct form by forcing you to confront the challenges and lessons learned by the creators and community of Haskell itself. Doing the exercises here is critical for being fluent.

Real World Haskell is available online. (Thanks bos!)