Dear programming tool developers:
JSON is a program-to-program data transfer mechanism.
If you make users of your tool configure it using JSON files, it means you're placing your convenience over theirs.
If you haven't seen it, here's the announcement:
The Pragmatic Programmer, 20th Anniversary Edition, real soon now.
A whole bunch of new content, a whole bunch of revised content, but no change to the common sense.
What's wrong with JSON for configuration?
1. no ability to comment things out
2. no trailing commas make maintaining lists more cumbersome
3. quotes around keys are just silly
4. no ability to inherit defaults
Switched from using the fancy JavaScript build tools back to using a simple Makefile. Not only is it now reliable, but I can actually reason about what it is doing, and adding one new resource format doesn't incur a day's worth of dependency negotiation.
So, programmer pals.
It seems like a lot of developers are great programmers, but at the same time are a bit shaky when it comes to some of fundamentals: stuff down at the machine and operating system level.
If I did a course covering that stuff, would there be interest?
Some folks talk about ending the day with a clean checkin.
I'm increasingly finding it better to end with a failing test; it helps we regain context the next morning.
Installing react, react-dom, and reason-scripts...
+ react-dom
@16
.6.1
+ react
@16
.6.1
+ reason-scripts
@1
.0.0
added 1694 packages from 659 contributors and audited 32802 packages in 79.021s
found 0 vulnerabilities
*1694* packages. This Hello World test is *solid*
I've been wanting to write a little about how practices from 50 years ago are influencing developers today. As an experiment, I'm starting a series over on Medium:
Please let me know what you think.
I'm starting to explore Elixir's
@AshFramework
(). It's a seriously impressive piece of work and looks like a well-thought out way of both modeling and exposing your domain. I'm going to spend a few days trying to model a subset of the PragProg backend;
I've finally had the courage to release my Elixir "Component" library, designed to encourage the building of deliverables using decoupled, coherent, components.
•
•
@elixirlang
#myelixirstatus
My
@empexco
talk about rethinking the way we write Elixir is up. It's no more than a set of initial thoughts, but I really think there's something to them.
I was just coming off a case of pneumonia, so sorry about the sniffs.
An Elixir JSON API server in 2 tweets (ignoring application.ex). Once it gets warmed up, it is insanely fast:
21:35:37.321 [info] GET /login/33
21:35:37.321 [info] Sent 200 in 28µs
#myelixirstatus
After a seven year break, I'm back running the Pragmatic Bookshelf. I have a lot of cool things planned, but I could really do with your help. For the background, and for details on how to voice your opinions, see . I look forward to chatting with a whole
If you want to comment a public function, but hide it from the documentation system, try the following. (The trick is the "!" operator.)
#myelixirstatus
Sometimes using Dialyzer is like talking to an ancient Buddhist monk. You get suggestions, but it takes a lifetime of exploring to work out what they mean, and in the end you knew the answer all along.
#myelixirstatus
After several aborted attempts over the last 18 months, I've finally moved my development environment off my Macs and back to Linux. Only real pain point is the horrible mish mash of control/super/alt between different apps. Small price to paygiven the hardware options available.
til: (copy/paste into chrome web developer console)
var msg = new SpeechSynthesisUtterance();
var voices = window.speechSynthesis.getVoices();
msg.voice = voices[50];
msg.voiceURI = 'native';
msg.text = 'Gosh! I do believe my browser can talk';
speechSynthesis.speak(msg);
First (and tentative) prerelease of Bunyan, a distributed and extendable logger for Elixir.
I built it both because I needed it and because I wanted to try out my ideas on structuring Elixir apps on a real-world example.
#myelixirstatus
At first glance my arguments against project directory structure seem like bikeshedding. They are, to some extent. But I think the way we structure our project tree is a symptom of a real problem. I tried to describe it in an article:
#myelixirstatus
I'd cover things ranging from number representation to how page tables work to operating systems and I/O, compilers, linkers, loaders, networking, and other stuff that people request. It would all be backed by code and projects.
Psst. Wanna know something before it's announced???
The Pragmatic Programmer is now available as an audiobook.
And on iTunes (if not now, then very soon)
It's my birthday, and I feel like spreading the joy.
Use code "cake" at checkout to get 50% off at . Good for 24 hours, or until the grownups find out and stop me...
The way
@AshFramework
handles migrations is spot on. No need to define separate schema and data models. Instead, just model your data, and when you need to reflect those changes in a database schema, just ask Ash to generate the migration and run it. It effectively does a
The challenge of functional programming is making the right data available where you need it.
The challenge of object-oriented programming is that this isn't a challenge.
@FrancescoC
@joeerl
You never walked up to Joe if you had anything important to do in the next hour, because he always had projects, and they were always interesting, and he was just so damn enthusiastic talking about them. If some people are bright sparks, he was an arc light. (He fizzed, too :)
Having tried it for a few weeks, I've now switched to doing most of my vector stuff on Affinity Designer by
@AffinitybySerif
. Currently $25 single payment; Illustrator is $21/month. It's also nicer to use. Maybe I'll be able to stop paying the
@adobe
tax.
This post from
@josevalim
is both incredibly well written and very exciting
Once again, he demonstrates how a project owner can respect the projects customers while still making significant and exciting changes.
The Unison language () has some really interesting ideas, from content-addressable immutable code to dependency-injection with abilities, a powerful yet simple alternative to monads. I've written a couple of articles:
Enjoy
Fish shell function to display module and function help from the cmd line:
function re --description 'Get help on an Elixir module or function'
iex -e "require IEx.Helpers; IEx.Helpers.h($argv); :erlang.halt" | cat
end
In use:
$ re String
$ re String.upcase
#myelixirstatus
I’ve used Emacs for maybe 25–30 years—it has effectively become my window manager.
For my next course, I’m thinking seriously about switching to Visual Studio Code plus tmux in the internal console.
No particular reason apart from a desire to shake me out of a comfort zone.
I'm liking what I'm reading in
@redrapids
and
@JEG2
's "Designing Elixir Systems". It's a pragmatic approach which (correctly) prioritizes what _you_ need to do over what the frameworks do.
This article is important reading for anyone who wants to explain something:
(it's not about monads: it's really about Dreyfus and why experts can make no sense)
After 7 months using Linux, I finally had to power up my MacBook today: I couldn't find anything on Linux to match Keynote when it can to creating animated diagrams.
Surprised how clunky OSX feels compared to Ubuntu.
Just noticed that vscode-elixir-ls not suggests specs for public functions that don't currently have them, based on Diayzer's inferred success typing. This is very, very cool, and has already found a mistake I made. A massive tip o' the hat to
@JakeBeckerCode
.
#myelixirstatus
" If you have three pet dogs, give them names. If you have 10,000 head of cattle, don't bother. Nowadays the idea of giving a name to every file on your computer is ridiculous."
David Gelernter in 1999.
I assigned my students the task of implementing a state machine in the language of their choice.
I'm currently grading an answer written in Prolog.
Mission accomplished :)
Simple proof-of-work in Elixir:
def _count(value, counter, difficulty) do
case value do
<< 0::size(difficulty), _::bitstring >> ->
counter
_ ->
_count(:crypto.hash(:sha256, value), counter+1, difficulty)
end
end
does 1.5MM iterations/s on my 2013 mac!
I'm really, really enjoying the Unison language and environment. The append-only library system is fabulous, but takes getting used to. The language itself is sweet, but the icing on the cake is the fantastic _abilities_ feature (Abstract Algebraic Effects).
Just had some PRs accepted for
@BoydMulterer
's wonderful project (I added the ability to specify scenes declaratively). This was easy to do as the
@ScenicFramework
code is wonderfully well organized and tested.
my talk at the Lonestar Elixir conference (remember conferences? Those were the days) is out. Not an Elixir talk. More a "make your life deliberate" talk.
I'm outraged that the Agile Alliance Board of Directors would claim to be the "keepers of the Agile Manifesto". As an industry association they serve only their members. Their recent mailing might have some good words about equity but they don't know their own history.
This is how functions _should_ be written:
Midnight takes your heart and your soul
While your heart is higher than your soul
Take your soul from your heart
Give back your heart