All Projects → pure-c → Purec

pure-c / Purec

C backend for PureScript

Programming Languages

c
50402 projects - #5 most used programming language
purescript
368 projects

Projects that are alternatives of or similar to Purec

Purescript Presto
Write Apps like Mathematical Equations!
Stars: ✭ 149 (-26.24%)
Mutual labels:  functional-programming, native
Lambda Lantern
🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.
Stars: ✭ 122 (-39.6%)
Mutual labels:  functional-programming, native
Xcrash
🔥 xCrash provides the Android app with the ability to capture java crash, native crash and ANR. No root permission or any system permissions are required.
Stars: ✭ 2,689 (+1231.19%)
Mutual labels:  native
Fixed point
C++ Binary Fixed-Point Arithmetic
Stars: ✭ 199 (-1.49%)
Mutual labels:  clang
Votlin App
Kotlin multiplatform project
Stars: ✭ 193 (-4.46%)
Mutual labels:  native
Simdjson
Parsing gigabytes of JSON per second
Stars: ✭ 15,115 (+7382.67%)
Mutual labels:  clang
Cql
Categorical Query Language IDE
Stars: ✭ 196 (-2.97%)
Mutual labels:  functional-programming
Remote Data Ts
RemoteData type
Stars: ✭ 185 (-8.42%)
Mutual labels:  functional-programming
Hybrids
Extraordinary JavaScript framework with unique declarative and functional architecture
Stars: ✭ 2,529 (+1151.98%)
Mutual labels:  functional-programming
Zebras
Data analysis library for JavaScript built with Ramda
Stars: ✭ 192 (-4.95%)
Mutual labels:  functional-programming
Goggles
Pleasant, yet principled Scala optics DSL
Stars: ✭ 199 (-1.49%)
Mutual labels:  functional-programming
Apex Lambda
Functional programming for Salesforce Apex
Stars: ✭ 189 (-6.44%)
Mutual labels:  functional-programming
Ember Native Dom Helpers
Test helpers for your integration tests that fire native events
Stars: ✭ 187 (-7.43%)
Mutual labels:  native
Thinc
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries
Stars: ✭ 2,422 (+1099.01%)
Mutual labels:  functional-programming
You Dont Need Lodash Underscore
List of JavaScript methods which you can use natively + ESLint Plugin
Stars: ✭ 13,915 (+6788.61%)
Mutual labels:  native
Functional Programming In Elm
DRAFT outlining some techniques of functional programming
Stars: ✭ 200 (-0.99%)
Mutual labels:  functional-programming
Deoplete Clang
deoplete.nvim source for C/C++/Obj-C/Obj-C++ with clang-python3
Stars: ✭ 186 (-7.92%)
Mutual labels:  clang
Dpp
Directly include C headers in D source code
Stars: ✭ 189 (-6.44%)
Mutual labels:  clang
Bosatsu
A python-ish pure and total functional programming language
Stars: ✭ 193 (-4.46%)
Mutual labels:  functional-programming
Coalton
Coalton is (supposed to be) a dialect of ML embedded in Common Lisp.
Stars: ✭ 202 (+0%)
Mutual labels:  functional-programming

Pure-C

An alternative backend for the PureScript programming language that targets C.

Introduction

PureScript is a high-level, statically typed, functionally pure programming language that enables various backends using its intermediate representation of elaborated programs.

PureC provides a backend that transpiles to the C programming language, thus enabling native, ahead-of-time compilation of PureScript programs. With a dead simple FFI to C, performance critical sections can easily be implemented outside of PureScript when the need arises.

For an example of how PureC could be used, take a look at purec-uv, a project implementing both purescript-aff and bindings to libuv on top of PureC.

Features

  • Write native programs in PureScript
  • Simple FFI to C
  • Generates readable, human- and machine-debuggable C
  • Simple and efficient reference counted GC
  • Opt-in tracing GC (Boehm–Demers–Weiser garbage collector)

Usecases

  • Scrap your node.js
  • Write small, easy to distribute command line utilities
  • No JS parsing, instant start up times, native performance

Development

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

For now, the default makefiles use the clang compiler toolchain. So either install clang (if not installed already), or open a PR adding support for other compilers.

Prerequisites

PureC is written in PureScript and currently not self-hoisting; A full node.js runtime is required. With node.js installed (any recent version will work) install the node.js dependencies to build purec.js: npm install.

Additionally, we require

  • make
  • libcmocka-dev
  • valgrind

Build the purec utility

Run npm run build to build the purec.js utility.

Running the tests

npm t

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

This project is alpha quality and will likely remain alpha quality for a while. That means for now there's one version, and that's origin/HEAD.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • uthash - A hash table for C structures
  • vec - A type-safe dynamic array implementation for C
  • ccan - The C Code Archive Network
  • purescript-native - An experimental C++11/native compiler backend for PureScript
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].