Skip to content

Instantly share code, notes, and snippets.

View whostolebenfrog's full-sized avatar

Ben Griffiths whostolebenfrog

View GitHub Profile
@whostolebenfrog
whostolebenfrog / null-fields-schema.graphql
Last active October 29, 2019 10:57
Nullable fields GraphQL example
type Push {
commits: [Commit]
}
type Commit {
sha: String!
}
@whostolebenfrog
whostolebenfrog / error-at-path.json
Last active October 28, 2019 16:13
GraphQL error at a path in the request example
{
"errors": [
{
"message": "Not authorized to access this field",
"locations": [ { "line": 3, "column": 10 } ],
"path": [ "User", "secrets" ],
"extensions": {
"code": "UNAUTHORIZED"
}
},
@whostolebenfrog
whostolebenfrog / minimal-error.json
Created October 28, 2019 14:56
The minimal error response for a GraphQL api
{
"errors": [
{
"message": "Authentication failure"
}
]
}
@whostolebenfrog
whostolebenfrog / push-example.graphql
Created October 28, 2019 11:44
Example of a Push and child data on the Atomist API
{
Push {
commits {
sha
message
author {
name
}
image {
imageName
@whostolebenfrog
whostolebenfrog / gist:17ac0ce63073668b719c
Created December 4, 2014 16:51
Clojure exchange 2014, ephemeral first data structures
Wished he had been able to go with Transient-First data structures, but they don't feel like that from a user point of view.
The whole point of transient is to take data structures and to make them go fast.
Ephemeral is take persistent structures, do interesting things to them.
Maybe persistent-first data structures!
Basic concepts;
- transients
@whostolebenfrog
whostolebenfrog / gist:18b6a9c7c4efeb556178
Created December 4, 2014 10:33
Clojure exchange 2014, automation, animation, art and dance
Automation, animation, art and dance
Generative visuals
Twissle - parameter automation library, gets params at values for the right time, smooths between two values basically.
- start with a state
- locate / sample the sequence at a time
- actually an interesting programming approach, wonder if it's worth thinking about more problems in this way (sequencing a series over the time and sampling)
tween.clj - just the tweening functions.
@whostolebenfrog
whostolebenfrog / gist:357a8d081ed0a722ccde
Created December 4, 2014 09:38
Clojure Exchange 2014 - resource management in clojure
Clojure lazy + side-effects is a little odd
Resources
- file handlers
- db stuff
This is where the problem exists in clojure as these parts aren't fun.
Short lived handles;
@whostolebenfrog
whostolebenfrog / gist:fda46a53291efaacc145
Created December 4, 2014 09:26
Clojure Exchange 2014 - Pathogens and Parentheses
Clojure and molecular serotyping of infectious disease
@rsslldnphy
Stuart Sierra's component library - lots of people doing these days?
Args being passed into functions that don't really need them, just for routing the args to the right place.
-- pushed the code from high level functions back up to the top level. not abstracting! interesting
Decided not to use protocols
@whostolebenfrog
whostolebenfrog / gist:6341d01b1ca14030e5e2
Created December 4, 2014 09:13
Clojure Exchange 2014 - FlatGUI
Clojure GUIs with FlatGUI
Problems with traditional approach.
- incidental complexity
- testing difficult
Looking for another way
- framework
- only need to concentrate on the app logic
- logic in one place
@whostolebenfrog
whostolebenfrog / keybase.md
Created October 6, 2014 15:48
keybase proof

Keybase proof

I hereby claim:

  • I am whostolebenfrog on github.
  • I am wsbfg (https://keybase.io/wsbfg) on keybase.
  • I have a public key whose fingerprint is CDB6 CF2C 2EF6 2F0D 3B1F 76F5 BE5B 56E5 ADC0 B0F7

To claim this, I am signing this object: