<< 15-03-2021 >>

00:20:07FromDiscord<konsumlamm> how is the "sharing/moving stuff between thread without deep copying" story with ORC?
00:33:04*krux02 quit (Remote host closed the connection)
00:38:27*Tuatarian quit (Ping timeout: 265 seconds)
00:39:03*wasted_youth2 quit (Read error: Connection reset by peer)
00:39:22*Tuatarian joined #nim
00:43:33*wasted_youth2 joined #nim
00:54:19*tanger_ joined #nim
00:54:26*tanger_ quit (Client Quit)
00:57:13*Tanger quit (Ping timeout: 276 seconds)
01:00:51*krux02 joined #nim
01:11:57*fputs joined #nim
01:14:54*Tuatarian quit (Read error: Connection reset by peer)
01:17:07*krux02 quit (Remote host closed the connection)
01:18:53*Tuatarian joined #nim
01:18:56*Tuatarian quit (Client Quit)
01:23:11FromDiscord<ajusa> Well going off of what people said earlier and https://github.com/nim-lang/Nim/pull/17305, there is code in devel and a blog post incoming that has sharing stuff between threads without deep copying
01:28:39*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:28:58*njoseph joined #nim
01:57:47*andy joined #nim
01:58:10*andy is now known as Guest87408
02:02:45*vicfred quit (Quit: Leaving)
02:05:15*vicfred joined #nim
02:14:00*lritter joined #nim
02:24:11FromDiscord<Gary M> is there a shortcut for MB/GB uint64 representations of bytes?
02:27:56ForumUpdaterBotNew thread by Livingstone1337: Data type mismatch issue, see https://forum.nim-lang.org/t/7627
02:30:05*Guest87408 quit (Quit: Connection closed)
03:38:04ForumUpdaterBotNew thread by Livingstone1337: Issues regarding calling an import from python as a routine, see https://forum.nim-lang.org/t/7628
03:41:24*jfondren[m] joined #nim
04:13:02*spiderstew_ joined #nim
04:14:13*spiderstew quit (Ping timeout: 265 seconds)
04:16:08ForumUpdaterBotNew thread by Halloleo: How can I see all the threads I ahve started or I have contributed to?, see https://forum.nim-lang.org/t/7629
04:32:43*vicfred quit (Quit: Leaving)
04:34:12*vicfred joined #nim
04:37:42saemWow, didn't think it would be working during this weekend, only possible with Clyybber's help: https://github.com/nim-lang/Nim/pull/17379 for those that are shy of compiler dev, this is code that analyses proc, func, converter, macro... defs I'd be curious if people find it more/less approachable.
05:10:33FromDiscord<ElegantBeef> My now more often than i'd like series of "What's the Nim version of this" `typedef void (resus_callback_t)(void);`
05:10:47FromDiscord<ElegantBeef> just a pointer to a proc right?
05:10:54FromDiscord<impbox> yeah
05:11:16FromDiscord<impbox> `type ResultsCallback = proc()`
05:12:23FromDiscord<ElegantBeef> Ah `{.noconv.}` is needed
05:12:25FromDiscord<impbox> a type named resus_callback_t that is a function pointer that takes no arguments and no return value
05:12:49FromDiscord<ElegantBeef> Yea i thought it was a function pointer but i tried just a proc and got an issue so made me doubt myself
05:12:53FromDiscord<impbox> ahh
05:13:13FromDiscord<impbox> hmm `noconv` vs `cdecl`, i've mostly used cdecl, wonder how they contrast
05:13:44jfondren[m]c2nim has impbox's answer, basically. that might be a first stop for your question series
05:14:18FromDiscord<ElegantBeef> Nah, i'm wrapping the rpi-pico stdlib and converting examples to idiomatic code
05:15:15jfondren[m]that's fine, but just putting the typedef in a file by itself and running c2nim gives you a good answer to questions like that
05:15:16FromDiscord<Gary M> `passing 'outDevice.extensionsToEnable' to a sink parameter introduces an implicit copy; if possible, rearrange your program's control flow to prevent it`
05:15:21FromDiscord<Gary M> how should I approach fixing this
05:15:27FromDiscord<ElegantBeef> Ah that's what you meant
05:15:33FromDiscord<ElegantBeef> Yea that works i guess
05:15:51FromDiscord<Gary M> ` outDevice.extensionsToEnable = outDevice.extensionsToEnable & pds.criteria.requiredExtensions`
05:17:10FromDiscord<Gary M> would a move() be fine?
05:24:57jfondren[m]with seq[int], `ns = ns.move & xs` suppresses the `=copy` for the `ns` that'd otherwise be generated. You can check with --expandArc:modulename in a short test
05:25:09jfondren[m]but `ns &= xs` looks even better, if that works
05:26:49FromDiscord<Gary M> ah stupid me, I didn't realize `&=` was valid operator 😄
05:26:51FromDiscord<Gary M> thanks
05:33:20*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
05:33:35*Gustavo6046 joined #nim
05:36:45*narimiran joined #nim
05:40:06FromDiscord<Rika> You do you whether &= is preferred over add
05:40:14FromDiscord<Rika> Most people use add though
05:40:27FromDiscord<Rika> Probably because they don’t know of the other
05:45:29*haxscramper joined #nim
06:17:39*NimBot joined #nim
06:17:45ForumUpdaterBotNew Nimble package! cirru_edn - Extensible data notation based on Cirru syntax, see https://github.com/Cirru/cirru-edn.nim
06:25:33FromDiscord<gogolxdong> sent a code paste, see https://play.nim-lang.org/#ix=2STV
06:25:50FromDiscord<gogolxdong> wNim crashed with orc
06:38:21FromDiscord<Araq> @gogolxdong can you share some code that crashes?
06:38:44FromDiscord<gogolxdong> sure, wait a second.
06:45:50FromDiscord<Gary M> is there a way to pass in any arbitrary C compiler for nim c?
06:47:06FromDiscord<ElegantBeef> You can do `--cc:`
06:48:35FromDiscord<ElegantBeef> Though only select compilers have entries in the `nim.config`
06:48:46*haxscram` joined #nim
06:48:53*haxscram` left #nim (#nim)
06:50:28*haxscramper quit (Ping timeout: 245 seconds)
06:50:44FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2STZ
06:51:07FromDiscord<haxscramper> And `--clang.exe = "<arbitrary command>"` should work too (I think)
06:53:04FromDiscord<gogolxdong> https://github.com/gogolxdong/2DeFi
06:54:09jfondren[m]https://scripter.co/nim-deploying-static-binaries/ has a use of that, for musl builds
07:01:14FromDiscord<Livingstone> I got an issue with the following code saying that there is a data type mismatch I've tried int conversion but it doesn't seem to work
07:01:15FromDiscord<Livingstone> proc normalize_dataset(dataset, minmax : seq[float]): seq[float] =↵ for row in dataset:↵ for i in 0..row.len:↵ row[i] = (row[i] - minmax[i][0])/(minmax[i][1] - minmax[i][0])
07:02:10FromDiscord<ElegantBeef> minMax is a sequence of floats so `minMax[i]` returns a float whcih you attempt to index with `[0]`
07:02:37FromDiscord<ElegantBeef> Also post code to https://play.nim-lang.org/ or atleast inside a code block
07:03:03jfondren[m]you're asking for the .len of row, which is a float
07:03:31jfondren[m]from the loop, dataset would have to be something like a seq[seq[float]]
07:04:28FromDiscord<ElegantBeef> What are you attempting to do? is probably the better question
07:06:05FromDiscord<InventorMatt> sent a code paste, see https://play.nim-lang.org/#ix=2SU4
07:06:10FromDiscord<InventorMatt> something like this is what you want?
07:08:00FromDiscord<Livingstone> I'm trying to rescale a dataset
07:08:28FromDiscord<Livingstone> In reply to @InventorMatt "<@!263060627793248278> ```nim proc": thanks
07:09:03FromDiscord<InventorMatt> you can probably also remove the return value as well since this changes it inplace
07:09:37FromDiscord<Livingstone> oh ok cool thanks I'll give it a go
07:12:02FromDiscord<Gary M> does nim have a `min(a, b)` and `max(a, b)`
07:12:26jfondren[m]yes.
07:13:28FromDiscord<Gary M> !eval echo min(1.0, 3.0)
07:13:31NimBot1.0
07:13:36FromDiscord<Gary M> Nice.
07:14:11FromDiscord<ElegantBeef> There is also `math` with other more obscure ops like `floor` `ceil` and the like
07:14:36FromDiscord<ElegantBeef> I say obscure but mean niche
07:16:22FromDiscord<Rika> There’s also clamp I believe
07:16:38FromDiscord<ElegantBeef> clamp is in system
07:16:58FromDiscord<Rika> I never said it was in math
07:17:03FromDiscord<ElegantBeef> Ah
07:20:03*waleee-cl quit (Quit: Connection closed for inactivity)
07:41:17FromDiscord<Rika> is there a faster way to get durations of time over monotimes?
07:43:32FromDiscord<ElegantBeef> What do you mean faster?
07:44:42FromDiscord<Rika> in the literal sense, since i think monotimes is killing me over syscalls? also dont tell me about premature optimization xd https://media.discordapp.net/attachments/371759389889003532/820925454571405312/unknown.png
07:46:43FromDiscord<ElegantBeef> maybe `times.cpuTime`, both are calling the same function just with different parameters/behaviour?
07:47:35FromDiscord<Rika> ill look into getting time without syscalls...
07:54:27FromDiscord<Gary M> is setting a seq to @[] the normal way to clear it?
07:54:36narimiransetlen
07:54:48FromDiscord<Gary M> setlen 0 is better?
07:54:54FromDiscord<ElegantBeef> Yea it doesnt construct a new seq
07:54:57FromDiscord<Gary M> okay
08:20:13*fredrikhr joined #nim
08:23:54*sixtyten quit (Ping timeout: 265 seconds)
08:32:50*m4r35n357 quit (Quit: Ex-Chat)
08:34:49ForumUpdaterBotNew thread by Nnahito: Can nim long polling?, see https://forum.nim-lang.org/t/7630
08:38:10*fbpyr[m] joined #nim
08:38:16*m4r35n357 joined #nim
08:42:42*superbia joined #nim
09:16:12*vicfred quit (Quit: Leaving)
09:36:42liblq-devyou know it's not like an empty seq allocates any memory anyways
09:38:20*PMunch joined #nim
09:43:19FromDiscord<Solitude> with setLen it can reuse already allocated buffer when adding
09:49:10m4r35n357Had a lot of fun with generics over the weekend, got stung by "bind once", then found type classes and the "distinct" keyword, which I think is what I wanted (I really need bind many). There was another option in the docs, "Typedesc", but after reading I was none the wiser. I think I will stick with "distinct" unless anyone thinks I might be missing out . . .
09:50:09FromDiscord<Rika> youre not really explaining what issues youre having
09:52:56m4r35n357Rika me? I think I have found the best option but wondered what the use case is for typedesc in generics, and whether type classes/distinct are the best option for "bind many" uses.
09:53:16m4r35n357I found the docs impenetrable!
09:53:43m4r35n357But I don't have any issues ;)
09:54:00FromDiscord<Rika> im not understanding what you want too well
09:56:18m4r35n357Rika, don't worry, I was just looking for an explanation of why there is more than one option for "bind many" generics, when the one I am using seems fine. nm
09:56:31*sz0 joined #nim
10:01:39*Vladar joined #nim
10:01:41FromDiscord<konsumlamm> what the hell are "bind many" generics?
10:09:39liblq-devso imagine you have a `proc a(x, y, z: auto)`
10:10:00liblq-devbind many means that the compiler will create a separate generic param for each auto param
10:10:08liblq-devso you can do eg. `a(1, 'a', "z")`
10:22:35FromDiscord<konsumlamm> ah
10:39:06PMunchHow did the developer livestream thingy go by the way?
10:44:02*tanger__ joined #nim
10:48:04FromDiscord<Yardanico> which one?
10:55:50*krux02 joined #nim
11:00:53giaco_are there nim libraries that help in writing we client/servers around wsdl/soap schemas?
11:01:15giaco_s/help/helps/, s/we/web/
11:05:17*superbia quit (Quit: WeeChat 3.1)
11:07:07PMunchgiaco_, depends on what you need really
11:07:30PMunchI mean there is httpserver/client and xml modules in the standard library
11:18:48*xet7 joined #nim
11:19:06FromDiscord<Goel> `bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed`↵Raylib manages the window-program closure like this, but i only want it to close if the user press the X and not if he press the Esc key. How do i modify this beheviour since its into the code of Raylib?
11:20:58FromDiscord<Goel> (edit) "WindowShouldClose(void); //" => "WindowShouldClose(void);↵//"
11:27:26giaco_PMunch: I know, but it would be a long way reinventing the wheel. Soap/Wsdl parsers/checkers are a thing, and nim metaprogramming would be a perfect fit to parse xml scheme and generate data model for wsdl
11:28:59PMunchDoesn't appear like anyone have written a package for it.. Possibly because XML has fallen a bit to the wayside in favour of JSON.
11:29:38giaco_yeah, but different standards are build with wsdl, so it is something made to stay
11:31:08giaco_unrelated question: I'm testing out "chronicles" lib. Really nice, but it seems to confuse nimsuggests and nimpretty just by importing it. Now my vscode shows tons of errors but project compiles just fine
11:35:51FromDiscord<no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2SVq
11:39:27FromDiscord<Rika> wdym?
11:39:40FromDiscord<Rika> for string processing or on your editor?
11:39:55FromDiscord<no name fits> For the output, as a string
11:40:12FromDiscord<no name fits> basically replacing whatever indent \t would do with dots
11:54:23FromDiscord<Rika> not that i know of
11:55:07*Vladar quit (Quit: Leaving)
11:59:26ForumUpdaterBotNew thread by Drkameleon: Compiling for arm/arm64, see https://forum.nim-lang.org/t/7631
11:59:43*narimiran quit (Ping timeout: 260 seconds)
12:02:28*Torro joined #nim
12:05:21*xet7 quit (Quit: Leaving)
12:06:02*xet7 joined #nim
12:18:35*rockcavera joined #nim
12:27:42PMunchgiaco_, it is known that nimsuggest and related tools can get confused by some libraries.
12:27:56PMunchIt's unfortunate, and honestly I'm not quite sure what causes it..
12:28:32giaco_not sure why, but I've inverted the order of the imports and now the error is gone
12:36:10PMunchPlease create an issue with nimsuggest if one doesn't already exist
12:37:30giaco_if only I were able to replicate it. It has disappearead. I've also restarted whole IDE when I had the problem to exclude any enternal cause, but it came back then. Really puzzled
12:37:56FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=2SVP
12:38:33PMunch`discard` in this context is basically a nop
12:38:36FromDiscord<Rika> discard does nothing
12:38:52FromDiscord<Goel> Define "does nothing"
12:38:55FromDiscord<Rika> pass in python
12:39:08FromDiscord<Rika> {} in c
12:39:24PMunchIt can also be used to explicitly discard return values of a function call
12:40:07PMunchThat code looks like it could swap its if statement though and drop the else clause
12:40:14PMunchBut hard to tell without looking at the rest of it
12:41:59FromDiscord<Goel> That was just a basic example, it has no code attached to it, im trying all the functions available for a Window, like resize, set its borders, title, and all the parameters. But thanks i got it now
12:45:22*lritter quit (Ping timeout: 260 seconds)
12:47:48PMunchYeah typically you'd do something like `if not windowResize(myWindow): echo "Window not ready"`
12:48:25PMunchOr rather create a small template that would throw an exception with a message and then do something like `windowCheck windowResize(myWindow)`
12:48:59FromDiscord<Goel> Yes i've read that in some example of Nim, but i still need to get used to write it in that way, for me for now is easier to read in the other way. But with the time i'll use the shorter version
12:49:20PMunchI mean it's a matter of preference
12:49:36PMunchThe C style of error return code is one way of doing it, exceptions are another
12:49:50PMunchIt all depends on how you want to structure your code
12:52:19FromDiscord<Goel> Yes the Nim style is much better than C in my opinion
12:56:36FromDiscord<Goel> `void GetWindowHandle(void)`↵Is it correct to change that in C with this in Nim?↵`addr getWindowHandle()`
12:57:43FromDiscord<Goel> (edit) "`void GetWindowHandle(void)`↵Is" => "`GetWindowHandle(void)` (The Return is void)↵Is"
12:57:51FromDiscord<Rika> ??
12:58:14FromDiscord<Rika> `void GWS(void)` = `proc GWS: pointer`
12:58:22FromDiscord<Rika> GWH sorry lmao
12:58:50reversem3Can't I change the compiler option in a nim.cfg to not use g++ ?
12:58:51reversem3error: invalid argument '-std=gnu++14' not allowed with 'Objective-C'
12:59:19krux02reversem3, you can use other compilers as well
12:59:28krux02clang is very much supported
13:02:40reversem3yeah i tried clang for imgui but still get the same error
13:04:35reversem3https://play.nim-lang.org/#ix=2SW1
13:05:29reversem3I see the issue with compiling imgui with osx https://github.com/nimgl/nimgl/issues/64
13:06:05reversem3would I have to change all the compiler options in the private directory?
13:06:13krux02reversem3, The nim compiler uses gnu extensions for optimizations.
13:06:23krux02But they are only used in generared sources.
13:06:54krux02the "std=gnu++14" flag is not supposed to leak out to externally compiled files.
13:07:24krux02That sounds in my opinion like a compiler bug
13:07:51reversem3bummer
13:08:02krux02yea it is.
13:10:07reversem3So I found this https://stackoverflow.com/questions/51218905/specifying-std-when-compiling-both-c-and-c-code
13:10:27giaco_How do you use object variants, the fact that you can't have shared attributes between different types is always a show stopper to me, but I feel like I'm missing the point
13:10:30reversem3is nim trying to compile C and C++ at the sametime ?
13:11:17krux02https://github.com/nim-lang/Nim/pull/13695
13:14:34krux02reversem3, nim can compile C and C++ at the same time, but here it is trying to compile C and Objective-C and the same time and link it together
13:15:19krux02there is no problem to compile and linke different programming languages together if the interfacing is done right.
13:15:23FromDiscord<konsumlamm> "attempt to finish off araq" 🤔
13:15:43reversem3so this commit isn't in the devel yet or is?
13:15:54krux02it is in devel
13:15:56krux02it is merged
13:16:15reversem3ok updating now
13:16:17PMunchgiaco_, it is a bit weird, yes. But you can probably hide that with a generic accessor/template
13:16:43PMunchMaybe..
13:16:45krux02https://github.com/nim-lang/Nim/blob/874ccc8493605b8e227007f1c0fa1a1131b80e23/compiler/extccomp.nim#L89
13:17:30krux02this "cppXsupport" part should not be applied, when a file is compiled with the `compile` directive.
13:19:19reversem3so is there an exclude flag ?
13:19:31krux02not that I know of.
13:19:37krux02It looks like you ar screwed.
13:19:50krux02you could revert to a compiler version before that pr got merged.
13:19:56krux02and report a bug.
13:21:25reversem3you mean the nim compiler or clang ?
13:30:31krux02I mean the nim compiler.
13:30:50krux02reversem3, I try to rephrase what happened here.
13:31:35krux02gcc and clang both support c++ extensions, non standard, that allow to write better optimized code.
13:32:10krux02The extensions need to be enabled with a flag, that is "gnu++14" part that you see.
13:32:31krux02nim also allows to compile other files that are leter linked to the final executable.
13:32:52krux02Tha is what is done in imgui
13:32:52*abm joined #nim
13:33:46krux02now, for some reason, nim tries to add the flags gnu++14 also to the command line to compile the objective-C file for imgui.
13:33:56krux02that command line flag is invalid for objective c.
13:34:13krux02therefore compilation fails.
13:34:24krux02cause, bug in the compiler.
13:34:36krux02you can't do anything about it, other than reporting it as a regression.
13:34:46krux02this did not happen before the optimization was introduced.
13:35:12reversem3ok thanks for the info and looking into it
13:38:08Oddmongeri was sure :bool (as result value of a proc) was set to true by default . Man… was i wrong :/
13:38:28krux02Oddmonger, how?
13:38:44krux02everything is initialized to 0 by default
13:41:05Oddmongerwell it suddendly works when i put result=true at the beginning
13:41:17Oddmongerit was always returning false otherwise
13:42:24FromDiscord<Clyybber> In reply to @no name fits "Is there a builtin": replace(" ", '.').replace("\t", '.'.repeat(yourTabWidth)) should work
13:42:41Oddmongeri thought 0 == true for bool
13:43:04FromDiscord<Clyybber> you can also use multiReplace((" ", ".",), ("\t", '.'.repeat(yourTabWidth))) if you prefer that
13:43:05FromDiscord<dk> that would be a first language to do that
13:43:35krux02dk, not really
13:43:50krux02dk, ever heared bash?
13:43:51FromDiscord<dk> ?
13:44:44FromDiscord<dk> my brain doesn't categorize it as a programming lang
13:44:59krux02in bash 0 is ok, everything else is error/false
13:45:08krux02it is
13:45:15Oddmongerin C, too
13:45:25FromDiscord<dk> wait
13:45:39krux02yea
13:45:43krux02i know
13:45:51krux02late to realize?
13:46:59Oddmonger« usually », 0 is for success, because there one success and so many possible cause of failure
13:47:14FromDiscord<Clyybber> yeah, but that's not really a bool
13:47:26FromDiscord<no name fits> In reply to @Clyybber "replace(" ", '.').replace("\t", '.'.repeat(yourTabW": thanks
13:47:32FromDiscord<Clyybber> it's not really a bool in bash either, it's better to think about as "implicitly converted to bool"
13:47:38FromDiscord<Rika> In reply to @Clyybber "replace(" ", '.').replace("\t", '.'.repeat(yourTabW": no i dont think so
13:47:44FromDiscord<Rika> remember tabs size to the content
13:47:51FromDiscord<Clyybber> oh
13:47:54FromDiscord<Clyybber> good point
13:47:56Oddmongerbut yes for bool, 1 is true
13:48:34FromDiscord<Rika> you have to resize `tabwidth` by `linelen mod tabwidth` i believe
13:48:49FromDiscord<Rika> so `tabwidth - linelen mod tabwidth` i guess
13:49:15FromDiscord<Rika> then be wary of tabs in the middle of the line, that probably shouldnt count
13:49:23FromDiscord<Rika> same with spaces in the middle of the line
14:01:29*Vladar joined #nim
14:10:12Clonkk[m]Is it possible to call something like ``static: switch("define", "abc")`` in a Nim file (not nimscript) to have a file define a compile time value ?
14:11:39FromDiscord<Clyybber> I don't think so
14:13:17Clonkk[m]Even with stuff like https://github.com/beef331/nimscripter ?
14:14:29krux02don't think so
14:14:47Clonkk[m]Okay, thank you. Time for another config file
14:15:05krux02the point of a define as a compiler option is, its value is known to the compiler from the very beginning.
14:15:31Clonkk[m]Hence the static part
14:16:14FromDiscord<Rika> from the very beginning
14:16:19FromDiscord<Rika> not while processing a file
14:16:23krux02static only means "during compile time" not "at the very beginning" or even "before compilation"
14:16:47Clonkk[m]Ah I see
14:17:14krux02to process static blocks, a lot of modules need to be compiled to bytecode.
14:17:34krux02at least system.nim
14:17:54krux02and then you say, ah by the way, from the very beginning this should have been true.
14:18:16Clonkk[m]It would be expensive to make multiple pass
14:18:26Clonkk[m]I assume ?
14:18:28krux02And then the compiler says, "aaarg, FU, if you want things from the beginning tell me from the beginning, not after I've already processed all these files"
14:19:15krux02it would not only be multiple pass, it would also invalidat a lot of conpialation.
14:19:22krux02it's just bad.
14:19:29Clonkk[m]I'll just use {.booldefine.} instead of -d:
14:19:49FromDiscord<Rika> that works
14:20:24krux02what is the problem with just ``const abc = true``?
14:21:26Clonkk[m]``const abc {.booldefine.} = true`` so you can override it at compile time without chaging code is the idea
14:22:20krux02you can't change a const at compile time, that is the point of const.
14:22:36Clonkk[m]https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas ?
14:23:39krux02but that defines the value before compilation as an argument.
14:23:53krux02that is not during compilation
14:25:18krux02order is important
14:25:38Clonkk[m]You're right, but It's good enough for what I'm doing
14:28:01FromDiscord<Rika> then why not a define?
14:28:42Clonkk[m]The idea is to have a define that changes depending on which file you import (assuming mutually exclusive files)
14:28:54Clonkk[m]Avoiding multiple config files
14:30:01krux02then why don't you put `const abc = true` in module A, and in module B you put `const abc = false`
14:30:26krux02then when A and B is mutually exclusive import, `abc` will always be resolved.
14:31:07Clonkk[m]Because then you have to modify source code to switch from one flag to the other.
14:31:41krux02well I don't see your use case.
14:31:47Clonkk[m]Haha it's a bit specific
14:32:00FromDiscord<Rika> If you switch it on the compiler it’s going to affect all files
14:44:30*Q-Master quit (Ping timeout: 256 seconds)
14:54:25FromDiscord<รєคɭ๓๏שє> @giaco are you here?
14:54:38*narimiran joined #nim
14:58:16*Q-Master joined #nim
14:59:46PMunchsealmove, are you tired of getting pinged from IRC? :P
15:01:40FromDiscord<Clyybber> ironically you just pinged someone called ed twice lol
15:01:50FromDiscord<Clyybber> I wonder why the bot does that tho
15:03:09*Vladar quit (Remote host closed the connection)
15:06:27ForumUpdaterBotNew Nimble package! json2xml - Convert json to xml : JsonNode( comapatible with module json ) To XmlNode (comapatible with module xmltree), see https://github.com/MhedhebiIssam/json2xml
15:10:25*haxscramper joined #nim
15:15:33PMunch@Clyybber, wait really?
15:15:42FromDiscord<Clyybber> yeah haha
15:16:01FromDiscord<Clyybber> and for some reason you didn't ping sealmove
15:16:04FromDiscord<Clyybber> this is really weird
15:16:24FromDiscord<Clyybber> can you try sealmove but with a space between the name and the comma?
15:16:40PMunch@sealmove
15:16:49PMunch@รєคɭ๓๏שє
15:17:20FromDiscord<Clyybber> huh what the heck
15:17:32FromDiscord<Clyybber> can you try "seamove: something"
15:17:38PMunchsealmove: something
15:17:47FromDiscord<Clyybber> ok, something's wrong
15:18:21PMunchEspecially that ed thing..
15:18:23FromDiscord<Clyybber> oh, it's because the bot is considering the discord usernames, not the nicks
15:18:31FromDiscord<Clyybber> but the ed thing I can't explain :D
15:18:35FromDiscord<Clyybber> @Yardanico any idea?
15:18:52PMunchBut why didn't any of my sealmove pings work then?
15:19:04FromDiscord<Clyybber> PMunch: Because sealmove is named unicodely
15:19:19FromDiscord<Yardanico> yeah I check by the discord username not display name
15:19:32FromDiscord<Clyybber> we should probably switch that if possible
15:19:36FromDiscord<Yardanico> i'll see
15:19:43FromDiscord<Clyybber> but last we tried discordnim didn't cache the nicks right?
15:19:53FromDiscord<Yardanico> yeah something like that
15:20:18PMunchWhere do you see that?
15:20:23FromDiscord<Clyybber> eh, nimscord I mean
15:20:35FromDiscord<Clyybber> damn it wrong again; dimscord, right?
15:21:09FromDiscord<Clyybber> PMunch: See what?
15:21:54PMunchHis nick
15:22:22FromDiscord<Clyybber> oh, on discord, he's called sealmove here, but discord has a global username, and a server specific nick
15:22:37FromDiscord<Clyybber> and the bot only uses the global username right now
15:22:49PMunchAaah I see
15:23:01FromDiscord<Yardanico> yeah I'm not entirely sure if that's fixable, i'll check
15:26:15FromDiscord<Yardanico> yeah it should be I think
15:26:50PrestigeIs the bot open source?
15:26:55FromDiscord<Clyybber> fixable or not fixable
15:27:01FromDiscord<Clyybber> Prestige: https://github.com/Yardanico/ircord/
15:27:17FromDiscord<Yardanico> @Clyybber fixable :)
15:27:21FromDiscord<Clyybber> nice!
15:28:18PMunchI miss disbot though..
15:28:44FromDiscord<Clyybber> but ircord is better?
15:28:51FromDiscord<Clyybber> oh, nevermind
15:28:53FromDiscord<Yardanico> they're different :)
15:29:11FromDiscord<Clyybber> yeah, I somehow read that as FromDiscord or something
15:29:16FromDiscord<Clyybber> I miss disbot too
15:29:31FromDiscord<Clyybber> ~manual
15:29:33FromDiscord<Yardanico> trying to compile ircord now, I get an error, not sure if it's a nim regression, will check
15:29:51ForumUpdaterBotNew thread by FabienPRI: Performance comparison of various compilers, see https://forum.nim-lang.org/t/7633
15:32:17Clonkk[m]Is it possible to create an alias for a (generic) function without having to rewrite the signature ?
15:32:59Clonkk[m]At the moment I just do ``var newname = oldprocname`` but I'm wondering if there's a better way
15:33:49FromDiscord<Yardanico> @Clyybber were there any changes to how generics work in Nim recently?
15:34:09FromDiscord<Clyybber> yeah
15:34:17FromDiscord<Clyybber> but afaik only related to mixins/bind
15:34:23FromDiscord<Yardanico> oh then I found a regression :P
15:34:32FromDiscord<Clyybber> is it related to mixin/bind?
15:35:08FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2SWM
15:35:29FromDiscord<Clyybber> huh
15:35:32FromDiscord<Yardanico> affects https://github.com/mark-summerfield/diff
15:35:50*PMunch quit (Quit: leaving)
15:36:05FromDiscord<Yardanico> @Clyybber will you file an issue or i'll do it myself?
15:36:15FromDiscord<Clyybber> if you are already at it :D
15:36:19FromDiscord<Yardanico> not yet :D
15:36:48FromDiscord<Clyybber> it's yours then :P
15:38:03FromDiscord<Clyybber> I mean you minimized it and all that, so props should go to you :D
15:38:09FromDiscord<Yardanico> ah actually wait it might be happening because sets got more new code
15:38:15FromDiscord<Clyybber> oh
15:38:31FromDiscord<Yardanico> 1.4.4 doesn't call `len` for a `HashSet` in `items`
15:38:32FromDiscord<Yardanico> devel does
15:39:07FromDiscord<Clyybber> ah
15:39:17FromDiscord<Clyybber> does a bind len in items help?
15:39:49FromDiscord<Yardanico> doesn't seem so
15:39:58FromDiscord<Yardanico> I'll make a smaller example without sets
15:47:32FromDiscord<ajusa> Is anyone interested in adding Nim to https://github.com/benhoyt/countwords↵I started working on it (https://github.com/ajusa/countwords/blob/master/simple.nim) but not sure if mine is correct. Feel free to work off of it if anyone wants to.
15:48:23*Tuatarian joined #nim
15:48:36*Vladar joined #nim
15:48:47*tane joined #nim
15:50:05*vicfred joined #nim
15:54:56FromDiscord<Yardanico> ahh @Clyybber I think I got it!
15:54:59FromDiscord<Yardanico> declaration order :D
15:55:17FromDiscord<Yardanico> but this worked before, so it's a regression nonetheless
15:58:26FromDiscord<Yardanico> @Clyybber https://github.com/nim-lang/Nim/issues/17385
16:00:05*gollark[m] quit (Quit: Idle for 30+ days)
16:00:37narimiranand there i was, using nim for few years, having no idea that i could write stuff like `var test = HashSet[T]()`
16:01:03FromDiscord<Yardanico> XD
16:01:40FromDiscord<Yardanico> wait actually I think this was always broken?
16:01:45FromDiscord<Yardanico> it fails even on 0.20.0
16:01:58FromDiscord<Yardanico> wat
16:02:01FromDiscord<Yardanico> ah nvm
16:02:02FromDiscord<Yardanico> im stupid
16:02:08FromDiscord<Yardanico> or not
16:02:18narimiranwhat a rollercoaster
16:02:22narimiranare you stupid or not??
16:02:27FromDiscord<Yardanico> i'm both
16:02:29narimirani don't know anymore
16:03:39FromDiscord<Yardanico> I don't understand what I'm doing anymore xd
16:04:24narimiranso, does this work on 1.4.4 or not?
16:05:58FromDiscord<Yardanico> the code in the issue doesn't work and isn't supposed to work, it's a bad change in sets that's causing this I guess
16:06:14FromDiscord<Yardanico> but still a regression kind of :P
16:08:20FromDiscord<Yardanico> i'll run git bisect just in case
16:08:44narimiranif it is `len` related, maybe #16959 ?
16:09:01narimiranwhere's that bot that gives us a link?
16:09:09FromDiscord<Yardanico> disruptek
16:09:10FromDiscord<Yardanico> disbot
16:09:19narimiranhttps://github.com/nim-lang/Nim/pull/16959
16:09:24FromDiscord<Rika> why is the winlean module called winlean
16:09:25FromDiscord<Yardanico> @narimiran yeah you're probably right
16:09:53FromDiscord<Yardanico> @Rika probably because of WIN32_LEAN_AND_MEAN
16:10:45FromDiscord<Yardanico> and I just wanted to improve my ircord...
16:12:20FromDiscord<Yardanico> yeah @narimiran I bisected
16:12:22FromDiscord<Yardanico> it's caused by that PR
16:12:57FromDiscord<Yardanico> it's easily fixed if you change the order of declarations
16:13:39narimiranwill you do it, or me? :)
16:14:22FromDiscord<Yardanico> please you, I'm not sure if simply changing the order is good (e.g. the order in the docs will change too then)
16:14:32FromDiscord<Yardanico> i'll go and finally add display names to dimscord instead :P
16:14:36narimiranok
16:14:41FromDiscord<Yardanico> \s/dimscord/ircord
16:14:46FromDiscord<Rika> is there a full windows module?
16:15:01FromDiscord<Yardanico> https://github.com/khchen/winim
16:15:14FromDiscord<Clyybber> @Yardanico haha, so it was just len being after items?
16:15:15FromDiscord<Rika> okay, so none in the standard
16:15:34FromDiscord<Yardanico> @Clyybber yes
16:15:58FromDiscord<Clyybber> and that issue only manifests itself with a module chain, since otherwise you'd be importing len too and it would find it
16:16:00FromDiscord<Clyybber> haha, nice
16:16:09*superbia joined #nim
16:17:14FromDiscord<flywind> or mixin len
16:17:18FromDiscord<Clyybber> won't fix it
16:17:27FromDiscord<Yardanico> mixin might, I tried bind
16:17:31FromDiscord<Yardanico> (edit) "mixin might, I ... tried" added "only"
16:17:36FromDiscord<Clyybber> I don't think either will
16:17:51FromDiscord<Clyybber> during declaration, len is not available, because it's declared later
16:18:05FromDiscord<Clyybber> during instantiation, len is not available either, because it might not be imported
16:18:07FromDiscord<Yardanico> yeah you're right
16:18:54FromDiscord<Clyybber> if you want a generic to use stuff from the declaration site the stuff has to be declared once the generic declaration is encountered
16:18:59FromDiscord<Clyybber> just like for normal procs
16:36:51narimiranany idea why i386 pipeline is suddenly red everywhere? https://play.nim-lang.org/#ix=2SX8
16:47:34FromDiscord<Clyybber> yeah, it's because of the package manager issue AFAIK
17:08:42*stefantalpalaru_ joined #nim
17:09:37*vegai11 joined #nim
17:09:40*koltrast_ joined #nim
17:10:38*njoseph_ joined #nim
17:13:21*Torro quit (Quit: bye)
17:14:02*stefantalpalaru quit (Remote host closed the connection)
17:14:02*vegai1 quit (Ping timeout: 265 seconds)
17:14:03*njoseph quit (Ping timeout: 265 seconds)
17:14:04*koltrast quit (Ping timeout: 265 seconds)
17:14:07*jess quit (Quit: Reconnecting)
17:14:10*jess joined #nim
17:14:12*stefantalpalaru_ is now known as stefantalpalaru
17:14:15*stefantalpalaru quit (Changing host)
17:14:15*stefantalpalaru joined #nim
17:14:51*sixtyten joined #nim
17:16:21*Cthalupa quit (Ping timeout: 246 seconds)
17:18:54*Cthalupa joined #nim
17:26:18FromDiscord<Yardanico> restarting the bridge
17:26:22*FromDiscord quit (Remote host closed the connection)
17:27:15*FromDiscord joined #nim
17:27:27FromDiscord<Yardanico> done
17:27:30Yardanico@Yardanico hi
17:27:38Prestigedoes this ping ed still
17:27:40FromDiscord<asd> yes
17:27:43Prestigewelp
17:27:49FromDiscord<asd> but "ping ed" is a valid thing
17:27:57FromDiscord<asd> "pinged" shouldn't ping
17:28:00FromDiscord<asd> but "ping ed" should
17:28:04Yardanico@asd hi
17:28:20Prestigeso we don't need the @?
17:28:26Prestigeasd
17:29:08YardanicoPrestige: it's one of these - "Nick, msg" at the start of the message, "ping nick", "@nick"
17:29:13YardanicoYardanico, hi
17:29:18Prestigeah, ty
17:29:19Yardanicoactually wait, not the comma
17:29:21Yardanicoit's the colon
17:29:25YardanicoYardanico: hi
17:29:34FromDiscord<Yardanico> asd
17:29:36FromDiscord<Yardanico> huh
17:30:00FromDiscord<Yardanico> ohhhhhhhhhhh
17:30:39FromDiscord<zetashift> Multiple personalities: chatroom edition
17:37:23FromDiscord<Yardanico> @Prestige I found out why ed is getting pinged
17:38:30Prestigeoh nice
17:38:42FromDiscord<Yardanico> it's an unlucky chain of events - part of my matching matches on "ping + space + nickname"
17:38:51FromDiscord<Yardanico> and the problem was that I was parsing zero or more spaces
17:38:52FromDiscord<Yardanico> not one or more
17:39:00Prestigehaha, nice. Good find
17:40:15FromDiscord<Yardanico> restarting the bridge again
17:40:31*FromDiscord quit (Remote host closed the connection)
17:40:51*FromDiscord joined #nim
17:41:16Yardanicotry now Prestige
17:41:24Prestigepinged
17:41:28Yardanicoyeah its fine now
17:41:37Prestige\o/
17:41:43Yardanicobut "ping someone" will actually ping them if there's a person with that name
17:41:47Yardanicoand apparently I pinged someone
17:42:13Prestigelol
17:44:21FromDiscord<clyybber> In reply to @Yardanico "and the problem was": oh ahaha
18:00:48FromDiscord<haxscramper> Is it possible to disable `.kind` field init safety proving? I have several kinds in the same branch and select a particular one at runtime, but I know it is safe to do so
18:01:10FromDiscord<haxscramper> I'm talking about disabling `Error: cannot prove that it's safe to initialize with the runtime value for the discriminator 'kind' ` check
18:01:18FromDiscord<haxscramper> For particular piece of code only
18:01:47FromDiscord<haxscramper> Or somehow making compiler understand it is a safe init
18:02:31FromDiscord<Yardanico> @haxscramper I think it's a deeper problem than that, and it's allowed with arc/orc because with destructors it's safe
18:02:41FromDiscord<Yardanico> if I understand your problem correctly
18:03:30FromDiscord<Yardanico> https://github.com/nim-lang/RFCs/issues/209
18:03:43FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/13995
18:03:51FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2SXP
18:03:55FromDiscord<haxscramper> (edit) "https://play.nim-lang.org/#ix=2SXP" => "https://play.nim-lang.org/#ix=2SXQ"
18:03:56*j-james[m] quit (*.net *.split)
18:03:56*Avatarfighter[m] quit (*.net *.split)
18:03:56*Prestige quit (*.net *.split)
18:04:03FromDiscord<Yardanico> can't you use object construction syntax?
18:05:09*j-james[m] joined #nim
18:05:09*Avatarfighter[m] joined #nim
18:05:09*Prestige joined #nim
18:07:55*sekao[m] quit (Ping timeout: 240 seconds)
18:07:55*zazi[m] quit (Ping timeout: 240 seconds)
18:07:55*rwiser[m] quit (Ping timeout: 240 seconds)
18:07:55*Clonkk[m] quit (Ping timeout: 240 seconds)
18:07:56*ee7[m] quit (Ping timeout: 244 seconds)
18:07:56*retroedgetech[m] quit (Ping timeout: 244 seconds)
18:07:57*unclechu quit (Ping timeout: 240 seconds)
18:07:57*lnxw37d4 quit (Ping timeout: 240 seconds)
18:07:57*Avahe[m] quit (Ping timeout: 244 seconds)
18:07:59*vegai11 quit (Ping timeout: 241 seconds)
18:07:59*Zoom[m] quit (Ping timeout: 241 seconds)
18:07:59*k0mpjut0r quit (Ping timeout: 241 seconds)
18:08:04*Benjamin[m]2 quit (Ping timeout: 249 seconds)
18:08:04*leorize[m] quit (Ping timeout: 249 seconds)
18:08:08*nxnl[m] quit (Ping timeout: 247 seconds)
18:08:09FromDiscord<haxscramper> I just want to work around init proving without switching GC
18:08:10*stisa quit (Ping timeout: 247 seconds)
18:08:10*antholop[m] quit (Ping timeout: 247 seconds)
18:08:10*GitterIntegratio quit (Ping timeout: 247 seconds)
18:08:22*ShalokShalom[m] quit (Ping timeout: 260 seconds)
18:08:22*drbixx[m] quit (Ping timeout: 260 seconds)
18:08:26*fbpyr[m] quit (Ping timeout: 264 seconds)
18:08:27*Avatarfighter[m] quit (Ping timeout: 265 seconds)
18:08:31FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2SXR it can't prove this too, though examples is a big too simple
18:08:39*jfondren[m] quit (Ping timeout: 268 seconds)
18:08:39*Stephen[m]1 quit (Ping timeout: 268 seconds)
18:08:39*i_use_arch_btw[4 quit (Ping timeout: 268 seconds)
18:08:40*watzon quit (Ping timeout: 268 seconds)
18:08:40*vindaar[m] quit (Ping timeout: 268 seconds)
18:09:01*superbia quit (Quit: WeeChat 3.1)
18:09:23*MTRNord quit (Ping timeout: 246 seconds)
18:09:23*liblq-dev quit (Ping timeout: 246 seconds)
18:09:23*reversem3 quit (Ping timeout: 246 seconds)
18:09:25*j-james[m] quit (Ping timeout: 265 seconds)
18:09:26*sunwukong quit (Ping timeout: 240 seconds)
18:09:41FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2SXT
18:09:53*BitPuffin quit (Ping timeout: 268 seconds)
18:24:18ForumUpdaterBotNew thread by Livingstone1337: Issues with indentations and for loops, see https://forum.nim-lang.org/t/7634
18:38:06*GitterIntegratio joined #nim
18:45:05*fputs quit (Quit: WeeChat 3.1)
18:56:17giaco_I need to interface with a SOAP service and I'm using gsoap to build bindings automatically from wsdl(s) file(s). It works and next step would be running c2nim, but I have zero experience with it. With gsoap I have many options for generating both C or C++ code, but I'm now sure which way to go to make it easier to wirk with nim. What do you suggest?
18:56:42giaco_s/now/not
18:56:52giaco_s/wirk/work
19:12:12*NimBot joined #nim
19:12:17*ddevault_ is now known as ddevault
19:12:55*Kaivo joined #nim
19:14:16FromDiscord<zidsal> I've enabled `--experimental:strictFuncs` in my project and one of my func's now fails to compile as it think's it has side effects. This is due to the following line ` let columnName = columnNode["name"].str` now columnName itself is readonly in the rest of my code. Should this be flagged up as a side effect? is there a way for me to tell the compiler that this is readonly and no side effects are being introduced?
19:28:51*BitPuffin joined #nim
19:28:51*j-james[m] joined #nim
19:28:51*watzon joined #nim
19:28:52*antholop[m] joined #nim
19:28:53*Avahe[m] joined #nim
19:28:53*k0mpjut0r joined #nim
19:28:53*MTRNord joined #nim
19:28:53*i_use_arch_btw[m joined #nim
19:28:53*reversem3 joined #nim
19:28:53*Avatarfighter[m] joined #nim
19:28:53*lnxw37d4 joined #nim
19:28:53*liblq-dev joined #nim
19:28:53*stisa joined #nim
19:28:54*leorize[m] joined #nim
19:28:54*Benjamin[m]2 joined #nim
19:28:54*vindaar[m] joined #nim
19:28:54*sunwukong joined #nim
19:28:54*fbpyr[m] joined #nim
19:28:54*unclechu joined #nim
19:28:54*jfondren[m] joined #nim
19:28:58*Zoom[m] joined #nim
19:28:58*rwiser[m] joined #nim
19:28:58*drbixx[m] joined #nim
19:28:58*sekao[m] joined #nim
19:28:59*ee7[m] joined #nim
19:28:59*retroedgetech[m] joined #nim
19:28:59*zazi[m] joined #nim
19:29:00*Stephen[m]2 joined #nim
19:29:00*Clonkk[m] joined #nim
19:29:00*nxnl[m] joined #nim
19:29:01*vegai1 joined #nim
19:29:30*ShalokShalom[m] joined #nim
19:31:39*ddevault_ joined #nim
19:31:50*kali___ quit (Ping timeout: 264 seconds)
19:31:50*ddevault quit (Ping timeout: 264 seconds)
19:32:26*m4r35n357 quit (Ping timeout: 264 seconds)
19:32:27*joast quit (Ping timeout: 264 seconds)
19:32:53FromDiscord<haxscramper> You have `columnName` assignment inside of the function definition?
19:33:25*ddevault_ is now known as ddevault
19:33:44*kali___ joined #nim
19:37:19*icebattle joined #nim
19:38:04FromDiscord<zetashift> In reply to @giaco_ "I need to interface": I'm not entirely sure what you want? You want to bind to gsoap? If c2nim is a bit too spartan for you, you could try out `nimterop` which is easier to use, and afaik has more examples
19:41:21*m4r35n357 joined #nim
19:51:10FromDiscord<gollark> I'm running an instance of nimforum for reasons, is there a way to embed external images?
19:52:16FromDiscord<Yardanico> of course, since it's running RST
19:52:26FromDiscord<zidsal> @haxscramper yes that's correct, columnName is passed into an instance of a new object but its not a ref object so I am kind of confused on where it thinks the side effect is
19:52:46FromDiscord<Yardanico> In reply to @gollark "I'm running an instance": there's a quick cheatsheet https://forum.nim-lang.org/about/rst (it even exists on your instance), but you should look into RST
19:54:06FromDiscord<gollark> Ah, that seems to work, it was being weird since the message didn't contain anything but the image I think.
19:54:25FromDiscord<haxscramper> In reply to @zidsal "<@!608382355454951435> yes that's correct,": Yes, it does sound pretty strange. String funcs should only change anything if you had `proc(arg: ref T) = mutate(arg)`, which is not the case. Maybe `[]` operator mutates something, (or `.str`, though i suppose it is a field).
19:55:15FromDiscord<haxscramper> Is `columnNode` a ref table? IIRC `[]` access does not mutate anything, but this is the only idea I have. If you could share the code it would be possible to say more of course
19:57:39*waleee-cl joined #nim
19:59:34FromDiscord<zidsal> @haxscramper columnNode is a JsonNode which is ref object of JsonNodeObj I've stripped down my code to a very small example https://play.nim-lang.org/#ix=2SYs its a shame the playground doesn't let you pass in flags like use arc or strictFuncs
19:59:56FromDiscord<Yardanico> you can enable strictFuncs with {.experimental: "strictFuncs".} though
20:00:22FromDiscord<zidsal> ah perfect let me strip this down some more then
20:00:32FromDiscord<Yardanico> also @zidsal it works for me with strictFuncs ?
20:00:43FromDiscord<Yardanico> what nim version are you on?
20:01:03FromDiscord<zidsal> 1.4.2 let me put this in a standalone nimfile and see what happens
20:01:09FromDiscord<Yardanico> ah nvm you need it in the command line yeah
20:01:13FromDiscord<Yardanico> or at the top of the file
20:01:31FromDiscord<Yardanico> actually no, just at command line works
20:02:59FromDiscord<zidsal> thats weird when I chuck that ina standalone nim file, it fails for me
20:03:33FromDiscord<Yardanico> yeah i meant that experimental:strictFuncs needs to be in command line
20:03:38FromDiscord<zidsal> ah gotcha
20:04:01FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2SYu
20:04:55FromDiscord<Valor> didnt go to the nim meetup, was there anything important that happened
20:05:05FromDiscord<zidsal> interestingly the `[]` operator isn't marked as side effect free, but if you disable the strict check's it passes
20:05:17FromDiscord<Yardanico> @zidsal it doesn't have to be marked as side-effect free
20:05:53FromDiscord<zidsal> oh I thought any side effect free can only call side effect free functions? is this ignored because it's inline or have I missunderstood
20:06:08FromDiscord<Yardanico> nonono, "marked"
20:06:35FromDiscord<Yardanico> if you're calling some proc (which is not annotated in any way) from a func or a proc {.noSideEffect.}, nim will check if it's side-effect free anyway
20:06:39FromDiscord<Yardanico> because that's what it's all about
20:06:49FromDiscord<Yardanico> /home/dian/Things/Nim/lib/pure/json.nim(482, 6) Error: '[]' can have side effects↵an object reachable from 'node' is potentially mutated↵/home/dian/Things/Nim/lib/pure/json.nim(489, 16) the mutation is here
20:07:36FromDiscord<zidsal> oh, I didn't realise it went that far, I wonder why it think's thats a mutation as the table is not a ref object, wouldn't nim make a copy of the value anyway when I store it in my let columnName
20:07:50FromDiscord<Yardanico> I think it happens due to the fact that in `result = node.fields[name]` node.fields[name] returns a `var JsonNode`
20:08:08FromDiscord<Yardanico> lemme minimize the example
20:12:11FromDiscord<haxscramper> In reply to @バロザード "didnt go to the": It was mostly about the current state of IC, and saem also talked about his work on semcheck/nimsuggest
20:12:25FromDiscord<Valor> i have no idea what either of those things are lol
20:12:38FromDiscord<haxscramper> IC is incremental compilation
20:13:09FromDiscord<Valor> oh
20:13:14FromDiscord<Valor> why is that important?
20:14:08FromDiscord<haxscramper> There are many reasons. First and most obvious one is "faster compilation", but it also implemented in a way that would allow external tooling to use information that nim compiler has
20:14:54FromDiscord<Valor> oh thats coool
20:14:54FromDiscord<Valor> would it be releated to wasm?
20:15:19*kali___ is now known as kaliy
20:15:44FromDiscord<haxscramper> No. Well, you won't benefit from it directly, except for faster compilation, but it enables better tooling support for some scenarios
20:16:30FromDiscord<haxscramper> So it is mostly a compiler implementation detail. I think.
20:16:51FromDiscord<Valor> ah k
20:17:01FromDiscord<Valor> whats semcheck/nimsuggest
20:17:40*vicfred_ quit (Quit: Leaving)
20:18:00FromDiscord<haxscramper> semcheck and nimsuggest
20:18:23FromDiscord<haxscramper> latter one is completion that you are using (if you are using any completion in vscode (or whichever editor you are using))
20:18:36FromDiscord<haxscramper> semcheck is a really internal compiler detail
20:18:48FromDiscord<haxscramper> (edit) "a really" => "an"
20:19:10FromDiscord<Valor> ah
20:19:16FromDiscord<Valor> so nimsuggest is like rust analyzer
20:27:35FromDiscord<Yardanico> @zidsal sorry for stealing your issue - https://github.com/nim-lang/Nim/issues/17387
20:27:41FromDiscord<Yardanico> you can watch it to get notified when it gets fixed
20:28:07FromDiscord<zidsal> no problem yard 😛
20:28:29FromDiscord<zidsal> glad it's a bug
20:28:49FromDiscord<Yardanico> for now you can do something like this:
20:29:42FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2SYy
20:30:15FromDiscord<Yardanico> you only have to write it for that line, for others it's not necessary
20:30:28FromDiscord<zidsal> perfect thanks yard
20:30:42FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2SYA
20:40:19*ddevault quit (Ping timeout: 256 seconds)
20:42:01*ddevault joined #nim
20:42:22*xet7 quit (Quit: Leaving)
20:56:45*kaliy quit (*.net *.split)
20:56:45*Vladar quit (*.net *.split)
20:56:45*dddddd quit (*.net *.split)
20:56:45*teiresias quit (*.net *.split)
20:56:46*blueberrypie quit (*.net *.split)
20:57:02*fredsted quit (*.net *.split)
20:57:02*federico3 quit (*.net *.split)
20:57:02*shashlick quit (*.net *.split)
20:57:16*kaliy joined #nim
20:57:16*Vladar joined #nim
20:57:16*dddddd joined #nim
20:57:16*teiresias joined #nim
20:57:16*fredsted joined #nim
20:57:16*blueberrypie joined #nim
20:57:16*federico3 joined #nim
20:57:16*shashlick joined #nim
20:57:18*haxscram` joined #nim
20:57:18*haxscram` quit (Remote host closed the connection)
20:58:52*haxscramper quit (Ping timeout: 265 seconds)
21:00:21*narimiran quit (Ping timeout: 246 seconds)
21:04:24FromDiscord<gollark> Does anyone know where the code of ForumUpdaterBot is? I want to bidirectionally bridge certain nimforum threads (on a selfhosted instance) to IRC and thought its code might be a good base.
21:04:54*sixtyten quit (Quit: Leaving)
21:05:05FromDiscord<gollark> Duckduckgoing it just shows IRC logs mentioning it.
21:14:02FromDiscord<zetashift> In reply to @gollark "Does anyone know where": this maybe: https://github.com/Yardanico/nimeventer ?
21:15:07FromDiscord<gollark> Seems like it, thanks.
21:38:07*shashlick quit (Ping timeout: 256 seconds)
21:38:26*shashlick joined #nim
21:46:22*nisstyre quit (Quit: WeeChat 2.9)
21:47:48*blueberrypie quit (Read error: Connection reset by peer)
21:48:01*blueberrypie joined #nim
21:51:50FromDiscord<ElegantBeef> @treeform Your benchmarking in that raytracer forum post is just beautiful, make a guest blog post on how to benchmark Nim 😛
21:52:21FromDiscord<Yardanico> not all people have access to vtune, so it would be better to use something more platform-agnostic though :)
21:52:29FromDiscord<treeform> In reply to @ElegantBeef "<@!107140179025735680> Your benchmarking in": thanks, you think it can be adopted into a blog post?
21:52:38FromDiscord<ElegantBeef> With a bit more explanation probably
21:52:47FromDiscord<treeform> @Yardanico runs everywhere?
21:53:00FromDiscord<Yardanico> In reply to @treeform "<@!177365113899057152> runs everywhere?": but on non-intel the feature set is extremely limited
21:53:44FromDiscord<dom96> https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-your-code 😉
21:53:48FromDiscord<treeform> I tried making my own profiler: https://github.com/treeform/proffy but its not ready yet.
21:53:53FromDiscord<treeform> Can you live with vtune till then?
21:54:03FromDiscord<dom96> (edit) removed "😉"
21:54:20FromDiscord<dom96> You can use valgrind for profiling. I do like the style of your post though treeform
21:54:27FromDiscord<Yardanico> I just meant that there are vtune alternatives if you would want to make a proper post
21:54:34FromDiscord<Yardanico> but yeah a blog post like that would be good
21:54:37FromDiscord<ElegantBeef> The snarky condescension reads well 😛
21:54:58FromDiscord<Yardanico> that was actually kind of a typo :P
21:55:42FromDiscord<treeform> I use vTune and AMD's prof. But AMD prof just kind of sucks its missing tons of features of vTune.
21:56:00FromDiscord<treeform> I also use the Nsight but that's GPU only.
21:56:19FromDiscord<Yardanico> @treeform yeah I just mean there are profilers based on `perf` and `valgrind` and many otherws
21:56:20FromDiscord<Yardanico> (edit) "otherws" => "others"
21:56:27FromDiscord<treeform> The callgrind/linux tools just don't work for me on windows.
21:56:59FromDiscord<treeform> @Yardanico can you recommend me one that is good?
21:58:10FromDiscord<ElegantBeef> We really need to get the message out to use `-d:danger -d:lto --:gc:arc` for speed tests 😄
21:58:58FromDiscord<ElegantBeef> I think my clippy idea is the best, when compiling any program have clippy in the cli saying "Are you going for speed, consider trying these options" 😛
21:58:59FromDiscord<treeform> and `--passC:"-march=native"` ?
21:59:03FromDiscord<Yardanico> @treeform oh, forgot that you're on linux :(
21:59:10FromDiscord<ElegantBeef> He's on windows
21:59:17FromDiscord<Yardanico> yeah I meant to say windows
21:59:29FromDiscord<Yardanico> @treeform well that'd be a bit cheating since that's not usually used in benchmarks
21:59:31FromDiscord<ElegantBeef> One of the few nim programmers that uses windows
21:59:35FromDiscord<Yardanico> (by other languages like C/C++)
21:59:47FromDiscord<zidsal> I'm on windows too (due to lazyness)
21:59:54FromDiscord<ElegantBeef> Could also do PDO or whatever it's called
22:00:00FromDiscord<ElegantBeef> But yea again cheating
22:00:15FromDiscord<Yardanico> PGO
22:00:24FromDiscord<treeform> In reply to @ElegantBeef "One of the few": Some one has to suffer for everyone else benefit of multi platform support.
22:00:31FromDiscord<Yardanico> same goes for LTO too
22:00:39FromDiscord<Yardanico> in benchmarks C/C++ don't usually use it
22:00:41FromDiscord<Yardanico> idk why though
22:00:49FromDiscord<Yardanico> LTO is totally free
22:00:54FromDiscord<Yardanico> just a bit longer compile times
22:01:05FromDiscord<ElegantBeef> Treeform you know that's what we appreciates about you (A letterkenney reference no one will get here)
22:01:18FromDiscord<Yardanico> for benchmarks PGO is real cheating since it'll optimize the code based on the runtime profile data
22:01:27FromDiscord<Yardanico> but for real apps PGO is really good
22:01:33FromDiscord<Yardanico> if you have good test cases that is
22:02:19FromDiscord<ElegantBeef> How do you envision proffy working, drop a pragma on a procedure and it outputs it's performance usage when it's called?
22:02:46FromDiscord<treeform> When I make websites that run on linux, I use linux. When I make games for mostly windows people I run windows.
22:02:55FromDiscord<Yardanico> "## Frame based instrumentation profiler for games." is that still true for proffy?
22:03:08FromDiscord<Yardanico> it's for games specifically or just a general profiler?
22:03:30FromDiscord<treeform> In reply to @ElegantBeef "How do you envision": Yeah some thing like that. I was just doing enter section / exist section.
22:03:57FromDiscord<treeform> In reply to @Yardanico "it's for games specifically": Its very early and I kind of stopped and never released the project.
22:04:15*nisstyre joined #nim
22:04:22FromDiscord<ElegantBeef> Yea i might contribute to it if i figure out what needs to be done, these raspberry pi pico bindings are being prickish at points 😄
22:04:33FromDiscord<treeform> There are two profile modes you can have statistical (where you sample the stack frame at very N ns) and instrumented (where programmers measure what they want to measure)
22:04:40FromDiscord<treeform> There are advantages of both.
22:04:55FromDiscord<treeform> And I almost feel like they can be combined. But not sure...
22:05:15FromDiscord<ElegantBeef> The cool thing would be feeding the trace to another program to get those fancy graphs
22:05:27FromDiscord<zidsal> flame graphs are nice for that kind of stuff
22:05:59FromDiscord<ElegantBeef> After using Unity's it's just annoying i prefer a hierarchical view
22:06:16FromDiscord<ElegantBeef> Though Unity's includes all functions
22:07:32FromDiscord<treeform> https://media.discordapp.net/attachments/371759389889003532/821142594541191179/unknown.png
22:07:37FromDiscord<treeform> this is what I had
22:07:49FromDiscord<Yardanico> earthsea leaked
22:07:59FromDiscord<ElegantBeef> That's a flame graph alright 😄
22:08:04FromDiscord<sealmove> what's the way to go to circumvent that the discriminator of an object variant must be an ordinal?
22:08:09FromDiscord<treeform> yep
22:08:15FromDiscord<sealmove> for example if you want to discriminate on a string
22:08:16FromDiscord<Yardanico> @sealmove there's no way, it must be an ordinal
22:08:30FromDiscord<sealmove> yeah, I mean, common alternatives for modelling this situation
22:08:36FromDiscord<Yardanico> use an enum
22:08:41FromDiscord<ElegantBeef> you could use the hash of the string, though not very ergonomic 😄
22:09:03FromDiscord<sealmove> :o +1 for hash of string
22:09:27FromDiscord<ElegantBeef> I mean i'd not suggest it, it's just an enum with extra steps
22:12:28FromDiscord<sealmove> true
22:14:14FromDiscord<sealmove> sent a code paste, see https://paste.rs/WFV
22:15:00FromDiscord<ElegantBeef> How is that better than just `type myEnum = enum First, Second`
22:15:01FromDiscord<sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2SZ3
22:15:35FromDiscord<ElegantBeef> unless the names are just placeholder
22:16:17FromDiscord<Yardanico> on the topic of profilers
22:16:18FromDiscord<sealmove> yeah if you want to parse the specific string. for `parseEnum` to work
22:16:19FromDiscord<Yardanico> found https://github.com/google/orbit
22:18:21FromDiscord<treeform> I think I tried it. Some thing was off.
22:18:34FromDiscord<treeform> The screenshot looks great though.
22:19:50FromDiscord<Yardanico> ill try to build it on linux now
22:21:29FromDiscord<Yardanico> maybe I won't - https://github.com/google/orbit/issues/1746
22:21:33FromDiscord<Yardanico> don't want to rebuild LLVM just for it
22:21:41FromDiscord<Yardanico> (edit) "rebuild" => "build"
22:21:42FromDiscord<treeform> they did not ship an exe, I found it hard to build on windows
22:21:46FromDiscord<treeform> so I gave up
22:21:50FromDiscord<treeform> that's what happend
22:29:34FromDiscord<sealmove> sent a code paste, see https://paste.rs/Sy2
22:34:20FromDiscord<Yardanico> 11k stars soon
22:34:22FromDiscord<Yardanico> 10972 rn
22:37:45*Tuatarian quit (Quit: Quit)
22:46:11*tane quit (Quit: Leaving)
23:15:03*krux02 quit (Remote host closed the connection)