Giter VIP home page Giter VIP logo

pythowo's Introduction

See how pythOwO was made (2 min video)

pythOwO is an uwu programming language written in Python. UwU.

Get PythOwO LangUwUage support for VSCode

PythOwO on PyPi

pip install PythOwO

Uwusage

Cruwueate a nuwu file - test.pyowo

pwint("Hewwo Wowrld")

Ruwun

Either run from the interpreter directly:

python pythowo.py test.pyowo

Or run in an interactive shell:

python shwell.py
(。・ω・。)ノ♡> rwun("test.pyowo")

Ouwutpuwut

Hewwo Wowrld

Docuwumentation

General

python shwell.py opens the pythOwO shell. Running rwun("test.pyowo") from the shell execuwutes code from the file test.pyowo.

Variables

Variables can be decluwuared using the keyword pwease.

pwease baka = 100
pwease tehe = "two"
pwease chan = 25
pwease baka = baka + 1
pwease tehe = 500
pwease chan = chan * 2

pwint(tehe)
pwint(baka)
pwint(chan)

Ouwutpuwut

500
101
50

Conditionals

IF《condition》THWEN《expression》EWIF《condition》THWEN《expression》

pwease tehe = 501

IF tehe == 502 THWEN pwease chan = "tehe is 502!" EWIF tehe == 501 THWEN pwease chan = "
is 501!" EWSE pwease chan = "tehe is 500!"

pwint(chan)

Ouwutpuwut

tehe is 501!

Loops

FOR i = 0 TO 5 THWEN
	pwint("UwU")
END

Ouwutpuwut

UwU
UwU
UwU
UwU
UwU

Functions

FWUNCTION owofy(pwefix) -> pwefix + "OwO"

pwint(owofy("This is pyth"))

Ouwutpuwut

This is pythOwO

Clear

You can clear the shell with the cwear command

(。・ω・。)ノ♡ > cwear

Contribuwuting

All contribuwutions are welcome, just make a puwull request!


Testing

Unit tests are available through the unittest module. New test files must start with `test*.py` to be detected.

python -m unittest

Pythowo logo credit

Thank youwu @Haddle for making VSCode language support for PythOwO

Thank youwu @Tulip-0333 for helping with putting PythOwO up on PyPi

uwu

pythowo's People

Contributors

anshu189 avatar calciumista avatar carlosrobles186 avatar efraimjohn avatar enokiun avatar gholmes829 avatar goombaprogrammer avatar infinidoge avatar kawaeee avatar lordubuntu avatar ozgurozbek avatar prcsousa avatar stavrosnik4 avatar swiddis avatar tempewda avatar theycallhermax avatar toma222 avatar tulip-0333 avatar undefinedconcept avatar virejdasani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pythowo's Issues

add/update documentation

documentation needs to be added for uwu-fied in-built functions such as:
-pwint()
-inpwt()
also other changes like how pwint() distinguishes between " and ', and also how only "" is accepted by pwint() when pwinting strwings

add/update documentation

I would like to pwopowose that Contribuwuting in README.md be renamed to Contwibuwuting and similarly contribuwutions to contwibuwutions.

Additionally, request to be renamed as wequest

rules to UwUfwicatwion?

what if we define some rules so that we can identify when to use "uwu" and "w" during uwufwicatwion?
so suppose we have 3 words, number, please, math
they get uwufied as:
number -> nuwumber
please -> pwease
math -> mathowo
(source: calcuwulator.pyowo)

setting some rules would help future contributors during uwufwicatwion, n will prevent over/under uwufwicatwion at times
:3

awdd feawoture Cwass Owobject

It's gonna be more owosome if it can use owobject like:

cwass Owo:
  fwunction __iwnit__(sweef, nwame, awge):
    sweef.nwame = name
    sweef.awge = awge  

owo1 = Owo("Kawaiowo", 19)

pwint(owo1.nwame)
pwint(owo1.awge) 

can't compare strings.

I cant compare strings in conditional statements. for example this code produces an error:

pwease baka = "hewwo"
pwease awoo = "hewwo"
IF awoo==baka THWEN pwint("they are equal ") EWSE pwint("twy again")

the error message is

Traceback (most recent call last):
File test.pyowo, line 4, in
owo, whats this? Runtime Error? Oh nwo! : Illegal operation
IF awoo==baka THWEN pwint("yay") EWSE pwint("twy again")
__^^^^^^^^^^

Undescriptive error messages for lowercase control flow

Issue description

When writing code which doesn't capitalize the control flow keywords (to below), the error message is very opaque.

Steps to reproduce the issue

Run the following:

pwease sum = 0
FOR i = 0 TO 5 THWEN
    FOR j = 0 to 3 THWEN
        pwease sum = sum + 1
    END
END
pwint(sum)

What's the expected result?

  • If we decide to ignore case on the keywords, then the code should output 15,
  • Or the code should yield an error message that at least points to the right area of the code.

What's the actual result?

  • The code yields
Owo, whats this? Invawid Syntax? Oh nyo! : Token cannot appear after previous tokens
File exwamples/nwest.pyowo, line 2


FOR i = 0 TO 5 THWEN
^^^

Bootstrap a pythOwO compiler in pythOwO

This is a bit of a tall order but I reckon it will be doable. We need to go deeper. Writing the compiler to output Python will probably be most natural, but since the feature set is small (I don't see classes implemented) any language could work. Maybe C so we can actually do a full compilation process and get a working Compiwer binary. Some action steps:

  1. Write a working interpreter in a lower-level target language that is restricted to the implemented feature-set of PythOwO
  2. Test the compiler thoroughly enough that we can be sure it will translate PythOwO faithfully
  3. Finally, translate the compiler to PythOwO
  4. Build and ship the Compiwer

For reference, I would recommend looking a little into LoxLox, which is a Lox implementation of the simple language Lox. The only real barrier to implementing it directly is the use of classes. In addition there's the C implementation in Crafting Interpreters, which does fairly well without classes.

It's exist.

Delete this fucking shit and don't disgrace programming, stupid idiots.

Add arrays

It would be good idea to add arrays in the future.

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.