Files
2012-02-21 01:15:00 -05:00

1 line
4.6 KiB
JSON

[{"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306094304.1110439, "message": "They should be in the todo. I'm imagining that they perhaps could be implemented in Arc these days, but if you'd like to implement it feel free to do it in whichever way would be easiest.", "group_id": 9739, "id": 1143693}, {"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306094585.718014, "message": "You might find https://github.com/awwx/evalto/blob/master/run-program.arc useful as a model. It calls process* to run an external command, and captures the stdout and stderr of the process.", "group_id": 9739, "id": 1143729}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306094133.1808031, "message": "Shouldn't ar have them? I can go add them in. I need pipe-from for a shell script of mine, but I was curious if there was a reason they weren't added (and not in the todo either).", "group_id": 9739, "id": 1143684}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306094400.4809151, "message": "Yeah, I'm gonna try to implement it in arc.arc, using racket- stuff if needed. Ideally it would use a better process than Arc/pg, which creates a temporary file to pipe the data to... I figure there's probably a Racket thing I can use, like `process`", "group_id": 9739, "id": 1143701}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306100372.854183, "message": "pipe-from is on my fork now: https://github.com/Pauan/ar/blob/master/arc.arc#L1338\n\nDoes it look alright? It seems to work okay, from the small tests I did (calling (pipe-from \"ls -l\") for instance)", "group_id": 9739, "id": 1144384}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306101345.1781709, "message": "Oh, right, good idea.", "group_id": 9739, "id": 1144559}, {"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306101417.054997, "message": "/because then when the subprocess/", "group_id": 9739, "id": 1144573}, {"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306101390.521209, "message": "You also asked if you needed to close the subprocess's input port. It's a good idea, because then it the subprocess tries to read from its stdin, it will get an eof right way. Otherwise it will hang waiting for something to appear on its stdin, and then at some random time in the future the port will be garbage collected and then it will finally see the eof.", "group_id": 9739, "id": 1144570}, {"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306101283.041755, "message": "You might want to have the subprocess's stderr be Arc's stderr. I think that closing the subprocess stderr means that if it tries to write to stderr it will get an error, and in any case it means that we won't see any of the stderr output.", "group_id": 9739, "id": 1144545}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306101493.8975351, "message": "Alright then, thanks.", "group_id": 9739, "id": 1144594}, {"user_id": 25438, "stars": [], "topic_id": 36345, "date_created": 1306165072.1524141, "message": "By the way, I'm not seeing pipe-from being used anywhere in Arc 3.1. So it's good to have a version we can use for our scripts, but we don't have to worry about making it backwards compatible with Arc 3.1 (if it matters).", "group_id": 9739, "id": 1153959}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306165407.08446, "message": "My view on backwards compat is that ar by default should not be terribly picky about it. If something is a good idea, we should totally do it in ar, even if it breaks backwards compat. Then we can have a library that smooths over the differences, like \"arc3.1/backcompat.arc\"\n\nSo we can then get the best of both worlds. Scripts written for ar can be better, because ar isn't as worried about backwards compat, but we can still load libraries that were written for Arc/pg.", "group_id": 9739, "id": 1153997}, {"user_id": 32737, "stars": [], "topic_id": 36345, "date_created": 1306165274.0459881, "message": "Oh, I'm not terribly worried about backwards compat, seeing as how I'm renaming things like acons and no, and also considering changing the argument signature of things like assoc, so it's consistent with alref. :P\n\nNo, the reason I wanted pipe-from is because my playlist script uses it. To be more specific, it calls \"find\" to obtain a list of all the files (recursively) in the current directory. Basically, it does this:\n\n(readlines:pipe-from \"find -not -path \\\"*/.*\\\" -type f\")\n\nVoila, now I have a list of files. Nice and easy.", "group_id": 9739, "id": 1153983}]