00:06:40*vicfred_ quit (Quit: Leaving)
00:26:26*leorize joined #nim
00:27:07*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:27:26*njoseph joined #nim
00:34:46giacotestament by default compile binaries next to the .nim file. Is this the usual way to go for nim projects? I find having directories with mixed source and executables a bad approach so I have a custom "build" folder for my builds, put testament seems not having such option. Do you know how to fix?
00:35:40giacoI mean, if theres a proper way or I should move the files manually after testament
00:38:45*leorize quit (Ping timeout: 240 seconds)
00:40:58FromDiscord<ElegantBeef> Assuming you dont have a config file or anything in your project you can do `git clean` to remove all untracked files, so it's really a none problem since you run tests then remove them
00:43:07giacoyeah I have many other means to solve the issue outside nim, but is there something a config.nim[s] file can do for me in this context?
00:48:14*Tlanger joined #nim
00:50:41*Tlangir quit (Ping timeout: 260 seconds)
00:52:43leorize[m]you can try --outdir
00:52:54leorize[m]if that doesn't work with testament, you can try disruptek's balls
01:04:56FromDiscord<Quibono> I want to simulate a worker thread incrementing a number, returning it to the main thread, and then repeating as many times as it can in a minute. It's been a long while since I've written nim code, how would I go about that?
01:10:44*jack joined #nim
01:10:56*jack left #nim ("WeeChat 3.1")
01:21:01FromDiscord<ElegantBeef> Two while loops is pretty much the how 😄
01:21:19FromDiscord<ElegantBeef> Either using channels, locked variable, or what have you
01:50:16*leorize joined #nim
02:05:19FromDiscord<Varriount> sent a code paste, see https://play.nim-lang.org/#ix=3lJo
02:05:38FromDiscord<Varriount> (edit) "https://play.nim-lang.org/#ix=3lJo" => "https://play.nim-lang.org/#ix=3lJp"
02:06:14FromDiscord<Varriount> (edit) "https://play.nim-lang.org/#ix=3lJp" => "https://play.nim-lang.org/#ix=3lJq"
03:00:46*thomasross quit (Ping timeout: 240 seconds)
03:15:09*leorize quit (Ping timeout: 240 seconds)
03:15:53*leorize joined #nim
03:21:09*leorize quit (Ping timeout: 240 seconds)
03:36:18*wasted_youth2 quit (Quit: Leaving)
03:44:57*spiderstew joined #nim
03:47:32*spiderstew_ quit (Ping timeout: 240 seconds)
03:55:09*blitzworksD1337d quit (Remote host closed the connection)
04:32:14*leorize joined #nim
04:37:30*blitzworksD1337d joined #nim
04:40:40*rockcavera quit (Remote host closed the connection)
04:45:41*arecaceae quit (Remote host closed the connection)
04:46:01*arecaceae joined #nim
04:46:28ForumUpdaterBotNew post on r/nim by evilguy50: How would i go about running a proc from calling a string?, see https://reddit.com/r/nim/comments/n4g6zj/how_would_i_go_about_running_a_proc_from_calling/
04:51:55*narimiran joined #nim
05:10:48ForumUpdaterBotNew thread by Halloleo: Nim packages and LTS Nim, see https://forum.nim-lang.org/t/7918
06:36:27FromDiscord<Araq> @Varriount and why are duplicates a problem?
06:44:08*PMunch joined #nim
07:17:14*Kaivo quit (Ping timeout: 265 seconds)
07:20:35*Kaivo joined #nim
07:22:18*Vladar joined #nim
07:26:54*sixtyten joined #nim
07:35:09ForumUpdaterBotNew thread by Halloleo: How to map a JS dictionary paramter in the Nim importjs header?, see https://forum.nim-lang.org/t/7919
07:36:46*sixtyten quit (Ping timeout: 240 seconds)
07:51:00FromDiscord<Varriount> In reply to @Araq "<@!169336940846514176> and why are": For me, the problems duplicates have caused are mostly related to using generic tools to search for content, but there's also the fact that (on Windows and Mac at least) antivirus software and search indexing processes will scan them.
07:52:33FromDiscord<Varriount> (which tends to drain resources, both energy and CPU-wise)
08:30:50FromDiscord<madman> is there a nicer way to do this => https://play.nim-lang.org/#ix=3lKd
08:31:38PMunchDefine nicer
08:31:55FromDiscord<madman> better
08:32:06FromDiscord<Rika> define better
08:32:36PMunchYou could do it like this: https://play.nim-lang.org/#ix=3lKe
08:32:42FromDiscord<Rika> the intention is lost when you minimised the program, can you send more detail
08:33:38FromDiscord<madman> cool
08:33:45FromDiscord<madman> wait ill send an example
08:35:14FromDiscord<ElegantBeef> Cmon let's complicate it with macros for more user control! 😛 https://play.nim-lang.org/#ix=3lKg
08:35:48PMunchHaha, nice one :P
08:36:36FromDiscord<madman> LOL beef
08:36:45FromDiscord<madman> thats nice
08:36:47FromDiscord<madman> https://play.nim-lang.org/#ix=3lKh
08:38:32FromDiscord<madman> sent a long message, see http://ix.io/3lKi
08:39:08FromDiscord<madman> (edit) "http://ix.io/3lKi" => "http://ix.io/3lKj"
08:42:21FromDiscord<madman> this is when i dont provide the struct members in vscode debugging. when i do, i get proper debug info and the program doesnt sigsegv. https://media.discordapp.net/attachments/371759389889003532/839059358905532492/unknown.png
08:42:26FromDiscord<Rika> https://play.nim-lang.org/#ix=3lKk maybe?
08:42:39FromDiscord<Rika> oops, elif
08:42:40FromDiscord<Rika> not else
08:43:44FromDiscord<madman> yeah same thing but i just want it for the member
08:44:38FromDiscord<madman> so i guess its done
08:44:50FromDiscord<Rika> Then what you are doing is fine, just remove the codegen when condition
08:45:00FromDiscord<Rika> Or keep it I don’t know if it works
08:45:22FromDiscord<madman> In reply to @Rika "Then what you are": exactly
08:45:44FromDiscord<madman> it would be nice to have vscode mute and unmute the stuff like in C #defines
08:46:45FromDiscord<madman> In reply to @x19 "this is when i": idk what `dummy` means when i dont provide the struct members on the nim side while linking against dll
08:52:59FromDiscord<madman> is it possible to import a C struct from a dll using some pragma
08:53:14FromDiscord<madman> or do i need to specify all the members on the nim side
08:54:02FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3lKq
08:57:08FromDiscord<Rika> the static[bool] part is causing the issue
08:57:10FromDiscord<Rika> i dont know why
08:57:19FromDiscord<ElegantBeef> inferred + explict generic = bug right now
08:57:41FromDiscord<Rika> there's an inferred generic there?
08:57:44FromDiscord<Rika> i dont see any
08:57:45FromDiscord<ElegantBeef> `static bool`
08:57:56FromDiscord<mlokis> even if i explicitly write false it does not work
08:58:07FromDiscord<Rika> are those converted to generics or what?
08:58:35FromDiscord<ElegantBeef> Yea they're treated as generics afaik
08:58:37FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3lKs
08:59:01FromDiscord<mlokis> hmm how do i fix this, should i just generate two iterators then
08:59:12FromDiscord<ElegantBeef> Not ideal but my suggestion is `iter[T; Y: static bool]`
08:59:26FromDiscord<mlokis> oh that could work
08:59:55FromDiscord<mlokis> but then i cannot have default can i?
09:00:08FromDiscord<ElegantBeef> Nope your choice is either that or duplicate
09:00:30FromDiscord<ElegantBeef> https://github.com/nim-lang/Nim/issues/17212 issue if you care to upvote it as a concern
09:00:31FromDiscord<mlokis> its not really duplicate anyway
09:00:57FromDiscord<mlokis> i just have to call it asyncIter or smth
09:03:20FromDiscord<madman> btw why doesnt this work https://play.nim-lang.org/#ix=3lKA
09:04:53FromDiscord<ElegantBeef> if you're using a bool like that imo you might aswell just use `when defined(flag)` unless you're using it a lot
09:06:51FromDiscord<madman> yeah im just curious
09:07:03FromDiscord<madman> im gonna stick to `when defined(flag)`
09:07:35FromDiscord<ElegantBeef> do you need to do `-d:slow=true` or `-d:slow=false` for booldefines?
09:10:02FromDiscord<madman> yeah
09:10:17FromDiscord<madman> the `booldefine` pragma has no effect
09:10:39FromDiscord<madman> you still need to use `-d:slow` on the command even if u set it to true in the code
09:10:41FromDiscord<ElegantBeef> well you were doing `when defined(boolName)` not `when boolName`
09:11:31FromDiscord<madman> ohh damn
09:11:45FromDiscord<madman> thanks beef
09:13:07FromDiscord<madman> no need for pragma then
09:19:21*letto quit (Ping timeout: 260 seconds)
09:25:40*blitzworksD1337d quit (Remote host closed the connection)
10:02:55*clyybber joined #nim
10:05:03*Gustavo6046 quit (Ping timeout: 260 seconds)
10:36:15*mindhunter0x joined #nim
10:37:56*mindhunt1r0x quit (Ping timeout: 252 seconds)
10:45:11*wasted_youth2 joined #nim
11:26:58FromDiscord<retkid> Since nim compiles to JS can I web dev with it?
11:27:25FromDiscord<willyboar> of course
11:27:51FromDiscord<retkid> , would it duck tho
11:28:02FromDiscord<retkid> I didn’t see many libraries for it
11:28:13FromDiscord<retkid> (edit) "duck" => "suck"
11:28:17PMunchAh :P
11:28:34FromDiscord<willyboar> you can check https://github.com/karaxnim/karax
11:28:36PMunchThere are some libraries, but you can of course also wrap existing JavaScript libraries
11:28:57FromDiscord<retkid> I know literally 0 JS
11:29:26FromDiscord<retkid> Mainly because I’ve avoided it
11:29:48*NimBot joined #nim
11:29:51FromDiscord<willyboar> are you interested for backend?
11:30:24FromDiscord<exelotl> It's pretty straightforward if you know any C style language
11:30:30FromDiscord<retkid> I would use it for both, but it’s not a super complex idea
11:30:51FromDiscord<retkid> Just met and sorting
11:31:05FromDiscord<retkid> (edit) "met" => "math"
11:31:27FromDiscord<retkid> List of list of lists
11:33:55FromDiscord<retkid> And some menus to click around and view the data
11:34:36FromDiscord<retkid> In reply to @willyboar "you can check https://github.com/karaxnim/karax": I’ll look into this
11:59:55*lritter_ joined #nim
12:04:20*Gustavo6046 joined #nim
12:06:02Clonkk[m]Why does ``nimble build`` ignore all the flags in my ``config.nims`` ?
12:07:48ForumUpdaterBotNew thread by Talaing: No difference between asyncHttpClient and httpClient?, see https://forum.nim-lang.org/t/7920
12:08:28giacotestament help says "usage: testament [options] command [arguments]" where arguments is "arguments are passed to the compiler". I want testament to compile and run tests but deploy produced binaries in ./build dir, I'm trying with "testament pattern 'tests/*.nim' --outdir:build" but testament says "no tests were found for pattern: outdir", am I doing something wrong?
12:09:13FromDiscord<Tavon> The name of your test files starts with a `t`?
12:09:31giacothey start with "test*"
12:10:12Clonkk[m](unless that changed recently)
12:10:16Clonkk[m]<giaco "testament help says "usage: test"> You can't use "outdir" with testament. Testament look for binary at the root of the folder
12:10:45Clonkk[m]See https://forum.nim-lang.org/t/7544
12:11:21Clonkk[m]Oops wrong forum thread
12:12:05giacobut I can live with it
12:12:30giacospeaking of config.nims + nimble build, I'm quite realising that not
12:13:44Clonkk[m]The worst part is that nimble shows you a message ``Hint: used config file '/home/rcaillaud/Workspace/Prototype/config.nims' [Conf]`` but ignore its content entirely
12:14:27Clonkk[m]It's very misleading
12:14:38giacono, I was wrong, it is working to me
12:15:04giacoI'm ruinning nimble --verbose build and I get that Hint too, and yeah it does work
12:15:30Clonkk[m]Are you sure ?
12:16:18giacoyeah I'm using chronicles as logging framework and I can change my preferences via defines, and it is working
12:16:33Clonkk[m]I have an option to use c++ backend with an outdir folder and Nimble output C binary in the current folder
12:17:14giacoplease mind that output dir in nimble is already handled by the top option "binDir"
12:18:15giaconot sure which preference wins, the one in config.nims or the one at the top of the nimble file
12:19:30Clonkk[m]That's true. But still, it shouldn't ignore silently some options (like my option to specify C++ backend) otherwise how can I trust that my compiler flags and define where passed properly
12:20:05giacoyeah I'm also quite confused where the boundary line is between nimble and config.nims
12:20:17giacoI'm thinking about merging the two
12:20:34Clonkk[m]I have some -d:symbol=123 that are ignored too
12:21:23giacoClonkk[m]: are you using "-" or switch?
12:21:37giacoI'm using switch for everything at the top of my nims file
12:22:23giacotry switch("define", "symbol=123")
12:23:26Clonkk[m]Ah yes okay
12:23:38Clonkk[m]and the backend is handled with a variable as well and ignore switch("backend", "cpp")
12:25:29Clonkk[m]Is there a way to call a proc in ``config.nims`` from nimble ?
12:50:45giacodon't know
13:05:54ForumUpdaterBotNew thread by Miran: 5th Nim online meetup, see https://forum.nim-lang.org/t/7921
13:08:02*rockcavera joined #nim
13:50:31FromDiscord<jtiai> I'm still a bit puzzled with arrays. If i have `array[100, uint8]` I do get 100 byte array indexed from 0. And it's preallocated to 0?
13:51:10PMunchAll data in Nim is pre-allocated to 0
13:51:21PMunchUnless you specifically tell it not to
13:52:08FromDiscord<jtiai> Can I initialize array to something else?
13:55:25PMunchSure, just assign it to something
14:10:33*narimiran quit (Ping timeout: 260 seconds)
14:14:38*Vladar quit (Quit: Leaving)
14:18:08ForumUpdaterBotNew thread by Masiarek2: Import unicode, strutils: ambiguous call; both unicode.strip and strutils.strip, see https://forum.nim-lang.org/t/7922
14:33:44*Vladar joined #nim
14:39:11*PMunch quit (Quit: leaving)
14:58:20*ozzz quit (Ping timeout: 265 seconds)
15:43:02*privateAnon joined #nim
15:51:37*privateAnon quit (Quit: Ping timeout (120 seconds))
15:56:54FromDiscord<treeform> In reply to @Rika "i also have an": As @ElegantBeef said, with my `jsony` lib you can convert almost any type to json and back using my dump/parse Hooks. Checkout the examples in the read me: https://github.com/treeform/jsony#proc-parsehook-can-be-used-to-do-anything . Let me know if that does not fit your use case?
15:59:23FromDiscord<treeform> Examples i had are: dates as string, object of objects as seq of objects, fractions as strings...
16:00:05*phatnael[m] quit (Quit: Idle for 30+ days)
16:16:37ForumUpdaterBotNew thread by SebastianM: Prompt issue with stdout.write, see https://forum.nim-lang.org/t/7923
16:33:21*narimiran joined #nim
16:43:29*ozzz joined #nim
16:51:14*sixtyten joined #nim
17:10:17FromDiscord<.Antoine.> @basdk je suis partout
17:10:26FromDiscord<.Antoine.> (edit) "je suis partout" => "I'm here"
17:11:14FromDiscord<.Antoine.> @1T0S_ arch <333
17:11:34FromDiscord<.Antoine.> https://media.discordapp.net/attachments/371759389889003532/839187504745283615/Screenshot_20210429_174727.png
17:11:44FromDiscord<.Antoine.> 👀
17:24:47*hyiltiz quit (Ping timeout: 265 seconds)
17:29:20*hyiltiz joined #nim
17:29:20*hyiltiz quit (Changing host)
17:29:20*hyiltiz joined #nim
17:41:31FromDiscord<Sprütz> sent a code paste, see https://play.nim-lang.org/#ix=3lMF
17:41:50FromDiscord<Sprütz> (edit) "https://play.nim-lang.org/#ix=3lMF" => "https://play.nim-lang.org/#ix=3lMG"
17:42:46FromDiscord<ElegantBeef> I think strutils or system has `repeat`
17:43:06FromDiscord<Sprütz> oh perfect :pepelove:
17:55:52*letto joined #nim
18:00:13*robertmeta quit (Read error: Connection reset by peer)
18:02:00*robertmeta joined #nim
18:13:10*rockcavera quit (Remote host closed the connection)
18:20:17*clyybber quit (Read error: Connection reset by peer)
18:20:50*clyybber joined #nim
18:30:34*vicfred joined #nim
18:35:18ForumUpdaterBotNew thread by Kaushalmodi: What is the correct way of mapping C functions with return type "const char *"?, see https://forum.nim-lang.org/t/7924
18:37:31FromDiscord<geekrelief> If i have a Table `t` and I want to convert the keys to a seq, why does `toSeq(t.keys)` work but `t.keys.toSeq()` does not? I get an `unidentified keys` error with the method syntax.
18:40:24*xet7 quit (Remote host closed the connection)
18:52:57FromDiscord<ElegantBeef> @geekrelief the method call syntax has an "issue" with templates/iterators https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax
19:08:01*filcuc joined #nim
19:10:51FromDiscord<geekrelief> In reply to @ElegantBeef "<@!109484839480107008> the method call": thanks!
19:20:24FromDiscord<jtiai> Wow. IntelliJ IDEA debugging for Nim is awesome!
19:23:43*sixtyten quit (Quit: Leaving)
19:37:42*filcuc quit (Ping timeout: 265 seconds)
19:38:34FromDiscord<Recruit_main707> hol up, they added debugging??
19:39:46*lritter_ quit (Ping timeout: 240 seconds)
19:51:11*narimiran quit (Ping timeout: 240 seconds)
19:51:31*mindhunter0x quit (Ping timeout: 260 seconds)
19:54:18*mindhunter0x joined #nim
19:55:40ForumUpdaterBotNew thread by Sixte: Nim as a classic programming language, see https://forum.nim-lang.org/t/7925
19:56:36FromDiscord<zidsal> I've just taken a look its pretty basic debugging, to get debugging working you need 1. a non community edition ide, 2. the native debugging plugin. The debugging itself just displays what raw gdb gives you which isn't very useful
19:58:19FromDiscord<zidsal> (edit) "just displays what raw" => "does have a watch window, but the output is in a non friendly format, for now it looks like" | "gives" => "+ the python script will give" | "which isn't very useful" => "the best debugging experience"
20:03:04*rockcavera joined #nim
20:06:12FromDiscord<zidsal> I want to use the collect macro to map each item in a sequence into a sequence of items and then flatten this. It looks like the last statement of the body will always be the collections add operation. Is there a way around this?
20:07:30FromDiscord<Avatarfighter> In reply to @Recruit_main707 "hol up, they added": lmao right? I need a confirmation on this ahaha
20:07:42FromDiscord<ElegantBeef> The way collect requires an expression
20:07:55FromDiscord<zidsal> @Avatarfighter see above I just tried it
20:08:10FromDiscord<ElegantBeef> zidsal i'm uncertain the actual desire you have so you might just want to use a block expression or explain what you're doing in code so i can understand 😛
20:08:37FromDiscord<Avatarfighter> @zidsal ah thank you I didn't realize what you said was in reference to the jetbrains debugger
20:09:28FromDiscord<ElegantBeef> I mean VSCode's debugging is fine follow the instructions on saem's extension and you're golden
20:10:10FromDiscord<zidsal> agreed, I also made a VSC launch template https://mud.coding.blog/nim-environment-setup which means you can just press f5 to debug the current file
20:11:41ForumUpdaterBotNew thread by Zoom: Counting word frequencies with Nim, see https://forum.nim-lang.org/t/7926
20:14:59FromDiscord<zidsal> @ElegantBeef https://play.nim-lang.org/#ix=3lNf here is my noddy example of what I am trying to do. For each input I'm going to call a method which returns a sequence of values, I then want to add all of those into a sequence
20:15:24FromDiscord<zidsal> obv I an do this in regular nim code, but I was hoping I could reduce the size by using collect
20:16:28*rockcavera is now known as Guest71865
20:16:29*Guest71865 quit (Killed (orwell.freenode.net (Nickname regained by services)))
20:16:29*rockcavera joined #nim
20:17:21*motersen joined #nim
20:18:07FromDiscord<ElegantBeef> I'm a little lost, cause you can put that in a collect
20:18:18FromDiscord<ElegantBeef> You want to get rid of the `generateSequence` though?
20:18:24FromDiscord<zidsal> if I put that in a colelct wouldn't I get a sequience of sequence of ints?
20:18:33FromDiscord<zidsal> (edit) "colelct" => "collect" | "sequience" => "sequence"
20:18:41FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3lNh
20:18:54FromDiscord<ElegantBeef> you want to get rid of the second for loop?
20:19:08FromDiscord<zidsal> idealy yes
20:19:24FromDiscord<zidsal> but I was mostly being stupid and didn't even consider what you where doing could work
20:21:44FromDiscord<ElegantBeef> But like i said you can use a block expr and do it fine aswell https://play.nim-lang.org/#ix=3lNj
20:24:51FromDiscord<zidsal> thanks elegant
20:57:51*fredrikhr joined #nim
21:09:53*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
21:10:11*kitech1 joined #nim
21:33:50*thomasross joined #nim
21:48:07*Vladar quit (Remote host closed the connection)
22:03:56*fredrikhr quit (Ping timeout: 260 seconds)
22:15:13*xet7 joined #nim
23:11:30FromDiscord<Rika> In reply to @treeform "As <@!145405730571288577> said, with": I haven't needed to use json in a few months now, I just stated my opinion then
23:15:43*clyybber quit (Quit: WeeChat 3.1)
23:26:19*Amun_Ra quit (Ping timeout: 265 seconds)
23:30:15*FromDiscord quit (Remote host closed the connection)
23:30:32*FromDiscord joined #nim
23:38:59*Amun_Ra joined #nim