Comments (9)
@jonsterling It seems no one except the library itself uses SnocView
. We can probably drop it or make it super expensive. Also I only found two usage of cons
in sequent.sml
. It is probably not that difficult to implement output-restricted deques either. Maybe just a pair of lists is sufficient.
from sml-telescopes.
@jonsterling on the second thought the polymorphic recursion is not so hard to deal with. I paused the working because telescopes also support lots of other operations, like splice, where I wonder if there is a better data structure.
from sml-telescopes.
Closed as the current implementation seems fine.
from sml-telescopes.
@favonia At one time I had tried to do finger trees, but it was just too painful to code in SML sadly, so I would lean towards one of the other two options. Do you have any recommendations?
from sml-telescopes.
@jonsterling I think I need to know where and how SnocView
and ConsView
are used in practice.
from sml-telescopes.
@favonia My guess is that the thing is used most heavily is ConsView
, as in: https://github.com/RedPRL/sml-dependent-lcf/blob/master/src/dependent_lcf/lcf.fun#L35
In general, we tend to traverse a telescope from the left (in "cons" style), but we usually append to a telescope from the right (in "snoc" style).
from sml-telescopes.
Hmm a queue would be much simpler. Do you think we really need both views?
from sml-telescopes.
@favonia That's a great point; somehow in the beginning, I expected that both views would be used equally often, but it seems like in practice that is not the case. I like your proposal...
from sml-telescopes.
@jonsterling Thanks. To decide between the amortized and worst-case analysis, is it common to share the same telescope everywhere? The worst case is that we share the telescope right before the data structure would start to adjust itself, where it will have to do the same adjustment many times.
from sml-telescopes.
Related Issues (7)
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 sml-telescopes.