In any case, I really do appreciate the dual links. It's so much harder to suss out the boundaries of a library with only one implementation. This was really helpful.
1,406 karma · joined August 29, 2022
In any case, I really do appreciate the dual links. It's so much harder to suss out the boundaries of a library with only one implementation. This was really helpful.
It's kind of an odd thing, I think. There are a bunch of articles on how you can write your own AST and use all kinds of data ranges (instead of heap allocation) to do deep technical performance optimization, but very few libraries that actually do any of that which aren't also bundled into an inseparable implementation of the library as a control/editor. Feels like there has been enough ink spilled over the "how" that someone would have packaged it up together into a referenceable library. Yet nothing I can find quite fits.
Contrast that with a library: I could capture the inputs from any source - browser, native app, network, etc - work with the data using the single library, and then render the result in whatever client (or as many clients) as I wanted.
To do all of that and write a text editing library at the same time is a little more than my nights and weekends can handle. If I start on just the text editor, it'll only work in a terminal console, so I won't actually use it for my own projects. If I start on just the GUI, I won't actually use it because it won't actually work. So, even if I'm going to replace the text editing library at the heart of the project with custom code, eventually, it's pretty much a non-starter if I don't have something to use to get started.
To be honest, I'm kind of surprised to have so much trouble finding a solution here. Everything I find is either a self-contained text editor, or a full-on "mission statement" GUI (development can be easier/better by using our editor's features). I've had a very hard time finding something that is just an API that I can feed input and have it return me reasonable state updates about the text content. CRDTs or whatever.
I'm assuming people just figure you're either going to write a toy text editor, in which case simple text editing will work, or you're going to write a full-blown showcase product, in which case your advanced structural design with performance-focused editing, language servers, multi-cursor support, etc, will be your selling point and functional focus. But that seems to leave this surprising hole where a developer who wanted to "rebuild windows' Notepad app, except that it can handle text files with massive lines without slowing way down" would have to actually implement the advanced text editing line management rather than just use a library for this well-solved problem.
If I go to your website where you purport to cover the news of the tech industry, it is always in your best interest to actually give me that news. I'd prefer it if they gave a dry, sometimes even bullet-pointed list of bare news facts. What they know, how they know it, and the basic ways it affects the site's topic/hobby, as soon as they possibly know it. From there, link to your subscription content that goes into detail about the news and provides attractive insight or framing or whatever, along with reasoned updates when the news stops breaking and we have some better or more reliable information. People who just want the news can hit the site, light up the in-page and side gutter banner ads, and then bounce. People curious for more or appreciative of the talent can subscribe and get more, and more informed, detail.
Basically, just the same old suggestions for any enterprise: figure out what people, right now, today, want; stop relying on what worked in the past or what is most convenient for your team. Break it down in to how people actually function, and then place monetization where you would purchase, for a price that you would purchase for. I'll always be able to find the news without you, so you don't have any leverage to hold it hostage. Use it as a lead for your content, which can be the kind of reporting (different than news in subtle but meaningful ways) that people will be happy to pay for.
cut the cookies and tracking, so you don't have to have a ridiculous compliance banner. cut the paywall that tells me what you had to say wasn't important enough for public consumption. cut the full screen ad breaks and page takeover nonsense.
these outlets have had years (decades?) to figure out how to monetize content that didn't drive users away. they have failed over and over and over again, so why should I care that they are failing now? if it wasn't AI, it would be something else that came for them. if you rely on the captiveness of your audience, rather than the quality of your product, I'm always happy to see you destroyed. whatever comes next will be different, at the very least. and I'm an optimist - I'll always hope that it's a better way. if it's not, let that shit die, too.
regardless, I have every faith that the good will that buoyed these sites in their respective heydays will continue on to provide some other resources for the same kind of media.
The whole point is that a company is going to try to market this developer fantasy to non-developers, assuming that what excites developers about it enough to discuss it will resonate with non-developers when they hear developers talk about their new phones.
It's not a guarantee of success or anything, but a lot of stuff works like this. Mozilla didn't gain market dominance (for a hot second in the early 2000's) because they marketed to non-devs. They just provided a superior product in every way to everything else at the time, and devs couldn't ignore that, so non-devs always dealt with non-microsoft browsers whenever the devs came around. That kind of "grass is greener" non-marketing is a real winner when the product is solid.
So here's hoping Motorola takes a great idea and builds a product so solid on it that people can't ignore it.
It's a drop-in replacement for Notepad that does add a few extra features, but does not have even the minimal suite of features that something like Notepad++ has. Where Notepad++ is great for code editing and extensible functionality via plugins, Notepad2 is more suited for people who just want Notepad, without the Windows/Microsoft. It has line numbers and (limited) syntax highlighting and a dark mode - bits and bobs like that - but it does not have tabs and ftp-on-save and the more complex stuff that requires a larger binary size.
It's free, it works like Notepad, and it acts like a bare bones text editor. In many, many cases, it's exactly what I want, and it's always exactly what I want in cases where my original intention would have been to use Windows' Notepad.
I'm not mixing anything up, and I'm not being unclear. I could have used the same terms, but that I didn't does not make me incorrect. You're just splitting hairs. I'm sorry that seemed like it was worth your time.
I built my own node graph utility to do this for my code, after using Unreal's blueprints for the first time. Once it clicked for me that the two are different views of the same codebase, I was in love. It's so much easier for me to reason about node graphs, and so much easier for me to write code as plain text (with an IDE/language server). I share your wish that there were a more general utility for it, so I could use it for languages other than js/ts.
Anyway, great job on this!
Admittedly, I might not be understanding your problem well enough, so sorry in advance if I've mischaracterized the issue.
It's definitely possible to make a comprehensive web component library. Something that could compete with React. But, as far as I know, it doesn't currently exist (and would be a huge task to achieve with... no discernible reason to do it?).
And I don't find that bad for web components, as a whole, but if you wanted to build an app, you would most likely just use a web component framework (something that uses a base component and extends the rest from it), in which case you're limited to what that framework provides (and it won't be as robust as any non-wc framework). But if you're just looking to quickly slap in a component that "just works", you would have to do some real diligence to make sure it would fit which just is not a problem for any defined framework.
My approach has been to make a complete suite of CC0 components (which also meant no dependencies that I didn't write myself, so that I could make each dependency CC0, too), and let each component be an entirely standalone library, so that you could treat them like drop-in new html elements, rather than libraries to ingest and work with (in effect, the component should be as self-sufficient as an <input> or a <select> and require no js interaction from the consumer to work; just add the script and use the new tag). Of course, the major downside of that is that each component has to be it's own library which needs competent documentation (at least, I'm not going to remember how 15-20 different components all work in fine detail. I want some docs and examples!), and no other dev has any way of knowing that these components won't require an additional "base" script or component to work.
Overall, though, I'm happy with the results I've got (just finishing up all that documentation, at this point). And I definitely don't mind things like web components "not having reactivity" or "state", because I, personally, don't like being forced to push every piece of data through the rube-goldbergian plinko machine of reactive state. Different paradigms for different purposes and all that. So between not being forced to use it and having the events and attribute observation to be able to use it when I want it, I'm pretty satisfied with the state of web components on that front.
Honestly, the biggest issue I have with web components is how they work with "parts". I had to write a whole little library to make working with parts reliably comfortable for both library dev and consumer devs. I'd love a way to query on the "part" attributes, while within the component's shadow dom. As it stands, the best you can do is `[part="my-part"]`, which has obvious shortcomings if you're trying to use it like a class. Multi-classed elements are easy to select; doing anything complicated with part selectors would quickly spiral into a lot of `[part*="red"]:not([part*="redorange"])`, instead of `.red`, or whatever. The light dom is better because the ::part() selector treats parts like classes, so you can write selectors like class selectors. But, of course, you're limited to the part itself, so every single thing that should be stylable (in a lot of components, every single element; implementing devs should control style and display layout, just not functional layout) needs to have a part. And that's still a fairly superficial problem compared to the issue of not being able to automatically convert all "part" attributes into an "exportparts" value for the parent element. Again, not something that most libraries will need, but when you do need it, it's crazy that I would have to make a porting solution, myself. That's just begging for errors.
In any case, I generally agree with most of what the article has to say. As others have pointed out, some of the examples aren't really "best practices", but the overall point that web components are perfectly capable of building with is a solid one. I do still think that the old adage holds true, though: 'if you don't use a framework, you'll build one'.
[0] https://github.com/catapart/magnit-ceapp-taskboard-manager
(Notes for the demo pages: not production ready; the component will write to an indexedDB instance in your browser; the pages will add to your browser history [an option that is currently on, but is not the default config of the component];)
Bummer that it doesn't really seem feasible for a hobbyist, though. I take your meaning with the wax and such, but I think my solution would just be to go bigger and store less data. And I mean bigger like, 20 characters per print bed, or something. But then, at that scale, maybe a QR code would hold up well enough in plastic, too?
Overall, I think I've mostly learned that "archiving format" is a broad term that really needs to be collapsed by describing how the archive will be stored (and what extremes/complications to expect). In any case, thanks for the links and again for the detailed discussion!
Thanks for the quick feedback! Makes sense, to me.
Please forgive me, this is the first time I've ever been on the front page, but I'm seeing something odd? I posted this topic days ago and it was well received and then kind of done. But now it is showing both on the front page and on the ask page as having been posted only 8 hours ago. Is that normal?
I did see a topic the other day about HN being flooded with content, where some mods responded that they were doing work in that area. If I hadn't seen that, I probably would have just assumed that any ask that gets bumped up to the front page might get re-zeroed for posting time on all the existing comments. But given the other topic, I thought I'd pop back in and ask!
That aside, I do appreciate everyone's comments! I can't respond to them all, but hopefully I've hit all the main suggestions so far. Thanks again for the breadth of consideration!
But, absolutely - after we fix the broken system and start processing immigration in a reasonable and timely manner, then we can start asking what the penalties should be for people who abuse our immigration system. But I don't have an ounce of energy to spare on that deflection until the former is done.
I also think you could get denser storage that way? I guess depending upon how thick the "wire" is? But it's an interesting idea for both just printing the wire, and for the driver-teeth imprinting, separately. Very cool!
I know that isn't relevant to the question I asked, as stated, but the focus was on 3D printing because it is something any person could do, rather than something that has to be manufactured by specialized equipment.
I know this wasn't in the original ask, but my focus was on what I would be able to do, as far as archival storage, if I had a 3D printer. The assumption being that it's easier for me to have, maintain, and use a 3D printer than it would be for me to have a vinyl press.
I think some of the other answered showed that people are, it's just pretty niche. Not something a hobbyist can (currently) do, but definitely the same idea at a production scale.
One or the more interesting things about asking this was seeing all of the types of "storage" that I hadn't even really considered. Braille didn't enter my mind, but of course it's a great analogy!
I didn't have an amount in mind, I was just kind of wondering about the hobbyist aspect. Like if I woke up one day and realized I need to archive something and my most readily available tool was a 3d printer, would I have to come up with my own scheme, or has someone already done it?