Live data from Hacker News

Why I Wrote a Programmer's Text Editor

rsms.me

51–59 of 59 posts

Re: Why I Wrote a Programmer's Text Editor

#51

Earlier quoted context omitted.

> too bad it doesn't support vim or emacs bindings/integration in some way. Well the bindings could probably be added[0], it's OSS and probably rather small still. Emacs integration on the other hand, that would be rather harder. [0] actually, since it uses standard Cocoa (text) controls it already has some Emacs-type bindings (C-a, C-e, C-f, C-b, C-k, C-p, C-n, ...) and you can define more (or redefine existing stuf…

Cool. Thanks for the resource! I've never used OSX, so I didn't know you could rebind the window manager's controls. Good stuff.

Yeah that's one of those weird things in OSX which likely come from its NeXT roots: you can extremely easily configure/customize things you would never expect being able to touch on a non-OSS product.

Re: Why I Wrote a Programmer's Text Editor

#52
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.

Tcl/TinyTcl, IO

Re: Why I Wrote a Programmer's Text Editor

#53
post #12
post #9

Earlier quoted context omitted.

I disagree. Don't mix it. Just make port for linux so normal people can use it.

People who use Linux on the desktop are, statistically speaking, not even close to normal.

I initially read this as "people who use Linux are odd" and had a much needed chuckle. After reading it's descendants I don't think that's how you meant it, but thanks, nonetheless.

Re: Why I Wrote a Programmer's Text Editor

#54
post #48
post #47

Earlier quoted context omitted.

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 ma…

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

He's not talking about lines of code – the lua interpreter/runtime is only approximately 150kB in size.

Re: Why I Wrote a Programmer's Text Editor

#55

Does anyone know how the tabs are integrated into the system? Is it a library or did he just try to recreate the experience?

He used the Chromium Tabs: https://github.com/rsms/chromium-tabs

Hey thanks! I wish github had search through code bases!

Re: Why I Wrote a Programmer's Text Editor

#56
post #2

Interesting tale of the development of Kod, the Mac OS X code editor.

This is awesome, I recently switched to vim after Textmate just became too outdated, but the usability of VIM is just terrible. I love what I see in Kod, but I won't change just yet, when are you planning to start charging for it ? I'll change when I can pay for it.

Re: Why I Wrote a Programmer's Text Editor

#57
post #30

Earlier quoted context omitted.

The description says its chromium-like, not that it used code from Chrome, unfortunately.

It do uses some Chromium code. See https://github.com/rsms/chromium-tabs

Cool! Detaching a tab into its own window (process?) is kinda magic for me.

Re: Why I Wrote a Programmer's Text Editor

#58
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.

More like 200kb (17kloc), but that's still not bad. Heck, SQLite is ~500kb, and does anybody hesitate to embed that?

Lua has a pretty nice C API, too.

Re: Why I Wrote a Programmer's Text Editor

#59
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.

io[1] has 10k lines and is embeddable. It's somewhat similiar to Lua. [1]: http://www.iolanguage.com/

Lua's performance is dramatically better, and it has a more mature toolchain.

I'm interested in io, too, but I've had trouble even getting it to build on BSD.

Post reply on HN