Posts about Software Dev, Clojure, & Functional Programming
Twitch: twitch.tv/janetacarr
Course: clojureforpros.com
Clojure blog: blog.janetacarr.com
Freelance Blog: fixedrate.dev
I just learned this “live” thingy is in beta for certain twitch streamers.
I just learned this “live” thingy is in beta for certain twitch streamers.
This is 10 lines of code (sans docstring of course).
This is 10 lines of code (sans docstring of course).
This photo is from my blog 🥹
This photo is from my blog 🥹
Send help
Send help
Name all the services then.
Name all the services then.
I’m not a lawyer, but Even if this didn’t contain only OSS, Mac users should be able to build and then run this docker file. (Downloading an image might be different though)
I’m not a lawyer, but Even if this didn’t contain only OSS, Mac users should be able to build and then run this docker file. (Downloading an image might be different though)
I call it the MITease license
I call it the MITease license
CIDER Debugger for Clojure is far easier to use than GNU Debugger to debug a binary. Struggling with GDB might lead someone to shy away from debuggers.
Plus, Taking time to use a debugger when printing works well enough.
Clearly, I'm team debugger tho
CIDER Debugger for Clojure is far easier to use than GNU Debugger to debug a binary. Struggling with GDB might lead someone to shy away from debuggers.
Plus, Taking time to use a debugger when printing works well enough.
Clearly, I'm team debugger tho
`with-setters`
Description
A macro I wrote that adds setters to mutable fields in Clojure type definitions (for my game dev stuff)
When to use it
When you want to piss off every future Clojure developer to touch your code 👇
`with-setters`
Description
A macro I wrote that adds setters to mutable fields in Clojure type definitions (for my game dev stuff)
When to use it
When you want to piss off every future Clojure developer to touch your code 👇
Fun fact, nil is both a value and a type, meaning you can extend nil with protocols in Clojure 👇
(and no, it's not lost on me you can just assert or branch on nil for this example😅)
Fun fact, nil is both a value and a type, meaning you can extend nil with protocols in Clojure 👇
(and no, it's not lost on me you can just assert or branch on nil for this example😅)
- Need to stop evaluation
- Clj doesn't support use case
- Maybe Reduce code duplication (big maybe).
Here's a few examples of Effective Macro use in Clojure 👇
- Need to stop evaluation
- Clj doesn't support use case
- Maybe Reduce code duplication (big maybe).
Here's a few examples of Effective Macro use in Clojure 👇
-Using recursion instead loops
-Modelling a state machine without "state"
In FP you can model a state machine by using recursion, lexical bindings, higher-order functions
#Clojure example, but could be haskell 👇
-Using recursion instead loops
-Modelling a state machine without "state"
In FP you can model a state machine by using recursion, lexical bindings, higher-order functions
#Clojure example, but could be haskell 👇
(this is not the actual script, just bits and pieces)
(this is not the actual script, just bits and pieces)
Clojure's pretty print (pprint) has different formatters you can dispatch on for printing and vars for altering out
This probably would have made some of my REPL-driven dev a lot easier😅
Clojure's pretty print (pprint) has different formatters you can dispatch on for printing and vars for altering out
This probably would have made some of my REPL-driven dev a lot easier😅
If a programming language supports callbacks/closures/HOF, you can recreate things like reducers
Check out this example in #Go👇
If a programming language supports callbacks/closures/HOF, you can recreate things like reducers
Check out this example in #Go👇
Chances are, in a pure functional code path, you can use truthyness to indicate when something went wrong (wrong value, empty input)
If you're doing side-effects or Java interop, best you use try/catch
Chances are, in a pure functional code path, you can use truthyness to indicate when something went wrong (wrong value, empty input)
If you're doing side-effects or Java interop, best you use try/catch
I had the pleasure of writing the foreword for @unclebobmartin‘s upcoming book Functional Design! :)
I had the pleasure of writing the foreword for @unclebobmartin‘s upcoming book Functional Design! :)