Hacker Newsnew | past | comments | ask | show | jobs | submit | liamdanielduffy's commentslogin

Regarding 3, you actually can use PropTypes to define the shape of an object passed as a prop using PropTypes.shape({...})! You can also specify the types of all of the keys of the object.

I find this super useful in many of my projects, I hope it helps with some of yours!

https://reactjs.org/docs/typechecking-with-proptypes.html


I’ve never seen anything like it before! Really excited about the possibilities of this project, especially if it develops into a wider ecosystem with more tooling for building out complex musical projects.

What are you thinking of when you say interactive compositions?


I'd like to build a pinball machine where the music is interactive. I have a number of ideas how to structure the gameplay. No idea if it would be fun to play. :)


“participants all keep their own custom key bindings, packages, and themes.”

what happens when two different people editing the same document have two different settings for # spaces per tab character? whose takes precedence? (Or would there be a possibility of inconsistent spacing depending on who is adding a tab?)


I would guess that tab -> spaces happens locally, and then the spaces are what's sent over the wire. So it would be whoever inserted the tab. (What other possibility could there be?)


Why would spaces be sent over the wire?


Why wouldn't they be? How else would you envision indentation working?


Well, one of the people in the scenario uses tab characters, not spaces.


Why would someone do that? ducks


Because indentation is subjective (and is different from alignment)


If it is displayed spaces per tab character, then there is no conflict in the file but the appearance should be different to different viewers.

If it is space characters replacing a tab keypress, then the spaces in the document should reflect the conversion ratio of the user that typed the tab.


Defaulting to whatever the document is currently using would be sane?


The document isn't "using" anything, since a document is a passive object. Unless you have something like vim modelines where you configure it at the top of the file like `/* vim: set tabstop=8:softtabstop=8:shiftwidth=8:noexpandtab */ `, the document itself doesn't know anything about how things _should_ be (which is the important part).


an opened document inside an editor is absolutely aware of this, and this is what you're collaborating on. almost all IDEs support EditorConfig, which makes standardizing on things like that across teams trivial.


git and other VCS seem to manage this problem just fine


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: