mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-20 07:00:58 +00:00
1 line
1.5 KiB
JSON
1 line
1.5 KiB
JSON
[{"user_id": 32737, "stars": [], "topic_id": 36481, "date_created": 1306177867.0987351, "message": "readline reads a single line from an input port, but readlines reads the entire input and returns a list, where each element is a single line. Well, the input port is now exhausted, nothing else in it, right? So, should readlines automatically close it for you?\n\nOn the other hand, let's say some hypothetical future version of readlines returns say... an iterator rather than a list. Now it can't close it, or it would only be able to read one line. So I'm kinda leaning toward no.", "group_id": 9739, "id": 1155906}, {"user_id": 32737, "stars": [], "topic_id": 36481, "date_created": 1306179087.6501551, "message": "(actually, I was able to trigger it with this: (repeat 5 (do (dirall) nil)) so it didn't even take that long)", "group_id": 9739, "id": 1156192}, {"user_id": 25438, "stars": [], "topic_id": 36481, "date_created": 1306179569.9820881, "message": "It does sounds like having the current version of readlines (which does in fact read all lines) close the input port could be a good idea.", "group_id": 9739, "id": 1156271}, {"user_id": 32737, "stars": [], "topic_id": 36481, "date_created": 1306179001.6654351, "message": "Okay, I'm gonna go with \"no\" for now. Instead, I put in a w/pipe-from macro that automatically closes the pipe-from. That fixes a bug where calling dirall (probably dir too) would eventually cause the OS's file descriptor limit to be reached.", "group_id": 9739, "id": 1156181}] |