Skip to content

Commit

Permalink
remove c++ BLOAT
Browse files Browse the repository at this point in the history
  • Loading branch information
adamperkowski committed Dec 16, 2024
1 parent 4d96214 commit 0cd3e58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
11 changes: 4 additions & 7 deletions _2024/_01/01.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@
// https://github.com/adamperkowski/aoc_jule
// https://adventofcode.com/2024/day/1

use "std/conv"
use "std/math"
use "std/os"
use "std/slices"
use "std/strings"

cpp use "helper.hpp"

cpp fn readIntegers(line: str, do_right: bool): int

fn calculateMetrics(input: []byte): [2]int {
lines := strings::SplitAll(str(input), "\n")

let mut list_left: []int
let mut list_right: []int

for _, line_b in lines {
line := str(line_b)
list_left = append(list_left, cpp.readIntegers(line, false))
list_right = append(list_right, cpp.readIntegers(line, true))
line := strings::SplitAll(str(line_b), " ")
list_left = append(list_left, conv::Atoi(line[0])!)
list_right = append(list_right, conv::Atoi(line[1])!)
}

slices::Sort(list_left)
Expand Down
19 changes: 0 additions & 19 deletions _2024/_01/helper.hpp

This file was deleted.

0 comments on commit 0cd3e58

Please sign in to comment.