This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
louis ~/src/gleam/lustre-dev-tools (main *) $ gleam clean | |
louis ~/src/gleam/lustre-dev-tools (main *) $ asdf local gleam 1.5.1 | |
louis ~/src/gleam/lustre-dev-tools (main *?) $ time gleam build --no-print-progress | |
________________________________________________________ | |
Executed in 14.25 secs fish external | |
usr time 13.52 secs 0.07 millis 13.52 secs | |
sys time 7.78 secs 1.14 millis 7.78 secs | |
louis ~/src/gleam/lustre-dev-tools (main *?) $ time gleam build --no-print-progress^C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
import { multiParser } from "https://deno.land/x/[email protected]/mod.ts"; | |
import * as uuid from "https://deno.land/[email protected]/uuid/mod.ts"; | |
import NodeID3 from "npm:node-id3"; | |
serve(async (req) => { | |
if (req.method == "POST") { | |
const { files, fields } = await multiParser(req); | |
const path = "uploads/" + uuid.v1.generate() + ".mp3"; | |
await Deno.writeFile(path, files.track.content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
main = | |
let result = | |
bind readNumber <| \x -> | |
bind readNumber <| \y -> | |
bind readNumber <| \z -> | |
Ok (x + y + z) | |
in | |
text (Debug.toString result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gleam/bitwise | |
import gleam/int | |
import gleam/list | |
import gleam/string | |
import chip8/helpers | |
import chip8/instruction | |
import chip8/keyboard | |
import chip8/memory | |
import chip8/registers | |
import chip8/screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn make_birthday(x: aged, get_age: fn(aged) -> Int) { | |
get_age(x) + 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn init(spec: Spec(Nil)) { | |
spec | |
|> add( | |
worker(start_child1) | |
|> with_state(fn(_state, pid) { pid }), | |
) | |
|> add(worker(start_child2)) | |
|> add(worker(start_child3)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
louis ~/src/gleam/gleam (build-tool *+) $ cargo run build test/build_with_gleam/ | |
Compiling gleam v0.10.0-dev (/home/louis/src/gleam/gleam) | |
Finished dev [unoptimized + debuginfo] target(s) in 6.19s | |
Running `target/debug/gleam build test/build_with_gleam/` | |
[src/build.rs:88] &status = ExitStatus( | |
ExitStatus( | |
0, | |
), | |
) | |
louis ~/src/gleam/gleam (build-tool *+) $ tree test/build_with_gleam/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{status,<0.51.0>, | |
{module,gen_server}, | |
[[{'$initial_call',{inet_db,init,1}}, | |
{'$ancestors',[kernel_sup,<0.46.0>]}], | |
running,<0.48.0>,[], | |
[{header,"Status for generic server inet_db"}, | |
{data,[{"Status",running}, | |
{"Parent",<0.48.0>}, | |
{"Logged events",[]}]}, | |
{data,[{"State", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(thing). | |
-export([makePerson/1]). | |
makePerson(#{name => Name, gender => Gender, age = Age}) -> | |
{person, Name, Gender, Age}. | |
personToMap({person, Name, Gender, Age}) -> | |
#{name => Name, gender => Gender, age => Age}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## DecodeBench | |
benchmark name iterations average time | |
decode (small) (jiffy) 500000 117.63 µs/op | |
decode (small) (jsone) 200000 199.21 µs/op | |
decode (small) (tiny) 200000 216.86 µs/op | |
decode (small) (poison) 100000 225.53 µs/op | |
decode (small) (jason) 100000 228.00 µs/op | |
decode (small) (jsx) 100000 297.11 µs/op | |
decode (large) (jiffy) 50 612494.88 µs/op |
NewerOlder