<< 13-04-2016 >>

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:13cheatfateIs 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:33kingofozhello
08:38:45kingofozany Nim developer here?
08:39:09Xeclarify?
08:39:49kingofozwant to know when 1.0 will be released
08:40:54XeAFAIK it is more of a "when it's ready" thing
08:41:16kingofozok
08:41:40kingofozhow many developers does Nim have?
08:41:56Xelike the core language itself?
08:42:11kingofozyes
08:42:54*Demon_Fox quit (Quit: Leaving)
08:44:53ArrrrNoone knows for sure, however there are certain rumors
08:47:08kingofozwhat are the rumers?
08:50:43ArrrrWell, they say there is only one developer, but he made up fake identities to hide this fact.
08:51:03ArrrrBut if you ask me, that's nonsense. How would only one developer build all nim?
08:51:49fredrik92so Arrrr, you're not Araq then? :P
08:52:27Arrrrhaha *sweat*. I don't even contribute
08:52:34kingofozwow, this rumor is amazing
08:53:14kingofozdoes anybody use nim to write games?
08:53:34Araqkingofoz: you can buy commercial support from Metatexx fwiw
08:57:37ArrrrI'd say half of the people using nim are doing videogames
08:58:10Arrrrjust to throw some inaccurate numbers
08:58:53ArrrrNim provides a realtime GC, and i think there is a better GC in the way
09:01:42kingofozok
09:01:52kingofozby the way, what is Metatexx fwiw?
09:02:24gokrFWIW = For What It's Worth
09:02:59gokrArrrr: I would guess "half" is... not true. But yeah, there are several.
09:03:13kingofozok
09:03:24gokrkingofoz: What's your interest more specifically? Making games?
09:04:05fredrik92E.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:13kingofozmaybe, gokr
09:05:28kingofozI know a little about libgdx
09:05:38kingofozit is a game framework by Java/C/C++
09:05:55CcxCZI'd be pondering 7drl … if I actually had 7 days to work on it.
09:06:00gokrkingofoz: Me and Araq made a pretty cool wrapper of Urho3D a while back: https://github.com/3dicc/Urhonimo
09:06:38gokrUrho3D is a very nice and complete 3D game engine, and there are samples in there in Nim.
09:07:15kingofozI am looking it
09:07:18kingofozawesome
09:07:32kingofozcan it work on Android?
09:08:03gokrYes, here is a movie demonstrating the character.nim sample: https://www.youtube.com/watch?v=-T0MrJkLB8Y
09:08:18Araqgokr: did you ever update the wrapper to latest Urho?
09:08:26gokrNope, didn't. We should.
09:08:32Araqstill have the code
09:08:44gokrI might get to that point eventually because... I would like to use Spry with Urhonimo :)
09:08:51gokrOh, good!
09:09:19kingofozamazing, you guys are both developers of Nim?
09:10:17gokrWell, Araq is the author of Nim, I am just a ... decent developer. :)
09:11:18gokrIf 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:51kingofozI guess so
09:11:57gokrkingofoz: If you search youtube for Urho3D you can find much more stuff showing its capabilities.
09:11:58kingofozC++ is pretty terrible!
09:12:14kingofozNim can work on Android, right?
09:13:28gokrNim compiles via C/C++ so there is no difference really from using C++ directly - when it comes to choices of deployment.
09:14:07kingofozI see
09:14:26kingofozAraq is Andreas Rumpf, right?
09:14:31gokryup
09:17:04reactormonkIs the nim VM multithreaded?
09:17:49Araqreactormonk: lol
09:17:52kingofozwow, I just talked with big god of Nim
09:18:22reactormonkAraq, I guess that's a no ^^
09:19:30kingofozI guess Nim has no VM?
09:19:45reactormonkkingofoz, no it does, for macros etc.
09:20:44gokrThe VM is primarily for macro execution during compilation, but lately also for nimscripts. It's not intended as a primary runtime target.
09:21:41kingofozno vm during running?
09:22:19ArrrrNim generates c code, doesn't work like an interpreted language
09:25:28gokrRight, 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:07gokrOr of course XCode or VCC or whatever compiler you have.
09:27:09gokrThis is IMHO one of the great advantages of Nim compared to many other alternatives - the deployment options are almost 100% open.
09:27:55gokrAnd integrating with the C/C++ eco systems is easy.
09:32:41kingofozindeed
09:32:53kingofozkeep going gokr
09:33:19kingofozI hope someday I can also contribute code to Nim
09:34:06reactormonkkingofoz, 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:30kingofozsure
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:08fredrik92hehe, 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:04urbankis there a standard way to do partial function application?
10:09:35urbankhm... 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:59Araq_urbank: I show how to do it via a macro in my NimConf talk
10:24:36Araq_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:50urbankAraq_: 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:01gokrHmmm, I thought nimble was pulling packages.json from github... but... no?
11:28:17*fredrik92 quit (Read error: Connection reset by peer)
11:34:34gokrdom96: 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:37veganskawayHi! 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:37dom96gokr: we had a long conversation about this a day or so ago.
11:36:44gokrOh :)
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:37Araq_vegansk: hmmm, maybe I assumed 'staticExec' would work
11:41:34*wh1t3r0s3 joined #nim
11:41:48*niv joined #nim
11:42:11veganskAraq_, 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:03Araq_vegansk: likewise your readfile is just staticRead
11:45:08Araq_I think.
11:47:55veganskAraq_, 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:42yglukhov_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:17dom96yglukhov_: I think 'nimble update' will do that or something similar
12:33:49yglukhov_ok, ill ask some questions on github.
12:35:05*PMunch joined #nim
12:45:12nivcan i not do cast[int16]("\x00\x01") to interpret a binary value as int?
12:45:27nivgives me random numbers and im confused
12:48:26*tankfeeder quit (Quit: Leaving)
13:00:24enthus1astecho cast[int16](0x01 + 0x01) works for me
13:00:53enthus1ast@niv ^
13:01:11nivmm, 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:49Salewskiniv, 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:25SalewskiAnd, does that cast makes sense at all for a constant string? Maybe you just want 0x0001 ?
13:19:45enthus1astniv: or parseHex from parseutils maybe?
13:20:14ephjaSalewski: that's correct
13:20:32nivSalewski: 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:06ephjawell, the header
13:21:38ephjaI think he meant [0].addr
13:22:39ephjacast[ptr int16]("\x00\x01"[0].addr)[]?
13:22:42ephjahttp://nim-lang.org/docs/streams.html
13:23:27nivthe 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:05niv[]ing the cast doesnt work either
13:25:59nivapparently, str[0] makes a copy, it doesnt actually point at the original string
13:26:17ephjadid you forget 'addr'?
13:26:38nivmyval = cast[uint16](lenstr[0].addr[])
13:26:50nivis always 0 for a lenstr of "\x00\xAE"
13:27:58ephjathe dereference should go after the closing parenthesis
13:28:17nivthat throws a could not resolve error at me :)
13:29:04ephjavar s = "\x00\x01"; echo cast[ptr int16](s[0].addr)[]
13:29:54nivd'oh
13:30:33nivthanks.
13:30:36ephjathen all that remains is possibly some endian operations in order to make it portable
13:30:38ephjanp
13:30:56nivyeah, 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:20SentreenIs 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:22ArrrrThat'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:25SentreenCan 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:32SentreenOr is it purely intended for compiler flags and should I stick to makefiles for more "advanced" stuff?
15:21:37ArrrrIf you want more advanced stuff, you probably need nimscripts, which allow you to specify a certain configuration for every task you define
15:23:01SentreenThat 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:03Xewhat 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:04reactormonkTrying to tinker with monoids - any way to get the zero working? https://gist.github.com/fb4f4f588b5424554ad505e661fc3bff
17:58:08federico3something 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:12ephjawhy does it look odd?
18:08:48federico3recv() 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:13ephjafederico3: is the socket unbuffered?
18:12:18*desophos joined #nim
18:15:31*yglukhov joined #nim
18:16:22federico3yep
18:16:27*M-max joined #nim
18:17:39ephjathen you might get fewer bytes I think
18:17:47federico3...why?
18:20:24*yglukhov quit (Ping timeout: 276 seconds)
18:20:52ephjabecause then it's "up to n bytes" rather than "n bytes", right?
18:22:02federico3that's the behavior of recv()
18:26:43*yglukhov joined #nim
18:34:16*yglukhov quit (Remote host closed the connection)
18:35:00federico3uhm, 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:31ephja"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:15ephjaok, so what I need to do is implement "`[]`(x: T, ...): T", "`[]`(x: var T, ...): var T" and "`[]=`(x: var T, ...)"
18:53:40ephjafederico3: are you using runForever? here's the implementation https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1614
18:55:57ephja"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:33ephjatry polling manually in a loop and then print, after doing "await recv"
18:58:43*yglukhov quit (Remote host closed the connection)
18:59:14cheatfateephja, its not a very good idea to do manual poll()
19:00:04cheatfatebecause you can make "endless cycle" easily if you try to do poll() in callback
19:00:25ephjathat's not what I meant
19:01:19ephjabut rather something like "while true: poll(); echo "iteration"", in order to make it more obvious how it works
19:01:56ephja(the main loop)
19:03:34ephjaanyway, 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:16dom96I'm currently improving Nim in Action's chapter 3, which explains async await.
19:25:43dom96Anything you guys found particularly confusing that I should cover?
19:28:54*mat4 joined #nim
19:28:59mat4hello
19:31:36Araq_dom96: my personal biggest a-ha moment with async is that stmt1; stmt2 needs be transformed into stmt1(onCompletion do: stmt2)
19:32:05Araq_in other words sequential processing needs be nested.
19:32:14dom96Araq_: huh? that's not what happens.
19:32:38Araq_that is what happens.
19:32:48Araq_on the conceptual level.
19:32:50dom96'await stmt1; stmt2' is transformed into that
19:33:08Araq_I wasn't talking about Nim inparticular.
19:34:11Araq_so yeah, no 'await' statements in my pseudo-code :P
19:34:43mat4interesting
19:34:47dom96but, you could actually say that about every piece of procedural code.
19:35:13dom96stmt1; stmt2 # stmt2 is executed /after/ stmt1 completes its execution
19:35:32Araq_well it's continuations all the way down :P
19:35:38dom96there is nothing asynchronous about this
19:35:57*chrisheller joined #nim
19:36:40federico3dom96: the buffered behavior requires the user to know in advance how much data to read, which is quite uncommon in binary protocols
19:38:16Araq_dom96: IMO it explains what's behind async.
19:38:34dom96federico3: then use unbuffered sockets
19:38:51federico3in 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:34dom96why into a Stream?
19:40:27*Demos_ joined #nim
19:43:03mat4I 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:17mat4(as long as side effects can't be excluded)
19:46:14ephjafederico3: yes, but only if it's not zero-terminated
19:46:57ephjaotherwise 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:15dom96what ephja said.
19:49:37*Trustable joined #nim
19:49:45dom96Protocols usually specify some sort of character which is used as a message separator.
19:50:14dom96or a header which is of a known length which will tell you how many bytes to read
19:50:36dom96buffered 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:14cheatfatedom96, current async implementation not for your book, imho
20:18:28dom96why?
20:20:51*ray_ joined #nim
20:20:52cheatfatedom96, 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:25dom96cheatfate: ahh, so I should stop writing my book and implement those things *right now* huh?
20:22:02cheatfatedom96, of course NO!!!
20:22:10dom96All of those things can be fixed/implemented in the future, so I don't see the problem.
20:22:22cheatfatedom96, then information in book will be expired...
20:22:38dom96cheatfate: it certainly won't
20:23:28dom96"cancel" is not essential, "try: except" works well enough, and `call_soon` and `call_at` is also not essential.
20:24:49cheatfateok, what about asynchrounous handling of signals, processes, timers?
20:25:10cheatfatepipes
20:25:53dom96that goes beyond the fundamentals of async I/O
20:26:31dom96A whole book of its own could be written about async I/O.
20:26:47dom96In 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:10cheatfate\
20:34:24cheatfateIs it possible to run tests on windows without sqlite3_64.dll?
20:34:41cheatfatedom96, i want to run tests on asyncfile.nim
20:34:59cheatfateis it possible to do without sqlite?
20:35:14dom96cheatfate: don't think so.
20:35:39dom96Araq loves his sqlite databases :P
20:36:59*brson_ joined #nim
20:37:07Araq_I would build my OS on top of a database abstraction.
20:37:15Araq_not sure if that can work out.
20:37:19cheatfateits funny because sqlite3_64.dll not exists in default sqlite for windows
20:37:21Araq_but it's worth a try.
20:37:26fredrik92Araq, NICE1! :D
20:37:32gokrWas 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:47cheatfateAraq_, BeOS FS was built on top of database abstraction
20:38:03*desophos_ joined #nim
20:38:06ephjagokr: I did suggest streams
20:38:24cheatfateAraq_, but somebody needs to patch places about sqlite3_64.dll must be sqlite3.dll
20:38:30Araq_cheatfate: yeah but I would also use (temp) tables for interprocess communications
20:38:33gokrephja: Yeah... I hope it's cleaner.
20:38:55ephjathat's the way to do it using only the system module
20:39:01cheatfateAraq_, lol
20:39:34fredrik92according 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:24cheatfateso windows tests is broken...
20:40:38Araq_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:28gokrI 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:06gokr(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:24cheatfatedom96, tasyncfile.nim test was passed
20:47:46*_stowa_ joined #nim
20:47:50dom96good :)
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:22dom96Chapter 5 of Nim in Action is now live :)
21:06:48*_stowa_ is now known as _stowa
21:07:43federico3dom96: you should hand out books as rewards for big enough donations
21:09:27elroodjust donate 40 or 50 bucks to manning
21:09:46dom96federico3: I guess I could, but would be a bit weird.
21:10:04*Demon_Fox joined #nim
21:10:43federico3it's not uncommon to do rewards for donations
21:12:30ephjagood ol' psychology
21:12:38elroodwell 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:16ephjaspeaking of which, don't forget the $x9.99 price scheme
21:13:51elroodprobably the publisher wouldn't be too thrilled if books were given away by the author especially for such a niche audience
21:14:57elroodwe could always proofread though, of course ;)
21:17:33ephjagenerics taking either var or non-var would be nice
21:17:39*enthus1ast joined #nim
21:18:59ephja"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:52ephjathought I shouldn't have used an array for the elements
21:19:55ephja*though
21:20:52ephjaYet Another Linalg Lib
21:28:12dom96what was the URL of that site that let you search nimble packages?
21:28:38dom96federico3: it would be far too much effort to organise such a reward.
21:29:05dom96would need to sign some sort of agreement with my publisher, assuming that they would even be willing to allow something like this.
21:35:03elrooddom96, nimble-explorer.com ?
21:35:16dom96ahh
21:35:17dom96thanks
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:31federico3 .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:36cncli'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:49cnclit 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:15cnclfor example, if i type 'case foo' then insert a newline, then write 'of bar:'
22:17:35cnclafter 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:54cncland 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:18reactormonkcncl, https://github.com/nim-lang/nim-mode/tree/master/tests/indents/SMIE
22:18:25reactormonk... if the indentation is faulty, submit a test.
22:19:30cnclah
22:19:31reactormonknim-mode uses SMIE for the indenting.
22:19:39cncli'm using 'spacemacs' which my friend recommended
22:19:44cnclit seems good but does a ton of stuff out of the box
22:19:49cncland it's hard to tell what is doing what
22:20:09cncli 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:23reactormonktake a look at the nim layer
22:20:28cncli'm using it
22:21:14reactormonkyeah, on what it does.
22:21:22cnclreactormonk: 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:30cnclthe problem is that i'm in the middle of editing it and i don't want it to change it like that
22:21:37cncllet me show you, one second
22:21:38reactormonkwell... not sure
22:22:18reactormonkMaybe there's something that makes SMIE take a break?
22:23:26cncllet me see if you are even experiencing the same thing that is happening to me
22:23:29cnclbecause you might not be
22:23:52cnclhttps://gist.github.com/randrew/00b11ca960abfb7d68a52a049558b8b3
22:24:11cnclafter the of 3: x = 4
22:24:18cncladd an else: x = 5 or something
22:24:23cnclbut after you type else:
22:24:32cnclit will push the indentation of echo ... up
22:24:39cnclas soon as the colon is typed
22:24:48reactormonkhm. You'd want it after the enter?
22:25:06reactormonkPut up an issue, no idea :-(
22:25:36cnclactually i guess i just want to disable it
22:25:39cnclhaha
22:25:44cncli don't really need the auto indentation
22:26:00cncli'd rather not ask for features that are basically disabling what other people think is useful
22:26:09cncli mean
22:26:29cncli'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:39cnclreactormonk: i guess this is a silly question, is there a way to disable the indenting stuff?
22:30:45cncli can't figure it out haha :(
22:33:20*aziz quit (Remote host closed the connection)
22:41:07cnclis 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:34cnclseems 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:38jivankdom96: for jester issue 59, do you want me to do a pull request of behalf of shawnye
23:36:40Araq_jivank: dom96 is likely asleep, but I'm sure he appreciates every PR ;-)
23:50:38jivankAraq_: 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)