00:23:40 | * | brainproxy quit (Quit: WeeChat 2.2) |
00:32:25 | * | brainproxy joined #nim |
00:46:09 | * | Jesin quit (Ping timeout: 252 seconds) |
00:58:15 | * | Jesin joined #nim |
00:58:19 | * | cstaeth joined #nim |
01:00:08 | * | zama quit (*.net *.split) |
01:00:08 | * | gsingh93 quit (*.net *.split) |
01:00:08 | * | jonafato quit (*.net *.split) |
01:00:08 | * | jsn- quit (*.net *.split) |
01:00:08 | * | acidx quit (*.net *.split) |
01:00:11 | * | jsn-_ joined #nim |
01:00:42 | * | acidx joined #nim |
01:00:47 | * | jonafato joined #nim |
01:00:58 | * | zama joined #nim |
01:02:06 | * | zama quit (Changing host) |
01:02:06 | * | zama joined #nim |
01:03:36 | * | gsingh93 joined #nim |
01:08:09 | * | cstaeth quit (Quit: WeeChat 2.1) |
01:08:36 | * | cstaeth joined #nim |
01:24:26 | AlexMax | shashlick: howdy, got a minute? |
01:39:27 | * | dddddd quit (Remote host closed the connection) |
01:57:08 | shashlick | hey |
01:59:22 | shashlick | just saw your issue - do you have the latest nimgen? |
02:00:15 | AlexMax | maybe? |
02:00:21 | AlexMax | I dunno, I just ran it |
02:00:31 | AlexMax | Let me try |
02:00:57 | AlexMax | How do I find out the version of nimgen? |
02:01:49 | AlexMax | shashlick: According to .nimble, I have nimgen-0.4.0 |
02:02:33 | shashlick | hmm, that should work |
02:02:42 | shashlick | can you post your generated nuklear.nim |
02:02:55 | shashlick | also what version of nim |
02:03:06 | AlexMax | 18.0 |
02:03:33 | AlexMax | I did find something...odd in my delving |
02:03:35 | AlexMax | https://github.com/genotrance/nimnuklear/issues/1 |
02:05:07 | FromGitter | <kaushalmodi> And the musl experiment comes to an awesome conclusion!! |
02:05:09 | FromGitter | <kaushalmodi> https://github.com/kaushalmodi/hello_musl/commit/8c3289382bc520409a4af832c6b631e66533081b |
02:05:24 | AlexMax | shashlick: here you go |
02:05:26 | AlexMax | https://paste.ee/p/IBG9F |
02:05:49 | FromGitter | <kaushalmodi> Check out the static binary that prints "Hello, World!" in all glory! :D https://github.com/kaushalmodi/hello_musl/releases |
02:05:59 | FromGitter | <kaushalmodi> (only for Linux 64-bit OSes) |
02:08:23 | shashlick | Brb |
02:12:08 | AlexMax | I'm reinstalling fresh |
02:14:44 | AlexMax | Yeah, I started from scratch, choosenim, and I'm getting the same error |
02:16:52 | shashlick | weird - plugin_filter was supposed to be moved down |
02:21:16 | shashlick | fixing, a sec |
02:24:34 | shashlick | AlexMax: pushed a fix, can you check please? |
02:25:27 | AlexMax | Operation successful on Linux, let me try on windows... |
02:26:09 | shashlick | basically, Nim doesn't support forward declarations of types so you have to move all the procs to the bottom and bring all type declarations into one type block |
02:26:19 | shashlick | doing that automatically is a pain |
02:26:46 | shashlick | another total pain with Nim is that enums have to be in order which is very hard if converted from C which can be in any order |
02:26:56 | AlexMax | damn |
02:27:06 | shashlick | have to move the declarations up and down, don't see why this limitation is there |
02:27:15 | shashlick | that's why those consts |
02:27:26 | AlexMax | I'm getting three warnings fwiw |
02:27:49 | shashlick | and last, A or B doesn't work for those enums either despite being sizeof(int32) so have to sit and fix that also |
02:27:52 | AlexMax | wait what? I'm only getting those warning on Windows |
02:28:00 | shashlick | what do you see |
02:28:12 | AlexMax | https://paste.ee/p/sL3Xu |
02:28:30 | AlexMax | also these nuklear files are taking FOREVER to compile for some reason |
02:28:48 | AlexMax | ...not forever, it's getting stuck... |
02:29:18 | AlexMax | Only on windows, Linux is working great |
02:29:58 | shashlick | what version of windows and gcc |
02:30:14 | AlexMax | Windows 10, whatever version of gcc finish.exe installs |
02:30:50 | shashlick | okay - i'm using a recent mingw |
02:31:09 | shashlick | v7.3.0 |
02:31:30 | shashlick | you will see a cc1 process hanging, if you kill that you will see the error message |
02:32:49 | AlexMax | I see four cc1 processes |
02:32:53 | AlexMax | I'll kill them one by one |
02:33:28 | AlexMax | and when i killed the first one it just says "failed with exit code 1" |
02:34:03 | AlexMax | yeah I see four gcc's again |
02:34:06 | * | leorize quit (Quit: WeeChat 2.2) |
02:34:45 | AlexMax | https://paste.ee/p/ayro1 |
02:35:13 | AlexMax | Strange |
02:35:37 | AlexMax | version is gcc.exe (x86_64-win32-seh-rev1, Built by MinGW-W64 project) 6.3.0 |
02:36:26 | AlexMax | and just to smoke-test things, I switched to my project and it built just fine |
02:39:39 | AlexMax | sigh, sorry that this seems to be a wild good chase lol |
02:42:20 | shashlick | no worries |
02:42:44 | AlexMax | Okay, running the command by hand reveals a compile error |
02:43:06 | AlexMax | a whole mess of macros |
02:43:54 | AlexMax | https://paste.ee/p/2GRDV |
02:45:35 | AlexMax | Maybe on Windows you need to add a definition |
02:45:51 | shashlick | ya I haven't had to, checking |
02:46:13 | AlexMax | I'm using 64-bit nim, fwiw |
02:46:15 | AlexMax | on windows at least |
02:46:39 | shashlick | do you have a test file? or just doing an import |
02:47:37 | AlexMax | Well, at this point I'm just trying to compile that .c file with the given version of GCC |
02:47:51 | AlexMax | right now, Nim doesn't even enter the equation |
02:49:16 | FromGitter | <kayabaNerve> If I have a string that stores data, what's the fastest way to get a subset? ⏎ [start .. end] ⏎ .toOpenArray() ⏎ .substring ⏎ Something involving accessing the char pointer directly? [https://gitter.im/nim-lang/Nim?at=5b9b21acf7e1580625ca834e] |
02:50:50 | * | endragor joined #nim |
02:51:27 | FromGitter | <kayabaNerve> I do need to get the result as a string. |
02:55:13 | FromGitter | <kayabaNerve> It looks like an OpenArray[char] is the exact same as a string. A pointer and a length field... |
02:55:13 | FromGitter | <kayabaNerve> *in content. Not in the language. |
02:55:14 | shashlick | AlexMax: sorry man, I have no clue |
02:55:33 | FromGitter | <gogolxdong> can I transform StringTableRef to openArray? |
02:58:08 | AlexMax | shashlick: I do |
02:58:11 | AlexMax | Just figured it out |
02:58:15 | shashlick | what was it |
02:58:30 | AlexMax | So the clue was the very end |
02:59:30 | AlexMax | https://github.com/vurtun/nuklear/blob/master/src/nuklear_internal.h#L88 |
02:59:35 | AlexMax | This line was what broke |
03:00:07 | AlexMax | The problem is that nuklear has no idea what size nk_ptr is |
03:00:13 | AlexMax | because....it doesn't exist!!! |
03:00:56 | shashlick | so how's it compiling for me? |
03:01:45 | AlexMax | Well, ultimately, all that noise is handled here |
03:01:47 | AlexMax | https://github.com/vurtun/nuklear/blob/master/src/nuklear.h#L110 |
03:02:09 | * | deepend quit (*.net *.split) |
03:02:09 | * | so quit (*.net *.split) |
03:02:34 | AlexMax | I suspect that detection of proper NK_POINTER_TYPE is broken |
03:03:45 | AlexMax | In any case, defining NK_INCLUDE_FIXED_TYPES seems to fix things |
03:04:50 | AlexMax | That define requires stdint.h, and thus it might not work if you use an ancient version of Visual C++ to compile nim stuff |
03:05:10 | * | deepend joined #nim |
03:06:03 | AlexMax | but since nimgen doesn't even support MSVC in the first place, maybe it's acceptable...for now. |
03:06:14 | shashlick | so {.passC: "-DNK_INCLUDE_FIXED_TYPES".} |
03:06:25 | AlexMax | Yeah |
03:08:56 | AlexMax | Actually, hrm, this might be a problem too |
03:09:10 | AlexMax | https://github.com/vurtun/nuklear#building |
03:09:31 | AlexMax | Basically, you have to #define NK_IMPLEMENTATION before including nuklear.h |
03:09:53 | shashlick | that's only if you use the single file mode |
03:10:03 | shashlick | you wanted to compile each c file individually remember |
03:10:06 | shashlick | so that stuff gets cached |
03:11:41 | AlexMax | Oh, you're right, I should've read more carefully....but what caught my eye is that it says you also have to define the same optional flags too |
03:12:24 | AlexMax | So I wonder if that means you have to -DNK_INCLUDE_FIXED_TYPES every time you include nuklear.h, even if it's header-only |
03:13:20 | AlexMax | Wait, how is what I'm saying make any sense...nim doesn't need nuklear.h, it has nuklear.nim |
03:13:29 | AlexMax | right? |
03:13:38 | shashlick | here's all the stuff zachcarter defined in his implementation - https://github.com/zacharycarter/nuklear-nim/blob/master/src/bind.c |
03:14:03 | AlexMax | Mmmhmm |
03:14:10 | AlexMax | Damn, this is thorny :P |
03:14:40 | shashlick | well, you import the nim file which uses importc which points to the header |
03:15:03 | shashlick | is the `-DNK_INCLUDE_FIXED_TYPES` not working for you? |
03:16:11 | AlexMax | It did. I was just trying to think of the ramifications. |
03:16:45 | shashlick | okay, well am going to include all of zachcarter's defines as `passC` |
03:16:50 | AlexMax | Probably a wise idea |
03:21:29 | shashlick | just pushed, please try |
03:24:31 | shashlick | meh, it breaks on linux, hold off |
03:24:48 | AlexMax | shashlick: Works for me! |
03:25:01 | AlexMax | :P |
03:30:11 | * | rockcavera joined #nim |
03:32:22 | shashlick | okay, pushed a fix |
03:33:17 | AlexMax | operation successful, one warning |
03:33:28 | AlexMax | C:\Users\alexm\.nimble\pkgs\nimnuklear-0.1.0\nimnuklear\nuklear.nim(1257, 3) Hint: 'WINDOW_DYNAMIC' is declared but not used [XDeclaredButNotUsed] |
03:34:15 | AlexMax | shashlick: I'll see if I can port one of the tests over to your library |
03:34:24 | AlexMax | I'll probably do it this weekend, if I have power |
03:34:31 | AlexMax | Thanks so much for your time |
03:34:39 | shashlick | brilliant |
03:51:20 | FromGitter | <gogolxdong> How to transform a variable to NimNode? |
03:54:45 | shashlick | `ident`? |
03:58:04 | FromGitter | <gogolxdong> access the variable in form of NimNode instead of creating new NimNode. |
04:09:13 | * | endragor quit (Quit: Leaving...) |
04:14:42 | * | def- quit (Quit: -) |
04:30:58 | * | miran joined #nim |
04:34:33 | shashlick | @kaushalmodi: https://github.com/nim-lang/nimble/pull/541 |
04:42:40 | * | def- joined #nim |
04:47:39 | * | nsf joined #nim |
05:05:01 | * | ftsf joined #nim |
05:36:29 | * | kapil___ joined #nim |
05:50:06 | * | rockcavera quit (Ping timeout: 252 seconds) |
05:51:03 | * | leorize joined #nim |
06:05:28 | * | miran quit (Ping timeout: 244 seconds) |
06:45:57 | * | Vladar joined #nim |
06:49:40 | * | couven92 quit (Read error: Connection reset by peer) |
06:50:07 | * | couven92 joined #nim |
07:16:27 | * | leorize quit (Ping timeout: 250 seconds) |
07:18:51 | * | TheLemonMan joined #nim |
07:26:22 | Tanger | Hey folks, is it possible for me to use nim generics to create a generic proc for each value of an enum? |
07:27:06 | FromGitter | <kayabaNerve> You can just take in the Enum as a type. |
07:27:23 | FromGitter | <kayabaNerve> proc myProc(Val: MyEnum) = |
07:27:23 | Tanger | Haha, of course it's that easy XD |
07:27:37 | FromGitter | <kayabaNerve> Partner it with a switch :p |
07:27:39 | FromGitter | <kayabaNerve> Or |
07:27:43 | FromGitter | <kayabaNerve> Case statement |
07:28:03 | * | PMunch joined #nim |
07:30:15 | Tanger | kayabaNerve: I can't remember the phrase for it, but can I do something like proc myProc(Val: MyEnum.Val1 | MyEnum.Val2), so I can have one proc for enum values X, Y, Z and another definition for A, B, C? |
07:30:24 | Tanger | If that makes sense. Looking for the term now |
07:30:56 | FromGitter | <kayabaNerve> Union type but with values? No. |
07:31:43 | FromGitter | <kayabaNerve> You can't define a proc to take in 1/2. You define it to take in an int. Same here. Use a case statement or two different enums. |
07:32:05 | FromGitter | <alehander42> i actually wrote a lib for that |
07:32:06 | FromGitter | <alehander42> https://github.com/alehander42/poly |
07:32:22 | FromGitter | <alehander42> but it's still limited as you have to write all the overloads in one section haha |
07:33:08 | FromGitter | <kayabaNerve> Interesting |
07:35:26 | Tanger | kayabaNerve: That makes sense. Thanks for the help! I was thinking of proc onlyIntOrString[T: int|string] from the nim manual, but I was thinking of enums incorrectly |
07:38:15 | Tanger | alehander42: That's an awesome concept! |
07:43:42 | * | ftsf quit (Ping timeout: 264 seconds) |
07:44:57 | * | ftsf joined #nim |
08:00:01 | TheLemonMan | got the js backend to emit every module as a standalone commonJs module o/ |
08:02:05 | FromGitter | <alehander42> would that remain optional? |
08:02:34 | * | gmpreussner quit (Ping timeout: 252 seconds) |
08:03:21 | TheLemonMan | of course, I have no plans about merging this :D |
08:03:27 | * | gmpreussner joined #nim |
08:04:21 | * | Ven`` joined #nim |
08:07:37 | FromGitter | <kayabaNerve> Nimble package? 0_0 |
08:09:06 | * | leorize joined #nim |
08:09:41 | FromGitter | <alehander42> backend experiments are fun, once I forked and started modifying the js backend to support python as well |
08:09:58 | FromGitter | <alehander42> but it's really not a good idea :D |
08:18:23 | * | cspar quit (Ping timeout: 245 seconds) |
08:32:17 | * | kurahaupo26 joined #nim |
08:32:59 | * | kurahaupo26 quit (Remote host closed the connection) |
08:34:13 | FromGitter | <narimiran> python devs continue to make silly/crazy/stupid ideas: https://bugs.python.org/issue34605 |
08:36:45 | FromGitter | <narimiran> take a look at PRs (links to github are above OP) and the reaction of the public |
08:37:18 | * | riposte14 joined #nim |
08:38:05 | * | riposte14 quit (Remote host closed the connection) |
08:40:50 | FromGitter | <bung87> does `slave` existed in cpython sources? |
08:41:14 | FromGitter | <mratsim> @Tanger, you’re mixing type and values, no need for generics if you only deal with values |
08:47:16 | FromGitter | <narimiran> @bung87 see the changes in PRs—there were some slaves. (sorry if i offended somebody, meant to say "childs" [sic]) |
08:48:49 | FromGitter | <alehander42> what I wonder is, why people remove master/slave instead of `kill` |
08:49:44 | FromGitter | <narimiran> and to people who lost their parents/children, that new terminology might be offensive too! |
08:49:56 | Araq | because killing unborn babies is still ok, that's why |
08:50:07 | TheLemonMan | ♪ killing in the name of ... consistency? ♪ |
08:50:40 | FromGitter | <narimiran> fortunately, we in nim merge PRs to `devel` and not to `master`!! |
08:50:57 | FromGitter | <bung87> I see `pliant children` |
08:52:01 | FromGitter | <alehander42> well, i don't think `master` alone is a problem, otherwise they should bancrupt mastercard |
08:52:37 | FromGitter | <bung87> yeah otherwise github will remove every master branch :) |
08:52:59 | FromGitter | <alehander42> which will actually resolve a lot of problems |
08:53:14 | FromGitter | <narimiran> :D :D |
08:53:20 | FromGitter | <bung87> haha no news is good news |
08:54:37 | * | cspar joined #nim |
08:56:00 | FromGitter | <alehander42> btw there was a plan to move master to stable and devel to master |
08:56:03 | FromGitter | <alehander42> what happened |
08:58:21 | * | Juggie23 joined #nim |
08:58:31 | Araq | still need to do that |
08:58:58 | TheLemonMan | soon™ |
08:59:47 | Araq | https://github.com/nim-lang/Nim/issues/8961 is killing me :-) |
09:00:10 | Araq | was that logic ever sound? |
09:05:22 | TheLemonMan | hmm, shouldn't the length be sp.cint - 1 in order to make space for the trailing null? |
09:05:57 | Araq | fgets only writes n-1 bytes for the zero |
09:06:26 | TheLemonMan | I stand corrected, thank you manpages |
09:06:48 | * | Juggie23 quit (Ping timeout: 272 seconds) |
09:14:29 | * | hoijui joined #nim |
09:15:02 | * | leorize quit (Quit: WeeChat 2.2) |
09:26:53 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:30:41 | * | floppydh joined #nim |
09:30:52 | Araq | "If |
09:30:52 | Araq | ``false`` is returned `line` contains no new data." |
09:31:06 | Araq | good, the docs are clear about this. |
09:31:14 | Araq | bad, the implementation doesn't do this. :-) |
09:31:26 | * | gfssddd joined #nim |
09:33:34 | * | cspar quit (Ping timeout: 240 seconds) |
09:35:06 | * | gfssddd quit (Remote host closed the connection) |
09:36:50 | * | leorize joined #nim |
09:51:59 | FromGitter | <alehander42> hm i should close some of my old issues |
09:52:09 | FromGitter | <alehander42> i wonder how many of the nim issues are no longer relev |
09:52:34 | * | vqrs quit (Ping timeout: 240 seconds) |
09:55:31 | Araq | many still are |
09:55:39 | Araq | from time to time I go through every issue |
09:55:50 | Araq | well "every" in quotes. :P |
09:57:46 | * | runfalk22 joined #nim |
10:00:28 | * | vqrs joined #nim |
10:02:31 | * | runfalk22 quit (Remote host closed the connection) |
10:05:59 | * | krux02 joined #nim |
10:10:25 | FromGitter | <xmonader> mock library for nim? or patchFile the recommended solution? |
10:12:09 | Araq | patchFile it. |
10:13:02 | Araq | there is nothing worse than introducing indirections everywhere just to be able to "mock" your code. Which wasn't a thing back then when data and code was separate. and then OOP came along... |
10:13:10 | krux02 | Araq: can you check out, if yuutayamada is still going to maintain nim-mode? |
10:13:30 | krux02 | to me it feels he left the development on nim-mode |
10:13:39 | Araq | what can I do that you can't? |
10:14:04 | krux02 | I wrote an e-mail |
10:14:09 | krux02 | no response |
10:14:27 | krux02 | basically what I want is merge rights on nim-mode |
10:14:42 | Araq | fork it? |
10:14:54 | krux02 | already did it |
10:15:26 | krux02 | but it feels like issues are left uncommented and pull requests are ignored. |
10:15:48 | Araq | well maybe he is on holidays |
10:16:36 | FromGitter | <alehander42> yeah this happened with some repos i was interested in, a lot of ppl on holidays |
10:17:49 | FromGitter | <alehander42> btw @krux02 did you happen to read https://github.com/nim-lang/Nim/issues/8649#issuecomment-420618621 |
10:20:32 | FromGitter | <xmonader> question: does it make sense to raise Error from internal APIs while you can match against the return value if it can be error or not in the user API? ⏎ ⏎ e.g: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5b9b8b70f4bd1056ac5fd863] |
10:21:52 | krux02 | alehander42 yes I did read it |
10:22:49 | TheLemonMan | xmonader, use an Option[string] if you don't need to attach any information about the failing case |
10:23:00 | TheLemonMan | (and the failure is recoverable of course) |
10:23:34 | krux02 | I think I can finally identify the missing feature of pattern matching. |
10:24:00 | Araq | oh... what is it? |
10:24:37 | krux02 | basically you can't put scala's pattern matching on nim, because scala has full runtime type information on every object and for pattern matching it relies on this feature |
10:25:45 | Araq | huh? |
10:26:00 | krux02 | the pattern machting relies on custom unpackers: proc customunpacker(arg: object): Opiton[tuple[A,B,C,D]] |
10:26:25 | krux02 | every object can be casted to Object on the jvm without loss of type information |
10:26:37 | krux02 | and the type can re reconstructed via refleciton |
10:26:54 | krux02 | therefore an unpacker that just takes object is enough |
10:27:00 | Araq | sounds like a terrible design to me |
10:27:18 | Araq | you can have all the unpackers that you want, you can attach them to typeDesc[Foo] |
10:27:33 | krux02 | arq that is not the point |
10:27:40 | krux02 | the problem is in recursive patterns |
10:27:49 | FromGitter | <xmonader> @TheLemonMan, you mean Either type, Option doesn't fit. clearly the errors are needed but raising the content of them as Errors or not i'm not sure if it's the responsibility of the internal APIs? ⏎ I've ⏎ RedisValue = RedisInt|RedisString|RedisError|RedisList ⏎ ⏎ get(k) will query the server and server will respond either with String or Error and this info is totally preserved, the question does get from |
10:27:49 | FromGitter | ... user perspective supposed to raise an exception if it receives RedisError or that should be delegated to the user, [https://gitter.im/nim-lang/Nim?at=5b9b8d257dca306503fcbcf2] |
10:28:17 | krux02 | outer(a,b,inner(c,d), inner(e, f)) |
10:28:34 | Araq | xmonader: it should raise an exception IMO. |
10:28:47 | krux02 | outer unpacks an object into four children |
10:29:11 | * | stefanos82 joined #nim |
10:29:11 | krux02 | then I need to type information of these children to select the inner matcher |
10:29:16 | TheLemonMan | yep, raising a ValueError there is good |
10:29:59 | krux02 | it is reverse type inference |
10:30:44 | FromGitter | <xmonader> I see thanks @Araq @TheLemonMan |
10:31:12 | krux02 | in normal nim code the expression outer(a,b,inner(c,d), inner(e,f)) is resolved inner most first, so the resolution of outer depends on the types of inner. In pattern matching the symbol resolution is reversed, inner depends on the type of outer |
10:32:21 | Araq | that's not true for 'untyped' |
10:32:24 | FromGitter | <Bennyelg> “Decorator” design pattern using macro? |
10:32:35 | FromGitter | <Bennyelg> Reasonable? |
10:32:44 | krux02 | Araq: untyped doesn't relove anything |
10:33:01 | Araq | lol 'relove' |
10:33:13 | krux02 | resolve |
10:33:16 | Araq | maybe it loved once. |
10:33:45 | krux02 | and typed only has type inferene from inner to outer types. |
10:35:17 | Araq | yeah, that's how type systems usually work |
10:35:43 | krux02 | I need to try to actually implement another pattern matching library that can work with custom matcher function on flat data structures to be a bit more on the spot with my explanation |
10:36:20 | krux02 | Araq, I know, but not in pattern matching. |
10:36:30 | FromGitter | <alehander42> @krux02 how does unpacking exactly work in scala? does it invoke an unpack method for each unpacking on runtime? |
10:36:33 | krux02 | pattern matching is kind of an reverse assignment |
10:37:07 | FromGitter | <alehander42> unapply* |
10:37:18 | krux02 | alehander42: there are tutorials on it, but yes, there is an unpack fucntion called that returns an obption |
10:37:35 | krux02 | the option tells if the match failed or succeeded |
10:37:37 | Araq | well I know ML managed to implement pattern matching without a JVM-like reflection mechanism |
10:37:54 | FromGitter | <alehander42> yeah, what I mean is does this happend for all objects, or only for objects with custom unpacking |
10:38:18 | FromGitter | <alehander42> e.g. do all objects share some default unpacking mechanism (e.g. based on fields) |
10:38:20 | krux02 | Araq: I don't say it's impossible, but I do say that the type inference works a bit different on those patterns. |
10:39:18 | krux02 | for example in: let (a,b,c) = foo() |
10:40:21 | krux02 | the type of (a,b,c) is not inferred by the type of a and then b and then c composed to a tuple, it is inferred by the type of foo(), and then the types of a b c are the children of (a,b,c) |
10:42:13 | FromGitter | <alehander42> @krux02 if you want to support custom unpackers, that seems to be a problem. my idea for a lib has a different approach: a default unpacking mechanism for several kinds of types (seq, tuple, object, variant, set, constants) and explicit custom unpackers, e.g. ⏎ ⏎ `match Email.unpack!(name, host)` ⏎ ⏎ one + is that this way you can have multiple different unpack methods for a type |
10:42:13 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5b9b9085fcba1254fab49104] |
10:42:21 | Araq | sure but type inference is a compile-time thing, it doesn't require runtime reflection mechanisms |
10:42:45 | FromGitter | <alehander42> e.g. `email.differentUnpack(tokens)` |
10:43:21 | krux02 | Araq, if the reverse type inference works, yes |
10:45:00 | krux02 | with ast pattern matching I did not need this reverse type inference, because everything is of type NimNode |
10:45:22 | krux02 | and patty does not need the reverse type inference, because it doesn't do nested patterns |
10:48:23 | krux02 | currently I don't think that recursive type inference can be implemented efficiently with macros. I think the best would be to write a custom semantic checking phase for matching patterns. |
10:48:35 | krux02 | maybe there is a hacky way to do it in macros. |
10:48:44 | FromGitter | <alehander42> i did support nested patterns similar to `of CSeq(HInt(2), HInt(4))` in my ast-pattern-matching fork |
10:49:40 | krux02 | alehander42, what is thi HInt doing there? |
10:49:57 | krux02 | why not match with @[2,4]? |
10:51:00 | krux02 | or at least with seq(2,4) |
10:52:43 | FromGitter | <alehander42> no, CSeq is just a kind in another variant, nothing to do with seq |
10:52:53 | FromGitter | <alehander42> the point is, it's similar to A(B(..), C(..)) |
10:54:00 | FromGitter | <alehander42> i am still not entirely sure about the unpacking problem: you can generate a call to the unpack function with the outer args and it will be resolved to the overload for its type on runtime |
10:54:16 | FromGitter | <alehander42> and then later do the same for the inner args |
10:55:02 | FromGitter | <alehander42> it will be resolved on compile time later* , we are not talking about methods |
10:56:11 | FromGitter | <alehander42> i mean why can't this work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b9b93ca7dca306503fce255] |
10:57:17 | krux02 | outer is the name of the unpacker |
10:57:23 | krux02 | same as inner |
10:57:26 | FromGitter | <alehander42> ok, so directly |
10:57:32 | FromGitter | <alehander42> `outer(value)` and `inner(i2)` |
10:58:32 | * | dddddd joined #nim |
10:58:34 | krux02 | outer can also return Option[seq[T]] |
10:58:41 | Araq | krux02, more importantly, how can we change 'nkIdentDefs'? |
10:58:58 | Araq | it needs to have the '## doc comment' as its last child IMO. |
10:59:10 | Araq | some other node kinds are affected as well. |
10:59:34 | krux02 | and when it does, the generated code needs to be different |
10:59:52 | krux02 | Araq: can you get me up to date on it? Is it about that every node has a field for comment? |
11:00:02 | Araq | yeah, it sucks and need to die |
11:00:28 | Araq | we could introduce nkIdentDefDoc and have an --oldAst switch for a transition period... :-/ |
11:00:52 | FromGitter | <alehander42> @krux02 why does it need to be different? |
11:00:59 | FromGitter | <alehander42> if it does, one shoudln't write `inner(c,d)` |
11:01:07 | FromGitter | <alehander42> but `inner(@[c, d])` or something |
11:01:21 | krux02 | Araq: can you post a quick example of nkIdentDef that I can use to dump the ast? |
11:01:41 | krux02 | I never relied on docs in ident defs |
11:01:58 | FromGitter | <alehander42> and even if it had to read thoughts, it could generate `when compiler(...tuple assignment) else seq stuff` |
11:02:01 | FromGitter | <alehander42> compiles* |
11:03:09 | krux02 | @alehander42: because when you return the seq[] you don't unpack it with (a,b,c,d) assignment, you need to use the index |
11:03:55 | FromGitter | <alehander42> but if the unpacker returns a seq, the user *shouldn't* use outer(a, b, c, d) |
11:04:18 | krux02 | alehander42: you manually reverse the ast, I see. this could work for a prototype, but I don't think it can have nice error messages. |
11:04:29 | FromGitter | <alehander42> he should use outer(@[a, b, c, d]) and then the lib would generate seq unpacking too |
11:04:54 | krux02 | maybe it can |
11:05:30 | FromGitter | <alehander42> @krux02 well here our approaches differ a lot :D i don't want any custom error messages, as they add overhead |
11:05:52 | * | ftsf quit (Ping timeout: 272 seconds) |
11:06:30 | krux02 | well I think without custom error messages the pattern matching will be very useless, becaus on pattern mismatching the programmer will be confused and removes the pattern matching to fix it. |
11:06:47 | FromGitter | <alehander42> ok, more like |
11:07:05 | krux02 | error messages are extremely important, and you question should be on how to implement them fast, not if you should have them. |
11:07:06 | * | vqrs quit (Ping timeout: 252 seconds) |
11:07:10 | FromGitter | <alehander42> if one wants, he can add a arg to `match` signifiying he wants an error message |
11:07:16 | FromGitter | <alehander42> but not by default |
11:07:27 | FromGitter | <alehander42> they are |
11:07:42 | FromGitter | <alehander42> but I don't think they would be worse in my approach |
11:08:21 | FromGitter | <alehander42> on the opposite: I plan on generating very readable ast so one can even map the pattern matching to the resulting raw nim code |
11:08:37 | FromGitter | <alehander42> yes i didnt phrase myself well |
11:09:02 | FromGitter | <alehander42> but not enabling them by default at least in `-d:release` is important |
11:09:11 | krux02 | alehander42: I would like to see you how well you can program in nim, when instead of error messages nim has only (compilation failure) messages and in order to find where they are you have to add explicit {.withCompilerMessages.} tags everywhere to find where the error actually is. |
11:09:37 | FromGitter | <alehander42> because otherwise it's like having each `if` building a error message |
11:09:45 | krux02 | and no error messages don't add a lot of overhead, because they are only generated on error |
11:10:13 | FromGitter | <alehander42> @krux02 not hitting a branch of match is not an error: it's like hitting `else` in if |
11:10:20 | * | vqrs joined #nim |
11:10:48 | FromGitter | <alehander42> so actually the best option is to just let the user decide |
11:11:23 | krux02 | that is the worst solution |
11:11:26 | FromGitter | <alehander42> if one wants, one can invoke something `echo matchError()` in his `match` (whenever he wants) |
11:11:50 | FromGitter | <alehander42> @krux02 well it doesn't make any sense to always generate an error in `else` |
11:12:10 | FromGitter | <alehander42> i change an `if` in my program to `match` because it simplifies my if condition |
11:12:15 | FromGitter | <alehander42> i don't want an error in else |
11:12:19 | krux02 | the user initially dosn't know what is best and leaves the default until hes has a really good reason to change that. |
11:12:30 | krux02 | so the default must be the best for the user experience. |
11:12:34 | FromGitter | <alehander42> `match` is a control flow structure. |
11:12:53 | krux02 | and not hitting any brach in a match expression is an error. |
11:13:03 | FromGitter | <alehander42> your thesis is equivalent to `else should always generate an error message because it's better for user expirience` |
11:13:21 | krux02 | no |
11:13:23 | FromGitter | <alehander42> @krux02 not hitting any branch in match is exactly the same as not hitting any branch in if or in `case` |
11:13:28 | FromGitter | <alehander42> it's called else |
11:13:37 | krux02 | if else is a low level branch |
11:13:45 | FromGitter | <alehander42> now, if the user *haven't* added an else branch |
11:13:51 | krux02 | there is no error that can occur at all |
11:13:53 | FromGitter | <alehander42> then yeah it makes sense to raise an error |
11:14:14 | krux02 | because it is just a single bit that decides everything and no uncorverd cases. |
11:14:16 | FromGitter | <alehander42> maybe you are talking about this case? |
11:14:22 | krux02 | patterns are much more complex |
11:14:33 | FromGitter | <alehander42> they are a control flow structure |
11:14:39 | FromGitter | <alehander42> it doesn't matter how complex they are |
11:14:49 | FromGitter | <alehander42> I can always want to do my own thing in `else` |
11:16:22 | FromGitter | <alehander42> e.g. in ⏎ ⏎ ```match a: ⏎ of A(B(name: c), `e`): ⏎ f(e) ⏎ else: ⏎ f(default)``` [https://gitter.im/nim-lang/Nim?at=5b9b98860cfe7f30f1924ada] |
11:16:57 | FromGitter | <alehander42> i don't want the pattern matching lib to generate anything else than the branches |
11:17:39 | FromGitter | <alehander42> if I don't get why the branch fails and I am debugging, I can always do ⏎ ⏎ ```matchDebug a: ⏎ of A(B(name: c), `e`): ⏎ f(e) ⏎ else: ⏎ f(default)``` [https://gitter.im/nim-lang/Nim?at=5b9b98d31ee2ca650215cf7d] |
11:17:41 | FromGitter | <alehander42> or |
11:17:55 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b9b98e33b7e6c2edd16c7a0] |
11:19:27 | krux02 | Araq: I just looked at the IdentDefs. As far as I know the comment in an ident def cannot be accessed from the macros module |
11:19:37 | krux02 | at least by a quick look I didn't see it. |
11:20:26 | krux02 | I think the best solution is to but the comment node after the identDefs in the VarSection |
11:20:59 | krux02 | then macros that iterate VarSection need to be fixed to skip comment nodes here |
11:21:53 | Araq | yeah but people demand to access it |
11:22:17 | krux02 | people demand to access the comment statement? |
11:24:57 | krux02 | I think the comment in a var section should be exposed like this: http://ix.io/1mGP |
11:26:57 | FromGitter | <alehander42> oh, the macros one can write with full ast comment support |
11:29:02 | krux02 | alehander42: currently the ast comment is stored in the comment field of the ast node |
11:29:12 | krux02 | therefore every ast node has a comment field |
11:29:21 | krux02 | which is nil for almost all cases |
11:29:28 | krux02 | 64 bits wasted |
11:29:39 | pigmej | hey folks again |
11:29:45 | krux02 | and the line numbers have to suffer |
11:29:48 | krux02 | pigmej, hi |
11:29:56 | pigmej | short question, how is the support for UDP in asyncdispatch currently going? |
11:30:14 | krux02 | pigmej, do you really need UDP? |
11:30:18 | pigmej | sure |
11:30:19 | FromGitter | <alehander42> @krux02 didn't know that, good idea to refactor it |
11:30:36 | pigmej | don't want to have to write custom logic to reconnect |
11:32:01 | * | heinrich5991 quit (Quit: quit.) |
11:32:08 | pigmej | also I need plenty of messages |
11:32:36 | krux02 | for what I know UDP causes more trouble than it solves. |
11:32:42 | pigmej | "depends" |
11:32:52 | * | zachcarter quit (Ping timeout: 246 seconds) |
11:32:54 | krux02 | it removes reliability for all messages. |
11:33:02 | pigmej | yup |
11:33:25 | * | heinrich5991 joined #nim |
11:33:27 | pigmej | but in the same time it removes need to connect, reconnect, keep alive for tcp connection, |
11:34:51 | krux02 | I like udp, but I would prefer a higher level protocol, that allows to set partial orderings and reliability flags. But as long as I don't get it, I just do TCP even though I don't really like it. |
11:37:08 | * | noonien joined #nim |
11:37:32 | * | rockcavera joined #nim |
11:38:57 | * | demtomohiro joined #nim |
11:41:09 | * | Dropa13 joined #nim |
11:41:56 | * | Dropa13 quit (Remote host closed the connection) |
11:42:03 | * | nsf quit (Quit: WeeChat 2.2) |
11:43:14 | ng0 | I am working on the integration of nim into Guix and similar systems. I made good progress last night and today. So what warning/error do I have to disable, if this is possible, to ignore this: /gnu/store/8pdn6jrfh0s4dqgrwn35c9gs09s7s55z-nim-0.18.0/lib/compiler/options.nim(1, 2) Error: module names need to be unique per Nimble package; module clashes with |
11:43:17 | ng0 | /gnu/store/8pdn6jrfh0s4dqgrwn35c9gs09s7s55z-nim-0.18.0/lib/pure/options.nim |
11:43:53 | ng0 | I had to move around parts of the output. this line is while compiling nimble standalone. |
11:44:07 | * | demtomohiro quit (Ping timeout: 240 seconds) |
11:47:26 | pigmej | krux02: btw I saw all your prs, I wonder if yuuta will review them... |
11:48:25 | * | qenthus1ast joined #nim |
11:51:03 | * | tiorock joined #nim |
11:51:03 | * | tiorock quit (Changing host) |
11:51:03 | * | tiorock joined #nim |
11:51:03 | * | rockcavera quit (Killed (livingstone.freenode.net (Nickname regained by services))) |
11:51:04 | * | tiorock is now known as rockcavera |
11:51:38 | Araq | krux02, btw, nimsuggest with a directory name will no go up in the tree looking for a project file |
11:51:50 | FromGitter | <alehander42> @krux02 i am going to prototype my matching idea in a new lib this weekend, to see if it would work for real code |
11:52:40 | ng0 | okay, different question: I had to move the output folders around. search paths etc were adjusted accordingly, and this is when the compiler started working (with other suggestions I will upstream). even when 'compiler' would be in a different folder than 'lib/compiler', this complain should still appear. what build is this: https://d.n0.is/pub/tmp/nim_0.18.0.txt |
11:52:54 | ng0 | (excluding the broken leading tree output) |
11:53:41 | FromGitter | <codenoid> hi |
11:57:20 | * | tiorock joined #nim |
11:58:12 | * | qenthus1ast left #nim (#nim) |
11:58:30 | * | enthus1ast joined #nim |
11:58:35 | FromGitter | <xmonader> @codenoid Hi! |
12:00:56 | * | rockcavera quit (Ping timeout: 244 seconds) |
12:02:35 | ng0 | I read a bit more in the source. Easy enough. |
12:04:15 | FromGitter | <codenoid> oh hi @xmonader |
12:05:26 | FromGitter | <xmonader> @codenoid giving nim a shot? |
12:06:57 | federico3 | ng0: I just saw your toot. Welcome to Nim |
12:08:37 | FromGitter | <codenoid> @xmonader i just like to say hi |
12:08:43 | FromGitter | <codenoid> :D |
12:10:27 | ng0 | federico3: hi |
12:23:16 | * | ftsf joined #nim |
13:03:57 | shashlick | I have 7 nim crash issues that are potentially fixed - can someone verify and close them? |
13:05:04 | * | vqrs quit (Ping timeout: 240 seconds) |
13:06:40 | shashlick | https://pastebin.com/VkJU63PK |
13:10:22 | * | vqrs joined #nim |
13:11:51 | FromGitter | <narimiran> shashlick: the first one is ok, the second one crashes (both on my and your end ;)) |
13:14:26 | FromGitter | <narimiran> the third one is also ok, the fourth one is not. (nim devel from 2018-09-12) |
13:20:18 | * | zacharycarter joined #nim |
13:20:19 | * | zacharycarter quit (Client Quit) |
13:20:38 | * | zacharycarter joined #nim |
13:20:57 | FromGitter | <mratsim> @narimiran here you go: https://github.com/SimonDanisch/julia-challenge/pull/3 not benchmark though |
13:20:59 | zacharycarter | good morning / afternoon all - I'm having an issue with importcpp and backticks |
13:21:26 | zacharycarter | if I surround the variable I send into the imported procedure with backticks - the pattern assigned to the importcpp pragma doesn't work |
13:21:34 | zacharycarter | the `#` get printed in the output |
13:21:39 | zacharycarter | anyone know a way around this? |
13:21:57 | FromGitter | <mratsim> can you show the proc definition |
13:21:58 | TheLemonMan | do I hear "benchmark"? (this is getting old really quick, isn't it? :) |
13:22:18 | zacharycarter | mratsim - sure let me throw together an exampler |
13:22:20 | zacharycarter | example* |
13:30:30 | shashlick | @narimiran: second one is an error message, not a crash |
13:31:49 | shashlick | what do you see for the fourth one? |
13:36:09 | TheLemonMan | shashlick, wrt #8960 the test is better under 'openarray' since the problem was in the string->openarray conversion |
13:36:51 | shashlick | okay will move |
13:39:05 | shashlick | I can create test cases very quickly and push using tissue so feel free to use the tool or to ask |
13:40:15 | * | stefanos82 quit (Quit: Quitting for now...) |
13:41:23 | shashlick | TheLemonMan: updated #8960 |
13:42:06 | TheLemonMan | yeah, let's wait for the green even tho it's just a file move |
13:42:48 | shashlick | ya no worries |
13:43:21 | shashlick | can you look into the other issues as well - https://pastebin.com/VkJU63PK - then I can make test cases for those and get them closed out |
13:43:21 | shashlick | Pssst! I didn’t unfurl https://pastebin.com/VkJU63PK because it was already shared in this channel quite recently (within the last hour) and I didn’t want to clutter things up. |
13:43:50 | shashlick | @narimiran: please post your findings as well |
13:44:13 | FromGitter | <narimiran> shashlick: the fourth one is "Error: cannot instantiate: 'T'" — as you said, an error, not a crash |
13:44:34 | FromGitter | <narimiran> @mratsim will take a look, thanks for the ping! |
13:44:56 | * | tiorock quit (Remote host closed the connection) |
13:49:36 | * | planetis[m] joined #nim |
13:50:37 | FromGitter | <narimiran> shashlick: 5th error, 6th and 7th work ok |
13:52:49 | FromGitter | <narimiran> @mratsim are you a wizard? |
13:53:42 | * | beatmox quit (Ping timeout: 272 seconds) |
13:54:14 | zacharycarter | here's a example of my problem - https://gist.github.com/zacharycarter/9952450e543c018245fb9994b38dfb0f |
13:54:18 | planetis[m] | Hi, how can i squeeze an int to a binary value {0, 1} in nim? I tried `int(bool(sumNum))` but it doesnt work |
13:54:20 | * | cornfeedhobo quit (Ping timeout: 252 seconds) |
13:54:37 | * | ehmry quit (Ping timeout: 246 seconds) |
13:54:58 | * | zama quit (Ping timeout: 272 seconds) |
13:55:36 | * | acidx quit (Ping timeout: 272 seconds) |
13:55:36 | * | sagax quit (Ping timeout: 272 seconds) |
13:55:36 | * | awal quit (Ping timeout: 272 seconds) |
13:55:44 | * | awal joined #nim |
13:55:46 | PMunch | sumNum == 0 |
13:55:57 | PMunch | That returns a true or false |
13:56:09 | * | awal is now known as Guest8490 |
13:56:12 | zacharycarter | not sure why surrounding the bound procedure name with backticks is breaking the pattern in importcpp |
13:56:14 | * | beatmox joined #nim |
13:56:26 | * | nsf joined #nim |
13:56:35 | * | acidx joined #nim |
13:56:41 | Araq | backticks in patterns? what should these do? |
13:56:42 | * | zama joined #nim |
13:56:47 | Araq | only .emit has backtick support |
13:56:51 | Araq | bbl |
13:57:07 | zacharycarter | hrm |
13:57:26 | zacharycarter | well - it works fine if I don't wrap the name of the proc when calling it in backticks |
13:57:34 | zacharycarter | but since this is going through a macro - the identifier is getting resolved |
13:57:43 | zacharycarter | to the mangled JS variable name |
13:57:43 | planetis[m] | then i need a number back |
13:57:50 | FromGitter | <mratsim> @narimiran I’m not a wizard, I’m an Archmage :P |
13:58:00 | zacharycarter | but basically the idea here is - eval(function`literal`) should get called |
13:58:01 | zacharycarter | in JS |
13:58:01 | planetis[m] | also tried `not not a` |
13:58:02 | PMunch | planetis[m], int(sumNum == 0) |
13:58:06 | zacharycarter | which would produce a tagged template literal |
13:58:30 | zacharycarter | I had this working before I added back ticks around the caller |
13:58:35 | planetis[m] | thx will try it |
13:58:36 | zacharycarter | now it's borked |
13:59:47 | zacharycarter | in fact - the problem doesn't seem to be with the pragma contents whatsoever |
14:00:20 | zacharycarter | it seems to be that `foo`("bar") will break any importcpp pragma that is attached to foo with a pattern :/ |
14:00:24 | * | PMunch quit (Quit: Leaving) |
14:00:49 | * | ehmry joined #nim |
14:03:41 | zacharycarter | or maybe not - console.log(`tag`(`bar`, `foobar`)) seems to work |
14:03:59 | FromGitter | <narimiran> @mratsim whatever you call yourself, your code is magic to me! |
14:05:04 | FromGitter | <mratsim> Any sufficiently advanced technology is indistinguishable from magic ;) |
14:07:25 | FromGitter | <narimiran> exactly my point! :) |
14:07:38 | FromGitter | <alehander42> has anybody tried to actually add nim support in travis :? https://docs.travis-ci.com/user/languages/community-supported-languages/ |
14:13:16 | * | zacharycarter quit (Quit: Page closed) |
14:16:02 | * | cornfeedhobo joined #nim |
14:16:34 | * | enthus1ast quit (Ping timeout: 240 seconds) |
14:18:53 | * | hoijui quit (Ping timeout: 244 seconds) |
14:21:58 | * | redlegion joined #nim |
14:21:59 | * | redlegion quit (Changing host) |
14:21:59 | * | redlegion joined #nim |
14:27:36 | shashlick | you need 3 people apparently |
14:31:32 | * | davex__ joined #nim |
14:35:56 | * | davex__ quit (Remote host closed the connection) |
14:52:06 | FromGitter | <arnetheduck> @Araq, the rodfiles stuff, is it dead? should it be removed? |
14:52:46 | * | miran joined #nim |
14:53:53 | FromGitter | <arnetheduck> @Araq, also, what's the plan for parallelism? it seems that either of spawn/parallel framework and channels could be deprecated (or spawn/parallel reworked in terms of channels) |
14:56:07 | * | cspar joined #nim |
14:57:31 | Araq | arntheduck: iirc the dead stuff was removed already and the stuff that's still there will be used for the "incremental compilation cache" |
14:57:37 | * | rockcavera joined #nim |
14:59:27 | Araq | spawn/parallel needs to get a much simpler implementation, channels are different from it though |
15:00:18 | FromGitter | <arnetheduck> @Araq oh ok - saw some tests that are still there |
15:00:33 | FromGitter | <bung87> hope more smart guys can speed nim development. |
15:00:54 | Araq | the tests can be re-used, they cover the harder parts of the language, regardless of the chosen implementation |
15:01:12 | Araq | I mean harder wrt incremental compilation. |
15:07:57 | Araq | https://techcrunch.com/2018/09/12/security-flaw-in-nearly-all-modern-pcs-and-macs-leaks-encrypted-data/ |
15:08:34 | shashlick | TheLemonMan: https://github.com/nim-lang/Nim/pull/8960 is ready |
15:08:48 | FromGitter | <arnetheduck> well, channels can be used to implement spawn/paralllel, no? that should also need less magic |
15:09:27 | * | rockcavera quit (Ping timeout: 252 seconds) |
15:09:46 | TheLemonMan | shashlick, merged! |
15:10:30 | shashlick | TheLemonMan: if you can confirm that some of https://pastebin.com/VkJU63PK are fixed, I can push tests for those as well and get them closed out |
15:11:40 | Araq | arntheduck: channels make the data passing more explicit but don't give you a thread pool |
15:11:45 | shashlick | Araq ^^ if you have the time |
15:13:53 | Araq | shashlick, even if they are fixed they should be added to the test suite |
15:22:58 | shashlick | i've been adding to test suite as soon as I get confirmation that they are really fixed |
15:23:34 | shashlick | but just need 👍 from one of you guys |
15:23:45 | shashlick | crash => error message feels like a fix to me 🙂 |
15:26:27 | Araq | oh you don't have to wait for us, create a PR and the review process will handle it |
15:27:00 | shashlick | Ok cool |
15:28:49 | * | pheonix99121 joined #nim |
15:31:23 | Araq | well now I'm having a look anyway |
15:31:40 | * | pheonix99121 quit (Remote host closed the connection) |
15:32:34 | * | cspar quit (Ping timeout: 240 seconds) |
15:34:24 | * | floppydh quit (Quit: WeeChat 2.2) |
16:04:48 | * | hoijui joined #nim |
16:08:40 | * | ftsf quit (Ping timeout: 246 seconds) |
16:09:53 | * | zacharycarter joined #nim |
16:10:36 | zacharycarter | according to - https://nim-lang.org/docs/macros.html#quote,typed,string - you can pass a string to quote which lets you specify a custom operator to escape with |
16:10:45 | zacharycarter | is this usable with the `do` notation? |
16:10:51 | zacharycarter | I think that's what I need to do to fix my issue |
16:11:27 | TheLemonMan | good luck with that, the implementation is ... well, see for yourself :P |
16:12:11 | zacharycarter | ugh |
16:12:36 | * | Jesin quit (Quit: Leaving) |
16:18:07 | * | hoijui quit (Ping timeout: 252 seconds) |
16:21:22 | zacharycarter | TheLemonMan: https://gist.github.com/zacharycarter/adead6469d75c88989a836548dca42be |
16:22:08 | * | nsf quit (Quit: WeeChat 2.2) |
16:23:11 | zacharycarter | or maybe not |
16:25:44 | * | wildlander joined #nim |
16:29:11 | zacharycarter | this backtick thing is killing me |
16:32:21 | * | sagax joined #nim |
16:33:02 | TheLemonMan | what's the problem? |
16:34:35 | zacharycarter | JS uses backticks to construct string literals |
16:34:59 | zacharycarter | I'm using quote do: and then emitting a bunch of JS with backticks in it to escape nim symbols |
16:35:17 | zacharycarter | but if I need to escape a Nim symbol and use it in a string literal |
16:35:27 | zacharycarter | I'm screwed atm |
16:35:53 | zacharycarter | err template literals sorry |
16:36:01 | FromGitter | <mratsim> @TheLemonBoy, criterion is not in Nimble btw |
16:36:56 | TheLemonMan | mratsim, yeah, I wanted some feedback on the api/design before uploading it but got none :\ |
16:38:58 | TheLemonMan | zacharycarter, are you sure the custom quote chars isn't working for you? |
16:39:59 | * | Jesin joined #nim |
16:43:03 | zacharycarter | TheLemonMan: what is the custom quote char? |
16:43:14 | zacharycarter | oh in the quote macro? |
16:43:18 | zacharycarter | I'm not sure how to pass it, along with a block |
16:43:29 | TheLemonMan | the problem in that gist is that quote cannot replace stuff inside the string literals |
16:43:56 | zacharycarter | yeah |
16:44:04 | TheLemonMan | evaluatedJS is a nimnode? |
16:46:55 | zacharycarter | it's a string |
16:48:03 | zacharycarter | TheLemonMan - I added another simpler example, but it's still not working :/ - I need to run out to meet my pops for lunch but I will be back in about an hour or so |
16:49:52 | TheLemonMan | zacharycarter, like this? https://gist.github.com/0a64ca37c3e04374406faf920e7b5daa |
16:51:36 | * | leorize quit (Quit: WeeChat 2.2) |
16:52:27 | * | zacharycarter quit (Ping timeout: 252 seconds) |
16:59:10 | * | sentriz11 joined #nim |
17:02:03 | * | sentriz11 quit (Remote host closed the connection) |
17:02:48 | * | Reception12316 joined #nim |
17:03:36 | * | Reception12316 quit (Remote host closed the connection) |
17:07:51 | * | leorize joined #nim |
17:10:37 | * | demtomohiro joined #nim |
17:13:00 | * | demtomohiro quit (Client Quit) |
17:13:35 | * | demtomohiro joined #nim |
17:56:14 | * | rockcavera joined #nim |
18:10:38 | * | zachcarter joined #nim |
18:11:28 | zachcarter | TheLemonMan: let me try that - that looks right |
18:29:36 | FromGitter | <rayman22201> Jon Blow rants about Rust, interesting stuff: https://www.youtube.com/watch?v=4t1K66dMhWk |
18:29:49 | FromGitter | <rayman22201> Araq should make videos ranting about things more often /s :-P |
18:33:55 | TheLemonMan | "old man yells at cloud" |
18:39:13 | * | Trustable joined #nim |
18:39:18 | * | Strogg16 joined #nim |
18:42:04 | * | Strogg16 quit (Remote host closed the connection) |
18:44:34 | FromGitter | <rayman22201> Don Quixote |
18:57:20 | zachcarter | TheLemonMan: i guess I was confused about the backticks in quasi-quotes |
18:57:34 | zachcarter | what I really need to be able to do - is change how Nim symbols are escaped in the AST :/ |
18:57:43 | zachcarter | or have a way to put a backtick literal in |
19:03:44 | FromGitter | <alehander42> Actually that's a good point about moving the problem further down the road by blow |
19:05:31 | * | krux02 quit (Remote host closed the connection) |
19:05:40 | * | modrobert2 joined #nim |
19:10:26 | * | modrobert2 quit (Remote host closed the connection) |
19:20:52 | zachcarter | anyone aware of any way to put a backtick into a string that's being emitted inside a quote block - without it being treated as a nim value? In other words - a literal backtick |
19:22:14 | TheLemonMan | `` ? |
19:23:49 | zachcarter | thanks |
19:30:46 | shashlick | has anyone worked on some caching improvements to speed up the nim build on appveyor and travis? |
19:35:10 | * | demtomohiro quit (Quit: Leaving) |
19:38:39 | * | demtomohiro joined #nim |
19:39:06 | * | zachcarter quit (Ping timeout: 252 seconds) |
19:42:31 | * | francisl joined #nim |
19:51:00 | * | PMunch joined #nim |
19:56:14 | francisl | hey, is it possible to use the `find` proc with a matching proc instead of single item? not sure I understand the doc correctly (still new to it). e.g. let store: seq[array[2, string]] = @[]; find(seq, proc(item: string): bool = item[0] == valueX) |
19:58:24 | ng0 | when you don't use nimble to install https://github.com/nim-lang/x11 , do you just nim c all files in src and copy to the place you want it at? still very early and I'm tired. |
20:00:22 | * | rockcavera quit (Ping timeout: 246 seconds) |
20:01:06 | * | cspar joined #nim |
20:06:08 | shashlick | ng0: it's a library so you import it in your app and put it in a relative dir |
20:06:19 | shashlick | you nim c your app |
20:07:45 | ng0 | okay. so since I'm working on this in terms of system integration from 0, i just read the docs and generic ways to handle this. |
20:11:33 | ng0 | thanks. i'll catch some sleep, should work better afterwards. |
20:14:57 | FromGitter | <Vindaar> @francisl: I'm not quite sure if I understand you correctly. You want to have a `find` proc that takes a proc defining the criterion if an element is found? |
20:20:37 | * | tspjf joined #nim |
20:21:24 | Araq | alehander42: can you elaborate? I skimmed the video and didn't find any insights tbh |
20:22:25 | Araq | Mr Blow talks about how he cannot afford to lose 5-10% productivity and yet he uses C++ instead of C# or something else |
20:23:22 | * | cnu-22 joined #nim |
20:26:10 | * | cnu-22 quit (Remote host closed the connection) |
20:26:59 | FromGitter | <rayman22201> Well, He is using his Jai language now |
20:27:34 | francisl | @Vindaar: from what I undertand, `find` needs a match item, but in my case, I don’t know what it is except for the first element of the item array. So I would like to have a matching proc to match agains the first element |
20:29:00 | * | miran quit (Ping timeout: 252 seconds) |
20:30:37 | Araq | rayman22201: meh ... fair enough I guess |
20:31:37 | FromGitter | <rayman22201> lol |
20:32:47 | FromGitter | <rayman22201> @francisl, your item isn't of type string, it would be of type array[2, string], I think? |
20:33:47 | FromGitter | <rayman22201> `find(seq, proc(item:array[2,string]): bool = item[0] == valueX)` |
20:33:47 | francisl | @rayman22201: correct, but I want to match against array[0] |
20:34:22 | FromGitter | <Vindaar> Do you need explicitly 1 (or the first) element matching `array[0]`? |
20:35:27 | * | tspjf left #nim (#nim) |
20:35:33 | FromGitter | <Vindaar> if not you could use `sequtils.filter` or `filterIt` and do `let fit = yourInput.filterIt(it[0] == YourMatchingObject)`, which will give you a `seq` of items in your input seq, matching the first value of your array |
20:36:48 | * | noonien quit (Quit: Connection closed for inactivity) |
20:37:20 | francisl | I had it working with filter, but I was looking for something a bit cleaner, as I would do in js |
20:39:09 | * | francisl quit (Quit: francisl) |
20:39:45 | FromGitter | <rayman22201> How would you do it in JS? I'm still not sure what the issue is? |
20:40:09 | TheLemonMan | with a node.js module? how else? :P |
20:40:15 | FromGitter | <rayman22201> lmao |
20:41:33 | FromGitter | <alehander42> @Araq I just read a summary in https://www.reddit.com/r/rust/comments/9fqget/jonathan_blow_entity_systems_and_the_rust_borrow/ but the <in a parituclar situation borrow checker makes me reimplement the stuff with a different pattern which actually still leads to incorrectness, but a different kind and more hidden> thing sounded reasonable |
20:41:54 | Xe | btw, does nim have a working webassembly backend, even if i can't use a lot of system yet? |
20:42:02 | Xe | i've been doing some rust and i'm done with rust |
20:42:12 | Xe | i want normal programming back |
20:42:23 | Xe | i'm willing to work with you guys to help the webassembly backend support what i'm targeting |
20:42:32 | Xe | i'm doing server-side webassembly without JS |
20:42:53 | PMunch | https://www.spiria.com/en/blog/web-applications/webassembly-nim |
20:42:59 | FromGitter | <rayman22201> The funny thing is that I found nim because I was looking for something like Jai that I could actually use, also after playing with Rust and hating it. |
20:43:32 | Xe | i just want normal mutability back |
20:43:34 | Xe | tbh |
20:44:10 | TheLemonMan | Xe, see also https://github.com/nim-lang/Nim/pull/8738 |
20:44:17 | FromGitter | <alehander42> @Xe I think some people used nim -> c++ [ermscripten] -> webasm |
20:44:26 | Xe | yeah i don't wanna do emscripten |
20:44:32 | FromGitter | <alehander42> and also one guy is working on a wasm backend |
20:44:34 | Xe | i wanna just have raw webassembly as much as possible |
20:44:41 | FromGitter | <alehander42> https://github.com/stisa/nwasm |
20:45:41 | Xe | TheLemonMan: emscripten is useless to me given there is no javascript involved in my webassembly execution |
20:46:22 | Xe | i'm doing server-side webassmbly with no Javascript whatsoever |
20:47:07 | TheLemonMan | I see, I'm not very practical when it comes to those newfangled web thingies |
20:47:17 | FromGitter | <alehander42> what is the benefit of webassembly on a server o.O |
20:47:44 | Xe | you're not reliant on the hardware anymore and can take your existing deployed units and run them as long as the runtime works |
20:47:57 | Xe | https://github.com/Xe/olin for my git repo |
20:48:04 | FromGitter | <alehander42> so, the virtual machine argument ? |
20:48:21 | Xe | also, i wanna do stuff like create a syscall-adjusted runtime metric |
20:48:44 | Xe | unix processes limit what you can do |
20:51:55 | AlexMax | shashlick: Hi. Not sure how much longer I'm going to have power, but I think I've found another problem. |
20:52:29 | shashlick | what's up |
20:53:37 | * | rockcavera joined #nim |
20:53:42 | AlexMax | I think the header wasn't preprocessed with the same defines |
20:53:55 | shashlick | good point |
20:54:01 | AlexMax | Because I'm missing some definitions |
20:54:37 | AlexMax | I'm looking into how to fix it - I think I found a promising configuration parameter that might help out |
20:54:58 | shashlick | its an easy fix, let me push |
20:55:01 | AlexMax | ppflag |
20:55:09 | shashlick | yep |
20:55:22 | AlexMax | oh man, I hope this doesn't mean more potential problems with the newly-imported stuff |
20:55:30 | shashlick | fingers crossed 😄 |
21:02:10 | * | nsf joined #nim |
21:05:58 | shashlick | well, if I include NK_INCLUDE_STANDARD_VARARGS, c2nim fails |
21:06:03 | shashlick | on windows |
21:06:09 | shashlick | but without it, it doesn't work for you |
21:13:02 | AlexMax | shashlick: I don't think that define was part of the defines that I needed to get it running |
21:13:18 | AlexMax | I think that define came from zach's library |
21:13:33 | Araq | Nim can compile to C, you can compile C to wasm. alternatively use Nim's LLVM code generator to compile to wasm |
21:13:53 | AlexMax | And looking at the functions it defines, it looks like it just defines a bunch of printf-family functions |
21:14:16 | AlexMax | Which, since we're using Nim and have access to _its_ formatting libs, I think can be safely elided |
21:14:49 | Araq | alehander42: that's basically "pointers vs indexes" and I'm completely and utterly sold on indexes :-) |
21:14:52 | * | francisl joined #nim |
21:15:22 | AlexMax | since somebody can just call the non-printf-family versions with an already-formatted string |
21:15:46 | AlexMax | Here's a list of all the defines |
21:15:59 | AlexMax | https://github.com/vurtun/nuklear/blob/master/src/HEADER#L96 |
21:16:05 | * | Vladar quit (Remote host closed the connection) |
21:20:08 | shashlick | AlexMax: you needed it to stop hanging on Windows |
21:20:33 | shashlick | anyway, i don't need it |
21:20:34 | AlexMax | Oh - does it hang on windows without that define? |
21:20:41 | shashlick | let's see, i have a workaround |
21:20:51 | shashlick | adding all the defines now results in more changes |
21:21:12 | AlexMax | The only define I needed to add to get it to stop hanging was NK_INCLUDE_FIXED_TYPES |
21:21:38 | AlexMax | I was able to compile it on my end with just that define |
21:21:52 | AlexMax | And then we decided to grab a few other defines from zach's library for good measure |
21:21:55 | Xe | Araq: nim's LLVM codegen? |
21:22:21 | shashlick | ok, let's see |
21:22:30 | AlexMax | And I think we grabbed one too many :P |
21:23:51 | Araq | Xe, 'nlvm' is its name |
21:23:59 | Xe | Araq: doc link? |
21:24:04 | Araq | a fork of Nim that replaces the C backend with an LLVM one |
21:25:21 | francisl | @rayman22201: sorry was afk, like https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex you simply pass a function. So whatever is the type of the array you can have a custom checker. btw, I can’t get the find proc work with a function, I guess I’ll stop trying for the moment |
21:25:29 | shashlick | AlexMax: please pull |
21:25:32 | shashlick | should work better now |
21:26:08 | Xe | Araq: i'll have to give it a try and report back |
21:27:10 | * | PMunch quit (Ping timeout: 246 seconds) |
21:27:45 | shashlick | got 300 more lines of resulting code I think |
21:28:23 | shashlick | well, good thing is, thanks to the nuklear wrapper, I now have a way to deal with forward declarations pretty quickly |
21:28:58 | shashlick | still a pain to deal with enums not in order though |
21:29:24 | FromGitter | <Vindaar> @francisl: some ways to do it (`find3` is basically the `findIndex` you linked, if I'm not mistaken) http://ix.io/1mIU/nim |
21:29:35 | AlexMax | Okay, nuklear test app seems to work on linux |
21:30:09 | shashlick | can you push some examples to the repo eventually? |
21:30:20 | AlexMax | shashlick: Will do |
21:30:28 | shashlick | how about a screenshot |
21:30:31 | AlexMax | I've got it checked out and was working on porting one of the demos |
21:30:59 | AlexMax | but lack of font_atlas was kind of an immediate "uh oh" |
21:31:03 | AlexMax | one sec |
21:32:59 | AlexMax | Okay, windows test seems to compile |
21:33:10 | AlexMax | (I mean the empty "test" you already have) |
21:33:35 | AlexMax | shashlick: I think I'm good for now, will let you know if I run into something else |
21:33:50 | AlexMax | Thanks again |
21:34:15 | shashlick | neat |
21:34:44 | shashlick | hope zachcarter checks out this repo at some point |
21:40:02 | * | PMunch joined #nim |
21:41:28 | * | nsf quit (Quit: WeeChat 2.2) |
21:41:39 | AlexMax | woaaaaaaaaaaaaaaaaa what the hecking heck |
21:42:13 | AlexMax | Once i got rid of the forward declarations of all the proceedures, the c2nim'ed source just....compiled |
21:42:37 | AlexMax | That's actually a bit frightening |
21:42:44 | shashlick | brilliant |
21:42:58 | shashlick | but that's a ton of moving around |
21:43:07 | AlexMax | ...for one of the modules |
21:43:20 | AlexMax | the sample is split into at least two source files, maybe more |
21:43:39 | shashlick | oh you mean an example? not nuklear.h? |
21:44:50 | AlexMax | https://github.com/vurtun/nuklear/blob/master/demo/sdl_opengl3/nuklear_sdl_gl3.h |
21:44:52 | AlexMax | this file |
21:45:07 | AlexMax | I coaxed c2nim into giving me a nim source file |
21:45:26 | AlexMax | oh, son of a gun |
21:45:30 | AlexMax | there's a define wrapping the whole thing |
21:45:34 | FromGitter | <Bennyelg> where is the `import sugar` can be found? |
21:45:58 | AlexMax | no wonder it wasn't giving me any compile errors |
21:46:13 | shashlick | plus it doesn't include nuklear.h stuff |
21:46:15 | AlexMax | hard to get compile errors for code that doesn't compiie :P |
21:46:31 | FromGitter | <Vindaar> `sugar` is the new name for the `future` module. I imported it in the script up there, because I wanted to use the `->` and `=>` macros, but then decided not to |
21:46:37 | FromGitter | <Vindaar> @Bennyelg |
21:46:55 | FromGitter | <Bennyelg> go it |
21:47:19 | * | francisl quit (Quit: francisl) |
21:50:32 | FromGitter | <kaushalmodi> Guys, I am starting nightly build of Nim docs here: https://kaushalmodi.github.io/nim-nightly-docs/theindex.html |
21:51:29 | AlexMax | @kaushalmodi Oh wow, thanks |
21:51:32 | AlexMax | That owns |
21:52:39 | FromGitter | <Vindaar> @kaushalmodi oh, nice! that's a great idea :) |
21:55:27 | * | zachcarter joined #nim |
21:57:51 | zachcarter | I have a macro that interprets a DSL, and the an example of the DSL is here - https://gist.github.com/zacharycarter/9e24d92013a7e0b84d9c859d7d0f45f8 |
21:58:18 | zachcarter | if you look at the last line - I'm turning this into a string literal, and then emitting it inside of a quote do block |
21:59:04 | FromGitter | <Bennyelg> @zacharycarter this render to javascript? |
21:59:21 | zachcarter | the problem I'm having is - I need the last part of the argument - `rt` to actually be encapsulated in another set of backticks, and it still needs to place the value of rt there (rt being a cstring) |
21:59:27 | zachcarter | Bennyelg - yes |
21:59:33 | FromGitter | <Bennyelg> cool |
21:59:43 | zachcarter | it's going into a macro that is taking two untyped parameters |
22:00:03 | FromGitter | <Bennyelg> looks like react style |
22:00:07 | zachcarter | but adding another backtick in front of `rt causes the code to not compile |
22:00:15 | zachcarter | does anyone have any idea how I can make this work? |
22:00:32 | FromGitter | <Bennyelg> I wish I could help you. |
22:01:06 | FromGitter | <Bennyelg> How do you run this code and where do you see the output? |
22:01:12 | FromGitter | <Bennyelg> you compile it using c compiler i guess |
22:01:18 | zachcarter | I haven't posted the code anywhere yet |
22:01:20 | zachcarter | no it's JS backend |
22:01:41 | FromGitter | <Bennyelg> I c, |
22:02:23 | TheLemonMan | with no code we can't do much, can you show us the wrong generated ast at least? |
22:03:11 | zachcarter | I'll post example code - one second |
22:03:28 | zachcarter | it's just a large project |
22:03:37 | zachcarter | I'll try to reproduce the issue |
22:05:34 | * | kapil___ quit (Quit: Connection closed for inactivity) |
22:08:49 | * | PMunch quit (Ping timeout: 246 seconds) |
22:13:28 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
22:19:23 | zachcarter | https://gist.github.com/ |
22:19:35 | zachcarter | I think that explains it fairly well |
22:20:51 | FromGitter | <kayabaNerve> zachcarter You linked gist; not a gist lol |
22:21:02 | zachcarter | sorry |
22:21:09 | zachcarter | lmao |
22:22:19 | zachcarter | thank you for pointing that out |
22:22:20 | zachcarter | https://gist.github.com/zacharycarter/641077d2603be1b9be860d7a721b3a13 |
22:24:07 | AlexMax | man, offsetof would be amazing |
22:26:45 | AlexMax | built-in, of course |
22:28:37 | * | peril joined #nim |
22:30:10 | * | Trustable quit (Remote host closed the connection) |
22:42:11 | zachcarter | ugh - I can't use JS regex's because I can't import it at compile time :/ |
22:42:32 | Araq | :-) |
22:43:20 | zachcarter | these backticks are a pain - stupid JS! I need them for work though |
22:45:03 | zachcarter | maybe I can use strscans? |
22:46:18 | * | xet7 quit (Quit: Leaving) |
22:47:27 | Araq | 'scanf' is superb IMO |
22:47:36 | FromGitter | <arnetheduck> how long does `thavlak` typically take? it's 11 minutes and counting on a run I'm seeing right now... |
22:48:03 | Araq | thavlak is an overly long test but 11 minutes seems excessive |
22:48:41 | * | zimboboyd joined #nim |
22:51:22 | FromGitter | <rayman22201> Just got back to my keyboard from lunch. @kaushalmodi Thank you for the nightly docs! That's awesome! @francisl I understand your issue now! You want a version of find that takes a predicate function, not just an item. Are you trying to avoid the extra allocation of the results sequence that filterIt does? If that is the case, the iterator version of filter doesn't do any extra allocation, and might do what you |
22:51:22 | FromGitter | ... want. https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/sequtils.nim#L280 |
22:51:49 | Araq | we have nightly docs? |
22:52:06 | FromGitter | <rayman22201> https://kaushalmodi.github.io/nim-nightly-docs/theindex.html |
22:52:22 | FromGitter | <rayman22201> Thanks to @kaushalmodi we do now :-) |
22:53:35 | * | zimboboyd quit (Remote host closed the connection) |
22:53:53 | FromGitter | <rayman22201> assuming he keeps them up to date :-P |
22:54:12 | Araq | well nightly builds is on my radar too |
22:54:36 | FromGitter | <rayman22201> A full nightly build would also be very useful |
22:55:07 | FromGitter | <drewp> let cb: mgos_gpio_int_handler_f = proc(pin: cint, arg: pointer) = ... ⏎ ⏎ main.nim(17, 37) Error: type mismatch: got <proc (pin: cint, arg: pointer){.noSideEffect, gcsafe, locks: 0.}> but expected 'mgos_gpio_int_handler_f = proc (pin: cint, arg: pointer){.cdecl.}' ⏎ ⏎ ```let cb: mgos_gpio_int_handler_f = proc(pin: cint, arg: pointer) = ``` ... [https://gitter.im/nim-lang/Nim?at=5b9c3c4bf08bc22dfb5ace58] |
22:55:58 | * | dan12324 joined #nim |
22:55:58 | FromGitter | <arnetheduck> ok, weird then.. 760 seconds for `-d:release --gc:markandsweep`.. wonder what's up with that |
22:56:26 | Araq | takes 8 seconds on my machine |
22:56:48 | Araq | so maybe 10 on yours but shouldn't take 760 :-) |
22:57:43 | FromGitter | <kayabaNerve> What if my machine is an original Xbox I installed damn small Linux on though |
22:58:45 | * | dan12324 quit (Remote host closed the connection) |
23:00:16 | FromGitter | <rayman22201> @drewp I'm not sure about the other pragmas, but I think you have to declare your function with cdecl because that changes the calling convention of the function. Nim is not going to automagically change the calling convention. |
23:01:18 | FromGitter | <drewp> indeed- that does get me further. I see that the other calling convention needs a 2nd arg (somehow), and my c lib actually does support a void* user param, so maybe there's a way to use that. NBD for now, though. |
23:05:02 | FromGitter | <kaushalmodi> @rayman22201 It's set up as a simple cron in Travis. If the build fails, the docs won't update. |
23:05:31 | FromGitter | <kaushalmodi> @Araq You can may be pull this repo into the Nim organization so that it gets a better domain. |
23:05:56 | FromGitter | <kaushalmodi> There's nothing special about the repo. It's just the .travis.yml. |
23:07:10 | FromGitter | <rayman22201> @drewp I suppose you could remove the cdecl pragram from the handler argument, but then you better be sure to handle what ever Nim gives you. I remember Araq saying on windows it uses fastcall. It looks like you are doing an embedded thing (awesome btw), so that may not apply to you. On unixes it probably just uses the standard gcc C++ calling convention, I would guess. Araq is the person to ask about Nims normal |
23:07:10 | FromGitter | ... calling convention in detail. |
23:07:26 | Araq | kaushalmodi, create a PR please patching the .travis.yml? |
23:08:00 | FromGitter | <rayman22201> probably easier to cdecl all the things :-P |
23:09:45 | Araq | well yeah, the standard is 'fastcall' but it only really applies on Windows, x86, 32 bits |
23:09:59 | FromGitter | <kaushalmodi> Araq: Yes, just noticed that the Nim core repo does not have a gh-pages branch.. so patching the current travis.yml would work |
23:10:00 | Araq | x86_64 sorted that out for us |
23:10:29 | Araq | good night |
23:11:34 | FromGitter | <rayman22201> good night! |
23:11:51 | * | peril quit (Remote host closed the connection) |
23:14:04 | * | zachcarter quit (Ping timeout: 240 seconds) |
23:16:59 | FromGitter | <rayman22201> @zacharycarter This is kind of a 'hacky' idea, but you could find all the AccQuoted nodes in the AST and manually parse it to the correct string? does that make sense? |
23:43:16 | FromGitter | <Bennyelg> Hey I need help |
23:43:51 | FromGitter | <Bennyelg> I tried to "modify" the behavior of the key value by just printing something before every key assignment |
23:43:55 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b9c47bbb4990c30eeb85460] |
23:44:13 | FromGitter | <Bennyelg> what am i doing wrong I am get stack overflow |
23:45:12 | FromGitter | <Bennyelg> Oh im calling my self endless time I got it :/ |
23:46:22 | * | skelett quit (Ping timeout: 252 seconds) |
23:54:40 | AlexMax | hrm, c2nim seems to get horribly confused by this invocation here |
23:54:42 | AlexMax | https://github.com/vurtun/nuklear/blob/master/demo/glfw_opengl3/nuklear_glfw_gl3.h#L258 |
23:55:05 | AlexMax | Tries to turn it into a pointer |
23:56:03 | AlexMax | and doesn't mutate the nested arrays into object invocations |
23:56:17 | FromGitter | <Bennyelg> How Do I refer to my variable length if I am on macro ? |