Live data from Hacker News

Build Your Own Text Editor

viewsourcecode.org

101–110 of 164 posts

Re: Build Your Own Text Editor

#102

Earlier quoted context omitted.

For example: https://github.com/martanne/vis/blob/master/buffer.c bool buffer_prepend0(Buffer buf, const char data) { return buffer_prepend(buf, data, strlen(data) + (buf->len == 0)); } Two function calls plus arithmetics plus step-return. Depending on the debugger interface(eclipse with gdb, vs, etc), one will have to press some form of Step 1 to 4 times to advance the line. Depending on the complier that was suppos…

Ok, I understand now. Thanks. This is a pretty common way to write C, though, it's not something specific to this particular codebase. You just had a non-standard use case where you were constantly running into low-level bugs. (In an embedded platform?) If you aren't in that domain anymore, it's worth revisiting the trade-off. In most domains, gdb's continue command is super useful.

No. Parent is correct. Writing code just to show how clever you are, at the expense of others who need to debug and understand it later, is poor taste.

Re: Build Your Own Text Editor

#103

Reference implementations of medium sized applications are incredibly useful for leveling up as a programmer. While there are many large successful open source applications, many are overwhelming to read and learn from. Having something that outlines the key features and components and which ignores the important but complicated edge cases assists in keeping the attention focused. Now if there are annotation within t…

I found that another hard thing that feels like a prerequisite for leveling up further is getting the feel for design/architecture of medium-sized systems. There's a pretty awesome resource for that particular need - the series of books called "The Architecture of Open Source Applications". http://aosabook.org/en/index.html (The books are CC and free to read on-line :)) I'm just through the few first chapters of the…

Ooh, the matplotlib chapter looks super-relevant for a project I'm working on. Thanks!

Re: Build Your Own Text Editor

#104

Earlier quoted context omitted.

Norton Editor. Interesting that you mention this. I loved the Norton Editor. I have wanted to for years add a more Norton feel to the text editor that I write. I wonder if I can still get a copy to play around with and run in a virtual machine. Any idea?

I had a copy that I found on an old floppy about 15 years ago and I tried to see if I could use it in a Windows command window, but unfortunately it did not seem to work at all. Now that you mention a virtual machine though, I regret that I did not try and setup a FreeDOS VM. Googling "norton editor manual pdf" lead me to a few old copies of the manual, so that is what I have used as a guide in my work, but most of i…

You might also try dosbox, which is easier to use than a normal VM and works amazingly well.

Re: Build Your Own Text Editor

#106
post #62

Earlier quoted context omitted.

I do, sort of. I bought a text editor a number of years ago that was very popular. I still maintain it and use it daily and have often thought about putting out a new version. I have it running on many OS's and devices now. I have also added a lot of features specific to what I wanted. I'm not really sure if they are useful to others or not. Example: I have an iPad version where I can use an Apple Pencil and handwrit…

That's pretty interesting, care to elaborate on how well that works? Know of any other editors that have that same capability?

I don't know of others that do this at this time. I didn't actually do any research. It is something that I wanted for myself and the way that I like to work. I prefer to hand write as much as possible. I was trying out a Surface Book just because I could hand write my e-mails!

It is working pretty well for me. I used OpenAI and basically started asking my friends to hand write samples for the NN to learn from. They write them various levels of neatness and various slants, font size, etc. I store the handwriting strokes as a series of points and convert to digital text when they are ready. I save the handwriting along side the digital version. It is possible to hand write, then come back days later and your work is still there. Maybe I could make a video to show if it is useful.

Re: Build Your Own Text Editor

#107

Here's one from the 1980s, which I still use and keep up to date: https://github.com/DigitalMars/me and translated to D: https://github.com/DigitalMars/med

A trivial thing, but README.md for me says "Micro Emacs in D", where it should say "Micro Emacs in C" (the repo description on Github is correct though).

That's it, I'm upgrading to Windows ten.

Re: Build Your Own Text Editor

#108
I'm working on an editor in JavaScript. You would be surprised how fast string operations, like concatenation, are in JavaScript! You can hold the entire buffer in a String! While browsers renders text very well, the DOM is relative slow to interact with, but there are other ways to render in JavaScript, for example the Canvas, or into a terminal, or even stream a video, or talk directly to a display.

Re: Build Your Own Text Editor

#109

Scite is a barebone open source text editor created by Neil Hodgson to exercise his "Scintilla" text-editor c++ library which is used in others like notepad++. In hindsight, I would have a bit more caution programming text editors. I started tweaking and modifying Scite years ago, it was very interesting but it was no small undertaking and I came to understand why Neil advised in the support forum, to customise it us…

Lua is great for extensions, isn't it? I forked antizez's editor to add Lua support, and posted it here in the past: https://github.com/skx/kilua/ That works well for me, even with the minor omissions, and is well-paired with my console-based mail-client - again scripted by lua: https://github.com/lumail/lumail2/

Yes its great --a super efficient and fast little VM and comfortable syntax and scoping. I realised how great Lua is for separating user-complexity from an applications core as my customisations got more substantial.

Re: Build Your Own Text Editor

#110

Earlier quoted context omitted.

Do you have anything similar that you would recommend?

Minix (mini Unix) is a teaching operating system that goes with the well known os book "Operating Systems Design and Implementation". We used it at Cal. Very fun.

was about to post a link. Minix is great.
Post reply on HN