00:24:58 | FromDiscord | <exelotl> hmm yeah I guess it can't work out because `=sink` is supposed to be equivalent to "destroy A, copy B into A, destroy B" in one, and there's no such thing as half a sink |
00:26:02 | FromDiscord | <exelotl> (edit) "A, destroy B"" => "A"" |
00:31:17 | FromDiscord | <retkid> does anyone know of a database of people |
00:31:22 | FromDiscord | <retkid> of notable living people |
00:31:35 | FromDiscord | <retkid> wikipedia is a bit unrelyable for this |
00:36:55 | * | ltriant quit (Ping timeout: 258 seconds) |
00:37:16 | FromDiscord | <huantian> I mean i would just use wikimedia |
00:38:15 | FromDiscord | <huantian> but yeah it's imperfect |
02:05:51 | * | ltriant joined #nim |
02:11:59 | FromDiscord | <spoon> imdb |
02:12:15 | FromDiscord | <spoon> yellowpages |
02:23:17 | * | ltriant quit (Ping timeout: 255 seconds) |
02:24:59 | * | ltriant joined #nim |
02:29:38 | * | vicecea quit (Remote host closed the connection) |
02:30:08 | * | vicecea joined #nim |
03:02:52 | * | ltriant quit (Ping timeout: 260 seconds) |
03:09:04 | * | wallabra_ joined #nim |
03:10:40 | * | wallabra quit (Ping timeout: 260 seconds) |
03:10:58 | * | wallabra_ is now known as wallabra |
03:33:30 | * | ltriant joined #nim |
06:37:12 | Yardanico | om3ga: your issue is a good repro example, but there are two things that are kinda wrong in the code (the data race occurs even if you fix them)- |
06:37:26 | Yardanico | firstly, the lock must be global, if it's local, then each thread obviously has its own lock :D |
06:37:41 | Yardanico | and same applies to threads, the threads array must be a global variable, it's not really supposed to be defined inside the proc |
06:38:07 | Yardanico | with that there are actually no data races in your code |
06:38:25 | Yardanico | (got mistaken and didn't also remove the "var lock: Lock" line) |
06:39:20 | FromDiscord | <Yardanico> i've posted the fixed code in the issue |
06:42:18 | Yardanico | i know that your code has a global lock (btw, you don't need the "global" pragma for a global variable) but local proc threads array (although i don't think it'll affect the results), but still, seems like you'll have to find another repro example of the data race occuring |
06:42:37 | Yardanico | just to confirm - are there any data race with --gc:arc -d:useMalloc ? |
06:47:26 | * | PMunch joined #nim |
06:47:35 | * | pch_ joined #nim |
06:49:43 | * | koltrast_ joined #nim |
06:56:42 | * | ehmry quit (*.net *.split) |
06:56:43 | * | pch quit (*.net *.split) |
06:56:43 | * | Jjp137 quit (*.net *.split) |
06:56:43 | * | lain quit (*.net *.split) |
06:56:43 | * | koltrast quit (*.net *.split) |
06:56:43 | * | Onionhammer quit (*.net *.split) |
07:01:40 | * | lain joined #nim |
07:01:40 | * | Onionhammer joined #nim |
07:11:47 | * | jjido joined #nim |
07:20:02 | * | gsalazar joined #nim |
07:23:47 | * | ltriant quit (Ping timeout: 240 seconds) |
07:32:03 | om3ga | Yardanico, thanks, I just read your reply |
07:32:37 | om3ga | I will check again, but yesterday I tested all declarations of lock |
07:35:18 | FromDiscord | <Yardanico> yes, my point is that your minimal repro doesn't really represent then bug you're having I think |
07:35:38 | FromDiscord | <Yardanico> just have locks/threads as globals, and work from that (without trying to change their location) |
07:40:22 | om3ga | Yardanico, right. I'll test again. strange but by using posix mutex we had to initialize it in loop body : https://redmine.lighttpd.net/projects/1/wiki/HowtoSpeedUpStatWithFastcgi |
07:41:04 | FromDiscord | <Yardanico> @om3ga it uses "static" which actually makes the variable global in C |
07:41:06 | FromDiscord | <Yardanico> that code i mean |
07:41:20 | FromDiscord | <Yardanico> `static pthread_mutex_t accept_mutex = PTHREAD_MUTEX_INITIALIZER;` |
07:41:43 | om3ga | yes. I tried that too, but seems in nim 'statis' works differently |
07:41:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzβ¦) |
07:41:56 | om3ga | [.globa;.] if I'm not wrong right? |
07:41:59 | FromDiscord | <Yardanico> i'm not saying you should try it |
07:42:12 | FromDiscord | <Yardanico> I'm saying you should just declare it as a global variable, since it'll essentially behave the same |
07:42:18 | FromDiscord | <Yardanico> just define at the module level, not in the procs |
07:42:23 | FromDiscord | <Yardanico> no need for any pragmas |
07:42:37 | om3ga | Yardanico, sure. I'm testing that right now |
07:43:40 | FromDiscord | <my mom said> what is Nim's equivalent of python's .append()? |
07:43:49 | FromDiscord | <Yardanico> `add` |
07:45:16 | FromDiscord | <my mom said> sent a code paste, see https://play.nim-lang.org/#ix=3YxQ |
07:45:28 | FromDiscord | <Elegantbeef> Compiler errors are amazing |
07:45:36 | FromDiscord | <Yardanico> In reply to @uncle jim "ik this might be": because arrays are fixed-length |
07:45:47 | FromDiscord | <Yardanico> if you want something like python list, use a sequence |
07:45:59 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3YxR |
07:46:06 | FromDiscord | <my mom said> sent a code paste, see https://play.nim-lang.org/#ix=3YxS |
07:46:47 | FromDiscord | <my mom said> thenks |
08:02:20 | om3ga | Yardanico, thanks. I can confirm it works with the example. But unfortunately not with my app server :) but this is different story. I will close the issue. Thank you! |
08:04:19 | om3ga | I mean with my app server, there still some requests "hang". Looks like I should investigate in moree deep |
08:05:32 | FromDiscord | <Clonkk> Is there a maximal depth to which you can pass a `βar ` argument ? I get a weird error message `obj' is of type <var MyRefType> which cannot be captured as it would violate memory safety` |
08:05:53 | FromDiscord | <Elegantbeef> You're making a closure of a `var ref T` |
08:06:01 | FromDiscord | <Elegantbeef> you dont want the `var` part you want the `ref` part |
08:06:17 | FromDiscord | <Elegantbeef> so you need something like `let myRef = myRefParam` then use `myRef` |
08:06:45 | FromDiscord | <Clonkk> I don't have a choice of the `var ref` because an extrernal library expects it |
08:06:52 | FromDiscord | <Clonkk> And as far as I know I don't have closure \:/ |
08:06:53 | FromDiscord | <Elegantbeef> That's not what i said |
08:07:00 | FromDiscord | <Elegantbeef> What's the error line? |
08:07:09 | FromDiscord | <Clonkk> A template |
08:07:15 | FromDiscord | <Elegantbeef> Code i want code |
08:08:04 | FromDiscord | <Clonkk> It gets rather long I'll see if I can make a reduced example |
08:08:21 | FromDiscord | <Elegantbeef> If there is no closure being made this is a bug |
08:09:06 | FromDiscord | <Clonkk> Ah yeah fuck me. I declare proc inside a template called by a template |
08:09:35 | FromDiscord | <Elegantbeef> Just alias the reference and you'll be golden |
08:10:16 | FromDiscord | <Elegantbeef> Type thing |
08:10:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3YxX |
08:11:05 | om3ga | <Yardanico> just to confirm - are there any data race with --gc:arc -d:useMalloc ? <---- trying that too |
08:11:58 | FromDiscord | <Clonkk> It's annoying that you do not get a stack trace when this happens. BUt yeah the workaround worked |
08:12:06 | FromDiscord | <Clonkk> thanks |
08:12:36 | FromDiscord | <Elegantbeef> No problem, yea something like thread analyis/side effect would be nice |
08:13:01 | FromDiscord | <Elegantbeef> Where it goes through and says the exact call path |
08:33:21 | FromDiscord | <fwsgonzo> Hey all, I am wondering if Nim has a leaky GC mode? |
08:33:38 | FromDiscord | <fwsgonzo> Imagine that I am running a program for a tiny amount of time and then discarding it completely |
08:33:41 | FromDiscord | <Elegantbeef> `--gc:none` will leak all normally GC'd memory |
08:33:47 | FromDiscord | <fwsgonzo> aha, that's awesome - thanks |
08:33:53 | FromDiscord | <Elegantbeef> `--gc:arc` is generally just as fast though so uhhh have fun π |
08:33:57 | NimEventer | New thread by Arnetheduck: `nlvm` updated to 1.6, see https://forum.nim-lang.org/t/9170 |
08:34:25 | FromDiscord | <fwsgonzo> that might be, but there are latency requirements, so any (tiny) amount of time not dedicated to the task is detrimental |
08:35:28 | FromDiscord | <fwsgonzo> I wonder if ARC uses atomic operations? |
08:36:59 | FromDiscord | <Elegantbeef> I dont think so, i dont really know |
08:37:25 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Yy8 |
08:39:02 | FromDiscord | <Elegantbeef> Not with `&` |
08:40:01 | FromDiscord | <jmgomez> ohh |
08:40:45 | FromDiscord | <jmgomez> ok in that case I think I would just join the pragmas of the types into the product type and that should work as workaround |
08:40:55 | FromDiscord | <jmgomez> thanks! |
08:41:09 | FromDiscord | <Elegantbeef> Yea i think you have it |
08:41:25 | FromDiscord | <Elegantbeef> `type MyType {.product: [Test1, Test2].} = object` |
08:42:29 | FromDiscord | <jmgomez> I actually like that syntax! |
08:42:58 | * | arkurious joined #nim |
08:44:55 | FromDiscord | <Elegantbeef> Yea the nice thing is you can specify `ref` or `object` |
08:49:58 | NimEventer | New thread by Cmc: Hooray! Fresh Arch Linux Nim package, see https://forum.nim-lang.org/t/9171 |
08:52:40 | om3ga | great. but I use now choosenim |
08:57:26 | FromDiscord | <jmgomez> In reply to @Elegantbeef "`type MyType {.product: [Test1,": what signature should the macro have? Im trying with openarray[typedesc] but it doesnt like it |
08:57:48 | FromDiscord | <Elegantbeef> `varargs[typed]` |
08:58:02 | FromDiscord | <Elegantbeef> or `openarray[typed]` perhaps |
08:58:10 | FromDiscord | <Elegantbeef> Doubt that'd work |
08:58:57 | PMunch | Not quite sure what they mean, the package still says 1.4.6 |
08:59:08 | * | Jjp137 joined #nim |
08:59:13 | FromDiscord | <Elegantbeef> Who means what? |
08:59:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/kkk |
08:59:48 | * | ehmry joined #nim |
08:59:56 | PMunch | The person who posted on the forum. Not sure what they mean that Arch package is updated.. |
09:00:11 | FromDiscord | <j-james> i see 1.6.6 |
09:00:38 | FromDiscord | <j-james> i'm thrilled, i brought it up on arch irc a few days ago |
09:01:35 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Yyg |
09:02:09 | FromDiscord | <jmgomez> typedesc works too I was missing the second argument, Im such a noob lol |
09:02:22 | FromDiscord | <Elegantbeef> Look at this noob, point and laugh |
09:02:28 | FromDiscord | <jmgomez> xD |
09:02:32 | * | kayabaNerve left #nim (Leaving) |
09:02:35 | FromDiscord | <Elegantbeef> Fucking getting help from beef, what a sorry sight |
09:02:57 | FromDiscord | <jmgomez> what's the difference between typed and untyped in the macro context? |
09:03:13 | FromDiscord | <Elegantbeef> typed is semantically looked up so `ident`s are `sym` |
09:03:18 | FromDiscord | <jmgomez> (edit) "untyped" => "typedesc sorry" |
09:03:21 | FromDiscord | <Elegantbeef> Untyped is not checked so it doesnt have to be valid code |
09:03:33 | FromDiscord | <jmgomez> (edit) "sorry" => "(sorry)" |
09:03:57 | FromDiscord | <Elegantbeef> you can think of it as `untyped` just has to parse and `typed` has to compile |
09:04:34 | FromDiscord | <jmgomez> I meant typedesc, but now that opens the question with sym vs ident. So symbols are already correctly parsed noded? |
09:04:51 | FromDiscord | <Elegantbeef> They're semantically checked which means you can query information from them |
09:05:09 | FromDiscord | <jmgomez> information like getImpl? |
09:05:38 | FromDiscord | <Elegantbeef> Yes |
09:05:39 | FromDiscord | <Elegantbeef> Any introspection requires code to be typed |
09:06:24 | FromDiscord | <jmgomez> gotcha, and typedesc? is it interchangeable with typed? |
09:06:31 | FromDiscord | <Elegantbeef> no |
09:06:39 | FromDiscord | <Elegantbeef> Typedesc is a type description |
09:06:59 | FromDiscord | <Elegantbeef> It's a specialized parameters for being able to pass type names around |
09:07:10 | * | blackbeard420_ joined #nim |
09:07:14 | FromDiscord | <jmgomez> gotcha! |
09:07:59 | * | blackbeard420 quit (Ping timeout: 240 seconds) |
09:17:01 | * | keypey joined #nim |
09:20:11 | NimEventer | New post on r/nim by mavavilj: Stan in Nim?, see https://reddit.com/r/nim/comments/uxdfqx/stan_in_nim/ |
09:21:42 | PMunch | @j-james, where do you see that? |
09:29:19 | FromDiscord | <Yardanico> In reply to @PMunch "@j-james, where do you": on the package itself? |
09:29:29 | FromDiscord | <Yardanico> https://archlinux.org/packages/community/x86_64/nim/ but yeah they just updated it, didn't fix any bugs |
09:30:20 | * | keypey quit (Quit: Leaving) |
09:36:25 | PMunch | Aah, I was searching in AUR.. |
09:36:33 | PMunch | Didn't know we had an official package |
09:37:13 | PMunch | What do you mean it didn't fix any bugs though? |
09:39:43 | FromDiscord | <my mom said> sent a code paste, see https://paste.rs/k0b |
09:40:26 | FromDiscord | <Elegantbeef> `stdout.write` followed by `stdout.flushFile` |
09:44:48 | FromDiscord | <my mom said> In reply to @Elegantbeef "`stdout.write` followed by `stdout.flushFile`": ummmmm but i have a proc with the argument being printed out |
09:45:10 | FromDiscord | <Yardanico> you're either usign `echo` or `writeLine` which both output a full line with a newline |
09:45:29 | FromDiscord | <Yardanico> to output a character/string without a newline use `write` |
09:45:54 | FromDiscord | <jmgomez> sent a code paste, see https://paste.rs/jRt |
09:46:46 | FromDiscord | <aMOPel> sent a long message, see http://ix.io/3Yyr |
09:47:04 | FromDiscord | <my mom said> In reply to @Yardanico "to output a character/string": fuck me i don't underatand! |
09:47:09 | FromDiscord | <my mom said> (edit) "underatand!" => "understand!" |
09:48:23 | FromDiscord | <my mom said π> i have this proc which prints out this |
09:48:55 | FromDiscord | <my mom said π> sent a code paste, see https://play.nim-lang.org/#ix= |
09:49:47 | FromDiscord | <Yardanico> can't help without code, and i don't get if you're trying to joke or not |
09:49:58 | FromDiscord | <Yardanico> In reply to @aMOPel "hey there, I posted": probably better if you ask this in #internals or on the forum |
09:50:03 | FromDiscord | <my mom said π> bruh i got it |
09:50:17 | FromDiscord | <my mom said π> nvm |
09:50:21 | FromDiscord | <my mom said π> In reply to @Yardanico "can't help without code,": joke? |
09:51:02 | FromDiscord | <aMOPel> In reply to @Yardanico "probably better if you": thanks |
09:51:41 | FromDiscord | <my mom said π> (edit) "In reply to @Yardanico "can't help without code,": ... joke?" added "why do you think i am trying" |
09:53:04 | PMunch | @aMOPel, doesn't Nim already have a treesitter algorithm implemented? |
09:53:16 | FromDiscord | <Rika> It does? |
09:53:16 | FromDiscord | <aMOPel> It does? |
09:54:23 | PMunch | Aah, I think I was mixing it up with the treesitter wrapper that is used by nimterop |
09:55:06 | FromDiscord | <aMOPel> I didn't find a separate parser repo, and searching 'treesitter' or 'tree-sitter' in the gh repo doesn't yield any code |
09:56:47 | FromDiscord | <aMOPel> In reply to @PMunch "Aah, I think I": https://github.com/genotrance/nimtreesitter you mean this? yes, that's not a parser |
09:58:48 | FromDiscord | <Rika> Someone tried making a syntax but I think they stopped for some reason |
09:58:51 | FromDiscord | <Rika> I donβt know what reason |
09:59:05 | PMunch | @aMOPel, wild guess is that the syntax of that grammer is pegs |
09:59:12 | FromDiscord | <Rika> I believe it was Leorize who tried |
10:00:07 | FromDiscord | <aMOPel> atm there are 2 unfinished repos on gh named after the ts parser naming convention 'tree-sitter-nim' |
10:00:22 | PMunch | I.e. this thing: https://nim-lang.org/docs/pegs.html |
10:00:37 | * | def- quit (Quit: -) |
10:00:52 | * | def- joined #nim |
10:01:32 | PMunch | Hmm, maybe not |
10:10:21 | FromDiscord | <my mom said π> how do we check if a file has a specific file extension? |
10:16:28 | PMunch | @my_mom_said, splitFile.extension or something like that |
10:16:47 | PMunch | Ah, it's only ext, not extension |
10:43:03 | FromDiscord | <aMOPel> In reply to @PMunch "I.e. this thing: https://nim-lang.org/docs/pegs.htm": doesn't look like a clean fit to the doc/grammar.txt, neither does EBNF |
10:55:48 | FromDiscord | <dom96> ooh new members have little leaves by their name on Discord now. Welcome @aMOPel! |
10:55:59 | FromDiscord | <dom96> (edit) "leaves" => "leafs" |
10:56:06 | FromDiscord | <aMOPel> hi π |
11:01:28 | FromDiscord | <aMOPel> In reply to @aMOPel "doesn't look like a": Found it, "The language constructs are explained using an extended BNF...", so it is EBNF but with a few modifications. |
11:03:44 | PMunch | Yeah I just found some old references to it in the manual |
11:06:55 | FromDiscord | <aMOPel> In reply to @PMunch "Yeah I just found": like half my questions are answered by the "About this document" section in the current manual: https://nim-lang.org/docs/manual.html#about-this-document as @Rika pointed out^^ |
11:07:45 | FromDiscord | <Xzayler> should I make setter and getter procs for objects in nim? Or should I just export the variables themselves? |
11:08:04 | FromDiscord | <Xzayler> Exporting the variables just seems way faster |
11:11:51 | FromDiscord | <AsbjΓΈrn F> In reply to @Xzayler "should I make setter": you could also make a macro that makes the getter and setters for you |
11:25:22 | PMunch | @Xzayler, in general Nim doesn't require you to make getters and setters. And implementing them later isn't a problem |
11:26:36 | FromDiscord | <Xzayler> Ok,thanks. |
11:26:43 | FromDiscord | <Xzayler> Never used macros and they seem too coplicated for me |
11:26:46 | FromDiscord | <Xzayler> (edit) "coplicated" => "complicated" |
11:26:52 | FromDiscord | <Xzayler> at first glance |
11:31:20 | PMunch | Once you get the hang of them they aren't that bad |
11:32:20 | PMunch | But they're definitely a bit more of an advanced topic |
11:44:53 | om3ga | Yardanico, finally, the problem was definitely with locks, but not how they work. I choosed wrong lock type, and with reentrant locks everything now works as expected |
11:45:15 | om3ga | all tests pass |
11:47:03 | om3ga | https://en.wikipedia.org/wiki/Deadlock |
12:00:30 | * | ltriant joined #nim |
12:04:43 | * | ltriant quit (Ping timeout: 246 seconds) |
12:07:05 | * | xiashuangxi joined #nim |
12:14:23 | NimEventer | New thread by Sgmoore: Are rst's files supposed to be readable?, see https://forum.nim-lang.org/t/9172 |
12:18:43 | * | xet7 quit (Remote host closed the connection) |
12:20:39 | * | xet7 joined #nim |
12:33:59 | * | blackbeard420_ quit (Quit: ZNC 1.8.2 - https://znc.in) |
12:34:12 | * | blackbeard420 joined #nim |
12:37:05 | * | ltriant joined #nim |
12:44:46 | * | ltriant quit (Ping timeout: 244 seconds) |
12:45:34 | * | xiashuangxi quit (Quit: Leaving) |
12:50:58 | * | vicfred joined #nim |
13:42:16 | * | tiorock joined #nim |
13:42:16 | * | tiorock quit (Changing host) |
13:42:16 | * | tiorock joined #nim |
13:42:16 | * | rockcavera is now known as Guest8807 |
13:42:16 | * | Guest8807 quit (Killed (strontium.libera.chat (Nickname regained by services))) |
13:42:16 | * | tiorock is now known as rockcavera |
14:24:39 | FromDiscord | <luteva> how can i get the files created between timestamp x and y in the current folder in nim? |
14:25:32 | FromDiscord | <luteva> something like "find . -newermt ...." |
14:25:38 | FromDiscord | <luteva> but in nim π |
14:26:38 | FromDiscord | <Yardanico> there's https://nim-lang.github.io/Nim/os.html#getFileInfo%2Cstring so you can use it together with walkDir/walkDirRec but i'm not sure how fast will that be |
14:27:22 | FromDiscord | <dom96> you can directly access the creation time via https://nim-lang.org/docs/os.html#getCreationTime%2Cstring as well |
14:28:01 | FromDiscord | <dom96> Not familiar with any OS APIs that allow you to directly get files with a particular creation timestamp |
14:28:14 | FromDiscord | <luteva> ok thx! i will have a look at both. performance is not an issue, here |
14:28:19 | FromDiscord | <dom96> So you'll need to read all files and check their timestamp manually |
14:31:05 | FromDiscord | <luteva> is there a proc to get the filename without the ".xxx" suffix? |
14:32:06 | FromDiscord | <luteva> so: my.file.nim => "my.file" , "nim" or something similar |
14:34:28 | FromDiscord | <luteva> or do i have to split manually by a dot und choose the last part and everything before the last dot? (don't know if this is correct in all cases... π ) |
14:37:03 | FromDiscord | <luteva> ah splitfile π |
14:37:20 | FromDiscord | <luteva> assert splitFile(myFile) == (dir: "/path/to/my", name: "file", ext: ".nim")β΅ π |
14:42:12 | * | gsalazar quit (Ping timeout: 248 seconds) |
14:45:30 | * | PMunch quit (Quit: leaving) |
15:02:52 | FromDiscord | <gordoncatlover> Is there a way to do `-d:ABC` directly in my entry point `main.nim` file and it will affect included files, ie. `{.push define:"ABC".}`? |
15:04:17 | FromDiscord | <Yardanico> no, but you can have a config file like `main.nim.cfg` that'll define those things only if you compile main.nim |
15:06:09 | FromDiscord | <Xzayler> anyone have any experience with norm or sqlite in general? |
15:06:16 | FromDiscord | <Xzayler> I'm trying to just select all rows from a table |
15:08:29 | FromDiscord | <jmgomez> Hey guys, sorry for the pic. But Im getting a crash there. I have a function that creates a array structure (unreal's array, TArray) of strings (unreal's string, FString) and return it by copy to nim. I read the number of elements and dont do anything else, that functions is called on tick. After a while, it just crashes there. Any idea of what's going on? https://media.discordapp.net/attachments/371759389889003532/979038253594341416/Scre |
15:09:29 | FromDiscord | <dom96> In reply to @Xzayler "anyone have any experience": sure, please ask the question immediately next time instead of asking to ask :) |
15:10:02 | FromDiscord | <Xzayler> I have the question right under |
15:10:10 | FromDiscord | <Xzayler> I'm trying to select all rows, that's it |
15:10:36 | FromDiscord | <dom96> what have you tried? |
15:10:50 | FromDiscord | <Xzayler> sent a code paste, see https://play.nim-lang.org/#ix=3YzE |
15:11:04 | FromDiscord | <dom96> In reply to @jmgomez "Hey guys, sorry for": that usually indicates a stack corruption, could have happened anywhere in your code |
15:13:01 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=3YzF |
15:14:45 | * | gsalazar joined #nim |
15:15:53 | FromDiscord | <Xzayler> nothing... |
15:16:13 | FromDiscord | <Xzayler> I also tried it with `dbConn.select(self.allPlants, "", "")` |
15:16:29 | FromDiscord | <Xzayler> but I'll test it somewhere else where I'm 100% sure I can read the data |
15:21:44 | FromDiscord | <Xzayler> sent a code paste, see https://paste.rs/oji |
15:21:55 | FromDiscord | <Xzayler> (edit) "https://play.nim-lang.org/#ix=3YzI" => "https://play.nim-lang.org/#ix=3YzH" |
15:25:28 | FromDiscord | <jmgomez> In reply to @dom96 "that usually indicates a": ohh ok, thanks will try to isolate it as much as I can |
15:28:55 | FromDiscord | <jmgomez> could this be related: "implicit conversion to 'cstring' from a non-const location: "? |
15:30:12 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
15:30:40 | FromDiscord | <sharpcdf> is there anyway to do something like python decorators? |
15:30:53 | FromDiscord | <sharpcdf> (edit) "anyway" => "any way" |
15:30:58 | FromDiscord | <jmgomez> In reply to @sharpcdf "is there any way": pragmas? |
15:31:13 | FromDiscord | <sheerluck> In reply to @sharpcdf "is there any way": https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers |
15:31:25 | FromDiscord | <sharpcdf> ig but how would i make it trigger a function? |
15:31:26 | * | wallabra joined #nim |
15:32:32 | FromDiscord | <sharpcdf> oh i see how to do it now thanks |
15:34:38 | * | def- quit (Quit: -) |
15:34:54 | * | def- joined #nim |
15:44:11 | FromDiscord | <dom96> In reply to @jmgomez "could this be related:": it could be any code where you access memory using the unsafe operations in Nim, i.e. using `addr`, `ptr`, etc. |
15:51:35 | FromDiscord | <jmgomez> In reply to @dom96 "it could be any": I think it isnt related at all with the TArrays but with the FStrings, I create the unreal ones from cstrings (char) and Im not sure if the content is copied or just reused (to dont add allocations) so maybe Nim try to access to it after it's being cleaned and the crash happens? |
15:53:42 | * | lain quit (Quit: kthxbai) |
15:54:12 | * | lain joined #nim |
16:01:10 | FromDiscord | <Xzayler> In reply to @Xzayler "Ok so I confirmed": just in case someone wants to know. Norm has a `selectAll()` proc.... π€¦ββοΈ |
16:20:30 | * | gsalazar quit (Ping timeout: 240 seconds) |
16:42:23 | * | ltriant joined #nim |
16:47:45 | * | kenran joined #nim |
16:48:18 | * | gsalazar joined #nim |
16:50:20 | * | ltriant quit (Ping timeout: 246 seconds) |
17:13:10 | * | gsalazar quit (Ping timeout: 240 seconds) |
17:16:17 | * | kenran quit (Quit: WeeChat info:version) |
17:36:26 | FromDiscord | <stoneface> do the other exception implementations other than `cpp` work on the C++ backend? Cause I'm getting weird behavior with them |
17:38:56 | FromDiscord | <stoneface> `setjmp` and `quirky` don't even compile, `cpp` works but it doesn't print the stack trace and exception |
17:44:56 | FromDiscord | <Yardanico> In reply to @stoneface "do the other exception": check `--exceptions:goto`, `quirky` isn't really supposed to be used |
17:45:06 | FromDiscord | <Yardanico> but I'm not sure if you'll have C++ exception integration with `--exceptions:goto`, probably not |
17:47:16 | FromDiscord | <stoneface> ah gotcha, was just curious |
18:06:23 | * | gsalazar joined #nim |
18:15:00 | FromDiscord | <jmgomez> Is it possible to add compatibility to openarray with another custom type (different than array/seq)? |
18:29:50 | * | joast quit (Ping timeout: 240 seconds) |
18:33:31 | FromDiscord | <demotomohiro> In reply to @jmgomez "Is it possible to": `toOpenArray[T]` can be used for it: https://nim-lang.org/docs/system.html#toOpenArray%2Cptr.UncheckedArray%5BT%5D%2Cint%2Cint |
18:34:47 | FromDiscord | <demotomohiro> But it would requires your custom type contains objects contiguously like array/seq. |
18:35:22 | FromDiscord | <demotomohiro> Or you would need to copy data in custom type to seq. |
18:37:41 | FromDiscord | <jmgomez> In reply to @demotomohiro "`toOpenArray[T]` can be used": okay, will give it a shot. Thanks! |
18:46:17 | * | def- quit (Quit: -) |
18:46:48 | * | def- joined #nim |
18:51:30 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#ix=3YAF |
18:51:53 | FromDiscord | <blashyrk> (edit) "https://play.nim-lang.org/#ix=3YAF" => "https://play.nim-lang.org/#ix=3YAG" |
19:00:30 | * | vicfred quit (Quit: Leaving) |
19:01:42 | FromDiscord | <Rika> i dont see why it wouldnt work since none of the procs you call are templates, are you sure thats the line? |
19:05:29 | FromDiscord | <Yardanico> In reply to @Rika "i dont see why": it is |
19:05:45 | FromDiscord | <Yardanico> maybe it's something to do with generics, not sure |
19:05:56 | FromDiscord | <Rika> sounds like a bug then |
19:05:59 | FromDiscord | <demotomohiro> I don't know how to fix it but why don't import it with `import glm`? If you `from glm import nil`, you cannot use `+`,`-`, or `` in glm as binary operator. |
19:31:05 | NimEventer | New post on r/nim by hc0re: nimble install nimlsp ending up with errors, see https://reddit.com/r/nim/comments/uxp2m7/nimble_install_nimlsp_ending_up_with_errors/ |
19:49:49 | * | jjido joined #nim |
20:06:47 | * | noeontheend joined #nim |
20:14:16 | * | noeontheend quit (Ping timeout: 244 seconds) |
20:36:46 | * | kenran joined #nim |
20:40:49 | * | kenran quit (Client Quit) |
20:41:12 | FromDiscord | <gibson> Is it possible to define a custom `build` task for a package nimble file? I'm trying to define a build task, `nimble tasks` sees it, but `nimble build` does its own thing ignoring what I wrote. |
20:43:22 | FromDiscord | <gibson> Or, I would appreciate pointers to a good example of a `.nimble` file. I've read the docs. |
20:47:37 | * | ltriant joined #nim |
20:52:22 | * | ltriant quit (Ping timeout: 250 seconds) |
21:02:01 | FromDiscord | <dom96> you cannot override the `build` task right now IIRC |
21:21:14 | FromDiscord | <mbrc> Is there an issue with nimlsp where it doesnt recognize exports inside qualified modules, but works when the server is restarted? |
21:21:29 | FromDiscord | <mbrc> I mean is anyone aware of a related issue? |
21:40:09 | FromDiscord | <gibson> @dom96 ah okay, thanks for verifying. |
21:48:40 | * | joast joined #nim |
22:26:04 | * | arkurious quit (Quit: Leaving) |
22:35:01 | * | ltriant joined #nim |
22:42:21 | FromDiscord | <gibson> The trick is to put a config.nims file in the src/ dir. |
22:50:35 | * | cyraxjoe quit (Quit: No Ping reply in 180 seconds.) |
22:51:50 | * | cyraxjoe joined #nim |
22:58:12 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzβ¦) |
23:15:06 | FromDiscord | <Elegantbeef> Sadly though Nim/Nimble dont care about those if you're shipping a library |
23:34:57 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Sadly though Nim/Nimble dont": really? :[ |
23:35:20 | FromDiscord | <Elegantbeef> Would i lie to you |
23:36:36 | FromDiscord | <!Patitotective> why does that happen? |
23:36:51 | FromDiscord | <Elegantbeef> Cause they dont consider configs in library folders as important |
23:36:53 | FromDiscord | <!Patitotective> is there a reason? or just bad lol |
23:37:25 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Cause they dont consider": π€¨ |
23:37:26 | FromDiscord | <!Patitotective> sus |