• Member Since 24th Sep, 2015
  • online

Oliver


Let R = { x | x ∉ x }, then R ∈ R ⟺ R ∉ R... or is it?

More Blog Posts321

Jun
6th
2016

Random #2 · 3:49pm Jun 6th, 2016

A random collection of one line thoughts which I found no uses for, but maybe you will. Some should be good for a laugh, at least.

In a different community, these would be tweets.

Fluttershy has a chicken named Elizabeak, and a potted plant, named Elizabeet.
Max Factor is a valid pony name. He’s a scientist, not a stylist.
Fluttershy: So what it’s like, being a tree? I always wanted to be a tree. Groot: I am Groot.
Make Trixie Great and Powerful Again!
“Selenography” is the scientific name for Luna’s memoirs.
Dashboard is a place where Rainbow Dash posts announcements of Wonderbolt performances. In Equestria Girls, however, it’s a popular insult to use for Rainbow Dash.
“I have alcohol stashed all over Ponyville. For alcoholic emergencies.”
The dominant religion among ponies is stereotheism.
There is one more Pie sister, but the family has disowned Kinkie Pie. So she married an Apple and changed her name. We don’t know much about her, but her son is Adam Apple.
Cheese Sandwich walks into a bar. The bartender says, “Sorry, we don’t serve food here.”
Rarity Instigates.
The Lizard of Ows: Rarity is shipping Fluttershy with Tin Woodsman and enlists the help of Spike. Spike suffers.
Deep in the bowels of the Equestrian equivalent of IKEA, a real Swede is hidden in a padded, windowless room. He thinks up product names. Nobody knows what sort of alien plays the part in the human IKEA…
If Treehugger loves plants so much… what does she eat?
Rainbow Dash and her dreaded enemy Monochrome Crawl.
Fortune favors the bold. Fame favors the italic.

Report Oliver · 534 views · #random
Join our Patreon to remove these adverts!
Comments ( 38 )

Maybe I should do one of these. It'd certainly help clear out the useless bits and scraps.

Also, now I want to write a story entitled Rarity Instantiates.

4002995 You really should, you're one of the few who could pull it off well I think.

Intriguing and amusing. I like this better than twitter as you get to read more all at once.

4002995

Please do. To both. :)

If Treehugger loves plants so much… what does she eat?

Fruit that has naturally fallen from trees. She's careful to always save the seeds.

4003102

I.e. she robs the children of plants of their food, right. :)

Hmn... I have a chicken named Elizabeak. And others named Peckingham. Henrietta, Cluckwork, and Mrs. Squabble. I have not, however, given punny names to any of my trees or plants. Maybe I should start? :pinkiecrazy:

Also, in my latest story, Twilight uses "selenographic reaserch" as an euphemism for fooling around with Luna. :raritywink:

4003227

But that should be selenologic research, it's only selenographic if she writes hot steamy diaries about it!

4003240
:rainbowlaugh: I smell an edit!

4003266

I recommend you make use of hot steamy diaries as a plot device instead. :)

4003275
:rainbowhuh: "Plot device?" You mean a chair?

4003285

No, I mean a
static.tvtropes.org/pmwiki/pub/images/Plot-Device-Red-Giant-Viral-Video_1727.jpg

:derpytongue2:

Seriously though, since selenography implies describing, somepony stumbling on Twilight's more sensitive writing could be interesting...

4003303
Yeah... I will keep that in mind for future stories. Might even make a good comedy one-shot! :yay:

And, holy carp, I just realized that of course Twilight would take notes about her "scientific" interests.

4002995 Or do R. A. (Rarity Abbreviates)

If Treehugger loves plants so much… what does she eat?

The fruits of plant that use ponies as carriers for reproduction. Obviously.

Oh, wait, that doesn't sound like a pony diet at all. Which isn't necessarily a problem for Treehugger, but rather for the non-existing species of plants.

4003205
Not with proper waste disposal.

4002995
I think she'd prefer Haskell and typeclasses aren't really the most elegant thing about it.
Now I wanna see Rarity complaining that she needs to use typeclasses.

4003844

