| 00:00:27 | * | gabreal quit (Ping timeout: 246 seconds) |
| 00:02:57 | * | gabreal_ quit (Client Quit) |
| 00:03:16 | * | gabreal joined #nim |
| 02:10:26 | * | rockcavera quit (Remote host closed the connection) |
| 02:59:37 | * | nmz joined #nim |
| 03:23:47 | nmz | for line in file.lines: echo line, prints an extra line, whats a way to not get that extra '\n' at EOF? |
| 03:33:39 | * | gabreal quit (Remote host closed the connection) |
| 03:34:00 | * | gabreal joined #nim |
| 03:41:00 | * | gabreal quit (Ping timeout: 245 seconds) |
| 04:07:30 | * | Goodbye_Vincent1 quit (Ping timeout: 256 seconds) |
| 04:31:54 | * | gabreal joined #nim |
| 04:36:00 | * | gabreal quit (Ping timeout: 245 seconds) |
| 05:17:02 | * | Goodbye_Vincent1 joined #nim |
| 06:43:08 | * | mrinsane quit (Ping timeout: 268 seconds) |
| 07:13:40 | Amun-Ra | echo always print additional new line |
| 07:14:09 | Amun-Ra | looks like the last line is whitespace only |
| 07:15:02 | Amun-Ra | prints* |
| 07:15:22 | Amun-Ra | check write in std/syncio |
| 10:01:13 | * | ftajhii quit (Ping timeout: 265 seconds) |
| 10:56:52 | * | SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev) |
| 11:03:00 | * | SchweinDeBurg joined #nim |
| 11:39:51 | * | Mister_Magister_ joined #nim |
| 11:40:31 | * | SchweinDeBurg quit (Ping timeout: 264 seconds) |
| 11:41:07 | * | Mister_Magister quit (Ping timeout: 264 seconds) |
| 11:42:13 | * | SchweinDeBurg joined #nim |
| 11:42:56 | * | Mister_Magister_ is now known as Mister_Magister |
| 14:08:27 | * | beholders_eye joined #nim |
| 14:59:24 | nmz | Without any of the functions returning the delimiter as well it can't be done easily, you'd have to read everything by hand |
| 15:00:53 | nmz | and AFAICS all of the readline functions discard the delimiter |
| 15:03:32 | nmz | doing a simple sedlike call like echo hi | sed 's/^/ /' is not possible, plus you're adding an extra newline in everything, yikes. |
| 15:58:34 | * | mrinsane joined #nim |
| 16:01:21 | FromDiscord | <aintea> for shell echo you have `echo -n` availible to print without a newline or `printf`↵↵In Nim 2, you might want to look at `stdout.write` |
| 16:35:04 | nmz | the problem isn't the echo, its reimplementing the sed command above |
| 16:36:17 | FromDiscord | <aintea> In reply to @nmz "for line in file.lines:": can you try to fill your file with `echo -n "content"` ? |
| 16:36:32 | FromDiscord | <aintea> My guess is that you get a newline because of your editor adding one |
| 16:36:53 | FromDiscord | <aintea> vim does that, VSCode did last time I used it |
| 16:38:00 | nmz | huh? |
| 16:38:29 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=icGQeqtP |
| 16:38:48 | FromDiscord | <aintea> Just to make sure I understand your problem well |
| 16:40:52 | nmz | I may not have been clear, The program should behave the same as { sed 's/^/ /' }, therefore { echo hello | nimprogram } and { printf hello | nimprogram } should behave exactly as replacing nimprogram with sed |
| 16:41:15 | FromDiscord | <aintea> Oh I see |
| 16:41:29 | FromDiscord | <aintea> So then what do you have issues with trying to reproduce a sed command |
| 16:42:20 | nmz | AYe |