by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alberto Berti
    @azazel75
    hello
    Gavin Bisesi
    @Daenyth
    o/
    Alberto Berti
    @azazel75
    We and the_drow actually met on freenode's irc #macropy
    Alberto Berti
    @azazel75
    I'll check up this channel from time to time
    Alberto Berti
    @azazel75
    hey, it seems that i'm the only one writing here..
    Gavin Bisesi
    @Daenyth
    So it seems >.>
    Federico Ferri
    @fferri
    no need to check periodically. I usually receive an email notification. but yeah, the only one writing here...
    anterak13
    @anterak13
    Hi, jumping in to check if any progress is still going on making macropy work with python 3.x.x and how I could help
    Alberto Berti
    @azazel75
    @anterak13, it's in good shape and running in 3.5, 3.6
    anterak13
    @anterak13
    Good news! I checked out the python3 branch from github and did a local install, so far my attempts to use it have all failed (import time errors with python 3.6.2).
    Alberto Berti
    @azazel75
    @anterak13 you should check out my fork
    Gavin Bisesi
    @Daenyth
    I should probably follow the repo
    hmm, I wonder if @case works with py3 annotations. For work stuff I've got us to the point where we're all-in on typing stuff, and case seems better than typing.NamedTuple if it can be typed
    Alberto Berti
    @azazel75
    @Daenyth You should come up with some tests to use as examples
    Gavin Bisesi
    @Daenyth
    That's a good idea
    anterak13
    @anterak13
    Hi again @azazel75 , eventually got your fork to work with 3.6.2 :) had to read through the doc to figure out macro expansion was happening at import time. So far everything except @tco seems to work.
    anterak13
    @anterak13
    I'm trying to use macropy's case classes, peg and pattern matching together the show_expanded on a project A to generate python code to import as a dependency in a project B. I'd like to be able to type-annotate case class argruments. I could annotate the expanded code, but I was wondering if I could instead add annotations to the case classes before expansion and if they would survive the macro expansion and end up in the generated code.
    Gavin Bisesi
    @Daenyth
    @anterak13 that's an area of interest for me. If that doesn't work, opening an issue on the repo with an example snippet of desired behavior would be a good next step
    Tomer Praizler
    @tpraizler
    Hey guys, just wanted to check. looks like https://github.com/lihaoyi/macropy#macropy is not maintained for 4 years. is that true? I come from the scala world and I am currently working on a project that uses python 3.4. macropy looks like a something that will let me write a much better code:) But I need to understand if it's production ready and if it is safe to use it.
    Gavin Bisesi
    @Daenyth
    It's certainly not production ready for python3
    Also I highly recommend upgrading to 3.6, anything lower than 3.5 is a bit of a dead zone.
    If you're looking for case classes, typing.NamedTuple is your best bet right now
    If the data classes pep makes it into 3.7 then that will be better
    but for now NT is usually the best option
    attrs is another option, but you'll have to throw away type checking
    Tomer Praizler
    @tpraizler
    @Daenyth Thanks!
    This was based off a work project I'm using with very heavy use of namedtuples and 100% type enforcement
    Alberto Berti
    @azazel75
    @tpraizler have a look at https://github.com/azazel75/macropy
    i've also released it as an alpha package named macropy3
    Alberto Berti
    @azazel75
    So guys, it anyone still cares, I've reimplemented the core logic expand the macros inside-out in my branch. If you use macropy with python3 (3.3+) could you please spend some time to check it out and try it with your code?
    Gavin Bisesi
    @Daenyth
    I'm probably not going to make any significant contributions at this point since my new job is back to scala. I don't see myself writing any complicated python any time soon. Feel free to tag me in PR reviews though if you like
    Alberto Berti
    @azazel75
    For a rationale about this please see lihaoyi/macropy#84
    Alberto Berti
    @azazel75
    @lihaoyi ayt?
    Guilherme Leobas
    @guilhermeleobas
    Hi, is it possible to use macropy to define a new operator in python? Or that requires changing the python grammar/parser?
    Bersier
    @Bersier
    Hi, I installed macropy3 successfully. However, when I try to run https://github.com/lihaoyi/macropy/blob/master/docs/examples/using_macros/target.py, I get "NameError: name 'x' is not defined". IntelliJ also tells me that "Parameter 'gen_sym' is unfilled" for "@case". What am I missing?