<< 26-09-2015 >>

00:35:38*jaco60 quit (Ping timeout: 240 seconds)
00:56:53*pregressive quit (Remote host closed the connection)
00:56:56ryu0very strange...
00:57:21ryu0a sample C program is faster than nim... hm...
00:57:49def-ryu0: source code?
00:57:58ryu0def-: sec. let me upload it.
00:58:13ryu0350 ms runtime...
01:01:51ryu0https://gist.github.com/ryuo/d2cfee89a22c1e72ecb4
01:02:08ryu0maybe i'm writing it wrong in nim, but... the runtime is much slower in nim for these nested loops.
01:03:00ryu0350 ms vs 4700 ms or so.
01:03:22def-i would assume it's the echo that's slower
01:03:28ryu0perhaps so.
01:03:40ryu0i even redirect to /dev/null
01:03:45ryu0just to see what happens
01:03:56ryu0i'll try w/o doing that.
01:04:27def-are you compiling the nim code with -d:release?
01:04:38def-i get about the same time
01:04:46def-C is twice as fast with > /dev/null though
01:05:00ryu09s vs 16s
01:05:03ryu0i'll try using release.
01:05:24def-stdout.writeln instead of echo should be a bit faster
01:05:52def-just making a string of fixed size and setting the characters and then printing the entire thing should be much faster
01:07:08ryu0i was testing code i used to use for generating digit sequences.
01:07:15def-also faster: stdout.writeln(a & b & c & d & e & f)
01:07:18ryu0C was the fastest language i tested.
01:07:35Xedom96: https://github.com/dom96/jester/issues/46#issuecomment-143168120 <-- this doesn't parse
01:07:40ryu0is '&' a concatenation operator?
01:07:45def-ryu0: right
01:07:56ryu0strange choice. but okay.
01:08:11ryu0only characters? only strings? or both?
01:08:52def-both, and seqs
01:08:55ryu0k.
01:09:04def-http://nim-lang.org/docs/system.html#&,string,char
01:09:47ryu0Holy.
01:09:52ryu0It's even faster than C now.
01:10:29ryu0@_@
01:10:45*Senketsu quit (Quit: Leaving)
01:10:54ryu0okay, i'm going to rewrite the C code to try something.
01:11:04ryu0use an array instead.
01:12:18ryu0now C is faster. XD
01:12:38ryu0using puts instead of printf.
01:13:24ryu0well, this is a decent lesson in optimizing code at least. :)
01:14:10*Matthias247 quit (Read error: Connection reset by peer)
01:15:30*yglukhov joined #nim
01:15:55def-ryu0: https://gist.github.com/def-/5606bad11983ebb85b29
01:16:39ryu0\1?
01:16:45ryu0meaning?
01:16:49def-\l, newline
01:17:02def-\n is platform dependent, may not be a single character (windows)
01:17:04ryu0oh. used to it being \n.
01:17:41def-or if memory doesn't matter, make a bigger string
01:18:29ryu0about the same speed as C now.
01:19:13ryu0i wonder why nim hates tabs...
01:19:17ryu0huh.
01:20:03*yglukhov quit (Ping timeout: 252 seconds)
01:20:23def-ryu0: https://github.com/nim-lang/Nim/wiki/Whitespace-FAQ#tabs-vs-spaces
01:21:27ryu0ah, yes.. C/C++ problems...
01:21:46ryu0i think it's talking about for, if, and such that will work w/o braces.
01:22:07ryu0hm.
01:22:22ryu0anyway.
01:24:02ryu0it may be my imagination, but it seems like nim inherited some pascal syntax conventions.
01:24:13ryu0such as type/const/var blocks...
01:24:16def-added the faster version with more memory: https://gist.github.com/def-/5606bad11983ebb85b29
01:25:01ryu0that's faster? i'll give it a try.
01:25:23def-sure, but needs 7 MB of memory
01:25:44*CryptoToad quit (Quit: Leaving)
01:26:01ryu0holy. okay, so the reason is due to a larger buffer being more efficient for writes.
01:26:33def-also due to running the same simple write operations instead of jumping into the kernel with the write syscall
01:27:27ryu0not bad.
01:28:10*chemist69 joined #nim
01:28:16ryu0consider me impressed. i thought i'd be stuck with C if i wanted fast code.
01:29:05ryu0def-: so nim doesn't require null-terminated strings?
01:29:20def-strings in nim have a length and are null-terminated
01:29:27def-for easy passing to c functions
01:29:27ryu0oh, so it has both.
01:29:48*ozra quit (Ping timeout: 246 seconds)
01:29:50ryu0i notice it resembles pascal syntax in some ways.
01:30:11*vendethiel joined #nim
01:30:22ryu0the var/const/type blocks for example.
01:30:54ryu0pascal:
01:31:01ryu0var x : longint;
01:31:07ryu0or such. it's been awhile.
01:31:16ryu0hm. time to try something else.
01:31:21*chemist69_ quit (Ping timeout: 250 seconds)
01:31:36ryu0cool. it's not case insensitive.
01:32:26ryu07_000? are these separators mandatory?
01:32:41def-nope, _ has no meaning in identifiers and numbers
01:32:56def-you can use it however you want, but it's nice to make numbers more human-readable
01:33:15def-for example newString could also be used as new_string
01:33:41ryu0is it possible to force variables to a specific type? it appears type inferrence is used for things like: x = 0
01:34:01cazov`var x : type = 0`
01:34:01def-var x: int8 = 0 or var x = 0'i8
01:34:07ryu0ah, k.
01:34:23ryu0hm...
01:34:38ryu0does 'int' default to some constant size? or is it platform specific like C int?
01:35:40def-ryu0: int is always the size of pointers on the architecture
01:35:47def-so 32bit on x86, 64bit on x86-64
01:35:52ryu0okay, then it varies. k
01:36:37ryu0i must admit i do get sick of C and its like million different integer aliases.
01:36:43def-http://nim-lang.org/docs/tut1.html#basic-types-integers
01:36:44ryu0size_t, ptrdiff_t, pid_t, ...
01:37:08ryu0._.
01:39:30*cyraxjoe quit (Ping timeout: 240 seconds)
01:41:13*AMorpork is now known as NextCIBot
01:41:22*NextCIBot is now known as AMorpork
01:43:59*cyraxjoe joined #nim
01:54:24*vendethiel quit (Ping timeout: 264 seconds)
02:03:45*pregressive joined #nim
02:27:28*pregressive quit (Remote host closed the connection)
02:33:19*BitPuffin|osx quit (Ping timeout: 250 seconds)
02:37:36*enamex joined #nim
02:41:29*enamex quit (Client Quit)
03:13:54*darkf joined #nim
03:29:43*tmm1 joined #nim
04:06:35*Varriount_ quit (Ping timeout: 256 seconds)
04:18:08*Sornaensis quit (Ping timeout: 240 seconds)
04:21:23*Sornaensis joined #nim
04:32:24*tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:59:39*johnsoft quit (Quit: Leaving)
05:48:21*Kingsquee joined #nim
06:24:41*Enamex joined #nim
07:14:25*enamex_ joined #nim
07:17:03*Enamex quit (Ping timeout: 255 seconds)
07:22:57*Varriount joined #nim
07:33:57*silven joined #nim
07:38:52*vendethiel joined #nim
07:43:08*iamd3vil joined #nim
07:43:37*silven quit (Ping timeout: 256 seconds)
07:45:01*silven joined #nim
07:53:13*yglukhov joined #nim
07:53:54*yglukhov quit (Remote host closed the connection)
07:54:11*yglukhov joined #nim
07:54:16*yglukhov quit (Remote host closed the connection)
07:54:35*yglukhov joined #nim
07:55:36*yglukhov quit (Client Quit)
07:56:40*smodo joined #nim
08:06:33*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:06:56*bjz joined #nim
08:15:34*drewsrem joined #nim
08:27:39*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:31:11*irrequietus joined #nim
09:00:04*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
09:00:53*vendethiel quit (Ping timeout: 265 seconds)
09:13:25*solidsnack joined #nim
09:20:22*solidsnack quit (Ping timeout: 244 seconds)
09:40:28*jakesyl quit (Ping timeout: 246 seconds)
09:40:38*jakesyl_ joined #nim
09:40:38*jakesyl_mac quit (Ping timeout: 272 seconds)
09:45:42NimBotnim-lang/Nim devel c04ae96 Jakob Oesterling [+0 ±1 -0]: added examples in documenation for sizeof high low
09:45:42NimBotnim-lang/Nim devel e429810 Jakob Oesterling [+0 ±1 -0]: added examples in documenation for add del delete repr insert
09:45:42NimBotnim-lang/Nim devel 709c4f7 Jakob Oesterling [+0 ±1 -0]: Merge branch 'devel' of github.com:TheAnonymous/Nim into devel
09:45:42NimBotnim-lang/Nim devel ca9845d Jakob Oesterling [+0 ±1 -0]: fixed wrong examples
09:45:42NimBot1 more commits.
09:58:05*jakesyl joined #nim
09:59:11*Demon_Fox quit (Quit: Leaving)
10:00:22*jaco60 joined #nim
10:10:33*Pisuke quit (Quit: WeeChat 1.4-dev)
10:14:41*Matthias247 joined #nim
10:22:34*smodo quit (Remote host closed the connection)
10:28:32*Trustable joined #nim
10:35:14*Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png)
10:36:30*elrood joined #nim
10:36:44*Guest20403isaway is now known as Guest20403
10:40:26*Trustable quit (Remote host closed the connection)
11:01:25*yglukhov joined #nim
11:06:24*drewsrem quit (Quit: Leaving)
11:11:08*yglukhov quit (Remote host closed the connection)
11:15:35*Sahnvour joined #nim
11:19:21*jaco60 quit (Remote host closed the connection)
11:20:29*jaco60 joined #nim
11:22:40*Matthias247 quit (Read error: Connection reset by peer)
11:28:44*drewsrem joined #nim
11:34:58*egyp7 joined #nim
11:45:22*yglukhov joined #nim
11:46:08*egyp7 quit (Quit: Page closed)
12:07:49*ozra joined #nim
12:54:15*infinity0 quit (Remote host closed the connection)
12:59:10*infinity0 joined #nim
13:05:03*wuehlmaus quit (Quit: Lost terminal)
13:31:39*yglukhov quit (Remote host closed the connection)
13:48:19*yglukhov joined #nim
14:41:20*BitPuffin|osx joined #nim
14:59:05*darkf quit (Quit: Leaving)
15:10:40*iamd3vil quit (Ping timeout: 244 seconds)
15:19:35*FedeOmoto joined #nim
16:12:16*jaco60 quit (Remote host closed the connection)
16:12:24*Matthias247 joined #nim
16:15:13*Jesin joined #nim
16:16:16*jaco60 joined #nim
16:47:22*rpowers joined #nim
16:53:05rpowersis it possible to emit a macro error for a specific source location?
16:55:03rpowerslike, if one statement is wrong in a statement macro, can you attach an error to that NimNode?
17:13:38*AforAvi joined #nim
17:21:58*yglukhov quit (Remote host closed the connection)
17:42:18*jakesyl quit (Ping timeout: 240 seconds)
17:55:33*jakesyl joined #nim
17:57:49*enamex_ is now known as enamex
18:00:05*irrequietus quit ()
18:08:28*Matthias247 quit (Read error: Connection reset by peer)
18:15:49*boop joined #nim
18:16:12*boop is now known as Guest14221
18:16:59*Guest20403 quit (Ping timeout: 264 seconds)
18:22:36*yglukhov joined #nim
18:25:28*jakesyl quit (Ping timeout: 246 seconds)
18:26:50*yglukhov quit (Ping timeout: 240 seconds)
18:31:28*irrequietus joined #nim
18:38:37*jakesyl joined #nim
18:39:18*zaquest quit (Ping timeout: 240 seconds)
18:43:13*ChrisMAN quit (Ping timeout: 256 seconds)
18:46:46Varriountrpowers: I think so. You could throw an exception?
18:47:10Varriountdom96: What/how does the forum send email for missing passwords?
18:47:42Varriountdom96: I'm adding missing-buildslave email notification to the buildbot.
18:50:40rpowersVarriount: hmm ok, but I'd like the error source location to be at a specific point in the user's code
18:52:14*xet7_ quit (Read error: Connection reset by peer)
18:52:30*xet7_ joined #nim
18:53:57Varriountrpowers: There's the example for the `quote` procedure: http://nim-lang.org/docs/macros.html#quote,stmt,string
18:56:05*ChrisMAN joined #nim
18:59:56rpowersVarriount: Ok, but if I throw the exception, it's line info will be from the macro, right?
19:00:56rpowersVarriount: In Scala, when you error from a macro, you can give it an AST node and an error message, which creates a compiler error at the location of the AST node you passed in
19:04:20rpowersit's useful if you have a large class (or statment for Nim) -- the errors show up where they are most useful, rather than at the root of the class/statement
19:08:59dom96Varriount: smtp
19:09:26dom96https://github.com/nim-lang/nimforum/blob/master/utils.nim#L25
19:10:22Varriountrpowers: I could have sworn there was a mechanism for this, used by templates... Hrm.
19:10:50Varriountdom96: Thanks.
19:11:07Varriountdom96: Do you want to be notified when builders go missing?
19:12:09*Trustable joined #nim
19:14:19*xet7_ quit (Ping timeout: 246 seconds)
19:14:36*xet7_ joined #nim
19:16:34*_stowa quit (Remote host closed the connection)
19:20:25*jakesyl quit (Ping timeout: 246 seconds)
19:22:06*pregressive joined #nim
19:28:57*Sembei joined #nim
19:28:58*UberLambda joined #nim
19:31:35*strcmp1 joined #nim
19:33:52*jakesyl joined #nim
19:38:30*irrequietus quit (Ping timeout: 272 seconds)
19:44:13dom96Varriount: nah.
19:58:08*UberLambda quit (Quit: GTG)
20:00:55*tmm1 joined #nim
20:05:16*zaquest joined #nim
20:05:25tmm1good afternoon
20:10:10*zaquest quit (Ping timeout: 272 seconds)
20:10:24*irrequietus joined #nim
20:15:58*AforAvi quit (Read error: Connection reset by peer)
20:35:03*Demos joined #nim
20:36:11*vendethiel joined #nim
20:36:56*Kingsquee joined #nim
20:51:36*gokr joined #nim
21:10:41*Trustable quit (Remote host closed the connection)
21:20:58*Demos quit (Read error: Connection reset by peer)
21:26:01*tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:26:58*zemm_ is now known as zemm
21:34:59*BitPuffin|osx quit (Ping timeout: 264 seconds)
21:39:33*gokr quit (Quit: Leaving.)
21:40:46*jakesyl quit (Ping timeout: 246 seconds)
21:41:53*Demon_Fox joined #nim
21:46:15*tmm1 joined #nim
21:53:54*jakesyl joined #nim
21:54:24Varriountdom96: For the buildbot's test data and upload directory, should some sort of transparent compression be applied, to minimize disk usage?
21:54:37dom96sure, couldn't hurt.
21:58:08Varriountdom96: Looks like ZFS supports transparent compression.
21:58:55*yglukhov joined #nim
22:00:01dom96Varriount: just compress using tar
22:00:27Varriountdom96: Yes, but then you can't access individual files via the web interface.
22:01:18dom96So you suggest I should repartition the VPS to use the Z File system? :P
22:01:44VarriountI don't know. I'm still looking.
22:03:33*yglukhov quit (Ping timeout: 255 seconds)
22:03:52dom96Varriount: Would you have enough time to rewrite NimBuild?
22:04:01Varriountdom96: No.
22:04:31dom96:/
22:05:38*tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:07:11Varriountdom96: I'll have time next break and next semester, but I'd rather focus on updating NimLime and the Nim installer first.
22:07:53dom96Even if you could create a webapp which builds an installer at the press of a button for a new release would be a huge help
22:13:36*nande joined #nim
22:19:31VarriountLooking at the available tools, I think a workable and less risky solution would be to make X uncompressed versions available, and compress the rest into a single file.
22:24:10*pregressive quit (Remote host closed the connection)
22:28:56VarriountSo, dom96, Araq, do you think we should start signing the installers?
22:29:13dom96I don't think that's worth the effort.
22:29:22dom96Let's not make the installer generation process more complex
22:29:34dom96Can you at least document how you generate the installers?
22:29:39*Matthias247 joined #nim
22:31:13Varriountdom96: Copy the EnvVarUpdate.nsh script to the build directory, then run 'koch nsis'
22:36:57*Xe quit (Quit: *.yolo *.swag)
22:39:04*Xe joined #nim
22:46:23*Sembei quit (Quit: WeeChat 1.4-dev)
22:48:05*elrood quit (Quit: Leaving)
22:48:27*irrequietus quit ()
22:49:15*drewsrem quit (Quit: Leaving)
22:50:29*Xe quit (Quit: *.yolo *.swag)
22:57:15dom96Varriount: Nice. That sounds pretty easy to automate.
22:57:15*Xe joined #nim
23:04:06*Guest14221 is now known as Guest14221isaway
23:04:45*vendethiel quit (Ping timeout: 255 seconds)
23:13:31*enamex quit (Ping timeout: 246 seconds)
23:17:32Araquh oh
23:18:09Araqosproc.select: **Warning**: This function may give unexpected or completely wrong results on Windows.
23:18:27Araqcan I get more specific information?
23:19:12Araq"may give completely wrong results" ... when? why? what if I only use it with 1 Process to asyncronously read from it?
23:26:56ryu0https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx http://pubs.opengroup.org/onlinepubs/007908799/xsh/select.html
23:26:59ryu0maybe some difference here?
23:27:02VarriountAraq: I believe it's because it uses the same method select does for sockets.
23:27:44VarriountWhereas on Linux sockets and file descripters are roughly the same things, on Windows they are not.
23:28:45Araqwell proc select*(readfds: var seq[Process], timeout = 500): int does make it pretty obvious it only works on Processes
23:29:12VarriountAraq: Yes, but what underlying system call is used?
23:29:40AraqwaitForMultipleObjects of course
23:30:03VarriountHuh? When was that changed?
23:30:21VarriountI could have sworn it used some other method last time I saw it.
23:30:34Araqdunno
23:30:46Araq3 beer are minimum before touching osproc.nim
23:31:15VarriountAraq: Despite the fact that I don't drink, I agree with you.
23:36:49*xet7_ quit (Read error: Connection reset by peer)
23:36:49VarriountAraq: I'm updating the buildmaster code, so there may be some downtime (minutes, depending on errors)
23:37:08*xet7_ joined #nim
23:41:33ryu0Araq: osproc is a nim module for interfacing with C system API for managing processes?
23:42:00*Matthias247 quit (Read error: Connection reset by peer)
23:42:40*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
23:43:35Araqryu0: yes
23:44:26ryu0ah.
23:47:13Araqand one day I'll write a new module that uses openpty() instead
23:47:49Araqand that uses whatever windows' equivalent to that is
23:48:26ryu0sounds like a complicated version of expect :)
23:48:34ryu0or something.
23:48:36ryu0lol
23:48:40ryu0err simplified i guess.
23:48:48Araqthere are lots of open source windows terminals around and nobody bothered to document how this can be done...
23:48:52*enamex joined #nim
23:49:01ryu0Araq: did you look at libexpect before?
23:49:06Araqryu0: expect module for Nim is spot on
23:49:08ryu0not sure if it works on windows but...
23:49:34ryu0ah.
23:50:10ryu0haha. some of this nim stuff reminds me of ASM instructions.
23:50:19ryu0inc for example.
23:53:52Araqyeah in some ways the old Turbo pascal influences are still visible
23:54:07Araqmaking the language even more charming ;-)