2 ms·
What is that even supposed to do? I tend to use lpeg for any complex string manipulation. gsub has bitten me once or twice by not thinking through whether some
by samatman 6y ago
What is that even supposed to do?
I tend to use lpeg for any complex string manipulation. gsub has bitten me once or twice by not thinking through whether something is a pattern nor not, sure.
- samatman 6y agoBut, no: I meant that after the fiftieth time I had to modify every call site of a Python function because I realized I needed to return a tuple rather than a scalar sometimes, I came to really appreciate multiple return values.
- lifthrasiir 6y agoIf that's the only real reason why do you keep using dynamic languages after all?
- lifthrasiir 6y ago> What is that even supposed to do? In some sort of deploy scripts, converting a command "template" into the actual command by replacing a fixed string "<arguments>" into the escaped arguments (I know, this is not sufficient but also not the exact code, I've simplified it for the easier inspection). Now guess what's the problem without looking at the manual. Also, don't say "use lpeg". Unless Lua supports a proper package system for every circumstance it's not a solution. Note that this deploy script runs in an embedded context, so no to luarocks and kins.