Git Product home page Git Product logo

sno's Introduction

snø

snø is an esolang I've made for Truttle1's 2023 esojam!

It is a 2D, stack-based esolang of which the IP can only go in diagonal directions

To run main.sn just type python snø.py, if you want to run another file, use python snø.py path/to/file.sn

Commands

The interpreter ignores every other character than these, making them no-op

The IP's (@) default direction is bottom left

IP direction commands

Arrow Direction
/ Bottom Left
\ Bottom Right
§ Random

Main commands

Command Description
@ IP starting point
0-F Push the corrisponding hex number as an integer
! Pop the last value
I Push user input (1 byte)
O Output the last value to the console then pop it
} Swap the last two values
$ Reverse the whole stack
: Duplicate the top value
+ Add last two values together, leaving only the result
- Subtract last two values together, leaving only the result
* Multiply last two values together, leaving only the result
| Divide last two values together, leaving only the result
^ Raise last two values together, leaving only the result
% Modulo last two values together, leaving only the result
~ NOR bitwise operator (you can make any bitwise operator with this!)
Y If number is non-zero, set direction to bottom left, set to bottom right otherwise
& End program

snø's arithmetic is NOS × TOS, meaning that it will duplicate the 2nd value on the stack by the last value on the stack

Example programs

Here are some example programs! There are a lot of them (send help they spawn every single nanosecond I breathe)

1-byte cat

    @
   \.
  ..I..
 ....O..
......&..

Demonstration of Y

      @
     \.
    ..I..
   ....Y..
  ....1.0..
 ....O...O..
....&.....&..

Addition calculator

      @
     \·
    ··I··
   ····I··
  ······+··
 ········O··
··········&··

Weird things

This code doesn't run

   .
  @@.
 II...
.......

The IP somehow cannot find the @ so it just gives up

Unicode input

Take the cat program and now put an unicode character such as 🍊, the output will be "ð"

sno's People

Contributors

kwmu4k avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.