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

Pages: 1-

What is the Most flexible language

Name: Anonymous 2008-12-31 6:12

An example: you can redefine the names of functions, how you call
them
Manipulate syntax and compilation with inline code or rewrite the rules.

Name: Anonymous 2010-05-21 3:39

ALL THREADS WILL BE REPLIED TO

Name: Anonymous 2010-05-21 3:55

javascript

Name: Anonymous 2010-05-21 4:01

binary

Name: Anonymous 2010-05-21 4:06

Lisp.

Name: Anonymous 2010-05-21 4:11

I can do that in Common Lisp easily and to some lesser extent in assembly. Forth might also subscribe, but I don't know it well enough to say anything.

Name: Anonymous 2010-05-21 4:17

>>6
common lisp doesn't have first-class macros.

Name: Anonymous 2010-05-21 4:21

>>7
There has been extensive research into that and from what I can tell they aren't worth the hassle (yet).

Name: Anonymous 2010-05-21 4:22

Name: Anonymous 2010-05-21 4:43

>>7
What do you mean by first-class macros? Do you mean Scheme's hygenic ones? If that's it, then they're less useful to me than CL's ``real'' macros (which work by executing real code and generating the output expression objects). With proper use of gensyms and packages, my macros are just as safe, and a lot more flexible. I've written my share of CL macros and have yet to encounter a case I couldn't handle. Hygenic macros are better in theory, but I prefer CL's macros in practice. It's also possible to build a hygenic macro system on top of CL's low-level one, but nobody ever bothered finishing one (some people did proof-of-concept ones) since most CL coders simply don't need them and prefer CL's ``real'' macros instead.

Name: Anonymous 2010-05-21 4:50

>>10
What he means by that is this thread is trying to make factor sound appealing.

Name: Anonymous 2010-05-21 4:59

>>10
What do you mean by first-class macros? Do you mean Scheme's hygenic ones?
You don't know what first-class means? And you call yourself a Lisper ;)
Let's run down the list shall we?
    * can be stored in variables and data structures
    * can be passed as a parameter to a subroutine
    * can be returned as the result of a subroutine
    * can be constructed at runtime
    * has intrinsic identity (independent of any given name)

