Comments (7)
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.
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 helperraw_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.
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.
@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.
Yeah, we could definitely do that. Can you point me to the Data Science library?
from code.pyret.org.
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.
Closing this as dupe of brownplt/pyret-lang#1538, since the discussion there is further along.
from code.pyret.org.
Related Issues (20)
- Add unicode ellipses (…, U+2026) to the auto-expand/replace list
- test block with no tests, and test counts HOT 1
- difference in presentation of incomparability error HOT 6
- Chart package: residuals HOT 18
- `color` does not enforce refinements HOT 3
- Should give more nudging to save a copy on shared files
- “Cancel”/“close” distinction
- Hide the import code in the publish menu
- overlay adding unecessary pixels? HOT 2
- add pi, E and e to constants context
- Pyret Blocks (tracking issue) HOT 8
- modal-prompt.js changes don't get into build HOT 3
- essentials2021 context now exports e HOT 1
- Some chart functions run out of colors (likely array index issue) HOT 6
- Can HTML entities also be replaced? HOT 2
- Choose context button blindly grabs the text after the first 11 chars HOT 1
- Don't break use-context shared-gdrive if a file is renamed HOT 5
- More Stats Functions HOT 1
- Need to make some blocks/ tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code.pyret.org.