Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

language creation

Name: Anonymous 2005-05-18 14:18

Is it possible to write a programming language with an existing one?  I want to create a game creation program, and have it use it's own language for additional programming.  Something similar to Game Maker.

Name: Anonymous 2005-05-18 15:44

Yes, but that's not necessarily the best choice.

Usually the best way to do this is to embed an existing scripting language, like LUA, Python, Ruby or Javascript or something.
This is a good choice because you already have a well-established language, with syntax familiar to other developers, and plenty of existing documentation on how to embed it.

But if you insist on your own language or syntax, look into grammars and something like flex/bison.

Name: Christy McJesus !DcbLlAZi7U 2005-05-18 18:21

It's very much possible, but a bad idea for most of the reasons >>2 mentioned and then some. Python is a good choice, some commercial games have successfully used it for the higher level logic after doing the performance code in C++.

Name: Anonymous 2005-05-19 6:49

I thought Lua was pretty much the default choice for an embedded language. Why python? (honest question)

Name: Anonymous 2005-05-20 8:50

>>4
because python is slow

Name: Anonymous 2005-05-20 11:40 (sage)

>>5
Either you need to learn how to read, or go troll elsewhere.

Name: Anonymous 2005-05-21 9:05

>>6
I was making a [insert big word here] comment on the state of programming languages. >_>

Name: Anonymous 2005-05-24 4:18

It is entirly possible to write a programming language in anouther language. How ever you have to ask yourself do you really want to work out the binary code (or assembly if your not going to complete the job yourself) yourself. Plus the fact that you asked the question probably means you wouldn't be-able to produce a scripting language which requires computer theory, such as (mainly) stacks and hash tables.

Imbeding a existing scripting language, or using a tool such as dlopen (unix) or openlibrary (Windows) to dynamicly include library files, instead of worry about scripts.

Perhaps you should spend more effort on the game and introduce the this feature later? A game can require a lot of work, and it isn't worth going off on a tangent for a simple feature.

Name: Anonymous 2005-05-25 7:01

test

Name: Christy McJesus !DcbLlAZi7U 2005-05-26 5:38

>>9

failed

Name: Anonymous 2005-05-30 16:11

Bootstraping a new programming language with -itself- used to be all the rage years ago... (example: Wirth's Pascal)

Name: Anonymous 2005-05-31 5:33

It's a witty way to do stuff

Name: Anonymous 2005-05-31 21:33

More like it's a good way to prove the language is actually useful.

Name: Anonymous 2005-06-04 10:58

>>13
I see where are you coming from. In fact, I usually look for the following once I read a language:

- I like to be able to implement functions like those the language's base library provides. For example, you can do my_printf in C, but you can't do my_WriteLn in Pascal (correct me if wrong).
- I like to be able to do stuff. Any kind of stuff. For example, you can do linked lists in C, but you can't do them in Basic (correct me if wrong).

Name: Christy McJesus !DcbLlAZi7U 2005-06-05 11:09

Since we're on this line of discussion:

Lisp has a mere 7 axioms, the rest of Lisp is written in Lisp. w00t

Name: Anonymous 2005-06-05 22:25

I keep hearing good things about Lisp, but I'd rather have two teeth taken than write in Lisp syntax...

Name: Anonymous 2005-06-06 1:04

sounds to me like you basicly want to make a program that contains a scripting language, yes you can do that.

Name: Anonymous 2005-06-06 3:15

yes. i wrote a simple game that contains a forth interpreter in python. forth is the easiest language ever to write an interpreter for. it would probably be easier ond result in a better language if you used an existing scripting language though. i know that python and scheme have c++ bindings, probably some other languages too.

Name: Christy McJesus !DcbLlAZi7U 2005-06-06 5:19

>>16
That's because Lisp doesn't have syntax :P

Try it out, it's worth it once you get used to the parentheses flying everywhere. Even if you never use it it'll give you an interesting point of view on language appreciation. (I tried to make the preceding sentence sound non-pretentious but I couldn't manage it...)

Name: Anonymous 2005-06-07 0:40

joy > lisp

it has even less syntax than lisp

Name: Anonymous 2005-06-07 1:28

you can't actually _do_ anything with joy though because the higher level combinators (i.e. most of the useful ones) work on the entire stack thus destroying any state information.

also, Christy McJesus is an idiot.

that is all.

Name: Christy McJesus !DcbLlAZi7U 2005-06-07 3:41

>>21
What did I ever do to you Anonymous :(

Name: Christy McJesus !DcbLlAZi7U 2005-06-07 3:45

>>20
Needs more abstraction.

Name: Anonymous 2005-06-07 5:38

Pseudocode > everything
...although you can't do anything useful with it.

>>22
Anonymous never forgives

Name: Anonymous 2005-06-07 14:56

>>21
what do you do, just type in random combinators and watch it destroy the stack?

Name: Anonymous 2005-06-07 18:46

I find it fun how are we babbling about functional programming, obscure features, etc., and we all end up doing good old structured programming in C.

Name: Christy McJesus !DcbLlAZi7U 2005-06-07 19:19

>>26
What.

Name: Anonymous 2005-06-08 4:15

Anonymous #26 meant no matter what LISP has, useful stuff gets done in C (C++ if objects are really necessary), like always. Save for web sights, which can be done in PHP or Perl.

Name: Christy McJesus !DcbLlAZi7U 2005-06-08 6:03

Well I sure as hell don't do much in C. It's a low level language, trying to treat it as a high level language is the reason we have buffer overrun vulnerabilities in *everything*

Also the guy who shares my office keeps crunching on something. It's one of those really annoying slow crunches that people make when they're trying to eat quietly. *chhhommmp... munnnch... guulllp* If you're going to annoy me do it like a man, faggot.

Also in the interests of creating drama, I shall now bring up the subject of Java.

Name: Anonymous 2005-06-08 7:42

DRAMA JAVA IS SHIT LOL DRAMA

Name: Anonymous 2005-06-08 8:47

zoomj java sux d00d lol

Name: Anonymous 2005-06-08 9:17

Advice for >>1:

If you had the actual skills to pull this project off, you would already know how to do it. Give up now.

Name: Christy McJesus !DcbLlAZi7U 2005-06-08 9:22

>>32
I totally disagree. Attempting and solving hard problems is the only way to get any serious programming skills.

Name: Anonymous 2005-06-08 12:21

>>34

uhm. compiler theory is possibly the hardest part of computer science. it looks like he doesn't even know where to begin to look, so he's extremely unlikely to get anything working

Name: Christy McJesus !DcbLlAZi7U 2005-06-08 12:29

>>34
He only wants an extension language, why go to the extreme of compiling things?

Name: Anonymous 2005-06-08 14:25

oh god seriously are you a retard or are you trolling? if the former, how do you manage to breath?

Name: Anonymous 2005-06-09 4:28

>>36
You don't forgive.

Name: Christy McJesus !DcbLlAZi7U 2005-06-09 9:10

>>36
The answer to your question would depend on who you're talking to. Abuse less pronouns.

Name: Anonymous 2005-06-09 12:02

>>38
Save for you who (strangely enough) are not Anonymous, it would then become:

oh god seriously is Anonymous a retard or is Anonymous trolling? if the former, how does Anonymous manage to breath?

which would pretty much be the same :)

Name: Christy McJesus !DcbLlAZi7U 2005-06-09 14:33

>>39
I was going to say something about using pronouns on a thread full of Anonymous, but I realised it would be silly for the reasons you mentioned :)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List