<< 01-05-2021 >>

00:00:01*zopsi quit (Quit: Oops)
00:00:15*clyybber quit (Remote host closed the connection)
00:01:24*zopsi joined #nim
00:39:56*NimBot joined #nim
00:52:53*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:53:13*njoseph joined #nim
00:56:06FromDiscord<ElegantBeef> Leorize did you have anything you wanted to share or were just interested? πŸ˜„
01:12:31FromDiscord<hamidb80> hey
01:12:39FromDiscord<Rika> hello
01:12:48FromDiscord<hamidb80> can i do something like that? https://media.discordapp.net/attachments/371759389889003532/837859059713572944/unknown.png
01:12:55leorize[m]cps but currently we decide to not advertise it since it's not very mature yet
01:13:33FromDiscord<hamidb80> cps?
01:13:41FromDiscord<Rika> hes not replying to you
01:14:38FromDiscord<hamidb80> can i add pragma for a block?
01:14:58FromDiscord<hamidb80> In reply to @hamidb80 "can i do something": something like this
01:19:36FromDiscord<ElegantBeef> @hamidb80 this is atleast one way of doing that https://play.nim-lang.org/#ix=3lrY
01:19:51FromDiscord<ElegantBeef> Though i dont know why you'd use a template here
01:20:02FromDiscord<ElegantBeef> It's the exact same amount of work and writing as making the extra scope
01:23:22FromDiscord<ElegantBeef> well i mean one requires `block name:` and the other requires `label name, for i in 0..10`
01:24:06FromDiscord<ElegantBeef> So it's the same amount of typing, and just is more unreadable imo
01:24:17FromDiscord<hamidb80> yeah, thank u
01:25:07FromDiscord<hamidb80> meta programming seems very interesting to me
01:25:23FromDiscord<hamidb80> I'm really excited
01:25:24FromDiscord<ElegantBeef> Yea it's a magical world, and i love it
01:25:46FromDiscord<ElegantBeef> Should explain why the pragma doesnt work, it's cause it applies to the values
01:28:35FromDiscord<ElegantBeef> Generally speaking though i'd suggest only use them when they save you either amount of written code or sanity, or both πŸ˜›
01:30:03FromDiscord<hamidb80> https://play.nim-lang.org/#ix=3lrZ
01:30:12FromDiscord<hamidb80> doesn't work for `while`
01:31:12FromDiscord<hamidb80> not a big deal
01:31:27FromDiscord<hamidb80> i use `block silly` instead πŸ˜„
01:32:28FromDiscord<ElegantBeef> Also should note macros wasnt needed just thought it was going to be
01:33:06FromDiscord<ElegantBeef> It's not great but you can get it to parse by doing `(while true: ...)`
01:35:33FromDiscord<treeform> Is there like a $ for a proc, I am making pretty printer and just want to print the proc signature ... kind of like what traceback does?
01:37:38FromDiscord<treeform> Maybe like fieldPairs but for arguments?
01:41:53FromDiscord<Revenant> sent a long message, see http://ix.io/3ls0
01:42:21FromDiscord<Revenant> (edit) "http://ix.io/3ls0" => "http://ix.io/3ls1"
01:44:01FromDiscord<Revenant> basically, i want to log the stacktrace on ANY type of crash, no matter what.
01:50:35FromDiscord<treeform> In reply to @Revenant "hello, simple question: i": I have never done this, but maybe https://nim-lang.org/docs/segfaults.html can help?
01:50:52FromDiscord<ElegantBeef> @treeform here you go https://play.nim-lang.org/#ix=3ls6
01:51:20FromDiscord<ElegantBeef> suppose it make sense to remove the internal echo πŸ˜„
01:52:57FromDiscord<Revenant> In reply to @treeform "I have never done": great find, i'll give it a go now. i also found this one: https://nim-lang.org/docs/system.html#onUnhandledException
01:54:34FromDiscord<treeform> In reply to @ElegantBeef "<@!107140179025735680> here you go": That's great thanks! I'll use it.
01:54:45*leorize quit (Quit: WeeChat 3.0)
01:56:26FromDiscord<hamidb80> i should spend more time here
01:56:45FromDiscord<ElegantBeef> I wasnt happy with that impl since it didnt show `thing` for the pointer proc so maybe this makes me happier or there is a better alternative in the macro/typeinfo/typetraits code πŸ˜„ https://play.nim-lang.org/#ix=3ls8
02:00:15FromDiscord<treeform> With your new version I get `cannot get child of node kind: nnkNilLit`
02:00:36FromDiscord<ElegantBeef> Hmm
02:00:42FromDiscord<treeform> So I like the prev version
02:00:53FromDiscord<ElegantBeef> "The previous version works, so it's better" πŸ˜„
02:01:14FromDiscord<ElegantBeef> Using it on an object i assume?
02:02:13FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3lsc
02:03:06FromDiscord<nuc> sent a code paste, see https://play.nim-lang.org/#ix=3lsd
02:03:26FromDiscord<ElegantBeef> to escape the `"` character
02:03:36FromDiscord<treeform> In reply to @nuc "hey guys I am": you have space between `echo` and `(`
02:04:00FromDiscord<treeform> that space tells you if you want to `echo(a,b,c)` or `echo((a,b,c))`
02:04:05FromDiscord<nuc> @treeform oh yes that was it!
02:04:17FromDiscord<ElegantBeef> Ah didnt notice the accidental tuple constructor
02:04:21FromDiscord<nuc> That's why the output wasnt escaped I guess
02:04:39FromDiscord<ElegantBeef> command syntax is nice but a bit of a noob trap πŸ˜„
02:05:21FromDiscord<nuc> Seems I found an easteregg prematurely
02:05:31FromDiscord<nuc> xp
02:05:32FromDiscord<treeform> πŸ™‚
02:06:02FromDiscord<ElegantBeef> To be fair it happens quite a bit cause it compiles without warning πŸ˜„
02:06:27FromDiscord<ElegantBeef> not that it should warn πŸ˜„
02:06:44FromDiscord<nuc> maybe there should be a noob flag for the compiler πŸ˜›
02:07:01FromDiscord<Revenant> @treeform sadly, import the `segfaults` module doesn't do the trick :/
02:07:13FromDiscord<Revenant> (edit) "import" => "importing"
02:07:46FromDiscord<treeform> was worth a try, you need to catch segfault on your own some how, its different per OS.
02:08:03FromDiscord<Revenant> well... yeah... that's what i don't want to do πŸ™‚
02:08:49FromDiscord<ElegantBeef> Do we have a "noob traps for nim" article?
02:11:36FromDiscord<Avatarfighter> Probably not :p
02:18:32*NimBot joined #nim
02:37:25FromDiscord<exelotl> speaking of noob-friendliness, I noticed nim devel explicitly warns me that my program may be slow when I compile without -d:release or -d:danger
02:38:59FromDiscord<ElegantBeef> Yep, fixes the whole "Nim is slower than python"
03:26:28*rockcavera quit (Read error: Connection reset by peer)
03:26:54*rockcavera joined #nim
03:35:47FromGitter<offbeat-stuff> Hi, new to posix functions, trying to write my own execCmd using posix functions,
03:35:54FromGitter<offbeat-stuff> This is what i came with
03:35:55FromGitter<offbeat-stuff> https://play.nim-lang.org/#ix=3lsq
03:36:21FromGitter<offbeat-stuff> goes into error at this line notneg dup2(c2p[w],stdout.getFileHandle())
03:43:10*Dreamer3 joined #nim
03:43:28Dreamer3could someone help me understand what this line does https://github.com/nim-lang/Nim/blob/devel/lib/pure/asynchttpserver.nim#L284
03:44:30Dreamer3how does the socket know exactly how much data will be received in a given timeframe if the connection is still open?
03:44:58FromDiscord<ElegantBeef> I assume it'll read async until the length has been hit at which point it'll return the body
03:45:38Dreamer3but it might also return more or less data?
03:46:04FromDiscord<ElegantBeef> Without timeout it'll read until it hits it
03:46:19Dreamer3ok, so never less then, unless perhaps the connection dies
03:46:32FromDiscord<ElegantBeef> https://nim-lang.org/docs/asyncdispatch.html#recv%2CAsyncFD%2Cint
03:46:38Dreamer3but how does it guard against more? couldn't it return and then the moment it returns more data is sent?
03:46:57*Dreamer3 reading
03:47:25Dreamer3"a part of the data has been read, or the socket has disconnected" that's the part i don't get
03:48:04Dreamer3is the socket is open why would it ever return partial data?
03:48:19FromDiscord<ElegantBeef> Cause you tell it to return partial data
03:48:58FromDiscord<ElegantBeef> It's akin to using the `file.read(buffer, size)` procedure it'll move the cursor over X bytes and hold it there until called again
03:49:01FromDiscord<ElegantBeef> Atleast as i understand it
03:49:24*spiderstew_ joined #nim
03:50:05FromDiscord<joshgoebel> the only flag i see is SafeDisconn... how do you tell it to return partial data? I mean I read "up to" right there, but I don't get WHAT determines whether the full cotnent or partial is returns if you arent' giving it a delay.
03:50:08*spiderstew quit (Ping timeout: 246 seconds)
03:50:26FromDiscord<ElegantBeef> the returned data isnt the requested size
03:50:27leorize[m]@offbeat-stuff the best way to debug is to print errno and strerror(errno) after a syscall failure
03:50:42*Dreamer3 quit (Quit: Leaving...)
03:51:38FromDiscord<joshgoebel> _goes to read that source_
03:58:01FromDiscord<joshgoebel> wish i knew what OSErrorCode(-1) was
03:59:00FromDiscord<ElegantBeef> Converting the `-1` to the OSErrorCode
03:59:08FromDiscord<ElegantBeef> IE "fail" afaik
03:59:24FromGitter<offbeat-stuff> I get 14
03:59:48FromGitter<offbeat-stuff> invalid file descriptor
04:00:40FromDiscord<joshgoebel> are you talking to me?
04:02:30FromGitter<offbeat-stuff> actually anyone wanting to help
04:02:37FromDiscord<lan> In reply to @hamidb80 "meta programming seems very": This reminds me, isn't C metaprogramming as well? given that, well, it compiled to assembly?
04:02:52FromGitter<offbeat-stuff> But following leorize suggestion
04:04:22FromDiscord<ElegantBeef> That's not what is meant by meta programming πŸ˜„
04:05:39leorize[m]@offbeat-stuff are you sure that your stdout fd is correct?
04:09:33FromGitter<offbeat-stuff> for the most part I'm trying to understand the code so I only have a vague sense of the code. SO YEAH NOT REALLY
04:13:24FromGitter<offbeat-stuff> echo c2p[w], " -> ",stdout.getFileHandle()
04:13:31FromGitter<offbeat-stuff> outputs 6 -> 1
04:22:08FromGitter<offbeat-stuff> Now code is https://play.nim-lang.org/#ix=3lsz
04:22:14FromGitter<offbeat-stuff> Changed a few things
04:23:04FromGitter<offbeat-stuff> Okay now it errors around execlp
04:24:00FromGitter<offbeat-stuff> actually at dup2 for stdout returns 1
04:25:30FromGitter<offbeat-stuff> actually thats okay thats stdout there
04:26:08*leorize joined #nim
04:26:24leorizeyour buffering code is incorrect
04:26:51FromGitter<offbeat-stuff> wdym
04:26:56leorizeread() requires an allocated buffer, it does not allocate a buffer for you
04:27:11FromGitter<offbeat-stuff> yeah the buffer is where errno shows up 14
04:27:29FromGitter<offbeat-stuff> I mean the read function
04:27:46leorizecstring default is `nil`, which is not allocated
04:27:51leorize[m]which means it starts in the state of... not allocated
04:27:51leorize[m]or `nil`
04:28:06leorizeoh now my matrix catches up
04:28:10FromDiscord<ElegantBeef> Swaps to matrix from irc inbetween two messages πŸ˜„
04:28:25FromGitter<offbeat-stuff> and to alloc it just use alloc
04:28:28FromDiscord<ElegantBeef> looked like you were pretty good a typing for a second πŸ˜„
04:28:42leorize[m]we have a neater trick in Nim for this
04:29:26FromGitter<offbeat-stuff> new code https://play.nim-lang.org/#ix=3lsA
04:30:01FromGitter<offbeat-stuff> okay now it just doesn't move
04:30:02FromGitter<offbeat-stuff> its stuck
04:30:11FromGitter<offbeat-stuff> in the while loop
04:33:03FromGitter<offbeat-stuff> finally https://play.nim-lang.org/#ix=3lsC
04:33:06FromGitter<offbeat-stuff> code that works
04:33:15*thomasross quit (Ping timeout: 268 seconds)
04:33:38leorize[m]https://play.nim-lang.org/#ix=3lsD
04:33:47leorize[m]^ a better, GC-ed buffering system
04:33:55leorize[m]it's still slow, you can make it faster
04:34:01leorize[m]but I'll let you try that yourself
04:34:47FromGitter<offbeat-stuff> thanks
04:35:06FromGitter<offbeat-stuff> also setStdioUnbuffered does that make any difference
04:35:11FromDiscord<ElegantBeef> Makes me happy to see that what i imagined the solution would be was the solution πŸ˜„
04:35:37leorize[m]https://play.nim-lang.org/#ix=3lsE <- fixed a bit
04:36:01leorize[m]and you don't need setStdioUnbuffered
04:46:42FromGitter<offbeat-stuff> I dont see your changes
04:46:50FromGitter<offbeat-stuff> What changes did you make
04:47:16leorizeI changed the buffer handling a bit
04:51:51FromGitter<offbeat-stuff> okay
04:51:56FromGitter<offbeat-stuff> thanks
05:13:09*rockcavera quit (*.net *.split)
05:13:10*aeverr quit (*.net *.split)
05:13:10*dv^_^ quit (*.net *.split)
05:13:10*astronavt quit (*.net *.split)
05:13:11*sknebel quit (*.net *.split)
05:13:11*ddevault quit (*.net *.split)
05:13:24*federico3 quit (*.net *.split)
05:23:55*aeverr_ joined #nim
05:23:55*rockcavera joined #nim
05:23:55*dv^_^ joined #nim
05:23:55*astronavt joined #nim
05:23:55*sknebel joined #nim
05:23:55*ddevault joined #nim
05:23:55*federico3 joined #nim
05:40:23*rockcavera quit (Remote host closed the connection)
06:32:25ForumUpdaterBotNew thread by Neodim: CRC16 checksum calculation, see https://forum.nim-lang.org/t/7896
07:06:02FromDiscord<Varriount> Hm. Is krux02 still around?
07:06:25FromDiscord<ElegantBeef> Occasionally
07:06:29FromDiscord<ElegantBeef> If you ask nicely
07:41:44FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3lt3
07:43:19FromDiscord<ElegantBeef> `while not file.endOfFile: doSomething(f.readByte)`
07:46:06FromDiscord<jtiai> Wonder why readByte is not in the docs...
07:46:45FromDiscord<ElegantBeef> Is it an actual procedure
07:46:46FromDiscord<ElegantBeef> (edit) "procedure" => "procedure?"
07:48:34*crem quit (Quit: WeeChat 2.9)
07:49:09FromDiscord<jtiai> I don't know. That's what I'm asking since can't find anything related to reading single byte from file.
07:49:23FromDiscord<jtiai> there is `readBytes` but I can't use that.
07:49:37FromDiscord<ElegantBeef> `file.readChar.byte`
07:49:59FromDiscord<Recruit_main707> can't you do read(1)?
07:51:47FromDiscord<ElegantBeef> You could also use the streams api and open a filestream then use `readUint8`
07:52:12*crem joined #nim
07:55:51FromDiscord<jtiai> Streams API works nicely.
07:56:29FromDiscord<jtiai> Now my emulator can read rom files...
09:30:46*ligist[m] quit (*.net *.split)
09:30:46*m33[m] quit (*.net *.split)
09:30:46*JStoker quit (*.net *.split)
09:31:35*vicfred quit (Quit: Leaving)
09:37:05*m33[m] joined #nim
09:37:05*ligist[m] joined #nim
09:37:05*JStoker joined #nim
09:37:51*JStoker quit (Ping timeout: 245 seconds)
09:38:21*JStoker joined #nim
10:27:06*lritter joined #nim
10:48:19*Vladar joined #nim
11:43:16*natrys joined #nim
11:47:29ForumUpdaterBotNew thread by Masiarek2: Sorting enum - by identifier and int?, see https://forum.nim-lang.org/t/7897
12:07:36ForumUpdaterBotNew thread by Akito: Suddenly getting infinite genericDeepCopy recursion, see https://forum.nim-lang.org/t/7898
12:45:38FromDiscord<GreenFork> I have a global `var config` object which also has strings in it. I define it during runtime and then I want to use it in threads. can I do so without copying this config to every thread with `--gc:arc`? Currently it complains `Error: 'startThreadedRequests' is not GC-safe as it accesses'config' which is a global using GC'ed memory`
13:41:51ForumUpdaterBotNew thread by NameUndefined: Use proxy and ports httpclient, see https://forum.nim-lang.org/t/7899
13:47:09*leorize quit (Ping timeout: 240 seconds)
14:01:02*tane joined #nim
14:02:15*icebattle quit (Ping timeout: 246 seconds)
14:04:48*leorize joined #nim
14:17:52FromDiscord<whisperdev> How does one avoid nested loops in Nim?
14:24:11FromDiscord<GreenFork> In reply to @whisperdev "How does one avoid": there's no syntactic sugar for that in standard library. but generally nested loops are fine
14:26:22FromDiscord<haxscramper> I don't think there is any way to avoid nested loops for the sake of avoiding them, but depending on your actual use case you might convert them to `template` or some form of `map`
14:26:54FromDiscord<haxscramper> `std/sugar.collect`, `std/sequtils.mapIt` etc.
14:31:58ForumUpdaterBotNew thread by Rb3: Overridable operator precedence?, see https://forum.nim-lang.org/t/7900
14:37:36*skelett quit (Quit: WeeChat 3.1)
14:37:57*skelett joined #nim
14:44:01ForumUpdaterBotNew thread by Rb3: Overridable operator precedence, see https://forum.nim-lang.org/t/7901
14:44:32*sagax joined #nim
14:53:41*natrys quit (Ping timeout: 240 seconds)
14:54:04FromDiscord<exelotl> @whisperdev you can make a custom iterator: https://play.nim-lang.org/#ix=3lv6
14:54:08*natrys joined #nim
14:59:06*icebattle joined #nim
15:01:27*omnigoat joined #nim
15:03:23*mjsir911 quit (Remote host closed the connection)
15:03:42*mjsir911 joined #nim
15:24:17giacojust found "nim secret" and the reason behind it. But now the question is of inim shares the same weak points
15:24:27giacos/of/if
15:40:19ForumUpdaterBotNew thread by Dabod: Invalid object assignment exception instead of compile time error?, see https://forum.nim-lang.org/t/7902
15:40:27*thomasross joined #nim
16:00:09*ShalokShalom[m] quit (Quit: Idle for 30+ days)
16:00:10*anoj[m] quit (Quit: Idle for 30+ days)
16:02:03FromDiscord<exelotl> giaco: you might want to check out the 5 minute inim talk from NimConf 2020
16:02:06FromDiscord<exelotl> https://www.youtube.com/watch?v=Qa_9vut4TzQ&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=4
16:18:33giacoexelotl, thanks!
16:25:17FromDiscord<zetashift> iNim is great, using it now too
18:49:49FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=3lwj
18:50:13FromDiscord<mattrb> (edit) "https://play.nim-lang.org/#ix=3lwj" => "https://play.nim-lang.org/#ix=3lwk"
18:51:53FromDiscord<haxscramper> Cyclic imports are not supported, put mutually recursive functions in one module, or put common types in separate module
19:02:51saemthis is probably very obvious, but is there a better way than using `join` to convert from a `seq[char]` to `string`?
19:04:36FromDiscord<mattrb> I know ElegantBeef showed me a way before that allowed the cyclic imports to work by placing the imports in specific places, but I didn't actually understand how that worked
19:05:01FromDiscord<mattrb> For example, I have 2 nim files that depend on each other without issue atm
19:05:43FromDiscord<mattrb> https://github.com/mattrberry/gba/blob/master/src/gba/cpu.nim#L160↡https://github.com/mattrberry/gba/blob/master/src/gba/arm.nim#L3
19:14:30FromDiscord<mattrb> Also in my example above, there's no mutual recursion or anything, it's just a dag. cpu.nim has some state defined in that module so interrupts.nim needs to call into that module. I can send you a reduced version of what I'm looking at if that'd help
19:15:43FromDiscord<Tavon> sent a code paste, see https://paste.rs/GFP
19:20:27FromDiscord<haxscramper> `fd` is private https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/net.nim#L148
19:20:53FromDiscord<Tavon> Yeah but isn't {.all.} supposed to make everything public?
19:20:53FromDiscord<haxscramper> Or `{.all.}` supposed to somehow mitigate this?
19:21:07FromDiscord<Tavon> From what I can gather, it should make it public
19:21:25FromDiscord<Tavon> https://github.com/nim-lang/Nim/pull/17706
19:22:21FromDiscord<Tavon> Oh, I just read the PR more thoroughly, I need to use `privateAccess`
19:25:04FromDiscord<Tavon> sent a code paste, see https://paste.rs/Xuy
19:28:45*rockcavera joined #nim
19:48:06*lritter quit (Ping timeout: 240 seconds)
19:53:10FromDiscord<ElegantBeef> I dont recall if seq/string growth rates are the same, but you could always cast the seq to a string saem
19:53:46saemYeah, I doubt they are unless sticking with ascii (which I happen to be).
19:54:15FromDiscord<ElegantBeef> Uh, i mean the capacity growth rate
19:56:13*vicfred joined #nim
19:57:06*thomasross quit (Ping timeout: 240 seconds)
19:59:29*blackpawn quit (Ping timeout: 268 seconds)
20:04:38FromDiscord<ElegantBeef> Oh and @treeform my compiler work didnt pass the smell test so there is now an RFC for the whole case statement stuffs https://github.com/nim-lang/RFCs/issues/373
20:04:49FromDiscord<ElegantBeef> So go updoot that πŸ˜„
20:16:21FromDiscord<madman> when i look at the nimcache i can see the `Command for C compiler: g++ -c -std=gnu++14 -funsigned-char ...`↡is there a way to remove the `-c` flag because i want it to link as well
20:17:48FromDiscord<treeform> In reply to @ElegantBeef "Oh and <@!107140179025735680> my": doing
20:18:53FromDiscord<madman> `passL{..}` for dat linker!
20:23:11FromDiscord<ElegantBeef> or just you know `--passL:` with the Nim compiler
20:24:54*abm joined #nim
20:26:01FromDiscord<madman> its a long string
20:26:31FromDiscord<ElegantBeef> so make a nim config or nims file
20:27:42FromDiscord<madman> im trying to translate this makefile to the nim compiler https://media.discordapp.net/attachments/371759389889003532/838149705682780210/makefile
20:30:02FromDiscord<ElegantBeef> Good luck, i know nothing of make files
20:30:18FromDiscord<Nisha's alt> ~~Has someone implemented Nim with braces yet?-~~
20:30:44FromDiscord<ElegantBeef> There was someone that made a transpiler that used braces iirc, but i dont see why you're asking πŸ˜„
20:30:55FromDiscord<Nisha's alt> Because braces are the best- Lol
20:31:03FromDiscord<Nisha's alt> ~~Also can i see the transpiler?-~~
20:32:09*thomasross joined #nim
20:33:59FromDiscord<ElegantBeef> If you can find it sure
20:37:37FromDiscord<mattrb> Hey beef, any chance you have a magic solution to my question here? 😬 https://discord.com/channels/371759389889003530/371759389889003532/838125046467133460
20:37:56FromDiscord<ElegantBeef> You can always use the macrocache if you want to get around cyclical imports
20:38:01FromDiscord<ElegantBeef> though dont know if it'd work here
20:39:09FromDiscord<ElegantBeef> It's on github right? I can take a look at it after i take my dogs for a walk in 30-40mins if you're still here πŸ˜„
20:42:28FromDiscord<mattrb> I don't have the failing code on github, but I can put a branch up!
20:43:11FromDiscord<mattrb> Here's a reduced set of the file structure, maybe reduced beyond the point of being useful :p I'll send a link to the branch on github in just a sec https://media.discordapp.net/attachments/371759389889003532/838153602408251392/gbaImportError.zip
20:44:27*d10n-work quit (Ping timeout: 260 seconds)
20:44:39*Djnwee joined #nim
20:44:46*npgm quit (Ping timeout: 246 seconds)
20:45:19*Djnwee quit (Client Quit)
20:45:44*npgm joined #nim
20:47:28*d10n-work joined #nim
20:48:29FromDiscord<mattrb> Here's the branch that I'd _like_ to compile, but seems to be failing due to the cyclic import. Building with `nimble build` yields a different error, but I believe it's tied into the cyclic import error https://github.com/mattrberry/gba/tree/compilation_error_interrupts
20:48:36*d10n-work quit (Max SendQ exceeded)
20:48:38FromDiscord<mattrb> Thanks so much for taking a look πŸ™‚
20:49:33FromDiscord<mattrb> I have to run for a bit but maybe we'll overlap later when you get back πŸ™‚
20:50:03*kwilczynski quit (Ping timeout: 260 seconds)
20:50:03*euantorano quit (Ping timeout: 260 seconds)
20:50:37*d10n-work joined #nim
20:52:27*kwilczynski joined #nim
20:52:57*kwilczynski quit (Max SendQ exceeded)
20:53:29*d10n-work quit (Max SendQ exceeded)
20:54:09*hoek quit (Ping timeout: 245 seconds)
20:54:34*omnigoat quit (Ping timeout: 245 seconds)
20:55:00*raboof quit (Ping timeout: 265 seconds)
20:55:11*fowl quit (Ping timeout: 260 seconds)
20:55:17*euantorano joined #nim
20:55:27*d10n-work joined #nim
20:55:44*raboof joined #nim
20:55:45*omnigoat joined #nim
20:55:50*kwilczynski joined #nim
20:55:59*hoek joined #nim
20:56:01*robertmeta quit (Ping timeout: 250 seconds)
20:56:23*fowl joined #nim
20:57:25*robertmeta joined #nim
21:01:02FromDiscord<creonico> How can you set all values of an object to 0 like you can in C `struct some_struct = {0};`?
21:05:47leorizeyou don't have to
21:05:54leorizeeverything is default 0-initialized
21:37:09*leorize quit (Ping timeout: 240 seconds)
21:43:28ForumUpdaterBotNew thread by Filcuc: NimQml v0.9.0, see https://forum.nim-lang.org/t/7903
21:44:40*leorize joined #nim
21:45:36FromDiscord<exelotl> @mattrb you can often work around cyclic imports by moving the offending import down to the place where it's first used.
21:46:09FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3ly4
21:46:35FromDiscord<ElegantBeef> Yep that's what i was going to suggest, though you could also use a pointer proc for the CPU's interrupt
21:48:54giacois it possible to query the parent type at compile time?' I'm using a type from a lib generated by macro and I'd like to know if it does inherit from a parent
21:50:05FromDiscord<ElegantBeef> giaco this forum post of mine sorta works for that, can expand it to return a bool instead of the parent https://forum.nim-lang.org/t/7853#49914
21:50:53giacogreat! thanks as always :)
21:52:33FromDiscord<ElegantBeef> Saem if you're about i've got a question about the shrinkables, in the case the user passes `(int, (string, int))` that should be two shrinkables right?
21:53:47FromDiscord<ElegantBeef> Since the first tuple is just our wrapper for allowing multiple types to be passed in with a body
21:53:50giacoit worked! It says it is not a child object
21:54:32FromDiscord<ElegantBeef> Do you want it to error on compilation or do you want it to return a bool?
21:55:15FromDiscord<ElegantBeef> If the latter you can replace that assert line with `newLit(assertCondition)`
21:55:53giaconeither, I just needed to know if the generated type was child of something else than root, but it is now, so I have a direction now. It was a one time job
21:56:04giaco*s/now/not
21:59:05*natrys quit (Quit: natrys)
22:05:22saemBut distracted
22:05:26saemFine a bit
22:09:45reversem3What does a slot pragma do?
22:20:09saemNeed a bit rather. The shrinkable is context dependent. In the abstract that's one, but the outer one is shrunk by shrinking the two inner ones. Practically speaking, yes you would implement it as two.
22:31:04*tane quit (Quit: Leaving)
23:14:59FromDiscord<ElegantBeef> reversem3 i've never seen slot, where did you see it?
23:26:43saemback
23:29:37FromDiscord<ElegantBeef> So i'm closer to reasoning around that flaw of my previous pass, but seems rather difficult to solve properly πŸ˜„ goes from the passed in tuple to an arbitrary that has a generator that calls it's children but doesnt work properly still πŸ˜„
23:29:45FromDiscord<ElegantBeef> Damn i need to stop using emojis
23:30:07FromDiscord<ElegantBeef> Too bad i was corrupted by poe's law existing
23:30:25FromDiscord<mattrb> In reply to @exelotl "<@!221832495367323648> you can often": I’ll be home in about 30 mins to take a look and I’ll let you know! Thank you!
23:31:38FromDiscord<exelotl> In reply to @ElegantBeef "Damn i need to": gotta use more emojis 😎
23:32:21*Vladar quit (Remote host closed the connection)
23:36:07saemI think a template that generated a generic `assertProperty` of some airty and does the tuple unpacking for you so you can write a matching airty predicate function would be pretty close to ideal.
23:37:30FromDiscord<mattrb> In reply to @ElegantBeef "Damn i need to": Yeah you’re one to talk about cutting off my thumbs
23:37:59FromDiscord<ElegantBeef> Hey i've only adapted since i'm rather insincere but it's the interenet
23:38:02FromDiscord<ElegantBeef> (edit) "interenet" => "internet"
23:45:44ForumUpdaterBotNew thread by Masiarek2: Learn Nim regular expressions - regex, re , NRE , see https://forum.nim-lang.org/t/7904