mal-lang / mal-simulator

Apache License 2.0
2 stars 1 forks source link

Factor out debug tables #61

Closed mrkickling closed 2 months ago

mrkickling commented 2 months ago
andrewbwm commented 2 months ago

Looks good, I suspect you're already working on this, but I'll add it as a reminder just in case. We should also rework the string formatting so that it uses c-type printing instead of the format() str method.

mrkickling commented 2 months ago

Yes, and I actually postponed it at this time (#62) because it feels too messy to do it while we refactor other stuff in malsim.

andrewbwm commented 2 months ago

Yes, and I actually postponed it at this time (#62) because it feels too messy to do it while we refactor other stuff in malsim.

Yes, I saw that, and that makes sense, but you should have the ones specifically used with format_table match the preferred type.

mrkickling commented 2 months ago

I looked into it, but since headers are strings and not the values, it becomes problematic. Also "%-5d %-80s %-6d %-5d %-5d %-5s %-5d %s\n" is not more readable than the alternative .. maybe for the table creation using the .format is not actually that bad?

andrewbwm commented 2 months ago

I looked into it, but since headers are strings and not the values, it becomes problematic. Also "%-5d %-80s %-6d %-5d %-5d %-5s %-5d %s\n" is not more readable than the alternative .. maybe for the table creation using the .format is not actually that bad?

Ok, we can leave it as a separate issue an look into it when we fix the entire logging.

mrkickling commented 2 months ago

Then I will merge if that is alright for you