00:17:16 | * | fredrik92 joined #nim |
00:28:29 | * | sheerun quit () |
00:37:07 | * | gokr quit (Ping timeout: 250 seconds) |
00:55:03 | * | Gonzih quit (Ping timeout: 240 seconds) |
01:09:38 | * | Gonzih joined #nim |
01:19:10 | * | krux02 quit (Quit: Verlassend) |
01:25:56 | * | desophos quit () |
01:36:02 | * | ephja quit (Ping timeout: 250 seconds) |
01:37:20 | * | fredrik92 quit (Ping timeout: 250 seconds) |
01:43:20 | * | brson quit (Quit: leaving) |
02:02:46 | * | desophos joined #nim |
02:36:17 | * | chrisheller joined #nim |
02:40:31 | * | ziyu4huang joined #nim |
02:42:45 | * | ziyu4huang left #nim (#nim) |
02:43:21 | * | ziyu4huang joined #nim |
02:48:36 | * | ziyu4huang left #nim (#nim) |
02:52:16 | * | ziyu4huang joined #nim |
02:59:11 | * | ziyu4huang quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
03:29:28 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
03:55:19 | * | space-wizard joined #nim |
03:55:55 | * | space-wizard quit (Max SendQ exceeded) |
03:56:31 | * | space-wizard joined #nim |
03:57:06 | * | space-wizard quit (Max SendQ exceeded) |
03:57:43 | * | space-wizard joined #nim |
04:06:54 | * | ehmry quit (Ping timeout: 248 seconds) |
04:37:24 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:42:20 | * | space-wizard joined #nim |
04:42:56 | * | space-wizard quit (Max SendQ exceeded) |
04:43:31 | * | space-wizard joined #nim |
04:44:06 | * | space-wizard quit (Max SendQ exceeded) |
04:44:43 | * | space-wizard joined #nim |
05:05:25 | * | endragor joined #nim |
05:09:57 | * | Demos joined #nim |
06:04:55 | * | McSpiros joined #nim |
06:06:01 | * | space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
06:14:04 | * | Demos_ joined #nim |
06:17:04 | * | Demos quit (Ping timeout: 240 seconds) |
06:17:41 | * | endragor_ joined #nim |
06:20:44 | * | endragor quit (Ping timeout: 250 seconds) |
06:24:05 | * | Demos__ joined #nim |
06:27:03 | * | Demos_ quit (Ping timeout: 240 seconds) |
06:37:45 | * | gokr joined #nim |
06:48:07 | * | silven quit (Ping timeout: 252 seconds) |
06:49:21 | * | yglukhov joined #nim |
06:50:24 | * | endragor_ quit (Remote host closed the connection) |
06:50:54 | * | endragor joined #nim |
06:50:58 | * | filcuc joined #nim |
06:54:21 | * | yglukhov quit (Ping timeout: 244 seconds) |
07:07:38 | * | filcuc_ joined #nim |
07:09:51 | * | filcuc quit (Ping timeout: 244 seconds) |
07:16:50 | * | yglukhov joined #nim |
07:19:19 | * | desophos quit (Read error: Connection reset by peer) |
07:21:44 | * | Demon_Fox quit (Ping timeout: 244 seconds) |
07:32:13 | cheatfate | Is it possible to make position independent code with Nim? |
07:35:19 | * | Trustable joined #nim |
07:36:16 | * | Trustable quit (Remote host closed the connection) |
07:37:06 | * | Trustable joined #nim |
07:40:40 | * | Trustable quit (Client Quit) |
07:41:43 | * | Trustable joined #nim |
07:43:02 | * | Trustable quit (Client Quit) |
07:46:14 | * | dorei joined #nim |
07:54:36 | * | Trustable joined #nim |
08:04:03 | * | Demos__ quit (Ping timeout: 240 seconds) |
08:05:52 | * | Demon_Fox joined #nim |
08:06:37 | * | fredrik92 joined #nim |
08:21:26 | * | McSpiros quit (Ping timeout: 250 seconds) |
08:24:47 | * | Arrrr joined #nim |
08:37:40 | * | kingofoz joined #nim |
08:38:33 | kingofoz | hello |
08:38:45 | kingofoz | any Nim developer here? |
08:39:09 | Xe | clarify? |
08:39:49 | kingofoz | want to know when 1.0 will be released |
08:40:54 | Xe | AFAIK it is more of a "when it's ready" thing |
08:41:16 | kingofoz | ok |
08:41:40 | kingofoz | how many developers does Nim have? |
08:41:56 | Xe | like the core language itself? |
08:42:11 | kingofoz | yes |
08:42:54 | * | Demon_Fox quit (Quit: Leaving) |
08:44:53 | Arrrr | Noone knows for sure, however there are certain rumors |
08:47:08 | kingofoz | what are the rumers? |
08:50:43 | Arrrr | Well, they say there is only one developer, but he made up fake identities to hide this fact. |
08:51:03 | Arrrr | But if you ask me, that's nonsense. How would only one developer build all nim? |
08:51:49 | fredrik92 | so Arrrr, you're not Araq then? :P |
08:52:27 | Arrrr | haha *sweat*. I don't even contribute |
08:52:34 | kingofoz | wow, this rumor is amazing |
08:53:14 | kingofoz | does anybody use nim to write games? |
08:53:34 | Araq | kingofoz: you can buy commercial support from Metatexx fwiw |
08:57:37 | Arrrr | I'd say half of the people using nim are doing videogames |
08:58:10 | Arrrr | just to throw some inaccurate numbers |
08:58:53 | Arrrr | Nim provides a realtime GC, and i think there is a better GC in the way |
09:01:42 | kingofoz | ok |
09:01:52 | kingofoz | by the way, what is Metatexx fwiw? |
09:02:24 | gokr | FWIW = For What It's Worth |
09:02:59 | gokr | Arrrr: I would guess "half" is... not true. But yeah, there are several. |
09:03:13 | kingofoz | ok |
09:03:24 | gokr | kingofoz: What's your interest more specifically? Making games? |
09:04:05 | fredrik92 | E.g. I don't do game-dev with Nim... But PMunch and I used Nim for our university project in our databases class... :) |
09:05:13 | kingofoz | maybe, gokr |
09:05:28 | kingofoz | I know a little about libgdx |
09:05:38 | kingofoz | it is a game framework by Java/C/C++ |
09:05:55 | CcxCZ | I'd be pondering 7drl … if I actually had 7 days to work on it. |
09:06:00 | gokr | kingofoz: Me and Araq made a pretty cool wrapper of Urho3D a while back: https://github.com/3dicc/Urhonimo |
09:06:38 | gokr | Urho3D is a very nice and complete 3D game engine, and there are samples in there in Nim. |
09:07:15 | kingofoz | I am looking it |
09:07:18 | kingofoz | awesome |
09:07:32 | kingofoz | can it work on Android? |
09:08:03 | gokr | Yes, here is a movie demonstrating the character.nim sample: https://www.youtube.com/watch?v=-T0MrJkLB8Y |
09:08:18 | Araq | gokr: did you ever update the wrapper to latest Urho? |
09:08:26 | gokr | Nope, didn't. We should. |
09:08:32 | Araq | still have the code |
09:08:44 | gokr | I might get to that point eventually because... I would like to use Spry with Urhonimo :) |
09:08:51 | gokr | Oh, good! |
09:09:19 | kingofoz | amazing, you guys are both developers of Nim? |
09:10:17 | gokr | Well, Araq is the author of Nim, I am just a ... decent developer. :) |
09:11:18 | gokr | If you want to look into 3D games then Urho3D is a solid platform. And being able to use Nim is IMHO much more fun than (shudder) C++. |
09:11:51 | kingofoz | I guess so |
09:11:57 | gokr | kingofoz: If you search youtube for Urho3D you can find much more stuff showing its capabilities. |
09:11:58 | kingofoz | C++ is pretty terrible! |
09:12:14 | kingofoz | Nim can work on Android, right? |
09:13:28 | gokr | Nim compiles via C/C++ so there is no difference really from using C++ directly - when it comes to choices of deployment. |
09:14:07 | kingofoz | I see |
09:14:26 | kingofoz | Araq is Andreas Rumpf, right? |
09:14:31 | gokr | yup |
09:17:04 | reactormonk | Is the nim VM multithreaded? |
09:17:49 | Araq | reactormonk: lol |
09:17:52 | kingofoz | wow, I just talked with big god of Nim |
09:18:22 | reactormonk | Araq, I guess that's a no ^^ |
09:19:30 | kingofoz | I guess Nim has no VM? |
09:19:45 | reactormonk | kingofoz, no it does, for macros etc. |
09:20:44 | gokr | The VM is primarily for macro execution during compilation, but lately also for nimscripts. It's not intended as a primary runtime target. |
09:21:41 | kingofoz | no vm during running? |
09:22:19 | Arrrr | Nim generates c code, doesn't work like an interpreted language |
09:25:28 | gokr | Right, so the Nim compiler spits out C, C++ or javascript. Or lately also LLVM IR. Then typically GCC is used to compile it - but that's usually done behind the scenes. But you can also let Nim just produce C/C++ and take it from there on your own (can be useful). |
09:26:07 | gokr | Or of course XCode or VCC or whatever compiler you have. |
09:27:09 | gokr | This is IMHO one of the great advantages of Nim compared to many other alternatives - the deployment options are almost 100% open. |
09:27:55 | gokr | And integrating with the C/C++ eco systems is easy. |
09:32:41 | kingofoz | indeed |
09:32:53 | kingofoz | keep going gokr |
09:33:19 | kingofoz | I hope someday I can also contribute code to Nim |
09:34:06 | reactormonk | kingofoz, go ahead, the stdlib is quite simple, system.nim inclusion order is a bit messy, the compiler is a bit more complicated, but nothing compared to an ASM compiler. |
09:40:30 | kingofoz | sure |
09:45:47 | * | Araq_ joined #nim |
09:47:52 | * | mnemonikk quit (*.net *.split) |
09:47:53 | * | saml quit (*.net *.split) |
09:47:54 | * | SirCmpwn quit (*.net *.split) |
09:47:55 | * | Araq quit (*.net *.split) |
09:47:55 | * | SirCmpwn_ joined #nim |
09:56:08 | * | saml joined #nim |
10:01:08 | fredrik92 | hehe, one day, when I get the time, I might even write the Nim backend for C#... :D |
10:07:47 | * | urbank joined #nim |
10:08:04 | urbank | is there a standard way to do partial function application? |
10:09:35 | urbank | hm... I guess it clashes a bit with multiple dispatch |
10:10:49 | * | SirCmpwn_ is now known as SirCmpwn |
10:19:55 | * | tankfeeder joined #nim |
10:23:59 | Araq_ | urbank: I show how to do it via a macro in my NimConf talk |
10:24:36 | Araq_ | but it's really just a proc (a: string) = a & "fixed param" |
10:27:50 | * | ephja joined #nim |
10:29:56 | * | yglukhov_ joined #nim |
10:30:50 | urbank | Araq_: thank you! |
10:32:18 | * | filcuc joined #nim |
10:32:50 | * | yglukhov quit (Ping timeout: 268 seconds) |
10:33:23 | * | filcuc_ quit (Ping timeout: 250 seconds) |
10:34:04 | * | GangstaCat quit (Ping timeout: 268 seconds) |
10:37:42 | * | ^aurora^ quit (Ping timeout: 250 seconds) |
10:39:31 | * | jeffc_ joined #nim |
10:39:53 | * | jeffc quit (Ping timeout: 250 seconds) |
10:44:52 | * | chrisheller quit (Remote host closed the connection) |
10:45:10 | * | chrisheller joined #nim |
10:46:10 | * | GangstaCat joined #nim |
10:47:09 | * | arnetheduck joined #nim |
11:08:27 | * | elrood joined #nim |
11:12:22 | * | enthus1ast joined #nim |
11:13:20 | * | oceanpollen quit (Remote host closed the connection) |
11:15:27 | * | dthrvr quit (Ping timeout: 264 seconds) |
11:17:21 | * | emery joined #nim |
11:21:01 | gokr | Hmmm, I thought nimble was pulling packages.json from github... but... no? |
11:28:17 | * | fredrik92 quit (Read error: Connection reset by peer) |
11:34:34 | gokr | dom96: Why is nimble refresh only downloading from irc-logs server? Is the list a fallback list? I peeked at the code but... not sure. |
11:34:37 | veganskaway | Hi! Anybody uses ``staticExec`` and ``exec`` in nimscript? Why staticExec returns the output and exec doesn't? I used staticExec before and now I need to construct command in runtime. No chances? |
11:35:07 | * | veganskaway is now known as vegansk |
11:35:16 | * | wh1t3r0s3 quit (Ping timeout: 264 seconds) |
11:36:28 | * | ephja quit (Ping timeout: 264 seconds) |
11:36:28 | * | gmpreussner quit (Ping timeout: 264 seconds) |
11:36:28 | * | ekarlso quit (Ping timeout: 264 seconds) |
11:36:28 | * | federico3 quit (Ping timeout: 264 seconds) |
11:36:28 | * | niv quit (Ping timeout: 264 seconds) |
11:36:28 | * | pleiosaur quit (Ping timeout: 264 seconds) |
11:36:37 | dom96 | gokr: we had a long conversation about this a day or so ago. |
11:36:44 | gokr | Oh :) |
11:36:46 | * | vendethiel joined #nim |
11:36:53 | * | ephja joined #nim |
11:37:05 | * | mrkishi quit (Ping timeout: 264 seconds) |
11:37:39 | * | vendethiel- quit (Ping timeout: 248 seconds) |
11:37:47 | * | pleiosaur joined #nim |
11:39:37 | Araq_ | vegansk: hmmm, maybe I assumed 'staticExec' would work |
11:41:34 | * | wh1t3r0s3 joined #nim |
11:41:48 | * | niv joined #nim |
11:42:11 | vegansk | Araq_, yes, it works! I thought that it must be executed when nimvm starts, but it works as a normal function. Thanks! |
11:42:40 | * | gmpreussner joined #nim |
11:44:49 | * | mrkishi joined #nim |
11:45:03 | Araq_ | vegansk: likewise your readfile is just staticRead |
11:45:08 | Araq_ | I think. |
11:47:55 | vegansk | Araq_, no. I tried to replace readFile to staticRead in my config.nims, and it can't read the configuration. Strange, but it works with readFile. |
11:50:22 | * | federico3 joined #nim |
11:50:27 | * | ekarlso joined #nim |
11:56:58 | * | RGeisel joined #nim |
11:58:09 | * | dthrvr joined #nim |
12:10:51 | * | RGeisel quit (Quit: leaving) |
12:17:19 | * | urbank quit (Quit: Page closed) |
12:32:42 | yglukhov_ | dom96: what do you think of "nimble install --upgrade mypackage". specifically "--upgrade" will unconditionally upgrade dependencies to latest appropriate head. This seems pretty easy implement. |
12:33:17 | dom96 | yglukhov_: I think 'nimble update' will do that or something similar |
12:33:49 | yglukhov_ | ok, ill ask some questions on github. |
12:35:05 | * | PMunch joined #nim |
12:45:12 | niv | can i not do cast[int16]("\x00\x01") to interpret a binary value as int? |
12:45:27 | niv | gives me random numbers and im confused |
12:48:26 | * | tankfeeder quit (Quit: Leaving) |
13:00:24 | enthus1ast | echo cast[int16](0x01 + 0x01) works for me |
13:00:53 | enthus1ast | @niv ^ |
13:01:11 | niv | mm, i specifically want it to interpret string data as integer |
13:13:05 | * | endragor quit (Remote host closed the connection) |
13:14:21 | * | Salewski joined #nim |
13:15:20 | * | endragor joined #nim |
13:15:49 | Salewski | niv, have you tried cast[int16]("\x00\x01"[0]) ? Otherwise the cast may cast not the content but the address of the string. But I am not sure. |
13:19:25 | Salewski | And, does that cast makes sense at all for a constant string? Maybe you just want 0x0001 ? |
13:19:45 | enthus1ast | niv: or parseHex from parseutils maybe? |
13:20:14 | ephja | Salewski: that's correct |
13:20:32 | niv | Salewski: its not REALLY a constant string, its something coming in over the network. i'll try the [idx] deref trick, thanks |
13:21:04 | * | Salewski quit () |
13:21:06 | ephja | well, the header |
13:21:38 | ephja | I think he meant [0].addr |
13:22:39 | ephja | cast[ptr int16]("\x00\x01"[0].addr)[]? |
13:22:42 | ephja | http://nim-lang.org/docs/streams.html |
13:23:27 | niv | the streams package is okay, but not really efficient to make a stringstream out of my packet just to get out a few ints |
13:25:05 | niv | []ing the cast doesnt work either |
13:25:59 | niv | apparently, str[0] makes a copy, it doesnt actually point at the original string |
13:26:17 | ephja | did you forget 'addr'? |
13:26:38 | niv | myval = cast[uint16](lenstr[0].addr[]) |
13:26:50 | niv | is always 0 for a lenstr of "\x00\xAE" |
13:27:58 | ephja | the dereference should go after the closing parenthesis |
13:28:17 | niv | that throws a could not resolve error at me :) |
13:29:04 | ephja | var s = "\x00\x01"; echo cast[ptr int16](s[0].addr)[] |
13:29:54 | niv | d'oh |
13:30:33 | niv | thanks. |
13:30:36 | ephja | then all that remains is possibly some endian operations in order to make it portable |
13:30:38 | ephja | np |
13:30:56 | niv | yeah, i need to flip endianness, but that's rather more trivial than figuring out the syntax :) |
13:47:38 | * | NimBot joined #nim |
13:51:48 | * | gokr joined #nim |
14:03:32 | * | mtj__ quit (Ping timeout: 260 seconds) |
14:09:35 | * | mtj_ joined #nim |
14:37:40 | * | def- quit (Ping timeout: 264 seconds) |
14:38:04 | * | def- joined #nim |
14:50:30 | * | aziz joined #nim |
15:10:08 | * | dorei quit (Quit: Page closed) |
15:12:08 | * | Sentreen joined #nim |
15:14:20 | Sentreen | Is there any reference for nim config files? The best I could find was the order in which they are processed, but that doesn't really help me. |
15:16:22 | Arrrr | That's because you can achieve mostly the same as nimc args |
15:16:31 | * | Demos joined #nim |
15:18:10 | * | pregressive joined #nim |
15:19:25 | Sentreen | Can you use it as a crippled makefile? e.g. can I see if I'm building for release or debug and (un)set the relevant flags? |
15:20:32 | Sentreen | Or is it purely intended for compiler flags and should I stick to makefiles for more "advanced" stuff? |
15:21:37 | Arrrr | If you want more advanced stuff, you probably need nimscripts, which allow you to specify a certain configuration for every task you define |
15:23:01 | Sentreen | That seems to be exactly what I was looking for, thanks! |
15:41:58 | * | filcuc quit (Read error: Connection reset by peer) |
15:43:06 | * | arnetheduck quit (Ping timeout: 276 seconds) |
15:44:02 | * | g00 joined #nim |
15:44:17 | * | PMunch quit (*.net *.split) |
15:44:18 | * | wh1t3r0s3 quit (*.net *.split) |
15:50:28 | * | PMunch joined #nim |
16:09:56 | * | fredrik92 joined #nim |
16:13:03 | Xe | what happened to the unix socket PR? |
16:16:03 | * | Sentreen quit () |
16:22:44 | * | drew__ joined #nim |
16:24:03 | * | space-wizard joined #nim |
16:24:49 | * | space-wizard quit (Max SendQ exceeded) |
16:25:10 | * | yglukhov_ quit (Remote host closed the connection) |
16:25:33 | * | space-wizard joined #nim |
16:29:22 | * | drew__ quit (Ping timeout: 250 seconds) |
16:37:12 | * | endragor_ joined #nim |
16:40:45 | * | endragor quit (Ping timeout: 244 seconds) |
16:41:54 | * | Trustable quit (Remote host closed the connection) |
16:41:59 | * | endragor_ quit (Ping timeout: 260 seconds) |
16:45:34 | * | brson joined #nim |
16:56:26 | * | GangstaCat quit (Quit: Leaving) |
16:58:25 | * | silven joined #nim |
17:01:15 | * | GangstaCat joined #nim |
17:02:03 | * | enthus1ast quit (Ping timeout: 240 seconds) |
17:07:37 | * | boopsies quit (Quit: WeeChat 1.3) |
17:08:08 | * | boop joined #nim |
17:24:04 | reactormonk | Trying to tinker with monoids - any way to get the zero working? https://gist.github.com/fb4f4f588b5424554ad505e661fc3bff |
17:58:08 | federico3 | something looks odd with await recv() on a TCP socket. Is there any TCP server that I can look at? |
18:03:02 | * | fredrik92 quit (Read error: Connection reset by peer) |
18:04:12 | ephja | why does it look odd? |
18:08:48 | federico3 | recv() seems to be returning partial or otherwise corrupted data |
18:11:05 | * | M-max quit (Remote host closed the connection) |
18:11:05 | * | M-Quora quit (Remote host closed the connection) |
18:12:13 | ephja | federico3: is the socket unbuffered? |
18:12:18 | * | desophos joined #nim |
18:15:31 | * | yglukhov joined #nim |
18:16:22 | federico3 | yep |
18:16:27 | * | M-max joined #nim |
18:17:39 | ephja | then you might get fewer bytes I think |
18:17:47 | federico3 | ...why? |
18:20:24 | * | yglukhov quit (Ping timeout: 276 seconds) |
18:20:52 | ephja | because then it's "up to n bytes" rather than "n bytes", right? |
18:22:02 | federico3 | that's the behavior of recv() |
18:26:43 | * | yglukhov joined #nim |
18:34:16 | * | yglukhov quit (Remote host closed the connection) |
18:35:00 | federico3 | uhm, the buffered behavior seems to always wait until the given size is reached or the client disconnects :-/ |
18:35:40 | * | Jesin joined #nim |
18:36:51 | * | desophos quit (Read error: Connection reset by peer) |
18:37:38 | * | Learath2 quit (Ping timeout: 252 seconds) |
18:38:09 | * | desophos joined #nim |
18:38:43 | * | g00 quit (Ping timeout: 252 seconds) |
18:38:44 | * | sarlalian quit (Ping timeout: 252 seconds) |
18:39:17 | * | gmpreussner quit (Ping timeout: 252 seconds) |
18:39:17 | * | pleiosaur quit (Ping timeout: 252 seconds) |
18:39:17 | * | ephja quit (Ping timeout: 252 seconds) |
18:39:19 | * | Vivek quit (Ping timeout: 252 seconds) |
18:39:19 | * | ldlework quit (Ping timeout: 252 seconds) |
18:39:50 | * | chrisheller quit (Ping timeout: 252 seconds) |
18:39:50 | * | lucus16 quit (Ping timeout: 252 seconds) |
18:40:08 | * | lucus16 joined #nim |
18:40:25 | * | yglukhov joined #nim |
18:41:09 | * | pleiosaur joined #nim |
18:41:50 | * | DecoPerson quit (Remote host closed the connection) |
18:42:43 | * | ephja joined #nim |
18:42:57 | * | sarlalian joined #nim |
18:44:28 | * | ldlework joined #nim |
18:44:31 | ephja | "result[i, j] += a[i, k] * b[k, j]" hm, how to implement this |
18:44:36 | * | Learath2 joined #nim |
18:44:56 | * | gmpreussner joined #nim |
18:47:15 | * | wh1t3r0s3 joined #nim |
18:47:22 | * | BitPuffin joined #nim |
18:48:08 | * | Vivek joined #nim |
18:48:49 | * | Vivek is now known as Guest59521 |
18:49:15 | ephja | ok, so what I need to do is implement "`[]`(x: T, ...): T", "`[]`(x: var T, ...): var T" and "`[]=`(x: var T, ...)" |
18:53:40 | ephja | federico3: are you using runForever? here's the implementation https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1614 |
18:55:57 | ephja | "waitFor recv()" would block for an unspecified amount of time, but nothing is blocking if you're using 'await' and then polling (async procs are transformed into callbacks) |
18:56:24 | * | enthus1ast joined #nim |
18:56:33 | ephja | try polling manually in a loop and then print, after doing "await recv" |
18:58:43 | * | yglukhov quit (Remote host closed the connection) |
18:59:14 | cheatfate | ephja, its not a very good idea to do manual poll() |
19:00:04 | cheatfate | because you can make "endless cycle" easily if you try to do poll() in callback |
19:00:25 | ephja | that's not what I meant |
19:01:19 | ephja | but rather something like "while true: poll(); echo "iteration"", in order to make it more obvious how it works |
19:01:56 | ephja | (the main loop) |
19:03:34 | ephja | anyway, I should do something with await again. I can't remember which bugs I ran into though, but nothing that couldn't be worked around I think |
19:07:00 | * | DecoPerson_ joined #nim |
19:09:29 | * | yglukhov joined #nim |
19:10:06 | * | fredrik92 joined #nim |
19:18:28 | * | enthus1ast1 joined #nim |
19:19:33 | * | enthus1ast quit (Ping timeout: 276 seconds) |
19:19:51 | * | kingofoz quit (Read error: Connection reset by peer) |
19:25:16 | dom96 | I'm currently improving Nim in Action's chapter 3, which explains async await. |
19:25:43 | dom96 | Anything you guys found particularly confusing that I should cover? |
19:28:54 | * | mat4 joined #nim |
19:28:59 | mat4 | hello |
19:31:36 | Araq_ | dom96: my personal biggest a-ha moment with async is that stmt1; stmt2 needs be transformed into stmt1(onCompletion do: stmt2) |
19:32:05 | Araq_ | in other words sequential processing needs be nested. |
19:32:14 | dom96 | Araq_: huh? that's not what happens. |
19:32:38 | Araq_ | that is what happens. |
19:32:48 | Araq_ | on the conceptual level. |
19:32:50 | dom96 | 'await stmt1; stmt2' is transformed into that |
19:33:08 | Araq_ | I wasn't talking about Nim inparticular. |
19:34:11 | Araq_ | so yeah, no 'await' statements in my pseudo-code :P |
19:34:43 | mat4 | interesting |
19:34:47 | dom96 | but, you could actually say that about every piece of procedural code. |
19:35:13 | dom96 | stmt1; stmt2 # stmt2 is executed /after/ stmt1 completes its execution |
19:35:32 | Araq_ | well it's continuations all the way down :P |
19:35:38 | dom96 | there is nothing asynchronous about this |
19:35:57 | * | chrisheller joined #nim |
19:36:40 | federico3 | dom96: the buffered behavior requires the user to know in advance how much data to read, which is quite uncommon in binary protocols |
19:38:16 | Araq_ | dom96: IMO it explains what's behind async. |
19:38:34 | dom96 | federico3: then use unbuffered sockets |
19:38:51 | federico3 | in my use case I'm doing unbuffered recv into a Stream that is the inspected by msgpack. Maybe the stream buffering should be part of asyncnet's recv to avoid copying data around |
19:39:34 | dom96 | why into a Stream? |
19:40:27 | * | Demos_ joined #nim |
19:43:03 | mat4 | I don't know if the topic is relevant to this discussion but generally, continuations allow some CPS optimizations which result in a code representation well suited for parallel processing. Because state changes are not determinable such processing is likewise asynchron |
19:44:26 | * | heinrich5991_ joined #nim |
19:45:17 | mat4 | (as long as side effects can't be excluded) |
19:46:14 | ephja | federico3: yes, but only if it's not zero-terminated |
19:46:57 | ephja | otherwise you can recv the header size with a buffered socket, and then extract the length and recv again |
19:48:24 | * | Guest59521 quit (*.net *.split) |
19:48:24 | * | pleiosaur quit (*.net *.split) |
19:48:25 | * | GangstaCat quit (*.net *.split) |
19:48:25 | * | Demos quit (*.net *.split) |
19:48:26 | * | dthrvr quit (*.net *.split) |
19:48:26 | * | federico3 quit (*.net *.split) |
19:48:27 | * | jeffc_ quit (*.net *.split) |
19:48:27 | * | Arrrr quit (*.net *.split) |
19:48:27 | * | Gonzih quit (*.net *.split) |
19:48:29 | * | thotypous quit (*.net *.split) |
19:48:30 | * | heinrich5991 quit (*.net *.split) |
19:48:33 | * | \u quit (*.net *.split) |
19:48:34 | * | heinrich5991_ is now known as heinrich5991 |
19:49:00 | * | M-Quora joined #nim |
19:49:15 | dom96 | what ephja said. |
19:49:37 | * | Trustable joined #nim |
19:49:45 | dom96 | Protocols usually specify some sort of character which is used as a message separator. |
19:50:14 | dom96 | or a header which is of a known length which will tell you how many bytes to read |
19:50:36 | dom96 | buffered sockets are perfectly suited to reading both kinds of protocols |
19:51:35 | * | Arrrr_ joined #nim |
19:53:37 | * | Vivek joined #nim |
19:54:01 | * | Vivek is now known as Guest84824 |
19:57:25 | * | Matias joined #nim |
19:58:00 | * | Matias is now known as thotypous |
19:58:28 | * | Guest59521 joined #nim |
19:58:28 | * | pleiosaur joined #nim |
19:58:28 | * | GangstaCat joined #nim |
19:58:28 | * | dthrvr joined #nim |
19:58:28 | * | federico3 joined #nim |
19:58:28 | * | jeffc_ joined #nim |
19:58:28 | * | Arrrr joined #nim |
19:58:28 | * | Gonzih joined #nim |
19:58:28 | * | \u joined #nim |
19:58:30 | * | pleiosau1 joined #nim |
20:04:32 | * | Guest59521 quit (*.net *.split) |
20:04:32 | * | pleiosaur quit (*.net *.split) |
20:04:33 | * | GangstaCat quit (*.net *.split) |
20:04:34 | * | dthrvr quit (*.net *.split) |
20:04:34 | * | federico3 quit (*.net *.split) |
20:04:35 | * | jeffc_ quit (*.net *.split) |
20:04:35 | * | Arrrr quit (*.net *.split) |
20:04:35 | * | Gonzih quit (*.net *.split) |
20:04:40 | * | \u quit (*.net *.split) |
20:06:22 | * | AckZ quit (Ping timeout: 248 seconds) |
20:08:10 | * | AckZ joined #nim |
20:10:53 | * | AnonCat joined #nim |
20:11:54 | * | GangstaCat joined #nim |
20:11:54 | * | dthrvr joined #nim |
20:11:54 | * | federico3 joined #nim |
20:11:54 | * | jeffc_ joined #nim |
20:11:59 | * | ray joined #nim |
20:11:59 | * | GangstaCat quit (Ping timeout: 240 seconds) |
20:13:10 | * | ray is now known as Guest42172 |
20:13:39 | * | jeffc joined #nim |
20:15:34 | * | federico3 quit (Ping timeout: 240 seconds) |
20:16:03 | * | Guest42172 quit (Ping timeout: 240 seconds) |
20:16:04 | * | dthrvr quit (Ping timeout: 240 seconds) |
20:16:04 | * | jeffc_ quit (Ping timeout: 240 seconds) |
20:16:11 | * | mat4 quit (Quit: Leaving) |
20:17:14 | cheatfate | dom96, current async implementation not for your book, imho |
20:18:28 | dom96 | why? |
20:20:51 | * | ray_ joined #nim |
20:20:52 | cheatfate | dom96, you know why? because there no "cancel", because you can't "try:except" in {.async.}, and i think it also misses call_soon and call_at |
20:21:25 | dom96 | cheatfate: ahh, so I should stop writing my book and implement those things *right now* huh? |
20:22:02 | cheatfate | dom96, of course NO!!! |
20:22:10 | dom96 | All of those things can be fixed/implemented in the future, so I don't see the problem. |
20:22:22 | cheatfate | dom96, then information in book will be expired... |
20:22:38 | dom96 | cheatfate: it certainly won't |
20:23:28 | dom96 | "cancel" is not essential, "try: except" works well enough, and `call_soon` and `call_at` is also not essential. |
20:24:49 | cheatfate | ok, what about asynchrounous handling of signals, processes, timers? |
20:25:10 | cheatfate | pipes |
20:25:53 | dom96 | that goes beyond the fundamentals of async I/O |
20:26:31 | dom96 | A whole book of its own could be written about async I/O. |
20:26:47 | dom96 | In my book I focus on async sockets. |
20:28:42 | * | dthrvr joined #nim |
20:28:53 | * | federico3 joined #nim |
20:30:39 | * | Arrrr_ quit (Quit: WeeChat 1.4) |
20:34:10 | cheatfate | \ |
20:34:24 | cheatfate | Is it possible to run tests on windows without sqlite3_64.dll? |
20:34:41 | cheatfate | dom96, i want to run tests on asyncfile.nim |
20:34:59 | cheatfate | is it possible to do without sqlite? |
20:35:14 | dom96 | cheatfate: don't think so. |
20:35:39 | dom96 | Araq loves his sqlite databases :P |
20:36:59 | * | brson_ joined #nim |
20:37:07 | Araq_ | I would build my OS on top of a database abstraction. |
20:37:15 | Araq_ | not sure if that can work out. |
20:37:19 | cheatfate | its funny because sqlite3_64.dll not exists in default sqlite for windows |
20:37:21 | Araq_ | but it's worth a try. |
20:37:26 | fredrik92 | Araq, NICE1! :D |
20:37:32 | gokr | Was reading a bit above here and... is "cast[ptr int16](s[0].addr)[]" really the best way to get an int16 from a string? Looks awful. |
20:37:47 | cheatfate | Araq_, BeOS FS was built on top of database abstraction |
20:38:03 | * | desophos_ joined #nim |
20:38:06 | ephja | gokr: I did suggest streams |
20:38:24 | cheatfate | Araq_, but somebody needs to patch places about sqlite3_64.dll must be sqlite3.dll |
20:38:30 | Araq_ | cheatfate: yeah but I would also use (temp) tables for interprocess communications |
20:38:33 | gokr | ephja: Yeah... I hope it's cleaner. |
20:38:55 | ephja | that's the way to do it using only the system module |
20:39:01 | cheatfate | Araq_, lol |
20:39:34 | fredrik92 | according to MSDN Windows actually uses a lot of databases internally here and there... though most of these are not quite RDMS, or sth. like that... |
20:40:24 | cheatfate | so windows tests is broken... |
20:40:38 | Araq_ | cheatfate: no, get the DLL that we ship with the windows installer |
20:41:04 | * | Pisuke joined #nim |
20:41:43 | * | zama_ joined #nim |
20:41:44 | * | Vivek___ joined #nim |
20:42:54 | * | Demos joined #nim |
20:43:28 | gokr | I am focusing Spry (my own little lang) around Sophia, it seems darn awesome (http://sphia.org). The idea is to take the "image model" of Smalltalk into the 21st century by backing it with a fast embedded db. |
20:44:42 | * | ldleworker joined #nim |
20:45:06 | gokr | (I just made a wrapper for it btw, its "sophia" in nimble) |
20:47:08 | * | Guest84824 quit (*.net *.split) |
20:47:08 | * | heinrich5991 quit (*.net *.split) |
20:47:08 | * | Demos_ quit (*.net *.split) |
20:47:09 | * | BitPuffin quit (*.net *.split) |
20:47:09 | * | ldlework quit (*.net *.split) |
20:47:09 | * | desophos quit (*.net *.split) |
20:47:10 | * | brson quit (*.net *.split) |
20:47:10 | * | PMunch quit (*.net *.split) |
20:47:11 | * | saml quit (*.net *.split) |
20:47:12 | * | emery quit (*.net *.split) |
20:47:12 | * | elrood quit (*.net *.split) |
20:47:14 | * | zama quit (*.net *.split) |
20:47:15 | * | MyMind quit (*.net *.split) |
20:47:18 | * | _stowa quit (*.net *.split) |
20:47:20 | * | Amun_Ra quit (*.net *.split) |
20:47:24 | cheatfate | dom96, tasyncfile.nim test was passed |
20:47:46 | * | _stowa_ joined #nim |
20:47:50 | dom96 | good :) |
20:50:04 | * | yglukhov quit (Remote host closed the connection) |
20:50:30 | * | desophos_ is now known as desophos |
20:51:02 | * | zama_ quit (Changing host) |
20:51:02 | * | zama_ joined #nim |
20:51:10 | * | zama_ is now known as zama |
20:51:11 | * | AnonCat is now known as GangstaCat |
20:51:39 | * | emery joined #nim |
20:53:25 | * | saml joined #nim |
20:53:30 | * | heinrich5991 joined #nim |
20:54:04 | * | PMunch joined #nim |
20:54:39 | * | elrood joined #nim |
20:54:58 | * | Gonzih joined #nim |
20:57:19 | * | Amun_Ra joined #nim |
20:58:34 | * | GangstaCat quit (Ping timeout: 244 seconds) |
20:58:58 | * | GangstaCat joined #nim |
21:06:22 | dom96 | Chapter 5 of Nim in Action is now live :) |
21:06:48 | * | _stowa_ is now known as _stowa |
21:07:43 | federico3 | dom96: you should hand out books as rewards for big enough donations |
21:09:27 | elrood | just donate 40 or 50 bucks to manning |
21:09:46 | dom96 | federico3: I guess I could, but would be a bit weird. |
21:10:04 | * | Demon_Fox joined #nim |
21:10:43 | federico3 | it's not uncommon to do rewards for donations |
21:12:30 | ephja | good ol' psychology |
21:12:38 | elrood | well technically, if you receive a reward in return its no longer a donation. but as said, for a donation of $40 you should be in the game ;) |
21:13:16 | ephja | speaking of which, don't forget the $x9.99 price scheme |
21:13:51 | elrood | probably the publisher wouldn't be too thrilled if books were given away by the author especially for such a niche audience |
21:14:57 | elrood | we could always proofread though, of course ;) |
21:17:33 | ephja | generics taking either var or non-var would be nice |
21:17:39 | * | enthus1ast joined #nim |
21:18:59 | ephja | "proc `x=`*(v: var Vec, val: v.T)" v.x += x won't work. instead you need to have two overloads of 'x' |
21:19:02 | * | enthus1ast1 quit (Ping timeout: 250 seconds) |
21:19:52 | ephja | thought I shouldn't have used an array for the elements |
21:19:55 | ephja | *though |
21:20:52 | ephja | Yet Another Linalg Lib |
21:28:12 | dom96 | what was the URL of that site that let you search nimble packages? |
21:28:38 | dom96 | federico3: it would be far too much effort to organise such a reward. |
21:29:05 | dom96 | would need to sign some sort of agreement with my publisher, assuming that they would even be willing to allow something like this. |
21:35:03 | elrood | dom96, nimble-explorer.com ? |
21:35:16 | dom96 | ahh |
21:35:17 | dom96 | thanks |
21:40:40 | * | sarlalian quit (Ping timeout: 264 seconds) |
21:41:16 | * | dthrvr quit (Ping timeout: 264 seconds) |
21:41:16 | * | pleiosau1 quit (Ping timeout: 264 seconds) |
21:41:52 | * | emery quit (Ping timeout: 264 seconds) |
21:41:52 | * | Vivek___ quit (Ping timeout: 264 seconds) |
21:41:53 | * | wh1t3r0s3 quit (Ping timeout: 264 seconds) |
21:41:54 | * | silven quit (Ping timeout: 264 seconds) |
21:42:31 | * | pleiosaur joined #nim |
21:44:41 | * | roose joined #nim |
21:45:05 | * | silven joined #nim |
21:45:48 | * | sarlalian joined #nim |
21:46:19 | * | boop is now known as boopisaway |
21:46:57 | * | wh1t3r0s3 joined #nim |
21:49:31 | federico3 | .org? |
21:50:05 | * | pregressive quit (Remote host closed the connection) |
21:50:24 | * | Vivek joined #nim |
21:50:48 | * | Vivek is now known as Guest18995 |
21:50:51 | * | Trustable quit (Remote host closed the connection) |
21:54:25 | * | dthrvr joined #nim |
21:55:36 | * | roose quit (Quit: Page closed) |
21:57:04 | * | emery joined #nim |
21:57:27 | * | thotypous left #nim ("WeeChat 1.4") |
21:58:21 | * | silven quit (Ping timeout: 248 seconds) |
22:00:33 | * | silven joined #nim |
22:04:39 | * | BitPuffin|osx quit (Ping timeout: 276 seconds) |
22:09:34 | * | Learath2 quit (Ping timeout: 248 seconds) |
22:10:50 | * | Learath2 joined #nim |
22:16:36 | cncl | i'm trying emacs after having not used it for a few years. i'm also trying nim-mode |
22:16:39 | * | gorgonzolapasta quit (Ping timeout: 264 seconds) |
22:16:49 | cncl | it does a very annoying thing sometimes when i'm editing, but i can't figure out what feature it is or how to disable it |
22:16:51 | * | gorgonzolapasta joined #nim |
22:17:15 | cncl | for example, if i type 'case foo' then insert a newline, then write 'of bar:' |
22:17:35 | cncl | after typing the : it will re-indent the next line in the code body, even if it already existed before i started putting in the case statements |
22:17:54 | cncl | and it will break the code because it indented that line for no reason. it didn't need to be pushed up an indentation level. i have no idea how to disable this and i can't find it :( |
22:18:18 | reactormonk | cncl, https://github.com/nim-lang/nim-mode/tree/master/tests/indents/SMIE |
22:18:25 | reactormonk | ... if the indentation is faulty, submit a test. |
22:19:30 | cncl | ah |
22:19:31 | reactormonk | nim-mode uses SMIE for the indenting. |
22:19:39 | cncl | i'm using 'spacemacs' which my friend recommended |
22:19:44 | cncl | it seems good but does a ton of stuff out of the box |
22:19:49 | cncl | and it's hard to tell what is doing what |
22:20:09 | cncl | i used to use some nasty cobbled together vimpulse stuff of my own a few years ago to get vim-like editing in emacs |
22:20:23 | reactormonk | take a look at the nim layer |
22:20:28 | cncl | i'm using it |
22:21:14 | reactormonk | yeah, on what it does. |
22:21:22 | cncl | reactormonk: the problem is that the indentation is "correct" from the perspect of, given these tokens, what is the only syntactically correct way to indent this nim code |
22:21:30 | cncl | the problem is that i'm in the middle of editing it and i don't want it to change it like that |
22:21:37 | cncl | let me show you, one second |
22:21:38 | reactormonk | well... not sure |
22:22:18 | reactormonk | Maybe there's something that makes SMIE take a break? |
22:23:26 | cncl | let me see if you are even experiencing the same thing that is happening to me |
22:23:29 | cncl | because you might not be |
22:23:52 | cncl | https://gist.github.com/randrew/00b11ca960abfb7d68a52a049558b8b3 |
22:24:11 | cncl | after the of 3: x = 4 |
22:24:18 | cncl | add an else: x = 5 or something |
22:24:23 | cncl | but after you type else: |
22:24:32 | cncl | it will push the indentation of echo ... up |
22:24:39 | cncl | as soon as the colon is typed |
22:24:48 | reactormonk | hm. You'd want it after the enter? |
22:25:06 | reactormonk | Put up an issue, no idea :-( |
22:25:36 | cncl | actually i guess i just want to disable it |
22:25:39 | cncl | haha |
22:25:44 | cncl | i don't really need the auto indentation |
22:26:00 | cncl | i'd rather not ask for features that are basically disabling what other people think is useful |
22:26:09 | cncl | i mean |
22:26:29 | cncl | i'm trying to figure out how to disable indentation features in nim-mode. pretty much i just want the checking and syntax coloring and symbol jumping |
22:30:39 | cncl | reactormonk: i guess this is a silly question, is there a way to disable the indenting stuff? |
22:30:45 | cncl | i can't figure it out haha :( |
22:33:20 | * | aziz quit (Remote host closed the connection) |
22:41:07 | cncl | is there no way to do it? |
22:47:22 | * | ephja quit (Ping timeout: 260 seconds) |
22:52:10 | * | Matthias247 joined #nim |
22:52:12 | * | enthus1ast quit (Read error: Connection reset by peer) |
22:59:13 | * | ephja joined #nim |
23:00:49 | * | darkf joined #nim |
23:03:34 | cncl | seems that adding a hook to set buffer-local indent-line-function variable to indent-relative works |
23:06:25 | * | enthus1ast joined #nim |
23:12:36 | * | elrood quit (Quit: Leaving) |
23:19:37 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:26:42 | * | fredrik92 quit (Quit: Good Night! :)) |
23:28:09 | * | jivank joined #nim |
23:29:38 | jivank | dom96: for jester issue 59, do you want me to do a pull request of behalf of shawnye |
23:36:40 | Araq_ | jivank: dom96 is likely asleep, but I'm sure he appreciates every PR ;-) |
23:50:38 | jivank | Araq_: i am just learning nim and it would be my first pull request, so i feel i am entering dangerous territory :) |
23:53:24 | * | darkf_ joined #nim |
23:55:24 | * | darkf quit (Ping timeout: 260 seconds) |