Skip to content

Instantly share code, notes, and snippets.

View Janiczek's full-sized avatar

Martin Janiczek Janiczek

View GitHub Profile
@Janiczek
Janiczek / gist:a45fa0941dfc4926403fcab207ead65f
Created October 16, 2026 04:51
Elm packages using `property "className"`
$ ag --multiline 'property\s+"className"'
proda-ai-elm-css/project/src/Html/Styled/Internal.elm
16: VirtualDom.property "className" (Json.string classname)
arowM-elm-mixin/project/src/Mixin.elm
214: Mixin.property "className" (Encode.string name)
proda-ai-elm-css/project/src/Html/Styled/Attributes.elm
229: property "className" (Encode.string name)
288: stringProperty "className"
Registry: POST https://package.elm-lang.org/all-packages completed in 782ms
Starting downloads...
● elm/browser 1.0.2
● elm/bytes 1.0.8
● elm/core 1.0.5
● elm/file 1.0.5
● elm/html 1.0.0
● elm/http 2.0.0
● elm/json 1.1.3
@Janiczek
Janiczek / output.txt
Created September 13, 2026 11:36
regex for replacing Debug.todo failed
Compiling > Starting tests
/Users/martin.janiczek/Localhost/cloned/elm-syntax-type-inference/elm-stuff/generated-code/elm-community/elm-test/0.19.2-1/elmTestOutput.js:498
throw new Error('TODO in module `' + moduleName + '` ' + _Debug_regionToString(region) + '\n\n' + message);
^
Error: TODO in module `Test.Runner.Node` on line 352
The regex for replacing this Debug.todo with some real code must have failed since you see this message!
Please report this bug: https://github.com/rtfeldman/node-test-runner/issues/new
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Janiczek
Janiczek / Main.elm
Last active July 20, 2026 19:33
elm-test log capture only for final fuzz test run
module Main exposing (main)
import Browser
import Html
untouchableTestedFn : Int -> ()
untouchableTestedFn n =
let _ = Debug.log "you can't change this string" ( "nor this value", n ) in
()
@Janiczek
Janiczek / Main.elm
Last active March 10, 2026 17:17
Array vs Dict vs IntDict benchmark
module Main exposing
( runOnArray
, runOnDict
, runOnIntDict
, runOnList
, runOnPreallocatedArray
, runOnPreallocatedDict
, runOnPreallocatedIntDict
, runOnPreallocatedList
)
@Janiczek
Janiczek / agent_workflow.py
Last active March 6, 2026 18:00
Imagined example of "agents as part of deterministic workflows"
from agentflow import flow, agent, StepFailure, FlowAbort
from agentflow.integrations.jira import fetch_issue, JiraIssue
elm_make = agentflow.run("elm make --optimize src/Main.elm")
elm_test = agentflow.run("elm-test")
elm_review = agentflow.run("elm-review")
elm_format = agentflow.run("elm-format -y src/**/*.elm")
@flow(max_retries=3)
def fix_bug(jira_key: str):
x =
identity <|
case
identity
(identity
(((99.99999999999997 /= -79.88238649066948) && (identity 'a' /= '2'))
&& ((False || (() == ()))
|| (('z' == (identity 'b' |> identity))
|| ((((False || (((99.99999999999997 |> identity) == 100.0) && (-96 == 26)))
|| (False
https://excalidraw.com/#json=PbsiCKzFMapMI32wtyuTM,S81tElByemIdDA9NiNPvtw
@Janiczek
Janiczek / elm-format-monad
Created September 9, 2025 19:11
elm-format-monad
#!/usr/bin/env node
// A work around to https://github.com/avh4/elm-format/issues/352
// * Use it in place of elm-format (only some flags are supported)
// * Run it from a directory containing node_modules/elm-format/bin/elm-format (but you can change it below)
function extractFirstRegexMatch(regex, elmCode) {