Skip to main content
# HolyC-for-Linux
run HolyC on Linux secularly

[![Build Status](http://ec2-54-162-194-49.compute-1.amazonaws.com/job/holyc-for-linux/job/master/badge/icon)](http://ec2-54-162-194-49.compute-1.amazonaws.com/job/holyc-for-linux/job/master/)
[![PyPI version](https://badge.fury.io/py/secularize.svg)](https://badge.fury.io/py/secularize)

#### Disclaimer

This tool is in super-hella-mega alpha stage. If you use this, you will die. Or worse, your current operating system will be replaced with TempleOS. I've only tested this on `3.7-dev`.

## Install

```
pip install secularize
```

## Translate

The primary use is to translate holyc to c. Do this with:
`secularize examples/test.hc`

this turns `examples/test.hc`
```c
F64 *s = 3;

U0 test(I16 a, U8 b, F64 c) {
Print("hello");
}

F64 pest(I8 d) {
Print("nothing");
}

Print("%s %s", "hello", "world");
I64 b = 2.000;
```

into `examples/test.c`
```c
void test(short a, unsigned char b, double c)
{
printf("hello");
}

double pest(char d)
{
printf("nothing");
}

int main()
{
double* s = 3;
printf("%s %s", "hello", "world");
long b = 2.0;
}
```

## Debugging

To add a feature, it's useful to get the AST of an expected target. To do this, write the C file you're trying to translate to, then run `secularize dump-ast name-of-file.c`. This will pretty print the AST to json.

```sh
$ cat examples/math.c
int main()
{
long a = 3;
long b = 2;
}

$ secularize dump-ast examples/math.c
{
"_nodetype": "FileAST",
"coord": null,
"ext": [
{
"_nodetype": "FuncDef",
"coord": "examples/math.c:1:5",
"decl": {
"_nodetype": "Decl",
"name": "main",
"quals": [],
"storage": [],
"funcspec": [],
"coord": "examples/math.c:1:5",
"type": {
"_nodetype": "FuncDecl",
"coord": "examples/math.c:1:5",
"type": {
"_nodetype": "TypeDecl",
"declname": "main",
"quals": [],
"coord": "examples/math.c:1:5",
"type": {
"_nodetype": "IdentifierType",
"names": [
"int"
],
"coord": "examples/math.c:1:1"
}
},
"args": null
},
"init": null,
"bitsize": null
},
"body": {
"_nodetype": "Compound",
"coord": "examples/math.c:2:1",
"block_items": [
{
"_nodetype": "Decl",
"name": "a",
"quals": [],
"storage": [],
"funcspec": [],
"coord": "examples/math.c:3:8",
"type": {
"_nodetype": "TypeDecl",
"declname": "a",
"quals": [],
"coord": "examples/math.c:3:8",
"type": {
"_nodetype": "IdentifierType",
"names": [
"long"
],
"coord": "examples/math.c:3:3"
}
},
"init": {
"_nodetype": "Constant",
"type": "int",
"value": "3",
"coord": "examples/math.c:3:12"
},
"bitsize": null
},
{
"_nodetype": "Decl",
"name": "b",
"quals": [],
"storage": [],
"funcspec": [],
"coord": "examples/math.c:4:8",
"type": {
"_nodetype": "TypeDecl",
"declname": "b",
"quals": [],
"coord": "examples/math.c:4:8",
"type": {
"_nodetype": "IdentifierType",
"names": [
"long"
],
"coord": "examples/math.c:4:3"
}
},
"init": {
"_nodetype": "Constant",
"type": "int",
"value": "2",
"coord": "examples/math.c:4:12"
},
"bitsize": null
}
]
},
"param_decls": null
}
]
}

```

## What's Supported

- print statements
- primitive data types
- basic functions

## What's Not Supported

Everything else. Deal with it.

Metadata

Release files for secularize 0.0.1.post7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secularize 0.0.1.post7
File Size Uploaded Provenance Actions
secularize-0.0.1.post7.tar.gz 19.8 kB Without provenance Details for secularize-0.0.1.post7.tar.gz

Release files / secularize-0.0.1.post7.tar.gz

Download URL secularize-0.0.1.post7.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a3de8c80734850d667104b0288f09c4d22cf2b807211b00099b54e03e77b3967
BLAKE2b-256 checksum
How to use checksums
08e756100f356bd8a1701d5aadb30d016f8c54b57b0d062ce8ae1f89e8cb82e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for secularize 0.0.1.post7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page