<< 27-06-2017 >>

00:06:55*ipjk quit (Read error: Connection reset by peer)
00:13:53*bjz joined #nim
00:21:11*adeohluwa quit (Quit: Connection closed for inactivity)
00:23:16*sz0 joined #nim
00:27:11subsetparkAraq: seems like my appveyor build failed even though no tests failed? Is this normal?
00:40:26*yglukhov quit (Remote host closed the connection)
01:31:43*Nobabs27 joined #nim
01:40:58*yglukhov joined #nim
01:45:33*yglukhov quit (Ping timeout: 255 seconds)
01:50:34*chemist69 quit (Disconnected by services)
01:50:38*chemist69_ joined #nim
02:01:30*daaf joined #nim
02:04:47*libman joined #nim
02:08:53*daaf quit (Quit: Konversation terminated!)
02:09:03*daaf joined #nim
02:18:31*eeproks joined #nim
02:33:00*bjz_ joined #nim
02:35:48*bjz quit (Ping timeout: 260 seconds)
02:43:44*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:57:53*jinshil joined #nim
03:19:24*daaf quit (Ping timeout: 240 seconds)
03:23:13*pilne quit (Quit: Quitting!)
03:32:30*def-pri-pub joined #nim
03:43:19*yglukhov joined #nim
03:48:28*yglukhov quit (Ping timeout: 240 seconds)
04:03:42*Nobabs27 quit (Quit: Leaving)
04:29:22*arecacea1 quit (Remote host closed the connection)
04:29:55*arecacea1 joined #nim
04:32:04*def-pri-pub quit (Quit: leaving)
04:47:54*jszymanski joined #nim
05:04:18*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:07:44*bjz joined #nim
05:10:06*jinshil_ joined #nim
05:10:28*synack joined #nim
05:10:51*synack is now known as Guest85780
05:13:10*mal``` joined #nim
05:13:11*mwbrown_ joined #nim
05:13:55*gsingh93 quit (Ping timeout: 260 seconds)
05:13:56*FromGitter quit (Ping timeout: 260 seconds)
05:13:56*heinrich5991 quit (Ping timeout: 260 seconds)
05:13:56*dom96 quit (Ping timeout: 260 seconds)
05:13:57*mal`` quit (Ping timeout: 260 seconds)
05:13:57*Ieuan quit (Ping timeout: 260 seconds)
05:13:57*vqrs quit (Ping timeout: 260 seconds)
05:13:57*mwbrown quit (Ping timeout: 260 seconds)
05:13:59*CcxWrk quit (Ping timeout: 260 seconds)
05:13:59*jinshil quit (Ping timeout: 260 seconds)
05:13:59*mwbrown_ is now known as mwbrown
05:14:00*ludocode quit (Ping timeout: 260 seconds)
05:14:00*benoliver999 quit (Ping timeout: 260 seconds)
05:14:25*dom96 joined #nim
05:14:28*stvc quit (Ping timeout: 260 seconds)
05:14:48*vqrs joined #nim
05:14:51*FromGitter joined #nim
05:15:33*ludocode joined #nim
05:15:39*stvc joined #nim
05:15:51*yaiyan joined #nim
05:16:54*ldlework quit (Ping timeout: 240 seconds)
05:17:48*CcxWrk joined #nim
05:18:57*ldlework joined #nim
05:18:57*ldlework quit (Changing host)
05:18:58*ldlework joined #nim
05:20:04*benoliver999 joined #nim
05:23:09*heinrich5991 joined #nim
05:35:36*pigmej_ joined #nim
05:39:11*pigmej quit (Ping timeout: 260 seconds)
05:39:11*pigmej_ is now known as pigmej
05:39:40*chrisheller quit (Ping timeout: 260 seconds)
05:40:18*chrisheller joined #nim
05:46:54*user02 quit (Ping timeout: 240 seconds)
05:52:00*Vladar joined #nim
05:55:04*yglukhov joined #nim
06:01:46*yglukhov quit (Remote host closed the connection)
06:14:42*aerx quit (Quit: WeeChat 1.8)
06:27:20*nsf joined #nim
06:33:31*libman quit (Quit: Connection closed for inactivity)
06:58:37*vendethiel joined #nim
06:59:13*vendethiel- quit (Ping timeout: 255 seconds)
07:02:18*tankfeeder joined #nim
07:02:27*yglukhov joined #nim
07:05:28yglukhovAraq: FAIL: tioselectors.nim in appveyor is normal, right? =)
07:05:52Araqit occasionally fails yeah :-)
07:06:54yglukhovAraq: do you know why?
07:07:11Araqno
07:07:17yglukhovok
07:09:03*bjz_ joined #nim
07:10:01*bjz quit (Ping timeout: 255 seconds)
07:13:20*Arrrr joined #nim
07:13:20*Arrrr quit (Changing host)
07:13:20*Arrrr joined #nim
07:16:14tankfeedermorning
07:16:29tankfeederi need array with hardcoded values
07:16:34tankfeederwhats is the syntax ?
07:17:07ArrrrWhat do you mean by hardcoded values? initialized?
07:17:12tankfeederyeap
07:17:32tankfeederor to do in two steps ?
07:18:10ArrrrYou can do it: `let myArray = [1, 2, 3, 4, 5]`
07:18:20tankfeedero
07:18:21tankfeedergood
07:18:28FromGitter<indy9000_twitter> New to Nim-lang. What's the recommended web app framework fro Nim ?
07:18:56ArrrrOne of the main contributors is working on this https://github.com/dom96/jester
07:19:25FromGitter<indy9000_twitter> Ta!
07:21:39tankfeederArrrr, what about two dimension array ?
07:22:09Arrrr[[1, 2], [3, 4], [5, 6]]
07:22:27tankfeederok
07:23:25ArrrrBut, if you want to define the array and then initialize it: `var myArray: array[3, array[2, int]]` for example
07:25:24tankfeederok
07:27:33*xet7 joined #nim
07:30:11*vlad1777d joined #nim
07:39:10*gokr joined #nim
07:44:51*alxf quit (Ping timeout: 276 seconds)
07:45:10*alxf joined #nim
08:03:40yglukhovAraq: please merge https://github.com/nim-lang/Nim/pull/6015
08:12:55ArrrrThe 'recursive module dependency' msg could display only the last two folders in which the module resides
08:13:28Arrrr*one or two
08:21:20*yglukhov quit (Remote host closed the connection)
08:21:28FromGitter<moigagoo> @Varriount @Araq OK, I tried looking it up in the JS code. I'm too stupid to properly interpret the result, so I'm sharing it with you. ⏎ ⏎ This line: `debugEcho s[i] in {'0'..'9'}` is translated into this line: `rawEcho(nimBoolToStr((ConstSet3[s_26968[chckIndx(i_26974, 0, s_26968.length)-0]] != undefined)));`. ⏎ ⏎ Here, `ConstSet3` is `Object {0: true, 125: true}`, `s_26968` is an array of length 5: `[50,
08:21:28FromGitter... 48, 49, 55, 0]`, and `s_26968[chckIndx(i_26974, 0, s_26968.length)-0]` is `50` (the 0th element). Because `ConstSet3` doesn't have the `50` key, the condition evaluates to `undefined`. This is why the `while` loop never runs. [https://gitter.im/nim-lang/Nim?at=595215874bcd78af564d5af0]
08:31:05tankfeedercode: http://ideone.com/F57l3U
08:31:05FromGitter<moigagoo> So, the problem seems to be that `ConstSet3` should be `{48: true, 49: true, 50: true, 51: true, 52: true, 53: true, 54:true, 55: true, 56: true, 57: true}` instead of `{0: true, 125: true}`.
08:31:23tankfeederwhy 0?
08:31:36tankfeederonly ord(d[1]) shl 8 works
08:31:52tankfeederhow better handle all this ?
08:31:59*yglukhov joined #nim
08:34:36ArrrrYou are shifting the byte 8 bits to the left, zero is expected. What do you want to achieve?
08:35:19tankfeederuse ord or int16, right ?
08:35:34tankfeederint16(d[1]) shl 8
08:37:09ArrrrIf you want to avoid the overflow yes
08:37:18tankfeedergood
08:38:34*jinshil joined #nim
08:40:57*jinshil_ quit (Ping timeout: 240 seconds)
09:03:05*jinshil quit (Quit: Good-bye!)
09:06:37*salewski joined #nim
09:07:55salewskiI have just discovered that this compiles fine as long as the proc is not called:
09:08:05salewskiproc p1(button: object) =
09:08:14salewski echo button.x31415
09:08:50salewskiThat may make it hard to ensure type safety in macros.
09:10:06FromGitter<andreaferretti> yup
09:10:32FromGitter<andreaferretti> generic code is specialized at the time of calling
09:10:46FromGitter<andreaferretti> it is not even generated if nobody calls it
09:11:51salewskiI have known that for templates, but I thought that proccs are always checked.
09:12:00salewski#proc p2(button: int) =
09:12:07salewski# echo button.x31415
09:12:39salewskidoes not compile, so int argument is different from object or ref object argument
09:12:44*Trioxin joined #nim
09:12:44FromGitter<andreaferretti> generic procs are in effect a "template" (not in the Nim sense) for many similar specific procs
09:13:46salewskiWhy do you call that proc p1 generic? Just because argument is an object?
09:14:46FromGitter<andreaferretti> yes it is not a concrete type
09:15:14FromGitter<andreaferretti> if you call it with two different object types you will get two different specializations
09:15:36salewskiOK, I did not know that.
09:16:09FromGitter<andreaferretti> in effect it is the same as `proc p1A (button: A)`
09:16:30FromGitter<andreaferretti> you just requested A to be not just any type, but an object type
09:17:04FromGitter<andreaferretti> the question you can always ask is "is there enough info to generate the code for this"?
09:17:28FromGitter<andreaferretti> if you anything that is not concrete, it is generic
09:17:33FromGitter<andreaferretti> it will be specialized later
09:17:54salewskiOK, I understand, thanks.
09:18:51salewskiBye...
09:18:54*salewski quit (Quit: WeeChat 1.4)
09:27:02*eeproks-- joined #nim
09:27:17tankfeederi have a variable x
09:27:24tankfeederhow to find it type ?
09:29:09*ludocode quit (Disconnected by services)
09:29:10*ludocode_ joined #nim
09:29:33euantorIf you want the name of the type, use typetraits's `name()` proc: https://nim-lang.org/docs/typetraits.html
09:29:41tankfeederok
09:29:54euantorAlong with `type()`
09:30:12*jackkv joined #nim
09:33:14*ldleworker joined #nim
09:33:27*yaiyan_ joined #nim
09:34:05*couven92 joined #nim
09:34:58*ldlework quit (*.net *.split)
09:34:58*CcxWrk quit (*.net *.split)
09:34:58*yaiyan quit (*.net *.split)
09:34:58*Jesin quit (*.net *.split)
09:34:58*eeproks quit (*.net *.split)
09:34:59*d10n quit (*.net *.split)
09:35:00*jackv quit (*.net *.split)
09:35:00*Elronnd quit (*.net *.split)
09:35:51*gokr left #nim (#nim)
09:36:02*CcxWrk joined #nim
09:36:58*d10n joined #nim
09:36:58*d10n quit (Changing host)
09:36:58*d10n joined #nim
09:42:01*Jesin joined #nim
09:44:12*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:46:01*bjz joined #nim
09:56:17*PMunch joined #nim
10:18:57*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:19:37*Elronnd joined #nim
10:49:08*Trioxin quit (Ping timeout: 268 seconds)
11:39:49*user0 joined #nim
11:45:32*yglukhov quit (Ping timeout: 260 seconds)
11:49:55*krux02 joined #nim
11:52:10ArrrrCan i program a switch game with nim?
11:56:05tankfeederhttps://nim-lang.org/docs/manual.html#types-string-type
11:56:53tankfeedershould i implement $ for Person-like type myself or there is already generic implementation ?
11:57:00tankfeederfor debug purpose.
11:59:07ArrrrFor a custom object? You can implement your own toString, but it generates one for you. You can also use `repr(object)`
12:00:40tankfeederok
12:02:40*Snircle joined #nim
12:14:24*aerx joined #nim
12:28:24*manjaro-kde5-- quit (Quit: Konversation terminated!)
12:38:38*kier quit (Ping timeout: 260 seconds)
12:45:51*Arrrr quit (Read error: Connection reset by peer)
13:10:50*vendethiel- joined #nim
13:12:12*vendethiel quit (Ping timeout: 268 seconds)
13:18:38PMunchLooking into Arrrr's request a bit and it appears that the Switch should have a native C++ sdk
13:23:04euantorJust out of interest, is there any reason there isn't a `TcpStream` type in the `streams` module that wraps a TCP socket?
13:23:44euantorIt sounds like something that would be useful for parsers to be able to parse from a TCP stream or file stream or memory stream - something I do fairly often in .net (it's called a `NetworkStream` there)
13:24:38Araqthere is no good reason for the lack of a streams sockets bridge
13:25:12euantorI might look at writing one then, as I might have use for it
13:27:57couven92euantor, go for the SslStream as well, while you're at it? :P
13:28:22tankfeederi want return a sequence from function
13:28:35tankfeederhard find the syntax example
13:28:36tankfeedersomeone ?
13:29:26couven92tankfeeder, `proc foobar[T](): seq[T] = newSeq[T]()`
13:29:50tankfeederok
13:30:29couven92thats the generic variant, here's for an int-sequence: `proc foobar(): seq[int] = newSeq[int]()`
13:30:30tankfeederand how add numbers to result inside foobar ?
13:31:14couven92tankfeeder, `result = newSeq[int]()` then `result.add(42)`
13:31:21tankfeeder10x
13:31:39couven92alternatively: `result = @[42]`
13:37:40euantorcouven92: Well, the SslStream is something that I might build on top of this, which is one of the reasons a networkStream would be nice ;)
13:38:03couven92euantor, I know! I've been missing it too ;)
13:38:07euantorI've glanced at Secure Transport for mac and it looks like it's fairly simple
13:38:53FromGitter<andreaferretti> don't we need some kind of async stream for this to work?
13:40:16couven92@andreaferretti, well, in .NET, Streams have both blocking and async IO-methods
13:41:23euantorYeah, .net's approach to STreams is really nice
13:41:45euantorAnd there has been talk of an async stream for a while. Even if we just have a blocking network stream, it's a start
13:43:27*Vladar quit (Quit: Leaving)
13:49:36*libman joined #nim
13:56:33*bjz joined #nim
14:05:10*yglukhov joined #nim
14:07:20*yglukhov_ joined #nim
14:09:24*yglukhov quit (Ping timeout: 240 seconds)
14:09:43tankfeederi have a seq
14:09:46tankfeeder@[1,2,3]
14:09:55FromGitter<ephja> use it well my friend
14:10:05tankfeederhow to assign this sequence to type seq[uint8] ?
14:12:25*yglukhov_ quit (Ping timeout: 276 seconds)
14:14:54FromGitter<ephja> tankfeeder: <https://nim-lang.org/docs/sequtils.html#map,openArray[T],proc(T)> also see mapIt
14:15:15tankfeederaha, ok
14:15:37euantorAraq: Would you also accept a patch to export `sockType` on `SocketImpl` so I can check if it's a stream socket?
14:15:41FromGitter<ephja> (testing markdown on gitter) https://nim-lang.org/docs/sequtils.html#map,openArray[T],proc(T)
14:16:04euantorThe potential network stream also won't support setting/getting position or peeking data, which is hopefully ok
14:16:29FromGitter<ephja> maybe it was only leading commas that were causing problems
14:17:35Araqeuantor: how does that help?
14:18:02euantorBecause you obviously can't use a stream with a UDP socket, which isn't a connected socket
14:18:20euantorAs it stands you can't check if a socket is TCP or UDP
14:20:24FromGitter<ephja> I meant the opposite of "leading"
14:21:20*arnetheduck joined #nim
14:23:40FromGitter<ephja> there are some things that ought to be present in the high level socket modules as well
14:25:57*fredrik92 joined #nim
14:26:14*couven92 quit (Disconnected by services)
14:26:20*fredrik92 is now known as couven92
14:31:24libmanhttp://libman.org/img/bak/20170627-export-sockType.jpg
14:32:18FromGitter<ephja> I like fluffy socks
14:36:12*fredrik92 joined #nim
14:36:54*yglukhov joined #nim
14:37:13*freddy92 joined #nim
14:38:27*couven92 quit (Ping timeout: 240 seconds)
14:40:39*freddy92 is now known as couven92
14:41:00*fredrik92 quit (Ping timeout: 260 seconds)
14:47:10Araqho? UDP can't be pressed into a stream?
14:50:26euantorI guess it could be, but writing wouldn't work surely since UDP sockets aren't connected
14:50:57euantorAnd on the server end, reading wouldn't work as sockets aren't connected (you use `recvFrom` there)
14:51:30euantorThe NetworkStream type only wi=orking with stream type sockets is in line with the implementation in .net and probably elsewhere
14:52:56*couven92 quit (Quit: Client disconnecting)
15:00:19*beatmox quit (Remote host closed the connection)
15:00:25tankfeederi've implement blake2b on nim, tomorrow will code blake2s
15:00:33*beatmox joined #nim
15:01:43PMunchNice tankfeeder
15:04:13*beatmox quit (Remote host closed the connection)
15:05:04*beatmox joined #nim
15:11:15libmanhttp://libman.org/img/bak/20170627-winSock.png
15:13:02*tankfeeder quit (Quit: Leaving)
15:20:53*Trioxin joined #nim
15:21:44Trioxinhas anyone here tried the unreal wrapper?
15:22:13Trioxinhttps://github.com/pragmagic/nimue4
15:22:28demi-i don't see why you couldn't have a streams abstraction for both TCP and UDP sockets, you would just need to provide a method callback for reading when you get new data for the UDP connection
15:23:21euantordemi-: That would require new methods being added to the top level `Stream` interface that would only make sense for UDP sockets
15:23:39Trioxindemi, only for udp if you wanted
15:23:56euantorI'm not saying I'm against it, just that it doesn't fit the current interface
15:24:12Trioxinwhy would you want to though?
15:26:17demi-euantor: eh. i think that using a callback would work for both TCP and UDP; it would assume an asynchronous pattern in processing data
15:27:01demi-as you say, it might not exist currently, but i'm not sure i see a technical limitation in doing it
15:27:13euantorThe plan for the future is an async stream that returns a `Future` type for async
15:27:35euantorIt's not really a technical limitation, just that it doesn't fit and I didn't want this to be a major radical change :)
15:28:08euantorThere are open RFCs at the minute for more radical IO overhauls and changes
15:28:40demi-yeah i get what you mean
15:29:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:29:40Araqandreaferretti: http://www.codersnotes.com/notes/maths-lib-2016/
15:29:58*yglukhov quit (Remote host closed the connection)
15:30:19*yglukhov joined #nim
15:32:23Trioxinscrew it, I'll just mess with frag. this is too much for not already knowing unreal
15:36:08FromGitter<andreaferretti> thanks, I'll have a read
15:39:42*nsf quit (Quit: WeeChat 1.7.1)
15:40:32*yglukhov quit (Remote host closed the connection)
15:53:11*couven92 joined #nim
16:05:35*Trustable joined #nim
16:06:36*fredrik92 joined #nim
16:07:58*couven92 quit (Disconnected by services)
16:07:59*yglukhov joined #nim
16:08:15*fredrik92 is now known as couven92
16:08:27*fredrik92 joined #nim
16:11:07*krux02 quit (Remote host closed the connection)
16:11:32*arnetheduck quit (Ping timeout: 260 seconds)
16:14:48*user0 quit (Ping timeout: 260 seconds)
16:15:01*user0 joined #nim
16:21:11*NotSpooky joined #nim
16:28:05*vlad1777d quit (Ping timeout: 240 seconds)
16:29:00*handlex joined #nim
16:30:34subsetparkAny ideas about this jester route body? With just the bottom `except` it works fine. When I add the more specific except on top, I get a type mismatch on the second `resp` line: got (bool) but expected 'FutureBase = ref FutureBase:ObjectType' https://www.irccloud.com/pastebin/OWRx3hdw/
16:32:18demi-dom96: https://opensourcefriday.com maybe something to look at submitting Nim to
16:32:31subsetparkIf i take care of it all in a `except Exception as e` statement, with `if e is KeyError` inside, it works perfectly
16:32:32*fredrik92 quit (Ping timeout: 260 seconds)
16:33:42dom96demi-: submit it then :)
16:36:58*handlex quit (Quit: handlex)
16:51:20Trioxinwhat's c2nim wanting here? https://github.com/BLAKE2/libb2/blob/master/src/blake2.h | blake2.h(143, 30) Error: ';' expected
16:54:28FromGitter<ephja> ===def BLAKE2_API===
16:54:52FromGitter<ephja> \#def BLAKE2_API
16:55:57FromGitter<ephja> um. how do I even send it to IRC unformatted?
16:59:53*pilne joined #nim
17:06:24*yglukhov quit (Remote host closed the connection)
17:10:58*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:14:14*nsf joined #nim
17:28:48*couven92 quit (Quit: Bye)
17:29:23*yglukhov joined #nim
17:47:02FromGitter<Varriount> @ephja `#def BLAKE2_API` needs to be used.
17:47:50FromGitter<indy9000_twitter> is there a way to get MAX_INT size like in C++ ?
17:48:01*yglukhov quit (Remote host closed the connection)
17:48:58FromGitter<Varriount> @indy9000_twitter `max(int)`?
17:49:20FromGitter<ephja> T.high?
17:49:36FromGitter<Varriount> Sorry, not max, high
17:53:12*aerx quit (Quit: WeeChat 1.9)
17:53:33*Trustable quit (Remote host closed the connection)
17:59:04*yglukhov joined #nim
18:06:50*Matthias247 joined #nim
18:20:48FromGitter<indy9000_twitter> is the Trie data structure in the std lib ?
18:27:34Araqcritbits.nim, yes
18:27:59*vlad1777d joined #nim
18:32:03FromGitter<indy9000_twitter> ta!
18:37:49FromGitter<ephja> I can't even run nimsuggest and use koch at the same time without running out of memory
18:38:22FromGitter<ephja> btw, I pressed ctrl-C but the tester keeps going
18:52:30*Ven joined #nim
18:52:54*Ven is now known as Guest73188
18:53:43FromGitter<coffeepots> hey everyone :) quick question. When using the tables function table.withValue(key, variable), variable is a pointer to the record, but I only have refs like seq here. How can I safely use the pointer, can i just use item[] ?
18:55:41*ipjk joined #nim
18:56:57*Guest73188 quit (Ping timeout: 240 seconds)
18:58:54*nsf quit (Quit: WeeChat 1.7.1)
19:02:28*vendethiel- quit (Ping timeout: 260 seconds)
19:06:38FromGitter<ephja> ``````
19:07:26FromGitter<ephja> this seems to work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5952aced57a6e9f72e064bfb]
19:15:21FromGitter<ephja> isn't there a 0 length array literal?
19:16:10*yglukhov_ joined #nim
19:19:28*yglukhov quit (Ping timeout: 246 seconds)
19:21:15*Jesin quit (Quit: Leaving)
19:25:04*Jesin joined #nim
19:25:28*PMunch quit (Ping timeout: 240 seconds)
19:26:09*PMunch joined #nim
19:34:39*PMunch quit (Quit: leaving)
19:34:57*PMunch joined #nim
19:37:14*jszymanski quit (Quit: computer sleeps...)
19:40:12subsetparkSo, I'm trying and failing to compile my nim library into c, and then pass it along to be compiled by the python module it's a part of. What should I know to make this work?
19:41:16FromGitter<ephja> I guess I meant re-implementing dynlib rather than importc. speaking of which, is importc even needed with dynlib? if not, was it needed before? bodies are completely ignored if I'm not mistaken
19:41:46*bjz joined #nim
19:51:57*eeproks-- is now known as eeproks
20:24:32Araqsubsetpark: what is the error?
20:24:57subsetparkundefined symbol: NTI_8FC9arcap3s5ZtfMs75krtA_ - I think I'm failing to include nimbase.h ?
20:25:05subsetparkeven though compilation is succeeding
20:28:53*nsf joined #nim
20:34:54subsetparkNope... even when I include nimbase with the .so file it's still failing
20:37:07subsetparkoh snap, unless it's just an old version of nimbase.h...
20:38:15subsetparkhm, nope.
20:58:17*aerx joined #nim
21:03:25subsetparkGot it! The nimcache directory wasn't being cleaned up properly - so there was a .c file only generated during debug builds being included by the Python C compiler when it was building the extension. The above symbol is only defined in that debug-only module.
21:08:56*libman quit (Quit: Connection closed for inactivity)
21:12:26Araqok
21:13:25FromGitter<ephja> I could, of course, use either templates or macros in order to execute something for each invocation
21:14:23*Nikky joined #nim
21:36:26*xet7 quit (Ping timeout: 258 seconds)
21:45:34*sz0 quit (Quit: Connection closed for inactivity)
21:48:43*user0 quit (Ping timeout: 260 seconds)
21:54:00*xet7 joined #nim
21:59:33*yglukhov_ quit (Remote host closed the connection)
22:02:44*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:03:51Nikkynim seems like a interesting language and might potentially save me from really needing to learn C in detail.. if i can manage to find or generate bindings for the tools we need to use.. which i am currently obviously failing at, otherwise i would not write this here :P
22:05:19Nikkytrying to convert ffmpeg headers to nim.. i have seen somone post a issue about that somewhere but nothing that is available anywhere
22:10:25FromGitter<Varriount> Nikky: Are you using c2nim?
22:10:35Nikkytrying to
22:11:36FromGitter<Varriount> Nikky: What problem are you running into?
22:11:42Nikkybut the problem seems to be that the ffmpeg headers contain too much preprocessor directives.. for example mixed into a enum declaration which c2nim cannot handle
22:12:34FromGitter<Varriount> You're using the 'def' directive to inline directives?
22:13:30Nikkyi am not sure if i am supposed to replace the #define with it or put it in the .c2nim file but it has no effect on the error message generated
22:14:09FromGitter<Varriount> Nikky: Can you post a link to the source file you're having trouble with?
22:15:36Nikkyhttps://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h
22:16:03Nikkyi got the file from the ffmpeg builds here.. type: dev http://ffmpeg.zeranoe.com/builds/
22:16:14Nikky*linking: dev
22:17:14FromGitter<Varriount> Oh darn.. C2Nim still doesn't handle defines inside enum/struct definitions very well
22:17:22Nikkysomeone said preprocessing it would be a workaround but i am really not knowlegeable to see how i preprocess the whole source before running c2nim on it
22:17:43FromGitter<Varriount> Nikky: GCC and Clang both have command-line options to run the preprocessor
22:18:39FromGitter<Varriount> Nikky: For places like https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h#L220 , one normally has to restructure the code to move the defines outside the enum definition.
22:19:17FromGitter<Varriount> So you have the entire enum structure being created conditionally, instead of a piece of it.
22:20:58*Matthias247_ joined #nim
22:21:07FromGitter<Varriount> Nikky: You can also use this: http://www.muppetlabs.com/~breadbox/software/cppp.html
22:21:13Nikkyseems like i picked the worst piece of software to depend on
22:21:53Nikkywonder how that handles the relative imports..
22:21:53FromGitter<Varriount> Nikky: Wrapping a large library is tricky, especially when the layout of structures depends on compile-time conditionals
22:22:14FromGitter<Varriount> Nikky: The partial preprocess doesn't handle includes. GCC will though
22:22:42Nikkyyeah the headers are differend based on the features that are selected.. which seems to be a pain in the ass
22:22:57*Matthias247 quit (Ping timeout: 240 seconds)
22:23:35FromGitter<Varriount> Nikky: You could also write a small frontend library in C, and use that from Nim
22:24:27Nikkyi considered doing that to do the operations i need to do in C there but then most of it would be in C and i loose the gains from using nim
22:24:35FromGitter<Varriount> Hm.
22:24:48FromGitter<Varriount> Can you use a command line tool? What are you trying to do?
22:25:55ipjkThe coloring code from error messages are hardcoded during compilation of nim right?
22:26:04Nikkyin short.. cluster transcoding.. currently just trying things out but .. splitting a video on keyframes, trnascoding them on differentm achines and then putting it all back together
22:26:09ipjkANSI or Windows
22:26:23FromGitter<Varriount> ipjk: I think there's a way to turn it off..
22:26:54Nikkyat the moment i would try to do those steps on one machine and then split it into two programs and eventuially involve networking
22:27:09FromGitter<Varriount> Nikky: The only complications I see in that source file are defines inside structures
22:27:11ipjkVarriount: I want to get ANSI escapes instead of windows' one, since it doesn't work in emacs.
22:27:11Nikky*eventually
22:27:28*PMunch quit (Quit: leaving)
22:27:47Nikkyso if i can solve that or c2nim could handle them it would most likely work ?
22:27:48FromGitter<Varriount> Which are a pain, but not impossible. You could probably either hand-edit the file, or run GCC/Clang on the file.
22:44:34Nikkythanks to the cppp tip itseems to help and i cna write a script to create processed headers for a specific configuration
22:44:51Nikkyobviously i run into more issues
22:48:37Nikkyhttps://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h#L1699 here it says error: ';' expected
22:49:21*nsf quit (Quit: WeeChat 1.7.1)
22:51:56Nikky@Varriount thanks for the help though
22:52:11Nikkyand have a good day/night
22:52:42FromGitter<Varriount> Nikky: Same problem. C2Nim can't handle conditional defines inside structures.
22:53:24FromGitter<barcharcraz> Does there exist a collection of insane macros for futzing with scope/variables. Splatting into objects and that kinda thing
22:54:11FromGitter<barcharcraz> Side note: how is overload resolution supposed to interact with templates, esp in the context of one overload resulting in invalid code
22:54:32*adeohluwa joined #nim
22:55:45*Matthias247_ quit (Read error: Connection reset by peer)
22:55:51FromGitter<barcharcraz> Like I've observed sfinae behavior change a few times
23:02:39FromGitter<barcharcraz> Oh wait, I can just overload on the ast instead of trying to sfinae
23:03:59*yglukhov joined #nim
23:04:36*Trioxin quit (Ping timeout: 258 seconds)
23:04:58*Trioxin joined #nim
23:21:01*yglukhov quit (Ping timeout: 276 seconds)
23:58:40*vlad1777d quit (Ping timeout: 260 seconds)