Quote:
Originally Posted by user_none
Yes but I don't recommend it. I looked at using it but decided against it. It's cumbersome to work with. It also has poor regex support. You can hack it on but it's not very friendly. It doesn't support RTL languages. But mainly the API isn't nice. It would bring a lot of cool features to Sigil instantly but it may be more trouble than it's worth.
|
I see. It seems Scintilla is omnipresent. I have been unable to find another text editor component that even comes close to Scintilla's features. What component does Sigil use; or did you write it yourself?
Is this something that is not possible, because the editor itself has to "know" EPUB?
Why would you recommend against this approach?
Quote:
You mean like BBEdit, Vim, probably others (Notepad++ I think)? So basically a text editor that doesn't do text editing as good as other things out there?
|
No, what I meant was to write a text editor based on a well-known text editing component, but with the addition of being able to open and save EPUB files. Then, Sigil's features could be implemented one by one.
If it would be possible to put Sigil's EPUB capability into a library (so, to open an EPUB, hand out an object with everything in it, and also save an EPUB if the library receives such an object back again), then it may be possible to fork an existing editor that already has a plugin structure, tack the EPUB library beneath it (coupled to its Open and Save functions), and then write the other needed parts as plugins.
Even if that other editor is written in something like C++, it would save on maintaining the editor itself.
I'm just brainstorming here...
Quote:
That's going to make it a lot harder...
|
I know. Where did you acquire the knowledge to program this? "Just read the EPUB spec" wouldn't cut it, I think. Of course I can implement specifications, but I have never done anything as large as EPUB from scratch and on my own.
Quote:
One of the things that demotivates me when I look at doing something at home using C is I have access to some very helpful libraries at work that make C development much easier. I don't want to come home and write a hashtable (for example) when I have a very powerful, full featured, and well tested one at work.
|
Agreed. C++, and certainly C on their own are just languages, with relatively small libraries. To do anything meaningful without spending 50 years to do it requires extra libraries. Learning a new language is not the problem nowadays. That's a work a few days at most, and some experimenting. It's all the gazillion libraries and their workings.
And on speed and compactness... that's the reason why it's still used a lot for microcontrollers. When programming a chip that runs at 10-25 MHz and has 32-512 kB of RAM, C is still first choice most of the time.