Compare commits

..

1 Commits

Author SHA1 Message Date
bbbd068da5 Update sources.
All checks were successful
isspam build / build (push) Successful in 1m28s
2024-11-30 21:59:12 +01:00
8 changed files with 7 additions and 15 deletions

View File

@ -15,4 +15,4 @@ jobs:
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: make
- run: source $HOME/.cargo/env && make

View File

@ -4,14 +4,12 @@ CFLAGS = -Wall -Werror -Wextra -Ofast -std=c2x
all: build run valgrind build_risspam run_risspam
build:
@echo "Compiling retoor_c project.".
@# removed -pedantic flag because it doesn't accept ' for formatting numbers
@# using printf
@$(CC) $(CFLAGS) retoor_c/isspam.c -o isspam
@$(CC) $(CFLAGS) isspam.c -o isspam
build_risspam:
@echo "Compiling 12bitfloat_rust project."
cd 12bitfloat_rust/risspam && cargo run --release && cp target/release/risspam ../../

View File

@ -1,31 +1,26 @@
# Isspam
Fast as light evaluator for text files to summarize specific details about the text files.
This repository contains two versions of the same algorithm.
Versions:
- Rust (risspam) written by 12bitfloat.
- C (isspam) written by retoor.
Fast as light evaluator for text files to summarize specific details about the text files.
## Building
```
make build
```
Build isspam with memory check (requires valgrind to be installed):
Build with memory check (requires valgrind to be installed):
```
make valgrind
```
## Running
### Using files as parameter
```
./(r)isspam ./spam/*.txt
./(r)isspam ./not_spam/*.txt
./isspam ./spam/*.txt
./isspam ./not_spam/*.txt
```
### Using stdin
Useful for automation. Works only on the isspam version.
Useful for automation.
```
cat ./spam/example_spam1.txt | ./isspam
```
## Example output
Output example made by isspam.
```
File: ./spam/example_spam3.txt
Capitalized words: 39
@ -52,7 +47,6 @@ Word count per sentence: 21
Memory usage: 1 MB, 6.460 (re)allocated, 4.222 unqiue free'd, 0 in use.
```
## Valgrind status
Valgrind output for isspam version. Rust variant thinks it's too cool for memory checks afterwards.
Date: 2024-11-30
```
==58062==