<< 28-03-2020 >>

00:02:22*rnrwashere joined #nim
00:05:11dom96Here are my thoughts: a package manager created by the community will never be as good as one maintained by the core devs of a programming language.
00:05:28dom96We need to get Araq to commit to it as a project
00:07:56*Guest9910 quit (Ping timeout: 256 seconds)
00:11:15shashlickI don't know how true that is - it basically needs someone dedicated to it 100% just like Araq is dedicated 100% to the compiler
00:11:53dom96yes, and to get that you need to pay someone a wage.
00:14:23*dadada_ joined #nim
00:17:26shashlickWe all just have too many projects
00:17:42shashlickEasy to start, hard to sustain
00:19:27dom96yes, well, unfortunately motivation runs out quickly when it comes to maintaining such projects
00:19:32dom96good night
00:19:55FromGitter<zetashift> gnight!
00:19:57FromGitter<kayabaNerve> I need some help. I'm trying to compile Nim code, when compilation takes 1.178 GiB of peak memory, on a server with 2 GiB free. That said, GCC still complains about a lack of memory. I tried `--parallelBuild:1`. i do understand the best option is to create a swap file, yet I can't, so I'm looking for a Nim solution.
00:23:20shashlickThere was some flag to reduce mem usage but can't find it
00:23:24axionI would recommend cross compiling with such severe memory constraints
00:23:59axionEspecially on a sever. The OOM killer could wipe out anything :/
00:25:31FromGitter<kayabaNerve> axion: I have 2 GB free.
00:25:59axionI saw
00:26:29FromGitter<kayabaNerve> That's not memory constrained
00:32:02*krux02_ joined #nim
00:34:50*krux02 quit (Ping timeout: 256 seconds)
00:35:19FromDiscord<Recruit_main707> Does anyone know how would I export a type into a dll, to import it somewhere else?
00:35:52*rnrwashere quit (Remote host closed the connection)
00:36:25*rnrwashere joined #nim
00:36:37*disrupteq joined #nim
00:38:00FromGitter<zetashift> export a proc that returns that type maybe? :O
00:38:02disrupteqyou could add a swapfile, but there's a way to stage the backend compilation after completing compilation in the frontend. something via the nim.json file iirc.
00:38:05*dadada_ quit (Ping timeout: 265 seconds)
00:38:34disrupteqi think you should be able to get by with around 500meg of memory.
00:38:41*rnrwashere quit (Remote host closed the connection)
00:38:55*rnrwashere joined #nim
00:39:56*lritter quit (Quit: Leaving)
00:44:01FromDiscord<Recruit_main707> zetafish, but what if I need to specify an argument of a function to be of that type?
00:44:17*dadada joined #nim
00:44:41*dadada is now known as Guest13136
00:44:55*gmpreussner_ quit (Ping timeout: 256 seconds)
00:45:13FromGitter<zetashift> zetafish is genius tbqh
00:45:30*gmpreussner joined #nim
00:46:39FromGitter<zetashift> but honestly I dont really know, I was mostly going of this answer: https://stackoverflow.com/questions/33348222/how-to-create-a-nim-dll-and-call-it-from-c-sharp
00:48:07FromDiscord<Recruit_main707> I'll see what I can do, thanks anyways
00:58:00*voltist joined #nim
00:59:25*rnrwashere quit (Remote host closed the connection)
01:00:00*rnrwashere joined #nim
01:08:09*Guest13136 quit (Ping timeout: 256 seconds)
01:14:16*dadada_ joined #nim
01:16:02leorizeRecruit_main707: you can't export types :)
01:16:43FromDiscord<Recruit_main707> That's what I thought, but there must be some way
01:16:54leorizeyou can't, period :P
01:17:14leorizewell you can export how to interpret a type
01:17:17leorizethough no one ever do that
01:17:33FromDiscord<KingDarBoja> Hi guys! Getting this error: "SIGSEGV: Illegal storage access. (Attempt to read from nil?)". Code right here -> https://play.nim-lang.org/#ix=2fIm
01:18:40leorizeKingDarBoja: your token is a ref object
01:18:50leorizeyou haven't allocated the memory for it
01:19:14*rnrwashere quit (Ping timeout: 240 seconds)
01:19:14leorizecall `new(result)` first
01:19:49FromDiscord<Recruit_main707> If I remember correctly, references could not point to null right?
01:19:54leorizethey can
01:21:29FromDiscord<Recruit_main707> "You cannot have NULL references." From learncpp, does Nim have a workaround to this or something?
01:21:43leorizewdym?
01:22:00leorizeRecruit_main707: btw your snippet worked for me?
01:22:56FromDiscord<Recruit_main707> https://www.tutorialspoint.com/cplusplus/cpp_references.htm
01:22:56FromDiscord<Recruit_main707>
01:22:56FromDiscord<Recruit_main707> Well, shame on me I guess
01:23:32leorizeRecruit_main707: ah, nim don't have that kind of reference
01:23:46leorizethe nearest to it that we got is var parameters
01:23:58*voltist quit (Quit: Leaving)
01:24:35FromDiscord<Recruit_main707> So confusing 🥴
01:24:49*my_dude joined #nim
01:25:10leorizetry not to use C++ terminology on Nim :P
01:25:24leorizeour `ref` are managed pointers
01:25:31leorizeand being pointers, they can be nil
01:26:23FromDiscord<Recruit_main707> Ok, is this documented somewhere? This kind of differences would be nice to know.
01:26:35leorizethe manual
01:27:07leorizehttps://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
01:27:30FromDiscord<Recruit_main707> I meant in a more c++ Vs Nim comparison but I guess that works :p
01:28:14leorizeNim don't have anything similar to C++ references :p
01:28:38leorizeother than var parameters, ofc
01:30:38FromDiscord<KingDarBoja> Thanks mate!
01:37:53*dadada_ quit (Ping timeout: 250 seconds)
01:40:15FromDiscord<Varriount> If you absolutely need references, you can use unsafe pointers (`addr` operator)
01:40:18*my_dude quit (Quit: ZZZzzz…)
01:40:55*my_dude joined #nim
01:41:05*my_dude quit (Client Quit)
01:44:28*dadada joined #nim
01:44:51*dadada is now known as Guest57901
01:48:13*dwdv quit (Ping timeout: 264 seconds)
01:53:45*krux02_ quit (Remote host closed the connection)
01:55:54*my_dude joined #nim
01:55:57*my_dude quit (Client Quit)
01:56:59*my_dude joined #nim
01:57:36FromDiscord<KingDarBoja> Got another question
01:57:53FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2fIv is there a way to subset the TokenKind enum on my example?
01:58:12*my_dude quit (Client Quit)
01:58:26disruptekuse a range or a set.
01:58:33FromDiscord<Varriount> I don't follow - do you mean create a set?
01:59:00FromDiscord<Varriount> disruptek: Long night?
01:59:10disruptekyep.
01:59:15FromDiscord<KingDarBoja> For example, take elements from starting Enum key to ending Enum key, in this case, BANG to BRACE_R
01:59:35disruptek{BANG .. BRACE_R}
01:59:44disruptekor, as a type... range[BANG .. BRACE_R]
02:00:07FromDiscord<KingDarBoja> Oh, was missing the brackets... 🤦
02:01:20disruptekthat emoji renders female in my terminal emulator and male in my notifications. i don't have the energy to ponder how fucked up that is.
02:03:39qbradley(staticExec "gzip -9 -c test.dat").len is returning 112 in my test program, but "gzip -9 -c test.dat | wc" on the command line returns 113 (which is correct). Anyone know how to get my missing byte back using staticExec?
02:04:10disruptekgzip on the cli adds a newline most likely.
02:04:24disruptekbecause pipe.
02:04:53disruptekwrite the data to a file and compare with a quality editor.
02:06:23qbradleyIf I run "gzip -9 test.dat" the file test.dat.gz is also 113 bytes. The final missing byte is not a newline.
02:07:06qbradleyI suppose either the staticExec command is producing different output or it is losing a byte of output. I'll write out the resulting data from staticExec and diff
02:07:15disruptekyes.
02:07:45disruptek!repo hexyl
02:07:47disbothttps://github.com/sharkdp/hexyl -- 9hexyl: 11A command-line hex viewer 15 5117⭐ 137🍴 7& 12 more...
02:08:01*Guest57901 quit (Ping timeout: 264 seconds)
02:08:27FromDiscord<Varriount> disruptek: Or just diff the input? Pipe the input from gzip to a file, then compare
02:09:09disruptekdiff is not so useful for binary comparison, especially when what you're interested in is binary values.
02:09:30FromDiscord<Varriount> Ah, I assumed that the input to gzip was human readable
02:09:43disruptekit's the output that we are interested in.
02:09:54qbradleyI hexdumped the files and diffed them
02:09:59FromDiscord<Varriount> Yeah, but for the output to differ, the input must differ
02:10:08disruptekseemingly not.
02:10:32qbradleyThe files have differences near the beginning and the last bytes. It seems that gzip is working differently when run from staticExec than when run from command line
02:10:49FromDiscord<Varriount> qbradley: Environment variables maybe?
02:10:56disruptekcheck that it's the same gzip.
02:11:03qbradleythe command line is consistent regardless if I pipe the output to wc, or tee, or redirect to a file, or not use -c and let it write to the file directly. All consistent. but staticExec different :-(
02:11:40qbradleyOk, I'll see if "which gzip" works from staticExec
02:12:18qbradleyyes, "which gzip" returns /bin/gzip from command line and also from staticExec
02:12:21disruptekit's a bad idea to guess in any event. see `findExe()`
02:12:42disruptekcan you repro minimally?
02:13:05qbradleyI'll give it a try
02:13:31disrupteki'm thinking it's encoding the filename maybe.
02:13:45disruptek--no-name (timestamp)
02:14:18FromDiscord<Varriount> What locations (relative to the start and end) are the differences occurring at?
02:14:26*dadada_ joined #nim
02:14:28FromDiscord<Varriount> http://www33146ue.sakura.ne.jp/staff/iz/formats/gzip.html
02:14:44qbradleyI notice that the last few bytes of the 112 byte file are 0xA. (They are 0x0 in the correctly sized file). Is it possible that staticExec is aggressively stripping a trailing 0xA thinking it is an extra LF?
02:14:54qbradleyObviously in my case the output is binary
02:15:01disruptekyes.
02:15:30FromDiscord<Varriount> Wait, staticExec strips data from the executed output?
02:15:34disruptekeasy to test. 😉
02:15:45qbradleytrue I'll check
02:16:18qbradleyyes it does
02:16:32disruptek!repo nimbug
02:16:33disbothttps://github.com/juancarlospaco/nimbug -- 9nimbug: 11Nim Semi-Auto Bug Report Tool 15 6⭐ 0🍴
02:16:34qbradleyI tried staticExec("echo foo").len and got 3
02:16:36FromDiscord<KingDarBoja> Okay guys, just stuck on something from last example... If I wish to use the integer from the enum subset into the original subset to retrieve the Enum name, how could I do that?
02:16:46disruptekFUBAR.ord
02:16:47*rnrwashere joined #nim
02:17:05disruptek15.SomeEnum
02:17:17disruptek15.SomeEnumTypeName 😉
02:18:07qbradleyand to be extra sure again, I tried staticExec("cat test.dat").len where test.dat only contained 3 LF and I got 2
02:18:17qbradleyI'll file an issue
02:18:17FromDiscord<KingDarBoja> Thanks lol, struggling with these stuff
02:18:38disruptekord(FUBAR) and SomeType(15) if it's easier to grok.
02:19:00disruptekit boggles my mind that there's no $ for TLineInfo.
02:19:21disruptekthe throbbing is real.
02:19:33disrupteksee, this is why i stay stoned all the time.
02:20:51FromDiscord<Varriount> WTF does staticExec strip input data?
02:21:15disruptekit's probably just non-discriminatory.
02:21:22disruptekwrongly.
02:21:41*rnrwashere quit (Remote host closed the connection)
02:21:45FromDiscord<Varriount> Well, yes, but a function like that shouldn't be messing around with the output data.
02:22:05*rnrwashere joined #nim
02:22:12disruptekclearly.
02:22:25disruptekit's what we call a `bug`.
02:25:40*my_dude joined #nim
02:25:43*my_dude quit (Client Quit)
02:26:16qbradleyAs a workaround I can staticExec("gzip -9 -c test.dat >/tmp/test.dat.gz") followed by staticRead("/tmp/test.dat.gz")
02:26:23*my_dude joined #nim
02:32:08*chemist69 quit (Ping timeout: 256 seconds)
02:32:16*my_dude quit (Quit: ZZZzzz…)
02:34:07*chemist69 joined #nim
02:35:32FromDiscord<Varriount> @KingDarBoja If you are writing a parser, I highly recommend NPeg: https://github.com/zevv/npeg
02:37:34*dadada_ quit (Ping timeout: 240 seconds)
02:44:05FromGitter<fl0under> Hi everyone. I have tried to sign up on the forum but the activation email is not arriving so I am asking my question here. My problem is I have a JsonNode object and I am trying to unmarshal it into a type using the 'to' macro, however the JSON data I have contains a key called type, which means Nim won't let me have a identifier called type in my data structure as it is a reserved keyword. Does anyone know a way
02:44:05FromGitter... around this?
02:44:17*dadada joined #nim
02:44:41*dadada is now known as Guest61388
02:44:50FromDiscord<Varriount> fl0under: I would have to see the code, but generally you can use reserved identifiers by putting backticks around them
02:45:59FromDiscord<Varriount> fl0under: https://play.nim-lang.org/#ix=2fIB
02:46:09FromGitter<fl0under> awesome, that worked! thanks
02:47:04*my_dude joined #nim
02:47:12FromGitter<fl0under> I just started playing around with Nim yesterday and am liking it so far!
02:50:48*my_dude quit (Client Quit)
03:08:17*Guest61388 quit (Ping timeout: 256 seconds)
03:08:34*my_dude joined #nim
03:14:23*dadada_ joined #nim
03:20:58*rnrwashere quit (Remote host closed the connection)
03:24:23*my_dude quit (Quit: ZZZzzz…)
03:29:45*my_dude joined #nim
03:34:13*my_dude quit (Client Quit)
03:38:01*dadada_ quit (Ping timeout: 264 seconds)
03:44:20*dadada joined #nim
03:44:45*dadada is now known as Guest2327
03:50:54*muffindrake quit (Ping timeout: 256 seconds)
03:53:02*muffindrake joined #nim
04:08:12*Guest2327 quit (Ping timeout: 256 seconds)
04:10:01*waleee-cl quit (Quit: Connection closed for inactivity)
04:14:18*Asgaroth joined #nim
04:14:19*dadada_ joined #nim
04:15:54*Asgaroth_ quit (Ping timeout: 240 seconds)
04:24:19*my_dude joined #nim
04:24:37*my_dude quit (Client Quit)
04:26:37*my_dude joined #nim
04:26:49*my_dude quit (Client Quit)
04:35:44*my_dude joined #nim
04:36:04*Jjp137 quit (Read error: Connection reset by peer)
04:37:04*Jjp137 joined #nim
04:37:43*dadada_ quit (Ping timeout: 250 seconds)
04:40:16*my_dude quit (Client Quit)
04:44:20*dadada joined #nim
04:44:43*dadada is now known as Guest85098
04:48:01*endragor joined #nim
04:55:27*tiorock joined #nim
04:55:27*tiorock quit (Changing host)
04:55:27*tiorock joined #nim
04:55:27*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
04:55:27*tiorock is now known as rockcavera
05:00:06FromGitter<timotheecour> can anyone merge https://github.com/nim-lang/Nim/pull/13788 so unblock nim CI? @narimiran maybe?
05:00:07disbot[CI] fix recent freebsd systematic failure
05:08:37*Guest85098 quit (Ping timeout: 264 seconds)
05:14:20*dadada_ joined #nim
05:14:21*gangstacat quit (Ping timeout: 272 seconds)
05:17:30*qbradley quit (Quit: WeeChat 2.6)
05:21:40*rnrwashere joined #nim
05:26:01*rnrwashere quit (Ping timeout: 264 seconds)
05:38:01*dadada_ quit (Ping timeout: 264 seconds)
05:44:20*dadada joined #nim
05:44:43*dadada is now known as Guest9425
05:50:37*gangstacat joined #nim
05:52:53*narimiran joined #nim
05:59:06*dddddd quit (Remote host closed the connection)
06:08:37*Guest9425 quit (Ping timeout: 264 seconds)
06:09:53*Sembei joined #nim
06:11:32*endragor quit (Remote host closed the connection)
06:14:18*dadada_ joined #nim
06:14:42FromDiscord<Varriount> timotheecour: Merged
06:16:38leorizehmm, the fix in #13787 is weird
06:16:40disbothttps://github.com/nim-lang/Nim/pull/13787 -- 3fix regression #13730: `Foo[0.0] is Foo[-0.0]` now true again
06:17:36FromDiscord<Varriount> leorize: Isn't `BiggestFloat` bigger than 64 bits?
06:17:46leorizenope
06:17:53leorizeit's a 64bit float
06:17:59FromDiscord<Varriount> Huh.
06:19:48leorizethis might mean that `cast` is not implemented correctly...
06:20:05leorizebut I did use it successfully to implement my float parser...
06:20:56FromDiscord<Varriount> leorize: Floating point numbers are just weird
06:21:16leorizenot that weird
06:21:28FromDiscord<Varriount> leorize: Perhaps the linked commits that caused the bug might explain the solution
06:23:20leorizethe commit that caused the regression try to make NaN comparision possible
06:23:46leorizeexcept that you still can't correctly compare NaN that way :)
06:25:40leorizewe'd need a classifier like this one: https://github.com/alaviss/nim-ryu/blob/master/basicconv.nim#L67 to correctly compare for all cases
06:25:55FromDiscord<Varriount> leorize: https://possiblywrong.wordpress.com/2013/11/15/floating-point-equality-its-worse-than-you-think/
06:28:29FromDiscord<Varriount> leorize: So, Nim was changed to compare floats according to their bit pattern... but this is incorrect for 0 and -0, because they have a different bit pattern
06:29:12FromDiscord<Varriount> Honestly, I don't think it's worth trying to fight the C backend on this. I'd rather stick with common, expected semantics.
06:29:18leorizeah
06:29:26leorizeI misread the entire thing :P
06:29:48leorizeto be fair I'm not sure if we should even support 0.0 == -0.0
06:29:52leorizethey are different things
06:30:03kungtottedisrupteq: re: my URL issues with nimph yesterday, I got it working with this change: https://github.com/kungtotte/nimph/commit/9949de85945c0d5a54ae0e4552981dc32c838d35 but it breaks some existing test assumptions in tests/tspec.nim. From looking at it, I think you can drop a lot of those hardcoded assumptions completely out
06:30:46FromDiscord<Varriount> leorize: Again, I don't think Nim should break this particular standard - I'd need to check, but Javascript and (presumably) C both have the `NaN != NaN` behavior
06:31:03leorizewell, yea, it's a part of IEEE
06:31:41leorizesince this affects generics, I think Araq was just trying to make Foo[NaN] == Foo[NaN]
06:32:25leorizebut trust me, if you really want to compare NaN, bringing out a float classifier is always the wise choice
06:32:56Araqwell I was aware of 0.0 vs -0.0 and I didn't care
06:33:13Araqin fact, my solution is correct
06:33:26Araqproc foo(x = 0.0) # forward decl
06:33:31Araqcannot be resolved via
06:33:45Araqproc foo(x = -0.0) = implementation here
06:33:58FromDiscord<Varriount> Araq: So we break with the IEEE standard where `NaN != NaN` and `-0.0 == +0.0`?
06:34:08leorize!eval -0.0 == 0.0
06:34:11NimBotCompile failed: /usercode/in.nim(1, 6) Error: expression 'true' is of type 'bool' and has to be discarded
06:34:23Yardanico!eval assert 0.0 == -0.0
06:34:26NimBot<no output>
06:34:36leorizeIEEE strikes again
06:35:00Araqwe don't break the standard omg
06:35:15FromDiscord<Varriount> Oh, I was misreading the code.
06:35:22FromDiscord<Varriount> I thought this was the code generator
06:36:29FromDiscord<Varriount> I'm sorry
06:37:04leorizeI never understand why signed zero was a thing
06:37:23*dadada_ quit (Ping timeout: 256 seconds)
06:37:43*opal quit (Ping timeout: 240 seconds)
06:37:57leorizeI guess it was so that gradual underflow is cheaper to implement
06:38:14Araqsigned zero is fine 1.0 / -0.0 = -Inf, 1.0 / 0.0 = +Inf
06:39:03Araqeven NaN is ok. the fact that Nan *always* compares false, even with itself, is unprecedented in human history and breaks basic logic
06:39:26Araqit's the worst design in computing that I've ever seen
06:39:34*rockcavera quit (Ping timeout: 240 seconds)
06:40:34*rockcavera joined #nim
06:40:34*rockcavera quit (Changing host)
06:40:34*rockcavera joined #nim
06:40:36leorizewell it came from the same place where two different zeros are equal except when you put it into math
06:41:04*opal joined #nim
06:41:49Araqgood point
06:41:57*silvernode joined #nim
06:42:15Araqiirc there is a way to do calculus with explicit "finitely small" values that are different from 0
06:42:52Araqit's more elegant too, you could model that instead and the leave the 0.0 alone
06:42:59silvernodeso I think I hit a nim bug, none of my files have problems in the error, it just says Error: internal error: genTypeInfo(tyNone)
06:43:04Araq*infinitely
06:44:02silvernodeI don't want to say it is a compiler bug but it might be
06:44:20*dadada joined #nim
06:44:44*dadada is now known as Guest19780
06:45:03leorize[m]if it said internal error, it's a compiler bug
06:45:17*tiorock joined #nim
06:45:18*rockcavera quit (Killed (kornbluth.freenode.net (Nickname regained by services)))
06:45:18*tiorock is now known as rockcavera
06:45:18*rockcavera quit (Changing host)
06:45:18*rockcavera joined #nim
06:46:44silvernodethe current build of my game produces the error, my friend gets the same error. https://github.com/silvernode/space-nim/tree/experimental
06:46:53*solitudesf joined #nim
06:47:15Yardanicosilvernode: internal error always means that something is wrong in the compiler :P
06:47:31Yardanicowell, it might mean that your code is not valid Nim, but compiler should output a *proper* error instead
06:47:31*tiorock joined #nim
06:47:31*rockcavera is now known as Guest16272
06:47:31*tiorock quit (Changing host)
06:47:31*tiorock joined #nim
06:47:31*Guest16272 quit (Killed (verne.freenode.net (Nickname regained by services)))
06:47:31*tiorock is now known as rockcavera
06:47:51silvernodeYardanico: that was my first assumption but I wanted to be sure I was right.
06:48:28*solitudesf quit (Remote host closed the connection)
06:51:18*nsf joined #nim
06:51:50silvernodelooks like line 19 in space_nim.nim is causing the error. I assign the result of newGrid() to a var. newGrid() creates a 4x4 grid composed of seqs
06:54:09silvernodefixed it
06:54:24silvernode had var grid:seq = newGrid(4,4), if I change it to var grid = newGrid(4,4), it works
06:59:26*silvernode quit (Ping timeout: 265 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:40*gmpreussner joined #nim
07:07:01*rockcavera quit (Remote host closed the connection)
07:08:24*Guest19780 quit (Ping timeout: 256 seconds)
07:14:28*dadada_ joined #nim
07:22:45*jwm224 quit (Ping timeout: 240 seconds)
07:25:01*jwm224 joined #nim
07:32:07*sleepyqt joined #nim
07:38:01*dadada_ quit (Ping timeout: 256 seconds)
07:44:22*dadada joined #nim
07:44:46*dadada is now known as Guest43838
07:48:59*my_dude joined #nim
08:08:03*Guest43838 quit (Ping timeout: 256 seconds)
08:09:17*Yardanico left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.")
08:09:20*Yardanico joined #nim
08:09:31*narimiran quit (Ping timeout: 265 seconds)
08:14:28*dadada_ joined #nim
08:37:20*jjido joined #nim
08:38:02*dadada_ quit (Ping timeout: 265 seconds)
08:40:27*thomasross quit (Ping timeout: 265 seconds)
08:44:23*dadada joined #nim
08:44:47*dadada is now known as Guest14254
09:07:54*Guest14254 quit (Ping timeout: 240 seconds)
09:14:23*dadada_ joined #nim
09:37:28*dwdv joined #nim
09:38:27*dadada_ quit (Ping timeout: 258 seconds)
09:38:56*disrupteq quit (Ping timeout: 265 seconds)
09:40:47*nsf quit (Quit: WeeChat 2.7)
09:44:24*dadada joined #nim
09:44:47*dadada is now known as Guest70191
09:45:02*Vladar joined #nim
09:46:14*narimiran joined #nim
09:55:55FromDiscord<Varriount> Anyone read any interesting papers recently?
10:08:43*Guest70191 quit (Ping timeout: 260 seconds)
10:09:34*dadada_ joined #nim
10:10:02*sagax quit (Read error: Connection reset by peer)
10:19:09*sagax joined #nim
10:40:52Araqhttps://www.twitch.tv/araq4k stream incoming, but I only have time until lunch
10:43:52*natrys joined #nim
10:57:15*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:05:18*Zevv joined #nim
11:12:08*krux02 joined #nim
11:18:45*jjido joined #nim
12:03:14*dadada_ quit (Ping timeout: 240 seconds)
12:04:44*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:04:57dom96Araq, you should really start announcing these on your twitter
12:05:54dom96what even is DrNim?
12:07:29FromDiscord<Rika> proof system i think
12:07:31dom96oh, a proof checker
12:25:13*dadada joined #nim
12:25:36*dadada is now known as Guest63035
12:35:47*chemist69 quit (Ping timeout: 272 seconds)
12:36:28*chemist69 joined #nim
12:57:37*Guest63035 quit (Ping timeout: 256 seconds)
12:59:04FromGitter<gogolxdong> How to echo an object?
12:59:20*dadada joined #nim
12:59:43*dadada is now known as Guest31968
12:59:44Yardanicoecho myobj
13:00:18Yardanicoif it's a ref object, you can dereference it like echo myobj[]
13:01:02lqdev[m]also, `echo myObj.repr`
13:01:10lqdev[m]works for pretty much everything afaik
13:01:20Yardanicoyeah but output is too verbose sometimes
13:01:29lqdev[m]true
13:02:01FromGitter<gogolxdong> Error: type mismatch: got <Client> ⏎ but expected one of: ⏎ proc echo(x: varargs[typed, `$`]) ⏎ first type mismatch at position: 1 ⏎ required type for x: varargs[typed] ... [https://gitter.im/nim-lang/Nim?at=5e7f4ac94a4f8e0a100ef149]
13:02:10Yardanicoif it's a ref object, dereference it as I said
13:02:28FromGitter<gogolxdong> yes , I remembered was using repr, but repr doesn't work for me now?
13:02:54FromDiscord<Rika> basically `Client` has no `$` proc it seems
13:03:01FromDiscord<Rika> make one
13:03:03Yardanicowell it doesn't have to have it
13:03:11FromDiscord<Rika> really?
13:03:13Yardanicoyes?
13:03:28FromDiscord<Rika> hmm interesting, never noticed it
13:03:47Yardanico!eval type A = object; echo A()
13:03:49NimBot()
13:04:35Yardanico!eval type A = ref object; echo A()[]
13:04:37NimBot()
13:05:10FromDiscord<Rika> so what is Client? the error differs to what happens if you dont deref a ref
13:06:22FromGitter<gogolxdong> type ⏎ Client = ref object
13:06:40Yardanico@gogolxdong as I said, dereference it like echo myclient[]
13:06:42FromGitter<gogolxdong> echo client[]
13:07:00FromDiscord<Rika> does that work?
13:08:13FromGitter<gogolxdong> no
13:08:36narimiranimplement this: ```proc `$`(c: Client): string```
13:09:19dom96Just installed Nim on my new PC, as painless as it could be :D
13:09:32Yardanicodom96: got that build with ryzen? :) noice
13:09:39dom96yep
13:13:01dom96Seeing mentions of people talking about running HL: A wirelessly using Virtual Desktop and tempted to try it
13:13:12dom96But it's about time I set up Nim on this PC :)
13:14:47*tane joined #nim
13:16:59*leth joined #nim
13:17:11*lritter joined #nim
13:23:05*Guest31968 quit (Ping timeout: 258 seconds)
13:24:45lethIs there any talk on moving away the hosting from digital ocean? I don't feel comfortable whitlisting your domain considering that blocking digital oceans should be seen as an effecive method to deter customers away from them. So I'd rather urge to drop them out than simply whitlisting your domain and ip.
13:27:46dom96Why deter people from DO? What's wrong with them?
13:28:25lethThey don't respond to abuse reports.
13:29:23*dadada_ joined #nim
13:29:43dom96Source?
13:31:47lethhttps://www.webiron.com/abuse_leaderboard/
13:32:08lethhttps://www.webiron.com/abuse_feed/as14061
13:34:02FromGitter<gogolxdong> How to construct a derived object type variable from its base object type?
13:34:17lethIt's common knowledge amongts many security focused communities.
13:34:31FromGitter<gogolxdong> from its base object type variable
13:36:40dom96FWIW they give us machines for free, so we're not technically customers :)
13:38:23lethWell atleast that's something.
13:39:05lethI'll just whitelist you then since it's mostly about them not cleaning up amongst their customers and you're not actively supporting them.
13:45:58lethNow, since my email first blocked the email confirmation from the forum signup, is there a way to resend it somehow?
13:49:09dom96nope :)
13:49:14dom96what's your user name?
13:49:16dom96I can activate for you
13:52:20lethleth
13:52:28leththat is my username.
13:52:38dom96done
13:52:42lethThank you!
13:53:10*dadada_ quit (Ping timeout: 265 seconds)
13:53:50*clyybber joined #nim
13:54:38*sentreen_ quit (Ping timeout: 256 seconds)
13:57:41*sentreen_ joined #nim
13:59:22*dadada joined #nim
13:59:46*dadada is now known as Guest50116
14:06:52*dddddd joined #nim
14:20:33*PMunch joined #nim
14:21:04*NimBot joined #nim
14:33:53*rockcavera joined #nim
15:10:11*clyybber quit (Quit: WeeChat 2.7.1)
15:13:07disruptekkungtotte: looks good; please PR!
15:14:32*tungki joined #nim
15:19:59*Vladar quit (Remote host closed the connection)
15:21:05disruptek~stream
15:21:06disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
15:21:17disruptekjust trying to kill this stupid bug once and for all.
15:22:01*Trustable joined #nim
15:23:44FromDiscord<clyybber> which bug?
15:23:52disrupteki'm explaining it on stream.
15:24:03FromDiscord<clyybber> im watching it
15:34:20*jjido joined #nim
15:37:57krux02Araq: did you work on the caching behavior of the compiler? Sometimes my file doesn't build anymore if I call nim for my file.
15:40:42kungtottedisruptek: PR sent
15:41:18*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:42:24disruptekmerged; thanks!
15:55:11*jjido joined #nim
15:55:30FromDiscord<clyybber> krux02: I think it happens to us compiler devs
15:55:39FromDiscord<clyybber> because it doesn't know when the compiler changed
15:59:28kungtotteCool, my first ever PR on anything. Glad it was on something Nim related :)
16:00:11disruptekit's a good improvement!
16:00:17disruptekhow do you like nimph other than that?
16:00:47disruptekkrux02: IC was slightly fixed and it could be working more than it did.
16:01:15kungtotteSo far I haven't really had a chance to try it out for real, I tested it yesterday after there was a discussion about Nimble vs. nimph and I ran into the error right off the bat, so thus far my only exposure to it has been fixing this issue :)
16:01:21disruptekthat's awesome. first PR on anything... 😁
16:02:40*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:02:42*leorize quit (Remote host closed the connection)
16:03:13*leorize joined #nim
16:07:09disruptekAraq: you didn't tell me this was so broken.
16:07:45*Trustable quit (Remote host closed the connection)
16:12:08disruptekwe really need seq to have an api for mem-size versus usage-len.
16:26:06krux02disruptek, Regarding IC, I have the same file (root of the project) name in two different folders (projects). And somehow I think this confues nim now and it doesn't rebuild even though it should.
16:26:19krux02I am on the stream btw, but you are not enabled in mumble
16:26:30*jjido joined #nim
16:30:33*jjido quit (Client Quit)
16:32:10*sleepyqt quit (Ping timeout: 256 seconds)
16:37:03*leorize quit (Ping timeout: 240 seconds)
16:39:49*Vladar joined #nim
16:42:55*leorize joined #nim
16:44:19*jjido_ joined #nim
16:46:48*jjido_ quit (Client Quit)
17:04:48*bugrum joined #nim
17:05:38*bugrum quit (Client Quit)
17:12:02*flaviu joined #nim
17:13:23*leorize quit (Ping timeout: 240 seconds)
17:15:22*leorize joined #nim
17:16:56*SunDwarf quit (Ping timeout: 256 seconds)
17:22:21*SunDwarf joined #nim
17:25:00FromDiscord<Kiloneie> Why doesn't this work ? I've looked at the manual and tried it myself, it works for thetype being object but not tuple ?... https://play.nim-lang.org/#ix=2fMc
17:25:28*sleepyqt joined #nim
17:26:21FromDiscord<Kiloneie> wait, i think i forgot something about tuples...
17:28:47*rockcavera quit (Remote host closed the connection)
17:36:27FromDiscord<Kiloneie> I don't get it: https://play.nim-lang.org/#ix=2fMX
17:42:59*silvernode joined #nim
17:45:11leorizeKiloneie: tuples don't have field visibility
17:45:17leorizeall of the fields are exported by default
17:45:45FromDiscord<Kiloneie> Okay... thanks
17:58:46*Trustable joined #nim
18:01:51*waleee-cl joined #nim
18:14:53*thomasross joined #nim
18:16:35*Cthalupa- quit (Ping timeout: 265 seconds)
18:17:44*Cthalupa joined #nim
18:18:44*my_dude quit (Quit: ZZZzzz…)
18:20:54*my_dude joined #nim
18:20:54*al__ joined #nim
18:20:54*al__ is now known as Guest94576
18:25:10*rockcavera joined #nim
18:26:26*Jesin quit (Quit: Leaving)
18:27:56*Jesin joined #nim
18:35:16FromDiscord<Kiloneie> https://youtu.be/4RIbpChsbFU
18:36:31FromDiscord<Rika> nice 😮
18:37:29FromDiscord<Kiloneie> Thanks, except for me realizing after recording that my video will be 2.5 minutes long thus having content index wrong for half of the video
18:37:41FromDiscord<Kiloneie> couldn't be bothered to re record
18:38:02FromDiscord<Kiloneie> Had to extend it
18:39:51FromDiscord<Rika> sounds rough
18:41:46FromDiscord<Kiloneie> I usually made my videos too long, so i changed my approach to how i write my videos, made a mistake sadly, small yet it is.
18:44:36FromDiscord<Kiloneie> I did yolo most of my video, usually i write for up to 2 hours, this one took like 5-10 minutes. Proved myself it can work 😛
18:47:25*my_dude quit (Quit: ZZZzzz…)
18:52:15*silvernode quit (Ping timeout: 250 seconds)
19:09:49*jjido joined #nim
19:21:50*Guest50116 quit (Ping timeout: 256 seconds)
19:25:07*leorize quit (Quit: WeeChat 2.7.1)
19:25:39*leorize joined #nim
19:29:20*silvernode joined #nim
19:32:28*Guest94576 quit (Quit: Guest94576)
19:34:17*silvernode quit (Ping timeout: 250 seconds)
19:45:49*dadada joined #nim
19:46:12*dadada is now known as Guest64963
19:46:30*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:50:49disruptekAraq: best way to find the module of a pnode?
19:53:34*jjido joined #nim
19:59:03*opal quit (Ping timeout: 240 seconds)
20:09:14*Guest64963 quit (Ping timeout: 240 seconds)
20:10:48*opal joined #nim
20:11:50*opal quit (Excess Flood)
20:12:26*opal joined #nim
20:25:45*my_dude joined #nim
20:26:41*filcuc joined #nim
20:27:22*tungki quit (Remote host closed the connection)
20:32:59FromDiscord<KingDarBoja> https://play.nim-lang.org/#ix=2fOo Anyone knows where the "16" comes from on the second find at this example?
20:33:41*my_dude quit (Quit: ZZZzzz…)
20:35:48leorizein the string representation of PunctuationTokenKind
20:35:52leorizewhat are you trying to do?
20:36:05FromDiscord<Rika> sets dont have an order perse
20:36:32FromDiscord<Rika> 16 is the index of the character of the string representation of the set
20:36:40FromDiscord<Rika> from*
20:36:52FromDiscord<Rika> 16 is the index of the character [from] the string representation of the set
20:38:21FromDiscord<KingDarBoja> Leorize: check if a value is at the set[TokenKind], which is called PunctuatorTokenKind as the find search will return -1 if not found.
20:38:35leorizelol find() only works for arrays :P
20:38:39FromDiscord<KingDarBoja> Then if it is not -1, find the associated Enum value at TokenKind
20:38:50FromDiscord<Rika> find works with something with an order
20:38:57leorizeconvert it to TokenKind, then you can check if it's in PunctuactionTokenKind
20:39:04FromDiscord<Rika> an enum is individual "variables"
20:39:06*FromDiscord <KingDarBoja> insert big stonk face
20:39:36FromDiscord<Rika> and the first one isnt even 0
20:39:37FromDiscord<Rika> its
20:39:40FromDiscord<Rika> 1*, its 1
20:40:07*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:40:11FromDiscord<KingDarBoja> Yeah, forgot to mention that, I realized my mistake after getting the 16
20:40:14FromDiscord<Rika> sets dont have "order"
20:41:12FromDiscord<KingDarBoja> The conversion to TokenKind is done with parseEnum, right Leorize?
20:41:13leorizeif you wanna write a lexer, I'd recommend using `lexbase`
20:41:16leorizeyep
20:42:02leorizelexbase provides a solid base to write any lexer, as it got an excellent buffering system
20:42:16*jjido joined #nim
20:43:54FromDiscord<KingDarBoja> I saw the suggestions, but more like writing the same code logic from source code so every change on the base implementation can be reflected on my code.... I know that sounds like non-sense
20:44:10FromDiscord<KingDarBoja> Not the best explaining stuff to be honest 😢
20:44:20leorizeyou can read the stdlib's json and cfg parser to see how a lexer is written :)
20:44:41leorizehttps://github.com/alaviss/toml/blob/master/toml.nim <- this is my own lexer, it's old though, I've abandoned it
20:45:16leorizeactually I think I wrote a lexer somewhere in rosetta code that's a touch more up-to-date
20:45:25FromDiscord<KingDarBoja> I am interested on the statement "the string representation of the set" wtf is that? o.o
20:45:57leorizethe `$` operator returns the string representation of whatever you put into it
20:46:04leorizetry to echo the const you made
20:46:12FromDiscord<KingDarBoja> Sure, let me try
20:46:45FromDiscord<KingDarBoja> I see this -> {!, $, &, (, ), ..., :, =, @, [, ], {, |, }}
20:47:26FromDiscord<KingDarBoja> Oh! got it!
20:47:33FromDiscord<KingDarBoja> Yeah, now makes sense to me
20:47:36FromDiscord<Recruit_main707> how do i initialise something like this: type Vector3* = ptr object??
20:47:56FromDiscord<Recruit_main707> having as fields x, y, and z?
20:48:15leorizeresult = Vector3(x: 0, y: 0, z: 0) <- use the type contructor
20:49:12FromDiscord<Recruit_main707> `object constructor needs an object type`
20:50:05leorizewell, try `create(Vector3)` then
20:51:03leorizewhy do you want to create an object though?
20:51:10leorizeptr object*
20:51:28leorizeusually people don't use it unless they're interfacing with C
20:51:46FromDiscord<Recruit_main707> to my knowledge, `ref` is very slow,
20:52:19leorizeit's as slow as `ptr` fwiw :)
20:53:12FromDiscord<Recruit_main707> shouldnt it be faster than `object` then?
20:53:20FromDiscord<Recruit_main707> at least interfacing w/ C?
20:53:21leorizeno
20:53:27leorizenothing beats the stack
20:53:37leorizeyou use the heap when you need it, not because you can
20:53:55FromDiscord<Recruit_main707> ok, thanks
20:54:00FromDiscord<KingDarBoja> I feel blessed on this community, so kind 😄
20:55:57dom96ugh, pretty sure nim devel has a leak in HashSet's
20:58:12leorizehow? :P
20:58:56dom96I decided to spend my day optimising my game
20:59:03dom96I reduced the code to a HashSet iteration
20:59:19dom96and saw it increase in time spent over time
20:59:32dom96switched to 1.0.6 and that doesn't happen
20:59:38dom96so yay, nice waste of my time
21:00:29leorizenow it'd be nice if you can fix it :)
21:00:40FromDiscord<Rika> time spent over time?
21:00:58dom96increase in time spent over the run time of my game
21:00:58FromDiscord<Rika> me rn: no thoughts head empty
21:01:20leorizeping narimiran since they worked on hashset
21:01:20FromDiscord<Rika> still dont get it, dont bother explaining because itll take too much time
21:01:44dom96I'm just annoyed now. I'll try to repro but if I can't do it in 20 minutes I will instead rant on the PR that likely introduced this
21:29:37*narimiran quit (Ping timeout: 264 seconds)
21:30:18dom96#13794
21:30:29disbothttps://github.com/nim-lang/Nim/issues/13794 -- 3hashset regression ; snippet at 12https://play.nim-lang.org/#ix=2fOK
21:30:32FromDiscord<Rika> disbot slow?
21:30:35FromDiscord<Rika> oh there it is
21:38:04leorizediscord slow to be precise
21:38:42dom96disbot works via discord?
21:38:54dom96I suppose the name does imply that
21:39:29dom96I wonder why though, IRC is so much more reliable and simple to work with
21:42:05disruptekdisbot runs on irc. the delay was either due to github or ix.
21:47:37*natrys quit (Ping timeout: 264 seconds)
22:00:18*natrys joined #nim
22:02:33*natrys quit (Client Quit)
22:15:13*filcuc quit (Ping timeout: 264 seconds)
22:32:26FromDiscord<Rika> what do i do when vscode nim ext spits out "provider FAILED" and then an "undefined" in the logs other than restart?
22:33:13disruptekswitch to nvim.
22:33:42FromDiscord<Rika> not willing to switch whole text editors for this
22:33:51FromDiscord<Rika> i like my good looking gui on windows
22:40:28blackbeard420when using std json's `to` is there a way to make it ignore certain fields?
22:41:06FromDiscord<KingDarBoja> It is possible to use "except" from unittest to get the error message and check if it is equal to some message?
22:41:28FromDiscord<Rika> why wouldnt it?
22:41:36FromDiscord<Rika> blackbeard420, not that i know of
22:42:18disrupteksearch for noserialize; there are a few discussions/solutions.
22:42:19FromDiscord<Rika> you can always remove it from the json node the `to` macro's gonna process
22:42:33disruptek!issues noserialize
22:42:33disbothttps://github.com/nim-lang/Nim/issues/11415 -- 3Custom pragma ignored on field of variant obj if in multiple branches
22:42:57disruptekeh... do a better job than the bot.
22:44:52*rnrwashere joined #nim
22:47:00FromGitter<awr1> ugh, does choosenim cause windows defender to panic for anyone else?
22:48:20FromGitter<awr1> i keep getting an "Access is Denied" error
22:50:17FromGitter<awr1> nvm it was emacs?
22:50:28FromDiscord<KingDarBoja> Something like this -> https://github.com/nim-lang/Nim/issues/11029 (for my question) but the "as" keyword is giving me this error message "attempting to call routine: 'as'"
22:50:30disbotCan't catch an Exception from an async proc and access the message field. ; snippet at 12https://play.nim-lang.org/#ix=2fPm
22:50:32FromGitter<awr1> i think it was connected to choosenim somehow even though i disabled it
22:50:38FromGitter<awr1> sorry not choosenim
22:50:39FromGitter<awr1> nimsuggest
22:51:36*sleepyqt quit (Ping timeout: 265 seconds)
22:53:56FromDiscord<KingDarBoja> But instead of using "except", use "expect" from the testutils
22:55:25FromGitter<gogolxdong> How to remove an element from sequence?
22:59:17lqdev[m]gogolxdong: `delete` if you want to keep the order, `del` if you want )(1) complexity
22:59:24lqdev[m]s/)/O
22:59:51lqdev[m]if you want a particular element, use `find` in conjunction with one of the above
23:00:13lqdev[m]keep in mind that `find` returns -1 if the element can't be found
23:01:17lqdev[m]so be sure to check for that to not generate an exception
23:07:17FromGitter<gogolxdong> more than excepted, thanks !
23:08:42FromGitter<awr1> also `pop()` if its at the head
23:08:47FromGitter<awr1> i mean tail
23:20:36*lritter quit (Ping timeout: 265 seconds)
23:21:57*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:27:37*rnrwashere quit (Remote host closed the connection)
23:27:54*rnrwashere joined #nim
23:31:38*rnrwashere quit (Remote host closed the connection)
23:33:43*ksandvik joined #nim
23:36:50*rnrwashere joined #nim
23:45:08lethcan you use an enum as an argument in a macro?
23:46:02FromDiscord<Varriount> Yes
23:47:16lethor rather can you use it for a case statement in the macro?
23:48:40*rnrwashere quit (Remote host closed the connection)
23:48:47*my_dude joined #nim
23:51:44*rnrwashere joined #nim
23:55:59*arecaceae quit (Remote host closed the connection)
23:56:21*arecaceae joined #nim
23:58:04FromDiscord<Recruit_main707> why cant i name a proc `__add__`?
23:58:59FromDiscord<Recruit_main707> nvm, it seems like a nimpy problem