Code Monkey home page Code Monkey logo

jacinda's Introduction

Jacinda is a functional pattern sifting language, a smaller AWK.

Installation

Releases

There are binaries for some platforms on the releases page.

If you are on Mac, you will need to install *-librure.dylib as well.

From Source

First, install Rust's regex library. You'll need to put librure.so or librure.dylib etc. in the appropriate place.

If you have cabal and GHC installed (perhaps via ghcup):

cabal install jacinda

Editor Support

There is a vim plugin and a VSCode extension.

Usefulness

Unix uses record separators in many places; we can display one entry in the PATH variable with:

echo $PATH | ja -F: "{|[x+'\n'+y]|>\`$}"

Many Unix tools output much information separated with spaces. We use regular expressions to match relevant lines and then select the field with the data itself, viz.

otool -l $(locate libpng.dylib) | ja '{`1 ~ /^name/}{`2}'

To get the value of a variable (say, PATH) from the output of printenv:

printenv | ja -F= '{%/^PATH/}{`2}'

Rosetta

Replace

NF == 1 && $1 != "}" {
  haveversion[$1] = 1
}
END {
  for (i in haveversion)
    printf "have-%s = yes\n", i
}

with

(sprintf 'have-%s = yes')" ~.{nf=1 & `1 != '}'}{`1}

Documentation

See the guide, which contains a tutorial on some of the features as well as examples.

The manpages document the builtins and provide a syntax reference.

Status

Missing Features & Bugs

  • No nested dfns
  • No list literal syntax
  • Postfix :f and :i are handled poorly
  • Streams of functions don't work
  • Higher-order functions are subtly broken

Intentionally missing features:

  • No loops

Advantages

Contributing

I have rewritten the code several times so forking and applying patches is fraught!

Bug reports are welcome contributions.

jacinda's People

Contributors

vmchale avatar sternenseemann avatar

Stargazers

Kevin avatar Alexandre Rademaker avatar karyo avatar Chris Hart avatar Gustavo Zambonin avatar Justin Poliey avatar  avatar ypcpy avatar AN Long avatar  avatar Maddison Hellstrom avatar Jimmy Ruska avatar Patrick Logan avatar  avatar Justin "J.R." Hill avatar Luc Tielen avatar Hécate avatar Vaibhav Sagar avatar Robert Whitaker avatar Agnishom Chattopadhyay avatar Nadeem Bitar avatar Anthony Alaribe avatar Jason Shipman avatar Rosario Pulella avatar Josh Miller avatar Adrian Sieber avatar  avatar Andrey Stepanov avatar Sergey Vinokurov avatar Rob King avatar James Vasile avatar Danny McClanahan avatar Werner de Groot avatar Paul "Joey" Clark avatar Tony Day avatar Sebastian Wild avatar Kevin Baker avatar Wayne Krug avatar Srepfler Srdan avatar jake avatar Orestis Melkonian avatar Andrei Dziahel avatar Kevin Brubeck Unhammer avatar Jonathan Strickland avatar Raghu R avatar Terje Larsen avatar Jochen Schneider avatar Val Packett avatar Vitali Barozzi avatar Viki Val avatar Stephan Renatus avatar Deniz Alp Durmaz avatar Marco Z avatar ihsan avatar Mohammad Hasani avatar Avi Press avatar George Takumi Crary avatar Jeffrey Fetzer avatar  avatar Pedro Cavalcante Oliveira avatar Skurhse Rage ∅ avatar Neal Fultz avatar ebigram avatar Michail Liarmakopoulos avatar Caden Haustein avatar Brendan Zabarauskas avatar  avatar Vincent Murphy avatar Ricardo M. Vilchis avatar Janka Uryga avatar  avatar Damien avatar Torsten Scholak avatar Andrejs Agejevs avatar Evan Relf avatar Sam Gaw avatar Tristan de Cacqueray avatar Tim Kersey avatar Théophile Choutri avatar

Watchers

James Cloos avatar  avatar  avatar

jacinda's Issues

library jacinda-lib

It is not a big thing but I just wanted to check if it is necessary to name the jacinda Haskell library jacinda-lib instead of just jacinda in jacinda.cabal?

(For context it kind of breaks my measly packaging tool (cabal-rpm): obviously that could be fixed but...)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.