00:00:26 | * | yglukhov joined #nim |
00:04:49 | * | yglukhov quit (Ping timeout: 244 seconds) |
00:08:44 | * | arnetheduck joined #nim |
00:13:30 | * | brson quit (Ping timeout: 265 seconds) |
00:16:39 | * | brechtm quit (Read error: Connection reset by peer) |
00:16:56 | * | brechtm joined #nim |
00:20:08 | * | nsf quit (Quit: WeeChat 1.5) |
00:24:35 | * | brson joined #nim |
00:33:22 | * | yglukhov joined #nim |
00:38:21 | * | yglukhov quit (Ping timeout: 276 seconds) |
00:43:27 | * | girvo joined #nim |
00:45:29 | * | brson quit (Ping timeout: 265 seconds) |
00:47:55 | * | girvo quit (Ping timeout: 252 seconds) |
01:01:09 | * | brson joined #nim |
01:01:40 | * | mcc joined #nim |
01:05:33 | * | BlaXpirit quit (Ping timeout: 240 seconds) |
01:10:45 | * | chemist69 quit (Ping timeout: 250 seconds) |
01:11:34 | * | brson quit (Ping timeout: 252 seconds) |
01:15:05 | * | BlaXpirit joined #nim |
01:19:27 | * | yglukhov joined #nim |
01:24:09 | * | chemist69 joined #nim |
01:24:30 | * | yglukhov quit (Ping timeout: 276 seconds) |
01:44:28 | * | ftsf_ joined #nim |
01:51:40 | * | krux02 quit (Quit: Verlassend) |
01:56:07 | * | brson joined #nim |
01:56:27 | * | brechtm_ joined #nim |
01:57:11 | * | brechtm quit (Read error: Connection reset by peer) |
02:02:13 | * | yglukhov joined #nim |
02:08:27 | * | yglukhov quit (Ping timeout: 244 seconds) |
02:28:24 | * | ftsf_ quit (Ping timeout: 250 seconds) |
02:29:19 | * | brson quit (Ping timeout: 265 seconds) |
02:39:57 | * | ftsf_ joined #nim |
02:44:21 | * | girvo joined #nim |
02:46:11 | * | kulelu88 quit (Quit: Leaving) |
02:49:04 | * | girvo quit (Ping timeout: 255 seconds) |
02:53:14 | * | def- quit (Quit: -) |
03:03:30 | * | ftsf_ quit (Ping timeout: 250 seconds) |
03:03:56 | jo_ | Is there a way to pre-init a sequence with a value? I'm having a hard time googling for it and checking the docs. |
03:04:11 | jo_ | I see a lot of MENTIONS of sequence, but I tend to get really old results. |
03:04:41 | mcc | you don't mean @[] ? |
03:04:49 | mcc | or is seq different from sequence? |
03:05:19 | jo_ | Like, if I wanted an array of 10000 elements, can I do @[1..10000]? |
03:05:59 | jo_ | Or do I have to do var foo = @[]; for i in 0..10000: foo.add(i) |
03:06:06 | * | yglukhov joined #nim |
03:08:17 | * | def- joined #nim |
03:10:34 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:14:57 | * | ftsf_ joined #nim |
03:17:44 | mcc | i think you have to do the latter. if there's a way to just initialize a sequence to a particular length i haven't found it. |
03:17:55 | mcc | it would be nice, though :/ |
03:18:16 | jo_ | Yeah. |
03:18:49 | jo_ | Alternative question: I've got a native C method which will give me back an array of type uint32. |
03:19:10 | jo_ | I know the array size, but not at compile time. I'm guessing I should use `ptr seq[uint32]`? |
03:19:47 | mcc | i'm not sure. i've been wondering about this myself. it seems like treating it as a seq can't be right because if it's a seq that implies someone could call add() on ti? |
03:20:46 | jo_ | Yes, but at the same time I can't allocate a fixed-size array. |
03:20:59 | jo_ | I suppose if I use 'let' then it's immutable. |
03:23:38 | mcc | you can use openarray if you're passing things in to a function, but i don't think you can use it for a variable. |
03:24:08 | mcc | i feel like i'm missing something. surely the existing nim users need to create fixed-size arrays sometiems. |
03:25:19 | * | brson joined #nim |
03:25:43 | mcc | oh, also, you can use like var x : array[10000] |
03:25:59 | mcc | but i... i'm not sure but i *think* you can only do that if you know the "10000" at compile time |
03:26:00 | jo_ | I think I'll do that. |
03:26:05 | jo_ | Ah, dang. |
03:26:06 | jo_ | I don't. |
03:26:10 | mcc | which if you're working with images you obviously don't. |
03:26:41 | mcc | i'm not sure what it will do if you just say like var x : array[x*y, int32]. |
03:26:43 | mcc | It MIGHT work. |
03:26:52 | jo_ | Okay, how about this: I've got a C method which expects a ptr to an array. I have a sequence, how do I convert a sequence to an array? |
03:28:26 | mcc | it might be automatic? i don't know, i'm the wrong person to ask on all of this, these are literally all questions i've been trying to figure out myself :( |
03:29:10 | mcc | if you don't get an answer tonight i recommend asking the forum or coming in this channel during european-time-zone office hours |
03:33:22 | jo_ | Duly noted. Thanks. :) |
03:36:18 | * | brechtm_ quit (Read error: Connection reset by peer) |
03:36:24 | * | brechtm joined #nim |
03:48:45 | * | yglukhov joined #nim |
03:49:45 | FromGitter | <endragor> jo_: `addr mySeq[0]` should work. Make sure the C method is blocking and doesn’t save the pointer, i.e. it performs some operation with the array and returns. I’m assuming by `ptr to an array` you mean `T *`. |
03:51:02 | * | aFrigginElf joined #nim |
03:53:20 | * | yglukhov quit (Ping timeout: 250 seconds) |
03:54:14 | jo_ | endragor: Ah! I was doing addr mySeq. Thanks! |
03:57:33 | jo_ | Had to use add mySeq[], but success! |
03:59:16 | * | Sentreen quit (Ping timeout: 255 seconds) |
04:10:01 | * | Sentreen joined #nim |
04:11:52 | * | aFrigginElf quit (Ping timeout: 255 seconds) |
04:16:30 | * | BlaXpirit quit (Quit: Bye) |
04:16:46 | * | BlaXpirit joined #nim |
04:31:19 | * | yglukhov joined #nim |
04:35:37 | * | yglukhov quit (Ping timeout: 252 seconds) |
04:45:13 | * | girvo joined #nim |
04:48:26 | * | gokr joined #nim |
04:49:58 | * | girvo quit (Ping timeout: 265 seconds) |
04:57:28 | * | chemist69 quit (Ping timeout: 264 seconds) |
05:01:45 | * | chemist69 joined #nim |
05:05:31 | * | brson quit (Quit: leaving) |
05:13:39 | * | federico3 quit (Ping timeout: 265 seconds) |
05:14:20 | * | federico3 joined #nim |
05:26:21 | FromGitter | <vegansk> @jo_, lc[x | (x <- 0..10000), int] |
05:26:30 | FromGitter | <vegansk> lc macro in future module |
05:34:51 | * | yglukhov joined #nim |
05:39:21 | * | yglukhov quit (Ping timeout: 265 seconds) |
05:39:58 | * | csoriano_ joined #nim |
05:43:10 | * | brechtm quit (Read error: Connection reset by peer) |
05:43:16 | * | brechtm_ joined #nim |
05:48:10 | * | csoriano_ quit (Quit: csoriano_) |
06:17:47 | * | yglukhov joined #nim |
06:23:52 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:37:56 | * | Demon_Fox quit (Quit: Leaving) |
06:43:44 | * | mcc quit (Quit: Connection closed for inactivity) |
06:45:38 | * | stisa joined #nim |
06:46:00 | * | girvo joined #nim |
06:50:48 | * | girvo quit (Ping timeout: 276 seconds) |
06:56:35 | * | Arrrr joined #nim |
07:02:06 | * | fredrik92 joined #nim |
07:04:13 | * | chemist69 quit (Ping timeout: 255 seconds) |
07:06:55 | * | chemist69 joined #nim |
07:07:04 | * | aFriginElf joined #nim |
07:07:04 | * | aFrigginElf joined #nim |
07:21:33 | * | yglukhov joined #nim |
07:28:01 | * | yglukhov quit (Ping timeout: 265 seconds) |
07:28:12 | * | stisa quit (Quit: quitting...) |
07:30:00 | * | aFriginElf quit (Ping timeout: 250 seconds) |
07:30:00 | * | aFrigginElf quit (Ping timeout: 250 seconds) |
07:55:28 | * | Arrrr quit (Quit: WeeChat 1.5) |
07:57:51 | * | bjz joined #nim |
07:58:47 | * | Trustable joined #nim |
08:03:18 | * | Arrrr joined #nim |
08:03:18 | * | Arrrr quit (Changing host) |
08:03:18 | * | Arrrr joined #nim |
08:03:49 | * | nsf joined #nim |
08:05:24 | * | ftsf_ quit (Quit: :q!) |
08:11:59 | * | nicanaca0 quit (Remote host closed the connection) |
08:14:35 | * | nairobi joined #nim |
08:16:01 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:16:48 | * | fredrik92 quit (Quit: Leaving.) |
08:22:47 | * | Arrrr quit (Quit: WeeChat 1.5) |
08:22:51 | * | nairobi_ joined #nim |
08:23:04 | * | nairobi quit (Read error: Connection reset by peer) |
08:28:46 | * | bjz joined #nim |
08:29:25 | * | coffeepot joined #nim |
08:29:56 | * | nairobi_ quit (Read error: Connection reset by peer) |
08:30:39 | * | nairobi joined #nim |
08:32:01 | * | yglukhov joined #nim |
08:41:48 | * | nairobi quit (Remote host closed the connection) |
08:44:23 | * | nairobi joined #nim |
08:46:53 | * | girvo joined #nim |
08:51:29 | * | girvo quit (Ping timeout: 260 seconds) |
09:06:38 | * | namnguyen quit (Ping timeout: 250 seconds) |
09:14:54 | * | Arrrr joined #nim |
09:14:54 | * | Arrrr quit (Changing host) |
09:14:54 | * | Arrrr joined #nim |
09:56:58 | * | nairobi quit (Remote host closed the connection) |
10:00:49 | * | Andris_zbx joined #nim |
10:09:10 | * | JeffCanJam4a20 joined #nim |
10:10:48 | * | xet7_ joined #nim |
10:13:38 | * | xet7_ is now known as Guest27488 |
10:17:56 | * | fredrik92 joined #nim |
10:22:48 | dom96 | huh, I wonder why Araq's gravatar changed |
10:23:49 | Arrrr | He has evolved to Qara. |
10:25:30 | * | ngc joined #nim |
10:26:46 | * | filcuc joined #nim |
10:32:16 | * | brechtm joined #nim |
10:34:50 | * | GangstaCat joined #nim |
10:35:38 | * | brechtm_ quit (Ping timeout: 265 seconds) |
10:41:27 | * | fredrik92 quit (Quit: Leaving.) |
10:45:21 | * | bjz quit (Ping timeout: 250 seconds) |
10:47:44 | * | girvo joined #nim |
10:49:31 | * | bjz joined #nim |
10:52:14 | * | girvo quit (Ping timeout: 260 seconds) |
10:53:15 | * | fredrik92 joined #nim |
11:14:31 | * | brechtm_ joined #nim |
11:15:36 | * | Guest27488 quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
11:16:28 | * | nairobi joined #nim |
11:18:05 | * | brechtm quit (Ping timeout: 265 seconds) |
11:20:02 | * | PMunch joined #nim |
11:22:39 | * | fredrik92 quit (Quit: Leaving.) |
11:23:19 | * | fredrik92 joined #nim |
11:36:02 | * | nairobi quit (Remote host closed the connection) |
11:37:17 | * | PMunch quit (Quit: leaving) |
11:41:27 | * | Arrrr quit (Quit: WeeChat 1.5) |
11:44:12 | * | dddddd joined #nim |
12:02:57 | * | csoriano_ joined #nim |
12:04:22 | * | Learath2 quit (Ping timeout: 255 seconds) |
12:04:33 | * | learath2 joined #nim |
12:05:56 | * | BlaXpirit quit (Quit: Bye) |
12:06:11 | * | BlaXpirit joined #nim |
12:06:38 | * | jackv quit (Quit: ZNC - 1.6.0 - http://znc.in) |
12:08:57 | * | elrood joined #nim |
12:10:17 | * | pregressive quit (Remote host closed the connection) |
12:10:19 | * | nairobi joined #nim |
12:12:00 | * | fredrik92 quit (Read error: Connection reset by peer) |
12:20:24 | * | FromGitter quit (Remote host closed the connection) |
12:20:24 | * | BlaXpirit quit (Quit: Bye) |
12:20:41 | * | FromGitter joined #nim |
12:21:47 | * | BlaXpirit joined #nim |
12:21:48 | * | BlaXpirit quit (Remote host closed the connection) |
12:22:28 | * | BlaXpirit joined #nim |
12:24:09 | * | BlaXpirit quit (Client Quit) |
12:26:23 | * | BlaXpirit joined #nim |
12:30:46 | * | namnguyen joined #nim |
12:42:32 | * | waleee joined #nim |
12:42:47 | * | jackv joined #nim |
12:48:38 | * | girvo joined #nim |
12:53:11 | * | girvo quit (Ping timeout: 250 seconds) |
13:13:40 | * | chemist69 quit (Ping timeout: 264 seconds) |
13:40:29 | * | chemist69 joined #nim |
14:09:24 | * | nsf quit (Quit: WeeChat 1.5) |
14:15:26 | * | nicanaca0 joined #nim |
14:17:37 | * | Andris_zbx quit (Remote host closed the connection) |
14:20:37 | coffeepot | hey def-, I was in need of an async logger and remember reading your article here https://hookrace.net/blog/writing-an-async-logger-in-nim/ are you tempted to release the logger.nim as a nimble package? |
14:21:08 | coffeepot | or do you consider it too small to do so, and ppl should just nick the module to use? :) |
14:21:33 | * | fredrik92 joined #nim |
14:27:09 | * | brson joined #nim |
14:28:54 | * | waleee quit (Quit: Lost terminal) |
14:36:40 | coffeepot | anyone had any experience with this error: \nim\lib\pure\asyncmacro.nim(31, 8) Error: 'cb' is not GC-safe as it accesses 'nameIterVar' which is a global using GC'ed memory |
14:37:10 | coffeepot | error is triggered using jester's routes: macro |
14:37:21 | coffeepot | I am compiling with --threads:on |
14:38:26 | coffeepot | dom96 are you about? |
14:39:04 | cheatfate | async with threads? i think you trying to blowup yourself :) you need to know what are you doing |
14:39:33 | coffeepot | I have a separate thread running in addition to jester |
14:40:32 | coffeepot | I didn't do anything to enable async afaik, it's just popped up with this message |
14:40:35 | Araq | does jester support --threads:on? I don't think so |
14:40:46 | * | namnguyen quit (Ping timeout: 276 seconds) |
14:40:54 | coffeepot | oh, ok. I had this running yesterday. Odd |
14:43:13 | coffeepot | fwiw I wasn't trying to use threads with jester, I wanted jester to run in it's own thread and another thread would be doing something totally different |
14:44:09 | coffeepot | not really sure why compiling with --threads:on should affect that if jester isn't explicitly requesting to fire up threads, and async is single threaded isn't it? |
14:49:30 | * | girvo joined #nim |
14:53:43 | * | nairobi quit (Ping timeout: 250 seconds) |
14:54:24 | * | girvo quit (Ping timeout: 276 seconds) |
14:55:47 | coffeepot | cheatfate: I know what I'm trying to do, but came here to ask why it doesn't work. Answers like that are unhelpful imo, unless I'm expected to know the internals of async before using jester...? AFAIK async in other languages is a way to run many operations on one thread. |
15:00:22 | cheatfate | coffeepot, ok |
15:00:27 | * | nairobi joined #nim |
15:00:31 | cheatfate | coffeepot, sorry for joke |
15:02:21 | coffeepot | the joke part was okay, but sometimes I get the impression that everyone expects people to know everything before they ask a question, the noob experience should be valuable too. |
15:03:00 | * | fredrik92 quit (Quit: Leaving.) |
15:03:04 | coffeepot | for what it's worth, I did follow some of the async development and browsed the source code. Much of it was beyond me, but I didn't see any reason why it wouldn't work alongside threads |
15:03:48 | coffeepot | but hey, that's why I'm here! |
15:08:41 | cheatfate | coffeepot, http://nim-lang.org/docs/manual.html#threads-gc-safety |
15:09:29 | * | brson quit (Ping timeout: 260 seconds) |
15:13:39 | coffeepot | it's funny because the error I got was on this line: proc cb {.closure,gcsafe.} = |
15:14:20 | coffeepot | if jester isn't thread safe that's fine, I had the same problem with an http server in another language, and we decided to port the thread to another service |
15:14:56 | coffeepot | it's just we encountered another problem with the application, so I am porting it to nim to see if we can use that |
15:15:08 | coffeepot | so sorry if I'm a bit tetchy, time is short ;) |
15:17:57 | coffeepot | I am kinda surprised that this not-gc safe error is thrown when the line explicitly marks it as gc safe, but it could be some other complex interaction |
15:18:33 | Araq | claiming gcsafety doesn't cause gcsafety |
15:19:39 | coffeepot | no, of course, and reading further the issue is in asyncmacros 308: var iteratorNameSym = genSym(nskIterator, $prc[0].getName & "Iter") |
15:19:40 | * | space-wizard joined #nim |
15:20:19 | coffeepot | anyway, that's fine, I'll just keep the thread out when using jester and stick that part in another service as before |
15:20:34 | Araq | nim c --threads:on example2.nim # compiles for me |
15:20:44 | Araq | (example2 from jester) |
15:21:01 | * | JeffCanJam4a20 quit (Ping timeout: 250 seconds) |
15:21:12 | Araq | but, since your code is injected into thes proc cb {.closure, gcsafe.} |
15:21:33 | Araq | it's likely your code that is not gc safe and a stupid error message |
15:22:23 | coffeepot | example2 compiles for me too |
15:22:36 | coffeepot | however my code uses routes: macro which is where the error occurs |
15:23:39 | Araq | alltest.nim compiles and uses routes too |
15:23:45 | Araq | so it's your code :P |
15:23:50 | coffeepot | fwiw, I am running jester outside of threads. I spawn one thread that doesn't use jester |
15:27:29 | coffeepot | yeah I can run a simple test with routes: and that's fine with threads afaict. |
15:29:27 | coffeepot | right found the problem |
15:29:51 | Araq | what is it? |
15:30:03 | coffeepot | it isn't anything to do with jester at all and is as you said araq that i was using un gc safe stuff |
15:30:25 | Araq | why is the error message so bad then? can you share some gist? |
15:30:36 | coffeepot | i'll see what i can do, brb |
15:30:54 | * | bogen left #nim (#nim) |
15:32:45 | * | arnetheduck quit (Ping timeout: 244 seconds) |
15:34:50 | * | brson joined #nim |
15:42:44 | coffeepot | right, here's the gist https://gist.github.com/coffeepots/1048bc9921c255296c20990e683d6a1a |
15:43:02 | coffeepot | hello string is not gc safe ofc |
15:43:19 | * | brson quit (Ping timeout: 260 seconds) |
15:43:55 | coffeepot | araq in VSCode, ctrl-hover over test proc shows the pragma the compiler attaches, which includes gcsafe, tho as you say doesn't mean it is |
15:45:15 | coffeepot | not sure what to make of this, i mean yes i am running with --threads:on, so I should get warned it isn't gc safe, but since routes doesn't spawn a thread, everything should be gc safe with respect to the 'root' thread, right? |
15:47:01 | coffeepot | I guess the reason the error is misleading is just because the macro wraps the code, so technically it's right, but ofc the issue wasn't in asyncmacro |
15:48:28 | coffeepot | that also explains why I was able to run jester + thread yesterday but not today, as I added an argument to a proc that was declared at root level |
15:51:35 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:51:46 | Araq | well there are lots of problems here ;-) |
15:51:54 | Araq | the error message could be better. |
15:52:23 | Araq | the inference is local, not global, meaning that even if you use async only the main thread, the thread analysis complains anyway |
15:52:56 | * | space-wizard joined #nim |
15:53:22 | Araq | but I already have an idea... |
15:53:35 | * | space-wizard quit (Max SendQ exceeded) |
15:54:14 | * | space-wizard joined #nim |
15:54:15 | coffeepot | sounds good :) |
15:54:50 | * | space-wizard quit (Max SendQ exceeded) |
15:55:07 | * | brson joined #nim |
15:55:28 | * | space-wizard joined #nim |
15:56:03 | * | space-wizard quit (Max SendQ exceeded) |
15:56:40 | * | space-wizard joined #nim |
15:59:46 | * | filcuc quit (Read error: Connection reset by peer) |
16:02:31 | coffeepot | hey sorry i took your joke badly! It's been a long day ;) |
16:02:41 | coffeepot | @cheatfate |
16:07:03 | coffeepot | right time to sod off. Have a good day everyone :) |
16:07:23 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:08:19 | * | nairobi_ joined #nim |
16:11:52 | * | nairobi quit (Ping timeout: 255 seconds) |
16:17:30 | cheatfate | yglukhov, are you here? i have found a hard to resolve problem with named pipes, i can't make them equal to posix fifo's behavior |
16:18:04 | yglukhov | cheatfate: why not? |
16:18:30 | cheatfate | main problem is something i call connect/disconnect |
16:18:56 | cheatfate | with posix, fifo can be easily opened from both sides at every moment |
16:19:18 | cheatfate | write pipe can be opened first, or read pipe can be opened first it doesn't matter no error occurs |
16:20:11 | cheatfate | but on windows there is a problem |
16:21:21 | cheatfate | so i'm still thinking how to do it properly without 2 additional threads and 2 more kernel events |
16:22:52 | cheatfate | and of course windows is more flexible because on posix systems i can't change behavior |
16:27:00 | dom96 | I thought Windows didn't support named pipes? |
16:30:24 | euantor | Windows supports named pipes: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365590%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 |
16:30:29 | euantor | Has done for a very long time |
16:30:36 | * | PMunch joined #nim |
16:31:14 | euantor | They're similar in idea to fifos, but slightly different |
16:31:52 | cheatfate | they are very different in behavior |
16:32:10 | cheatfate | posix fifo needs mkfifo, open (read side), open (write side), read/write |
16:32:50 | cheatfate | windows named pipe needs createpipe, connectnamedpipe (read side), open (write side) read/write, disconnectnamedpipe and other shit |
16:34:49 | euantor | Yeah |
16:35:01 | cheatfate | so i can't make equal behavior |
16:35:18 | euantor | You can maybe create a wrapper to make them look similar |
16:35:27 | euantor | But that would make it difficult to have full control |
16:35:36 | cheatfate | without usage of heavy weapons, like threads and events |
16:35:42 | euantor | Yes, exactly |
16:35:52 | euantor | Which makes it quite complex |
16:36:54 | cheatfate | most problematic side is opening process |
16:50:22 | * | girvo joined #nim |
16:54:34 | * | girvo quit (Ping timeout: 240 seconds) |
17:02:57 | * | jo_ left #nim (#nim) |
17:06:16 | * | nsf joined #nim |
17:17:41 | * | yglukhov quit (Ping timeout: 265 seconds) |
17:24:10 | * | nairobi_ quit (Read error: Connection reset by peer) |
17:24:42 | * | nairobi joined #nim |
17:33:37 | * | brechtm joined #nim |
17:35:54 | * | brechtm_ quit (Ping timeout: 260 seconds) |
17:44:27 | * | nairobi_ joined #nim |
17:46:59 | * | nairobi_ quit (Read error: Connection reset by peer) |
17:47:18 | * | nairobi quit (Ping timeout: 276 seconds) |
18:03:32 | * | StarBrilliant joined #nim |
18:06:04 | * | hcorion joined #nim |
18:08:57 | * | hcorion quit (Remote host closed the connection) |
18:14:52 | * | chemist69 quit (Ping timeout: 264 seconds) |
18:15:29 | * | chemist69 joined #nim |
18:23:22 | * | fredrik92 joined #nim |
18:29:33 | * | gokr quit (Ping timeout: 276 seconds) |
18:41:50 | * | yglukhov joined #nim |
18:46:29 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:48:54 | * | nairobi joined #nim |
18:50:10 | * | Matthias247 joined #nim |
18:51:17 | * | girvo joined #nim |
18:55:49 | * | girvo quit (Ping timeout: 252 seconds) |
19:03:24 | PMunch | Hmm, I'm struggling a bit again with the Nim SDL stuff for Android |
19:03:50 | PMunch | In a #include nimbase.h statement I get nimbase.h: No such file or directory |
19:03:54 | PMunch | Which is strange |
19:05:20 | * | andi__ joined #nim |
19:05:47 | Araq | copy it over from lib/ |
19:06:34 | * | andi__ quit (Client Quit) |
19:06:41 | * | Ven_ joined #nim |
19:09:21 | PMunch | Aha, the nakefile had a field for Nim library folder which wasn't set properly |
19:11:49 | * | planhths joined #nim |
19:18:22 | * | yglukhov joined #nim |
19:20:29 | yglukhov | cheatfate: sorry, was busy a bit. youre still here? |
19:20:40 | cheatfate | yep |
19:22:11 | yglukhov | cheatfate: so can we go with a narrowed functionality which both windows and posix both can offer? |
19:22:18 | * | stisa joined #nim |
19:23:05 | yglukhov | tbh, i dont know the details of how fifos/namedpipes work |
19:23:14 | yglukhov | so can't be of much help here |
19:23:28 | yglukhov | but i'll try my best if you need any =) |
19:24:07 | yglukhov | the only thing i want is to be able to open/close a named duplex channel and read/write to it. |
19:24:14 | cheatfate | problem is not in functionality except opening/creation stage everything is fine |
19:24:16 | yglukhov | order doesn't matter a lot to me =) |
19:24:26 | * | nairobi_ joined #nim |
19:24:29 | cheatfate | yglukhov, you want duplex? |
19:24:40 | cheatfate | fifo don't support full duplex |
19:25:10 | yglukhov | sure, that would be cool. but half-duplex is also ok i guess. you always can open two pipes, right? =) |
19:25:35 | cheatfate | yep, because full duplex is more problematic |
19:25:53 | cheatfate | it is designed to be half duplex and many functions dont have nonblock functionality |
19:27:26 | yglukhov | what about unix sockets? is there a drawback in using them against fifos? |
19:28:16 | * | nairobi quit (Ping timeout: 252 seconds) |
19:28:54 | * | nairobi joined #nim |
19:31:38 | * | nairobi quit (Remote host closed the connection) |
19:33:06 | * | nairobi_ quit (Ping timeout: 265 seconds) |
19:33:44 | cheatfate | yglukhov, unix sockets is less compatible with windows pipes |
19:36:23 | cheatfate | because they are full duplex in mind |
19:36:24 | * | fredrik92 quit (Quit: Leaving.) |
19:42:27 | PMunch | yglukhov, have you used the SDL2_ttf stuff with Android? |
19:45:10 | * | oneau joined #nim |
19:46:20 | yglukhov | cheatfate: but arend windows pipes full duplex? |
19:46:35 | yglukhov | PMunch: no, i'm using stb_truetype |
19:46:51 | yglukhov | PMunch: its in yglukhov/ttf on github |
19:46:52 | PMunch | Hmm, pros/cons? |
19:47:02 | yglukhov | single nim file? =) |
19:49:55 | yglukhov | just works, no dependencies, nothing to configure. |
19:50:09 | * | oneau is now known as noglin |
19:54:16 | cheatfate | yglukhov, its hard to describe, but pipes architecture is not equal to sockets (even unix domain sockets). |
19:54:20 | PMunch | But how well does it play with SDL? |
19:54:38 | PMunch | Text over/under, scaling, rotation, blending? |
19:56:15 | cheatfate | yglukhov, and problem not with fifos or domain sockets problem with windows pipes :) |
19:57:29 | yglukhov | cheatfate: ok, i see. well, like i said. half duplex messaging system sounds good to me. so i trust you totally =) |
19:59:29 | yglukhov | PMunch: tbh, i don't use sdl that much. i use it to only create opengl context, and run the event loop (which im not happy about) and thats it. i do text rendering myself. check out latest nimx samples, if you havent already. |
20:00:49 | * | nairobi joined #nim |
20:03:20 | * | nsf quit (Quit: WeeChat 1.5) |
20:09:32 | * | nairobi quit (Remote host closed the connection) |
20:11:14 | * | csoriano_ quit (Quit: csoriano_) |
20:14:34 | * | Kaini quit (Ping timeout: 260 seconds) |
20:17:17 | * | Kaini joined #nim |
20:17:38 | * | nairobi joined #nim |
20:23:38 | * | nairobi quit (Remote host closed the connection) |
20:25:21 | * | gokr joined #nim |
20:30:48 | * | Fuyukai quit (Quit: ZNC 1.6.1+deb1 - http://znc.in) |
20:31:29 | * | SunDwarf joined #nim |
20:50:59 | * | yglukhov quit (Remote host closed the connection) |
20:52:05 | * | girvo joined #nim |
20:52:19 | * | Trustable quit (Remote host closed the connection) |
20:55:14 | * | libman joined #nim |
20:56:20 | * | girvo quit (Ping timeout: 244 seconds) |
21:06:15 | * | yglukhov joined #nim |
21:10:55 | * | csoriano_ joined #nim |
21:11:24 | * | yglukhov quit (Ping timeout: 276 seconds) |
21:11:59 | csoriano_ | I was playing with nim, and realized that this segfatuls |
21:12:13 | csoriano_ | var b: Table[int, Test] = Table[int, Test]() ; b[0] = Test() |
21:12:29 | csoriano_ | it needs to be initialized, but it's not what the contrusctor should do? |
21:16:02 | * | yglukhov joined #nim |
21:16:05 | * | nsf joined #nim |
21:16:56 | * | fredrik92 joined #nim |
21:17:38 | * | planhths quit (Quit: Konversation terminated!) |
21:18:26 | * | Demon_Fox joined #nim |
21:24:11 | * | nairobi joined #nim |
21:25:17 | stisa | csoriano_ : I think the constructor is initTable, try `var b: Table[int, Test] = initTable[int, Test]()` |
21:25:19 | * | nairobi quit (Read error: Connection reset by peer) |
21:25:55 | csoriano_ | stisa: however this Table[int, Test]() compiles too, and it follows regular constructors no? |
21:26:04 | csoriano_ | regular syntax* |
21:26:16 | * | libman quit (Read error: Connection reset by peer) |
21:26:43 | euantor | There isn't really constructors as such |
21:27:02 | euantor | Usually there's a function like `initX` or `newX` that initialises a type |
21:27:09 | csoriano_ | stisa: for example I saw that linked list has also the init*, but they work with the regular constructors like LinkedList[]() |
21:27:09 | * | libman joined #nim |
21:27:47 | csoriano_ | euantor: hm that's kinda strange, so there is no compile time way to tell if you are using correctly a constructor? |
21:28:30 | euantor | I don't even know what `LinkedList[]()` would do. I've never seen that documented at all |
21:28:51 | euantor | http://nim-lang.org/docs/tables.html |
21:29:07 | euantor | The examples int the docs all use `initTable` too |
21:29:34 | csoriano_ | yeah I know, still, I though there was some way to know wheter the constructor was done or not |
21:29:39 | csoriano_ | ar least allocated the memory |
21:29:54 | csoriano_ | so also the compiler can check you are trying to use a var withouth allocating memory for it before |
21:30:18 | euantor | Yeah, the Nim compiler doesn't do that at the minute as far as I know |
21:30:24 | csoriano_ | I see |
21:30:49 | csoriano_ | so it's on pourpose there is not regular constructors? |
21:31:07 | euantor | You'd have to ask @Araq on that one |
21:31:21 | csoriano_ | euantor: ok thanks |
21:38:37 | * | space-wizard quit (Ping timeout: 252 seconds) |
21:40:57 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:41:00 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:46:07 | * | nairobi joined #nim |
21:46:58 | * | fredrik92 quit (Quit: Leaving.) |
21:50:44 | * | stisa left #nim (#nim) |
21:55:18 | * | csoriano_ quit (Quit: csoriano_) |
21:58:55 | * | fredrik92 joined #nim |
22:02:55 | * | yglukhov quit (Remote host closed the connection) |
22:12:59 | * | noglin quit (Ping timeout: 260 seconds) |
22:23:40 | * | yglukhov joined #nim |
22:27:47 | * | yglukhov quit (Ping timeout: 244 seconds) |
22:52:54 | * | girvo joined #nim |
22:58:31 | * | girvo quit (Ping timeout: 265 seconds) |
23:00:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:04:24 | * | fredrik92 quit (Read error: Connection reset by peer) |
23:04:50 | * | yglukhov joined #nim |
23:05:12 | * | nairobi quit (Remote host closed the connection) |
23:06:24 | * | nairobi joined #nim |
23:06:24 | * | nairobi quit (Read error: Connection reset by peer) |
23:11:29 | * | yglukhov quit (Ping timeout: 265 seconds) |
23:27:52 | * | gokr quit (Ping timeout: 240 seconds) |
23:43:37 | * | girvo joined #nim |
23:43:47 | * | PMunch quit (Quit: leaving) |
23:47:18 | * | yglukhov joined #nim |
23:51:33 | * | yglukhov quit (Ping timeout: 240 seconds) |
23:53:27 | * | elrood quit (Remote host closed the connection) |