Live data from Hacker News

Build Your Own Text Editor

viewsourcecode.org

31–40 of 164 posts

Re: Build Your Own Text Editor

#31
post #25

Would something like this be a way for a beginner to C (barely any experience) to get their feet wet? Or is there an expectation of basic familiarity with C already?

It seems to be trying to explain the C as it goes along, but I don't think I'd get it if I hadn't done C programming in the past.

But, if you've done any Java or Objective C, you can probably infer the gist of it without serious C study.

Re: Build Your Own Text Editor

#32

Earlier quoted context omitted.

Example?

It's in the parent's "redis style" link.

If you're so sensitive to superficial syntactic issues you're gonna miss out on a lot of reading/learning pleasure in this life. (It's one of my pet peeves: http://akkartik.name/post/readable-bad)

Re: Build Your Own Text Editor

#33
I'm curious if anyone here regularly codes in a text editor they wrote themselves?

I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.

Re: Build Your Own Text Editor

#34
post #13

Earlier quoted context omitted.

I appreciate it. So, it looks weird because it's an experiment with something non-standard? Makes sense. Things stay clean overall.

That's it. For the most part, one would just export the symbols from given modules as needed (and a lot of the properties on some of the ref object types are needlessly exported, too, which makes it worse) One other thing is that the {.compile.} pragma in term.nim is not needed anymore, as Nim's stdlib has added a lot of those in[0], but it does show how easy it is to bridge between the two languages (and I'm not muc…

Ah. That link is the cleaner look I was expecting. Makes sense.

Re: Build Your Own Text Editor

#35
post #29
post #25

Would something like this be a way for a beginner to C (barely any experience) to get their feet wet? Or is there an expectation of basic familiarity with C already?

Do you have general programming experience?

Yep, lots of Ruby/PHP/Python/Javascript, some Java. So I can comfortably read syntax in most languages, but obviously none of the languages I've used are as low level as C.

Re: Build Your Own Text Editor

#37

Nice guide, especially the terminal raw mode stuff. I haven't seen much on that before, I really appreciate that this guide goes over that. I've been messing around with a little text editor component myself in golang: https://github.com/briansteffens/tui/blob/master/editbox.go For a SQL editor project: https://github.com/briansteffens/prequel

tui looks pretty interesting! Can you please add a README? I would love to go over the source code :)

Thanks! It's still pretty rough but I'm hoping to put some notes up soon.

Re: Build Your Own Text Editor

#38

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…

Those features sound really nice. Any links/screenshots?

Re: Build Your Own Text Editor

#39
post #33

I'm curious if anyone here regularly codes in a text editor they wrote themselves? I've often thought of coding one for fun, with no intention to share it, just for the purpose of having a long-term project that evolves along with my skills. I've never made time for it, but I still consider it once in a while.

I would not say that I use it regularly, but I have a somewhat working version of what I remember to be the Norton Editor in C++ / ncurses. It was 100% motivated by seeing antirez's artistic triumph, and my effort is sadly lacking in comparison. Still, I look at it every few weeks and add a new feature, and now I am mostly editing the code in the editor itself, which is gratifying.

I actually need to get off my duff and code what I really want, which is a version of what I remember the best parts of the Norton Editor implemented as an emacs mode. I have great memories of writing pascal code in ne.com, so it is a big nostalgia item for me.

Re: Build Your Own Text Editor

#40
post #30

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…

Okay, I won't lie, this is a bit of a side-swipe but... ... it sounds like you kind of wanted emacs. One of the most impressive things I find about emacs (especially since semi-proper packages became a thing) is just how easy it is to get stuff that is 5-10-15 years old working on it. No word of a lie, it's amazing how they've managed to break so little over the years.

No I appreciate the tip and have often considered diving into Emacs or Vim. Im very fond of the Scite and Lua combo as well now, and i would like to have the time to share and develop it more than to set up on a new system - but yes those other systems do look good...
Post reply on HN