00:03:41leorizekinkinkijkin: https://github.com/nim-lang/Nim/commit/9079517d71a010e38a700870abf0703165e08b8b
00:03:48leorizelooks like it's not even released yet
00:45:10*find0x90 quit (Quit: find0x90)
00:46:44kinkinkijkinhttps://dpaste.de/39NG this code doesn't seem to create a working named pipe, any idea why?
00:47:19kinkinkijkinoh forgot something in the uploading
00:48:00kinkinkijkinhttps://dpaste.de/uOvo this is what the code is
00:48:10kinkinkijkinsorry I'm copying these between laptop and desktop
00:50:32leorizekinkinkijkin: that's not how you use startProcess()
00:51:08kinkinkijkinhow is it used?
00:51:50leorizeyou would want startProcess("mkfifo", ["/tmp/knsess"], {poUsePath})
00:51:59leorizesee https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption] for more details
00:54:36leorizekinkinkijkin: actually, for your use case, execCmd would be a better alternative
00:54:44kinkinkijkingot (string, array[0..0, string], set[ProcessOption]) but expeced one of etc etc
00:55:31leorizesorry, it's startProcess("mkfifo", args = ["/tmp/knsess"], options = {poUsePath})
00:55:59leorizeif you wanted to use execCmd, its execCmd("mkfifo /tmp/knsess")
00:56:10leorizeagain, reading osproc documentation would help
01:12:08*arnetheduck quit (Ping timeout: 276 seconds)
01:19:29kinkinkijkinwhat is "TArg"? I can't find it in the documentation
01:20:34*noonien quit (Quit: Connection closed for inactivity)
01:21:37leorizekinkinkijkin: if you're asking about procs in the thread module, they are just generics
01:22:06leorizesimiliar to `proc name[T]`
01:22:19leorizeJust that T here is TArg, no functional changes
01:23:38kinkinkijkinso how would I initialize a thread of execShellCmd with an argument of getEnv("SHELL")?
01:32:53leorizekinkinkijkin: something like this: https://pastebin.com/zjEKWVJm
01:37:36kinkinkijkinugh, I got a gcc error
01:38:23kinkinkijkinsomething about __ATOMIC_RELAXED undeclared (first use in this function)
01:38:46kinkinkijkinusing nim 0.16.whatever is provided in openbsd's okg
01:39:25leorizekinkinkijkin: https://github.com/nim-lang/Nim/issues/4046
01:40:32kinkinkijkinjesus why is openbsd using such an old version of gcc
01:43:42leorizekinkinkijkin: I think it's due to some licensing issues, IIRC that's also why FreeBSD stuck w gcc 4.2
01:44:14kinkinkijkinI see
01:49:11*MJCaley quit (Quit: MJCaley)
01:58:55*arnetheduck joined #nim
01:59:48*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:17:09*arnetheduck quit (Ping timeout: 264 seconds)
02:29:15*arnetheduck joined #nim
02:36:31*leorize quit (Ping timeout: 268 seconds)
02:58:05*S1t1Schu joined #nim
03:01:30*S1tiSchu quit (Ping timeout: 246 seconds)
03:02:08*dddddd quit (Remote host closed the connection)
03:02:13*vlad1777d_ quit (Quit: Leaving)
03:15:57*arnetheduck quit (Ping timeout: 264 seconds)
03:30:39*DarkArctic_ joined #nim
03:34:34*DarkArctic quit (Ping timeout: 264 seconds)
04:03:36*gangstacat quit (Ping timeout: 256 seconds)
04:04:02*gangstacat joined #nim
04:11:45*DarkArctic_ quit (Ping timeout: 248 seconds)
04:14:08*DarkArctic joined #nim
04:16:40*mal`` quit (Quit: Leaving)
04:17:35*endragor joined #nim
04:21:49*mal`` joined #nim
04:36:34*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
04:37:42*cyraxjoe joined #nim
05:15:46*arnetheduck joined #nim
05:30:42*arnetheduck quit (Remote host closed the connection)
05:50:56*nsf joined #nim
06:03:50*kinkinkijkin quit (Read error: Connection reset by peer)
06:04:42*kinkinkijkin joined #nim
06:10:06*arnetheduck joined #nim
07:15:45*Vladar joined #nim
07:19:21*yglukhov quit (Ping timeout: 240 seconds)
07:21:14*xkapastel quit (Quit: Connection closed for inactivity)
07:24:33*yglukhov joined #nim
07:29:54*gokr joined #nim
07:51:50FromGitter<mratsim> don’t they also propose clang on BSD?
07:59:16*jaco60 joined #nim
08:02:29*rokups joined #nim
08:15:22*PMunch joined #nim
08:25:28FromGitter<mratsim> @alehander42 for loopfusion I’m trying to implement for-expression. Did you compare the performance profile between lambda and template for zero_functional? When I look at the C code of the following, it seems like the lambda won’t be inlined: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ab4b9f87685a046389cf040]
08:28:34FromGitter<mratsim> Not sure if GCC/Clang inlines the N_CLOSURE calls even if they are called only once
08:38:38*gokr left #nim (#nim)
08:39:33*floppydh_ joined #nim
08:45:01*sendell joined #nim
08:57:39FromGitter<alehander42> @mratsim I benchmarked zero_functional foreach 1) generating an anon proc 2) generating a template and they seemed equal on speed under all flags
09:17:43FromGitter<mratsim> cool, thanks
09:29:05*Ven`` joined #nim
09:37:56FromGitter<alehander42> Araq: can one hint that a custom tag leads to side effects, so when a function is marked with it, it can't be noSideEffects ?
09:39:07FromGitter<alehander42> I inherit from RootEffect: is there SideEffect that I can inherit from to hint that
09:45:57Araqimpossible, sorry :-)
09:51:56*MJCaley joined #nim
09:52:33*floppydh_ quit (Quit: WeeChat 2.0.1)
09:57:46*yglukhov quit (Read error: Connection reset by peer)
09:58:20*yglukhov joined #nim
10:02:20*MJCaley quit (Quit: MJCaley)
10:03:12FromGitter<alehander42> hmmmm
10:03:19FromGitter<alehander42> no
10:03:21*brainproxy quit (Ping timeout: 264 seconds)
10:04:46FromGitter<narimiran> i'm reading https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement and i'm still confused when should i use `{.inline.}` or `{.closure.}`, and/or which to prefer....
10:23:23FromGitter<alehander42> ok Araq: I almost made this work with a custom type and pragma: I define my own SideEffect, and a noSideEffectTag macro that checks the pragma tags for inheritance of SideEffect. the only problem is I can't really add a `noSideEffect` pragma for my macro and run the type checking again
10:24:27FromGitter<alehander42> If I produce a new untyped node from my typed node with noSideEffect pragma, for some reason it isn't checked?
10:31:44Araqit should be checked
10:35:24FromGitter<alehander42> ok, probably I am doing something weird: https://gist.github.com/alehander42/6603b972dd485ac1d9304002b2da6de8
10:35:46*r3d9u11 joined #nim
10:35:58FromGitter<alehander42> I also had to replace sym with ident, because otherwise I get unresolved symbol errors
10:36:09FromGitter<alehander42> no generated name*
10:37:46r3d9u11Does method Channel.send copy data (object, array, etc...)?
10:40:16r3d9u11>sends a message to a thread. msg is deeply copied
10:41:58*brainproxy joined #nim
10:46:50FromGitter<mratsim> channel copies yes, multithreading with shared data structure is hard. (locking, mutexes, atomics, or things like OpenMP).
10:53:12FromGitter<alehander42> https://gist.github.com/alehander42/8698c15fe8bc5a6cb11fc88d12a1a6b3
10:53:14FromGitter<alehander42> ok @Araq I have another version which uses only untyped macros ^
10:53:21FromGitter<alehander42> and it seems to work for all cases
10:53:35FromGitter<alehander42> but it needs this additional sideEffect <Name> macro
10:53:47FromGitter<alehander42> and it uses a static global set of names which I am not sure is nice
10:55:15FromGitter<alehander42> (I know string == isn't the best possible check, but I'd usually use just a handful of tags in a project, with probably unique names)
11:02:37*Snircle joined #nim
11:02:40PMunchalehander42, maybe an enum would be better?
11:06:48FromGitter<alehander42> I don't think I can use one, because the user might define new effects after I've checked previous ones
11:07:15FromGitter<alehander42> and all this checks happen on compile time anyway, so I don't think it's possible to "generate" enum that I can use in the same time
11:07:31*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:08:20*aziz joined #nim
11:14:51*brainproxy quit (Ping timeout: 240 seconds)
11:20:39*brainproxy joined #nim
11:42:25FromGitter<alehander42> @Araq is there a switch which enables the `func` <=> `{.noSideEffect.}` thing?
11:43:02Araqno, you need to patch the compiler
11:43:30FromGitter<alehander42> ah, I see, is it in the roadmap for 0.19?
11:47:51*jaco60 quit (Ping timeout: 240 seconds)
11:50:51*athenot quit (Ping timeout: 240 seconds)
11:53:21*brainproxy quit (Ping timeout: 240 seconds)
11:55:49*brainproxy joined #nim
12:00:59Yardanico@zacharycarter about case statements - https://github.com/nim-lang/Nim/pull/6954
12:01:06*r3d9u11 quit (Remote host closed the connection)
12:04:00*r3d9u11 joined #nim
12:08:45*r3d9u11 quit (Ping timeout: 264 seconds)
12:11:48*floppydh quit (Remote host closed the connection)
12:12:37*floppydh joined #nim
12:22:23PMunchShould func also have gcSafe?
12:22:51PMunchFunctions don't typically take any other input than what they are given
12:26:31*noonien joined #nim
12:26:40*yglukhov quit (Read error: Connection reset by peer)
12:26:43*leorize joined #nim
12:27:13*yglukhov joined #nim
12:28:21*brainproxy quit (Ping timeout: 240 seconds)
12:34:32PMunchSo making them GC safe (unable to use globals) would help this
12:35:05*brainproxy joined #nim
12:41:34*nsf quit (Quit: WeeChat 2.0.1)
12:42:09FromGitter<narimiran> PMunch: that would be a nice addition, IMO!
12:50:53Araq.noSideEffect implies .gcsafe
12:51:09PMunchOh it does? Nice
12:52:48FromGitter<alehander42> but it doesn't imply `.tags: []`, right? or does it imply it and one can override it?
12:54:04Araqno, .tags are independent
12:56:23*Ven`` joined #nim
12:57:20*DarkArctic quit (Quit: Leaving)
12:57:38*DarkArctic joined #nim
13:07:51*brainproxy quit (Ping timeout: 240 seconds)
13:13:04*SenasOzys_ quit (Read error: Connection reset by peer)
13:13:27*SenasOzys joined #nim
13:19:02*brainproxy joined #nim
13:22:56*athenot joined #nim
13:23:06FromGitter<zacharycarter> -d:useRealtimeGC always seems to cause this error for me on OSX - /Users/zachcarter/projects/nim-wasm/nimcache/stdlib_system.c:15:10: fatal error: 'mach/mach.h' file not found ⏎ ⏎ #include <mach/mach.h>
13:23:47FromGitter<zacharycarter> whenever I'm compiling code with emscripten
13:24:32PMunchSomeone mis-spelled math.h?
13:24:56PMunchOr is mach.h something emscripten related?
13:26:26FromGitter<zacharycarter> I think maybe it's an osx specific header? I'm not sure
13:27:42FromGitter<zacharycarter> https://developer.apple.com/library/content/documentation/Darwin/Conceptual/KernelProgramming/Mach/Mach.html
13:32:12FromGitter<mratsim> mach is the name of macOS kernel
13:34:47*mjanssen joined #nim
13:36:47FromGitter<zacharycarter> would anyone else with a mac be willing to try to reproduce?
13:36:55FromGitter<zacharycarter> I can give you a simple config / and Nim source file to test with
13:37:00FromGitter<zacharycarter> all you'd need to do is install emsdk
13:44:54FromGitter<zacharycarter> guessing it has something to do with - https://github.com/nim-lang/Nim/blob/3e33668abc496e0b45183804b9b2d70963869a6a/lib/system/timers.nim#L35-L64
13:45:43*dddddd joined #nim
13:51:57*brainproxy quit (Ping timeout: 240 seconds)
13:52:19FromGitter<zacharycarter> so I guess - clock_gettime(CLOCK_MONOTONIC) - should probably be used for emscripten instead
13:52:58FromGitter<zacharycarter> but emscripten isn't an official compiler flag so :shrug:
13:54:41FromGitter<zacharycarter> Araq / dom96?
13:55:01dom96I guess emscripten doesn't support that?
13:55:46FromGitter<zacharycarter> dom96: I don't think so - I think emscripten should be using - clock_gettime(CLOCK_MONOTONIC)
13:56:27FromGitter<zacharycarter> https://github.com/floooh/sokol/blob/master/sokol_time.h#L54
13:57:20dom96does Nim even have special conditionals for emscripten in its stdlib?
13:58:01FromGitter<zacharycarter> nope
13:58:04FromGitter<zacharycarter> not to my knowledge
13:58:34FromGitter<zacharycarter> but this is definitely problematic for people that want to use Nim for WASM on osx
13:59:57FromGitter<abijahm> yesterday i had a problem with asynchttpserver ,thanks to @dom96 this is how i solved it ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ i think this method of sending chuncks can be used to solve (large file issue)[https://github.com/nim-lang/Nim/issues/5589] [https://gitter.im/nim-lang/Nim?at=5ab5085dbb1018b37a18bb36]
14:00:39*brainproxy joined #nim
14:02:21FromGitter<zacharycarter> dom96: I think it makes sense for the stdlib lib to have emscripten flags - after all, it is a legitimate compiler
14:03:40*endragor quit (Remote host closed the connection)
14:04:07*endragor joined #nim
14:05:07dom96abijahm: so what was it that fixed it?
14:06:43FromGitter<zacharycarter> dom96: modifying two conditionals in system/timers.nim to have checks for emscripten fixes the issue FYI
14:06:47FromGitter<zacharycarter> just tested locally
14:09:02*endragor quit (Ping timeout: 268 seconds)
14:11:21*wavemode joined #nim
14:12:46*SenasOzys quit (Ping timeout: 256 seconds)
14:14:54*floppydh_ joined #nim
14:16:35*cspar_ joined #nim
14:17:17*SenasOzys joined #nim
14:18:34FromGitter<abijahm> @dom96 removing the flags,yesterday i was not handling the exception properly
14:19:34*cspar quit (Ping timeout: 256 seconds)
14:29:51*endragor joined #nim
14:33:42*brainproxy quit (Ping timeout: 268 seconds)
14:34:53*endragor quit (Ping timeout: 276 seconds)
14:35:31*brainproxy joined #nim
14:45:51*smt quit (Read error: Connection reset by peer)
15:06:34*gokr joined #nim
15:06:41FromGitter<alehander42> can I somehow produce ints for enums of variant objects with json `to`
15:06:43FromGitter<alehander42> ?
15:07:19FromGitter<alehander42> currently I always get strings, which is useless, when I reinterpret them as variants (in the js backend)
15:08:17*brainproxy quit (Ping timeout: 248 seconds)
15:09:42FromGitter<alehander42> ok, I can patch `%`*(o: enum) in json.nim, sorry
15:09:54FromGitter<alehander42> still, what would be a good way to make that configurable?
15:13:11FromGitter<alehander42> maybe `to` can accept some options?
15:13:46*brainproxy joined #nim
15:16:13*aziz quit (Remote host closed the connection)
15:20:42*jjido joined #nim
15:25:24*miran joined #nim
15:27:20*WhiskeyNick joined #nim
15:33:26*GitDisc joined #nim
15:33:32*GitDisc quit (Remote host closed the connection)
15:34:27*FromDiscord joined #nim
15:37:02*xkapastel joined #nim
15:39:25*Zevv joined #nim
15:47:09*brainproxy quit (Ping timeout: 264 seconds)
15:52:43*brainproxy joined #nim
15:59:48*PMunch quit (Quit: Leaving)
16:00:21*jjido quit (Read error: Connection reset by peer)
16:07:34*JacobEdelman quit (Quit: Ping timeout (120 seconds))
16:07:52*jjido joined #nim
16:07:55*JacobEdelman joined #nim
16:08:23*sendell quit (Ping timeout: 276 seconds)
16:10:28*nsf joined #nim
16:15:23*r2 joined #nim