 |
|
04-22-2009
|
#11 (permalink)
|
|
Resident Slayer
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Smalltalk is not a bad recommendation, except for the fact that you don't have much support around it in terms of compiler/interpreters and tools.
A better one--indeed probably the canonical one--is LISP: it operates on lists and every program is a list and it has oodles of tools to redefine itself. Although there are compilers (Franz Lisp), the notion of compiling a LISP program is a bit of an oxymoron...
Best thing is you've got 40 years worth of LISP stuff out there to build on, since its probably by far the most popular language for AI apps.
LISP programmers know the value of everything and the cost of nothing, 
Buffy
----------------
"If you do not agree with anything I say, I'll not only retract it, but deny under oath that I ever said it!"
__________________________________________________ ______________-- Tom Lehrer
"No Robbie, not Europe!"
Forum Administrator
Hypography Science Forums - Science for Boys and Girls! Its not for nothing that we hang out here.
|
|
04-22-2009
|
#12 (permalink)
|
|
A Person
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Smalltalk and Lisp are high on my list of programmable programming languages to investigate, but I suspect I have some fairly radical ideas regarding the design and implementation of a language of languages. Chief amongst the radical ideas would be the explicit purpose of the language: to develop languages. Most programming languages are designed and developed towards developing programs and solving specific problem domains like graphics or mathematics. This language would be oriented towards resolving the challenges of language.
To give a more explicit account of what I am working on here are some properties that I am looking to design into a language:
Compiled
Interpreted
Profiled
Self-Checking, Self-Testing
Fully Object-Oriented Recursion
Generics/Templated
Reflective
Distributed/Distributable
Multi-threaded orientation
Utilizes quantum mechanics with an emphasis on Information Theory
Utilizes strangeloop genetic programming
Rewriting
I plan on using something like XML as the standard declarative portion of the language, so all objects in the language can and do exist in multiple forms: map, territory, and contextual overlays. Following the principle of least power.
I'm performing tests towards this end by implementing some of my ideas in Java.
----------------
There are no truths in science, only the falsifiable hypotheses and explanations of the people who test them.
Hyper Physics
Hyper Math
Wikipedia
Last edited by KickAssClown; 04-23-2009 at 05:13 PM..
Reason: Grammar
|
|
04-23-2009
|
#13 (permalink)
|
|
Dedicated Smart-ass
Location: Just before 0xAA55
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
KAC, i'm with you on Lisp, though i think i would do Haskell over Smalltalk; Haskell has had it's day view in human behavioral simulation recently that came out in a game, that came out to be so cool it was and is still being studied by researchers at various universities. As i think behavioral simulation is something you are interested in (from what i think i know about you) that may be a language worth learning and putting higher up then Smalltalk, though i think you should battle with Lisp first 
----------------
Microsoft, the leader in using innovative tactics to promote irksome experience, coupled with antiquated technology that's held together by a pyramid of makeshift afterthoughts.
Apple, the leader in using irksome tactics to promote innovative experience, coupled with an antiquated core that's enhanced by state-of-the-art afterthoughts.
Linux, the leader in not using any tactics to promote user-defined experience, coupled with state-of-the-art core enhanced by innovative afterthoughts.

