Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Miguel Filipe
    @msf
    and yes, I understand I would get bad Go.
    Alan Justino da Silva
    @alanjds
    So you understood right :)
    There is a "stdlib" wrote mostly in Go that your Py code uses when translated to Go
    Pure-python libs like StringIO are just translated to Go. C-based ones are rewrote in Go or Python. "Primitives" like int, str, unicode are directly wrote in Go, and this is the Grumpy Runtime
    there is also the Grumpy Transpiler, that combines your Py->Go code with the Runtime, and calls Go to compile+run this thing
    On PyPI you can find grumpy-runtime and grumpy-tools. The transpiler lives in grumpy-tools.
    Miguel Filipe
    @msf
    ahh, so if I wanted to try and transpile some py modules with some of my code, I should look into grumpy-tools ?
    Alan Justino da Silva
    @alanjds
    Yes and no. You need to install only grumpy-tools and this can translate Py code. But such code relies on grumpy-runtime libs.
    So I advise to install grumpy-runtime as it already installs grumpy-tools
    You can gumpy transpile script.py and grumpy run script.py this way
    randiaz95
    @randiaz95
    Hi
    randiaz95
    @randiaz95
    Seems like py to go compilers are in python2 not 3 yet :D
    Alan Justino da Silva
    @alanjds
    Yes. And the resulting code is not faster for now, for single-threaded applications
    KyleHwang
    @upday7
    does anyone know that how to use grpc in angularDart?
    we use dart in flutter but seems that cannot be compiled in AngularDart ... thakns.
    kannanjmc
    @kannanjmc
    HI
    how to install grumpy
    in mac
    Alan Justino da Silva
    @alanjds
    Hi, @kannanjmc. The easiest way is to pip install grumpy-runtime
    You will need Golang already installed for this to work
    kannanjmc
    @kannanjmc
    great
    thanks
    Alan Justino da Silva
    @alanjds
    also, I strongly suggest you to use a virtualenv
    kannanjmc
    @kannanjmc
    could you please explain why so ?
    Alan Justino da Silva
    @alanjds
    Because without that nobody can 1) know what you already have installed 2) be sure that it will not mess with your working system
    kannanjmc
    @kannanjmc
    thanks Alan
    Alan Justino da Silva
    @alanjds
    3) be sure that the versions your are using are the same that I am using, to reproduce errors/bugs
    Good luck :+1:
    An Long
    @aisk
    Maybe we can ship a dockerfile and publish a docker image on docker hub
    Anatoli Babenia
    @abitrolly
    @aisk ^^^
    Now I need to understand how to get from Python print("%-20s %s" % ('hello', 'world')) to Go.
    Alan Justino da Silva
    @alanjds
    you can put text in a file hello.py then grumpy run hello.py
    Anatoli Babenia
    @abitrolly
    @alanjds can you look into why scheduled tests are failing https://travis-ci.org/github/grumpyhome/grumpy/builds ?
    Anatoli Babenia
    @abitrolly
    It doesn't matter much. PR tests are ok - https://travis-ci.org/github/grumpyhome/grumpy/pull_requests The only annoyance is that the CI status is not visible on PRs pages.
    Alan Justino da Silva
    @alanjds
    image.png

    @alanjds can you look into why scheduled tests are failing https://travis-ci.org/github/grumpyhome/grumpy/builds ?

    Is strange. Two months ago the very same commit passed.

    Maybe something changed on the OSX environment on CI
    Alan Justino da Silva
    @alanjds
    Huh. I rerun the master and passed. Ok then.
    Shah Zain
    @asifjamali83
    I want to convert a complet python script into Go
    if any one can help, ill thankfull,
    Alan Justino da Silva
    @alanjds
    Cool. Have you installed the grumpy tool on CLI?
    Shah Zain
    @asifjamali83
    No bro, i will if you help, also im noob
    Alan Justino da Silva
    @alanjds
    No prob. Please read the README. There are 3 ways to install Grumpy
    Shah Zain
    @asifjamali83
    Ok , i also google there was , pip install grumpy-tools
    Alan Justino da Silva
    @alanjds
    You need Python2.7, Go 1.10+ and make(and friends) preinstalled
    lipsa
    @lipsasenapati
    Hi Everyone, I am new to Grumpy, I am trying to extract Go code from Python code, could someone share the steps to do that?
    image.png
    I used grumpy transpile hello.py and got something like this