This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # This program parses a very simple config file format into a dict (from a file path). | |
| # Doesn't matter what the extension is, that doesn't matter in this code. | |
| # But if the file doesn't exist, it returns None. | |
| # No credit required, but would be appreciated :P | |
| # (Written by Blair Myhre for SYWFETCH -- 2024) | |
| # | |
| # The format is as follows: | |
| # - Each value is separated by an equals sign = | |
| # - Comments can be written by starting a line with # | |
| # - Comments will be ignored if there is any character preceding the # | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Number 999998 (iterations: 258) has less iterations than 837799 (iterations: 524). | |
| Number 999999 (iterations: 258) has less iterations than 837799 (iterations: 524). | |
| The number with the most iterations was 837799 with 524 iterations. | |
| Operation took 1017.723977081s. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | use std::time::Instant; | |
| fn collatz_step(n: u64) -> u64 { | |
| if n % 2 == 0 { n / 2 } | |
| else { 3 * n + 1 } | |
| } | |
| fn collatz(n: &u64) -> Vec<u64> { | |
| let mut x: u64 = n.clone(); | |
| let mut nums = vec![0; 0]; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #![allow(dead_code)] | |
| fn collatz_step(n: u64) -> u64 { | |
| if n % 2 == 0 { n / 2 } | |
| else { 3 * n + 1 } | |
| } | |
| fn collatz(n: &u64) -> Vec<u64> { | |
| let mut nums = vec![0; 0]; | |
| let mut x: u64 = n.clone(); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | fn main() { | |
| let mut x: u64 = 100; //First number | |
| let mut c: u64 = 0; //Counts how many times the equation was evaluated | |
| let mut nums = vec![0; 0]; //Output of each number | |
| let s: u64 = x; //First number, but invariable | |
| while x >= 2 { | |
| c += 1; | |
| nums.push(x); | |
| x = collatz(x); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const Tokens = { | |
| '$': "%DOLLAR", | |
| '(': "%PARENTHESIS_OPEN", | |
| ')': "%PARENTHESIS_CLOSE", | |
| '%': "%PERCENT", | |
| '#': "%POUND", | |
| "'": "%QUOTE", | |
| ' ': "%SPACE" | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // class Matrix, created by cocosbeans | |
| // | |
| // Require it: const { Matrix } = require('./matrix.js'); | |
| // Use it: const matrix = new Matrix(x, y); | |
| // | |
| // Matrix.pointer: a two-item array containing [row, col] | |
| // Matrix.matrix: the matrix defined by the constructor | |
| // | |
| // constructor(width, height) | |
| // Define a matrix with a width and height. | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;;This code is the functionality behind the endless waves mode of Kill The Parasites. | |
| ;;To be used with https://www.curseforge.com/minecraft/mc-mods/clojure-command-language | |
| ;;For Bali's Kill The Parasites modpack https://www.curseforge.com/minecraft/modpacks/kill-the-parasites | |
| ;;Function 'lib/exec' is from the CurseForge mod on line 2. | |
| ;;WORK IN PROGRESS! | |
| (ns infinite.core | |
| (:use clojure.test ) | |
| (:require [clojure.string :as string] )) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const TokenHandler = require('./token/token-handler.js') | |
| const token = new TokenHandler() | |
| class Parse { | |
| parse(code) { | |
| let x = "" | |
| for (this.i = 0; this.i < code.length; this.i++) { | |
| if (code[this.i] === " ") x += " SPACE" //Special exception 1 | |
| if (code[this.i] === "\n") x += " NEWLN" //Special exception 2 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Token { | |
| constructor() { | |
| this.token = require('./token.json') | |
| this.types = require('./types.json') | |
| this.list_string = this.types["STRING"] | |
| this.list_symbol = this.types["SYMBOL"] | |
| } | |
| checkType(object = '') { |