Skip to content

Commit

Permalink
Fixed some errors on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
pax0r committed Dec 14, 2016
1 parent 4752fd9 commit 0ca5039
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Run code from the file:
`bin/bf -f source_file`

Run code from stdin:
`cat source_file > bin/bf`
`cat source_file | bin/bf`

# Usage from python

Expand All @@ -25,4 +25,4 @@ Interpreter(code=source_code).run()
- Cells can store any int or long number (not only 8-bit chars)
- Number of cells is limited only by memory
- Reading cells using negative index is undefined (may wraps to the end of the allocated memory or raise IndexError) and may change in the future.
- It can print any UTF-8 character (not only ASCII). If number stored in cell is not UTF-8 it will raise ValueError on printing (but you can store them, just don't use `.` on them!)
- It can print any UTF-8 character (not only ASCII). If number stored in cell is not UTF-8 it will raise ValueError on printing (but you can store them, just don't use `.` on them!)
2 changes: 2 additions & 0 deletions bf.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/usr/bin/env python

from pyfuck import __main__
10 changes: 5 additions & 5 deletions examples/division
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
z Wikipedii
,>,>++++++[-<--------<-------->>] przechowuje dwie cyfry w (0) i (1) od obu odejmujemy 48
<<[ powtarzaj dopóki dzielna jest niezerowa
>[->+>+<<] kopiuj dzielnik z (1) do (2) i (3) (1) się zeruje
>[-<<- odejmujemy 1 od dzielnej (0) i dzielnika (2) dopóki (2) nie jest 0
[>]>>>[<[>>>-<<<[-]]>>]<<] jeżeli dzielna jest zerem wyjdź z pętli
<<[ powtarzaj dopoki dzielna jest niezerowa
>[->+>+<<] kopiuj dzielnik z (1) do (2) i (3) (1) sie zeruje
>[-<<- odejmujemy 1 od dzielnej (0) i dzielnika (2) dopoki (2) nie jest 0
[>]>>>[<[>>>-<<<[-]]>>]<<] jezeli dzielna jest zerem wyjdz z petli
>>>+ dodaj jeden do ilorazu w (5)
<<[-<<+>>] kopiuj zapisany dzielnik z (3) do (1)
<<<] przesuń wskaźnik na (0) i powtórz pętlę
<<<] przesun wskaznik na (0) i powtorz etle
>[-]>>>>[-<<<<<+>>>>>] kopiuj iloraz z (5) do (0)
<<<<++++++[-<++++++++>]<. dodaj 48 i drukuj wynik
4 changes: 2 additions & 2 deletions examples/hello_world
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Z Wikipedii
++++++++++
[
>+++++++>++++++++++>+++>+<<<<-
] Na początek ustawiamy kilka przydatnych później wartości
] Na poczatek ustawiamy kilka przydatnych pozniej wartosci
>++. drukuje 'H'
>+. drukuje 'e'
+++++++. drukuje 'l'
Expand All @@ -15,4 +15,4 @@ Z Wikipedii
------. drukuje 'l'
--------. drukuje 'd'
>+. drukuje '!'
>. nowa linia
>. nowa linia
2 changes: 1 addition & 1 deletion pyfuck/getch.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __call__(self):

class _GetchWindows:
def __init__(self):
pass
import msvcrt

def __call__(self):
import msvcrt
Expand Down

0 comments on commit 0ca5039

Please sign in to comment.