<< 01-04-2021 >>

00:00:01*zopsi quit (Quit: Oops)
00:00:36*zopsi joined #nim
00:23:21FromDiscord<ajusa> Is nim's htmlparser decent? I'm trying to parse some "wild" html and it got rid of the body tag and put the </html> tag halfway through the body, not to mention a whole bunch of other random mutations.
00:23:32FromDiscord<ajusa> (edit) "body," => "file,"
00:23:56FromDiscord<ElegantBeef> I dont think it supports all html variants, it expects them to be like xml afaik
00:24:23FromDiscord<ajusa> I'm just trying to parse a wordpress link, that should be fairly standard, right?
00:24:32*krux02 quit (Remote host closed the connection)
00:25:08FromDiscord<ajusa> And the HTML on that site looks pretty normal in my editor, but when I load it and then write it back to a file it looks messed up
00:25:28FromDiscord<ElegantBeef> Like i said it doesnt support all the html oddities
00:25:48*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:26:08FromDiscord<ajusa> are there any libraries that do a better job of parsing HTML? I saw nimquery but that seems to use parseHTML as well
00:26:08*njoseph joined #nim
00:28:28FromDiscord<ajusa> Looks like fusion has a version, I'll try that out.
00:30:59FromDiscord<ajusa> huh... well it does better? it closed the body before it closed the head which is a bit weird. seems like parsing HTML is hard
00:31:24FromDiscord<ElegantBeef> Well there are so many variations which are allowed
00:33:46FromDiscord<ElegantBeef> Like for instance it doesnt handle this one bit https://play.nim-lang.org/#ix=2UH1
00:33:59FromDiscord<ElegantBeef> `<tag /> message` doesnt work in the parser
00:34:27FromDiscord<ajusa> that seems... fine? It parses one p tag and then one text?
00:35:21FromDiscord<ElegantBeef> That's the same as https://play.nim-lang.org/#ix=2UH2
00:35:30FromDiscord<ElegantBeef> Atleast according to your browser
00:36:15FromDiscord<ajusa> also, it seems like https://github.com/nim-lang/Nim/pull/12205 will solve my particular use case (script and style tags not handled well). It's a shame it's been open for almost three years now though...
00:42:02*Tlangir quit (Ping timeout: 268 seconds)
00:46:28FromDiscord<ajusa> I ended up just using regex to get rid of of script and style tags, not the most elegant solution but it seems to be the most sane one
00:56:27*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
01:02:08*Lord_Nightmare joined #nim
01:11:05*Tlangir joined #nim
01:51:21*MightyJoe quit (Quit: I'm out!)
02:03:18*cyraxjoe joined #nim
02:17:05*zgnwgwcbz joined #nim
02:28:37*waleee-cl quit (Quit: Connection closed for inactivity)
04:25:18*zgnwgwcbz quit (Ping timeout: 240 seconds)
04:49:43*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:49:51*njoseph joined #nim
05:26:19*Gustavo6046 quit (Ping timeout: 258 seconds)
05:36:11*narimiran joined #nim
06:36:27ForumUpdaterBotNew thread by Rozzamarine: AutoNim [AutoIt X3 wrapper], see https://forum.nim-lang.org/t/7732
06:45:03ForumUpdaterBotNew Nimble package! autonim - Wrapper for AutoIt v3.3.14.2, see https://github.com/Guevara-chan/AutoNim
06:48:31*yhtdsoyoy joined #nim
06:52:19FromGitter<UrKr> How do I import a const from one file to another? I can use include, but that means the const is new const per include
06:53:06FromDiscord<ElegantBeef> if you mark it with `` it'll be exported
06:53:11FromDiscord<ElegantBeef> `const yourSillyVar = 100`
07:03:41FromDiscord<demotomohiro> You can export var/let/const/proc/template/macro by adding `` after identifier in Nim.
07:04:03narimiran* is not seen on IRC
07:04:24FromDiscord<ElegantBeef> Oh right
07:04:28*thewrinklyninja joined #nim
07:04:32FromDiscord<ElegantBeef> turns into less than equal to iirc
07:05:01FromDiscord<demotomohiro> can be seen without `?
07:05:25FromDiscord<ElegantBeef> Nope it's still `>=` on the logs
07:05:33FromDiscord<ElegantBeef> https://irclogs.nim-lang.org/ can view the irc here if you dont have a client
07:06:27FromDiscord<demotomohiro> '' can work?
07:06:40FromDiscord<ElegantBeef> Nope 😄
07:06:50FromDiscord<ElegantBeef> Probably not even \
07:07:20FromDiscord<demotomohiro> \ or "" work?
07:07:43FromDiscord<ElegantBeef> The bridge doesnt like the asterix
07:07:52FromDiscord<demotomohiro> backslash or double quote doesn't work 😦
07:08:12FromDiscord<ElegantBeef> Go make an issue on ircord
07:10:54FromDiscord<Yardanico> I know about it already
07:29:04*lritter joined #nim
07:50:34FromDiscord<flywind> why emitting symbols with backticks is deprecated?
07:50:38FromDiscord<flywind> > For backward compatibility, if the argument to the emit statement is a single string literal, Nim symbols can be referred to via backticks. This usage is however deprecated.
07:51:56FromDiscord<flywind> They should work like `asm`? But asming something with backticks is not deprecated.
07:51:59FromDiscord<flywind> https://nim-lang.github.io/Nim/manual.html#statements-and-expressions-assembler-statement
07:53:12FromDiscord<flywind> https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-emit-pragma
07:58:28*arecaceae quit (Remote host closed the connection)
07:58:47*arecaceae joined #nim
08:06:45*thewrinklyninja quit (Quit: Leaving)
08:15:16Clonkk[m]Importing threadpool make valgrind detect a memory leak. Is it a false positive or is that a bug in threadpool ?
08:16:52FromDiscord<flywind> full messages?
08:17:37Clonkk[m]Eh not sure if the formatting over multiples lines works over the Matrix <-> discrod bridge
08:17:51*Clonkk[m] < https://matrix.org/_matrix/media/r0/download/matrix.org/cAwqzDYcxVPXAKPlGAVhnzpU/message.txt >
08:17:53Clonkk[m]Tell me if it's not lisible
08:17:56FromDiscord<flywind> github gist or
08:18:05Clonkk[m] * Tell me if it's not readable
08:18:30Clonkk[m]Otherwise I can just open an issue if you suspect it's a bug
08:18:37Clonkk[m]I have a reproducible example
08:20:21*narimiran quit (Ping timeout: 260 seconds)
08:23:11FromDiscord<flywind> not sure, may be a global variable
08:25:14Clonkk[m]https://gist.github.com/Clonkk/032b4366e0dc17f79103d5bb23968e88 . The code is straight up a echo "hello world" in a proc.
08:25:42Clonkk[m]This is on Nim v1.4.4 btw
08:25:57FromDiscord<ElegantBeef> not using `-d:useMalloc`?
08:26:49Clonkk[m]Tried both
08:26:52Clonkk[m]With and without
08:26:54Clonkk[m]Same result
08:27:05FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/827096720269639710/unknown.png
08:27:25FromDiscord<flywind> Some variables are just never freed and cleaned by OS.
08:27:45FromDiscord<flywind> (edit) "Some ... variablesmay" added "pointer" | "are" => "may be"
08:30:47Clonkk[m]So is that normal behaviour then ?
08:32:26FromDiscord<flywind> I guess so.
08:32:27FromDiscord<flywind> You should use `-d:useMalloc` and `arc`.
08:32:55FromDiscord<flywind> `useMalloc` doesn't work with `refc`.
08:33:49Clonkk[m]<FromDiscord "<flywind> You should use `-d:use"> I tried --gc:arc, --gc:orc with and without -d:useMalloc and all give the same results
08:34:29FromDiscord<flywind> I see
08:42:37*Vladar joined #nim
08:48:12*haxscramper joined #nim
08:52:19Clonkk[m]I opened an issue https://github.com/nim-lang/Nim/issues/17609 so we have a trace
08:56:59FromDiscord<Yardanico> you should also use --debugger:native in the future
08:57:20Clonkk[m]For valgrind ?
08:57:41FromDiscord<Yardanico> yes
08:57:49FromDiscord<Yardanico> it'll output nim source lines in the leak info then
08:58:42FromDiscord<Yardanico> @Clonkk let me guess - your CPU has 12 threads? :)
08:59:51Clonkk[m]Yes :)
09:00:08FromDiscord<Yardanico> see, it's not a leak
09:00:13FromDiscord<Yardanico> threadpool works on _threads_
09:00:23FromDiscord<Yardanico> it has to start N threads, where N is number of your logical CPUs
09:00:28Clonkk[m]Threads can be free'd at exit
09:00:33FromDiscord<Yardanico> but there's no need to
09:00:35FromDiscord<Yardanico> since the OS will do it
09:00:41FromDiscord<Yardanico> and generally we don't do it for global variables either
09:01:00Clonkk[m]Hmm
09:01:21Clonkk[m]I generally don't like to rely on the OS to clean memory at the end of the process.
09:01:55FromDiscord<Yardanico> you can open an RFC then I guess
09:02:10Clonkk[m]How does htat work with RTOS ?
09:02:25FromDiscord<Yardanico> ?
09:02:41FromDiscord<Rika> Real time OS I believe?
09:02:52Clonkk[m]Yes
09:02:58FromDiscord<Yardanico> I know what is RTOS, my question is how it relates to this
09:03:02Clonkk[m]EMbedded, close to baremetal OS thatwill define task instead of thraed usually
09:03:19Clonkk[m]Do you forbid the usage of said module ?
09:04:23FromDiscord<Rika> Threads uses OS threading
09:04:34FromDiscord<Yardanico> yeah, threadpool won't really work there anyway
09:05:37Clonkk[m]Okay
09:05:41FromDiscord<Yardanico> still not sure if I follow, even RTOSes clean up memory after your tasks
09:05:56FromDiscord<Yardanico> i mean some do, maybe not all 🤔
09:08:06FromDiscord<Yardanico> generally bad leaks are only the ones that are "definitely lost"
09:08:34FromDiscord<Yardanico> also clang's MSAN doesn't report any errors with threadpool
09:08:47FromDiscord<Yardanico> https://clang.llvm.org/docs/MemorySanitizer.html
09:09:00Clonkk[m]Some RTOS emulate processes through Task, (NuttX for instance) but I'm not sure if ending the task clean-up the ressources of the Task
09:09:20Clonkk[m]But yeah that may be irrelevant as for RTOS you want to manage threads manually anyway
09:09:59Clonkk[m]<FromDiscord "<Yardanico> also clang's MSAN do"> Interesting
09:10:32*krux02 joined #nim
09:12:32FromDiscord<Yardanico> also MSAN is usually faster than valgrind
09:12:51FromDiscord<Yardanico> because valgrind has to translate the whole binary into IR, add instrumentation, and then compile that IR back to the machine code
09:12:58FromDiscord<Yardanico> clang's MSAN does that in the compilation step
09:13:27Clonkk[m]Do you need to build clang witha particular option ?
09:13:38FromDiscord<Yardanico> no, but you need to build your program with specific options
09:13:50FromDiscord<Yardanico> nim c --cc:clang --passC:"-fsanitize=memory" --passL:"-fsanitize=memory" myfile.nim
09:13:54Clonkk[m]I get a lot of undefined reference when compiling using CLANG and --passC:-fsanitize=memory
09:14:02FromDiscord<Yardanico> well you should link it too
09:14:11FromDiscord<Yardanico> also add --debugger:native -d:useMalloc of course
09:14:30Clonkk[m]Ah I was missing --passL
09:18:00Clonkk[m]Thanks for the tips Yardanico . All this started because I was trying to investigate potential memory leak in my own code
09:18:29FromDiscord<Yardanico> if the code is open I can try to help :)
09:18:40Clonkk[m]Most of it is not :)
09:20:06Clonkk[m]Ah but it stops at the first error
09:21:01FromDiscord<Yardanico> well I mean you can just continue to use valgrind, but it's better to log to file and of course --debugger:native in addition to other arguments
09:21:34Clonkk[m]I load some shared library which have uninitialzed heap memory allocated
09:21:50Clonkk[m]Ironic, since the library in question is libLLVM actually
09:22:23FromDiscord<Yardanico> you can build libLLVM with MSAN if you want :D
09:22:26Clonkk[m]I suppose, there isn't a way to ignore some errors or tell it to keep going even if an error occurs
09:22:49Clonkk[m]<FromDiscord "<Yardanico> you can build libLLV"> libjulia.so depends on libllvm so I'd have to rebuild LLVM then Julia
09:22:55Clonkk[m]That'd be a pain in the ass
09:26:11FromDiscord<Yardanico> there is such an option
09:26:11FromDiscord<Yardanico> -fsanitize-recover=memory
09:26:22FromDiscord<Yardanico> https://github.com/google/sanitizers/wiki/AddressSanitizer#faq
09:35:00Clonkk[m]I need to read more about CLANG and LLVM they seem to have some cool tools
09:36:57FromDiscord<Yardanico> Clang is not an acronym :)
09:37:01FromDiscord<Yardanico> Nim, Clang
09:37:55FromDiscord<Yardanico> just bikeshedding, but I honestly don't like when people use SHOUTINGCASE for all things that might or might not be acronyms
09:38:39Clonkk[m]And here I thought Nim was pro case-insensitive ;),
09:39:08FromDiscord<Yardanico> but you don't name your variables tEST do you
09:39:14FromDiscord<Yardanico> or use keywords like pROC (this is completely valid)
09:39:25Clonkk[m]No, I prefer pRoC and tEsT
09:39:30FromDiscord<Yardanico> mmm
09:40:02Clonkk[m]Nah I use a perfectly healthy combination of snake case and camel case like a normal degenerate
09:40:02FromDiscord<Yardanico> also waiting for some april fools threads on the nim forum
09:40:14FromDiscord<Yardanico> i want something as cool as https://forum.nim-lang.org/t/6136 :)
09:40:29Clonkk[m]That one was fun
09:41:04FromDiscord<Yardanico> also, even in that thread - a person who wrote NIM
09:55:00*waleee-cl joined #nim
09:57:06ForumUpdaterBotNew thread by Stefan_Salewski: Error: unhandled exception: invalid object assignment, see https://forum.nim-lang.org/t/7733
10:14:26Clonkk[m]Clang doesn't handle const char* the same way as gcc ? error: assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
10:15:14FromDiscord<Yardanico> maybe it's C vs C++ backend difference in your case?
10:17:36*hsh__ joined #nim
10:17:46Clonkk[m]Some dependencies I use do not support C backend
10:18:02*Tlangir quit (Remote host closed the connection)
10:18:21Clonkk[m]g++ didn't have any issue
10:18:33Clonkk[m]fg
10:20:22FromDiscord<Yardanico> fg?
10:20:44Clonkk[m]I use Vim, ctrl+z to compile and fg to re-open the editor
10:20:54Clonkk[m] * I use Vim, ctrl+z write shell line to compile and fg to re-open the editor
10:21:52*hsh__ quit (Client Quit)
10:22:36*hsh joined #nim
10:48:15*yhtdsoyoy quit (Remote host closed the connection)
11:06:16*narimiran joined #nim
12:38:02*NimBot joined #nim
12:46:38FromDiscord<jtiai> When trying to convert int to string I get `Error: system module needs: nimIntToStr`
12:49:15ForumUpdaterBotNew post on r/nim by sotolf2: Illwill text input, see https://reddit.com/r/nim/comments/mhukgt/illwill_text_input/
12:51:32ForumUpdaterBotNew Nimble package! upraises - exception tracking for older versions of nim, see https://github.com/markspanbroek/upraises
12:55:18*gpanders joined #nim
13:01:24*filcuc joined #nim
13:04:21filcucWhy i can't use lambda with generic? https://play.nim-lang.org/#ix=2UJd
13:05:11filcucprobably i'm wrongly thinking that nim traits generics like C++ does
13:15:07FromDiscord<Solitude> you can use them with generic https://play.nim-lang.org/#ix=2UJh
13:15:56krux02filcuc, when passing the lambda to test, the argument T must be a fully resolved type.
13:16:16krux02and name doesn't have a type yet.
13:25:05filcucok thank you guys
13:27:44filcucmaybe i can relax my espectations. I'm trying to complete the QObject connection style in my NimQml bindings
13:27:56filcucand i wanted something like this QObject.connect(c1, nameChanged, c2, name => c2.setName(name))
13:28:33filcucthis already work connect(c1, nameChanged, c2, proc(name: string) = c2.setName(name))
13:29:56filcucthis already work connect(c1, nameChanged, c2, proc(name: string) = c2.setName(name))
13:30:06filcucops sorry for the double post :)
13:32:34krux02filcuc, why don't you try to make it work with `QObject.connect(c1, nameChanged, c2, setName)`
13:35:12filcuckrux02: already work :D
13:36:02filcuckrux02: i want to support also lambdas in addition to play procDefs and methodDefs
13:36:17filcuc*plain*
13:39:14filcuckrux02: https://github.com/filcuc/nimqml/blob/edba82c2f6257338b36263bf222626e102359737/examples/connections/main.nim#L202
13:39:47filcuckrux02: obviously it's still a work in progress
13:43:07FromDiscord<Unaimend> Is there a package to parse dot files from graphviz?
13:45:10krux02filcuc, what you might do is, make the `connect` macro a bit smarter and let it process the `=>` expression.
13:46:15krux02so when the right is an expression of `ident => <expr>` then convert it into something that already works
13:47:31filcuckrux02: i was thinking something like do quote: connect(sender, senderFunc, proc(name: string) = lambda(name))
13:47:31krux02so `connect(..., name => c2.setName)` will be converted to `connect(..., proc(name: string) = c2.setName(name))`
13:47:54filcuckrux02: yep that could be another solution
13:48:13filcuckrux02: maybe i can delay the support for "sugar" lambdas
13:48:26FromDiscord<haxscramper> In reply to @Unaimend "Is there a package": No there is no such package, and the only libraries that can do this in C++ is boost and ogdf If I'm not mistaken. But the syntax is relatively simple, so you can probably use npeg and get the thing working quite fast.
13:48:33krux02and the type for `name` you can extract from the second argument (nameChanged)
13:48:47filcucand simply complete what i have done so far
13:49:02krux02yes
13:49:17FromDiscord<haxscramper> In reply to @haxscramper "No there is no": the only libraries aside from some graph tools that are either specialized on reading graphviz or can read it along with many other graph formats
13:51:01FromDiscord<Unaimend> In reply to @haxscramper "the only libraries aside": ok, thx for the answer, I will just hack up a solution for the required parts myself
13:55:48krux02filcuc, if you do what I suggested, you don't need to import sugar anymore, since the `=>` is processced by the connect macro
13:56:25krux02but the last argument of the connect macro must be untyped otherwise you get the error for `=>` too early.
13:58:01filcuckrux02: ah i didn't thought about that. Yes it would be nice. But honestly i think i should postpone the "sugar" lambda support. I want to push out the QObject connection syntax and DOtherside 0.8. After that i would like to complete ARC/ORC support
14:00:27filcuci would like also to remove all examples and create a "TODO" list like app for showing list models and qobject connections
14:17:54FromDiscord<Unaimend> wow, just learned that bash substitutes non existing variables with an empty string, by fucking up my local compute cluster #FUCK_BASH
14:19:50*Gustavo6046 joined #nim
14:50:34*filcuc quit (Ping timeout: 268 seconds)
15:02:38*filcuc joined #nim
15:27:29filcucis there an easy way for specifing a specific function in case of overloads? based on the first param the function?
15:27:58FromDiscord<Rika> wdym? nim has overloading so
15:31:01filcucsupposing i've a type T and there're two or more procs called "bar" one in my module proc bar(self: T) and one in another module with signature proc bar(self: K). Suppose i want to store the a pointer to the first one like "let callback = bar"
15:31:14filcuci would like to select the first one
15:31:36filcucobviously i can "let callback: proc(T) = bar"
15:32:07filcucif ask if there're other solutions
15:32:54FromDiscord<Rika> i dont think so, no
15:38:18FromDiscord<Solitude> In reply to @filcuc "supposing i've a type": i think you can select by providing arguemtn types
15:40:06FromDiscord<Rika> the proc isnt generic is it? or do you mean `bar(T)`?
15:40:18filcucin reality i've a more complext problem. Right now i'm writing a macro that accepts an object and a proc name like "connect(a, foo)". foo can be a name of mulitple overloads (one that works with the "a" argument and some of other modules)
15:40:19FromDiscord<Solitude> https://nim-lang.org/docs/manual.html#statements-and-expressions-type-conversions
15:40:45filcucbasically in the macro i've to select the correct overload of "foo" that matches "a"
15:41:07filcucbasically i've to reiplement the compiler algorithm
15:43:10filcucin other words: cumbersome
15:45:02FromDiscord<Rika> why cant you simply emit the `foo(a)`?
15:46:03filcuci wanted to check that foo had a custom pragma
15:47:20filcucand i would like to obtain also some info from the proc definitions (like how many arguments it has and their types)
15:47:28filcucso i've to select the correct proc overload
15:47:49FromDiscord<Rika> i see
15:48:14filcucmaybe i'm pushing the macro too far
15:48:14FromDiscord<Rika> is your macro taking in `typed`
15:48:19filcucyes
15:49:45filcucright now i'm taking both arguments as typed. From the first one i obtain the "type" for the first argument of the proc. I then have to iterate on all the overloads and find the matching one..
16:13:38*whitefly joined #nim
16:51:49FromDiscord<brainproxy> sent a long message, see https://paste.rs/yI5
16:52:06FromDiscord<brainproxy> (edit) "http://ix.io/2UKn" => "http://ix.io/2UKo"
16:56:34*tane joined #nim
17:02:02ForumUpdaterBotNew thread by Clonk: =copy with different arguments type, is it a good idea ? , see https://forum.nim-lang.org/t/7735
17:22:35FromDiscord<sheerluck> What was araq's 1 april joke today?↵Something like he will reimplement nim-2.0 in python?
17:23:27*filcuc quit (Ping timeout: 265 seconds)
17:24:33FromDiscord<exelotl> wait wtf I can't believe that was a year ago lol
17:26:29FromDiscord<sheerluck> Or maybe how he finally decided to switch to Gentoo Linux?
17:27:57FromDiscord<usera> hi all, i hope this is the right place for dumb questions 😛
17:28:22PrestigeYep! Go ahead and ask
17:28:49FromDiscord<usera> sent a code paste, see https://play.nim-lang.org/#ix=2UKG
17:29:05FromDiscord<usera> i know there is a caveat when it comes to threading but this is a strait call .
17:29:13FromDiscord<Rika> export it
17:29:27FromDiscord<Rika> add an asterisk after `logger`
17:30:39FromDiscord<usera> sent a code paste, see https://play.nim-lang.org/#ix=2UKH
17:31:12FromDiscord<Rika> wdym no?
17:32:00FromDiscord<usera> Error: undeclared identifier: 'logger'
17:33:09FromDiscord<Rika> oh `main` is importing `test`?
17:33:21FromDiscord<Rika> nah test has to import main if you want to use logger
17:34:19FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2UKI
17:34:28FromDiscord<Rika> then test can import main (at the top) just fine
17:34:54FromDiscord<Rika> (i think?
17:35:06FromDiscord<Rika> i forget, its been a while since i had to deal with a circular
17:37:16FromDiscord<usera> you are right, i have to both declare logger before the import AND import main in the other file. ↵i just made the assumption that everything goes under main as main is both the entry point and is importing all the module (first forray into nim and i am slow on a good day)
17:37:33FromDiscord<Rika> there is no fixed entry point
17:37:51FromDiscord<Rika> main isnt "special" in nim
17:39:15FromDiscord<usera> i call it main, but all my "calls" are effectively called from that file . but its an assumption on my side.
17:39:42FromDiscord<Rika> nothing is exported by default
17:39:58FromDiscord<usera> is there a better way of doing logging then this way (and aside from passing it to every proc)
17:40:11FromDiscord<Rika> idts?
17:41:05FromDiscord<usera> this works for now . Thank you very much !
17:44:31*willyboar joined #nim
17:56:29*willyboa_ joined #nim
17:58:42*willyboar quit (Ping timeout: 246 seconds)
18:01:17*xet7 quit (Remote host closed the connection)
18:03:06*lritter quit (Ping timeout: 240 seconds)
18:07:43*filcuc joined #nim
18:11:42*willyboa_ is now known as willyboar
18:15:06*filcuc quit (Ping timeout: 240 seconds)
18:30:39*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
18:31:18*Gustavo6046 joined #nim
18:49:26*xet7 joined #nim
19:49:47*natrys joined #nim
19:54:38*haxscramper quit (Remote host closed the connection)
20:05:54*willyboar quit (Remote host closed the connection)
20:06:24*willyboar joined #nim
20:07:15*jjido joined #nim
20:41:38liblq-devis it possible to force some object to not outlive another object?
20:42:00liblq-devor, at least, limit the object's lifetime so that it can't be moved etc.?
20:42:09liblq-devs/lifetime/hooks
20:49:33*filcuc joined #nim
21:03:20FromDiscord<Yardanico> you can make =sink {.error.} I think
21:03:59FromDiscord<Yardanico> or actually just error out = so you can't assign it to anything else or something
21:04:03FromDiscord<Yardanico> https://github.com/nim-lang/fusion/blob/master/src/fusion/smartptrs.nim#L28
21:09:18*narimiran quit (Ping timeout: 240 seconds)
21:25:43*greaser|q quit (Changing host)
21:25:43*greaser|q joined #nim
21:25:47*greaser|q is now known as GreaseMonkey
21:33:05*natrys quit (Quit: natrys)
21:35:24*Vladar quit (Quit: Leaving)
21:39:30*willyboar quit ()
21:43:03*mwbrown quit (Ping timeout: 246 seconds)
21:46:00*mwbrown joined #nim
22:10:04*filcuc quit (Ping timeout: 265 seconds)
22:16:16liblq-dev@Yardanico you have any docs on `=`?
22:16:19liblq-devcan't find it in the manual
22:16:28liblq-devand the destructors manual
22:16:46FromDiscord<Yardanico> there's no =
22:16:56FromDiscord<Yardanico> = became =copy so = is technically "free" right now
22:16:58FromDiscord<Yardanico> check #nim-science
22:17:06liblq-devright
22:17:10FromDiscord<Yardanico> @clyybber said "I renamed = to =copy so that we would eventually be able to overload = like that"
22:17:38liblq-devi suppose if i pass a .byref object into a procedure, it doesn't trigger =copy?
22:17:48FromDiscord<Yardanico> you can always check :P
22:18:08FromDiscord<Yardanico> make =copy an error or output a warning at compile time and see if that code triggers =copy
22:20:54liblq-devhm doesn't seem to =copy
22:20:56liblq-devi'll ban it then
22:22:34FromDiscord<brainproxy> is it a known thing on Windows where if you have a nimble task that builds and then `exec`s the built executable, and then you press ctrl-c to terminate, that it causes the process to hang, requiring a force quit?
22:22:42FromDiscord<brainproxy> is there a workaround?
22:27:01*tane quit (Quit: Leaving)
22:31:07FromDiscord<dom96> haven't seen nor heard of this before, I do myself use Windows and haven't noticed this
22:31:37FromDiscord<dom96> What terminal are you using?
22:31:57FromDiscord<brainproxy> msys2
22:32:39FromDiscord<brainproxy> if I bulid and don't run, then invoke the executable independently from the nimble task, ctrl-c works just fine
22:34:10FromDiscord<dom96> I'm using the new Windows Terminal and it works fine
22:42:54*whitefly quit (Remote host closed the connection)
22:54:22FromDiscord<brainproxy> eh, maybe related to this ancient `wont-fix`: https://sourceforge.net/p/msys2/tickets/135/
22:55:24FromDiscord<brainproxy> seemingly connected to this, which is even more ancient: https://sourceforge.net/p/mingw/bugs/845/
22:55:27FromDiscord<brainproxy> 2005!!
22:56:55FromDiscord<brainproxy> will just have to document that when building on Windows in MSYS2, should just build and invoke the resulting `.exe` separately, not build+run
23:26:46FromDiscord<clyybber> In reply to @liblq-dev "i suppose if i": even with bycopy it won't
23:26:57FromDiscord<clyybber> bycopy/byref aren't directly related to =copy
23:27:19FromDiscord<clyybber> =copy is only invoked for parameters if your parameter is a sink param and you are passing in something that cannot be moved
23:31:33FromDiscord<exelotl> oh that's good to know
23:57:28*krux02 quit (Remote host closed the connection)