I think she'd prefer Haskell...

http://www.deviantart.com/art/M-for-Monad-545083648 :)

If anything, I see Rarity using a LISP... She sounds like the type of pony not getting lost in multiple layers of parentheses.

4003864
Heh. Monads.

I love Lisp so very damn much, but honestly, it isn't exactly neat.
I see it as more of a Pinkie language. No, not Brainfuck, that one's just way too restrictive. If any of the esoteric languages is for Pinkie, it's probably Snowflake.

Applejack works with Forth.
Twilight prefers Prolog.
Rainbow Dash likes C for the speed and because it's the cool language to use, unlike all of those egghead languages.
Fluttershy uses a whole zoo of languages and she likes them all for what they are.

4003928

Nononono, this is the Pinkie language. MUSHCode.

&U_GETST #5=[if(strlen(setr(1,after(grab(%0,[ucstr(%1)]:*),:))),%q1,0)] &U_PUTST #5=[if(setr(4,match(%0,[setr(2,ucstr(%1))]:*)),replace(%0,%q4,%q2:%2),setunion(%0,%q2:%2))]

It's really supposed to be written this way, (spaces are significant) has a widely held reputation of driving programmers mad, and they say the world's written in it. Which is true. :)

Also, I'm pretty sure Twilight would be using something outright procedural, because checklists.

4003999
Oh god. It looks awful. I certainly can believe that it drives programmers mad.
Wikipedia says Mushcode has syntax similar to Lisp, which seems like a ridiculous claim, looking at the above. But now I wonder: Does it have metaprogramming? And if not, how could it be Pinkie's language?
I'm looking through one of the tutorials:

Commands produce data. Functions don't. Functions manipulate data. Commands don't.

Wut?

Think of commands as the big pot you put over a fire, and functions and data all go into them, get mixed up, converted, and come out a thick rich stew.

Wah?

You cannot evaluate a function without it being in a command. Again, the distinction should be emphasized. Commands produce data, functions manipulate data. There cannot be data for a function to manipulate, unless a command has produced it. Or, more specifically, all of the manipulation of data in the world isn't going to matter if it's never seen.

Huh?
Are they saying that functions operate by side effects and commands are containers for places that these side effects can happen on?

&<attribute name> <object>=$<command text>:<code>

Okay, definitely not syntax like Lisp. The same in a Lisp would be something like
(defcmd <object> <attribute-name> <command-text> <code>*)
I probably should stop this. I'll read the rest of it tomorrow.

Also, I'm pretty sure Twilight would be using something outright procedural, because checklists.

That makes a disturbing amount of sense. Pascal it is, then.

4004179

Are they saying that functions operate by side effects and commands are containers for places that these side effects can happen on?

Tutorials suck about as much as the language itself, most of them were written in early 90s when nobody actually used the language the way it got used in early 00s. Command chaining that this one describes doesn't work very well, by the way, because of the intricacies of how commands enter the single-threaded global execution queue, you could easily end up with them running out of order. Most real user-facing code is something like this:

&attribute_name object=$command:@emit [u(object/attribute_storing_function_code)] &attribute_storing_function_code object=[function(function(function(function(meh))))]

Functions can only produce a result as part of generating text output, whenever that happens. This is not a programming language containing text delimited by quotes, this is a stream of text containing delimited snippets of a programming language. Pretty much everything revolves around the objects of the virtual (textual) world the language exists for, and ultimately, only user commands can result in text output. I.e. a user 'looks' at an object by inputting a command. An attribute on the object gets evaluated to produce text output that the user will see, and any functions found therein (anything between square brackets) are interpreted. Oh, and everything is a string limited to 8192 bytes. In some dialects, empty string is equal to 0, in others it's an error to treat it as a number.

Why would anyone program in that? Because you don't get anything else to program in, duh. Some of the stuff written in it is pretty extensive, and it got really fun when they introduced sql() for interfacing with a real database. :)

