Git Product home page Git Product logo

wheretraits.jl's People

Contributors

fingolfin avatar github-actions[bot] avatar masonprotter avatar schlichtanders 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  avatar  avatar

Watchers

 avatar  avatar

wheretraits.jl's Issues

add nightly to CI

as nightly was failing for unclear reasons it was taken out from the CI

somewhen nightly should again be put to WhereTraits.jl CI

Why @traits plural?

It seems like I am dispatching on a trait (singular) not traits (plural). Is @trait a better name?

Traits with keyword arguments does not work

First of all. Great package! The dispatch in Julia is truly great, and this extension makes it even better. I was playing around with the package and I realize that it didn't seem to work with keyword arguments, e.g:

@traits bestprice(b; units) where {units == "cm"} = b

Returns the error

LoadError: MethodError: Cannot `convert` an object of type Symbol to an object of type Expr
Closest candidates are:
  convert(::Type{Expr}, ::ExprParsers.ExprParsed) at ~/.julia/packages/ExprParsers/snVTb/src/ExprParsers.jl:135
  convert(::Type{T}, ::T) where T at /opt/julia-1.7.1/share/julia/base/essentials.jl:218
  Expr(::Any...) at /opt/julia-1.7.1/share/julia/base/boot.jl:263
in expression starting at In[107]:3

The very same code works if I do bestprice(b, units). Is this behavior intended? Is there a way around it?

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Where does the compilation time come from?

What the title says, mostly; I was interested in using this while writing a package of mine, but the compilation time was just a touch over what I'd be willing to add to a package. A useful tool here.

Runtime overhead

There appears to be some runtime overhead from using this package, it's not especially onerous, but it's definitely present:

julia> using WhereTraits, BenchmarkTools

julia> @traits f(x) = x

julia> @btime f(1);
  22.215 ns (0 allocations: 0 bytes)

compare against

julia> g(x) = x;

julia> @btime g(1);
  1.356 ns (0 allocations: 0 bytes)

Doing some inspection, I think this is due to the conflict resolution system which should be resolved at compile time instead of runtime. Is there anything we can do about this?

[DOC] Other packages section updates

It should be worth in your "other traits packages" section to also reference the work of Taine Zhao (aka thautwarm ) in MLStyle.jl , more precisely :

IMO among the 3 others traits pkgs , 2.5 are quite data oriented , while yours is more functional oriented thru dispatch and matches very closely this work

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.