This website was created purely for fun and educational purposes. It's a playful exploration of programming concepts and design.
Feel free to explore and experiment!
Write a program that prints "Hello, Toxic World!" using ToxicCode syntax:
ToxicCode is a modern programming language designed for simplicity and expressiveness. It combines the best features of functional and imperative programming paradigms.
toxic.print(expression) - Outputs the evaluated expression to the consoletoxic.print(value) - Prints value to consoletoxic.clear() - Clears the console outputtoxic.format(text, style) - Prints formatted text with stylestoxic.alert(message) - Shows an alert messagetoxic.loop(count, callback) - Executes callback n timestoxic.delay(ms, callback) - Executes callback after delaytoxic.interval(ms, callback) - Repeatedly executes callbacktoxic.timeout(ms, callback) - Executes callback once after delaytoxic.math.add(a, b) - Adds two numberstoxic.math.subtract(a, b) - Subtracts b from atoxic.math.multiply(a, b) - Multiplies two numberstoxic.math.divide(a, b) - Divides a by btoxic.math.power(base, exp) - Raises base to exponenttoxic.math.random(min, max) - Generates random numbertoxic.math.round(number) - Rounds to nearest integertoxic.array.forEach(array, callback) - Iterates over arraytoxic.array.map(array, callback) - Maps array to new valuestoxic.array.filter(array, callback) - Filters array elementstoxic.array.reduce(array, callback) - Reduces array to single valuetoxic.array.sort(array) - Sorts array elementstoxic.array.reverse(array) - Reverses array elementstoxic.string.length(str) - Returns string lengthtoxic.string.uppercase(str) - Converts to uppercasetoxic.string.lowercase(str) - Converts to lowercasetoxic.string.split(str, delimiter) - Splits string into array
// Using the loop function
toxic.loop(3, () => toxic.print("Hello"));
// Using math functions
let result = toxic.math.add(5, 3);
toxic.print(result);
// Using array functions
let numbers = [1, 2, 3];
toxic.array.forEach(numbers, (n) => toxic.print(n));
// Using delay
toxic.delay(1000, () => toxic.print("Delayed message"));
toxic.system.getTime() - Returns current timetoxic.system.getDate() - Returns current datetoxic.system.platform() - Returns system platformtoxic.system.browserInfo() - Returns browser informationtoxic.validate.isNumber(value) - Checks if value is a numbertoxic.validate.isString(value) - Checks if value is a stringtoxic.validate.isArray(value) - Checks if value is an arraytoxic.validate.isEmpty(value) - Checks if value is emptytoxic.string.reverse(str) - Reverses a stringtoxic.string.replaceAll(str, search, replace) - Replaces all occurrencestoxic.string.trim(str) - Removes whitespacetoxic.string.contains(str, search) - Checks if string contains valuetoxic.math.sqrt(number) - Calculates square roottoxic.math.abs(number) - Returns absolute valuetoxic.math.max(...numbers) - Returns maximum valuetoxic.math.min(...numbers) - Returns minimum value
// Using system functions
toxic.print(toxic.system.getTime());
toxic.print(toxic.system.platform());
// Using validation
toxic.print(toxic.validate.isNumber("123"));
toxic.print(toxic.validate.isString(456));
// Using new string functions
toxic.print(toxic.string.reverse("Hello"));
toxic.print(toxic.string.contains("Hello World", "World"));
// Using new math functions
toxic.print(toxic.math.sqrt(16));
toxic.print(toxic.math.max(1, 5, 3, 9, 2));
toxic.fileSystem.readFile(filename) - Reads file contenttoxic.fileSystem.writeFile(filename, content) - Writes to filetoxic.fileSystem.deleteFile(filename) - Deletes a filetoxic.fileSystem.listFiles() - Lists all filestoxic.network.fetch(url) - Fetches data from URLtoxic.network.post(url, data) - Posts data to URLtoxic.network.websocket(url) - Creates WebSocket connectiontoxic.dataStructures.stack.create() - Creates a new stacktoxic.dataStructures.stack.push(stack, item) - Pushes item to stacktoxic.dataStructures.stack.pop(stack) - Pops item from stacktoxic.dataStructures.queue.create() - Creates a new queuetoxic.dataStructures.queue.enqueue(queue, item) - Adds item to queuetoxic.dataStructures.queue.dequeue(queue) - Removes item from queuetoxic.dataStructures.set.create() - Creates a new settoxic.dataStructures.set.add(set, item) - Adds item to settoxic.dataStructures.set.delete(set, item) - Removes item from settoxic.crypto.hash(text) - Hashes input texttoxic.crypto.encrypt(text, key) - Encrypts text with keytoxic.crypto.decrypt(text, key) - Decrypts text with keytoxic.crypto.generateKey() - Generates encryption key
// Using Data Structures
let stack = toxic.dataStructures.stack.create();
toxic.dataStructures.stack.push(stack, "item1");
toxic.print(toxic.dataStructures.stack.pop(stack));
// Using Crypto
let key = toxic.crypto.generateKey();
toxic.crypto.encrypt("secret message", key);
// Using Network
toxic.network.fetch("https://api.example.com/data");
// Using File System
toxic.fileSystem.writeFile("test.txt", "Hello World");
toxic.fileSystem.readFile("test.txt");