Giter VIP home page Giter VIP logo

friendshipismonadic's People

Contributors

nrwolek avatar stillinbeta avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

friendshipismonadic's Issues

Some thoughts about the language

This year, I decided to try Advent of Code using FiM++. I haven't finished the puzzles yet, but nonetheless i believe I have found a few minor deficiencies which would be very helpful to resolve.

Firstly, and most importantly, it would be good to be able to control which type of input I read in. Currently, the following code snippet:

Did you know that Spike was a number?
I asked Spike.

will give an error, as (currently) the 'asked' keyword causes a new variable called Spike to be declared of the appropriate type, and the user input read into this variable.

What I would like to see would be that, if Spike is already declared and has a type, then the asked keyword reads a value of that type into the variable Spike. This is useful when I expect to read in a number and the user enters '2' (currently that would be read as a character); it is vital when I wish to read in a string, as the current state of string manipulation in FiM++ (i.e. virtually nonexistent) means that if I read in a string, there is no reasonable way to split it into its composite characters; if I want to split up a string, it becomes possible if I am able to read it in character by character, and perhaps store it in a character array.


The second thing that I believe would be very useful would be implicit conversion between types. For example, if I have a character variable containing the value 'a', and I attempt to put it into a number variable, I currently get an error. I believe that it would be better if I got the value 97 (ascii value of the character 'a') and that, if I later put a number with the value 97 into a character variable, that the result is 'a'.


I do not believe that either of these tweaks would run contrary to the language specification, and they would make the language far more usable; by which I mean, it would become possible to solve Advent of Code problems without specifically editing the input file so that the data can be read in in non-string format.

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.