00:03:57 | * | nixfreak_nim[m] joined #nim |
00:46:43 | FromDiscord | <acek7> what cool stuff is everyone workin on |
01:00:19 | FromDiscord | <Rika> In reply to @HuskyHacks "I used choosenim which": “choosenim stable” doesn’t update your stable version, maybe that’s the issue |
01:00:20 | FromDiscord | <Rika> It only switches |
01:00:42 | * | arkurious quit (Quit: Leaving) |
01:21:28 | FromDiscord | <sealmove> Greeting everyone! Haven't chatted here for ages. I hope I didn't miss anything big. It's nice seeing Nim getting more and more solid. Being the file lang it is, the only thing I miss is elaborate IDEs like intelij. What's the current path to such a direction currently? Is it nimlsp or did I miss something new? And if yes, how is this going? |
01:21:46 | FromDiscord | <sealmove> fine |
01:22:34 | FromDiscord | <Elegantbeef> Jetbrains has their own extension that isnt presently open source, best GUI editor experience is still in vscode |
01:23:03 | FromDiscord | <acek7> which editor should it be used with then? |
01:23:39 | FromDiscord | <Elegantbeef> Though i guess it has a community LSP addon which can be used? |
01:24:09 | FromDiscord | <sealmove> I don't care about intelij specifically, it was just an example. I mean similar features. |
01:24:45 | FromDiscord | <Rika> In reply to @รєคɭ๓๏שє "I don't care about": Like which? |
01:26:36 | FromDiscord | <sealmove> Stuff like autocompletion and source code generation/alteration |
01:27:57 | FromDiscord | <Rika> Auto completion has been part of nim suggest since it was made? |
01:28:13 | FromDiscord | <Rika> Source gen is a no though |
01:28:23 | FromDiscord | <Elegantbeef> What do you mean by source code generation? |
01:28:26 | FromDiscord | <Elegantbeef> Editor snippets? |
01:28:32 | FromDiscord | <sealmove> Yes |
01:28:43 | FromDiscord | <Elegantbeef> Editors support those |
01:30:25 | FromDiscord | <Rika> It’s not really the job of nim suggest |
01:31:23 | FromDiscord | <sealmove> I suppose all these things are possible and already exist one way or another, but it's only when they are very well-worked and automatically in place, when they trully give you a different experience. For example when installing vscode's plugin, you get a nice lightweight editor experience. But when you write Scala in the intelij IDE it's a whole different level of experience. |
01:31:24 | FromDiscord | <gnu+linux user> what does {.varargs.} do? |
01:32:08 | FromDiscord | <sealmove> So I wonder if there is a focused effort towards achieving such an experience. |
01:32:39 | FromDiscord | <Elegantbeef> `{.varargs.}` is for C varargs |
01:32:53 | FromDiscord | <Elegantbeef> It's supposedly a goal of 2021, but it's yet to be realized |
01:33:03 | FromDiscord | <Elegantbeef> To improve tooling that is |
01:33:07 | FromDiscord | <gnu+linux user> thanks beef |
01:33:34 | FromDiscord | <sealmove> How can I help? Is there is an agreed direction? Some specific repos? |
01:33:40 | FromDiscord | <Elegantbeef> I can only say seal be the change you want to be, improve the tooling make RFCs for features you'd like and get to town! \:D |
01:33:56 | FromDiscord | <Elegantbeef> you want to see\ |
01:34:22 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/RFCs/issues/300 |
01:34:44 | FromDiscord | <Elegantbeef> Nimsuggest/NimFind(IC replacement?) are the present path forward |
01:34:54 | FromDiscord | <sealmove> Thanks |
01:35:43 | FromDiscord | <Elegantbeef> For more insight and direction ask in the internals chat |
02:39:38 | nixfreak_nim[m] | Does anyone have any good examples that I can take a look at for porting typescript to nim? I see typescript uses objects like nim , but calls them interfaces or alias |
02:40:42 | nixfreak_nim[m] | I'm looking at this sdk https://github.com/stellar/js-stellar-sdk/tree/453115515d3a6197b7f6534128e6b71814bc1e6a |
02:40:56 | nixfreak_nim[m] | its almost entirely typescript |
02:41:06 | FromDiscord | <xflywind> https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers#table-of-contents |
02:41:26 | FromDiscord | <xflywind> https://github.com/bung87/ts2nim |
02:41:29 | nrds | <R2D299> itHub: 7"Typescript to Nim transpiler " |
02:41:51 | nixfreak_nim[m] | Thank you |
02:41:58 | FromDiscord | <Elegantbeef> Arent typescript interfaces more like Nim concepts? |
02:42:16 | FromDiscord | <Elegantbeef> They're not actually meant to be instantiated but just a list of parts that's required |
02:42:27 | nixfreak_nim[m] | https://www.typescriptlang.org/docs/handbook/2/objects.html |
02:42:50 | nixfreak_nim[m] | I dunno I'm looking at this to figure it out |
02:46:54 | nixfreak_nim[m] | Thanks xflywind |
02:47:11 | FromDiscord | <xflywind> no problem |
03:36:57 | * | kayabaNerve joined #nim |
03:52:34 | * | Pyautogui joined #nim |
03:53:12 | * | rockcavera quit (Remote host closed the connection) |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:32 | * | supakeen joined #nim |
04:07:19 | nixfreak_nim[m] | damn this is bigger project then I thought , so may package dependencies and then on top of it ruby ? |
04:07:49 | nixfreak_nim[m] | ts2nim didn't like any of the ts files |
04:08:01 | * | Pyautogui quit (Ping timeout: 245 seconds) |
04:16:03 | nixfreak_nim[m] | Ha ha js-stellar-sdk/node_modules$ ll | wc -l |
04:16:03 | nixfreak_nim[m] | 958 |
04:18:01 | * | Pyautogui joined #nim |
04:19:08 | FromDiscord | <Rika> Not a lot in particular |
04:19:15 | FromDiscord | <Rika> Oh |
04:19:18 | FromDiscord | <Rika> This is files |
04:34:59 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
04:42:03 | nixfreak_nim[m] | node modules |
04:57:09 | nrds | <Prestige99> Anyone with c knowledge want to help me figure out how to use SDL_gpu? There are bindings for it here https://github.com/Vladar4/sdl2_nim but I think I just don't have it properly installed. Tried following the directions here: https://github.com/grimfang4/sdl-gpu |
04:57:10 | nrds | <R2D299> itHub: 7"Wrapper of the SDL 2 library for the Nim language." |
04:59:24 | nrds | <Prestige99> My nim example file seems compile/run but nothing works as expected (e.g. loading the same image has different sizes each run and doesn't display). Tried a c program and I get linking errors |
05:02:30 | FromDiscord | <impbox [ftsf]> Prestige, I'm guessing it works if you're just doing SDL but not SDL + SDL_gpu ? |
05:02:35 | FromDiscord | <impbox [ftsf]> is that right |
05:03:00 | nrds | <Prestige99> Yeah |
05:03:11 | FromDiscord | <impbox [ftsf]> i'll see if i can repro it on arch here |
05:05:04 | nrds | <Prestige99> I attempted fixing the broken aur package for it: https://0x0.st/-YYC.txt |
05:08:26 | FromDiscord | <impbox [ftsf]> do you get warnings when running cmake? |
05:08:55 | nrds | <Prestige99> Yeah |
05:10:09 | nrds | <Prestige99> https://i.imgur.com/VyUwbsA.png |
05:10:23 | FromDiscord | <impbox [ftsf]> yeah, i'd say that's the reason it doesn't work |
05:12:36 | nrds | <Prestige99> hm I think some guy in the arch matrix chat is going to help fix the build |
05:12:40 | nrds | <Prestige99> hopefully |
05:18:53 | * | Pyautogui quit (Quit: Connection closed) |
05:20:43 | * | Pyautogui joined #nim |
05:33:42 | * | Pyautogui quit (Quit: Connection closed) |
05:34:30 | nrds | <Prestige99> okay got it working in c, but not in nim.. |
05:37:17 | * | Pyautogui joined #nim |
05:38:50 | NimEventer | New Nimble package! zfdbms - , see https://github.com/zendbit/nim.zfdbms |
05:38:53 | nrds | <R2D299> itHub: 7"Simple database generator, connector and query tools." |
05:41:59 | * | Pyautogui quit (Client Quit) |
05:43:03 | * | Pyautogui joined #nim |
05:58:13 | * | Pyautogui quit (Ping timeout: 252 seconds) |
07:37:07 | * | Vladar joined #nim |
07:40:25 | * | max22- joined #nim |
07:45:56 | * | neurocyte0132 quit (Quit: The Lounge - https://thelounge.chat) |
07:49:28 | * | PMunch joined #nim |
07:52:25 | * | neurocyte0132 joined #nim |
08:14:43 | FromDiscord | <NullCode> is there something like ctypes for nim |
08:15:44 | FromDiscord | <Elegantbeef> there are `C` variants of most types |
08:16:02 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/system.html#clong |
08:16:07 | FromDiscord | <Elegantbeef> Starts there |
08:17:58 | FromDiscord | <NullCode> also how about dll loading |
08:18:08 | FromDiscord | <NullCode> like ctypes.windll("kernel32.dll") |
08:20:01 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/dynlib.html |
08:20:16 | FromDiscord | <Elegantbeef> Still dubious of your "i'm not a malware programmer" |
08:21:42 | FromDiscord | <dom96> lol |
08:22:01 | FromDiscord | <dom96> Next question will be: is there a way for me to capture pressed keys using Nim? |
08:31:01 | FromDiscord | <sealmove> 😂 |
08:41:13 | FromDiscord | <NullCode> In reply to @dom96 "Next question will be:": dw ill figure that out myself ;) |
08:41:23 | FromDiscord | <NullCode> In reply to @Elegantbeef "Still dubious of your": nah I'm really not a malware programmer |
08:47:27 | * | max22- quit (Ping timeout: 240 seconds) |
08:49:27 | FromDiscord | <cabboose> Would you say if you were? |
08:49:51 | FromDiscord | <cabboose> Would white hats not be considered Malware programmers? Actually asking |
08:50:05 | FromDiscord | <cabboose> They’re not malicious 😕 |
09:00:08 | FromDiscord | <impbox [ftsf]> @NullCode your github account looks like the github account of a malware dev |
09:01:12 | FromDiscord | <Elegantbeef> In what way is `About Remote Access Trojan that uses Discord as C&C` malware?! 😜 |
09:01:52 | FromDiscord | <impbox [ftsf]> yeah, you're right, what am i thinking |
09:03:02 | FromDiscord | <cabboose> Maybe he was a victim |
09:08:50 | FromDiscord | <Elegantbeef> Yea he was just trying to walk to the store and accidently wrote a discord token grabber |
09:24:38 | FromDiscord | <Rika> Well you could always just say “oh I’m not actually a criminal” without anyone knowing you are unless evidence is free to see |
09:24:49 | FromDiscord | <Rika> Guess where you fall under |
09:55:46 | * | max22- joined #nim |
10:17:03 | * | xet7 quit (Remote host closed the connection) |
10:18:05 | * | xet7 joined #nim |
10:45:01 | * | arkurious joined #nim |
10:49:14 | * | jjido joined #nim |
10:55:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
11:00:41 | FromDiscord | <impbox [ftsf]> hmm i want dear imgui for web >_< |
11:01:20 | FromDiscord | <Yardanico> @impbox [ftsf] but it works just fine if you compile it to wasm |
11:01:34 | FromDiscord | <Yardanico> https://jnmaloney.github.io/WebGui/imgui.html |
11:01:36 | FromDiscord | <impbox [ftsf]> yeah... but using normal web stuff |
11:01:45 | FromDiscord | <Yardanico> well wasm nowadays is quite normal I'd say :P |
11:01:53 | FromDiscord | <impbox [ftsf]> rather than rendering to a canvas |
11:02:37 | FromDiscord | <impbox [ftsf]> i'm trying to use karax like imgui, but it seems to ignore my changes |
11:03:00 | FromDiscord | <impbox [ftsf]> I guess the dom differ doesn't detect my changes maybe |
11:03:57 | FromDiscord | <Yardanico> In reply to @impbox "yeah... but using normal": there's also https://github.com/flyover/imgui-js but it's drawing to a canvas too |
11:04:00 | nrds | <R2D299> itHub: 7"JavaScript bindings for Dear ImGui using Emscripten and TypeScript" |
11:04:32 | FromDiscord | <impbox [ftsf]> yeah... when i say I want imgui... i really mean I want to work the way I work with imgui, but for html |
11:04:58 | FromDiscord | <impbox [ftsf]> but yeah I guess I could use imgui + emscripten for mocking stuff up first |
11:24:57 | FromDiscord | <NullCode> In reply to @Elegantbeef "In what way is": Exactly! |
11:25:00 | FromDiscord | <NullCode> You read it wrong |
11:25:14 | FromDiscord | <NullCode> Its "how to protect yourself against Remote..." |
11:32:16 | * | jjido joined #nim |
11:36:04 | FromDiscord | <NullCode> In reply to @Elegantbeef "Yea he was just": Yes |
12:00:07 | * | max22- quit (Ping timeout: 240 seconds) |
12:02:22 | * | pro joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:12:55 | * | jjido quit (Quit: Textual IRC Client: www.textualapp.com) |
12:26:11 | * | rockcavera joined #nim |
12:26:11 | * | rockcavera quit (Changing host) |
12:26:11 | * | rockcavera joined #nim |
12:41:07 | FromDiscord | <whisperdev> What is the best way to create a project in Nim and "pin down" exact versions of the nim compiler/mingw |
12:41:17 | FromDiscord | <whisperdev> (edit) "compiler/mingw" => "compiler,mingw and packages?" |
12:41:37 | FromDiscord | <haxscramper> for packages nimble 0.14 has lockfiles |
12:41:52 | FromDiscord | <haxscramper> compiler version can be pinned using `nim == X.Y.Z` |
12:42:08 | FromDiscord | <haxscramper> Though nimble won't auotmatically switch to that version, it will just use env state |
12:42:42 | FromDiscord | <haxscramper> mingw cannot be declaratively pinned by nimble, but you can do some `exec` and check for this |
12:42:56 | FromDiscord | <haxscramper> Related https://github.com/nim-lang/nimble/issues/921 |
12:46:12 | * | xet7 quit (Remote host closed the connection) |
12:47:16 | * | xet7 joined #nim |
13:03:22 | FromDiscord | <cabboose> Just saw your in-depth rfc on nimble 😲 awesome work 👏 |
13:03:45 | FromDiscord | <cabboose> Are there any actions being made on that? |
13:04:20 | FromDiscord | <haxscramper> no |
13:04:44 | FromDiscord | <haxscramper> and after status "unloading" their PR I need to rething some thing from this RFC anyway |
13:05:10 | FromDiscord | <haxscramper> And there are some other changes, like pubgrub algorithm is probable less needed |
13:05:11 | FromDiscord | <haxscramper> MVS is better |
13:05:22 | FromDiscord | <haxscramper> At the same time package features are almost mandatory to have IMO |
13:05:33 | FromDiscord | <haxscramper> Also more attention to the build system |
13:06:12 | * | neurocyte0132 quit (Quit: The Lounge - https://thelounge.chat) |
13:06:50 | FromDiscord | <haxscramper> way more attention |
13:07:01 | FromDiscord | <haxscramper> Is also more important than I thought earlier |
13:07:02 | FromDiscord | <Rika> What do you mean “unloading” |
13:07:06 | FromDiscord | <Rika> Like splitting up? |
13:07:37 | FromDiscord | <haxscramper> like dumping huge pile of crap |
13:08:08 | FromDiscord | <haxscramper> it would be everyone's headache what to do with these changes |
13:08:21 | FromDiscord | <Rika> Ah I remember that now |
13:08:38 | FromDiscord | <Rika> Did the core devs ever get to working on looking at that PR… |
13:13:16 | FromDiscord | <haxscramper> it has already been merged |
13:13:17 | FromDiscord | <haxscramper> right |
13:13:22 | FromDiscord | <haxscramper> +9k -2k |
13:18:52 | * | max22- joined #nim |
13:21:27 | FromDiscord | <xflywind> In reply to @Rika "Did the core devs": araq and dom96 have reviewed them. |
13:21:36 | FromDiscord | <Rika> I see |
13:34:16 | * | kayabaNerve quit (Ping timeout: 245 seconds) |
13:45:50 | NimEventer | New thread by Miran: Nim 1.6.0 RC2, see https://forum.nim-lang.org/t/8466 |
14:27:47 | * | pro quit (Quit: WeeChat 3.2.1) |
16:08:48 | * | beshr joined #nim |
17:47:32 | FromDiscord | <Shoto Todoroki> Heya |
17:48:32 | FromDiscord | <Shoto> I used Nim quite a while ago and have kinda just forgotten about it so... Does anyone have any ideas for projects i can do to get back into Nim? |
17:51:13 | FromDiscord | <IsaacPaul> Use Natu to make a gba game 🤷♂️ ↵Automate something to save you time |
17:51:24 | FromDiscord | <auxym> if you don't have anything in mind, you could do AoC or something like that |
17:52:22 | FromDiscord | <Shoto> AoC? And i don't have a GBA I'd be able to use to make a game lol |
17:52:32 | FromDiscord | <dom96> In reply to @Shoto Todoroki "I used Nim quite": https://github.com/nim-lang/needed-libraries |
17:52:34 | nrds | <R2D299> itHub: 7"This repository contains a list a needed libraries." |
17:53:08 | FromDiscord | <auxym> could use an emulator (or write a game with Nico). aoc is https://adventofcode.com/ |
17:53:37 | FromDiscord | <Shoto> In reply to @dom96 "https://github.com/nim-lang/needed-libraries": Thanks! |
17:53:44 | FromDiscord | <Shoto> In reply to @auxym "could use an emulator": True, thanks! |
18:13:01 | * | max22- quit (Ping timeout: 265 seconds) |
18:27:05 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/qgz |
18:27:44 | FromDiscord | <haxscramper> actually no, I have different error, I didn't minimize it properly |
18:28:59 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AfH |
18:29:02 | FromDiscord | <haxscramper> > ↵> invalid application of ‘alignof’ to incomplete type ‘struct Handle’↵> |
18:29:46 | FromDiscord | <haxscramper> Library only exposes forward-declared type handle, so I can't define it properly |
18:30:04 | FromDiscord | <haxscramper> And I want to add a finalizer for `ref object` wrapper |
18:30:53 | FromDiscord | <haxscramper> Or alternatively, how can I use regular `=destroy` and `object`, but ensure that there is no double frees |
18:31:11 | FromDiscord | <haxscramper> I.e. I want to prevent accidental copying that would create two objects |
18:39:29 | FromDiscord | <acek7> does nim have any template command like C# does that sets up some files to start you off with. |
18:39:56 | FromDiscord | <haxscramper> `nimble ini` |
18:40:16 | FromDiscord | <haxscramper> but generally nim project can be as simple as a single nim file |
18:40:35 | FromDiscord | <haxscramper> so there is no need for special IDE wizard templates etc. |
18:41:16 | FromDiscord | <exelotl> there's also treeform's nimtemplate: https://github.com/treeform/nimtemplate |
18:41:19 | nrds | <R2D299> itHub: 7"You can use this Nim template to jump start your Nim library or project." |
18:46:56 | FromDiscord | <exelotl> I'm having trouble installing Nim 1.6 RC2 via choosenim :( |
18:47:11 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3AfN |
18:48:55 | FromDiscord | <haxscramper> better report it on the RC2 thread |
18:54:36 | FromDiscord | <exelotl> done |
18:56:05 | * | max22- joined #nim |
18:57:08 | FromDiscord | <DMisener> sent a long message, see http://ix.io/3AfP |
18:58:48 | FromDiscord | <haxscramper> what is the `echo time.type` in the first place? You want to echo type of the variable? |
19:00:11 | FromDiscord | <DMisener> The echo.time outputs: |
19:00:15 | FromDiscord | <DMisener> Time↵[seconds = 1632853020,↵nanosecond = 0] |
19:01:14 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AfS |
19:02:49 | FromDiscord | <DMisener> The output from: |
19:03:09 | FromDiscord | <DMisener> sent a long message, see http://ix.io/3AfT |
19:04:09 | FromDiscord | <haxscramper> I don't think you can get seconds/nanoseconds out of `Time` object |
19:04:16 | FromDiscord | <haxscramper> Those fields are not exported |
19:04:28 | FromDiscord | <haxscramper> And there appears to be no `getSeconds` or anything of that sort |
19:05:03 | FromDiscord | <haxscramper> in `std/times` documentation, though I can't say for sure because there is no fucking way to just see type-bound operators, or ones that take `Time` as first argument, so you have to ctrlf for thigns |
19:05:04 | * | beshr quit (Quit: Leaving) |
19:05:17 | FromDiscord | <haxscramper> and nothing to convert Time to datetime |
19:05:34 | FromDiscord | <haxscramper> again, maybe I just didn't found |
19:07:23 | FromDiscord | <DMisener> Agree 🙂 Strikes me as odd that I can't google a simple conversion... surely there is a library proc which will convert a string datestamp into elasped time since some epoch?? |
19:11:10 | FromDiscord | <haxscramper> there must be some unhole combination of conversion |
19:11:44 | FromDiscord | <haxscramper> But with `Time`, `DateTime`, `ZonedTime`, unix `int64` time and other things and this documentation organlization I don't think you can figure this out |
19:11:50 | FromDiscord | <haxscramper> Someone just have to know how to do this |
19:12:01 | FromDiscord | <haxscramper> and be the light of hope in these dark times |
19:12:39 | FromDiscord | <haxscramper> because I have 0 idea |
19:14:14 | FromDiscord | <DMisener> Thanks for the feedback... perhaps I will see if I convert a Time to Duration (???) and then use inSeconds (see https://nim-lang.org/0.20.0/times.html#seconds%2CDuration) |
19:22:24 | FromDiscord | <DMisener> sent a long message, see http://ix.io/3Ag0 |
19:25:36 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Ag1 |
19:25:38 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/PK2 |
19:27:27 | FromDiscord | <DMisener> Thanks... I'm a new Discord user and didn't know it supports standard Markdown |
19:28:22 | FromDiscord | <SivadNai> is there an FAQ channel with stuff like that |
19:28:44 | FromDiscord | <haxscramper> for times? |
19:29:11 | FromDiscord | <haxscramper> earlier question about std/times, seconds etc. |
19:29:48 | FromDiscord | <SivadNai> no, for markdown |
19:30:34 | FromDiscord | <haxscramper> discord has markdown guide |
19:30:57 | FromDiscord | <haxscramper> https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline- |
20:11:38 | * | jjido joined #nim |
20:20:17 | * | Guest55 joined #nim |
20:20:39 | Guest55 | Hello everyone. I am an ABSOLUTE newbie to nim. |
20:21:00 | nrds | <Prestige99> Hello |
20:21:08 | Guest55 | I have a question about the "+". I just find that "i=i+1" could not be compiled. |
20:21:15 | Guest55 | i+=1 works well. |
20:21:48 | Guest55 | Is that build in feature of the nim? I used the i=i+1 for many years and did not feel good for i+=1 |
20:22:02 | nrds | <Prestige99> !eval var i = 0; i = i + 1; echo i |
20:22:05 | NimBot | 1 |
20:22:05 | nrds | <R2D299> 1 |
20:23:18 | Guest55 | it woks now for some reason. |
20:23:58 | FromDiscord | <haxscramper> it should be noted that nim generally uses `inc i` and `dec i` instead of `+=` or `+` |
20:23:59 | nrds | <Prestige99> maybe you were using let instead of var before? |
20:25:06 | Guest55 | I did not. However, I could repeat the issue. As I remembered, it told me something like the "counter" is treated as a function. |
20:25:21 | nrds | <Prestige99> Hmm |
20:25:21 | Guest55 | The "counter" is the variable name. |
20:25:50 | FromDiscord | <haxscramper> I think you can get this using `counter 1`, but |
20:25:51 | Guest55 | I like the "i=i+1" because the statement works for any langauges. |
20:26:03 | FromDiscord | <haxscramper> wh |
20:26:11 | FromDiscord | <haxscramper> !eval var i = 0; i = i +1 |
20:26:12 | NimBot | Compile failed: /usercode/in.nim(1, 18) Error: attempting to call routine: 'i' |
20:26:27 | Guest55 | Exactly! NimBot! |
20:26:29 | FromDiscord | <haxscramper> here you go |
20:26:53 | FromDiscord | <haxscramper> `+1` is an integer literal, and nim allows to omit parens around function call |
20:26:59 | FromDiscord | <haxscramper> so it effectively tried to do like `echo +1` |
20:27:03 | FromDiscord | <haxscramper> But with `i` |
20:27:22 | nrds | <Prestige99> interesting |
20:27:30 | FromDiscord | <haxscramper> https://forum.nim-lang.org/t/7053 |
20:29:39 | Guest55 | So it is not encouraged to add space before the "+" |
20:30:08 | Guest55 | Thanks all |
20:30:34 | nrds | <Prestige99> !eval var i = 0; i.inc; echo i |
20:30:37 | NimBot | 1 |
20:30:38 | nrds | <R2D299> 1 |
20:30:39 | nrds | <Prestige99> or this ^ |
20:30:55 | nrds | <Prestige99> or `inc i` however you want |
20:31:51 | FromDiscord | <Yardanico> @Guest55 it's encouraged to add space both before and after the + |
20:46:18 | FromDiscord | <haxscramper> Forgot I need .incompleteStruct. annotation |
21:00:29 | * | Vladar quit (Quit: Leaving) |
21:16:19 | * | Pyautogui joined #nim |
21:22:56 | NimEventer | New thread by Alexeypetrushin: Can't link C library, see https://forum.nim-lang.org/t/8467 |
21:38:45 | Guest55 | Is it possible to return the void for the nim's proc? |
21:46:16 | * | Gustavo6046_ joined #nim |
21:47:01 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
21:49:14 | * | Gustavo6046_ is now known as Gustavo6046 |
21:56:48 | * | Pyautogui quit (Quit: Connection closed) |
22:05:28 | FromDiscord | <Elegantbeef> What do you mean "the void" |
22:12:37 | PMunch | You know, the vast emptiness |
22:13:48 | PMunch | The emptiness that envelops the universe, the darkness that permeates everything |
22:13:58 | PMunch | Not sure if that's a type in Nim.. |
22:14:19 | PMunch | But Guest55 if you want to just not return something simply omit the return type |
22:14:43 | PMunch | Or I think you can have the return type be `void` as well, but not 100% sure |
22:15:04 | FromDiscord | <Elegantbeef> No return type == void |
22:15:08 | PMunch | I mean, look at that ease: https://forum.nim-lang.org/t/8467 |
22:15:08 | FromDiscord | <Elegantbeef> Hello pmunch |
22:15:12 | PMunch | Hello |
22:15:14 | PMunch | What's up? |
22:15:32 | FromDiscord | <Elegantbeef> Fuck all |
22:15:39 | PMunch | Huh? |
22:15:45 | FromDiscord | <Elegantbeef> More bug fixes i guess |
22:15:58 | FromDiscord | <Elegantbeef> Fuck all == nothing |
22:15:58 | PMunch | I'm not following :P |
22:16:03 | PMunch | Ah :P |
22:16:13 | PMunch | I thought you where mad at everything there for a second |
22:16:26 | nrds | <sorcerer99> im mad at everything |
22:16:28 | FromDiscord | <Elegantbeef> Lol |
22:16:28 | nrds | <sorcerer99> ACTION throws stuff |
22:16:43 | FromDiscord | <Elegantbeef> You're a sorcerer so be less sterotypical |
22:17:00 | nrds | <sorcerer99> ACTION casts a spell on elegantbeef |
22:17:12 | * | PMunch puts on his robe and wizard hat |
22:17:18 | FromDiscord | <Elegantbeef> Let me guess i'm even more untolerable |
22:17:19 | nrds | <sorcerer99> LOL |
22:17:30 | nrds | <sorcerer99> im only joking :) |
22:17:34 | nrds | <sorcerer99> im a jokester |
22:17:53 | FromDiscord | <Elegantbeef> Oh yea i was totally serious |
22:18:03 | PMunch | (do people still get bash.org quotes? Or are those too old?) |
22:18:05 | FromDiscord | <Elegantbeef> Are you new here or just a lurker? |
22:18:23 | nrds | <sorcerer99> im a professional lurker, i have a degree for it |
22:18:28 | FromDiscord | <Elegantbeef> I know i wouldnt pmunch |
22:18:38 | nrds | <sorcerer99> pmunch, i havent seen a bash.org quotes bot in awhile |
22:18:38 | FromDiscord | <Elegantbeef> Either way hello sorcerer |
22:18:47 | nrds | <sorcerer99> howdy elegantbeef :) |
22:19:07 | FromDiscord | <Elegantbeef> Anyone got some fun problems to solve?! |
22:19:14 | PMunch | @ElegantBeef: http://bash.org/?top http://bash.org/?top2 <- Some good ol' IRC memes |
22:19:18 | FromDiscord | <Elegantbeef> I dont want to look at handleGenericInvocation for a bit |
22:19:33 | nrds | <sorcerer99> i dont know nim, im just a good friend and person... i joined for prestige and i randomly watch here to see if i can understand anything... one my PCs runs nimdow |
22:19:57 | FromDiscord | <Elegantbeef> Well time to learn Nim! |
22:20:11 | nrds | <sorcerer99> lol maybe if i wasnt so tired from my job |
22:20:13 | PMunch | Well, I need to take a set of update regions and combine them to one big region but not if some of the regions are really small |
22:20:22 | nrds | <sorcerer99> i sleep most of the time and when im not sleeping, i run this irc network on this side |
22:20:24 | FromDiscord | <Elegantbeef> How much could i charge to tutor people to write Nim... probably not much |
22:20:42 | PMunch | I've been thinking about the same thing :P |
22:20:55 | PMunch | Maybe Status newhires would be interested |
22:20:56 | FromDiscord | <Elegantbeef> Sleep or tutoring 😛 |
22:22:03 | PMunch | Hmm, I really should go to bed |
22:22:18 | FromDiscord | <Elegantbeef> I have thought about streaming me doing compiler bug fixes but it's just me slightly modifying code until the tests pass |
22:22:32 | FromDiscord | <Elegantbeef> Nah you need all the daylight whilst you still have it! |
22:22:45 | FromDiscord | <Elegantbeef> Stay up all the hours and sleep when there is no sun! |
22:23:55 | nrds | <sorcerer99> no pmunch |
22:23:59 | nrds | <sorcerer99> you cant |
22:24:11 | nrds | <sorcerer99> theres zombies in the channel calling your name lol |
22:24:19 | FromDiscord | <Elegantbeef> Also who the fuck openly admits to being friends with prestige |
22:24:30 | nrds | <sorcerer99> i do |
22:24:35 | FromDiscord | <Elegantbeef> Sorry sorcerer sucks to be use! |
22:24:35 | FromDiscord | <Elegantbeef> you\ even |
22:24:37 | PMunch | Daylight? |
22:24:38 | nrds | <sorcerer99> i openly admit hes one of my besties |
22:24:43 | PMunch | It's pitch dark out right now :P |
22:24:43 | nrds | <sorcerer99> nope it doesnt |
22:25:05 | PMunch | > Also who the fuck openly admits to being friends with prestige |
22:25:16 | PMunch | And people wonder why this channel is sometimes seen as hostile :P |
22:25:22 | nrds | <sorcerer99> lol |
22:25:27 | nrds | <sorcerer99> yea im not sure if that was a joke or serious |
22:25:34 | nrds | <sorcerer99> so i responded nicely, instead of my normal rude way |
22:25:34 | PMunch | Definitely a joke |
22:25:37 | nrds | <sorcerer99> :P |
22:25:42 | FromDiscord | <Elegantbeef> Hey if you cant take my light hearted banter you cannot take my light hearted banter |
22:25:56 | nrds | <sorcerer99> lol just making sure, i dont know anyone around here ;P |
22:26:11 | PMunch | Oh yeah, I wasn't saying anything against it. But imagine if someone joined and just saw that message :P |
22:26:29 | PMunch | Like sorcerer apparently *shrugs* |
22:26:31 | FromDiscord | <Elegantbeef> You could say that about 99% of my messages |
22:26:35 | nrds | <sorcerer99> lol |
22:26:41 | FromDiscord | <Elegantbeef> the answer is always "This guy is a fuckwit, let's move one" |
22:26:55 | PMunch | Wait, are you temping for disruptek? |
22:27:20 | FromDiscord | <Elegantbeef> Temping? I acted this way when he was here |
22:27:27 | PMunch | Haha, fair point :P |
22:27:41 | PMunch | Anyways, I've got work in the morning.. |
22:27:47 | FromDiscord | <Elegantbeef> Well buh bye |
22:27:55 | nrds | <sorcerer99> adios amigos |
22:28:07 | FromDiscord | <Elegantbeef> Oh i have to leave?! |
22:28:26 | nrds | <sorcerer99> amigo? lol |
22:28:35 | PMunch | @ElegantBeef, if you want another challenge have a look at the Futhark TODO ;) |
22:28:47 | PMunch | There's one there that might require some compiler info |
22:28:56 | * | PMunch quit (Quit: leaving) |
22:29:10 | FromDiscord | <Elegantbeef> Ugh if you insist |
22:33:15 | * | max22- quit (Quit: Leaving) |
22:35:53 | hexology | hello, newbie here. what |
22:36:06 | FromDiscord | <Elegantbeef> Indeed what |
22:36:08 | hexology | what's the best way to accumulate values in an array? i'm using collect() from the 'sugar' module |
22:36:11 | hexology | lol :D |
22:36:50 | FromDiscord | <Elegantbeef> Accumulate means what percisely? |
22:37:43 | FromDiscord | <Elegantbeef> I know from the implication but much prefer to hear exactly what people are after |
22:39:56 | hexology | i have a `while true` loop, getting arguments from OptParser() that meet certain criteria. i want to append each one to an array, python-style, to the extent that's possible |
22:40:59 | FromDiscord | <Elegantbeef> Collect may be the best method, also there are iterators for OptParsers https://nim-lang.org/docs/parseopt.html#15 |
22:41:21 | hexology | ah, that's nicer |
22:41:23 | hexology | thank you |
22:44:55 | * | Guest55 quit (Ping timeout: 256 seconds) |
22:51:55 | * | vicfred joined #nim |
22:54:08 | hexology | hm, collect() doesn't seem to like it when i don't "return" something at every iteration. it says my loop "has no type (or is ambiguous)". so maybe i need to "manually" append in this case |
22:57:57 | FromDiscord | <Elegantbeef> Are you wanting to stop the iteration or stop the function? |
22:58:50 | FromDiscord | <Elegantbeef> Code would help |
23:00:15 | hexology | like this: https://bpa.st/XOEA |
23:01:18 | hexology | it makes sense why this would be the case - i assume the macro does something like "look for the last expression and use that as the value to collect", so it's sensible that it wouldn't know how to handle this type of code |
23:01:43 | FromDiscord | <Elegantbeef> Well it's more of a case of that's an invalid expression |
23:01:54 | FromDiscord | <Elegantbeef> Actually does `discard` work there? |
23:02:02 | FromDiscord | <Elegantbeef> I doubt the macro handles it |
23:02:33 | FromDiscord | <Elegantbeef> I'd say make this a function in this case |
23:04:32 | nrds | <Prestige99> Lol @Elegantbeef & PMunch |
23:05:24 | hexology | interesting https://nim-lang.org/docs/tut1.html#procedures-discard-statement |
23:05:58 | hexology | in this case the logic has several branches, so i'd probably have to `discard` each branch |
23:06:02 | hexology | i'll post the actual code in a moment |
23:06:15 | FromDiscord | <Elegantbeef> Like i said probably best to make a proc |
23:07:57 | FromDiscord | <Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3AgV |
23:09:04 | hexology | (this isn't #python, but i feel obligated to point out that you probably want AsyncIterable and not AsyncIterator in that type signature) |
23:09:50 | FromDiscord | <Professor Actual Factual> There's a python channel in this discord server? |
23:09:56 | hexology | oh sorry, i'm on IRC |
23:10:18 | FromDiscord | <Elegantbeef> There is not a python channel \:D |
23:10:20 | hexology | @Elegantbeef that's why i want to post my code anyway, this is turning into a bit of a long block of code and i'd be interested to see what an experienced nimmer would write instead |
23:12:44 | FromDiscord | <Elegantbeef> Hopefully someone that uses async can pop in prof, i've not so cannot say much |
23:13:09 | FromDiscord | <Elegantbeef> Well when you post it i'll happily show you what i'd do |
23:21:08 | hexology | @Elegantbeef https://paste.pythondiscord.com/ijosufucow.nim it's more or less how i'd do it in a dynamic language, which is nice, but that's kind of a big long block of cli parsing. maybe there's some nice 3rd party library that supports a more declarative config? |
23:21:19 | hexology | s/dynamic/dynamically typed/ |
23:22:44 | hexology | this also only handles `--key=val` options and i guess i'd have to parse `--key val` myself, which is going to be even more boring loopy/state-tracking stuff that i don't want to mess with |
23:30:56 | FromDiscord | <deech> Macro question: if I have a macro `macro m (t:typedesc) ..` inside the macro `t` is a `NimNode` not a `typedesc` how do I recover that so I can eg. call `default t` inside the macro? |
23:38:52 | FromDiscord | <impbox [ftsf]> Can you just make the macro call default(t)? |
23:39:27 | FromDiscord | <impbox [ftsf]> `newCall("default", t)` or something, sorry not at my computer atm |
23:41:23 | FromDiscord | <deech> Right but how would I use that result of that in my macro? I'm not looking to generate that code, I want to call `(default a).fieldPairs` at compile time. |
23:41:34 | FromDiscord | <deech> (edit) "a).fieldPairs`" => "t).fieldPairs`" |
23:45:34 | FromDiscord | <impbox [ftsf]> newCall("fieldPairs", newCall("default", t)) |
23:47:35 | FromDiscord | <Elegantbeef> Well i just got back and yea procedures save lives hexology \:p |
23:53:36 | FromDiscord | <impbox [ftsf]> @deech maybe you can just use a compiletime proc |
23:55:07 | FromDiscord | <deech> Thanks, but the problem is how do I call that from a macro? The macro changes the type of everything passed to it to `NimNode` so if I have a `proc p(t:typedesc) ...` you still can't call that from a macro. |
23:55:37 | * | stkrdknmibalz joined #nim |
23:57:02 | FromDiscord | <impbox [ftsf]> can you share what you're working on? |
23:58:57 | FromDiscord | <Elegantbeef> hexology this is better but still dont like those tables https://play.nim-lang.org/#ix=3Ah2 |
23:59:03 | FromDiscord | <Elegantbeef> Ok now deech's issue \:D |
23:59:32 | FromDiscord | <impbox [ftsf]> beef i'm sure you'll be able to help more than me |
23:59:41 | hexology | i've been using mostly python and lua, tables everywhere :) |