00:03:07 | * | bamorim quit (Ping timeout: 252 seconds) |
00:13:21 | * | Sahnvour quit (Read error: Connection reset by peer) |
00:21:27 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:22:04 | * | pregressive joined #nim |
00:27:04 | * | pregressive quit (Ping timeout: 272 seconds) |
00:34:07 | Xe | is there a way to have nim only execute code if it is inside `when isMainModule:`? |
00:35:58 | * | jaco60 quit (Ping timeout: 240 seconds) |
00:47:07 | * | pigmej quit (Ping timeout: 252 seconds) |
00:47:25 | * | nim-buildbot quit (Ping timeout: 240 seconds) |
00:47:26 | * | eldamar quit (Ping timeout: 240 seconds) |
00:48:57 | * | untitaker joined #nim |
00:51:16 | * | untitaker quit (Client Quit) |
00:51:51 | * | pigmej joined #nim |
00:52:13 | * | eldamar joined #nim |
00:54:34 | * | untitaker joined #nim |
00:55:09 | * | untitaker quit (Client Quit) |
00:59:45 | * | jaco60 joined #nim |
01:17:18 | * | tmm1 joined #nim |
01:18:30 | * | jaco60 quit (Ping timeout: 260 seconds) |
01:20:43 | * | jakesyl quit (Ping timeout: 246 seconds) |
01:23:58 | * | chemist69_ joined #nim |
01:26:39 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:34:02 | * | jakesyl joined #nim |
01:42:18 | * | jakesyl quit (Ping timeout: 240 seconds) |
01:42:19 | * | X67r quit (Quit: leaving) |
01:47:28 | * | infinity0 joined #nim |
01:55:39 | * | jakesyl joined #nim |
01:59:30 | * | infinity0 quit (Ping timeout: 240 seconds) |
02:02:25 | * | huonw quit (Quit: bye) |
02:03:25 | * | huonw joined #nim |
02:04:40 | * | vegansk quit (Ping timeout: 246 seconds) |
02:08:34 | * | infinity0 joined #nim |
02:13:38 | * | jakesyl quit (Ping timeout: 240 seconds) |
02:27:15 | * | jakesyl joined #nim |
02:45:03 | * | vendethiel joined #nim |
02:55:54 | * | AMorpork quit (Ping timeout: 272 seconds) |
03:09:23 | * | vendethiel quit (Ping timeout: 252 seconds) |
03:11:44 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
03:28:52 | * | infinity0 quit (Ping timeout: 265 seconds) |
03:32:44 | * | vegansk joined #nim |
03:32:50 | * | infinity0 joined #nim |
03:35:19 | * | darkf joined #nim |
03:37:23 | * | infinity0 quit (Ping timeout: 264 seconds) |
03:47:47 | * | AMorpork joined #nim |
03:49:09 | * | infinity0 joined #nim |
03:57:10 | * | infinity0 quit (Ping timeout: 250 seconds) |
04:07:31 | * | infinity0 joined #nim |
04:12:32 | * | infinity0 quit (Ping timeout: 272 seconds) |
04:20:46 | Varriount | Xe: Isn't that the point of 'when IsMainModule'? |
04:21:09 | Xe | can't you have code run without it being in there? |
04:21:35 | Varriount | Xe: Uh. I'm not sure I follow. |
04:21:44 | * | infinity0 joined #nim |
04:21:55 | Varriount | Your original question was "is there a way to have nim only execute code if it is inside `when isMainModule:`" |
04:22:07 | Xe | no i mean |
04:22:10 | Xe | and never the implicit code |
04:22:14 | * | tmm1 joined #nim |
04:22:25 | Xe | so that function definitions, etc work |
04:22:38 | Xe | but anything introducing side effects does not |
04:22:47 | Varriount | I still don't follow. Is there an example you could post up on gist or pastebin? |
04:23:52 | * | AforAvi joined #nim |
04:24:00 | Xe | https://gist.github.com/Xe/8517c56901ddd744b554 |
04:24:06 | Xe | see that middle echo? |
04:24:25 | Varriount | Yes? |
04:24:53 | Varriount | Xe: There's this - https://gist.github.com/Varriount/0a530266b8ea192529d5 |
04:25:13 | Xe | i mean to disallow things like that from running |
04:26:20 | Varriount | Xe: Well, within your own code, you can just use when `isMainModule: ... else: ...`, but for external code, no. (You probably wouldn't want to, anyway) |
04:26:39 | Varriount | er, `when isMainModule: ... else: ...` |
04:26:47 | Xe | yeah I guess |
04:30:33 | Varriount | Xe: The only other solution would be to use some sort of template filter + macro. |
05:29:57 | * | infinity0 quit (Ping timeout: 255 seconds) |
05:39:50 | * | infinity0 joined #nim |
06:10:47 | * | iamd3vil joined #nim |
06:14:58 | * | xet7_ quit (Ping timeout: 250 seconds) |
06:26:48 | * | Ven joined #nim |
06:35:48 | * | iamd3vil quit (Ping timeout: 264 seconds) |
06:44:30 | * | Enamex joined #nim |
06:53:48 | * | BitPuffin|osx quit (Ping timeout: 265 seconds) |
06:56:45 | * | sarlalian quit (Quit: WeeChat 0.4.2) |
06:58:43 | * | sarlalian joined #nim |
07:14:39 | Varriount | Araq: So, regarding the faulty 'git clean' step, it seems that it's an... artifact of the RAM disk I'm using, and probably unavoidable. |
07:19:28 | * | yglukhov joined #nim |
07:25:03 | ryu0 | Varriount: ? bitrot in RAM? |
07:26:33 | * | Enamex quit (Ping timeout: 244 seconds) |
07:31:50 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:31:55 | * | enamex_c joined #nim |
07:35:51 | * | Ven joined #nim |
07:42:53 | * | irrequietus joined #nim |
07:45:45 | * | Trustable joined #nim |
07:47:31 | * | strcmp1 quit (Remote host closed the connection) |
07:52:18 | * | strcmp2 joined #nim |
07:55:29 | * | strcmp2 quit (Client Quit) |
08:04:48 | * | irrequietus quit () |
08:06:05 | * | coffeepot joined #nim |
08:22:54 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:31:21 | * | bjz joined #nim |
08:31:24 | * | keyle joined #nim |
08:32:22 | * | victor-rene joined #nim |
08:33:21 | * | Ven joined #nim |
08:36:06 | * | iamd3vil joined #nim |
08:39:08 | * | keyle quit (Quit: http://twitter.com/keyle/) |
08:44:58 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:45:39 | * | yglukhov_ joined #nim |
08:47:48 | * | X67r joined #nim |
08:48:11 | * | yglukhov quit (Ping timeout: 264 seconds) |
08:51:58 | * | jaco60 joined #nim |
09:02:58 | * | bjz joined #nim |
09:03:46 | * | jaco60 quit (Ping timeout: 246 seconds) |
09:11:05 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:47:55 | * | enamex_c quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
09:49:19 | * | elrood joined #nim |
09:55:33 | * | Enamex joined #nim |
09:55:48 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:55:56 | federico3 | dom96: we don't need more kitchens in our forum :D |
09:58:53 | * | enamex_c joined #nim |
10:00:22 | * | Enamex quit (Ping timeout: 265 seconds) |
10:03:49 | * | Demon_Fox quit (Quit: Leaving) |
10:06:25 | dom96 | federico3: yeah, this kitchen spam is ridiculous |
10:08:31 | federico3 | on the other hand, koch might need a running environment |
10:22:31 | * | darkf quit (Ping timeout: 246 seconds) |
10:22:47 | * | Kingsquee quit (Ping timeout: 252 seconds) |
10:24:04 | * | Kingsquee joined #nim |
10:25:01 | * | Kingsquee quit (Client Quit) |
10:28:34 | * | darkf joined #nim |
10:37:12 | dom96 | hah |
10:38:13 | enamex_c | Has there been spam on this chan recently? |
10:43:25 | * | razaaa joined #nim |
10:43:36 | * | X67r quit (Ping timeout: 255 seconds) |
10:50:56 | * | X67r joined #nim |
10:55:18 | * | X67r quit (Ping timeout: 255 seconds) |
11:02:43 | * | AforAvi quit (Ping timeout: 268 seconds) |
11:06:30 | * | Jehan_ joined #nim |
11:06:37 | * | darkf quit (Ping timeout: 246 seconds) |
11:08:06 | dom96 | enamex_c: on this channel, no |
11:08:13 | dom96 | on our forum, yes |
11:21:37 | * | Ven joined #nim |
11:22:25 | * | darkf joined #nim |
11:24:31 | enamex_c | Oh, ok. It happened on some other lang chans on freenode recently so... |
11:27:53 | * | irrequietus joined #nim |
11:33:49 | federico3 | hm, no CVEs has been published for Nim yet? |
11:34:37 | * | darkf quit (Ping timeout: 246 seconds) |
11:53:08 | * | enamex_c quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
12:09:53 | * | darkf joined #nim |
12:31:01 | * | Jehan_ quit (Quit: Leaving) |
12:35:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:53:03 | * | victor-rene quit (Ping timeout: 246 seconds) |
12:55:03 | * | repax joined #nim |
13:11:09 | * | FedeOmoto joined #nim |
13:26:34 | OnO | hi, is it possible to .importc C macro? |
13:36:14 | * | Sahnvour joined #nim |
13:41:38 | * | Ven joined #nim |
13:42:53 | repax | I hope not. They can have all sorts of unhygenic effects |
14:21:54 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:24:20 | * | Ven joined #nim |
14:33:50 | * | smodo joined #nim |
14:39:13 | * | pregressive joined #nim |
14:47:12 | * | emery quit (Disconnected by services) |
14:49:26 | * | ehmry joined #nim |
15:02:09 | * | pregressive quit (Remote host closed the connection) |
15:04:08 | * | pregressive joined #nim |
15:04:10 | * | pregressive quit (Remote host closed the connection) |
15:04:25 | * | pregressive joined #nim |
15:08:04 | OnO | dom96: hi, want to ask about "rawsockets" module, don't you think this is confusing name? coz raw socket means something else -> sockets that receive protocol headers |
15:09:15 | reactormonk | OnO, yes, it is. But you can't mark it as a macro, so beware. |
15:09:45 | OnO | I think RawSocket should be called OSSocket or SysSocket |
15:10:06 | OnO | or just Socket and current high level socket should be renamed to Connection or Stream |
15:10:15 | OnO | otherwise it is just damn confusing |
15:10:24 | repax | Yep |
15:16:18 | * | X67r joined #nim |
15:33:09 | * | X67r quit (Remote host closed the connection) |
15:36:43 | * | davidhq joined #nim |
15:49:51 | * | X67r joined #nim |
15:52:12 | * | jaco60 joined #nim |
15:53:53 | * | yglukhov joined #nim |
15:55:19 | * | joelmo joined #nim |
15:57:27 | * | yglukhov_ quit (Ping timeout: 256 seconds) |
15:58:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:00:24 | * | X67r quit (Ping timeout: 264 seconds) |
16:13:27 | * | X67r joined #nim |
16:18:43 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
16:23:33 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:26:53 | * | X67r quit (Ping timeout: 252 seconds) |
16:33:37 | * | smodo quit (Remote host closed the connection) |
16:34:18 | * | X67r joined #nim |
16:36:31 | * | BitPuffin joined #nim |
16:44:22 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:52:03 | * | Guest14221isaway is now known as Guest14221 |
16:52:47 | * | Ven joined #nim |
17:04:26 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:13:10 | dom96 | OnO: sure, create an issue please. |
17:22:56 | * | yglukhov joined #nim |
17:26:13 | * | davidhq joined #nim |
17:27:32 | * | yglukhov quit (Ping timeout: 268 seconds) |
17:28:10 | softinio | I just posted on this recommending nim https://www.reddit.com/r/Python/comments/3ms51z/python_alternatives/ thought I mention in case anyone else want to do same :-) |
17:28:33 | reactormonk | softinio, \o/ The upvotes must flow. |
17:28:36 | softinio | of course giving your honest unbiased opinion :-) |
17:29:19 | reactormonk | softinio, looks like someone else was 3h faster |
17:29:38 | softinio | oh I must of missed that |
17:30:21 | reactormonk | s/of/have/ |
17:30:46 | OnO | dom96: yeah I'd love to do PR for that |
17:30:46 | softinio | yes :-) |
17:30:54 | OnO | but want to know your opinion on naming |
17:31:04 | softinio | Just saw it oh well I must of missed it excited to post something about nim |
17:31:23 | OnO | (1) RawSocket->SysSocket or (2) Socket->Stream, RawSocket->Socket |
17:31:37 | * | elrood quit (Remote host closed the connection) |
17:32:21 | NimBot | nim-lang/Nim devel 985594c Araq [+0 ±1 -0]: added streams.readAll proc |
17:32:21 | NimBot | nim-lang/Nim devel ab6f8f6 Araq [+0 ±1 -0]: fixesunicode.lastRune |
17:32:21 | NimBot | nim-lang/Nim devel c852143 Araq [+0 ±1 -0]: os.walkDir supports yielding relative paths |
17:32:21 | NimBot | nim-lang/Nim devel 4e44ded Araq [+0 ±1 -0]: winlean additions; preparing for osproc patch to use named pipes |
17:32:21 | NimBot | 2 more commits. |
17:32:24 | dom96 | OnO: I'm confused by what you mean in (2), do you want to rename `Socket` to `Stream`? |
17:34:30 | OnO | yes, this is one option, coz in fact this high level socket isn't really a socket, but something more... async handling, ssl etc. |
17:35:17 | Araq | well syssocket and ossocket are ugly with the two ss |
17:35:43 | OnO | sure, but current rawsocket is really BAD name :) |
17:36:02 | Araq | and we cannot use SysSocket because of Unix we require stdlib module to be all lowercase |
17:36:11 | OnO | maybe nativesocket? |
17:37:34 | dom96 | Stream is already a thing |
17:37:41 | dom96 | Socket does not support async |
17:39:07 | OnO | maybe then Socket->Connection, RawSocket->Socket |
17:40:44 | OnO | btw. I just made PR for kqueue support for OS X and Free/Open/NetBSD https://github.com/nim-lang/Nim/pull/3388 |
17:41:14 | dom96 | awesome |
17:42:22 | Araq | sockets should remain the same, rawsockets could be nativesockets |
17:42:27 | Araq | IMO |
17:43:52 | dom96 | name it lowsockets |
17:43:54 | reactormonk | ^ good idea, discourages people from using nativesockets |
17:44:11 | dom96 | nativesockets could still be confusing |
17:44:19 | reactormonk | lowlevelsockets? |
17:44:25 | dom96 | just lowsockets |
17:44:28 | Araq | we can also call it "socks" instead. Cause they stink. |
17:45:08 | dom96 | OnO: have you tested your patch with all the async tests and jester? |
17:45:19 | OnO | yeah wornsockets, tornsockets, sweatsockets |
17:46:59 | * | yglukhov joined #nim |
17:50:17 | Araq | OnO: does booting work for you on linux? |
17:50:41 | OnO | dunno, I work on OS X normally |
17:51:07 | * | dewdrop joined #nim |
17:53:04 | * | vendethiel joined #nim |
17:54:24 | * | shodan45 joined #nim |
17:59:30 | * | darkf quit (Quit: Leaving) |
18:00:33 | * | bamorim joined #nim |
18:02:31 | dom96 | dom96: was that a 'yeah' to my question? |
18:02:35 | dom96 | er OnO |
18:03:35 | OnO | dom96: no... well I just checked, it fails on one specific test tasynceverror |
18:03:42 | OnO | but I think this test is somehow wrong |
18:04:03 | OnO | coz it coz closes socked fd then tries to remove it from kqueue |
18:04:18 | OnO | thus Error: unhandled exception: Bad file descriptor [OSError] |
18:05:46 | dom96 | why do you think the test is wrong? |
18:07:08 | * | pregressive quit () |
18:08:30 | OnO | like I said the tests closes the listen socket fd, effectively making fd invalid |
18:08:45 | OnO | it should shutdown(fd) not close(fd) to drop connection |
18:08:51 | OnO | but keep fd valid |
18:11:52 | * | elrood joined #nim |
18:13:10 | dom96 | where does it try to remove the fd from kqueue? |
18:15:05 | dom96 | well I'm not sure about that test |
18:15:14 | dom96 | but we must be careful about subtle differences between epoll and kqueue |
18:16:27 | OnO | I mean this tests is invalid because you can close(fd) and keep it processing by selector's module poll proc |
18:16:42 | OnO | because you are playing with invalid handle |
18:17:30 | OnO | my suggestion is to use shutdown not close |
18:18:07 | * | Ven joined #nim |
18:18:17 | dom96 | oh, it converts the type to a SocketHandle |
18:18:23 | dom96 | and so the fd does not get unregistered |
18:18:53 | dom96 | yeah, shutdown should work |
18:18:55 | OnO | as for subtle differences, there's one noticeable, kqueue requires two entries separately for observing read and write, where epoll handles that with one entry |
18:19:31 | dom96 | yeah, but that's an implementation detail |
18:20:17 | OnO | another one is there's in fact no simple way to tell whether the fd is in the queue, maybe it could be done trying to disable or enable the entry, but effectively there's no way to do it without altering the state |
18:21:10 | * | tmm1 joined #nim |
18:23:51 | OnO | as for tasynceverror.nim I think we should do ls.closeSocket() rather than SocketHandle(ls).close() |
18:24:19 | OnO | btw. God knows why it is called closeSocket() not just close() for AsyncFD... this is really crazy |
18:25:38 | OnO | oh... some idea for naming, maybe call it SocketFD ? |
18:25:47 | dom96 | Because it's specific to Sockets |
18:26:04 | dom96 | AsyncFD is also used in asyncfile |
18:26:06 | OnO | dom96: c'mon but it works on specific type :) |
18:26:14 | OnO | aa.... I see |
18:26:17 | * | kniteli joined #nim |
18:26:21 | OnO | windows shi...t |
18:26:28 | OnO | duh |
18:26:39 | dom96 | I don't get why that test uses raw sockets |
18:27:07 | OnO | anyway chaning to use closeSocket() raises EPIPE, as expected (see comment in that file) |
18:27:14 | Araq | OnO: how much work is it to emulate a tty on unix? |
18:27:29 | dom96 | OnO: Better to rewrite it so that it uses AsyncSocket |
18:27:31 | dom96 | and uses close |
18:28:10 | OnO | Araq: you mean to write a terminal GUI widget? |
18:28:33 | Araq | yes |
18:29:20 | Araq | on windows it turned out to be impossible unless you write your own device driver ... |
18:29:59 | Araq | it's mind-boggling |
18:30:51 | reactormonk | Araq, ncurses is pretty ugly too from what I've heard. |
18:31:42 | OnO | Araq: I am not sure if I understand correctly, but on UNIX control sequences are just part of the stream you're senting to stdout/err |
18:31:47 | Araq | OnO: not necessarily a GUI widget, also a "expect" like module |
18:32:06 | OnO | on Windows there's completely separate API to drive terminal look |
18:32:09 | * | repax quit (Read error: Connection reset by peer) |
18:32:14 | Araq | it's not about the escape sequences |
18:32:20 | Araq | it's about the buffering |
18:32:49 | OnO | https://github.com/theZiz/aha |
18:32:51 | Araq | you need to tell the client process stdin/stdout isatty |
18:33:23 | OnO | and if it's now? |
18:33:50 | OnO | you want to emulate terminal behavior in the buffer and then output the screen as it was when app was finished... sthing like that? |
18:34:58 | * | gokr quit (Ping timeout: 246 seconds) |
18:35:15 | Araq | something like: send password to foobar, wait for output, process the output, send more input |
18:35:48 | * | Guest14221 is now known as boopster |
18:37:05 | * | gokr joined #nim |
18:38:10 | * | boopster is now known as boopsies |
18:40:21 | * | bamorim quit (Ping timeout: 252 seconds) |
18:49:59 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:58:05 | OnO | Araq: take a look at openpty and/or forkpty, these create pseudoterminals on Linux |
18:58:45 | Araq | OnO: I know the keywords for google, I liked to get your opinion of how much work it would be |
19:02:04 | NimBot | nim-lang/Nim devel 27bdf5c Araq [+0 ±1 -0]: osproc: free resources properly for the new poInteractive flag |
19:02:04 | NimBot | nim-lang/Nim devel 1b7d824 Araq [+0 ±3 -0]: NimScript: setCommand takes an optional project filename |
19:02:04 | NimBot | nim-lang/Nim devel 29dac5e Araq [+0 ±2 -0]: Nimscript: the compiler supports a directory wide config.nims file |
19:02:45 | OnO | not much, you just get regular handles to communicate with a process or login session |
19:02:45 | OnO | pid = forkpty(&fd, NULL, NULL, NULL); |
19:03:02 | OnO | and your fd acts like a pipe file descriptor |
19:03:16 | OnO | you write commands to your app |
19:03:21 | OnO | and read ANSI stream |
19:03:59 | OnO | the command (or the fork process) thinks that stdout, stderr isatty |
19:04:17 | OnO | rest is just parsing ANSI escape codes |
19:08:57 | * | BitPuffin quit (Ping timeout: 265 seconds) |
19:09:54 | Araq | r-ku: Nimscript supports paramStr and paramCount, but it's in system.nim |
19:29:35 | * | Jesin quit (Quit: Leaving) |
19:46:47 | OnO | dom96: another confusing thing is asyncio asyncnet and asyncdispatch |
19:46:50 | * | Ven quit (Quit: Textual IRC Client: www.textualapp.com) |
19:47:05 | OnO | why asyncdispatch contains some socket methods? they should be in asyncnet |
19:47:22 | OnO | why asyncio and asyncnet both contain acceptAddr? |
19:47:32 | dom96 | Why not read some docs? |
19:47:45 | dom96 | Asyncio is deprecated |
19:47:59 | dom96 | asyncnet is the high-level module that builds upon asyncdispatch |
19:48:50 | * | Ven joined #nim |
19:50:12 | OnO | okay, then why asyncdispatch is dealing with sockets at all? |
19:52:38 | OnO | also one suggestion, maybe we move depreciated modules into some lib/depreciated and add them to search path? |
19:52:46 | OnO | this will reduce clutter |
19:52:50 | dom96 | because windows |
19:53:14 | dom96 | because it implements a reactor pattern which means that we need to implement all procedures |
19:53:24 | dom96 | for example accept which is socket specific |
19:53:30 | * | iamd3vil quit (Ping timeout: 240 seconds) |
19:58:24 | * | Matthias247 joined #nim |
19:58:54 | OnO | agreed, but all I am saying these procs should be inside asyncnet module |
19:59:23 | OnO | they have nothing to do with dispatch in general, they're socket (network) specific |
20:00:01 | * | kulelu88 joined #nim |
20:01:05 | dom96 | I prefer the current separation. Where everything that works on AsyncFD is in the asyncdispatch module |
20:01:14 | dom96 | I don't want two accept procedures in the asyncnet module |
20:01:20 | dom96 | That *will* be confusing |
20:07:47 | OnO | I am sorry but it is confusing already |
20:07:58 | OnO | eg acceptAddr which shall I use |
20:08:47 | OnO | eg proc acceptAddr*(socket: AsyncFD, flags = {SocketFlag.SafeDisconn}), why it is public? |
20:08:55 | dom96 | because asyncnet uses it |
20:09:09 | OnO | then it should be private in asyncnet |
20:09:37 | dom96 | It's the same as asking "posix.read or system.read", which should I use? |
20:10:04 | OnO | yes... might be, but these both are intended to be used in fact |
20:10:16 | dom96 | they are not |
20:10:48 | dom96 | Well, maybe in some rare cases the asyncdispatch one could also be used |
20:11:05 | dom96 | but in most cases you want the more user friendly version, which is the asyncnet version |
20:11:33 | OnO | yes.. but the proc does not belong there, asyncdispatch poll etc. does not need acceptAddr to work |
20:11:37 | OnO | it is only needed by asyncnet |
20:12:41 | OnO | I don't know maybe call it asyncnetlowlevel private/asyncnet anything |
20:12:59 | dom96 | This is how the sockets module looks like |
20:13:04 | dom96 | and it's a mess |
20:14:46 | dom96 | but maybe you're right, some things could perhaps be moved to asyncnet, but would that really benefit us that much? |
20:19:50 | * | Ven quit (Ping timeout: 240 seconds) |
20:20:40 | * | Ven joined #nim |
20:21:09 | OnO | clarity, especially looking at docs http://nim-lang.org/0.11.0/lib.html |
20:21:15 | OnO | reading from top to bottom |
20:21:30 | OnO | there's no clear indication what should be used |
20:23:09 | OnO | what's more often less recommended types come first |
20:29:00 | * | jakesyl quit (Remote host closed the connection) |
20:30:49 | * | Trustable quit (Ping timeout: 246 seconds) |
20:30:57 | * | Ven quit (Disconnected by services) |
20:31:19 | * | Ven joined #nim |
20:32:45 | OnO | are nim.cfg path= added in reversed order? |
20:32:53 | Araq | yes |
20:33:10 | OnO | so which order is right nim dump or .cfg one? |
20:33:14 | Araq | so that later paths can override earlier |
20:33:19 | OnO | aha.. ok |
20:33:24 | * | Trustable joined #nim |
20:33:40 | Araq | nim dump should be the truth |
20:34:31 | dom96 | OnO: I would say that we should improve the docs then |
20:49:05 | * | jakesyl joined #nim |
20:50:07 | * | Ven quit (Read error: Connection reset by peer) |
20:51:49 | * | Trustable quit (Remote host closed the connection) |
20:52:19 | OnO | some PR to help struggle with deprecated modules https://github.com/nim-lang/Nim/pull/3389 |
20:56:26 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:59:52 | * | jakesyl quit (Ping timeout: 246 seconds) |
21:13:06 | * | jakesyl joined #nim |
21:22:43 | * | key_ quit (Read error: Connection reset by peer) |
21:23:48 | * | Demon_Fox joined #nim |
21:30:21 | * | AforAvi joined #nim |
21:34:52 | * | jakesyl quit (Ping timeout: 246 seconds) |
21:37:46 | * | razaaa quit (Quit: Leaving) |
21:44:03 | tmm1 | what do you guys think about enabling travisci on the github repo? |
21:44:36 | tmm1 | would be an extra free linux/mac build slave, and it would get run on people's forks automatically when they created pull requests |
21:45:03 | Araq | tmm1: hell yes, please make it happen. |
21:45:46 | * | joelmo quit (Quit: Connection closed for inactivity) |
21:45:55 | tmm1 | Araq: sign in to https://travis-ci.org and enable it for the repo, ill open a PR to add the .travis.yml |
21:45:56 | ryu0 | Araq: does nim have a module for controlling terminal screens? |
21:46:50 | Araq | ryu0: yes. terminal.nim |
21:47:08 | ryu0 | Araq: oh. heh. i was thinking to contribute one if it didn't. |
21:47:48 | * | vendethiel quit (Ping timeout: 255 seconds) |
21:47:52 | Araq | ryu0: you can contribute an implementation for poInteractive for osproc.nim. that should wrap the stream handles in a tty |
21:48:17 | ryu0 | into a single TTY file descriptor? |
21:48:25 | Araq | yes |
21:48:46 | Araq | or start from scratch. I really want an "expect"-like module in the stdlib |
21:49:10 | Araq | or as a nimble package. I don't care. I want it. I need it. :-) |
21:49:30 | ryu0 | question... does it also have to work for windows? |
21:49:44 | * | gokr quit (Quit: Leaving.) |
21:49:59 | Araq | no. |
21:50:00 | ryu0 | if so i'd have to see how windows can even do that. win32 is totally different. |
21:50:19 | Araq | I wrote the windows implementation. |
21:50:21 | ryu0 | does windows even have something like unix sockets? |
21:50:32 | Araq | it's as good as it will ever get. don't ask. |
21:50:38 | ryu0 | k. |
21:50:47 | ryu0 | i'll see what i can do. |
21:50:54 | ryu0 | i'll try doing it in C first. |
21:51:02 | ryu0 | so i can figure out what system calls are required. |
21:51:28 | Araq | if you think that's wise |
21:51:44 | Araq | we have wrapped lots of things in posix.nim already |
21:52:00 | ryu0 | well, C is what i am most familiar with still. |
21:52:33 | ryu0 | though i admit i hate how much hassle it is to throw together even basic things. |
21:52:56 | ryu0 | let's see how you open a tty in posix... |
22:01:05 | tmm1 | Araq: if you flip the switch on travisci for nim-lang/nim i can test and flesh it out with https://github.com/nim-lang/Nim/pull/3390 |
22:01:12 | ryu0 | Araq: how does the posix module cope with the issue that different implementatons may use different integer constants for the same macros? |
22:02:19 | Araq | ryu0: it cheats. it imports the constants as "variables" |
22:02:32 | Araq | so that the Nim compiler doesn't touch them |
22:02:45 | Araq | but it also doesn't know the values, so you cannot use them for arrays etc |
22:02:55 | Araq | tmm1: why "language: c"? |
22:03:00 | tmm1 | https://travis-ci.org/profile/nim-lang |
22:03:11 | tmm1 | Araq: that just tells it what kind of deps to setup, so it will make sure there's a c compiler available |
22:04:06 | reactormonk | sweet, didn't know someone added nim-mode to travis |
22:04:53 | ryu0 | Araq: ? so how do you update them if they differ for your unix-like OS? |
22:04:56 | * | boopsies is now known as boopsiesisaway |
22:04:56 | ryu0 | say FreeBSD. |
22:07:03 | * | elrood quit (Quit: Leaving) |
22:07:41 | Araq | tmm1: after sh build.sh you need to ensure bootstrapping works |
22:07:57 | Araq | with without -d:release, then with -d:release |
22:08:14 | * | FedeOmoto quit (Ping timeout: 260 seconds) |
22:08:42 | tmm1 | right, i saw that in the buildbot config. will add |
22:08:57 | Araq | and then koch tests ... well we need to make our tests green for this to work |
22:10:33 | Araq | but we also had a suite of acceptance tests |
22:11:11 | reactormonk | Araq, how would you deal with failing tests? Mark them somehow? |
22:11:38 | * | Enamex joined #nim |
22:12:10 | Araq | I cannot remember. "Koch tests lib" is used by the debian package iirc |
22:12:44 | Araq | reactormonk: we should get rid of fragile tests and have 100% green tests |
22:15:25 | tmm1 | how many failure are there |
22:15:57 | tmm1 | i updated the travis.yml, i'd like to try it |
22:17:09 | Araq | tmm1: in general very few |
22:17:47 | Araq | 1% perhaps |
22:19:11 | tmm1 | cool |
22:19:26 | tmm1 | i'm going to add travis config to c2nim too |
22:21:04 | Araq | ryu0: var SIGABRT {.importc, header: "<signal.h>".}: cint means the Nim compiler produces SIGABRT in the generated C code |
22:21:41 | Araq | so there is nothing to adapt for FreeBSD |
22:22:07 | Araq | however, we also have a tool that generates a C program to output all these values for us |
22:22:23 | Araq | but it's not used yet |
22:23:09 | ryu0 | Araq: VINTR from termios.nim is using a constant value it appears. not something generated from a header. |
22:24:07 | ryu0 | at least in the latest official release, not git. |
22:24:19 | ryu0 | unless that was changed when i compiled nim... |
22:25:44 | ryu0 | ugh. finally. my hack of shell script and awk to work around an issue with cdda2wav is done. |
22:26:43 | Araq | ryu0: I'm not familiar with termios.nim. I was talking about posix.nim. |
22:27:03 | dom96 | tmm1: Why the addition of build.sh? |
22:27:43 | ryu0 | https://github.com/nim-lang/Nim/blob/devel/lib/posix/termios.nim |
22:27:46 | Araq | tmm1: dom96 is taking over ;-) it's his job anyway. |
22:27:56 | ryu0 | VINTR* = 0 |
22:28:04 | tmm1 | dom96: didn't mean to do that, should be fixed now |
22:28:31 | ryu0 | unless there is some nim feature i don't know about... this looks like it uses a hardcoded constant. |
22:29:01 | Araq | ryu0: yes |
22:29:50 | dom96 | tmm1: looks good |
22:30:06 | ryu0 | Araq: do you accept patches to correct issues like this? i have my doubts the BSD and Linux libs use the same magic numbers. |
22:30:26 | ryu0 | libcs* |
22:30:29 | tmm1 | dom96: can you enable it for the repo, and change settings to only build when .travis.yml is present |
22:31:00 | ryu0 | for Win32, i wouldn't really care but this is POSIX... lol |
22:31:03 | Araq | ryu0: strictly speaking it's a breaking change. dunno. |
22:31:13 | ryu0 | oh. bleh. |
22:31:36 | Araq | I'm sure the BSDs use the same values anyway |
22:31:44 | ryu0 | i'll find out then. |
22:32:06 | ryu0 | assuming is... bad news. :P |
22:32:09 | ryu0 | in my experience. |
22:32:37 | dom96 | hrm, is it just me or is travis-ci's website incredibly slow |
22:34:50 | * | vikaton joined #nim |
22:36:11 | ryu0 | Araq: i'll look into that. |
22:36:16 | ryu0 | for FreeBSD at least. |
22:37:04 | Araq | but but but ... what about HP Unix? |
22:37:23 | ryu0 | uh... no way to test that. it's not open source. |
22:37:37 | ryu0 | i'm just looking for open source unices. |
22:37:45 | dom96 | tmm1: should be ready to go |
22:38:08 | * | irrequietus quit () |
22:38:16 | Araq | open solaris? |
22:38:26 | Araq | (does that still exist?) |
22:38:39 | * | enamex_ joined #nim |
22:38:39 | ryu0 | Araq: kinda. but it's not very easy to setup that i can see. |
22:39:24 | tmm1 | dom96: hmm says not found https://travis-ci.org/nim-lang/nim https://travis-ci.org/nim-lang |
22:39:49 | tmm1 | dom96: ah looks like its working though https://github.com/nim-lang/Nim/pull/3384 |
22:39:58 | * | Enamex quit (Ping timeout: 246 seconds) |
22:40:09 | tmm1 | https://travis-ci.org/nim-lang/Nim/builds/82834764 yay |
22:40:23 | dom96 | cool |
22:41:04 | ryu0 | As I suspected! |
22:41:08 | ryu0 | https://github.com/freebsd/freebsd/blob/master/sys/sys/_termios.h |
22:41:12 | ryu0 | https://github.com/nim-lang/Nim/blob/devel/lib/posix/termios.nim |
22:41:17 | ryu0 | VINTR = 8 on FreeBSD. |
22:41:22 | ryu0 | Not compatible. |
22:42:38 | ryu0 | this was written for Linux, not POSIX. |
22:43:42 | Araq | ok, you're allowed to use .importc then |
22:45:09 | ryu0 | Araq: thank you. i can understand hard-coded for libraries that have a static API, but POSIX has implementation defined constants so... it needs to adapt to the implementation it is running on. |
22:45:42 | Araq | that depends on what we claim. |
22:46:09 | Araq | if we document that termios is linux specific, things are fine again |
22:46:51 | ryu0 | ah. |
22:47:02 | * | keyle joined #nim |
22:47:44 | Araq | supporting all these niche OSes is not cost effective at all. it only sort of works in open source land. |
22:48:22 | * | BitPuffin|osx joined #nim |
22:48:24 | * | ryu0 blinks. |
22:48:38 | ryu0 | C and C++ seem to manage just fine with GCC / Clang... |
22:51:15 | Araq | ryu0: I don't see your point |
22:52:45 | ryu0 | Araq: i suppose i don't get why we have a section labeled posix that's really more geared towards Linux than posix. |
22:53:04 | dom96 | tmm1: seems it failed |
22:53:13 | ryu0 | some parts pull from external headers but not all. |
22:53:19 | tmm1 | dom96: yea i'm working on a follow up PR |
22:53:27 | dom96 | tmm1: thanks |
22:55:32 | ryu0 | I suppose i'm used to the idea of portability from C land. |
22:55:42 | tmm1 | Araq: if i want to pull this const out of the type in c2nim's postprocessor, what's the best way to find the embedded const sections |
22:56:45 | Araq | ryu0: no, you simply have different experiences with open source software. ;-) |
22:57:00 | ryu0 | Araq: how so? |
22:57:28 | ryu0 | i was feeling like posix module should work on as many posix platforms as possible. |
22:57:29 | Araq | for me "it claims posix but only was tested on linux anyway" is my default expectation. |
22:57:55 | ryu0 | ah. |
22:58:14 | ryu0 | i get some parts will always be OS specific... |
22:58:20 | ryu0 | like how devices are named. |
22:58:56 | ryu0 | even so, i was expecting the posix module to be flexible and adapt to the underlying constants of the platform. |
22:59:13 | ryu0 | just like C is able to do. |
22:59:21 | Araq | termios.nim is not posix.nim |
22:59:33 | ryu0 | it's under the POSIX folder. =p |
22:59:43 | ryu0 | but anyway. |
23:00:11 | ryu0 | i suppose it doesn't matter too much. |
23:02:14 | Araq | well go ahead and fix it, but I just cannot be bothered with the BSDs. I don't care about them just as I don't care about DOS support. |
23:02:44 | ryu0 | okay, i get it. it's not a priority. |
23:08:18 | tmm1 | wow test suite is quite slow |
23:08:25 | tmm1 | fair number of failures |
23:09:52 | Araq | tmm1: depends on the setup of the machine. if nodejs is not installed, every JS test will fail |
23:10:07 | Araq | we could check for this properly of course :-) |
23:13:46 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:14:43 | * | X67r quit (Quit: leaving) |
23:17:09 | * | yglukhov quit (Remote host closed the connection) |
23:17:27 | tmm1 | i wonder if you could run tests in parallel |
23:17:31 | tmm1 | one per core |
23:17:57 | Araq | no you cannot. else we would do it. |
23:18:26 | Araq | you can patch the tester though to support it |
23:18:46 | Araq | the tester needs to give each test its own --nimcache directory |
23:18:58 | Araq | then it should work |
23:20:12 | tmm1 | 44 failures in https://travis-ci.org/nim-lang/Nim/jobs/82836500#L2796 |
23:20:19 | tmm1 | a lot of them are reNimcCrash |
23:20:20 | * | rollo joined #nim |
23:21:41 | Araq | that doesn't mean what you think it means |
23:24:31 | * | kulelu88 quit (Quit: Leaving) |
23:26:56 | tmm1 | can i pass --parallelBuild:1 to koch test? |
23:27:44 | Araq | that has no effect |
23:28:19 | Araq | I think |
23:29:15 | tmm1 | some of the failures seemed like gcc errors but it didn't show the output |
23:29:39 | tmm1 | what does nimc crash mean? there aren't a lot of details in the test failures |
23:29:58 | Araq | it means its exitcode was not 0. |
23:30:18 | * | ryuo joined #nim |
23:30:25 | * | ryu0 quit (Disconnected by services) |
23:30:29 | ryuo | ugh. |
23:30:31 | Araq | so if GCC complains about the generated C code, that's a "nim crash" |
23:30:31 | ryuo | dc. |
23:30:50 | * | ryuo is now known as ryu0 |
23:32:58 | * | jaco60 quit (Ping timeout: 240 seconds) |
23:33:02 | * | benaiah quit (Ping timeout: 246 seconds) |
23:33:02 | * | phira quit (Ping timeout: 246 seconds) |
23:33:23 | * | def- quit (Ping timeout: 246 seconds) |
23:33:36 | * | def-- joined #nim |
23:33:43 | * | phira joined #nim |
23:33:54 | * | def-- is now known as def- |
23:34:01 | * | jefus is now known as jefus_ |
23:34:06 | * | jefus_ is now known as jefus |
23:34:35 | * | benaiah joined #nim |
23:35:06 | * | bjz joined #nim |
23:37:30 | * | keyle quit (Quit: http://twitter.com/keyle/) |
23:39:07 | * | tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:40:17 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:42:37 | * | enamex_ quit (Ping timeout: 246 seconds) |
23:42:47 | * | PyHedgehog joined #nim |
23:55:54 | AforAvi | ok people, bye for today .. it's 5:25 am, gotta sleep |
23:56:06 | * | AforAvi quit (Quit: Leaving.) |
23:58:39 | * | dhertz joined #nim |
23:59:17 | * | MonkeyJam joined #nim |
23:59:38 | * | dhertz quit (Client Quit) |