<< 16-03-2024 >>

00:18:52arkanoidmh, how broken are distinct range types? my program goes sigsegv if I turn "type Percent = range[0.0 .. 100.0]" into "type Percent = distinct range[0.0 .. 100.0]"
01:43:16*krux02_ quit (Quit: Leaving)
02:54:39FromDiscord<leorize> your program shouldn't crash at least
03:10:54*lucasta quit (Remote host closed the connection)
05:35:30FromDiscord<sOkam! 🫐> is there any way to wrap an object from C, without importing any of its fields at all, but still make it be the same object in the generated C code?
05:36:06FromDiscord<Elegantbeef> Might be able to make it an incomplete struct
05:37:10FromDiscord<sOkam! 🫐> how is the syntax for them?
05:37:17FromDiscord<Elegantbeef> It's a pragma
05:38:37FromDiscord<sOkam! 🫐> im still confused. i figure its a pragma, but don't know how its syntax works
05:38:52FromDiscord<sOkam! 🫐> can you give a mock example?
05:39:45FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-incompletestruct-pragma
05:41:08FromDiscord<sOkam! 🫐> what's the benefit of the incomplete struct?↵it says to "not use the underlying C struct".... but do I not want the exact opposite?
05:41:39FromDiscord<Elegantbeef> It means the Nim generated struct I believe
05:44:12FromDiscord<Elegantbeef> actually in hindsight you can just importc and header with an object
05:45:45FromDiscord<sOkam! 🫐> i see, ty
05:46:03FromDiscord<sOkam! 🫐> what's the usecase for `pure` when importing C objects? 🤔
05:49:33FromDiscord<Elegantbeef> There is no point there
05:49:39FromDiscord<Elegantbeef> Unless you're using inheritance
06:00:53FromDiscord<sOkam! 🫐> kk ty
06:29:37FromDiscord<nnsee> In reply to @user2m "this is cool didn't": on windows, you can use winim and the FindFirstChangeNotification win32 API call, see https://gist.github.com/mashingan/4a31d3a630e22cf9274eebf475ee60e6 for an example
06:30:15FromDiscord<nnsee> I don't recommend using the lib you linked since it seems to be using polling, which is very inefficient
07:06:13*ntat joined #nim
07:40:26*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
07:45:01*SchweinDeBurg joined #nim
08:12:08*advesperacit joined #nim
09:04:33NimEventerNew thread by Araq: Challenge: Weak linking on Windows, see https://forum.nim-lang.org/t/11228
09:17:42*ntat quit (Quit: Leaving)
09:44:31FromDiscord<jhgalino> is it alright to call `assert` in the middle of a program? will it have any performance impact on the program itself?
10:09:01om3gait should affect as any additional code
11:26:13advesperacit@jhgalino note that `assert` is skipped in release builds
11:49:49FromDiscord<demotomohiro> assert is skipped when you set `-d:danger` or `--assertions:off`.↵assert is checked in `-d:release`.
11:50:31FromDiscord<demotomohiro> https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L72
11:57:59advesperacitah, right.. how long ago was this changed? it was skipped on -d:release earlier
12:14:10*ntat joined #nim
13:45:37FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=ASOeUPJUrwqa
13:47:19FromDiscord<odexine> In reply to @advesperacit "ah, right.. how long": i believe at least since 1.0 it has been enabled on release.
13:49:07FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#pasty=giuhnlrqTmge
13:50:38FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=SXzEqvHJazwA
13:50:52FromDiscord<odexine> okay, then the one i made is fine
13:51:09FromDiscord<myxi> thanks
14:07:30FromDiscord<myxi> let's say i have a --debug flag for my program, how do i let my all my modules know the state of this flag
14:07:54FromDiscord<myxi> is there like some way to define maybe process level environment vars or smth like that
14:09:07FromDiscord<myxi> hmm, i guess i'm just looking for https://nim-lang.org/docs/envvars.html
14:23:16FromDiscord<wick3dr0se> Is there a solid wrapper for libsecp256k1? The two I found have same stars and both could have died for all I know. My scrap repos get more stars so its hard to tell lol
14:28:11*ntat quit (Quit: Leaving)
14:30:39*tc424 quit (Ping timeout: 268 seconds)
14:31:12*ntat joined #nim
14:37:04*tc424 joined #nim
15:12:44FromDiscord<myxi> do we use `let`for constants in nim?
15:14:47FromDiscord<zumi.dxy> that's run-time "constants"
15:15:00FromDiscord<zumi.dxy> you should use `const` if you can because those are compile-time
15:15:42FromDiscord<myxi> ah
15:16:53FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=ECoioCCkpudV
15:18:45FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=oizqRjjwHeSj
15:18:48FromDiscord<myxi> (edit) "https://play.nim-lang.org/#pasty=gwGCIuTdHxRD" => "https://play.nim-lang.org/#pasty=ionMtQrWWEOk"
15:20:00FromDiscord<zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=bLafvwDBCqDa
15:20:10FromDiscord<zumi.dxy> (in case you want to define multiple `const`s)
15:20:29FromDiscord<zumi.dxy> also for slightly fitting stuff within some column limit
15:20:42FromDiscord<myxi> ahh, that's a good idea, thanks!
15:25:19FromDiscord<myxi> also, do you happen to know a good lib for terminal colored output and stuff? preferably one with emoji support
15:25:33FromDiscord<myxi> (edit) "support" => "support, but one without it would work just as fine"
15:28:11FromDiscord<myxi> https://nim-lang.org/docs/terminal.html↵oh damn,
15:28:29FromDiscord<myxi> (edit) "https://nim-lang.org/docs/terminal.html↵oh damn, ... " added "i thought i'd need an external lib, but the std lib got me covered even here"
15:48:25FromDiscord<Robyn [She/Her]> @myxi https://github.com/PMunch/termstyle termstyle is pretty nice imo
15:48:42*une joined #nim
15:48:47FromDiscord<Robyn [She/Her]> Since it lets you do stuff like `red("string")`
15:48:59FromDiscord<saint.___.> That's nice
16:00:00*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
16:01:05FromDiscord<sOkam! 🫐> is it possible to wrap a C enum to a Nim enum, without declaring its contained entries?
16:02:16FromDiscord<sOkam! 🫐> I'm doing `type Thing {.importc, header: "header.h"}= enum`... but it wants fields beside the enum keyword apparently 😦
16:05:29*SchweinDeBurg joined #nim
16:27:52FromDiscord<enthus1ast.> i think i broke the forum (while crawling)
16:28:46FromDiscord<enthus1ast.> maybe someone with access could fix it (so that i can crawl more :D)
16:29:28FromDiscord<enthus1ast.> ah no thats interesting:↵↵https://forum.nim-lang.org/posts.json?id=7909
16:29:35FromDiscord<enthus1ast.> this shows a cloudflare error
16:29:50FromDiscord<enthus1ast.> but the startpage is working
16:48:06FromDiscord<tapeda> Amazing since resetting my windows yesterday and commenting out 1 os.sleep function, I've managed to trigger 4 different windows defender threats from the same program
16:48:48FromDiscord<tapeda> even after allowing them them all through individually the program runs slower than before resetting windows lmfao
16:48:58FromDiscord<tapeda> (edit) "resetting" => "reinstalling"
16:54:29FromDiscord<enthus1ast.> i completely switched to linux, also for work.
16:54:43FromDiscord<enthus1ast.> work was missing all those years
16:55:49FromDiscord<enthus1ast.> and to get a working desktop linux mint + cinnamon is quite unshitty
17:03:33FromDiscord<Robyn [She/Her]> I'm currently considering switching to FreeBSD for my next install :P
17:03:41FromDiscord<Robyn [She/Her]> Don't really have any pros or cons for it specifically though
17:08:25FromDiscord<enthus1ast.> idk FreeBSD has no real alternative to systemd, all the solutions they offer feel hacky.
17:08:52FromDiscord<enthus1ast.> and the bsd tooling lacks behind the gnu/linux tooling imho
17:13:47FromDiscord<enthus1ast.> i think the next (private) installation for me will be nixos. ↵I can also imagine nixos for my work, since i need to support quite old software (science software...) and sometimes its terrible to get stuff running when they just run with one particular version of python or tcl/tk or this and that.
17:14:15FromDiscord<enthus1ast.> or when they only compile with this particular gcc/gfortran
17:14:43FromDiscord<enthus1ast.> with nixos this would be a non issue ithink
17:15:13FromDiscord<enthus1ast.> currently i ship docker for such cases, but only for tools without gui
17:32:14FromDiscord<ambient3332> I don't really understand why this works in the web sandbox, but locally just dies without giving anything outside "it failed" https://play.nim-lang.org/#pasty=riqhAagxNTRC
17:32:28FromDiscord<ambient3332> Illegal memory writes?
17:34:13FromDiscord<Robyn [She/Her]> In reply to @enthus1ast. "and the bsd tooling": Fair enough
17:36:05FromDiscord<Robyn [She/Her]> In reply to @ambient3332 "I don't really understand": This runs just fine on my Aarch64 phone via Termux
17:36:28FromDiscord<ambient3332> Maybe something is messing my Nim cache? I'm really confused why it just dies
17:38:19FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=JazgByXwQBmF
17:39:58FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#pasty=WYoAaWihPCiS
17:40:40FromDiscord<ambient3332> Both GCC and MSVC
17:42:34FromDiscord<myxi> In reply to @chronos.vitaqua "<@598134630104825856> https://github.com/PMunch/ter": looks good
17:45:53FromDiscord<Robyn [She/Her]> In reply to @ambient3332 "Here's the full error:": Could it be an error specific to Windows, then?
17:46:07FromDiscord<Robyn [She/Her]> I don't know anyone else here who develops on Windows to test it, unfortunately (since I have my development environment set up in WSL)
17:46:19FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=Qdujsofaruww
17:46:40FromDiscord<ambient3332> In reply to @chronos.vitaqua "Could it be an": Possibly. Would be nice to get more debug info on what is going on tho
17:46:43FromDiscord<jaar23> any tutorial or doc on guiding me how to use nimterop to wrap a c library? newbie in this area
17:48:16FromDiscord<enthus1ast.> @myxi prolly just followed the redirect
17:48:42FromDiscord<Robyn [She/Her]> In reply to @ambient3332 "Possibly. Would be nice": You can use a C debugger if you compile with `--debugger:native`
17:49:04FromDiscord<enthus1ast.> @myxi maybe try to set `maxRedirects = 0`
17:49:28FromDiscord<myxi> In reply to @enthus1ast. "<@598134630104825856> prolly just followed": you're right, i turned off redirects, now it works
17:50:38FromDiscord<ambient3332> In reply to @chronos.vitaqua "You can use a": Ok I got Segmentation fault "cygwin.S: No such file or directory" using gdb. at least that's something 🙂
17:51:14FromDiscord<ambient3332> Nim gcc compiler is not setup quite right?
17:51:23FromDiscord<ambient3332> I'm using choosenim if that has something to do with it
17:52:53FromDiscord<ambient3332> Although then MSVC should work...
17:56:11FromDiscord<Robyn [She/Her]> In reply to @ambient3332 "I'm using choosenim if": It shouldn't
17:56:44FromDiscord<Robyn [She/Her]> If you have clang installed, could try that?
17:56:53FromDiscord<Robyn [She/Her]> Though I'm not sure if the playground uses gcc
17:57:43FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=FnRObTwSHYrZ
17:58:09FromDiscord<myxi> (edit) "https://play.nim-lang.org/#pasty=YFrfQFSXeLTy" => "https://play.nim-lang.org/#pasty=jWnvmUtFUoOq"
17:59:16FromDiscord<ambient3332> In reply to @chronos.vitaqua "It shouldn't": Seems like Nim just hates my ring buffer implementation and there's something goin under the surface that I'm not aware of
17:59:58FromDiscord<ambient3332> Implementing ringbuf that doesn't rely on uin16 wraparound seems to work fine
18:02:00FromDiscord<enthus1ast.> In reply to @myxi "is there some way": Have a look at the `Location` header
18:03:02FromDiscord<enthus1ast.> ^ https://developer.mozilla.org/en-US/docs/web/http/headers/location
18:04:14FromDiscord<myxi> sent a code paste, see https://play.nim-lang.org/#pasty=HevgtFEjweyt
18:04:56FromDiscord<myxi> oh, i think i did a oopsie
18:05:41FromDiscord<myxi> yep, now it's there. Thanks!
18:43:26FromDiscord<myxi> https://nim-lang.org/docs/xmltree.html#findAll%2CXmlNode%2Cstring%2Cseq%5BXmlNode%5D↵is this recursive?
18:48:11*def- quit (Quit: -)
18:48:11FromDiscord<enthus1ast.> looks like it: https://github.com/nim-lang/Nim/blob/e374759f29da733f3c404718c333f5f3cb5f332d/lib/pure/xmltree.nim#L888
18:48:41FromDiscord<myxi> great
18:48:50FromDiscord<enthus1ast.> there is a source link in the docs
18:49:16*def- joined #nim
18:50:02FromDiscord<myxi> yup, for some reason I didn't think of checking the source this time even though I used for everywhere else where I was doubtful
18:50:14FromDiscord<myxi> (edit) "yup, for some reason I didn't think of checking the source this time even though I used ... for" added "it"
19:29:57FromDiscord<norbert3873> sent a code paste, see https://play.nim-lang.org/#pasty=rwtodeklLsXo
19:33:16FromDiscord<norbert3873> The function delegates are all working when I write it myself like: `var myFunc = cast[proc (arg1: string, arg2: int): string {.nimcall.}](ptrTable["originalFunc"])`
19:37:01FromDiscord<enthus1ast.> it might be easier with a macro
19:40:01FromDiscord<enthus1ast.> what is generated from the template?
19:40:10FromDiscord<enthus1ast.> maybe the replacement is not working
19:40:23FromDiscord<enthus1ast.> you can check with `expandMacros` from macros
19:40:34FromDiscord<enthus1ast.> sent a code paste, see https://play.nim-lang.org/#pasty=TOIfcECMYdhk
19:41:11FromDiscord<norbert3873> One sec I'll check now.
19:42:54FromDiscord<enthus1ast.> i am by far an expert on nim macro programming, but what i do in such cases is, use `dumpAstGen` from macros with the code i wanna generate, copy and paste the ast generating code, put it in a macro and tweak the ast generating to my liking
19:43:34FromDiscord<norbert3873> error (in the cast): type expected. Seems to be the case that the replacement is not working...
19:44:35FromDiscord<norbert3873> Was trying to stay away from macros for my own sanity but it looks like thats the path forward. Thanks for the re-vectoring.
19:45:20FromDiscord<enthus1ast.> i mean, it could be also possible with those template syntax, i've not used it much though and cannot really help
19:46:12FromDiscord<norbert3873> No worries, bout time I learn nim macro's any way.
19:46:52FromDiscord<norbert3873> I suspect it just may not be possible in a template when trying to replace the symbol name of a type - but I don't know for sure...
19:57:38FromDiscord<sunpoke04> hey, was gonna try the language today
19:58:08FromDiscord<sunpoke04> thought of something like wang tiles, is there an easy way to represent a 4 bit structure?
19:58:22FromDiscord<sunpoke04> or should I just use booleans and the compiler will optimize that for me?
20:05:04FromDiscord<enthus1ast.> i think not bool is 1 byte
20:05:11FromDiscord<enthus1ast.> `echo sizeof(bool)`
20:07:35FromDiscord<enthus1ast.> https://nim-lang.org/docs/bitops.html could help, though
20:07:54FromDiscord<Elegantbeef> You should use a bitsety
20:07:55FromDiscord<Elegantbeef> bitset\
20:08:10FromDiscord<enthus1ast.> ah this bot again 🙂
20:08:57FromDiscord<Elegantbeef> Lol
20:11:21FromDiscord<.bobbbob> smartest most sarcastic bot
20:15:21NimEventerNew thread by lou15b: Destructors for "ref object" types?, see https://forum.nim-lang.org/t/11229
20:15:31FromDiscord<.bobbbob> and you can use uint8 to be sure that it's an 8 bit value
20:15:39FromDiscord<Elegantbeef> Don't do that
20:15:48FromDiscord<sunpoke04> In reply to @Elegantbeef "You should use a": doesn't that use bytes? I don't know much, sry
20:16:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=zIwNxVmqMvXr
20:16:51FromDiscord<Elegantbeef> A bitset packs into the least amount of bytes required
20:17:00FromDiscord<Elegantbeef> So in the above case you have 4 bits of a byte used
20:17:41FromDiscord<sunpoke04> what, I'm lost
20:17:52FromDiscord<sunpoke04> https://github.com/nim-lang/Nim/blob/version-2-0/compiler/bitsets.nim#L18 isn't this a bitset thingy?
20:18:01FromDiscord<Elegantbeef> No
20:18:04FromDiscord<Elegantbeef> That's the compiler
20:18:16FromDiscord<Elegantbeef> We do not look at the compiler for user space code
20:18:28FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=JNmKYZoeLRTI
20:18:36FromDiscord<Elegantbeef> Nim has built in bitsets for ordinals with a range less than uint16.high
20:18:39FromDiscord<Elegantbeef> No you could not
20:18:43FromDiscord<Elegantbeef> Cause a set is unique
20:18:58FromDiscord<sunpoke04> In reply to @Elegantbeef "That's the compiler": https://nim-lang.org/docs/compiler/bitsets.html I just clicked at source in the stdlib stuff
20:19:16FromDiscord<Elegantbeef> That's the compiler docs
20:19:23FromDiscord<Elegantbeef> A `set` is a builtin Nim type
20:19:33FromDiscord<.bobbbob> I think he means this https://nim-lang.org/docs/system.html#system-module-sets I forgot about these
20:19:50FromDiscord<Elegantbeef> How does one forget about one of the best Nim primitives 😛
20:20:29FromDiscord<.bobbbob> because Ive only ever been able to use hash sets since the stuff didnt fit in the bitsets 😢
20:22:40FromDiscord<sunpoke04> I'm lost there...
20:23:13FromDiscord<.bobbbob> In reply to @sunpoke04 "I'm lost there...": this is probably a better link to learn https://nim-lang.org/docs/manual.html#types-set-type
20:24:00FromDiscord<Elegantbeef> Nim's bitset is an abstraction ontop of manually doing `((myVal shr 2) and 1) == 1`
20:24:06FromDiscord<Elegantbeef> where `2` is the bit you want to set
20:25:34FromDiscord<Elegantbeef> want to see\
20:26:39FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=VBxYeSYOvcHZ
20:27:02FromDiscord<sunpoke04> you guys are talking about using a set for that?
20:27:11FromDiscord<Q-Master> If one needs bitfields there's an option of using bitsize pragma as in https://github.com/nim-lang/c2nim/blob/master/testsuite/results/bitfield.nim
20:27:40FromDiscord<Elegantbeef> Yes sun
20:28:07FromDiscord<Elegantbeef> A `set[Colours]` is better than an array if you are attempting to use on or off logic
20:30:05FromDiscord<sunpoke04> I'm a bit lost there, isn't a static array faster and more efficient than a set?
20:30:07FromDiscord<Q-Master> Also there might be used union pragma to map that bitfields to any other type.
20:30:21FromDiscord<sunpoke04> also how are bots talking...
20:31:12FromDiscord<sunpoke04> In reply to @sunpoke04 "I'm a bit lost": or like, storing stuff as `0b0110`
20:33:55FromDiscord<Elegantbeef> I mean that's what a bitset does
20:33:55FromDiscord<Elegantbeef> A bitset is a 0 cost abstraction onto of manually bit twiddling
20:33:55FromDiscord<Elegantbeef> We're using bridges I'm on matrix for instance
20:34:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=JqfpoGSPcimS
20:34:51FromDiscord<.bobbbob> I think it's faster for inserting things is what beef means, but isn't it way slower for modifying it afterwards?
20:35:30FromDiscord<.bobbbob> So creating a set of the Colour enum will minimize the bits used and make it easy to insert new ones right?
20:36:40*ntat quit (Quit: Leaving)
20:37:29FromDiscord<Elegantbeef> It also is more readable and easier to use 😄
20:37:52FromDiscord<Elegantbeef> Want to add red you just do `.incl Red` instead of `val = val or 0b1`
20:44:21FromDiscord<sunpoke04> I'm not crazy...
20:45:07FromDiscord<sunpoke04> why am I doing this again...
20:46:37FromDiscord<.bobbbob> In reply to @sunpoke04 "why am I doing": if you dont know any of this stuff you're probably better off going through the tutorial to learn the basics first https://nim-lang.org/docs/tut1.html
20:46:40FromDiscord<Elegantbeef> Doing what?
20:46:52FromDiscord<sunpoke04> In reply to @Elegantbeef "Doing what?": Wang tiles
20:47:00FromDiscord<Elegantbeef> No clue
20:47:14FromDiscord<Elegantbeef> Always a fun learning experience
20:47:25FromDiscord<sunpoke04> where fun T-
20:50:12FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=twDwCiqZydeZ
20:51:43FromDiscord<Elegantbeef> `incl` does not return
20:51:47FromDiscord<Elegantbeef> `horizontal + vertical`
20:55:05FromDiscord<sunpoke04> it's confirmed: this is weird
20:55:25FromDiscord<Elegantbeef> It's not weird
20:58:22FromDiscord<sunpoke04> it's weird for me T-
21:06:13FromDiscord<sunpoke04> wait, is there an way to represent 4bits?
21:06:32FromDiscord<sunpoke04> like, other than using a byte and like adding comments to not use it as a byte
21:08:14FromDiscord<Elegantbeef> Yea use a bitset
21:08:43FromDiscord<Elegantbeef> You can always make your own bitset doing `type MyBitSet = distinct uint8` and add your own procedures to it
21:08:49FromDiscord<Elegantbeef> But why would you want to we have first class bitsets
21:09:06FromDiscord<sunpoke04> erm...
21:11:12FromDiscord<sunpoke04> sent a code paste, see https://play.nim-lang.org/#pasty=DPULnqOvstyf
21:11:24FromDiscord<sunpoke04> but that's not just gonna be written in code
21:11:34FromDiscord<sunpoke04> I'm gonna save it in a file or something like that
21:13:11FromDiscord<Elegantbeef> What's the issue?
21:17:20FromDiscord<sunpoke04> I don't understand how I would do that with that set
21:27:17FromDiscord<Elegantbeef> You'd convert the bits to a tile by doing `cast[set[Position]](bits)` or `copyMem`
21:27:35FromDiscord<Elegantbeef> Bitsets are implemented the same as numbers they're just packed bits
21:27:48FromDiscord<Elegantbeef> So you can safely cast between them if you know what you're doing
21:28:02FromDiscord<Elegantbeef> IE `sizeof(set[Position]) == sizeof(uint8)`
21:28:37FromDiscord<sunpoke04> In reply to @Elegantbeef "You'd convert the bits": nope ` VM does not support 'cast' from tyInt to tySet`
21:28:40FromDiscord<sunpoke04> (edit) "` VM" => "`VM"
21:29:47FromDiscord<Elegantbeef> Right the vm does not
21:29:53FromDiscord<Elegantbeef> So you get to manually do it
21:31:22FromDiscord<Elegantbeef> Or you just don't use const in the above
21:34:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=DqDpTuJAMWUj
21:34:24FromDiscord<Elegantbeef> Or there abouts
21:37:26FromDiscord<juancarlospaco> https://www.unrealengine.com/en-US/tech-blog/bringing-verse-transactional-memory-semantics-to-c
21:45:17FromDiscord<saint.___.> In reply to @sunpoke04 "also how are bots": Thats just how messages appear over the bridge to matrix or irc
21:47:27FromDiscord<ezquerra> I am compiling some code I did not write and I get the following warning:↵> Warning: Deprecated since 1.5; TaintedString is deprecated [Deprecated]↵The offending code is a proc that has an argument that is specified as `str: string|TaintedString`. Can I simply remove the `TaintedString` from there? I don't really know what TaintedStrings were supposed to do before 1.6...
21:49:24FromDiscord<Elegantbeef> They were supposed to be any string that you do not know is a valid input
21:49:45FromDiscord<Elegantbeef> So like `stdin.readLine` would've returned `TaintedString` and you were supposed to validate it before working with it
22:04:55FromDiscord<nnsee> In reply to @sunpoke04 "also how are bots": it's just a bridge from matrix (and irc) to discord
22:05:08FromDiscord<nnsee> since it uses webhooks, discord labels them as bots
22:05:27FromDiscord<Elegantbeef> Don't let them gaslight you into thinking I'm a real boy
22:06:25FromDiscord<nnsee> you're real to me, damn it
22:14:15FromDiscord<ezquerra> OK, then it seems I can just remove it and let the function take just strings, right?
22:16:26FromDiscord<Elegantbeef> Yep
22:19:05FromDiscord<ezquerra> Thanks
22:27:23FromDiscord<ezquerra> There is another warning I'm to trying to remove from Arraymancer. For some reason I am getting a "Warning: A custom '=destroy' hook which takes a 'var T' parameter is deprecated; it should take a 'T' parameter [Deprecated]" even though AFAIK there is no such a destroy hook
22:27:55FromDiscord<ezquerra> In fact the location that the compiler indicates is not the definition of a `=destroy` procedure
22:28:44FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=exuOWZAFPGHH
22:29:24FromDiscord<ezquerra> And in that location the code is simply `new result, deallocTiles[T]`
22:30:10FromDiscord<Elegantbeef> https://github.com/mratsim/Arraymancer/blob/7d6d21cbcafda25201f4fd2fb481fb1316704813/src/arraymancer/laser/tensor/datatypes.nim#L80 probably due to
22:30:12FromDiscord<Elegantbeef> But no clue
22:31:32FromDiscord<ezquerra> That warning happens in a branch in which I think I have already fixed that `=destroy` proc to not use var
22:32:59FromDiscord<Elegantbeef> Wait `new X, T` makes a destructor
22:33:00FromDiscord<Elegantbeef> So that's the issue
22:33:14FromDiscord<Elegantbeef> Finaliser code has not been changed to work with non var destroy
22:34:25FromDiscord<ezquerra> So what you mean is that there is an implicit destructor that is created that uses var?
22:34:33FromDiscord<Elegantbeef> Yes
22:34:39FromDiscord<ezquerra> i.e. there is nothing that I can do to fix that warning?
22:34:49FromDiscord<Elegantbeef> You can disable the warning then turn it back on
22:39:16FromDiscord<ezquerra> OK, that works. Thanks!
23:05:02*krux02 joined #nim
23:18:40*advesperacit quit ()
23:20:59*cornfeedhobo quit (Ping timeout: 268 seconds)
23:26:48*cornfeedhobo joined #nim
23:27:34FromDiscord<ezquerra> There is a macro in arraymancer that sometimes seems to declare some variables that are not used. Is it possible to disable that hint? I tried to use `{.push hint[XDeclaredButNotUsed]: off.}` but that does not seem to work... Maybe the macro must _add_ that push to the code it generates?
23:44:32FromDiscord<sunpoke04> In reply to @saint.___. "Thats just how messages": what's matrix
23:48:43FromDiscord<Elegantbeef> https://matrix.org/
23:50:22FromDiscord<sunpoke04> In reply to @Elegantbeef "https://matrix.org/": this looks like a... "not discord" discord
23:53:00FromDiscord<saint.___.> In reply to @sunpoke04 "this looks like a...": Yeah it's like an open source discord thing but a lot less features in general
23:55:17*cornfeedhobo quit (Quit: ZNC - https://znc.in)
23:57:14*krux02_ joined #nim