<< 11-07-2016 >>

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:24datSilencerHi. Is this the right place to ask questions about wrapping C headers with c2nim? Thanks!
03:37:21ftsf_datSilencer, probably, best to just ask your question
03:38:14datSilencerok
03:38:32*fastrom quit (Quit: Leaving.)
03:39:01datSilencerSo I'm trying to wrap FMOD's headers, where fmod_common.h has the following (partial) content:
03:39:21datSilencer#if defined(_WIN32) || defined(__CYGWIN__)
03:39:29datSilencer #define F_CALL __stdcall
03:39:38datSilencer#else
03:39:43datSilencer #define F_CALL
03:39:46*nsf joined #nim
03:39:49datSilencer#endif
03:40:13datSilencer... then later, down the header, c2nim finds:
03:40:28datSilencer#ifdef DLL_EXPORTS
03:40:34datSilencer #define F_API F_EXPORT F_CALL
03:40:40datSilencer#else
03:40:45datSilencer #define F_API F_CALL
03:40:50datSilencer#endif
03:41:10datSilencer... that second block of code makes c2nim complain like so:
03:41:26datSilencerfmod_common.h(42, 1) Error: ';' expected
03:41:54ftsf_if you're pasting lots of stuff, please use gist or a pastebin like thing
03:42:05datSilencerah ok
03:42:07datSilencersorry :P
03:42:23datSilencerwell, I mean, that's pretty much it
03:42:48datSilencerso that error makes me think there might be a missing feature in c2nim's preprocessor
03:43:03datSilencerany thoughts or suggestions appreciated. Thanks!
03:43:57datSilencerwould it be better to open a Github issue with a small example?
03:45:19ftsf_it would
03:51:41datSilencerwill 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:26jefusshttps://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:28Araqthis 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:23yglukhovAraq: 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:46Araqthere never was a leak
07:54:05Araqthe tombstones are re-used
07:54:19Araqmaybe a bit too slowly and not consistently enough.
07:54:31Araqbut it's always been a weird issue
07:54:38yglukhovthere never was a leak? first step: denial :DD
07:54:55Araqreplace it be robin-hood-hashing
07:55:03Araqit's the superior algorithm anyway
07:55:08Araq*by
07:55:15*bjz joined #nim
07:55:54yglukhovok, so these tombstones could appear as a result of rehashing?
07:55:55*bjz quit (Client Quit)
07:58:37yglukhovok, 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:18yglukhovAraq: regarding the narrowing issue. have you been able to reproduce it?
08:02:59*ftsf_ quit (Quit: :q!)
08:11:54Araqhaven'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:23zielmichaIs 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:08Araqzielmicha: no, how could it infer the 'T'
08:22:06zielmichaI don't know :( . In C++ I could use non-explicit constructor, so I hoped that there is something similar in Nim.
08:23:55zielmicha(and in theory compiler could use return type inference to infer T)
08:24:29yglukhovAraq: no, it's not blocking
08:24:35Araq(I hope return type inference never makes it into Nim)
08:25:10Araq(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:37BlaXpiritif 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:09AraqBlaXpirit: strutils.splitWhitespace
11:05:43BlaXpiritthanks
11:06:56cheatfateAraq, could you please take a look https://github.com/nim-lang/Nim/issues/4475
11:14:28ephjathat's what split does now? hm ok
11:15:11ephjaBlaXpirit: do you still play xonotic?
11:15:24BlaXpiritephja, no
11:16:58ephjaok
11:17:29ephjait's fun, but really difficult to master
11:21:28Araqcheatfate: nice bug
11:21:36ephjawhat 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:17cheatfateAraq, just want to ask, is my syntax wrong?
11:22:47Araqvar t = newStringTable(modeCaseInsensitive) # compiles
11:22:57*bjz quit (Ping timeout: 276 seconds)
11:23:01*bjz_ joined #nim
11:23:05Araqthe syntax is not wrong though, it's some really nasty thing
11:23:16ephjaum. works for me
11:23:27ephjawait
11:23:57ephjathe compilation fails but Aporia runs the cached executable
11:33:22cheatfateAraq, i found my first `showstopper`? :)
11:33:47cheatfatebut its not `showstopper` because it can be avoided...:(
11:34:46ephjahe doesn't need to know that!
11:46:52Araqcheatfate: indeed, showstopper bug worthy.
11:52:29*fredrik92 joined #nim
11:58:45ArrrrWow, only 2 showstopper. Shit is getting fixed
12:11:52cheatfateyeah showstoppers only on dom96's side :)
12:13:48ephjanice
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:43kiersubmitted https://github.com/nim-lang/Nim/pull/4477 to fix the issue cheatfate just reported
14:10:25Araqkier: wow impressive. you beat me.
14:11:05Araqtest goes into tests/overload
14:17:44kierAraq: 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:02kierCI tests passed, looks like it's ready to be merged
15:18:45Araqthe test only happens to work btw, tests without a "spec" section need to be compilable, nothing more.
15:19:12Araqlook at any other of the trillion tests for how a "spec" section looks like
15:20:13Araq(apologies if you already know this)
15:22:59zielmichaIs it possible to reinsert type retrieved using macros.getType into AST?
15:24:23zielmicha(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:58zielmicha(if I replace Syms with Idents manually, it appears to work, but this doesn't look like clean solution)
15:26:03kierAraq: ah i've probably misinterpreted what the "spec" section is for
15:27:18kierthe test code should just compile; if it fails to compile, then the bug's been reintroduced
15:28:20Araqyes, that's why I accepted your PR
15:29:04Araqzielmicha: 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:05chemist69Hi, 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:00Araqwhen you're after a Python experience, pick TableRef
15:40:40Araqwhen you care about memory indirections and know how to program for speed, pick Table
15:42:30kierif `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:15kierwhereas 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:45kierif 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:36chemist69Araq, kier: Thanks for the explanations, that made it much clearer!
15:59:21Araqchemist69: can you add this information to tables.nim docs?
16:08:56Arrrr'A new quest was added to your journal'
16:12:24*GangstaCat joined #nim
16:26:48chemist69Yes, will do that.
16:28:27*fredrik92 quit (Ping timeout: 276 seconds)
16:30:48chemist69But 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:38cheatfateis 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:08Xecheatfate: github did
20:35:15Xei have a very unique problem with my nim code
20:35:17Xehttps://i.imgur.com/MLM8C3a.png
20:35:25Xei'm not even mad
20:35:32Xei'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:38cheatfatelooks like your content-type has your data
20:44:10cheatfateand content-length is only 16 bytes for such big json
20:48:39*yglukhov joined #nim
20:53:22Xedom96: 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:21Araqhmm, can we please remove em-dash again from the language?
22:59:47Araqcauses 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)