00:04:59 | * | kitech1- joined #nim |
00:05:00 | * | kitech1 quit (Ping timeout: 252 seconds) |
00:41:41 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:42:00 | * | njoseph joined #nim |
00:43:13 | giaco__ | how to use this https://nim-lang.github.io/Nim/socketstreams.html#WriteSocketStream in 1.4.6? |
00:46:32 | FromDiscord | <ajusa> In reply to @giaco__ "how to use this": well it looks like it inherits from WriteSocketStreamObj which inherits from ReadSocketStreamObj which inherits from StreamObj so my guess is that other stream functions should work fine? |
00:47:31 | giaco__ | ajusa, no I mean how to get socketstreams in 1.4.6, I see them planned for nim 1.6.x I was asking if importing it to 1.4.6 was possible |
00:49:20 | FromDiscord | <ajusa> No clue, sorry I misunderstood your question! You could try just straight up copying the source as a file and see if it compiles (https://github.com/nim-lang/Nim/blob/devel/lib/std/socketstreams.nim) under 1.4.6 |
01:00:01 | giaco__ | ajusa, it does! Thanks! |
01:15:05 | FromDiscord | <dan> I have a question concerning the import system:โตI'm writing a scientific program for density functional theory and I'm quite dependent on the mpi and blas libraries. Now the clusters where i work are not all that similar, so there are different blas and mpi implementations available. If I want to make my program compatible to multiple implementations with different dynamic library names, but more or less the same API, is it possible to do i |
01:15:54 | FromDiscord | <dan> More specifically: How am I to understand this paragraph of the docs: https://nim-lang.org/0.20.0/manual.html#foreign-function-interface-dynlib-pragma-for-import |
01:16:39 | FromDiscord | <dan> There it uses a function to get the library name, so does it work at runtime? |
01:16:55 | FromDiscord | <ElegantBeef> dynlibs are loaded dynamically, so yes |
01:17:44 | * | krux02 quit (Read error: Connection reset by peer) |
01:17:56 | FromDiscord | <dan> Alright i will try some stuff then! Thank you! |
01:18:31 | FromDiscord | <ElegantBeef> Atleast it should be able to, though no clue how that pragma works |
01:18:54 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/dynlib.html the dynlib manual has more of an explanation and might be what you need to use |
01:20:44 | FromDiscord | <dan> I looked at that and thought that the import system might be using it underneath. But i couldnt quite put the information together unfortunately. |
01:21:05 | FromDiscord | <ElegantBeef> Still dont know what you mean by "import system" |
01:22:14 | FromDiscord | <dan> Nevermind that ... I was thinking too Pythonic |
01:22:19 | FromDiscord | <ElegantBeef> Ah |
01:22:49 | FromDiscord | <ElegantBeef> I see what you mean then, Nim's imports cannot be done at runtime, only compile time ideas |
01:22:55 | FromDiscord | <ElegantBeef> Atleast meant ๐ |
01:24:33 | FromDiscord | <dan> I think the correct way for what I wanted to do would be include instead of import. It was all backwards anyways ๐ |
01:24:50 | FromDiscord | <ElegantBeef> You rarely want include truthfully |
01:26:02 | FromDiscord | <dan> I get that. But there would probably be a case to make about splitting a huge interface source file up into smaller files. |
01:27:51 | FromDiscord | <ElegantBeef> For that changing behaviour for procedures assuming the API is 1:1 you can do something like this if it's not dynamically changed https://play.nim-lang.org/#ix=2WGp |
01:28:07 | FromDiscord | <ElegantBeef> But that's just if you want to do `-d:useLog` or `-d:useIteration` |
01:28:24 | FromDiscord | <ElegantBeef> Anyway i'll shush, probably being redundant |
01:31:11 | FromDiscord | <dan> Thanks nonetheless! |
01:31:29 | FromDiscord | <dan> Nim has an awesome community! |
01:31:54 | FromDiscord | <ElegantBeef> How dare you generalize the entire community based off interaction with me! ๐ |
01:32:45 | FromDiscord | <exelotl> In reply to @ElegantBeef "You rarely want include": lately I've been considering `include` as a way to provide a library that works with types that are unique to the user's own project |
01:33:00 | FromDiscord | <exelotl> like this: https://github.com/exelotl/natu/blob/e15f9133f4819abb06d0f53be502d0b98d5b027d/examples/goodboy_gallery/source/graphics.nim |
01:34:07 | FromDiscord | <ElegantBeef> I assume the user then declares `Graphic` before those includes? |
01:34:12 | FromDiscord | <ElegantBeef> Sounds like a silly way to do concepts |
01:34:43 | FromDiscord | <exelotl> `Graphic` is an enum which is generated from a config file - there's one graphic entry for each spritesheet in the game |
01:34:59 | FromDiscord | <ElegantBeef> Yea i'm just trying to figure out how this works |
01:35:30 | FromDiscord | <exelotl> generics wouldn't really cut it because it's an allocation system based around a statically allocated array |
01:36:11 | FromDiscord | <exelotl> so it really needs to know how many graphics there are, at the top level at compile-time |
01:36:28 | FromDiscord | <ElegantBeef> I'm just talking about the includes |
01:36:33 | FromDiscord | <ElegantBeef> What do those enable |
01:38:02 | FromDiscord | <exelotl> graphics.nim looks like this: http://ix.io/2WGt.nim |
01:39:25 | FromDiscord | <exelotl> and then the kit files are specifically made to work with those types: https://github.com/exelotl/natu/tree/e15f9133f4819abb06d0f53be502d0b98d5b027d/natu/kit |
01:40:21 | FromDiscord | <ElegantBeef> So the `GraphicData` and `Graphic` are both user definable? |
01:41:30 | FromDiscord | <exelotl> well they're generated by the project tool when you run `nim build` |
01:42:31 | FromDiscord | <exelotl> GraphicData is kinda hardcode, it's Graphic which changes |
01:42:38 | FromDiscord | <exelotl> (edit) "hardcode," => "hardcoded," | "hardcoded,it's Graphic which changes ... " added "really" |
01:43:30 | FromDiscord | <ElegantBeef> So it could just be any enum and then you wouldnt need the includes the way i see it ๐ |
01:45:03 | FromDiscord | <dan> What do you mean by "project tool"? |
01:45:57 | FromDiscord | <dan> Also I have not seen "nim build" before. |
01:46:12 | FromDiscord | <ElegantBeef> probably meant `nimble build` |
01:46:23 | FromDiscord | <exelotl> ah no, it's a custom nimscript task |
01:46:50 | FromDiscord | <exelotl> basically you make a file called `config.nims` and it will get picked up by the Nim compiler whenever you run it from that directory |
01:47:59 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WGD |
01:48:14 | FromDiscord | <ElegantBeef> Didnt realize we could do that, so nice |
01:52:10 | FromDiscord | <exelotl> In reply to @dan "What do you mean": Asset conversion is a difficult thing for GBA games (you have to convert all the images & sounds to raw binary formats and embed them into the game) so I recently ended up making a command line tool which gets installed along with the library itself.โตThe nimscript task I defined to build the game will invoke the project tool to check if any assets have changed and rebuild them if so. |
01:53:16 | FromDiscord | <exelotl> But I might also use the project tool as a quickstart thing to help you set up a new project, similar to the `nicoboot` tool for this framework: <https://github.com/ftsf/nico> |
01:53:24 | * | Tanger joined #nim |
01:58:46 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WGS |
02:00:52 | FromDiscord | <exelotl> that array is statically allocated based on the number of unique palettes in the game (numPalettes is a generated constant) |
02:01:40 | * | Tlangir joined #nim |
02:02:25 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WGY |
02:02:36 | * | jjido quit (Quit: Connection closed for inactivity) |
02:04:19 | * | Tanger quit (Ping timeout: 268 seconds) |
02:04:32 | giaco__ | damn async is nice but stacktrace lacks error line, it is impossible to work with |
02:08:16 | FromDiscord | <exelotl> ouch, I think I'm gonna go with threadpools over async next time I look into that x) |
02:08:38 | FromDiscord | <exelotl> btw you may be onto something with concepts, beef :Pโตbut they seem to be in a pretty uncertain state right now, I don't wanna use the old concepts and the new ones are more limited |
02:27:18 | FromDiscord | <ElegantBeef> @exelotl how are the new ones limited, only briefly used/looked at them |
02:27:18 | FromGitter | <BracketMaster> I'm trying to specify a git dependency in my .nimble file by a URL |
02:27:23 | FromGitter | <BracketMaster> Any ideas? |
02:27:54 | FromDiscord | <ElegantBeef> `requires "giturl"` |
02:29:46 | FromDiscord | <ElegantBeef> Also the irony of someone named "bracketmaster" writting in a whitespace significant language ๐ |
02:29:55 | FromDiscord | <ElegantBeef> Cant win them all it seems |
02:30:40 | FromGitter | <BracketMaster> well - so originally using Nim wasn't my idea |
02:30:51 | FromGitter | <BracketMaster> but the company where I work is taking a serious look at it |
02:31:13 | FromDiscord | <ElegantBeef> Oooh |
02:31:31 | FromDiscord | <exelotl> ๐ |
02:31:59 | FromDiscord | <ElegantBeef> But now you love it and are pushing for it....right?! If you answer no, the proper authorities will throw you out ๐ |
02:32:22 | FromGitter | <BracketMaster> Nim is pretty nice - its fits our DSL use case quite well I think |
02:32:50 | FromDiscord | <ElegantBeef> Noice using that macro system |
02:33:19 | FromGitter | <BracketMaster> we were originally using Chisel in Scala |
02:33:19 | FromGitter | <BracketMaster> https://www.chisel-lang.org |
02:33:24 | FromGitter | <BracketMaster> But SBT is just the worst |
02:33:33 | FromGitter | <BracketMaster> Mill isn't much better either |
02:33:42 | FromGitter | <BracketMaster> Nimble is passable so far :P |
02:34:04 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WH6 |
02:34:22 | FromDiscord | <ElegantBeef> Ah |
02:34:22 | FromDiscord | <exelotl> if that's the case then it's good enough for me. I need to use templates with my concepts |
02:34:40 | FromDiscord | <exelotl> (edit) "I" => "I'd" | "concepts" => "concepts, to achieve what i have in mind" |
03:03:28 | * | spiderstew_ joined #nim |
03:04:31 | * | spiderstew quit (Ping timeout: 258 seconds) |
03:06:08 | FromGitter | <BracketMaster> Trying to use BigInt in nim |
03:06:10 | FromGitter | <BracketMaster> https://github.com/FedeOmoto/bignum/blob/master/src/bignum/private/int.nim#L1 |
03:06:18 | FromGitter | <BracketMaster> was `unsigned` once a package? |
03:06:26 | FromGitter | <BracketMaster> It doesn't seem to work currently |
03:09:52 | FromDiscord | <ElegantBeef> I'm uncertain, that's pretty old package though |
03:10:41 | FromDiscord | <ElegantBeef> https://github.com/ykoba1994/bignumber.nim or https://github.com/status-im/nim-stint should be functional ๐ |
03:35:18 | * | xet7 joined #nim |
03:45:33 | * | wasted_youth2 quit (Quit: Leaving) |
03:48:04 | * | redchirp quit (Quit: WeeChat 3.1) |
03:58:58 | FromGitter | <BracketMaster> stint seems to work |
04:01:57 | * | spiderstew joined #nim |
04:03:22 | * | spiderstew_ quit (Ping timeout: 252 seconds) |
04:04:39 | * | Figworm joined #nim |
04:48:07 | * | tiorock joined #nim |
04:48:07 | * | rockcavera quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
04:48:07 | * | tiorock is now known as rockcavera |
04:48:07 | * | rockcavera quit (Changing host) |
04:48:07 | * | rockcavera joined #nim |
05:03:08 | * | rockcavera quit (Remote host closed the connection) |
05:07:20 | FromDiscord | <pietroppeter> If I remember correctly this fork is the one you should use (it should be the one that nimble installs): https://github.com/kaushalmodi/bignum |
05:08:58 | FromDiscord | <pietroppeter> And for bigints there is this (less performante than the gap wrapper): https://github.com/def-/nim-bigints |
05:10:48 | FromDiscord | <pietroppeter> (edit) "performante" => "performant" | "gap" => "gmp" |
05:12:19 | FromDiscord | <ElegantBeef> BracketMaster ^ |
05:32:57 | * | ecs quit (Remote host closed the connection) |
05:35:36 | * | ecs joined #nim |
05:40:27 | * | ecs quit (Remote host closed the connection) |
05:41:57 | * | ecs joined #nim |
06:37:20 | FromDiscord | <lbart> how can I iterate over types?โตSomething like:โตfor t in [int, float]: etc? |
06:40:57 | FromDiscord | <haxscramper> I don't think you can iterate over types using any built-in features, but you can write a macro that takes a list of types and unrolls the loop |
06:41:05 | FromDiscord | <haxscramper> `macro a(z: typed) = discard; a([int, string])` |
06:41:52 | FromDiscord | <InventorMatt> sent a code paste, see https://play.nim-lang.org/#ix=2WHW |
06:45:57 | FromDiscord | <lbart> thanks, I will try your examples |
07:03:29 | * | fredrikhr joined #nim |
07:09:10 | * | Tlanger joined #nim |
07:12:02 | * | Tlangir quit (Ping timeout: 268 seconds) |
07:17:41 | * | D_ quit (Quit: No Ping reply in 180 seconds.) |
07:17:45 | * | sagax quit (Remote host closed the connection) |
07:17:52 | * | D_ joined #nim |
07:19:28 | * | vicfred quit (Quit: Leaving) |
07:20:59 | * | Tlanger quit (Remote host closed the connection) |
07:21:47 | * | Tanger joined #nim |
07:31:32 | * | PMunch joined #nim |
07:33:07 | * | garFF joined #nim |
07:38:45 | * | garFF quit (Quit: Leaving) |
08:20:43 | * | wasted_youth2 joined #nim |
08:29:26 | PMunch | Hmm, I searched GitHub and couldn't find an issue about for-loop macros not being able to use method call syntax. Should I create one, or did I simply miss it? |
08:41:18 | * | krux02 joined #nim |
08:41:59 | * | Tlangir joined #nim |
08:44:21 | * | Tanger quit (Ping timeout: 260 seconds) |
08:47:49 | * | m4r35n357 joined #nim |
08:48:00 | * | Tlanger joined #nim |
08:50:41 | * | Tlangir quit (Ping timeout: 265 seconds) |
08:52:19 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
08:57:49 | * | Lord_Nightmare joined #nim |
08:58:29 | * | PMunch quit (Quit: leaving) |
08:59:14 | * | Vladar joined #nim |
08:59:32 | * | PMunch joined #nim |
09:12:53 | * | Tlanger quit (Quit: Leaving) |
09:33:26 | * | garFF joined #nim |
09:40:26 | * | filcuc joined #nim |
09:48:30 | FromDiscord | <clyybber> PMunch: Probably not reported yet :D |
09:48:40 | PMunch | I'm reporting it right now |
09:48:54 | PMunch | I think it's known, but it's good to have an issue to track any progress on it anyways |
09:57:36 | PMunch | https://github.com/nim-lang/Nim/issues/17797 |
10:06:11 | * | teasea quit (Quit: teasea) |
10:06:32 | * | teasea joined #nim |
10:12:25 | FromDiscord | <๐phylum๐> sent a code paste, see https://play.nim-lang.org/#ix=2WJ1 |
10:13:14 | PMunch | Well yes, you n is probably not known at compile-time, and so it's not a static |
10:13:58 | * | Tanger joined #nim |
10:15:17 | FromDiscord | <๐phylum๐> but why can't it be known at compile time if i call it with a constant n? isn't that the contract i'm making by defining n as static[int] ? |
10:17:56 | * | garFF quit (Quit: Leaving) |
10:18:59 | PMunch | Kinda hard to tell without your code |
10:19:15 | PMunch | If n is static then it should work I think.. |
10:19:36 | FromDiscord | <haxscramper> `n` is runtime in macro body |
10:19:55 | FromDiscord | <๐phylum๐> sent a code paste, see https://play.nim-lang.org/#ix=2WJ4 |
10:20:10 | FromDiscord | <haxscramper> When macro is executed it is evaluated like any normal code, so anything you write is runtime |
10:20:27 | FromDiscord | <๐phylum๐> OH so i want a macro that calls a proc? |
10:20:32 | FromDiscord | <๐phylum๐> proc has recursion |
10:20:35 | FromDiscord | <๐phylum๐> macro is just an entry point? |
10:20:54 | PMunch | Huh? I have no idea what you're actually trying to do here.. |
10:21:10 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2WJ6 |
10:21:11 | FromDiscord | <haxscramper> So macro expands into another macro call with smaller argument |
10:21:12 | PMunch | I mean this works fine: https://play.nim-lang.org/#ix=2WJ5 |
10:21:26 | FromDiscord | <haxscramper> But ideally you could write macro that calls a procedure |
10:21:39 | PMunch | Haha, make sure to have some condition in that macro :P |
10:21:48 | FromDiscord | <haxscramper> Or even simpler - if you need it to generate some compile-time value you can just try `const val = functionCall()` |
10:22:33 | FromDiscord | <haxscramper> In reply to @PMunch "Haha, make sure to": "Template instantiation too nested" - seems fine to me |
10:24:03 | FromDiscord | <haxscramper> In reply to @haxscramper "But ideally you could": @๐phylum๐ this is probably what you need to do, because nested macro expansions are slower (due to repeated semcheck calls on generated code etc) than macro + recursive function implementation |
10:27:18 | PMunch | What exactly is the goal here? |
10:28:32 | FromDiscord | <๐phylum๐> i'm generating a dumb dotted list recursively, generating macro utilities for binding arguments to function variables for a lisp interpreter lol |
10:28:55 | FromDiscord | <๐phylum๐> so end goal is to generate x.right.right.right...right.left depending on n |
10:29:22 | FromDiscord | <clyybber> oh, yeah; you definitely want a macro just as an entry point and then use a proc |
10:29:45 | FromDiscord | <clyybber> because a macro call inside a macro will behave just like a macro normally would |
10:29:46 | PMunch | Right.. |
10:47:26 | * | liblq-devel joined #nim |
11:05:07 | FromDiscord | <๐phylum๐> Look I'm not going to say this is elegant but I'm feeling my way into this language with lisp |
11:05:08 | FromDiscord | <๐phylum๐> :D |
11:09:28 | ForumUpdaterBot | New thread by Gekkonier: Nim-1.4.6_x64.zip/bin/nimble.exe reports as Trojan:Win32/Zpevdo.B, see https://forum.nim-lang.org/t/7830 |
11:31:02 | * | PMunch quit (Ping timeout: 268 seconds) |
11:37:07 | * | lritter joined #nim |
11:42:28 | * | krux02 quit (Remote host closed the connection) |
11:42:32 | * | l1x joined #nim |
11:42:44 | * | PMunch joined #nim |
11:47:09 | * | Vladar quit (Remote host closed the connection) |
11:50:32 | * | Vladar joined #nim |
12:48:32 | * | rockcavera joined #nim |
12:49:02 | * | ligist[m] joined #nim |
12:52:24 | * | natrys joined #nim |
13:12:56 | * | liblq-devel quit (Quit: WeeChat 3.1) |
13:50:41 | * | letto quit (Ping timeout: 240 seconds) |
13:56:01 | giaco__ | I am having some annoying issues in vscode with nim, like if the errors detected ramains unsynced in the workspace. If I have an error in una file, I have red arrows in the left sidebar where error is, but no red underline, no problem listed in problems section, so basically I have to run nim c to really detect errors |
13:58:36 | Prestige | Which plugin are you using giaco__ ? |
14:08:27 | m33[m] | <ForumUpdaterBot "New thread by Gekkonier: Nim-1.4"> wow |
14:10:39 | m33[m] | it affects nim.exe too |
14:11:57 | * | PMunch quit (Quit: leaving) |
14:26:41 | m33[m] | it seems it started only with the latest release v1.4.6 |
14:26:49 | m33[m] | older releases doesn't raises alertes on virustotal |
14:27:20 | * | tane joined #nim |
14:30:35 | giaco__ | Prestige: 0.6.6 from Konstantin Zaitsev |
14:33:29 | Prestige | giaco__: try the one by saem |
14:36:09 | Clonkk[m] | Out of curiosity, I tried upgrading to Nim v1.4.6 some macro-related code and I suddenly have an error ``Error: unhandled exception: 'sym' is not accessible using discriminant 'kind' of type 'TNode' [FieldDefect] ``. Anyone knows what this is about ? |
14:42:59 | giaco__ | Prestige: same problems with that one |
14:44:12 | giaco__ | problems tabs shows: "no problems have been detected in the workspace so far", but project doesn't compile and I have red arrows showing error in code window |
14:48:27 | Prestige | hm it _may_ be triggered on save, if you make a small change and save it? I'm not sure, I don't use vscode |
14:49:35 | saem | It's triggered in save |
14:49:45 | saem | You can also manually trigger it |
14:50:38 | saem | I strongly recommend having the nim.project setting defined. |
14:51:18 | saem | giaco__: see above |
15:08:39 | giaco__ | saem: I have installed your plugin, then closed all tabs and windows, then vscode, then reopened the workspace. Now seems ok |
15:08:41 | giaco__ | thanks |
15:20:00 | giaco__ | newAsyncHttpClient no timeout? |
15:30:35 | giaco__ | nevermind, just found "withTimeout" of asyncdispatch |
15:30:45 | * | fredrikhr quit (Quit: Client Disconnecting) |
15:54:36 | * | krux02 joined #nim |
16:01:39 | giaco__ | will equality operator `==` work out of the box between two instances of the same deep hierarchy of non ref objects? |
16:17:50 | FromDiscord | <jtiai> Woohoo. My 6502 emulator compiles! |
16:27:11 | saem | giaco__: glad it's working for you. It's written in nim itself... Though a rather literal port of typescript code. It's also pretty easy to debug (clone, open in VSCode, press F5 aka debug), in case you run into issues, so at the very least you can find out why it's misbehaving. |
16:51:52 | FromDiscord | <jtiai> I tried to use `imgui` for Nim but I do get `could not load: cimgui.dll`. Seems that I'm not alone with error but didn't find anything that would help to fix the issue. |
16:54:06 | * | shmorgle quit (Quit: [TalkSoup] via NEXTSPACE) |
16:55:43 | * | shmorgle joined #nim |
17:05:51 | * | zedeus quit (Ping timeout: 260 seconds) |
17:07:21 | * | NimBot joined #nim |
17:23:44 | giaco__ | I'm wasting an hour trying to find out what went wrong after refactoring of me own messy code. I'm staring at "Error: type mismatch: got <>" on a line that was working before, can't find the reason |
17:39:16 | giaco__ | solved! Guess who was guilty of a stupid change? |
17:40:34 | * | l1x quit (Quit: Connection closed for inactivity) |
17:50:51 | ForumUpdaterBot | New thread by Kobi: Streamlining nim and showing off quick apps, see https://forum.nim-lang.org/t/7831 |
17:52:40 | ForumUpdaterBot | New post on r/nim by Vortex5ber: Where can I find a PDF tutorials of Nim ?, see https://reddit.com/r/nim/comments/muw39x/where_can_i_find_a_pdf_tutorials_of_nim/ |
17:58:36 | * | vicfred joined #nim |
18:19:08 | * | xace quit (Ping timeout: 252 seconds) |
18:21:19 | * | xace joined #nim |
18:27:01 | * | ckafi[m] quit (Ping timeout: 245 seconds) |
18:27:01 | * | Clonkk[m] quit (Ping timeout: 245 seconds) |
18:27:01 | * | stisa quit (Ping timeout: 245 seconds) |
18:27:01 | * | lnxw37d4 quit (Ping timeout: 245 seconds) |
18:27:26 | * | leorize[m] quit (Ping timeout: 245 seconds) |
18:29:09 | * | ckafi[m] joined #nim |
18:29:31 | * | stisa joined #nim |
18:30:01 | * | leorize[m] joined #nim |
18:33:44 | * | lnxw37d4 joined #nim |
18:34:37 | * | Clonkk[m] joined #nim |
18:47:18 | Prestige | @ElegantBeef do you have a link to the PR you submitted to fix the nimscripter issue? Or do you know if it's available in 1.4.6? |
18:53:38 | * | PMunch joined #nim |
18:54:58 | ForumUpdaterBot | New thread by Stefan_Salewski: Concatenation of seq and array?, see https://forum.nim-lang.org/t/7832 |
19:06:03 | * | PMunch quit (Quit: leaving) |
20:10:25 | m33[m] | A bit strange but not unexpected, I don't get any false positive with a rebuild of nim-1.4.6 (release) x64 on windows vs the many false positive with the official prebuilt binaries. A slight change in the build process of the official binaries shouldn't be overlooked, in order to avoid false positives... a simple update of the toolchain may do the trick, of some fresh build environment. |
20:11:34 | m33[m] | One can't just ignore false positive reported by avast, avg, mcafee. These are big names in the AV market, not some obscure AV. |
20:20:08 | m33[m] | Opened #17803 to track this on github, see you tomorrow guys |
20:30:13 | FromDiscord | <ElegantBeef> Prestige i dont think it was backpatched but here it is https://github.com/nim-lang/Nim/pull/17425 |
20:30:37 | Prestige | thanks |
20:32:38 | * | wasted_youth2 quit (Quit: Leaving) |
20:38:40 | giaco__ | I have an async proc that gets an AsyncSocket and recv/send stuff and it works nicely, but I'd like to write a testcase for it now so I'm trying to send and receive on an unconnected socket piping in and out data, but I'm getting "Exception message: Transport endpoint is not connected". Is there a workaround of this that doesn't require spinning up a localhost server socket for testing? |
20:40:57 | * | GreaseMonkey quit (Remote host closed the connection) |
21:00:52 | * | Tanger quit (Ping timeout: 252 seconds) |
21:04:52 | * | greaser|q joined #nim |
21:29:57 | * | wasted_youth2 joined #nim |
21:30:44 | FromDiscord | <dom96> not that I know of |
21:31:39 | giaco__ | thanks for the feedback |
21:33:07 | * | filcuc quit (Ping timeout: 265 seconds) |
21:35:24 | * | lritter quit (Quit: Leaving) |
21:39:17 | * | tane quit (Quit: Leaving) |
22:13:58 | giaco__ | does nim support unix domain sockets? I do see bindUnix and connectUnix in net module documentation, but "newSocket(AF_UNIX, SOCK_STREAM, IPPROTO_TCP" returns "Error: unhandled exception: Protocol not supported [OSError]" |
22:20:17 | * | Vladar quit (Quit: Leaving) |
22:21:34 | FromDiscord | <dom96> they are supported, but they are quite low-level, have a look at POSIX docs for how to create unix sockets and see what the options are passed there |
22:23:11 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WMz |
22:24:43 | FromDiscord | <exelotl> x.foo: ... is semantically checked even though it always resolves to the template rather than the proc. |
22:27:17 | FromDiscord | <dom96> huh, why wouldn't you get that error? |
22:33:10 | FromDiscord | <ElegantBeef> Seems when name/arg count matches it attempts to go for the proc instead of the template |
22:33:25 | FromDiscord | <ElegantBeef> the ugly `x.foo(a = bad)` does override that attempt |
22:35:11 | * | m4r35n357 quit (Ping timeout: 240 seconds) |
22:35:43 | * | m4r35n357 joined #nim |
22:40:35 | giaco__ | dom96: it works only if I set third argument (Protocol) to IPPROTO_IP, thats not 0 according to enum Definition, but that what nativesockets is using (see https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/nativesockets.nim#L234) |
22:41:13 | giaco__ | you can see here how third parameter is zero for unix domain sockets https://man7.org/linux/man-pages/man7/unix.7.html |
22:43:41 | FromDiscord | <exelotl> In reply to @dom96 "huh, why wouldn't you": whether you do `x.foo(123)` or `x.foo("hello")`, it still picks the template instead of the proc. i.e. no knowledge about the type of the 2nd parameter is used, so it shouldn't need to undergo a semantic pass |
22:44:30 | FromDiscord | <ElegantBeef> The template is more exact in anycase `ptr int` > `pointer` |
22:44:45 | FromDiscord | <exelotl> yeah, exactly |
22:47:15 | FromDiscord | <ElegantBeef> Seems it semchecks the variable to see if the otherone is more exact, but then doesnt fallback to the template |
22:48:02 | FromDiscord | <ElegantBeef> cause in the case you use a string instead of the untyped, the proc is arguably "correct" since both types are matched |
22:48:11 | FromDiscord | <clyybber> it's documented |
22:48:26 | FromDiscord | <ElegantBeef> No you |
22:48:37 | FromDiscord | <clyybber> but I have a POC PR that could make it work in theory |
22:48:52 | FromDiscord | <clyybber> right now, simply dont overload untyped |
22:50:52 | FromDiscord | <clyybber> oh and also don't use an untyped first param with UFCS :) |
22:51:10 | FromDiscord | <clyybber> but you are not doing that in your snippet anyways |
22:51:35 | FromDiscord | <ElegantBeef> ~~Proceeds to make a dot operator with 100% untyped params~~ |
22:54:44 | FromDiscord | <dom96> yeah, overload untyped and you'll have a bad time |
22:55:49 | * | a_chou joined #nim |
22:56:38 | FromDiscord | <exelotl> the trouble is that this affects with/dup style macros |
22:57:01 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2WMM |
22:57:06 | FromDiscord | <exelotl> doesn't compile |
23:20:00 | * | a_chou quit (Quit: a_chou) |
23:47:28 | federico3 | boo Nim is missing in https://duckduckgo.com/bang_lite.html |
23:52:18 | FromDiscord | <nailuj29> My beautiful folders |
23:52:27 | FromDiscord | <nailuj29> This server is not in my folder |
23:54:01 | FromDiscord | <ElegantBeef> It's not in any folder of mine either, should be easily accessed ๐ |
23:56:01 | * | Fish-Face quit (Quit: No Ping reply in 180 seconds.) |
23:56:19 | * | Fish-Face joined #nim |
23:56:19 | FromDiscord | <nailuj29> No it used to be |
23:56:25 | FromDiscord | <nailuj29> Discord committed die |
23:56:34 | FromDiscord | <ElegantBeef> Yea i noticed |
23:58:11 | FromDiscord | <nailuj29> I think I fixed it |
23:58:21 | FromDiscord | <nailuj29> My folder |