Actually executing Hack code doesn't necessarily typecheck everything. You need to actually run a separate tool to enforce the type system, as described in the docs article linked here. When you do that, you'll get an error that looks something like this, depending on the exact version of HHVM you have:
File "shapes.php", line 10, characters 19-23:
Invalid argument (Typing[4110])
File "shapes.php", line 3, characters 41-43:
This is an int
File "shapes.php", line 10, characters 42-76:
It is incompatible with a string
Modern versions of HHVM will also yell at you if you aren't running the typechecker; I suspect you're running an older version, before we realized this was a point of confusion -- sorry!
What actually happens when you run type-incorrect code is undefined behavior. The answer by Ed Cottrell is correct for the current version of HHVM -- we do the same thing PHP does to coerce types -- but keep in mind it's undefined behavior and may change in future versions without notice.
Answer from Josh Watzman on Stack OverflowActually executing Hack code doesn't necessarily typecheck everything. You need to actually run a separate tool to enforce the type system, as described in the docs article linked here. When you do that, you'll get an error that looks something like this, depending on the exact version of HHVM you have:
File "shapes.php", line 10, characters 19-23:
Invalid argument (Typing[4110])
File "shapes.php", line 3, characters 41-43:
This is an int
File "shapes.php", line 10, characters 42-76:
It is incompatible with a string
Modern versions of HHVM will also yell at you if you aren't running the typechecker; I suspect you're running an older version, before we realized this was a point of confusion -- sorry!
What actually happens when you run type-incorrect code is undefined behavior. The answer by Ed Cottrell is correct for the current version of HHVM -- we do the same thing PHP does to coerce types -- but keep in mind it's undefined behavior and may change in future versions without notice.
The interpreter will try to evaluate the 'y' key as a number to do the calculation.
Example:
echo 4 * '6';
// prints 24
echo 4 * '6foo';
// prints 24
echo 'foo' * 42;
// prints 0, because floatval('foo') === 0
Your situation is like the third example. floatval('this should cause an fatal error?') === 0, so the calculation is:
b['x'] +
b['y'] === 3 * 4 + 0 * 4 === 12
'Hack' or library or tool that lets you create shapes that you can copy on the rM2
How to print a shape in Python? - Stack Overflow
Printing Unique Shapes
is there a hack to make perfect lines and triangles etc.
Videos
Hello, I need to print this specific shape on a piece of paper to put on a restaurant beeper. How can I print this shape without having to inaccurately cut it out a piece of paper with a pair of scissors? Can I do it on my own or are there any kind of places that do this? Thanks
I distinctly recall seeing something like that but couldn't find it again when I searched: I want to make things like check boxes, check marks and other little symbols that I can copy and paste in my documents. If you manually make a PNG or PDF, those things are not copyable, but there was a tool that would let you make documents with shapes that you could copy, just as if you'd written/drawn them yourself. Anyone got a name or link for me ?
Wondering if Kinkos, Staples, Office Depot, Vistaprint, etc. and all other local and online print retailers can primt and cut unique shapes? Looking to print this type of design: https://polkadotpaper.com/wp-content/uploads/2023/04/ERIN-menu-mock2.jpg
I find it frustrating that I can't draw perfect lines and shapes on the Remarkable. Is there a way to automate the process to help me achieve more precise lines and shapes on the Remarkable tablet, perhaps through a hack or third-party tool?
You should really ask the print shop about how to set up your file. They should be able to send you a template of the punch form used and give you some guidance.
That said, a PDF can only ever be rectangular.
My guess would be that the print shop needs a file where the irregular shape touches the sides of the rectangle. The bleed is added all around the irregular shape.
Some examples:

The yellow area is your design, the cyan stroke is the document bounds and the magenta stroke is where the final print is punched.
What Wolff said is correct. Also, brochures like this cost extra typically where I'm from, because of its unique form.
When you set up a print file, there should be three main lines:
- die line: where the paper will be cut giving you the final shape and size
- safe line (safe zone): usually .125 inches within the die line. Make sure your art does not surpass this line or it may be too close to the edge and risk getting cut off
- bleed line: usually .125 inches outside of the die line. Make sure art that you want going to the edges actually reaches the bleed line, not just the die line.
Lastly, make sure the printer does not print your lines!! Set your line layers to "Template" (double click layer for this option) or label the layer as "Do not print." You can also state to not print those lines. However, if the printer sends you the die line, they may have all these layers set up appropriately already.
