Coder Social home page Coder Social logo

Comments (8)

nalimilan avatar nalimilan commented on May 18, 2024 1

Got an explanation on the Julia issue. #91 should fix it.

from dataframesmeta.jl.

nalimilan avatar nalimilan commented on May 18, 2024

@bramtayl saved us last time by porting the macros to 0.6, maybe he has ideas? It would also be interesting to try reproducing the bug directly with where, i.e. without macros.

from dataframesmeta.jl.

bramtayl avatar bramtayl commented on May 18, 2024

I dont think theres a macro issue here:

julia> MacroTools.prettify(@macroexpand @transform(dd, d = (:b ./ :c)))
:(transform(dd, d=(barracuda->begin
                  function echidna(lion, dinosaur)
                      dinosaur ./ lion
                  end
                  echidna(barracuda[:c], barracuda[:b])
              end)))
julia> MacroTools.prettify(@macroexpand @where(dd, :b .>= 0.2, :a .>= Date(1998)))
:(where(dd, (barracuda->begin
              function echidna(lion, dinosaur)
                  (dinosaur .>= 0.2) .& (lion .>= Date(1998))
              end
              echidna(barracuda[:b], barracuda[:a])
          end)))

Both seem reasonable to me, meaning the issues are in transform and where

from dataframesmeta.jl.

bramtayl avatar bramtayl commented on May 18, 2024

Oh wait the argument order is backwards for where...

from dataframesmeta.jl.

bramtayl avatar bramtayl commented on May 18, 2024

Ok so here's what I'm getting:

The order of the arguments for the "ecdina" function come in a random/inconsistent order. These arguments are the keys of the membernames Dict. Aren't keys and values are supposed to return items in a consistent order?

This behavior only appears when with_helper is nested within other functions. That is, this is working consistently for me:

:($d -> $(DataFramesMeta.with_helper(d, body))) |> MacroTools.prettify

But this is not:

DataFramesMeta.with_anonymous(body) |> MacroTools.prettify

from dataframesmeta.jl.

nalimilan avatar nalimilan commented on May 18, 2024

Good catch! AFAIK entries in a dictionary are unordered, but it's guaranteed that keys and values use the same order. So maybe something has been broken in Base. It would help if we could identify the commit which broke this code. If it still works on the outdated Windows nightlies, we should be able to find it without too much work. Do you confirm that?

from dataframesmeta.jl.

bramtayl avatar bramtayl commented on May 18, 2024

No it doesn't work on the current Windows nightly. I'm not sure how to figure out when the last time it was working...

from dataframesmeta.jl.

nalimilan avatar nalimilan commented on May 18, 2024

I've found a MWE, filed in Julia as JuliaLang/julia#26359.

from dataframesmeta.jl.

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.