00:01:43 | disruptek | probably nimbus. |
00:03:22 | disruptek | smaller than i expected, actually. |
00:03:55 | disruptek | it's about 11k looks like. hell, nimph might actually be larger. |
00:04:21 | disruptek | nimph = openapi + github + gittyup + nimph + bump + cutelog + ... |
00:04:26 | disruptek | shit adds up. |
00:04:29 | dom96 | have you measured all its deps? |
00:04:48 | disruptek | nope. |
00:05:11 | disruptek | but my github api alone is 26k, iirc. |
00:06:08 | dom96 | ooh, godbolt has Nim support now :O |
00:06:15 | FromDiscord | <mratsim> I would be surprised if you have more deps than nimbus: https://github.com/status-im/nim-beacon-chain/tree/master/vendor |
00:06:51 | disruptek | when you build it, how many lines does nim say it built? |
00:07:50 | FromDiscord | <mratsim> we silence all those useless information :p |
00:07:59 | stefantalpalaru | "cloc" says that the Nim compiler (and standard library) have 243698 lines of Nim code. |
00:08:40 | disruptek | nim on nimph says 472k. |
00:10:37 | stefantalpalaru | cloc excludes empty lines and comments. |
00:11:23 | * | tane quit (Quit: Leaving) |
00:11:34 | stefantalpalaru | `cloc --exclude-dir=nimbus-build-system,nimcache .` in Nimbus finds 106317 lines on Nim code. |
00:12:37 | disruptek | nimph: 118586 |
00:15:08 | disruptek | 116k. had a couple test clones in there. |
00:16:41 | stefantalpalaru | Same command in nim-beacon-chain (huge submodule overlap with Nimbus) gives 182049 lines of Nim code. |
00:17:26 | disruptek | so i have some work to do. |
00:18:06 | disruptek | hmm, s3 is only 11k. gonna have to bulk up somehow. |
00:19:46 | stefantalpalaru | `cloc .` counts only 4921 lines of Nim code in https://github.com/disruptek/nimph |
00:20:37 | disruptek | most of the code is in the deps. |
00:28:06 | * | Hideki_ joined #nim |
00:28:23 | * | JustASlacker joined #nim |
00:32:54 | * | xet7 quit (Remote host closed the connection) |
00:33:29 | * | JustASlacker quit (Ping timeout: 258 seconds) |
00:33:52 | * | xet7 joined #nim |
00:37:37 | * | couven92 quit (Quit: Disconnecting) |
00:38:39 | * | matlock joined #nim |
00:40:32 | matlock | I just wanted to mention that I maintain the snaps for Nim and I could always use some extra testing. I maintain snaps for nim stable, nightly, and 1.x LTS. https://github.com/sirredbeard/nim_lang_snap |
00:41:54 | matlock | If you install nim nightly via snap you will always get the latest nim nightly automatically, around 7pm EST. |
00:55:23 | shashlick | You use the nightlies releases? |
00:59:21 | matlock | Not usually. I have them installed alongside the others. I am still learning nim and using stable for now. |
01:04:08 | shashlick | no i mean for the packaging |
01:06:05 | shashlick | disruptek: Nim's output includes all stdlib stuff too |
01:06:43 | shashlick | 3 line file resulted in 16k lines from Nim |
01:06:54 | shashlick | heh nimterop is only 4.2k |
01:08:54 | matlock | The nightly is built directly from the GitHub master branch https://github.com/sirredbeard/nim_lang_snap/blob/master/nightly/snap/snapcraft.yaml#L36 |
01:13:23 | * | nsf quit (Quit: WeeChat 2.6) |
01:14:42 | shashlick | matlock: so you are building your own nightly |
01:15:02 | shashlick | you might be better served to leverage the official nightlies - https://github.com/nim-lang/nightlies/releases |
01:15:12 | shashlick | they are tested releases |
01:16:13 | shashlick | if you don't prefer the binaries then you can still leverage the source since it has the benefit of test again |
01:20:42 | matlock | I was not aware of the nightly releases. I will look at switching to those. The would also fix the arm64 gap. |
01:23:12 | shashlick | thanks for maintaining these 🙂 |
01:26:39 | matlock | To build or repackage the nightlies I would have to poll and parse the GitHub API to get the release data. It is made easy by a consistent naming scheme on the LTS (https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/lts-1.yml#L19). I may be a bit more complicated for the official nightly releases, they have a lot more going on, but I will give it a shot. |
01:30:01 | shashlick | let me know if you need any help from the nim nightlies side |
01:31:32 | matlock | No problem. I really like Nim, still learning. I thought Nim would be useful for IoT stuff on Ubuntu Core but needed to snap it to get it on there for testing. I used it as an opportunity to figure out building snaps on GitHub Actions. Thank you, I will let you know. |
01:32:13 | shashlick | cool |
01:40:08 | * | oculux quit (Ping timeout: 265 seconds) |
01:44:49 | * | ng0 quit (Quit: leaving) |
01:45:58 | FromDiscord | <Clyybber> Araq: I'll work on init elision and on putting the destroy out of sink and asgn tomorrow |
02:12:01 | * | NimBot joined #nim |
02:30:33 | * | endragor joined #nim |
02:46:22 | * | Hideki_ quit (Remote host closed the connection) |
02:47:12 | * | Hideki_ joined #nim |
02:51:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
02:57:20 | * | Hideki_ joined #nim |
02:57:36 | FromDiscord | <Fern & Simula (They/Them)> is there any way to dump an entire nim file after macro expansion? similar to `--expandMacro` but for the entire file |
02:58:00 | * | dddddd quit (Ping timeout: 258 seconds) |
03:01:09 | FromDiscord | <Fern & Simula (They/Them)> nvm, don't need it anymore |
03:07:31 | * | Hideki_ quit (Remote host closed the connection) |
03:12:34 | * | dwdv quit (Ping timeout: 258 seconds) |
03:13:41 | * | Hideki_ joined #nim |
03:18:03 | * | Hideki_ quit (Ping timeout: 260 seconds) |
03:19:48 | * | endragor quit (Remote host closed the connection) |
03:19:55 | * | endragor joined #nim |
03:40:35 | * | rockcavera quit (Remote host closed the connection) |
03:41:49 | sealmove | Fern & Simula (They/Them): wrap the contents in a `expandMacros` block? |
03:50:32 | * | Hideki_ joined #nim |
03:54:37 | * | Hideki_ quit (Remote host closed the connection) |
03:54:52 | * | Hideki_ joined #nim |
03:58:12 | leorize | sealmove: it's easy to reduce highlighting |
03:58:21 | sealmove | how? |
03:59:35 | leorize | sealmove: these are the default "links" I defined for each symbol nimsuggest gave me: https://github.com/alaviss/nim.nvim/blob/5f227e1befbe9795af531ae4517ee88bc393b50f/syntax/nim.vim#L148-L169 |
04:00:11 | leorize | to override these, add `highlight link <group name> <other group name or NONE>` to your neovim configuration |
04:00:33 | leorize | you can even customize these colors if you'd like |
04:01:08 | leorize | `:h highlight` for more information |
04:02:23 | * | muffindrake quit (Ping timeout: 245 seconds) |
04:02:55 | sealmove | I see |
04:03:35 | sealmove | well honestly I don't like highlighting based on nimsuggest |
04:03:46 | sealmove | otherwise your plugin is badass! |
04:04:16 | sealmove | i love the autocompletion part |
04:04:36 | * | muffindrake joined #nim |
04:05:36 | sealmove | for example "Keyword" is a single color, while you want to have different colors for different keywords |
04:06:13 | disruptek | wut |
04:06:25 | leorize | sealmove: wut? |
04:07:32 | sealmove | proc, of, string they all look the same with nimsuggest highlighting |
04:07:42 | leorize | uhmm, no? |
04:07:54 | leorize | you need a better plugin |
04:07:59 | leorize | colorscheme* |
04:08:04 | leorize | gimme an example file |
04:08:12 | leorize | I'll let you see how it looks with my setup |
04:10:15 | sealmove | sorry my bad, not all keywords, but for example `proc` looks same as `PNode` |
04:11:10 | sealmove | but you are right, i had a bad colorscheme, overriding vim highlights should do the trick! :) thanks |
04:12:37 | * | Hideki_ quit (Remote host closed the connection) |
04:12:59 | leorize | sealmove: default setup: https://ibb.co/SX6h4bG |
04:15:08 | sealmove | I like keywords like `proc` to be white bold |
04:15:40 | leorize | yea you need to brew your own colorscheme :P |
04:17:29 | * | Hideki_ joined #nim |
04:18:07 | sealmove | but... if I make a colorscheme specifically for combining with your plugin, then the colorscheme will be just vim highlights overrides? |
04:18:21 | disruptek | it only hurts for a minute. |
04:18:39 | leorize | sealmove: yep :P |
04:18:49 | leorize | usually it's better to use a proper color scheme |
04:20:05 | sealmove | have been avoiding making one, seems too much work |
04:20:15 | sealmove | but no pain no gain |
04:21:00 | leorize | https://ibb.co/cyL230W |
04:21:06 | leorize | more pictures to convince you |
04:21:38 | sealmove | I am convinced :) using it with challenger_deep now |
04:22:28 | sealmove | https://ibb.co/x3nLrZ3 |
04:24:25 | leorize | checkout `:h group-name` |
04:24:59 | leorize | those are the groups that syntaxhl authors would use |
04:25:15 | leorize | if your colorscheme can't get those right then you'll only see bad colors :P |
04:27:39 | sealmove | ok the highlighting is too damn good *_* might not even need ALE with it |
04:34:17 | leorize | glad I helped :) |
04:39:42 | * | chemist69_ quit (Ping timeout: 246 seconds) |
04:42:00 | * | chemist69 joined #nim |
04:46:39 | sealmove | do you know how to make custom autocompletion for a binary you make, say for fish shell? |
04:47:30 | sealmove | it's a simple one, I want fish to look for files in a specific folder |
04:48:16 | leorize | sealmove: https://fishshell.com/docs/current/index.html#completion-own |
04:48:17 | sealmove | i run my program like this `myprogram file` where file is transformed to -> somefolder/file.ext |
04:48:48 | leorize | it's always easier to just refer to the shell documentations :P |
04:49:17 | sealmove | true, silly me :3 |
05:21:16 | * | Hideki_ quit (Ping timeout: 268 seconds) |
05:24:53 | sealmove | I did it :) |
05:49:59 | * | Hideki_ joined #nim |
06:00:15 | * | Hideki_ quit (Remote host closed the connection) |
06:01:00 | * | Hideki_ joined #nim |
06:05:27 | * | Hideki_ quit (Ping timeout: 258 seconds) |
06:16:11 | * | marmotini_ joined #nim |
06:31:50 | * | narimiran joined #nim |
06:35:20 | * | Hideki_ joined #nim |
06:46:50 | * | Hideki_ quit (Ping timeout: 240 seconds) |
06:59:07 | * | Hideki_ joined #nim |
07:00:47 | * | Hideki_ quit (Remote host closed the connection) |
07:01:20 | * | Hideki_ joined #nim |
07:06:01 | * | Hideki_ quit (Ping timeout: 258 seconds) |
07:09:22 | * | sealmove quit (Quit: WeeChat 2.7) |
07:12:04 | * | jjido joined #nim |
07:26:50 | * | narimiran quit (Ping timeout: 240 seconds) |
07:33:01 | * | solitudesf joined #nim |
07:55:19 | * | matic joined #nim |
07:55:25 | * | endragor quit (Remote host closed the connection) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:02:04 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:05:10 | * | gmpreussner joined #nim |
08:07:46 | * | marmotini_ quit (Ping timeout: 265 seconds) |
08:12:03 | * | PMunch joined #nim |
08:30:19 | * | Vladar joined #nim |
08:30:21 | * | endragor joined #nim |
08:30:58 | * | jjido joined #nim |
08:34:26 | * | endragor quit (Ping timeout: 240 seconds) |
08:38:28 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:44:48 | * | marmotini_ joined #nim |
08:56:11 | * | JustASlacker joined #nim |
09:03:56 | * | tane joined #nim |
09:11:18 | * | vqrs_ quit (Ping timeout: 246 seconds) |
09:12:13 | * | hp-yc9 joined #nim |
09:12:31 | * | hpyc9 quit (Ping timeout: 258 seconds) |
09:18:19 | * | vqrs joined #nim |
09:48:25 | * | Trustable joined #nim |
09:57:12 | * | uu91 joined #nim |
10:00:04 | * | nsf joined #nim |
10:00:12 | * | marmotini_ quit (Remote host closed the connection) |
10:14:59 | * | Vladar quit (Quit: Leaving) |
10:40:18 | * | marmotini_ joined #nim |
10:54:13 | * | krux02 joined #nim |
10:56:55 | * | narimiran joined #nim |
10:57:03 | * | prometheus2 joined #nim |
10:57:43 | * | marmotini_ quit (Ping timeout: 260 seconds) |
10:59:50 | * | prometheus quit (Ping timeout: 265 seconds) |
11:04:08 | FromGitter | <alehander92> Praise God, new year |
11:04:25 | FromGitter | <alehander92> so many ideas |
11:04:36 | FromGitter | <alehander92> for example, about the godbolt thing |
11:05:21 | FromGitter | <alehander92> it should be kinda easy to have both a C and an asm mapping (thats what we also try to do in our debugger project for this kind of "view") |
11:06:38 | FromGitter | <alehander92> but i am not sure how does the godbolt api works: it should be possible to get info from dwarf somehow i guess, if all those languages have asm support |
11:07:21 | FromGitter | <alehander92> https://github.com/mattgodbolt/compiler-explorer/pull/1711/files |
11:07:23 | disbot | ➥ Fix ASM output for the zig compiler |
11:13:06 | * | dwdv joined #nim |
11:14:46 | FromGitter | <alehander92> http://ix.io/26gU |
11:15:05 | FromGitter | <alehander92> this is the very unfinished monaco(monarch?) syntax thing that we're using |
11:15:20 | FromGitter | <alehander92> (as we also use monaco) |
11:16:06 | FromGitter | <alehander92> i guess it started after the python one , but with nim keywords , this should be PR-ed i guess |
11:16:33 | FromGitter | <alehander92> http://ix.io/26gU/js |
11:19:01 | FromGitter | <alehander92> ok guys otherwise you need `--debugInfo --lineDir:on` |
11:19:30 | FromGitter | <alehander92> and it catches up the colored asm, but it somehow doesnt color the nim program.. |
11:19:52 | FromGitter | <alehander92> raynman22201 oh i just saw your syntax PR sorry! |
11:22:14 | * | endragor joined #nim |
11:25:08 | * | couven92 joined #nim |
11:27:28 | * | endragor quit (Ping timeout: 260 seconds) |
11:39:16 | FromDiscord | <Clyybber> sealmove: Cligen does it automatically for you |
11:39:52 | * | ng0 joined #nim |
11:41:49 | * | endragor joined #nim |
11:53:33 | FromGitter | <alehander92> `--debugInfo --lineDir:on ` flags in godbolt gives me the colors after all mratsim |
11:55:25 | * | narimiran quit (Ping timeout: 265 seconds) |
11:55:58 | * | hp-yc9 quit (Quit: ZNC 1.7.5 - https://znc.in) |
11:56:34 | * | hpyc9 joined #nim |
11:58:10 | * | kungtotte quit (Quit: WeeChat 2.7) |
11:58:13 | * | nsf quit (Quit: WeeChat 2.7) |
12:01:04 | * | lritter joined #nim |
12:07:02 | * | kungtotte joined #nim |
12:13:59 | * | mbomba joined #nim |
12:17:55 | * | mbomba quit (Quit: WeeChat 2.7) |
12:19:02 | * | rockcavera joined #nim |
12:23:09 | FromDiscord | <Clyybber> Araq: I'm working on implementing isFirstWrite with the dfa |
12:23:29 | FromDiscord | <Clyybber> Its kinda tricky though, since we have to walk up the dfa |
12:23:40 | FromDiscord | <Clyybber> Tricky wrt fork and goto |
12:27:32 | FromDiscord | <Clyybber> Hmm, I could also start at 0 and walk up to pc.. |
12:42:35 | * | sagax quit (Write error: Connection reset by peer) |
12:46:03 | * | ng0 quit (Quit: leaving) |
12:51:18 | * | ng0 joined #nim |
12:51:18 | * | ng0 quit (Changing host) |
12:51:18 | * | ng0 joined #nim |
12:55:31 | * | hohlerde joined #nim |
12:59:03 | Araq | Clyybber: it's also the "first" write if there is no other |
12:59:17 | Araq | which is easier to compute and might be good enough |
13:02:13 | Araq | er, yeah |
13:02:28 | Araq | as you said, start at position 0 and see if it's the first write |
13:04:34 | FromDiscord | <Clyybber> Yeah, I'm doing that now, now comes the moment of truth.. |
13:05:44 | Araq | you need to watch out for: |
13:05:49 | Araq | if cond: |
13:05:55 | Araq | x = val |
13:06:04 | Araq | x = valB # not the first write! |
13:06:51 | Araq | that means on a fork you need to split your state |
13:07:00 | Araq | and on a join you can join your states |
13:07:14 | Araq | which is kinda the point of the DFA, to make this really simple |
13:07:29 | FromDiscord | <Clyybber> Yep |
13:08:04 | FromDiscord | <Clyybber> I also have to account for the splits destination offsets. So in a split I go from pc until instr + dest |
13:08:17 | * | marmotini_ joined #nim |
13:11:53 | FromDiscord | <Clyybber> Tests pass, except for the one that should, heh. Guess my analysis is overly pessimistic or just plain wrong |
13:13:54 | Araq | also cooldome's solution might already be the 80-90% solution |
13:14:10 | Araq | and maybe your time is better spent on removing wasMoved+destroy pairs |
13:14:22 | FromDiscord | <Clyybber> Thats what I'm doing along the way |
13:14:43 | FromDiscord | <Clyybber> Ah, |
13:14:50 | Araq | nice, I'm fixing C backend bugs |
13:15:00 | FromDiscord | <Clyybber> Nice |
13:15:21 | Araq | we need to fix C++ exception handling for good |
13:15:34 | Araq | kinda embarrassing how bad it is |
13:16:35 | FromDiscord | <Clyybber> if you get around to it, can you try https://github.com/nim-lang/Nim/issues/12282 ? SInce you marked it as easy. Its also the source of some other bugs |
13:16:36 | disbot | ➥ var param with type conversion doesn't work in VM ; snippet at 12https://play.nim-lang.org/#ix=22XY |
13:16:41 | Araq | I've been thinkning about the "raise inside finally/destructor" problem |
13:16:47 | FromDiscord | <Clyybber> And? |
13:17:07 | Araq | so far the best solution I've come up with is this: |
13:17:44 | Araq | "raise e inside a raise handling" causes currentExceptionB = e |
13:17:51 | Araq | and then we continue |
13:18:04 | FromDiscord | <Clyybber> makes sense to me |
13:18:07 | Araq | like we do for the "quirky exceptions" |
13:18:19 | Araq | but only if currentExceptionB == nil |
13:18:42 | Araq | so we remember the first error and ignore the others |
13:18:43 | FromDiscord | <Clyybber> Hmm |
13:26:01 | Araq | the most common problem seems to be finally: destroy(a); destroy(b) |
13:26:25 | Araq | and if 'destroy(a)' raises it's better to destroy(b) than not to destroy it |
13:28:54 | * | Vladar joined #nim |
13:28:59 | * | marmotini_ quit (Remote host closed the connection) |
13:29:33 | * | marmotini_ joined #nim |
13:33:15 | * | marmotini_ quit (Read error: Connection reset by peer) |
13:33:28 | * | marmotini_ joined #nim |
13:36:33 | FromDiscord | <Clyybber> and if destroy(b) depends on destroy(a) succeeding? |
13:36:38 | FromDiscord | <Clyybber> And then will raise too |
13:37:54 | Araq | more likely: destroy(b) is independent |
13:38:00 | Araq | and can complete |
13:38:24 | Araq | most destructors are about memory, dealloc(mem) hardly can fail |
13:38:47 | Araq | so the chances are high we have destruction independence |
13:39:03 | FromDiscord | <Clyybber> Sure, I just wonder what happens in the above case |
13:40:50 | * | oculux joined #nim |
13:42:30 | * | marmotini_ quit (Remote host closed the connection) |
13:47:53 | Araq | btw here is a nice problem: |
13:48:19 | Araq | x.add x # sets x to nil because it's the last read |
13:48:25 | Araq | causing the 'add' to fail |
13:49:00 | FromGitter | <alehander92> huhmm |
13:49:01 | Araq | I'm not sure what it implies. that we must traverse nkCall backwards and forwards to determine 'lastReadOf'? |
13:54:05 | FromDiscord | <Clyybber> I think so |
13:54:22 | FromDiscord | <Clyybber> In general our lastReadOf analysis for nkCall needs to be very smart |
13:59:12 | * | marmotini_ joined #nim |
13:59:38 | * | Kaivo joined #nim |
14:00:20 | * | dddddd joined #nim |
14:00:51 | FromDiscord | <Fern & Simula (They/Them)> is there a compiletime version of `os.createDir()`? |
14:02:12 | Araq | why is everything done at CT these days? |
14:02:34 | Araq | are you all so happy with binaries that run nowhere else and encode /home/yournameHere |
14:03:25 | FromDiscord | <Fern & Simula (They/Them)> i'm a masochist |
14:03:31 | FromDiscord | <Fern & Simula (They/Them)> you gave us this power. you created monsters |
14:03:52 | FromDiscord | <Fern & Simula (They/Them)> also the code does literally everything at compiletime lmao |
14:08:36 | Araq | lol |
14:11:51 | FromDiscord | <Fern & Simula (They/Them)> it produces a binary that just exits :^) |
14:14:18 | PMunch | Haha, why? |
14:14:35 | FromDiscord | <mratsim> fun is a powerful driver :p |
14:16:25 | couven92 | Araq, compileTime is runtime complexity amortization. Since you don't count compileTime in runtime complexity you can technically write O(0) software that takes until the heat death of the universe to compile. That's fun! :D |
14:17:17 | * | sagax joined #nim |
14:19:34 | FromDiscord | <Rika> Programs that run by compiling |
14:19:39 | FromDiscord | <Rika> God, sounds terrible |
14:19:59 | FromDiscord | <Fern & Simula (They/Them)> it is |
14:20:18 | couven92 | @Rika no no! Running is only printing the answer! Compilation involves creating the answer! :P |
14:20:30 | FromDiscord | <Fern & Simula (They/Them)> i just compiled nim with nimHasLibFFI and it worked! except now i can't evaluate errno at compiletime :^) |
14:20:35 | FromDiscord | <Rika> I mean, you can print on compile though |
14:20:54 | FromDiscord | <Fern & Simula (They/Them)> printing is IO and thats side effects |
14:21:03 | couven92 | Right.... return STATUS_SUCCESS! |
14:21:06 | FromDiscord | <Fern & Simula (They/Them)> ~~ignore that im literally creating directories at compiletime with staticExec~~ |
14:22:44 | couven92 | "I like writing macros" basically means that you like writing code that produces more code... Hmmm.... |
14:23:24 | FromDiscord | <Rika> Make a program that writes nim code onto a file and then runs the nim compiler on that file |
14:23:27 | FromDiscord | <Fern & Simula (They/Them)> using macros and slurp to produce a quine |
14:23:33 | FromDiscord | <Rika> "runtime macros" |
14:23:38 | FromDiscord | <Fern & Simula (They/Them)> i've considered it tbh |
14:25:15 | * | nsf joined #nim |
14:28:57 | FromDiscord | <mratsim> Nim needs an official Xzhibit meme for compile-time/macros |
14:29:25 | * | prometheus2 quit (Quit: Leaving) |
14:30:30 | FromDiscord | <mratsim> in that vein https://pics.me.me/metadog-i-heard-you-like-c-metaprogramming-so-i-put-52315785.png / https://www.yesodweb.com/blog/2010/09/yo-dawg-template-haskell |
14:34:00 | Araq | bug https://github.com/nim-lang/Nim/issues/12964 looks like a pita |
14:34:02 | disbot | ➥ ARC/newruntime: Adding inherited var ref object to seq with base type causes segfault ; snippet at 12https://play.nim-lang.org/#ix=26hC |
14:35:16 | FromDiscord | <mratsim> I think you can deprecate inheritance and ask people to just do everythin at compile-time nowadays |
14:36:38 | lqdev[m] | don't |
14:36:44 | FromDiscord | <Fern & Simula (They/Them)> plz do not |
14:40:31 | FromDiscord | <Clyybber> Araq: How are loops encoded in the dfa? |
14:44:35 | * | PMunch quit (Quit: Leaving) |
14:54:38 | Araq | Clyybber: by Sutter's transformation |
14:54:52 | Araq | every loop is unrolled 3 times |
14:55:16 | Araq | some day we need to prove it's correct for our purposes but I'm quite sure |
15:00:31 | FromDiscord | <Clyybber> ah |
15:00:37 | FromDiscord | <Clyybber> that explains the bugs I was seeing |
15:01:01 | FromDiscord | <Clyybber> *am |
15:01:48 | * | abm joined #nim |
15:02:57 | Araq | hey, does that mean I'm wrong? :P |
15:03:32 | FromDiscord | <Clyybber> I don't think so, but it is tricky. |
15:03:33 | FromDiscord | <Clyybber> for i in 0..10: |
15:03:43 | FromDiscord | <Clyybber> var a = B() |
15:03:59 | FromDiscord | <Clyybber> I do have to generate sink here |
15:04:03 | FromDiscord | <Clyybber> or rather, destroy a |
15:04:09 | FromDiscord | <Clyybber> if its not zeroed out |
15:05:41 | FromDiscord | <Clyybber> Araq: With the loop unrolling var a = B() will occur 3 times right? |
15:06:01 | FromDiscord | <Clyybber> Or is the var a = B() extracted out of the loop? |
15:06:44 | Araq | it isn't |
15:06:58 | Araq | that it done later in injectdestructors.nim |
15:07:15 | Araq | however, there is a c.inLoop flag |
15:07:26 | FromDiscord | <Clyybber> Yeah, thats what cooldome was using |
15:07:27 | Araq | but you're right, it seems tricky |
15:08:02 | FromDiscord | <Clyybber> Araq: I know how it can be solved: Since we look to prove its a firstWrite or def, we gotta search from the end to top |
15:08:03 | * | abm quit (Quit: Leaving) |
15:08:24 | FromDiscord | <Clyybber> search for `var a = B()` that is |
15:08:26 | * | abm joined #nim |
15:09:16 | * | ng0_ joined #nim |
15:09:16 | * | ng0_ quit (Changing host) |
15:09:16 | * | ng0_ joined #nim |
15:10:09 | Araq | ok if you say so |
15:10:35 | Araq | all I know that reasoning from backwards is a mindfuck |
15:10:55 | FromDiscord | <Clyybber> heh |
15:11:11 | FromDiscord | <Clyybber> it works \o/ |
15:12:02 | * | ng0 quit (Ping timeout: 240 seconds) |
15:12:17 | FromGitter | <alehander92> Araq |
15:12:53 | FromGitter | <alehander92> i think jsffi should provide a `var` [] overload for JsAssoc similar to the table one in tables |
15:12:57 | FromGitter | <alehander92> should I PR eventually |
15:17:27 | FromDiscord | <Clyybber> Araq: Hey, the sink_counter in tmisc_destructor is now at zero |
15:18:52 | FromDiscord | <mratsim> reasoning from backward: foo(bar(baz(x))) instead of x.baz().bar().foo() |
15:20:50 | * | JustASlacker quit (Remote host closed the connection) |
15:23:09 | Araq | Clyybber: fine with me |
15:23:15 | Araq | alehander92: fine with me |
15:29:27 | Araq | I hope you know about |
15:29:29 | Araq | koch temp -d:toDebug=bug c --gc:arc -r temp |
15:30:11 | FromDiscord | <mratsim> what is this toDebug flag? |
15:33:22 | Araq | it outputs the DFA and AST after the injectdestructor pass for the proc named 'bug' |
15:35:03 | FromDiscord | <Clyybber> oooh, I always just manually changed toDebug in in injectdesctructor |
15:36:55 | FromDiscord | <mratsim> you should put a small compiler dev flags, I remember that there is a flag to output the semantic checking pass in YAML/tree format as well |
15:37:11 | FromDiscord | <mratsim> small README for compiler dev flags |
15:37:41 | FromDiscord | <Clyybber> grep strdefine |
15:39:08 | FromDiscord | <mratsim> there are booldefine as well |
15:39:11 | FromDiscord | <mratsim> and intdefine |
15:39:21 | FromDiscord | <Clyybber> hmm |
15:39:23 | FromDiscord | <Clyybber> right |
15:39:28 | FromDiscord | <mratsim> and some may not be aware of those |
15:39:42 | FromDiscord | <mratsim> knowledge on IRC is a bit tricky |
15:40:18 | FromDiscord | <Clyybber> declare the irc logs the official wiki |
15:40:18 | FromDiscord | <Clyybber> lol |
15:41:10 | * | ng0_ is now known as ng0 |
15:42:30 | Araq | bug #12964 is yours I think |
15:42:31 | disbot | https://github.com/nim-lang/Nim/issues/12964 -- 3ARC/newruntime: Adding inherited var ref object to seq with base type causes segfault ; snippet at 12https://play.nim-lang.org/#ix=26hC |
15:42:49 | Araq | it doesn't 'wasMoved(token)' because of the subtype relation |
15:43:02 | Araq | causing a double free |
15:44:32 | Araq | so ... now after these months I can definitely say that destructors are so much easier to debug than GC bugs that it's not even funny and I'll never write a GC in my life ever again :P |
15:46:36 | FromDiscord | <Clyybber> Araq: Where does subtype relation influence wasMoved generation?? |
15:47:13 | * | nsf quit (Quit: WeeChat 2.7) |
15:48:17 | * | leorize quit (Quit: WeeChat 2.6) |
15:53:22 | stefantalpalaru | What about performance? Very fine-grained garbage collection, like reference counting, usually has a higher overhead that state-of-the-art tracing strategies. |
15:53:34 | stefantalpalaru | *than |
15:55:39 | * | Vladar quit (Quit: Leaving) |
15:57:00 | FromDiscord | <mratsim> Better throughput than Boehm |
15:57:12 | stefantalpalaru | Also, isn't ARC the main cause of Swift's terrible performance? |
15:57:13 | FromDiscord | <mratsim> not sure where the benchmarks aare to reproduce though |
15:57:22 | FromDiscord | <mratsim> yes |
15:57:37 | FromDiscord | <mratsim> but implementation "details" matter 😉 |
15:58:01 | stefantalpalaru | This is what the JVM people were doing in 2004: https://www.infoq.com/articles/G1-One-Garbage-Collector-To-Rule-Them-All/ |
15:58:20 | stefantalpalaru | How far behind are we? |
15:58:45 | FromGitter | <deech> How do you call a function using UFCS when it's in another module? eg. I want to call `f` in module `m` with `a` and I can't do `a.m.f`, I also tried `a.`m.f`` |
15:59:14 | Yardanico | I think you can't |
15:59:28 | Yardanico | hm |
16:01:52 | stefantalpalaru | "Reference counting is simple, lends itself well to incremental collection, and the collection process tends to have good locality of reference, but it is rarely used in production garbage collectors for a number of reasons, such as its inability to reclaim unreachable cyclic structures (objects that reference each other directly or indirectly, like a circularly linked list or a tree that contains back-pointers to the parent node)." |
16:01:52 | stefantalpalaru | - https://www.ibm.com/developerworks/library/j-jtp10283/index.html |
16:02:10 | stefantalpalaru | "None of the standard garbage collectors in the JDK uses reference counting; instead, they all use some form of tracing collector." |
16:02:22 | Yardanico | well, there's a cycle collector in development for ARC afaik |
16:02:26 | Yardanico | in nim |
16:02:43 | stefantalpalaru | It's mandatory, since ARC in itself is not enough. |
16:05:10 | stefantalpalaru | Reference counting was introduced by a 1960 paper (section 2): https://www.seas.harvard.edu/courses/cs252/2016fa/16.pdf |
16:05:30 | stefantalpalaru | "McCarthy’s LISP does not originally allow cyclic data structures" |
16:05:53 | FromDiscord | <Clyybber> its not that hard to help destroy the cycle |
16:06:19 | FromDiscord | <Clyybber> and then you don't need a cycle collector |
16:08:32 | stefantalpalaru | So we're about 60 years behind CS research ;-) |
16:10:43 | Araq | thank you for lecturing me on thing I already know |
16:12:08 | * | marmotini_ quit (Ping timeout: 260 seconds) |
16:15:07 | FromDiscord | <Clyybber> stefantalpalaru: Nim provides you with `=` `=sink` and `=destroy` hooks so you can implement newer more specialized techniques yourself |
16:15:35 | Araq | I also studied every GC algorithm under the sun, they all trade memory for speed and assume a closed world where you know the roots. I dunno about you but in my world this GC_ref/unref business was rather unpleasant |
16:15:40 | FromDiscord | <Clyybber> And IMO its a good thing that the foundations we build upon are simple and deterministic |
16:18:42 | stefantalpalaru | Experiment with any GC algorithm you want, Araq, but don't make the mistake to consider your latest revelation a replacement for all the others. Keep the infrastructure for implementing and using various GCs well maintained, because you'll need it too, when you'll chase the next fad. |
16:22:03 | FromDiscord | <mratsim> it won't be replaced |
16:22:29 | FromDiscord | <mratsim> now, if you have a benchmark repo to share, it would be nice 🙂 |
16:23:11 | Araq | for me 'nim c -d:release --gc:arc tests/gc/gcbench' wins over Boehm, refc and mark&sweep |
16:23:37 | Araq | and the "GC latency" test has so low numbers that comparisons are ridiculous |
16:24:10 | FromDiscord | <Rika> how do i get a c-style switch statement (those with no breaks in them) in nim? |
16:24:28 | Araq | Rika: via a list of 'if' statements |
16:24:41 | FromDiscord | <Rika> ***aaaaaa*** |
16:24:50 | FromDiscord | <Rika> life is pain |
16:24:53 | FromDiscord | <Rika> okay thanks |
16:25:46 | stefantalpalaru | GC_ref/unref is a half-arsed public API that's only supported by less than half of Nim's GCs, without a generic fallback. I've seen it used in Nimbus-related projects, which means I can't test BoehmGC with it. |
16:26:12 | Araq | make it a nop for BoehmGC |
16:26:23 | stefantalpalaru | It already is and that's a problem. |
16:27:07 | Araq | well good to know, but my point about GC_ref was about the closed world assumption, C# has "object pinning" instead |
16:27:17 | stefantalpalaru | Because people use GC_ref() in the wild to make sure that a memory location won't be freed when doing fancy stuff with it, like passing it through the FFI. |
16:27:21 | Araq | which is not "half-arsed" but shows the very same problem |
16:27:46 | stefantalpalaru | So if GC_ref() is a no-op, it sabotages that assumption. |
16:27:52 | * | narimiran joined #nim |
16:28:52 | stefantalpalaru | I remember Zahary proposing a global array/seq that's a GC root where a generic GC_ref() could add these pointers that need protection. |
16:29:20 | stefantalpalaru | Would be the lesser evil, now that Nim users assume that all GCs support references. |
16:29:54 | FromDiscord | <Clyybber> hmm, thats an interesting idea actually |
16:30:46 | FromDiscord | <Fern & Simula (They/Them)> @Rika could always write a macro :P |
16:31:39 | FromDiscord | <Clyybber> if vs of, both have two characters |
16:31:42 | FromDiscord | <Clyybber> not that bad, is it? |
16:32:56 | Araq | you mean like https://github.com/nim-lang/Nim/blob/devel/lib/system/gc_ms.nim#L172 ? |
16:33:05 | Araq | how do you think GC_ref works? |
16:33:36 | stefantalpalaru | I want something generic that works for all GCs. What you linked only works in one. |
16:33:45 | stefantalpalaru | But yes, same mechanism. |
16:35:46 | FromDiscord | <mratsim> I sense @Rika is trying to implement Duff's Device |
16:36:14 | FromDiscord | <Clyybber> @StefanSalewski Why are you closing your issues? |
16:36:30 | FromDiscord | <Clyybber> Are they fixed? |
16:37:41 | Araq | it's likely a duplicate of the bug that I fixed |
16:38:13 | Araq | stefantalpalaru, I dunno why we need a generic mechanism when all we need is a patch for Boehm |
16:38:27 | FromDiscord | <Rika> i dont even know what duff's device is XD |
16:40:17 | stefantalpalaru | It's not just BoehmGC that doesn't support it. |
16:43:00 | stefantalpalaru | "--gc:refc|markAndSweep|boehm|go|none|regions" - out of these, I think only the first two (and gc2, was it renamed?) implement GC_ref(). |
16:44:25 | FromDiscord | <Fern & Simula (They/Them)> @Rika duff's device is an atrocity and i love it: https://en.wikipedia.org/wiki/Duff%27s_device |
16:44:41 | FromDiscord | <Fern & Simula (They/Them)> nowadays, you almost *never* need it because compilers optimize things |
16:45:14 | FromDiscord | <Rika> i just searched it |
16:45:25 | FromDiscord | <Rika> and "ok wtf" is my reaction |
16:46:08 | FromDiscord | <Fern & Simula (They/Them)> as it should be |
16:49:08 | disruptek | hearts and minds, people; hearts and minds! |
16:51:39 | FromDiscord | <Rika> im pretty confused, is that like an automessage or something disruptek |
16:53:56 | Yardanico | that's "something disruptek" |
16:54:30 | FromDiscord | <Rika> i mean "...something? disruptek" to ping him |
16:54:42 | FromDiscord | <Rika> or maybe "...something, disruptek?" |
16:54:52 | Yardanico | something? disruptek! |
16:55:31 | FromDiscord | <mratsim> You can use Duff's device to build coroutines by the way. https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html it might be even faster than greenlet (cc @treeform) |
16:55:41 | FromDiscord | <mratsim> it's very hacky |
16:56:12 | * | WilhelmV2nWeiner joined #nim |
16:56:13 | disruptek | trust your compiler. |
16:56:28 | * | WilhelmV2nWeiner quit (Remote host closed the connection) |
16:56:43 | disruptek | otherwise you're just raising a middle finger at everyone that comes after you. |
16:56:51 | FromDiscord | <Clyybber> @mratsim Is it used in libmill? For some reason I had that link open already |
16:57:11 | FromGitter | <alehander92> Araq we realized we need `[]: var V` only for reference js types in jsffi, i'll keep an eye on it |
16:57:16 | disruptek | !issue author:disruptek exception |
16:57:17 | disbot | https://github.com/nim-lang/Nim/issues/11081 -- 3DateTime field on Exception produces inconsistent C/++ handling 7& 2 more... |
16:57:18 | FromGitter | <alehander92> we can have* |
16:57:28 | disruptek | you can test that on --exceptions:goto |
16:57:29 | FromDiscord | <mratsim> not sure, I didn't check mill besides beside looking how many ASM file they required to support multiple platforms |
16:58:03 | FromDiscord | <Clyybber> hmm, I guess thats the "convinience" of having 400 tabs open |
16:58:13 | * | couven92 quit (Ping timeout: 260 seconds) |
16:59:53 | * | matic quit (Quit: Leaving) |
17:04:34 | stefantalpalaru | You need to get down to ASM to implement platform-specific efficient register saving on greenlet switch. |
17:06:06 | FromDiscord | <treeform> @mratsim yeah that's how many tutorials for build-a-scheme compilers do for call/cc. |
17:07:41 | FromDiscord | <treeform> @mratsim what drew me to cgreenlet is that stack trace remains "sane" and you can follow execution of the greenlet better. Should also work with c code that has no notion of stack switching it just gets plain boring stack... c code does not know it can be switched. |
17:08:04 | * | marmotini_ joined #nim |
17:09:09 | * | solitudesf quit (Quit: Leaving) |
17:09:32 | * | solitudesf joined #nim |
17:11:05 | FromDiscord | <mratsim> @araq is that normal that the gcbench takes only 27ms? that seems very prone to OS/background application noise |
17:11:30 | disruptek | coz |
17:16:59 | FromDiscord | <Clyybber> Araq: Tests are passing \o/: https://github.com/nim-lang/Nim/pull/13021 |
17:17:00 | disbot | ➥ Continue #13002 |
17:17:08 | * | nsf joined #nim |
17:23:10 | disruptek | 11081 currently produces a c++ error in `cpp --gc:arc`. |
17:25:20 | disruptek | stefantalpalaru: how about a tag for unittest2? |
17:26:19 | stefantalpalaru | Sure, disruptek. Hang on. |
17:26:29 | disruptek | whenever. and thanks. 😉 |
17:26:39 | disruptek | arnetheduck: how about a tag for result? |
17:27:12 | FromGitter | <alehander92> %search works clyybber |
17:27:13 | FromGitter | <alehander92> for firefox |
17:27:22 | FromGitter | <alehander92> search for shortcuts there they have many |
17:31:18 | stefantalpalaru | disruptek: unittest2-0.0.1 tagged. |
17:31:27 | disruptek | 🎉 |
17:32:02 | FromDiscord | <Clyybber> alehander92: I discovered that but typing coroutine into the search bar |
17:32:08 | FromDiscord | <Clyybber> the open tab that is |
17:36:21 | disruptek | stefantalpalaru: wow, is that a signed tag or what? |
17:36:51 | Araq | mratsim: it takes 0.3s on my machine |
17:37:25 | Araq | we should probably increase some numbers in there though :-) |
17:38:29 | stefantalpalaru | Yeah, disruptek, it's signed. |
17:38:43 | disruptek | awesome, you revealed a nimph bug. |
17:39:11 | disruptek | just output, but still. i don't have enough bugs. |
17:39:21 | stefantalpalaru | Created with `git tag -s -m "release 0.0.1" v0.0.1`. |
17:39:45 | disruptek | i'm about to impl signing because it's the only way to create tags with a given timestamp. |
17:40:09 | disruptek | (i want to be able to retroactively tag projects with correct timestamps.) |
17:42:31 | FromDiscord | <mratsim> I yes it's O.27 not 0.027 |
17:44:19 | Araq | it's reproducible for me though all the time and on two different machines |
17:45:06 | Araq | good enough for me to base Nim's future on it given that I spent about 5 years on this and always lost against Boehm :P |
17:45:22 | * | salewski joined #nim |
17:46:01 | salewski | 16:36:14 FromDiscord <Clyybber> @StefanSalewski Why are you closing your issues? |
17:46:03 | * | Kaivo quit (Quit: WeeChat 2.7) |
17:46:22 | * | Kaivo joined #nim |
17:46:26 | Araq | with 'nim cpp --cc=vcc' I got even better results |
17:46:39 | salewski | Well there are more important issues, rtree is really hard, and I have no idea what exactly is the problem... |
17:47:54 | salewski | And I was not able to reduce it to minimal examples. So I will wait a few weeks and try again then... |
17:48:34 | FromDiscord | <Clyybber> Ah ok |
17:48:49 | Araq | we have the test in our test suite already anyway |
17:49:16 | salewski | Maybe will try cdt again, araq has fixed one issue, so it may work. But I have to learn about cursor. |
17:49:21 | FromDiscord | <Clyybber> Araq: Can we merge this: https://github.com/nim-lang/Nim/pull/13021 |
17:49:22 | disbot | ➥ Continue #13002 |
17:49:24 | FromDiscord | <Clyybber> ? |
17:49:56 | Araq | do you really think our tests are good enough for this stunt? |
17:50:07 | FromDiscord | <Clyybber> Yeah, I think so 😄 |
17:50:17 | Araq | it's impressive they are green but you didn't add a carefully crafted one trying to break it |
17:50:22 | salewski | Araq, do you have latest version of rtree with bulkloading in test suite? |
17:50:45 | Araq | unlikely but I know you'll remember me |
17:50:48 | salewski | I think the bulkloading is the hard part for gc. |
17:51:00 | FromDiscord | <Clyybber> Araq: It breaks pretty easily when you change a thing, like replacing `<` in the while loop with `<=, |
17:51:00 | salewski | Bye. |
17:51:07 | FromDiscord | <Clyybber> salewski: Bye |
17:51:10 | Araq | bye |
17:51:15 | * | salewski quit (Quit: WeeChat 2.6) |
17:51:27 | FromDiscord | <Clyybber> Araq: But I'm pretty sure its correct now 😄 |
17:51:35 | FromDiscord | <Clyybber> At least I think its more solid that what we had before |
17:51:51 | Araq | how can init+=sink not be really solid? |
17:52:35 | disruptek | i think he means he understands it better. 😀 |
17:52:49 | FromDiscord | <mratsim> Somehow Weave on windows is really slow, and it's not just the tlsEmulation |
17:52:49 | Yardanico | lol |
17:53:04 | FromDiscord | <mratsim> I think Windows memory management needs different assumptions |
17:53:20 | disruptek | well, you can start by assuming it will be slow. |
17:53:42 | FromGitter | <deech> Which Windows compiler? |
17:53:43 | FromDiscord | <mratsim> even the mimalloc paper had some paragraph about how different windows reserve memory |
17:53:49 | FromDiscord | <mratsim> all |
17:53:54 | * | marmotini_ quit (Remote host closed the connection) |
17:54:04 | FromDiscord | <Clyybber> Araq: Solid is the wrong word I guess. But I'd rather use the dfa for this kind of stuff |
17:54:27 | * | marmotini_ joined #nim |
17:56:59 | * | marmotini_ quit (Remote host closed the connection) |
17:57:15 | * | marmotini_ joined #nim |
17:58:06 | Araq | clyybber: any chance we can mark the PNodes in a single pass? |
17:58:29 | Araq | instead of quering the DFA for every single variable? |
18:02:32 | FromDiscord | <Clyybber> Hmm, maybe, but we call it from the p()/moveOrCopy() procs so I think it will be a bit complicated. |
18:02:32 | * | couven92 joined #nim |
18:04:43 | FromDiscord | <Clyybber> Definitely a thing we should keep in mind, if the compile times are bad. But I don't think its worth it rn. |
18:05:09 | FromDiscord | <Clyybber> Definitely a thing we should keep in mind, if the compile times get worse. But I don't think its worth it rn. |
18:05:31 | FromDiscord | <Clyybber> ah, sorry for the edit, discord understands s/../.. apparently |
18:08:40 | Araq | use IntSets and compute it once for all variables/instructions in one pass |
18:09:01 | Araq | anyhow, I'll let you sleep over it and merge it tomorrow |
18:09:10 | FromDiscord | <Clyybber> cool, thanks |
18:09:53 | FromDiscord | <Clyybber> Araq: Hmm, so I recurse twice? |
18:10:22 | FromDiscord | <Clyybber> First with pCollectVars and then with p? |
18:11:22 | * | JustASlacker joined #nim |
18:12:02 | Araq | no you move from N-1 to 0 over the DFA marking the first writes in a HashSet[(PSym, PNode)] |
18:12:21 | FromDiscord | <Clyybber> Aah, I see. |
18:12:33 | FromDiscord | <Clyybber> Yeah, we could do the same for last read right? |
18:12:39 | Araq | yep |
18:12:47 | FromDiscord | <Clyybber> Ok, I'll try it |
18:12:57 | * | Vladar joined #nim |
18:12:58 | Araq | though last read is easier as the forward pass that we currently do |
18:22:42 | * | oculux quit (K-Lined) |
18:24:31 | FromDiscord | <Clyybber> Araq: What to do about otherRead though.. |
18:25:39 | FromDiscord | <Clyybber> Hmm, I could always point to the true last read then |
18:25:46 | FromDiscord | <Clyybber> The error message that is |
18:28:14 | Araq | ah bummer |
18:28:15 | FromDiscord | <Clyybber> I think I will need a ordered set, since there could be multiple lastReads of a variable and then you would want the error message in a case where `=`{.error.} to point to the right one.. |
18:28:25 | Araq | bah |
18:28:30 | Araq | well |
18:28:42 | Araq | for the error message we can always run the DFA once again |
18:28:59 | FromDiscord | <Clyybber> Hmm, right |
18:29:01 | Araq | it doesn't matter how slow it is since afterwards we're done with the compilation anyway |
18:29:06 | FromDiscord | <Clyybber> Yeah |
18:30:39 | * | nsf quit (Quit: WeeChat 2.7) |
18:36:14 | * | marmotini_ quit (Remote host closed the connection) |
18:36:47 | * | marmotini_ joined #nim |
18:37:18 | FromDiscord | <Clyybber> Araq: Since there can be multiple reads it might make more sense to have a set which contains PNodes indexed by PSyms |
18:38:00 | FromDiscord | <Clyybber> *multiple last reads |
18:38:01 | FromDiscord | <mratsim> (when an official compiletime Hash for NimNode) |
18:38:57 | FromDiscord | <Clyybber> Not a set, sorry, more like a sparse array indexed by PSyms |
18:39:05 | Araq | mratsim: equality on NimNodes is tricky and the hash function must always reflect the equality |
18:39:37 | FromDiscord | <Clyybber> Araq: What I want is store a seq of PNodes for a given PSym |
18:39:56 | FromDiscord | <Clyybber> Hmmm |
18:39:58 | FromDiscord | <mratsim> for me they are ref objects so you can just use their address |
18:40:13 | FromDiscord | <Clyybber> Yeah, but I'm not sure its safe to rely on that |
18:40:24 | FromDiscord | <Clyybber> Their adresses being the same that is |
18:40:50 | * | marmotini_ quit (Ping timeout: 240 seconds) |
18:40:54 | Araq | mratsim: if there is one thing in the Nim compiler I long to change it's this. |
18:41:05 | Araq | 'refs' everywhere |
18:41:25 | FromDiscord | <mratsim> apparently that worked for java :p |
18:41:28 | Araq | causes aliasing problems and GC pressure |
18:42:41 | FromDiscord | <mratsim> anyway, compile-time hashtable and sets are quite useful and currently everyone needs to rediscover how to hash the NimNode. |
18:42:58 | disruptek | it always feels like an abstraction that exists to get around the fact that you need some way to get around the abstraction. |
18:43:05 | FromDiscord | <mratsim> I have my scheme that seems to work, but something in sugar/macro would be useful for others |
18:43:25 | FromDiscord | <mratsim> That's called Gang of Four 😉 |
18:43:34 | FromDiscord | <mratsim> or design patterns |
18:45:33 | * | notevil left #nim (#nim) |
18:46:52 | FromDiscord | <Clyybber> How does a hashset with seq work? Does it hash the seqs adress or its contents? |
18:48:56 | FromDiscord | <Clyybber> Its contents as it seems 😦 |
18:49:10 | FromDiscord | <Clyybber> Which is how it should work, but not how I need it to work rn 😄 |
18:54:53 | FromDiscord | <mratsim> wrap in a custom type and pass the seq.addr as a Hash |
18:55:37 | FromDiscord | <Clyybber> Yeah, that will work. |
18:57:22 | Araq | excuse me? seqs can be reallocated |
18:57:52 | disruptek | relax, this only needs to work in the tests. |
18:57:52 | Araq | seq.addr as the hash is a terrible idea and so is seq[0].addr |
18:58:26 | * | JustASlacker quit (Ping timeout: 240 seconds) |
18:59:49 | FromDiscord | <Clyybber> Araq: How to store various PNodes for PSyms then? I guess I could do seq[(PSym, seq[PNode])] |
19:00:33 | FromDiscord | <Clyybber> And then search for the appropriate PSym everytime |
19:00:37 | FromDiscord | <Clyybber> not exactly great either |
19:01:12 | Araq | I usually use Table[int, T] and sym.id as the key |
19:01:29 | Araq | if that's your question |
19:02:12 | FromDiscord | <Clyybber> Ah, yeah, That should work. thanks |
19:02:35 | FromDiscord | <Clyybber> forgot about sym.id |
19:04:59 | disruptek | atoz works with --gc:arc 👍 |
19:05:01 | FromDiscord | <Clyybber> What is interesting is that after a lastRead the next write can be considered a firstWrite |
19:05:15 | FromDiscord | <Clyybber> At least in theory |
19:05:40 | Araq | hmm indeed, good point |
19:05:43 | Araq | ... CMake Error at CMakeLists.txt:15 (CMAKE_MINIMUM_REQUIRED): |
19:05:43 | Araq | ... CMake 3.5.1 or higher is required. You are running version 3.1.0 |
19:05:43 | Araq | ... -- Configuring incomplete, errors occurred! |
19:05:54 | Araq | disruptek, :-( |
19:05:59 | Araq | cmake requirements? |
19:06:09 | disruptek | blame libgit2. |
19:07:32 | disruptek | also, don't use HEAD right now. i'm still porting it to gittyup-2. |
19:10:07 | * | laaron quit (K-Lined) |
19:12:21 | * | JustASlacker joined #nim |
19:19:15 | Araq | what to use instead? |
19:19:23 | Araq | and does it run on Windows? |
19:19:23 | disruptek | 0.6.6 |
19:19:33 | disruptek | CI says it does. |
19:19:58 | * | JustASlacker quit (Quit: Leaving) |
19:20:49 | disruptek | actually, i don't even know if the tests build nimph. seems like an oversight. |
19:20:58 | Araq | Success: nimph installed successfully. |
19:21:12 | disruptek | i don't believe it. with no symlinks? |
19:21:31 | FromDiscord | <mratsim> is `=destroy` respected when we don't pass any specific flags on devel? |
19:22:01 | FromDiscord | <mratsim> ah yes it is, I remember the =sink bug |
19:22:07 | Araq | mratsim: yes, however |
19:22:15 | Araq | the old seqs do not respect it |
19:22:30 | * | Jjp137 quit (Ping timeout: 265 seconds) |
19:25:29 | * | couven92 quit (Ping timeout: 268 seconds) |
19:27:17 | * | chemist69 quit (Ping timeout: 260 seconds) |
19:28:17 | * | chemist69 joined #nim |
19:30:57 | * | endragor quit (Remote host closed the connection) |
19:33:36 | * | laaron joined #nim |
19:44:40 | disruptek | openapi works under arc, no changes. |
19:45:37 | FromDiscord | <Clyybber> nice |
19:45:43 | Araq | great :-) |
19:46:20 | Araq | Clyybber: I have a node of kind nkObjDownConv but injectdestructors.nim doesn't touch it, any idea? |
19:46:34 | Araq | and by that i mean the explicit cases dealing with nkObjDownConv are not triggered |
19:50:44 | FromDiscord | <Clyybber> Araq: Hmm, not sure, does it not even touch its childs? |
19:52:10 | FromGitter | <Albus70007> how do you convert an string to int16? |
19:52:12 | FromDiscord | <Clyybber> Argh, the loop unrolling makes this really tricky |
19:52:26 | FromDiscord | <Clyybber> Albus70007: Do you mean parsing the content? |
19:52:36 | FromDiscord | <Clyybber> Or literally converting a two byte string to an int16? |
19:52:49 | Araq | feel free to change the loop unrolling and add an loop opcode |
19:53:04 | Araq | opcForkLoop or something like that |
19:53:22 | FromDiscord | <Clyybber> Hmm, maybe c.inLoop will be good enough |
19:53:32 | FromDiscord | <Clyybber> ah nope. |
19:53:39 | FromGitter | <Albus70007> clybber, could you show me both ways just in case? |
19:55:11 | FromDiscord | <Clyybber> Albus70007: Sure, for parsing: `someInt = parseInt(someString).int16` and for converting `someInt = cast[int16](someString[0])` |
19:55:33 | FromDiscord | <Clyybber> Not sure if that last one really works, with alignment and stuff |
19:56:02 | FromGitter | <Albus70007> ok, ill tell you if it works |
19:58:37 | FromDiscord | <Clyybber> Araq: Do you have a link to herb sutters claim? |
19:58:51 | FromDiscord | <Clyybber> Maybe that will enlighten me |
19:59:22 | FromDiscord | <mratsim> by the way, the fact that `=` is applied for the init/newFoo proc is a bit annoying |
20:00:12 | FromDiscord | <Clyybber> special casing it would be even more annoying I think |
20:00:27 | FromDiscord | <mratsim> constructors would not have this issue 😉 |
20:00:42 | FromDiscord | <mratsim> not sure of the baggage they bring though |
20:02:23 | Araq | mratsim: in devel that's not true anymore |
20:02:53 | Araq | we optimize the =sink to a copyMem |
20:02:57 | FromDiscord | <Clyybber> true |
20:04:18 | Araq | and it would really be nice if 2020 were the year of fewer snarky, but incorrect remarks |
20:07:19 | * | Jesin quit (Quit: Leaving) |
20:07:33 | FromDiscord | <Clyybber> Araq: We could also encode a loop as a fork with a negative dest and handling that via comesFrom |
20:08:10 | Araq | no matter how you encode it, you need to watch out for not running into endless loops |
20:08:29 | Araq | the unrolling solves that in the most elegant way imaginable |
20:09:34 | FromDiscord | <Clyybber> oh |
20:09:51 | FromDiscord | <Clyybber> the example I had in my head that I thought wouldn't work with unrolling works |
20:09:56 | FromDiscord | <Clyybber> I think |
20:10:02 | FromDiscord | <Clyybber> It went something like this: |
20:10:13 | FromDiscord | <Clyybber> while true: |
20:10:23 | FromDiscord | <Clyybber> var a = ... |
20:10:38 | FromDiscord | <Clyybber> sinkingProc(a) |
20:11:00 | FromDiscord | <Clyybber> But that shouldn't be a problem now that I think about it |
20:11:44 | Araq | it even says |
20:11:46 | Araq | starting point for token() is 3 nkObjDownConv |
20:12:00 | Araq | so it does handle nkObjDownConv, somehow |
20:12:04 | FromDiscord | <Clyybber> hmmm |
20:12:56 | Araq | isAnalysableFieldAccess() also handles it, maybe it's done there |
20:14:21 | FromDiscord | <mratsim> Did I miss something obvious? https://play.nim-lang.org/#ix=26jE |
20:14:44 | FromDiscord | <Clyybber> Ah, the bad example is ``` |
20:14:45 | FromDiscord | <Clyybber> while true: |
20:14:45 | FromDiscord | <Clyybber> var a = ... |
20:14:45 | FromDiscord | <Clyybber> dontSink(a) |
20:14:45 | FromDiscord | <Clyybber> ``` |
20:15:29 | Araq | mratsim: also give it a =sink |
20:16:18 | Araq | and the optimization was merged today so dunno if the playground already has it |
20:16:44 | FromDiscord | <mratsim> I'll update on my machine, it's showstopper for me :/ |
20:18:01 | FromDiscord | <Clyybber> @mratsim x is global, thus it is not sinked |
20:18:21 | FromDiscord | <mratsim> but why would it loop? |
20:18:22 | FromDiscord | <Clyybber> Even if you make initBars argument a sink arg |
20:18:33 | FromDiscord | <Clyybber> @mratsim Because you call `=` ? |
20:18:42 | FromDiscord | <mratsim> system.`=` |
20:19:10 | FromDiscord | <Clyybber> Doesn't matter I think. Its a type bound op |
20:19:25 | FromDiscord | <mratsim> in the past you could escape the overloading with system.= |
20:19:37 | FromDiscord | <Clyybber> hmm, maybe I'm wrong |
20:20:30 | FromDiscord | <Clyybber> @mratsim https://play.nim-lang.org/#ix=26jG |
20:20:49 | Araq | mratsim: ouch, that's caused by "fix" |
20:21:01 | Araq | easy to revert though |
20:21:29 | FromDiscord | <mratsim> strange, so it's the fact that it's a global |
20:21:39 | FromDiscord | <Clyybber> yeah, globals don't get analyzed |
20:21:41 | FromDiscord | <mratsim> it happens on the current devel as well |
20:22:06 | FromDiscord | <mratsim> I see, it's an issue because it's for a type that users can manipulate. |
20:22:22 | FromDiscord | <mratsim> I'll open an issue on the tracker |
20:22:36 | Araq | ok, thanks |
20:25:28 | FromDiscord | <mratsim> and so it seems like with locals initial assignment doesn't trigger the `=` (due to the lack of sink I guess) |
20:26:30 | * | nsf joined #nim |
20:29:07 | * | Kaivo quit (Quit: WeeChat 2.7) |
20:35:54 | * | couven92 joined #nim |
20:40:50 | FromDiscord | <Clyybber> Araq: When is `dest == comesFrom` false?? |
20:41:17 | * | couven92 quit (Ping timeout: 265 seconds) |
20:43:33 | FromDiscord | <mratsim> ugh, this is ugly, when using both `=sink` and `=` I have to forward declare one of them otherwise I get: Error: cannot bind another '=' to: ProducersLoopPromises; previous declaration was constructed here implicitly: .../nim-#devel/lib/system.nim(471, 16) |
20:45:48 | FromDiscord | <Clyybber> Araq: I don't get how the loop unrolling was even working till now: ``` |
20:45:48 | FromDiscord | <Clyybber> if cond: |
20:45:48 | FromDiscord | <Clyybber> body |
20:45:49 | FromDiscord | <Clyybber> if cond: |
20:45:49 | FromDiscord | <Clyybber> body |
20:45:49 | FromDiscord | <Clyybber> if cond: |
20:45:49 | FromDiscord | <Clyybber> body |
20:45:49 | FromDiscord | <Clyybber> ``` |
20:46:05 | FromDiscord | <Clyybber> When body is an assignment the last body would have been sinked no? |
20:47:50 | FromDiscord | <mratsim> see: https://github.com/nim-lang/Nim/issues/13025 |
20:47:52 | disbot | ➥ Forced to forward declare when overloading `=` and `=sink` ; snippet at 12https://play.nim-lang.org/#ix=26jR |
20:54:10 | * | Kaivo joined #nim |
20:55:33 | FromDiscord | <mratsim> @Clyybber I think you trick doesn't work across modules or something :/ I still get the infinite recursion here: https://github.com/mratsim/weave/blob/dataflow-graph-parallelism/weave/datatypes/promises.nim#L119 |
20:57:18 | FromDiscord | <Clyybber> Makes sense, producers can't be sinked as its accessed later on |
20:59:05 | FromDiscord | <mratsim> ah no |
20:59:17 | FromDiscord | <mratsim> it doesn't work if you add a `=sink` |
20:59:31 | FromDiscord | <mratsim> your stuff works across modules but I can't add a sink |
21:01:04 | FromDiscord | <mratsim> https://github.com/nim-lang/Nim/issues/13024#issuecomment-570696820 |
21:01:07 | disbot | ➥ Assignment overloading for globals: infinite recursion even with system.`=` ; snippet at 12https://play.nim-lang.org/#ix=26jV |
21:03:51 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
21:04:59 | FromDiscord | <mratsim> and I have a third infinite loop because removing the sink is not enough in my codebase |
21:08:26 | * | ng0 quit (Remote host closed the connection) |
21:09:54 | * | ng0 joined #nim |
21:09:54 | * | ng0 quit (Changing host) |
21:09:54 | * | ng0 joined #nim |
21:17:09 | Araq | the infinite loop is a new regression caused by cooldome's sempass2 patch |
21:17:27 | Araq | it's a one line fix, however |
21:18:02 | Araq | please understand that calling system.`=` inside your own `=` is not in our test suite for a reason |
21:18:25 | Araq | you're supposed to have a 'ptr' inside your object and use fieldwise assignments |
21:18:37 | Araq | because why else would you ever overload '='? |
21:19:23 | FromDiscord | <Clyybber> Araq: Do you know the answer to why the loop unrolling doesn't cause issues with isLastRead? |
21:19:39 | * | ehmry joined #nim |
21:20:48 | FromDiscord | <Clyybber> Ah, its special cased |
21:20:57 | FromDiscord | <Clyybber> Basically, hmmm |
21:21:19 | FromDiscord | <Clyybber> Yeah, I think a loop instruction is really the best way to go about this |
21:21:42 | Araq | agreed, the factor of 3 for every loop body can't be too wise |
21:22:02 | Araq | for long procs with nested loops |
21:22:09 | Araq | :-) |
21:22:16 | * | Jjp137 joined #nim |
21:24:00 | FromDiscord | <Clyybber> hehe zevv |
21:24:21 | FromDiscord | <mratsim> isn't that how I'm supposed to do atomic refcounting? https://github.com/mratsim/weave/blob/dataflow-graph-parallelism/weave/datatypes/promises.nim#L73-L76 |
21:28:53 | Araq | no, you should do |
21:29:03 | Araq | dst.p = src.p |
21:29:04 | Araq | instead |
21:29:17 | * | MightyJoe quit (Ping timeout: 258 seconds) |
21:30:00 | Araq | and your =sink is also incorrect, you need to destroy dst first before overwriting the pointer |
21:31:38 | Araq | and your destructor needs to check for prom.p != nil |
21:32:14 | FromDiscord | <Clyybber> Araq: So basically I generate ``` |
21:32:15 | FromDiscord | <Clyybber> loop: |
21:32:15 | FromDiscord | <Clyybber> cond |
21:32:15 | FromDiscord | <Clyybber> body |
21:32:15 | FromDiscord | <Clyybber> join loop |
21:32:15 | FromDiscord | <Clyybber> ... |
21:32:16 | FromDiscord | <Clyybber> ``` |
21:32:31 | Zevv | clybber: zup? |
21:32:36 | FromDiscord | <mratsim> if it's nil there is a count of zero |
21:32:42 | ldlework | mratsim, is there anyway to interact or fine-tune gpt2 models with arraymancer |
21:32:44 | FromDiscord | <Clyybber> But its a bit wrong, since cond gets in both cases no? |
21:32:47 | FromDiscord | <mratsim> it's a bug if there is a refcount of 1 |
21:33:04 | Araq | plus your refcounting is slow, there is no need to fetchSub the RC for the common case of uniqueness |
21:33:06 | FromDiscord | <Clyybber> Zevv: Sup, was just thinking of npeg when araq said long procs with nested loops 😄 |
21:33:36 | FromDiscord | <mratsim> @Idlework, no, I didn't work on deep-learning related Arraymancer stuff for the past year. Not enough time :/ |
21:33:39 | * | cyraxjoe joined #nim |
21:33:51 | Araq | Clyybber: 'join loop'? how about 'goto loop'? |
21:34:12 | FromDiscord | <mratsim> My idea was to write a compiler so that I could implement things faster (especially gradient), but then I had trouble with multithreading and it's a rabbit hole |
21:34:13 | FromDiscord | <Clyybber> Araq: Oh, but loop is a fork? |
21:34:22 | FromDiscord | <Clyybber> What would the difference be? |
21:34:44 | FromDiscord | <Clyybber> I don't want to make it recurse infinitely |
21:34:48 | * | ng0 quit (Quit: leaving) |
21:34:53 | Araq | a fork is paired with a join |
21:35:04 | FromDiscord | <Clyybber> Yeah, and loop is a variation of fork |
21:35:10 | Araq | you don't have a fork, ergo it can only be a 'goto' |
21:35:20 | Araq | oh you mean 'loop' is a new opcode? |
21:35:25 | FromDiscord | <Clyybber> Yeah |
21:35:31 | Araq | I thought it's a label |
21:35:32 | ldlework | mratsim have you seen AI Dungeon |
21:35:34 | Araq | hmm ok |
21:35:47 | FromDiscord | <mratsim> So the next best thing is once Weave is ready for use with Arraymancer, I'll change the internals so that you can convert to numpy/pytorch (including GPU) without copy |
21:36:00 | Araq | better use loop and joinLoop maybe |
21:36:04 | FromDiscord | <mratsim> this hopefully will unblocks people |
21:36:32 | FromDiscord | <mratsim> no I don't know AI dungeon |
21:37:01 | ldlework | mratsim, someone fine-tuned the largest GPT2 model on choose-your-own-adventure material and made an infinite text-adventure |
21:37:04 | ldlework | it's surprisingly good |
21:37:14 | FromDiscord | <mratsim> ah looks interesting |
21:37:20 | ldlework | eerily uncanny sometimes how well it understands some things you say |
21:37:34 | disruptek | how the heck did mratsim escape learning about ai dungeon. |
21:37:42 | FromDiscord | <Clyybber> I saved my first run |
21:37:52 | FromDiscord | <Clyybber> Because it was very... interesting |
21:37:52 | Araq | maybe he is working |
21:37:54 | FromDiscord | <mratsim> if you want to work with transformers right now, I recomment huggingfaces |
21:38:33 | FromDiscord | <Clyybber> Araq: Hmm, ok, It cant cause ambiguities though, and I guess less instructions == better ? |
21:38:52 | FromDiscord | <mratsim> (matrix multiplications disagree) |
21:46:22 | * | ng0 joined #nim |
21:46:22 | * | ng0 quit (Changing host) |
21:46:22 | * | ng0 joined #nim |
21:46:34 | Araq | https://github.com/nim-lang/Nim/pull/13023 give Timothee some credit |
21:46:36 | disbot | ➥ maybe: allows optional chaining of field access and indexing when LHS i snil ; snippet at 12https://play.nim-lang.org/#ix=26k9 |
21:47:01 | Araq | by telling him your opinion |
21:47:58 | Araq | remarkable piece of code |
21:48:21 | Araq | it's more beautiful than Swift's builtin support |
21:50:54 | FromGitter | <timotheecour> haha thx, so I’ll close the superseded one then https://github.com/nim-lang/Nim/pull/13014 |
21:50:56 | disbot | ➥ [superseded] add `.?` operator for optional chaining: allows field access even with nil objects ; snippet at 12https://play.nim-lang.org/#ix=26k9 |
21:51:41 | disruptek | i like it, i just think it needs an operator so the syntax is more notable. |
21:53:18 | FromGitter | <timotheecour> problem with using an operator is it’d require parser/lexer changes (see PR for details) ; can always be done in subsequent PR’s if needed but for now we have a solution wo such invasive changes |
21:53:36 | disruptek | i get it, i'm just sad about it. 😉 |
21:54:03 | disruptek | doesn't need to be the last impl, just the first. |
21:55:13 | FromGitter | <timotheecour> now, if only https://github.com/nim-lang/Nim/pull/11992 could get some reviewer attention … that would be truly great -:) |
21:55:15 | disbot | ➥ every symbol becomes 1st class; defines 0-cost lambda and aliases; inline iterators/templates/etc can be passed to any routine ; snippet at 12https://play.nim-lang.org/#ix=250A |
21:56:32 | FromGitter | <deech> Dumb q, is there something in the standard lib that let's me chain iterators? |
21:56:40 | FromGitter | <deech> I'm doing `to |
21:56:42 | disruptek | nope. |
21:56:44 | FromGitter | <deech> Seq` all the time. |
21:56:54 | FromGitter | <deech> ok, thanks. |
21:57:22 | disruptek | are you afraid of dependencies? |
21:57:55 | FromGitter | <deech> No, just don't know the std. lib well enough to know if I'm missing something. Which one do you recommend? |
21:57:55 | Araq | deech: sugar.collect, new in devel |
21:58:19 | FromGitter | <deech> ooooh |
21:58:27 | disruptek | zero-functional might be more to taste. |
21:58:38 | Araq | timotheecour: that's exactly the stuff that caused us so much pain over the years |
21:59:00 | Araq | it's "only" a new type I don't understand |
21:59:07 | Araq | *cough* tyTypeDesc |
21:59:45 | FromDiscord | <Clyybber> It feels like a workaround IMO |
22:00:27 | FromGitter | <timotheecour> what do you mean? you mean `tyAliasSym` (from 11992) or `tyTypeDesc` ? |
22:00:39 | Araq | if you want aliases and templates are not good enough, can't we improve templates so that they do work? |
22:00:54 | Araq | tyAliasSym, yes |
22:01:20 | Araq | the aliasing handling in lookups.nim that you built upon is dead code |
22:01:39 | Araq | I mean, it's not dead yet |
22:01:56 | Araq | but iirc I can remove it since .deprecated is deprecated |
22:01:57 | FromGitter | <timotheecour> I’ve explored the template route extensively, it’s a dead end that is inherently ambiguous and cannot be fixed |
22:02:08 | Araq | aha |
22:02:14 | Araq | why? |
22:02:53 | FromGitter | <timotheecour> lots of edge cases; eg can’t alias a number of things (eg templates w all default params, certain iterators etc) |
22:03:43 | FromGitter | <timotheecour> furhtermore, u can’t pass a template to a proc/generic; so u can’t do the thing i’m doing in `speed benefit` section |
22:06:29 | Araq | alright, so assuming skAlias stays but isn't it enough, why has this to become a *type* |
22:06:54 | Araq | types are more complex than anything else in Nim |
22:07:49 | Araq | and already getType() is a pita to use where you need to care about all these edge cases when in reality at runtime it's just a bunch of integers and pointers |
22:08:41 | FromGitter | <timotheecour> makeing it a type is what allows you to forward a template to a proc/generic as I’m doing in here eg: ⏎ ⏎ ```func isSorted2*[T, Fun](a: openArray[T], cmp: Fun): bool = … ⏎ isSorted2(s, (a,b)~>a<b)``` [https://gitter.im/nim-lang/Nim?at=5e0fbb69865af87363b3c4db] |
22:08:49 | FromDiscord | <mratsim> Ok I've fixed my `=` and `=sink` woes, thanks |
22:09:28 | Araq | mratsim: your refcounting is still a bit bad though, start with RC == 0, and don't decref for the common case |
22:09:54 | Araq | if atomicRead(rc) == 0: dealloc(p) |
22:10:00 | Araq | else: atomicDec(rc) |
22:10:25 | Araq | is how to do reference counting |
22:12:10 | FromDiscord | <mratsim> Well I just copy pasted boost: https://www.boost.org/doc/libs/1_57_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters |
22:12:45 | Araq | well maybe I researched it for a couple of years |
22:13:02 | * | Trustable quit (Remote host closed the connection) |
22:16:26 | Araq | Boost cannot do it this way because they also have to support weak_ptr iirc |
22:17:49 | FromDiscord | <mratsim> well your way makes sense, loads are much cheaper than a moRelease fetchSub |
22:23:19 | * | oculux joined #nim |
22:24:19 | FromDiscord | <Clyybber> Araq: Sorry for the dumb question, but I think I need to define a hash proc for PSym, at least thats what the compiler tells me when trying to use HashSet[(PSym, PNode)] |
22:29:42 | * | narimiran quit (Quit: leaving) |
22:33:40 | * | couven92 joined #nim |
22:33:59 | * | a_b_m joined #nim |
22:34:38 | * | gangstacat quit (Quit: Ĝis!) |
22:35:14 | * | a_b_m quit (Client Quit) |
22:35:31 | * | jjido joined #nim |
22:36:13 | * | abm quit (Ping timeout: 268 seconds) |
22:37:10 | * | gangstacat joined #nim |
22:38:10 | * | NimBot joined #nim |
22:40:10 | * | lritter quit (Quit: Leaving) |
22:42:54 | * | smitop joined #nim |
22:45:44 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:47:40 | FromGitter | <zetashift> those server costs for AI Dungeon tho, yikes |
22:49:56 | skrylar[m] | it comes from a family of developers who think better design is dumb just brute force it with more cycles :shrug: |
22:50:09 | * | Vladar quit (Quit: Leaving) |
22:50:17 | FromDiscord | <mratsim> what does? |
22:50:32 | skrylar[m] | ai dungeon is from GPT which is an obscenely large network |
22:50:53 | FromDiscord | <mratsim> well yes, natural language processing is very complex |
22:51:00 | FromDiscord | <mratsim> the only rule is that there are no rules |
22:51:12 | FromDiscord | <mratsim> learning the absence of rules is pretty much wild wild west 😉 |
22:51:19 | skrylar[m] | hmm i dunno i haven't seen google or openai working on primitives |
22:51:29 | skrylar[m] | usually they throw out some huge network and then someone smaller makes the same thing work on half the hardware |
22:51:39 | skrylar[m] | there was uhh |
22:51:50 | FromDiscord | <mratsim> Yes that's what happened with squeezenet |
22:51:55 | FromDiscord | <mratsim> and mobilenet |
22:51:55 | skrylar[m] | baidu super optimized a wavenet impl and then others made that lighter wavernn and later glow |
22:52:14 | FromDiscord | <mratsim> PyTorch Glow is in limbo state right now |
22:52:33 | skrylar[m] | i haven't read any new papers the past year or so |
22:52:45 | FromDiscord | <mratsim> PyTorch Glow is supposed to be a JIT but PyTorch v1.0 was released with another JIT |
22:52:59 | FromDiscord | <mratsim> so i'm not sure what the glow team is doing |
22:53:26 | FromDiscord | <mratsim> and Google stoled many core devs from Facebook |
22:53:27 | skrylar[m] | https://github.com/NVIDIA/waveglow i think this was the one i read about last |
22:53:38 | FromDiscord | <mratsim> ah I didn't know about this one |
22:54:10 | skrylar[m] | yeh there is a WaveRNN which i think is much smaller than wavenet? and then waveglow also came out and was supposed to be very good for less compute |
22:54:29 | skrylar[m] | my general impression is the big boys are just brute forcing random shit with their huge budget and letting the rest of the industry make it actually useful |
22:54:38 | * | solitudesf quit (Ping timeout: 260 seconds) |
22:54:40 | skrylar[m] | but then nobody hears about the smaller ones :rofl: |
22:54:42 | FromDiscord | <mratsim> Google is guilty of that |
22:54:59 | FromDiscord | <mratsim> they call something that can be trained on "only" 16 GPUs a small network |
22:55:01 | skrylar[m] | well also things like mycroft and mozilla are using tacocron because why |
22:55:20 | skrylar[m] | oh well. i wrote voiceloop in arraymancer once but i kept hitting bugs |
22:55:40 | FromDiscord | <mratsim> For RNN Arraymancer has many problems |
22:55:48 | FromDiscord | <mratsim> one it only has GRUs |
22:55:57 | FromDiscord | <mratsim> 2, OpenMP makes it slower |
22:56:04 | skrylar[m] | voiceloop is only sort of an rnn |
22:56:26 | skrylar[m] | it stores state in a window of like ten previous states which slide down a stack and then you refer back to that, more than any actual hidden state |
22:56:34 | skrylar[m] | BUT |
22:56:48 | skrylar[m] | it runs real-time on cpus and clones voices from ten second samples /shrug |
22:56:57 | skrylar[m] | tacotron still requires hours of training samples |
22:57:33 | * | jjido joined #nim |
22:57:42 | FromDiscord | <mratsim> Actually my main motivation behind Laser and Weave was that I got seriously stuck when trying to implement an AI that played pong: https://github.com/numforge/agent-smith/blob/master/examples/ex02_00_pong_cem.nim |
22:58:12 | FromDiscord | <mratsim> I needed lot more stuff, especially efficient for loops on more than 3 tensors at a time |
22:58:59 | disruptek | who else is using nimph on windows, here? |
23:03:01 | * | tane quit (Quit: Leaving) |
23:06:27 | * | nsf quit (Quit: WeeChat 2.7) |
23:07:15 | disruptek | gittyup now bugging out on devel due to arc. i guess it could be cooldome's infinite loop? |
23:08:01 | Araq | unlikely |
23:08:09 | Araq | maybe it's my exception handling :P |
23:08:28 | disruptek | https://api.travis-ci.org/v3/job/632470755/log.txt -- scroll to the end. |
23:08:51 | FromDiscord | <treeform> Why does Nim need the very mangled names like `parent_259357` why can't it just do `parent` `parent_1`, `parent_2` ... ? |
23:09:34 | Araq | sometimes we do just that |
23:09:57 | Araq | but you'd be surprised how complex mangling can be when it was an afterthought |
23:10:28 | disruptek | when 259,357 parents really love each other... |
23:11:33 | FromDiscord | <treeform> hmm there is only 1 `parent_#` in the whole code base, it should have been just `parent`. |
23:13:04 | Araq | yeah and this is how compilers work: First they grep over everything to see if "there is only 1" |
23:13:26 | skrylar[m] | unrelatedly here was a good facepalm: someone saying that binary protocols were bad because variable length fields require turing machines, but text protocols are good (apparently text protocols don't read varying numbers of bytes '_') |
23:13:57 | disruptek | bytes are so passe. |
23:14:00 | FromDiscord | <treeform> Araq, this is mainly a problem for me for the JS backend. Maybe I can write a script to demangle the names. |
23:15:09 | FromDiscord | <treeform> I had a script that would generate source maps, but then this PR got made ( https://github.com/nim-lang/Nim/pull/7508 ), but then it was never finished! |
23:15:10 | disbot | ➥ Sourcemap for JS |
23:15:23 | FromDiscord | <Clyybber> Araq: Do I have to define a hash proc for PSym and PNode for this to work? |
23:15:35 | Araq | Clyybber: yeah but it's bad |
23:15:45 | Araq | instead of the PSym, use the sym.id at least |
23:15:50 | FromDiscord | <Clyybber> Yeah |
23:16:07 | Araq | I dunno what to use for the PNode's hash for now |
23:16:22 | Araq | you can hash the ref via cast[int](node) |
23:16:27 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:16:31 | Araq | but it's ugly |
23:18:21 | Araq | skrylar[m], most people who use "Turing" in the sentence have no clue about anything |
23:19:16 | Araq | also known as "X is impossible because of the halting problem" |
23:24:15 | skrylar[m] | Araq: i gave up after .. four hours i think i wasted? |
23:24:43 | disruptek | disbot: have my baby. |
23:24:44 | disbot | on it. 👍 |
23:24:57 | skrylar[m] | they wanted to check user logins against ??? and translate the response in to user groups, but LDAP was bad because it wasn't a text protocol and also databases are bad |
23:25:05 | skrylar[m] | i guess. |
23:25:34 | disruptek | i keep my data in my wallet next to my password prophylactic. |
23:30:19 | Zevv | "prophylactic", thats not a good password |
23:31:42 | * | chemist69 quit (Ping timeout: 260 seconds) |
23:32:30 | * | chemist69 joined #nim |
23:33:04 | * | krux02 quit (Remote host closed the connection) |
23:34:04 | disruptek | it's not? |
23:34:33 | disruptek | here's a better arc error message: https://api.travis-ci.com/v3/job/272281741/log.txt |
23:38:51 | Araq | *shrug*, I'm sorry this feature is still in development and we spent all of our resources on it already |
23:40:26 | Araq | if you want to help, reduce it to a test case and submit a bug report |
23:42:09 | disruptek | kk |
23:43:17 | disruptek | i only mention it because it worked yesterday. |
23:43:30 | Araq | interesting |
23:43:32 | disruptek | i will see if i can narrow it down a bit. |
23:43:38 | Araq | yes please |
23:55:18 | * | MightyJoe joined #nim |
23:55:18 | * | cyraxjoe quit (Ping timeout: 260 seconds) |