|
|
04-23-2009
|
#14 (permalink)
|
|
A Person
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Quote:
Originally Posted by alexander
KAC, i'm with you on Lisp, though i think i would do Haskell over Smalltalk; Haskell has had it's day view in human behavioral simulation recently that came out in a game, that came out to be so cool it was and is still being studied by researchers at various universities. As i think behavioral simulation is something you are interested in (from what i think i know about you) that may be a language worth learning and putting higher up then Smalltalk, though i think you should battle with Lisp first 
|
I'm mainly interested in Lisp because of articles I've been reading and recommendations I've gotten from various expert individuals. The article I've linked proposes a principle of the most powerful language.
My issue in learning new languages so far has been documentation. I'm spoiled due to my experience with Java which has clearly accessible universal documentation available online or in line with certain IDEs. If I could get similar documentation for Lisp, Haskell, or Smalltalk, I am sure I could pick up the languages rather quickly.
Thanks for the suggestions,
Curiouser and Curiouser The Clown.
----------------
There are no truths in science, only the falsifiable hypotheses and explanations of the people who test them.
Hyper Physics
Hyper Math
Wikipedia
|
|
04-23-2009
|
#15 (permalink)
|
|
Slaying Bad Memes
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Reminds me of something that happened long ago at Texas Instruments.
My co-workers and I programmed in straight assembler. But we wanted a higher level language to play with, hoping it would make us more productive. We all tried our hand at it, but our lead programmer came up with something novel -- he took the breakdown structure (BDS) of an existing language -- a very simple one -- and wrote a small assembly program that read in the BDS as input -- and then it would read in any program written in that higher level language, and reduce it to assembler.
I don't know what they call a BDS nowdays, but it looked something like this:
STATEMENT :== {ARITH_STATEMENT|IF_STATEMENT|LOOP_STATEMENT|begin |stop}
ARITH_STATEMENT :== {[SIGN] TOKEN OP ARITH_STR|ARITH_STR}
TOKEN :== {VARIABLE|INTEGER|REAL}
OP :== {+|-|*|/}
ARITH_STR :== {(ARITH_STR)|TOKEN|TOKEN OP TOKEN}
...
and so forth. Words in all upper caps are part of the BDS definition of the hi-level language. Actual key words in the hi-level language are lower case, like "begin", "stop", "call", "if" and so forth. The vertical bar, |, is read as "or". So, OP could be "+" or "-" or "*" or "/".
We got to playing with this, writing little routines in our new hi-level language (HLL) until somebody realized that the BDS text was in a buffer in the computer while executing the HLL. It was trivial then to make a small adjustment in the BDS. If I remember correctly, we modified this line:
TOKEN :== {VARIABLE|INTEGER|REAL|LANG}
A "LANG" as we called it, could be any line in the BDS definition!
Now, in our HLL, we could write statements such as:
BDS(7) = "OP :== {+|-|*|/|^}"
so that
OP :== {+|-|*|/}
became
OP :== {+|-|*|/|^}
We just added a new operator, ^ !!!!
This meant that in mid-program, we could change the rules of the language and use the new rules immediately.
Eventually, we got it so we could add or delete options from any given line of BSD without having to redefine the whole line. We did this by defining a few new lines of BSD which gave us operators for selecting a specific option within an existing BSD line, and for searching the BSD line by line, option by option.
We had a LOT of fun doing this, but it didn't come to much. We didn't have the time to spend all day experimenting with it, and producing something that wouldn't crash the whole computer was a really big challenge.
But the possibilities... 
----------------
Hypography Forums Moderator
-- - - - - -
What concerns me is not the way things are, but rather the way people think things are.
Epictetus, Greek Philosopher
The map is NOT the territory.
Korzybski, Polish-American Philosopher
Last edited by Pyrotex; 04-23-2009 at 03:42 PM..
|
|
04-23-2009
|
#16 (permalink)
|
|
A Person
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Quote:
Originally Posted by Pyrotex
Reminds me of something that happened long ago at Texas Instruments.
[...]
Our lead programmer came up with something novel -- he took the breakdown structure (BDS) of an existing language -- a very simple one -- and wrote a small assembly program that read in the BDS as input -- and then it would read in any program written in that higher level language, and reduce it to assembler.
[...]
We got to playing with this, writing little routines in our new hi-level language (HLL) until somebody realized that the BDS text was in a buffer in the computer while executing the HLL. It was trivial then to make a small adjustment in the BDS.
[...]
This meant that in mid-program, we could change the rules of the language and use the new rules immediately.
Eventually, we got it so we could add or delete options from any given line of BSD without having to redefine the whole line. We did this by defining a few new lines of BSD which gave us operators for selecting a specific option within an existing BSD line, and for searching the BSD line by line, option by option.
We had a LOT of fun doing this, but it didn't come to much. We didn't have the time to spend all day experimenting with it, and producing something that wouldn't crash the whole computer was a really big challenge.
But the possibilities... 
|
Thank you, Pyrotex. I've added this to my list of things to research. It sounds like this would lend itself handily to a language of languages. What would you call an operator which does what you describe? I would very much like to implement this with bounds into the language as a standard operator.
By the way, I'm looking for a name for the language of languages. The candidates I've come up with are: "Dialectics", "Uni-lex", "Babel", "GEB", "Tangle", or "Polyglot". Now that I think about it, maybe the language should be implemented in dialects?
----------------
There are no truths in science, only the falsifiable hypotheses and explanations of the people who test them.
Hyper Physics
Hyper Math
Wikipedia
Last edited by KickAssClown; 04-23-2009 at 04:59 PM..
Reason: Spelling fail.
|
|
04-23-2009
|
#17 (permalink)
|
|
A Person
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
I've started to conceive of TLoL (the Language of Languages) as colonies of specialized languages which may use the output of and modify each of the other languages.
XML would act as TLoL's Declarative language, describing how things maybe declared in TLoL. (or something like XML)
Something like Pyrotex's HLL might exist as the operator language, defining the behavior of TLoL's operators.
Some form of  -Calculus language would form the functional language, defining the behavior of TLoL's functions.
XML, HLL, and  -Calculus language might be extended into an object-oriented language which would define the behavior and properties of objects in TLoL.
I envision making use of imperative/state, procedural, genetic, and structural (describes data structures) dialects to handle the specialized applications of TLoL.
The trick of the language would be to identify the context of a phenomena--problem or solution--via pattern recognition, and once so identified, evolve the expression of that phenomena towards a family of more ideal phenomena via rewriting/gene-hacking. Express a phenomena using the best suited set of languages and develop languages to express new phenomena.
----------------
There are no truths in science, only the falsifiable hypotheses and explanations of the people who test them.
Hyper Physics
Hyper Math
Wikipedia
Last edited by KickAssClown; 04-24-2009 at 12:59 AM..
Reason: Grammar fail.
|
|
04-23-2009
|
#18 (permalink)
|
|
Creating
Location: Silver Spring, MD, USA
|
Not Ranked
:
+0 / -0
0 score
BNF, EBNF, ABNF, and other Metalanguages
Quote:
Originally Posted by Pyrotex
…he took the breakdown structure (BDS) of an existing language -- a very simple one -- and wrote a small assembly program that read in the BDS as input -- and then it would read in any program written in that higher level language, and reduce it to assembler.
I don't know what they call a BDS nowdays, but it looked something like this:
STATEMENT :== {ARITH_STATEMENT|IF_STATEMENT|LOOP_STATEMENT|begin |stop}
...
|
Generically, expressions like these are in what are called metalanguage. There are a couple of somewhat standard ones, such as Backus-Naur Form (which has expressions like <name> ::= <last-name> “,” <first-name> “ ” <middle-initial>)
and Extended Backus–Naur Form (name = last name , “,” , first name , [ middle initial ], Augmented BNF, etc., but in documents such as ANSI language standards, the metalanguage used is usually explicitly defined in the beginning of the document, and various hard-to-machine-read typesetting features, such as underlining and vertical bracketing, used. RFC2616, which defines the HTTP this page is using, uses ABNF.
Because a language I once translated many megabytes of source code from one implementation of to another had an ANSI standard document using a particular BNF variant, I wrote a parser for it to identify the non-portable parts. It didn’t interpret or compile the language, like Pyro’s friend’s did, just identified every substring within all of the source code by the symbol names given in the language specification, allowing much of the translation to be automatic, and identifying the parts that were structurally complicated to be rewritten by a small team of humans.
My experience and impression is that, since the late 1990s, language implementers have been less concerned with using formal meta-languages, and in many cases adopted an “the interpreter/compiler is the meta-language definition of the language” attitude, rather than making large efforts to write and conform with standards maintained by organizations like ANSI, the WWW consortium being the major exception to this trend.
----------------
Moderator: Computers and Technology; Medical Science; Science Projects and Homework; Philosophy of Science; Physics and Mathematics; Environmental Studies 
|
|
04-23-2009
|
#19 (permalink)
|
|
Resident Slayer
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Most parser tools use some variation of BNF as input, the most famous--which some of us still use--is YACC ("yet another compiler compiler") which is normally paired with Lex, and both are available in open source versions like GNU's Flex and Bison. YACC is an LALR(1) parser though, which means you normally run into all sorts of nasty shift-reduce conflicts, and the more commonly used parsers today are all Recursive-Descent parsers, which are much more robust. I can recommend the Gold Parser which is free/open source and has oodles of output languages for implementation.
Parsers are indispensable if you're going to be a real programmer.
This of course is not really what KAC is looking for though, which is a language that would subsume an extensible parser as part of it's core functionality....
Mathematicians are like Frenchmen: whatever you say to them they translate into their own language, and forthwith it is something entirely different, 
Buffy
----------------
"If you do not agree with anything I say, I'll not only retract it, but deny under oath that I ever said it!"
__________________________________________________ ______________-- Tom Lehrer
"No Robbie, not Europe!"
Forum Administrator
Hypography Science Forums - Science for Boys and Girls! Its not for nothing that we hang out here.
|
|
04-24-2009
|
#20 (permalink)
|
|
A Person
|
Not Ranked
:
+0 / -0
0 score
Re: Self-Referential Language?
Quote:
Originally Posted by alexander
KAC, i'm with you on Lisp, though i think i would do Haskell over Smalltalk; Haskell has had it's day view in human behavioral simulation recently that came out in a game, that came out to be so cool it was and is still being studied by researchers at various universities. As i think behavioral simulation is something you are interested in (from what i think i know about you) that may be a language worth learning and putting higher up then Smalltalk, though i think you should battle with Lisp first 
|
Quote:
Originally Posted by Pyrotex
Reminds me of something that happened long ago at Texas Instruments.
[...]
Our lead programmer came up with something novel -- he took the breakdown structure (BDS) of an existing language -- a very simple one -- and wrote a small assembly program that read in the BDS as input -- and then it would read in any program written in that higher level language, and reduce it to assembler.
[...]
We got to playing with this, writing little routines in our new hi-level language (HLL) until somebody realized that the BDS text was in a buffer in the computer while executing the HLL. It was trivial then to make a small adjustment in the BDS.
[...]
This meant that in mid-program, we could change the rules of the language and use the new rules immediately.
Eventually, we got it so we could add or delete options from any given line of BSD without having to redefine the whole line. We did this by defining a few new lines of BSD which gave us operators for selecting a specific option within an existing BSD line, and for searching the BSD line by line, option by option.
We had a LOT of fun doing this, but it didn't come to much. We didn't have the time to spend all day experimenting with it, and producing something that wouldn't crash the whole computer was a really big challenge.
But the possibilities...
|
Quote:
Originally Posted by CraigD
Generically, expressions like these are in what are called metalanguage. There are a couple of somewhat standard ones, such as Backus-Naur Form (which has expressions like <name> ::= <last-name> “,” <first-name> “ ” <middle-initial>)
and Extended Backus–Naur Form (name = last name , “,” , first name , [ middle initial ], Augmented BNF, etc., but in documents such as ANSI language standards, the metalanguage used is usually explicitly defined in the beginning of the document, and various hard-to-machine-read typesetting features, such as underlining and vertical bracketing, used. RFC2616, which defines the HTTP this page is using, uses ABNF.
[...]
My experience and impression is that, since the late 1990s, language implementers have been less concerned with using formal meta-languages, and in many cases adopted an “the interpreter/compiler is the meta-language definition of the language” attitude, rather than making large efforts to write and conform with standards maintained by organizations like ANSI, the WWW consortium being the major exception to this trend.
|
Quote:
Originally Posted by Buffy
[...]
I can recommend the Gold Parser which is free/open source and has oodles of output languages for implementation.
Parsers are indispensable if you're going to be a real programmer.
This of course is not really what KAC is looking for though, which is a language that would subsume an extensible parser as part of it's core functionality....
[...]
|
O, ye wise ones!
I harken unto thee, for perchance ye all may well advise me in the art, science, and crafts of languages of computable truths.
Where would one be well advised to begin in the development of a language such as this? I would think that if I am to use XML as the declarative means of the language, I would be well advised to describe the language according to the strictures of outline suggested in the examination of the problem posed. I would expect--naively perhaps--developing a compiler for the language would be next in the order of things, but I also expect--from experience--that there are other ways to go about developing this language.
Also, Does anyone have links to resources related to writing languages? Tutorials, examples, compiler/interpreter/profiler examinations, and the likes? Do I need to learn assembly and/or C to write my own language?
While I wait, I am going to sketch my concept in XML.
----------------
There are no truths in science, only the falsifiable hypotheses and explanations of the people who test them.
Hyper Physics
Hyper Math
Wikipedia
Last edited by KickAssClown; 04-24-2009 at 01:33 AM..
Reason: Missing quotations
|
|
 |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
» Advertisement |
|
|
|