But, I have written an interpreter these past few days for a new language. Mostly, I just need something to integrate into my IRC bot, but it's not a bad language in and of itself, so I figure I'll let all y'all know about it.
It's a pretty simple language, a lot like Python (and growing more like it with every feature I add :)) It supports first-class functions, modules, dictionaries, lists, strings and numbers; I've written a pretty full-featured string library, a simple regular expression library (simple in the interface, not in the regular expressions it uses; it's based on Pcre, so it's all Perl/Python compatible,) and the various list and dictionary functions (which currently reside in the list and dictionary modules, respectively, since I haven't quite decided how to handle member functions of built-in types yet.) Before the language is really useful, I'll need to add interfaces/modules for reading files and command lines, but that shouldn't be too much trouble. It's coming along really nicely, if I may say so myself :)
I'm writing tons and tons and tons of little tests for the language, and they're helping me catch a lot of bugs and quirks that I wouldn't even have known about. I'm also using these tests as regression tests for when I add new features, or modify the lexer/parser, so I don't take a step backwards on accident. I can't, however, test everything, and I definitely have my own programming style that's probably going to miss some areas. That's where I could really use some help.
Anyway, like I said before, I can't test it all. And I'm sure there are going to be bugs and lacking features lying all over the place in the wake of what puny bit of testing I can do. That's where I need help: if anyone here wants to install O'Caml, install the libraries I need, compile my code and then use the programming language for a few small tasks, discovering its bugs, quirks, and missing features, they'd be doing me a huge favor, they'd be contributing to the betterment of the internet by making my IRC bot (already the standard resident bot in three irc channels for a major website :),) and they'd be able to get in on the ground floor of the new, improved, VERSION 2 of my bot, yet to be seen by eyes other than mine.
Not only that, but you'd have a decent little language, you might learn a little more about programming, and you'll be able to write plugins for one of the coolest IRC bots in existence. And, of course, you'd be very close to the top (or maybe even the top, I don't really have one yet :)) of the ACKS file in my IRC bot distribution :)
So, any takers? Who wants to go through all this work just to test a language that's definitely no better than Python or Lua, except that it integrates very easily with an amazingly powerful and useful high level language (O'Caml :))?
Jeremy
Gnu/Vince
01-01-2002, 12:04 PM
Where can i get the source? Also, which special libraries did you use? I am guessing your pythonish string modules, but what else?
[ 01 January 2002: Message edited by: Gnu/Vince ]
Gnu/Vince
01-01-2002, 12:13 PM
Also, I think you should take some time to write a beginner's tutorial to O'Caml. The ones on caml.indria.fr or ocaml.org are often hard to understand. A practical one (maybe based on your IRC bot or your new language) could maybe get some people interested in O'Caml here to help you extend your language.
Examples of what you could talk:
-conditions
-loops & recursion
-the syntax and how to deal with it
-the typing system and how to get used to it
-how to declare variables and ref variables
-how to use functions
jemfinch
01-01-2002, 07:23 PM
Originally posted by Gnu/Vince:
Where can i get the source? Also, which special libraries did you use? I am guessing your pythonish string modules, but what else?
Other than my own libraries, I've used Markus Mottl's interface to Pcre, and his resizable array module.
Also, I think you should take some time to write a beginner's tutorial to O'Caml. The ones on caml.indria.fr or ocaml.org are often hard to understand. A practical one (maybe based on your IRC bot or your new language) could maybe get some people interested in O'Caml here to help you extend your language.
I've toyed with the idea, but it's not likely for several reasons. First, learning a language is oftentimes just a matter of trial and error -- trying stuff, having it not work, figuring out why, and doing things differently until you get it right. Having been past that stage myself (and not having documented my path through that stage, unfortunately :() I don't think I'd really be able to coach someone through that stage in writing -- I'd forget too many things and throw in too many useless facts.
Aside from that, the manual does a good job of explaining the right things in the language, but it doesn't show any of the "gotchas" that newcomers to the language always find. If someone had the manual in addition to a list of "gotchas" that beginners always seem to run into, I'm sure he could learn the language fairly easily. Unfortunately, I'm not very qualified to document the "gotchas" because they just don't happen to me anymore.
If someone did want to learn the language, I'd be happy to answer all his questions, and he or I can document what problems he runs into for posterity's sake.
But O'Caml isn't what I'm focused on right now -- my new language, Ast, is :) I really need a whole lot testing to go into it.
Jeremy
Gnu/Vince
01-01-2002, 08:18 PM
Ast? What does that mean? A Stupid Test? Achronysous (sp please) Server Typhoid?
Benny B
01-01-2002, 08:20 PM
I'd be happy to help out with the testing Jemfinch .... u've helped me out heaps in the past with my little coding problems, so anything I can contibute, I would be more then happy to...
jemfinch
01-02-2002, 12:38 AM
Originally posted by Gnu/Vince:
Ast? What does that mean? A Stupid Test? Achronysous (sp please) Server Typhoid?
It doesn't really many anything. It's common used as an abbreviation for "Abstract syntax tree," though.
It does sound rather like "Asp" which is a snake, and it's modelled after Python a bit :)
Benny B: Do you have O'Caml installed?
Jeremy
Benny B
01-02-2002, 02:18 AM
Originally posted by jemfinch:
<STRONG>Benny B: Do you have O'Caml installed?</STRONG>
Yeh I do.
jemfinch
01-02-2002, 06:01 AM
Ok, head here (http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html) and install the "PCRE-OCAML" and "RES" libraries.
Also note that in order for them to work correctly in my default installation, I had to copy all the files they put in /usr/local/lib/ocaml/contrib in /usr/local/lib/ocaml.
When you get those two installed, gimme a shout, I'll email you the tarball of my entire ocaml source tree (you'll need it all to compile the interpreter :))
Jeremy
Benny B
01-02-2002, 09:13 AM
done and done ....... email away..
However it is late here now and I've got to go to bed (work tommorow), so I wont get to play around with it till tommorow night...
jemfinch
01-02-2002, 11:22 AM
I'll sneakernet the tarball down here on floppy sometime today...but at the moment, I have my regression tests for those that might be interested in what the syntax looks like...they definitely need to be "beefed up" to test more of the language, but they show pretty well what the language looks like:
They're long, but a lot of it is because there are so many blank lines. I needed a simple testing framework to start with, so I made it so it reads a test (finishing when it gets an empty line) then an expected result (finishing when it gets an empty line,) evaluates both, and makes sure they're equal.