Code Monkey home page Code Monkey logo

scratch-llvm's People

Contributors

bobbybee avatar trumank 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  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  avatar

scratch-llvm's Issues

Questions about what the code does.

Hello,

I have forked the github project and want to improve the code but there is a lot there and it's difficult to figure out how it works. Do you think you could explain in detail the code, especially backend.js and IR.js, so i could know what's happening here.

I want to remake the way the script runs so that instead of doing all this putchar, putnum and stacks stuff, it just adds the closest scratch equivalent of the input functions. Is this possible to do and what parts do I need to change to make this happen. I'd prefer to modify your project rather than starting from scratch as you've already done a considerable amount of the work.

Edit: Actually, perhaps I don't need an llvm if my aim isn't to convert to machine code but is to simply parse c and convert to scratch json, it might be better to keep the natural human readable code.

Wrong results in Scratch on conditions using clang in Ubuntu 14.04

I do in Bash in Ubuntu 14.04:

clang -S -emit-llvm tests/fizzbuzz.c
node meowcc.js fizzbuzz.ll > project.json
zip fizzbuzz.sb2 project.json

And then I upload fizzbuzz.sb2 to Scratch, but then the program only prints fizzbuzz everytime, as if conditions where always true. I have tested this in Ubuntu 14.04 and Raspbian Wheezy, but with the same wrong results. What version of clang do you use? Is there a way to get this to work in e.g. Ubuntu? Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4).

I also have to change 'void main' to 'int main' in all examples.

Simpler examples such as helloworld.c works without problems.

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.