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
#!/bin/bash | |
# Moves the sys.dll and libjulia.dll files into sys.$NAME.dll and libjulia.$NAME.dll in their respective directories. | |
# (See julia-loadimage.sh.) | |
# If the files already exists, prompts before overwriting. | |
# | |
# Usage: ./julia-saveimage.sh <name> | |
ABORT=0 | |
LIB=usr/lib/julia |
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
#!/bin/bash | |
# Moves libjulia.$NAME.dll and sys.$NAME.dll back into place. (See julia-saveimage.sh.) | |
# If the files already exist, prompts before overwriting. | |
# | |
# Usage: ./julia-loadimage.sh <name> | |
LIB=usr/lib/julia | |
BIN=usr/bin | |
ABORT=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
@ECHO OFF | |
:: Path to Odin executable | |
SET ODINPATH="C:\odin\odin.exe" | |
:: Path to the Microsoft 'vcvarsall.bat' file. | |
:: This sets the required environment vars and makes cl.exe and link.exe available in PATH. | |
SET VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat" | |
:: Only run the MSVC batch file the first time we |
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
/* | |
A simple base64 encoder/decoder. | |
Written by Tetralux@github. | |
Created December 2018. | |
*/ | |
package base64; | |
using import "core:fmt"; |
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
@echo off | |
:: Path to vcvarsall.bat from Visual Studio | |
:: When called, it makes cl.exe (C++ compiler) and link.exe (Linker) available in PATH. | |
set VCVARSPATH="C:\Program Files (x86)\Microsoft Visual Studio\VC\Auxiliary\Build\vcvarsall.bat" | |
if "%VSISSET%"=="" ( | |
%VCVARSPATH% %* | |
if "%ERRORLEVEL%"=="0" ( | |
set VSISSET=%* |
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
package process | |
import "core:c" | |
import "core:c/libc" | |
import "core:strings" | |
when ODIN_OS == .Windows { | |
foreign import libc_obj "system:libucrt.lib" | |
POPEN_NAME :: "_popen" | |
PCLOSE_NAME :: "_pclose" |
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
// | |
// A simple example of a calculator programming language, that compiles to native code! | |
// | |
// Written by Tetralux <[email protected]>, 2023-03-09. | |
// | |
// Programs are a string that you pass as an argument in the form of a mathmetical expression. | |
// e.g: '10 + 4 - 1 + 7'. | |
// This program will generate some Zig code that computes the answer, and prints it to stdout. | |
// It then will invoke the Zig compiler as a subprocess to compile and run this program. | |
// |
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
import "core:mem" | |
import "core:runtime" | |
Counting_Allocator :: struct { | |
total_used: uint, | |
backing_ally: mem.Allocator, | |
} | |
counting_allocator :: proc(ca: ^Counting_Allocator) -> mem.Allocator { | |
return { |
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
// | |
// A simple example program that runs a program with the given arguments by searching the PATH environment variable. | |
// | |
// Tetralux, 2023-10-13. | |
// | |
const std = @import("std"); | |
const builtin = @import("builtin"); | |
const string = []const u8; |
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 std = @import("std"); | |
const string = []const u8; | |
const Allocator = std.mem.Allocator; | |
/// Given an entire INI string, parses it into a map of key-value pairs. | |
/// The pairs are all freed by a call to `Parser.deinit`, and retrieved via `Parser.get`. | |
/// If you need them to live beyond that, use `some_other_allocator.dupe(u8, value)`. | |
pub const Parser = struct { | |
data: std.StringArrayHashMap(string), |
OlderNewer