Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

More work on stdlib #384

Closed littlewhitecloud closed 1 year ago

littlewhitecloud commented 1 year ago

Improve stdlib and fix #376

* Maybe we can put some functions into _builtin.jou and import it as a special file like _windows_startup.jou when compiling

littlewhitecloud commented 1 year ago

image That's strange, I can't see anything about the failed test.

Akuli commented 1 year ago

Here's what it looks like to me:

s

littlewhitecloud commented 1 year ago

Thanks. Maybe my network has some error. (I always cannot connect github.com)

littlewhitecloud commented 1 year ago

On linux:

-1
-1145141919180
-114.514000
-5.000000
-4.000000
-3.000000
-1.140000
-3.000000
-3
-1.140000
-0.500000
-0.707107
--0.828017
-3.141593
--1.570796
--0.785398
--2.356194
--4.000000
--0.000000
-10.067662
-27.289917
-1.000000
-4.499686
-4.499933
--0.549306
-20.085537
-8.000000
-40.000000
-4.736198
-2.056905
-6.832890
-5.140000
-1.140000
-0.000000
-5.814141
-0.760806
-4.000000
-2.236068
-3.000000
-5.000000
-0.842701
-0.157299
-120.000000
-4.787492
+clang: error: linker command failed with exit code 1 (use -v to see invocation)
  Error: Compilers behave differently when given "tests/should_succeed/mathlibtest.jou".

On windows:

tokenize tests/should_succeed/mathlibtest.jou
  Compilers behave the same as expected
parse tests/should_succeed/mathlibtest.jou
  Compilers behave the same as expected
run tests/should_succeed/mathlibtest.jou
  Compilers behave the same as expected
Akuli commented 1 year ago

:D

I'll try this on a linux computer at some point.

littlewhitecloud commented 1 year ago

Should jou have built-in functions?

Akuli commented 1 year ago

This PR is becoming pretty large. Can you instead make multiple smaller PRs? For example, I would like to review and merge all math.jou changes separately.

I don't think we should have built-in functions or color printing in stdlib, at least not yet. What problems would they solve?

Akuli commented 1 year ago

If you make a new branch before starting a pull request, you can keep multiple pull requests up at once.