00:00:01 | * | zopsi quit (Quit: Oops) |
00:00:36 | * | zopsi joined #nim |
00:23:21 | FromDiscord | <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:32 | FromDiscord | <ajusa> (edit) "body," => "file," |
00:23:56 | FromDiscord | <ElegantBeef> I dont think it supports all html variants, it expects them to be like xml afaik |
00:24:23 | FromDiscord | <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:08 | FromDiscord | <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:28 | FromDiscord | <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:08 | FromDiscord | <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:28 | FromDiscord | <ajusa> Looks like fusion has a version, I'll try that out. |
00:30:59 | FromDiscord | <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:24 | FromDiscord | <ElegantBeef> Well there are so many variations which are allowed |
00:33:46 | FromDiscord | <ElegantBeef> Like for instance it doesnt handle this one bit https://play.nim-lang.org/#ix=2UH1 |
00:33:59 | FromDiscord | <ElegantBeef> `<tag /> message` doesnt work in the parser |
00:34:27 | FromDiscord | <ajusa> that seems... fine? It parses one p tag and then one text? |
00:35:21 | FromDiscord | <ElegantBeef> That's the same as https://play.nim-lang.org/#ix=2UH2 |
00:35:30 | FromDiscord | <ElegantBeef> Atleast according to your browser |
00:36:15 | FromDiscord | <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:28 | FromDiscord | <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:27 | ForumUpdaterBot | New thread by Rozzamarine: AutoNim [AutoIt X3 wrapper], see https://forum.nim-lang.org/t/7732 |
06:45:03 | ForumUpdaterBot | New 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:19 | FromGitter | <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:06 | FromDiscord | <ElegantBeef> if you mark it with `` it'll be exported |
06:53:11 | FromDiscord | <ElegantBeef> `const yourSillyVar = 100` |
07:03:41 | FromDiscord | <demotomohiro> You can export var/let/const/proc/template/macro by adding `` after identifier in Nim. |
07:04:03 | narimiran | * is not seen on IRC |
07:04:24 | FromDiscord | <ElegantBeef> Oh right |
07:04:28 | * | thewrinklyninja joined #nim |
07:04:32 | FromDiscord | <ElegantBeef> turns into less than equal to iirc |
07:05:01 | FromDiscord | <demotomohiro> can be seen without `? |
07:05:25 | FromDiscord | <ElegantBeef> Nope it's still `>=` on the logs |
07:05:33 | FromDiscord | <ElegantBeef> https://irclogs.nim-lang.org/ can view the irc here if you dont have a client |
07:06:27 | FromDiscord | <demotomohiro> '' can work? |
07:06:40 | FromDiscord | <ElegantBeef> Nope 😄 |
07:06:50 | FromDiscord | <ElegantBeef> Probably not even \ |
07:07:20 | FromDiscord | <demotomohiro> \ or "" work? |
07:07:43 | FromDiscord | <ElegantBeef> The bridge doesnt like the asterix |
07:07:52 | FromDiscord | <demotomohiro> backslash or double quote doesn't work 😦 |
07:08:12 | FromDiscord | <ElegantBeef> Go make an issue on ircord |
07:10:54 | FromDiscord | <Yardanico> I know about it already |
07:29:04 | * | lritter joined #nim |
07:50:34 | FromDiscord | <flywind> why emitting symbols with backticks is deprecated? |
07:50:38 | FromDiscord | <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:56 | FromDiscord | <flywind> They should work like `asm`? But asming something with backticks is not deprecated. |
07:51:59 | FromDiscord | <flywind> https://nim-lang.github.io/Nim/manual.html#statements-and-expressions-assembler-statement |
07:53:12 | FromDiscord | <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:16 | Clonkk[m] | Importing threadpool make valgrind detect a memory leak. Is it a false positive or is that a bug in threadpool ? |
08:16:52 | FromDiscord | <flywind> full messages? |
08:17:37 | Clonkk[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:53 | Clonkk[m] | Tell me if it's not lisible |
08:17:56 | FromDiscord | <flywind> github gist or |
08:18:05 | Clonkk[m] | * Tell me if it's not readable |
08:18:30 | Clonkk[m] | Otherwise I can just open an issue if you suspect it's a bug |
08:18:37 | Clonkk[m] | I have a reproducible example |
08:20:21 | * | narimiran quit (Ping timeout: 260 seconds) |
08:23:11 | FromDiscord | <flywind> not sure, may be a global variable |
08:25:14 | Clonkk[m] | https://gist.github.com/Clonkk/032b4366e0dc17f79103d5bb23968e88 . The code is straight up a echo "hello world" in a proc. |
08:25:42 | Clonkk[m] | This is on Nim v1.4.4 btw |
08:25:57 | FromDiscord | <ElegantBeef> not using `-d:useMalloc`? |
08:26:49 | Clonkk[m] | Tried both |
08:26:52 | Clonkk[m] | With and without |
08:26:54 | Clonkk[m] | Same result |
08:27:05 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/827096720269639710/unknown.png |
08:27:25 | FromDiscord | <flywind> Some variables are just never freed and cleaned by OS. |
08:27:45 | FromDiscord | <flywind> (edit) "Some ... variablesmay" added "pointer" | "are" => "may be" |
08:30:47 | Clonkk[m] | So is that normal behaviour then ? |
08:32:26 | FromDiscord | <flywind> I guess so. |
08:32:27 | FromDiscord | <flywind> You should use `-d:useMalloc` and `arc`. |
08:32:55 | FromDiscord | <flywind> `useMalloc` doesn't work with `refc`. |
08:33:49 | Clonkk[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:29 | FromDiscord | <flywind> I see |
08:42:37 | * | Vladar joined #nim |
08:48:12 | * | haxscramper joined #nim |
08:52:19 | Clonkk[m] | I opened an issue https://github.com/nim-lang/Nim/issues/17609 so we have a trace |
08:56:59 | FromDiscord | <Yardanico> you should also use --debugger:native in the future |
08:57:20 | Clonkk[m] | For valgrind ? |
08:57:41 | FromDiscord | <Yardanico> yes |
08:57:49 | FromDiscord | <Yardanico> it'll output nim source lines in the leak info then |
08:58:42 | FromDiscord | <Yardanico> @Clonkk let me guess - your CPU has 12 threads? :) |
08:59:51 | Clonkk[m] | Yes :) |
09:00:08 | FromDiscord | <Yardanico> see, it's not a leak |
09:00:13 | FromDiscord | <Yardanico> threadpool works on _threads_ |
09:00:23 | FromDiscord | <Yardanico> it has to start N threads, where N is number of your logical CPUs |
09:00:28 | Clonkk[m] | Threads can be free'd at exit |
09:00:33 | FromDiscord | <Yardanico> but there's no need to |
09:00:35 | FromDiscord | <Yardanico> since the OS will do it |
09:00:41 | FromDiscord | <Yardanico> and generally we don't do it for global variables either |
09:01:00 | Clonkk[m] | Hmm |
09:01:21 | Clonkk[m] | I generally don't like to rely on the OS to clean memory at the end of the process. |
09:01:55 | FromDiscord | <Yardanico> you can open an RFC then I guess |
09:02:10 | Clonkk[m] | How does htat work with RTOS ? |
09:02:25 | FromDiscord | <Yardanico> ? |
09:02:41 | FromDiscord | <Rika> Real time OS I believe? |
09:02:52 | Clonkk[m] | Yes |
09:02:58 | FromDiscord | <Yardanico> I know what is RTOS, my question is how it relates to this |
09:03:02 | Clonkk[m] | EMbedded, close to baremetal OS thatwill define task instead of thraed usually |
09:03:19 | Clonkk[m] | Do you forbid the usage of said module ? |
09:04:23 | FromDiscord | <Rika> Threads uses OS threading |
09:04:34 | FromDiscord | <Yardanico> yeah, threadpool won't really work there anyway |
09:05:37 | Clonkk[m] | Okay |
09:05:41 | FromDiscord | <Yardanico> still not sure if I follow, even RTOSes clean up memory after your tasks |
09:05:56 | FromDiscord | <Yardanico> i mean some do, maybe not all 🤔 |
09:08:06 | FromDiscord | <Yardanico> generally bad leaks are only the ones that are "definitely lost" |
09:08:34 | FromDiscord | <Yardanico> also clang's MSAN doesn't report any errors with threadpool |
09:08:47 | FromDiscord | <Yardanico> https://clang.llvm.org/docs/MemorySanitizer.html |
09:09:00 | Clonkk[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:20 | Clonkk[m] | But yeah that may be irrelevant as for RTOS you want to manage threads manually anyway |
09:09:59 | Clonkk[m] | <FromDiscord "<Yardanico> also clang's MSAN do"> Interesting |
09:10:32 | * | krux02 joined #nim |
09:12:32 | FromDiscord | <Yardanico> also MSAN is usually faster than valgrind |
09:12:51 | FromDiscord | <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:58 | FromDiscord | <Yardanico> clang's MSAN does that in the compilation step |
09:13:27 | Clonkk[m] | Do you need to build clang witha particular option ? |
09:13:38 | FromDiscord | <Yardanico> no, but you need to build your program with specific options |
09:13:50 | FromDiscord | <Yardanico> nim c --cc:clang --passC:"-fsanitize=memory" --passL:"-fsanitize=memory" myfile.nim |
09:13:54 | Clonkk[m] | I get a lot of undefined reference when compiling using CLANG and --passC:-fsanitize=memory |
09:14:02 | FromDiscord | <Yardanico> well you should link it too |
09:14:11 | FromDiscord | <Yardanico> also add --debugger:native -d:useMalloc of course |
09:14:30 | Clonkk[m] | Ah I was missing --passL |
09:18:00 | Clonkk[m] | Thanks for the tips Yardanico . All this started because I was trying to investigate potential memory leak in my own code |
09:18:29 | FromDiscord | <Yardanico> if the code is open I can try to help :) |
09:18:40 | Clonkk[m] | Most of it is not :) |
09:20:06 | Clonkk[m] | Ah but it stops at the first error |
09:21:01 | FromDiscord | <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:34 | Clonkk[m] | I load some shared library which have uninitialzed heap memory allocated |
09:21:50 | Clonkk[m] | Ironic, since the library in question is libLLVM actually |
09:22:23 | FromDiscord | <Yardanico> you can build libLLVM with MSAN if you want :D |
09:22:26 | Clonkk[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:49 | Clonkk[m] | <FromDiscord "<Yardanico> you can build libLLV"> libjulia.so depends on libllvm so I'd have to rebuild LLVM then Julia |
09:22:55 | Clonkk[m] | That'd be a pain in the ass |
09:26:11 | FromDiscord | <Yardanico> there is such an option |
09:26:11 | FromDiscord | <Yardanico> -fsanitize-recover=memory |
09:26:22 | FromDiscord | <Yardanico> https://github.com/google/sanitizers/wiki/AddressSanitizer#faq |
09:35:00 | Clonkk[m] | I need to read more about CLANG and LLVM they seem to have some cool tools |
09:36:57 | FromDiscord | <Yardanico> Clang is not an acronym :) |
09:37:01 | FromDiscord | <Yardanico> Nim, Clang |
09:37:55 | FromDiscord | <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:39 | Clonkk[m] | And here I thought Nim was pro case-insensitive ;), |
09:39:08 | FromDiscord | <Yardanico> but you don't name your variables tEST do you |
09:39:14 | FromDiscord | <Yardanico> or use keywords like pROC (this is completely valid) |
09:39:25 | Clonkk[m] | No, I prefer pRoC and tEsT |
09:39:30 | FromDiscord | <Yardanico> mmm |
09:40:02 | Clonkk[m] | Nah I use a perfectly healthy combination of snake case and camel case like a normal degenerate |
09:40:02 | FromDiscord | <Yardanico> also waiting for some april fools threads on the nim forum |
09:40:14 | FromDiscord | <Yardanico> i want something as cool as https://forum.nim-lang.org/t/6136 :) |
09:40:29 | Clonkk[m] | That one was fun |
09:41:04 | FromDiscord | <Yardanico> also, even in that thread - a person who wrote NIM |
09:55:00 | * | waleee-cl joined #nim |
09:57:06 | ForumUpdaterBot | New thread by Stefan_Salewski: Error: unhandled exception: invalid object assignment, see https://forum.nim-lang.org/t/7733 |
10:14:26 | Clonkk[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:14 | FromDiscord | <Yardanico> maybe it's C vs C++ backend difference in your case? |
10:17:36 | * | hsh__ joined #nim |
10:17:46 | Clonkk[m] | Some dependencies I use do not support C backend |
10:18:02 | * | Tlangir quit (Remote host closed the connection) |
10:18:21 | Clonkk[m] | g++ didn't have any issue |
10:18:33 | Clonkk[m] | fg |
10:20:22 | FromDiscord | <Yardanico> fg? |
10:20:44 | Clonkk[m] | I use Vim, ctrl+z to compile and fg to re-open the editor |
10:20:54 | Clonkk[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:38 | FromDiscord | <jtiai> When trying to convert int to string I get `Error: system module needs: nimIntToStr` |
12:49:15 | ForumUpdaterBot | New post on r/nim by sotolf2: Illwill text input, see https://reddit.com/r/nim/comments/mhukgt/illwill_text_input/ |
12:51:32 | ForumUpdaterBot | New 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:21 | filcuc | Why i can't use lambda with generic? https://play.nim-lang.org/#ix=2UJd |
13:05:11 | filcuc | probably i'm wrongly thinking that nim traits generics like C++ does |
13:15:07 | FromDiscord | <Solitude> you can use them with generic https://play.nim-lang.org/#ix=2UJh |
13:15:56 | krux02 | filcuc, when passing the lambda to test, the argument T must be a fully resolved type. |
13:16:16 | krux02 | and name doesn't have a type yet. |
13:25:05 | filcuc | ok thank you guys |
13:27:44 | filcuc | maybe i can relax my espectations. I'm trying to complete the QObject connection style in my NimQml bindings |
13:27:56 | filcuc | and i wanted something like this QObject.connect(c1, nameChanged, c2, name => c2.setName(name)) |
13:28:33 | filcuc | this already work connect(c1, nameChanged, c2, proc(name: string) = c2.setName(name)) |
13:29:56 | filcuc | this already work connect(c1, nameChanged, c2, proc(name: string) = c2.setName(name)) |
13:30:06 | filcuc | ops sorry for the double post :) |
13:32:34 | krux02 | filcuc, why don't you try to make it work with `QObject.connect(c1, nameChanged, c2, setName)` |
13:35:12 | filcuc | krux02: already work :D |
13:36:02 | filcuc | krux02: i want to support also lambdas in addition to play procDefs and methodDefs |
13:36:17 | filcuc | *plain* |
13:39:14 | filcuc | krux02: https://github.com/filcuc/nimqml/blob/edba82c2f6257338b36263bf222626e102359737/examples/connections/main.nim#L202 |
13:39:47 | filcuc | krux02: obviously it's still a work in progress |
13:43:07 | FromDiscord | <Unaimend> Is there a package to parse dot files from graphviz? |
13:45:10 | krux02 | filcuc, what you might do is, make the `connect` macro a bit smarter and let it process the `=>` expression. |
13:46:15 | krux02 | so when the right is an expression of `ident => <expr>` then convert it into something that already works |
13:47:31 | filcuc | krux02: i was thinking something like do quote: connect(sender, senderFunc, proc(name: string) = lambda(name)) |
13:47:31 | krux02 | so `connect(..., name => c2.setName)` will be converted to `connect(..., proc(name: string) = c2.setName(name))` |
13:47:54 | filcuc | krux02: yep that could be another solution |
13:48:13 | filcuc | krux02: maybe i can delay the support for "sugar" lambdas |
13:48:26 | FromDiscord | <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:33 | krux02 | and the type for `name` you can extract from the second argument (nameChanged) |
13:48:47 | filcuc | and simply complete what i have done so far |
13:49:02 | krux02 | yes |
13:49:17 | FromDiscord | <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:01 | FromDiscord | <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:48 | krux02 | filcuc, if you do what I suggested, you don't need to import sugar anymore, since the `=>` is processced by the connect macro |
13:56:25 | krux02 | but the last argument of the connect macro must be untyped otherwise you get the error for `=>` too early. |
13:58:01 | filcuc | krux02: 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:27 | filcuc | i would like also to remove all examples and create a "TODO" list like app for showing list models and qobject connections |
14:17:54 | FromDiscord | <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:29 | filcuc | is there an easy way for specifing a specific function in case of overloads? based on the first param the function? |
15:27:58 | FromDiscord | <Rika> wdym? nim has overloading so |
15:31:01 | filcuc | supposing 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:14 | filcuc | i would like to select the first one |
15:31:36 | filcuc | obviously i can "let callback: proc(T) = bar" |
15:32:07 | filcuc | if ask if there're other solutions |
15:32:54 | FromDiscord | <Rika> i dont think so, no |
15:38:18 | FromDiscord | <Solitude> In reply to @filcuc "supposing i've a type": i think you can select by providing arguemtn types |
15:40:06 | FromDiscord | <Rika> the proc isnt generic is it? or do you mean `bar(T)`? |
15:40:18 | filcuc | in 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:19 | FromDiscord | <Solitude> https://nim-lang.org/docs/manual.html#statements-and-expressions-type-conversions |
15:40:45 | filcuc | basically in the macro i've to select the correct overload of "foo" that matches "a" |
15:41:07 | filcuc | basically i've to reiplement the compiler algorithm |
15:43:10 | filcuc | in other words: cumbersome |
15:45:02 | FromDiscord | <Rika> why cant you simply emit the `foo(a)`? |
15:46:03 | filcuc | i wanted to check that foo had a custom pragma |
15:47:20 | filcuc | and i would like to obtain also some info from the proc definitions (like how many arguments it has and their types) |
15:47:28 | filcuc | so i've to select the correct proc overload |
15:47:49 | FromDiscord | <Rika> i see |
15:48:14 | filcuc | maybe i'm pushing the macro too far |
15:48:14 | FromDiscord | <Rika> is your macro taking in `typed` |
15:48:19 | filcuc | yes |
15:49:45 | filcuc | right 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:49 | FromDiscord | <brainproxy> sent a long message, see https://paste.rs/yI5 |
16:52:06 | FromDiscord | <brainproxy> (edit) "http://ix.io/2UKn" => "http://ix.io/2UKo" |
16:56:34 | * | tane joined #nim |
17:02:02 | ForumUpdaterBot | New thread by Clonk: =copy with different arguments type, is it a good idea ? , see https://forum.nim-lang.org/t/7735 |
17:22:35 | FromDiscord | <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:33 | FromDiscord | <exelotl> wait wtf I can't believe that was a year ago lol |
17:26:29 | FromDiscord | <sheerluck> Or maybe how he finally decided to switch to Gentoo Linux? |
17:27:57 | FromDiscord | <usera> hi all, i hope this is the right place for dumb questions 😛 |
17:28:22 | Prestige | Yep! Go ahead and ask |
17:28:49 | FromDiscord | <usera> sent a code paste, see https://play.nim-lang.org/#ix=2UKG |
17:29:05 | FromDiscord | <usera> i know there is a caveat when it comes to threading but this is a strait call . |
17:29:13 | FromDiscord | <Rika> export it |
17:29:27 | FromDiscord | <Rika> add an asterisk after `logger` |
17:30:39 | FromDiscord | <usera> sent a code paste, see https://play.nim-lang.org/#ix=2UKH |
17:31:12 | FromDiscord | <Rika> wdym no? |
17:32:00 | FromDiscord | <usera> Error: undeclared identifier: 'logger' |
17:33:09 | FromDiscord | <Rika> oh `main` is importing `test`? |
17:33:21 | FromDiscord | <Rika> nah test has to import main if you want to use logger |
17:34:19 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2UKI |
17:34:28 | FromDiscord | <Rika> then test can import main (at the top) just fine |
17:34:54 | FromDiscord | <Rika> (i think? |
17:35:06 | FromDiscord | <Rika> i forget, its been a while since i had to deal with a circular |
17:37:16 | FromDiscord | <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:33 | FromDiscord | <Rika> there is no fixed entry point |
17:37:51 | FromDiscord | <Rika> main isnt "special" in nim |
17:39:15 | FromDiscord | <usera> i call it main, but all my "calls" are effectively called from that file . but its an assumption on my side. |
17:39:42 | FromDiscord | <Rika> nothing is exported by default |
17:39:58 | FromDiscord | <usera> is there a better way of doing logging then this way (and aside from passing it to every proc) |
17:40:11 | FromDiscord | <Rika> idts? |
17:41:05 | FromDiscord | <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:38 | liblq-dev | is it possible to force some object to not outlive another object? |
20:42:00 | liblq-dev | or, at least, limit the object's lifetime so that it can't be moved etc.? |
20:42:09 | liblq-dev | s/lifetime/hooks |
20:49:33 | * | filcuc joined #nim |
21:03:20 | FromDiscord | <Yardanico> you can make =sink {.error.} I think |
21:03:59 | FromDiscord | <Yardanico> or actually just error out = so you can't assign it to anything else or something |
21:04:03 | FromDiscord | <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:16 | liblq-dev | @Yardanico you have any docs on `=`? |
22:16:19 | liblq-dev | can't find it in the manual |
22:16:28 | liblq-dev | and the destructors manual |
22:16:46 | FromDiscord | <Yardanico> there's no = |
22:16:56 | FromDiscord | <Yardanico> = became =copy so = is technically "free" right now |
22:16:58 | FromDiscord | <Yardanico> check #nim-science |
22:17:06 | liblq-dev | right |
22:17:10 | FromDiscord | <Yardanico> @clyybber said "I renamed = to =copy so that we would eventually be able to overload = like that" |
22:17:38 | liblq-dev | i suppose if i pass a .byref object into a procedure, it doesn't trigger =copy? |
22:17:48 | FromDiscord | <Yardanico> you can always check :P |
22:18:08 | FromDiscord | <Yardanico> make =copy an error or output a warning at compile time and see if that code triggers =copy |
22:20:54 | liblq-dev | hm doesn't seem to =copy |
22:20:56 | liblq-dev | i'll ban it then |
22:22:34 | FromDiscord | <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:42 | FromDiscord | <brainproxy> is there a workaround? |
22:27:01 | * | tane quit (Quit: Leaving) |
22:31:07 | FromDiscord | <dom96> haven't seen nor heard of this before, I do myself use Windows and haven't noticed this |
22:31:37 | FromDiscord | <dom96> What terminal are you using? |
22:31:57 | FromDiscord | <brainproxy> msys2 |
22:32:39 | FromDiscord | <brainproxy> if I bulid and don't run, then invoke the executable independently from the nimble task, ctrl-c works just fine |
22:34:10 | FromDiscord | <dom96> I'm using the new Windows Terminal and it works fine |
22:42:54 | * | whitefly quit (Remote host closed the connection) |
22:54:22 | FromDiscord | <brainproxy> eh, maybe related to this ancient `wont-fix`: https://sourceforge.net/p/msys2/tickets/135/ |
22:55:24 | FromDiscord | <brainproxy> seemingly connected to this, which is even more ancient: https://sourceforge.net/p/mingw/bugs/845/ |
22:55:27 | FromDiscord | <brainproxy> 2005!! |
22:56:55 | FromDiscord | <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:46 | FromDiscord | <clyybber> In reply to @liblq-dev "i suppose if i": even with bycopy it won't |
23:26:57 | FromDiscord | <clyybber> bycopy/byref aren't directly related to =copy |
23:27:19 | FromDiscord | <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:33 | FromDiscord | <exelotl> oh that's good to know |
23:57:28 | * | krux02 quit (Remote host closed the connection) |