00:49:43 | * | endragor joined #nim |
00:49:59 | * | couven92 joined #nim |
00:54:23 | * | endragor quit (Ping timeout: 276 seconds) |
01:22:26 | * | couven92 quit (Quit: Client Disconnecting) |
01:26:48 | * | jxv quit (Quit: string on the can snapped off) |
01:28:17 | * | icebattle quit (Quit: leaving) |
01:54:55 | GitDisc | <treeform> hey shashlick I have responded to your email. |
01:55:04 | GitDisc | <treeform> about the nimgen stuff |
01:56:08 | * | MJCaley joined #nim |
01:57:02 | GitDisc | <treeform> I feel like steamsdk was made for VC++ first, and only made work with GCC... |
02:06:22 | * | MJCaley quit (Quit: MJCaley) |
02:11:37 | shashlick | Neat will check in an hour |
02:21:38 | GitDisc | <treeform> thanks! |
02:21:52 | GitDisc | <treeform> I am making progress wrapping it manually method by method, but its slow going |
02:22:49 | * | S1t1Schu joined #nim |
02:26:12 | * | S1tiSchu quit (Ping timeout: 252 seconds) |
02:29:17 | * | chemist69 quit (Ping timeout: 276 seconds) |
02:33:08 | GitDisc | <treeform> man how do I make a `const char*` in nim cstring is just `char*` |
02:43:15 | * | chemist69 joined #nim |
02:44:03 | shashlick | @treeform - hold off for 30 minutes, i'll give it a try |
02:44:11 | shashlick | do you have gcc or vc++? |
02:52:37 | GitDisc | <treeform> Its using clang on mac. |
02:52:56 | GitDisc | <treeform> I think clang is more like gcc then vc++. |
02:55:11 | skrylar | it is |
02:55:17 | skrylar | clang implements some gccisms as well |
03:08:54 | skrylar | clang gives you more helpful warnings/error messages and seems to build faster, although gcc supposedly gives marginally better performance |
03:09:32 | skrylar | although objective-c in clang doesn't let you rename the base classes like gcc does >:| |
03:12:15 | * | endragor joined #nim |
03:12:22 | GitDisc | <treeform> i am confused but this `const char*` stuff |
03:12:28 | GitDisc | <treeform> i tried this: |
03:12:45 | GitDisc | <treeform> `s = SteamFriends().GetFriendPersonaName(steamId)` |
03:12:52 | GitDisc | <treeform> but this worked: |
03:12:55 | GitDisc | <treeform> `{.emit: [s, "= (char *)SteamFriends()->GetFriendPersonaName(", steamId, ");"].}` |
03:14:01 | * | endragor quit (Remote host closed the connection) |
03:14:29 | * | endragor joined #nim |
03:21:29 | skrylar | Nim doesn't do consts :\ |
03:22:00 | skrylar | you can probably do a custom type defined as 'ptr cchar' and use importc to make it a const char* if you need to |
03:22:22 | skrylar | (you cana lso use compiler flags to shut up that particular typecasting error, but well) |
03:22:29 | skrylar | i should say 'warning' |
03:48:24 | * | radagast quit (Ping timeout: 246 seconds) |
03:57:21 | GitDisc | <treeform> how can I use importc to define cchar? |
03:58:06 | * | dddddd quit (Read error: Connection reset by peer) |
04:42:17 | skrylar | type foo = ptr cchar {.importc: "const char*".} |
04:42:29 | skrylar | the importc may come before the = though |
04:55:04 | FromGitter | <Varriount> Why the pointer? |
04:56:39 | skrylar | ey's trying to do something with an existing library that is apparently being picky about cstring types and their constness |
05:16:13 | * | mcc quit (Quit: Connection closed for inactivity) |
05:30:31 | * | tinAndi joined #nim |
05:31:09 | * | nsf joined #nim |
05:35:40 | * | tinAndi quit (Ping timeout: 240 seconds) |
05:55:15 | skrylar | well thats.. new. |
05:55:24 | skrylar | apparently Red is reorienting themselves for the blockchain craze |
06:29:10 | FromGitter | <honewatson> Gitter is actually opensource. Maybe that should be the forum software on the Nim Lang forum sub domain |
06:29:23 | FromGitter | <honewatson> It seems to be popular |
06:30:36 | FromGitter | <honewatson> I think Red has been too late to jump on the blockchain craze. |
06:37:40 | * | solitudesf joined #nim |
07:30:10 | * | brainacid joined #nim |
07:30:27 | brainacid | Araq: U online? |
07:35:49 | * | PMunch joined #nim |
07:36:43 | * | brainacid quit (Quit: leaving) |
07:45:59 | * | endragor quit (Remote host closed the connection) |
07:56:19 | * | endragor joined #nim |
08:15:41 | FromGitter | <gogolxdong> How to make a set of string type? |
08:16:57 | PMunch | Which kind of set? |
08:17:27 | FromGitter | <gogolxdong> set[string] |
08:17:28 | PMunch | Nim has both a built in set type and a sets module |
08:18:08 | PMunch | I'm not sure if you can create sets of non-ordinal values |
08:18:32 | PMunch | https://nim-by-example.github.io/bitsets/ |
08:18:39 | PMunch | According to this it's only for ordinal types |
08:19:31 | * | Arrrr joined #nim |
08:21:35 | FromGitter | <gogolxdong> Yes , I'm aware of that , I think it could be possible after Araq work out no GC string and seq. |
08:21:48 | FromGitter | <gogolxdong> Basically it says no ? |
08:22:09 | PMunch | Oh yeah, that has nothing to do with it |
08:22:17 | PMunch | These sets are implemented as bit-sets |
08:22:29 | PMunch | So it's flipping bits to keep track of values |
08:22:57 | PMunch | So only ordinal types with high(T) < 2¹⁶ |
08:24:05 | PMunch | So if you want to have a set of uint8 then you have 256 different values and need 256 bits to store them |
08:24:42 | PMunch | With unbounded string you have infinite amount of possible combinations, thus they can't be stored like this |
08:25:07 | PMunch | But you can still use the "sets" module :) |
08:26:10 | FromGitter | <gogolxdong> I see . Thank you . |
08:26:22 | PMunch | Of course if you have a subset of valid strings you could enumerate them and use a regular set |
08:45:54 | * | yglukhov joined #nim |
09:03:33 | * | gmpreussner quit (Ping timeout: 268 seconds) |
09:05:33 | * | gmpreussner joined #nim |
09:32:30 | * | floppydh joined #nim |
09:43:02 | * | Trustable joined #nim |
09:51:08 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:01:13 | * | PMunch quit (Quit: Leaving) |
10:05:37 | * | yglukhov quit (Ping timeout: 256 seconds) |
10:06:30 | * | xet7 quit (Ping timeout: 260 seconds) |
10:08:17 | FromGitter | <gogolxdong> How to retrieve the response value of an asyncHttp request? |
10:08:39 | * | endragor quit (Remote host closed the connection) |
10:16:14 | * | yglukhov joined #nim |
10:19:16 | * | xet7 joined #nim |
10:31:38 | * | dddddd joined #nim |
10:37:41 | * | clyybber joined #nim |
10:54:57 | FromGitter | <gogolxdong> Should I use `proc read*T (future: Future[T] | FutureVar[T]): T` |
10:57:53 | * | radagast joined #nim |
11:05:34 | * | tinAndi joined #nim |
11:05:57 | Araq | gogolxdong: you 'await' it |
11:11:30 | * | tinAndi quit (Ping timeout: 265 seconds) |
11:12:29 | FromGitter | <gogolxdong> great |
11:15:37 | FromGitter | <gogolxdong> I am waiting in the restaurant where we ate dinner for your last night in China.😀 |
11:17:00 | Araq | I'm in a train. |
11:23:14 | Arrrr | Have you been in china? wow, nim is going to places. |
11:24:25 | Araq | yes. |
11:34:38 | * | vlad1777d joined #nim |
11:40:24 | * | Yardanico joined #nim |
11:44:11 | * | MJCaley joined #nim |
11:44:14 | * | sendell joined #nim |
11:44:33 | * | vlad1777d quit (Ping timeout: 248 seconds) |
11:51:04 | * | arecaceae quit (Remote host closed the connection) |
11:51:21 | * | arecaceae joined #nim |
11:54:20 | * | MJCaley quit (Quit: MJCaley) |
12:04:01 | * | Snircle joined #nim |
12:09:07 | * | endragor joined #nim |
12:13:26 | * | endragor quit (Ping timeout: 256 seconds) |
12:17:46 | * | xet7 quit (Quit: Leaving) |
12:18:12 | * | xet7 joined #nim |
12:27:23 | * | Vladar joined #nim |
12:35:24 | Arrrr | {.inject.} sometimes doesn't inject |
12:42:04 | * | yglukhov quit () |
12:42:28 | * | clyybber quit (Quit: good night) |
12:46:29 | Arrrr | ujj, it was another thing. |
12:57:24 | * | yglukhov joined #nim |
13:03:10 | * | yglukhov quit (Remote host closed the connection) |
13:03:46 | * | yglukhov joined #nim |
13:06:23 | FromGitter | <survivorm> @PMunch - here? |
13:08:10 | * | yglukhov quit (Ping timeout: 240 seconds) |
13:18:47 | * | yglukhov joined #nim |
13:23:39 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a74665a36de78850ce0db51] |
13:27:05 | * | yglukhov quit (Remote host closed the connection) |
13:27:42 | * | yglukhov joined #nim |
13:32:09 | * | yglukhov quit (Ping timeout: 264 seconds) |
13:34:38 | * | Trustable quit (Remote host closed the connection) |
13:34:42 | * | kier quit (Read error: Connection reset by peer) |
13:35:22 | * | kier joined #nim |
13:51:46 | FromGitter | <gogolxdong> There is something wrong with this snippet. |
13:55:18 | * | arnetheduck joined #nim |
14:06:04 | * | Vladar quit (Quit: Leaving) |
14:16:33 | * | Arrrr quit (Ping timeout: 264 seconds) |
14:45:10 | * | miran_ quit (Quit: Page closed) |
14:50:08 | * | xkapastel joined #nim |
14:53:59 | * | yglukhov joined #nim |
14:58:44 | * | yglukhov quit (Ping timeout: 276 seconds) |
15:01:22 | FromGitter | <Quelklef> Yeah, there's a space before the `=`. Gross. |
15:05:27 | FromGitter | <tim-st> I hope I havent asked this before, but is there something like a rule when to use `{.inline.}` for procs? |
15:05:58 | FromGitter | <tim-st> Or are there other downsides than growing binary size |
15:06:38 | * | sendell quit (Remote host closed the connection) |
15:08:50 | * | floppydh quit (Quit: WeeChat 2.0.1) |
15:09:21 | * | endragor joined #nim |
15:10:55 | * | xet7 quit (Ping timeout: 248 seconds) |
15:11:09 | FromGitter | <tim-st> Ok, I read that `{.inline.}` isnt really necessary to write, compiler can find out often |
15:13:27 | * | endragor quit (Ping timeout: 240 seconds) |
15:21:53 | FromGitter | <Quelklef> To answer your question, I can't really imagine there are |
15:24:15 | FromGitter | <tim-st> Ok, thanks. I thought about it and I understand that inlining will give performance boost, but it must have real downsides, otherwise everything would be inlined |
15:25:15 | FromGitter | <tim-st> And if my binary size grows from 10 to 20mb is that bad? |
15:25:23 | FromGitter | <krux02> @tim-st well to know the sweet sport when to use inline or not, you need to price a function call and the extra memory that inlining costs |
15:25:35 | FromGitter | <krux02> but you can't inline dynamic function calls |
15:25:51 | FromGitter | <tim-st> ah, that make sense, thanks! |
15:26:18 | FromGitter | <krux02> with *dynamic* I mean *virtual* or with dynamic dispatch |
15:26:57 | FromGitter | <krux02> I would say, all functions that you can implement with 10 ASM instructions should be inlined |
15:27:01 | FromGitter | <andreaferretti> or recursive procs for that matter |
15:27:07 | * | xet7 joined #nim |
15:27:22 | FromGitter | <krux02> but the compiler can do that decision for you as well, so ... |
15:27:28 | FromGitter | <tim-st> But a compiler can determine both, so is it best when I ignore the pragma? |
15:27:36 | FromGitter | <krux02> yea recursion is hard to inline |
15:27:49 | FromGitter | <krux02> but not entirely impossible |
15:28:12 | FromGitter | <krux02> recursion can partially inlined. It is like loop unrolling. |
15:28:36 | FromGitter | <krux02> BTW loop unrolling is also one of these compiler optimizations. |
15:29:10 | FromGitter | <tim-st> ok, thanks, I will just ignore this pragma for now |
15:29:17 | FromGitter | <krux02> if your loops have a small but constant iteration count. The compiler can replace the loop by repeating the body of the loop |
15:29:45 | FromGitter | <tim-st> I thought about this yesterday^^ |
15:30:19 | * | skelett joined #nim |
15:30:20 | FromGitter | <krux02> the prevents the conditional jumps in the code and those are not as cheap as you might expect |
15:30:31 | FromGitter | <krux02> just ignore inline |
15:30:38 | FromGitter | <tim-st> ok, thanks! |
15:30:41 | FromGitter | <krux02> but best is inline in C |
15:31:02 | FromGitter | <krux02> the C programming language had inline as a feature, but you had to declare inline manually |
15:31:19 | FromGitter | <krux02> then compilers became smarter and said, yea just omit the inline we do know better |
15:31:56 | FromGitter | <krux02> than programmers said, but we really really want this to be inline, und no don't omit this, I know what I am doing and then `__inline__` came. |
15:32:07 | FromGitter | <tim-st> I just wasnt sure, because it is often used in nim stdlib code, also if the proc is a one liner |
15:32:42 | * | yglukhov joined #nim |
15:33:03 | FromGitter | <krux02> yea most of the time when I write inline, it is just a rough guess, "hmm, ... year this could be inline, ..." not really testing anything for performance. I just assume it is faster |
15:33:16 | FromGitter | <tim-st> ok |
15:33:48 | FromGitter | <krux02> you can safely ignore inline and live a very happy and fulfilling life and nothing will burn. |
15:33:54 | FromGitter | <tim-st> I hope the compiler determines the best, I'm writing a parser for big files |
15:34:10 | FromGitter | <krux02> well the compiler is mostly just a C compiler |
15:34:17 | * | yglukhov quit (Remote host closed the connection) |
15:34:33 | FromGitter | <krux02> and that C compiler is doing the inlining since I don't know C is from 1972 |
15:34:35 | FromGitter | <tim-st> yes, I meant gcc |
15:34:53 | * | yglukhov joined #nim |
15:36:24 | FromGitter | <tim-st> btw did I got it correctly that nim will use another compiler by default soon? |
15:36:27 | FromGitter | <tim-st> not gcc? |
15:36:39 | FromGitter | <krux02> well, not that I know of |
15:37:05 | FromGitter | <krux02> you can change gcc to the microsoft compiler form visual studio if you are on windows and want that |
15:37:06 | FromGitter | <tim-st> but didnt you said because of exceptions there is a change or something? |
15:37:13 | FromGitter | <krux02> and you can change it to clang afaik |
15:37:21 | FromGitter | <tim-st> I dont want to change |
15:37:23 | FromGitter | <krux02> well I didn't say that |
15:37:29 | FromGitter | <krux02> But I am not an oracle |
15:37:36 | FromGitter | <krux02> I don't develop nim |
15:37:38 | FromGitter | <krux02> I just use it |
15:37:53 | subsetpark | So my compilation pipeline has started failing with this error message : ` # define N_NIMCALL(rettype, name) rettype name /* no modifier */` |
15:38:34 | subsetpark | what's up with that? |
15:38:38 | FromGitter | <krux02> that is not an error message it is just a line of code |
15:38:54 | subsetpark | well ok |
15:39:08 | subsetpark | the message is just ` error: command 'gcc' failed with exit status 1` which is not terribly informative |
15:39:18 | * | yglukhov quit (Ping timeout: 252 seconds) |
15:39:33 | FromGitter | <krux02> can you give a bit more context, because yes it is not very informative |
15:39:56 | * | BitPuffin joined #nim |
15:39:59 | FromGitter | <krux02> you could upload your shell on ix.io |
15:40:05 | subsetpark | sure... i have a Python module that takes C source output by nim and compiles to a C extension |
15:41:04 | FromGitter | <krux02> with "C extension" you mean "Python extension written in C"? |
15:42:43 | FromGitter | <krux02> well when in your pipeline you compile something with `nim c` and you get "command 'gcc' failed" then it means nim has either generated illegal C code (a bug in Nim, not uncommon) or there is a bug in gcc not supporting the C language properly (very uncommon). |
15:43:47 | subsetpark | Here's the full output - https://ghostbin.com/paste/tu6qg |
15:44:19 | FromGitter | <krux02> so what I would do now: extract the nim code that generates the illegal C. Strip it from everything unnecessary, and then from what is left make a bug report. |
15:45:44 | FromGitter | <krux02> well there is something horribly wring. I need to know the nim file that you try to compile. |
15:46:28 | subsetpark | I would, except this is a large project that hasn't substantially changed, so I don't really have the time/means to isolate whatever piece of Nim code is now failing on #head |
15:46:40 | * | solitudesf quit (Ping timeout: 240 seconds) |
15:47:37 | subsetpark | It still compiles on stable, luckily |
15:47:42 | * | yglukhov joined #nim |
15:47:53 | FromGitter | <krux02> I feel very sorry for you, but I can't help you when I can't reproduce it and I don't see the source that produced that error |
15:48:15 | FromGitter | <krux02> git bisect? |
15:48:27 | FromGitter | <krux02> bisect the compiler? |
15:49:07 | subsetpark | ha, maybe tomorrow... |
15:49:24 | subsetpark | Araq: let me know if the generated C in that paste look like anything in particular to you |
15:49:44 | FromGitter | <krux02> you can show the generated C as well |
15:52:24 | FromGitter | <krux02> have you looked at the generated C code? |
15:53:05 | * | yglukhov quit (Remote host closed the connection) |
15:53:21 | * | natrys joined #nim |
15:54:02 | Araq | subsetpark: install your Nim as we tell you to. |
15:54:14 | Araq | you have an outdated nimbase.h that lacks N_LIB_PRIVATE |
15:54:30 | Araq | which was recently added |
15:54:45 | subsetpark | Yes, you're right |
15:55:09 | subsetpark | It's not that my nim is installed funny, it's that I am forced to vendor nimbase.h into the nim src directory :) |
15:55:54 | * | yglukhov joined #nim |
15:59:25 | * | fvs joined #nim |
16:00:19 | * | yglukhov quit (Remote host closed the connection) |
16:03:44 | * | arnetheduck quit (Ping timeout: 276 seconds) |
16:25:31 | FromGitter | <Varriount> Thou shalt install Nim using the Correct method. :P |
16:34:02 | * | miran joined #nim |
16:51:40 | radagast | Why aren't enums {.pure.} by default? |
16:53:00 | Araq | cause full qualification is stupid |
16:53:35 | Araq | ignores basic rules of linguistics. |
16:53:46 | Araq | context is everything. |
16:55:01 | * | Jesin joined #nim |
16:57:19 | radagast | Uhm, I have a enum type in my heap library: max, min. If a user imports the library Max and Min is available. In my opinion it's not a good idea since other libraries can have this enum too. |
16:58:49 | skrylar | boop |
17:00:07 | Araq | actually I unified enums with .pure enums |
17:00:33 | Araq | but need to finish this feature and patch the docs |
17:03:10 | Araq | btw IMO min and max are bad names, pickMin, pickMax or byMax, byMin would probably convey the meaning better |
17:03:38 | * | tinAndi joined #nim |
17:05:31 | radagast | min and max on themselves bad, but HeapKind.min/max are okay, I guess minHeap/ maxHeap works too. |
17:07:43 | Araq | HeapKind.min ... maybe. anyway, go ahead and use a .pure enum |
17:15:31 | * | nsf quit (Quit: WeeChat 2.0.1) |
17:26:14 | * | yardanico[m] joined #nim |
17:26:47 | * | Yardanico quit (Quit: Leaving) |
17:27:37 | * | yardanico[m] is now known as Yardanico |
17:37:05 | * | tinAndi quit (Ping timeout: 248 seconds) |
17:37:42 | * | Jesin quit (Quit: Leaving) |
17:52:33 | shashlick | been using c2nim last day after a while, in --cpp mode, it doesn't process any implementation, just converts vars, procs, etc. |
17:52:43 | shashlick | is this how it's always been? |
17:53:56 | * | d10n-work joined #nim |
17:54:34 | Yardanico | shashlick: it's mainly meant for porting headers |
17:54:35 | * | trip_1 joined #nim |
17:55:34 | shashlick | that's what I want too but it's different than in c mode where code gets converted |
17:55:38 | * | tinAndi joined #nim |
17:55:42 | shashlick | just curious if this is working as expected |
17:55:57 | shashlick | am submitting a bunch of issues |
17:56:05 | * | trip_1 left #nim ("Leaving") |
17:56:15 | shashlick | been running c2nim/nimgen through the streamworks api for treeform |
17:59:37 | * | miran quit (Quit: Konversation terminated!) |
18:00:48 | shashlick | 5 new c2nim issues, someone isn't going to like me |
18:01:22 | * | tinAndi quit (Ping timeout: 256 seconds) |
18:12:27 | * | S1t1Schu quit (Quit: Leaving) |
18:14:58 | * | kunev quit (Ping timeout: 256 seconds) |
18:15:24 | * | solitudesf joined #nim |
18:16:02 | * | kunev joined #nim |
18:18:29 | * | xkapastel quit (Quit: Connection closed for inactivity) |
18:41:26 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
18:42:10 | FromGitter | <mratsim> Are there Nim people at FOSDEM beer (with internet access?) |
18:43:54 | * | radagast quit (Ping timeout: 265 seconds) |
18:50:00 | * | natrys quit (Quit: natrys) |
19:09:57 | * | endragor joined #nim |
19:13:21 | shashlick | how do you forward declare an object without redefinition? |
19:14:27 | * | endragor quit (Ping timeout: 240 seconds) |
19:20:00 | * | Jesin joined #nim |
19:20:11 | * | Jesin quit (Remote host closed the connection) |
19:22:42 | GitDisc | <treeform> just don't add = at the end? |
19:25:39 | * | nsf joined #nim |
19:40:51 | * | couven92 joined #nim |
20:26:04 | * | icebattle joined #nim |
20:29:42 | * | icebattle quit (Client Quit) |
20:30:04 | * | icebattle joined #nim |
20:30:35 | * | BitPuffin quit (Remote host closed the connection) |
20:31:16 | * | icebattle quit (Client Quit) |
20:34:20 | * | icebattle joined #nim |
20:36:08 | * | icebattle quit (Client Quit) |
20:36:30 | * | icebattle joined #nim |
20:37:49 | * | BitPuffin joined #nim |
20:54:38 | * | rockcavera quit (Remote host closed the connection) |
20:58:26 | skrylar | min and max aren't bad names per se but it gets in to some weird context problems |
20:59:13 | skrylar | I'm not fully decided on whether context-free or contextualized is a good idea. Mostly the benefit to no-context grammar is toolking, ex. really easy to have emacs look up the name under point to go find a wiki page, context requires special nimsuggest/omnibrowser type things |
20:59:45 | skrylar | but sayings omething like "width: max" makes a lot more sense than "someItemWidthSetting: widthMaximum" |
21:02:17 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:04:41 | * | xet7 quit (Ping timeout: 276 seconds) |
21:10:40 | * | ofelas quit (Ping timeout: 240 seconds) |
21:19:41 | * | xet7 joined #nim |
21:42:12 | * | couven92 quit (Quit: Client Disconnecting) |
21:57:43 | * | BitPuffin quit (Remote host closed the connection) |
22:09:48 | * | endragor joined #nim |
22:14:44 | * | endragor quit (Ping timeout: 268 seconds) |
22:22:26 | * | ofelas joined #nim |
22:40:57 | FromGitter | <dom96> @mratsim we were there for a while |
22:41:01 | FromGitter | <dom96> I was wearing a Nim shirt |
22:44:20 | * | solitudesf quit (Ping timeout: 268 seconds) |
22:50:53 | * | vlad1777d joined #nim |
23:03:11 | FromGitter | <mratsim> Going back to the hotel @dom96 see you tomorrow |
23:29:22 | * | peppe__ joined #nim |
23:29:24 | * | radagast joined #nim |
23:38:19 | * | peppe__ quit (Ping timeout: 260 seconds) |