« first day (3763 days earlier)      last day (1264 days later) » 

7:08 AM
Did anyone notice when you type something wrong screen suddenly changes to white or whatever colors ? What feature is that? Or maybe its not feature at all?
 
 
7 hours later…
2:08 PM
 
nwp
2:48 PM
It turns out the [tag attribute=value] syntax is awkward with setting variables like in [var set=x=5].
Maybe I can fix it through creatively naming the tags and attributes. [var x=5] is an option. Maybe [var x] to read it and [var x++] to increment could be possible if I give up on the original syntax idea.
Or maybe I can add an implicit unnamed attribute that collects values that don't have one explicitly set.
 
not familiar with the syntax in question; what's the problem with [var set=x=5] ?
is it the double use of equals?
 
nwp
Yes. It makes it look weird in my opinion.
Ideally the syntax would be x=5, but one needs to disambiguate between setting variables and just having text.
JS does it with format strings, kinda, except they are more for reading variables than setting them.
I'm kinda implicitly adding a third mode in which variables are expanded which is not intended.
Let's hope nobody will ever need to write functions or want references.
Or maybe the key is to not mess with that and just let people write JS directly.
 
3:07 PM
Could you use a different symbol for the 2 different flavors of assignment?
 
nwp
I thought about that too. Maybe make it [tag attribute:value] and then [var set:x=5] already looks less bad.
 
I meant something like [var set≡x=5]
Or what ever you like in place of ≡
 
nwp
Yeah, a :. Something that's on the keyboard.
Or maybe I should not force it into the syntax and use something like {x=5} and {x}.
 
oh, I got it then - use a series of different whitespace symbols! Like [space][tab] for one & [tab][space] for the other!
Both are on the keyboard, easy to type!
As an added bonus, anything you think up will be better than that!
 
nwp
You should become a professional motivator.
 
3:13 PM
Yes.
My business model is the first seminar is free & for a very reasonable payment plan, I promise not to come back & 'help' anymore.
 
nwp
It feels weird that {x} expands to a value while {x=5} doesn't.
 
user92578
expression always expands to the assigned value but {x=5;} does not
 
user92578
That's the matlab way
 
user92578
unless i have no idea what we are talking about
 
nwp
It's an option. I'm not sure how writer-friendly that is.
Then again I don't think I actually need to make this syntax pretty. It will rarely come up. Maybe once in a while with You have [money] gold coins., but that's very rare. Most of the time it will be about selecting text based on conditions.
 
3:21 PM
That's a good observation - shoot for center of mass. If the solution handles the majority of the cases w/out making the minority impossible to solve, it's probably good enough.
 
nwp
I also foolishly used regex for parsing. I should have known better.
I wonder if the language will end up turing-complete.
And some nerds port Minecraft to the CYOA engine.
[print x] and [set x=5] are probably good enough. [set x=x+1] should also be enough, x++ isn't needed.
What is needed is some sort of limiter function. `You lift the boulder. [set
str=str+1 condition=str<10]` might be a little unwieldy and deserve a shortcut. The variable is mentioned 3 times.
[increase var=x condition=x<10 amount=1]
It looks way longer than it should.
[x<10?++] would be regex-like and we all love regex for being perfectly readable.
I should have paid attention in compiler class. Let's hope my vague idea of a recursive descent parser is good enough.
Maybe I should just use ANTLR.
 
3:51 PM
please tell me [x < 10 ? ++] works
also, that notation is too compact. you're going to end up with a very hard-to-read language.
 
nwp
Well, currently there is no support for variables at all.
And yes, it's really difficult to read, write and learn.
Especially since the target audience is writers and not programmers.
 
:o
:)
 
user92578
We gotta start codegolfing in your story language
 
hahahahahah
 
nwp
4:33 PM
ANTLR is complicated. I'm not sure if it's less complicated than writing a parser, especially since it involves installing software and generating code which goes away from just opening an HTML file in a browser.
 
nwp
4:46 PM
> Why program by hand in five days what you can spend twenty-five years of your
life automating?
 
hahahahaha
 
nwp
That's from the ANTLR guy, apparently.
 
nwp
5:22 PM
I don't know. It's complicated. Maybe I can afford the hand-written parse for a bit longer and think that the language is simple enough that it's fine.
I'll do the simple tags and provide a [js] and [html] tag for people who want more.
 
 
6 hours later…
11:04 PM
Here's my current rabbit hole:
Because I was too stubborn to change my card game design assignment for my students (or pay for/teach them all to use Tabletop Simulator), I'm making an app where they can build their card games online and play them remotely.
I do not make good life choices.
 
11:55 PM
ooof
 

« first day (3763 days earlier)      last day (1264 days later) »