I promised I'd be back!
I'm working on a bundle for Erlang [1], a nice functional language that focuses on multithreading and distributed programming. It's mainly used in embedded programming of telephony equipment, but you might have heard of ejabberd (a Jabber server written in — guess what — Erlang). this is a first rough draft -- there's only a basic syntax description. when it gets good enough I'll add it to the repository, if you wish.
in order to improve it, I need some help on automated indentation. this is a typical (small) Erlang module:
-module(sample). -export([fact/1]).
fact(0) -> 1; fact(N) -> N * fact(N - 1).
I'd like to increase indentation of the next line if the current line ends with -> and decrease indentation of the next line if the line ends with "." or ";". still, I wasn't able to tweak the prefs in order to achieve this... (I tried and I tried, man, but I just wasn't up to the task.) help? help?!? HEEEEEELP! ;)
ciao,
Domenico
On 17/4/2006, at 17:42, Domenico Carbotta wrote:
[...] It's mainly used in embedded programming of telephony equipment
There is a really great movie showcasing this [1].
[...] I'd like to increase indentation of the next line if the current line ends with -> and decrease indentation of the next line if the line ends with "." or ";".
What you maybe could use is:
indentNextLinePattern = '[^\s.;]\s*$';
This will indent the next line, if the current does not end with . or ;. This will keep indenting (at the same level) until a “terminator” is seen.
[1] http://video.google.com/videoplay?docid=-5830318882717959520
On Apr 17, 2006, at 2:54 PM, Allan Odgaard wrote:
There is a really great movie showcasing this [1].
[1] http://video.google.com/videoplay?docid=-5830318882717959520
LOL! Best Presentation Ever. Hope your next screencast will be a little more like this..
Sebastian
There is a really great movie showcasing this [1].
«hello allan!»
by the way, Erlang was developed in order to allow massively multithreaded application to be written efficiently. i.e. it contains support for multiple threads, message exchange, distributed computation, soft-real-time operation at the syntax level. it's a pretty interesting language to hack on.
the language itself was developed at ericsson research labs in order to program embedded controllers in telephony-related equipment (switches and whatchanameit). I guess the video was part of the introductive material that was prob'ly used within ericsson when the language was brought in use outside of the research labs.
on a related note, it made me laugh my ass off. ^_^
ciao,
Domenico
On Apr 17, 2006, at 12:54 PM, Allan Odgaard wrote:
There is a really great movie showcasing this [1].
[1] http://video.google.com/videoplay?docid=-5830318882717959520
That's great! Although at times I felt like I was watching a Monty Python sketch. :)
Anybody know when that video was made? (I can't even figure out when Erlang itself was invented.)
By the way, the guys in the video seem to be misusing the term "real- time". I believe what they're really talking about is fault-tolerance.
Trevor
Trevor Harmon asked:
Anybody know when that video was made? (I can't even figure out when Erlang itself was invented.)
In a post to "Lambda the Ultimate" Mike Williams (the "Mike" from the movie) wrote...
As one of the main "actors" in "Erlang the Movie", I absolutely and categorically forbid its showing *anywhere*. If there was a competition for "turkey" short movies, I think we would win hands down.
So, please, please, please, forget we made that retched film in 1990!
Cheers, Paul
Hi,
I'm having trouble with indentNextLinePattern. I want lines ending with \ (and optional text after) to cause an indent on the next line, so I used the pattern '^.*\\(?!\\).*$'. No joy. Then just as a test I tried 'foobar' as the pattern and typed "foobar" on a line. Still no joy. I checked the scope to make sure it matched.
What am I missing?
Regards,
Aparajita www.aparajitaworld.com
"If you dare to fail, you are bound to succeed." - Sri Chinmoy | www.srichinmoylibrary.com
On 18/4/2006, at 16:13, Aparajita Fishman wrote:
I'm having trouble with indentNextLinePattern [...] What am I missing?
This pattern is only used when running the Indent Line / Selection action (from the Text menu).
The reason for this is, that the next line may counter the indent. For example an if/for/while in C and related languages would have the next line indented, except if that next line contains a { (depending on coding style.)
Though maybe whether or not to apply the pattern “realtime” should be a language setting.
Domenico, Here are my bundles for erlang and yaws. Only language grammar so far. I tested yours and found a few quirks and reverted back to mine. The biggest quirk I noticed in yours was that it doesn't handle camelCase. So a function or atom of myName gets color highlighted into two different words. Try out my version and see what you think. The Twilight theme works very well for me. I like your ideas of indenting...if you make any progress I would love to see it. I am far from a TextMate expert but would be happy to collaborate with you to get erlang and yaws bundles in better form. thanks, ke han
On Apr 17, 2006, at 11:42 PM, Domenico Carbotta wrote:
I promised I'd be back!
I'm working on a bundle for Erlang [1], a nice functional language that focuses on multithreading and distributed programming. It's mainly used in embedded programming of telephony equipment, but you might have heard of ejabberd (a Jabber server written in — guess what — Erlang). this is a first rough draft -- there's only a basic syntax description. when it gets good enough I'll add it to the repository, if you wish.
in order to improve it, I need some help on automated indentation. this is a typical (small) Erlang module:
-module(sample). -export([fact/1]).
fact(0) -> 1; fact(N) -> N * fact(N - 1).
I'd like to increase indentation of the next line if the current line ends with -> and decrease indentation of the next line if the line ends with "." or ";". still, I wasn't able to tweak the prefs in order to achieve this... (I tried and I tried, man, but I just wasn't up to the task.) help? help?!? HEEEEEELP! ;)
ciao,
Domenico
[1] http://www.erlang.org/, http://www.erlang.se/
<Erlang.tmbundle.zip>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate