00:02:01 | * | abm joined #nim |
00:04:59 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:41:42 | * | theelous3 quit (Read error: Connection reset by peer) |
01:02:18 | * | shodan45 quit (Quit: No Ping reply in 180 seconds.) |
01:06:41 | * | shodan45 joined #nim |
01:16:03 | * | Hideki_ joined #nim |
01:31:22 | * | Hideki_ quit (Remote host closed the connection) |
01:32:25 | * | Hideki_ joined #nim |
01:36:16 | * | uu91 quit (Read error: Connection reset by peer) |
01:36:31 | * | uu91 joined #nim |
01:36:37 | * | Hideki_ quit (Ping timeout: 240 seconds) |
01:37:03 | * | uu91 quit (Read error: Connection reset by peer) |
01:37:16 | * | uu91 joined #nim |
01:41:55 | * | uu91 quit (Read error: Connection reset by peer) |
01:42:16 | * | uu91 joined #nim |
01:53:41 | * | Hideki_ joined #nim |
01:59:44 | * | kevin5 joined #nim |
02:07:00 | * | Hideki_ quit (Remote host closed the connection) |
02:10:33 | * | Hideki_ joined #nim |
02:15:18 | * | Hideki_ quit (Ping timeout: 268 seconds) |
02:17:31 | * | Hideki_ joined #nim |
02:18:46 | * | Hideki_ quit (Remote host closed the connection) |
02:19:53 | * | Hideki_ joined #nim |
02:24:33 | * | Hideki_ quit (Ping timeout: 268 seconds) |
02:26:56 | * | kevin5 quit (Quit: ERC (IRC client for Emacs 26.3)) |
02:27:50 | * | kevinchau joined #nim |
02:40:21 | * | endragor joined #nim |
02:57:06 | * | Hideki_ joined #nim |
03:16:01 | * | Hideki_ quit (Ping timeout: 265 seconds) |
03:59:21 | * | uu91 quit (Read error: Connection reset by peer) |
03:59:25 | * | rockcavera quit (Remote host closed the connection) |
03:59:34 | * | uu91 joined #nim |
04:04:50 | * | kevinchau quit (Ping timeout: 265 seconds) |
04:06:43 | * | nsf joined #nim |
04:16:45 | * | chemist69 quit (Ping timeout: 250 seconds) |
04:18:43 | * | chemist69 joined #nim |
04:37:41 | disruptek | disbot now falls back to non-nim searches when it fails to find !repo(s) or !search(es) results. |
04:37:41 | disbot | on it. π |
04:37:52 | disruptek | you a badass, alright. |
05:06:30 | * | ltriant quit (Quit: leaving) |
05:12:42 | * | Hideki_ joined #nim |
05:14:10 | FromDiscord_ | <Kaynato> If I have set in nim.cfg `cc:"gcc"` and `gcc.cpp.exe:"nvcc"`, etc. when I run `nim cpp --verbosity=3 test`, if it shows `g++.exe -c` .... have I misconfigured? |
05:17:38 | * | Hideki_ quit (Ping timeout: 276 seconds) |
05:25:36 | FromDiscord_ | <demotomohiro> Try `--listcmd` option instead of --verbosity might show nvcc command. |
05:25:51 | * | njoseph quit (Ping timeout: 246 seconds) |
05:26:18 | FromDiscord_ | <Kaynato> Hmm, still g++.exe ... (etc) |
05:26:27 | FromDiscord_ | <Kaynato> I think it is not picking up the config correctly |
05:28:20 | FromDiscord_ | <Kaynato> The nim.cfg is definitely being read because it behaves differently than otherwise. That means the flag is going through and it it setting the parameters, but somehow I must be doing that incorrectly |
05:28:31 | * | dddddd quit (Remote host closed the connection) |
05:33:05 | FromDiscord_ | <Kaynato> Ok, this is really weird. I can manually specify the switches, but the switches as defined in the config don't do anything at all |
05:33:07 | FromDiscord_ | <Kaynato> Ok, this is really weird. I can manually specify the switches, but the switches as defined in the config don't do anything at all for that |
05:38:44 | FromDiscord_ | <Kaynato> `nvcc.exe -c -w -mno-ms-bitfields -arch=sm_61 --x cu -Xcompiler -fpermissive -DWIN32_LEAN_AND_MEAN -IE:\PROGRA~2\nim-1.0.2\lib -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include" -IE:\Cloud\Sync\Sync\Dev\_Project\nim\aura\src -o C:\Users\main\nimcache\array_d\stdlib_sequtils.nim.cpp.o C:\Users\main\nimcache\array_d\stdlib_sequtils.nim.cpp` need to figure out how to not pass nvcc bad switches in meanwhile. think i'm gettin |
05:39:48 | FromDiscord_ | <Kaynato> I am using `nim cpp --cincludes:"$CUDA_PATH/include" --cc:gcc --gcc.exe:nvcc.exe --gcc.linkerexe:nvcc --gcc.cpp.exe:nvcc --gcc.cpp.linkerexe:nvcc.exe --gcc.options.always:"-arch=sm_61 --x cu" --gcc.cpp.options.always:"-arch=sm_61 --x cu -Xcompiler -fpermissive" --listcmd array` |
05:40:06 | FromDiscord_ | <Kaynato> not sure where I've gone wrong with the nim.cfg |
05:40:12 | FromDiscord_ | <Kaynato> not sure where I've gone wrong with the nim.cfg that it won't pick those up |
05:40:15 | FromDiscord_ | <Kaynato> not sure where I've gone wrong with the nim.cfg that it won't pick those up there |
05:41:30 | FromDiscord_ | <demotomohiro> if you set cpu or os option, `gcc.cpp.exe` would be ignored. In that case, you have to set `cpu.os.gcc.cpp.exe`. |
05:42:10 | FromDiscord_ | <Kaynato> How can I check if I've set cpu or os option? |
05:45:35 | FromDiscord_ | <demotomohiro> If you have a line like `os="..."` or `cpu="..."` in cfg file, it is set |
05:46:00 | FromDiscord_ | <Kaynato> Ah, there is none |
05:46:39 | madprops | how can i divide a BiggestInt? |
05:46:46 | madprops | let kb = info.size / 1024 |
05:46:50 | FromDiscord_ | <demotomohiro> When you run nim, it prints path to cfg file nim reads |
05:47:55 | FromDiscord_ | <Kaynato> Ah. It apparently is only reading the default cfg, not the cfg for the package that has flags which should be activating |
05:48:02 | FromDiscord_ | <Kaynato> wait |
05:48:23 | FromDiscord_ | <Kaynato> Yes, that's right |
05:51:39 | FromDiscord_ | <Kaynato> Ok. So, the behavior of flags, i.e. `-d:someflag` for some package can be defined in its package.nimble? Or am I completely wrong here |
05:52:22 | FromDiscord_ | <Kaynato> via `template someflagSwitches(switches: var string)` |
05:52:25 | FromDiscord_ | <Kaynato> via `template someflagSwitches(switches: var string)`? |
05:52:57 | madprops | there is no way to divide BiggestInt? / seems to require int |
05:54:13 | FromDiscord_ | <Kaynato> div? |
05:54:17 | FromDiscord_ | <Kaynato> re: biggestint, div? |
05:55:38 | * | sagax joined #nim |
05:58:14 | FromDiscord_ | <Kaynato> wrt. the config file issue, I can put that aside for now, but I want to ask if there's a way to overwrite a switch or otherwise omit an option, specifically `-mno-ms-bitfields` |
06:01:28 | * | njoseph joined #nim |
06:08:39 | FromDiscord_ | <Kaynato> no way to overwrite `gcc.cpp.options.always`? |
06:10:05 | * | narimiran joined #nim |
06:12:14 | Zevv | sealmove: isn't TRegister just the range of a register value? |
06:13:30 | FromDiscord_ | <demotomohiro> `gcc.cpp.options.always = "..."` in cfg does'nt work? |
06:13:46 | FromDiscord_ | <Kaynato> It keeps the old config, which includes `-mno-ms-bitfields` |
06:14:00 | FromDiscord_ | <Kaynato> The new assignment only appends to the preexisting value |
06:15:21 | sealmove | Zevv: I see `if c.maxSlots+n >= high(TRegister): globalError(cc.config, cc.bestEffort, "VM problem: too many registers required")` |
06:16:16 | sealmove | It's the register index, not the value |
06:16:37 | Zevv | ah ok. Well, if that solves your problem, great! |
06:17:11 | sealmove | just increasing the number doesn't solve the problem |
06:17:31 | sealmove | the algorithm assumes a small number, so VM freezes if you tweak it |
06:19:41 | * | njoseph quit (Ping timeout: 265 seconds) |
06:21:24 | FromDiscord_ | <Kaynato> @demotomohiro Does doing that in cfg work for you (overwrites existing string) |
06:31:04 | FromDiscord_ | <demotomohiro> I wrote `gcc.options.always = "-DAAA"` in nim.cfg in the same directory of test.nim. |
06:31:04 | FromDiscord_ | <demotomohiro> Then `-w -mno-ms-bitfields` was replace with `-DAAA` |
06:31:30 | sealmove | every proc can use up to 256 registers |
06:32:10 | sealmove | the error I get is: |
06:32:20 | sealmove | npeg-0.21.1/npeg/codegen.nim(133, 15) Error: VM problem: too many registers required |
06:33:16 | sealmove | So there might be some issue with this code: |
06:33:18 | sealmove | let match = proc(ms: var MatchState, s: Subject, userDataId: var userDataType): MatchResult = |
06:33:20 | sealmove | # Create local instances of performance-critical MatchState vars, this saves a |
06:33:22 | sealmove | # dereference on each access |
06:33:24 | sealmove | var |
06:33:26 | sealmove | ip {.inject.}: range[0..count] = ms.ip |
06:33:28 | sealmove | si {.inject.} = ms.si |
06:33:30 | sealmove | simax {.inject.} = ms.simax |
06:33:32 | sealmove | # Debug trace. Slow and expensive |
06:34:10 | FromDiscord_ | <Kaynato> in nim.cfg: `gcc.options.always = " -DAAA"` |
06:34:29 | FromDiscord_ | <Kaynato> through --listcmd: `nvcc.exe -c -w -mno-ms-bitfields -DAAA ` |
06:35:51 | FromDiscord_ | <Kaynato> I wonder why it's appending. If I have another assignment in the same cfg it does override. But the default nim.cfg cannot be overridden. |
06:48:30 | Zevv | sealmove: so,does increasing that value fix your issue? I guess we need to increase regA size as well then to make that fit |
06:48:41 | Zevv | and probably b and c as well |
06:49:06 | sealmove | already tried it :( |
06:49:55 | Zevv | ah :) |
06:50:04 | FromDiscord_ | <demotomohiro> `gcc.options.always = "-DAAA"` override option when I do `nim c test.nim`, but it was append when I do `nim cpp test.nim`. |
06:51:27 | FromDiscord_ | <Kaynato> Interesting. I'm guessing it's not supposed to do that |
06:51:52 | FromDiscord_ | <demotomohiro> Setting both `gcc.options.always = "-DAAA"` and `gcc.cpp.options.always = "-DAAA"` in nim.cfg override `-w -mno-ms-bitfields`. |
06:51:53 | FromDiscord_ | <demotomohiro> But Nim hangs. |
06:52:33 | FromDiscord_ | <Kaynato> Hanging not due to the invalid flag? Is it possible there is a resolution issue? |
06:52:57 | FromDiscord_ | <demotomohiro> It seems in `cpp` command, `gcc.options.always` and `gcc.cpp.options.always` are merged. |
06:54:45 | * | endragor quit (Ping timeout: 246 seconds) |
06:55:43 | FromDiscord_ | <demotomohiro> I think it hangs because g++ output large message. |
06:55:44 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/issues/8648 |
06:55:46 | disbot | β₯ Nim compiler hangs for certain C/C++ compiler errors; snippet at 12https://play.nim-lang.org/#ix=22SM π |
06:55:51 | FromDiscord_ | <Kaynato> I've got to go to bed now, it is quite late (almost 2 AM) but thank you for the help. Trying to manually compile the files has actually thrown its own share of errors (only on some of the nim stdlib, frustratingly enough), because nvcc and cl don't like `N_LIB_PRIVATE N_NOINLINE(void, raiseEIO__ZYk14k3sVNZUIjJjtqzFZQ)(NimStringDesc* msg) __attribute__((noreturn));` |
06:56:17 | FromDiscord_ | <Kaynato> Oh wait. Is that what I think it is |
06:57:29 | FromDiscord_ | <Kaynato> ...apparently not |
06:58:19 | FromDiscord_ | <Kaynato> Yep, the output large message hang is forever a bane to speedy diagnosis here π |
07:00:20 | FromDiscord_ | <demotomohiro> I can see outputs from g++ when I terminate cc1plus.exe |
07:00:56 | FromDiscord_ | <Kaynato> Thank you tremendously for the help, hopefully tomorrow (today) I'll be able to make more progress on this |
07:01:36 | FromDiscord_ | <demotomohiro> It seems when I override default gcc.options.always, g++ output large amount of warnings but there is no errors. |
07:01:36 | FromDiscord_ | <Kaynato> if you get a chance, I'm trying to compile https://forum.nim-lang.org/t/3171#20029 on windows |
07:01:43 | FromDiscord_ | <Kaynato> oh, that would be `-w` |
07:01:50 | FromDiscord_ | <Kaynato> oh, that would be `-w` for `no warnings` |
07:04:14 | * | uu91 quit (Ping timeout: 276 seconds) |
07:04:33 | * | Jjp137 quit (Read error: Connection reset by peer) |
07:04:35 | * | uu91 joined #nim |
07:09:31 | * | Jjp137 joined #nim |
07:17:32 | * | endragor joined #nim |
07:20:28 | * | solitudesf joined #nim |
07:22:45 | * | njoseph joined #nim |
07:26:19 | * | PMunch joined #nim |
07:27:02 | * | LargeEpsilon joined #nim |
07:30:08 | * | JustASlacker joined #nim |
07:39:03 | * | JustASlacker quit (Ping timeout: 245 seconds) |
07:48:02 | * | ftsf joined #nim |
07:53:18 | * | ftsf quit (Quit: Leaving) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:50 | * | gmpreussner joined #nim |
08:06:32 | * | solitudesf- joined #nim |
08:09:16 | * | solitudesf quit (Ping timeout: 268 seconds) |
08:11:28 | * | NimBot joined #nim |
08:21:17 | PMunch | Hmm, I consider pitching a talk on running Nim everywhere |
08:21:42 | PMunch | Like how it's possible to run it on everything from microcontrollers, as a DLL, or even as JavaScript on a web-site |
08:26:39 | Zevv | and where will you be holding this talk? At fosdem, for which the talk registration just closed yesterday? :) |
08:27:15 | Zevv | how is nim treating you on the atmel? Have things improved enough to make this usable? |
08:28:35 | narimiran | i've never seen a conference which doesn't introduce new deadline after the original one passed. (at least in academia) |
08:29:06 | narimiran | i'd say that 90% of people are counting on that second deadline |
08:30:10 | Zevv | I never learned to do talks properly. Sometimes feel sorry about that, but not too much. |
08:39:50 | * | floppydh joined #nim |
08:43:32 | PMunch | Zevv, deadline for our room is today :) |
08:43:53 | Zevv | oh right :) |
08:44:30 | PMunch | And I've just been running it on the Arduboy emulator, the Arduboy is essentially just an Arduino Leonardo with a screen and some buttons |
08:44:33 | PMunch | And battery and such |
08:45:05 | PMunch | It works pretty well as far as I can tell, but I'm porting a larger example now to see if everything is working as it should :) |
08:46:23 | Zevv | was the constants-copy-to-C-varaibale already solved? |
08:50:52 | Zevv | using --gc:arc? |
08:51:01 | narimiran | Zevv: what to do with https://github.com/nim-lang/Nim/pull/12712 ? it breaks npeg |
08:51:02 | disbot | β₯ introduce capture macro; snippet at 12https://play.nim-lang.org/#ix=22Eq π |
08:51:27 | Zevv | narimiran: so sweet if you to complain about Nim PRs when they break NPeg :) |
08:52:16 | Zevv | I do like `capture` over `closureScope` tho |
08:53:28 | Zevv | I would even like more to Nim always capture everything implicitly, but I expect there are Reasons No To Do that |
09:00:55 | narimiran | Zevv: can you tell why npeg is failing? can/would you modify it? |
09:03:14 | * | JustASlacker joined #nim |
09:10:15 | * | Hideki_ joined #nim |
09:11:19 | * | lritter joined #nim |
09:12:51 | Zevv | i dont know and didn't try yet |
09:14:17 | * | Hideki_ quit (Ping timeout: 240 seconds) |
09:33:13 | * | clyybber joined #nim |
09:39:03 | Zevv | lets see then, yet another remote in my nim repo would not hurt I guess |
09:42:13 | Zevv | hm you got a sec narimiran? |
09:43:47 | Zevv | I have a macro that converts `$1` to `capture[1].s` - this fails because the `capture` referenced is not my capture but the new introduced macro. However, if I type `capture[1].s` directly instead of `$1`, it works fine. |
09:43:53 | Zevv | So it binds to the wrong thing |
09:44:33 | narimiran | yeah, i have more than a sec, but i might not be the right man for those kinds of questions.... |
09:45:21 | Zevv | who should I ping for this kind of things? |
09:46:04 | * | JustASlacker quit (Ping timeout: 265 seconds) |
09:46:07 | clyybber | use bindSym? |
09:46:59 | narimiran | Zevv: maybe krux02 when he comes online |
09:47:48 | Zevv | clybber: it's this thingy: https://github.com/zevv/npeg/blob/master/src/npeg/codegen.nim#L45 |
09:49:44 | Zevv | the problem is probably that it now binds early because it can now find a symbol with that name |
09:50:39 | clyybber | ah yeah |
09:51:05 | clyybber | maybe that could work: https://nim-lang.github.io/Nim/macros.html#BindSymRule |
09:51:51 | clyybber | setting it to forceOpen? |
09:52:22 | Zevv | hm I have no clue how to use that, I'll dig for some examples |
09:52:30 | clyybber | Zevv: Wait |
09:52:42 | clyybber | The issue is just due to the quote do |
09:52:44 | clyybber | right? |
09:53:48 | Zevv | Well, not "just". The issue is that the macro transforms the `code` NimNode, but seems to be tirgger happy to bind. So when this `code` is later used in the `quote do` it assumes its already bound to the wrong thing. |
09:53:58 | Zevv | but it's not caused by the quote-do per se |
09:54:23 | Zevv | the `capture` it should use does not exist at the time of rewriting the dollar-expression |
09:54:35 | Zevv | that only lives in the quote do scope |
09:55:20 | clyybber | and instead it uses this one: https://github.com/zevv/npeg/blob/master/src/npeg/codegen.nim#L5 ? |
09:55:46 | Zevv | right. So it's not a problem of that commit, it's a problem of NPeg with the way it uses this rewriting. Anything else in scope with the same name will break as sweet. |
09:56:30 | Zevv | So I guess I need to tell this rewriter somehow not to resolve the symbol at that time |
09:57:32 | Zevv | It feels like "A symbol can be forced to be open by a mixin declaration" |
09:57:39 | Zevv | but "mixin statements only make sense in templates and generics" |
10:01:37 | * | abm quit (Ping timeout: 240 seconds) |
10:01:42 | * | a_b_m joined #nim |
10:02:06 | * | a_b_m quit (Client Quit) |
10:07:40 | * | letto quit (Quit: Konversation terminated!) |
10:09:11 | * | letto joined #nim |
10:09:55 | * | sentreen_ quit (Ping timeout: 250 seconds) |
10:10:26 | * | letto quit (Client Quit) |
10:11:09 | * | sentreen_ joined #nim |
10:11:51 | * | letto joined #nim |
10:14:19 | clyybber | Araq: paramTypesMatch/paramTypesMatchAux isn't supposed to mutate its parameters right? |
10:14:29 | clyybber | Because it does. In a very bad way. |
10:14:54 | clyybber | causing #12713 |
10:14:55 | disbot | https://github.com/nim-lang/Nim/issues/12713 -- 3A few bugs related to static parameters; snippet at 12https://play.nim-lang.org/#ix=22E4 π |
10:15:06 | * | clyybber pats disbot |
10:15:28 | Araq | clyybber, yeah well |
10:15:43 | Araq | nothing surprising here, I know the bug |
10:15:49 | Araq | tried to fix it but it's hard |
10:16:12 | clyybber | In your static fixes branch? |
10:16:40 | Araq | what branch? dunno |
10:16:59 | clyybber | This commit: https://github.com/nim-lang/Nim/commit/0922f4a512035c3f6b9eb298d05ab9bd6c84d505#diff-cb1ae2f19ab4f17b110ff3805148bb5bL1238 |
10:17:04 | clyybber | removes the offending else branch |
10:21:51 | Araq | yeah well, that's 4 years old |
10:22:37 | * | tklohna joined #nim |
10:23:01 | clyybber | wouldn't it be enough to simply deepcopy paramTypesMatch's args? |
10:23:12 | clyybber | Araq: Regardless of efficiency, would it solve the issue? |
10:23:21 | Araq | no. |
10:23:34 | clyybber | So they are supposed to mutate their params? |
10:23:36 | Araq | other parts now rely on the mutation |
10:23:40 | clyybber | Ah |
10:23:59 | Araq | in particular, we resolve tyTyped/tyUntyped in this way |
10:24:28 | Araq | the good news is that nothing of this would pass today's review or development process |
10:24:40 | clyybber | :) |
10:25:13 | clyybber | Araq: I may try doing your static fix from 5 years back again. WDYT? |
10:25:29 | Araq | give it a try but don't get depressed |
10:25:44 | Araq | so ... I wrote a cycle collector based on Lins's work from 2008 |
10:27:24 | clyybber | Araq: And? How does it fare? |
10:27:44 | FromDiscord_ | <demotomohiro> @Araq How did you find out this mistake (len(s) in comment was changed to s.len) from this large PR? |
10:27:44 | FromDiscord_ | <demotomohiro> https://github.com/nim-lang/Nim/pull/12718 |
10:27:46 | disbot | β₯ Cosmetic compiler cleanup |
10:30:03 | * | solitudesf- quit (Ping timeout: 265 seconds) |
10:32:23 | * | JustASlacker joined #nim |
10:34:45 | FromDiscord_ | <demotomohiro> Just reading all diff of this PR to find mistake would take very long time. |
10:36:42 | FromDiscord_ | <Rika> maybe grep? |
10:37:24 | FromGitter | <gogolxdong> How to instantiate `proc newAEAD*[T](HashType: typedesc, connectionId: string, pers: int = PerspectiveClient, myhp: var string): AeadAESGCM[T] =` β with T could be aes256, typedesc could be sha256? |
10:37:28 | FromGitter | <alehander92> i guess he might have guessed it can happen in comments |
10:37:39 | Araq | I simply read the diff |
10:37:43 | stefantalpalaru | Why is "csize" (size_t) defined as an "int" here: https://github.com/nim-lang/Nim/blob/97e0ce3c75c9348226ea1fcdfc601c6fbe5c0e75/lib/system.nim#L2255 |
10:38:01 | Araq | stefantalpalaru, legacy, fixed on devel |
10:38:16 | stefantalpalaru | OK |
10:38:29 | * | Vladar joined #nim |
10:42:46 | Zevv | Araq: can I bother you a sec? I have a proc for rewriting NimNodes that rewrites to an identifier that does not yet exist at that point - works ok. Now due to circumstances the differnt symbol with the same name is defined before that proc, which seems to cause an early bind to the wrong thing. |
10:43:10 | Zevv | So how can I avoid that proc to be bound/resolved too early? Does that question make sense? |
10:43:42 | * | ng0 joined #nim |
10:50:17 | FromDiscord_ | <demotomohiro> @Araq I thought you used some tools. That sound like you have a great skill to read large diff. |
10:51:01 | Araq | Zevv, can't you ensure a unique name instead? |
10:51:54 | * | Hideki_ joined #nim |
10:53:07 | Zevv | Well, something else anywhere can come up with the same name - which is what now happened |
10:53:37 | Zevv | What I basically want is where the rewritten NimNode is *used*, normal scoping rules apply and the innermost thing with that name is used |
10:55:25 | * | clyybber quit (Read error: Connection reset by peer) |
10:55:31 | * | clyybber1 joined #nim |
11:02:18 | * | clyybber1 is now known as clyybber |
11:04:21 | Araq | are you looking for gensym? |
11:05:18 | Zevv | maybe, let me check |
11:06:11 | * | Hideki_ quit (Remote host closed the connection) |
11:07:02 | Zevv | nah, also not. More details: In my code block I can use `capture[1].s`, which works ok even if there is another `capture` defined somewhere else. I provide this simple rewrite so the user can write `$1` instead. The proc rewirtes `$1` to `capture[1].s`, so it generates the exact same AST according to repr - but the one works and the other doesn't |
11:07:28 | Zevv | I can not generate a random unique id since `capture[]` should still be avaiable as well |
11:08:19 | Araq | I think it's fine to not do anything about it |
11:08:42 | Araq | npeg users know about 'capture' in the scope and must not use the name themselves |
11:11:30 | Araq | clyybber, too early for performance measurements |
11:13:06 | Zevv | Araq: right, but the name is now introduced by a Nim PR: https://github.com/nim-lang/Nim/pull/12712 |
11:13:08 | disbot | β₯ introduce capture macro; snippet at 12https://play.nim-lang.org/#ix=22Eq π |
11:13:10 | Zevv | and npeg goes *boom* |
11:13:26 | Araq | ouch |
11:15:50 | * | solitudesf joined #nim |
11:16:07 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
11:18:33 | * | LargeEpsilon joined #nim |
11:27:46 | Zevv | so, any ideas more then welcome :) |
11:31:46 | * | krux02 joined #nim |
11:33:14 | * | rockcavera joined #nim |
11:36:50 | * | letto quit (Quit: Konversation terminated!) |
11:38:16 | * | Hideki_ joined #nim |
11:38:21 | * | letto joined #nim |
11:38:57 | * | sagax quit (Ping timeout: 240 seconds) |
11:40:17 | * | Jjp137 quit (Ping timeout: 240 seconds) |
11:41:56 | Zevv | hm ok, solved. `quote do` did nog generate the AST I expected, it had an unintend nnkOpenSymChoice() in there |
11:42:44 | * | Jjp137 joined #nim |
11:52:32 | clyybber | Araq: Since procvar is on by default now, should I remove occurences of it in the compiler code? |
11:54:15 | Araq | dunno, it might still be useful for preventing map(x, system.`+`) |
11:54:46 | Zevv | narimiran: fixed in NPeg |
11:54:49 | Zevv | fwiw |
11:55:28 | clyybber | Araq: Ah, I meant literal `{.procvar.}` pragmas on the procs used in the compiler |
11:55:46 | clyybber | For the cleanup PR |
11:56:31 | * | Hideki_ quit (Ping timeout: 250 seconds) |
12:01:01 | Araq | ok |
12:02:29 | clyybber | Zevv: So it *was* the quoted do, huh? |
12:04:21 | Zevv | yeah, sorry for not listening to you |
12:04:34 | Zevv | I looked at 'repr' but that hid the nitty gritty details what astGenRepr showed |
12:05:33 | clyybber | hehe |
12:07:32 | * | endragor quit (Remote host closed the connection) |
12:35:45 | * | nif quit (Quit: ...) |
12:35:55 | * | nif joined #nim |
12:40:12 | PMunch | Hmm, what is the proper way to call NimMain when --noMain is defined? |
12:40:50 | PMunch | Currently I just have "proc NimMain() {.importc.}" at the top of my file and then call it when my code is first run, but is there a better way of doing this? |
12:45:21 | * | sagax joined #nim |
12:48:56 | * | leorize quit (Ping timeout: 260 seconds) |
12:51:04 | * | leorize joined #nim |
13:01:11 | * | Hideki_ joined #nim |
13:13:21 | FromDiscord_ | <Delta231> is nim forum made with nim? |
13:13:40 | FromGitter | <alehander92> yes |
13:13:56 | FromDiscord_ | <Delta231> how much time did it take to make it |
13:18:54 | Araq | I think a month |
13:21:09 | * | Hideki_ quit (Ping timeout: 265 seconds) |
13:24:10 | * | nif quit (Quit: ...) |
13:24:50 | * | nif joined #nim |
13:44:36 | rockcavera | I have code that compiled with "nim c -d:danger -d:release umain2" takes 13s to execute, but memory usage reaches 246MB. Compiling with "nim c -d:danger -d:release --gc:boehm umain2" the memory usage is no more than 2.2MB, but it takes 109s to execute. I tested with the boehm GC because I suspected that Nim's GC was leaking memory. I am using devel version 2019-11-25. |
13:45:28 | dom96 | Araq Delta231: the new redesigned forum took almost exactly 2 weeks. |
13:45:32 | rockcavera | I believe the memory leak is in the recursion association with seqs. |
13:47:03 | * | lbartoletti joined #nim |
13:47:18 | clyybber | rockcavera: Maybe its just the CG being lazy? |
13:47:53 | * | lbart quit (Ping timeout: 276 seconds) |
13:48:04 | rockcavera | can be, clyybber |
13:49:12 | * | Hideki_ joined #nim |
13:59:25 | rockcavera | clyybber That's right, because using GC_fullCollect() there's no memory lift |
14:09:43 | * | krux02_ joined #nim |
14:11:43 | * | krux02 quit (Ping timeout: 250 seconds) |
14:14:03 | * | nif quit (Quit: ...) |
14:14:13 | * | nif joined #nim |
14:19:27 | dom96 | Anyone else want to submit a Nim-related talk for our co-opted FOSDEM devroom? Deadline is today https://forum.nim-lang.org/t/5577 |
14:19:44 | dom96 | @mratsim: can you ping the other Status people about this? ^ |
14:19:56 | PMunch | :D |
14:20:36 | dom96 | (talks on other emerging languages are fine too) |
14:20:40 | PMunch | Hmm, I have a weird thing happening when compiling for this arduino based board. When I enable -d:release the binary becomes almost twice the size |
14:21:03 | dom96 | btw perfect length for these talks is 15 minutes (+5 for questions) |
14:21:40 | FromDiscord_ | <treeform> How many talks do we have? |
14:22:27 | PMunch | 6 submitted Nim talks so far. But 3 are by dom and 2 are by mratsim I think, so I think they would prefer to not hold all the talks :P |
14:23:19 | zedeus | isn't it only one per person? seemed that way from the forum posts |
14:24:49 | Zevv | one is by dom, one is by dom with a fake moustache. one is by dome with a green wig. one by mratsim and one by mratsim with doms fake moustache |
14:24:59 | zedeus | lol |
14:25:14 | zedeus | wouldn't mind that, all the talks sound interesting |
14:26:11 | PMunch | Haha, now I just imagine someone walking off the podium, the room organiser coming on and presenting the next talker, and the same guy coming up with a huge fake mustache :P |
14:26:56 | dom96 | now, that is an idea :D |
14:29:32 | PMunch | Nice, threw on some of the flags that the Arduino compiler users and my Nim-reimplementation is now 48K vs the 42K of the normal version |
14:31:16 | FromGitter | <Willyboar> @alehander92 How are you? |
14:32:58 | floppydh | anyone got nim7z running? - seems they changed how nimble works and now it does pretty much nothing on install :( |
14:33:48 | dom96 | regression in Nimble? |
14:33:59 | dom96 | please report it if you haven't already |
14:34:36 | floppydh | sure thing |
14:34:48 | floppydh | to be fair the lib hasn't been updated in a year |
14:39:01 | * | njoseph quit (Ping timeout: 250 seconds) |
14:43:11 | floppydh | I'll report it right away, but in short: there's some logic in the nimble 'setup'-task that checks out the 7z repo I think and then uses 'c2nim' to generate wrapper-code, which all seems to work fine if on 'nimble install nim7z' |
14:43:51 | floppydh | but then if I check the ~/.nimble/pkgs/nim7z... directory the directory in which the wrapper and 7z c code should be checked out is empty |
14:44:41 | * | endragor joined #nim |
14:45:59 | FromGitter | <Willyboar> @disruptek a nice feature will be disbot to post every time an issue or PR opened, closed, merged etc. I don't know if it is supported from github API but I have seen it in some gitter channels in the activity section. |
14:46:26 | * | njoseph joined #nim |
14:48:50 | * | endragor quit (Remote host closed the connection) |
14:50:35 | * | endragor joined #nim |
14:51:37 | rockcavera | I solved my problem without having to manually work with the GC. I began to set the initial size of the seqs to 0. There was no loss of speed and no more absurd memory allocations occurred. |
14:51:40 | rockcavera | xD |
14:53:54 | * | ng0_ joined #nim |
14:54:54 | floppydh | dom96: https://github.com/genotrance/nim7z/issues/1 |
14:56:20 | * | ng0 quit (Ping timeout: 260 seconds) |
14:56:55 | * | Hideki_ quit (Remote host closed the connection) |
14:57:05 | * | ng0_ is now known as ng0 |
14:57:41 | * | Hideki_ joined #nim |
14:59:57 | PMunch | Hmm, when I strip this binary it just randomly freezes on me.. |
15:02:42 | disruptek | Willyboar: yeah, we talked about doing that in a #nim-news channel. |
15:04:54 | Araq | rockcavera, sounds weird |
15:05:21 | FromGitter | <Willyboar> Great |
15:07:08 | * | PMunch quit (Quit: Leaving) |
15:08:55 | clyybber | Araq: For the future, do we want implicit statics or static evaluation on demand? |
15:09:42 | * | endragor quit (Remote host closed the connection) |
15:10:17 | * | fox_0x00 joined #nim |
15:13:28 | * | kcvinu joined #nim |
15:13:41 | kcvinu | Hi |
15:14:11 | kcvinu | Does "Times.fractional" deprecated ? |
15:17:29 | clyybber | seems like it |
15:17:31 | * | dddddd joined #nim |
15:17:44 | kcvinu | Then whats the alternatives ? |
15:19:42 | rockcavera | Araq, What sounds weird? |
15:20:15 | clyybber | Is there a callgraph visualizer for nim? |
15:26:21 | * | seni joined #nim |
15:29:48 | * | JustASlacker quit (Remote host closed the connection) |
15:30:40 | * | Hideki_ quit (Remote host closed the connection) |
15:31:39 | * | Hideki_ joined #nim |
15:36:05 | * | Hideki_ quit (Ping timeout: 252 seconds) |
15:36:19 | * | kcvinu quit (Ping timeout: 260 seconds) |
15:36:57 | * | tklohna quit (Ping timeout: 246 seconds) |
15:37:36 | sealmove | Araq: new problem with the VM, now it complains about using too many registers :D should I give up and stop stressing it too much? or this trivial to solve? |
15:41:34 | * | norm joined #nim |
15:41:45 | Zevv | sealmove: I'll take a look after diner if it is related to the VM stuff we've been doing at all |
15:41:57 | * | norm is now known as Guest46073 |
15:42:41 | sealmove | Thanks (of course it's related) |
15:43:33 | * | Vladar quit (Quit: Leaving) |
15:45:09 | Araq | clyybber, the spec says that f(a, b) is evaluated iff 'f' is noSideEffect and 'a' and 'b' are known |
15:45:13 | Araq | and it's a good rule |
15:45:27 | Araq | other evaluations must be triggered by a 'static' block |
15:45:37 | Araq | but then this cannot be used in overload resolution |
15:45:48 | Araq | I mean |
15:45:56 | Araq | you can disambiguate in OR |
15:46:08 | Araq | but you cannot trigger static evaluating during OR |
15:46:43 | Araq | seems like a good set of rules avoiding the current set of problems (but maybe it has different problems) |
15:46:55 | Araq | sealmove, are you on Nim devel? |
15:47:05 | sealmove | Araq: sure |
15:52:06 | Araq | ok cause on devel the VM generator actually reuses registers :P |
15:58:40 | sealmove | if c.maxSlots >= high(TRegister): |
15:58:41 | sealmove | for i in start .. c.maxSlots-1: |
15:58:43 | sealmove | if not c.slots[i].inUse: |
15:58:45 | sealmove | c.slots[i] = (inUse: true, kind: k) |
15:58:47 | sealmove | return TRegister(i) |
16:00:15 | sealmove | seems all slots are inUse :S |
16:01:44 | shashlick | floppydh: ya you will need to run nimble setup before running nimble install |
16:01:58 | shashlick | Else nimble doesn't install the generated files |
16:02:30 | floppydh | shashlick: that is not the issue tho |
16:02:41 | floppydh | methinks |
16:02:50 | floppydh | oh |
16:03:11 | shashlick | https://github.com/nim-lang/nimble/issues/549 |
16:03:50 | shashlick | Nimble creates the list of files to install before running the before install hook |
16:04:09 | floppydh | yeah |
16:04:10 | shashlick | So the generated files never get copied over |
16:04:12 | floppydh | exactly |
16:04:20 | floppydh | the setup task is executed, as I can see that in the output |
16:04:25 | floppydh | it seems it's just not taken along with the rest |
16:04:54 | floppydh | this is not the only repository |
16:04:56 | floppydh | where this is an issue |
16:05:39 | floppydh | can't remember the other one, have to look it up once I'm home |
16:05:47 | floppydh | oh right |
16:05:57 | shashlick | Yes almost all nimgen projects are broken because of this |
16:06:24 | floppydh | this also didn't work through nimble, but unsure if this due to `.gitmodules` https://github.com/OpenSystemsLab/xxhash.nim |
16:06:50 | floppydh | unsure if nimble cares for git submodules |
16:07:06 | floppydh | shashlick:what's the fix for the not-copying-over thing? |
16:07:14 | floppydh | oh I see it's open |
16:07:19 | floppydh | still, the issue |
16:07:23 | shashlick | There's no fix yet |
16:07:50 | floppydh | there's apparently simple workarounds in the commentsΓ |
16:07:52 | floppydh | ? |
16:08:21 | floppydh | oh wait |
16:09:26 | shashlick | I've tried all sorts of tricks, most don't work |
16:09:40 | floppydh | oh |
16:09:50 | floppydh | you can just not use `nimble install X` |
16:09:59 | floppydh | and install in the cloned dir via `nimble install -y` |
16:10:13 | floppydh | guess I'll go with that |
16:11:26 | * | Hideki_ joined #nim |
16:11:32 | shashlick | Cool |
16:13:49 | * | kcvinu joined #nim |
16:14:29 | kcvinu | Whats the alternative for fractional ? |
16:14:36 | disruptek | total. |
16:15:07 | kcvinu | i mean times.fractional |
16:17:35 | Zevv | sealmove: can you get me a simple reproducable thing for the registers? |
16:21:26 | * | floppydh quit (Quit: WeeChat 2.6) |
16:24:59 | * | Guest46073 quit (Quit: Leaving) |
16:25:11 | * | LargeEpsilon quit (Ping timeout: 276 seconds) |
16:32:26 | * | kcvinu quit (Remote host closed the connection) |
16:34:00 | * | Hideki_ quit (Ping timeout: 265 seconds) |
16:39:57 | * | njoseph quit (Ping timeout: 240 seconds) |
16:46:03 | sealmove | Zevv: I'll try later |
16:52:57 | * | LargeEpsilon joined #nim |
17:12:27 | * | njoseph joined #nim |
17:15:44 | clyybber | Araq: Sigmatch really deserves a refactoring :D |
17:21:09 | clyybber | Or maybe I'm just too dumb to grok it |
17:21:55 | * | nif quit (Quit: ...) |
17:22:06 | * | nif joined #nim |
17:34:11 | sealmove | Zevv I think the problem is injecting too many variables, trying to reproduce now |
17:34:22 | Zevv | I just created a macro that creates a 1000 ints without problems |
17:34:44 | Zevv | 10_000 even |
17:35:07 | Zevv | so first we should try to understand how register allocation even works |
17:35:17 | * | sagax quit (Ping timeout: 240 seconds) |
17:37:19 | * | njoseph quit (Ping timeout: 265 seconds) |
17:42:53 | Zevv | ah got it |
17:42:56 | Zevv | need to put it in a proc |
17:43:32 | Zevv | -> http://ix.io/22Vg |
17:44:41 | Zevv | well, that works |
17:44:58 | rockcavera | When I pass --cc:clang to the nim compiler, can I know from my code which cc is being used? |
17:47:25 | sealmove | yup |
17:48:00 | Zevv | sealmove: I think I got it fixed. |
17:48:03 | sealmove | so is it possible to tweak npeg (the match proc) so that it doesn't inject more than 255 symbols? |
17:48:05 | Zevv | change regA B and 16 to 16 bits |
17:48:12 | Zevv | and TRegister* = range[0..regAMask] |
17:48:40 | Zevv | fixed at the Nim VM |
17:48:51 | Zevv | it just fits in where we updated stuff yesterday |
17:49:02 | rockcavera | ow, I found it already |
17:49:03 | Zevv | now there are 65536 regisrers |
17:49:05 | FromGitter | <alehander92> @Willyboar |
17:49:08 | FromGitter | <alehander92> good |
17:49:13 | FromGitter | <alehander92> thank you how are you |
17:50:22 | * | LargeEpsilon quit (Ping timeout: 265 seconds) |
17:50:49 | clyybber | Zevv, sealmove: Did this register issue only pop up because of the 64bit rework or because the 64bit rework allows so large procs that its reached? |
17:51:05 | Zevv | second |
17:51:14 | clyybber | nice |
17:51:21 | sealmove | I think it was a problem before the rework |
17:51:21 | Zevv | Araq recently added some stuff to reuse registers, then we hit the relative max jump distance |
17:51:24 | * | fox_0x00 quit (Quit: leaving) |
17:51:33 | Zevv | with that fixed we now hit register usage again |
17:51:47 | Zevv | But all I had to do is increased regA,B,C to 16 bits and it Just Works |
17:52:11 | clyybber | NICE |
17:52:16 | Zevv | running vm/ tests now |
17:52:16 | sealmove | this is like karate-kid pressure for the VM lol |
17:52:53 | Zevv | its a bit of a waterbed when things are limited. You push here and it pops up there |
17:53:02 | Zevv | "65536 registers should be enough for everyone" |
17:53:21 | Zevv | vm tests passed, will check it in on the same branch |
17:53:53 | Zevv | So, all we now need to do is adding 3142 casts/conversions to make sure it works out on 32bits |
17:54:06 | sealmove | does TDest need to change too? |
17:54:36 | Zevv | No clue, what is it? |
17:54:54 | sealmove | seems to be used alongside TRegister |
17:55:42 | Zevv | hmm will update that as well |
17:55:50 | Zevv | just give it a spin if you have time for it |
17:55:55 | sealmove | not sure why it's a seperate type |
17:56:03 | clyybber | Zevv: what? |
17:56:05 | sealmove | yes I am running stuff |
17:56:07 | FromGitter | <Willyboar> Nice @alehander92 spending time with the kids, read about nim and search about frameworks |
17:56:13 | clyybber | why 3142 conversions? |
17:56:22 | Zevv | oh maybe 1692 or only 321 |
17:56:27 | clyybber | why? |
17:56:42 | Zevv | I started adding in a few and then I went down the rabbit hole of things not compiling |
17:56:49 | Zevv | so I stopped it because I got bored |
17:57:06 | clyybber | but why do you need conversions at all? |
17:57:31 | Zevv | stuff boils down to `int` by default, but the VM TInstr type is now bigger |
17:57:37 | Zevv | so lots of stuff does not compute on 32 bits |
17:57:45 | Zevv | unless things are made explicitly int64 |
17:58:01 | clyybber | but why does that leak out of the VM? |
17:58:26 | Zevv | it doesn't really, but yesterday I did a quick try to fix this, and then I had to change more and more and more |
17:58:37 | Zevv | it doesn't leak out the VM, true |
17:58:37 | clyybber | in which files? |
17:58:40 | Zevv | vm* |
17:58:49 | Zevv | not even. mostly vmdefs |
17:58:58 | Zevv | vmdef |
18:01:36 | * | leorize quit (Ping timeout: 260 seconds) |
18:02:11 | FromGitter | <alehander92> @Willyboar love it |
18:02:15 | FromGitter | <alehander92> take care |
18:02:21 | FromGitter | <alehander92> which frameworks did you read for |
18:04:09 | * | leorize joined #nim |
18:05:27 | FromGitter | <Willyboar> i think all of them |
18:06:05 | FromGitter | <Willyboar> i think the only one is close to let's say is close to rails/django/phoenix is xander |
18:12:33 | * | mike32 joined #nim |
18:12:47 | * | rockcavera quit (Remote host closed the connection) |
18:19:36 | * | lbartoletti is now known as lbart |
18:24:08 | * | mike32 quit (Remote host closed the connection) |
18:30:16 | FromGitter | <alehander92> yeah it looks nice |
18:30:52 | sealmove | Zevv did you do any tests? The compiler hangs when I change TRegister. Sorry for not being useful, no time today for investigation. |
18:33:14 | FromGitter | <Willyboar> I think he abandoned it |
18:34:00 | * | rockcavera joined #nim |
18:35:47 | Zevv | sealmove: Works For Me |
18:42:37 | lqdev[m] | is it possible to pass -O0 to cc from Nim? |
18:56:11 | sealmove | Zevv: I get: npeg-0.21.1/npeg/codegen.nim(141, 28) Error: interpretation requires too many iterations; |
18:56:19 | sealmove | vm must get stuck somewhere |
18:57:14 | sealmove | line is: `simax {.inject.} = ms.simax` |
18:57:20 | sealmove | so something to do with the injection |
19:04:45 | * | uu91 quit (Read error: Connection reset by peer) |
19:05:02 | * | uu91 joined #nim |
19:05:05 | * | uu91 quit (Read error: Connection reset by peer) |
19:05:49 | * | uu91 joined #nim |
19:15:29 | * | njoseph joined #nim |
19:17:32 | ehmry | my nim doc/nimble doc is producing empty HTML files, has anyone else seen this? |
19:18:06 | Araq | no |
19:18:43 | ehmry | its caused by using a wrapper script, which is entirely my fault |
19:37:51 | * | NimBot joined #nim |
19:46:50 | clyybber | Araq: Those rules sound good. We should add that all literals are static T, not sure how its done rn.. |
19:48:06 | * | ncharlie joined #nim |
19:48:37 | ncharlie | hey folks -- I'm trying to set up idetools with vim, but for some reason the latest build of nim doesn't seem to have the idetools subcommand anymore |
19:48:48 | ncharlie | did that get moved out into the standalone nimsuggest tool? |
19:49:56 | ncharlie | (I ask because there's still a docpage on idetools, which confused me) |
19:56:58 | Araq | clyybber, they should *match* a static T but not be a static T |
19:57:18 | Araq | because 'static T' is actually really only a parameter mode like 'sink' is |
19:57:40 | clyybber | hmm |
19:57:46 | Araq | well currently it's allowed elsewhere but think about it, what does 'myObjectField: static string' mean anyway... |
20:00:36 | * | nsf quit (Quit: WeeChat 2.6) |
20:03:59 | Zevv | sealmove: send me your parser then |
20:04:29 | clyybber | Araq: I guess its like a generic param of the type |
20:19:15 | clyybber | zah: WDYT about the rules Araq proposed here: https://irclogs.nim-lang.org/26-11-2019.html#15:45:09 |
20:24:51 | FromDiscord_ | <sealmove> Zevv it's in sealmove/nimitai/nimitai/private/ksypeg.nim |
20:24:54 | * | Ven`` joined #nim |
20:26:13 | FromDiscord_ | <sealmove> I've made some change locally, and not home atm to push them, but maybe this older version behaves the same. |
20:30:23 | * | ncharlie quit (Quit: leaving) |
20:31:02 | * | Hideki_ joined #nim |
20:32:31 | * | MnlPhlp joined #nim |
20:35:39 | * | Hideki_ quit (Ping timeout: 250 seconds) |
20:46:25 | * | LargeEpsilon joined #nim |
20:50:50 | * | LargeEpsilon quit (Ping timeout: 250 seconds) |
20:51:11 | * | NimBot joined #nim |
20:59:19 | sealmove | Zevv: ok I pushed changes, this is the parser: https://github.com/sealmove/nimitai/blob/master/nimitai/private/ksypeg.nim |
21:01:25 | Zevv | ok I pulled, how do I reproduce? |
21:01:33 | Zevv | nim c ksypeg.nim |
21:01:34 | Zevv | ? |
21:08:29 | * | narimiran quit (Quit: leaving) |
21:11:06 | FromDiscord_ | <Kaynato> Is the equivalent call of c++ std::vector<SomeClass> someVector (someDynamicSize) roughly going to be a custom seq with an UncheckedArray backing the data if the data is passed around often in the c++? |
21:11:26 | * | uu91 quit (Ping timeout: 265 seconds) |
21:11:46 | * | uu91 joined #nim |
21:11:52 | FromDiscord_ | <Kaynato> I am getting "invalid type: UncheckedArray[SomeObject]' in this context: 'someVector' for var" |
21:19:09 | * | rockcavera quit (Remote host closed the connection) |
21:19:26 | FromDiscord_ | <Kaynato> Nevermind, that's been solved |
21:24:37 | * | lritter quit (Ping timeout: 240 seconds) |
21:26:56 | * | MnlPhlp left #nim ("WeeChat 2.6") |
21:28:12 | * | nif quit (Quit: ...) |
21:28:21 | * | nif joined #nim |
21:33:08 | * | nif quit (Client Quit) |
21:33:18 | * | nif joined #nim |
21:36:33 | * | nif quit (Client Quit) |
21:36:43 | * | nif joined #nim |
21:50:47 | FromDiscord_ | <sealmove> Zevv, import nimitai and call generateParser(), then nim c -r |
21:54:37 | FromDiscord_ | <sealmove> I dont know if simply compiling ksypeg.nim triggers it |
21:56:09 | * | NimBot joined #nim |
22:11:05 | Zevv | do you have something I can parse? |
22:14:00 | Zevv | Ok, I found an example. This works, don't get VM outages anymore |
22:14:05 | * | norm joined #nim |
22:14:05 | Zevv | back to the 'too many iterations' |
22:14:28 | * | norm is now known as Guest26634 |
22:16:36 | Zevv | set iterations to 100M, but this is unbearibly slow |
22:17:04 | * | Guest26634 quit (Client Quit) |
22:17:12 | Zevv | I guess your parser is not ok |
22:18:27 | Zevv | it stops consuming input after the first newline |
22:19:23 | Zevv | but I think that's a grammar issue |
22:19:33 | Zevv | the VM now runs fine, but bails out because the program takes too long |
22:27:17 | * | Jesin quit (Quit: Leaving) |
23:07:55 | FromDiscord_ | <Generic> is it a known issue that if you iterate over a large array (about 1/4mb) it gets copied completely onto the stack which ends up crashing the whole application? |
23:08:09 | FromDiscord_ | <Kaynato> If it's ok, I'd like to ask for a sanity check... for some x: seq[SomeObjType], is x[0].addr equivalent to data() from std::vector ? I haven't used either c++ before, and I am also new to nim. Sorry if this is a simplistic question. |
23:08:16 | FromDiscord_ | <Generic> yes |
23:08:20 | FromDiscord_ | <Kaynato> thanks! |
23:08:57 | FromDiscord_ | <Generic> if you're very very sure the data won't be modified there's unsafeAddr |
23:09:21 | FromDiscord_ | <Generic> it even works with non mutable objects |
23:09:24 | FromDiscord_ | <Generic> like parameters |
23:09:34 | FromDiscord_ | <Generic> or let variables |
23:09:39 | FromDiscord_ | <Kaynato> Ah, I have to pass the address in because it's a c++ function that presumably modifies the memory at that location |
23:10:13 | FromDiscord_ | <Kaynato> Not sure if it's the binding library's issue for being structured like that, or if it's an unavoidable consequence of interfacing with that sort of c++ |
23:10:27 | FromDiscord_ | <Kaynato> so I should use unsafeAddr for all of those scenarios? |
23:10:27 | FromDiscord_ | <Generic> then using addr is correct |
23:10:41 | FromDiscord_ | <Generic> unsafeAddr is useful when making C/C++ interfaces |
23:10:59 | FromDiscord_ | <Generic> and you are sure the library won't modify the data |
23:11:55 | FromDiscord_ | <Kaynato> Ah, ok. And for a function that returns an arbitrary unknown function, in the case where I need to be sure it will return a function of a specific type, I should use cast[desiredProcType](procReturningProc(...)), right? |
23:11:59 | FromDiscord_ | <Generic> otherwise you would have to create a new mutable object and copy all the there data |
23:12:42 | FromDiscord_ | <Generic> an arbitrary unknown function? |
23:12:48 | FromDiscord_ | <Generic> yes, I think so |
23:12:56 | FromDiscord_ | <Generic> though you're responsible here |
23:13:48 | FromDiscord_ | <Generic> if you mess up the function's probably going to be called anyway with nonsense parameters |
23:14:03 | FromDiscord_ | <Generic> but you probably know that yourself |
23:14:06 | FromDiscord_ | <Kaynato> Right, yep |
23:15:10 | FromDiscord_ | <Kaynato> This is for porting a small vulkan compute example into nim, since I've completely given up on CUDA + nim in windows. Hopefully it goes well, thank you for your help |
23:34:56 | clyybber | Kaynato: Which vulkan wrapper are you using? |
23:38:23 | FromDiscord_ | <Clyybber> @Kaynato Because in my wrapper (https://github.com/Clyybber/vulkanim) I have a macro called vk that will load vulkan functions |
23:39:38 | disruptek | it's been 4 months since i spoke to a horse. |
23:39:46 | disruptek | oops; wrong window. |
23:40:20 | clyybber | which end of the horse? |
23:40:46 | disruptek | well, i've spoken to numerous horse's asses during the last few months. |
23:42:37 | clyybber | ass or horse? |
23:43:40 | disruptek | ass to mouth. |
23:43:51 | clyybber | man of culture |
23:44:25 | * | abm joined #nim |
23:48:29 | * | solitudesf quit (Ping timeout: 276 seconds) |
23:50:27 | * | Jesin joined #nim |