As far as arcane scripting languages for virtual environments go, MUSHCode is actually a relatively comfortable one, even if it is insane. eAthenaScript or LSL are magnitudes more painful to use. In eAthenaScript, you could crash the server with a missed semicolon, which only fires when a user tries to interact with the object you scripted. Or inadverently lock up the client. And there are no loops. Or non-integer numbers. Or a modulo operator. In LSL, you're limited to 16kb of compiled CIL code + heap, numbers take 10 bytes, a function definition introduces 600 bytes overhead, lists introduce so much overhead that you can forget about using a list of more than 100 numbers, but you can produce a largely unlimited amount of modules, each with these limitations. So you set them up so they send messages to each other, it feels like programming a bucket of microcontrollers. Usually, you say "screw it" and make HTTP requests to your offworld server where a real program does all the work, instead of writing anything in this horror.

Does it have metaprogramming? And if not, how could it be Pinkie's language?

It's not meant to have metaprogramming. But it has runaway evaluation with possible privilege escalation for reasons described above, and it's pretty trivial, if mindbending, to produce code that writes code, self-modifying code, self-replicating code, etc, etc. :) Not to mention code that literally rewrites the world as you attempt to observe it, which would be just the Pinkie thing to do.

4004403

Functions can only produce a result as part of generating text output, whenever that happens. This is not a programming language containing text delimited by quotes, this is a stream of text containing delimited snippets of a programming language. Pretty much everything revolves around the objects of the virtual (textual) world the language exists for, and ultimately, only user commands can result in text output. I.e. a user 'looks' at an object by inputting a command. An attribute on the object gets evaluated to produce text output that the user will see, and any functions found therein (anything between square brackets) are interpreted. Oh, and everything is a string limited to 8192 bytes. In some dialects, empty string is equal to 0, in others it's an error to treat it as a number.

That actually makes sense. Well, except for the string length limit, using the empty string as 0 and significant spaces. Also the whole thing with commands being stored in attributes and then registering them as commands seems contrived. I'd just make attributes public (users and functions have access) or protected (only function have access) and evaluate attributes when they are read to produce a string. I don't get why it creates a command on defining the attribute. That just seems like it requires additional space or time: "Hey, the user typed '+who', I better iterate over the attributes in this object/look into some lookup table related to this object to find out whether it is a command!"

It's not meant to have metaprogramming. But it has runaway evaluation with possible privilege escalation for reasons described above, and it's pretty trivial, if mindbending, to produce code that writes code, self-modifying code, self-replicating code, etc, etc. :) Not to mention code that literally rewrites the world as you attempt to observe it, which would be just the Pinkie thing to do.

That is convincing.

4005744

That actually makes sense. Well, except for the string length limit, using the empty string as 0 and significant spaces.

The length limit is due to it getting started in mid-80s, when 8192 bytes was a lot. Significant spaces is a direct consequence of code being embedded into text -- if your code contains spaces which leak into text, the user will see them, which will screw up whatever fixed width text formatting you may have.

This thing wasn't designed, it evolved. :)

I'd just make attributes public (users and functions have access) or protected (only function have access) and evaluate attributes when they are read to produce a string

Eventually, (by 00s) as these virtual worlds grew bigger, they introduced attribute flags and attributes flagged "nocommand" would not get scanned for commands.

4005746
I'm just surprised that they're using a scheme were scanning is necessary in the first place. It's not like it is hard to translate the user input
"look chair"
into meaning
"retrieve and evaluate the attribute 'look' of object 'chair'".
The rest is a matter of sanitizing input (which is done either way) and permissions.

I feel compelled to try and write a language like this. Might be fun. Although I'd use a different scheme for delimiting code and strings.

4005754

Sanitizing? Never heard of it, or there wouldn't be runaway evaluation! :) In fact, evaluation is recursive, which is why the example I started with works in the first place: [if(strlen(setr(1,after(grab(%0,[ucstr(%1)]:*),:))),%q1,0)]

Let us assume that %1, that is, parameter 1 of the call is "foo" and parameter 0 of the call is "FOO:1 BAR:2". The code essentially transmutes itself. First, ucstr gets evaluated before anything else, since it has an extra pair of [] brackets around it, and immediately becomes text -- and text is code:

[if(strlen(setr(1,after(grab(%0,FOO:*),:))),%q1,0)]

