00:07:43 | * | oldpcuser joined #nim |
00:09:52 | * | lucasta joined #nim |
00:12:35 | * | oldpcuser quit (Remote host closed the connection) |
00:13:04 | * | oldpcuser joined #nim |
00:26:29 | * | krydos6 joined #nim |
00:27:40 | * | krydos quit (Read error: Connection reset by peer) |
00:27:40 | * | krydos6 is now known as krydos |
00:27:43 | NimEventer | New Nimble package! denim - DENIM - Nim code to Bun.js/Node.js in seconds via NAPI, see https://github.com/openpeeps/denim |
00:27:43 | NimEventer | New Nimble package! bro - A super fast statically typed stylesheet language for cool kids, see https://github.com/openpeeps/bro |
00:29:48 | * | oldpcuser_ joined #nim |
00:30:31 | * | oldpcuser_ quit (Max SendQ exceeded) |
00:31:52 | * | oldpcuser quit (Ping timeout: 250 seconds) |
00:32:02 | * | oldpcuser_ joined #nim |
00:32:50 | * | oldpcuser_ quit (Max SendQ exceeded) |
00:33:57 | * | oldpcuser_ joined #nim |
00:37:17 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xik |
00:39:01 | FromDiscord | <Elegantbeef> capacity was added in devel |
00:39:33 | FromDiscord | <Elegantbeef> Might not be properly exported for docgen |
00:39:33 | FromDiscord | <Graveflo> well it compiles it just gives this `seqs_v2.nim(151, 32) Error: cannot cast to a non concrete type: 'ptr NimSeqV2'` |
00:41:46 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xil |
00:43:00 | * | oldpcuser_ is now known as oldpcuser |
00:49:21 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xio |
00:50:29 | * | oldpcuser_ joined #nim |
00:52:07 | * | oldpcuser quit (Ping timeout: 240 seconds) |
00:54:57 | * | oldpcuser joined #nim |
00:55:07 | * | oldpcuser_ quit (Ping timeout: 240 seconds) |
01:02:33 | * | oldpcuser quit (Remote host closed the connection) |
01:03:03 | * | jmdaemon quit (Ping timeout: 250 seconds) |
01:03:13 | * | oldpcuser joined #nim |
01:04:06 | * | oldpcuser quit (Max SendQ exceeded) |
01:04:15 | FromDiscord | <Elegantbeef> Nim does monomorphic generics |
01:04:25 | FromDiscord | <Elegantbeef> So there's always multiple instantations per single shape |
01:05:25 | * | aftalavera_ joined #nim |
01:05:32 | * | oldpcuser joined #nim |
01:06:35 | aftalavera_ | any report of secureHashFile() damaging files |
01:06:58 | * | oldpcuser quit (Max SendQ exceeded) |
01:07:59 | * | oldpcuser joined #nim |
01:08:41 | * | oldpcuser quit (Max SendQ exceeded) |
01:10:01 | * | oldpcuser joined #nim |
01:10:44 | * | oldpcuser quit (Max SendQ exceeded) |
01:11:19 | * | oldpcuser joined #nim |
01:16:01 | aftalavera_ | "Nim supports ref counting, a custom GC, and Boehm. Nim also allows the GC to be switched off altogether." |
01:16:11 | aftalavera_ | dammit there is no contest! |
01:31:47 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xiv |
01:33:45 | termer | aftalavera You never actually switch GC off |
01:33:53 | termer | you'll want to use ARC instead |
01:33:58 | termer | which is RAII basically |
01:34:14 | termer | Very similar to Rust's memory model |
01:34:47 | termer | but IF you want to, you can switch GC off. Don't know why you'd want to though |
01:35:48 | termer | aftalavera_ |
01:35:58 | termer | forgot you connected with another nick |
01:38:04 | termer | Nim isn't too good to be true, partially because you actually won't care very much about most of the features most of the time. You'll go on your day programming like normal, and then wind up using one of its nice features and thinking "Nice!" and then moving on with your day |
01:38:12 | termer | That's been my experience anyway |
01:38:34 | termer | Not to downplay the usefulness of a lot of its features, but it's not all unicorns and rainbows |
01:53:24 | FromDiscord | <Elegantbeef> Or you just don't worry about it 😄 |
02:19:22 | FromDiscord | <demotomohiro> import os; echo "../../".parentDir |
02:19:53 | FromDiscord | <demotomohiro> !eval import os; echo "../../".parentDir |
02:19:57 | NimBot | Compile failed: .. |
02:22:13 | * | lucasta quit (Ping timeout: 256 seconds) |
02:51:32 | FromDiscord | <Elegantbeef> Huh? |
02:56:52 | FromDiscord | <Elegantbeef> Right use Orc |
03:02:24 | FromDiscord | <emanresu3> sent a code paste, see https://play.nim-lang.org/#ix=4xiD |
03:02:37 | FromDiscord | <Elegantbeef> `typeof(a[0])` |
03:02:41 | FromDiscord | <emanresu3> ty |
03:02:52 | FromDiscord | <Elegantbeef> or `std/typetraits` |
03:03:45 | FromDiscord | <huantian> I never remember if `typeof(a).T` works |
03:03:59 | FromDiscord | <Elegantbeef> It's supposed to |
03:08:54 | FromDiscord | <emanresu3> okay my actual problem is I have a `p` pointer to a `Option[seq[int]]` in a template, how can I get `int`? |
03:10:43 | FromDiscord | <Graveflo> In reply to @aftalavera_ "any report of secureHashFile()": have you seen or heard of `secureHashFile` damaging files? |
03:19:37 | * | oldpcuser quit (Remote host closed the connection) |
03:19:57 | * | oldpcuser joined #nim |
03:31:59 | FromDiscord | <emanresu3> `p[].get.elementType` |
03:32:33 | FromDiscord | <Elegantbeef> `typeof(p[].unsafeGet)` |
03:34:07 | FromDiscord | <!&luke> What's the quickest way to bind a large c lib |
03:34:26 | FromDiscord | <Elegantbeef> futhark |
03:35:38 | FromDiscord | <!&luke> Yea thanks I forgot the name of that library for a while |
03:53:27 | * | aftalavera_ quit (Ping timeout: 256 seconds) |
03:53:27 | * | aftalavera quit (Ping timeout: 256 seconds) |
04:07:20 | * | oldpcuser quit (Quit: Vul - The Vi Useless Text Editor! (that's a joke, i love Vim LOL)) |
04:13:14 | * | cm quit (Quit: Bye.) |
04:25:48 | * | cm joined #nim |
04:43:26 | * | xet7 joined #nim |
05:35:28 | FromDiscord | <mratsim> In reply to @termer "but IF you want": I want to turn the GC off for my types because I want full control, either for performance or as a domain requirement (cryptography, embedded, critical systems, ...) |
05:57:24 | * | mal`` quit (Quit: Leaving) |
06:01:42 | FromDiscord | <JeysonFlores> sent a long message, see http://ix.io/4xiV |
06:02:02 | FromDiscord | <JeysonFlores> (edit) "http://ix.io/4xiV" => "http://ix.io/4xiW" |
06:04:27 | FromDiscord | <Elegantbeef> `x, y` is just two instances of `type Baz` |
06:04:37 | FromDiscord | <Elegantbeef> Or `Comparable` in this case |
06:05:25 | FromDiscord | <Elegantbeef> So it's like `typeof(default(YourType) < default(YourType)) is bool` |
06:07:33 | FromDiscord | <JeysonFlores> so.... it means that a Comparable has to have an implementation of `<`with another comparable in order to that concept be valid right? |
06:07:55 | FromDiscord | <Elegantbeef> It needs to have a `<` implementation that matches against the same type |
06:08:08 | FromDiscord | <Elegantbeef> `int < int` passes but `int < string` would not |
06:08:27 | FromDiscord | <JeysonFlores> but if I make a custom implementation, then it would pass? |
06:09:26 | FromDiscord | <Elegantbeef> No |
06:09:49 | FromDiscord | <Elegantbeef> Cause `concept x, y` is the same as `concept x` we've just also introduced another symbol named `y` |
06:10:02 | FromDiscord | <Elegantbeef> It still is an instance of the same type it's just named differently |
06:10:26 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/KXL6u |
06:12:02 | FromDiscord | <JeysonFlores> and when they use for example:↵`concept x, var z, static s` they are all different kinds of variables but it is the same type right? like a `Foo, var Foo, static Foo` |
06:12:26 | FromDiscord | <Elegantbeef> Yea |
06:15:00 | FromDiscord | <JeysonFlores> and `concept type F` would be like a `typedesc[Foo]` |
06:15:07 | FromDiscord | <Elegantbeef> Yes |
06:18:06 | * | mal`` joined #nim |
06:19:18 | FromDiscord | <JeysonFlores> ok thanks, it was so confusing seeing many identifiers in the examples I thought they were something else |
06:19:54 | FromDiscord | <JeysonFlores> but they're just different context/scopes of the type it is applied |
06:20:14 | FromDiscord | <JeysonFlores> (edit) "context/scopes" => "contexts/scopes" |
06:32:13 | FromDiscord | <Graveflo> I cannot get nimble to allow me to import one of my pkgs inside a different pkg. I tried `nimble develop` but it doesn't work no matter what I put in my `.nimble` file. I tried `nimble install` and it works until I make a change in the dependency pkg. |
06:33:42 | FromDiscord | <Elegantbeef> `nimble develop --global` is supposed to work but I've had issues |
06:37:10 | FromDiscord | <Graveflo> yea I get the same error as `develop` without the flag. `Error: cannot open file: <pkg name>` |
06:39:01 | FromDiscord | <Elegantbeef> delete your `pkgs2` and `links` file i guess |
06:39:03 | FromDiscord | <Elegantbeef> idk |
06:44:51 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xiY |
06:45:56 | * | PMunch joined #nim |
06:51:08 | * | rockcavera quit (Remote host closed the connection) |
07:14:38 | * | derpydoo joined #nim |
07:17:04 | FromDiscord | <Arathanis> i wish futhark injected the imports into the scope so it wouldn't compain about undeclared identifiers. |
07:17:28 | FromDiscord | <Arathanis> also i should make a futhark PR to get it working better on Windows. Seems fine out-of-box in linux, but not in windows |
07:17:36 | FromDiscord | <Arathanis> cross platform tools are good |
07:18:05 | PMunch | Arathanis, there have been some updates on the master branch which aren't part of the latest release which should improve some Windows stuff |
07:18:28 | PMunch | And what do you mean by injecting the imports into the scope? Futhark already works like an include |
07:18:55 | FromDiscord | <Arathanis> In reply to @PMunch "And what do you": in my environment at least it will compile but the vscode complains the identifier is undefined |
07:19:05 | FromDiscord | <Arathanis> https://media.discordapp.net/attachments/371759389889003532/1114090799290925106/image.png |
07:19:10 | FromDiscord | <Arathanis> compiles just fine |
07:19:26 | FromDiscord | <Arathanis> In reply to @PMunch "<@136570191038513152>, there have been": great to hear! the only things I had to change to get it working was wrapping some paths in double quotes to tolerate paths w/ spaces |
07:19:47 | FromDiscord | <Arathanis> and calling `.strip` on `staticExec("clang -print-resource-dir")` |
07:20:53 | FromDiscord | <Arathanis> specifically the uses of `-I` needed their argument wrapped in double quotes to tolerate double quotes, as well as the path to `futhark-includes.h` used in the opdir command |
07:21:02 | FromDiscord | <Arathanis> (edit) "double quotes," => "spaces," |
07:21:52 | PMunch | Ah, that is just a VSCode/nimsuggest/tooling issue |
07:22:11 | PMunch | The "will compile but shows errors in VSCode" thing |
07:22:19 | FromDiscord | <Arathanis> In reply to @PMunch "The "will compile but": yeah classic |
07:22:23 | FromDiscord | <Arathanis> maybe i should rephrase it |
07:22:27 | FromDiscord | <Arathanis> its not futharks fault |
07:22:32 | FromDiscord | <Arathanis> but it is still annoying |
07:23:07 | PMunch | Basically nimsuggest isn't able to walk through the macro to find all the symbols. Hopefully this will improve with IC, but for now if you use the technique from "Shipping wrappers" it should stop complaining |
07:23:26 | FromDiscord | <Arathanis> ill read that section in more detail, appreciate it :] |
07:23:29 | FromDiscord | <Arathanis> what is IC? |
07:23:54 | PMunch | Incremental Compilation |
07:24:02 | FromDiscord | <Arathanis> ahhh got it |
07:24:18 | FromDiscord | <Arathanis> i assumed it was something like that but was trying to resolve the actual words |
07:24:33 | FromDiscord | <Arathanis> i kept thinking "i wonder if its like partial compilation" |
07:24:37 | PMunch | Basically once that is done Nimsuggest will likely be able to pick up the incremental state from the compiler and get better at suggesting things |
07:24:45 | PMunch | Haha, yes it would be very similar |
07:24:52 | FromDiscord | <Arathanis> In reply to @PMunch "Basically once that is": we can pray |
07:25:07 | FromDiscord | <Arathanis> are these double quoting things part of the windows changes? |
07:25:28 | PMunch | And for the double quotes wouldn't single quotes be better? Or do those behave differently on Windows? On Linux double quotes means that it can support expansion, while single quotes are taken as-is |
07:26:05 | FromDiscord | <Arathanis> In reply to @PMunch "And for the double": its the same on Windows, so I think single quotes would be better. I was hacking and moving quickly :P |
07:26:19 | FromDiscord | <Arathanis> started with `& '"' &` and just kept going |
07:26:39 | FromDiscord | <Arathanis> changing it to `"'"` would be safer, no expension risk |
07:26:55 | FromDiscord | <Arathanis> (edit) "expension" => "expansion" |
07:27:12 | FromDiscord | <Arathanis> so yeah, single quotes would be better. quoted paths |
07:27:28 | FromDiscord | <Arathanis> also removes a common vulnerability from the library |
07:28:30 | PMunch | Arathanis, these should be all the fixes: https://github.com/PMunch/futhark/compare/v0.9.1...master |
07:28:33 | FromDiscord | <Arathanis> or at least the potential for it |
07:31:51 | FromDiscord | <Arathanis> In reply to @PMunch "<@136570191038513152>, these should be": will this quote these paths now? https://media.discordapp.net/attachments/371759389889003532/1114094010479423528/image.png |
07:34:40 | PMunch | Hmm, doesn't look like it would |
07:34:55 | FromDiscord | <Arathanis> this was one of the changes i added after the nimble install to get it to work |
07:35:01 | FromDiscord | <Arathanis> so i definitely recommend adding that |
07:35:08 | PMunch | I think this is the part which does the quoting: https://github.com/PMunch/futhark/compare/v0.9.1...master#diff-cc7293fa832d6b1e0eb87e26b9548111bcdb046631110dbcd2756c08ecd01924R657 |
07:35:54 | PMunch | Basically that `hostQuoteShell` should make the arguments safe for execution on whichever platform you're compiling from |
07:36:56 | FromDiscord | <Arathanis> if one of the paths has a space in it will it understand to turn `C:\Program Files` into `'C:\Program Files'` and not `'C:\Program' 'Files'`? |
07:37:02 | FromDiscord | <Arathanis> cause that is what was happening to me |
07:37:22 | FromDiscord | <Arathanis> specifically in the case of the -I |
07:37:31 | FromDiscord | <Arathanis> (edit) "-I" => "`-I` usages" |
07:38:23 | FromDiscord | <Arathanis> the other stuff i had to add quotes around already calleds hostQuoteShell |
07:38:30 | FromDiscord | <Arathanis> (edit) "calleds" => "calls" |
07:38:39 | FromDiscord | <Arathanis> like fname on line 657 |
07:39:27 | * | advesperacit joined #nim |
07:40:42 | PMunch | You can try |
07:41:00 | PMunch | `nimble install futhark@#head` |
07:41:54 | FromDiscord | <Arathanis> In reply to @PMunch "`nimble install futhark@#head`": ill set a reminder to do this tomorrow, ive already stayed up way too late lmao |
07:42:39 | PMunch | Ah right, timezones :P |
07:42:45 | PMunch | It's 10AM here |
07:42:58 | FromDiscord | <Arathanis> its nearly 1AM here and i have to go to work tomorrow :P |
07:43:11 | PMunch | Ouch |
07:43:17 | PMunch | You should definitely head to bed |
07:57:53 | * | cnx quit (Remote host closed the connection) |
07:58:41 | * | cnx joined #nim |
08:22:19 | NimEventer | New thread by drifty: I have started my own instance of nimforum, but I don't understand where I can administrate it, see https://forum.nim-lang.org/t/10241 |
08:24:20 | NimEventer | New thread by miran: This month in Nim: April and May 2023, see https://forum.nim-lang.org/t/10242 |
08:39:33 | * | beholders_eye joined #nim |
08:43:36 | * | dza quit (Remote host closed the connection) |
09:18:40 | FromDiscord | <System64 ~ Flandre Scarlet> Is it possible to enable exceptions for divisions by 0? |
09:19:26 | FromDiscord | <System64 ~ Flandre Scarlet> because I'm doing floating point math, but I have Inf or Nan somewhere, and I want to figure out where it occurs |
09:21:18 | FromDiscord | <mratsim> In reply to @System64 "Is it possible to": They use the builtin float types. So either you provide a wrapper in Nim, or maybe it's possible to enable a panic at the gcc/llvm level and you can gdb where the code panics. |
09:26:49 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=4xjD |
09:51:47 | * | dza joined #nim |
10:05:21 | * | casaca quit (Remote host closed the connection) |
10:05:22 | * | adigitoleo quit (Remote host closed the connection) |
10:05:22 | * | mronetwo quit (Remote host closed the connection) |
10:05:23 | * | noeontheend quit (Remote host closed the connection) |
10:05:23 | * | oddish quit (Remote host closed the connection) |
10:05:23 | * | henrytill quit (Write error: Connection reset by peer) |
10:06:41 | * | adigitoleo joined #nim |
10:06:49 | * | mronetwo joined #nim |
10:06:50 | * | oddish joined #nim |
10:06:59 | * | casaca joined #nim |
10:07:20 | * | noeontheend joined #nim |
10:07:21 | * | henrytill joined #nim |
10:37:31 | * | ntat joined #nim |
10:59:03 | FromDiscord | <chmod222> What's the current situation with Nim and false positive reports from Virus scanners? I have the option (much preferable to me copared to the alternatives) to build a small tool that will run on Windows but if it throws up virus warnings, that'll be annoying |
10:59:24 | FromDiscord | <chmod222> It's a corporate environment so I'm not sure what kind of snake-oily security products they got going |
11:02:31 | PMunch | I think it has gotten better, but whether it has gotten good I'm not sure about |
11:06:14 | FromDiscord | <mratsim> There was an windows API that when used auto-triggered all virus scans, also for other languages. can't find the issue though |
11:07:00 | FromDiscord | <that_dude> Didn't it have something to do with nimble using an old downloader proc? |
11:08:23 | FromDiscord | <mratsim> In reply to @that_dude "Didn't it have something": maybe |
11:08:26 | FromDiscord | <mratsim> also: https://go.dev/doc/faq#virus |
11:08:41 | FromDiscord | <mratsim> (edit) "https://go.dev/doc/faq#virus" => "https://go.dev/doc/faq#virus" |
11:10:02 | FromDiscord | <mratsim> In reply to @that_dude "Didn't it have something": https://github.com/nim-lang/Nim/pull/19767 |
11:11:03 | FromDiscord | <chmod222> Well, I'm not going to be using any networking stuff nor put the entire toolchain onto the target machine, so maybe it'll be fine |
11:11:50 | FromDiscord | <that_dude> https://www.hackercoolmagazine.com/nim-malware-and-av-evasion/ Messing with flags also makes detection worse |
11:13:29 | FromDiscord | <ringabout> I guess nightlies have a better chance of avoiding false positives since it's relatively new. |
11:13:55 | FromDiscord | <that_dude> deleted because the article didn't have what I thought it did |
11:14:52 | FromDiscord | <ringabout> fwiw, there is an action for sumbiting Nim nightlies binaries => https://github.com/nim-lang/virus_checker/actions |
12:22:25 | * | xet7 quit (Quit: Leaving) |
12:47:53 | * | junaid_ joined #nim |
12:51:35 | * | junaid_ quit (Remote host closed the connection) |
13:19:28 | * | fallback quit (Ping timeout: 240 seconds) |
13:25:44 | * | xet7 joined #nim |
13:33:15 | * | xet7 quit (Ping timeout: 265 seconds) |
13:37:00 | PMunch | Hmm, trying to use HappyX but hit a hurdle pretty early on |
13:37:22 | PMunch | Just wanted to do a simple web server, but the public folder doesn't seem to serve my files.. |
13:45:52 | * | xet7 joined #nim |
14:03:32 | * | PMunch quit (Quit: Leaving) |
14:09:46 | * | rockcavera joined #nim |
14:54:26 | FromDiscord | <!&luke> hi |
14:59:27 | * | deadmarshal_ quit (Ping timeout: 260 seconds) |
15:01:57 | * | fallback joined #nim |
15:02:44 | FromDiscord | <!&luke> sent a code paste, see https://play.nim-lang.org/#ix=4xkx |
15:02:50 | * | beholders_eye quit (Ping timeout: 246 seconds) |
15:03:47 | FromDiscord | <sOkam!> In reply to @ripluke "So im trying to": raygui is bound in both raylib-now and naylib, if im not mistaken. or is it just for learning futhark? |
15:04:33 | FromDiscord | <!&luke> i didnt see it in naylib but let me see, raylib now is deperecated iirc |
15:05:01 | FromDiscord | <sOkam!> maybe my memory is failing me. but i definitely used raygui with nim before |
15:05:36 | FromDiscord | <!&luke> raygui isnt in naylib |
15:05:47 | FromDiscord | <!&luke> let me see raylib now |
15:05:50 | FromDiscord | <sOkam!> maybe its in raylib-now |
15:06:35 | FromDiscord | <!&luke> yea raylib now has it |
15:06:43 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xkz |
15:25:18 | FromDiscord | <Boston> Is there a way to import objects from dll and the methods that act on that object |
15:30:21 | * | fallback quit (Read error: Connection reset by peer) |
15:30:25 | FromDiscord | <emanresu3> https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects |
15:30:51 | FromDiscord | <emanresu3> https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import↵(@Boston) |
15:33:00 | * | deadmarshal_ joined #nim |
15:33:25 | FromDiscord | <Boston> Say I don't have the header files, just the published dll, is it still feasible |
15:35:26 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xkJ |
15:40:00 | * | fallback joined #nim |
15:53:12 | * | junaid_ joined #nim |
15:58:43 | * | oldpcuser joined #nim |
16:08:48 | * | junaid_ quit (Ping timeout: 240 seconds) |
16:46:06 | * | derpydoo quit (Quit: derpydoo) |
17:11:38 | FromDiscord | <sOkam!> What is this error failing at?↵https://github.com/nim-lang/Nim/blob/1133f20fe2c834d14454c32d7d9fc2cd1fe8ffa2/lib/pure/strformat.nim#L588↵What is a `nskVar`, and what could it mean in my code to be getting this? |
17:12:01 | FromDiscord | <sOkam!> (edit) removed "in my code" | "getting this?" => "hitting this internal error?" |
17:37:12 | FromDiscord | <chmod222> It's a member of the NimSymbolKind enum, all I can tell you |
18:02:21 | FromDiscord | <sOkam!> I compiled with `koch temp c` and this is the backtrace. But I'm still confused AF, no clue where this is coming from at all https://media.discordapp.net/attachments/371759389889003532/1114252676981592165/error.txt |
18:04:29 | FromDiscord | <Graveflo> fmt is known to have issues with templates |
18:04:32 | * | ntat quit (Quit: Leaving) |
18:04:43 | FromDiscord | <sOkam!> yeah, but the problem is knowing where |
18:05:06 | FromDiscord | <sOkam!> i bet you im just giving it some mistaken variable that doesn't exist or something silly like that, but i can't track where |
18:05:15 | * | krux02 joined #nim |
18:05:27 | FromDiscord | <Graveflo> how many `{}` you got in there 😆 you cant just rip them into their own name? |
18:05:52 | FromDiscord | <Graveflo> also if you are calling fmt in a template that can be an issue too I think |
18:06:06 | FromDiscord | <sOkam!> a search gives me 66 results. i checked all of them one by one, but I can't find the issue |
18:06:39 | FromDiscord | <sOkam!> (edit) "results." => "results of using `&"..."`." |
18:07:18 | FromDiscord | <Graveflo> one more thing I'll say. I have had some success with discovery when opening up the nim source code and editing it... have mo take sure you put it back but it actually works |
18:07:40 | FromDiscord | <Graveflo> If you go into the format function and put print statements to trace through with a debugger that might help idk |
18:08:11 | FromDiscord | <sOkam!> where would you recommend to print debug info in that backtrace? |
18:08:25 | FromDiscord | <sOkam!> all those messages make no sense to me, the knowledge gap is gigantic |
18:08:48 | FromDiscord | <Graveflo> why not here: nim/lib/pure/strformat.nim(588, 19 |
18:09:45 | FromDiscord | <sOkam!> what would you print there? i don't understand what the function is doing |
18:12:50 | FromDiscord | <Graveflo> since I don't see a stack trace coming from your pakg I'm assuming this fmt call is happening at compile time? |
18:16:23 | FromDiscord | <Graveflo> or wait nvm it seems like it's coming from a template/generic in format.nim. The introspection tools and general tooling for nim makes it really hard to read source code. I'm trying to see where `strformatImpl` is typically called from since it is likely not the proc that is called from your end as it's private |
18:21:01 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xlb |
18:22:24 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xlc |
18:23:21 | FromDiscord | <Graveflo> yea now that I'm looking more into it this seems like it's almost hopeless to debug without a lot of compiler understanding. `genSym` doesn't seem to be doing anything too crazy there. |
18:26:58 | * | ntat joined #nim |
18:27:49 | * | ntat quit (Client Quit) |
18:28:07 | * | ntat joined #nim |
18:29:09 | FromDiscord | <Graveflo> is `$` on `Tech` overloaded? |
18:30:22 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xle |
18:40:46 | FromDiscord | <sOkam!> In reply to @Graveflo "is `$` on `Tech`": nope, just an enum |
18:40:56 | FromDiscord | <sOkam!> let me try it |
18:41:52 | FromDiscord | <sOkam!> same |
18:42:19 | FromDiscord | <sOkam!> im convinced this line is not the issue, but its the line that the compiler is printing right before erroring |
18:42:33 | FromDiscord | <sOkam!> it cannot be the issue because it has worked before |
18:42:43 | FromDiscord | <sOkam!> (edit) "before" => "before, and hasn't been touched" |
18:43:51 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xlg |
18:44:07 | FromDiscord | <Graveflo> not that it's what you want just poking around here |
18:46:00 | FromDiscord | <sOkam!> same |
18:46:44 | FromDiscord | <sOkam!> like i said, i only linked this code because its what the internal error is pointing to right before it ends. but the line itself has worked perfectly fine and hasn't been changed at all |
18:47:06 | FromDiscord | <Graveflo> I see, yea this is very weird. You think it's a compiler bug |
18:47:21 | FromDiscord | <sOkam!> i have no clue what `internall error` even means, so literally no idea |
18:47:27 | FromDiscord | <sOkam!> that's why i was asking really |
18:48:43 | FromDiscord | <Graveflo> well I guess all the smart people are asleep. I'll refrain from bumping this up unless I find out anything useful. Only other time I've seen `internal error` was with compiler crashes |
18:55:09 | FromDiscord | <sOkam!> seems like im finding all of them lately. already at 2hits in 2weeks 😔 |
18:58:49 | * | krux02 quit (Remote host closed the connection) |
19:01:10 | FromDiscord | <gogolxdong> Is there any android library? |
19:07:13 | ntat | Hi! I create Nim tutorial in pdf. I want to use Nim logo. What license is the Nim logo under? Can I use it for non-comercian project? |
19:07:49 | ntat | *non-commercial |
19:12:54 | * | aftalavera joined #nim |
19:13:52 | aftalavera | I nedd help debugging code |
19:14:18 | aftalavera | How are you doing it? |
19:24:32 | FromDiscord | <sOkam!> @Graveflo literally removed format from that line entirely and it still crashes, so yeah I think the error is crashing for some other reason |
19:28:25 | FromDiscord | <auxym> In reply to @ntat "Hi! I create Nim": discussed here: https://forum.nim-lang.org/t/10188 |
19:29:57 | FromDiscord | <auxym> In reply to @gogolxdong "Is there any android": there's a few things out there if you dig around, eg https://github.com/akavel/hellomello |
19:31:50 | FromDiscord | <auxym> https://forum.nim-lang.org/t/8769 |
19:32:27 | FromDiscord | <auxym> https://www.reddit.com/r/nim/comments/ynv5fz/is_it_possible_to_make_android_apps_with_nim/ |
19:36:29 | FromDiscord | <chmod222> Is it allowed for me to overload `system.default` for my own types or is it a bad idea? |
19:36:42 | FromDiscord | <chmod222> Or could it be both |
19:37:08 | FromDiscord | <demotomohiro> @aftalavera you can debug Nim code using gdb↵https://internet-of-tomohiro.netlify.app/nim/gdb.en.html |
19:40:28 | FromDiscord | <chmod222> I found a forum post from 2019 where Araq says it's not possible in regards to overloading default, my test.nim says it can be done so the truth must be in the middle |
19:41:11 | FromDiscord | <Elegantbeef> You can overload it but the point is it does not call it by default |
19:41:41 | FromDiscord | <chmod222> That would be perfectly fine if I'd need to call `default(T)` myself |
19:41:48 | FromDiscord | <chmod222> I don't need it to be called automatically |
19:42:09 | FromDiscord | <chmod222> Alright then |
19:47:54 | ntat | <auxym> thanks :) |
19:53:14 | FromDiscord | <Graveflo> In reply to @sOkam! "<@200775012796334081> literally removed format": wait, so if it still crashes when you remove the format then it doesn't crash @ `genSym` any longer? |
19:57:15 | * | ntat quit (Quit: Leaving) |
19:57:28 | FromDiscord | <sOkam!> no it does |
19:57:32 | FromDiscord | <sOkam!> that's what i meant |
19:57:51 | FromDiscord | <sOkam!> something else is crashing it, not the line that is being pointed to or last printed |
20:26:42 | * | cedb quit (Quit: WeeChat 3.8) |
20:37:03 | * | krux02 joined #nim |
21:34:30 | * | lucasta joined #nim |
21:43:15 | FromDiscord | <PunchCake> i love you guys |
21:46:08 | FromDiscord | <PunchCake> damn straight up |
21:46:10 | FromDiscord | <PunchCake> no response |
21:46:51 | FromDiscord | <Graveflo> (viewed June 2, 5:46PM) |
21:47:13 | FromDiscord | <PunchCake> xd |
21:51:51 | FromDiscord | <PunchCake> what good servers are there in matrix? |
21:53:34 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xm0 |
21:53:41 | FromDiscord | <PunchCake> you dont |
21:54:04 | FromDiscord | <sOkam!> ? |
21:56:10 | FromDiscord | <Graveflo> `& $T.typeof` ? |
21:56:18 | FromDiscord | <sOkam!> $ crashes it |
21:56:33 | FromDiscord | <Graveflo> that runs for me |
21:56:34 | FromDiscord | <sOkam!> `internal error: envronment misses: fmtRes` |
21:56:35 | FromDiscord | <Graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4xm3 |
21:57:06 | FromDiscord | <Graveflo> did you overload `$` for typedesc? |
21:57:17 | FromDiscord | <sOkam!> no |
21:57:48 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4xm4 |
21:57:54 | FromDiscord | <sOkam!> just like doing it with `&"..."` did |
21:57:55 | FromDiscord | <Graveflo> 😛 want version of nim are you using? |
21:58:08 | FromDiscord | <sOkam!> both in .12 and in nightly |
21:59:10 | FromDiscord | <Graveflo> so odd. I'm using "2.0" branch in git and it runs. Also there were bugs reported in lambda lifting (also seen in your console output) surrounding this issue. I wonder if this is a regression or already fixed error |
21:59:12 | FromDiscord | <sOkam!> the problem seems to be the `$` template expansion inside the default value of a generic |
22:05:03 | * | krux02 quit (Remote host closed the connection) |
22:08:02 | FromDiscord | <sOkam!> how can I get the string name of a type, without using `$`? |
22:08:13 | FromDiscord | <sOkam!> (edit) "type," => "typedesc," |
22:20:15 | FromDiscord | <chmod222> What about typetraits.name? |
22:20:22 | FromDiscord | <chmod222> Damn newfangled TLDs |
22:20:30 | FromDiscord | <chmod222> `typetraits.name` |
22:20:52 | FromDiscord | <chmod222> Although, that one appears to be an alias for `$` |
22:42:44 | FromDiscord | <Graveflo> The code that I posted compiles and runs for me on v1.6.12. This runs too: https://play.nim-lang.org/#ix=4xmb. This is not normally. Are you operating on a strange platform or doing something with your environment? |
22:43:28 | FromDiscord | <Zoom> Hey all, what's the PR which fixes the `nimDestroyAndDispose` error when setting the gc to arc/orc in config.nims? Hitting that bug on stable and want to make a note to remove the mitigation when the fix will be in. |
22:56:19 | * | oldpcuser quit (Remote host closed the connection) |
22:56:44 | * | oldpcuser joined #nim |
23:09:30 | * | advesperacit quit () |
23:26:56 | FromDiscord | <sOkam!> In reply to @Graveflo "The code that I": not really. and some of this code was working before. but the compiler gives no error other than that, and removing the $ avoids the crash |
23:27:39 | FromDiscord | <sOkam!> it might be a side-effect of something else, but the compiler gives no info, so im really lost on how to fix it otherwise |
23:28:00 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
23:28:07 | FromDiscord | <sOkam!> @Graveflo are you on windows or linux? |
23:30:19 | FromDiscord | <chmod222> It seems `method` and `ptr T` receivers are not friends? |
23:30:45 | * | Lord_Nightmare joined #nim |
23:36:49 | FromDiscord | <chmod222> Yeah, I'm trying to fit the square peg into the circle hole |
23:36:58 | FromDiscord | <chmod222> Dang FFI ruining all the nice features |
23:38:21 | FromDiscord | <Elegantbeef> methods use Nim type information to dispatch |
23:39:05 | FromDiscord | <chmod222> I know, I was hoping that my type construction would take care of that as well but deep down I knew it wouldn't |
23:40:26 | FromDiscord | <chmod222> And smuggeling a `ref` over the FFI boundary is probably a bad idea as well because I likely cannot tell Nim to leave the object alone once it disappears |
23:42:39 | FromDiscord | <ambient> Random thought: could I do similar things compared to Zig comptime with Nim templates etc.? |
23:42:58 | FromDiscord | <Elegantbeef> Macros, procedures and templates can yes |
23:43:35 | FromDiscord | <ambient> Is it possible to achieve similar levels of ergonomics? |
23:44:00 | FromDiscord | <Elegantbeef> No clue |
23:44:29 | FromDiscord | <ambient> I guess you could build some macro monstrosity to make macros, but that could get way too hairy |
23:44:39 | FromDiscord | <chmod222> If anything, Nim macros can do a lot more than Zig's comptime, but they aren't as pretty |
23:45:26 | FromDiscord | <Elegantbeef> Well depends what you're doing |
23:45:31 | FromDiscord | <chmod222> One thing Zig cannot do that Nim can easily is generate functions at compile time |
23:45:35 | FromDiscord | <Elegantbeef> Macros can do things zig cannot with comp time |
23:45:41 | FromDiscord | <Elegantbeef> Adding parameters to a procedure for instance |
23:53:22 | * | oldpcuser_ joined #nim |
23:54:31 | * | oldpcuser quit (Killed (NickServ (GHOST command used by oldpcuser_))) |
23:54:39 | * | oldpcuser_ is now known as oldpcuser |