00:00:53shashlickHold why would Nim run in cache
00:04:45disruptekugh, seems like libgit2 master isn't able to clone correctly, and pre-master isn't able to measure changes in repos, which breaks lockfile sanity checking.
00:13:59FromDiscord_<treeform> @dom can you help me with ws support for httpbeast? https://play.nim-lang.org/#ix=23vl I am getting "File descriptor not registered." on line 19. How can I take an httpbeast request and turn it into an async socket?
00:15:33*dwdv quit (Ping timeout: 250 seconds)
00:16:25FromDiscord_<treeform> @dom96 I don't understand what you did here to make it work: https://github.com/niv/websocket.nim/commit/f8085be22ed79b198a4dfa569e3de6df4b7c0fea#diff-a87c0449315e631972860232612804faR118
00:19:57dom96Why are you calling newAsyncSocket on it? From what I can tell from the code `req.client` is already an AsynSocket, no?
00:20:44dom96btw, please consider naming these functions something else.
00:21:17dom96hrm, or maybe it does fit out conventions actually
00:21:39dom96naming is hard and it's too late in the night, but having a constructor that's async is something that I haven't thought about :)
00:22:58FromDiscord_<treeform> dom96 no its a FD not an AsynSocket
00:23:30FromDiscord_<treeform> https://github.com/dom96/httpbeast/blob/master/src/httpbeast.nim#L38
00:23:56dom96oh right
00:24:03dom96Here is the magic:
00:24:14dom96 req.forget() # Remove from HttpBeast event loop.
00:24:14dom96 asyncdispatch.register(req.client.AsyncFD)
00:24:24FromDiscord_<treeform> oh
00:24:46dom96then calling newAsyncSocket will work
00:25:21*nickster joined #nim
00:25:47FromDiscord_<treeform> that worked 100%, thank you very much. I would not have figured that out.
00:27:42dom96yeah, sorry, documentation is definitely lacking here
00:28:46FromDiscord_<treeform> the jester examples comes out to be pretty minimal: https://play.nim-lang.org/#ix=23vm
00:30:36*lritter quit (Ping timeout: 240 seconds)
00:33:54FromDiscord_<yewpad> The websocket example just looks so beautiful
00:34:01FromDiscord_<yewpad> I remembered that websockets were pain in Go
00:34:07FromDiscord_<yewpad> I remember*
00:36:28FromDiscord_<treeform> hmm code gets uglier if you want to handle socket errors https://play.nim-lang.org/#ix=23vp
00:36:50FromDiscord_<treeform> and I guess jester always requires some sort of response?
00:41:24dom96you can call `enableRawMode` IIRC
00:45:16dom96(or set `result[0] = TCActionRaw`
00:49:34FromDiscord_<treeform> that works
00:55:35*nif_ quit (Quit: ...)
00:55:45*nif joined #nim
01:41:28madpropsi mean the bracket jumping, going from { to } on long functions
01:41:32madpropsis that possible with nim and vscode?
01:41:35madpropsi miss*
01:53:52disruptekwhy are you using vscode?
01:55:20disrupteklost a bet?
01:58:27*ng0 quit (Quit: Alexa, when is the end of world?)
02:07:11skrylar[m]its tolerable i suppose
02:07:29skrylar[m]i used to use emacs for nim but i need to dig my emacs mode for that back out
02:07:32disruptekso is syphilis.
02:08:00skrylar[m]if i wanted to waste a lot of time i'd make a kakoune thing in nim and use janet scripting; ghetto nimemacs.
02:41:54*norm joined #nim
02:42:01*norm is now known as Guest78471
02:52:40*Guest78471 quit (Quit: Leaving)
03:02:47madpropsdisruptek: haven't found a better editor
03:10:57*rockcavera quit (Remote host closed the connection)
03:28:29madpropstree view in my lq thing: http://i.imgur.com/8EmsqO0.jpg
03:36:23*endragor joined #nim
03:39:20*skelett1 joined #nim
03:39:40*bozaloshtsh quit (Quit: ZNC 1.7.2 - https://znc.in)
03:41:29*skelett quit (Read error: Connection reset by peer)
03:41:29*bozaloshtsh_ joined #nim
03:49:01*sealmove joined #nim
04:08:02*chemist69 quit (Ping timeout: 276 seconds)
04:09:41*chemist69 joined #nim
04:42:19*nsf joined #nim
04:44:09madpropshmm how could i detect if a program is being piped?
04:44:51*narimiran joined #nim
04:46:53*bacterio quit (Read error: Connection reset by peer)
04:48:44FromGitter<bung87> terminal module does not solve your problem ?
04:50:00madpropsindeed. i needed isatty
04:50:11madpropsisatty(stdout) to be precise
04:52:51FromGitter<bung87> what do you mean precise ?
04:53:05madpropsto check for instance if myprogram | grep something is used
04:55:53FromGitter<bung87> that's strange, when do this it leave your program right? maybe you need change user default shell
04:57:53FromGitter<bung87> or let user call the command from a wrapper program
04:58:26*NimBot joined #nim
05:03:08madpropsbung i just want to disable some stuff like ansi codes on output if it's being piped
05:06:54FromGitter<bung87> yeah , I understand, I just have some thoughts, if you want do this , the first thing is your program know what the stuff calls.
05:08:50FromGitter<bung87> limit the program stuff can calls or limit the shell.
05:10:00FromGitter<bung87> maybe other ones have better solution, it's just what I know
05:27:59*Kaivo quit (Ping timeout: 276 seconds)
05:53:04*dddddd quit (Remote host closed the connection)
05:53:59*ltriant quit (Ping timeout: 250 seconds)
05:58:16Araqterminal.isatty exists
06:16:01*dwdv joined #nim
07:06:06*solitudesf joined #nim
07:13:43*zyklon quit (Ping timeout: 268 seconds)
07:22:57*zyklon joined #nim
07:56:17*dwdv quit (Ping timeout: 240 seconds)
07:58:17*dwdv joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:07*PMunch joined #nim
08:04:32*gmpreussner joined #nim
08:16:13*cyraxjoe joined #nim
08:18:50*MightyJoe quit (Ping timeout: 265 seconds)
08:23:51*dillonb quit (*.net *.split)
08:23:52*Tanger quit (*.net *.split)
08:23:52*so quit (*.net *.split)
08:24:34*dillonb joined #nim
08:24:34*Tanger joined #nim
08:24:34*so joined #nim
08:24:53*so quit (Max SendQ exceeded)
08:25:05*so joined #nim
08:32:54*jwm224 quit (Ping timeout: 252 seconds)
08:34:52*jwm224 joined #nim
08:53:08*sealmove quit (Quit: WeeChat 2.6)
08:55:49*Hendriks joined #nim
08:57:09*Hendriks quit (Quit: Leaving)
09:00:33*ng0 joined #nim
09:00:56*Hendriks joined #nim
09:06:34*Hendriks quit (Quit: Hendriks)
09:09:00*Hendriks joined #nim
09:10:54*Hendriks quit (Client Quit)
09:14:52*fanta1 joined #nim
09:23:47Araqtreeform: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=986 your ws package is red
09:24:17*Vladar joined #nim
09:37:05*spacepluk joined #nim
09:39:52*njoseph quit (Ping timeout: 268 seconds)
09:41:35*njoseph joined #nim
10:04:41*cyraxjoe quit (Ping timeout: 265 seconds)
10:17:50*cyraxjoe joined #nim
10:20:03*narimiran quit (Ping timeout: 250 seconds)
10:21:43*letto quit (Quit: Konversation terminated!)
10:22:58*letto joined #nim
10:34:06*clyybber joined #nim
10:41:50*fanta1 quit (Quit: fanta1)
10:51:37*njoseph quit (Ping timeout: 240 seconds)
11:09:28*zahary joined #nim
11:15:37*njoseph joined #nim
11:18:45*dv` quit (Quit: ERC (IRC client for Emacs 26.3))
11:24:36*rockcavera joined #nim
11:29:25*MightyJoe joined #nim
11:29:38*cyraxjoe quit (Ping timeout: 268 seconds)
11:31:52*ltriant joined #nim
11:36:19*ltriant quit (Ping timeout: 250 seconds)
11:38:11*Hideki_ joined #nim
11:38:47*Hideki_ quit (Remote host closed the connection)
11:39:43*Hideki_ joined #nim
11:44:44*solitudesf quit (Ping timeout: 265 seconds)
11:51:24*krux02 joined #nim
11:55:14*Hideki_ quit (Remote host closed the connection)
11:55:30*Hideki_ joined #nim
11:59:44*Vladar quit (Quit: Leaving)
12:01:10*thomasross quit (Ping timeout: 265 seconds)
12:25:30*solitudesf joined #nim
12:35:41*gangstacat quit (Ping timeout: 276 seconds)
12:47:36*Hideki_ quit (Remote host closed the connection)
12:47:55*Hideki_ joined #nim
12:51:38*Hideki_ quit (Remote host closed the connection)
12:52:03*Hideki_ joined #nim
12:54:02*Hideki_ quit (Remote host closed the connection)
12:54:20*Hideki_ joined #nim
12:58:04*Hideki_ quit (Remote host closed the connection)
12:58:23*Hideki_ joined #nim
13:02:04*Hideki_ quit (Remote host closed the connection)
13:02:23*Hideki_ joined #nim
13:07:55FromDiscord_<spacepluk> @mratsim weave looks pretty cool
13:08:23FromGitter<mratsim> ^^
13:08:45FromGitter<mratsim> it’s just spawn/sync (equivalent to async/await but for compute tasks)
13:08:55FromGitter<mratsim> most of the stuff behind is not visible
13:11:13FromDiscord_<spacepluk> I put all the papers you linked on my reading queue hehe
13:12:10FromDiscord_<spacepluk> I skimmed quickly though and none of them seem to care much about cpu cache lines, am I wrong?
13:14:33FromGitter<mratsim> yep you’re wrong ;)
13:14:53FromDiscord_<spacepluk> great! haha
13:15:03FromGitter<mratsim> more papers: https://github.com/numforge/laser/blob/master/research/runtime_threads_tasks_allocation_NUMA.md
13:15:23FromDiscord_<spacepluk> thanks, I'll push that one to the top 😄
13:15:39*endragor quit (Remote host closed the connection)
13:15:41FromGitter<mratsim> This one gives theoretical bounds on cache misses on futures if used in a disciplined way: https://arxiv.org/abs/1309.5301
13:16:03FromGitter<mratsim> and the Constructive Cache Sharing paper is not applicable to weave, it’s what Julia uses
13:16:18FromGitter<mratsim> https://www.cs.cmu.edu/~guyb/papers/CGK07.pdf
13:17:47FromDiscord_<spacepluk> cool stuff
13:17:49FromGitter<mratsim> now if you like cache optimisations, here is some fun read and code for state of the art matrix multiplication: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm_tiling.nim#L284-L305
13:17:50FromDiscord_<spacepluk> thanks
13:18:01FromGitter<mratsim> It’s pure Nim as fast as Assembly OpenBLAS ;)
13:18:08FromDiscord_<spacepluk> ❤️
13:20:22FromGitter<mratsim> papers for matmul (at the top of the file I sent or here: https://github.com/numforge/laser/blob/master/research/matrix_multiplication_optimisation_resources.md) and about convolution (https://github.com/numforge/laser/blob/master/research/convolution_optimisation_resources.md) are very focused on cache management and register blocking
13:20:55FromGitter<mratsim> I want to use weave as a parallel backend for those instead of OpenMP because OpenMP is impossible to nest properly
13:21:58FromDiscord_<spacepluk> I can imagine, I've never used it but from the distance it looks like it could get pretty messy
13:22:59*narimiran joined #nim
13:23:18FromGitter<mratsim> nested parallel section either stay serial or squares the number of threads :/, you have to use OpenMP tasks but GCC OpenMP implementation is very bad with regards to load balancing
13:59:55*thomasross joined #nim
14:04:01*Araq quit (*.net *.split)
14:04:01*acidx quit (*.net *.split)
14:04:02*gsingh93 quit (*.net *.split)
14:09:54*Araq joined #nim
14:09:54*acidx joined #nim
14:09:54*gsingh93 joined #nim
14:13:58*Araq quit (*.net *.split)
14:13:58*acidx quit (*.net *.split)
14:13:58*gsingh93 quit (*.net *.split)
14:19:34*Araq joined #nim
14:19:34*acidx joined #nim
14:19:34*gsingh93 joined #nim
14:29:14*rokups joined #nim
14:43:16FromDiscord_<treeform> Araq, I see the bug will fix soon.
14:45:41disbot➥ 3when cloning one of your github packages as a requirement, setup an ssh remote automatically 🧚11disruptek
14:46:09disruptekyou gotta admit, that's pretty nice.
14:48:24*PMunch quit (Ping timeout: 265 seconds)
14:51:26*PMunch joined #nim
14:54:08*thomasross quit (Ping timeout: 276 seconds)
14:54:33*PMunch quit (Client Quit)
14:55:51*PMunch joined #nim
14:57:03*endragor_ joined #nim
14:59:44*ng0 quit (Ping timeout: 260 seconds)
15:01:12*thomasross joined #nim
15:04:06*gangstacat joined #nim
15:05:11*PMunch quit (Ping timeout: 250 seconds)
15:05:17*ng0 joined #nim
15:06:29*PMunch joined #nim
15:10:56*PMunch quit (Client Quit)
15:21:39*lritter joined #nim
15:35:47solitudesfnimph/src/nimph/spec.nim(11, 13) Error: cannot open file: nimph/sanitize
15:36:17disruptekdoes the file exist?
15:36:48solitudesfsrc/nimph/sanitize.nim: ASCII text
15:37:05solitudesfbut the path is wrong
15:37:15disruptekdo you have a nim.cfg?
15:37:34disrupteki probably screwed up some nimble stuff.
15:38:21disrupteki don't really understand all the path contortions needed with nimble.
15:38:29disruptekit usually takes me a few minors to figure out.
15:38:30solitudesfyes, you probably have it installed with nimble
15:38:59disrupteknah, i just use nimph in its git repo like all other nim software.
15:39:28solitudesfcan nim resolve paths relative to project root then?
15:39:30disruptekdo you know how to fix the nimph.nimble?
15:39:44disrupteknim can resolve paths relative to project root, yes.
15:40:18disruptekalso the config file in which they are specified, your home directory, and one or two others.
15:41:28*Hideki_ quit (Remote host closed the connection)
15:42:23*Hideki_ joined #nim
15:42:29solitudesfchanged all imports `nimph/x` to `./x`. now the error is src/nimph/config.nim(407, 25) Error: attempting to call undeclared routine: 'nimbleSubs'
15:43:14solitudesfgrep show that indeed that indeed there are no such thing
15:43:16disruptekyou have a compiler that is 1.1.1 but not HEAD?
15:44:08disruptek(hence, nimph is wrong about whether nimbleSubs exists in your compiler.)
15:44:46disrupteki guess i could've made that a `when compiles` instead.
15:46:33*Hideki_ quit (Ping timeout: 245 seconds)
15:47:17disruptekdeclaredInScope ftw. thanks for the bug report.
15:47:55disruptekwhat's odd is, i think i've installed nimph via nimble before.
15:49:53disruptekyeah, it fails for me too. wtf.
15:49:57*tane joined #nim
15:50:23solitudesfbut still, why the heck paths relative to project root work for you, but not for me
15:50:45disruptekhow are you specifying them?
15:51:08disruptekonly $config works for me, but that's fine in a nim.cfg adjacent to the .nimble.
15:51:28disrupteknimph doesn't have that, by design, so that you can create one and fill it with local deps if you want.
15:51:37disrupteki mean, the nimph project itself.
15:52:41solitudesfi dont get it
15:52:46disruptekwhich part?
15:52:54solitudesfdo i have to fill custom nim.cfg by hand before i can build it?
15:53:39disrupteki dunno; how does nimble expect this to work?
15:54:01disrupteki guess yes?
15:54:28disrupteki guess this is why we need to include nim.cfg in repositories? seems nuts.
15:54:39solitudesfbut why do you specify them relative to the root if that requires manual intervention?
15:55:26disruptekwhere do i specify paths?
15:55:42disruptekdo you mean the `import` statements, or do you mean some nim.cfg somewhere?
15:55:56solitudesfimport nimph/stuff
15:56:11disrupteki know what the problem is.
15:56:31disruptekwhen nimble installs something that's a binary, it tries to build it instead of installing the src.
15:56:47disruptekso the src isn't in your .nimbledir, so it cannot build because it cannot find itself.
15:58:44disruptekit never occurred to me that package management could be so broken that the software cannot even build itself under the best of circumstances.
15:59:43disrupteki have a clever fix though. we put a --nimblePath in nimph.nim.cfg and then when nimble goes to build it, the compiler will save the day.
16:02:06disruptek✔️ 0.0.28 nimph solitudesf 🌝 -- plz giive it a shot.
16:02:26solitudesfand what is wrong with importing files relatively to eachother without relying on all of that?
16:02:30disruptekdamn, it doesn't work.
16:02:56disruptekthere's nothing wrong with it, except that strictly speaking, it's not correct.
16:03:15disruptekwhat i want to import has nothing to do with where it comes from.
16:03:28disrupteki don't simply say, "give me whatever code is nearby"
16:03:40disrupteki'm saying, "i need some code that follows a certain interface..."
16:04:31*Vladar joined #nim
16:04:55disrupteki guess it might break `include` as well, if you want another reason.
16:05:37disruptekoh right, because nimble uses --noNimblePath. of course. i'm an idiot.
16:05:52disruptekneuter the compiler and this is what you get.
16:07:16clyybberwait, nimble uses --noNimblePath??
16:07:21clyybberthats... ironic
16:07:46disruptekthis bs that i have to do now is... ironic.
16:08:29disrupteki have to break paths in my package manager which is designed to enable proper paths so that people with broken path management can upgrade to working path management.
16:08:31solitudesfha, you cant even install it as hybrid package with nimble
16:08:53disruptekit's pretty ridiculous.
16:09:01disruptekwait a minute.
16:09:09disruptekjust `nimble develop` it.
16:09:38solitudesfwell, you cant install any hybrid package that has a structure srcDir/pkgname/; srcDir/pkgname.nim
16:10:04disruptekoh, right. because of the bin directory.
16:10:19disruptekagain, nimble develop offers a workaround.
16:10:58disrupteki think it's time for nimble-free installation instructions.
16:13:19clyybberwhy does --nimblePath exist when nimble doesn't use it?
16:13:32clyybberOr is the misnomer that *resets* nimblePath?
16:13:44disruptekso that the compiler can pick up some global-ish packages in `nim c somefile.nim`.
16:14:15disruptek--noNimblePath disables --nimblePath; --clearNimblePath empties it.
16:14:35clyybberso nothing actually uses --nimblePath?
16:14:56disruptekthe default nim.cfg specifies ~/.nimbledir/pkgs as a --nimblePath.
16:15:11clyybberbut nimble erases that?
16:15:20disrupteknimph makes heavy use of it. or, it enables heavy use of it.
16:15:27disruptekyes, nimble erases it.
16:15:40solitudesfnimble develop doesnt work with binary only packages
16:15:59disrupteki know, you have to remove the bin.
16:16:03disruptekcomment it out.
16:16:20clyybberdisruptek: Whats the difference between a dir added to nimblePath vs path?
16:16:26disrupteklike i said, it's clear that i need to solve this problem differently.
16:16:28clyybberCan I import it but not include it?
16:16:31solitudesfbruh, i already worked around it, i want it to `just work`
16:16:49disruptek--nimblePath adds all package subdirectories to the search paths.
16:16:58disruptekalso, it follows .nimble-link files.
16:17:02disrupteksolitudesf: no shit.
16:17:03Araqclyybber, Nimble has to use --noNimblePath
16:17:18*Hideki_ joined #nim
16:17:18Araqthat's the point of how it's all set up
16:18:00disrupteki don't know that /anyone/ knows the point of how it's all set up.
16:18:20AraqNimble tells Nim what --paths to use precisely and so it sets --noNimblePath
16:18:39disruptekbecause for some reason, subdirectories are scary difficult to get right.
16:18:40Araqdisruptek, I don't like how it's done anymore either but there was a logic behind it
16:18:43clyybberSo nimph could do the same and --nimblePath begone?
16:19:32disruptekit could, but why? --nimblePath lets us have features like /distributions/ or /global deps/ or or or ...
16:20:01disruptekdon't use it if you don't want to.
16:20:14disrupteknimph knows how to use it, or not.
16:20:45clyybberso --nimblePath cannot be replaced by --path?
16:21:21Araq--nimblePath is much like a --path with plenty of stars/placeholders in it
16:21:22disruptekif you remove it from the compiler, programs will fail to build.
16:21:44disruptekother than that, sure, nimph could just implement the big scary --nimblePath itself.
16:22:21disruptekin fact, maybe it should.
16:22:55clyybberI find one option for doing paths more sane than two
16:23:10disruptekmake the compiler ignores --nimblePath silently. then ~/.nimble/pkgs won't work anymore, but hey, they are just poor people trying to use nim -- let's make their lives harder for no reason.
16:23:37disruptekclyybber: then you really won't like the new $nimbledir substitution.
16:24:36disruptekAraq: if you don't like how it's done, let's change it.
16:25:02clyybberdisruptek: I don't think I get it :D
16:25:06Araqand break everybody's workflow while we figure out a better way? nah
16:25:20disruptekwhich workflow are you worried about breaking?
16:25:26AraqI prefer evolution over revolution
16:25:36clyybberWhy does everything break when we remove --nimblePath?
16:25:39disruptekthe only workflow that doesn't exist is compilation of nimph, and for the most ridiculous of reasons.
16:25:56solitudesfdisruptek, is this normal? https://i.imgur.com/cGgr6g9.png
16:26:14Araqcurrently 'nim c project' and 'nimble c project' both work, to some extend
16:26:15*narimiran quit (Ping timeout: 268 seconds)
16:26:34Araqwithout nimblePath support in the compiler only 'nimble c project' works
16:26:44disrupteksolitudesf: what version?
16:26:48clyybberand how does nim c project work? Does the compiler remember --nimblePath?
16:26:50Araqbut you know this so I wonder what I'm missing
16:27:04solitudesfwhat was latest an hour ago
16:27:14clyybberAraq: I don't know how the compiler gets the --nimblePath
16:27:23Araqclyybber, config/nim.cfg
16:27:33clyybberAh, the global config
16:27:59clyybberand that can't be replaced by path?
16:28:27clyybberBecause nimblePath /foo/ is like path /foo/* ?
16:28:44disrupteksolitudesf: i'm not 100% sure what's happening there. can you run it with --log-level=lvlDebug ?
16:29:31disruptekAraq: i do not want to remove --nimblePath; i was being sarcastic.
16:29:53disrupteki just back over this and realized that i may have been confusing.
16:30:11clyybberIs what I wrote correct?
16:30:29*dddddd joined #nim
16:31:10clyybberSo we could make --path:/someDir/* work and replace --nimblePath?
16:32:19disrupteki really need to test nimph more with nimble.
16:34:02clyybberand nimble developed *faster* than nim so it now doesn't use --nimblePath anymore so that `nim c` and `nimble c` are inconsistent?
16:34:40disrupteksolitudesf: i think the stb_image thing is normal, because it was 2.1.* but only 2.4 is available (because nimph doesn't roll to github release tags yet).
16:35:03disrupteki guess the others don't have master branches?
16:35:21*krux02_ joined #nim
16:35:39solitudesfthey dont have git initialized in them. but why is is trying to do whatever thing its doing 3 times in a row?
16:35:45disruptekweird that there's no origin remote, too.
16:36:11*Hideki_ quit (Ping timeout: 276 seconds)
16:37:05disruptekbecause it tries to clone stb_image and regardless of whether it worked, it re-evaluates the dependencies. the second time through the look, it evaluates two repos (for the same project, just different versions) and then tries to resolve each of those dependencies.
16:37:29*krux02 quit (Ping timeout: 250 seconds)
16:37:48disruptekthe dependencies don't fold because one doesn't dominate the other, as 2.4 and 2.1 are semver-differing.
16:39:50disruptekrolling to git commit and/or tag should be done today, and maybe clone/unlock via github release.
16:40:58disruptekdo those other project directories have .git subdirectories?
16:41:12solitudesfthe failing ones?
16:41:33disruptekthe ones missing remotes and references.
16:41:36solitudesfno, git is not initialized in them
16:41:56Araq> and nimble developed *faster* than nim so it now doesn't use --nimblePath anymore so that `nim c` and `nimble c` are inconsistent?
16:41:59Araqno, no, no.
16:42:00disruptekthat's... super weird.
16:43:27disrupteki guess i've never run nimph in a package outside of a .git.
16:43:46disruptekas even nimble localdeps end up being beneath my project.
16:43:51solitudesfactually, no, i fucking lied, it has git initialized
16:44:29solitudesf.git: directory
16:44:50disruptekso maybe the error messages are correct?
16:45:33solitudesfi guess, whatever 'correct' means in that case.
16:46:39disrupteki feel like it's reasonable to fetch an origin, but we might be able to ignore it in this case -- like if we're trying to look at the origin to figure out the URL to the project, but we have a fallback method as well.
16:49:11disruptekor would you rather learn that your repo lacks an `origin` remote?
16:50:36solitudesflacking origin is not an error
16:50:52solitudesffrom a user perspective*
16:51:58*Trustable joined #nim
16:57:30clyybberAraq: Why does nimble not use --nimblePath then?
16:57:42clyybberAnd instead uses --path? To prepare for migration?
16:58:34disruptekto add greater complexity. it was the only way.
16:58:54disrupteksolitudesf: i agree.
16:59:44disruptekwe'll output it only on `notice`; it'll get a red X though. is that okay?
17:00:02clyybberdisruptek: So there was no reason?
17:00:21disrupteki have no idea. i only started with nim this spring.
17:00:41*Vladar quit (Quit: Leaving)
17:05:40disruptekhmm, if it happens when you've `init`d, then it's clearly never correct.
17:05:59stefantalpalaruYou really can't print a string without a trailing newline in NimScript? I see that the "io" module doesn't even define stdout/stderr/stdin for it. Why is that?
17:06:38disruptekwe're trying to do our part to preserve and protect newlines worldwide.
17:06:51disruptekhaven't you heard about what's happening to the newlines?
17:07:33spaceplukjust curious, how many around here are doing gamedev?
17:09:35disruptekmaybe half the regulars that you see speak in this channel.
17:10:23*nc-x joined #nim
17:10:39spaceplukniiice, anybody shipping games made with nim?
17:10:50disrupteksolitudesf: thanks for trying nimph. that's a proper bug. 😁
17:11:14FromDiscord_<treeform> hey so I am trying to make a threaded chat server... https://play.nim-lang.org/#ix=23yd what is the best way to sync messages between all chat threads?
17:11:31FromDiscord_<treeform> channels seems to be only read by one thread
17:11:46FromDiscord_<treeform> I want more of all threads need to read it?
17:11:59disruptekhave every thread read from the one next to it.
17:12:03disruptekin a circle.
17:12:11disruptekinstant token ring.
17:12:25FromDiscord_<treeform> hmm
17:12:47disruptekyou have to admit, it sounds pretty cool.
17:12:54FromDiscord_<treeform> how can I know which thread is next to it?
17:13:04FromDiscord_<treeform> (I don't create the threads)
17:13:23disruptekit's a linked list, bidirectional.
17:14:00nc-xAraq: what should be the way to go here https://github.com/nim-lang/Nim/issues/12753#issuecomment-561706026? Is there a way to check if the `d: var TLoc` in `genObjConstr` is an argument to a template? (I don't think there is a way to do so, so what do you think should be done here?)
17:14:01disbot➥ 3template generates wrong code @11jxy; snippet at 12https://play.nim-lang.org/#ix=230j
17:14:34*nc-x quit (Remote host closed the connection)
17:15:01*endragor_ quit (Remote host closed the connection)
17:39:56FromDiscord_<treeform> This is how I solved my threaded chat, but its so complex and ugly and required another library https://play.nim-lang.org/#ix=23yn is there a way to do that with just std lib?
17:40:44disruptekyeah, put ws in stdlib.
17:41:08FromDiscord_<treeform> well ws is my lib
17:41:13FromDiscord_<treeform> I had to use shared/seq
17:41:16disrupteki know.
17:41:17FromDiscord_<treeform> which is not part of std lib
17:41:23disruptekbut, i still think ws should be in stdlib.
17:41:42FromDiscord_<treeform> I think shared/seq should be part of stdlib?
17:42:24disruptekyou tried channels, right?
17:43:31spaceplukis this still relevant? https://nim-lang.org/docs/intern.html#compilation-cache-shared-global-compiletime-state
17:45:57FromDiscord_<treeform> with more docs: https://play.nim-lang.org/#ix=23yt
17:46:32FromDiscord_<treeform> disruptek, yes channels only send msg from 1 thread to another thread. I need some sort of event bus/shared area...
17:46:50FromDiscord_<treeform> I don't know how to make channels work
17:46:58disruptekoh, i thought my token ring idea would be fun to impl.
17:47:11FromDiscord_<treeform> I don't create the threads
17:47:16FromDiscord_<treeform> I don't know how to do it?
17:48:41*pbb joined #nim
17:48:42disruptekdo you need to create the threads?
17:48:54FromDiscord_<treeform> no
17:49:03FromDiscord_<treeform> I have a non threaded async version
17:49:09*pbb_ quit (Ping timeout: 246 seconds)
17:49:09FromDiscord_<treeform> some one create issue asking for a threaded version
17:49:47*endragor joined #nim
17:49:50disruptekoh, i see.
17:52:22FromDiscord_<treeform> Araq, I fixed my package should not longer be red: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=986
17:54:11*endragor quit (Ping timeout: 250 seconds)
18:02:26*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:02:54*pbb joined #nim
18:03:12*pbb quit (Client Quit)
18:03:37FromGitter<Varriount> Zevv: I hope my comments on that issue were useful
18:03:39*Kaivo joined #nim
18:04:18FromGitter<Varriount> By the way, are parameterized rules new?
18:05:54Zevvbut sure, any input here is helpful. But I have to solve a few techical problems first, but I don't know how
18:06:29*pbb joined #nim
18:06:35ZevvI got kind of lost with the quote dos and symbol binding, and I'm not sure how to get out of the pit of tar I got myself in there
18:07:06ZevvIf you feel brave, check out the comment above `template skel()` in `codegen.nim` and tell me what to do :)
18:08:00ZevvI want to get rid of these variables that get injected in the code block, which are now called 's' and 'si' and 'ip', and all kind of short names that easily clash with user code. Ideally I should use auto-generated names there.
18:17:09*rockcavera quit (Ping timeout: 250 seconds)
18:17:45*rockcavera joined #nim
18:17:45*rockcavera quit (Changing host)
18:17:45*rockcavera joined #nim
18:18:52rockcaveraI have a problem performing my code using threads. I am using NiGui for the graphics part and need to do something on a new thread to not crash the graphics part. It turns out that threadless code executes in 4.5s, while threaded code takes from 17s to 30s. What's the problem?
18:19:52disruptektry profiling to find contention?
18:23:38*Trustable quit (Remote host closed the connection)
18:25:29*endragor joined #nim
18:34:07*endragor quit (Ping timeout: 265 seconds)
18:36:00*zyklon quit (Remote host closed the connection)
18:36:08*kungtotte quit (Quit: WeeChat 2.6)
18:36:12rockcaveraI reproduced the code without NiGui, but with threads, and it also took 17s. Why this?
18:45:12*ltriant joined #nim
18:49:39*ltriant quit (Ping timeout: 250 seconds)
18:58:36Araqclyybber, 'nimble c project' # compile project with its deps as specified in the .nimble file
18:59:00Araq'nim c project' # compile project with the most recent versions of the deps that are in $nimbledir
18:59:26Araqso nimble itself uses --noNimblePath --path: ...
19:00:44Araqstefantalpalaru, *shrug* it didn't come up much before
19:03:16FromDiscord_<Lantos> does nim have the equivalent of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys?
19:03:18FromDiscord_<Lantos> does nim have the equivalent of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
19:03:57FromDiscord_<Rika> Same name
19:04:12njosephI am writing a utility which spawns a process as its last step and quits. osproc.execProcess seems to block. How can I do the equivalent of a "process &" in nim?
19:04:23FromDiscord_<Rika> Lantos, what datatype is this
19:04:31FromDiscord_<Lantos> object
19:05:23FromDiscord_<Rika> https://i.redd.it/82kj1k4m6k241.png
19:05:27FromDiscord_<Rika> Wrong link
19:05:36FromDiscord_<Lantos> lolol
19:05:39FromDiscord_<Lantos> what was that?
19:05:41FromDiscord_<Rika> https://forum.nim-lang.org/t/2017
19:05:49FromDiscord_<Rika> Some meme in another language
19:05:52*rokups quit (Quit: Connection closed for inactivity)
19:06:53FromDiscord_<Rika> I recommend reading the last post in that thread
19:07:09FromDiscord_<Lantos> Some guy chasing after a chick, getting rich meeting her at a bar and not being interested
19:07:15FromDiscord_<Rika> Maybe you're looking for a hash table, you can find those in the tables module
19:07:45*endragor joined #nim
19:07:57LyndsySimonThis is somewhat random, but is anyone hiring? I’ve got a decade of experience in Python and a year or two in Ruby, but would very much like to use Nim on a daily basis. It’s probably a pipe dream at this point, but I hate that the time I have to devote to Nim is so limited. It would be a godsend if I were able to make a living while learning it and contributing back to the community.
19:08:35FromDiscord_<Lantos> Yeah, I was using a Table[string, string] but I'll loose some libs if I do
19:09:03*narimiran joined #nim
19:09:04FromDiscord_<Lantos> gets kinda ugly seq[Table[string,string]]
19:09:22FromDiscord_<Lantos> its a representative of a csv file
19:12:20FromDiscord_<Lantos> I'm weening in nim into the workplace right now, they have spots available but specifically non remote .net environment
19:13:23FromDiscord_<Rika> You can alias the type
19:13:55*endragor quit (Ping timeout: 250 seconds)
19:15:14FromDiscord_<Rika> `type HeaderRow = Table[string, string]` or something like that
19:15:48FromDiscord_<Rika> I'll have to go
19:16:45clyybberAraq: Ah ok.
19:17:09FromDiscord_<Lantos> Yup rika was doing that 🙂
19:17:51FromDiscord_<Lantos> then the problem comes to rewrite generics for all the objects but that is a rabbit hole
19:42:08AraqZevv, still waiting for your VM register additions
19:43:45*krux02_ quit (Remote host closed the connection)
19:46:44clyybbermratsim: Figured out the perf problem?
19:47:18clyybberHow does steal-half work?
19:48:58clyybberit just steals half the queue right?
19:49:17clyybberdisregard all the above questions
19:49:19Araqclyybber, here is a list of things I'm considering:
19:49:35*PMunch joined #nim
19:49:41Araq- map 'lent T' to a 'T' which is not copied/destroyed
19:49:49Araq instead of a 'ptr T'
19:50:09Araq- if every path through the CFG sinks location x, do not emit =destroy(x)
19:51:20Araq- if every proc in the CFG is .raises: [] emit a cheaper nkHiddenTryStmt
19:52:24*nsf quit (Quit: WeeChat 2.6)
19:52:46clyybberAraq: Sounds good. For lent T we will use the same heuristics as we do now then?
19:52:56clyybbers/now/now for T
19:54:45clyybberAraq: One way of eliminating more destroys is to generate =destroys not at the end of procs but at the end of branches (just before a join).
19:56:25clyybberIf we do that it would make sense to do it branch wise all the way through, collecting variable declarations at the start of branches (just after fork)
19:58:07clyybberbut as you told me last time I proposed this this would cause problems with exceptions most likely (or is at least tricky to get right)
20:00:37rockcaveraI found that the performance issue in threads is when recursion occurs within the thread.
20:01:26clyybberOne way to solve it is with generating a try except instead of a try finally
20:01:54rockcaveraThe question is, why within the thread does recursion perform worse than outside of a thread, since they are the same code?
20:01:57clyybberAnd for the raises: [] case just do it naively
20:09:11clyybberAraq: WDYT?
20:14:26*sagax quit (Read error: Connection reset by peer)
20:15:42ZevvAraq: oh ok, i assumed it should come in small spurts. ill put that in tomorrow
20:16:01Zevvi was waiting for the larger Bx to get merged, or at least discussed
20:18:47Araqclyybber, sounds complex
20:18:56Araqrockcavera, I don't know
20:19:15AraqZevv, well... benchmark it. I wrote the VM benchmarking strutils.replace
20:25:41*spacepluk quit (Quit: leaving)
20:25:49*zyklon joined #nim
20:33:06*Hideki_ joined #nim
20:37:26*Hideki_ quit (Ping timeout: 252 seconds)
20:38:02rockcaveraAraq: Would code running on mainthread and code running on childthread have the same performance?
20:40:01rockcaveraApparently the problem is not recursion in the thread, because the code has a maximum recursion of 30 calls, I made them with template and still continued sluggish in the thread.
20:41:11disruptekare your cores all the same?
20:41:47rockcaveradisruptek yes
20:42:03rockcaveraIntel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz x64
20:42:54rockcaveratry to reproduce the problem with other code and couldn't, so I thought it was the recursion
20:43:43rockcaverastrange that the same code without using thread is 4x faster than running code on one thread
20:44:27rockcaveraI'm not splitting tasks between mainthread and childthread
20:46:14disrupteki'm sorry, i don't have any experience with threads in nim.
20:50:03PMunchHmm, I have a nim.cfg with some `passC` arguments in it. They all point to absolute paths, and I want to have a flag that specifies the beginning of this path. Is there a way to have a variable expand in a passC flag?
20:51:47disruptekmaybe pathSubs is performed on the value?
20:52:18FromDiscord_<mratsim> @Clyybber, sorry Discord is broken for when someone tags me but is not on discord :/
20:52:56FromDiscord_<mratsim> I only recovered back to 450ms from 900~1350ms, but the proof of concept took only 300ms
20:53:50clyybberNice, did the backoff mechanism improve performance?
20:54:10disruptekPMunch: doesn't seem like pathSubs is run on those.
20:55:51disruptekbut it looks like you can retrieve variables by name.
20:55:57FromDiscord_<mratsim> the benches are 2 shorts for that, it doesn't seem to decrease it but when it was mis implemented it parked half of my threads so I know it works
20:56:04disruptekunder .options.always
20:56:05FromDiscord_<mratsim> too short*
20:57:06FromDiscord_<mratsim> hopefully the runtime has a overhead so low that people spawn left and right and all cores are always busy
20:58:18FromDiscord_<mratsim> I don't want to ask myself, mmmh what should be the minimum size before parallelizing: i.e. delete this: https://github.com/numforge/laser/blob/master/laser/openmp.nim#L57-L84
20:58:31FromDiscord_<mratsim> and avoid this: https://github.com/zy97140/omp-benchmark-for-pytorch
21:01:40clyybbermratsim: Thats a noble goal!
21:03:14FromDiscord_<mratsim> well your work on destructors seems also quite fun 😉
21:03:51*Trustable joined #nim
21:07:25clyybberAraq: It's a more complex than the current approach but it should be relatively easy to do with the dfa, (i should try before speaking :p).
21:08:30clyybberAraq: I think we should also start to optimize initialization, as in don't zero stuff we can guarantee gets written to completely before a read.
21:08:32*narimiran quit (Ping timeout: 276 seconds)
21:09:34*filcuc_ joined #nim
21:10:05clyybberThat should go well with the default fields thing.
21:10:17clyybberAnd in general default values :)
21:15:30*ltriant joined #nim
21:17:51*spacepluk joined #nim
21:24:42*Jesin quit (Quit: Leaving)
21:29:37*Jesin joined #nim
21:30:10*Trustable quit (Remote host closed the connection)
21:31:10*filcuc_ quit (Quit: Konversation terminated!)
21:31:25*filcuc_ joined #nim
21:31:25*filcuc_ quit (Remote host closed the connection)
21:37:59rockcaveraAraq: I don't know how Nim threads work, but the problem was a threadvar seq[int32] declared at the beginning of the code. In this, I started to declare it in the scope of the thread procedure and speed was equal to the code without thread.
21:42:17*PMunch quit (Quit: leaving)
21:44:23*endragor joined #nim
21:50:46*endragor quit (Ping timeout: 252 seconds)
21:54:15Araqclyybber: yeah, I forgot to mention:
21:54:32Araq- don't =sink when you can copyMem() instead
21:54:54clyybberAraq: What does that mean?
21:55:04clyybberIdeally a =sink is equivalent to a copyMem() no?
21:55:17Araqsink does a destruction
21:55:27clyybberAh, sure
21:55:36clyybberThat could be achieved with your section idea
21:56:28Araqbut it's not required
21:57:22Araqwhen we know that it's the first assignment to 'x', copyMem(x, ...) is always sound. it's like C++ inplace construction or RVO
22:01:19clyybberSounds good. Also goes hand in hand with optimizing inits away :D
22:10:26*tane quit (Quit: Leaving)
22:10:36madpropshmm having a problem getting values from a table
22:11:21madpropscolors*: Table["string", seq[string]]
22:11:35madpropssneaky quotes
22:11:55madpropshuh that wasn't it
22:12:34madpropshow do i not use systemstring
22:12:45madpropsnvm that's the default string i guess
22:13:32Araqimport tables
22:13:53Araqin the modules that import the module that exports colors
22:14:50madpropsthat was it, thanks
22:21:37*solitudesf quit (Ping timeout: 240 seconds)
22:27:48Araqclyybber: now make it happen please and I'll add the best cycle collector known to mankind. deal?
22:29:42Araqok, good night
22:29:43disruptekclyybber is one helluva cheap date.
22:29:56disruptekpeace out, araq
22:54:06FromDiscord_<python273> I made a thing, Nim is cool https://github.com/python273/webnetstat
23:02:49FromDiscord_<treeform> @python273 looks pretty cool
23:17:48*oculux quit (Ping timeout: 246 seconds)
23:19:48*spacepluk quit (Quit: leaving)
23:20:01*oculux joined #nim
23:20:32*mahlon quit (Quit: WeeChat 2.5)
23:40:03*clyybber quit (Quit: WeeChat 2.6)
23:40:18*clyybber joined #nim
23:46:19federico3python273: I did something similar using tcpflow ages ago
23:49:16*bozaloshtsh_ quit (Quit: ZNC 1.7.2 - https://znc.in)
23:49:27*bozaloshtsh joined #nim
23:49:27*bozaloshtsh quit (Changing host)
23:49:27*bozaloshtsh joined #nim