<< 28-09-2021 >>

00:03:57*nixfreak_nim[m] joined #nim
00:46:43FromDiscord<acek7> what cool stuff is everyone workin on
01:00:19FromDiscord<Rika> In reply to @HuskyHacks "I used choosenim which": “choosenim stable” doesn’t update your stable version, maybe that’s the issue
01:00:20FromDiscord<Rika> It only switches
01:00:42*arkurious quit (Quit: Leaving)
01:21:28FromDiscord<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:46FromDiscord<sealmove> fine
01:22:34FromDiscord<Elegantbeef> Jetbrains has their own extension that isnt presently open source, best GUI editor experience is still in vscode
01:23:03FromDiscord<acek7> which editor should it be used with then?
01:23:39FromDiscord<Elegantbeef> Though i guess it has a community LSP addon which can be used?
01:24:09FromDiscord<sealmove> I don't care about intelij specifically, it was just an example. I mean similar features.
01:24:45FromDiscord<Rika> In reply to @รєคɭ๓๏שє "I don't care about": Like which?
01:26:36FromDiscord<sealmove> Stuff like autocompletion and source code generation/alteration
01:27:57FromDiscord<Rika> Auto completion has been part of nim suggest since it was made?
01:28:13FromDiscord<Rika> Source gen is a no though
01:28:23FromDiscord<Elegantbeef> What do you mean by source code generation?
01:28:26FromDiscord<Elegantbeef> Editor snippets?
01:28:32FromDiscord<sealmove> Yes
01:28:43FromDiscord<Elegantbeef> Editors support those
01:30:25FromDiscord<Rika> It’s not really the job of nim suggest
01:31:23FromDiscord<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:24FromDiscord<gnu+linux user> what does {.varargs.} do?
01:32:08FromDiscord<sealmove> So I wonder if there is a focused effort towards achieving such an experience.
01:32:39FromDiscord<Elegantbeef> `{.varargs.}` is for C varargs
01:32:53FromDiscord<Elegantbeef> It's supposedly a goal of 2021, but it's yet to be realized
01:33:03FromDiscord<Elegantbeef> To improve tooling that is
01:33:07FromDiscord<gnu+linux user> thanks beef
01:33:34FromDiscord<sealmove> How can I help? Is there is an agreed direction? Some specific repos?
01:33:40FromDiscord<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:56FromDiscord<Elegantbeef> you want to see\
01:34:22FromDiscord<Elegantbeef> https://github.com/nim-lang/RFCs/issues/300
01:34:44FromDiscord<Elegantbeef> Nimsuggest/NimFind(IC replacement?) are the present path forward
01:34:54FromDiscord<sealmove> Thanks
01:35:43FromDiscord<Elegantbeef> For more insight and direction ask in the internals chat
02:39:38nixfreak_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:42nixfreak_nim[m]I'm looking at this sdk https://github.com/stellar/js-stellar-sdk/tree/453115515d3a6197b7f6534128e6b71814bc1e6a
02:40:56nixfreak_nim[m]its almost entirely typescript
02:41:06FromDiscord<xflywind> https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers#table-of-contents
02:41:26FromDiscord<xflywind> https://github.com/bung87/ts2nim
02:41:29nrds<R2D299> itHub: 7"Typescript to Nim transpiler "
02:41:51nixfreak_nim[m]Thank you
02:41:58FromDiscord<Elegantbeef> Arent typescript interfaces more like Nim concepts?
02:42:16FromDiscord<Elegantbeef> They're not actually meant to be instantiated but just a list of parts that's required
02:42:27nixfreak_nim[m]https://www.typescriptlang.org/docs/handbook/2/objects.html
02:42:50nixfreak_nim[m]I dunno I'm looking at this to figure it out
02:46:54nixfreak_nim[m]Thanks xflywind
02:47:11FromDiscord<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:19nixfreak_nim[m]damn this is bigger project then I thought , so may package dependencies and then on top of it ruby ?
04:07:49nixfreak_nim[m]ts2nim didn't like any of the ts files
04:08:01*Pyautogui quit (Ping timeout: 245 seconds)
04:16:03nixfreak_nim[m]Ha ha js-stellar-sdk/node_modules$ ll | wc -l
04:16:03nixfreak_nim[m]958
04:18:01*Pyautogui joined #nim
04:19:08FromDiscord<Rika> Not a lot in particular
04:19:15FromDiscord<Rika> Oh
04:19:18FromDiscord<Rika> This is files
04:34:59*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
04:42:03nixfreak_nim[m] node modules
04:57:09nrds<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:10nrds<R2D299> itHub: 7"Wrapper of the SDL 2 library for the Nim language."
04:59:24nrds<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:30FromDiscord<impbox [ftsf]> Prestige, I'm guessing it works if you're just doing SDL but not SDL + SDL_gpu ?
05:02:35FromDiscord<impbox [ftsf]> is that right
05:03:00nrds<Prestige99> Yeah
05:03:11FromDiscord<impbox [ftsf]> i'll see if i can repro it on arch here
05:05:04nrds<Prestige99> I attempted fixing the broken aur package for it: https://0x0.st/-YYC.txt
05:08:26FromDiscord<impbox [ftsf]> do you get warnings when running cmake?
05:08:55nrds<Prestige99> Yeah
05:10:09nrds<Prestige99> https://i.imgur.com/VyUwbsA.png
05:10:23FromDiscord<impbox [ftsf]> yeah, i'd say that's the reason it doesn't work
05:12:36nrds<Prestige99> hm I think some guy in the arch matrix chat is going to help fix the build
05:12:40nrds<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:30nrds<Prestige99> okay got it working in c, but not in nim..
05:37:17*Pyautogui joined #nim
05:38:50NimEventerNew Nimble package! zfdbms - , see https://github.com/zendbit/nim.zfdbms
05:38:53nrds<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:43FromDiscord<NullCode> is there something like ctypes for nim
08:15:44FromDiscord<Elegantbeef> there are `C` variants of most types
08:16:02FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#clong
08:16:07FromDiscord<Elegantbeef> Starts there
08:17:58FromDiscord<NullCode> also how about dll loading
08:18:08FromDiscord<NullCode> like ctypes.windll("kernel32.dll")
08:20:01FromDiscord<Elegantbeef> https://nim-lang.org/docs/dynlib.html
08:20:16FromDiscord<Elegantbeef> Still dubious of your "i'm not a malware programmer"
08:21:42FromDiscord<dom96> lol
08:22:01FromDiscord<dom96> Next question will be: is there a way for me to capture pressed keys using Nim?
08:31:01FromDiscord<sealmove> 😂
08:41:13FromDiscord<NullCode> In reply to @dom96 "Next question will be:": dw ill figure that out myself ;)
08:41:23FromDiscord<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:27FromDiscord<cabboose> Would you say if you were?
08:49:51FromDiscord<cabboose> Would white hats not be considered Malware programmers? Actually asking
08:50:05FromDiscord<cabboose> They’re not malicious 😕
09:00:08FromDiscord<impbox [ftsf]> @NullCode your github account looks like the github account of a malware dev
09:01:12FromDiscord<Elegantbeef> In what way is `About Remote Access Trojan that uses Discord as C&C` malware?! 😜
09:01:52FromDiscord<impbox [ftsf]> yeah, you're right, what am i thinking
09:03:02FromDiscord<cabboose> Maybe he was a victim
09:08:50FromDiscord<Elegantbeef> Yea he was just trying to walk to the store and accidently wrote a discord token grabber
09:24:38FromDiscord<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:49FromDiscord<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:41FromDiscord<impbox [ftsf]> hmm i want dear imgui for web >_<
11:01:20FromDiscord<Yardanico> @impbox [ftsf] but it works just fine if you compile it to wasm
11:01:34FromDiscord<Yardanico> https://jnmaloney.github.io/WebGui/imgui.html
11:01:36FromDiscord<impbox [ftsf]> yeah... but using normal web stuff
11:01:45FromDiscord<Yardanico> well wasm nowadays is quite normal I'd say :P
11:01:53FromDiscord<impbox [ftsf]> rather than rendering to a canvas
11:02:37FromDiscord<impbox [ftsf]> i'm trying to use karax like imgui, but it seems to ignore my changes
11:03:00FromDiscord<impbox [ftsf]> I guess the dom differ doesn't detect my changes maybe
11:03:57FromDiscord<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:00nrds<R2D299> itHub: 7"JavaScript bindings for Dear ImGui using Emscripten and TypeScript"
11:04:32FromDiscord<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:58FromDiscord<impbox [ftsf]> but yeah I guess I could use imgui + emscripten for mocking stuff up first
11:24:57FromDiscord<NullCode> In reply to @Elegantbeef "In what way is": Exactly!
11:25:00FromDiscord<NullCode> You read it wrong
11:25:14FromDiscord<NullCode> Its "how to protect yourself against Remote..."
11:32:16*jjido joined #nim
11:36:04FromDiscord<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:07FromDiscord<whisperdev> What is the best way to create a project in Nim and "pin down" exact versions of the nim compiler/mingw
12:41:17FromDiscord<whisperdev> (edit) "compiler/mingw" => "compiler,mingw and packages?"
12:41:37FromDiscord<haxscramper> for packages nimble 0.14 has lockfiles
12:41:52FromDiscord<haxscramper> compiler version can be pinned using `nim == X.Y.Z`
12:42:08FromDiscord<haxscramper> Though nimble won't auotmatically switch to that version, it will just use env state
12:42:42FromDiscord<haxscramper> mingw cannot be declaratively pinned by nimble, but you can do some `exec` and check for this
12:42:56FromDiscord<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:22FromDiscord<cabboose> Just saw your in-depth rfc on nimble 😲 awesome work 👏
13:03:45FromDiscord<cabboose> Are there any actions being made on that?
13:04:20FromDiscord<haxscramper> no
13:04:44FromDiscord<haxscramper> and after status "unloading" their PR I need to rething some thing from this RFC anyway
13:05:10FromDiscord<haxscramper> And there are some other changes, like pubgrub algorithm is probable less needed
13:05:11FromDiscord<haxscramper> MVS is better
13:05:22FromDiscord<haxscramper> At the same time package features are almost mandatory to have IMO
13:05:33FromDiscord<haxscramper> Also more attention to the build system
13:06:12*neurocyte0132 quit (Quit: The Lounge - https://thelounge.chat)
13:06:50FromDiscord<haxscramper> way more attention
13:07:01FromDiscord<haxscramper> Is also more important than I thought earlier
13:07:02FromDiscord<Rika> What do you mean “unloading”
13:07:06FromDiscord<Rika> Like splitting up?
13:07:37FromDiscord<haxscramper> like dumping huge pile of crap
13:08:08FromDiscord<haxscramper> it would be everyone's headache what to do with these changes
13:08:21FromDiscord<Rika> Ah I remember that now
13:08:38FromDiscord<Rika> Did the core devs ever get to working on looking at that PR…
13:13:16FromDiscord<haxscramper> it has already been merged
13:13:17FromDiscord<haxscramper> right
13:13:22FromDiscord<haxscramper> +9k -2k
13:18:52*max22- joined #nim
13:21:27FromDiscord<xflywind> In reply to @Rika "Did the core devs": araq and dom96 have reviewed them.
13:21:36FromDiscord<Rika> I see
13:34:16*kayabaNerve quit (Ping timeout: 245 seconds)
13:45:50NimEventerNew 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:32FromDiscord<Shoto Todoroki> Heya
17:48:32FromDiscord<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:13FromDiscord<IsaacPaul> Use Natu to make a gba game 🤷‍♂️ ↵Automate something to save you time
17:51:24FromDiscord<auxym> if you don't have anything in mind, you could do AoC or something like that
17:52:22FromDiscord<Shoto> AoC? And i don't have a GBA I'd be able to use to make a game lol
17:52:32FromDiscord<dom96> In reply to @Shoto Todoroki "I used Nim quite": https://github.com/nim-lang/needed-libraries
17:52:34nrds<R2D299> itHub: 7"This repository contains a list a needed libraries."
17:53:08FromDiscord<auxym> could use an emulator (or write a game with Nico). aoc is https://adventofcode.com/
17:53:37FromDiscord<Shoto> In reply to @dom96 "https://github.com/nim-lang/needed-libraries": Thanks!
17:53:44FromDiscord<Shoto> In reply to @auxym "could use an emulator": True, thanks!
18:13:01*max22- quit (Ping timeout: 265 seconds)
18:27:05FromDiscord<haxscramper> sent a code paste, see https://paste.rs/qgz
18:27:44FromDiscord<haxscramper> actually no, I have different error, I didn't minimize it properly
18:28:59FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AfH
18:29:02FromDiscord<haxscramper> > ↵> invalid application of ‘alignof’ to incomplete type ‘struct Handle’↵>
18:29:46FromDiscord<haxscramper> Library only exposes forward-declared type handle, so I can't define it properly
18:30:04FromDiscord<haxscramper> And I want to add a finalizer for `ref object` wrapper
18:30:53FromDiscord<haxscramper> Or alternatively, how can I use regular `=destroy` and `object`, but ensure that there is no double frees
18:31:11FromDiscord<haxscramper> I.e. I want to prevent accidental copying that would create two objects
18:39:29FromDiscord<acek7> does nim have any template command like C# does that sets up some files to start you off with.
18:39:56FromDiscord<haxscramper> `nimble ini`
18:40:16FromDiscord<haxscramper> but generally nim project can be as simple as a single nim file
18:40:35FromDiscord<haxscramper> so there is no need for special IDE wizard templates etc.
18:41:16FromDiscord<exelotl> there's also treeform's nimtemplate: https://github.com/treeform/nimtemplate
18:41:19nrds<R2D299> itHub: 7"You can use this Nim template to jump start your Nim library or project."
18:46:56FromDiscord<exelotl> I'm having trouble installing Nim 1.6 RC2 via choosenim :(
18:47:11FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3AfN
18:48:55FromDiscord<haxscramper> better report it on the RC2 thread
18:54:36FromDiscord<exelotl> done
18:56:05*max22- joined #nim
18:57:08FromDiscord<DMisener> sent a long message, see http://ix.io/3AfP
18:58:48FromDiscord<haxscramper> what is the `echo time.type` in the first place? You want to echo type of the variable?
19:00:11FromDiscord<DMisener> The echo.time outputs:
19:00:15FromDiscord<DMisener> Time↵[seconds = 1632853020,↵nanosecond = 0]
19:01:14FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3AfS
19:02:49FromDiscord<DMisener> The output from:
19:03:09FromDiscord<DMisener> sent a long message, see http://ix.io/3AfT
19:04:09FromDiscord<haxscramper> I don't think you can get seconds/nanoseconds out of `Time` object
19:04:16FromDiscord<haxscramper> Those fields are not exported
19:04:28FromDiscord<haxscramper> And there appears to be no `getSeconds` or anything of that sort
19:05:03FromDiscord<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:17FromDiscord<haxscramper> and nothing to convert Time to datetime
19:05:34FromDiscord<haxscramper> again, maybe I just didn't found
19:07:23FromDiscord<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:10FromDiscord<haxscramper> there must be some unhole combination of conversion
19:11:44FromDiscord<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:50FromDiscord<haxscramper> Someone just have to know how to do this
19:12:01FromDiscord<haxscramper> and be the light of hope in these dark times
19:12:39FromDiscord<haxscramper> because I have 0 idea
19:14:14FromDiscord<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:24FromDiscord<DMisener> sent a long message, see http://ix.io/3Ag0
19:25:36FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3Ag1
19:25:38FromDiscord<haxscramper> sent a code paste, see https://paste.rs/PK2
19:27:27FromDiscord<DMisener> Thanks... I'm a new Discord user and didn't know it supports standard Markdown
19:28:22FromDiscord<SivadNai> is there an FAQ channel with stuff like that
19:28:44FromDiscord<haxscramper> for times?
19:29:11FromDiscord<haxscramper> earlier question about std/times, seconds etc.
19:29:48FromDiscord<SivadNai> no, for markdown
19:30:34FromDiscord<haxscramper> discord has markdown guide
19:30:57FromDiscord<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:39Guest55Hello everyone. I am an ABSOLUTE newbie to nim.
20:21:00nrds<Prestige99> Hello
20:21:08Guest55I have a question about the "+". I just find that "i=i+1" could not be compiled.
20:21:15Guest55i+=1 works well.
20:21:48Guest55Is 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:02nrds<Prestige99> !eval var i = 0; i = i + 1; echo i
20:22:05NimBot1
20:22:05nrds<R2D299> 1
20:23:18Guest55it woks now for some reason.
20:23:58FromDiscord<haxscramper> it should be noted that nim generally uses `inc i` and `dec i` instead of `+=` or `+`
20:23:59nrds<Prestige99> maybe you were using let instead of var before?
20:25:06Guest55I 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:21nrds<Prestige99> Hmm
20:25:21Guest55The "counter" is the variable name.
20:25:50FromDiscord<haxscramper> I think you can get this using `counter 1`, but
20:25:51Guest55I like the "i=i+1" because the statement works for any langauges.
20:26:03FromDiscord<haxscramper> wh
20:26:11FromDiscord<haxscramper> !eval var i = 0; i = i +1
20:26:12NimBotCompile failed: /usercode/in.nim(1, 18) Error: attempting to call routine: 'i'
20:26:27Guest55Exactly! NimBot!
20:26:29FromDiscord<haxscramper> here you go
20:26:53FromDiscord<haxscramper> `+1` is an integer literal, and nim allows to omit parens around function call
20:26:59FromDiscord<haxscramper> so it effectively tried to do like `echo +1`
20:27:03FromDiscord<haxscramper> But with `i`
20:27:22nrds<Prestige99> interesting
20:27:30FromDiscord<haxscramper> https://forum.nim-lang.org/t/7053
20:29:39Guest55So it is not encouraged to add space before the "+"
20:30:08Guest55Thanks all
20:30:34nrds<Prestige99> !eval var i = 0; i.inc; echo i
20:30:37NimBot1
20:30:38nrds<R2D299> 1
20:30:39nrds<Prestige99> or this ^
20:30:55nrds<Prestige99> or `inc i` however you want
20:31:51FromDiscord<Yardanico> @Guest55 it's encouraged to add space both before and after the +
20:46:18FromDiscord<haxscramper> Forgot I need .incompleteStruct. annotation
21:00:29*Vladar quit (Quit: Leaving)
21:16:19*Pyautogui joined #nim
21:22:56NimEventerNew thread by Alexeypetrushin: Can't link C library, see https://forum.nim-lang.org/t/8467
21:38:45Guest55Is 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:28FromDiscord<Elegantbeef> What do you mean "the void"
22:12:37PMunchYou know, the vast emptiness
22:13:48PMunchThe emptiness that envelops the universe, the darkness that permeates everything
22:13:58PMunchNot sure if that's a type in Nim..
22:14:19PMunchBut Guest55 if you want to just not return something simply omit the return type
22:14:43PMunchOr I think you can have the return type be `void` as well, but not 100% sure
22:15:04FromDiscord<Elegantbeef> No return type == void
22:15:08PMunchI mean, look at that ease: https://forum.nim-lang.org/t/8467
22:15:08FromDiscord<Elegantbeef> Hello pmunch
22:15:12PMunchHello
22:15:14PMunchWhat's up?
22:15:32FromDiscord<Elegantbeef> Fuck all
22:15:39PMunchHuh?
22:15:45FromDiscord<Elegantbeef> More bug fixes i guess
22:15:58FromDiscord<Elegantbeef> Fuck all == nothing
22:15:58PMunchI'm not following :P
22:16:03PMunchAh :P
22:16:13PMunchI thought you where mad at everything there for a second
22:16:26nrds<sorcerer99> im mad at everything
22:16:28FromDiscord<Elegantbeef> Lol
22:16:28nrds<sorcerer99> ACTION throws stuff
22:16:43FromDiscord<Elegantbeef> You're a sorcerer so be less sterotypical
22:17:00nrds<sorcerer99> ACTION casts a spell on elegantbeef
22:17:12*PMunch puts on his robe and wizard hat
22:17:18FromDiscord<Elegantbeef> Let me guess i'm even more untolerable
22:17:19nrds<sorcerer99> LOL
22:17:30nrds<sorcerer99> im only joking :)
22:17:34nrds<sorcerer99> im a jokester
22:17:53FromDiscord<Elegantbeef> Oh yea i was totally serious
22:18:03PMunch(do people still get bash.org quotes? Or are those too old?)
22:18:05FromDiscord<Elegantbeef> Are you new here or just a lurker?
22:18:23nrds<sorcerer99> im a professional lurker, i have a degree for it
22:18:28FromDiscord<Elegantbeef> I know i wouldnt pmunch
22:18:38nrds<sorcerer99> pmunch, i havent seen a bash.org quotes bot in awhile
22:18:38FromDiscord<Elegantbeef> Either way hello sorcerer
22:18:47nrds<sorcerer99> howdy elegantbeef :)
22:19:07FromDiscord<Elegantbeef> Anyone got some fun problems to solve?!
22:19:14PMunch@ElegantBeef: http://bash.org/?top http://bash.org/?top2 <- Some good ol' IRC memes
22:19:18FromDiscord<Elegantbeef> I dont want to look at handleGenericInvocation for a bit
22:19:33nrds<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:57FromDiscord<Elegantbeef> Well time to learn Nim!
22:20:11nrds<sorcerer99> lol maybe if i wasnt so tired from my job
22:20:13PMunchWell, 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:22nrds<sorcerer99> i sleep most of the time and when im not sleeping, i run this irc network on this side
22:20:24FromDiscord<Elegantbeef> How much could i charge to tutor people to write Nim... probably not much
22:20:42PMunchI've been thinking about the same thing :P
22:20:55PMunchMaybe Status newhires would be interested
22:20:56FromDiscord<Elegantbeef> Sleep or tutoring 😛
22:22:03PMunchHmm, I really should go to bed
22:22:18FromDiscord<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:32FromDiscord<Elegantbeef> Nah you need all the daylight whilst you still have it!
22:22:45FromDiscord<Elegantbeef> Stay up all the hours and sleep when there is no sun!
22:23:55nrds<sorcerer99> no pmunch
22:23:59nrds<sorcerer99> you cant
22:24:11nrds<sorcerer99> theres zombies in the channel calling your name lol
22:24:19FromDiscord<Elegantbeef> Also who the fuck openly admits to being friends with prestige
22:24:30nrds<sorcerer99> i do
22:24:35FromDiscord<Elegantbeef> Sorry sorcerer sucks to be use!
22:24:35FromDiscord<Elegantbeef> you\ even
22:24:37PMunchDaylight?
22:24:38nrds<sorcerer99> i openly admit hes one of my besties
22:24:43PMunchIt's pitch dark out right now :P
22:24:43nrds<sorcerer99> nope it doesnt
22:25:05PMunch> Also who the fuck openly admits to being friends with prestige
22:25:16PMunchAnd people wonder why this channel is sometimes seen as hostile :P
22:25:22nrds<sorcerer99> lol
22:25:27nrds<sorcerer99> yea im not sure if that was a joke or serious
22:25:34nrds<sorcerer99> so i responded nicely, instead of my normal rude way
22:25:34PMunchDefinitely a joke
22:25:37nrds<sorcerer99> :P
22:25:42FromDiscord<Elegantbeef> Hey if you cant take my light hearted banter you cannot take my light hearted banter
22:25:56nrds<sorcerer99> lol just making sure, i dont know anyone around here ;P
22:26:11PMunchOh yeah, I wasn't saying anything against it. But imagine if someone joined and just saw that message :P
22:26:29PMunchLike sorcerer apparently *shrugs*
22:26:31FromDiscord<Elegantbeef> You could say that about 99% of my messages
22:26:35nrds<sorcerer99> lol
22:26:41FromDiscord<Elegantbeef> the answer is always "This guy is a fuckwit, let's move one"
22:26:55PMunchWait, are you temping for disruptek?
22:27:20FromDiscord<Elegantbeef> Temping? I acted this way when he was here
22:27:27PMunchHaha, fair point :P
22:27:41PMunchAnyways, I've got work in the morning..
22:27:47FromDiscord<Elegantbeef> Well buh bye
22:27:55nrds<sorcerer99> adios amigos
22:28:07FromDiscord<Elegantbeef> Oh i have to leave?!
22:28:26nrds<sorcerer99> amigo? lol
22:28:35PMunch@ElegantBeef, if you want another challenge have a look at the Futhark TODO ;)
22:28:47PMunchThere's one there that might require some compiler info
22:28:56*PMunch quit (Quit: leaving)
22:29:10FromDiscord<Elegantbeef> Ugh if you insist
22:33:15*max22- quit (Quit: Leaving)
22:35:53hexologyhello, newbie here. what
22:36:06FromDiscord<Elegantbeef> Indeed what
22:36:08hexologywhat's the best way to accumulate values in an array? i'm using collect() from the 'sugar' module
22:36:11hexologylol :D
22:36:50FromDiscord<Elegantbeef> Accumulate means what percisely?
22:37:43FromDiscord<Elegantbeef> I know from the implication but much prefer to hear exactly what people are after
22:39:56hexologyi 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:59FromDiscord<Elegantbeef> Collect may be the best method, also there are iterators for OptParsers https://nim-lang.org/docs/parseopt.html#15
22:41:21hexologyah, that's nicer
22:41:23hexologythank you
22:44:55*Guest55 quit (Ping timeout: 256 seconds)
22:51:55*vicfred joined #nim
22:54:08hexologyhm, 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:57FromDiscord<Elegantbeef> Are you wanting to stop the iteration or stop the function?
22:58:50FromDiscord<Elegantbeef> Code would help
23:00:15hexologylike this: https://bpa.st/XOEA
23:01:18hexologyit 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:43FromDiscord<Elegantbeef> Well it's more of a case of that's an invalid expression
23:01:54FromDiscord<Elegantbeef> Actually does `discard` work there?
23:02:02FromDiscord<Elegantbeef> I doubt the macro handles it
23:02:33FromDiscord<Elegantbeef> I'd say make this a function in this case
23:04:32nrds<Prestige99> Lol @Elegantbeef & PMunch
23:05:24hexologyinteresting https://nim-lang.org/docs/tut1.html#procedures-discard-statement
23:05:58hexologyin this case the logic has several branches, so i'd probably have to `discard` each branch
23:06:02hexologyi'll post the actual code in a moment
23:06:15FromDiscord<Elegantbeef> Like i said probably best to make a proc
23:07:57FromDiscord<Professor Actual Factual> sent a code paste, see https://play.nim-lang.org/#ix=3AgV
23:09:04hexology(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:50FromDiscord<Professor Actual Factual> There's a python channel in this discord server?
23:09:56hexologyoh sorry, i'm on IRC
23:10:18FromDiscord<Elegantbeef> There is not a python channel \:D
23:10:20hexology@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:44FromDiscord<Elegantbeef> Hopefully someone that uses async can pop in prof, i've not so cannot say much
23:13:09FromDiscord<Elegantbeef> Well when you post it i'll happily show you what i'd do
23:21:08hexology@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:19hexologys/dynamic/dynamically typed/
23:22:44hexologythis 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:56FromDiscord<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:52FromDiscord<impbox [ftsf]> Can you just make the macro call default(t)?
23:39:27FromDiscord<impbox [ftsf]> `newCall("default", t)` or something, sorry not at my computer atm
23:41:23FromDiscord<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:34FromDiscord<deech> (edit) "a).fieldPairs`" => "t).fieldPairs`"
23:45:34FromDiscord<impbox [ftsf]> newCall("fieldPairs", newCall("default", t))
23:47:35FromDiscord<Elegantbeef> Well i just got back and yea procedures save lives hexology \:p
23:53:36FromDiscord<impbox [ftsf]> @deech maybe you can just use a compiletime proc
23:55:07FromDiscord<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:02FromDiscord<impbox [ftsf]> can you share what you're working on?
23:58:57FromDiscord<Elegantbeef> hexology this is better but still dont like those tables https://play.nim-lang.org/#ix=3Ah2
23:59:03FromDiscord<Elegantbeef> Ok now deech's issue \:D
23:59:32FromDiscord<impbox [ftsf]> beef i'm sure you'll be able to help more than me
23:59:41hexologyi've been using mostly python and lua, tables everywhere :)