GithubHelp home page GithubHelp logo

Comments (11)

wmww avatar wmww commented on August 26, 2024

That commit was for controlling the interpreter with arguments there is currently not support for giving your program arguments. I will update this issue when I implement this.

from pinecone.

jacobmacweb avatar jacobmacweb commented on August 26, 2024

ok, i will be sure to check by later

from pinecone.

jacobmacweb avatar jacobmacweb commented on August 26, 2024

I'll try and add this myself soon. If you want.

from pinecone.

wmww avatar wmww commented on August 26, 2024

Go for it. Sorry I haven't added it, I haven't worked on Pinecone much lately.

from pinecone.

wmww avatar wmww commented on August 26, 2024

on lines 193 and 227 in src/main.cpp I set i (the current command line arg being processed) to argc (the cont of the arguments. To implement command line args, make a vector of strings in the Flags struct (in main.cpp), fill that with all the arguments that come after the -e or -r flag and then expose that as a builtin global variable.

from pinecone.

wmww avatar wmww commented on August 26, 2024

On second thought, you might want to make the args vector a global, so you can access it in PineconeStdLib.cpp where you can expose it. If you have any trouble implementing it, let me know.

from pinecone.

jacobmacweb avatar jacobmacweb commented on August 26, 2024

Currently out, when I get home I'll implement that and then merge.

from pinecone.

jacobmacweb avatar jacobmacweb commented on August 26, 2024

i haven't used c++ in a while.

But i gave it a go, from what i can remember.

here

from pinecone.

jacobmacweb avatar jacobmacweb commented on August 26, 2024

It is very much a WIP change.

You're probably better to do it, you know in better detail how you want it to work.

from pinecone.

wmww avatar wmww commented on August 26, 2024

Your patch looks good but still needs some stuff I will add (as per my comment on the PR)

Also, a different system needs to be created for argument parsing when transpiled. For starters, when transpiling and automatically running the arguments after the -e must be carried along to the executed binary. This can be done by using this function on your args vector and appending it to the executed command around here. You can do that on your patch branch if you want. There is other stuff that's needed in the transpiled code, but that's a bit complicated. I'll look into it later.

from pinecone.

wmww avatar wmww commented on August 26, 2024

Merged in your PR with my additions and fixes. It now supports command line args both when compiled or interpreted. Documentation for this feature is at the end of the temporary hacks tutorial.

from pinecone.

Related Issues (20)

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.