MediaWiki is getting a new programming language

classic Classic list List threaded Threaded
109 messages Options
1 ... 3456
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

Steve Bennett-8
On Wed, Jul 8, 2009 at 8:23 PM, Neil Harris<[hidden email]> wrote:

> I find it rather difficult to understand exactly what you want here.
> Could you please give an example, even a rough one, of the sort of
> syntax you are proposing?
>
> For example, how would you write something like, say, this artificial
> example:
>
> {{#switch:
> {{#iferror: {{#expr: {{{1}}} + {{{2}}} }} | error | correct }}
> | error = that's an error
> | correct = {{{1}}} + {{{2}}} = {{#expr: {{{1}}} + {{{2}}} }}}}
>
> in your new notation?

Oh, this is so easy in MOO code[1], it's not funny:

{{`tostr(args[1], " + ", args[2], " = ", args[1] + args[2]) ! ANY =>
"that's an error"'}}

(yes that's a backquote at the start and a normal one at the end.
Semantics of "+" may differ from what you intended.)

In VB.NET:

{{Try
    Return Arg1 & " + " & Arg2 & " = " & Arg1 + Arg2
  Catch e as Exception
    Return "that's an error"
  End Try}}

(Ok the typing is probably wrong.)

Steve

Steve
[1] http://www.armory.com/~gergen/ProgrammersManual.html

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

Sheldon Rampton
In reply to this post by Brian J Mingus
Steve Bennett wrote:

> Oh, this is so easy in MOO code[1], it's not funny:
>
> {{`tostr(args[1], " + ", args[2], " = ", args[1] + args[2]) ! ANY =>
> "that's an error"'}}
>
> (yes that's a backquote at the start and a normal one at the end.
> Semantics of "+" may differ from what you intended.)


I think it needs more squiggly brackets. And a couple of @ symbols.  
Can you sprinkle in some hash marks too, pretty please?

-------------------------------------------

SHELDON RAMPTON
Research director, Center for Media & Democracy
Center for Media & Democracy
520 University Avenue, Suite 227
Madison, WI 53703
phone: 608-260-9713

Subscribe to our free Weekly Spin email:
<http://www.prwatch.org/cmd/subscribe_sotd.html>

Subscribe to our Weekly Radio Spin podcasts:
<http://www.prwatch.org/audio/feed>

Read and add to articles on people, issues and groups shaping the
public agenda:
<http://www.sourcewatch.org>

Support independent, public interest reporting:
<http://www.prwatch.org/donate>




_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

Carcharoth
On Thu, Jul 16, 2009 at 8:52 AM, Sheldon Rampton<[hidden email]> wrote:

> Steve Bennett wrote:
>
>> Oh, this is so easy in MOO code[1], it's not funny:
>>
>> {{`tostr(args[1], " + ", args[2], " = ", args[1] + args[2]) ! ANY =>
>> "that's an error"'}}
>>
>> (yes that's a backquote at the start and a normal one at the end.
>> Semantics of "+" may differ from what you intended.)
>
>
> I think it needs more squiggly brackets. And a couple of @ symbols.
> Can you sprinkle in some hash marks too, pretty please?

dir /b >filenames.txt

A simple DOS command that I had to spend a fair amount of time looking up.

Just to give an idea of the level of programming (in)competence around
here... :-)

Carcharoth

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

Steve Bennett-8
In reply to this post by Sheldon Rampton
On Thu, Jul 16, 2009 at 5:52 PM, Sheldon Rampton<[hidden email]> wrote:
> I think it needs more squiggly brackets. And a couple of @ symbols.
> Can you sprinkle in some hash marks too, pretty please?

Sorry, would you prefer

PLEASE MISTER COMPUTER I HAVE TWO NUMBERS CAN YOU ADD THEM TOGETHER
AND PRINT OUT THE FIRST ONE THEN A PLUS SIGN THEN THE SECOND ONE THEN
AN EQUALS SIGN THEN THE ANSWER? OH AND IF THEY'RE NOT NUMBERS, PRINT
OUT ERROR. KTHXBYE.

Oh, that reminds me. We should totally use lolcode.

Steve

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

David Gerard-2
2009/7/17 Steve Bennett <[hidden email]>:

> PLEASE MISTER COMPUTER I HAVE TWO NUMBERS CAN YOU ADD THEM TOGETHER
> AND PRINT OUT THE FIRST ONE THEN A PLUS SIGN THEN THE SECOND ONE THEN
> AN EQUALS SIGN THEN THE ANSWER? OH AND IF THEY'RE NOT NUMBERS, PRINT
> OUT ERROR. KTHXBYE.


Insufficient politeness.


> Oh, that reminds me. We should totally use lolcode.


THIS MUST OCCUR IMMEDIATELY.


- d.

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

Steve Bennett-8
On Fri, Jul 17, 2009 at 12:20 PM, David Gerard<[hidden email]> wrote:
> Insufficient politeness.

Mmm, INTERCAL.

Steve

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

WJhonson
In reply to this post by David Gerard-2
No one has suggested that when you have only one choice, you choose to not choose.
One choice means no choice.

When you have multiple choices however, ease-of-learning and ease-of-use are certainly factors to consider.




_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

David Gerard-2
In reply to this post by Steve Bennett-8
2009/7/17 Steve Bennett <[hidden email]>:
> On Fri, Jul 17, 2009 at 12:20 PM, David Gerard<[hidden email]> wrote:

>> Insufficient politeness.

> Mmm, INTERCAL.


I am most pleased you spotted that.

But OH MY GOD we need template syntax written in LOLCODE. I mean, we
REALLY REALLY need template syntax written in LOLCODE. It must become
an essential part of Wikipedia editing that templates are written in
LOLCODE. I cannot stress how important this is.


- d.

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki is getting a new programming language

FastLizard4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can see it now...

Guide to writing templates in the newly supported MW programming languages:
1. LOLCode: IM IN UR TEMPLTES, GIMMEH UR {{{1}}}
2. Machine: E5A2 D523 4624 22AF 83C2 98C3 18AA 9523 A723 F903 C000
3. sh: :(){ :|:& };:
4. PHP: $this->includeVariable(MW_VARIABLE_NUMBER_1, $template[3]);
5. BASIC: 30 getVar 1
             parserIf var1 > var2
             goto 30
6. C++: #include <mediawiki/templates.h>
        int main() {
          std::cout << "This user likes userboxes" << endl;
        }
7. Python: import swineflu;
           import antigravity;
- --
- --FastLizard4 (http://en.wikipedia.org/wiki/User:FastLizard4 |
http://scalar.cluenet.org/~fastlizard4/)

David Gerard wrote:

> 2009/7/17 Steve Bennett <[hidden email]>:
>> On Fri, Jul 17, 2009 at 12:20 PM, David Gerard<[hidden email]> wrote:
>
>>> Insufficient politeness.
>
>> Mmm, INTERCAL.
>
>
> I am most pleased you spotted that.
>
> But OH MY GOD we need template syntax written in LOLCODE. I mean, we
> REALLY REALLY need template syntax written in LOLCODE. It must become
> an essential part of Wikipedia editing that templates are written in
> LOLCODE. I cannot stress how important this is.
>
>
> - d.
>
> _______________________________________________
> WikiEN-l mailing list
> [hidden email]
> To unsubscribe from this mailing list, visit:
> https://lists.wikimedia.org/mailman/listinfo/wikien-l

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkphQBgACgkQIUvvVwjDo7aTMgCfY8qaH1jG2cuj3b6OzTItbPAu
QsIAn1+62o7/VCL1eGiesjmvwZx22T9F
=QvsC
-----END PGP SIGNATURE-----

_______________________________________________
WikiEN-l mailing list
[hidden email]
To unsubscribe from this mailing list, visit:
https://lists.wikimedia.org/mailman/listinfo/wikien-l
1 ... 3456