00:50:10 | * | yglukhov joined #nim |
00:54:57 | * | yglukhov quit (Ping timeout: 260 seconds) |
01:00:23 | * | fredrik92 quit (Read error: Connection reset by peer) |
01:05:44 | * | kulelu88 quit (Quit: Leaving) |
01:13:58 | * | desophos joined #nim |
01:26:51 | * | chemist69 quit (Ping timeout: 264 seconds) |
01:29:04 | * | ftsf_ joined #nim |
01:40:05 | * | chemist69 joined #nim |
01:56:44 | * | fastrom joined #nim |
02:52:06 | * | yglukhov joined #nim |
02:56:52 | * | yglukhov quit (Ping timeout: 260 seconds) |
03:21:41 | * | trusion joined #nim |
03:32:29 | * | datSilencer joined #nim |
03:35:24 | datSilencer | Hi. Is this the right place to ask questions about wrapping C headers with c2nim? Thanks! |
03:37:21 | ftsf_ | datSilencer, probably, best to just ask your question |
03:38:14 | datSilencer | ok |
03:38:32 | * | fastrom quit (Quit: Leaving.) |
03:39:01 | datSilencer | So I'm trying to wrap FMOD's headers, where fmod_common.h has the following (partial) content: |
03:39:21 | datSilencer | #if defined(_WIN32) || defined(__CYGWIN__) |
03:39:29 | datSilencer | #define F_CALL __stdcall |
03:39:38 | datSilencer | #else |
03:39:43 | datSilencer | #define F_CALL |
03:39:46 | * | nsf joined #nim |
03:39:49 | datSilencer | #endif |
03:40:13 | datSilencer | ... then later, down the header, c2nim finds: |
03:40:28 | datSilencer | #ifdef DLL_EXPORTS |
03:40:34 | datSilencer | #define F_API F_EXPORT F_CALL |
03:40:40 | datSilencer | #else |
03:40:45 | datSilencer | #define F_API F_CALL |
03:40:50 | datSilencer | #endif |
03:41:10 | datSilencer | ... that second block of code makes c2nim complain like so: |
03:41:26 | datSilencer | fmod_common.h(42, 1) Error: ';' expected |
03:41:54 | ftsf_ | if you're pasting lots of stuff, please use gist or a pastebin like thing |
03:42:05 | datSilencer | ah ok |
03:42:07 | datSilencer | sorry :P |
03:42:23 | datSilencer | well, I mean, that's pretty much it |
03:42:48 | datSilencer | so that error makes me think there might be a missing feature in c2nim's preprocessor |
03:43:03 | datSilencer | any thoughts or suggestions appreciated. Thanks! |
03:43:57 | datSilencer | would it be better to open a Github issue with a small example? |
03:45:19 | ftsf_ | it would |
03:51:41 | datSilencer | will do then. Thanks! |
04:04:34 | * | endragor joined #nim |
04:30:21 | * | Jesin quit (Quit: Leaving) |
04:54:01 | * | yglukhov joined #nim |
04:58:48 | * | yglukhov quit (Ping timeout: 276 seconds) |
05:00:21 | * | datSilencer quit (Quit: Page closed) |
05:25:15 | * | akamaus joined #nim |
05:35:14 | * | ephja quit (Read error: Connection reset by peer) |
05:53:38 | * | akaisora joined #nim |
05:55:47 | * | akaisora quit (Remote host closed the connection) |
06:17:12 | * | endragor_ joined #nim |
06:20:58 | * | endragor quit (Ping timeout: 244 seconds) |
06:32:23 | * | endragor_ quit (Remote host closed the connection) |
06:32:52 | * | endragor joined #nim |
06:34:52 | * | yglukhov joined #nim |
06:35:57 | * | afrigginelf joined #nim |
06:39:11 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:44:43 | * | akamaus quit (Ping timeout: 252 seconds) |
06:48:09 | * | jefuss joined #nim |
06:48:26 | jefuss | https://m.youtube.com/watch?v=1dLXAk0qli4&feature=youtu.be |
06:58:08 | * | pafmaf joined #nim |
07:11:53 | * | afrigginelf quit (Quit: soundcloud.com/wacastle glueparty.bandcamp.com) |
07:12:10 | * | akamaus joined #nim |
07:14:21 | * | yglukhov joined #nim |
07:16:53 | * | mcc quit (Quit: Connection closed for inactivity) |
07:23:28 | Araq | this is not #nim-offtopic |
07:28:37 | * | bjz joined #nim |
07:43:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:48:02 | * | bjz joined #nim |
07:51:42 | * | bjz quit (Client Quit) |
07:53:23 | yglukhov | Araq: hi. remember the tables memory leak problem? i suspect, there's still something left, but haven't looked carefully into that. Could be somewhere in rehashing... |
07:53:46 | Araq | there never was a leak |
07:54:05 | Araq | the tombstones are re-used |
07:54:19 | Araq | maybe a bit too slowly and not consistently enough. |
07:54:31 | Araq | but it's always been a weird issue |
07:54:38 | yglukhov | there never was a leak? first step: denial :DD |
07:54:55 | Araq | replace it be robin-hood-hashing |
07:55:03 | Araq | it's the superior algorithm anyway |
07:55:08 | Araq | *by |
07:55:15 | * | bjz joined #nim |
07:55:54 | yglukhov | ok, so these tombstones could appear as a result of rehashing? |
07:55:55 | * | bjz quit (Client Quit) |
07:58:37 | yglukhov | ok, looks like i'm wrong. rehashing always allocates a fresh sequence. |
07:58:47 | * | bjz joined #nim |
07:59:01 | * | jefuss quit (Ping timeout: 250 seconds) |
08:00:18 | yglukhov | Araq: regarding the narrowing issue. have you been able to reproduce it? |
08:02:59 | * | ftsf_ quit (Quit: :q!) |
08:11:54 | Araq | haven't looked into it anymore. is it blocking you? |
08:13:04 | * | Nguyen joined #nim |
08:14:21 | * | Nguyen quit (Client Quit) |
08:14:39 | * | bitcrusher joined #nim |
08:15:23 | zielmicha | Is it possible for converter to have generic return type? Like 'converter fromInt[T](a: int): Foo[T]', so I can assign int to any Foo. (Trying this literally, errors with cannot instantiate: 'T'). |
08:18:27 | * | akamaus quit (Ping timeout: 264 seconds) |
08:19:08 | Araq | zielmicha: no, how could it infer the 'T' |
08:22:06 | zielmicha | I don't know :( . In C++ I could use non-explicit constructor, so I hoped that there is something similar in Nim. |
08:23:55 | zielmicha | (and in theory compiler could use return type inference to infer T) |
08:24:29 | yglukhov | Araq: no, it's not blocking |
08:24:35 | Araq | (I hope return type inference never makes it into Nim) |
08:25:10 | Araq | (I don't want libraries which make me write 'let x: T = yayOnlyWorksWithColonT' ) |
08:43:57 | * | elrood joined #nim |
08:53:23 | * | fastrom joined #nim |
09:00:58 | * | endragor quit (Remote host closed the connection) |
09:02:12 | * | endragor joined #nim |
09:30:00 | * | Demon_Fox quit (Quit: Leaving) |
09:30:52 | * | chemist69 quit (Ping timeout: 272 seconds) |
09:31:11 | * | chemist69 joined #nim |
09:57:45 | * | desophos quit (Read error: Connection reset by peer) |
10:00:01 | * | Arrrr joined #nim |
10:06:34 | * | fastrom quit (Quit: Leaving.) |
10:08:15 | * | fastrom joined #nim |
10:26:55 | * | rusua joined #nim |
10:35:27 | * | Laurenzo joined #nim |
10:51:19 | * | endragor quit (Remote host closed the connection) |
10:53:23 | * | ephja joined #nim |
10:53:27 | * | bitcrusher quit (Ping timeout: 246 seconds) |
10:54:34 | * | endragor joined #nim |
11:02:37 | BlaXpirit | if I have a string like " a \t bb c", how can I split it on any whitespace to get @["a", "bb", "c"] ? used to be just .split(), now that gives @[, , a, , , , , bb, c] |
11:04:09 | Araq | BlaXpirit: strutils.splitWhitespace |
11:05:43 | BlaXpirit | thanks |
11:06:56 | cheatfate | Araq, could you please take a look https://github.com/nim-lang/Nim/issues/4475 |
11:14:28 | ephja | that's what split does now? hm ok |
11:15:11 | ephja | BlaXpirit: do you still play xonotic? |
11:15:24 | BlaXpirit | ephja, no |
11:16:58 | ephja | ok |
11:17:29 | ephja | it's fun, but really difficult to master |
11:21:28 | Araq | cheatfate: nice bug |
11:21:36 | ephja | what would you use if you wanted to have both some other separator and not include it in the result? is that rarely used? I guess so |
11:22:17 | cheatfate | Araq, just want to ask, is my syntax wrong? |
11:22:47 | Araq | var t = newStringTable(modeCaseInsensitive) # compiles |
11:22:57 | * | bjz quit (Ping timeout: 276 seconds) |
11:23:01 | * | bjz_ joined #nim |
11:23:05 | Araq | the syntax is not wrong though, it's some really nasty thing |
11:23:16 | ephja | um. works for me |
11:23:27 | ephja | wait |
11:23:57 | ephja | the compilation fails but Aporia runs the cached executable |
11:33:22 | cheatfate | Araq, i found my first `showstopper`? :) |
11:33:47 | cheatfate | but its not `showstopper` because it can be avoided...:( |
11:34:46 | ephja | he doesn't need to know that! |
11:46:52 | Araq | cheatfate: indeed, showstopper bug worthy. |
11:52:29 | * | fredrik92 joined #nim |
11:58:45 | Arrrr | Wow, only 2 showstopper. Shit is getting fixed |
12:11:52 | cheatfate | yeah showstoppers only on dom96's side :) |
12:13:48 | ephja | nice |
12:17:21 | * | fredrik92 quit (Quit: Shutting down...) |
12:17:38 | * | fredrik92 joined #nim |
12:27:39 | * | nsf quit (Quit: WeeChat 1.5) |
14:08:20 | * | saml joined #nim |
14:08:43 | kier | submitted https://github.com/nim-lang/Nim/pull/4477 to fix the issue cheatfate just reported |
14:10:25 | Araq | kier: wow impressive. you beat me. |
14:11:05 | Araq | test goes into tests/overload |
14:17:44 | kier | Araq: cool, done. |
14:48:29 | * | endragor quit (Remote host closed the connection) |
14:49:24 | * | wrtds2 joined #nim |
14:49:59 | * | wrtds2 quit (Client Quit) |
15:13:02 | kier | CI tests passed, looks like it's ready to be merged |
15:18:45 | Araq | the test only happens to work btw, tests without a "spec" section need to be compilable, nothing more. |
15:19:12 | Araq | look at any other of the trillion tests for how a "spec" section looks like |
15:20:13 | Araq | (apologies if you already know this) |
15:22:59 | zielmicha | Is it possible to reinsert type retrieved using macros.getType into AST? |
15:24:23 | zielmicha | (getTypeInst returns something closest to what seems to be needed, for example BracketExpr Sym "Foo" Sym "byte", but compiler complains "Error: no generic parameters allowed for Foo") |
15:24:58 | zielmicha | (if I replace Syms with Idents manually, it appears to work, but this doesn't look like clean solution) |
15:26:03 | kier | Araq: ah i've probably misinterpreted what the "spec" section is for |
15:27:18 | kier | the test code should just compile; if it fails to compile, then the bug's been reintroduced |
15:28:20 | Araq | yes, that's why I accepted your PR |
15:29:04 | Araq | zielmicha: we try to prevent this due to soundness problems |
15:30:42 | * | fastrom quit (Ping timeout: 244 seconds) |
15:33:13 | * | edub4rt joined #nim |
15:33:44 | * | Jesin joined #nim |
15:37:05 | chemist69 | Hi, I am still getting started with Nim. I am currently looking into the tables module and am getting confused by the difference between Table and TableRef. When should I use one over the other? |
15:38:59 | * | nsf joined #nim |
15:40:00 | Araq | when you're after a Python experience, pick TableRef |
15:40:40 | Araq | when you care about memory indirections and know how to program for speed, pick Table |
15:42:30 | kier | if `a` is a Table, and you write `var b = a`, then `b` will effectively be a new table initialised to what the contents of `a` were. changing `b` doesn't affect `a`. |
15:43:15 | kier | whereas if `a` were a TableRef instead, then changes to `b` would still affect `a`. both `a` and `b` reference the same data structure. |
15:44:45 | kier | if you don't care too much about speed or memory constraints, then you can choose between Table and TableRef based on which behaviour you want |
15:47:27 | * | kulelu88 joined #nim |
15:47:27 | * | kulelu88 quit (Changing host) |
15:47:27 | * | kulelu88 joined #nim |
15:49:36 | chemist69 | Araq, kier: Thanks for the explanations, that made it much clearer! |
15:59:21 | Araq | chemist69: can you add this information to tables.nim docs? |
16:08:56 | Arrrr | 'A new quest was added to your journal' |
16:12:24 | * | GangstaCat joined #nim |
16:26:48 | chemist69 | Yes, will do that. |
16:28:27 | * | fredrik92 quit (Ping timeout: 276 seconds) |
16:30:48 | chemist69 | But have to clone the repo first. Will do that tomorrow, I am currently on a slow mobile connection. |
16:32:57 | * | akamaus joined #nim |
16:39:08 | * | Jesin quit (Quit: Leaving) |
16:44:14 | * | nsf quit (Quit: WeeChat 1.5) |
16:45:30 | * | yglukhov quit (Ping timeout: 250 seconds) |
16:52:13 | * | fredrik92 joined #nim |
16:52:13 | * | _stowa joined #nim |
16:55:01 | * | fastrom joined #nim |
16:58:13 | * | _stowa quit (K-Lined) |
17:27:02 | * | TheLemonMan joined #nim |
17:31:48 | * | rgv151 joined #nim |
17:32:02 | * | rgv151 quit (Changing host) |
17:32:02 | * | rgv151 joined #nim |
17:32:11 | * | Trustable joined #nim |
17:33:21 | * | rusua quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:35:25 | * | rgv151 quit (Remote host closed the connection) |
17:37:18 | * | nsf joined #nim |
17:40:44 | * | brson joined #nim |
17:44:03 | * | pafmaf quit (Ping timeout: 240 seconds) |
17:45:16 | * | zodiak_ quit (Ping timeout: 252 seconds) |
18:06:11 | * | shodan45 joined #nim |
18:09:16 | * | yglukhov joined #nim |
18:11:02 | * | zodiak joined #nim |
18:20:33 | * | yglukhov quit (Remote host closed the connection) |
18:41:11 | * | yglukhov joined #nim |
18:45:29 | * | yglukhov quit (Ping timeout: 244 seconds) |
18:52:57 | * | pafmaf joined #nim |
19:05:33 | * | fastrom quit (Ping timeout: 246 seconds) |
19:14:55 | * | Arrrr quit (Read error: Connection reset by peer) |
19:15:25 | * | yglukhov joined #nim |
19:16:24 | * | Matthias247 joined #nim |
19:20:03 | * | yglukhov quit (Ping timeout: 276 seconds) |
19:30:00 | * | fastrom joined #nim |
19:33:47 | * | fastrom quit (Client Quit) |
19:36:18 | * | akamaus quit (Ping timeout: 276 seconds) |
19:37:56 | * | yglukhov joined #nim |
19:45:40 | * | fastrom joined #nim |
19:45:40 | * | fastrom quit (Read error: Connection reset by peer) |
19:45:46 | * | fastrom1 joined #nim |
19:48:57 | * | brson quit (Ping timeout: 246 seconds) |
19:59:03 | * | afrigginelf joined #nim |
20:01:03 | * | rusua joined #nim |
20:15:14 | * | brson joined #nim |
20:21:41 | * | fastrom joined #nim |
20:21:41 | * | fastrom1 quit (Read error: Connection reset by peer) |
20:23:00 | * | Trustable quit (Remote host closed the connection) |
20:23:15 | * | GangstaCat quit (Quit: Leaving) |
20:24:38 | cheatfate | is github changed font? or my browser changed font? |
20:26:04 | * | fastrom quit (Ping timeout: 250 seconds) |
20:31:02 | * | edub4rt quit (Quit: Leaving) |
20:32:50 | * | yglukhov quit (Remote host closed the connection) |
20:35:08 | Xe | cheatfate: github did |
20:35:15 | Xe | i have a very unique problem with my nim code |
20:35:17 | Xe | https://i.imgur.com/MLM8C3a.png |
20:35:25 | Xe | i'm not even mad |
20:35:32 | Xe | i'm more impressed that I managed to do that |
20:41:47 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
20:43:38 | cheatfate | looks like your content-type has your data |
20:44:10 | cheatfate | and content-length is only 16 bytes for such big json |
20:48:39 | * | yglukhov joined #nim |
20:53:22 | Xe | dom96: https://github.com/dom96/jester/issues/74 here's a fun one for you |
21:12:36 | * | fredrik92 quit (Ping timeout: 272 seconds) |
21:17:31 | * | rusua quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:37:52 | * | andi_ joined #nim |
21:39:12 | * | gunn quit (Ping timeout: 260 seconds) |
21:44:10 | * | gunn joined #nim |
21:52:32 | * | yglukhov1 joined #nim |
21:52:53 | * | yglukhov quit (Remote host closed the connection) |
21:52:53 | * | yglukhov1 is now known as yglukhov |
21:54:38 | * | desophos joined #nim |
21:58:00 | * | yglukhov quit (Ping timeout: 276 seconds) |
22:09:45 | * | elrood quit (Quit: Leaving) |
22:11:50 | * | andi_ quit (Quit: ChatZilla 0.9.92 [Firefox 47.0/20160604131506]) |
22:12:53 | * | pafmaf quit (Quit: Leaving) |
22:21:43 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:43:21 | * | gunn_ joined #nim |
22:46:20 | * | bjz joined #nim |
22:46:52 | * | gunn quit (Ping timeout: 260 seconds) |
22:53:21 | * | yglukhov joined #nim |
22:58:22 | * | yglukhov quit (Ping timeout: 272 seconds) |
22:59:21 | Araq | hmm, can we please remove em-dash again from the language? |
22:59:47 | Araq | causes complexity for no good reason. |
23:02:29 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:05:17 | * | fredrik92 joined #nim |
23:10:24 | * | ephja quit (Read error: Connection reset by peer) |
23:14:08 | * | fredrik92 quit (Quit: Shutting down...) |
23:19:33 | * | saml quit (Ping timeout: 240 seconds) |
23:39:29 | * | Jesin joined #nim |
23:42:22 | * | afrigginelf quit (Ping timeout: 250 seconds) |
23:42:32 | * | Matthias247 quit (Read error: Connection reset by peer) |