Tips for golfing in Wierd

6

What tips do you have for golfing in Wierd? Tips for golfing other languages don't seem to help one golf Wierd programs so I'm looking for ideas that can be applied to code golf problems that are specific to Weird - especially if it helps me reduce the size of this answer at "Hello, World!"

Jerry Jeremiah

Posted 2016-11-29T23:58:46.203

Reputation: 1 217

I've never heard of this language and it looks very... interesting. I don't have much to add except I'll be looking at making my own Hello, World! program soon and coming up with some tips :) – Teal pelican – 2016-11-30T09:35:51.663

@Tealpelican my two favourites are Weird and /// – Jerry Jeremiah – 2016-11-30T10:49:06.447

1Currently mine is ><>, I've been able to come up with 'He' in wierd atm but it's not the easiest language to figure out aha. – Teal pelican – 2016-11-30T12:31:02.323

@Tealpelican What it needs is a good editor that lets you clip rectangular pieces and rotate and flip them before reinserting them. – Jerry Jeremiah – 2016-11-30T18:13:27.520

My primary advice for golfing in Wierd is: don't. :P Kidding aside, I'm impressed by your determination to improve your score in this ridiculously unwieldy and not entirely well specified language. :)

– Martin Ender – 2016-11-30T19:24:46.467

@MartinEnder Thanks for the link - now I need to try to make a ZT program smaller than the one in the spec... – Jerry Jeremiah – 2016-12-01T05:07:27.753

@MartinEnder I have added a ZT answer to the Hello World question. It is smaller than the example Hello World but probably not the smallest... – Jerry Jeremiah – 2017-07-20T04:33:30.360

Answers

1

Don't forget about self modifying code

As Dennis showed in https://codegolf.stackexchange.com/a/142785/24812 a loop can be much shorter than a linear program and that there are clever ways to exit the loop. The spec makes it clear that a 90 degree angle allows you to choose one of two different directions at runtime. Dennis showed that you could modify the program at runtime - with amazing results.

Jerry Jeremiah

Posted 2016-11-29T23:58:46.203

Reputation: 1 217