00:03:23 | FromGitter | <zetashift> W/e the outcome will be I hope this gets squashed soon I don't like dragging these kind of things out |
00:08:15 | * | PMunch joined #nim |
00:10:17 | sendell[m] | grepping is actually harder because of underscores, IMO |
00:10:46 | sendell[m] | plus you could easily miss occurences because of typos |
00:11:25 | * | shashlick_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
00:12:02 | * | shashlick_ joined #nim |
00:13:04 | sendell[m] | but I get the point about using libs the way you want, that's rather nice |
00:13:20 | shashlick_ | use nimgrep |
00:13:57 | sendell[m] | yeah I'll have a look at it |
00:14:16 | shashlick_ | its quite nice actually, like most Araq Inc products |
00:14:55 | sendell[m] | ahah :P |
00:17:16 | sendell[m] | we should have the "find all occurences" and "rename all occurences" working in vscode pluggin, that would help too |
00:20:05 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:28:47 | * | wildlander quit (Quit: Konversation terminated!) |
00:32:06 | * | rockcavera joined #nim |
00:35:28 | FromGitter | <zetashift> Can I do an early return in nim? |
00:35:54 | FromGitter | <zetashift> eg in a proc `if myBool: #break early out of the proc` |
00:36:47 | FromGitter | <kayabaNerve> return |
00:36:53 | FromGitter | <zetashift> nvm got it needed `return none(bool)` |
00:37:00 | FromGitter | <zetashift> :D |
00:37:12 | FromGitter | <kayabaNerve> Plain return returns result |
00:37:52 | FromGitter | <zetashift> ay thanks! |
00:43:21 | FromGitter | <arnetheduck> @Varriount anything that the compiler doesn't enforce in terms of consistency is something that eventually will be used within a project ;) |
00:44:51 | * | PMunch quit (Remote host closed the connection) |
01:03:49 | FromGitter | <yyyc514> what is the compiler option to see the actual source macros generate in the compiler output? |
01:03:51 | FromGitter | <yyyc514> i can't find it |
01:05:08 | shashlick_ | echo X.repr |
01:05:08 | FromGitter | <yyyc514> ah maybe ? |
01:06:04 | * | theelous3 quit (Ping timeout: 246 seconds) |
01:10:21 | FromGitter | <yyyc514> ok one can learn a lot when you dump the code that async generates :) |
01:27:17 | FromGitter | <m4d3bug> hi guys,I having some question about why my smtp's code can't work |
01:27:32 | FromGitter | <m4d3bug> https://github.com/nim-lang/Nim/issues/9728 |
01:29:09 | FromGitter | <m4d3bug> hi guys,I am having some question about why my smtp's code can't work |
01:35:02 | FromGitter | <Varriount> @m4d3bug You mean, how to initialize thread local storage? |
01:49:45 | FromGitter | <m4d3bug> why i change the sslcontext's code in my local version like http work so work it in compile time |
01:49:52 | FromGitter | <m4d3bug> @Varriount |
01:50:20 | FromGitter | <Varriount> I don't understand what you are typing. |
01:51:47 | FromGitter | <m4d3bug> Did Andreas means the change in my local version is unnecessary? |
01:52:45 | FromGitter | <m4d3bug> the local version of nim's code |
01:52:51 | FromGitter | <Varriount> Both versions are wrong |
01:53:51 | FromGitter | <Varriount> `defaultSSLContext` needs to be initialized in each thread's running procedure |
01:53:53 | * | xace quit (Remote host closed the connection) |
01:54:22 | FromGitter | <Varriount> Not in the global module scope. |
01:56:16 | FromGitter | <m4d3bug> but one of the versions is the source code of the nim,that is wrong too? |
01:56:31 | * | xace joined #nim |
01:57:58 | FromGitter | <Varriount> Look at line 76 in smtp.nim |
02:01:00 | shashlick_ | time to name a new library |
02:07:42 | FromGitter | <m4d3bug> Would u mind explain this line more clearly? @Varriount |
02:10:47 | FromGitter | <Varriount> `proc getSSLContext(): SSLContext =` is used to get the SSL context in the library. |
02:11:24 | FromGitter | <Varriount> It checks if `defaultSSLContext` is nil, and if it is, initializes it. |
02:11:40 | FromGitter | <Varriount> then it returns defaultSSLContext. |
02:12:36 | FromGitter | <Varriount> When a new thread starts, `defaultSSLContext` is nil. When the smtp module needs to get the context, it will call that procedure and intitialize it and retrieve it. |
02:23:02 | * | dddddd quit (Remote host closed the connection) |
02:31:49 | FromGitter | <yyyc514> damn async driving me nuts |
02:37:40 | * | vlad1777d quit (Ping timeout: 268 seconds) |
02:39:40 | FromGitter | <m4d3bug> @Varriount so i should wait Andreas to fix this bug? |
02:53:26 | * | Shadow__ quit (Quit: Page closed) |
03:05:39 | * | banc quit (Quit: ZNC - http://znc.in) |
03:21:48 | * | banc joined #nim |
03:32:42 | FromGitter | <Varriount> @m4d3bug this only occurs in your code? |
04:16:38 | FromGitter | <m4d3bug> (https://files.gitter.im/nim-lang/Nim/egj2/image.png) |
04:16:43 | FromGitter | <m4d3bug> (https://files.gitter.im/nim-lang/Nim/WnLd/image.png) |
04:17:47 | FromGitter | <m4d3bug> @Varriount My colleague nim's version is nim 0.19.0 just causing this error |
04:18:20 | FromGitter | <m4d3bug> why my version is 0.19.1 |
04:20:04 | FromGitter | <m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf239f4b86c70503f52625b] |
04:20:24 | FromGitter | <m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf23a0880e46b4266d35ae8] |
04:24:13 | FromGitter | <m4d3bug> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf23aedf9993b426730451f] |
04:24:47 | FromGitter | <m4d3bug> here is my line 70-76 in smtp.nim |
04:37:18 | * | nsf joined #nim |
05:25:22 | leorize | m4d3bug: I think you're running an outdated devel version |
05:25:26 | leorize | devel is now 0.19.9 |
06:05:49 | * | muffs joined #nim |
06:08:53 | * | muffs left #nim (#nim) |
06:50:02 | FromGitter | <zacharycarter> anyone have any experience with c2nim and C++ |
06:50:08 | FromGitter | <zacharycarter> specifically regarding tildes and destructors |
06:51:59 | FromGitter | <zacharycarter> hmm i'm probably not accurately identifying what is going on / wrong with my nimgen script |
06:52:05 | FromGitter | <zacharycarter> getting too tired for this anyway |
07:09:22 | FromGitter | <gogolxdong> Is there a x509 library? |
07:12:13 | * | stefanos82 joined #nim |
07:14:25 | * | dddddd joined #nim |
07:25:11 | FromGitter | <gogolxdong> Does openssl module support TLS 1.3? |
07:26:35 | leorize | if the openssl library in your system supports it |
07:31:52 | FromGitter | <gogolxdong> const versions = "(.1.1|.38|.39|.41|.43|.44|.45|.46|.10|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|)" |
07:34:47 | * | krux02 joined #nim |
07:38:41 | FromGitter | <gogolxdong> 1) 3 is quite different from 1.1 or 1.2, is a new built openssl-1.3 .so enough? |
07:39:38 | * | vlad1777d joined #nim |
08:01:46 | FromGitter | <gogolxdong> openssl 1.1.1 supports TLS 1.3 |
08:03:48 | FromGitter | <gogolxdong> openssl s_client -connect intl.jdair.net:443 -tls1_3 |
08:12:59 | * | c15ade4 quit (Quit: WeeChat 2.0) |
08:31:08 | FromGitter | <gogolxdong> @PMunch Would mind looking at a custom parser like what you did in supportedVersions? |
08:31:10 | FromGitter | <gogolxdong> http://ix.io/1syi |
08:31:41 | FromGitter | <xmonader> is it possible to have separate loggers (one always print to the console and the other one print to a file (with extra details) ) |
08:35:43 | leorize | obviously depends on how you're doing the logging |
08:36:01 | leorize | usually people seperate it to different levels |
08:36:11 | leorize | so yea, it's possible |
08:51:38 | FromGitter | <xmonader> @leorize Ah it's called levelThreshold I see thanks .. |
09:01:34 | * | floppydh joined #nim |
09:28:50 | Araq | <insert obligatory "don't log, write to a db" rant here> |
09:31:50 | FromGitter | <AchalaSB> Hey, Im trying to run simple Nim code. ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Getting an error `test1.nim(3, 3) Error: invalid indentation` [https://gitter.im/nim-lang/Nim?at=5bf28306ddad8777ef8914e6] |
09:33:28 | FromGitter | <AchalaSB> The keyword check is not supporting. What will be the alternative? |
09:35:33 | Araq | there is no alternative, indent your code |
09:49:21 | * | salewski joined #nim |
09:49:32 | FromGitter | <Varriount> @AchalaSB Indent the third line by two spaces |
09:56:51 | * | salewski quit (Quit: WeeChat 2.2) |
09:58:54 | FromGitter | <AchalaSB> Spacing is not an issue here. |
09:59:43 | FromGitter | <AchalaSB> Is there any way to call function `getWelcomeMessage` inside the main proc? |
09:59:52 | FromGitter | <narimiran> of course it is |
10:13:53 | leorize | AchalaSB: spacing is the issue here |
10:14:14 | leorize | a block cannot be empty |
10:14:22 | leorize | either you give it something |
10:14:24 | leorize | or remove it |
10:17:10 | FromGitter | <alehander42> what are you trying to do overally? |
10:17:45 | FromGitter | <alehander42> @AchalaSB probably you want to just call a function and check manually if it gives you a certain output |
10:23:45 | FromGitter | <alehander42> ok, it seems you can actually run `test` directly in a proc, I didn't know that |
10:24:50 | FromGitter | <alehander42> nvm |
10:51:12 | sendell[m] | do we have a sorted deque somewhere? |
10:56:22 | FromGitter | <narimiran> @sendell[m] there is deque module: https://nim-lang.org/docs/deques.html#%24%2CDeque[T] |
10:56:48 | FromGitter | <narimiran> correct link: https://nim-lang.org/docs/deques.html |
10:56:55 | sendell[m] | I know about this one, but it's more a rinbuffer actually |
10:57:24 | sendell[m] | what I'm looking for is a real linked list, that sorts on insertion |
10:59:27 | FromGitter | <narimiran> there is lists module too, implementing singly and doubly linked lists, but AFAIK it doesn't sort on insertion |
11:00:55 | sendell[m] | I'll have a look at it :) |
11:01:35 | FromGitter | <narimiran> would heap queue do the trick for you? |
11:07:29 | sendell[m] | anything that guarantees sort on insertion, and that is implemented in a way that it doesnt require to shift everything on random insertion. That's why I'm talking about linked list but it might be some kind of sorted tree or anything else :) |
11:07:55 | sendell[m] | not sure what a heap queue is, I'll check |
11:08:52 | sendell[m] | oh actually the correct term of what I'm looking for is "priority queue" :) |
11:10:30 | * | rokups joined #nim |
11:16:57 | sendell[m] | looks like nim's heapqueue is just what I was looking for, thank you ! |
11:21:04 | FromGitter | <narimiran> cheers! |
11:34:38 | * | ng0 joined #nim |
11:36:40 | * | qwertfisch is now known as qwretfisch |
12:01:40 | FromGitter | <AchalaSB> How to fix this error `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim(252, 3) Error: type mismatch: got <seq[char]> but expected'string' ` ⏎ Here is my code ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a6242ef5b06e408d9e6a] |
12:04:14 | * | ng0 quit (Remote host closed the connection) |
12:04:18 | leorize | what's the implementation of `getWelcomeMessage()`? |
12:06:02 | * | ng0 joined #nim |
12:06:03 | FromGitter | <AchalaSB> Its just a procedure call. Here it is `proc getWelcomeMessage*(): string = "Hello, World!" ` ⏎ The main code will execute if test is passed |
12:06:36 | leorize | can you paste the entire build log? |
12:06:53 | leorize | I suspect it has something to do with the exportwasm macro |
12:07:47 | FromGitter | <AchalaSB> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a7934bad337eb902ed9c] |
12:08:17 | FromGitter | <AchalaSB> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2a7b12735965dfefcd277] |
12:08:38 | leorize | now this is weird |
12:08:43 | leorize | may I have the entire build log? |
12:10:06 | FromGitter | <AchalaSB> Im just importing above code in my main code using `import ` command |
12:12:21 | leorize | I can't reproduce it here |
12:12:34 | leorize | the everything compiles here |
12:12:51 | leorize | so the entire build log will definitely be useful |
12:13:51 | FromGitter | <narimiran> @AchalaSB when you edit your message on gitter, people on IRC don't see the edited version, IIRC |
12:14:21 | leorize | neither could you delete your messages ;) |
12:14:33 | FromGitter | <AchalaSB> Can you let me know why this error is comming. ⏎ `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim(252, 3) Error: type mismatch: got <seq[char]> but expected'string' ` |
12:15:17 | leorize | everything is in there |
12:15:42 | leorize | something is calling runeStrAtPos on a seq[char] and not string |
12:16:22 | FromGitter | <AchalaSB> How to call String explicitly in Nim? Im thinking it may solve this issue |
12:16:32 | FromGitter | <narimiran> @AchalaSB without `{.exportwasm.}` your example works fine |
12:16:45 | leorize | you can't get the same error even with it |
12:16:49 | FromGitter | <narimiran> `[OK] correct welcome` is printed |
12:16:57 | FromGitter | <AchalaSB> Ya it was working fine |
12:17:03 | leorize | so some other code must be acting up |
12:17:39 | leorize | AchalaSB: convert `seq[byte]` to string, that's all |
12:17:54 | leorize | `seq[char]`* |
12:19:25 | FromGitter | <AchalaSB> I didn't mention `seq[char] ` in my code |
12:19:39 | leorize | so, again, the entire build log would be useful |
12:19:46 | leorize | since we can see what modules blown up |
12:22:11 | leorize | bbl |
12:22:32 | FromGitter | <AchalaSB> this is my `.nimble` file ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2ab085f5c9250407ffe22] |
12:26:31 | leorize | again, having the entire build log would be useful |
12:26:40 | leorize | that `.nimble` file alone wouldn't be useful |
12:26:54 | FromGitter | <narimiran> @AchalaSB rename `main()` to something else and try it |
12:27:13 | FromGitter | <narimiran> this is what solved it for me |
12:28:59 | FromGitter | <alehander42> @AchalaSB by build log , leorize means the entire output of your compilation |
12:30:58 | FromGitter | <AchalaSB> Renaming `main` doesnt work for me |
12:31:12 | FromGitter | <AchalaSB> Here is log ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2ad102735965dfefcf305] |
12:35:30 | FromGitter | <zacharycarter> shashlick: if you're around at all today - I have a few nimgen questions - I guess anyone with experience using c2nim in cpp mode could probably help me out |
12:36:19 | FromGitter | <alehander42> @AchalaSB are you sure you are actually chaning |
12:36:27 | FromGitter | <alehander42> `/home/achala/Codes/kip-gitlab/leypa-nim-packages/tests/test1.nim ` |
12:36:54 | FromGitter | <AchalaSB> That is my folder |
12:36:55 | FromGitter | <alehander42> and not test1.nim in a local or different path? |
12:37:13 | FromGitter | <alehander42> ok |
12:38:13 | FromGitter | <alehander42> so your test1.nim looks like https://gist.github.com/alehander42/cd341735fa2887f587396024255383d8 ? |
12:38:46 | FromGitter | <alehander42> if so, can you just run `nim c <put here path to the nim file>` |
12:40:09 | FromGitter | <narimiran> @AchalaSB i've tested it on a file similar/identical to the one @alehander42 just posted |
12:40:24 | FromGitter | <narimiran> ...and i added `{.exportwasm.}` pragma to `main` |
12:41:09 | FromGitter | <narimiran> running it, it raises gcc error, but changing `main` to `maine` works fine and the test passes |
12:42:17 | * | newbie_user joined #nim |
12:44:01 | FromGitter | <AchalaSB> No im getting the same error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2b0119f5a9e6e410c1d67] |
12:44:54 | FromGitter | <narimiran> hmmm, `lib/pure/unicode.nim` |
12:45:17 | FromGitter | <narimiran> can you please post/share your whole file? |
12:45:31 | FromGitter | <alehander42> yes, main is special in C, and exportwasm adds exportc: main wouldn't work |
12:45:49 | * | newbie_user quit (Client Quit) |
12:46:14 | FromGitter | <alehander42> yes, please just copy & paste in a gist or something else the full test1.nim |
12:50:06 | FromGitter | <AchalaSB> https://gist.github.com/alehander42/cd341735fa2887f587396024255383d8 |
12:52:54 | FromGitter | <narimiran> works on my end |
12:53:29 | FromGitter | <narimiran> i'm running `nim c -r filename.nim` |
12:53:57 | FromGitter | <AchalaSB> Is it giving `.wasm` file? |
12:55:08 | FromGitter | <narimiran> no, it just runs the `filename.nim` and prints `[OK] correct welcome` |
12:55:42 | leorize | ofc it's won't give the `.wasm` file when you compile it normally |
12:56:00 | leorize | AchalaSB: try reinstalling `nim` |
12:56:00 | FromGitter | <AchalaSB> Ohk. But it is not giving that msg as well. |
12:56:36 | FromGitter | <narimiran> before that, let us see what is in: `kip-gitlab/leypa-nim-packages/tests/config.nims` |
12:57:30 | FromGitter | <AchalaSB> Config.nims contain `switch("path", "$projectDir/../src")` |
12:58:09 | FromGitter | <narimiran> ok, to be sure, just copy-paste your `test1.nim` file somewhere else on your computer and try to compile and run it there |
12:58:44 | FromGitter | <AchalaSB> The problem is it not supportin g `string` ⏎ How can I write string type instead? |
12:58:57 | leorize | that's not the problem |
12:59:04 | FromGitter | <alehander42> this is not the problem, there is something wrong with your build |
12:59:05 | leorize | your code does not do anything that's triggering this |
12:59:10 | FromGitter | <alehander42> can you also just check what is actually on line 252of unicode.nim? |
12:59:23 | FromGitter | <alehander42> is it possible that you somehow changed something in the stdlib while experimetning |
12:59:42 | FromGitter | <alehander42> because in 0.19 it seems there is no function defined there |
13:00:10 | FromGitter | <narimiran> @AchalaSB "The problem is it not supporting string" strings are supported, and i cannot reproduce your error, based on the stuff you have given us |
13:01:02 | FromGitter | <narimiran> if there are any special flags, options, imports, etc. which you are using - we need to know so we can reproduce |
13:01:16 | FromGitter | <AchalaSB> ```code paste, see link``` ⏎ ⏎ Its my unicode.nim line 252 contains this proc [https://gitter.im/nim-lang/Nim?at=5bf2b41c1ad4155d3aeb57ac] |
13:02:01 | FromGitter | <narimiran> but why is unicode even called? there's no `import unicode` in the example you have shown us |
13:02:28 | leorize | and inspection on both `macros` and `unittest` shows that unicode aren't used |
13:03:10 | FromGitter | <alehander42> nope |
13:03:18 | FromGitter | <alehander42> unittest imports strutils |
13:03:26 | FromGitter | <alehander42> which seems to sometimes import stuff from unicode |
13:03:31 | * | qwretfisch is now known as qwertfisch |
13:03:31 | FromGitter | <alehander42> ```when defined(nimVmExportFixed): ⏎ from unicode import toLower, toUpper ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5bf2b4a3b86c70503f5567e9] |
13:03:56 | FromGitter | <alehander42> always keep in mind the full module tree |
13:04:05 | leorize | oops :P |
13:04:17 | FromGitter | <narimiran> but i've tested it both in 0.19.0 and the latest devel, with no error whatsoever |
13:04:42 | FromGitter | <narimiran> there's no automatic conversion from a string to seq[char] on my end |
13:10:26 | FromGitter | <alehander42> @AchalaSB can you please upload your `unicode.nim` file |
13:10:32 | FromGitter | <alehander42> literally `../../../../.choosenim/toolchains/nim-0.19.0/lib/pure/unicode.nim` |
13:12:15 | FromGitter | <alehander42> the only way I can trigger such an error (with the bizarre wrong line, which is a compiler bug probably) is if the function body tries to return `seq[char]` instead of the promised `string` |
13:14:25 | FromGitter | <alehander42> so my theory is that somehow your unicode.nim is wrong: so please try to upload/copy paste it |
13:16:42 | FromGitter | <narimiran> isn't a simpler way to remove `import unittest` and just use `assert` to see if the same error is still there? |
13:17:30 | FromGitter | <narimiran> if now there's no error - it's a problem with `unittest`, if the error is still there, then we can start looking elsewhere |
13:19:05 | * | dom96_w joined #nim |
13:19:27 | * | rokups quit (Quit: Connection closed for inactivity) |
13:19:43 | FromGitter | <narimiran> @AchalaSB can you try to run this: http://ix.io/1szu does it work? (prints 'true') |
13:58:27 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:01:15 | * | vlad1777d quit (Ping timeout: 264 seconds) |
14:01:39 | * | dom96_w joined #nim |
14:08:54 | * | ng0 quit (Remote host closed the connection) |
14:25:50 | * | nsf quit (Quit: WeeChat 2.3) |
14:41:47 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:47:03 | * | rokups joined #nim |
15:01:30 | * | dom96_w joined #nim |
15:03:43 | * | floppydh quit (Quit: WeeChat 2.3) |
15:13:27 | shashlick | @zacharycarter: I'm here what's up |
15:30:02 | FromGitter | <zacharycarter> I have a few sections in a nimgen project I don't know how to fix |
15:30:42 | FromGitter | <zacharycarter> it's c2nim related though |
15:30:49 | shashlick | Sure gist? |
15:30:53 | FromGitter | <zacharycarter> sure |
15:39:42 | FromGitter | <zacharycarter> shashlick: https://gist.github.com/zacharycarter/59ba56a9a2831424651d1807d4a7558b |
15:42:47 | shashlick | Can you share the cfg |
15:45:16 | * | Vladar joined #nim |
15:45:49 | shashlick | ugh joys of C++ |
15:50:51 | FromGitter | <zacharycarter> yes |
15:51:03 | FromGitter | <zacharycarter> sorry - work is bugging me too haha - about to update the gist |
15:51:05 | shashlick | ok seems beyond me |
15:52:00 | FromGitter | <zacharycarter> shashlick: updated |
15:52:09 | FromGitter | <zacharycarter> well - I can comment out all of those lines one by one and it will eventually compile |
15:52:22 | FromGitter | <zacharycarter> I think it's because of C++14 usage |
15:52:29 | FromGitter | <zacharycarter> but I also don't know C++14 that well... so haha |
15:52:43 | FromGitter | <zacharycarter> or any variant of C++ for that matter |
15:53:37 | shashlick | well, right now i'm working on a tree-sitter based real-time conversion to nim |
15:53:47 | shashlick | but still in C world |
15:56:42 | FromGitter | <zacharycarter> I could just go against the bgfx C api |
15:56:48 | FromGitter | <zacharycarter> but then I can't do this whole amalgamated build thing |
15:57:07 | FromGitter | <zacharycarter> or maybe I can |
16:00:06 | FromGitter | <zacharycarter> my main goal here is to prevent the user from having to build the bx and bimg libraries into shared libraries before being able to build bgfx |
16:00:26 | FromGitter | <zacharycarter> but I might still be able to accomplish that with the C api - although I'd still like to understand these errors... |
16:00:42 | FromGitter | <zacharycarter> if I'm going to be able to wrap bullet3 with nimgen - I'm going to need more C++ knowledge |
16:00:51 | shashlick | well they are c2nim limitations - it cannot recognize the syntax |
16:01:08 | shashlick | so you either have to rewrite it in recognizable format or comment it out |
16:01:25 | shashlick | can add a reset = true so that any h file hacks can be reverted at the end |
16:02:23 | FromGitter | <zacharycarter> yeah - I just need to know what to replace the offending lines of code with |
16:03:07 | FromGitter | <zacharycarter> for instance - ⏎ ⏎ ```// { ⏎ // }``` - not sure what to do about that - seems like an inline destructor to me``` [https://gitter.im/nim-lang/Nim?at=5bf2debb6183a977eee059ae] |
16:03:42 | FromGitter | <zacharycarter> so do I just put a nim proc in there and mark it with the destructor pragma and importcpp it? |
16:05:54 | leorize | shouldn't RAII take care of that automatically? |
16:06:05 | leorize | you shouldn't have to import it at all |
16:07:15 | FromGitter | <zacharycarter> ah yeah - that makes sense |
16:07:23 | FromGitter | <zacharycarter> no one is going to actually call that |
16:07:36 | FromGitter | <zacharycarter> I can probably just comment that section out then? |
16:07:46 | FromGitter | <zacharycarter> if that's the case - that's good because I think that was the most perplexing of the errors |
16:08:39 | * | narimiran joined #nim |
16:09:12 | leorize | I think the manual for `importcpp` also said that you shouldn't import destructors |
16:11:26 | FromGitter | <zacharycarter> 👍 thanks leorize - saved me some headache :) |
16:14:36 | FromGitter | <zacharycarter> I'm assuming the next one - `bool init(const Init& _init = {});` has to do with a default value in the constructor |
16:14:46 | FromGitter | <zacharycarter> errr sorry |
16:14:50 | FromGitter | <zacharycarter> err the method signature |
16:19:24 | FromGitter | <zacharycarter> https://blog.johnnovak.net/2018/07/07/creating-a-nim-wrapper-for-the-fmod/ - just stumbled upon this |
16:19:28 | FromGitter | <zacharycarter> wasn't previously aware of its existencew |
16:25:44 | Araq | compile time with caching: 0.176s |
16:25:52 | Araq | compile time without caching: 0.173s |
16:26:06 | Araq | pretty good... (?) |
16:26:20 | shashlick_ | ! |
16:26:58 | Araq | the C codegen step is not cached at all yet |
16:27:29 | FromGitter | <zacharycarter> https://en.cppreference.com/w/cpp/language/aggregate_initialization - I guess that's what I'm dealing with |
16:28:55 | shashlick | are pipes cmd 1 | cmd 2 slower than using an intermediate file? |
16:30:16 | Araq | shashlick, unlikely but benchmark it |
16:33:03 | * | enthus1ast quit (Ping timeout: 252 seconds) |
16:33:29 | FromGitter | <alehander42> is this for nim symbolfile caching? |
16:35:44 | Araq | yes |
16:39:04 | shashlick | looks like not much diff - i'm using multiReplace() and split() which are taking a long time |
16:39:25 | shashlick | need a better algorithm - perhaps later |
16:40:16 | shashlick | Araq: I'm using the macros method for the wrappers lib we discussed earlier, is coming along pretty nicely |
16:40:32 | shashlick | separate executable to do C -> AST with tree-sitter |
16:40:42 | shashlick | and convering AST -> nim using macros |
16:40:49 | Araq | aye |
16:41:24 | shashlick | so far I am parsing #define for numbers, typedef structs and enums |
16:41:58 | Araq | c2nim can do the same so far :P |
16:42:15 | shashlick | any suggestions for a good package name? i have tonim tentatively |
16:42:26 | shashlick | oh c2nim can do much more, but slow and steady |
16:42:52 | Araq | nimSitter |
16:44:24 | shashlick | that doesn't capture the intent to interop |
16:44:31 | shashlick | i was thinking interop |
16:44:35 | shashlick | import interop/cimport |
16:44:46 | Araq | nimterop |
16:45:56 | shashlick | Nice |
16:46:50 | * | enthus1ast joined #nim |
16:46:52 | FromGitter | <zacharycarter> yeah - not using a aggregate initializer but using a value initializer worked to fix that error |
16:47:26 | FromGitter | <tim-st> when using `fmt"{expr}"` what can I use as `expr` besides variable names? |
16:47:55 | leorize | any expr |
16:48:01 | leorize | any possible expression |
16:48:12 | FromGitter | <tim-st> I tried `fmt"hello {someVar and 1}"` |
16:48:32 | * | Trustable joined #nim |
16:50:01 | FromGitter | <zacharycarter> any idea why c2nim might blow up on - `RendererType::Enum getRendererType();` in cpp mode? |
16:50:34 | FromGitter | <tim-st> hm, now it seems to work |
16:50:34 | FromGitter | <zacharycarter> I do have - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bf2e9da9f5a9e6e410dc419] |
16:52:08 | FromGitter | <tim-st> ah, it only fails for `fmt"hello {(someVar and 1)}"` with `(...)` |
16:54:02 | FromGitter | <tim-st> lol, dont know why it's marked as an error sometimes and sometimes not |
16:55:10 | FromGitter | <tim-st> ok, it was my mistake, I simply missed a bracket :\ |
17:06:50 | * | ng0 joined #nim |
17:08:05 | FromGitter | <tim-st> strformat works good btw :) |
17:08:25 | shashlick | ya i've also started using it, more readable |
17:12:02 | FromGitter | <brentp> I have a lib that uses .unchecked., is there a way I can used `defined` or something to support the old unchecked and the new UncheckedArray? |
17:12:41 | narimiran | @brentp maybe something like nilseq options are currently implemented in stdlib? |
17:13:37 | FromGitter | <brentp> I mean how can I check at compile time if .unchecked. is supported? |
17:15:26 | narimiran | this is the example i was talking about: `when defined(nimNoNilSeqs): result.data = @[] else: result.data = nil`, i don't know if there's something for unchecked |
17:15:41 | FromGitter | <mratsim> I don’t think so |
17:15:56 | FromGitter | <mratsim> I checked the commit one week ago but didn’t remember sseing a defined flag |
17:19:37 | narimiran | @brentp maybe a switch depending on the nim version? |
17:20:22 | FromGitter | <tim-st> in worst case I think a `when compiles(...)` could work |
17:22:20 | leorize | narimiran: it's `nimUncheckedArrayTyp` |
17:22:35 | leorize | brentp: ^ |
17:23:49 | FromGitter | <brentp> so what exactly goes in the `when compiles(???)` |
17:24:07 | leorize | `when defined(nimUncheckedArrayTyp)` |
17:24:43 | leorize | that should do for checking for the new `UncheckedArray` |
17:25:03 | FromGitter | <brentp> aye. perfect. thanks all. |
17:27:35 | FromGitter | <brentp> https://github.com/brentp/hts-nim/commit/df14b1efffa4022d30b052f7912735852321ffb9 |
17:31:03 | Araq | when declared(system.UncheckedArray) should also be possible |
17:36:09 | * | Trustable quit (Remote host closed the connection) |
17:40:05 | FromGitter | <brentp> ah. ok. I was originally trying `when defined(UncheckedArray)` |
17:43:33 | Araq | hmm my hello world program outputs its old version and the new version at the same time |
17:44:12 | Araq | that can't be right |
17:47:31 | narimiran | VCS compiler :D |
17:48:34 | narimiran | great for testing the changes in the code :) |
17:50:54 | Araq | it was some old code that continued to "work" :-) |
17:51:09 | Araq | so ... incremental compilation works. |
17:51:28 | Araq | was that so hard? |
17:51:53 | narimiran | :D |
17:52:02 | krux02 | shashlick, pipes should be faster than an intermediate file, because the data cannot possibly be written on the real harddrive, it is all streamed. But the disadvantage is that it is blocking io. a write blocks until the data is consumed at the same time from the reader, with probably a small buffer in the middle. |
17:52:57 | * | oprypin quit (Disconnected by services) |
17:52:57 | Araq | files can be lazily written from RAM to disk, depending on the OS and setup |
17:54:45 | FromGitter | <timotheecour> @araq regarding incremental compilation, I was trying to see if it fixed https://github.com/nim-lang/Nim/pull/9715 but still facing issues ; how can I take advantage of it (say, in that PR) ? |
17:57:23 | FromGitter | <timotheecour> also, —incremental:on is still not in —fullhelp and I don’t see any documentation on how to use (or what to expect from) incremental compilation; is there any scratch doc/blurb/whatever piece of info ? |
17:57:56 | leorize | for a WIP stuff I don't think Araq would want to expose it yet |
17:59:16 | FromGitter | <timotheecour> well even WIP stuff can benefit from documentation (so long it’s marked as WIP/experimental); otherwise less eyeballs on it, meaning less opportunities to find bugs early |
17:59:44 | * | oprypin joined #nim |
17:59:47 | Araq | well I wasn't serious, it only works for my "hello world" toy |
17:59:57 | Araq | documentation is in the RFC, I guess |
18:00:42 | FromGitter | <timotheecour> where is the hello world toy? ( i didn’t see a test case in 6acffcd28f3217cc2b146154358f6a5550423ed1) |
18:01:12 | leorize | pretty sure it's `echo "hello, world!"` lol |
18:01:27 | leorize | timotheecour: try `--gc:destructors` |
18:01:43 | leorize | it doesn't even work for anything beyond hello world |
18:01:46 | narimiran | ...and here i am thinking that was just a joke and nothing more than that |
18:01:54 | * | Vladar quit (Remote host closed the connection) |
18:11:56 | * | Vladar joined #nim |
18:17:27 | FromGitter | <timotheecour> well a hello world for me demonstrates a feature in its simplest form; how is that the case for the hello world example? ⏎ I tried: ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5bf2fe372735965dfeff2f32] |
18:18:23 | leorize | it's pretty much in pre-alpha state |
18:18:38 | leorize | I don't expect it to even work |
18:18:58 | leorize | once it's ready for testing, Araq will document it I believe |
18:19:04 | FromGitter | <timotheecour> Ok, I guess I got a bit too excited by 6acffcd28f3217cc2b146154358f6a5550423ed1 |
18:19:14 | shashlick | krux02: my issue turned out to be slow parsing within Nim using multireplace and split, so replaced that code, it's much faster now |
18:20:40 | * | nsf joined #nim |
18:21:08 | krux02 | yea creating a lot of intermediate objects with split is often very slow. But that is how I made my first parser as well. |
18:23:23 | FromGitter | <timotheecour> (slicable string based on Nim-ranges would solve that issue of creating intermediate objects with split) |
18:35:03 | * | shashlick_ quit (Ping timeout: 252 seconds) |
18:36:36 | krux02 | timotheecour: constant nagging about what is missing doesn't help to make it better |
18:38:12 | FromGitter | <timotheecour> it’s not intended as nagging; i’ve been working on proof of concept based on that (string slices based on nim-ranges) and it seems promising; it’s more meant as indicator that it’d be worth looking into it |
18:38:44 | * | shashlick_ joined #nim |
18:39:33 | krux02 | it's not about finding something to look it, it is a matter of priorizing what to look at next. |
18:41:08 | FromGitter | <timotheecour> anyway, slicable strings could start as a nimble package |
18:41:25 | FromGitter | <tim-st> what was the reason that there is no `uint64.high`? |
18:41:42 | krux02 | the best way to can help is if you find a solution that does not need any fixing in the standard library and lives happily as it's own module. When there is i single missing piece that prevents you from implementing it, I am happy to fix nim and bring it to live. |
18:42:02 | krux02 | tim-st: it is not an int |
18:42:13 | * | zachk joined #nim |
18:42:29 | FromGitter | <tim-st> and returning uint64 wouldnt work? |
18:42:45 | leorize | tim-st: It's not an Ordinal I think |
18:42:54 | leorize | there's `high[T: Ordinal]` |
18:43:03 | leorize | but `uint64` doesn't match |
18:43:07 | FromGitter | <tim-st> but I assume an uint has a highest value? |
18:43:16 | narimiran | @timotheecour ...and if we can do something to fix/close/implement some of those 200+ open issues, it would be great :) |
18:43:18 | FromGitter | <tim-st> this seems to work: `template high*(_: type uint64): uint64 = (-1.int64).uint64` |
18:43:29 | krux02 | there is an issue about it |
18:43:36 | * | zachk quit (Changing host) |
18:43:36 | * | zachk joined #nim |
18:45:05 | krux02 | https://github.com/nim-lang/Nim/issues/6840 |
18:45:21 | krux02 | sorry wrong one |
18:45:26 | FromGitter | <timotheecour> @narimiran since you’ve been working a lot on improving testament tests lately, what do you think of the approach I outlined in https://github.com/nim-lang/Nim/issues/9581#issuecomment-439785885 |
18:45:48 | narimiran | well, most i did was just a manual labor |
18:46:16 | narimiran | i haven't tried to use your proposed changes |
18:47:12 | FromGitter | <timotheecour> it gave 5X speedups on compiling/running tests in tests/stdlib/*.nim |
18:47:31 | krux02 | wasn't it 20? |
18:47:43 | FromGitter | <timotheecour> that was for tests in lib/std/*.nim |
18:47:52 | FromGitter | <timotheecour> (and that was 15X, not 20x) |
18:48:48 | FromGitter | <tim-st> here is the issue regarding uint64.high: https://github.com/nim-lang/Nim/issues/6620 |
18:49:42 | narimiran | @tim-st krux02 and this also: https://github.com/nim-lang/Nim/issues/725 |
18:49:53 | narimiran | heh, you just posted there :) |
18:49:57 | FromGitter | <tim-st> xD |
18:50:49 | krux02 | well we can all agree that `high(uint64)` not working is annoying. |
18:52:04 | krux02 | but you can define you own high ore maxValue definition that doesn't try to return an int, but a value of the exact same type. |
18:52:13 | krux02 | shouldn't be too hard. |
18:53:01 | FromGitter | <tim-st> I dont understand why it isnt available in system.nim for uint64 |
18:57:53 | * | dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:16:44 | * | rokups quit (Quit: Connection closed for inactivity) |
19:39:28 | sendell[m] | was is the command to reverse "nimble develop" ? |
19:39:46 | sendell[m] | to cancel it |
19:53:43 | * | abm joined #nim |
20:00:04 | * | Vladar quit (Ping timeout: 246 seconds) |
20:16:51 | * | nsf quit (Quit: WeeChat 2.3) |
20:21:19 | * | Vladar joined #nim |
20:27:55 | FromGitter | <SolitudeSF> `nimble uninstall` |
20:37:32 | FromGitter | <xmonader> I wrote a simple asciitable library for nim today https://github.com/xmonader/nim-asciitables hope you guys find it helpful |
21:03:15 | * | a_b_m joined #nim |
21:07:03 | * | abm quit (Ping timeout: 268 seconds) |
21:08:02 | * | krux02 quit (Remote host closed the connection) |
21:17:37 | * | narimiran quit (Remote host closed the connection) |
21:30:32 | * | stefanos82 quit (Quit: Quitting for now...) |
21:30:36 | * | V-X joined #nim |
21:31:56 | V-X | What is the best way to keep track of procs that have a custom pragma applied to them? They're all multi-methods for the same base type but I can't figure out how to get ahold of them via AST |
21:45:27 | * | Vladar quit (Remote host closed the connection) |
21:48:24 | sendell[m] | SolitudeSF, I'm talking about the "nimble develop" command inside a directory, not "nimble develop packageName" |
21:48:53 | sendell[m] | (since the package I use it on is actually a private git repo) |
21:49:15 | FromGitter | <SolitudeSF> whats the difference? just uninstall that package |
21:49:54 | FromGitter | <SolitudeSF> when you `develop` it, it install by symlinking files, and then behaves like regular package |
21:51:10 | * | a__b__m joined #nim |
21:52:57 | * | a__b__m quit (Client Quit) |
21:54:07 | * | a_b_m quit (Ping timeout: 240 seconds) |
22:12:29 | sendell[m] | oh yeah actually it works, wasn't sure how to "target" it but its just the #head version. thx :) |
22:13:13 | sendell[m] | have to say nimble looks just as awesome as nim :D |
22:17:59 | * | jjido joined #nim |
22:26:16 | * | vlad1777d joined #nim |
22:28:35 | FromGitter | <pr-yemibedu> so I wanted to use a decamped sequence in a case statement. What is the correct syntax? |
22:28:59 | FromGitter | <pr-yemibedu> sorry. decomposed sequence. |
22:33:46 | FromGitter | <pr-yemibedu> example would be ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ can we decompose this and other structures? [https://gitter.im/nim-lang/Nim?at=5bf33a4addad8777ef8e0071] |
22:34:37 | * | mech422__ joined #nim |
22:34:43 | * | cozachk joined #nim |
22:37:30 | * | onionhammer joined #nim |
22:39:46 | * | tribly quit (Ping timeout: 268 seconds) |
22:39:47 | * | dddddd quit (Ping timeout: 268 seconds) |
22:39:47 | * | onionhammer1 quit (Ping timeout: 268 seconds) |
22:39:47 | * | edcragg_ quit (Ping timeout: 268 seconds) |
22:39:47 | * | zachk quit (Ping timeout: 268 seconds) |
22:39:47 | * | mech422_ quit (Ping timeout: 268 seconds) |
22:39:47 | * | cavariux quit (Ping timeout: 268 seconds) |
22:40:15 | xace | the dlls.zip for windows, wgere am i suppose to exfract the dlls to? |
22:40:23 | * | dddddd joined #nim |
22:40:35 | * | cavariux joined #nim |
22:41:07 | * | edcragg_ joined #nim |
22:41:50 | * | tribly joined #nim |
22:42:34 | shashlick | you can put it in ~/.nimble/bin |
22:42:39 | * | V-X quit (Remote host closed the connection) |
22:42:40 | shashlick | that's where I have since it is in the path anyway |
22:42:43 | shashlick | or should be |
22:43:12 | shashlick | of course I'm a choosenim user so - if you aren't you can put them in .../nim/bin |
22:43:37 | xace | does choosenim work for windows? |
22:44:03 | xace | doesnt seem like it does |
22:44:24 | FromGitter | <pr-yemibedu> choosenim is suppose to help and path alias for windows users. |
22:45:19 | * | abm joined #nim |
22:45:35 | * | jjido quit (Remote host closed the connection) |
22:47:03 | xace | oh its available on github |
22:49:25 | * | cozachk quit (Quit: Leaving) |
22:49:53 | * | zachk joined #nim |
22:51:20 | * | zachk quit (Changing host) |
22:51:20 | * | zachk joined #nim |
22:53:50 | FromGitter | <alehander42> @pr-yemibedu that's not builtin, you can use a lib like https://github.com/alehander42/gara for capturing matches like that |
22:54:55 | FromGitter | <alehander42> of @[@x, *@xs]: ⏎ .. |
22:58:08 | shashlick | xace: it works great in windows |
23:00:36 | xace | Hmm, i find the windows installation process very confusing. the zip provided on the website, does it also contain the dlls.zip that is at the bottom of the page? and i cant see if choosenim correctly setup all the required dlls for it either |
23:01:10 | shashlick | Choosenim will take care of all of it |
23:01:25 | shashlick | Including mingw if you don't have it already |
23:01:40 | shashlick | The zip doesn't have the dlls I don't think |
23:01:59 | xace | shashlick: https://github.com/dom96/choosenim according to the readme, it doesnt handle libcurl if I understand it correctly |
23:02:17 | shashlick | Just need to add ~/.nimble/bin to path |
23:02:49 | xace | shashlick: the download link for windows does contain dlls that also exist in dlls.zip |
23:04:36 | FromGitter | <pr-yemibedu> @alehander42 thank you. I like it. It is like F# pattern matching a little. |
23:08:30 | FromGitter | <pr-yemibedu> have you seen https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/pattern-matching and https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/active-patterns which are similar? |
23:10:14 | FromGitter | <pr-yemibedu> @alehander42 do I just add your project to nimble by name? |
23:33:32 | FromDiscord_ | <treeform> So I had some issues with https://github.com/cheatfate/asyncpg so I made my own: https://github.com/treeform/pg |
23:34:23 | FromDiscord_ | <treeform> Its only 87 lines of code, if any one needs async db support, please consider my tiny wrapper. |
23:34:24 | FromDiscord_ | <treeform> https://github.com/treeform/pg/blob/master/src/pg.nim |
23:36:12 | * | shashlick_ quit (Ping timeout: 252 seconds) |
23:40:54 | * | shashlick_ joined #nim |
23:42:30 | dom96 | xace: choosenim downloads the DLLs too |