u/cladamski79

46 post karma · 25 comment karma · joined Jun 2021 · moderator

  1. 1points

    hedit – a terminal-based editor written in hica (self.hica)

    0 comments

  2. 1points

    Rethinking design patterns in hica: when the patterns melt away (self.hica)

    0 comments

  3. 1points

    From Mutable Properties to Pure Lenses (self.hica) [Tips & Tricks]

    0 comments

  4. 1points

    hicurl - a modern HTTP CLI built in hica (self.hica)

    2 comments

  5. 1points

    Functional programming in hica (self.hica)

    1 comments

  6. 1points

    Does a CLI like tbdflow need a GUI?

    0 comments · source

  7. 1points

    Does a CLI like tbdflow need a GUI? (self.TrunkbasedDevelopment)

    0 comments

  8. 1points

    www.hica.dev (i.redd.it)

    0 comments · source

  9. 1points

    Don't trust, instruct and verify - a local hica coding assistant with Ollama (self.hica) [Tips & Tricks]

    0 comments

  10. 1points

    hica goes GUI - immediate-mode windows with Dear ImGui (i.redd.it)

    0 comments · source

  11. 2points

    HML to Markdown (self.hica)

    0 comments

  12. 1points

    HML (Hica Markup Language), looking for library authors. (self.hica)

    0 comments

  13. 1points

    Hica for beginners (self.hica)

    0 comments

  14. 0points

    HML (Hica Markup Language), looking for library authors. (github.com)

    3 comments · source

cladamski79

I've been working on hicurl, a modern HTTP CLI that takes inspiration from HTTPie and Curlie, it is built using the hica language (r/hica or hica.dev).

It serves both as a practical CLI tool for API testing and as a showcase of hica's standard library, libcurl bindings, and native compilation.

Core Features and Benefits

  • Fast execution: Compiles to a native binary using Hica and binds directly to libcurl via Koka FFI for network I/O.

  • Built-in response filtering: Extracts fields directly from responses without requiring external tools like jq. Supports JSON dot-paths (.data.0.id), HTTP status codes (:status), headers (:header.Content-Type), session cookies (:cookie.session_id), and timing metrics (:time.ttfb).

  • Context-aware TTY output: Formats JSON with ANSI syntax highlighting in an interactive terminal, but automatically outputs raw unformatted text when output is piped to another command or script.

  • Directory-aware environment handling: Reads .hicurl.env files by searching up the directory tree to automatically resolve relative paths against configured base URLs.

  • Request syntax sugar: Positional arguments map directly to headers (:), query parameters (==), JSON strings (=), typed JSON values (:=), text files (=@), JSON files (:=@), and localhost port shortcuts (:8000).

  • Offline --dry-run: Prints the exact HTTP/1.1 request stream without sending bytes over the network, allowing you to inspect payloads and headers before execution.

  • Code export: Exports configured queries into standard curl commands using -E curl/--curl.

Syntax Examples

```sh

Localhost shorthand (resolves to http://localhost:8000/v1/health)

hicurl :8000/v1/health :status

Typed JSON payload with response filtering

hicurl post /users name="Alicia" role="admin" age:=28 .id

Latency and timing metrics

hicurl get /heavy-query :time :time.ttfb

Embedding local JSON file into request body

hicurl post /post user:=@tests/test_data.json

Offline dry run mode

hicurl post /users name="Alicia" --dry-run

Nested subshell query composition

hicurl $(hicurl api.github.com/search/users q==cladam per_page==3 .items.0.url) .bio ```

Installation

Via curl:

sh curl -fsSL https://github.com/cladam/hicurl/releases/latest/download/install.sh | sh

Or via hicurl itself:

sh hicurl https://github.com/cladam/hicurl/releases/latest/download/install.sh | sh

Repository: https://github.com/cladam/hicurl

cladamski79
cladamski79

The hicurl command hicurl $(hicurl api.github.com/search/users q==cladam per_page==3 .items.0.url) .biotranslates to this curl + jq command:
curl -sSL $(curl -sSL --url-query "q=cladam" --url-query "per_page=1" "https://api.github.com/search/users" | jq -r ".items[0].url") | jq -r ".bio"

cladamski79

I was compiling and got superfrustrated by the waiting, opened a browser and searched for "ADHD and compiling wait time" and got to this post 😂

cladamski79
cladamski79

Update, I have created a subreddit for hica where I publish news and tips & tricks: https://www.reddit.com/r/hica/

cladamski79

I have created a dedicated page for functional programming in hica, check it out at https://www.hica.dev/docs/functional-programming/

cladamski79

You could try https://www.hica.dev/docs/hica-for-beginners/, my goal is to make programming with hica very approachable for beginners (and veterans alike), hica is a functional, expression-based language. I like learning by practise, start with small examples and then dive deeper on a thing you really want to build.

cladamski79

You could try https://www.hica.dev/docs/hica-for-beginners/, my goal is to make programming with hica very approachable for beginners (and veterans alike). The concepts transfers over to many other languages although hica is a functional flavored language.

cladamski79

You could try https://cladam.github.io/hica/hica-for-kids/introduction.html, my goal is to make programming with hica very approachable for kids and beginners. The concepts transfers over to many other languages although hica is a functional flavoured language.

cladamski79

The lack of handling text content has been an issue in formats like YAML and TOML that don't support mixed content, HML is designed to fill that gap while keeping the structure unambiguous.

Hope that helps?
https://github.com/cladam/hml/blob/main/HML-Specification.md#text-content-mixed-content