mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 00:46:07 +00:00
fix operation translation taking ages
This commit is contained in:
@@ -15,7 +15,7 @@ let interpret(code) = do
|
||||
else if (command == '-') do
|
||||
if (pointer not in memory) memory[pointer] = 0
|
||||
memory[pointer] = memory[pointer] - 1
|
||||
else if (command == '.') term.plain.oneLine(chr(memory.get(pointer, 0)), end='')
|
||||
else if (command == '.') term.log((memory.get(pointer, 0)))
|
||||
else if (command == ',') memory[pointer] = ord(input())
|
||||
else if (command == '[') do
|
||||
if (memory.get(pointer, 0) == 0) do
|
||||
@@ -30,5 +30,5 @@ let interpret(code) = do
|
||||
else loops.pop()
|
||||
code_ptr = code_ptr + 1
|
||||
|
||||
|
||||
interpret('>++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<++.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-]<+.')
|
||||
term.log("hello worldf")
|
||||
interpret('>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.>>>++++++++[<++++>-]<.>>>++++++++++[<+++++++++>-]<---.<<<<.+++.------.--------.>>+.>++++++++++.')
|
||||
@@ -2,4 +2,4 @@ import "csv" as csv
|
||||
|
||||
let table = (csv.read("tests/test.csv"))
|
||||
|
||||
term.log(number(table[::-1][0][::-1][0]))
|
||||
term.log(table)
|
||||
@@ -1,19 +1,15 @@
|
||||
let zero = 1/infinity
|
||||
let zero = 1e-1000
|
||||
let diff(f) = (x) = (f(x + zero) - f(x)) / zero
|
||||
|
||||
let count = 0
|
||||
|
||||
let f(x) = do
|
||||
count = count + 1
|
||||
term.log(count)
|
||||
return x^10+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1
|
||||
x = 100
|
||||
d = 0
|
||||
let x = 100
|
||||
let d = 0
|
||||
|
||||
forever do
|
||||
n = f(x)
|
||||
let n = f(x)
|
||||
term.log("f"+("'"*d)+"("+x+") = "+n)
|
||||
if (n == 0) break
|
||||
f = diff(f)
|
||||
d = d + 1
|
||||
count = 0
|
||||
d = d + 1
|
||||
@@ -1,7 +1,8 @@
|
||||
f() = do
|
||||
a = []
|
||||
for (i from 0 to 100000) a.append(i)
|
||||
let a = []
|
||||
for (i from 0 to 10000000) a.append(i)
|
||||
|
||||
term.log("start")
|
||||
f()
|
||||
term.log("end")
|
||||
term.log("end")
|
||||
input()
|
||||
@@ -1,9 +0,0 @@
|
||||
term.log(" /\\ |___ \\ ")
|
||||
term.log(" / \\ _ __ __ _ ___ _ __ __ ____) |")
|
||||
term.log(" / /\\ \\ | '__/ _` |/ _ \\| '_ \\ \\ \\ / /__ < ")
|
||||
term.log(" / ____ \\| | | (_| | (_) | | | | \\ V /___) |")
|
||||
term.log(" /_/ \\_\\_| \\__, |\\___/|_| |_| \\_/|____/ ")
|
||||
term.log(" __/ | ")
|
||||
term.log(" |___/ ")
|
||||
term.log("----------------------------------------------")
|
||||
term.log("Welcome to ARGON!")
|
||||
Reference in New Issue
Block a user