<< 21-01-2020 >>

00:01:35*icebattle joined #nim
00:13:45*sekao quit (Remote host closed the connection)
00:15:22*Hideki_ joined #nim
00:20:06*Hideki_ quit (Ping timeout: 265 seconds)
00:26:23leorizeso I've been experimenting a bit with Azure Pipelines
00:27:03leorizewhile I don't have concrete numbers yet, looks like the integration to testament slowed testing down about 10-20 mins
00:27:42leorizeapparently the way I programmed testament to report to azure seems to get flagged and throttled heavily :P
00:28:11leorizeI'll experiment with some strategies to avoid this
00:28:13*xet7 quit (Read error: Connection reset by peer)
00:28:26*xet7 joined #nim
00:52:04FromDiscord<treeform> disruptek "treeform: got another candidate for your nimbench" link?
00:57:15*krux02_ joined #nim
01:01:23*krux02 quit (Ping timeout: 260 seconds)
01:07:01*seni quit (Quit: Leaving)
01:15:08*lritter quit (Ping timeout: 268 seconds)
01:15:15*lritter_ joined #nim
01:25:40*Hideki_ joined #nim
01:29:00*qwertfisch quit (Quit: ZNC - http://znc.in)
01:48:31disruptektreeform: it was in reference to the benchmark zevv made to show what not having realloc costs in terms of runtime array growth speed.
01:48:55disruptekhttps://irclogs.nim-lang.org/20-01-2020.html#05:17:39
01:55:45*Hideki_ quit (Remote host closed the connection)
02:03:25*icebattle quit (Ping timeout: 258 seconds)
02:07:24*zyklon quit (Remote host closed the connection)
02:07:40*zyklon joined #nim
02:24:36*voltist joined #nim
02:42:27disruptekyou know what? zevv you're a genius.
02:43:12*krux02_ quit (Remote host closed the connection)
02:43:19disruptekthat realloc issue is almost certainly the cause of the base64 performance problem under arc.
02:48:47disruptekhmm, but i thought -d:useMalloc would yield a different speed, and it doesn't.
03:01:55disruptekit's nimPrepareStrMutationV2.
03:06:42disruptekoh, i see. i guess it doesn't matter for strsV2.
03:06:53disruptekso, yeah, you nailed it.
03:07:54disruptekshit, this week we'll have a huge bump in arc performance and get it usable in async.
03:08:35*lritter_ quit (Ping timeout: 258 seconds)
03:17:25FromDiscord<DeltaPHC> On the forums Araq gave a "few months" timeline for gc:arc. Does that mean that arc is planned for a v1.x release maybe?
03:17:41disruptekyeah
03:18:00FromDiscord<DeltaPHC> Awesome
03:18:13disruptekyeah, i really like it.
03:18:37disruptekit has a /lot/ of room for improvement, which is awesome.
03:19:08*endragor joined #nim
03:20:21disruptekwhich is not to say that it won't be fast out of the gate, of course.
03:23:13*dddddd quit (Remote host closed the connection)
03:30:06disrupteki wonder what it means that our base64 benchmark relies upon the performance of realloc so heavily.
03:30:28FromDiscord<DeltaPHC> I'm more looking forward to deterministic destructors
03:31:31FromDiscord<DeltaPHC> and the sink/lent stuff. It's going to be a significant change in how Nim code is written, I think
03:33:10leorizeto how optimized nim code is written :P
03:33:14leorizenormal nim code stays the same
03:33:17leorizemore or less
03:33:23disrupteki dunno. i don't know that it can change very much as long as people cannot query whether something is lastReadOf or lastWriteOf or simply whether something is lent.
03:33:49disruptekbut, you could do that stuff in theory.
03:38:12disrupteki think realloc will speed up base64 somewhat, but not much as i hoped.
03:39:30disruptekprobably still be 25-50% slower than base, for this benchmark.
03:49:08*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
03:52:37*muffindrake quit (Ping timeout: 260 seconds)
03:54:24*muffindrake joined #nim
03:59:41*icebattle joined #nim
04:04:32*icebattle quit (Ping timeout: 268 seconds)
04:25:20*nsf joined #nim
04:53:10*marmotini_ joined #nim
05:06:31*marmotini_ quit (Ping timeout: 265 seconds)
05:15:22FromGitter<Varriount> Why is base64 slow? Is there a fundamental flaw?
05:17:22*marmotini_ joined #nim
05:22:50*ltriant quit (Quit: leaving)
05:25:06*narimiran joined #nim
06:12:14Zevvdisruptek: yeah I kno
06:13:37Zevvso, arc works fine for npeg, but I also still have some leakage. what is the best way to approach this?
06:32:00*actuallybatman joined #nim
06:34:16*JustASlacker joined #nim
06:38:24*leorize quit (Quit: WeeChat 2.6)
06:47:20*JustASlacker quit (Ping timeout: 268 seconds)
06:52:40*solitudesf joined #nim
07:03:35FromDiscord<Rika> https://christine.website/blog/v-vvork-in-progress-2020-01-03
07:03:35FromDiscord<Rika> Time to replicate this again in Nim
07:13:08*marmotini_ quit (Remote host closed the connection)
07:13:45*marmotini_ joined #nim
07:18:13*marmotini_ quit (Ping timeout: 260 seconds)
07:19:14*pradeep joined #nim
07:20:13*pradeep quit (Remote host closed the connection)
07:27:14FromDiscord<mratsim> that's a confusing timeline
07:28:12FromDiscord<Rika> what i got from the entry was that "V is a mess"
07:31:38*jjido joined #nim
07:34:12*dadada joined #nim
07:34:34*dadada is now known as Guest80369
07:36:12*PMunch joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:10narimiran@Vindaar ggplotnim seems to be failing on windows :/ (tests/testDf.nim)
08:00:29*JustASlacker joined #nim
08:02:32*me7 joined #nim
08:03:10FromDiscord<mratsim> @Rika you can ask @Cadey directly, she wrote the article 😉
08:04:51*gmpreussner joined #nim
08:05:53*solitudesf quit (Ping timeout: 272 seconds)
08:07:26*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:08:17Zevvprobably wont be the last :)
08:08:57FromDiscord<Rika> @mratsim no I mean I just want to write it for no good reason
08:09:21FromDiscord<mratsim> most of my Nim code is written for no good reason :p
08:09:44FromDiscord<Rika> It's way too fun writing nim code
08:11:14FromDiscord<Rika> Couldn't run the code I generated on my laptop
08:11:16FromDiscord<Rika> Not enough ram
08:20:09PMunchGot your code? I probably have enough RAM :)
08:21:29FromDiscord<Rika> Uh
08:22:00FromDiscord<Rika> My desktop can prolly run it
08:37:16*voltist quit (Remote host closed the connection)
08:45:52*me7 quit (Remote host closed the connection)
08:54:04*floppydh joined #nim
08:54:11FromDiscord<Clyybber> Ugh, is it really worth it to deprecate arrays.low != 0
08:55:23FromDiscord<Clyybber> It doesn't double the API surface for every proc, just for procs that return an index
08:55:29FromDiscord<Clyybber> And afaikt we don't have many of those
08:58:14*Guest80369 quit (Ping timeout: 265 seconds)
08:59:15FromDiscord<Clyybber> Araq: Wdyt about a magic that gives us the openarrayoffset?
08:59:33FromDiscord<Clyybber> so we can return the index - theoffset
08:59:52FromDiscord<Clyybber> and it will work for array[-4, 5, ...] too
09:01:58FromDiscord<Clyybber> ugh, or maybe not. It wont work for enums then
09:07:07FromDiscord<Clyybber> maybe introduce an openarray variant with two generic params?
09:07:14FromDiscord<Clyybber> Where one is the index type?
09:07:20FromDiscord<Clyybber> And for seq it would just be int
09:20:12Araqdidn't you read my suggestion?
09:22:10*krux02 joined #nim
09:28:35Araqwhat's wrong with a minor sigmatch patch
09:29:07Araqarrays are not always convertible to openArray, we'll see how many Nimble packages it breaks
09:29:18Araqand then we can maybe come up with something more complex
09:43:46ZevvAraq: the alloc counters are fixed, but I still have one case were cleanup is only done at the end of NimMainModule - no way to properly report that from within nim
09:45:55Zevvall but two tests now "clean": one with false positives, one really leaking
09:46:01AraqI've been thinking about -d:nimLeakReport
09:47:29Araqideally also with some API so that the thread local caching we do for env vars and program args is taken into consideration
09:51:07Zevvmakes sense
10:04:22FromDiscord<Clyybber> Araq: Ah, somehow skipped it
10:09:26FromDiscord<Clyybber> Afaict it doesn't bite with my suggestion though
10:09:46FromDiscord<Rika> afaict?
10:10:18FromDiscord<Clyybber> as far as i can tell
10:10:21Zevvas far as I can tell
10:11:39AraqClyybber: no but I dislike adding new magics
10:13:54FromDiscord<Clyybber> Araq: Are you referring to the offset thing?
10:13:57FromDiscord<Clyybber> I don't like it either
10:14:05FromDiscord<Clyybber> I think better is an openarray[I, T]
10:14:28FromDiscord<Clyybber> Then most procs would continue to use openarray[T]
10:14:42FromDiscord<Clyybber> but those who return indices can use openarray[I, T]
10:17:24Araqthe openarray[I, T] idea is good but ultimately a minor pessimization
10:17:41Araqas you need to pass one more hidden integer argument
10:18:49Araqfeatures that require more features for the fixups are bad
10:19:33Araqideally a feature simplifies some other part of the language
10:20:53FromDiscord<Clyybber> I agree. But removing arrays starting at != 0 would really be a bummer
10:21:22Araqhow so? as long as array[Enum] continues to work I don't mind
10:21:47FromDiscord<Clyybber> I would mind. I regularily use arrays starting at 1 because it fits better
10:21:51FromDiscord<Clyybber> with some algorithms
10:23:02FromDiscord<Clyybber> It also allowed me to more easily translate my lua code
10:23:25FromDiscord<Clyybber> And its also nice when you are implementing an algorithm from a paper
10:23:54Araqinteresting
10:24:34Araqwell we can at least deprecate arrays starting at a negative index then
10:24:47Araqdoesn't help with the 'find' problem though
10:24:59Araqin the end, fortunately we don't have to do anything
10:25:12Araqthe existing design ain't bad
10:25:27FromDiscord<Clyybber> yeah, its just missing openarray[I, T] I'd argue
10:26:00Araqmeh but then we need to fix every stdlib proc that uses openarray
10:26:20Araqand as a nice "bonus" the code becomes slightly larger, yay
10:26:25FromDiscord<Clyybber> Araq: No, just the ones who return an index
10:26:58Araqok but we better review them all then
10:27:01stefantalpalaruI would like to integrate a Nim wrapper in a subdirectory of the upstream repo. Are there any tricks to make Nimble look for *.nimble files in subdirectories?
10:27:09FromDiscord<Clyybber> Araq: I'd be up for the job
10:27:22Araqcan't you work on something more important?
10:29:07AraqI vote for "let's not do anything"
10:29:51stefantalpalaruNever mind, I found the subdir support docs: https://github.com/nim-lang/nimble#package-urls
10:33:00FromDiscord<Clyybber> Araq: Fine with me
10:33:45FromDiscord<Clyybber> Araq: What about moving =destroy(dst) out of `=` and `=sink` ?
10:38:57FromGitter<Kvothe87> hello
10:39:37FromGitter<Kvothe87> i'm trying to do a simple thing but consider that i'm a total beginner
10:39:50FromGitter<Kvothe87> https://play.nim-lang.org/#ix=27XZ
10:41:04FromGitter<Kvothe87> i tried to format a json, i only wanted to get the formatted string with echo, and i'm not interested in the content
10:42:03FromGitter<Kvothe87> when i run the code above first i did not get anything echoed and then i started to get bad gateways
10:42:43FromGitter<Kvothe87> the first echo was just to debug if i was doing something wrong with the i
10:43:12FromGitter<Kvothe87> can you please help me both in solving what is wrong, and ways to improve it?
10:43:14FromDiscord<Rika> it looks like you're parsing json, is there a reason you're reimplementing it?
10:43:35*JustASlacker quit (Ping timeout: 272 seconds)
10:47:11FromDiscord<Rika> Kvothe87, when i ran this code locally, it got stuck in a loop somewhere making no progress
10:47:25FromDiscord<Rika> hence the bad gateway
10:47:33FromGitter<Kvothe87> i'm only interested in formatting a string to a string, not in creating or evaluating the content
10:49:11FromDiscord<Rika> oh i see
10:49:31FromDiscord<Rika> your code gets stuck in the first while loop because it starts with a [ which is not in lim
10:49:38FromDiscord<Rika> it never enters the next while loop
10:49:43FromDiscord<Rika> and i never gets incremented
10:52:15FromDiscord<Cadey~> hi @Rika
10:52:32FromDiscord<Rika> hello
10:52:49FromDiscord<Rika> gcc segfaulted when i tried doing what you did for V on nim
10:52:58FromDiscord<Cadey~> hahahahahahaha
10:53:30FromDiscord<Rika> it took a significant amount of time too; maybe that's because i was doing it in WSL though
10:54:47FromDiscord<Cadey~> i did my tests on a real linux system tbh
10:56:54FromDiscord<Rika> ~~try doing it for nim now
10:56:56FromDiscord<Rika> ~~
10:57:03FromDiscord<Rika> forgot to close uuuuuuuuuuuuugh
10:57:07Yardanico@Kvothe87 what about https://nim-lang.org/docs/json.html#pretty%2CJsonNode%2Cint
10:58:42AraqClyybber: don't we do that now after cooldome's patch?
11:04:54FromDiscord<Rika> @Cadey~ if you wanna try it with nim lol https://gist.github.com/de-odex/cfa9a06964ac0a3550c0ea78f0ac7b0a
11:05:36FromDiscord<Cadey~> @Rika fun fact, i did this in rust recently. it oomed the biggest instance amazon offered
11:05:48FromDiscord<Rika> i mean, the new one
11:05:54FromDiscord<Rika> the 2nd post you made
11:05:59FromDiscord<Rika> the modularized one 😛
11:07:34*dadada joined #nim
11:07:57*dadada is now known as Guest71509
11:15:46*Hideki_ joined #nim
11:16:15*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
11:17:34*cyraxjoe joined #nim
11:19:18FromGitter<alehander92> zevv thats good, does it work now
11:19:20FromGitter<alehander92> the counters
11:20:28Zevvyeah, that's good now. The only problem is that some stuff is only reclaimed after nim is done nimming, so I can't print the correct stats from nim in all cases
11:20:55Zevvand there seems to be a real leak in one test, haven't looked into it but I suspect something exception related
11:21:03FromGitter<alehander92> you need a hook i guess?
11:21:09FromGitter<alehander92> or is it some kind of shared stuff
11:21:22Zevvenvironment variables do crazy things with memory
11:21:34Zevvand some =destroys are put at the bottom of NimMain by the codegen
11:21:41Zevvso that's simply too late
11:22:48Zevvso if we simply want to know about global leaks I guess we could emit a printf at the end of NimMain, but it's not nice or anything
11:24:10FromGitter<alehander92> well i guess there can be some kind of a hook that just uhm gets called there instead
11:24:20FromGitter<alehander92> and then just quits without cleaning up itself
11:24:24FromGitter<alehander92> but not sure if thats enough
11:32:40Zevvyeah but call the hook from where?
11:32:59Zevvanyway, it was not about the counters, that was collateral damage. I just wanted to clenaup the allocs
11:33:19Zevvand hooray its green again, I can get my coffee and cake now
11:35:53FromGitter<Kvothe87> @rika thanks
11:36:23FromGitter<Kvothe87> @yardanico i guess that's wha ti want
11:38:04FromGitter<Kvothe87> although I think it is not doing what i want
11:38:04FromGitter<Kvothe87> https://play.nim-lang.org/#ix=27Yl
11:40:51FromGitter<Kvothe87> since it never goes to a new line
11:40:57FromDiscord<Rika> https://play.nim-lang.org/#ix=27Ym
11:43:27FromDiscord<Rika> Kvothe87^
11:43:54FromDiscord<Rika> %"string" makes a json that looks like just "string"
11:48:25FromGitter<Kvothe87> @rika thank you very much. I did try with parsejson(text) but apparently i was making a mistake somewhere else.
11:57:07FromDiscord<Rika> odd
12:00:18FromGitter<Kvothe87> no, no with what you wrote me, text.parsejson or parsejson(text) the results was both correct. I meant that after yardanico suggestion tried something similar to what you suggested and used parsejson(text) but probably i did change something else that produced the undesired result
12:02:07FromDiscord<Rika> ah i see
12:02:14FromDiscord<Rika> maybe you did $parsejson(text)
12:02:21FromDiscord<Rika> %, not $
12:06:18PMunch@Rika, @Cadey~, just ran the test you provided Rika. My memory consumption was up to about 20G at one point (however I have about 4G of other programs open) but it did finish :)
12:07:22PMunchWith -d:release though. Might be worse without it
12:10:39FromGitter<alehander92> https://www.williamjbowman.com/resources/wjb2019-depmacros.pdf
12:11:17FromGitter<alehander92> Araq something a bit like that is what i am talking about when i say stuff like "type system dsl-s" for a lang toolkit
12:11:20*sekao joined #nim
12:11:41FromGitter<alehander92> of course thats a very general topic, but i guess its aexample of this line of thinking
12:14:13*Hideki_ quit (Remote host closed the connection)
12:14:58*Hideki_ joined #nim
12:17:29sekaois there any other way to create a heterogenous collection (such as, a seq that can hold strings OR ints) besides using object variants?
12:18:01PMunchsekao, no
12:18:20PMunchWell, you could use pointers, but it would be impossible to know which type was which
12:19:22sekaook understood
12:19:54*Hideki_ quit (Ping timeout: 268 seconds)
12:21:56*abm joined #nim
12:22:04FromGitter<alehander92> usually you dont want that
12:22:32FromGitter<alehander92> variants should be easy enough to use
12:22:59FromGitter<alehander92> if you need, you can create constructors/reuse jsonnode for simple cases
12:23:12FromGitter<alehander92> or use https://github.com/andreaferretti/patty or https://github.com/alehander92/gara
12:23:13PMunchMaybe someone should create a macro for this case
12:23:17FromGitter<alehander92> if you want pattern matching
12:23:42PMunchJust I want either this, this, or that in a container and I can't be arsed to manually define an enum and a type for it.
12:23:53FromGitter<alehander92> i think https://github.com/andreaferretti/patty#constructing-variant-objects
12:23:56FromGitter<alehander92> is good
12:23:59FromGitter<alehander92> i wanted to add it to gara
12:24:06FromGitter<alehander92> but then just kinda left it as todo
12:24:29PMunch@Rika: http://ix.io/27Yt
12:24:44FromGitter<alehander92> yes, you're completely right, something like `variant` should be even in sugar imho
12:27:49*Hideki_ joined #nim
12:30:57PMunch@Rika, not too much of a difference with a debug build: http://ix.io/27Yv
12:37:24*Vladar joined #nim
12:41:14FromGitter<Vindaar> @narimiran oh darn. Will check and attempt to fix it. There's only two things I can imagine going wrong. I'll let you know
12:45:04FromDiscord<Rika> PMunch, dang. i could only run on release, and it took really long
12:48:18*cgfuh joined #nim
12:50:29AraqZevv, calloc can be a pessimization
12:50:38FromGitter<Vindaar> @narimiran ok, not what I expected. It just can't delete the file in the same test I create it, since it's "being used by another process". Guess I have windows homework to do :P
12:50:43Araqfor the common ObjectRef(fieldA: 4) construct
12:50:58Araqwe can optimize away the zeroMem
12:51:06Araqand so can the C compiler
12:51:24Araqbut if you move it into the allocation it's not under our control anymore
12:57:42PMunchRika, yeah this machine is a bit overpowered for what I do :P
13:06:19*Vladar quit (Quit: Leaving)
13:07:55*sekao quit (Ping timeout: 260 seconds)
13:08:24*dvn left #nim ("gxis")
13:09:13Araqalehander92: interesting link
13:09:38ZevvAraq: yeah, but what if calloc is more then 10 times faster then malloc+memzero? (which it is for me)
13:10:06Zevvand yes, cow and all.
13:10:09Zevvbut still
13:10:29Araqit isn't for ObjectRef(...)
13:10:52Zevvbut it might be for seqs and strings. So what to do? Can't objectref be smartened so it knows to either alloc or alloc0?
13:11:04Araqthat's what I mean, yes
13:11:24Zevvok. Shall I revert the calloc for now? I'd like to get this merged in first because it grows and grows
13:12:32Araqwell looking at nimNewObj
13:12:54Araqcurrently it relies on zeroing so calloc is fine I guess
13:13:15Araqwe need to keep in mind to optimize it further though
13:13:16Zevvok
13:13:40Araqand also: we need an emplace_back optimization
13:13:52AraqClyybber: any idea how to do that?
13:13:55Araqbbl
13:13:56Zevvyou're talking dirty. you mean 'add' right?
13:14:07Araqadd ObjectConstr(...)
13:14:47Araqit's very common and must be as fast as possible
13:27:45*endragor quit (Remote host closed the connection)
13:33:18FromDiscord<Clyybber> Araq: If we can guarantee that add will add the object to somewhere where its eventually destroyed
13:33:40FromDiscord<Clyybber> Then we should be fine
13:33:52FromDiscord<Clyybber> and we don't have to generate a destructor nor a wasMoved
13:34:00FromDiscord<Clyybber> and then we are as good as emplace back
13:37:37FromGitter<Vindaar> was the `polynumeric` really part of the stdlib years ago?
13:37:44FromGitter<Vindaar> *library
13:45:47FromDiscord<Clyybber> Araq: I think the most important stuff for performance now will be to make sink implicit and improve the selfassign logic
13:46:11FromDiscord<Clyybber> so that when we can guarantee no selfassign is possible we don't generate those copies
13:46:42Zevvwhat is the recipe for hunting gc:arc leaks in my code?
13:47:41FromDiscord<Tak> When you call seq.len or array.len, is it a cached property or does it re-calculate each call?
13:48:09YardanicoI don't think nim's stdlib generally does any kind of caching for stuff like this
13:48:18FromDiscord<Clyybber> Zevv: Getting a small repro case and then looking at the injectdestructor transformed code
13:48:27FromDiscord<Clyybber> @Tak No it is a field
13:48:32FromDiscord<Clyybber> It is not recalculated
13:48:41FromDiscord<Tak> Oh good so its not necessary for me to assign a const via let then?
13:48:48FromDiscord<Clyybber> Nope
13:48:49Yardanicoconst is not let though :P
13:49:01FromDiscord<Tak> Immutable* better? :p Thanks!
13:49:21Yardanicowell yeah, you don't really need to, only if you use it a lot of times so you might want to shorten the code or something like that
13:49:41Yardanicobtw, var - runtime mutable, let - runtime immutable, const - compile-time
13:49:50Yardanicowell, you can also have both var/let at compile time too
13:51:40PMunchHooray, the sun is back!
13:53:30FromGitter<alehander92> PMunch woah
13:53:32FromGitter<alehander92> summer time
13:53:57PMunchOh no, that isn't until the end of March
13:54:14PMunchToday is the first day you can see the sun in our city
13:54:39Zevvclyybber: how to expand easily? --expandMacr?
13:55:19FromDiscord<Clyybber> Oh, sorry I forgot
13:56:00FromDiscord<Clyybber> Zevv: Ah, yeah --expandMacro
13:56:23Zevvcool thanks
13:57:10FromDiscord<Clyybber> And for inspecting the generated code do ./koch temp -d:toDebug=procYouWantToDebug
13:57:33FromDiscord<Clyybber> and then nim_temp c and so on
13:57:53ZevvtoDebug, oh
13:57:59Zevvnew to me
14:00:50*icebattle joined #nim
14:01:05FromDiscord<Tak> For general usage, is it recommended to leave Nim compiling to C via GCC/Clang? I.e are ObjC and C++ targets more designed for code-base integration?
14:02:50PMunchPretty much yeah
14:03:16PMunchThe C++ target is in some cases better, but for the most part it's fine to just leave it compiling to C
14:03:55FromDiscord<Tak> Is that due to it leveraging std::vector, std::exception etc.? Or just very case specific? 🙂
14:04:14PMunchYeah IIRC it's mostly to do with exceptions
14:04:52FromDiscord<Clyybber> C backend has been improved on that end though
14:05:00FromDiscord<Clyybber> So just use the C backend if you don't need cpp
14:05:14*icebattle quit (Ping timeout: 258 seconds)
14:05:28PMunchYeah, I've noticed much less of a difference lately
14:06:35FromDiscord<Tak> Ok cool thanks 🙂
14:09:03Zevvah dang the leaks are in envVars, I knew that
14:10:59FromDiscord<Clyybber> Zevv: Interesting, I thought I had fixed them
14:11:15Zevvwhen?
14:11:23ZevvI'm on a branch a few days old, didnt rebase yet
14:11:36FromDiscord<Clyybber> Zevv: Nevermind, I thought you were talking about getEnv
14:11:42Zevvyeah I was
14:12:49FromDiscord<Clyybber> Like system.getEnv right?
14:13:13Zevvindeed
14:16:06FromDiscord<Clyybber> Zevv: Can you try again with https://github.com/nim-lang/Nim/pull/12018 reverted?
14:16:08disbotfixes #11833
14:18:19FromDiscord<Clyybber> Nevermind, dumb suggestion, that PR was pre rewrite
14:18:31Zevvyeah, I was wondering already what I did wrong :)
14:19:38Zevvanyway, findEnvVar does a rawNewString that does never get freed
14:19:52*dddddd joined #nim
14:21:13FromDiscord<Clyybber> Okay thanks, can you open an issue so we don't forget?
14:21:18FromDiscord<Tak> If I am comparing an int/byte etc. to an enum, is there a nicer syntax than using the enum.ord every time? Or should I just use a macro that does that for me?
14:21:26Zevvclyybber: willdo
14:22:45Zevvhttps://github.com/nim-lang/Nim/issues/13217 go disbot go
14:22:48disbot[ARC] os.getEnv memory leak ; snippet at 12https://play.nim-lang.org/#ix=27YN
14:23:52FromDiscord<Clyybber> thanky
14:25:51*solitudesf joined #nim
14:26:11Zevvywelcome
14:27:45*endragor joined #nim
14:29:00*marmotini_ joined #nim
14:30:23FromGitter<Vindaar> @narimiran I think I fixed the problem, see the PR
14:30:26*m4r35n357 joined #nim
14:31:01narimiran@Vindaar thanks!
14:31:29m4r35n357Hi all, trying to find a program called py2nim, come up with nothing so far - does it actually exist?
14:31:51m4r35n357all I found was this page: https://github.com/metacraft-labs/py2nim
14:31:56Yardanicowell, that's it
14:32:02*endragor quit (Ping timeout: 240 seconds)
14:32:03Yardanicothe actual code is in https://github.com/metacraft-labs/languist
14:32:09m4r35n357really? have you seen it?
14:32:56Yardanicoyes, before it was in py2nim, now py2nim is just like a "symlink" for "langust" :P
14:33:00Yardanicoalthough it's not really maintained
14:33:27m4r35n357(from the README) How to use: ./py2nim <filename>.py
14:33:29Yardanicoand I doubt it will work for any big real-world python apps
14:33:47Yardanicom4r35n357: well, if you look at the source code it just calls "languist" now
14:33:51FromGitter<alehander92> yes
14:33:54m4r35n357I onwly want to convert a small piece of pure Python
14:33:58FromGitter<alehander92> its called py2nim_deprecated
14:34:01FromGitter<alehander92> the old one
14:34:13m4r35n357yes, but the README doesn't say that!
14:34:15FromGitter<alehander92> (the original one)
14:34:32Yardanicom4r35n357: well, why not read 6 lines of code :P
14:34:42Yardanicoand it's not like it's a finished project
14:35:25Yardanicom4r35n357: can you share that piece of python code though? I'm just curious
14:35:36m4r35n357I did read it
14:35:50m4r35n357but at that point I realized I was fighting the README . . .
14:36:44m4r35n357first part of https://github.com/m4r35n357/ODE-Playground/blob/master/ad.py
14:36:50FromGitter<alehander92> m4r35n357: sorry
14:37:11Yardanicom4r35n357: well, not sure if list comprehensions will be translated though
14:37:21FromGitter<alehander92> just commited a fix to the readme
14:37:36m4r35n357can't remember how to put usernames in my text ;)
14:38:04YardanicoI usually type 1-2 characters and press tab :)
14:38:14m4r35n357Yardanico, that is it ;)
14:38:45FromGitter<alehander92> so yeah
14:38:49m4r35n357OK, so is languist maintainid?
14:38:59FromGitter<alehander92> you might have some success with the `_deprecated` one currently
14:39:08FromGitter<alehander92> it is not really maintained actively
14:39:14FromGitter<alehander92> but ruby2nim based on it
14:39:22FromGitter<alehander92> should be kinda useful i think
14:39:25m4r35n357OK I only wanted to try it, that is fine
14:39:41FromGitter<alehander92> but py2nim based on it wasnt tested/developed so much
14:39:53m4r35n357I could probably just write it from scratch, but the internet told me there was an easier way ;)
14:40:10m4r35n357and I believed it!
14:40:14FromGitter<alehander92> yes!!
14:40:31FromGitter<alehander92> well your code is kinda the code py2nim_deprecated should be able to help
14:40:35Yardanicoyou'll probably spend more time finding py2nim and figuring it out in total than rewriting by hand though :D
14:41:07m4r35n357OK cheers guys I will look into this, I have a bit of time to investigate
14:41:10FromGitter<alehander92> but .. yeah, sorry, i should try to at least semi-fix one of both
14:41:18FromGitter<alehander92> one day
14:41:38FromGitter<alehander92> to do like 70%ish work of the intended, but more robustly
14:42:08m4r35n357I think something like this is really hard, what with program imports & such
14:42:13FromGitter<alehander92> m4r35n357 if you try, you need to add some code that invokes your operations, like tests
14:42:29FromGitter<alehander92> thats not the hardest part
14:42:37FromGitter<alehander92> we kinda managed to start something like https://github.com/metacraft-labs/fast-rubocop
14:42:37*marmotini_ quit (Read error: Connection reset by peer)
14:42:45FromDiscord<Rika> how would someone go by implementing a plugin system in nim
14:42:52*marmotini_ joined #nim
14:42:55Yardanicoyou mean runtime one?
14:42:57FromGitter<alehander92> which worked for several cops
14:43:07FromGitter<alehander92> so its almost doable with some % error
14:43:09FromDiscord<Rika> yes
14:43:22FromDiscord<Rika> runtime can load and reload plugins
14:43:25Yardanicoso you can add plugins (like new dll's)? I don't really know, but I think it might be easier with --gc:arc
14:43:29Yardanicoor just use a scripting language :P
14:43:35Yardanicoembed it in your nim app
14:43:38FromDiscord<Rika> yeah i'm considering wren
14:45:23FromGitter<alehander92> what kind of project
14:45:25FromGitter<alehander92> is it
14:46:12FromDiscord<Rika> me?
14:46:13FromDiscord<Rika> uh
14:46:39FromDiscord<Rika> another implementation of tachiyomi for PC
14:47:09YardanicoYou want plugins for different manga sources?
14:47:14FromGitter<alehander92> ahh
14:47:17FromDiscord<Rika> mhm
14:47:25FromDiscord<Rika> wren or even lua seems 100% ok
14:47:45FromDiscord<Rika> also why i asked about a GUI a while back lol
14:47:48*marmotini_ quit (Remote host closed the connection)
14:47:51FromDiscord<Rika> still dont know what i'm going with
14:48:09FromDiscord<Rika> since windows native gui looks abhorrent and i dont think i wanna go the electron route
14:48:18Yardanicogintro or fidget? :P
14:48:26FromDiscord<Rika> gintro????
14:48:30YardanicoYes, why not?
14:48:41FromDiscord<Rika> ive never heard of it moreof
14:48:45FromDiscord<Rika> woah
14:48:47FromDiscord<Rika> gtk
14:48:51Yardanicogtk works on windows
14:48:54FromDiscord<Rika> i know
14:49:02FromDiscord<Rika> this looks nice
14:49:06FromDiscord<Rika> ive never seen it wtf
14:49:11FromDiscord<Rika> am i blind or idiotic
14:49:55*lritter_ joined #nim
14:51:05Zevvfor me that's not even mutually exclusive
14:51:15ZevvI'm often a blind idiot
14:51:18FromDiscord<Rika> am i blind and/or idiotic?
14:51:26Zevvstrange that there is no word for that, right?
14:51:30Zevv'and/or'
14:53:17FromDiscord<Rika> that's usually just or
14:53:29FromDiscord<Rika> the or in english is really an xor
14:53:30Zevvlanguage, bah
14:53:36Zevv"am i blind xor idiotic"
14:53:49FromDiscord<Clyybber> @Rika Wait are you the guy who made tachiyomi?
14:53:57FromDiscord<Rika> nope
14:54:01FromDiscord<Rika> christ im not inorichi
14:54:12FromDiscord<Rika> i'm not that good at programming
14:58:35FromGitter<alehander92> i failed my 4th driver exam
14:58:46livcdwhat happened ? :D
14:58:49FromGitter<alehander92> so you guys are smart not idiots :D
14:59:01FromGitter<alehander92> ah i was very close i am very glad of this one
14:59:18FromGitter<alehander92> but in the end i forgot to look through the right side mirror while moving in the right lane
14:59:59FromGitter<alehander92> which was like super dangerous sorry guy in blue car
15:00:06FromDiscord<Rika> my friend failed within 1 minute because they counterflowed
15:00:43FromGitter<alehander92> so i am glad to practice that a bit didnt realize how bad i am at this one
15:00:52FromGitter<alehander92> but i am ready to go at at least several more!
15:01:16FromGitter<alehander92> ah i guess thats what i did? counterflow?
15:01:31FromDiscord<Clyybber> alehander92: you are in croatia right?
15:01:39FromGitter<alehander92> no, bulgaria
15:01:46FromGitter<alehander92> narimiran is safe
15:01:50FromDiscord<Clyybber> ah, is it even enforced there?
15:01:52*PMunch quit (Quit: Leaving)
15:02:00FromGitter<alehander92> you'd be surprised!
15:02:22FromGitter<alehander92> the examiners are relatively harsh
15:02:26FromDiscord<Rika> counterflow is driving in the wrong side alehander
15:02:38FromGitter<alehander92> in a good way
15:02:45FromGitter<alehander92> ah, ok, i dont do that
15:02:45FromDiscord<Clyybber> alehander92: Interesting, in romania its the complete opposite
15:02:52FromDiscord<Clyybber> like nobody even has a drivers license
15:02:59FromGitter<alehander92> except some very small streets when turning
15:03:16FromGitter<alehander92> yeah i can imagine some wildwest-iness :P
15:03:25*lritter_ quit (Remote host closed the connection)
15:03:29FromGitter<alehander92> but the thing with licenses is probably a bit overstated for the big cities
15:03:45*lritter joined #nim
15:03:46FromGitter<alehander92> i'd say sofia traffic seems almost .. civilized
15:03:54FromGitter<alehander92> when i am not on the road
15:04:15FromGitter<alehander92> are you romanian :O
15:04:35FromDiscord<Clyybber> nah, I was born in germany but my family is from transilvania
15:05:06FromDiscord<Rika> 🤔
15:05:21FromGitter<alehander92> not surprised you managed to put a president there!
15:05:58FromGitter<alehander92> awesome i wonder about going to bucharest
15:06:02FromGitter<alehander92> after my wedding
15:06:18FromDiscord<Clyybber> oh, nice
15:06:42narimiran@alehander92 :)
15:06:45FromGitter<alehander92> its like , paris is a bit too far for 2-3 days, so .. maybe its .. like a paris but near danube
15:06:54FromDiscord<Clyybber> @Rika well, transylvanian saxons are germans emmigrated to romania
15:06:57FromGitter<alehander92> with proper corn food
15:07:05narimiranglad to hear i'm safe :)
15:07:20FromDiscord<Clyybber> and then during communism immigrated back, because they lost their privileges :p
15:08:20FromGitter<alehander92> ohh i see
15:08:26FromGitter<alehander92> ive heard transilvania is like
15:08:30FromGitter<alehander92> very beautiful
15:08:59FromDiscord<Clyybber> yeah, good place to spend your holidays
15:09:02FromGitter<alehander92> narimiran of course :)
15:09:28FromGitter<alehander92> but i guess that bucharest is interesting too, i just enjoy urban stuff
15:09:30FromDiscord<Rika> i have no idea what europe's countries/geography/etc is
15:09:32FromGitter<alehander92> cities*
15:09:35FromGitter<Vindaar> @narimiran ugh, now it doesn't like cairo on windows. why is that :/
15:09:35FromDiscord<Rika> since im a filthy asian
15:09:46FromGitter<alehander92> rika wow, vietnam?
15:09:50FromDiscord<Rika> nope
15:09:52FromDiscord<Clyybber> @Rika where are you from?
15:09:53FromDiscord<Rika> philippines
15:09:57FromGitter<alehander92> ah awesome
15:10:00FromDiscord<Clyybber> oh, nice
15:10:04narimiranbut yeah, @alehander92, please look at your mirrors before turning. and not only that, check if anybody is besides you. it should be automatic for all drivers
15:10:05FromGitter<alehander92> wesley so
15:10:06FromDiscord<Rika> got trump #2 over here
15:11:17FromGitter<alehander92> narimiran yeah its a very big red flag
15:11:32FromGitter<alehander92> thats why i am glad that this issue happened after all
15:11:42FromGitter<alehander92> to teach me a lesson
15:11:54narimiran@Vindaar i don't have a windows machine locally so i cannot reproduce it. should we then test only one of those test files?
15:12:05FromGitter<alehander92> rika yeah, but still its a cool country
15:12:22FromGitter<alehander92> balkans are probably the southeast asia version of europe indeed
15:12:23*leorize joined #nim
15:12:27FromGitter<alehander92> not only because southwest
15:12:57*nsf quit (Quit: WeeChat 2.7)
15:13:13FromGitter<Vindaar> I run dual boot on my machine at home. Will need to set up Nim etc. there first though (that's gonna be fun). Would like to test it beforehand. I'll get back to you
15:13:23FromGitter<alehander92> but maybe middle east..i imagine japan/china as the england/germany/france, korea as benilux and india as south countries..yeah
15:13:29FromDiscord<Clyybber> @Rika Duterte is extremely hard against drugs right?
15:13:38narimiran@Vindaar ok, great, ping me when you'll have something
15:13:46FromGitter<Vindaar> will do!
15:14:17*sekao joined #nim
15:15:47FromDiscord<Rika> mhm he is
15:15:58FromDiscord<Rika> we prolly shouldnt dive into that here though 😛
15:16:22FromDiscord<Clyybber> yeah, sadly the offtopic channel on discord isn't linked to the IRC/gitter one 😦
15:16:36sekaohello, i have another quick question about object variants. am i correct that i am paying the "cost" of all the fields that are unused? i.e., the object it creates will take the space required for all fields defined in the case's branches?
15:17:05*NimBot joined #nim
15:17:11*ng0_ joined #nim
15:17:11*ng0_ quit (Changing host)
15:17:11*ng0_ joined #nim
15:17:24FromDiscord<Rika> it was when yardanico's bot was still alive lol
15:17:33FromDiscord<AGNiMA> Which vi editor you guys recommend on macos?
15:17:49Zevvalthough i hate it I recommend nvim
15:18:07Zevvbecause it is the only vi supported by leorizes *excellent* nim.nvim plugin
15:18:10FromDiscord<AGNiMA> Why do you hate it?
15:18:14solitudesfsekao, you're "paying" the cost of the biggest branch
15:18:43sekaoah, interesting. that is good to know, thanks
15:19:22Zevvit is less stable then vim, and tends to be slower with huge files. And as a dutchie I need ot support my local foss software
15:20:00FromDiscord<AGNiMA> 🙂
15:20:47FromDiscord<Clyybber> @Rika Oh, I was about to ask yardanico why he doesn't employ his bot
15:20:59*ng0 quit (Ping timeout: 272 seconds)
15:20:59AraqZevv, there is unpairedEnvAllocs
15:21:11Araqin osenv.nim in order to deal with the leak detections
15:21:15Araqbut it's stupid :-)
15:21:24Araqmaybe we can find something better...
15:21:47FromDiscord<Clyybber> Zevv: local foss software?
15:21:53FromDiscord<Clyybber> leorize is dutch too?
15:21:57Zevvno, vim is
15:22:10FromDiscord<Clyybber> oh, nice
15:22:25ZevvAraq: well its not that bad, but it would be nice to be all clean of course
15:22:33Zevvcant we emit the proper destroys for those?
15:22:39Zevvi have no clue yet how that works
15:23:30Zevvclyyber, how does that work then? :)
15:23:37*ng0_ is now known as ng0
15:23:47Zevvyou have too many bs and too many ys
15:24:36*ptdel joined #nim
15:24:50FromDiscord<Rika> haaaaaaa, i dont know where to start with this tachiyomi port
15:33:08*sekao quit (Remote host closed the connection)
15:36:00FromGitter<alehander92> Clyybber both of those channels are very public anyway :P
15:36:23*nixfreak joined #nim
15:36:24FromGitter<alehander92> hm offtopic*
15:39:21nixfreakHello getting an error installing choosenim again, I already had it installed via choosenim , but when I went to update via choosenim I get SIGBUS: Illegal storage access. (Attempt to read from nil?) Osx Version 10.15.2 SIGBUS: Illegal storage access. (Attempt to read from nil?)
15:40:28FromGitter<Varriount> Do you not get a stack trace?
15:42:26*Hideki_ quit (Remote host closed the connection)
15:43:10*Hideki_ joined #nim
15:44:16*Hideki_ quit (Remote host closed the connection)
15:44:30*Hideki_ joined #nim
15:47:46*floppydh quit (Quit: WeeChat 2.7)
15:51:40nixfreakThere is no stack trace
15:52:38nixfreakchoosenim stable [9:52:04]SIGBUS: Illegal storage access. (Attempt to read from nil?)
15:58:44FromDiscord<Rika> macos right? isnt choosenim built there? build it as debug
15:59:28disruptekthat makes sense; spend an hour or two debugging choosenim.
15:59:54disruptekZevv: clyybber is full of bs.
16:00:04nixfreakhmm , choosenim worked just fine last year when i first installed
16:00:42nixfreakI can still compile though using nim c , so its only choosenim having issues
16:05:45*icebattle joined #nim
16:15:49Zevvdisruptek: you are full of *what*?
16:16:03disruptekwin
16:16:08Zevvone day araq will juat kick and ban you dude
16:16:25Zevvwell deserved, I'd say
16:16:42disruptekrude.
16:16:55Zevvbut true
16:17:04Zevvc'est la vie
16:20:16nixfreakso does anyone know why choosenim would have this bug ?
16:20:31disruptekyes.
16:20:38nixfreakI see that choosenim was just updated also
16:21:17nixfreakI don't want to put a bug report in unless its not my fault lol
16:21:48*Vladar joined #nim
16:22:20disruptekyou should create an issue. the developer loves issues.
16:22:39disruptekit's gonna be one of those salty days, i can just tell.
16:23:40nixfreakAre you being sarcastic ?
16:23:46Zevvochtendhumeur
16:23:59Zevvyes, google that disruptek
16:24:34FromDiscord<citycide> There's already a bug for that in choosenim, maybe 2
16:24:46disrupteki tried but i googled avx512vbmi instead.
16:25:06Zevvgood try though
16:25:12disruptekclose enough, i think.
16:25:57disruptekthinking about putting my mratsim hat on today.
16:26:33dom96nixfreak can you give this binary a go? https://github.com/dom96/choosenim/releases/download/v0.5.1/choosenim-0.5.1_macosx_amd64_debug
16:26:56dom96should give you a stack trace
16:27:21dom96Zevv: don't worry, I've got ban powers too
16:28:37dom96nixfreak also, if it's the old choosenim that's failing to update itself, you might just want to grab the binary and replace it yourself
16:28:38nixfreakyes I can trying out now
16:29:02dom96it's possible the bug only exists in whatever version of choosenim you're running
16:29:42disruptekah, an artisanal bug.
16:29:55disruptekhand-crafted for you and you alone.
16:32:31FromDiscord<citycide> This is the existing issue: https://github.com/dom96/choosenim/issues/122
16:32:34disbotSIGBUS: Illegal storage access. (Attempt to read from nil?) on macOS ; snippet at 12https://play.nim-lang.org/#ix=27Z9
16:32:48nixfreakchoosenim --version [10:32:13]choosenim v0.4.0 (2019-04-19 04:03:57) [macosx/amd64]
16:33:41nixfreakok so I have a log from the binary , one sec
16:34:02dom96oh, looks like timotheecour already gave us a stack trace
16:34:10dom96nimarchive to blame tut tut
16:34:42nixfreakhttp://pastebin.ws/7j9iln
16:34:47nixfreakbrb
16:35:02dom96oh, that's different
16:35:24nixfreak./choosenim-0.5.1_macosx_amd64_debug --version [10:35:04]choosenim v0.5.1 (2020-01-15 05:59:20) [macosx/amd64]
16:35:34dom96please post that in that issue
16:36:44*Hideki_ quit (Remote host closed the connection)
16:37:26FromDiscord<AGNiMA> can i install 1.0.6 with choosenim? I can't seem to see the commands for unrelease version
16:37:35*Hideki_ joined #nim
16:38:02dom96choosenim devel
16:38:11dom96check out the --help
16:38:15dom96IIRC it mentions this
16:38:44*sagax joined #nim
16:41:38*Hideki_ quit (Ping timeout: 240 seconds)
16:43:27*natrys joined #nim
16:45:08narimiran1.0.6 is not yet out, you can grab 1.0.5 from nightlies; devel is way ahead of that (containing new features, not just bugfixes)
16:48:11dom961.0.5 isn't really a thing, right? It's the in-development 1.0.6
16:49:37disrupteki think version-1-0 branch reports its version as 1.0.5.
16:52:32FromDiscord<AGNiMA> I got devel setup
16:52:40FromDiscord<AGNiMA> Now nimph is kicking my butt
16:53:01FromDiscord<AGNiMA> It don't download dependencies for each package.
16:53:19dom96Use Nimble instead? :P
16:53:33disrupteknimble is much more stable.
16:54:05FromDiscord<AGNiMA> nimble doesn't allow me to lock depency per project.
16:54:53FromDiscord<AGNiMA> I was thinking of just using docker...
16:55:07disruptekyou have a nim.cfg with --clearNimblePath and --nimblePath=/some/where?
16:55:25FromDiscord<AGNiMA> --clearNimblePath
16:55:25FromDiscord<AGNiMA> --nimblePath="$config/deps/pkgs"
16:55:25FromDiscord<AGNiMA> --excludePath="/opt/nimble/pkgs/"
16:55:35disruptek`nimph doctor`
16:56:04FromDiscord<AGNiMA> no `nimx` requirement for /Users/xxxx/Documents/NimProjects/test/deps/pkgs/nimx-#head
16:56:17narimirandom96: as disruptek said, 1.0.5 is a "backport devel" version
16:56:33dom96narimiran right
16:56:48disruptekthat's just telling you that you have a package that isn't listed in your requirements but does show up in your search paths.
16:56:49dom96It follows the standard Nim odd/even release numbering
16:57:25FromDiscord<AGNiMA> Exception: spec.nim(153, 10) `path.len > 0`
16:57:25FromDiscord<AGNiMA> crashing because something bad happened
16:57:37FromDiscord<AGNiMA> # Dependencies
16:57:37FromDiscord<AGNiMA>
16:57:37FromDiscord<AGNiMA> requires "nim >= 1.1.1"
16:57:37FromDiscord<AGNiMA> requires "nimx"
16:57:55disruptekis this package public?
16:58:15FromDiscord<AGNiMA> yes
16:58:25FromDiscord<AGNiMA> https://github.com/yglukhov/nimx
16:58:44disruptekno, i mean the one you're working on. `test`.
16:59:11FromDiscord<AGNiMA> oh test is just my local directory I did not commit to git.
16:59:21disruptekhmm, nimx crashes my nimph, too.
17:00:30FromDiscord<AGNiMA> oh, i was pulling my hair...
17:01:11FromDiscord<AGNiMA> let me try something much simpler
17:03:20FromDiscord<AGNiMA> sweet nimph work "whip"
17:03:30disruptekwhat?
17:03:33FromDiscord<AGNiMA> required "whip" and it now downloads all the deps
17:03:40FromDiscord<AGNiMA> # Dependencies
17:03:40FromDiscord<AGNiMA>
17:03:40FromDiscord<AGNiMA> requires "nim >= 1.1.1"
17:03:40FromDiscord<AGNiMA> requires "whip"
17:03:54FromDiscord<AGNiMA> I am guessing nimx just breaks on nimph doctor
17:05:16disrupteki don't see anything wrong with nimx, so it's probably a nimph bug.
17:05:27nixfreakOk so choosenim doesn't work on osx right now , but I can still use nim c to compile
17:05:54FromDiscord<AGNiMA> Thanks disruptek 🙂
17:06:22nixfreaksweet Prompt: [email protected] already exists. Overwrite? [y/N] Answer: y Success: nimx installed successfully.
17:06:25disrupteki think maybe i'm doing the wrong thing when trying to determine a release for a naked url (no anchor).
17:08:13disruptekoh, i think it's opengl#head that's a problem.
17:08:39FromDiscord<AGNiMA> I remember opengl error yesterday
17:08:58FromDiscord<AGNiMA> I didn't ask about it, i wipe it and started back with a clean project.
17:09:34disrupteki dunno, that syntax passes the parser. i guess i'm gonna have to look at this properly.
17:10:25nixfreakDoes anyone know of a site or a blog that have python3 apps side by site nim ones ?
17:10:41nixfreakbeside the learning resource on the nim-lang site
17:10:59disruptekomg it's `nake` actually. because it ends with a /.
17:11:08lqdev[m]well, there's rosetta code @nixfreak
17:11:13disruptekso dumb.
17:11:15lqdev[m]and that's about all I know
17:11:27nixfreakthanks lqdev[m]
17:12:44disruptekyep. i guess we will sanitize the urls from the nimble packages database.
17:15:44*Trustable joined #nim
17:19:32FromDiscord<AGNiMA> disruptek, ty 🙂
17:19:56disruptekdo you want to test it?
17:20:39*Hideki_ joined #nim
17:27:54*Pixeli joined #nim
17:28:39FromDiscord<Recruit_main_70007> how can i make my code independent from the garbage collector?
17:28:55disruptekalloc and free your stuff manually.
17:29:11*Pixeli quit (Client Quit)
17:29:27FromDiscord<Recruit_main_70007> c and c++ do it manually?
17:29:47*Vladar quit (Quit: Leaving)
17:30:33disruptekyes. garbage collectors have to start somewhere.
17:31:33FromDiscord<Recruit_main_70007> but... lets take a variable made in C, you dont allocate it yourself
17:31:50disruptekwho does it for you?
17:32:18FromDiscord<Recruit_main_70007> where do you specify it then?
17:32:38FromDiscord<Recruit_main_70007> (i am very new to low level, be patient if i say stupid things
17:33:20disruptekin c, you generally alloc memory with `malloc`, for example.
17:34:29Zevvone step back disruptek
17:35:14FromGitter<alehander92> recruit you can also declare a variable in Nim as well
17:35:16disruptekon the stack, you don't need to alloc memory. is that what you mean?
17:35:18ZevvRecruit: normal variables are sometimes called "automatic" variables. The live as long as the scope where the are defined, typically inside a proc
17:35:22FromGitter<alehander92> what you need to learn about is stack vs heap
17:35:28FromDiscord<AGNiMA> sure disruptek
17:35:40FromDiscord<AGNiMA> I need to update nimph ?
17:35:42disruptekagnima: nimph-0.6.20
17:35:48disrupteki'm your huckleberry.
17:35:59ZevvAnd theres this guy that made an excellent writeup about just this subject
17:36:02Zevvlet me find that for you
17:36:12Zevvah yes here it is http://zevv.nl/nim-memory/
17:36:16disrupteki hear he has really hairy ankles.
17:36:23disruptekskeeves me out.
17:36:53FromDiscord<Recruit_main_70007> that web explains manual memory managment?
17:37:05FromDiscord<AGNiMA> It's compiling 🙂
17:37:28Zevvit explains the basics, where stuff goes in memory, and who is responsible for taking care of that memory
17:37:45Zevvits not complete, as it does not go into the details of the GC, for example
17:38:08disruptekjust try not to think about the ankles. those hairy, hairy ankles.
17:38:17FromDiscord<Recruit_main_70007> ok, thank you, and do you know of somewhere where i can learn about m.m.m
17:38:31FromDiscord<Recruit_main_70007> possibly in nim
17:38:33FromGitter<alehander92> zevv in clyybber there are many letters b
17:38:41Zevvdisruptek: stop scaring away the new people dude.
17:38:45FromGitter<alehander92> i am not sure if this was communicated well
17:38:47Zevvan too many ys as well
17:38:56FromGitter<alehander92> so that was the bs thing
17:39:04Zevvooooh right
17:39:05Zevvha
17:39:11Zevvget it now :)
17:39:20disruptekzevv is a little slow on the uptake.
17:39:23FromGitter<alehander92> assume good intentions :P
17:39:29Zevvnot with mr D
17:39:47ZevvI cant stop thinking about the hairy ankles now
17:40:06disruptekrecruit: zevv's article is all you need. experiment.
17:40:09FromGitter<alehander92> /r/nocontext everywhere
17:40:57FromGitter<alehander92> recruit if you know C you can also look at the nim generated code for very simple examples
17:41:17FromGitter<alehander92> (it starts in NimMainModule usually )
17:41:33FromGitter<alehander92> in the nimcache folder -> <stuff>.nim.c or something
17:42:47FromDiscord<AGNiMA> disruptek it download app the deps
17:42:48FromDiscord<Recruit_main_70007> i dont know C, but i can read it and undterstand it more or less
17:43:00FromDiscord<AGNiMA> just opengl is throwing error when i try to run a quick example test
17:43:06Zevvnot the nim generated code. bad idea :)
17:43:11disruptekagnima: cool.
17:43:22FromDiscord<AGNiMA> Awesome work 🙂
17:43:27disruptekthanks for the report.
17:43:53FromDiscord<AGNiMA> disruptek you think you can remove the hash on the directory or is it by pattern ?
17:44:06disruptekhash on the directory?
17:44:34FromDiscord<Recruit_main_70007> @zevv, i do find it hard, but i might try to get a bit more in depth if i want examples,
17:44:34FromDiscord<Recruit_main_70007>
17:44:34FromDiscord<Recruit_main_70007> thank you all, awesome community
17:44:45FromDiscord<AGNiMA> nimx-#head
17:44:57disruptekah, the compiler needs that for... reasons.
17:45:07FromDiscord<AGNiMA> ahh
17:45:22disruptekhysterical reasons.
17:46:09FromDiscord<AGNiMA> for some reason when nimx import opengl, from context.nim, so i went to context and try importing "deps.pkgs/opengl-#head/src.opengl"
17:46:18disrupteksetup a `goto` alias as is demonstrated in the nimph readme and you'll be happy.
17:46:29FromDiscord<AGNiMA> okay
17:47:32disruptekyou should be able to just `import opengl` if everything is working correctly.
17:48:15FromDiscord<AGNiMA> /Users/xxxx/Documents/NimProjects/test/deps/pkgs/nimx-#head/nimx/context.nim(2, 8) Error: cannot open file: opengl
17:48:49disruptekopengl#head is dumb.
17:48:56FromGitter<Vindaar> @narimiran managed to install Nim on windows and can reproduce the same problem locally. It's a start
17:49:05FromDiscord<AGNiMA> Yeah
17:49:09disrupteki don't even want to support that, but...
17:49:13*Hideki_ quit (Ping timeout: 265 seconds)
17:49:43FromDiscord<AGNiMA> your call
17:50:24disrupteknimx is fully of creepy stuff. this is a good test.
17:53:20FromDiscord<AGNiMA> lol, good luck, let me know if you need testing
17:53:57disruptekseems to me that /not/ supporting opengl#head is a bug. we have the code to associate branches and tags and `head` is supported as a special case of these.
17:55:19disrupteki don't understand how there's a requirement in nimx for variant-0.3 and yet the last tag is 0.2.10
17:56:04disrupteksame problem with ttf.
17:57:34*krishmanohar joined #nim
17:57:49*krishmanohar quit (Client Quit)
17:58:15*nsf joined #nim
17:58:35*agnima joined #nim
18:00:09agnimaI am on here now :), msg me if you need testing :)
18:01:03disruptekwell, our handling of ">= 0.2 & < 0.3" is broken somehow. i guess at least this isn't a blocker for you.
18:05:34FromGitter<alehander92> welcome to irc
18:05:39FromGitter<alehander92> says the gitter guy
18:05:53FromGitter<Vindaar> @narimiran I just don't understand dependencies on windows :( no matter where I put the libcairo-2.dll it still doesn't work
18:14:49agnima:)
18:15:58FromDiscord<Recruit_main_70007> @Vindaar, if you ever fix it, let me know bc i have the same problem with blas.dll
18:22:12FromGitter<Vindaar> It's probably something really basic I'm not aware of for windows. But well, gonna stop for today.
18:22:37FromDiscord<Recruit_main_70007> tried adding it to path (and adding .dll to pathextension?
18:23:33FromGitter<Vindaar> Tried both adding the gtk binaries to path, tried putting the libcairo to my mingw bin path, tried putting the dll into the dir of the file I'm compiling. nothing
18:23:35dom96compile with -d:nimDebugDl?
18:23:53FromGitter<Vindaar> forgot that was a thing. thanks, I'll try
18:25:17FromDiscord<Recruit_main_70007> and .dll to path extension?
18:26:00dom96You've likely got a DLL that's 32bit where your .exe is 64bit or vice versa
18:26:13dom96or one of your DLLs depends on another DLL which doesn't exist
18:26:30dom96(You can use dependency walker to check)
18:27:03FromGitter<Vindaar> both my nim installation and the gtk bundle are explicitly 64 bit. So that seems unlikely (unless for some reason the 64bit gtk bundle also contains 32 bit dlls)
18:29:43FromGitter<Vindaar> @Recruit_main_70007 (couldn't have chosen a longer name, right? :P) just tried that too, didn't help
18:30:16FromDiscord<Recruit_main_70007> just recruit if you want, it didnt properly @ me
18:30:39FromGitter<Vindaar> ok, I don't know how discord (and the bridge) handles that
18:31:06Araqputting the DLLs next to your .exe always works
18:31:16Araqif the DLL can be loaded, that is
18:31:23FromDiscord<Recruit_main_70007> nope, not always
18:31:41FromGitter<Vindaar> well, I guess the problem is that it can't be loaded, but I don't get why yet :)
18:32:00Araquse "CFF explorer" to look at a DLL's dependencies
18:32:10Araqand whether it's a 64 bit DLL
18:37:02FromGitter<Vindaar> according to cff explorer it is 64 bit indeed
18:38:32Araqmy aporia.exe uses GTK and the GTK with its deps is 35 DLLs
18:38:40Araqlikely you forgot something
18:38:46Araqlike zlib1.dll
18:39:11Araqfreetype6.dll
18:39:27Araqlibcario-script-interpreter.dll
18:39:42Araqlibexpat-1.dll
18:39:58FromGitter<Vindaar> but I actually just directly using cairo in my code. Just downloaded the gtk bundle, because apparently that's the easiest way to get cairo on windows
18:40:15Araqor maybe liblibdll.dll, the sillyness is endless
18:44:15FromGitter<Vindaar> And I guess Araq is right again :D. 1. I needed what feels like *all* dlls from the gtk bundle and 2. windows doesn't care about my path but all those dlls *had* to be put next to the binary. ugh, thanks Araq
18:44:38FromGitter<Vindaar> that still doesn't solve my actual problem, but yay
18:47:21FromDiscord<Recruit_main_70007> is nimtorch broken?
18:47:21FromDiscord<Recruit_main_70007> i get a compilation error with the test program, (killing the process just shows things about one file, i belive it might lack a folder in path)
18:47:49FromDiscord<Recruit_main_70007> the file is autograd_backward.nim
18:50:28*a_b_m joined #nim
18:50:35FromGitter<Vindaar> Ok, I'll continue tomorrow. Thanks everyone and have a good evening :)
18:53:33leorize[m]how do you properly export a C++ var without mangling?
18:54:24leorize[m]apparently c++ treats extern on variables differently than C for whatever reason
18:54:28*abm quit (Ping timeout: 265 seconds)
18:56:45Zevvclyybber: you here?
18:57:14leorize[m]anyone here familiar with the docgen?
18:57:26leorize[m]https://github.com/nim-lang/Nim/pull/13201
18:57:27disbotMake file descriptors from stdlib non-inheritable by default
18:57:42leorize[m]I can't get the docs to build :(
18:58:07leorize[m]easiest reproduction is to build doc for nativesockets
19:04:46*marmotini_ joined #nim
19:09:48*marmotini_ quit (Ping timeout: 268 seconds)
19:19:40Araqleorize[m], keep in mind that the docgen assumes --os:windows
19:22:46leorize[m]then why did it try to evaluate the code path for linux & bsds :/
19:30:43FromDiscord<treeform> I think we should ship win32 and win64 dlls with nimble packages some how... Window dlls are much harder to find and build then Mac or Linux.
19:31:10FromDiscord<treeform> I usually include a dll folder for my libs.
19:31:13*jjido joined #nim
19:33:05*nsf quit (Quit: WeeChat 2.7)
19:33:47FromDiscord<Recruit_main_70007> write that down @mratsim
19:41:37FromDiscord<DeltaPHC> nimble has pre- and post-hooks for commands/tasks (such as `build`, etc). Could one perhaps have Windows DLLs in a subfolder that's copied to the output folder on build?
19:44:19FromDiscord<DeltaPHC> It's up to the package owner to do that
19:49:38*Guest71509 quit (Ping timeout: 240 seconds)
19:52:02*dadada joined #nim
19:52:26*dadada is now known as Guest63768
20:01:09*marmotini_ joined #nim
20:10:08*marmotini_ quit (Remote host closed the connection)
20:15:53*marmotini_ joined #nim
20:20:16*muffindrake quit (Quit: muffindrake)
20:35:24*Ven`` joined #nim
20:40:20*muffindrake joined #nim
20:48:12*donpdonp left #nim ("WeeChat 2.6")
20:53:06*ng0 quit (Ping timeout: 258 seconds)
20:54:54*muffindrake quit (Quit: muffindrake)
20:56:31*narimiran quit (Quit: leaving)
21:02:40FromGitter<zacharycarter> hmm mratsim: I'm trying out weave but uhhh
21:03:00FromGitter<zacharycarter> I'm not sure how to store the results from spawn in a sequence
21:03:49FromGitter<zacharycarter> oh nevermind
21:03:58FromGitter<zacharycarter> I forgot you had to specify generic args for `FlowVar`
21:04:08*agnima quit (Remote host closed the connection)
21:04:49*agnima joined #nim
21:08:26*icebattle quit (Ping timeout: 258 seconds)
21:08:43*agnima quit (Remote host closed the connection)
21:08:46FromGitter<zacharycarter> well - I still run into an issue...
21:08:55*agnima joined #nim
21:08:56FromGitter<zacharycarter> the proc I'm trying to spawn - `proc path*[G: Graph, N: Node, D: Distance](graph: G, start, goal: N): seq[N]`
21:09:18FromGitter<zacharycarter> and I get - ``` ⏎ C:\Users\carte\projects\junkers\shipgen.nim(322, 23) template/generic instantiation of `spawn` from here ⏎ C:\Users\carte\projects\junkers\astar.nim(202, 74) Error: Invalid node kind nnkBracketExpr for macros.`$` ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5e27687eb674071d4ed1b840]
21:12:58FromGitter<zacharycarter> but I guess this isn't going to work period because of - ``` ⏎ path has arguments managed by GC (ref/seq/strings), ⏎ they cannot be distributed across threads. ⏎ Argument types: (Spaceship, tuple[x: int, y: int], tuple[x: int, y: int]) ⏎ ... [https://gitter.im/nim-lang/Nim?at=5e2769599797b560f2c7dc1c]
21:16:58shashlickanyone has an osx setup I can ssh into and debug stuff? these choosenim bugs hmm
21:21:30*Trustable quit (Remote host closed the connection)
21:23:17*muffindrake joined #nim
21:28:22*agnima quit ()
21:29:52*krux02_ joined #nim
21:36:32*krux02_ quit (Remote host closed the connection)
21:46:16*marmotini_ quit (Remote host closed the connection)
21:46:24*Hideki_ joined #nim
21:51:07*Hideki_ quit (Ping timeout: 272 seconds)
22:25:41*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:28:46disruptekrequires "foo 0.3" -- does it mean that we accept 0.3.1? or only 0.3.0?
22:39:17*dddddd quit (Ping timeout: 258 seconds)
22:39:53*zyklon quit (Ping timeout: 245 seconds)
22:45:31*zyklon joined #nim
22:48:14dom96the latter
22:48:28dom96there is an implicit `==` in there
22:50:27*solitudesf quit (Ping timeout: 240 seconds)
22:57:20FromDiscord<exelotl> how do you document getters/setters in Nim?
22:57:51FromDiscord<exelotl> Right now I'm putting the doc comment underneath the getter, and leaving the setter undocumented
22:57:52*Jesin quit (Quit: Leaving)
22:58:09*Guest63768 quit (Ping timeout: 268 seconds)
22:59:32*dadada joined #nim
22:59:40FromDiscord<exelotl> (i want to describe them as a single property, e.g. "this flag determines the video mode")
22:59:54*dadada is now known as Guest44431
23:00:07*nixfreak quit (Ping timeout: 260 seconds)
23:12:17*natrys quit (Quit: natrys)
23:13:32*actuallybatman quit (Quit: Lost terminal)
23:27:04*Hideki_ joined #nim
23:27:30*ng0 joined #nim
23:28:29*oswin[m] joined #nim
23:30:32*Pqzcih5 joined #nim
23:32:13*Hideki_ quit (Remote host closed the connection)
23:33:32*Hideki_ joined #nim
23:38:23*Hideki_ quit (Ping timeout: 265 seconds)