#FreePalestine. Read our founder's statement
no cruft: no build systems, no null, no exception handling, no ORMs, no OOP, no inheritence hierarchies, no async/await, no compilation, no dev environments, no dependency hell, no packaging, no git, no github, no devops: no yaml, no config files, no docker, no containers, no kubernetes, no ci/cd pipelines, no terraform, no orchestrating, no infrastructure: no sql, no nosql, no connection poolers, no sharding, no indexes, no servers, no serverless, no networking, no load balancers, no 200 cloud services, no kafka, no memcached, no unix, no OSes
Darklang puts everything in one box, so you can build CLIs and cloud apps with no bullshit, just code.
️️️Also it's a really enjoyable language to use!
Looking for Darklang-classic?
$ curl https://darklang.com/download | bash Darklang installed in ~/.darklang/bin/darklang Add to PATH via .bashrc [y, n, ?]: y ✔Added to .bashrc. Next you can:# Try the tutorial darklang tutorial# Run some code from the package manager darklang @paul.fizzbuzz 3# Generate some code darklang prompt "Find ts scripts with more than 600 lines which use the commonjs format"# See available command line options darklang help
$ darklang @paul.fizzbuzz 3
1
2
Fizz
$ darklang deploy @paul.fizzbuzz /fizzbuzz
Deployed to https://furry-squirrel-3562.darklang.io/fizzbuzz in 0.135s
$ curl -sSO https://furry-squirrel-3562.darklang.io/fizzbuzz/3
1
2
Fizz
$ darklang prompt "Find ts scripts with more than 600 lines which use commonjs format" We need your AI credentials, which will be stored locally in ~/darklang/secrets/ [1] Login to use Darklang AI service [2] Enter GitHub copilot credentials [3] Enter OpenAI (GPT 3.5/4) credentials [4] Use local model Enter [1-4]: 1 Login or register [L, r]? L Username: paul Password: ************** ✔Logged in. Saved script in ./find-large-ts-cjs.dark in 43.8s
find-large-ts-cjs.dark
let findLargeTypescriptCommonJSFiles (path : String) = Directory.traverse (fun path -> if not (List.oneOf (File.extension path) [".ts", ".mjs", ".cjs"]) then print $"Skipping - wrong file type: {path}" else let contents = File.readString path let lines = String.splitNewlines contents if (List.length lines) <= 600 then print $"Skipping - too short: {path}" else let isCommonjs = lines |> List.any (fun line -> line |> Regex.matches "/const .* = require(.*)/" ) if isCommonjs then print $"Found one: {path}" ) findLargeTypescriptCommonJSFiles "./"
// Record type Url = { scheme : HttpScheme domain : String port : UInt16 path : String query : Option<String> } // Enum (aka Variant, Sum Type, or Abstract Data Types) type UrlError = | InvalidScheme(String) | EmptyDomain | InvalidPort(Int64) | Unparseable(msg:String, context:String) // Aliases are just shorthands type UrlParseResult = Result<Url, UrlError>
$ darklang @paul.fizzbuzz 10 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz
$ darklang @hacker.stealThings "Hi there" > @hacker.stealThings requires the following permissions > Makes Http requests to unknown domains > Reads any file > Executes any file > Continue? [N, y] y > These are unusual permissions. Are you sure [N, y] y Ha ha, you're own3d $ darklang @mycompany.internal.createMonthlyReport > @mycompany.internal.createMonthlyReport requires the following > permissions > Makes Http GET requests to stripe.com/api/ETC > Makes Http POST requests to drive.google.com > Continue? [N, y] y Report initiated and stored at https://drive.google.com/u/asj599b3/5288942sdfsdf3.pdf
When you make an async request, it first waits for any arguments that are async, and starts when they're done. If another function call needs to use the result, it will wait for it before starting.
Since darklang values are immutable, there won't be any race conditions from this.
-
REPLACE ME
REPLACE ME
REPLACE MEREPLACE ME
REPLACE ME
See exampleREPLACE ME
REPLACE ME
REPLACE ME
REPLACE ME