Coder Social home page Coder Social logo

Comments (7)

asolove avatar asolove commented on August 11, 2024 1

Gonna close this out as the resolution won't be in the CPO codebase. But it's still on my backlog list so I'll write some suggested changes to that file and share with you.

from code.pyret.org.

asolove avatar asolove commented on August 11, 2024

Started looking at this one, some notes so I don't forget when I come back to this:

  • The resolution of this will need to be over in pyret-lang, which defines the statistics package.

  • The interesting bit here is that the definitions are currently typed for numbers and the implementations depend on that for efficiency, so we'll need to:

    • Convert all these methods to be generic or just add a second set of parallel methods for strings. (Do we want to allow over arbitrary types? I don't think Pyret has a notion of generic constraints, and we'd like to constrain this to things where equality is reasonable. I also don't think we want arbitrary mixed types.)
    • convert the implementation of group-and-count, which currently depends on the runtime helper raw_array_sort_nums to an alternative that will work for other types. (We probably still want to use the fast version for numbers, though?)

from code.pyret.org.

asolove avatar asolove commented on August 11, 2024

Related discussion over in pyret-lang, mostly around actually enforcing the type constraint and showing a nicer error, rather than extending these to other types: brownplt/pyret-lang#1538

from code.pyret.org.

schanzer avatar schanzer commented on August 11, 2024

@asolove oh wow - really interesting to see that thread. I didn't realize this came up 2 years ago! In that case, maybe the solution is just a written-in-pyret-function that lives in our Data Science library. Would you be willing to write one?

from code.pyret.org.

asolove avatar asolove commented on August 11, 2024

Yeah, we could definitely do that. Can you point me to the Data Science library?

from code.pyret.org.

schanzer avatar schanzer commented on August 11, 2024

Here's the link - I'm sure I'm not doing the most elegant stuff, so any advice you have on coding quality is most welcome!

from code.pyret.org.

blerner avatar blerner commented on August 11, 2024

Closing this as dupe of brownplt/pyret-lang#1538, since the discussion there is further along.

from code.pyret.org.

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.