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:11 | subsetpark | Araq: 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:28 | yglukhov | Araq: FAIL: tioselectors.nim in appveyor is normal, right? =) |
07:05:52 | Araq | it occasionally fails yeah :-) |
07:06:54 | yglukhov | Araq: do you know why? |
07:07:11 | Araq | no |
07:07:17 | yglukhov | ok |
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:14 | tankfeeder | morning |
07:16:29 | tankfeeder | i need array with hardcoded values |
07:16:34 | tankfeeder | whats is the syntax ? |
07:17:07 | Arrrr | What do you mean by hardcoded values? initialized? |
07:17:12 | tankfeeder | yeap |
07:17:32 | tankfeeder | or to do in two steps ? |
07:18:10 | Arrrr | You can do it: `let myArray = [1, 2, 3, 4, 5]` |
07:18:20 | tankfeeder | o |
07:18:21 | tankfeeder | good |
07:18:28 | FromGitter | <indy9000_twitter> New to Nim-lang. What's the recommended web app framework fro Nim ? |
07:18:56 | Arrrr | One of the main contributors is working on this https://github.com/dom96/jester |
07:19:25 | FromGitter | <indy9000_twitter> Ta! |
07:21:39 | tankfeeder | Arrrr, what about two dimension array ? |
07:22:09 | Arrrr | [[1, 2], [3, 4], [5, 6]] |
07:22:27 | tankfeeder | ok |
07:23:25 | Arrrr | But, if you want to define the array and then initialize it: `var myArray: array[3, array[2, int]]` for example |
07:25:24 | tankfeeder | ok |
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:40 | yglukhov | Araq: please merge https://github.com/nim-lang/Nim/pull/6015 |
08:12:55 | Arrrr | The 'recursive module dependency' msg could display only the last two folders in which the module resides |
08:13:28 | Arrrr | *one or two |
08:21:20 | * | yglukhov quit (Remote host closed the connection) |
08:21:28 | FromGitter | <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:28 | FromGitter | ... 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:05 | tankfeeder | code: http://ideone.com/F57l3U |
08:31:05 | FromGitter | <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:23 | tankfeeder | why 0? |
08:31:36 | tankfeeder | only ord(d[1]) shl 8 works |
08:31:52 | tankfeeder | how better handle all this ? |
08:31:59 | * | yglukhov joined #nim |
08:34:36 | Arrrr | You are shifting the byte 8 bits to the left, zero is expected. What do you want to achieve? |
08:35:19 | tankfeeder | use ord or int16, right ? |
08:35:34 | tankfeeder | int16(d[1]) shl 8 |
08:37:09 | Arrrr | If you want to avoid the overflow yes |
08:37:18 | tankfeeder | good |
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:55 | salewski | I have just discovered that this compiles fine as long as the proc is not called: |
09:08:05 | salewski | proc p1(button: object) = |
09:08:14 | salewski | echo button.x31415 |
09:08:50 | salewski | That may make it hard to ensure type safety in macros. |
09:10:06 | FromGitter | <andreaferretti> yup |
09:10:32 | FromGitter | <andreaferretti> generic code is specialized at the time of calling |
09:10:46 | FromGitter | <andreaferretti> it is not even generated if nobody calls it |
09:11:51 | salewski | I have known that for templates, but I thought that proccs are always checked. |
09:12:00 | salewski | #proc p2(button: int) = |
09:12:07 | salewski | # echo button.x31415 |
09:12:39 | salewski | does not compile, so int argument is different from object or ref object argument |
09:12:44 | * | Trioxin joined #nim |
09:12:44 | FromGitter | <andreaferretti> generic procs are in effect a "template" (not in the Nim sense) for many similar specific procs |
09:13:46 | salewski | Why do you call that proc p1 generic? Just because argument is an object? |
09:14:46 | FromGitter | <andreaferretti> yes it is not a concrete type |
09:15:14 | FromGitter | <andreaferretti> if you call it with two different object types you will get two different specializations |
09:15:36 | salewski | OK, I did not know that. |
09:16:09 | FromGitter | <andreaferretti> in effect it is the same as `proc p1A (button: A)` |
09:16:30 | FromGitter | <andreaferretti> you just requested A to be not just any type, but an object type |
09:17:04 | FromGitter | <andreaferretti> the question you can always ask is "is there enough info to generate the code for this"? |
09:17:28 | FromGitter | <andreaferretti> if you anything that is not concrete, it is generic |
09:17:33 | FromGitter | <andreaferretti> it will be specialized later |
09:17:54 | salewski | OK, I understand, thanks. |
09:18:51 | salewski | Bye... |
09:18:54 | * | salewski quit (Quit: WeeChat 1.4) |
09:27:02 | * | eeproks-- joined #nim |
09:27:17 | tankfeeder | i have a variable x |
09:27:24 | tankfeeder | how to find it type ? |
09:29:09 | * | ludocode quit (Disconnected by services) |
09:29:10 | * | ludocode_ joined #nim |
09:29:33 | euantor | If you want the name of the type, use typetraits's `name()` proc: https://nim-lang.org/docs/typetraits.html |
09:29:41 | tankfeeder | ok |
09:29:54 | euantor | Along 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:10 | Arrrr | Can i program a switch game with nim? |
11:56:05 | tankfeeder | https://nim-lang.org/docs/manual.html#types-string-type |
11:56:53 | tankfeeder | should i implement $ for Person-like type myself or there is already generic implementation ? |
11:57:00 | tankfeeder | for debug purpose. |
11:59:07 | Arrrr | For a custom object? You can implement your own toString, but it generates one for you. You can also use `repr(object)` |
12:00:40 | tankfeeder | ok |
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:38 | PMunch | Looking into Arrrr's request a bit and it appears that the Switch should have a native C++ sdk |
13:23:04 | euantor | Just out of interest, is there any reason there isn't a `TcpStream` type in the `streams` module that wraps a TCP socket? |
13:23:44 | euantor | It 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:38 | Araq | there is no good reason for the lack of a streams sockets bridge |
13:25:12 | euantor | I might look at writing one then, as I might have use for it |
13:27:57 | couven92 | euantor, go for the SslStream as well, while you're at it? :P |
13:28:22 | tankfeeder | i want return a sequence from function |
13:28:35 | tankfeeder | hard find the syntax example |
13:28:36 | tankfeeder | someone ? |
13:29:26 | couven92 | tankfeeder, `proc foobar[T](): seq[T] = newSeq[T]()` |
13:29:50 | tankfeeder | ok |
13:30:29 | couven92 | thats the generic variant, here's for an int-sequence: `proc foobar(): seq[int] = newSeq[int]()` |
13:30:30 | tankfeeder | and how add numbers to result inside foobar ? |
13:31:14 | couven92 | tankfeeder, `result = newSeq[int]()` then `result.add(42)` |
13:31:21 | tankfeeder | 10x |
13:31:39 | couven92 | alternatively: `result = @[42]` |
13:37:40 | euantor | couven92: 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:03 | couven92 | euantor, I know! I've been missing it too ;) |
13:38:07 | euantor | I've glanced at Secure Transport for mac and it looks like it's fairly simple |
13:38:53 | FromGitter | <andreaferretti> don't we need some kind of async stream for this to work? |
13:40:16 | couven92 | @andreaferretti, well, in .NET, Streams have both blocking and async IO-methods |
13:41:23 | euantor | Yeah, .net's approach to STreams is really nice |
13:41:45 | euantor | And 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:43 | tankfeeder | i have a seq |
14:09:46 | tankfeeder | @[1,2,3] |
14:09:55 | FromGitter | <ephja> use it well my friend |
14:10:05 | tankfeeder | how to assign this sequence to type seq[uint8] ? |
14:12:25 | * | yglukhov_ quit (Ping timeout: 276 seconds) |
14:14:54 | FromGitter | <ephja> tankfeeder: <https://nim-lang.org/docs/sequtils.html#map,openArray[T],proc(T)> also see mapIt |
14:15:15 | tankfeeder | aha, ok |
14:15:37 | euantor | Araq: Would you also accept a patch to export `sockType` on `SocketImpl` so I can check if it's a stream socket? |
14:15:41 | FromGitter | <ephja> (testing markdown on gitter) https://nim-lang.org/docs/sequtils.html#map,openArray[T],proc(T) |
14:16:04 | euantor | The potential network stream also won't support setting/getting position or peeking data, which is hopefully ok |
14:16:29 | FromGitter | <ephja> maybe it was only leading commas that were causing problems |
14:17:35 | Araq | euantor: how does that help? |
14:18:02 | euantor | Because you obviously can't use a stream with a UDP socket, which isn't a connected socket |
14:18:20 | euantor | As it stands you can't check if a socket is TCP or UDP |
14:20:24 | FromGitter | <ephja> I meant the opposite of "leading" |
14:21:20 | * | arnetheduck joined #nim |
14:23:40 | FromGitter | <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:24 | libman | http://libman.org/img/bak/20170627-export-sockType.jpg |
14:32:18 | FromGitter | <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:10 | Araq | ho? UDP can't be pressed into a stream? |
14:50:26 | euantor | I guess it could be, but writing wouldn't work surely since UDP sockets aren't connected |
14:50:57 | euantor | And on the server end, reading wouldn't work as sockets aren't connected (you use `recvFrom` there) |
14:51:30 | euantor | The 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:25 | tankfeeder | i've implement blake2b on nim, tomorrow will code blake2s |
15:00:33 | * | beatmox joined #nim |
15:01:43 | PMunch | Nice tankfeeder |
15:04:13 | * | beatmox quit (Remote host closed the connection) |
15:05:04 | * | beatmox joined #nim |
15:11:15 | libman | http://libman.org/img/bak/20170627-winSock.png |
15:13:02 | * | tankfeeder quit (Quit: Leaving) |
15:20:53 | * | Trioxin joined #nim |
15:21:44 | Trioxin | has anyone here tried the unreal wrapper? |
15:22:13 | Trioxin | https://github.com/pragmagic/nimue4 |
15:22:28 | demi- | 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:21 | euantor | demi-: That would require new methods being added to the top level `Stream` interface that would only make sense for UDP sockets |
15:23:39 | Trioxin | demi, only for udp if you wanted |
15:23:56 | euantor | I'm not saying I'm against it, just that it doesn't fit the current interface |
15:24:12 | Trioxin | why would you want to though? |
15:26:17 | demi- | 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:01 | demi- | as you say, it might not exist currently, but i'm not sure i see a technical limitation in doing it |
15:27:13 | euantor | The plan for the future is an async stream that returns a `Future` type for async |
15:27:35 | euantor | It'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:08 | euantor | There are open RFCs at the minute for more radical IO overhauls and changes |
15:28:40 | demi- | yeah i get what you mean |
15:29:31 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:29:40 | Araq | andreaferretti: 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:23 | Trioxin | screw it, I'll just mess with frag. this is too much for not already knowing unreal |
15:36:08 | FromGitter | <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:34 | subsetpark | Any 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:18 | demi- | dom96: https://opensourcefriday.com maybe something to look at submitting Nim to |
16:32:31 | subsetpark | If 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:42 | dom96 | demi-: submit it then :) |
16:36:58 | * | handlex quit (Quit: handlex) |
16:51:20 | Trioxin | what's c2nim wanting here? https://github.com/BLAKE2/libb2/blob/master/src/blake2.h | blake2.h(143, 30) Error: ';' expected |
16:54:28 | FromGitter | <ephja> ===def BLAKE2_API=== |
16:54:52 | FromGitter | <ephja> \#def BLAKE2_API |
16:55:57 | FromGitter | <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:02 | FromGitter | <Varriount> @ephja `#def BLAKE2_API` needs to be used. |
17:47:50 | FromGitter | <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:58 | FromGitter | <Varriount> @indy9000_twitter `max(int)`? |
17:49:20 | FromGitter | <ephja> T.high? |
17:49:36 | FromGitter | <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:48 | FromGitter | <indy9000_twitter> is the Trie data structure in the std lib ? |
18:27:34 | Araq | critbits.nim, yes |
18:27:59 | * | vlad1777d joined #nim |
18:32:03 | FromGitter | <indy9000_twitter> ta! |
18:37:49 | FromGitter | <ephja> I can't even run nimsuggest and use koch at the same time without running out of memory |
18:38:22 | FromGitter | <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:43 | FromGitter | <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:38 | FromGitter | <ephja> `````` |
19:07:26 | FromGitter | <ephja> this seems to work ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5952aced57a6e9f72e064bfb] |
19:15:21 | FromGitter | <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:12 | subsetpark | So, 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:16 | FromGitter | <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:32 | Araq | subsetpark: what is the error? |
20:24:57 | subsetpark | undefined symbol: NTI_8FC9arcap3s5ZtfMs75krtA_ - I think I'm failing to include nimbase.h ? |
20:25:05 | subsetpark | even though compilation is succeeding |
20:28:53 | * | nsf joined #nim |
20:34:54 | subsetpark | Nope... even when I include nimbase with the .so file it's still failing |
20:37:07 | subsetpark | oh snap, unless it's just an old version of nimbase.h... |
20:38:15 | subsetpark | hm, nope. |
20:58:17 | * | aerx joined #nim |
21:03:25 | subsetpark | Got 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:26 | Araq | ok |
21:13:25 | FromGitter | <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:51 | Nikky | nim 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:19 | Nikky | trying to convert ffmpeg headers to nim.. i have seen somone post a issue about that somewhere but nothing that is available anywhere |
22:10:25 | FromGitter | <Varriount> Nikky: Are you using c2nim? |
22:10:35 | Nikky | trying to |
22:11:36 | FromGitter | <Varriount> Nikky: What problem are you running into? |
22:11:42 | Nikky | but 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:34 | FromGitter | <Varriount> You're using the 'def' directive to inline directives? |
22:13:30 | Nikky | i 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:09 | FromGitter | <Varriount> Nikky: Can you post a link to the source file you're having trouble with? |
22:15:36 | Nikky | https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/avcodec.h |
22:16:03 | Nikky | i got the file from the ffmpeg builds here.. type: dev http://ffmpeg.zeranoe.com/builds/ |
22:16:14 | Nikky | *linking: dev |
22:17:14 | FromGitter | <Varriount> Oh darn.. C2Nim still doesn't handle defines inside enum/struct definitions very well |
22:17:22 | Nikky | someone 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:43 | FromGitter | <Varriount> Nikky: GCC and Clang both have command-line options to run the preprocessor |
22:18:39 | FromGitter | <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:17 | FromGitter | <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:07 | FromGitter | <Varriount> Nikky: You can also use this: http://www.muppetlabs.com/~breadbox/software/cppp.html |
22:21:13 | Nikky | seems like i picked the worst piece of software to depend on |
22:21:53 | Nikky | wonder how that handles the relative imports.. |
22:21:53 | FromGitter | <Varriount> Nikky: Wrapping a large library is tricky, especially when the layout of structures depends on compile-time conditionals |
22:22:14 | FromGitter | <Varriount> Nikky: The partial preprocess doesn't handle includes. GCC will though |
22:22:42 | Nikky | yeah 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:35 | FromGitter | <Varriount> Nikky: You could also write a small frontend library in C, and use that from Nim |
22:24:27 | Nikky | i 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:35 | FromGitter | <Varriount> Hm. |
22:24:48 | FromGitter | <Varriount> Can you use a command line tool? What are you trying to do? |
22:25:55 | ipjk | The coloring code from error messages are hardcoded during compilation of nim right? |
22:26:04 | Nikky | in 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:09 | ipjk | ANSI or Windows |
22:26:23 | FromGitter | <Varriount> ipjk: I think there's a way to turn it off.. |
22:26:54 | Nikky | at 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:09 | FromGitter | <Varriount> Nikky: The only complications I see in that source file are defines inside structures |
22:27:11 | ipjk | Varriount: I want to get ANSI escapes instead of windows' one, since it doesn't work in emacs. |
22:27:11 | Nikky | *eventually |
22:27:28 | * | PMunch quit (Quit: leaving) |
22:27:47 | Nikky | so if i can solve that or c2nim could handle them it would most likely work ? |
22:27:48 | FromGitter | <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:34 | Nikky | thanks to the cppp tip itseems to help and i cna write a script to create processed headers for a specific configuration |
22:44:51 | Nikky | obviously i run into more issues |
22:48:37 | Nikky | https://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:56 | Nikky | @Varriount thanks for the help though |
22:52:11 | Nikky | and have a good day/night |
22:52:42 | FromGitter | <Varriount> Nikky: Same problem. C2Nim can't handle conditional defines inside structures. |
22:53:24 | FromGitter | <barcharcraz> Does there exist a collection of insane macros for futzing with scope/variables. Splatting into objects and that kinda thing |
22:54:11 | FromGitter | <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:51 | FromGitter | <barcharcraz> Like I've observed sfinae behavior change a few times |
23:02:39 | FromGitter | <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) |