Posts Tagged "MiniScript"

Math-Assignment Operators in MiniScript?

Joe Strout —

Most people who discover MiniScript are delighted at its design and feature set. It covers all the important functionality — things like true lists and maps, functions as first-class objects, and object-oriented programming — while still being minimal and clean, small enough to document in a single page.

But there is one omission that is sometimes a source of complaints: MiniScript, as of now, does not have math-assignment operators like += and -=.

read full post

Retained vs. Immediate Mode Graphics

Joe Strout —

A Mini Micro user today asked me to explain why it was designed with sprites that are retained between frames, instead of having users explicitly draw them on each frame. This is an insightful question! It's the difference between retained mode and immediate mode graphics.

read full post

MiniScript CGI Programming

Joe Strout —

The Common Gateway Interface, or CGI, remains a valid and simple way to create dynamic web pages and services. MiniScript is an excellent choice for creating CGI scripts. In this post, we'll go over how to set up your web environment and get started making your own CGI scripts, along with some simple examples.

read full post

Advanced Tricks with Import

Joe Strout —

The import function is not a standard part of the MiniScript language, but it is a feature common to many MiniScript environments, including Mini Micro, Farmtronics, command-line MiniScript, and Soda. In this post, we review how import works, and describe some techniques for advanced users.

read full post

String Fill and Match

Joe Strout —

Version 1.1 of Mini Micro included a couple of very useful additions to the stringUtil module. If you aren't already using the new fill and match methods, you probably should be!

read full post

Debugging with a Validate Method

Joe Strout —

I was live streaming a coding session today, wrapping up a Tetris clone in Mini Micro. All was going swimmingly until suddenly we noticed a bug: after clearing a line, subsequent pieces would sometimes stop before hitting anything. Upon closer inspection, we noticed that the higher-up lines, after moving down to fill the cleared row, often had blocks in the wrong place.

What ensued was an abnormally long debugging session. I tried confessional debugging; I tried walking through the code; I tried checking my assumptions by having the code print out what it was doing. After 20 minutes of this I was still stumped. In desperation, I reached for a tool I should have brought out much faster: the validate method.

read full post

VT100 Escape Codes in Command-Line MiniScript

Joe Strout —

MiniScript is most commonly used either in the Mini Micro virtual computer, or embedded within some other game or application. However it is also available on the command line. A command-line MiniScript user asked me the other day: is there a way to clear the terminal window from code?

The answer is, yes and no. There is no built-in API for it, but in most cases, it can be done with an ancient set of tricks known as VT100 escape codes.

read full post

Why MiniScript?

Joe Strout —

As more and more people discover MiniScript, the question is occasionally asked: why? Why was MiniScript created, and why should someone use it rather than some other language?

It's a perfectly valid question, so in this post I will try to clarify. My purpose is not to convince anyone of anything, but to explain why, after years of using other scripting languages, I felt compelled to create something new. I'll do this without attacking other languages, since every language has its fans and I don't want to kick anybody's dog; instead I'll focus on what I think is really cool about MiniScript, and how it offers a collection of advantages that, taken together, can't be found anywhere else.

read full post

MiniScript Goes Open-Source

Joe Strout —

MiniScript has been available as a Unity plugin since 2017. But it has been such a success with its users that it deserved wider distribution. MiniScript in Unreal games, MiniScript on the command line, MiniScript in your browser... why not? And while it was great to get a little financial support for working on MiniScript in the early days, in the long run keeping it commercial only slows down its adoption. That's why, as of today, MiniScript is open-source.

read full post
 

All blog posts