1,498 karma · joined February 19, 2017
https://github.com/BrianHung cv.brianhung.me
For a definition list, you’d probably want two node types: a definition list, and a definition list item.
And then create toDOM and parseDOM methods to render and parse respectively the html you want.
https://support.microsoft.com/en-us/office/dynamic-array-for...
Valid criticism. Think for most students, 61A has too steep of a learning curve for an introductory class. For people without any programming experience, it’s a bit too much too fast and with a class size of 2000+, you struggle for resources.
For those with prior experience, it feels like unnecessary training wheels. You learn a little bit of Python, SQL, and Scheme. You have to do environment diagrams (What Would Python Do) on paper, and learn how to use a debugger. Projects and tests have mad-libs style fill in the skeleton code.
In my experience, 61A is a tasting menu of computer science: you take it for the experience, and leave hungry and confused – but excited.
> I tested out of 61B.
OP, you really missed a lot by testing out. This class is half theory, half learn by doing. For example, you learn about red-black trees or Dijkstra's in lecture and then go to lab and implement it.
I know theory and algorithms seem bland at first, but look at the applications. https://www.cs.princeton.edu/~wayne/kleinberg-tardos/
Favorite aspect of this class was designing and then writing a smaller version of git. You had to write a design spec that was checked off, and then your implementation had to pass a test suite.
If that’s not software development, then I don’t know what it is.
> 61C taught me how computers actually work and simultaneously made me quit the major.
61C was not one of my favorite classes because of how low level it is (compilers, RISC-V, concurrency, etc.). But if you stopped taking classes before upper division, you missed out on a whole gamut of “practical” classes like algorithms (CS170) and operating systems (CS162).
Though with arbitrage, you typically want to find a cycle like BCAB so you have more of the initial currency you started off with.
This is a non-contrived example. You could do this as a mini-project where you scrape various foreign exchange or cryptocurrency data, and try to find some arbitrage opportunities by running these shortest path algorithms.
Compared to Dijkstra's original algorithm of E + V log V, naively pre-processing edges would require V^2 work assuming an edge can exist between each vertex.
Edit: the algorithm you’re describing exists btw https://en.m.wikipedia.org/wiki/Johnson%27s_algorithm
As a contributor to the previous version of Tiptap, and as a developer that built extensions into it, I encountered the exact same problem of having to learn two different APIs while trying to build more advanced features.
Out-of-the-box libraries like Tiptap are great when their extensions or components fully cover your use case. But when you need to customize or own the code itself, the secondary abstraction becomes leaky and you start to fight against it.
Because I was building a note-taking app, I spent most of the time working on the rich text editor. Eventually, I just ripped the bandaid off and wrote a new library that was architected off Tiptap but was a thinner abstraction on top of ProseMirror.
With hindsight, I can definitively say that was the better personal choice. The last time I used Tiptap was in 2020, and since then its API has evolved to a point where my knowledge is way outdated. On the flip side, ProseMirror has been extremely stable, improving with a non-breaking typescript rewrite. Digging into the internals of ProseMirror, learning how it has been built and maintained, contributed massively to how I write code today.
That being said, the journey of moving off Tiptap to ProseMirror took a couple of months for a junior dev. So I can understand how a market for it exists. My only wish for Tiptap now is for it to reduce its API overhead on ProseMirror, and instead build more advanced ProseMirror-compatible plugins that require a backend. Collaborative editing (comments, annotations), version control and schema migration, etc are all exercises normally left up to the developer that can be solved by Tiptap well.
It should be lighter than tiptap.
To appreciate the difficulty and nuances with building a text editor on contenteditable, I would read through the commit history on ProseMirror https://github.com/ProseMirror/prosemirror-view/commits/mast...
Agreed but I don’t think the products that’ll gain market share from this wave of AI will be legacy web 2 apps; rather it’ll be AI-native or first apps that are build from ground up to collect user data and fulfill user intent. Prime example is TikTok.
Benefits of it over mobx is data normalization with references and JSON patches which allow you sync complex state easily. Typed models are also a plus.
Drawbacks are performance (see https://github.com/mobxjs/mobx-state-tree/issues/1267).
Previously was using immer, which I loved because of immutability but moved off since classes and OOP didn't feel as natural as in mst.
If I were to pick an alternative, might try redux with normalization https://redux.js.org/usage/structuring-reducers/normalizing-....
And if I were to build a state management tool, I would prioritize a library that has - immutability - JSON patches and snapshots - data normalization with references - schemas / models compatible with zod
Was using indexeddb considered? I've yet to see an easy to use library that allows you to store simple but large json in indexeddb, and then query against that. Useful for something as simple as an emoji picker which needs to store keywords or aliases.
Having read through Lexical's documentation and worked with ProseMirror before, the approach by Lexical feels similar to ProseMirror's except written from a React + Hooks perspective.