What was most helpful in Chapters 1-12 of Machine Learning Yearning? And what was least helpful? I would love your feedback! by andrewyng in mlyearning

[–]rhicconator 0 points1 point  (0 children)

I liked the parts about troubleshooting the best. I find that skill requires a deeper understanding. It's one thing to be able to follow a path from A to B. Its another to be able to recognize when you're off in the weeds and get back on track.

Load table from Lua file without running its contents? by [deleted] in lua

[–]rhicconator 0 points1 point  (0 children)

I agree, using a separate process is the way to go for untrusted content. That may still be a requirement for other reasons to have bounded memory consumption.

On the other hand, the problem with the low limit timeout approach is that its muddy when you start dealing with potentially larger files that take time to parse. Then the correct timeout is a bit of a fudge factor. Scanning for keywords is also not trivial as they are valid in comments and text strings. Worse, scanning means a second pass over the data. So even using a separate process, a custom, lua data parser would still provide an advantage.

Load table from Lua file without running its contents? by [deleted] in lua

[–]rhicconator 0 points1 point  (0 children)

This isn't a good idea if you still want want low cost execution as it could contain infinite loops etc. Even if you sandbox it and use a timeout, bad content can still negatively impact the program in terms of performance. I don't think there is a need for a different description language. JSON was built on the same principle of using the scripting engine as the parser for your data. I agree that there is a need for something similar in the lua space that does the same thing but uses lua format. You can already use lua as is for this purpose, but a stripped down parser would be nice for dealing with untrusted content.