Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@calcit/procs
Advanced tools
> Semantically a dialect of ClojureScript. Built with Rust. Compiles to JavaScript ES Modules.
Semantically a dialect of ClojureScript. Built with Rust. Compiles to JavaScript ES Modules.
Browse examples or also try WASM version online.
Core design:
Build and install with Rust:
# get Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# get Calcit
cargo install calcit
3 binaries are installed:
calcit
, the runtime and js compilercaps
, for downloading dependencies declared in deps.cirru
bundle_calcit
, bundle code if you don't want to use Calcit EditorTo use Calcit in GitHub Actions, try setup-cr.
Snippets evaling:
cr -e 'range 100'
multi-lines snippet:
cr -e '
println "|a demo"
->
range 100
map $ fn (x)
* x x
'
Run with a compact.cirru:
cr compact.cirru -1 # run only once
cr compact.cirru # watch mode enabled by default
By default Calcit reads :init-fn
and :reload-fn
inside compact.cirru
configs. You may also specify functions,
cr compact.cirru --init-fn='app.main/main!' --reload-fn='app.main/reload!'
and even configure :entries
in compact.cirru
:
cr compact.cirru --entry server
It compiles to JavaScript and runs in consistet semantics. However it might require a lot of JavaScript interop.
cr compact.cirru --emit-js # compile to js
cr compact.cirru --emit-js --emit-path=out/ # compile to js and save in `out/`
By default, js code is generated to js-out/
. You will need Vite or Node to run it, from an entry file:
import { main_$x_, reload_$x_ } from "./js-out/app.main.mjs";
main_$x_();
Install Calcit Editor and run ct
to launch editor server,
which writes compact.cirru
and .compact-inc.cirru
on saving. Try launching example by cloning Calcit Workflow.
Read more in Minimal Calcit to learn how to code Calcit with a plain text editor.
Read more in Respo Calcit Workflow to learn to create an MVC webpage with Respo.
deps.cirru
declares dependencies that need to download, which correspond to repositories on GitHub. Specify a branch or a tag:
{}
:dependencies $ {}
|calcit-lang/memof |0.0.11
|calcit-lang/lilac |main
Run caps
to download. Sources are downloaded into ~/.config/calcit/modules/
. If a module contains build.sh
, it will be executed mostly for compiling Rust dylibs.
To load modules, use :modules
configuration in calcit.cirru
and compact.cirru
:
:configs $ {}
:modules $ [] |memof/compact.cirru |lilac/
Paths defined in :modules
field are just loaded as files from ~/.config/calcit/modules/
,
i.e. ~/.config/calcit/modules/memof/compact.cirru
.
Modules that ends with /
s are automatically suffixed compact.cirru
since it's the default filename.
I use these commands to run local examples:
# run tests in Rust
cargo run --bin cr -- calcit/test.cirru -1
# run tests in Node.js
cargo run --bin cr -- calcit/test.cirru --emit-js -1 && yarn try-js
# run snippet
cargo run --bin cr -- -e 'range 100'
cr compact.cirru --emit-ir # compiles intermediate representation into program-ir.cirru
compact.cirru
file parsing.Other tools:
.calcit-error.cirru
program-ir.cirru
Some resources:
MIT
FAQs
> Semantically a dialect of ClojureScript. Built with Rust. Compiles to JavaScript ES Modules.
The npm package @calcit/procs receives a total of 97 weekly downloads. As such, @calcit/procs popularity was classified as not popular.
We found that @calcit/procs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.