A non-compressing print function

Printing just about any sequence of data has become a pain ever since the (x2) was added.

The problem
I’m trying to print a table so it can be easily copied and pasted into a module.
Now it happens that some rows are identical, then the stupid x2, x3 gets added. As a result, instead of simply copying it, I’ll have to do manual editing to make sure my table is correct.

Example:

local t = {
{0,1,0},
{0,0,0},
{0,0,0},
}

becomes

local t = {
{0,1,0},
{0,0,0}, (x2)
}

I suggest a new print function that never compress your prints. Making sure that what you send to print actually gets printed.

Very fundamental feature both for beginners aswell as experts!

16 Likes

Also, this:

local s = "hi\nhi"
print(s)

should print this:

hi
hi

and not this (but it currently does):

hi (x2)

Seperate lines within a string should not get compressed even if they repeat themselves, only repeating strings from seperate prints should have this behavior.

9 Likes

But it doesnt. That will do an x2 aswell.

I was about to suggest that as a workaround.

Yeah, I can’t think of a reason anyone would want compression within a single print() call. Notably print compression appears to work only at a per line level; this doesn’t compress, and probably should:

for i = 1, 3 do print("Hello\nWorld") end

Compression should be changed to be per-message.

@Flostrus was suggesting an additional change, not stating current behaviour.

3 Likes

Oh lol, saw that now :stuck_out_tongue:

1 Like

This is a serious annoyance for me, please please add!

1 Like

Preferably not a function, but rather a studio setting for the output. :ok_hand:

9 Likes

I agree with @Locard that this should be a setting in studio, rather than a function. Also, my apologies for the necrobump. This is just a really good post I agree we need.

(x2) doesn’t stop severe crippling lag or an error message from cluttering up the output, so why should there be a point in keeping it enabled?

3 Likes

System.out.println(“This should be a setting in Studio and not a function”);

1 Like