Giter VIP home page Giter VIP logo

stax's People

Contributors

danielmayorga avatar danielmayorga-cedaron avatar dependabot[bot] avatar tomtheisen avatar ttheisen-cedaron 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

Watchers

 avatar  avatar  avatar  avatar  avatar

stax's Issues

No comments??

^ there doesn't seem to be any comments in the code..

Stepping through program crashes debugger

z|m should get the minimum value of an array. I'm not sure what the correct result is for an empty array, but certainly not crashing the debugger with "Stax runtime error: Cannot read property 'every' of undefined". Maybe infinity?

Annoying behaviour of Escape key in web environment with Quick Reference bar

If I press Esc to abort a program while the Quick Reference bar is open, it closes the Quick Reference bar. While there is another way to close the Quick Reference bar (F1), I haven't found another way to abort the program without clicking the button. It overrides the only and documented way to abort the program by an undocumented second way to close the Quick Reference bar, which is quite annoying.

Multiple issues in spec with &

& arr int any conflicts with & arr int block

& arr arr any conflicts with & arr arr block

When & arr int any gets a negative integer bigger than array's size the program's behavior is unspecified. arr int int any form excludes negative indices so the problem does not occur.

:f does more than flattening

While the document says "flatten the array once", current implementation sums elements if the first element of the array is a number, illustrated by this.

:P and :p directly outputs

Calling the :P and :p (and maybe others, I don't know) directly outputs the prime instead of putting it on the top of the main stack.

D instruction changes everything

From this online run it can be seen that D is changing the main stack, the input stack, and the X and Y variables. This behavior is undocumented and either this is a bug or the documentation is incomplete.

Date and Time functions

It would be useful to have date and time returning variables/ function for those types of challenges.

For reference, I wanted to solve this.

Doesn't work in Safari 10

The Stax interpreter doesn't seem to work at all in Safari: Permalinks don't load any code, the buttons basically do nothing and it is overall unresponsive.

Incorrect diagnostic for :[

On staxlang.xyz

Code: {}"a":[

Expected: Stax runtime error: macro not found for types in :[
Actual: Stax runtime error: macro not found for types in [

I spent an hour tracking this down because I couldn't figure out what instruction was faulting.

Feature request: Base64 encode/decode

When a string literal containing Unicode characters has to be used, the whole Stax program cannot be packed no matter how long it is. There are many solutions to this. Adding Base64 encode/decode is just one of them.

License Exists

For the content in LICENSE.md, it allows others to do anything they want. There is an existing license for that.

Instructions Missing Documentations

Not long ago I wanted to do a matrix transpose. I searched the document but could not find an instruction to do that. I can't believe that it is not implemented in Stax, so I checked the source code and found the instruction I need. It's M. I think I am going to live with it if this is the only instruction missing in the document.

Just now I tried to do factorization of a composite number, and again find that there are no such instructions in the document. I looked into the source and found the instruction |f. I don't know how many more are missing and I suggest making a thorough semi-automatic check over the source code to ensure that all available instructions have been properly documented.

In addition, some spurious quotation marks in the "Constant" section of the document should be removed. I have seen a recent commit removing the quotes for VI and Vi, but the quotes for Ve should be removed as well, for example.

A final issue on the document is, the document does not say whether it is possible to have a fraction literal, or how to embed one in the code. I know that I can write it in the input as a/b but even this (albeit somehow obvious) is not documented as well.

That said, I think the documentation of Stax is already much better than that of many golfing languages I have seen. I just want to make it even better.

There is an extra issue which may just as well be submitted as a separate issue. The Javascript version of Stax hangs if I run |f on 2147483647. It is a prime, but it is not too large and can be handled properly by a normal Javascript code that does not use the bigInteger type to factorize a composite number.

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.