Giter VIP home page Giter VIP logo

easyflow's People

Contributors

henriaugusto 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

Watchers

 avatar  avatar  avatar  avatar

Forkers

italoadler pyfave

easyflow's Issues

Names and shorthands performance optimization

Ex: Currently [v++] is a shorthand for [value++].

Contexto: A user who are using very complex patches with many abstractions and need to optimize performance (load times of patches for ex) are more likely to use the short versions ([v++] instead of [value++] for example)

then shouldn't be the case that the [value++] object is inside the [v++] and not the other way around? By saving 4 chars ("alue") for every [v++] object in use in some deeply nested abstractions the user might save some milliseconds. Doing this kind of optimization throughout the library might give significant results.

I've already did that with the [rgb][hsb][hsl] objects by putting the sorter ones inside the longer ones and not the other way arround. (Ex: [rgb] is the "normal" object while [redGreenBlue] contains an [rgb] inside it.

iterators for [arrayList]

Should it have it's own iterator method?

Also i can ask the same for the future [2DarrayList] object

[listReplace] and |symbol( on it's rightmost inlet

If you set the sub as an lonely symbol selector the replacing string becomes " " so we need to detect the empty symbol (maybe with a new abstraction?) and in that case output "$0-replaceWithNothing"

[sample~] contains a machine specific path

[sample~] contains a message box with a machine specific (my machine :B) path inside

[pd openFIle] -> [pd lastSample].

Remove it!

ps: should i leave the list empty or use |symbol( ? hmm

Indexes for lists that uses L

  • Currently 0 behaves exactly like 1
    • so, when iterating, you have a duplicate element (-1, 0, 1, 2, 3)

The problem with L (and the no-gap solution):

The symbol "L" is not a number so it makes dataflow more complicated (you have a single symbol in the midst of the numbers.
Possible solutions:

  • leave L so it's backward compatible (and might be convenient for some users because it is easier to remember)
  • make 0 behave exactly as L.

I should leave a big note that the index is 1-based .Some people who are new to the library might expect 0-based indexes so...

The problem with the zero (and the no-zero solution):

  • Having Zero is confusing. Is zero the first element? the last? what?
  • There is no Wrap-around
    • ex: assume a 12-element list. Sending |get -3 4( is equivalent to sending |get 10 4( which is invalid
  • So there is no "iterating" sub lists.
    • One should not iterate like: |get 1( |get 0( |get -1(
    • easyflow have some objects to do that kind of things like:
      • [iterator] (which should get a new method for iterating backwards?)
      • [sublistIterator]
      • [listSearchIterator]

Possible solution:

  • zero is ignored
  • to refer to the last element you should use -1
    • it seems [arrayList] already works that way!

  • Should objects like [substring] be affected?

This is related to #30. I should explicitly define an index syntax for list objects on easyflow. I designed it while solving specific problems of some patches so i had different ideas in mind. I need to unify those objects in terms of indexes.


I should create a help patch explaining how list indexing works in easyflow

Small error in [colorNames]

There's a tiny error in [colorNames] -- the [pd yellow] subpatch sends the message [255 255( when it should send [255 255 0(

(Sorry if this should not have been elevated to the status of an Issue!)

That aside, thumbs up to easyflow!

[searchIncomingLists] bugs when comparing different types

Steps to reproduce

  1. send a list F 6 msg to the [searchIncomingList] cold inlet
  2. send a 13 message. Output is -1 as expected
  3. send a symbol F message. Output is 1 as expected
  4. send a 13 message. Output is 1!

That happens because in the comparison the last compared symbol on the [pd compareSymbol] sublist was F. So F was going to be compared to F again.

That's because it was comparing symbols on the subpatches only according to the symbol of the input from the iteration on the incoming list.

[sublist] inconsistent behavior

  • fix the inconsistent behavior
  • remove number atoms throughout the abstraction
  • update documentation

  • using index 1 to 1 gives 1st element
  • using index 0 to 0 gives 1st element
  • using index 0 to 1 gives 1st and 2nd elements
  • using index -1 to -1 gives bang (empty list)
  • using index -2 to -1 gives 1st elemnt

Ideas for global settings

I could use a easyflow_settings.txt file to save some settings. For example

  • [printHere] can have a default key to clear ALL consoles

Question: what should [arrayList] output in case of an empty list?

what should [arrayList] output in case of an empty list?

Right now it outputs bang.

Some considerations:

  • Don't output anything.
  • Don't output anything and throw an error on the console- Don't output anything and throw an error on the console
  • Output a special "(emptyList)" selector

I came into this issue while developing [listIntersection]. WHen bang is an element the output is actually symbol bang.

So i might not need to change anything

image

[hueSaturationBrighness] and [hsb] should have duplicated code

(same goes for [hsl] and [rgb])

let's say you load [easyflow/hsb]

inside hsb there will be [hueSaturationBrightness]

which might not load if you don't have a path directly to easyflow (which i think is good)


now let's say you load [easyflow/hsb] and inside hsb there will be [easyflow/hueSaturationBrightness]

now that is a problem unless you're using a single centralized folder.

[iterator] should implement .previous() VS new [listIterator] object

In java if you need to iterate forward and backward you could use ListIterator.

I could create [listIterator] which would be just [iterator] plus a previous method. Or i can just do it with [iterator] because it already feels more natural to PD which deals with lists.

Anyway maybe it should output two different msgs in the 1st outlet

  • eol (end of list)
  • bol (beggining of list)

or, to be backwards compatible, in case i imllement it in [iterator]

  • bang: end of list
  • "beginning": beginning of list

[listRemove] name

for picking elements we have

  • [passNthElement]
  • [listPick]

Their name emphasizes wheter

  1. the index (n) is defined in advance and then you feed a list and which will be "passed" without it's n-th element
  2. the list is stored in advance and then you pick elements of it (listPick)

Problems

  • [listRemove] works like [passNthElement]
  • there is nothing like [filterElement] which removes elements from an incoming list

####Ideas:

  • [passNthElement] could be renamed to [filterElement] or, if incremented to deal with more than 1 element, [filterList].
    - it could getg updated to both pass elements or removed them, like band pass and notch filters
    - or [listRemove] gets renamed to [doNotPassNthElement] or something like that
    - [listPick] removing equivalent should be named [listRemove] but that might lead to a lot of confusion. Or it could be named osmethi glike [listDrop].
    - it would work by storing the list and given the index it outputs the whole list without those elements

letter case inconsicency

hi Henri,

easyflow looks cool, but is unusable on a case sensitive OS, because the names of the objects that are instantiated in the help patches are not consistent with the actual filenames.

e.g : on my Linux system, if I open printHere-help patch, I have a bunches of errors such as:

 ListPick
... couldn't create

because, for instance, ListPick.pd doesn't exist, only listPick.pd does.

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.