Then grab(x,y) is evaluated, looking for a wildcard pattern y in list x. And X is parameter 0:

[if(strlen(setr(1,after(grab(FOO:1 BAR:2,FOO:*),:))),%q1,0)]
[if(strlen(setr(1,after(FOO:1,:))),%q1,0)]
[if(strlen(setr(1,1)),%q1,0)]

setr(x,y) is a side effect function, it sets %qX register to Y.

[if(strlen(1),1,0)]

I.e. the above sequence returns 1, and if you call it with BAR you will get 2. These two functions implement a dictionary/hash stored as a list.

"look chair" is actually a hardcoded command anyway and does exactly what you said. It's extending the hardcoded commands to make objects that behave in ways impossible to specify in advance that the whole business is about. And as far as I can tell, most of it was improvised starting from a simple feature request "I want to insert a variable into an object's textual description"

Comment posted by Antsan deleted Jun 7th, 2016

4005759

Sanitizing? Never heard of it, or there wouldn't be runaway evaluation! :)

I meant sanitizing as in "look at chair". They're not doing this in the "look" command hopefully. Right? RIGHT?

"look chair" is actually a hardcoded command anyway and does exactly what you said. It's extending the hardcoded commands to make objects that behave in ways impossible to specify in advance that the whole business is about. And as far as I can tell, most of it was improvised starting from a simple feature request "I want to insert a variable into an object's textual description"

Everything becomes clear with history. Or something like that.

I wonder how many hours of programming MUSHcode could have been saved by switching to a nicely-designed language and recoding everything in that. Although that probably would be demoralizing and thus all of the hours would have been saved, including the ones for playing.

4005805

Right? RIGHT?

No, they aren't doing it at all, "look at chair" will look for an object named "at chair" in your vicinity. :)

Although that probably would be demoralizing and thus all of the hours would have been saved, including the ones for playing.

The whole practice largely died out by now. You can still find isolated pockets, but now it's a very esoteric environment. Which is kind of a shame, because it was a system specifically tailored to roleplaying in textual form, and whenever I look at what people call roleplaying today and how they struggle to do it in forums and on social networking platforms, neither designed nor suitable for the task, I want to cry.

Sometimes, I feel like reimplementing the whole thing from scratch with a dedicated browser-based client, capable of rich text, blackjack and hookers. But then I lie down and wait for the feeling to pass. :)

4005809

No, they aren't doing it at all, "look at chair" will look for an object named "at chair" in your vicinity. :)

Oh. Nevermind, then.

Sometimes, I feel like reimplementing the whole thing from scratch with a dedicated browser-based client, capable of rich text, blackjack and hookers. But then I lie down and wait for the feeling to pass. :)

Well, rich text, blackjack and hookers I cannot do anything about and I guess I'd need to learn hunchentoot, cl-who and parenscript for the whole browser-based client and I assume I'd need to learn to deal with databases for something like this to work reliably and stuff, but writing an interpreter for a fitting language… That should be straightforward.
I'd write something up in Common Lisp. I only need to know which primitives such a language would need and that's probably also where the database stuff came in.

What do you think of the following?
"This string will be emitted with newlines replaced with spaces. " "This string will be appended to the previous string." % "The % emits a newline. It's the only way to emit a newline, at least in the core language. You can write your own functions emitting newlines, of course." % $;:There is no way to escape characters. Escaping characters is ugly. That's why there are these custom delimited strings. They start with the "$" character. Everything after that up to the next ":" is used to determine when the string after the ":" ends. So this particular string is delimited with a "; ";" $;:"; % "Slots of objects can be evaluated with square brackets." % "[desk look] => " [desk look] % $;:The previous retrieves the value saved in the "look" slot of the "desk" object and interprets it as source code that is then evaluated.; % "To set a slot of an object, use this syntax:" % $;:{desk look $#:$+:You find another note in the drawer. It reads "Yeah, nesting custom delimited strings like that is really damn neat."+#}; % {desk look $#:$+:You find another note in the drawer. It reads "Yeah, nesting custom delimited strings like that is really damn neat."+#} "[desk look] => " [desk look] % "This allows for meta programming. Of course this is not the most elegant way to do it, but I guess with a string processing language I cannot do better." %