Saying Scheme's macros aren't `real'
As real as CLs
which work by executing real code and generating the output expression objects
You can do the former with syntax-case, and we kinda do the latter (but with syntax objects rather than sexprs, which have additional lexical binding info (and usually source line etc...))
With proper use of gensyms and packages, my macros are just as safe, and a lot more flexible
I'd say the entire point of a "hygienic by default" macro system is that you don't always need to worry about the former. As for flexiblity, I'm not so sure. The only thing that syntax-rules can't do is create new (non-"gensym"ed) symbols, and you have syntax-case for that. Oleg Kisolyov even wrote a Scheme->syntax-rules compiler at one point.

since most CL coders simply don't need them and prefer CL's ``real'' macros instead.
Given the general arrogance of Lispers, I'd say they would probably think they were the best thing since sliced bread if they had been mature 20 years ago and was in the CL standard, but since it isn't, it is obviously an inferior toy.

Name: >>12 2010-05-21 5:06

>>10
If you don't like syntax-rules, or even hygienic-by-default macros, thats fine. But please stop spouting the same shit every time a discussion about macros comes up.

Name: Anonymous 2010-05-21 5:18

You don't know what first-class means? And you call yourself a Lisper ;)
The word first-class is quite loaded. I merely wanted to see what your definition for it was. Macros are very different beasts from functions, so I don't expect them to do the same things, but if I want to treat a macro as a function I can do that.
  * can be stored in variables and data structures
I can store its form in a variable or data structure, I can store the expansion in that. I can generate a piece of code holding the macro, or the macro can generate a piece of code (compiled or otherwise), which can be held as data. Macros are themselves compile-time constructs, which means they have their own set of rules to be worked with, and simply don't make sense outside those domains.
    * can be returned as the result of a subroutine
The form, the expansion, or the compiled expansion? Either can be returned. The macro function? Sure.
    * can be constructed at runtime
Yes, you can call COMPILE at runtime to compile a piece of code, or MACROEXPAND on a form at runtime to expand it, or even the effective macro function represented by some name. New macros can also be defined at runtime, if you wish to do that, and many more.
    * has intrinsic identity (independent of any given name)
You'll have to define what you mean by this. A macro function, its expansion, a compiled piece of code, gensyms, symbols, ..., as well as any other Lisp object are internally represented by pointers (altough, in some weird implementations they could be something else), and you can compare their identity with the EQ function (you can also store them in a hashtable if you wish, which is keyed by EQ).

There are a few places where Scheme's hygenic macros can do certain things consistently (maintain lexical scope upon expanding), which low-level macros would have to work around manually to achieve hygiene, but all these situations can be solved.

Name: Anonymous 2010-05-21 5:24

>>14
I was just using the standard definition, since that is what most people mean. Although I'd need to wait for OP to clarify.

Name: Anonymous 2010-05-21 5:31

Punched cards can be quite flexible. However, they may risk to jam if bended too much.

Name: Anonymous 2010-05-21 5:44

FORTH
/thread

PS: Lispies are funny. Typical Blub programmers who are absolutely sure that they are not (and even invented the term)! I mean, ignorance becomes so much funnier when mixed with elitism!

Name: Anonymous 2010-05-21 5:53

>>17
pardon my ignorance of forth, but does forth even have a macro/procedure distinction?

Typical Blub programmers who are absolutely sure that they are not
I really wish people didn't get all their info about what lispers are like from paul graham

I mean, ignorance becomes so much funnier when mixed with elitism!
how true

>>9
Xach on 4ch? more likely than I think, apparently

Name: Anonymous 2010-05-21 7:06

>>18
pardon my ignorance of forth, but does forth even have a macro/procedure distinction?
It doesn't have neither "macros" nor "procedures" in the conventional sense.

It does however have the distinction between normal and IMMEDIATE words, calls to the former are compiled as is, the latter are executed during compilation in the same environment as the core compiler code, i.e. they can compile what they want, read words from the input stream, temporary override any core words (including ": ;") etc.

For example, "condition IF branch1 ELSE branch2 THEN" is not a core construct, these are defined in pure Forth in terms of BRANCH/CBRANCH (jump and conditional jump), where IF compiles the CBRANCH with dummy address and pushes the address of the address on a special stack; optional ELSE inserts the BRANCH with dummy address, patches the preceding CBRANCH and replaces its operand's address with the address of the BRANCH's operand on the stack. THEN pops the address of the operand (pushed by IF or ELSE) and patches it, thus finalizing the construct.

And of course you can build any "procedure" or "macro" abstraction you want on top of it.

I really wish people didn't get all their info about what lispers are like from paul graham
Well, you are ignorant of Forth and you do show unmistakable signs of elitism.

By the way, if perchance you realize that that's wrong, I recommend reading the literate jonesforth system: http://www.annexia.org/forth

how true
There's this interesting peculiarity: if you're a Lisp elitist, you can squint just right and it would look like increasing power, increasing expressiveness and decreasing built-in syntax gives a "better" language. Automatically.

But when you get to the other end of the rabbit hole, you look back and discover that in terms of expressiveness and openness Lisp is as far behind Forth as Visual Basic is behind Lisp. At the same time you can't but acknowledge that Visual Basic is more useful that Forth for most tasks. This realization makes it somewhat difficult to be a "Forth elitist", as you might imagine, or any language elitist actually.

That's why you don't see lots of Forth weenies preaching about how Forth is da best and how it's unpopular because most of the programmers are too dumb or too set in their ways to understand it.

Name: Anonymous 2010-05-21 7:30

>>19
you do show unmistakable signs of elitism.
In what post? Right now I can tell you that I posted as >>12,13,15,18 . The one thing that I said that I could see you construing as elitist is when I said "You don't know what first-class means? And you call yourself a Lisper ;)" and I meant that tongue-in-cheek.
Although, if you are talking about >>10, then I agree.

Name: Anonymous 2010-05-21 9:04

>>1
``Katahdin is a programming language where the syntax and semantics are mutable at runtime.''

Though I don't really see a point in that much flexibility in a programming language.

Name: Anonymous 2010-05-21 12:32

>>17
>PERL

Fixed that for you

Name: Anonymous 2010-05-21 12:37

>>1
Assembly. All runnable programs (and by implication, all programming languages) can be expressed as assembly.

Name: Anonymous 2010-05-21 12:40

Lambda Calculus Turing Machines based Perceptrons

Name: Anonymous 2010-05-21 13:49

>>9
Air, fire, wind and earth
Fuckin' macros, how do they work?

Name: Anonymous 2010-05-21 14:44

Lisp...

Name: Anonymous 2010-05-21 14:49

>>1
2008-12-31 06:12
I just realized that this thread was another work of http://dis.4chan.org/read/prog/1274427431/6. Shame on you, http://dis.4chan.org/read/prog/1274427431/6.

Name: Anonymous 2010-05-21 15:38

>>23
Any Turing complete language can be expressed as any other Turing complete language. Your point isn't as clever as you think it is.

Name: Anonymous 2010-05-21 15:48

>>28
A clear case of YBHT.

Name: Anonymous 2010-05-21 19:27

>>29
CLEAR MY ANUS

Name: Anonymous 2010-05-21 20:44

>>19
Got any other recommendations for Forth tutorials?  I've never used Forth before and I want to start by rolling my own, but I really don't want to use GAS as my assembler and I think a lot of the shit he's doing doesn't have equivalents in my assembler

Name: Anonymous 2010-05-22 10:04

GARBAGE COLLECTING In JaVa'XeS ANUS

Name: Anonymous 2010-05-22 15:06

Perl 6 is the most flexible language

Name: Anonymous 2010-05-22 20:12

What is the Most flexible anus?

Name: Anonymous 2010-05-22 22:40

PHP

Name: Anonymous 2010-05-23 2:30

C++

Name: Anonymous 2010-12-09 1:36

Name: Anonymous 2011-02-03 8:29


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