<< 15-01-2020 >>

00:03:17disruptekthis is one of those bugs that just seems impossible.
00:07:30*krux02_ joined #nim
00:11:20*krux02 quit (Ping timeout: 265 seconds)
00:12:13*krux02_ quit (Client Quit)
00:12:46*ng0 quit (Quit: leaving)
00:21:33disruptekthere's a certain logic to the compile-time vars persisting into runtime.
00:22:45disruptekit's like we ofter a continuum between aot, jit, or runtime. but, of course, i didn't like the impl.
00:29:19*Hideki_ joined #nim
00:34:08*Hideki_ quit (Ping timeout: 268 seconds)
00:35:21*rockcavera quit (Remote host closed the connection)
00:41:49*rockcavera joined #nim
00:50:56*chenhq2005 joined #nim
00:57:42*WilhelmVonWeiner joined #nim
00:58:06*WilhelmVonWeiner is now known as Guest50399
01:01:31FromDiscord<Rika> Concepts are just type classes right?
01:02:34*letto quit (Ping timeout: 265 seconds)
01:11:08*icebattle quit (Ping timeout: 268 seconds)
01:16:38*voltist joined #nim
01:17:31*lritter quit (Quit: Leaving)
01:27:18muffindrakeWhat's the closest thing to running .nim files as scripts?
01:32:48*chenhq2005 quit (Ping timeout: 258 seconds)
01:33:57disbotnimscript: 11Module documentation - https://nim-lang.org/docs/nimscript.html -- shashlick
01:34:47disruptekwow, when did you add that one.
01:34:48disbotnimscript: 11NimScript is the subset of Nim that can be evaluated by Nim's builtin virtual machine - https://nim-lang.org/docs/nims.html -- shashlick
01:34:57shashlickJust did
01:35:16shashlickDidn't realize it was only one per person
01:35:36disruptekyeah. it seemed like the right model.
01:38:26shashlickI made three messages to give some structure but seems fair
01:38:50disrupteki can put the link in if you want.
01:39:34disruptekfunny thing about data.
01:50:30*koltrast quit (Ping timeout: 252 seconds)
02:00:35*chenhq2005 joined #nim
02:04:21*chenhq2005 quit (Client Quit)
02:05:46*chenhq2005 joined #nim
02:16:38*koltrast joined #nim
02:18:55shashlickI think it's good enough for now
02:19:04*letto joined #nim
02:19:24disruptekwhat was the cause of leorize's issue building nimterop?
02:31:03shashlickCannot reassign stdout
02:31:20disruptekoh right.
02:32:13disruptekwow, this is cool.
02:32:27disruptekthat'll make clyybber happy.
02:52:43*dddddd quit (Remote host closed the connection)
02:59:22muffindrakeMy actual question was how I'd run a given .nim file as a proper nim program in a script
03:00:28voltistAs in compile and execute Nim from inside a Nim program?
03:00:44*NimBot joined #nim
03:34:07leorizeshashlick: I just got back home, will test now
03:34:49muffindrakevoltist: No, execute a regular nim program like a script
03:35:12leorizewell the VM is not that nice to use atm...
03:35:38leorize^ but there you go
03:35:54leorizethat allows you to integrate the nimvm into your program
03:36:39leorizeshashlick: btw you should bump the minimum regex verion for nimterop
03:36:54disruptekyeah, 0.11 is too old for 1.0.4.
03:37:07disruptekor 0.10 is. w/e
03:37:55leorizeshashlick: building nimterop head and still got stdout reassignment issues
03:39:32leorizeah it's in a separated branch
03:40:02leorizeso, uh... /tmp/nimble_32190/githubcom_genotrancenimarchive_0.3.4/nimarchive_32190.nims(23, 18) Error: cannot open file: nimterop/docs
03:40:41leorizeprintPkgInfo() failed
03:40:51leorizeapparently the nimble file imports nimterop
03:41:16leorizeand nimble didn't put nimterop in the path yet because it wasn't manage to figure out the dependencies
03:51:51shashlickSorry I didn't get around to bump it
03:52:54*hexeratops joined #nim
03:54:07*rockcavera quit (Remote host closed the connection)
03:58:49disrupteki guess i want to see the last tag that passed or the first tag that failed. tags in the gutter, with color to indicate pass/fail. empty space means it's uncovered, but maybe we can heat map its impact on tests, too.
03:59:35*muffindrake quit (Ping timeout: 272 seconds)
04:01:09*muffindrake joined #nim
04:04:07shashlickbumped the reqs, let the CI pass and I'll merge/tag
04:04:32leorizedisruptek: https://forum.nim-lang.org/t/5727#36031
04:04:57leorizeI think I can help with the pseudo package thing to install nimph :P
04:05:16shashlick@leorize: do you have latest nimterop and nimarchive?
04:05:17disruptekoh yeah, i forgot about that idea.
04:05:44leorizeshashlick: nimterop with the commit from reopen branch
04:06:14leorize[email protected]#head couldn't install because of the error I showed above
04:06:49shashlickyou're on gentoo right?
04:07:06leorizeyea, on nim/nimble git fwiw
04:07:09shashlickis there a docker i can use to repro?
04:07:14shashlickwhich nim/nimble
04:07:45leorizenimble: 5e72840336c03ef66557f96623fedddece53083d
04:08:04leorizenim: 675ca997fba448c2eb096f4bb12ba97125d79bcd
04:08:46leorizeif you're asking which ebuild: https://github.com/alaviss/lrz-overlay
04:08:50leorize^ all in my overlay
04:10:33shashlickokay no idea on gentoo overlay stuff
04:10:56leorizeit's just an ebuild repository
04:11:21disruptekthe answer is, it's probably not easy to repro.
04:11:21leorizejust in case you're curious on how I built my nim
04:11:56shashlickyour nimble is super old
04:12:10shashlickJune 21, 2019
04:13:39leorizehmm, my auto updater should've caught that
04:13:42leorizebuilding a new nimble now
04:15:11leorizeoh, I know why...
04:15:21leorizenimble has to build nimble during choosenim installation
04:15:38leorizeon 0.11.0 now
04:17:21leorizeand it still doesn't work
04:17:35leorizereason? I apparently cloned nimterop once with nimble develop :P
04:17:55leorizehaven't updated that one since forever
04:18:28leorizeit's building now
04:19:24shashlickokay neat, fingers crossed
04:19:38leorize ... /tmp/nimble_30354/githubcom_genotrancenimarchive_0.3.4/nimarchive/archive.nim(115, 10) template/generic instantiation of `cImport` from here
04:19:41leorize ... /usr/lib/nim/core/macros.nim(1504, 99) Error: undeclared identifier: 'stat'
04:23:47shashlickwhere do I start - https://hub.docker.com/u/gentoo/
04:26:03*nsf joined #nim
04:26:46shashlickstat is defined - https://github.com/genotrance/nimarchive/blob/master/nimarchive/archive.nim#L100
04:27:37disruptekall you need for a portage dockerfile:
04:27:44disruptekFROM gentoo/portage:latest as portage
04:27:48disruptekFROM gentoo/stage3-amd64:latest as gentoo
04:27:55disruptekCOPY --from=portage /usr/portage /usr/portage
04:28:31*hexeratops quit (Quit: Leaving)
04:28:51disruptekthen you can, like, RUN eselect profile set default/linux/amd64/17.0/no-multilib/hardened && source /etc/profile && emerge -DN @world
04:31:05shashlick@leorize: is your nimterop the latest? 😄
04:34:36leorizemaybe not :P
04:35:10leorizeupdated and still same result :(
04:35:27leorizeon reopen branch rn
04:36:44Yardanicocan you try with nim compiled as your user maybe?
04:41:15Yardanicowell I thought you have used nim from some gentoo overlay or from official gentoo repos and it didn't work with nimterop
04:41:32leorizeit's not some overlay, it's mine :P
04:42:28shashlickhow do you install stuff in gentoo? 😐
04:42:33shashlickneed git
04:42:33*marmotini_ joined #nim
04:42:41leorizeemerge <package name>
04:42:59Yardanicowell, to be honest I've actually tried gentoo for a week recently (after I got 3700X), didn't like it really (well, I've configured my system just like I use other distros usually)
04:43:03Yardanicobut that's entire subjective :P
04:43:37leorizeyou will love gentoo when you start compiling your own system libraries :P
04:43:53leorizeback when I was on arch an AUR package might lag behind official
04:43:58leorizeand bam your stuff no longer works
04:44:20leorizehave to download the pkgbuild and update it manually
04:44:23disruptekgentoo is pretty great.
04:44:52*chenhq2005_ joined #nim
04:45:03Yardanicowell I don't really use stuff from AUR, almost everything is from official arch repos (I'm on arch right now), but I've looked at some alternative distros like alpine or void too
04:45:46Yardanicowe should all just use windows like ar*q :P
04:45:52shashlicki boot stage3-amd64
04:46:02shashlickwhat do i eselect
04:46:14disruptekeselect profile set default/linux/amd64/17.0/no-multilib/hardened && source /etc/profile && emerge -DN @world
04:46:22leorizedon't have to, the default profile should just works
04:46:40leorizealthough the no multilib profile will give you faster build times (no need to build 32bit libs) :P
04:47:01shashlickdoesn't work buddy
04:47:20disruptekeselect profile list
04:47:39*chenhq2005 quit (Ping timeout: 240 seconds)
04:47:41disruptekthen eselect profile set NUM
04:48:05shashlickcannot load module list
04:48:29disruptekemerge --sync
04:50:25shashlickgpg: keyserver refresh failed: Server indicated a failure
04:50:39*marmotini_ quit (Remote host closed the connection)
04:51:02*pbb quit (Remote host closed the connection)
04:51:11*marmotini_ joined #nim
04:52:55leorizehave you copied the resolv.conf before you chroot?
04:53:13leorizebtw I grepped `stat` from nimterop output
04:53:27*marmotini_ quit (Remote host closed the connection)
04:53:33leorizethere weren't any defines of that in the output
04:53:44*marmotini_ joined #nim
04:55:31shashlickmust be some coverride bug
04:55:52shashlickworks on ubuntu tho
04:56:03leorizeI've removed nimterop cache
04:56:10leorizelet's see if it's gonna work this time
04:56:37shashlickthat might help, or even using -f
04:56:42leorizeyep, probably the nimarchive build was botched
04:56:50leorizeremoved it and everything built
04:58:34leorizeshashlick: you wanted a fully static binary, right?
04:58:43leorizelemme build static libressl real quick
04:58:47*jwm224 quit (Quit: WeeChat 2.8-dev)
05:02:37shashlickyep, will need to configure choosenim to statically link with it
05:03:03shashlicki am going to tag 0.5.1 of choosenim, will need an official build after that
05:03:36leorizegot a build, fully static, no dlopens
05:04:18leorizequestion now is how do I send this to you lol
05:08:19leorizeany file hosting service that I can just toss mine into?
05:10:06leorizeshashlick: I think I can just mail it to you
05:12:17leorizeshashlick: link sent via pm
05:25:33disrupteki want to export a proc that is operated upon by a custom macro pragma. but because this turns into mymacro: proc somedef*(), i get a compiler error: attempt to export proc not at top-level. 🙁
05:45:06*marmotini_ quit (Remote host closed the connection)
05:45:39*marmotini_ joined #nim
05:50:03*marmotini_ quit (Ping timeout: 240 seconds)
05:53:14*leorize quit (Quit: WeeChat 2.6)
05:55:41shashlickjust tagged choosenim v0.5.1, CI will build and post binaries in the next 30 minutes - appreciate some testing
05:55:45shashlickthanks in advance
05:56:28*marmotini_ joined #nim
05:57:50FromGitter<gogolxdong> Any idea why c2nim errors ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e1ea9dd53fd014bb0750982]
06:01:49*marmotini_ quit (Ping timeout: 272 seconds)
06:25:20*narimiran joined #nim
06:28:41*marmotini_ joined #nim
06:29:21*marmotini_ quit (Remote host closed the connection)
06:29:35*marmotini_ joined #nim
06:37:56*theelous3 quit (Read error: Connection reset by peer)
06:42:55*chenhq2005_ quit (Ping timeout: 258 seconds)
06:44:45leorize[m]my guess would that c2nim couldn't process `__ctx`
06:45:37leorize[m]oh actually, maybe it's `CRYPTO_MINALIGN_ATTR`
06:46:18leorize[m]c2nim don't understand C macros really well
06:53:40*silvernode joined #nim
06:54:50silvernodeSitting here in the car at work on my ThinkPad about to clock in. How is everyone?
06:55:07silvernodeIt's 23:54 here in AZ
07:00:58*silvernode quit (Ping timeout: 268 seconds)
07:06:50*marmotini_ quit (Remote host closed the connection)
07:07:27*marmotini_ joined #nim
07:11:39*marmotini_ quit (Ping timeout: 240 seconds)
07:19:16*voltist quit (Quit: Leaving)
07:25:50livcdi am about to puke
07:25:54FromGitter<zacharycarter> it's 9:25 am here
07:25:55livcdhad the worst coffee in my life
07:26:01FromGitter<zacharycarter> and I just go to work :/
07:27:54livcdyou dont seem to be excited
07:28:50FromGitter<zacharycarter> hahaha well I'm looking for a new job for a reason :P
07:29:07Zevvyou know where to find me :)
07:29:09FromGitter<zacharycarter> I mean, that's not the only reason, life is kind of complicated atm, but it's a reason
07:29:16FromGitter<zacharycarter> I know but I need to go back to the states haha!
07:29:28FromGitter<zacharycarter> otherwise I'd do it Zevv
07:29:34livcdWhere are you from zachary ?
07:29:45Zevvhe is all over the place
07:29:48FromGitter<zacharycarter> Northern Virginia
07:29:51FromGitter<zacharycarter> but right now I'm in Helsinki
07:30:10FromGitter<zacharycarter> I'm trying to find a gig in Austin Texas
07:30:13ZevvI bet the 0.2 hours of daylight also help making life happy and easy ove there
07:30:16livcdCIA agent confirmed
07:30:16FromGitter<zacharycarter> or something remote
07:30:28FromGitter<zacharycarter> :P def not a CIA agent - they'd never accept me haha
07:30:39FromGitter<zacharycarter> yeah - the daylight thing is kind of a bummer
07:31:00FromGitter<zacharycarter> but really - I've just figured out that game development is not much different than what I was doing before, and I get paid less and work more hours
07:31:17FromGitter<zacharycarter> and it's hard to get my significant other over here so I'd rather just go back to the states and earn more
07:31:20livcdI never visited the US but I am afraid I would regret being born here if I would have visited :?
07:31:26FromGitter<zacharycarter> and get fat and lazy and liv ethe American dream
07:31:28livcdalso -> offtopic ?
07:31:44FromGitter<zacharycarter> meh - until there's on topic convos people usually don't care
07:31:52ZevvMy bet is that game dev is just like any dev. *what* you are working on is only 5% of the job, the rest is how
07:32:14Zevvif you want to do game dev for fun, go indie or make it a hobby
07:32:32FromGitter<zacharycarter> I think it'd be different if I was like deeply involved in a project and I was super passionate about it. But the likelihood of that happening in a professional studio is tiny
07:32:34FromGitter<zacharycarter> and yeah - you're right
07:33:08ZevvI am absolutely 0% personaly excited about the end product of what I'm making now
07:33:27Zevvbut still having loads of fun with all the tech and components
07:33:40FromGitter<zacharycarter> yeah - none of the games I've worked on so far I would play for an extended period of time
07:33:42Zevvbut cmon, tv and settop boxes and android apps, I could not care less
07:33:51FromGitter<zacharycarter> mmhmm
07:34:05Zevvremember in school how the best way to totally ruin your favorite book was to make a report about it?
07:34:09FromGitter<zacharycarter> it might have changed if I had accepted the offer from creative assembly, but it turned out to be a poop offer
07:34:15FromGitter<zacharycarter> hahaha yeah
07:34:26FromGitter<zacharycarter> good analogy
07:36:00livcdwhy was it a poop offer ? lol
07:37:06FromGitter<zacharycarter> they offered me less than I'm making now, benefits weren't great, relocation monies wouldn't have covered my expenses
07:37:57FromGitter<zacharycarter> and I would have had a commute / had to buy a car when I got over there
07:38:08FromGitter<zacharycarter> it just didn't make any sense at all to take them up on it
07:40:58FromGitter<zacharycarter> good news is - I have a phone interview with a company in Austin tonight, and my girlfriends good friend works there so fingers crossed
07:44:15livcdthe US is so huge...it's crazy
07:45:50FromGitter<zacharycarter> definitely - that's one thing that kind of sucks about the US
07:46:00FromGitter<zacharycarter> like in Europe it's super easy to go to another country
07:46:28FromGitter<zacharycarter> from the US it's expensive to travel to anywhere else in the world, unless you're going to Canada / South or Central America
07:48:39livcdyou have other perks :)
07:50:13FromGitter<zacharycarter> yeah, this is true
07:51:36livcdIf you are from a small country in Europe it feels very foreign wherever you go (in Europe). At least to me
07:52:00FromGitter<zacharycarter> I can see that - everything in Europe feels foreign to me :P
07:52:38*solitudesf joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:05:04narimiranlivcd: what small country are you from?
08:05:17*gmpreussner joined #nim
08:16:47*uu91 joined #nim
08:16:53Zevvwell well https://github.com/sendilkumarn/gopurerc - A pure reference counting garbage collector in Go
08:19:55*pvn joined #nim
08:20:18Araqthat paper has a bug
08:20:45Araqin fact, it has at least 2 bugs
08:22:48Araqand the code uses * so it's simply a prototype of something
08:22:59Araq(Go's GC'ed pointers)
08:32:10Zevvgo tell'em araq!
08:32:39Araqnah, it was hard to figure out, cost me 3 months of work
08:32:53AraqI'll pass and let them have the "fun" on their own
08:33:39FromDiscord<gingerBill> I'd just say "the paper has bugs in it"
08:34:52*floppydh joined #nim
08:43:43FromGitter<Varriount> @zacharycarter and I have met in real life
08:43:51FromGitter<Varriount> He's cool
08:44:01FromDiscord<Rika> We need more young people into nim
08:44:36FromDiscord<Rika> My thought: younger people might make memes of nim, therefore advertise possibly, therefore more popularity :V
08:45:20FromGitter<zacharycarter> @Varriount is as well :)
09:04:05*PMunch joined #nim
09:04:59*marmotini_ joined #nim
09:11:25*endragor joined #nim
09:13:22*solitudesf quit (Ping timeout: 268 seconds)
09:21:07*chenhq2005 joined #nim
09:22:12FromDiscord<exelotl> In that case we need a Nim anime mascot ;)
09:24:07FromGitter<sheerluck> @exelotl like this? --> https://i.imgur.com/xdGJRs4.png
09:25:32FromGitter<zacharycarter> do young people really like anime?
09:25:45FromGitter<zacharycarter> I've never liked it, and I was young once
09:26:51FromGitter<zacharycarter> I like the fact that the majority of the Nim community is older / more mature. I have a tough time handling online communities with a lot of young users.
09:27:25PMunchWe do have some young users, but the fact that we're on IRC probably skews our perception of the demographic
09:27:47FromGitter<zacharycarter> true
09:28:02FromGitter<zacharycarter> and yeah - we do, Luke is pretty young I think
09:28:11FromGitter<zacharycarter> but also has written some pretty awesome stuff
09:28:12FromDiscord<mratsim> depends on the Anime, there are plenty with lots of psychology behind unlike comics
09:28:51FromGitter<sheerluck> https://i.imgur.com/3FZpk0w.png
09:30:31kungtotteOne thing I really like about the Nim ecosystem is that we don't get Rewrite It In Nim-zealots or The Next Big * As A Service JavaScript Horror-people
09:30:52kungtotteYou know the kind, the ones who go into work every Monday to look up what new framework they should port their code to
09:33:42PMunchzacharycarter, who's Luke?
09:33:45*chenhq2005_ joined #nim
09:34:09FromGitter<zacharycarter> @kayabaNerve
09:34:29PMunchAh right, does it show actual names on Gitter?
09:34:58FromGitter<zacharycarter> yeah - well it allows you to mouse over the user's handle and then it will show a pop up with their github profile info
09:35:02FromGitter<zacharycarter> and his name is in his github profile
09:35:12PMunchAaah right
09:35:35PMunchI remember my first year at FOSDEM going around saying hi to people and everyone introducing themselves with both their name and IRC handle :P
09:35:52*chenhq2005 quit (Ping timeout: 265 seconds)
09:37:15*chenhq2005_ quit (Client Quit)
09:39:04*chenhq2005 joined #nim
09:39:23AraqPMunch, which hotel will you stay in?
09:41:13lqdev[m]@Rika, @zacharycarter I'm another young person using Nim
09:42:23FromGitter<zacharycarter> niceeeee
09:44:26PMunchAraq, good question. A friend of mine booked our room
09:44:28PMunchJust a sec
09:44:46PMunchzacharycarter, I mean define young
09:45:43PMunchAraq, this is the one we're staying in. Got a room for four people, but I think we're only three thus far: https://www.booking.com/hotel/be/brussels-louise.no.html
09:46:04FromGitter<sheerluck> I'm old person using Nim -- will you expel me from here?
09:51:15FromGitter<zacharycarter> I guess under 25? I don't know... I'm old so my definition of younger keeps changing
09:51:32FromGitter<zacharycarter> like I'm about to be 35 and I think anyone who is under 30 is young
09:51:37FromGitter<zacharycarter> when I'm 40 I'll think 30 year olds are young
09:54:17AraqPMunch, ok, investigating
10:06:33FromGitter<wibisono> I remember promising to ping @Araq, I asked around and this community funding will be opened in May: https://www.ripe.net/support/cpf
10:08:10*lritter joined #nim
10:23:58*pbb joined #nim
10:33:43*uu91 quit (Ping timeout: 268 seconds)
10:42:06*natrys joined #nim
10:48:03FromDiscord<Rika> i'm probably the youngest adult here 😛
10:48:14*sz0 joined #nim
10:53:26*marmotini_ quit (Remote host closed the connection)
10:53:59*marmotini_ joined #nim
10:55:21*ng0 joined #nim
10:58:36*marmotini_ quit (Ping timeout: 258 seconds)
11:00:33*abm joined #nim
11:01:47*chenhq2005 quit (Quit: No Ping reply in 180 seconds.)
11:04:41*chenhq2005 joined #nim
11:08:46*Guest50399 quit (Quit: leaving)
11:09:38*marmotini_ joined #nim
11:11:06*WilhelmVonWeiner joined #nim
11:14:41*marmotini_ quit (Ping timeout: 272 seconds)
11:17:03*dcmertens joined #nim
11:17:09*krux02 joined #nim
11:18:36*quantumbird joined #nim
11:23:51lqdev[m]I'm not even an adult :)
11:29:11federico3we should create a Signal (or Telegram) group for FOSDEM
11:29:59FromDiscord<Rika> i mean legally adult
11:30:36*WilhelmVonWeiner quit (Quit: leaving)
11:30:52*WilhelmVonWeiner joined #nim
11:36:42*letto quit (Quit: Konversation terminated!)
11:36:46krux02federico3, I am pretty sure that Araq does not have Signal for the same reason that I don't have it.
11:37:40krux02federico3, are you aware that you can just create an IRC channel by just entering it. No "create" required.
11:38:19federico3I'm well aware, but a lot of people didn't want to use IRC in previous years
11:39:15*rockcavera joined #nim
11:42:35*letto joined #nim
11:44:25dom96krux02, IRC doesn't work when on the go.
11:46:06*solitudesf joined #nim
11:48:24krux02dom96, well there are mobile IRC clients
11:48:34narimiranuse telegram, don't complicate.
11:49:10krux02think so
11:50:26shashlickPlease test the latest choosenim release - https://github.com/dom96/choosenim/releases/tag/v0.5.1
11:51:10*NimBot joined #nim
11:51:14PMunchYup we do, with 13 members :)
11:51:39PMunchThe one from two years ago has just been repurposed as a general Nim group :P
11:51:47PMunchWhich is surprisingly active
11:53:29AraqI have telegram...
11:58:22*dddddd joined #nim
12:04:14*hehekuma joined #nim
12:08:07*quantumbird quit (Ping timeout: 260 seconds)
12:25:40*hlavaty joined #nim
12:29:53lqdev[m]@Rika what do you think I was referring to?
12:33:10*hehekuma quit (Ping timeout: 268 seconds)
12:34:19*krux02 quit (Remote host closed the connection)
12:40:32*hehekuma joined #nim
12:41:28*dcmertens quit (Ping timeout: 272 seconds)
12:44:47*marmotini_ joined #nim
12:48:42*endragor quit (Remote host closed the connection)
12:55:29FromDiscord<Rika> dunno, "over 20"
13:06:36*oculux quit (Ping timeout: 265 seconds)
13:10:52*oculux joined #nim
13:31:28*jholland__ joined #nim
13:39:28Araqoh look, thread local GCs for Rust, https://docs.rs/gc/0.3.3/gc/
13:49:18*chenhq2005 quit (Ping timeout: 260 seconds)
13:53:18shashlickAraq: I'm working on https://github.com/dom96/choosenim/issues/28
13:53:19disbotAsk the user whether they want Nim added to PATH
13:53:37Araqsteal the code from finish.nim
13:53:43shashlickstarted out with pulling the code from finish
13:53:56shashlickbut it didn't propagate on my windows machine
13:54:12shashlickthen dabbled with setx which is completely wrong, so am going back to your version
13:54:23*jwm224 joined #nim
13:54:54shashlickthe value gets set in the registry correctly but new windows don't get the value
13:55:02shashlickhave to reboot for it to take effect
13:57:09livcdthat's a bit weird
13:58:00shashlickagreed, even simple settled things waste time
13:58:37Araqall you need to do is to restart cmd.exe
13:58:45Araqso that it picks up the modified PATH
13:59:37shashlickmust be something weird with my instance of Windows
14:00:29shashlickAnyway now that some major bugs are fixed in choosenim, am going to work on features
14:01:07Araqthanks, you're a true gift to the Nim community
14:02:30FromDiscord<Rika> i wish i was motivated enough to work on fixing bugs ;;
14:03:46shashlickThanks :)
14:04:17shashlickI've spent a lot of time on new stuff but bugs are what turn people off so worth the time
14:04:42shashlickAnd the easy ones make you feel heroic so good for morale too
14:04:57shashlickEven if you introduced them in the first place!
14:08:18FromGitter<kaushalmodi> shashlick: I plus what Araq said
14:08:32FromGitter<kaushalmodi> *plus 1
14:11:10livcdshashlick: could be the way how you start your cmd
14:12:01*jwm224 quit (Quit: WeeChat 2.8-dev)
14:12:06livcdi had this issue because i start Cmder via Everything so when I update the PATH I need to restart Everything as well
14:12:23*jwm224 joined #nim
14:12:24FromDiscord<Rika> why even use windows /s
14:16:23*Vladar joined #nim
14:21:12disrupteki want to export a proc that is operated upon by a custom macro pragma. but because this turns into mymacro: proc somedef*(), i get a compiler error: attempt to export proc not at top-level. 🙁
14:22:43Araqmymacro shouldn't open a new scope then
14:23:16disruptekactually, that's not the problem.
14:23:38disrupteksomething i wrote last night.
14:24:08*sekao joined #nim
14:24:12disruptekthe error i'm getting this morning is that the expression has no type.
14:24:35*jwm224 quit (Quit: WeeChat 2.8-dev)
14:24:42disruptekthe expression is, of course, the procdef (without an export).
14:25:03FromDiscord<Clyybber> shashlick: Nice, is the bug that makes executables not executable also fixed?
14:25:11disruptekclyybber: in theory.
14:25:27disruptekwhat happened to the case obj bug in arc?
14:25:58FromDiscord<Clyybber> Araq fixed it
14:26:00FromDiscord<Clyybber> properly
14:26:11sekaowhen i turn on hotcodereloading i get `could not load: nimhcr.dll`. do i need to build that dll myself? the docs don't mention this
14:26:24disruptekwith an empty line?
14:26:36FromDiscord<Clyybber> later on when =destroy(dst) gets extracted out of `=` and `=sink` it can be optimized further
14:26:44disruptekfair enough.
14:27:01disruptekkick the can down the road. 😛
14:28:15AraqClyybber: the fix is still wrong
14:28:21AraqI'm working on it
14:28:21FromDiscord<Clyybber> Oh, is it?
14:28:38Araqyeah, consider: result = result.kids[0]
14:28:52disrupteki think my 1bit hack feels a little hacking in the morning light.
14:28:59disruptekhackish, too.
14:29:05Araq1. we turn this into move and produce 'wasMoved(result.kids[0])' # wrong!
14:29:11Araq(fixed in my branch)
14:29:25Araq2. if we produce '=' instead, we start by destroying result
14:29:33*hlavaty quit (Ping timeout: 260 seconds)
14:29:34Araqand then we're in limbo
14:29:52FromDiscord<Clyybber> Hmm, I see
14:30:05FromDiscord<Clyybber> Araq: Btw, I see you incoporated array access too
14:30:12FromDiscord<Clyybber> As in ignore runtime array access
14:30:37Araqyeah, that fix isn't correct either
14:30:42Araqbut much better than it was before
14:30:44FromDiscord<Clyybber> Yeah, I was about to tell you
14:30:50FromDiscord<Clyybber> Yeah definitely better
14:31:03FromDiscord<Clyybber> But it may mess with firstWrite
14:31:03Araqanyhow, here is what we must do:
14:31:18Araqlet blob {.cursor.} = dest # remembers the old dest.kind
14:31:24*jwm224 joined #nim
14:31:24*noonien quit ()
14:31:29Araqdest.kind = src.kind
14:31:37Araqfor every field (dependent on dest.kind):
14:31:40*noonien joined #nim
14:31:45Araq `=` dest.field, src.field
14:32:00Araq^ I think.
14:32:04Araqunless you see a flaw in that
14:32:12disruptekthat sounds way more involved than my hack.
14:32:30FromDiscord<Clyybber> Araq: Yep
14:32:31*letto quit (Quit: Konversation terminated!)
14:32:44FromDiscord<Clyybber> you switched blob and dest around but I think i get it
14:32:47disruptekwhen we destroy, we set kind = -kind. now we can recover the type but we know we don't need to free it.
14:33:54*pvn quit (Quit: Leaving.)
14:33:56FromDiscord<Clyybber> disruptek: ha, interesting
14:34:51*sekao quit (Remote host closed the connection)
14:35:09AraqClyybber: so, what do you think?
14:35:15Araqis my solution correct?
14:36:08FromDiscord<Clyybber> I think so,
14:36:44FromDiscord<Clyybber> Well, with a =destroy dest at the top at least
14:37:48FromDiscord<Clyybber> Araq: Tell me if I got it right:
14:37:57FromDiscord<Clyybber> `=`(dest, src):
14:38:14FromDiscord<Clyybber> if notZero(dest):
14:38:16*vsantana quit (Remote host closed the connection)
14:38:23FromDiscord<Clyybber> =destroy(dest)
14:38:36FromDiscord<Clyybber> wasMoved(dest)
14:38:46FromDiscord<Clyybber> dest.kind = src.kind
14:38:48FromDiscord<Clyybber> and so on
14:38:54FromDiscord<Clyybber> right?
14:39:08disruptekthat makes no sense to me.
14:39:18Araqthat's not what I wrote :-)
14:39:24FromDiscord<Clyybber> sorry, discord cut off my indentation
14:39:46FromDiscord<Clyybber> Araq: I just added the if notZero(dest): destroy(dest)
14:40:19Araqthere are no ifs here
14:40:31FromDiscord<Clyybber> Araq: I meant to write down the body of `=`
14:40:40FromDiscord<Clyybber> Araq: But we must destroy dest if its not zero
14:40:53Araqlook again, we do
14:41:04Araqbut at the end
14:41:21FromDiscord<Clyybber> Ah, I was confused by you calling the source dest
14:41:25FromDiscord<Clyybber> and the dest blob
14:41:26FromDiscord<Clyybber> :p
14:41:35FromGitter<kaushalmodi> narimiran: How will the docs reflect the system breakup in https://github.com/nim-lang/Nim/commit/e708d5de75c0cccba666f19390ee1ac8e3df8a7a ?
14:41:55disruptekno, he wrote it correctly.
14:42:00Araqnot at all, the docgen follows include files
14:42:20narimiran@kaushalmodi all that stuff is *included*, so i think there shouldn't be any problem
14:42:33FromGitter<kaushalmodi> wouldn't this need to update?: https://github.com/nim-lang/Nim/blob/devel/lib/system_overview.rst
14:42:37disruptekyou just reverse the order and the problem solves itself.
14:42:54FromGitter<kaushalmodi> narimiran: Oh I see.. you said "include"d
14:43:00rockcaveraI made a silly mistake, wrote newSeqOfCap instead of newSeq and got the error on line 5. But the error is on line 7. Wrong or expected behavior? https://pastebin.com/xsGSsJC5
14:43:07FromGitter<kaushalmodi> thanks
14:43:29Araqsekao: I only tested it on Windows where it produces this DLL automatically
14:43:30FromDiscord<Clyybber> Araq, disruptek: I don't think I get it.. in Araqs snippet we transform `let blob = dest`, right? Or is that supposed to be part of `=`'s body?
14:43:43Araqpart of ='s body
14:44:07FromDiscord<Clyybber> Aaah
14:44:13FromDiscord<Clyybber> Ok, then I'll look at it again
14:44:23Araqproc `=`(dest: var CaseObj, src: CaseObj) = ...
14:44:49Araq let blob = move(dest)
14:45:02Araq dest.kind = src.kind
14:45:20Araq for every field f: `=`(dest.f, src.f)
14:45:26Araq =destroy(blob)
14:45:40shashlickClyybber it is fixed yes
14:45:50FromDiscord<Clyybber> shashlick: nice
14:45:55FromDiscord<Clyybber> Araq: Thanks I get it now
14:46:18FromDiscord<Clyybber> It looks correct to me
14:46:26FromDiscord<Clyybber> But I wonder if we could make it simpler
14:46:48FromDiscord<Clyybber> Or without the temporary blob
14:46:56FromDiscord<Clyybber> disruptek: How would your `=` look?
14:47:14Araqyou can special case 'if dest.kind == src.kind'
14:47:37disrupteki would just skip the destroy if kind < 0.
14:47:41Araqbut then you need to consider that there can be multiple different nested 'kinds' inside the object
14:48:21Araqthe complexity is frightening, I won't make it even more complex
14:48:33disruptekaraq's solution lacks special-casing, which i like.
14:48:41disruptekit uses components that we already depend on.
14:48:42FromGitter<kaushalmodi> Araq: Once you are done with your current discussion, I would like to know if the pragma approach is possible here: https://github.com/nim-lang/Nim/pull/13130#issuecomment-573822349. Using a new pragma like `{.nimDocBackend: cpp.}` would be much cleaner than using a new define. But I do not know how to extract a pragma value in rst docstring and runnableExamples parsing.
14:48:44disbotUse Nim config defined backend to eval doc string code blocks
14:48:47disruptekthe way we expect them to work.
14:48:57disruptekthe code won't need to be touched for awhile.
14:49:10disruptekso, i like it for these reasons.
14:49:59disruptekbut, i like my solution for speed/memory.
14:50:05FromDiscord<Clyybber> Araq: If we pull out =destroy out of = and =sink then we can do it like this:
14:50:34FromGitter<alehander92> hmm
14:51:06FromDiscord<Clyybber> ```
14:51:06FromDiscord<Clyybber> proc =(dest: var CaseObj, src: CaseObj) = ...
14:51:06FromDiscord<Clyybber> dest.kind = src.kind
14:51:06FromDiscord<Clyybber> for every field f: =(dest.f, src.f)
14:51:07FromDiscord<Clyybber> ```
14:51:23FromDiscord<Clyybber> Where the `=destroy(dest)` is outside of `=`
14:51:57*nsf quit (Quit: WeeChat 2.7)
14:53:45Araqkaushalmodi: I think I like
14:53:54Araq{.backend: "cpp".}
14:54:06Araqit's a bit hard to implement though
14:54:34Araqwe must ensure this pragma is processed before we have decided on a backend pipeline
14:55:23disruptekfeels like a complex solution to a simple problem.
14:55:25Araqor maybe just
14:55:30Araqnim doc --backend:cpp foo.nim
14:56:19Araqand then for consistency we also support 'nim c --backend:cpp' and 'nim check --backend:cpp'
14:59:19*letto joined #nim
15:06:27*PMunch quit (Quit: Leaving)
15:10:35*marmotini_ quit (Remote host closed the connection)
15:11:09*marmotini_ joined #nim
15:14:13*marmotini_ quit (Read error: Connection reset by peer)
15:14:29*ng0_ joined #nim
15:14:31*marmotini_ joined #nim
15:18:00*ng0 quit (Ping timeout: 268 seconds)
15:33:01*letto quit (Quit: Konversation terminated!)
15:34:01*marmotini_ quit (Remote host closed the connection)
15:36:14*marmotini_ joined #nim
15:38:00*marmotini_ quit (Remote host closed the connection)
15:38:32*marmotini_ joined #nim
15:38:55*tane joined #nim
15:39:12FromGitter<kaushalmodi> Araq: ⏎ ⏎ > nim doc --backend:cpp foo.nim ⏎ ⏎ ok.. let me see how switches are added to doc and how they are parsed in docgen.. need to pass that switch to both `:test:` docstring and runnableExamples eval [https://gitter.im/nim-lang/Nim?at=5e1f321fdf9e137d58eb2766]
15:39:59*letto joined #nim
15:43:03*marmotini_ quit (Ping timeout: 260 seconds)
15:43:03*floppydh quit (Quit: WeeChat 2.7)
15:51:24*sbr8 joined #nim
15:52:36*sbr8 quit (Client Quit)
15:53:39disruptekthe pragma macro does not yield pragmas without arguments. 😢
15:54:01*ng0_ is now known as ng0
15:54:01*marmotini_ joined #nim
15:56:16FromDiscord<treeform> Why was this change needed? Will it break a ton of code? https://github.com/nim-lang/Nim/issues/13154
15:56:19disbot--gc:arc Error: expression cannot be cast to pointer ; snippet at 12https://play.nim-lang.org/#ix=27tf
15:56:26*sbr8 joined #nim
15:57:30Araqwell I implemented a better string/seq type
15:57:36FromDiscord<Clyybber> @treeform Because strings are now a pointer len pair.
15:57:40Araqbut it takes 2 words now
15:58:19FromDiscord<treeform> how does it know the cap?
15:59:12Araqthe pointer points to payload that contains the cap and the elements
15:59:53FromDiscord<treeform> is that a big win for the language?
16:01:32FromDiscord<Clyybber> yes
16:03:19Araqeven if it weren't, we must be allowed to change implementations
16:03:33*marmotini_ quit (Remote host closed the connection)
16:04:01Araqcast[pointer](str) happened to work and 'cast' always means "I know what I'm doing"
16:04:08*marmotini_ joined #nim
16:09:11*marmotini_ quit (Ping timeout: 272 seconds)
16:09:15FromDiscord<treeform> I just compiled one of my largest nim projects 34k lines and it worked fine with --gc:arc
16:10:01FromDiscord<Clyybber> nice
16:10:58FromDiscord<Rika> tests passed?
16:13:22FromDiscord<mratsim> You need to change the documentation of cast then :p
16:13:29dom96cast[pointer](str[0]) still works right?
16:13:52*dom96 is waiting patiently for async arc support
16:14:02*FromGitter quit (Remote host closed the connection)
16:14:20*FromGitter joined #nim
16:15:28FromDiscord<treeform> @Rika nope some obscure things changed, like 'x.port' is of type: Port.
16:16:02FromDiscord<Rika> 😮
16:18:24Araqdom96, huh? you cast a 'char' into a pointer?
16:18:46dom96oh, sorry, missed an `addr`
16:19:20Araqsure that's unaffected
16:19:38*narimiran quit (Ping timeout: 240 seconds)
16:23:07*sbr8 quit (Ping timeout: 272 seconds)
16:25:12*marmotini_ joined #nim
16:28:12FromDiscord<treeform> I found a cool name for a library, not sure what it should do though... The name is `equanimity` it has nim inside of it!
16:31:28WilhelmVonWeinersome kind of super equality operators
16:32:49Araqhttps://github.com/nim-lang/packages/pull/1323/files nice
16:32:50disbotbarcode library
16:32:55*narimiran joined #nim
16:44:18*abm quit (Quit: Leaving)
16:48:29*Pqzcih5 quit (Remote host closed the connection)
17:00:58*leorize joined #nim
17:04:04leorizeshashlick: do you still need musl static choosenim builds?
17:04:44rockcaveraI made a silly mistake, wrote newSeqOfCap instead of newSeq and got the error on line 5. But the error is on line 7. Wrong or expected behavior? https://pastebin.com/xsGSsJC5
17:07:00leorizeyup, faulty stacktrace i believe
17:07:49Araqrockcavera, bug (minor)
17:15:16shashlickleorize: sure - a v0.5.1 build will be useful
17:15:20*nsf joined #nim
17:20:43leorizepm sent
17:26:34*Trustable joined #nim
17:30:26ZevvHow do .compilerproc. declarations end up in calling C modules?
17:30:59disruptekwrong turns, gps from 2005, the usual reasons.
17:31:28ZevvI added the compilerproc pragma to a proc in system.nim, but it gets called from C files that don't see its prototype
17:32:40disruptekits prototype doesn't make it into the c codegen?
17:34:00Zevvonly in stdlib_system.nim.cpp, but not in my main module
17:34:07Zevvso I need some kind of trick for that I guess
17:37:07leorizehmm how do you share data between different processes?
17:37:55ZevvIPC :)
17:38:30Zevvah: the trick is to put a '#' in front of the called symbol.
17:38:45Zevvleorize: elaborate on what kind of data sharing
17:38:56*Trustable quit (Remote host closed the connection)
17:39:30Zevvsome options in order of complexity, speed, and flexibility: files, pipes, sockets, shared memory
17:39:44disrupteki don't see uucp in that list.
17:39:56Zevvit is kind of an outlier
17:40:00disruptekfair enough.
17:40:04Zevvit is slow *and* complicated
17:40:20disruptekpffbt have you heard about this new thing, `SMTP`?
17:40:27ZevvI uucp'ed *so* much one time. We had 250 systems on 20 modems
17:40:41Zevvand in 2020 I still do hayes
17:41:11leorizeI'd like to make testament to only request an azure run id (it's an int) when required
17:41:46leorizebut testament launches tests in parallel, so I have to communicate this id that was acquired by one of the child processes somehow
17:42:14Zevvthe dead simple method would be to dump it in a file somewhere, probably
17:42:15leorizeI don't wanna do this in the parent because a child might be spawn but no tests will be run
17:42:26Zevvdo you need/want to inform the parent process, or can it poll?
17:42:51disruptekon linux you can use fs notification.
17:43:10leorizeAraq, narimiran: does anyone actually use the azure pipelines tests display?
17:43:35Zevvleorize: or open a pipe and pass the write side file descriptor by environment variables into the child processes.
17:43:49leorizethat's not portable :p
17:43:53Zevvthe child can do a posix.write(getenv("foobar").int, $id)
17:43:59Zevvthen use a file
17:44:04leorizetestament has to do CI on windows as well
17:44:36Zevvpff see if I care
17:44:49Zevvthen make a sockepair, that is portable
17:45:21leorizeit appears that Nim CI is choking Azure's REST API
17:45:41disruptek!repo bluu
17:45:42disbothttps://github.com/disruptek/bluu -- 9bluu: 11Microsoft Azure Cloud (MAC) APIs in Nim 15 0⭐ 0🍴
17:46:02leorizeI'm interfacing with azure pipelines :P
17:46:17leorizethe API is pretty simple, but apparently it's slow
17:46:35disrupteki would use the simplest thing that works.
17:46:58disruptektried and true.
17:47:06disruptektrusty uucp.
17:54:37*arecaceae quit (Remote host closed the connection)
17:55:00*arecaceae joined #nim
17:56:22Zevvhow relevant is --newruntime today?
17:56:29Zevvwill that go away?
17:56:53disruptekdo you mean the switch or the code?
17:57:30disruptekthe switch cannot go away. the code is integral to arc/orc.
17:58:32Zevvbut what is the relation? Does --gc:arc imply --newruntime? What does --runtime do without --gc:arc?
17:59:44disruptek--newruntime is aka --gc:ownedrefs
18:00:09AraqZevv, --newruntime introduce 'owned ref' and it's a big, breaking change
18:00:33Araqfor an improved runtime efficiency that never materialized
18:00:59disruptekarc is efficient, but the big win is in programmer efficiency, imo.
18:01:16Araqit does avoid cycles by construction though and has benefits for threading too
18:01:34disruptekbetter to let a computer sort these problems out.
18:02:11Araqand we are "really close now (TM)" to make a proposal which does not break so much code
18:03:07Araqor if you know C++ well:
18:03:19Araq--gc:arc ~~ shared_ptr done right
18:03:29Araq--newruntime ~~ unique_ptr done right
18:03:57Zevvand best of both worlds?
18:04:55Araqbest of both worlds is "work in progress"
18:06:59Araqyou can write your own unique_ptr already though, it's just super alien :P
18:07:38disruptekhow can any of the async code be gcsafe when it runs callbacks provided by the user?
18:08:11Zevvtell me that disruptek
18:08:25Zevvthis is my pet peeve: https://github.com/dom96/nim-in-action-code/issues/6
18:08:26disbotnot GC-safe ; snippet at 12https://play.nim-lang.org/#ix=26qK
18:09:47disruptekwell, i don't see how it can ever run in arc if we cannot let arc do its magic.
18:10:24Araqdisruptek, easy, the callbacks all have to be .gcsafe too
18:10:53disruptekaraqlogic ftw
18:11:00Zevvquoting Zevv: "Also: if the gcsafe restriction really applies to asyncHttpServer, should it not apply to all async? I can now simply create my own async http server without the gcsafe restriction."
18:12:46*icebattle joined #nim
18:12:49disrupteki mean, i looked at, like, currying the callbacks so the api doesn't change but we get the future in the cb.
18:13:29*natrys quit (Quit: natrys)
18:13:53Araqhttps://github.com/zevv/withnimble-packages2 sec 623 ms
18:13:54AraqError message:
18:13:54AraqFailure: reBuildFailed
18:13:54Araqpackage test failed
18:13:54Araq$ nimble test
18:13:55Araq Executing task test in C:\projects\nim\pkgstemp\with\with.nimble
18:13:56AraqC:\projects\nim\pkgstemp\with\tests\tests.nim(22, 5) Error: low(cond) must be 0 for discriminant
18:14:00AraqZevv, ping
18:14:31Araq" low(cond) must be 0 for discriminant" ?
18:14:35*marmotini_ quit (Remote host closed the connection)
18:14:40Araqdid you touch your package today?
18:14:45ZevvYeah I merged a PR
18:15:01Araqwell it's broken
18:15:48ZevvBut I did not release, didn't realize master is in the tests
18:17:20disruptekso the reason to link async cb to its future is purely prevent arc from breaking the subgraph?
18:17:37ZevvThis malloc cleanup is proving a bit of a hassle. Everthing I touch breaks something somewhere.
18:17:50ZevvI'll have to go refactoring in smaller steps I guess
18:18:20Zevva lot of permutations of options to keep in mind
18:18:37disruptekthis is why i want instant ci.
18:18:47disrupteki don't think it sounds all that hard to get something useful.
18:21:08FromGitter<kaushalmodi> Zevv: Setting up CI that tests using nim stable and devel is pretty trivial
18:21:14FromGitter<kaushalmodi> I do it even for my useless projects
18:21:26Zevvoh that's not the problem, I can run most of the relevant testst on my own computer
18:21:28disruptekall zevv's projects are useless.
18:21:40Zevvthe problem is that I'm trying to touch some very basic stuff in the compiler and libs
18:21:41FromGitter<kaushalmodi> heh
18:22:01Zevvbut can't do A without B, and if I do both, something else breaks
18:22:03disruptekthis is why you want to see what breaks, and fast.
18:22:25disrupteklike, 3 seconds would be good. less would be better.
18:22:50Araqfantasy numbers
18:23:02Zevvdisruptek: some pretty smart people have been working pretty hard on what there is now
18:23:15disruptekis it so crazy?
18:23:46disruptekthe objects get reproducable, and we know what built what. so we just link the new assets.
18:25:04Zevvjust fix my mallocs already :)
18:28:42Araqsince you're here
18:29:11*icebattl1 joined #nim
18:29:13AraqIMO your change to osalloc.nim is not good
18:29:27Araqin that it can hide problems
18:29:41Araqand we still use TLSF even if we don't want to
18:29:56*matlock quit (Ping timeout: 248 seconds)
18:30:03Araqso it needs something like hostOS == "any" and not defined(useMalloc)
18:30:06*msmorgan quit (Ping timeout: 246 seconds)
18:30:12*sz0 quit (Ping timeout: 260 seconds)
18:30:46*l1x quit (Ping timeout: 252 seconds)
18:30:46*matti quit (Ping timeout: 252 seconds)
18:30:47*MD87 quit (Ping timeout: 260 seconds)
18:31:30*nimblepoultry quit (Ping timeout: 252 seconds)
18:32:19*npgm quit (Ping timeout: 272 seconds)
18:32:22*icebattle quit (Ping timeout: 265 seconds)
18:32:42*msmorgan joined #nim
18:32:44*icebattl1 quit (Client Quit)
18:33:05*icebattle joined #nim
18:33:53*MD87 joined #nim
18:34:18*hehekuma quit (Remote host closed the connection)
18:34:25*npgm joined #nim
18:35:25*nimblepoultry joined #nim
18:37:07*rayman22201 quit ()
18:37:13*matlock joined #nim
18:45:56FromDiscord<exelotl> is there a name for the problem with C preprocessor macros that Nim templates prevent?
18:46:04Zevvwell, alloc and osalloc are not even included now with --gc:arc and -d:useMalloc anway
18:46:09Zevvso that part can go ou
18:46:20*silvernode joined #nim
18:46:28FromDiscord<exelotl> I was trying to explain it to someone and I accidentally said 'safety' and was thoroughly ridiculed
18:46:29Zevvbut that's what I mean, there are too many code paths now to keep track of
18:46:44*rayman22201 joined #nim
18:47:50rayman22201apparently irccloud is down. Yay to finding alternate irc clients :/
18:48:05rayman22201so the iterator double free bug is fixed in arc?
18:49:07rayman22201did it magically fix async, or should I start playing with arc async now?
18:49:21*Jesin quit (Quit: Leaving)
18:49:42disruptekyes, i'm looking at it, too.
18:50:56*Jesin joined #nim
18:51:15*chenhq2005 joined #nim
18:52:08*marmotini_ joined #nim
18:53:34FromDiscord<Recruit_main_70007> whats static ownership checking?
18:53:59disrupteknot leaving home without it.
18:54:21Araqexelotl: "The C preprocessor does not respect C's scoping rules. At all."
18:57:09rayman22201Recruit_main_70007: It's the thing all the Rust fan boi's scream about.
19:00:21FromDiscord<Recruit_main_70007> and in a more objective way??
19:00:33FromDiscord<Recruit_main_70007> (although you are pretty right)
19:01:10disruptekthe idea is for the compiler to do some analysis to make sure you don't do something stupid.
19:01:21disruptekstatic = at compilation
19:01:32disruptekstatically backed-into the output binary.
19:01:36disruptekbaked, too.
19:02:03disruptekmake sure you get 'em when they are hot outta the oven.
19:02:27FromDiscord<Recruit_main_70007> thx
19:02:56rayman22201"static" means compile time, "ownership checking" means checking that pointers are not used in a way that can crash your program (in simple terms. kind of a complex concept.)
19:03:51rayman22201crash your program or other problems.... data races (multithreading), reading from a Null pointer accidentally, etc... that kind of thing
19:04:08FromDiscord<Recruit_main_70007> ok
19:04:15disruptekZevv: i just read that issue and it seems to me that if the compiler can infer .gcsafe, we should remove it.
19:04:22*sbr8 joined #nim
19:08:12rayman22201removing .gcsafe from httpserver or from async?
19:08:38*sagax quit (Read error: Connection reset by peer)
19:11:21disruptekthe graph isn't going to cross threads because it's got a threadvar in it.
19:12:55disruptekmaybe we need to neuter gcsafe in arc and see what breaks. 😁
19:16:04YardanicoHmm, talked with a guy in Telegram now (in nim group), seems like https://nim-lang.org/donate.html doesn't have patreon link
19:16:17Yardanicopatreon.com/araq I mean
19:17:04*sagax joined #nim
19:18:37*nsf quit (Quit: WeeChat 2.7)
19:19:50rayman22201I thought .gcsafe was already neutered in arc?
19:20:10rayman22201it doesn't really make as much sense in the context of arc
19:20:37Araqit does make much sense still since the refcounting is "isolated"
19:21:00Araqthe 'A' in ARC does not stand for 'Atomic'
19:21:09AraqYardanico, good point
19:21:22disruptekoh, that makes sense.
19:21:26rayman22201yeah. I see
19:21:34rayman22201thanks for the clarification Araq
19:21:36disruptekwe can't really trust that nothing else is gonna mess with us.
19:22:15disruptek~araq is the A in ARC
19:22:15disbotaraq: 11the A in ARC
19:22:28rayman22201makes me now hate the name ".gcsafe". Should be ".isolated" or something... but I'll leave the yak shaving for another day.
19:22:41disrupteky'know who's great at yak shaving?
19:23:14disruptekjust one german in a sea of naked yaks.
19:25:33Araqthis was terrible https://github.com/nim-lang/Nim/pull/13156
19:25:33disbotARC: misc bugfixes
19:25:46AraqI wonder how many bugs are left after it
19:28:28*sbr8 quit (Quit: leaving)
19:30:46FromDiscord<treeform> Is there a Nim Job board?
19:31:07livcdare you hiring?!
19:31:15FromDiscord<treeform> yes
19:31:22FromDiscord<Recruit_main_70007> really?
19:31:24FromDiscord<treeform> are you looking?
19:31:32Araqpost it on the forum please
19:31:50Araqwe have plenty of people here looking for a Nim related job, I think
19:32:07FromDiscord<Recruit_main_70007> depending, is it legal to work in programming underage?
19:32:13disruptektreeform: if you're in the us, zacharycarter would be interested.
19:32:29disrupteki would, too.
19:32:32Yardanico@Recruit_main_70007 freelance - why not
19:33:04disruptek13156 doesn't change the async leak situation.
19:33:09disruptekin a way, that's good.
19:33:14Yardanicowell, depending on your country you might need to do some legal stuff with your parents/representatives about taxes and stuff
19:33:23Yardanicobut I think you can just ignore this if you don't earn like $10k a month :P
19:33:26Araqdisruptek, async doesn't use case objects
19:33:28FromDiscord<Recruit_main_70007> well, i am interested, at least to see what can i expect if i try going for nim for living
19:33:49disruptekyeah, but i pulled from that branch with the X other commits.
19:34:42FromDiscord<kodkuce> @treeform i want to work for free 🙂
19:35:48FromDiscord<kodkuce> job apprenticeship cuz i newb
19:37:21FromDiscord<kodkuce> or peasant money xD
19:37:46FromDiscord<kodkuce> or revshare if working on games
19:39:23Araqrayman22201, async is crash free but leaks memory IME
19:39:50disruptekneeds a when release: turned into release or danger: too.
19:40:07disruptekstack trace injection also injects most of the memory leak.
19:40:09Araqneeds a new test case in tests/arc so that we notice regressions
19:40:34Araqah I know of one bug that I really need to fix now
19:41:01Araqwhich could be responsible for the stack trace leaks. hmm not really
19:41:06Araqbut whatever, need to fix it
19:42:09*Kameleon joined #nim
19:46:28FromDiscord<kodkuce> hmm so async almost done? just need duck tape those bucket holes ?
19:46:35*Kameleon quit (Client Quit)
19:46:47*Kameleon joined #nim
19:46:53*Pixeli joined #nim
19:47:50*Pixeli quit (Client Quit)
19:55:20Araqon Unix.
19:55:29Araqon Windows it probably still crashes, let me check
19:55:47FromDiscord<kodkuce> i am a bird i poop on win
19:57:37Araqyup. crashes
19:57:46AraqI wonder why though...
20:00:21*abc_not_cba joined #nim
20:01:39abc_not_cbai'm sad
20:01:45abc_not_cbakuroyasha loose
20:03:44FromDiscord<treeform> disruptek, can you PM me on discord some how if you are interested?
20:05:41abc_not_cbaI don't understand what do you want
20:06:02abc_not_cbaif my english suck, i'm not english native
20:11:21Zevvso, there is eight different files in the stdlib directly calling c_malloc
20:11:27disruptektreeform: i dunno, discord thinks i'm a hacker.
20:11:40abc_not_cbacause you are
20:11:41FromDiscord<Recruit_main_70007> wut?
20:11:55abc_not_cbastop trying to fool us
20:11:58*Kameleon quit (Read error: Connection reset by peer)
20:12:03abc_not_cbawe all know you are a hacker
20:12:18disruptekyes, but now discord knows it, too.
20:12:31disruptekwhy is chat such a hard thing to get right?
20:12:49FromDiscord<Recruit_main_70007> wdym, try to DM me
20:12:58abc_not_cbasome people also create malicious compiler
20:13:14abc_not_cbait automatically inject bad code into your program
20:13:21abc_not_cbabe careful
20:14:45leorize[m]oooh, a job writing nim?
20:16:35*abc_not_cba left #nim (#nim)
20:16:51disruptekhow come it's 2020 and we still don't have a facepalm emoji?
20:16:57leorizewe do
20:17:02FromDiscord<Recruit_main_70007> 🤦‍♂️
20:17:06leorizenot easy to type if you're not on phone
20:17:28disruptekit's `face palm` not `facepalm`. 🤦
20:17:45rayman22201Araq is async still in the same position as last week when I asked then?
20:18:07FromDiscord<treeform> @Recruit_main_70007 I can't DM you any more. You have blocked me. Maybe its for the better...
20:18:08*lritter quit (Ping timeout: 268 seconds)
20:18:09rayman22201I was under the impression, maybe I'm wrong, that the double free was also related to iterators not just case objects
20:18:16rayman22201and that may also have affected it
20:18:34disruptekthat's what i figured, too; seemed like a pattern that'd be used there.
20:18:34Araqthere is no double free according to valgrind
20:18:42disruptekbut, no. it's not that (now).
20:18:47leorize@treeform: can you post it on the forums? I'm interested
20:19:11rayman22201disruptek with this branch yes? https://github.com/nim-lang/Nim/pull/13156
20:19:12disbotARC: misc bugfixes
20:19:31rayman22201or does that not matter?
20:19:41disruptekit might help.
20:19:41rayman22201what commit should I start from?
20:19:43FromDiscord<Recruit_main_70007> @treeform i didnt
20:19:49FromDiscord<exelotl> I tried to DM a friend just now and it also denied my message. Maybe something's up with Discord.
20:19:53disruptekthat tree is fine.
20:20:08rayman22201Araq do you concur?
20:20:16disruptekdiscord shut down their network because i created an account.
20:20:27rayman22201major haxor alertz
20:20:32Araqrayman22201, confirmed
20:20:38FromDiscord<exelotl> ah that sounds reasonable
20:20:43rayman22201:+1: thanks
20:21:10disruptekbbl, let us know what you learn, ray 👍
20:21:15lqdev[m]this happens when an user is not in your friends and they didn't enable a setting which allows non-friends from a server to DM them
20:21:32FromDiscord<treeform> leorize, I'll post it on the forums, need to clarify something with my boss first.
20:29:29FromDiscord<Recruit_main_70007> url?
20:31:46*matti joined #nim
20:32:07*pbb quit (Remote host closed the connection)
20:33:23*pbb joined #nim
20:34:41*Trustable joined #nim
20:37:35*salewski joined #nim
20:39:16*letto quit (Quit: Konversation terminated!)
20:39:16salewskiAraq, it is only a gcc problem. With clang it works, even basic gtk test!
20:39:22disbotArc, finalizer, out of memory ; snippet at 12https://play.nim-lang.org/#ix=27uI
20:40:13salewskidisbot, any news for https://github.com/nim-lang/Nim/issues/13110
20:40:15disbotRTree investigations with valgrind for --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=27uJ
20:41:21Araqsalewski, not sure, gcc bugs are really rare IME
20:41:38Araqbut if valgrind says it's green it usually really is green
20:42:01Araqesp since we add runtime checks for valgrinds failures (array index bugs)
20:42:32leorizesalewski: I got oom no matter what compiler I use
20:42:38leorizegentoo also (but with musl libc)
20:43:28leorizealso, sigsegv if -d:useMalloc is defined
20:44:49salewskileorize: thanks for testing, so it is not only me.
20:48:15*krux02 joined #nim
20:49:44salewskiOh, previous issue seems to work now with latest nim compiler:
20:49:49disbotRTree investigations with valgrind for --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=27uJ
20:50:02salewskiI will close that then...
20:50:29leorizeyou should add a test for it before closing
20:52:03*narimiran quit (Ping timeout: 265 seconds)
20:52:03salewskiOk, then I will add a remark that it work to issue and let closing to the devs.
20:52:51leorizehmm, I'm running your example via gdb
20:53:01leorize93824992254642 <- that's the size of the object that were going to be allocated
20:53:10leorizeso yea, out of memory :P
20:53:34salewskiThanks leorize, and bye for today.
20:53:37*salewski quit (Quit: WeeChat 2.6)
20:54:09Zevvleorize: 0x555555559ab2 ?
20:56:29leorizeyou're a genius Zevv
20:56:38leorizethat's the address of the finalizer proc
20:57:04leorizeI guess sometimes C warnings aren't wrong :P
20:57:10Zevvlarge random numbers are never just random
20:57:38Zevvlike 0x6b637546
20:57:46Zevvoh I mean 1801680198
20:58:34leorizeAraq: I guess the finalizer transformation was broken?
20:59:45madpropshmm http://i.imgur.com/aLXh1gM.png
20:59:47*letto joined #nim
21:01:00leorizethat's false?
21:01:19leorizethe memory model changes were never official or even as a default in devel
21:01:36leorizewell but it's 4chan, I don't expect too much from them
21:02:05solitudesfyou should always assume that everything said on /g/ is false
21:02:26leorize/g/ tries to hate everything for the sake of hating it
21:03:03solitudesfi would prefer plain hating, but they spread so much misinformation
21:03:14*marmotini_ quit (Remote host closed the connection)
21:03:32solitudesfand gullible teenagers are buying into that shit
21:03:41*jholland__ quit (Quit: Connection closed for inactivity)
21:03:46*tane quit (Quit: Leaving)
21:03:49*marmotini_ joined #nim
21:08:42*marmotini_ quit (Ping timeout: 268 seconds)
21:09:54Zevvyeah, and Anonymous is of course a bit of an authority on these matters
21:11:56disruptekAnonymous called my cell today. I didn't answer.
21:12:13disruptekrayman22201: any news?
21:14:39FromDiscord<kodkuce> whats {.base.} for, i type it in nim manual serch didnet got anything
21:14:50leorizebase methods
21:15:04*pbb_ joined #nim
21:15:05*pbb quit (Ping timeout: 272 seconds)
21:17:48FromDiscord<kodkuce> ok found on stack owerflow need to read
21:19:31*pbb_ quit (Ping timeout: 272 seconds)
21:23:52*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
21:25:13*pbb joined #nim
21:26:12disruptekwhy don't we have a .gcunsafe. instead?
21:26:39leorizegcsafe is a misnomer :P
21:30:09*voltist joined #nim
21:30:26Araq.threadsafe ?
21:31:13disruptekno, i wanna know the graph is safe from outside influences.
21:31:44disruptekthat exists?
21:32:01Araqno, it's what I'm throwing around
21:32:12disruptekit's probably an effect.
21:32:40AraqIsolation is not good for me... Isolation, I don't want to sit on the lemon tree.
21:32:59disruptekbut you can move the tree into a neighbor's yard.
21:33:14disruptekmight let you peek in suzy's window.
21:33:27Zevvnaughty boy
21:33:37Zevvnighty, boys
21:33:46disruptekhow come zevv always shows up when we start talking about porn in the channel?
21:33:50*Zevv out
21:33:57disruptekgn zevv
21:34:01Araqoh my
21:34:09rayman22201so dumpNumberofInstances doesn't work with arc?
21:34:17rayman22201what debugging tools do we have?
21:34:25rayman22201I have to re-learn things lol. sorry
21:34:32Araqrayman22201, blood sweat and tears.
21:34:43Araqand poor valgrind
21:34:51rayman22201;( :')
21:35:01disruptek--debugingo, -d:useMalloc, -d:traceArc, -d:traceCollector=true
21:35:09disruptek--gc:orc, --exceptions:goto
21:35:28AraqtraceArc? traceCollector?
21:35:29disruptek-d:futureLogging 🤣
21:35:45disruptek-d:toDebug="always" on your compiler.
21:35:50AraqI don't remember these, let me try them
21:36:10disruptekthey are unlikely to all be useful here. just stuff i tripped over.
21:36:21rayman22201gc:orc? is this the World of Warcraft collector. "For the Hoard!"
21:36:43Araqgc:orc is brutal and stupid
21:37:03disruptekslow but robust.
21:37:06Araqand it crashes
21:37:10disruptekmakes big leaks into small leaks.
21:37:28FromDiscord<kodkuce> just googled sitting on lemon tree, newer head about that referece
21:38:01Araqif it were stable, I could make it go really fast
21:38:22Araqbut it isn't and "fast but incorrect" isn't appealing
21:39:50FromDiscord<kodkuce> https://www.youtube.com/watch?v=UqWD383I90s << this lemon tree
21:41:30*krux02_ joined #nim
21:46:21*UNIcodeX joined #nim
21:47:27disruptekthis video is pretty amusing.
21:48:50disrupteki'm sure this is just what he meant by lemon tree.
21:49:34Araqyeah, it was reference to this song
21:50:11FromDiscord<kodkuce> duno i really newer heard an expression "Sitting on lemon tree so was wtf need to google this"
21:50:15disruptekmaybe it's not isolate.
21:50:21disruptekmaybe it's a gate.
21:51:30*noonien quit (Quit: Connection closed for inactivity)
21:51:59disruptek{.gate: [ui, network, images, queries].} and each gate defines a separation between graphs.
21:52:15disruptekthe graphs have their own memory schemes.
21:53:12disrupteksome can be multithreaded, some single.
21:53:27disruptekso you can tie them to threads.
21:54:11disruptekwe could even do transition triggers.
21:54:52Araqtell me more
21:56:03disruptekhow come every thinks i'm crazy?
21:58:14disruptekwhat kinda music is this, anyway?
21:58:20*rayman22201 quit (Remote host closed the connection)
21:59:13*hlavaty joined #nim
22:04:51FromDiscord<Recruit_main_70007> @treeform I sent you a DM, can you read it?
22:05:53FromDiscord<treeform> Yes I did
22:07:47disruptekit gave him shivers.
22:08:01*Trustable quit (Remote host closed the connection)
22:08:13*krux02 quit (Remote host closed the connection)
22:09:38*filcuc joined #nim
22:11:20*rayman22201 joined #nim
22:11:27disruptekwe should instrument this "deterministic memory handling" and track characteristics of the test suite, maybe even a few large programs.
22:11:56rayman22201ugh. lost connection. Fun fact. Valgrind says Futures by themselves are leak free. this is good.
22:12:40disruptekthere's a leak in that the call() doesn't wipe out func pointers.
22:13:19disruptekoh, i guess that's fine.
22:13:40FromDiscord<treeform> I like "deterministic memory handling"
22:13:47rayman22201I think it's the same leak I had with my dispose experiment.
22:14:08disruptekit's not really a leak unless the type leaks, right?
22:14:14disrupteki dunno how we impl that.
22:14:22*UNIcodeX quit (Quit: Leaving)
22:15:24rayman22201there are two closures in the async macro. One gets handled fine, but the other one gets lost / doesn't have an owner. My solution was to add an extra closure pointer to the Future object, so that it doesn't get lost.
22:15:46rayman22201the tricky part is that pointer can't get freed until after "last read of" the future.
22:17:27rayman22201I will try to re-implement it with arc and see what happens.
22:19:08disruptekyeah, okay, i think i finally understand what you're saying.
22:19:16disruptektook me a minute.
22:19:40rayman22201it's ok. async is kind of mind bending code at first
22:19:42disruptekyou can use `unowned` to get an unowned view of the object for rc purposes.
22:19:54disrupteki just learned this on something today.
22:20:40disrupteki wish i knew german.
22:20:52rayman22201The thing is, I know from a research paper that araq gave me, the "last read of thing" is provably the correct thing to do. `unowned` is more of a hack / letting it leak.
22:21:16*NimBot joined #nim
22:21:34rayman22201is his english that bad? lol
22:21:47disruptekit's pretty bad.
22:21:50rayman22201I also <3 zevv, so I understand the frustration
22:22:02disrupteki usually just smile and nod.
22:22:14disrupteknod and smile.
22:22:31disrupteksay `yeah` a lot. that helps.
22:22:33rayman22201lol. that is what I do with my wife as well :-P
22:22:51disrupteki just talk like that to everyone.
22:22:54disruptekmakes it easier.
22:23:16*Vladar quit (Quit: Leaving)
22:23:48disrupteki meant to agree that you're right about "last read of thing".
22:23:56disruptekwe should be explicit.
22:24:22disruptekwe say the semantics we want and then program the machine to have those semantics.
22:24:59*rayman22201 nods in agreement
22:34:45disruptekthat's really what we want. the memory handling should go hand-in-hand with the language.
22:39:26FromDiscord<AGNiMA> hi
22:42:44FromDiscord<demotomohiro> Hi
22:48:32rayman22201uh, suddenly I can't cast procs?
22:48:40rayman22201``callback=`(next_gensym400019, proc() {.closure, gcsafe.}(asyncProcNimAsyncContinue_400016))`
22:48:55rayman22201Error: expected: ')', but got: '('
22:49:36Araq(proc() {..})(theProc)
22:49:58rayman22201so, expandmacro is not producing valid code anymore these days?
22:50:13disruptekyou can cast them, you just can't trust 'em. further than you can cast them. or, that's what momma always tol' me.
22:50:23rayman22201yeah that was it. weird.
22:50:42rayman22201I used to be able to copy and paste the output of expandmacro and it would just compile, but that seems to no longer be the case.
22:51:19disruptekoh, that's a smart idea, isn't it.
22:51:44Araqdisruptek, please. A little less noise, some of us are trying to work
22:52:00rayman22201this also seems to no longer be accepted?
22:52:03rayman22201` raise var e_gensym400201: owned(ref AssertionError) new(e_gensym400201) e_gensym400201.msg = msg_gensym400020 % "asyncProc" e_gensym400201.parent = nil e_gensym400201`
22:52:08rayman22201ahhhh. fail
22:52:53rayman22201Error: invalid indentation
22:53:19rayman22201It's sometimes useful to take the output of expandMacro and modify that by hand when debugging the macro.
22:53:38disruptekyeah, it's good idea.
22:53:41rayman22201but if expandMacro is broken, just makes life harder...
22:54:00disruptekwhat's the lowest leak that you have?
22:54:10rayman2220172 bytes
22:54:22Araqit's not really "broken", rendering back the AST into something that is guaranteed to be parsable is far from trivial
22:54:24disruptekwow, that's the smallest?
22:54:39rayman22201well, I'm not done yet
22:54:58disruptekis that good? i don't even know.
22:55:04rayman22201It's about as small as it can be given the size of the strings I'm using to test.
22:55:13rayman22201I can make it smaller, but I like strings. easy to debug.
22:55:34rayman22201Araq point taken about AST rendering
22:56:25rayman22201it's just been surprisingly reliable in the past. small developer ux things that bother me. I know it's low priority.
23:02:20Araqwell I made some progress for async on windows
23:02:38AraqI think I understand IO completion ports once again
23:03:00disruptekthat probably sounded sexy in your head.
23:03:14disruptekdoes it merely leak on windows?
23:03:30Araqnope, it crashes
23:03:35disruptekoh, nice.
23:03:38Araqwe get the GC_ref/unref calls wrong
23:03:39FromDiscord<treeform> Araq, nice!
23:03:49disruptekwow, that's weird.
23:03:58Araqbut I don't understand yet why
23:04:03Araqtime to sleep over it
23:09:14*solitudesf quit (Ping timeout: 258 seconds)
23:11:09*oculux quit (Ping timeout: 258 seconds)
23:11:54*abm joined #nim
23:12:07dom96Araq, let me know if you need some insights from me
23:13:02zedeushey dom96, have you ever experienced requests getting sent to the wrong clients with httpbeast?
23:13:30*oculux joined #nim
23:13:40rayman22201disruptek can you give me an example of unowned usage?
23:13:44zedeushappens quite often with nitter
23:14:02zedeuscan't reproduce locally, requires lots of traffic
23:14:11disruptekunowned someref.somefield is like a cursor that won't +rc someref.
23:14:38zedeusalso happens with other instances so it's not some networking mishap
23:14:40dom96zedeus, hm, odd. How do you know that is the cause? How does it show up?
23:14:43rayman22201undeclared identifier 'unowned'
23:14:57disrupteksorry, unown
23:15:30zedeusit's displayed like any other requests, just the wrong content. sometimes you request a profile page, and it gives you an image, or just the wrong page
23:15:42rayman22201damn. thanks. that worked, but didn't do what I wanted
23:15:50disruptekwhat do you want?
23:16:22rayman22201async to work :-P
23:16:26zedeusi have reproduced it a couple times with a local instance but it's very inconsistent
23:16:35rayman22201I have an alternative I'm trying. no worries
23:16:40disruptekare you on windows?
23:17:27rayman22201I'm on linux atm
23:17:34dom96zedeus, can you reproduce with a minimal httpbeast code sample?
23:17:35rayman22201I'm still looking at the leak
23:17:59disrupteksomehow i'm infinite-looping on it.
23:18:55zedeusdom96: no as I said it's incredibly hard to trigger it even with a local nitter instance, I've tried a lot of things but nothing reliably triggers it
23:19:28Yardanicocan it be a bug in the underlying OS implementation of poll and stuff?
23:19:32zedeuswhile with nitter.net you can trigger it constantly with a simple apache benchmark
23:19:52rayman22201how do you force a destructor to run?
23:20:09disruptekcall it?
23:20:26*oculux quit (Ping timeout: 265 seconds)
23:20:32dom96zedeus, possibly the only way to track it down will be to set up an instance on another server, run the apache benchmark, delete some code, re-run, see if its still reproducible until you find the source.
23:20:44disruptek=destroy but it takes a var.
23:20:59*oculux joined #nim
23:21:01dom96zedeus, pain in the ass, but there is no way to know where this bug is. It could be in your code for example, maybe you're doing something weird with threads?
23:21:27zedeuswell, I've tried that. running 10 benchmarks hammering it with 20 requests in parallel it doesn't happen
23:21:29zedeusnope, no threads
23:21:40zedeusjust simple jester routing
23:21:49rayman22201`Error: call depth limit reached in a debug build (2000 function calls). You can change it with -d:nimCallDepthLimit=<int> but really try to avoid deep recursions instead.`
23:21:59dom96zedeus, but you're running jester with --threads:on, right?
23:22:19zedeusi use sqlite with norm so that isn't possible
23:22:29rayman22201I also made it infinite recurse lol
23:22:45disruptekbut it only leaks 72 bytes?
23:23:15disruptekyou gotta take the wins with the losses.
23:24:39dom96zedeus, then I'm really not able to imagine how this could happen
23:24:46rayman22201it's actually more. It's actually 416.
23:25:00rayman22201==4314== LEAK SUMMARY:==4314== definitely lost: 72 bytes in 1 blocks==4314== indirectly lost: 344 bytes in 4 blocks
23:25:23rayman22201but that will grow linearly with the number of async chains
23:25:28rayman22201so no beno
23:25:32rayman22201bueno even
23:25:38disruptekoh i'm measuring the test.
23:25:55dom96zedeus, what you can also try is switching to asynchttpserver instead
23:26:03disrupteksend me your test.
23:26:06dom96-d:useStdLib IIRC
23:26:12zedeuswell, i did.. but #12526
23:26:14disbothttps://github.com/nim-lang/Nim/issues/12526 -- 3asynchttpserver "Bad file descriptor" crashes ; snippet at 12https://play.nim-lang.org/#ix=27vG
23:27:14dom96ahh :/
23:28:39disrupteki'm measuring tasyncawait from testament.
23:29:30rayman22201way too complicated.
23:30:08disruptekyes, well, it has the advantage of stressing all the parts.
23:31:23rayman22201lets get the minimal case working before stress testing :-P
23:31:57rayman22201I have another version with the async macro expanded manually if you want to play with that.
23:32:25rayman22201also, here is my dispose async work: https://github.com/rayman22201/Nim/tree/async-with-dispose
23:32:30disrupteksure, but lemme chew on this first.
23:32:51rayman22201I also have a version of that same example with the asyncmacro expanded if you like
23:33:11disruptekso this is leak free on orc.
23:33:28disruptekand the 72 on arc.
23:33:42rayman22201what is orc?
23:34:02disruptekorc is the cycle-detecting version of arc.
23:34:16rayman22201dispose was an experimental branch Araq gave me to proof of concept before arc was even started.
23:34:27disruptek~orc is arc's slower, dim-witted cousin
23:34:27disbotorc: 11arc's slower, dim-witted cousin
23:34:34disruptek~orc is arc's slower, dim-witted brother
23:34:35disbotorc: 11arc's slower, dim-witted brother
23:34:46rayman22201I haven't checked that. idk if it leaks or not with orc
23:35:02disruptekright, so that was the --newruntime variant.
23:35:21disrupteka lot of related code repurposed in arc.
23:35:37rayman22201but earlier primate in the evolutionary chain :-P
23:35:53disruptekso how well does the dispose branch do in this test?
23:36:31rayman22201so, orc does not leak, confirmed
23:36:39rayman22201dispose passes the test
23:36:41rayman22201no leaks
23:37:02rayman22201but I had to write a whole new Future variant that takes an extra closure pointer
23:37:05disruptek~orc is arc's slower, dim-witted brother who also detects and breaks memory cycles.
23:37:05disbotorc: 11arc's slower, dim-witted brother who also detects and breaks memory cycles.
23:37:26disruptekso this is a very big deal.
23:37:47disrupteki think you may have just saved christmas.
23:38:03rayman22201well, it's a big rewrite of the guts, but it should be transparent to the user
23:38:10rayman22201lol. woohoo
23:38:17disruptekwhy didn't you say so?
23:38:22rayman22201I've been sitting on it for a while. That's why araq keeps poking me
23:38:34disruptekno one is gonna want to use a transparent api change, even if it doesn't leak.
23:39:10rayman22201I've been sort of waiting for arc to stabilize, and see if it would work out another way.
23:39:46disruptekoh, it's broken on newruntime?
23:40:02rayman22201what do you mean?
23:40:14rayman22201async never worked on newruntime
23:40:33disruptekbut arc is, as you put it, an evolution of that.
23:40:46disruptekand you wrote dispose against newruntime, yes?
23:42:01rayman22201dispose is an "experimental" offshoot that I was using because araq had just started on newruntime.
23:42:35rayman22201but: https://github.com/rayman22201/Nim/blob/async-with-dispose/basicAsync.nim#L21
23:43:45rayman22201the whole idea being that "dispose" was something I could use to prototype, but can be translated into owned notation.
23:44:06disruptekhmm, i don't know that GC_disable is a thing.
23:44:12rayman22201I promise it is
23:44:13disruptekcomment it out and see what happens.
23:44:26disrupteki mean on arc, silly.
23:44:34rayman22201of course not
23:44:48disruptekso fine.
23:45:05disruptekyeah, you did it. great work.
23:45:24rayman22201basically. I have an algorithm that I know works. But I have to do the annoying work of translating to arc now :-P
23:49:24*filcuc quit (Quit: Konversation terminated!)
23:55:55Araqrayman22201: dispose(x) becomes x = nil
23:56:08Araqthe translation is rather simple, no?
23:56:32disruptekdispose -> dispose
23:57:29disruptekit's awesome to debug orc versus arc.
23:57:38disruptekyou see where it adds a dispose, boom.