4005847

I guess I'd need to learn hunchentoot, cl-who and parenscript for the whole browser-based client

I hear, Clojure compiled to javascript is the in thing these days if you really need to do it in Lisp. :) And the server-side could be written the same way for nodejs, to make use of the numerous low-level libraries... I'm not doing this because it would take quite a long time to make it work, but the moment where it could become popular is really in the past.

What do you think of the following?

The idea of a custom delimiter is clever, but I'm not sure it really fits the problem domain. In fact, I suggest you check out the code and play around with the thing, maybe you'll understand better what's it all for. :)

4006255
I don't think writing the basic version would take too long. Parsing is extremely easy due to cl-ppcre and I just found bknr.datastore for persistence. The last time I asked about graphical user interfaces in Common Lisp I was pointed to the browser, so that seems to be quite popular, too. Well, the interpreter doesn't really need an interface right now and that's the part I'm most interested in.

The idea of a custom delimiter is clever, but I'm not sure it really fits the problem domain.

It's actually not mine, I've got it from Let Over Lambda (Doug Hoyte) and he's got it from Perl, if I remember that right.
Regarding the problem domain: This is a string processing language, in a way. The best known of those is LaTeX. LaTeX is horrible exactly because it doesn't delimit strings and thus needs a whole slew of escaping characters. I'm sure LaTeX code would be easier to write and read and also shorter if it had string delimiters.

I'm not doing this because it would take quite a long time to make it work, but the moment where it could become popular is really in the past.

Yeah, that's probably true. Still a good exercise for me.

Maybe these should be tweets! I'd certainly follow and RT.

The dominant religion among ponies is stereotheism.

At least up until the end of Season 3, when they switched to SurroundSound. :trollestia:

4007290

Tweets are way too transient, they get forgotten in hours. :)

4002995
Rarity Transubstantiates

4295864

...but into what? :)

4295869 She has the essence of divinity, but the accidents of an ordinary marshmallow.

4295923

A very rarefied marshmallow, you mean. :)

Max Factor is a valid pony name. He’s a scientist, not a stylist.

As I've seen in some other 'fic whose name escapes me at the moment, so is "Cloud Strife"
4004403
The Look command should not, generally, take time. It often makes for interface problems. But that would be very Pinkie, yeah…

What, we're not proclaiming Pinkie as a Malbolge writer? Access to an oracle would make it substantially easier to program in, after all… :pinkiecrazy:

4307443

As I’ve seen in some other ’fic whose name escapes me at the moment, so is “Cloud Strife”

I actually went so far as to acquire a large list of modern US first and last names and filter out those which are dictionary words, in an effort to produce a generator of hybrid pony-human names – that is, names which would sound normal, if a bit nonsensical, for ponies, but be normal human names at the same time. I’m not exactly done with this generator, but one of my favorite results is “Melody Fryer.” :)

The Look command should not, generally, take time. It often makes for interface problems. But that would be very Pinkie, yeah…

Considering the telnet protocol, there are always microseconds involved…

What, we’re not proclaiming Pinkie as a Malbolge writer? Access to an oracle would make it substantially easier to program in, after all… :pinkiecrazy:

Malbolge is a deliberately obtuse language nobody actually used to produce something practical. MUSHCode was and remains a practically applied language that also happens to be crazy. I think this distinction is quite important here, Pinkie isn’t crazy for the sake of crazy, she’s crazy because it’s funny. :)

4307458
I ancipate you Thinking about Canon with Pinkie at some point, especially for her appearances in the wrong sides of mirrors, obvious teleportation and space-mangling effects, outspeeding Dashie, inventing a flying machine, ability to defy gravity (slides up slide), tails-mode-flight…

…the fanon Eldritch-Horror Pinkie may have been in mind when I suggested Malbolge.

But I meant that the look command should not consume game-time, though obviously that's not a thing that'll work as well in a MUSH as in 1P IF.

Login or register to comment
Join our Patreon to remove these adverts!