Live data from Hacker News

Why I Wrote a Programmer's Text Editor

rsms.me

41–50 of 59 posts

Re: Why I Wrote a Programmer's Text Editor

#42
post #40

Earlier quoted context omitted.

Exactly. Node.js is—just like Python, Ruby or LUA—an embed-able general-purpose JS runtime. You can simply link with libnode. Kod then uses a mix of libdispatch and libev constructs to perform inter-thread communication. The code for doing this is fairly orthogonally designed and can be found in the KNode* and node* source files.

I don't think anything is like Lua when it comes to embedding; I mean, it's what, 100k? Hard to top that.

io[1] has 10k lines and is embeddable. It's somewhat similiar to Lua.

[1]: http://www.iolanguage.com/

Re: Why I Wrote a Programmer's Text Editor

#43
post #32

I was particularly surprised by the behavior of the tab key: https://github.com/rsms/kod/wiki/Indentation In a nutshell, if you press tab while anywhere on a line, it indents. Shift-Tab de-dents the line. After thinking about it a bit, I think I could get used to it. I like that they're exploring ideas like this. I would like preferences "CMD ," to be bound to something though even if it's to opening the configuratio…

I use smart-tab.el in emacs, the completion/tab handling is the most intuitive I've found.

http://www.emacswiki.org/emacs/TabCompletion#toc2

It expands if at the end of a word, and indents otherwise.

Re: Why I Wrote a Programmer's Text Editor

#44
post #11

Earlier quoted context omitted.

Don't sell yourself short. Just having a working prototype can be a god-send, no matter how inefficient.

It happened to be my second time ever coding in objC, so I'm fairly certain it was crap. My later patches (think I've made two or three so far) got accepted without change :) Hope I have time soon to make the automagic indentation feature that's possible with the new AST thingy. Also hope somebody hasn't beaten me to it yet :P

"If you can do a half-assed job of anything, you're a one-eyed man in a kingdom of the blind."

- Kurt Vonnegut

Re: Why I Wrote a Programmer's Text Editor

#45
post #40

Earlier quoted context omitted.

Exactly. Node.js is—just like Python, Ruby or LUA—an embed-able general-purpose JS runtime. You can simply link with libnode. Kod then uses a mix of libdispatch and libev constructs to perform inter-thread communication. The code for doing this is fairly orthogonally designed and can be found in the KNode* and node* source files.

I don't think anything is like Lua when it comes to embedding; I mean, it's what, 100k? Hard to top that.

I don't quite understand - are you saying that the lower the amount of lines of code, the easier it is to embed? Or better in some other way? Or something else entirely?

Re: Why I Wrote a Programmer's Text Editor

#46

Is the font rendering on this guy's site screwed up for anyone else? The "t"'s have something wrong with them: http://ompldr.org/vNzVrZg/why_i_wrote_a_programmers_text_edi... Firefox 3.6 on Linux.

I didn't notice, gray on white background is a bit hard to see.

Re: Why I Wrote a Programmer's Text Editor

#47
post #45
post #40

Earlier quoted context omitted.

I don't think anything is like Lua when it comes to embedding; I mean, it's what, 100k? Hard to top that.

I don't quite understand - are you saying that the lower the amount of lines of code, the easier it is to embed? Or better in some other way? Or something else entirely?

Lua strikes a very sweet balance, almost to its own detriment: you have an Schemish language, with huge user-base, at 100k. OTOH, since Lua is always an option, people put off using it until "necessary", and start their apps in cruft like C and C++.

The ease of embedding is not a matter of sice; both Python and Tcl are trivial to embed, almost as much as Lua. But they come with relatively larger footprint, and the quality of the languages themselves are not up to par (i.e. not "Schemish" enough)

This is ALL subjective anyway; by quality I mean what would please me personally. I already code in my ideal language.

Re: Why I Wrote a Programmer's Text Editor

#48
post #47
post #45

Earlier quoted context omitted.

I don't quite understand - are you saying that the lower the amount of lines of code, the easier it is to embed? Or better in some other way? Or something else entirely?

Lua strikes a very sweet balance, almost to its own detriment: you have an Schemish language, with huge user-base, at 100k. OTOH, since Lua is always an option, people put off using it until "necessary", and start their apps in cruft like C and C++. The ease of embedding is not a matter of sice; both Python and Tcl are trivial to embed, almost as much as Lua. But they come with relatively larger footprint, and the qu…

Yes, Python was going to be my counterexample - it's very easy to embed yet much bigger than 100k lines.

The 'not Schemish enough' I don't understand - unless it's a passive aggressive way of saying that anything that is not Scheme or Scheme-like is not a good language, which is a boring discussion I'm not going to go into. Well unless there is a reason that Scheme-like languages have some specific advantages that make them especially suited to being embedded, in which case I'd like to learn.

Regarding size, I don't think that's much of a problem today (leaving aside embedded or mobile dev, which I don't think we're talking about). Maybe a huge VM can cause issues in some specific circumstances, but much of the size of 'bigger' languages is going to be in the standard library anyway, in which case it's preferable for a user to have a large enough selection to work with, depending on the application domain.

Re: Why I Wrote a Programmer's Text Editor

#50

Is the font rendering on this guy's site screwed up for anyone else? The "t"'s have something wrong with them: http://ompldr.org/vNzVrZg/why_i_wrote_a_programmers_text_edi... Firefox 3.6 on Linux.

As for screwness: when I try to enlarge fonts using FF 3.6 Ctrl-+, I suddently get a gray band on the right that hides half of the text.

I cannot read the default font, sorry.

Post reply on HN