mhodgson | 5 years ago | on: AWS US-East-1 Problems
mhodgson's comments
mhodgson | 9 years ago | on: Introducing Docker for Windows Server 2016
The reason I ask is because it would be useful, especially on dev machines, to be able to run existing full .NET apps in containers alongside linux containers with Postgres, Redis, etc.
mhodgson | 10 years ago | on: Draft.js – Rich Text Editor Framework for React
A few questions/concerns:
1. It doesn't look like the undo/redo state is global to the page. The built in undo/redo stack in browsers is global to the page so this is the expectation users will have. If you use multiple instances of Draft.js in your page they will each have their own stack, which is less than ideal. I realize having a singleton to manage this across all editor instances is more difficult in the React/Flux paradigm, but it would be much better from a user experience perspective. Related to this:
2. I don't think you can nest Draft.js instances. There are a number of simple cases where you might want to do this (e.g. custom block with image + caption). To support this in the future it seems you would need to account for it in the selection and undo/redo stack state handling.
3. The data format has a lot of repetition in how it stores inline styles[1]. I'm interested to know why they chose to represent the data this way instead of using indices. For instance, you can represent a inline bold style with a json object like so: {type: 'BOLD', startOffset: 5, endOffset: 10}. The format they chose to use is easier to render directly, but more difficult to parse visually and less space efficient (except in the case of styles that only cover a few characters).
Finally, it seems most modern WYSIWYG editors mentioned in the comments here were at least partially influenced by the original Medium post "Why ContentEditable is Terrible"[2]. It would be great for the community to standardize on a data model/format that could be used in all of these editors. There are enough commonalities (blocks, elements, etc.) that I believe we could create a common document spec that would be usable in all of these popular editors. The benefit of this would be having a common spec to build additional libraries for diffing, server rendering, native mobile editing, and so on.
[1] http://facebook.github.io/draft-js/docs/advanced-topics-inli... [2] https://medium.com/medium-eng/why-contenteditable-is-terribl...
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
In terms of duplicating objects, I believe that if you do choose to store objects from many repos in the same table, they will NOT be duplicated and you will get your space savings. Don't take my word for it though.
We actually did use this code in production for a period of time. In the end we realized that one of the main features of Git, immutability, didn't suit our needs well and we designed a versioning system based closely on Git, but built on Postgres directly. The main benefit of this is using primary keys as the object ids, instead of hashes of the content. This means we can change the content without changing the object's id (which in normal Git then means changing the tree, commit, and every parent commit).
Good luck!
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
mhodgson | 10 years ago | on: Ask HN: Any C programming Postgres wizards willing to port 460 lines of code?
Please note that I also don't know much C, but this implementation does work. Also included is a Postgres version of the Ref DB backend (so nothing hits the filesystem). There are a few bits that are not implemented since we didn't have use for the reflog and those parts are technically optional.
Would probably be good to get another set of eyes on this from someone much more familiar with C.
Hope this helps!
mhodgson | 13 years ago | on: Show HN: I just released Sleek, a Ruby gem for doing simple analytics
mhodgson | 13 years ago | on: How to make Chrome understand the SASS/SCSS in your rails app
You can try using the alpha release of sass 3.3.0 to get real sourcemaps but I haven't had any luck getting it to work with rails. It also will not work with compass 0.13.alpha, you have to downgrade to 0.12.2.
mhodgson | 14 years ago | on: Steve's Outfit
mhodgson | 15 years ago | on: Show HN: Proxlet: Control Twitter w/ API Proxy