<< 03-03-2026 >>

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:47nmzfor 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:40Amun-Raecho always print additional new line
07:14:09Amun-Ralooks like the last line is whitespace only
07:15:02Amun-Raprints*
07:15:22Amun-Racheck 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:24nmzWithout 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:53nmzand AFAICS all of the readline functions discard the delimiter
15:03:32nmzdoing 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:21FromDiscord<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:04nmzthe problem isn't the echo, its reimplementing the sed command above
16:36:17FromDiscord<aintea> In reply to @nmz "for line in file.lines:": can you try to fill your file with `echo -n "content"` ?
16:36:32FromDiscord<aintea> My guess is that you get a newline because of your editor adding one
16:36:53FromDiscord<aintea> vim does that, VSCode did last time I used it
16:38:00nmzhuh?
16:38:29FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=icGQeqtP
16:38:48FromDiscord<aintea> Just to make sure I understand your problem well
16:40:52nmzI 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:15FromDiscord<aintea> Oh I see
16:41:29FromDiscord<aintea> So then what do you have issues with trying to reproduce a sed command
16:42:20nmzAYe
19:27:43FromDiscord<cobaltdsc4102> sent a code paste, see https://play.nim-lang.org/#pasty=GpqVTzAH
19:27:52FromDiscord<cobaltdsc4102> (edit) "https://play.nim-lang.org/#pasty=RFSNUFAT" => "https://play.nim-lang.org/#pasty=qhrzpHYV"
19:28:02FromDiscord<cobaltdsc4102> Both compiled with `-d:release -d:strip --opt:speed`
19:28:14FromDiscord<cobaltdsc4102> (edit) "https://play.nim-lang.org/#pasty=OkdHRBne" => "https://play.nim-lang.org/#pasty=ujATNYLJ"
19:29:08FromDiscord<cobaltdsc4102> `nim c` using Clang has similar performance to nlvm, wonder why it's that much slower than gcc
19:32:15Amun-RaI don't see clang timing
19:44:50FromDiscord<cobaltdsc4102> sent a code paste, see https://play.nim-lang.org/#pasty=ONyAcuIc
19:51:30Amun-Raweird, are you sure that's not a debug build?
20:25:21*zodman quit (Quit: WeeChat 4.8.1)
20:26:11*zodman joined #nim