00:08:28 | clyybber | good night |
00:08:29 | * | clyybber quit (Quit: WeeChat 2.5) |
00:10:34 | FromGitter | <Varriount> @zacharycarter Do you have any libraries/frameworks to recommend for 2d games? |
00:11:16 | * | Jesin quit (Quit: Leaving) |
00:14:40 | * | Jesin joined #nim |
00:20:09 | krux02_ | I have |
00:20:11 | krux02_ | SDL2 |
00:20:18 | krux02_ | with software rendering |
00:27:31 | disruptek | i wouldn't say `no` to an alias for {1,2,3}.card() => .len() |
00:45:58 | krux02_ | good idea :D |
00:46:07 | krux02_ | I got that wrong mand times as well |
00:46:34 | krux02_ | disruptek: if you make a pr for it, I will approve it |
01:02:48 | disruptek | aight. |
01:17:35 | * | krux02_ quit (Remote host closed the connection) |
01:34:23 | * | laaron joined #nim |
02:16:05 | * | rockcavera joined #nim |
02:57:37 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
02:58:13 | * | laaron joined #nim |
03:15:37 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
03:17:46 | * | laaron joined #nim |
03:49:47 | FromDiscord_ | <sisyphus> This might be a dumb question but I couldn't find anything on it. Is there a way to use echo but not have it print a newline? |
04:27:40 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
04:29:45 | * | nsf joined #nim |
04:32:04 | * | laaron joined #nim |
04:38:50 | FromGitter | <zacharycarter> sdl2 is fine for most needs - unless you have a lot of sprites - like if you're trying to do particles or something |
04:43:15 | * | go|dfish quit (Ping timeout: 248 seconds) |
04:46:00 | * | dddddd quit (Remote host closed the connection) |
04:48:18 | * | go|dfish joined #nim |
05:11:31 | * | go|dfish quit (Ping timeout: 248 seconds) |
05:15:12 | * | fjellfras joined #nim |
05:15:33 | * | fjellfras quit (Max SendQ exceeded) |
05:16:02 | * | fjellfras joined #nim |
05:16:25 | * | go|dfish joined #nim |
05:16:41 | * | fjellfras quit (Max SendQ exceeded) |
05:17:12 | * | fjellfras joined #nim |
05:17:49 | * | fjellfras quit (Max SendQ exceeded) |
05:18:17 | * | fjellfras joined #nim |
05:18:54 | * | fjellfras quit (Max SendQ exceeded) |
05:19:21 | * | fjellfras joined #nim |
05:42:57 | def- | mratsim: I'm not doing anything Nim-related nowadays. |
05:48:56 | * | solitudesf joined #nim |
06:03:04 | FromGitter | <bevo009> @sisyphus ⏎ stdout.write prints without a new line ⏎ or use this proc: ⏎ ⏎ ```proc print*(args: varargs[string, `$`]) = ⏎ stdout.write(args) ``` [https://gitter.im/nim-lang/Nim?at=5d47c6984635976e043155c0] |
06:59:44 | * | krux02 joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:38 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
07:04:45 | * | gmpreussner joined #nim |
07:06:44 | * | laaron joined #nim |
07:12:05 | * | fjellfras quit (Ping timeout: 268 seconds) |
07:21:09 | FromGitter | <Riderfighter> Hello everyone! |
07:22:38 | FromGitter | <zacharycarter> hi Riderfighter |
07:22:56 | FromGitter | <zacharycarter> well - still no luck with Nim hcr - I think you called it Araq - I'd run into another bug I don't understand |
07:23:13 | FromGitter | <zacharycarter> gdb is telling me - `Backtrace stopped: previous frame identical to this frame (corrupt stack?)` when I try to print a backtrace after I run into a sigsev |
07:32:22 | Zevv | vaaaalgriiind! |
07:33:13 | FromGitter | <zacharycarter> on windows |
07:34:49 | FromGitter | <Riderfighter> hey zevv 👋 |
07:35:41 | Zevv | then it's not a sigsegv :) |
07:36:46 | FromGitter | <zacharycarter> well whatever |
07:36:59 | FromGitter | <zacharycarter> I'm compiling with mingw and using gdb |
07:40:18 | shashlick | @Araq - I'm 50-50 between windows and Linux |
07:40:32 | shashlick | Windows is daily driver |
07:45:24 | Araq | ok, then we should give --newruntime a try IMO |
07:52:33 | shashlick | How does new runtime work with dlls? |
07:53:03 | shashlick | I presume you are suggesting for feud, but it is 100% windows right now |
08:00:59 | FromGitter | <mratsim> btw do owned refs have their finalizer/destructors in newruntime? |
08:01:55 | FromGitter | <mratsim> and does custom allocators work at the moment? |
08:06:47 | * | fjellfras joined #nim |
08:14:28 | livcd | when should i use the --newruntime? |
08:17:22 | FromGitter | <mratsim> When you want to live dangerously but don't like to walk through a crossroad when it's red for you. |
08:33:08 | * | floppydh joined #nim |
08:40:04 | * | floppydh quit (Quit: WeeChat 2.5) |
08:40:16 | * | floppydh joined #nim |
08:52:31 | * | mlkzdk joined #nim |
08:54:34 | * | fjellfras_ joined #nim |
08:56:18 | * | fjellfras quit (Ping timeout: 268 seconds) |
08:58:14 | * | fjellfras joined #nim |
08:59:16 | * | fjellfras_ quit (Ping timeout: 246 seconds) |
09:03:25 | * | fjellfras_ joined #nim |
09:03:42 | * | fjellfras quit (Ping timeout: 268 seconds) |
09:15:44 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
09:16:50 | * | skelett quit (Quit: WeeChat 2.4) |
09:19:15 | * | skelett joined #nim |
09:20:02 | * | laaron joined #nim |
09:22:24 | FromGitter | <Riderfighter> Well I just ran into a really weird bug |
09:24:03 | FromGitter | <Riderfighter> let me make sure i'm not being stupid but right now my nearly created seq using newSeq w a size of 16 turns into a seq w a size of 31 |
09:29:21 | FromGitter | <Riderfighter> heh ik why |
09:36:03 | * | mlkzdk quit (Ping timeout: 248 seconds) |
09:40:18 | FromGitter | <gogolxdong> forward question: Where to find docs directory after jekyll build nim-lang/website? |
09:41:35 | FromGitter | <mratsim> @Riderfighter that sounds strange, any repro code? |
09:46:43 | FromGitter | <Riderfighter> @mratsim it was because I was messing with copymem, no unsafeaddr's though |
09:47:45 | FromGitter | <Riderfighter> I'll try and remake a simple example |
09:48:50 | FromGitter | <Riderfighter> I actually don't remember what I did to be honest lol |
09:52:54 | FromGitter | <mratsim> you probably forget to take myseq[0].addr and overwrote the data structure length field |
09:53:02 | FromGitter | <mratsim> vs myseq.addr |
10:02:18 | * | stefanos82 joined #nim |
10:02:35 | FromGitter | <Riderfighter> yeah that looks like what I did, I just undid all my stuff |
10:07:58 | FromGitter | <Riderfighter> it was weird though |
10:08:39 | FromGitter | <Riderfighter> since I had three different variables that were all newSeqbyte (16), but when the second seq[byte] went through my proc the length wasn't 16 anymore |
10:10:35 | FromGitter | <Riderfighter> `newSeqbyte (16)` instead of w/e gitter parsed that as |
10:26:42 | * | fjellfras_ quit (Ping timeout: 245 seconds) |
10:28:14 | * | fjellfras_ joined #nim |
10:28:50 | * | fjellfras_ quit (Max SendQ exceeded) |
10:29:19 | * | fjellfras_ joined #nim |
10:29:57 | * | fjellfras_ quit (Max SendQ exceeded) |
10:30:28 | * | fjellfras_ joined #nim |
10:38:59 | * | dddddd joined #nim |
10:43:34 | * | lritter joined #nim |
10:50:43 | * | abm joined #nim |
10:58:22 | * | Vladar joined #nim |
11:02:40 | * | mlkzdk joined #nim |
11:04:55 | * | mlkzdk quit (Read error: Connection reset by peer) |
11:17:52 | * | fjellfras_ quit (Quit: Leaving) |
11:42:18 | Mister_Magister | !eval let ar: array = ["a"]; if "a" in array: discard |
11:42:21 | NimBot | Compile failed: /usercode/in.nim(1, 31) Error: type mismatch: got <type array, string> |
11:42:31 | Mister_Magister | any idea how to solve it? |
11:42:45 | Mister_Magister | what is wrong with it |
11:44:36 | Mister_Magister | !eval let ar: array = [1]; if 1 in array: discard |
11:44:38 | NimBot | Compile failed: /usercode/in.nim(1, 27) Error: type mismatch: got <type array, int literal(1)> |
11:46:45 | FromGitter | <Vindaar> there's no such thing as the type "array". If you want to manually use write the type, it's gotta be `array[1, string]` (first case) or `array[1, int]` (second case). ⏎ Also "in array" is wrong, since you want to check the content of your just defined variable `ar`, not the type |
11:48:27 | Mister_Magister | @Vindaar so how would you define "array" with ints and if some number is in that "array"? |
11:48:42 | euantor | Mister_Magister: like this https://www.irccloud.com/pastebin/jAyExYC9/ |
11:49:12 | euantor | `1` is the array length, `string` is the array's element tye |
11:49:27 | Mister_Magister | and more elemets would be [1,2,3,array] ? |
11:49:34 | Mister_Magister | ohh |
11:49:50 | Mister_Magister | i get it thanks! |
11:50:03 | * | Kaivo joined #nim |
11:50:37 | euantor | you don't need to specify the type though, so `let ar = ["a"]` would be inferred as `array[1, string]` |
11:52:45 | * | adeohluwa joined #nim |
11:57:47 | Mister_Magister | !eval let sudo_file: array[2, int64] = [604210590, 932317680]; let t: int64 = 1; if t in sudo_file: discard |
11:57:49 | NimBot | Compile failed: /usercode/in.nim(1, 34) Error: type mismatch: got <array[0..1, int]> but expected 'array[0..1, int64]' |
11:57:58 | Mister_Magister | euantor: ehere is your god now ;-; |
11:58:33 | Mister_Magister | s/ehere/where/ |
11:58:56 | FromGitter | <zacharycarter> !eval let sudo_file: array[2, int64] = [604210590'i64, 932317680]; let t: int64 = 1; if t in sudo_file: discard |
11:58:58 | NimBot | <no output> |
11:59:31 | euantor | Mister_Magister: check this :) https://www.irccloud.com/pastebin/g0ypur5F/ |
11:59:57 | euantor | alternative is `int64(604210590), int64(932317680)` |
12:00:24 | FromGitter | <zacharycarter> you only really have to be specific for the first element of the array |
12:00:32 | FromGitter | <zacharycarter> the rest are inferred |
12:00:37 | euantor | yeah, true |
12:00:45 | euantor | I usually like to do it for all elements |
12:01:27 | Mister_Magister | !eval let sudo_file: array[2, int64] = [604210590'int64, 932317680]; let t: int64 = 1; if t in sudo_file: discard |
12:01:30 | NimBot | Compile failed: /usercode/in.nim(1, 44) Error: invalid number: '604210590'i' |
12:01:45 | Mister_Magister | doesn't seem to work euantor |
12:01:59 | FromGitter | <mratsim> probably bot quirk with quote |
12:02:05 | Mister_Magister | !eval let sudo_file: array[2, int64] = [604210590'64, 932317680]; let t: int64 = 1; if t in sudo_file: discard |
12:02:05 | FromGitter | <mratsim> or irc quote quirks |
12:02:07 | NimBot | Compile failed: /usercode/in.nim(1, 44) Error: invalid number: '604210590'64' |
12:02:13 | Mister_Magister | !eval let sudo_file: array[2, int64] = [604210590'i64, 932317680]; let t: int64 = 1; if t in sudo_file: discard |
12:02:16 | NimBot | <no output> |
12:02:19 | Mister_Magister | typo |
12:02:55 | Mister_Magister | where can i find documentation about ' |
12:03:39 | euantor | Mister_Magister: `'i64` instead of `'64` or `'int64` |
12:04:07 | FromGitter | <mratsim> it's just a way to attach a type to a literal |
12:04:24 | FromGitter | <mratsim> 1'i64 vs 1'i32 |
12:05:20 | euantor | A list of type suffixes is here: https://nim-lang.org/docs/manual.html#types-preminusdefined-integer-types -search for `The type suffixes are:` |
12:06:04 | Mister_Magister | euantor: ye ye |
12:06:06 | Mister_Magister | typo |
12:07:23 | Mister_Magister | euantor: more like https://nim-lang.org/docs/manual.html#lexical-analysis-numerical-constants |
12:07:33 | * | nif quit (Quit: ...) |
12:07:42 | * | nif joined #nim |
12:15:08 | euantor | yeah, sorry |
12:17:46 | Mister_Magister | don't be :P thank you all |
12:44:23 | * | adeohluwa quit (Remote host closed the connection) |
12:44:35 | * | nsf quit (Quit: WeeChat 2.4) |
12:44:36 | * | adeohluwa joined #nim |
12:45:24 | * | adeohluwa quit (Remote host closed the connection) |
13:19:53 | leorize[m] | please don't specify the types manually though |
13:20:17 | Mister_Magister | leorize[m]: how would you do it then |
13:20:28 | Calinou | type inference will assign the type automatically for you |
13:20:48 | Mister_Magister | but it assigned the int instead of int64 isn't that right? |
13:21:09 | leorize[m] | !eval let sudo_file = [604210590'i64, 932317680]; let t = 1'i64; if t in sudo_file: discard |
13:21:12 | NimBot | <no output> |
13:21:31 | Mister_Magister | u specified type |
13:23:45 | leorize[m] | I'd also tell you to use camelCase, but then style-insensitivity is designed for this |
13:24:31 | Mister_Magister | yee camelCase ftw |
13:24:39 | leorize[m] | i omitted the type of sudo_file and t |
13:24:43 | livcd | Araq did you already comment on the d:release and d:danger ? |
13:24:46 | Mister_Magister | it's not my code |
13:24:49 | Mister_Magister | ah ye |
13:25:03 | leorize[m] | 'i64 is a part of the constant if you're asking |
13:25:15 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:25:40 | leorize[m] | also the ' is not really required, the 1i64 also works |
13:26:17 | Araq | livcd, link? |
13:26:19 | * | laaron joined #nim |
13:37:34 | * | snowolf quit (Read error: Connection reset by peer) |
13:37:43 | * | Cadey quit (Ping timeout: 276 seconds) |
13:38:20 | * | snowolf joined #nim |
13:38:36 | * | Cadey joined #nim |
13:40:45 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:41:39 | * | laaron joined #nim |
13:54:00 | livcd | Araq: https://github.com/nim-lang/Nim/issues/11860 |
13:57:00 | Araq | I use 'koch boot -d:release' more often than 'koch boot -d:danger' |
13:57:26 | Araq | I almost never use 'koch boot -d:danger', I'm working on IC to make the compiletimes scalable |
13:57:50 | Araq | and I don't think yet-another RFC bikeshedding about the name 'danger' would have solved anything |
13:59:25 | Araq | this change wasn't done in a vacuum either, plenty of people screamed for more safety |
14:19:52 | livcd | Araq: i was wondering about the perf difference |
14:21:34 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:22:17 | Araq | we produce shitty code for integer overflow detection |
14:22:44 | Araq | there is a better way to do it but it's disabled |
14:23:12 | Araq | but I suspect the overhead comes from all these checks that add up :P |
14:24:20 | Araq | but we could make nightlies use -d:danger indeed |
14:26:00 | * | nsf joined #nim |
14:26:01 | * | laaron joined #nim |
14:27:20 | leorize | why don't we use the better way then? |
14:29:16 | Araq | a day only has 24 hours |
14:31:03 | FromDiscord_ | <Kiloneie> Can someone help me with Nim in Action book's chapter 3 start code ? The code provided in the book just won't work for me, i tried researching the procedures used in the example in the os library, but i can't figure out the problem. |
14:31:57 | FromDiscord_ | <Kiloneie> Can someone help me with Nim in Action book's chapter 3 start code ? The code provided in the book just won't work for me, i tried researching the procedures used in the example in the os library, but i can't figure out the problem. |
14:31:57 | FromDiscord_ | <Kiloneie> |
14:31:57 | FromDiscord_ | <Kiloneie> Code: |
14:31:57 | FromDiscord_ | <Kiloneie> |
14:31:57 | FromDiscord_ | <Kiloneie> import os |
14:31:58 | FromDiscord_ | <Kiloneie> echo("Chat application started") |
14:31:58 | FromDiscord_ | <Kiloneie> if paramCount() == 0: |
14:32:00 | FromDiscord_ | <Kiloneie> quit("Please specify the server address, e.g. ./client localhost") |
14:32:00 | FromDiscord_ | <Kiloneie> |
14:32:02 | FromDiscord_ | <Kiloneie> let serverAddr = paramStr(1) |
14:32:03 | FromDiscord_ | <Kiloneie> echo("Connecting to ", serverAddr) |
14:32:14 | leorize | please avoid pasting code to discord |
14:32:45 | leorize | use play.nim-lang.org or a paste service as code will be streamed to IRC line-by-line |
14:33:37 | leorize | I don't see any problem with that code though, what's your error? |
14:33:58 | FromDiscord_ | <Kiloneie> Error: execution of an external program failed: '"c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" ' |
14:34:32 | leorize | of course it would fail :P |
14:34:38 | leorize | see the `quit` condition |
14:35:10 | leorize | you didn't pass any parameter to the client |
14:35:37 | leorize | try `client.exe localhost` in cmd |
14:36:01 | FromDiscord_ | <Kiloneie> wait, you actually run this from the command line ? |
14:36:14 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:36:29 | * | nif quit (Quit: ...) |
14:36:39 | * | nif joined #nim |
14:36:42 | leorize | yea? |
14:37:14 | FromDiscord_ | <Kiloneie> So running it from Vs Code is just wrong... |
14:37:27 | leorize | you can use the terminal in vscode to run it as well |
14:38:11 | leorize | also, doesn't the "Please specify the server address" message appear? |
14:38:52 | * | laaron joined #nim |
14:39:01 | FromDiscord_ | <Kiloneie> Hint: operation successful (34862 lines compiled; 0.809 sec total; 46.922MiB peakmem; Debug Build) [SuccessX] |
14:39:01 | FromDiscord_ | <Kiloneie> Hint: "c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" [Exec] |
14:39:01 | FromDiscord_ | <Kiloneie> Chat application started |
14:39:01 | FromDiscord_ | <Kiloneie> Command line parameters: @[] |
14:39:01 | FromDiscord_ | <Kiloneie> Please specify the server address, e.g. ./client localhost |
14:39:04 | FromDiscord_ | <Kiloneie> Error: execution of an external program failed: '"c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" ' |
14:39:04 | FromDiscord_ | <Kiloneie> PS C:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication> |
14:39:05 | FromDiscord_ | <Kiloneie> |
14:39:07 | FromDiscord_ | <Kiloneie> This is the whole output |
14:39:30 | leorize | well, it asked you to specify the server address... |
14:42:01 | FromDiscord_ | <Kiloneie> In the VS Code, how do i get to my src folder, cmd's cd function doesn't work here, it automatically puts me one level above |
14:42:34 | leorize | `cd src` doesn't work? |
14:42:51 | leorize | then you can do this "trick": `.\src\client.exe localhost` |
14:43:21 | FromDiscord_ | <Kiloneie> It does... but i tried pasting the full path and that didn't work xD... |
14:44:43 | FromDiscord_ | <Kiloneie> Now it works... i kept just running the code using F6, completely missing the point |
14:44:48 | FromDiscord_ | <Kiloneie> Thanks |
14:51:21 | FromDiscord_ | <Kiloneie> What code pasting website/service do you guys use btw ? |
14:51:51 | FromDiscord_ | <Kiloneie> What code pasting website/service do you guys use btw ? Probably the playground for Nim i guess. |
14:52:01 | Cadey | i prefer https://gist.github.com |
14:52:27 | leorize | I use ix.io, which is used by the playground also |
14:52:57 | FromDiscord_ | <Kiloneie> It does have that nice Nim coloring |
14:52:58 | leorize | also @Kiloneie, please avoid editing your messages on discord |
14:53:16 | Cadey | how do i depend on arbitrary git repos with nimble? |
14:53:59 | leorize | require "<git repo url>" |
14:54:00 | FromDiscord_ | <Kiloneie> Okay, i guess it can be annoying when someone starts to read your message xD... |
14:54:01 | lqdev[m] | @Kiloneie I use termbin |
14:54:44 | leorize | @Kiloneie well this is how editing looks like to us IRC users https://irclogs.nim-lang.org/05-08-2019.html#14:51:21 |
14:55:20 | FromDiscord_ | <Kiloneie> O,O, okay |
15:07:19 | FromDiscord_ | <Kiloneie> Did you guys buy the book Nim in Action ? |
15:14:12 | leorize | I didn't have the funds to buy it, and now I know Nim well enough to not need it :P |
15:17:45 | FromDiscord_ | <Kiloneie> I bought it yesterday, im gonna read as well as do the exercises on Nim Track | Exercism, then proceed to make some tutorial videos on Nim on YouTube |
15:22:52 | Araq | nice, thanks! |
15:24:15 | FromDiscord_ | <Kiloneie> You're welcome :P! I will be posting drafts/unfinished videos here or on the forum(or both) to see what you guys think beforehand so i can fix any problems and improve them. |
15:35:19 | disruptek | this http response length issue is the kind of black-box misfeature that could really waste some time for a lot of people. |
15:39:36 | Araq | why? |
15:39:48 | Araq | if the browser eats it we have to too |
15:42:26 | Mister_Magister | is there something like var_dump in nim? |
15:44:34 | disruptek | you know, i was going to say that some that write software that uses the network don't understand the network, but i realized that they would find it easier to read the code, which they presumably understand. so maybe it doesn't matter than a get mysteriously returns no response in nim alone. |
15:52:21 | * | Kaivo quit (Quit: WeeChat 2.5) |
15:56:25 | * | Kaivo joined #nim |
16:01:07 | * | Kaivo quit (Client Quit) |
16:01:24 | * | Kaivo joined #nim |
16:03:15 | * | floppydh quit (Quit: WeeChat 2.5) |
16:06:33 | FromDiscord_ | <Kiloneie> Does anyone know a good program for writting organized notes ? Im writting all my notes in windows sticky notes and it works... but not enough, no search filter etc. |
16:06:33 | FromDiscord_ | <Kiloneie> |
16:06:33 | FromDiscord_ | <Kiloneie> I tried getting it into xmind, but i don't really know if i like it or not... maybe there is something better |
16:14:57 | FromGitter | <zetashift> org-mode but it has somewhat of a learning curve? |
16:16:46 | FromDiscord_ | <Kiloneie> How do i find that ? Google provides tshirts... |
16:17:37 | disruptek | https://orgmode.org/ |
16:21:54 | FromGitter | <zetashift> (also we have a nim-lang off-topic channel for stuff like this, not sure how to reach it from Discord) |
16:23:39 | FromDiscord_ | <Kiloneie> I see text channels: general, offtopic, discord-only, test |
16:23:39 | FromDiscord_ | <Kiloneie> What isn't covered in the general channel ? |
16:25:15 | FromGitter | <zetashift> Everything not Nim-related can go into the offtopic I suppose |
16:54:40 | Araq | shashlick, ok, so now how to reproduce your problem? |
16:56:21 | shashlick | So if you pull latest head for feud, comment out boehm from nim.cfg and nimble debug on windows, it should build with gcasserts |
16:56:32 | shashlick | Use 0.20.x or devel |
16:56:44 | shashlick | App crashes on startup |
16:56:54 | shashlick | I know it isn't a minimal setup |
16:57:35 | shashlick | I have tried removing the entire portion of monitoring dlls in separate thread |
16:58:55 | shashlick | I also made the plugins not use ptrs to refs, tried allocShared as well as global vars |
16:59:28 | FromGitter | <mratsim> Yeah I've raised 200 bugs to the Nim rpo :p |
16:59:31 | FromGitter | <mratsim> repo* |
17:02:25 | Araq | congrats |
17:03:54 | Araq | nimble search feud |
17:03:54 | Araq | Error No package found. |
17:04:41 | shashlick | git clone https://github.com/genotrance/feud |
17:04:49 | shashlick | on Windows |
17:07:22 | Araq | ok |
17:09:44 | Araq | Installing [email protected] |
17:09:44 | Araq | Prompt: [email protected] already exists. Overwrite? [y/N] |
17:09:44 | Araq | Answer: n |
17:09:57 | Araq | (Nimble dies) |
17:10:53 | Araq | can we please get Nimble out of this embarrassing state? |
17:11:32 | Araq | firstly, why does it ask me whether to reinstall [email protected] when I already have it |
17:11:43 | Araq | secondly, when I press 'n' it should continue |
17:13:04 | Araq | anyway, no I have |
17:13:05 | Araq | Error: Nothing to build. Did you specify a module to build using the `bin` key in your .nimble file? |
17:13:49 | shashlick | you need to `nimble release` or `nimble debug` since it builds all the dlls and the main exe |
17:14:12 | shashlick | use debug since you will get gcasserts |
17:15:30 | shashlick | you can also create an allow.ini with one line, config - that way only the config plugin will be loaded |
17:15:59 | shashlick | plugins\allow.ini |
17:20:37 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
17:20:51 | disruptek | comments kinda thin, no? https://play.nim-lang.org/#ix=1QGY |
17:21:36 | Zevv | is there a defined() for --newruntime? |
17:22:00 | shashlick | no it is just --newruntime from the fullhelp |
17:22:31 | Zevv | sorry, other way around: how can I detect if code is compild with newruntime? |
17:22:36 | Zevv | I'd like to when: out some code |
17:23:32 | FromGitter | <mratsim> newruntime works, just look into system.nim |
17:24:10 | Zevv | but not yet implemented for Tables and Json etc, right |
17:24:28 | FromGitter | <mratsim> ah no sorry https://github.com/nim-lang/Nim/blob/2dc8a323242b639875d24d1baa7c8c9da2055fe2/tests/destructor/t7346.nim#L5 |
17:24:33 | Zevv | I'd like to run my test suite with newruntime, but then I need to disable some parts for now |
17:24:35 | FromGitter | <mratsim> nimNewRuntime is the trick |
17:24:45 | * | laaron joined #nim |
17:25:15 | shashlick | when defined(nimV2): |
17:25:23 | FromGitter | <mratsim> I wonder, does newruntime implies destructors? |
17:25:59 | Zevv | nimV2, that has hits in other libs, thanks |
17:27:26 | shashlick | https://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L3128 |
17:33:05 | Zevv | hm I have codegen issues with newruntime, redeclaration of identifiers... |
17:33:24 | disruptek | am i doing this right? https://play.nim-lang.org/#ix=1QH6 |
17:33:59 | disruptek | Zevv: i wish you'd quit doing that. |
17:34:23 | Zevv | sorry |
17:34:44 | Zevv | if you elaborate on what exactly offended you, I can take care in the future to avoid doing just that |
17:34:44 | shashlick | https://en.wikipedia.org/wiki/The_Men_Who_Stare_at_Goats_(film) |
17:34:44 | * | disruptek 🤪 |
17:35:06 | disruptek | hey, goats are a thing. |
17:35:13 | disruptek | it's hard out here for a goat. |
17:35:38 | disruptek | Zevv: the redeclarations are really getting to me, my bad. |
17:35:52 | Zevv | your bad? |
17:35:59 | disruptek | mea culpa |
17:36:13 | Zevv | and they're all called s2. Is your goat also called s2? |
17:36:22 | shashlick | @disruptek - maybe this gives some ideas? https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L63 |
17:36:45 | disruptek | his name is steve, but he answers to s2. maybe it's a pointer. |
17:36:56 | Zevv | mine is a NimStringV2 |
17:37:00 | Zevv | oh, mine *are* NimStringV2 |
17:37:55 | disruptek | shashlick: well, i want to pass a static string and have it get used as the filename in a static function call. |
17:41:05 | shashlick | it's already a macro, why do you need static inside it |
17:43:58 | disruptek | i don't, thanks. |
17:44:35 | disruptek | for some reason, i thought it was like a specific closure environment i had to enter. |
17:46:26 | shashlick | i have difficulty getting into the macro mentality - i get that it runs at compile time but the code should generate something that happens at runtime |
17:47:50 | disruptek | i just don't understand why i can work with nimnodes during compilation but not during runtime. |
17:48:00 | disruptek | doesn't the compiler work with nimnodes during runtime? |
17:48:46 | shashlick | nimnodes = ast which gets rendered by gcc to executable - no more nimnodes at runtime |
17:48:53 | Araq | shashlick, feud/build/scintilla/win32/HanjaDic.cxx:10:23: fatal error: string_view: No such file or directory |
17:48:53 | Araq | #include <string_view> |
17:48:53 | Araq | ^ |
17:48:53 | Araq | compilation terminated. |
17:48:58 | shashlick | compiled vs interpreted |
17:49:20 | shashlick | Araq - let me check - i got a similar report on nimscintilla, guess they updated their repo |
17:49:40 | disruptek | i want to write a problem that manipulates nim ast outside of compilation. that's not possible currently, though the compiler does it. |
17:50:22 | disruptek | i don't see how that's a hard concept. |
17:50:31 | disruptek | s/problem/program/ |
17:51:35 | shashlick | Araq: what version of gcc you using? |
17:53:02 | * | encryptize[m] joined #nim |
17:54:50 | encryptize[m] | Hey! I've got a question. How can I make arguments in my program? I'm using Telebot and want the command to be with arguments. I mean, for example /help command. |
17:55:56 | FromGitter | <zetashift> encryptize[m] : check out https://nim-lang.org/docs/parseopt.html |
17:56:17 | FromGitter | <zetashift> or https://github.com/docopt/docopt.nim |
17:57:44 | encryptize[m] | Okey. |
18:00:26 | shashlick | @Araq: looks like string_view is not available in mingw 6.3.0 that is on http://nim-lang.org |
18:00:34 | shashlick | it's there on v8.1.0 that i use |
18:00:40 | Araq | ok... |
18:01:01 | Araq | can you give me a download link? |
18:01:20 | shashlick | a sec |
18:01:59 | shashlick | https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z |
18:03:09 | Araq | we should ship that one with Nim 0.20.4 then |
18:04:45 | shashlick | i'll look into bumping up the version - we will need to update all CIs as well |
18:07:42 | Araq | huh? posix-sjlj ? |
18:08:05 | shashlick | i just picked the one that is most downloaded |
18:09:08 | rockcavera | win32 seh download in Nim page |
18:09:33 | shashlick | okay looks like posix-dwarf is most downloaded for windows |
18:10:29 | shashlick | well, but that is for i686 |
18:10:34 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
18:10:40 | Araq | sjlj sucks, we want seh |
18:10:50 | Araq | or better |
18:11:14 | * | laaron joined #nim |
18:11:21 | shashlick | okay yes, seh is most downloaded |
18:11:25 | shashlick | https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download |
18:11:53 | shashlick | x86_64-posix-sjlj, x86_64-posix-seh, x86_64-win32-sjlj, x86_64-win32-seh are the four options |
18:17:09 | Araq | x86_64-win32-seh |
18:20:28 | Araq | please |
18:24:32 | shashlick | https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/seh/x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z |
18:27:09 | FromGitter | <Varriount> shashlick: Man, the Mingw-w64 project is *still* using Sourceforge? |
18:27:46 | shashlick | Yep at least for files |
18:30:05 | FromGitter | <Varriount> I'm still miffed that Mingw-gcc links with mscvrt.dll, rather than an official Microsoft C runtime |
18:47:50 | Araq | shashlick, Plugin 'config' crashed in 'set()' |
18:50:06 | shashlick | Did you turn off boehm |
18:50:28 | shashlick | Them it will build with standard gc and asseets |
18:50:42 | shashlick | It does crash in config in various places |
18:51:14 | shashlick | Set is a callback called from handlePluginCommand in plugins |
18:51:34 | shashlick | Sometimes in hook, sometimes in execConfig |
18:51:53 | FromGitter | <arnetheduck> Araq, fwiw I just added dwarf eh to `nlvm` (haven't pushed yet).. man, handling `finally` is a pain. |
18:52:03 | shashlick | plg is the plugin object created by main thread in plugin.nim |
18:52:16 | shashlick | It is passed to the callbacks |
18:53:28 | shashlick | The contents of plg are what get messed up |
18:53:37 | FromGitter | <arnetheduck> I have a project on sourceforge since 2004:ish :) |
18:54:02 | shashlick | Mainly the callbacks table which is used to track the callbacks in each plugin |
18:54:19 | shashlick | So handlePluginCommand no longer finds callbacks further down |
18:55:23 | Araq | shashlick, just give me the command to get a "GC assert" |
18:55:45 | Araq | assume that I know nothing and that I don't want to think |
18:56:22 | * | laaron quit (Remote host closed the connection) |
18:58:42 | * | laaron joined #nim |
19:01:06 | shashlick | It should crash on startup itself |
19:01:44 | shashlick | Only allow config plugin to run, turn off boehm and run |
19:05:12 | disruptek | this might be the most difficult reproduction i've seen yet. |
19:06:33 | * | NimBot joined #nim |
19:08:30 | * | Vladar quit (Ping timeout: 244 seconds) |
19:08:53 | * | Vladar joined #nim |
19:10:49 | Araq | shashlick, well I now have an empty feud.ini and it dies with |
19:11:08 | Araq | Error: call depth limit reached in a debug build (2000 function calls). |
19:17:50 | shashlick | Again because my objects get emptied out or corrupted |
19:18:11 | shashlick | But I'm amused you aren't getting asserts |
19:21:31 | Araq | well it's great that you are amused but I'm trying to help you, finally. |
19:22:07 | shashlick | I'll be in front of a computer in 5 minutes and try to simplify |
19:22:24 | shashlick | Also will change over to seh in case it makes a diff |
19:22:31 | Araq | and you're violating Kernighan's rule |
19:22:48 | Araq | "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." |
19:22:59 | shashlick | Am in UK with family so |
19:23:10 | shashlick | Really appreciate it Araq 😁 |
19:23:41 | shashlick | Happy to learn and apply back for the community |
19:27:26 | disruptek | also, it's twice as hard to understand someone else's code, so by all means, do it your way, but pretend an imbecile is trying to follow your logic. 😁 |
19:30:15 | shashlick | Nim gdb has definitely made things easier but once you go into compiler territory, it gets complex fast |
19:30:15 | Araq | load*: SharedSeq[string] |
19:30:34 | Araq | ^ how do you think this can work? |
19:30:42 | shashlick | That's the shared lib I made |
19:30:59 | shashlick | Because of this issue |
19:31:20 | shashlick | But I've also tried direct loading dll without any of this sharing |
19:31:21 | * | nsf quit (Quit: WeeChat 2.4) |
19:31:47 | shashlick | Removed monitorPlugins |
19:32:58 | shashlick | You know, let me try and make a simple sample for you to debug |
19:33:33 | shashlick | You've tried enough - if you aren't seeing the assert then no point |
19:54:32 | FromGitter | <iffy> I'm updating from an older version of Nim to 0.20.2 and am getting Error: can raise an unlisted exception: RootEffect in my custom logger: |
19:54:52 | FromGitter | <iffy> https://gist.github.com/iffy/062be86fe228d5fe6449cf90a9551b71 |
19:55:22 | FromGitter | <iffy> It's complaining because the `fn(ln)` call on line 11 can raise RootEffect? maybe? |
19:58:12 | FromGitter | <iffy> I'm trying to understand the error so that I know what to fix |
20:09:07 | * | Jesin quit (Quit: Leaving) |
20:09:09 | shashlick | Where is RootEffect defined |
20:09:49 | shashlick | You need to identify all exceptions with the raises pragma |
20:11:18 | FromGitter | <iffy> I think RootEffect is defined in Nim |
20:11:58 | FromGitter | <iffy> https://github.com/nim-lang/Nim/blob/d208d7a99575fe8fdef9087aa4efd5c7e7781d9e/lib/system.nim#L712 |
20:16:15 | shashlick | oh okay, ya probably add the raises pragma for the log method? |
20:18:35 | * | abm quit (Quit: Leaving) |
20:19:34 | shashlick | @Araq - somehow it crashes right away for me - just tried with seh - http://ix.io/1OV9 |
20:23:19 | FromGitter | <zacharycarter> if I use `getType` in a macro and iterate over a type's fields how can I use those fields to get the value in an instance? |
20:23:40 | FromGitter | <zacharycarter> do I just do like a dot expression with the field I retrieved from getType? |
20:27:17 | shashlick | ya that should work |
20:27:25 | FromGitter | <zacharycarter> okay thanks |
20:29:01 | FromGitter | <iffy> hmm... how do I use locks to safely access a global seq? |
20:30:32 | shashlick | Araq: minor tweaks and i'm crashing like this http://ix.io/1QHT - points to https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L40 |
20:33:27 | Zevv | hmm are nim stream sematincs actually really streams? both stringstream and filestream are actually just an object abstraction over something that is "already there". Can I create an empty stringstream, feed it data on one point, consume on the other end, and have it not store all the data? |
20:39:45 | FromGitter | <iffy> Okay, I just used SharedList instead |
20:40:07 | FromGitter | <iffy> Can I just say, after a several month break from being able to use Nim, how much fun Nim is to use :) |
20:40:21 | shashlick | sorry, was going to respond - there's also SharedSeq i put together but it isn't very efficient yet |
20:40:31 | shashlick | https://github.com/genotrance/shared/ |
20:40:52 | shashlick | but if just a global seq, you can just do `withLock lock:` |
20:41:40 | shashlick | Araq: so after that HashSet failure, I replaced HashSet with a seq[string] and now the onLoad passes, but now i get a gcassert in another spot |
20:42:59 | shashlick | http://ix.io/1QHZ - which points to https://github.com/genotrance/feud/blob/master/src/utils.nim#L42 |
20:43:26 | shashlick | which is just a new(obj) field - that's my dead end |
20:44:09 | * | Jesin joined #nim |
20:46:28 | shashlick | i've created a branch "araq" on feud with some minor tweaks to show full stack trace and replaced HashSet with seq (though that's a separate crash of its own) |
20:46:37 | shashlick | please let me know if you can try that |
20:46:44 | * | gokr joined #nim |
20:47:02 | shashlick | i'll also try to create a minimal sample where basic stuff fails but appreciate it |
20:48:15 | FromGitter | <iffy> @shashlick thanks! |
20:59:02 | gokr | Araq: I am rewriting my Spry UI stuff to use your highlevel libui wrapper instead of rawui. I can compile your examples fine, but in the end I get linking errors. https://gist.github.com/gokr/8bd653e8294ced60ed6b8df7e35af7ff |
20:59:39 | gokr | I am not sure what is going on. |
21:03:54 | * | Vladar quit (Remote host closed the connection) |
21:06:32 | gokr | Araq: Ok, so I made a trivial new Nim package - that depends on "ui" in the nimble file, and... it has the same issue. So a package other than "ui" fails to link, it seems. |
21:11:23 | * | krux02 quit (Remote host closed the connection) |
21:12:37 | shashlick | Win or lin |
21:13:20 | shashlick | Lin looks like |
21:13:28 | gokr | Me? Linux yeah |
21:15:47 | gokr | With lots of verbosity on, it seems compiling controlgallery2 in examples - links a huge amount of libui obj files. But... Nim doesn't do that when I try to build my little test package. |
21:29:25 | gokr | Woof, now it works suddenly... |
21:29:54 | gokr | I did a "nimble uninstall ui" and then "nimble install" on my uitest package, and badam, problem disappeared I think |
21:30:52 | disruptek | that's my favorite kind of problem. |
21:31:37 | gokr | Yup, it works now. No idea what that was about. Perhaps getting "ui" installed as a dependency is done slightly differently compared to doing "nimble install" on itself. |
21:31:57 | disruptek | one of the reasons i don't use nimble... |
21:33:02 | shashlick | Ui has some resource files |
21:37:22 | gokr | Not sure what that is actually, but this was a linking thing. |
21:41:22 | FromGitter | <Varriount> gokr: Linking bugs are always *so* much fun. \s |
21:45:17 | disruptek | i just wish they weren't so rare. 🙄 |
22:14:53 | * | solitudesf quit (Ping timeout: 268 seconds) |
22:29:56 | FromGitter | <zacharycarter> if I have two nim nodes - one represents a constructed object and one represents the name of a field on that object - so it's a symbol |
22:30:06 | FromGitter | <zacharycarter> is it possible to resolve object.sym? |
22:31:27 | FromGitter | <zacharycarter> ah I think I need to use bindsym |
22:35:19 | FromGitter | <zacharycarter> or maybe not - I dunno |
22:38:19 | * | gokr quit (Ping timeout: 268 seconds) |
23:08:59 | Araq | iffy, LogFunc = proc(msg:cstring) {.raises: [Exception], tags: [], gcsafe.} |
23:09:09 | Araq | but I'd argue its a stdlib bug |
23:27:03 | FromGitter | <gogolxdong> I have issues to build documents with nim-lang/website ⏎ Not Found ⏎ `/docs/tut1.html' not found. |
23:30:42 | FromGitter | <gogolxdong> Do I need to run something to build tut1.rst to tut1.html? |
23:35:08 | * | asd joined #nim |
23:39:32 | asd | if for 'ptr' you assign addr, what do you assign for 'ref'? |
23:54:52 | FromGitter | <gogolxdong> new or an ptr of a ref type with dereference operator [], like x = y[], x = new y |