This is a space for jotting down what’s in my head about how we write and share darklang programs.
The thing that’s “different” around dark, is that we make everything fundamentally simpler by removing steps and tools from how we write and distribute software. Eg:
- running code that exists in the package manager should be trivial
darklang @darklang.internalTools.generateRT2DT languageTools.runtimeErrors.ExecutionError
darklang @paul.waitForProcessEnd scripts/compile
darklang @darklang.generateAPI <https://twilio.com
>
darklang @darklang.internalTools.extractChangelog 10/2023
- deploying that code to darklang cloud should be trivial
- writing code should be easy to understand (eg immutability
- using AI to write code should be trivial
- etc/etc
Now we’re at the point where we need to make it trivial to write code such that:
- as soon as functions/types/constants are created they are accessible publicly in the package manager
- or privately if that’s how this module is set up
- or to a canvas instead of the package manager, possibly
- to be clear, if I write a function named
@paul.mymodule.myFunction
then as soon as it is written, you’ll be able to execute @paul.mymodule.myfunction
on your machine (or in the cloud or whatever)
- there is an easy way to make to make new versions of functions (the equivalent of editing a function and committing the change)
- there is an easy way to contribute new suggested change (the equivalent of making a PR or a branch)
- We aren’t writing named functions in named files managed by git, we’re writing code that is LIVE - either in a canvas or in the package manager
- as soon as functions/types/constants are created they are accessible to others with permission to your namespace
- all created functions/types etc are immutable
- each function/type/constant has an ID, and names are metadata (as is stuff like Deprecated status, author, etc)
Put another way, we need a UX for writing code where:
- it can be immediately and automatically shipped automatically to “production”, like our old editor
- “production” might mean the package manager
- users can still use VS Code or other tools to write darklang
- I really dont want users to have to type
darklang deploy …
to get something to ship, though I acknowledge this might be unavoidable (I dont think it is)
- by UX, I’m (probably) referring to a command or set of commands in the darklang CLI (later this might be a button or setting in VSCode or something)