<< 29-09-2015 >>

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:07Xeis 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:46VarriountXe: Isn't that the point of 'when IsMainModule'?
04:21:09Xecan't you have code run without it being in there?
04:21:35VarriountXe: Uh. I'm not sure I follow.
04:21:44*infinity0 joined #nim
04:21:55VarriountYour original question was "is there a way to have nim only execute code if it is inside `when isMainModule:`"
04:22:07Xeno i mean
04:22:10Xeand never the implicit code
04:22:14*tmm1 joined #nim
04:22:25Xeso that function definitions, etc work
04:22:38Xebut anything introducing side effects does not
04:22:47VarriountI still don't follow. Is there an example you could post up on gist or pastebin?
04:23:52*AforAvi joined #nim
04:24:00Xehttps://gist.github.com/Xe/8517c56901ddd744b554
04:24:06Xesee that middle echo?
04:24:25VarriountYes?
04:24:53VarriountXe: There's this - https://gist.github.com/Varriount/0a530266b8ea192529d5
04:25:13Xei mean to disallow things like that from running
04:26:20VarriountXe: 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:39Varriounter, `when isMainModule: ... else: ...`
04:26:47Xeyeah I guess
04:30:33VarriountXe: 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:39VarriountAraq: 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:03ryu0Varriount: ? 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:56federico3dom96: 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:25dom96federico3: yeah, this kitchen spam is ridiculous
10:08:31federico3on 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:12dom96hah
10:38:13enamex_cHas 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:06dom96enamex_c: on this channel, no
11:08:13dom96on our forum, yes
11:21:37*Ven joined #nim
11:22:25*darkf joined #nim
11:24:31enamex_cOh, ok. It happened on some other lang chans on freenode recently so...
11:27:53*irrequietus joined #nim
11:33:49federico3hm, 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:34OnOhi, is it possible to .importc C macro?
13:36:14*Sahnvour joined #nim
13:41:38*Ven joined #nim
13:42:53repaxI 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:04OnOdom96: 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:15reactormonkOnO, yes, it is. But you can't mark it as a macro, so beware.
15:09:45OnOI think RawSocket should be called OSSocket or SysSocket
15:10:06OnOor just Socket and current high level socket should be renamed to Connection or Stream
15:10:15OnOotherwise it is just damn confusing
15:10:24repaxYep
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:10dom96OnO: 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:10softinioI 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:33reactormonksoftinio, \o/ The upvotes must flow.
17:28:36softinioof course giving your honest unbiased opinion :-)
17:29:19reactormonksoftinio, looks like someone else was 3h faster
17:29:38softiniooh I must of missed that
17:30:21reactormonks/of/have/
17:30:46OnOdom96: yeah I'd love to do PR for that
17:30:46softinioyes :-)
17:30:54OnObut want to know your opinion on naming
17:31:04softinioJust saw it oh well I must of missed it excited to post something about nim
17:31:23OnO(1) RawSocket->SysSocket or (2) Socket->Stream, RawSocket->Socket
17:31:37*elrood quit (Remote host closed the connection)
17:32:21NimBotnim-lang/Nim devel 985594c Araq [+0 ±1 -0]: added streams.readAll proc
17:32:21NimBotnim-lang/Nim devel ab6f8f6 Araq [+0 ±1 -0]: fixesunicode.lastRune
17:32:21NimBotnim-lang/Nim devel c852143 Araq [+0 ±1 -0]: os.walkDir supports yielding relative paths
17:32:21NimBotnim-lang/Nim devel 4e44ded Araq [+0 ±1 -0]: winlean additions; preparing for osproc patch to use named pipes
17:32:21NimBot2 more commits.
17:32:24dom96OnO: I'm confused by what you mean in (2), do you want to rename `Socket` to `Stream`?
17:34:30OnOyes, 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:17Araqwell syssocket and ossocket are ugly with the two ss
17:35:43OnOsure, but current rawsocket is really BAD name :)
17:36:02Araqand we cannot use SysSocket because of Unix we require stdlib module to be all lowercase
17:36:11OnOmaybe nativesocket?
17:37:34dom96Stream is already a thing
17:37:41dom96Socket does not support async
17:39:07OnOmaybe then Socket->Connection, RawSocket->Socket
17:40:44OnObtw. I just made PR for kqueue support for OS X and Free/Open/NetBSD https://github.com/nim-lang/Nim/pull/3388
17:41:14dom96awesome
17:42:22Araqsockets should remain the same, rawsockets could be nativesockets
17:42:27AraqIMO
17:43:52dom96name it lowsockets
17:43:54reactormonk^ good idea, discourages people from using nativesockets
17:44:11dom96nativesockets could still be confusing
17:44:19reactormonklowlevelsockets?
17:44:25dom96just lowsockets
17:44:28Araqwe can also call it "socks" instead. Cause they stink.
17:45:08dom96OnO: have you tested your patch with all the async tests and jester?
17:45:19OnOyeah wornsockets, tornsockets, sweatsockets
17:46:59*yglukhov joined #nim
17:50:17AraqOnO: does booting work for you on linux?
17:50:41OnOdunno, 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:31dom96dom96: was that a 'yeah' to my question?
18:02:35dom96er OnO
18:03:35OnOdom96: no... well I just checked, it fails on one specific test tasynceverror
18:03:42OnObut I think this test is somehow wrong
18:04:03OnOcoz it coz closes socked fd then tries to remove it from kqueue
18:04:18OnOthus Error: unhandled exception: Bad file descriptor [OSError]
18:05:46dom96why do you think the test is wrong?
18:07:08*pregressive quit ()
18:08:30OnOlike I said the tests closes the listen socket fd, effectively making fd invalid
18:08:45OnOit should shutdown(fd) not close(fd) to drop connection
18:08:51OnObut keep fd valid
18:11:52*elrood joined #nim
18:13:10dom96where does it try to remove the fd from kqueue?
18:15:05dom96well I'm not sure about that test
18:15:14dom96but we must be careful about subtle differences between epoll and kqueue
18:16:27OnOI mean this tests is invalid because you can close(fd) and keep it processing by selector's module poll proc
18:16:42OnObecause you are playing with invalid handle
18:17:30OnOmy suggestion is to use shutdown not close
18:18:07*Ven joined #nim
18:18:17dom96oh, it converts the type to a SocketHandle
18:18:23dom96and so the fd does not get unregistered
18:18:53dom96yeah, shutdown should work
18:18:55OnOas 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:31dom96yeah, but that's an implementation detail
18:20:17OnOanother 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:51OnOas for tasynceverror.nim I think we should do ls.closeSocket() rather than SocketHandle(ls).close()
18:24:19OnObtw. God knows why it is called closeSocket() not just close() for AsyncFD... this is really crazy
18:25:38OnOoh... some idea for naming, maybe call it SocketFD ?
18:25:47dom96Because it's specific to Sockets
18:26:04dom96AsyncFD is also used in asyncfile
18:26:06OnOdom96: c'mon but it works on specific type :)
18:26:14OnOaa.... I see
18:26:17*kniteli joined #nim
18:26:21OnOwindows shi...t
18:26:28OnOduh
18:26:39dom96I don't get why that test uses raw sockets
18:27:07OnOanyway chaning to use closeSocket() raises EPIPE, as expected (see comment in that file)
18:27:14AraqOnO: how much work is it to emulate a tty on unix?
18:27:29dom96OnO: Better to rewrite it so that it uses AsyncSocket
18:27:31dom96and uses close
18:28:10OnOAraq: you mean to write a terminal GUI widget?
18:28:33Araqyes
18:29:20Araqon windows it turned out to be impossible unless you write your own device driver ...
18:29:59Araqit's mind-boggling
18:30:51reactormonkAraq, ncurses is pretty ugly too from what I've heard.
18:31:42OnOAraq: 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:47AraqOnO: not necessarily a GUI widget, also a "expect" like module
18:32:06OnOon Windows there's completely separate API to drive terminal look
18:32:09*repax quit (Read error: Connection reset by peer)
18:32:14Araqit's not about the escape sequences
18:32:20Araqit's about the buffering
18:32:49OnOhttps://github.com/theZiz/aha
18:32:51Araqyou need to tell the client process stdin/stdout isatty
18:33:23OnOand if it's now?
18:33:50OnOyou 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:15Araqsomething 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:05OnOAraq: take a look at openpty and/or forkpty, these create pseudoterminals on Linux
18:58:45AraqOnO: I know the keywords for google, I liked to get your opinion of how much work it would be
19:02:04NimBotnim-lang/Nim devel 27bdf5c Araq [+0 ±1 -0]: osproc: free resources properly for the new poInteractive flag
19:02:04NimBotnim-lang/Nim devel 1b7d824 Araq [+0 ±3 -0]: NimScript: setCommand takes an optional project filename
19:02:04NimBotnim-lang/Nim devel 29dac5e Araq [+0 ±2 -0]: Nimscript: the compiler supports a directory wide config.nims file
19:02:45OnOnot much, you just get regular handles to communicate with a process or login session
19:02:45OnOpid = forkpty(&fd, NULL, NULL, NULL);
19:03:02OnOand your fd acts like a pipe file descriptor
19:03:16OnOyou write commands to your app
19:03:21OnOand read ANSI stream
19:03:59OnOthe command (or the fork process) thinks that stdout, stderr isatty
19:04:17OnOrest is just parsing ANSI escape codes
19:08:57*BitPuffin quit (Ping timeout: 265 seconds)
19:09:54Araqr-ku: Nimscript supports paramStr and paramCount, but it's in system.nim
19:29:35*Jesin quit (Quit: Leaving)
19:46:47OnOdom96: another confusing thing is asyncio asyncnet and asyncdispatch
19:46:50*Ven quit (Quit: Textual IRC Client: www.textualapp.com)
19:47:05OnOwhy asyncdispatch contains some socket methods? they should be in asyncnet
19:47:22OnOwhy asyncio and asyncnet both contain acceptAddr?
19:47:32dom96Why not read some docs?
19:47:45dom96Asyncio is deprecated
19:47:59dom96asyncnet is the high-level module that builds upon asyncdispatch
19:48:50*Ven joined #nim
19:50:12OnOokay, then why asyncdispatch is dealing with sockets at all?
19:52:38OnOalso one suggestion, maybe we move depreciated modules into some lib/depreciated and add them to search path?
19:52:46OnOthis will reduce clutter
19:52:50dom96because windows
19:53:14dom96because it implements a reactor pattern which means that we need to implement all procedures
19:53:24dom96for example accept which is socket specific
19:53:30*iamd3vil quit (Ping timeout: 240 seconds)
19:58:24*Matthias247 joined #nim
19:58:54OnOagreed, but all I am saying these procs should be inside asyncnet module
19:59:23OnOthey have nothing to do with dispatch in general, they're socket (network) specific
20:00:01*kulelu88 joined #nim
20:01:05dom96I prefer the current separation. Where everything that works on AsyncFD is in the asyncdispatch module
20:01:14dom96I don't want two accept procedures in the asyncnet module
20:01:20dom96That *will* be confusing
20:07:47OnOI am sorry but it is confusing already
20:07:58OnOeg acceptAddr which shall I use
20:08:47OnOeg proc acceptAddr*(socket: AsyncFD, flags = {SocketFlag.SafeDisconn}), why it is public?
20:08:55dom96because asyncnet uses it
20:09:09OnOthen it should be private in asyncnet
20:09:37dom96It's the same as asking "posix.read or system.read", which should I use?
20:10:04OnOyes... might be, but these both are intended to be used in fact
20:10:16dom96they are not
20:10:48dom96Well, maybe in some rare cases the asyncdispatch one could also be used
20:11:05dom96but in most cases you want the more user friendly version, which is the asyncnet version
20:11:33OnOyes.. but the proc does not belong there, asyncdispatch poll etc. does not need acceptAddr to work
20:11:37OnOit is only needed by asyncnet
20:12:41OnOI don't know maybe call it asyncnetlowlevel private/asyncnet anything
20:12:59dom96This is how the sockets module looks like
20:13:04dom96and it's a mess
20:14:46dom96but 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:09OnOclarity, especially looking at docs http://nim-lang.org/0.11.0/lib.html
20:21:15OnOreading from top to bottom
20:21:30OnOthere's no clear indication what should be used
20:23:09OnOwhat'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:45OnOare nim.cfg path= added in reversed order?
20:32:53Araqyes
20:33:10OnOso which order is right nim dump or .cfg one?
20:33:14Araqso that later paths can override earlier
20:33:19OnOaha.. ok
20:33:24*Trustable joined #nim
20:33:40Araqnim dump should be the truth
20:34:31dom96OnO: 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:19OnOsome 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:03tmm1what do you guys think about enabling travisci on the github repo?
21:44:36tmm1would 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:03Araqtmm1: hell yes, please make it happen.
21:45:46*joelmo quit (Quit: Connection closed for inactivity)
21:45:55tmm1Araq: sign in to https://travis-ci.org and enable it for the repo, ill open a PR to add the .travis.yml
21:45:56ryu0Araq: does nim have a module for controlling terminal screens?
21:46:50Araqryu0: yes. terminal.nim
21:47:08ryu0Araq: oh. heh. i was thinking to contribute one if it didn't.
21:47:48*vendethiel quit (Ping timeout: 255 seconds)
21:47:52Araqryu0: you can contribute an implementation for poInteractive for osproc.nim. that should wrap the stream handles in a tty
21:48:17ryu0into a single TTY file descriptor?
21:48:25Araqyes
21:48:46Araqor start from scratch. I really want an "expect"-like module in the stdlib
21:49:10Araqor as a nimble package. I don't care. I want it. I need it. :-)
21:49:30ryu0question... does it also have to work for windows?
21:49:44*gokr quit (Quit: Leaving.)
21:49:59Araqno.
21:50:00ryu0if so i'd have to see how windows can even do that. win32 is totally different.
21:50:19AraqI wrote the windows implementation.
21:50:21ryu0does windows even have something like unix sockets?
21:50:32Araqit's as good as it will ever get. don't ask.
21:50:38ryu0k.
21:50:47ryu0i'll see what i can do.
21:50:54ryu0i'll try doing it in C first.
21:51:02ryu0so i can figure out what system calls are required.
21:51:28Araqif you think that's wise
21:51:44Araqwe have wrapped lots of things in posix.nim already
21:52:00ryu0well, C is what i am most familiar with still.
21:52:33ryu0though i admit i hate how much hassle it is to throw together even basic things.
21:52:56ryu0let's see how you open a tty in posix...
22:01:05tmm1Araq: 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:12ryu0Araq: how does the posix module cope with the issue that different implementatons may use different integer constants for the same macros?
22:02:19Araqryu0: it cheats. it imports the constants as "variables"
22:02:32Araqso that the Nim compiler doesn't touch them
22:02:45Araqbut it also doesn't know the values, so you cannot use them for arrays etc
22:02:55Araqtmm1: why "language: c"?
22:03:00tmm1https://travis-ci.org/profile/nim-lang
22:03:11tmm1Araq: that just tells it what kind of deps to setup, so it will make sure there's a c compiler available
22:04:06reactormonksweet, didn't know someone added nim-mode to travis
22:04:53ryu0Araq: ? 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:56ryu0say FreeBSD.
22:07:03*elrood quit (Quit: Leaving)
22:07:41Araqtmm1: after sh build.sh you need to ensure bootstrapping works
22:07:57Araqwith without -d:release, then with -d:release
22:08:14*FedeOmoto quit (Ping timeout: 260 seconds)
22:08:42tmm1right, i saw that in the buildbot config. will add
22:08:57Araqand then koch tests ... well we need to make our tests green for this to work
22:10:33Araqbut we also had a suite of acceptance tests
22:11:11reactormonkAraq, how would you deal with failing tests? Mark them somehow?
22:11:38*Enamex joined #nim
22:12:10AraqI cannot remember. "Koch tests lib" is used by the debian package iirc
22:12:44Araqreactormonk: we should get rid of fragile tests and have 100% green tests
22:15:25tmm1how many failure are there
22:15:57tmm1i updated the travis.yml, i'd like to try it
22:17:09Araqtmm1: in general very few
22:17:47Araq1% perhaps
22:19:11tmm1cool
22:19:26tmm1i'm going to add travis config to c2nim too
22:21:04Araqryu0: var SIGABRT {.importc, header: "<signal.h>".}: cint means the Nim compiler produces SIGABRT in the generated C code
22:21:41Araqso there is nothing to adapt for FreeBSD
22:22:07Araqhowever, we also have a tool that generates a C program to output all these values for us
22:22:23Araqbut it's not used yet
22:23:09ryu0Araq: VINTR from termios.nim is using a constant value it appears. not something generated from a header.
22:24:07ryu0at least in the latest official release, not git.
22:24:19ryu0unless that was changed when i compiled nim...
22:25:44ryu0ugh. finally. my hack of shell script and awk to work around an issue with cdda2wav is done.
22:26:43Araqryu0: I'm not familiar with termios.nim. I was talking about posix.nim.
22:27:03dom96tmm1: Why the addition of build.sh?
22:27:43ryu0https://github.com/nim-lang/Nim/blob/devel/lib/posix/termios.nim
22:27:46Araqtmm1: dom96 is taking over ;-) it's his job anyway.
22:27:56ryu0VINTR* = 0
22:28:04tmm1dom96: didn't mean to do that, should be fixed now
22:28:31ryu0unless there is some nim feature i don't know about... this looks like it uses a hardcoded constant.
22:29:01Araqryu0: yes
22:29:50dom96tmm1: looks good
22:30:06ryu0Araq: 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:26ryu0libcs*
22:30:29tmm1dom96: can you enable it for the repo, and change settings to only build when .travis.yml is present
22:31:00ryu0for Win32, i wouldn't really care but this is POSIX... lol
22:31:03Araqryu0: strictly speaking it's a breaking change. dunno.
22:31:13ryu0oh. bleh.
22:31:36AraqI'm sure the BSDs use the same values anyway
22:31:44ryu0i'll find out then.
22:32:06ryu0assuming is... bad news. :P
22:32:09ryu0in my experience.
22:32:37dom96hrm, is it just me or is travis-ci's website incredibly slow
22:34:50*vikaton joined #nim
22:36:11ryu0Araq: i'll look into that.
22:36:16ryu0for FreeBSD at least.
22:37:04Araqbut but but ... what about HP Unix?
22:37:23ryu0uh... no way to test that. it's not open source.
22:37:37ryu0i'm just looking for open source unices.
22:37:45dom96tmm1: should be ready to go
22:38:08*irrequietus quit ()
22:38:16Araqopen solaris?
22:38:26Araq(does that still exist?)
22:38:39*enamex_ joined #nim
22:38:39ryu0Araq: kinda. but it's not very easy to setup that i can see.
22:39:24tmm1dom96: hmm says not found https://travis-ci.org/nim-lang/nim https://travis-ci.org/nim-lang
22:39:49tmm1dom96: 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:09tmm1https://travis-ci.org/nim-lang/Nim/builds/82834764 yay
22:40:23dom96cool
22:41:04ryu0As I suspected!
22:41:08ryu0https://github.com/freebsd/freebsd/blob/master/sys/sys/_termios.h
22:41:12ryu0https://github.com/nim-lang/Nim/blob/devel/lib/posix/termios.nim
22:41:17ryu0VINTR = 8 on FreeBSD.
22:41:22ryu0Not compatible.
22:42:38ryu0this was written for Linux, not POSIX.
22:43:42Araqok, you're allowed to use .importc then
22:45:09ryu0Araq: 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:42Araqthat depends on what we claim.
22:46:09Araqif we document that termios is linux specific, things are fine again
22:46:51ryu0ah.
22:47:02*keyle joined #nim
22:47:44Araqsupporting 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:38ryu0C and C++ seem to manage just fine with GCC / Clang...
22:51:15Araqryu0: I don't see your point
22:52:45ryu0Araq: i suppose i don't get why we have a section labeled posix that's really more geared towards Linux than posix.
22:53:04dom96tmm1: seems it failed
22:53:13ryu0some parts pull from external headers but not all.
22:53:19tmm1dom96: yea i'm working on a follow up PR
22:53:27dom96tmm1: thanks
22:55:32ryu0I suppose i'm used to the idea of portability from C land.
22:55:42tmm1Araq: 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:45Araqryu0: no, you simply have different experiences with open source software. ;-)
22:57:00ryu0Araq: how so?
22:57:28ryu0i was feeling like posix module should work on as many posix platforms as possible.
22:57:29Araqfor me "it claims posix but only was tested on linux anyway" is my default expectation.
22:57:55ryu0ah.
22:58:14ryu0i get some parts will always be OS specific...
22:58:20ryu0like how devices are named.
22:58:56ryu0even so, i was expecting the posix module to be flexible and adapt to the underlying constants of the platform.
22:59:13ryu0just like C is able to do.
22:59:21Araqtermios.nim is not posix.nim
22:59:33ryu0it's under the POSIX folder. =p
22:59:43ryu0but anyway.
23:00:11ryu0i suppose it doesn't matter too much.
23:02:14Araqwell 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:44ryu0okay, i get it. it's not a priority.
23:08:18tmm1wow test suite is quite slow
23:08:25tmm1fair number of failures
23:09:52Araqtmm1: depends on the setup of the machine. if nodejs is not installed, every JS test will fail
23:10:07Araqwe 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:27tmm1i wonder if you could run tests in parallel
23:17:31tmm1one per core
23:17:57Araqno you cannot. else we would do it.
23:18:26Araqyou can patch the tester though to support it
23:18:46Araqthe tester needs to give each test its own --nimcache directory
23:18:58Araqthen it should work
23:20:12tmm144 failures in https://travis-ci.org/nim-lang/Nim/jobs/82836500#L2796
23:20:19tmm1a lot of them are reNimcCrash
23:20:20*rollo joined #nim
23:21:41Araqthat doesn't mean what you think it means
23:24:31*kulelu88 quit (Quit: Leaving)
23:26:56tmm1can i pass --parallelBuild:1 to koch test?
23:27:44Araqthat has no effect
23:28:19AraqI think
23:29:15tmm1some of the failures seemed like gcc errors but it didn't show the output
23:29:39tmm1what does nimc crash mean? there aren't a lot of details in the test failures
23:29:58Araqit means its exitcode was not 0.
23:30:18*ryuo joined #nim
23:30:25*ryu0 quit (Disconnected by services)
23:30:29ryuough.
23:30:31Araqso if GCC complains about the generated C code, that's a "nim crash"
23:30:31ryuodc.
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:54AforAviok 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)