00:08:13 | * | krux02 quit (Ping timeout: 245 seconds) |
00:21:38 | * | krux02 joined #nim |
00:22:15 | disruptek | we should treeshake our own symbols at least. |
00:23:07 | shashlick | ok what now |
00:23:27 | disruptek | async cycles driving me batty. |
00:25:33 | rayman22201 | proc `=destroy`*[T](fut: var DisposableFuture[T]) = is giving me Error: signature for '=destroy' must be proc[T: object](x: var T) |
00:25:34 | rayman22201 | wat |
00:25:51 | rayman22201 | what am I doing wrong here? |
00:26:00 | disruptek | [T] != DisposableFuture[T] |
00:26:05 | * | FromGitter quit (Read error: Connection reset by peer) |
00:26:24 | * | FromGitter joined #nim |
00:26:33 | rayman22201 | ok, so how do I write it? |
00:26:55 | disruptek | `=destroy`[T](fut: var T) = |
00:27:28 | * | FromGitter quit (Remote host closed the connection) |
00:27:46 | * | FromGitter joined #nim |
00:27:47 | disruptek | i don't want to compile procs that can never be called. |
00:27:50 | rayman22201 | that doesn't make sense. How can Nim know it must be a Disposable future? |
00:27:55 | disruptek | kinda old-fashioned that way. |
00:28:15 | disruptek | `=destroy`[T: DisposableFuture] ... |
00:28:41 | rayman22201 | nope. that doesn't work either |
00:28:51 | rayman22201 | proc `=destroy`*[T:DisposableFuture](fut: var T) = |
00:28:57 | disruptek | my dog is cute and he's not a tiny dog, but his breath is worse than any tiny dog i've known. |
00:29:18 | rayman22201 | cool story |
00:29:23 | * | FromGitter quit (Read error: Connection reset by peer) |
00:29:27 | disruptek | it's ridiculous. |
00:29:29 | * | abm quit (Quit: Leaving) |
00:29:33 | disruptek | i can't take it anymore. |
00:29:42 | * | FromGitter joined #nim |
00:30:20 | * | EvergreenTree quit (Quit: The Lounge - https://thelounge.chat) |
00:30:22 | rayman22201 | must take serious action. dog mints to the rescue |
00:30:39 | disruptek | i think i'm being punished. |
00:30:50 | FromDiscord | <Clyybber> no pig-ears :( |
00:30:58 | * | EvergreenTree joined #nim |
00:32:30 | rayman22201 | tests disagree with you on syntax disruptek: https://github.com/nim-lang/Nim/blob/12d2b980e833c4747dea497add60f4e934cac512/tests/destructor/tdestructor3.nim#L66 |
00:33:14 | rayman22201 | and yet every form I try fails to compile, so wtf |
00:33:23 | FromGitter | <dumjyl> is it a `ref`? |
00:34:43 | * | icebattl1 quit (Ping timeout: 260 seconds) |
00:35:02 | rayman22201 | why does that matter? |
00:35:20 | rayman22201 | the error is: Error: signature for '=destroy' must be proc[T: object](x: var T) |
00:35:52 | * | FromGitter quit (Remote host closed the connection) |
00:35:53 | rayman22201 | it is a ref though |
00:36:10 | * | FromGitter joined #nim |
00:36:11 | rayman22201 | a ref type |
00:36:56 | FromGitter | <dumjyl> `=destroy` is for object and distinct only, try `typeof(default(DisposableFuture[T])[])` |
00:37:07 | rayman22201 | I see |
00:37:44 | rayman22201 | that error message is terrible... |
00:37:56 | rayman22201 | thanks dumjyl |
00:38:36 | * | voltist joined #nim |
00:53:32 | * | donpdonp left #nim ("WeeChat 2.6") |
01:02:46 | rayman22201 | good news. using DisposableFuture causes the Nim compiler to immediately recognize the cycle lol |
01:02:51 | rayman22201 | https://www.irccloud.com/pastebin/IWKVmrAb/ |
01:03:13 | rayman22201 | so, what is the syntax for .cursor? |
01:15:17 | rayman22201 | it's a pragma on fields |
01:15:45 | rayman22201 | now I have to untangle the Callback list bs in asyncfutures again to find out where to put the cursor pragma. fun.... |
01:16:35 | * | dddddd quit (Read error: Connection reset by peer) |
01:22:51 | * | lritter quit (Ping timeout: 265 seconds) |
01:23:14 | * | lritter joined #nim |
01:26:31 | rayman22201 | ughh. I nead weak assign to make this work I think |
01:26:55 | rayman22201 | bbl |
01:40:43 | * | krux02 quit (Remote host closed the connection) |
02:15:48 | * | dcmertens joined #nim |
02:21:38 | * | dcmertens quit (Ping timeout: 240 seconds) |
02:38:55 | FromDiscord | <Skaruts> What's a quick way to pass a ref object by value into another one? (as in `a = b`) |
02:40:49 | * | treeform joined #nim |
02:46:43 | * | lritter quit (Quit: Leaving) |
02:52:12 | * | jholland__ quit (Quit: Connection closed for inactivity) |
03:00:52 | FromDiscord | <Skaruts> I tried dereferencing it but then I don't know if it can be re-referenced. `addr()` returns a `ptr`... |
03:04:51 | disruptek | i love looking at old code. |
03:04:59 | disruptek | that was generated by nim. just brilliant. |
03:07:49 | disruptek | i'm not good at it, but i really enjoy it. |
03:07:58 | disruptek | programming, that is. |
03:10:32 | * | endragor joined #nim |
03:24:48 | disruptek | yeah, weak assign, it feels like a bit of a cop-out this early. |
03:25:11 | disruptek | or maybe you just know something i don't. 😁 |
03:31:28 | disruptek | i really should think more about the customer when i write software. |
03:31:53 | disruptek | just jump here at any time. |
03:34:02 | disruptek | ima put a compile-time warning in this code that reminds the developer that they need an environmental variable set to use the api. but only if that variable is unset at compile-time. |
03:34:13 | disruptek | that's my good deed for the day. |
03:34:33 | disruptek | for every amazon api. |
03:53:52 | FromDiscord | <Rika> Am I delusional or is disruptek speaking to himself |
03:56:35 | Yardanico | uhh, I probably forgot, how can I get a string representation of code passed to a template as untyped? |
03:56:52 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:57:48 | disruptek | use a macro and echo foo.treeRepr? |
03:58:39 | * | muffindrake joined #nim |
03:58:40 | Yardanico | ah, nvm, astToStr |
03:58:50 | Yardanico | disruptek: thanks but astToStr works for me :) |
03:59:00 | Yardanico | surprisingly I found the answer here xdd https://stackoverflow.com/questions/31565006/how-to-get-string-representation-of-an-expr-in-nim-template |
04:00:36 | disruptek | oh, right. i forget what i use to do this but it isn't either of those. now i wonder if i'm doing it right. |
04:11:08 | * | Jjp137 quit (Ping timeout: 260 seconds) |
04:11:52 | * | Jjp137 joined #nim |
04:23:38 | * | rockcavera quit (Remote host closed the connection) |
04:32:26 | * | ptdel joined #nim |
04:35:18 | * | martinium joined #nim |
04:40:31 | disruptek | i figured out how golden works. |
04:40:57 | Yardanico | but golden is your project, isn't it? |
04:41:02 | Yardanico | 0_0 |
04:41:05 | disruptek | oh shit. |
04:41:17 | disruptek | there's a macro that wraps your main loop of your app. |
04:41:22 | Yardanico | are you trying to impersonate real disruptek ?! |
04:42:08 | disruptek | it listens for input, like in the env. you can hook into this to prevent the main loop and instead run other code. |
04:42:25 | disruptek | the beauty of it is that the code you run is baked into the binary you run. |
04:42:39 | disruptek | so we don't have to solve the question of which-is-which. |
04:43:15 | disruptek | we'll know what compiler you used to build it because we'll have looked at that info at compile-time. |
04:43:44 | disruptek | the "other code" you might run? instrumentation. |
04:43:56 | disruptek | but it runs in your process, automatically. |
04:43:58 | Yardanico | so can golden be used for simple microbenchmarking? |
04:44:09 | Yardanico | running some proc 10 million times and calculating mean time and stuff like that |
04:44:13 | Yardanico | like criterion or nimbench |
04:44:27 | disruptek | i was gonna embed criterion into it and then have golden just consume criterion for what it calls "stages". |
04:44:42 | disruptek | i think i'm maintaining criterion now, if you have any patches. |
04:45:02 | disruptek | yeah, so we'll do that with criterion most likely. |
04:45:31 | disruptek | but i think this is very much the right way to build this product. |
04:45:46 | disruptek | build it right into the release. |
04:46:19 | disruptek | one define elides it entirely from the ast. |
04:47:05 | Yardanico | btw I'm surprised nimbench stull works |
04:47:08 | Yardanico | last commit 4 years ago lol |
04:47:16 | disruptek | i should check that out. |
04:47:26 | Yardanico | it even uses "strfmt" (string formatting when strformat didn't exist) |
04:48:10 | disruptek | when i saw that name, i was sure i'd worked with someone with that same moniker. |
04:48:21 | disruptek | i think i'm thinking of raph koster, though. |
04:49:19 | disruptek | we support the best of these tools. |
04:49:23 | disruptek | why not? |
04:49:32 | disruptek | everything and everyone. |
04:50:10 | disruptek | so, yeah, we'll get someone to do a gui for us and then you'll be able to do live introspection of your program. |
04:50:30 | disruptek | imgui with memory alloc activity, we can monitor threads, the gc, etc. |
04:53:14 | disruptek | i used to use services for instrumentation but i have no idea what's current now. what are people using? what's the hot sexy one i should look at? |
04:56:22 | disruptek | maybe we bake the repl into the gui. why not? |
04:56:38 | disruptek | you can hcr into your code with a gui. why not? |
04:58:03 | disruptek | because we don't have scoped imports. 😭 |
05:00:33 | * | nsf joined #nim |
05:02:51 | Tanger | Any good generic Factory libraries for tests out in the wild? |
05:04:53 | disruptek | Factory libraries? |
05:05:13 | disruptek | you mean like predicates? |
05:05:23 | disruptek | like "missing" or "is" or whatever? |
05:05:52 | Tanger | Like type factories for testing etc. Closest parallel I can think of is Python' https://factoryboy.readthedocs.io/en/latest/ |
05:05:59 | Tanger | *Python's Factory boy |
05:06:57 | disruptek | i get it. |
05:07:02 | disruptek | that's a cool idea. |
05:07:08 | disruptek | i wonder why i never came across it before. |
05:19:57 | * | silvernode joined #nim |
05:20:25 | * | silvernode quit (Client Quit) |
05:51:33 | * | narimiran joined #nim |
06:01:43 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:26:26 | * | ptdel quit (Remote host closed the connection) |
06:26:40 | FromGitter | <Varriount> Tanger: Unfortunately that's an area where Nim needs some love - mocks and testing |
06:28:13 | FromGitter | <Varriount> All the machinery is there - you can overload `.` to capture attribute access, do things with term rewriting macros, etc. |
06:43:34 | * | treeform quit (Remote host closed the connection) |
06:44:20 | Tanger | Varriount: Yeah, I've been diving into macros for the first time in the last couple of weeks and I can already see how one would go about doing it |
06:44:30 | Tanger | Didn't realize you could overload `.` though :o |
06:44:56 | Tanger | Any examples of that implemented in a meaningful way |
06:44:58 | Tanger | ? |
06:48:54 | * | actuallybatman joined #nim |
07:01:54 | Tanger | Nevermind, found the experimental part of the docs |
07:02:26 | * | marmotini_ joined #nim |
07:06:56 | * | marmotini_ quit (Remote host closed the connection) |
07:16:49 | Tanger | Hmmm, what am I doing wrong? I would have thought that this would hit the `.` template: https://play.nim-lang.org/#ix=27Cv |
07:18:06 | * | EvergreenTree quit (*.net *.split) |
07:18:06 | * | ljoonal quit (*.net *.split) |
07:18:06 | * | shadowbane quit (*.net *.split) |
07:18:06 | * | euantor quit (*.net *.split) |
07:18:07 | * | Araq quit (*.net *.split) |
07:18:08 | * | Ekho quit (*.net *.split) |
07:19:14 | * | shadowbane joined #nim |
07:22:13 | FromGitter | <gogolxdong> https://github.com/microsoft/verona/blob/master/docs/faq.md |
07:24:21 | * | Ekho- joined #nim |
07:27:08 | * | solitudesf joined #nim |
07:27:33 | * | marmotini_ joined #nim |
07:32:47 | * | marmotini_ quit (Ping timeout: 272 seconds) |
07:36:15 | leorize | Tanger: note that native access trumps these templates |
07:42:30 | * | PMunch joined #nim |
07:43:50 | Tanger | Ah |
07:43:56 | Tanger | Aaaah |
07:57:39 | * | voltist quit (Remote host closed the connection) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:05:03 | * | gmpreussner joined #nim |
08:05:50 | * | EvergreenTree joined #nim |
08:05:50 | * | ljoonal joined #nim |
08:05:50 | * | euantor joined #nim |
08:05:50 | * | Araq joined #nim |
08:16:49 | * | oculux quit (Ping timeout: 258 seconds) |
08:18:01 | * | JustASlacker joined #nim |
08:19:15 | Araq | narimiran, does 1.0.6 contain the fixes to distros.nim? |
08:20:50 | FromDiscord | <Rika> Tanger: https://nim-lang.github.io/Nim/manual_experimental.html#special-operators-dot-operators |
08:20:50 | * | actuallybatman quit (Ping timeout: 240 seconds) |
08:21:48 | narimiran | Araq: it doesn't, neither the NixOS one, nor `uname -a` one |
08:21:50 | FromDiscord | <Rika> oh, i didnt read far back enough |
08:22:10 | Araq | why not? didn't I use the [backport] tag? |
08:22:25 | narimiran | nope :) |
08:24:26 | Araq | well damn |
08:24:45 | Araq | it's kinda showstopper bug it doesn't even work for Ubuntu |
08:25:01 | narimiran | i'll backport it, no problem |
08:25:15 | Araq | ok thanks |
08:25:29 | narimiran | it's not like we released 1.0.6 yet, it is still 1.0.5 |
08:25:53 | Araq | see also https://github.com/nim-lang/Nim/pull/13172 distros.nim was a super bad idea |
08:25:56 | disbot | ➥ Fix OS detection in a docker container ; snippet at 12https://play.nim-lang.org/#ix=27CP |
08:26:30 | Araq | it's lots of work just to get better nimble integration with the OS's package manager |
08:36:06 | * | floppydh joined #nim |
08:46:06 | * | natrys joined #nim |
09:00:04 | FromDiscord | <Rika> hey Yardanico are you here? |
09:00:24 | FromDiscord | <Rika> do you know why handlers in discordnim are pointers instead of proc() types? |
09:00:56 | * | ofelas quit (Quit: shutdown -h now) |
09:03:21 | * | JustASlacker quit (Ping timeout: 272 seconds) |
09:15:26 | * | JustASlacker joined #nim |
09:17:25 | * | ng0 quit (Quit: leaving) |
09:28:14 | * | ng0 joined #nim |
09:28:14 | * | ng0 quit (Changing host) |
09:28:14 | * | ng0 joined #nim |
09:35:25 | Araq | Nim is written in itself once again, https://github.com/nim-lang/Nim/pull/13170 |
09:35:26 | disbot | ➥ make case-object transitions explicit, make unknownLineInfo a const, … |
09:36:07 | Araq | in other words, the Nim compiler itself adheres to version 1.0 of the language |
09:37:54 | PMunch | Hooray! |
09:39:42 | Araq | it was easier than I thought it would be because somebody else did the hard work. |
09:52:07 | * | JustASlacker quit (Ping timeout: 272 seconds) |
10:09:37 | * | drewr quit (Ping timeout: 260 seconds) |
10:10:58 | PMunch | Always easier when someone else does it :) |
10:11:31 | * | silvernode joined #nim |
10:14:55 | * | natrys quit (Ping timeout: 272 seconds) |
10:29:17 | * | dddddd joined #nim |
10:38:10 | * | nsf quit (Quit: WeeChat 2.7) |
10:48:07 | silvernode | Good morning |
10:48:14 | silvernode | It's my night off |
10:48:24 | silvernode | Anything interesting going on? |
10:49:27 | Araq | always |
10:49:57 | Araq | somebody ported the Nim compiler itself over to Nim version 1.0 |
10:53:46 | * | natrys joined #nim |
10:56:31 | Zevv | what version did it run on before then? |
10:58:07 | narimiran | 0.19 or whatever was the version that had `nimOldCaseObjects` by default |
11:00:20 | Araq | didn't we change that only for version 1? |
11:00:41 | Araq | I mean 0.20 had the old case objects and 1.0 got the new ones? I probably misremember |
11:04:07 | * | krux02 joined #nim |
11:10:25 | * | krux02_ joined #nim |
11:29:10 | * | silvernode quit (Remote host closed the connection) |
11:37:49 | FromDiscord | <Clyybber> morning |
11:38:07 | FromDiscord | <Clyybber> Araq: Did you see https://github.com/nim-lang/Nim/pull/13180 ? |
11:38:08 | disbot | ➥ Fix docs for subdirs too |
11:38:15 | FromDiscord | <Clyybber> I fixed the docs for subdirs too |
11:38:30 | FromDiscord | <Clyybber> But the tests fail on windows since it uses backslash in the path |
11:39:07 | * | krux02_ quit (Remote host closed the connection) |
11:39:58 | * | krux02_ joined #nim |
11:45:12 | * | floppydh quit (Quit: WeeChat 2.7) |
11:47:10 | * | floppydh joined #nim |
12:01:22 | * | xet7 joined #nim |
12:08:29 | FromGitter | <zacharycarter> are concepts still usable / working? I have some old code that used them but I'm getting an error now: |
12:09:03 | FromGitter | <zacharycarter> `cannot instantiate: 'path[Spaceship, tuple[x, y: int], float]'` when I try to call a method where Spaceship is supposed to satisfy the concept |
12:10:38 | FromGitter | <zacharycarter> I tried using the `{.explain.}` pragma but I don't notice any additional output |
12:15:01 | FromGitter | <zacharycarter> I'll just rewrite it without concepts |
12:16:44 | * | marmotini_ joined #nim |
12:27:13 | FromDiscord | <mratsim> concepts do work |
12:27:26 | FromDiscord | <mratsim> I use them in several places in Weave |
12:32:06 | * | rockcavera joined #nim |
12:35:53 | FromDiscord | <Rika> concepts do work yes |
12:45:53 | * | jken quit (Disconnected by services) |
12:46:25 | * | jken_ joined #nim |
12:46:46 | FromGitter | <zacharycarter> hmm |
12:46:57 | FromGitter | <zacharycarter> okay thanks - must be something else then |
12:50:23 | * | nsf joined #nim |
12:59:31 | * | krux02 quit (Quit: Leaving) |
13:04:03 | FromGitter | <alehander92> can you give an example |
13:06:10 | * | logand joined #nim |
13:06:18 | logand | hi, i am trying to understand union types. what does the error in https://0x0.st/zhCI.nim mean? how should the code look like for nim to compile this? |
13:06:55 | logand | the error mesage is rec.nim(12, 31) Error: attempting to call routine: 'Tree' found 'rec.Tree [declared in rec.nim(3, 3)]' of kind 'type' |
13:06:58 | FromDiscord | <Rika> use "Tree(k: INT, i: x)" not = |
13:07:43 | logand | i see |
13:10:23 | logand | after fixing that, i get https://0x0.st/zFrZ.nim with error in https://0x0.st/zFrT.txt |
13:10:53 | FromDiscord | <Clyybber> Araq: Can we merge https://github.com/nim-lang/Nim/pull/13180 ? |
13:10:54 | disbot | ➥ Fix docs for subdirs too |
13:11:12 | * | Hideki_ joined #nim |
13:11:17 | logand | i suppose it is trying to convert Tree to string but I don't see why should that happen |
13:11:18 | FromDiscord | <Rika> logand, you dont have a `$` proc defined |
13:11:24 | FromDiscord | <Rika> that's needed for echo |
13:11:30 | FromDiscord | <Rika> or stdout write |
13:11:35 | logand | hmm but I use write |
13:11:57 | logand | at which point is echo used? |
13:11:57 | FromDiscord | <Rika> if you want python like printing then use stdout.write tree(42).repr |
13:12:07 | FromDiscord | <Rika> stdout.write needs it too |
13:12:36 | FromDiscord | <Rika> the signature for write prolly looks like (s: varargs[string, `$`]) or so |
13:12:47 | logand | ok, i though that "stdout.write tree 42" would call my write method |
13:12:49 | FromDiscord | <Rika> which means it does an implicit call to `$` |
13:12:59 | FromDiscord | <Rika> huh you have that |
13:13:00 | FromDiscord | <Rika> odd wait |
13:13:06 | FromDiscord | <Rika> i dont think stdout is a File |
13:13:17 | logand | ok i should not use write but a different name wich doesn't clash |
13:13:48 | FromDiscord | <Clyybber> logand: If you have a write method defined appropriately it should use it |
13:14:00 | FromDiscord | <Clyybber> But its better to define your own $ |
13:14:05 | logand | yeah i probably dont |
13:14:20 | FromDiscord | <Rika> hmm, stdout is a File yeah |
13:14:44 | FromDiscord | <Rika> oh oh |
13:14:48 | FromDiscord | <Rika> check line 29 |
13:15:00 | FromDiscord | <Rika> `f.write i` where i is a Tree |
13:15:09 | FromDiscord | <Rika> huh |
13:15:18 | FromDiscord | <Rika> im still kinda confused |
13:15:21 | FromDiscord | <Rika> that should work |
13:15:28 | logand | that's intentional, it is a recursive structure after all |
13:15:51 | FromDiscord | <Rika> yeah i think you should move from write to `$` |
13:16:00 | logand | i'll try that |
13:16:03 | FromDiscord | <Rika> (aka, what if someone called echo tree 42) |
13:16:25 | * | endragor quit (Remote host closed the connection) |
13:17:02 | logand | renaming write to mywrite works |
13:17:09 | FromDiscord | <Rika> interesting |
13:17:15 | FromDiscord | <Rika> weird proc resolution |
13:17:17 | FromDiscord | <Clyybber> hmm, that is weird |
13:17:19 | logand | so it was somehow clashing with the built-in write |
13:18:27 | logand | i did not want to define $ because if the tree is huge, it should not be converted to a string but simply serialized to the file. |
13:18:44 | logand | maybe i should not be concerned about it at the beginning |
13:19:32 | FromDiscord | <Rika> you'd have a half written file if the program errors in the middle |
13:19:36 | * | Vladar joined #nim |
13:20:01 | FromDiscord | <Clyybber> hmm, I think this is a bug |
13:20:16 | FromDiscord | <Clyybber> logand: Can you open an issue? |
13:20:18 | logand | well that's life, but at least it would not eat all RAM |
13:20:31 | logand | and other processes could carry on |
13:21:15 | logand | ok, i'll try to open an issue |
13:22:16 | * | abm joined #nim |
13:26:11 | logand | in a lot of nim examples, i see lots of conversions to string and string appending. in other languages, such string operations are usually expensive. does nim do something clever with strings so that these operations are reasonably efficient? |
13:29:47 | Zevv | there is no string copy done |
13:29:56 | Zevv | nim resizes the buffer and adds in-place |
13:30:32 | logand | ok thanks for clarification |
13:30:51 | logand | i suppose that is true for c cpp and objc backends |
13:30:57 | logand | but not for js backend |
13:31:45 | logand | how can i message people FromDiscord? |
13:32:04 | logand | Clyybber: hi |
13:32:12 | logand | hmm that did not work |
13:33:28 | FromDiscord | <Rika> uh |
13:33:30 | FromDiscord | <Rika> you cant |
13:33:47 | FromDiscord | <Rika> @Clyybber logand wants to talk to you |
13:34:13 | logand | no thats ok, i was just asking how it works |
13:34:39 | * | ng0 quit (Quit: leaving) |
13:35:07 | Zevv | too late. clyybber will now talk to you. |
13:35:08 | FromDiscord | <Clyybber> logand: Oh, sorry missed your ping 🙂 |
13:35:23 | FromDiscord | <Clyybber> Zevv: i cannot be stopped |
13:35:28 | Zevv | i know, i know |
13:35:45 | * | tane joined #nim |
13:35:54 | FromDiscord | <Clyybber> <talk> |
13:36:08 | FromDiscord | <Rika> clyybber will now commence talking |
13:36:20 | FromDiscord | <Clyybber> <talk> |
13:36:25 | * | ng0 joined #nim |
13:36:25 | * | ng0 quit (Changing host) |
13:36:25 | * | ng0 joined #nim |
13:36:26 | FromDiscord | <Clyybber> </talk> |
13:36:38 | FromDiscord | <Clyybber> thank you for listening! |
13:37:08 | narimiran | any of you listens 'talk talk'? |
13:37:42 | FromDiscord | <Rika> Clyybber: you forgot to close the top level talk |
13:37:58 | Zevv | he's not done yet |
13:37:59 | FromDiscord | <Clyybber> narimiran: what does it bother you, It's my Life! |
13:38:01 | * | nsf quit (Quit: WeeChat 2.7) |
13:38:11 | narimiran | ;) |
13:38:26 | FromDiscord | <Clyybber> Rika: Sorry I only understand parsable parser error messages |
13:44:15 | * | floppydh quit (Quit: WeeChat 2.7) |
13:46:20 | logand | Clyybber: issue at https://github.com/nim-lang/Nim/issues/13182 |
13:46:22 | disbot | ➥ write requires conversion to string ; snippet at 12https://play.nim-lang.org/#ix=27DY |
13:46:49 | * | lritter joined #nim |
13:46:56 | FromDiscord | <Clyybber> logand: Nice, thanks! |
13:48:27 | logand | nim playground, nice |
13:55:52 | * | lesshaste quit (Quit: Leaving) |
14:00:26 | PMunch | Yeah it's a nice little tool :) |
14:25:55 | stefantalpalaru | Why is {.importc.} by itself generating a "nimcall" declaration? It should be "cdecl", in order to work on 32-bit Windows. |
14:27:05 | * | uvegbot quit (Ping timeout: 268 seconds) |
14:33:39 | * | zyklon joined #nim |
14:43:14 | * | Vladar quit (Remote host closed the connection) |
14:53:36 | * | PMunch quit (Quit: Leaving) |
14:53:51 | FromDiscord | <mratsim> on windows it's often stdcall though |
14:57:14 | leorize | stefantalpalaru: because you might be importing a nim proc? :p |
14:57:41 | leorize | usually I just annotate it myself with {.cdecl.}, etc. |
15:15:22 | disruptek | time to grow my neckbeard out for fosdem. |
15:15:23 | * | ng0_ joined #nim |
15:15:23 | * | ng0_ quit (Changing host) |
15:15:23 | * | ng0_ joined #nim |
15:16:49 | stefantalpalaru | leorize: why would you import a Nim proc with {.importc.}? |
15:16:55 | disruptek | Jjp137: also, do we want a command to remove deps? and how does it work? |
15:17:37 | stefantalpalaru | mratsim, no, it's nimcall. I saw the stack being corrupted by that. |
15:17:42 | leorize | stefantalpalaru: because you exported it for dynamic library usage? |
15:18:09 | leorize | though it still doesn't make sense that nimcall is the default :p |
15:18:17 | * | ng0 quit (Ping timeout: 272 seconds) |
15:18:23 | leorize | but I don't know if it's too late to change |
15:19:10 | * | luis_ joined #nim |
15:20:55 | Araq | importc is a name import really and the calling convention is orthogonal |
15:20:57 | * | dcmertens joined #nim |
15:21:38 | dcmertens | is there anything in "Nim in Action" that is out of date? Is it still a good book for getting started? |
15:22:50 | leorize | probably the case objects :P |
15:23:01 | leorize | but I never read the book so I don't know if it's even in there |
15:23:07 | Araq | dcmertens, it is ok, most important change is that 'nil' for strings and seqs is gone |
15:34:53 | Araq | how about this: instead of "guessing", make the compiler warn about an 'importc' without a specified calling convention |
15:37:18 | FromDiscord | <Clyybber> Araq: ping |
15:37:23 | disruptek | support 'auto'? |
15:37:37 | dcmertens | Araq, thanks |
15:37:42 | dcmertens | leorize, thanks |
15:45:11 | stefantalpalaru | Araq: warning is fine, warning and defaulting to cdecl is even better. |
15:46:40 | Araq | Clyybber: pong |
15:46:57 | FromDiscord | <Clyybber> Araq: Sup, can we merge https://github.com/nim-lang/Nim/pull/13180 ? |
15:46:58 | disbot | ➥ Fix docs for subdirs too |
15:47:08 | FromDiscord | <Clyybber> Its the continuation of my last fix |
15:47:33 | FromDiscord | <Clyybber> it just adds `../` to the href if the generated html is in a subdir |
15:47:46 | FromDiscord | <Clyybber> *to the href pointing to nimdoc.out.css that is |
15:50:21 | Araq | k merged |
15:51:06 | FromDiscord | <Clyybber> nice |
15:51:37 | lqdev[m] | is there a way of getting the current stack trace inside of a macro on compile time, just like you can do on runtime? |
15:52:22 | lqdev[m] | need to debug where a proc is called in a macro. |
15:52:39 | Araq | system.instantiationInfo |
15:53:01 | Araq | the 'index' parameter |
15:53:27 | Araq | but I never used any other value than the default -1 |
15:54:59 | lqdev[m] | I suppose -1 returns where the topmost macro was called? |
15:58:04 | Araq | dunno, try it out |
15:59:59 | * | luis_ quit (Quit: luis_) |
16:00:24 | * | Vladar joined #nim |
16:03:11 | * | luis_ joined #nim |
16:07:45 | CcxWrk | narimiran: Hi, could you look at https://github.com/nim-lang/Nim/pull/10992 as it's kind of blocking being able to use the async libs for writing simple unix-style utilities? |
16:07:46 | disbot | ➥ selectors.nim: Add define to select event loop implementation |
16:09:03 | * | icebattl1 joined #nim |
16:09:32 | shashlick | is it possible to have asynchttpserver not read the full body automatically and to repond back in chunks? |
16:09:56 | * | NimBot joined #nim |
16:16:38 | * | Hideki_ quit (Remote host closed the connection) |
16:17:26 | * | Hideki_ joined #nim |
16:18:33 | * | marmotini_ quit (Remote host closed the connection) |
16:21:28 | * | ng0_ is now known as ng0 |
16:22:03 | * | Hideki_ quit (Ping timeout: 265 seconds) |
16:23:16 | * | Tungki joined #nim |
16:26:49 | * | endragor joined #nim |
16:27:33 | * | nsf joined #nim |
16:28:19 | * | marmotini_ joined #nim |
16:29:15 | * | luis_ quit (Ping timeout: 240 seconds) |
16:33:08 | * | actuallybatman joined #nim |
16:34:54 | * | leorize quit (Quit: WeeChat 2.6) |
16:38:03 | FromGitter | <Varriount> CcxWrk: How is it blocking? |
16:39:03 | CcxWrk | You can't use async libs with most non-network file descriptors (since epoll inherently doesn't support them). |
16:40:44 | CcxWrk | Epoll is rather bad default for eventloop mechanism, but even worse Nim libraries currently hardcodes it for Linux. |
16:42:55 | Araq | CcxWrk, rebase the PR please and I'll merge it once the tests are green |
16:43:08 | Araq | some documentation and a changelog entry would be nice too |
16:43:52 | FromDiscord | <mratsim> wow the storm is brewing: https://github.com/actix/actix-web |
16:44:30 | CcxWrk | Araq: Okay, I'll try to do that on Monday. |
16:44:57 | FromDiscord | <mratsim> the original Actix is one of Rust largest web framework with 6.3 stars: https://github.com/fafhrd91/actix-web |
16:49:33 | Araq | mratsim: well open source development has its downsides :-) |
16:51:31 | disruptek | don't worry, Araq, everyone loves you. |
16:51:59 | stefantalpalaru | If you can't take the heat, don't play the game.Taking your toys from the playground and leaving in protest is a shit move at any age. |
16:53:04 | * | Trustable joined #nim |
16:54:54 | * | Hideki_ joined #nim |
17:02:19 | FromDiscord | <yewpad> I did read the readme of actix-web but still, it feels kinda like a "douchebag move". There's no place in open source for personal feelings and whatnot, that's my opinion at least. You're not having fun anymore? Get another maintainer on the board, leave it to him, bye bye open source and have fun. |
17:02:21 | FromDiscord | <yewpad> I just don't get it. |
17:02:38 | FromDiscord | <yewpad> Moving the repository alone broke a lot of dependencies I think. |
17:02:52 | disruptek | i agree it's spiteful. |
17:03:41 | FromDiscord | <Clyybber> Its a pity, but I do not think theres no place for personal feelings in open source |
17:03:45 | FromDiscord | <Rika> @mratsim SIX POINT 3 STARS |
17:03:52 | FromDiscord | <mratsim> apparently it's due to his uncompromising focus on performance and he was using unsafe code that had aliasing issue and refused a patch to remove that unsafe code: https://www.reddit.com/r/rust/comments/epoloy/ive_smoketested_rust_http_clients_heres_what_i/feksq2i/ |
17:03:53 | FromDiscord | <Rika> who gave just 0.3 a star? |
17:04:18 | disruptek | i gave 0.1 stars 5 times and -0.1 stars twice. |
17:04:31 | * | Tungki quit (Read error: Connection reset by peer) |
17:04:49 | FromDiscord | <mratsim> @yewpad no dependency broken, when you upload a new version to cargo the whole source tree is snapshotted. In Nim that would break everything though. |
17:04:57 | * | Tungki joined #nim |
17:06:20 | FromDiscord | <yewpad> Hm aight. Thankfully it didn't break anything but imagine like it would. Oof. |
17:06:47 | * | seni joined #nim |
17:06:59 | * | Hideki_ quit (Ping timeout: 268 seconds) |
17:07:50 | FromDiscord | <yewpad> And yes, I also agree on what stefantalpalaru said. If you can't take the heat, don't play the game. There's nothing else to say. |
17:08:09 | FromDiscord | <yewpad> Well, leave it to the Rust community. Here's Nim the main topic. 😅 |
17:08:57 | FromDiscord | <mratsim> Well it's not about Rust or Nim in general but about open-source, maintainers, contributors, users |
17:09:22 | FromDiscord | <mratsim> Thankfully Nim is fundamentally unsafe so there is no "unsafe zealots" (yet) 😉 |
17:09:31 | FromDiscord | <yewpad> 😄 |
17:09:32 | FromDiscord | <Rika> sorry, my english error correction is not good enough to decipher the actix/actix readme thing |
17:09:40 | FromDiscord | <yewpad> xD |
17:14:45 | stefantalpalaru | What's relevant to Nim and its ecosystem is the concept of a social contract applied to open source projects. We all have an implied social responsibility to our users, despite declining any legal responsibility in our licenses. |
17:16:27 | * | logand quit (Ping timeout: 240 seconds) |
17:17:21 | disruptek | nah, when you're user you're a user all the way. |
17:17:30 | disruptek | from your first git clone till your last dyin' day |
17:18:11 | FromDiscord | <mratsim> it's all about managing expectations |
17:18:49 | disruptek | sure, expect peoples to be peoples. |
17:19:59 | FromDiscord | <mratsim> People coming to Rust feel very strongly about unsafe code, it's the whole deal. So using unsafe code is not expected. Where it went wrong is that a PR that fixed the bug triggered the author. (and since it's deleted it's a bit hard to have more context) |
17:20:30 | * | opal quit (Remote host closed the connection) |
17:20:54 | Araq | hey, and I thought I'm such an "unsafe zealot" |
17:21:35 | disruptek | but it's silly to assume that people with agency will not use that agency. |
17:21:43 | * | opal joined #nim |
17:22:00 | Araq | disruptek: can 'nimph' now create tagged releases for me? |
17:22:05 | disruptek | sure. |
17:24:21 | disruptek | well, it creates release tags dated according to when the version arrived in your .nimble file. it doesn't create github releases (which are a separate animal). |
17:25:24 | disruptek | i can't think of any decent reason /not/ to add that, though. |
17:25:25 | * | ptdel joined #nim |
17:26:32 | * | actuallybatman quit (Quit: leaving) |
17:41:24 | Araq | I mean "git tags", not github releases |
17:41:35 | disruptek | yeah, it does the right thing. |
17:47:01 | FromGitter | <Varriount> disruptek: So is `nimph` an alternative to `nimble`? |
17:47:18 | disruptek | it currently relies on nimble for some stuff. |
17:47:57 | * | abm quit (Quit: Leaving) |
17:48:11 | shashlick | Think of nimph as a package manager and nimble as a build tool in that context |
17:48:45 | shashlick | Thinking of adding more functionality to asynchttpserver |
17:49:12 | disruptek | i don't believe the http stuff in stdlib is fixable. |
17:49:37 | shashlick | Alternative is to wrap libevhtp |
17:49:44 | disruptek | the last time i looked at, anyway, i decided that it had to be replaced wholesale due to api reasons. |
17:50:10 | disruptek | wrappers are crutches and i wish they didn't exist in stdlib. |
17:51:57 | FromGitter | <Varriount> disruptek: I'd look at the API Go provides |
17:52:22 | FromGitter | <kaushalmodi> disruptek: Just chiming in to give a pointer to https://github.com/kdheepak/github-release |
17:52:50 | disruptek | neat, but i already have the complete github api impl. |
17:52:57 | shashlick | well, first would be to optionally read the body, second to add procs to write back responses in increments |
17:53:06 | FromGitter | <kaushalmodi> I was just replying to your: ⏎ ⏎ > it doesn't create github releases (which are a separate animal). |
17:53:15 | disruptek | shashlick: there's a stream object you can use. |
17:53:53 | disruptek | yeah, i mean, i will add them. but i will do so using the dependencies i already have. 😉 |
17:54:40 | disruptek | i guess github-release almost replaces bump; just missing the key bump functionality. |
17:55:53 | disruptek | so you want changelogs in the releases? is that a good thing? |
17:56:01 | * | icebattle quit (Quit: leaving) |
17:56:13 | FromGitter | <kaushalmodi> A link would be fine |
17:56:17 | * | icebattl1 quit (Quit: leaving) |
17:56:26 | disruptek | well, github adds a link. |
17:56:32 | shashlick | disruptek: ya but i don't want the server to read everything - if it is a post, it will read files in full |
17:56:34 | disruptek | eg. "14 commits since the last release" |
17:56:42 | * | icebattle joined #nim |
17:56:55 | FromGitter | <kaushalmodi> I used to manually type in these links: https://github.com/OrgTangle/ntangle/releases/tag/v0.6.0 |
17:56:57 | shashlick | https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/asynchttpserver.nim#L241 |
17:56:58 | disruptek | shashlick: yes, we need a new third-party impl. |
17:57:09 | FromGitter | <kaushalmodi> `https://github.com/OrgTangle/ntangle/compare/v0.5.1...v0.6.0` |
17:57:28 | disruptek | but, i think it should be based upon the rfcs, not some other language's idiomatic api. |
17:58:24 | disruptek | oh, you just want links to compare release X with release Y<X? |
17:58:25 | FromGitter | <kaushalmodi> > eg. "14 commits since the last release" ⏎ ⏎ Those links are always `tag...master`. I would think that the user would like to see `prev_tag...this_tag` |
17:58:33 | disruptek | gotcha. that makes a lot of sense. |
17:58:46 | disruptek | let's do that thing. |
17:58:54 | FromGitter | <kaushalmodi> 👍 |
18:01:43 | * | marmotini_ quit (Remote host closed the connection) |
18:02:19 | * | marmotini_ joined #nim |
18:05:22 | * | ng0_ joined #nim |
18:05:22 | * | ng0_ quit (Changing host) |
18:05:22 | * | ng0_ joined #nim |
18:05:41 | * | Tungki quit (Ping timeout: 264 seconds) |
18:07:14 | * | marmotini_ quit (Ping timeout: 268 seconds) |
18:07:23 | * | ng0 quit (Ping timeout: 272 seconds) |
18:09:14 | * | actuallybatman joined #nim |
18:17:47 | * | nsf quit (Quit: WeeChat 2.7) |
18:18:13 | * | Hideki_ joined #nim |
18:18:31 | * | jholland__ joined #nim |
18:23:16 | * | Hideki_ quit (Ping timeout: 268 seconds) |
18:24:45 | disruptek | i guess what we want for golden is not imgui, just because "portability". |
18:24:57 | disruptek | so, immediate-mode text ui, instead. |
18:27:38 | Araq | IMHO the sooner we kill "text mode" the better. I want to live in a world where my programs can output diagrams and progress bars easily |
18:28:26 | disruptek | i want to get basic ui from programs running on servers, and i don't want to send imgui over ssh. |
18:28:40 | disruptek | !repo illwill |
18:28:40 | disbot | https://github.com/johnnovak/illwill -- 9illwill: 11 15 76⭐ 8🍴 |
18:30:08 | disruptek | what i really want is proper gui. but i just don't know how to handle in-situ monitoring with that. |
18:30:36 | rayman22201 | what kind of monitoring? |
18:31:25 | rayman22201 | like Datadog or splunk or something? |
18:31:30 | disruptek | i wanna bake golden right into the binary and then invoke the binary and have it check the environment. if it sees some direction from golden, it will run a different main loop. |
18:31:47 | disruptek | yeah, so i can toggle instrumentation without changing the binary. |
18:32:17 | rayman22201 | interesting. That's some HCR type stuff. neat |
18:32:30 | disruptek | i mean, if i build the repl into it, yeah. |
18:32:39 | disruptek | but initially, i wouldn't care so much about that. |
18:33:15 | rayman22201 | It's a path quickly leads to there :-P but I get you. |
18:33:39 | disruptek | yep. |
18:35:10 | rayman22201 | The cop out for the UI problem is to just have it web based. I.E. a tiny http server (or websocket server if you want to get fancy) |
18:35:23 | rayman22201 | then build a JS based UI |
18:35:50 | disruptek | i know, but the hatred runs deep with this one. |
18:36:20 | rayman22201 | lol. I know you feel |
18:36:24 | disruptek | this is basically how plotly works afaik, btw. |
18:36:27 | disruptek | !repo plotly |
18:36:29 | disbot | https://github.com/brentp/nim-plotly -- 9nim-plotly: 11plotting library for nim-lang 15 77⭐ 8🍴 7& 8 more... |
18:36:39 | rayman22201 | yup. I <3 plotly |
18:38:12 | * | endragor quit (Remote host closed the connection) |
18:38:49 | disruptek | maybe we use figlet and then have the web-ui for portability concerns. |
18:39:06 | disruptek | fidget |
18:39:21 | * | donpdonp joined #nim |
18:39:24 | disruptek | sorry treeform, i just have figlet stuck in my brain for some reason. 😁 |
18:39:54 | * | marmotini_ joined #nim |
18:40:21 | donpdonp | this nim file compiles fine with "import redis; redis.open();" etc etc. but when I build with 'nimble test' I get .nimble/pkgs/redis-0.3.0/redis.nim(50, 40) Error: undeclared identifier: 'Socket' |
18:45:38 | * | xet7 quit (Remote host closed the connection) |
18:48:12 | * | xet7 joined #nim |
18:48:20 | rayman22201 | Araq are you around? |
18:56:04 | FromDiscord | <Clyybber> Hmm, that would actually be a cool feature |
18:56:12 | FromDiscord | <Clyybber> A shell + terminal emulator |
18:56:33 | FromDiscord | <Clyybber> that displays images which are output to stdout |
18:56:39 | * | logand joined #nim |
18:57:00 | disruptek | golden already had that and i took it out. 😊 |
18:57:09 | FromDiscord | <Clyybber> 😦 |
18:57:14 | rayman22201 | I think kitty supports that kind of thing right? |
18:57:29 | FromDiscord | <Clyybber> heh, I was about to ask if kitty supports that 😄 |
18:57:35 | disruptek | yeah, it used kitty and generated graphs in png and displayed them on the console. |
18:58:03 | FromDiscord | <Clyybber> thats pretty cool |
18:58:10 | disruptek | it was hack. |
18:58:29 | FromDiscord | <Clyybber> how so? |
18:59:49 | disruptek | several ways... the kitty interface is a hack, the png was expensive to create and annoying to render, and because it's not dynamic, you have to basically corrupt your own reading to keep a consistently interesting graph. |
19:00:39 | disruptek | maybe the right way to do it is to simply have a live mode against the golden database. |
19:00:40 | rayman22201 | So on the arc async front, one thought I had was to make the callback field into a ref callback, but it turns out that is a huge api change that breaks my brain (and a lot of code.) |
19:01:50 | FromDiscord | <Clyybber> disruptek: WDYM corrupt your own reading? |
19:02:31 | disruptek | you're throwing out outliers so that you can zoom. but outliers are data, too. |
19:02:45 | disruptek | see golden-3.0.12 if you wanna play with kitty graphs. |
19:03:15 | FromDiscord | <Clyybber> kk |
19:04:02 | * | natrys quit (Quit: natrys) |
19:04:15 | * | gangstacat quit (Quit: Ĝis!) |
19:05:28 | disruptek | is `choosenim devel` HEAD, nightly, or something else? |
19:05:41 | disruptek | asking for my friend travis... |
19:06:00 | * | Vladar quit (Quit: Leaving) |
19:08:11 | * | ng0_ is now known as ng0 |
19:10:13 | shashlick | Head |
19:32:32 | * | ptdel quit (Ping timeout: 260 seconds) |
19:34:18 | * | gangstacat joined #nim |
19:40:22 | shashlick | anyone uses scoop on windows? |
19:44:30 | FromDiscord | <treeform> I dont |
19:52:05 | FromGitter | <matrixbot> `grantmwilliams` Are iterators lazy in Nim? (I cant find any concrete answers online). |
19:53:26 | * | Hideki_ joined #nim |
19:55:24 | lqdev[m] | @grantmwilliams what do you mean, "lazy"? also, please join #freenode_#nim:matrix.org and not the gitter version |
19:57:53 | * | Hideki_ quit (Ping timeout: 260 seconds) |
19:57:56 | FromGitter | <mratsim> @grantmwilliams closure iterators are probably lazy |
19:58:20 | FromGitter | <mratsim> Inline iterators are state machines |
20:05:47 | disruptek | shashlick: thanks, boss. |
20:06:01 | disruptek | shashlick: yeah, some nimph user uses it and says it's the right way to install cmake. |
20:08:14 | * | actuallybatman quit (Quit: leaving) |
20:09:02 | * | nsf joined #nim |
20:13:42 | * | voltist joined #nim |
20:15:22 | shashlick | nimble install cmake also works 😉 |
20:15:42 | shashlick | well at least on Windows |
20:23:50 | voltist | I hate the feeling of seeing your code get more and more messy and fragmented over the course of a project |
20:23:59 | voltist | It's like loosing control over it |
20:25:44 | shashlick | entropy |
20:26:57 | * | oculux joined #nim |
20:28:23 | FromDiscord | <AGNiMA> How can install a nimble package in project directory |
20:28:34 | FromDiscord | <AGNiMA> How can I install a nimble package in project directory |
20:29:08 | disruptek | !repo nimph |
20:29:09 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 52⭐ 2🍴 7& 1 more... |
20:29:46 | FromDiscord | <AGNiMA> Thank you 🙂 |
20:38:47 | * | luis_ joined #nim |
20:39:39 | disruptek | hey, don't be afraid to write nim. |
20:43:38 | disruptek | just because zevv won't, doesn't mean you can't. ya dig? |
20:46:19 | FromDiscord | <AGNiMA> /nimph/src/nimph.nim(591, 16) Warning: optionally upgrade a gitless install to clone [User] |
20:46:19 | FromDiscord | <AGNiMA> ... fatal.nim(39) sysFatal |
20:46:19 | FromDiscord | <AGNiMA> ... Error: unhandled exception: index out of bounds, the container is empty [IndexError] |
20:46:33 | FromDiscord | <AGNiMA> trying to cmake it |
20:55:23 | * | Trustable quit (Remote host closed the connection) |
20:55:57 | * | marmotini_ quit (Remote host closed the connection) |
20:56:31 | * | marmotini_ joined #nim |
21:01:08 | * | marmotini_ quit (Ping timeout: 268 seconds) |
21:03:21 | * | JustASlacker joined #nim |
21:12:06 | disruptek | agnima: you need nim 1.0.6 (unreleased) or nim 1.1.x |
21:13:27 | * | narimiran quit (Ping timeout: 258 seconds) |
21:14:58 | * | marmotini_ joined #nim |
21:17:23 | disruptek | yeah, we should have a way to visualize code churn. |
21:19:13 | disruptek | maybe an editor hook that lets you color by age? or maybe you get a popup with the revision log for your current block. or, up to the outer-most closure? |
21:21:49 | * | dcmertens quit (Ping timeout: 272 seconds) |
21:21:53 | disruptek | i love this: among tricky async code, frequently insufficiently commented, this needless gem: |
21:21:56 | disruptek | result.add newVarStmt(futSym, asyncProc) # -> var future<x> = y |
21:22:13 | disruptek | hey, thanks, there, buddy. |
21:22:20 | disruptek | 'preciate you. |
21:24:01 | disruptek | dom96: you just convinced me to use more than one line for a commit message. and i don't mean that in a deprecating way; i'm appreciating your message now. |
21:27:39 | * | marmotini_ quit (Ping timeout: 240 seconds) |
21:28:27 | * | marmotini_ joined #nim |
21:34:04 | disruptek | we should do pair programming tomorrow. i'll keyboard on-stream and code whatever you want. |
21:34:21 | disruptek | if my audio works, i mean. i can't remember if i fixed it. |
21:35:30 | dom96 | disruptek, http://bit.ly/2RuYu9J |
21:35:44 | disruptek | lol |
21:35:55 | * | logand quit (Remote host closed the connection) |
21:36:00 | disruptek | i don't mean just you, sweetheart. |
21:36:21 | disruptek | 😍 |
21:37:29 | disruptek | i know, i'm really sending mixed signals. i'm sorry. i'm not trying to be a dick, i promise. |
21:38:27 | disruptek | i'm thinking about streaming because i'm trying to write a nim tutorial and there's just too much to say about why it matters that we choose nim. |
21:39:39 | Zevv | so instead of choosing for the high density medium of written text that can be consumed or skipped at ones own prefered pacing, you choose to go rambling into a mic for 90 minutes |
21:40:03 | disruptek | yeah, because i /want/ to wax philosophic about it. |
21:40:20 | Zevv | "there's just too much to say" is an excellent reason to *write* |
21:40:24 | * | logand joined #nim |
21:40:33 | disruptek | well, that's true. |
21:41:07 | disruptek | but it's hard to put that in a tutorial. |
21:41:47 | Zevv | philosophing is done over beer, not in youtube channels |
21:42:02 | * | marmotini_ quit (Ping timeout: 268 seconds) |
21:42:03 | disruptek | i can drink on camera, sure. |
21:42:18 | Zevv | you got me there. go for it! |
21:42:23 | * | ptdel joined #nim |
21:42:35 | * | marmotini_ joined #nim |
21:42:35 | disruptek | but the fact is, we wouldn't be meeting at fosdem if there wasn't more information conveyed via audio-visual methods. |
21:43:03 | Zevv | nope, purely a social thing |
21:43:24 | disruptek | yes, and philosophing is a social thing as well. |
21:43:32 | Zevv | true, that |
21:43:35 | disruptek | unless you're merely doing it with beer. |
21:44:04 | disruptek | you probably know a lot more about youtube than i do. |
21:44:29 | logand | what is the difference between type File and type Stream? why is stdout a File and not Stream? |
21:44:37 | rayman22201 | Beer + streaming is excellent marketing. We need more of this for Nim 😛 |
21:44:54 | Zevv | disruptek: you'd be surprised. I spent *weeks* staring at youtube videos over the last months |
21:45:11 | Zevv | but that was for technical reasons. |
21:45:11 | disruptek | no, i know. that's not the bit that surprises me. |
21:45:17 | disruptek | unless you mean the staring part. |
21:45:25 | disruptek | that surprises /and/ troubles me, zevv. |
21:45:29 | Zevv | "work" |
21:45:34 | disruptek | i really think we should talk to your doctor. |
21:46:39 | disruptek | i mean, seriously, is there a "why nim" article somewhere? |
21:46:49 | disruptek | i can't think of any. |
21:47:06 | disruptek | i will write the shit out of it if i have to. |
21:47:47 | * | marmotini_ quit (Ping timeout: 272 seconds) |
21:48:25 | FromGitter | <zetashift> there are some, but I think they are quite old |
21:48:47 | rockcavera | I was writing wyhash in nim, but I was disappointed with the result. For wyrand: my pure nim code was 6.66x slower than code C. The nim code importing the C function is 4.04x slower. For wyhash: my pure nim code was 12.99x slower than code C. The nim code importing the C function is 2.37x slower than code C. |
21:48:53 | FromGitter | <zetashift> https://hookrace.net/blog/what-is-special-about-nim/ |
21:49:00 | FromGitter | <zetashift> and the followup article |
21:49:00 | rockcavera | Is this performance gap normal? I had never compared the performance of a Nim and C code. |
21:49:44 | disruptek | we should build some benchmarks. |
21:50:33 | dom96 | disruptek, well, I was referring to what you said directly to me. I don't recall suggesting you write more in your commit messages |
21:50:34 | rayman22201 | logand: https://nim-lang.org/docs/streams.html#FileStream |
21:50:37 | disruptek | i think maybe the solution is to publish a list of benchmarks that nim is in (or that we want it to be in). |
21:50:50 | FromDiscord | <gingerBill> What was you Nim code that was slower than C? |
21:50:58 | FromDiscord | <gingerBill> Did you just transliterate it from C to Nim? |
21:51:02 | disruptek | dom96: no; i was reading some async code and got a treat: a nice long commit message. it was great. |
21:51:09 | FromDiscord | <gingerBill> And how were you calling it? |
21:51:55 | rayman22201 | logand: also, https://nim-lang.org/docs/streams.html#basic-usage-filestream-example |
21:51:58 | disruptek | users will come asking why we aren't in a given benchmark, or why we're slow, and we'll know to fix it. otherwise, we never need to worry about managing the benchmarks ourselves. |
21:52:23 | dom96 | disruptek, ahh, cool |
21:52:39 | disruptek | that'll normalize our performance dramatically, too, because it will be spread/risked by the publisher. |
21:52:46 | logand | rayman22201: thanks, thats a good start |
21:53:16 | rockcavera | gingerBill https://pastebin.com/ihiUh0cf |
21:53:17 | rockcavera | my code |
21:53:27 | disruptek | !repo nim-problem |
21:53:28 | disbot | https://github.com/pb-cdunn/nim-help -- 9nim-help: 11Need help debugging gc problem in Nim 15 0⭐ 2🍴 7& 7 more... |
21:53:41 | disruptek | !repo rockcavera/nim-problem |
21:53:41 | disbot | https://github.com/rockcavera/nim-problem -- 9nim-problem: 11problem with speed to exclude equals using hashset 15 0⭐ 1🍴 |
21:55:15 | disruptek | if you know of a benchmark, please share it. i'll collect results and we can at least teach a link to the bot. |
21:55:43 | FromDiscord | <gingerBill> Thank you rockcavera |
21:55:47 | FromDiscord | <gingerBill> So it is a transliteration |
21:56:03 | rockcavera | yes |
21:56:18 | rockcavera | I transcribed the C code to Nim |
21:56:23 | FromDiscord | <gingerBill> How did you time it? |
21:56:37 | FromDiscord | <gingerBill> Did you time the execution of that section of code or the entire program? |
21:57:15 | rockcavera | just from the code session using monotimes |
21:57:25 | FromDiscord | <gingerBill> Okay, there's the problem. |
21:57:44 | FromDiscord | <gingerBill> Wait... |
21:57:45 | * | brainproxy joined #nim |
21:57:46 | FromDiscord | <gingerBill> Ignore me. |
21:58:16 | rockcavera | And for C I also used the same scheme as Nim's monotimes. |
21:59:09 | FromDiscord | <gingerBill> Interesting. |
21:59:27 | FromDiscord | <gingerBill> And you say the C call through Nim is slower than in normal C? |
21:59:44 | FromDiscord | <gingerBill> Are you using the same optimization levels for both compilers? |
21:59:44 | rockcavera | yes |
21:59:54 | FromDiscord | <gingerBill> Hmmmmm That is interesting. |
22:00:10 | FromDiscord | <gingerBill> Because the C call should be identical. |
22:00:18 | FromGitter | <Varriount> You used `-d:release`? |
22:00:19 | rockcavera | using the importc pragma is also slower than C code |
22:00:20 | rockcavera | yes |
22:00:23 | rockcavera | -d:danger -d:release |
22:00:28 | FromGitter | <Varriount> O_o |
22:00:38 | rockcavera | C code compile with gcc -O3 |
22:00:44 | disruptek | i don't even so how that's possible. |
22:00:49 | disruptek | s/so/see/ |
22:01:03 | FromGitter | <Varriount> Hm, can you try with LTO? |
22:01:12 | disruptek | how could that matter? |
22:01:25 | rockcavera | I would not be scared if the difference in execution time was minimal, but it is very big. |
22:01:53 | disruptek | is this in the nim-problem repo? |
22:01:59 | rockcavera | disruptek noo |
22:02:13 | disruptek | can you add it? |
22:02:14 | FromGitter | <Varriount> disruptek: Link-time optimization optimizes across file boundaries |
22:02:33 | FromGitter | <Varriount> It can allow more inlining to be done |
22:02:53 | disruptek | okay, fair enough. |
22:03:21 | disruptek | i was getting the impression that this was, like, a c call executed from nim code, once. |
22:03:29 | rockcavera | disruptek yes, i can add. |
22:03:41 | disruptek | it's still surprising that there could be any overhead. |
22:04:05 | disruptek | also, with the way nim writes c, we're not talking about x-file boundaries. |
22:04:39 | disruptek | rockcavera: cool, that sounds like something worth looking into. |
22:05:59 | FromGitter | <Varriount> rockcavera: To enable link-time optimization, try `--passC:'-flto' --passL:'-flto'` |
22:07:00 | disruptek | so that base64 performance is pretty bad, even after treeform's fix. |
22:08:09 | rockcavera | Varriount nice |
22:08:34 | FromGitter | <Varriount> Usually it doesn't result in much of a performance gain, just a smaller executable |
22:10:10 | disruptek | pretty big deal on something like chromium. everywhere else, kinda meh. |
22:10:31 | dom96 | Yay, big thanks to shashlick for choosenim 0.5.1! |
22:11:00 | disruptek | shashlick is like the mom i always wanted. |
22:11:07 | rockcavera | Now it's so fast I can't even benchmark |
22:11:10 | rockcavera | hahahaha |
22:11:37 | FromGitter | <Varriount> rockcavera: Is it possible the call might have been optimized away? |
22:11:54 | FromGitter | <Varriount> A compiler might do that, if it knows that the function being called has no side effects |
22:17:22 | dom96 | Anyone benchmark httpbeast with --gc:arc for me yet? :P |
22:19:28 | disruptek | still trying to break the async cycle. |
22:20:46 | dom96 | Depending on how quickly I can create a presentation for FOSDEM this weekend I may even play around with it a little |
22:21:23 | disruptek | sometimes it's hard to believe that the pinnacle of mass-market human-computer interfaces is these text/gui systems. we are animals playing in the mud. |
22:22:03 | * | solitudesf quit (Ping timeout: 240 seconds) |
22:33:16 | * | nsf quit (Quit: WeeChat 2.7) |
22:37:27 | rayman22201 | dom96: until we can figure out how to deal with the cycle in async we are kind of stuck... |
22:38:05 | rayman22201 | It works, but leaks |
22:38:09 | dom96 | ahh |
22:38:19 | dom96 | Araq had an idea on how to fix that |
22:38:32 | dom96 | It requires breaking changes, but still |
22:39:41 | rayman22201 | I have a few ideas, but I want to get Araqs thoughts |
22:40:28 | dom96 | I'd love to hear your ideas :) |
22:40:51 | rayman22201 | I was really hoping for a non breaking change, but that might not be possible 😭 |
22:45:01 | rayman22201 | Well, essentially, we either need to re architect async to get rid of the cycle, or create some new feature to help arc handle the cycle, or some escape hatch: essentially, "I know this is a cycle, but I know what I'm doing, free it anyway" |
22:45:50 | FromDiscord | <exelotl> uhh, got something weird with my config.nims |
22:48:21 | FromDiscord | <exelotl> so I'm using a cross compiler toolchain by doing `put "arm.standalone.gcc.exe", "arm-none-eabi-gcc"` etc. |
22:48:51 | FromDiscord | <exelotl> and I was previously passing options to the C compiler using --passC |
22:49:17 | FromDiscord | <exelotl> except, I would get the following error: `arm-none-eabi-gcc.exe: error: unrecognized command line option '-mno-ms-bitfields'` |
22:49:50 | FromDiscord | <exelotl> where -mno-ms-bitfields is not a flag that I'd passed myself, but rather something that the Nim compiler decided to add. |
22:50:52 | FromDiscord | <exelotl> but I was able to get that error to go away by using `put "arm.standalone.gcc.options.always", " ..... "` instead of passC |
22:51:34 | FromDiscord | <exelotl> but then I realised, my project wouldn't build on macos because the default C compiler on that platform is clang |
22:57:36 | FromDiscord | <exelotl> anyways the problem is, after I got it to compile on macos using --cc:gcc |
22:57:44 | FromDiscord | <exelotl> the -mno-ms-bitfields error comes back |
22:57:50 | FromDiscord | <exelotl> on windows |
23:02:00 | * | smitop joined #nim |
23:03:36 | disruptek | rayman22201: maybe what we really want is a simple three-value switch where you can run wipe with increasingly advantageous (ie. safe) results. putting a name to it lets us track it, too. |
23:06:34 | rayman22201 | I don't follow |
23:09:50 | * | blueberrypie quit (Quit: leaving) |
23:10:13 | disruptek | i'm saying that maybe the operations are additive. you move and assign in two steps which sum to a single move. |
23:11:11 | rayman22201 | sorry. I don't see how that helps with the cycle? |
23:12:08 | disruptek | because you can have the first instance be "weak". |
23:12:23 | * | blueberrypie joined #nim |
23:13:40 | rayman22201 | isn't that the same as "weakasgn"? |
23:14:04 | disruptek | yeah, if there are only two states. |
23:14:23 | rayman22201 | what is the third state? |
23:14:53 | disruptek | i dunno, but we might want to reposition states, add states, etc. |
23:18:18 | disruptek | don't you look at the way it works and think of all kinds of marvelous allocators and other machinery? |
23:18:44 | disruptek | maybe it's just me. |
23:19:02 | rayman22201 | check this out: https://play.nim-lang.org/#ix=27GH |
23:19:33 | rayman22201 | lol. I do, but I also like less states :-P |
23:19:51 | rayman22201 | This "modified" version of the expanded async macro makes the cycle very explicit |
23:20:00 | rayman22201 | the closure is capturing itself |
23:20:28 | disruptek | i can't even build it, but i can read it i guess. |
23:20:40 | rayman22201 | It doesn't build for you? |
23:20:56 | disruptek | not on playground. |
23:21:44 | rayman22201 | I forgot the imports |
23:21:45 | rayman22201 | https://play.nim-lang.org/#ix=27GJ |
23:21:46 | rayman22201 | here you go |
23:22:02 | rayman22201 | you really need to build it with arc to see the issue though |
23:22:17 | disruptek | i am. |
23:22:27 | disruptek | i just thought maybe you wanted me to run it on pg for some reason. |
23:22:38 | rayman22201 | naw, pg is just a good paste bin :-P |
23:23:33 | rayman22201 | I think there are two issues. One is "cycle management", the other is controlling what a closure captures. |
23:23:52 | disruptek | okay, i had to fix my async first. 😁 |
23:23:58 | disruptek | lemme run it in my tester |
23:24:00 | rayman22201 | lol |
23:24:20 | rayman22201 | I.E. the problem is the closure needs the ability to "weak" capture. |
23:24:35 | rayman22201 | but we have no explicit control over how things get captured. |
23:27:24 | * | luis_ quit (Quit: luis_) |
23:28:20 | disruptek | how did you get this output? |
23:29:05 | rayman22201 | what output? |
23:29:08 | rayman22201 | the macro? |
23:29:18 | disruptek | yeah, how did you render it? |
23:29:25 | rayman22201 | --expandMacro:async |
23:29:37 | rayman22201 | then I had to fix the syntax errors |
23:29:39 | rayman22201 | :-P |
23:29:47 | disruptek | 🤯 |
23:30:07 | rayman22201 | yeah, it used to work flawlessly, but expandMacro broke recently I guess |
23:30:28 | rayman22201 | I then massaged it in the way I mention in the comments :-P |
23:30:39 | disruptek | it's funny, i wrote a ton of ast code but very naively. |
23:31:37 | rayman22201 | lol, that's how we all start |
23:31:49 | rayman22201 | expandMacro was a gift from the gods for debugging this crap |
23:32:09 | rayman22201 | I say crap, but I'm a macro junky. I love them |
23:40:13 | disruptek | yeah, i think this is the bit i rewrote. but it didn't help. |
23:40:29 | disruptek | took me a minute. |
23:40:40 | rayman22201 | what bit? |
23:41:08 | disruptek | maybe i broke it. 😁 |
23:41:13 | rayman22201 | you did something similar independently you mean? |
23:41:22 | Araq | if you mean the backticks |
23:41:35 | Araq | had to add them to finally fix the last template related bugs |
23:41:41 | Araq | for version 1.0 |
23:41:41 | rayman22201 | Hi Araq |
23:41:46 | Araq | hi |
23:42:15 | rayman22201 | that makes sense. Unfortunately the backticks seem to cause issues when they aren't used in macros |
23:42:21 | rayman22201 | but that really is minor |
23:42:31 | Araq | they are invalid Nim code by design |
23:42:36 | Araq | but anyhow, please look at |
23:42:41 | Araq | tasync_prototype.nim |
23:42:49 | Araq | in tests\destructor |
23:42:54 | * | logand quit (Remote host closed the connection) |
23:43:11 | Araq | Nim does offer you the "weak capture" via .cursor, I hope |
23:43:33 | rayman22201 | the problem is, I can't add a .cursor to a closure capture. That's what is needed here I think |
23:43:39 | * | logand joined #nim |
23:43:40 | disruptek | no, the bit i rewrote was callbacklist processing. |
23:44:10 | rayman22201 | I originally thought it was callbacks causing the problem too. Now I don't think so |
23:44:28 | Araq | there is no "capture" |
23:44:37 | Araq | there is only "I use X in a closure" |
23:44:46 | Araq | and you can annotate the 'X' as .cursor |
23:44:53 | Araq | unless it's a parameter :P |
23:44:56 | rayman22201 | how? |
23:45:08 | Araq | tasync_prototype.nim line 35 |
23:45:16 | rayman22201 | ok looking |
23:46:15 | rayman22201 | Is it on devel? I can't find it |
23:46:22 | rayman22201 | nvm |
23:46:24 | rayman22201 | I'm blind |
23:46:42 | Araq | the other thing that I told you guys is the design of |
23:46:43 | Araq | CallbackFunc = proc () {.closure, gcsafe.} |
23:47:06 | Araq | it invites capturing the future inside the closure and then attaching the closure to the future |
23:47:11 | Araq | bad, bad |
23:47:18 | Araq | try instead |
23:47:28 | Araq | CallbackFunc = proc (fut: FutureBase) {.closure, gcsafe.} |
23:47:46 | rayman22201 | indeed. I found that as well |
23:47:52 | Araq | I remember doing that for speed reasons earlier, got a 3% speedup |
23:47:52 | disruptek | yeah, but i couldn't figure out how to curry it. |
23:48:10 | Araq | and then dom96 complained "it's a breaking change" :P |
23:48:25 | disruptek | not if it's just curried somehow. |
23:48:28 | rayman22201 | it is. It's really embedded now. the stdlib explodes when I try to change it |
23:48:48 | Araq | the fixes I had to do were minimal |
23:49:10 | Araq | yeah, stdlib "explodes" but it's only a couple of lines I had to fix |
23:49:23 | Araq | I probably forgot a couple of places though :P |
23:49:29 | disruptek | and by fix you mean improve. |
23:49:31 | rayman22201 | orly? I gave up after a few files. it kept going |
23:49:40 | rayman22201 | but maybe I did it wrong |
23:50:22 | Araq | future.addCallback( |
23:50:22 | Araq | proc() = |
23:50:22 | Araq | cb(future) |
23:50:22 | Araq | ) |
23:50:26 | Araq | ^ yay... |
23:50:56 | voltist | Anybody got any suggestions for what version management 'good practice' is when re-writing a project in a new language? |
23:51:34 | Araq | mono-repo and use git commit hashes for external dependencies |
23:51:40 | * | luis_ joined #nim |
23:51:51 | rayman22201 | I was also experimenting with making the callback a ref, so maybe I conflated the two things |
23:52:18 | Araq | making the callback a ref sounds crazy :P |
23:53:06 | dom96 | lol |
23:53:11 | dom96 | I want to avoid breaking changes |
23:53:19 | dom96 | You can't blame me for that |
23:53:27 | dom96 | but if there is no other way I won't stand in the way |
23:53:33 | dom96 | as long as it's behind a switch |
23:53:38 | dom96 | 'night |
23:53:43 | * | luis_ quit (Client Quit) |
23:53:44 | Araq | night |
23:53:49 | disruptek | gn |
23:54:11 | * | luis_ joined #nim |
23:54:57 | rayman22201 | fn |
23:55:04 | rayman22201 | gn even |
23:55:09 | * | Hideki_ joined #nim |
23:55:12 | Araq | pub fn |
23:55:28 | Araq | fun in the pub |
23:55:42 | rayman22201 | I don't understand why this doesn't leak: https://play.nim-lang.org/#ix=27GR |
23:55:42 | Araq | oh I finally get the joke |
23:55:43 | disruptek | someone write this down. |
23:55:49 | rayman22201 | hahahaha |
23:55:59 | rayman22201 | 👏 |
23:56:51 | Araq | how do you know it doesn't leak? |
23:58:57 | Araq | disruptek, 'nimph tag' is awesome |
23:59:06 | Araq | used it for Karax and packedjson |
23:59:10 | disruptek | glad it worked. |
23:59:53 | disruptek | you do any other stuff with nimph? |