<< 14-04-2016 >>

00:05:56*krux02 joined #nim
00:10:17*krux02 quit (Client Quit)
00:18:27*krux02 joined #nim
00:21:40*jivank quit (Quit: Page closed)
00:25:15*darkf_ is now known as darkf
00:48:14*krux02 quit (Remote host closed the connection)
00:52:35*pregressive joined #nim
00:53:13*pregressive quit (Read error: Connection reset by peer)
00:53:40*pregressive joined #nim
00:58:51*pregressive quit (Ping timeout: 276 seconds)
01:05:59*brson_ quit (Ping timeout: 260 seconds)
01:07:36*darkf_ joined #nim
01:10:53*darkf quit (Ping timeout: 248 seconds)
01:13:47*gokr quit (Ping timeout: 260 seconds)
01:15:15*darkf_ is now known as darkf
01:16:24*ephja quit (Ping timeout: 244 seconds)
01:31:30*vendethiel- joined #nim
01:32:56*vendethiel quit (Ping timeout: 244 seconds)
02:00:56*kingofoz joined #nim
02:26:49*PMunch quit (Quit: leaving)
02:52:20*nsf quit (Quit: WeeChat 1.4)
03:22:57*izi joined #nim
03:54:05*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
04:30:24*M-max1 joined #nim
04:30:30*Amrykid2 joined #nim
04:30:54*M-max quit (Ping timeout: 276 seconds)
04:30:55*Amrykid quit (Ping timeout: 276 seconds)
04:30:55*dom96 quit (Ping timeout: 276 seconds)
04:30:56*huonw quit (Ping timeout: 276 seconds)
04:30:56*askatasuna quit (Ping timeout: 276 seconds)
04:31:24*dthrvr quit (Ping timeout: 276 seconds)
04:31:25*Jesin quit (Ping timeout: 276 seconds)
04:31:27*nim-buildbot_ quit (Ping timeout: 276 seconds)
04:31:52*dthrvr joined #nim
04:32:04*boopisaway quit (Ping timeout: 276 seconds)
04:32:31*boopisaway joined #nim
04:32:36*askatasuna joined #nim
04:34:05*lqdc joined #nim
04:34:27*Jesin joined #nim
04:35:00*dom96 joined #nim
04:35:42*huonw joined #nim
04:45:34*lqdc quit (Remote host closed the connection)
04:48:44*endragor joined #nim
05:54:22*Demos quit (Ping timeout: 244 seconds)
06:03:00*delian66_ joined #nim
06:03:37*regtools_ joined #nim
06:04:10*jck_ joined #nim
06:05:12*sarlalian_ joined #nim
06:07:27*huonw_ joined #nim
06:07:27*themagician joined #nim
06:08:43*huonw quit (*.net *.split)
06:08:45*kingofoz quit (*.net *.split)
06:08:45*darkf quit (*.net *.split)
06:08:46*sarlalian quit (*.net *.split)
06:08:49*DecoPerson_ quit (*.net *.split)
06:08:49*M-Quora quit (*.net *.split)
06:08:51*themagician_h quit (*.net *.split)
06:08:58*zxtx quit (*.net *.split)
06:09:01*jck quit (*.net *.split)
06:09:02*delian66 quit (*.net *.split)
06:09:02*cnu- quit (*.net *.split)
06:09:02*regtools quit (*.net *.split)
06:09:41*kingofoz joined #nim
06:09:43*M-Quora joined #nim
06:14:04*ldleworker quit (Quit: co'o ro pendo be mi)
06:15:11*ldlework joined #nim
06:17:29*endragor_ joined #nim
06:21:34*endragor quit (Ping timeout: 260 seconds)
06:23:50*ray_ quit (Changing host)
06:23:50*ray_ joined #nim
06:23:54*ray_ is now known as \u
06:27:02*darkf joined #nim
06:32:07*endragor_ quit (Read error: Connection reset by peer)
06:32:13*endragor joined #nim
06:46:22*Quora quit (Remote host closed the connection)
06:47:50*Heartmender joined #nim
06:47:54*Heartmender quit (Changing host)
06:47:54*Heartmender joined #nim
06:47:54*Heartmender quit (Changing host)
06:47:54*Heartmender joined #nim
07:04:54*DecoPerson_ joined #nim
07:10:35*yuta joined #nim
07:13:13*gokr joined #nim
07:14:15*krux02 joined #nim
07:15:25yutacncl: to turn off auto indenting for ":" key set:
07:15:30yuta(define-key nim-mode-map ":" nil)
07:18:49*yuta quit (Read error: Connection reset by peer)
07:19:10cncloh nice, thanks
07:22:24krux02is that to put in .emacs in global scope?
07:22:38krux02I have the same issue
07:22:47krux02and I actually created an issue on github
07:23:18krux02https://github.com/nim-lang/nim-mode/issues/102
07:27:06Xeso I got a really bad idea and am trying to make a template/macro for nim such that you make a "runPython" block and then write raw python code that cpython will execute.
07:27:18Xetemplate doPython(a: expr): expr =
07:27:20Xe echo a.astToStr.unescape
07:27:22Xe execPython a.astToStr.unescape
07:27:24XedoPython:
07:27:26Xe print "hi"
07:27:53Xethe part i'm stuck on is nim trying to type check the contents of the doPython block
07:36:20*Trustable joined #nim
07:37:48*desophos quit (Read error: Connection reset by peer)
07:41:01*endragor quit (Remote host closed the connection)
07:41:24def-Xe: you could use a macro and then do something with the ast
07:41:53Xedef-: i just want to get the string representation of the AST under the doPython statement
07:42:07Xeas in raw
07:42:56Xeunless you can do that trivially in a macro and i'm just braindead lol
07:42:58def-macro doPython(a: untyped): stmt = echo a.repr
07:44:12Xehmm
07:50:10*dorei joined #nim
08:07:39*Arrrr joined #nim
08:07:39*Arrrr quit (Changing host)
08:07:39*Arrrr joined #nim
08:13:31*endragor joined #nim
08:13:31*endragor quit (Read error: Connection reset by peer)
08:14:01*endragor joined #nim
08:15:18*Demos joined #nim
08:21:31*Demos quit (Ping timeout: 252 seconds)
08:24:20*fredrik92 joined #nim
08:25:38*Demos joined #nim
08:27:58*krux02 quit (Excess Flood)
08:28:15*krux02 joined #nim
08:29:14*jck_ quit (Quit: No Ping reply in 180 seconds.)
08:32:21*jck joined #nim
08:41:19*enthus1ast quit (Ping timeout: 252 seconds)
08:42:45*Demon_Fox quit (Quit: Leaving)
08:52:28*coffeepot joined #nim
08:57:08*GangstaCat quit (Quit: Leaving)
09:02:20*JohnNovak joined #nim
09:02:30JohnNovakhi there
09:03:02coffeepothello :)
09:05:43*elrood joined #nim
09:10:04reactormonkJohnNovak, sup, how do you like nim so far?
09:11:09JohnNovakreactormonk: i like it a lot, but i'm struggling a bit with the OOP parts at the moment
09:11:42reactormonkJohnNovak, don't think OOP too much.
09:12:08reactormonkJohnNovak, toss me a problem you're trying to solve
09:13:30JohnNovakreactormonk: yeah, i'm not a fan of too much OOP either, but a little helps sometimes
09:21:12*JohnNovak quit (Ping timeout: 250 seconds)
09:21:28*filcuc joined #nim
09:25:04ArrrrEverything i used to do with class is now replaced by enum and case objects
09:27:15reactormonkArrrr, also known as ADT
09:27:34ArrrrADT?
09:28:11reactormonkArrrr, https://en.wikipedia.org/wiki/Algebraic_data_type
09:28:38CcxCZADTs are handy
09:29:05CcxCZCan we do GADT in nim?
09:29:34*cnu- joined #nim
09:29:36*cnu- quit (Excess Flood)
09:31:10*Demos_ joined #nim
09:31:13reactormonknot sure, try it
09:31:55*ldlework quit (Ping timeout: 252 seconds)
09:33:34*krux02 quit (Ping timeout: 252 seconds)
09:33:34*Demos quit (Ping timeout: 252 seconds)
09:33:36*izi quit (Ping timeout: 252 seconds)
09:33:38*_stowa quit (Ping timeout: 252 seconds)
09:33:39*chrisheller quit (Ping timeout: 252 seconds)
09:34:18*krux02 joined #nim
09:38:03*_stowa joined #nim
09:41:10*arnetheduck joined #nim
09:48:46*izi joined #nim
09:49:05*ldlework joined #nim
09:49:36*cnu- joined #nim
09:57:03coffeepotis it bad practice in Nim to declare a variable inside a template? https://gist.github.com/coffeepots/6152de375a9f81250f9b1c257aadb890
10:00:12*Demos_ quit (Read error: Connection reset by peer)
10:01:03Araq_coffeepot: yes.
10:01:11*nsf joined #nim
10:01:36coffeepotAraq_ how come? Polluting scope or some other reason?
10:02:34Araq_it breaks composibility in sublte ways that somebody needs to write a book about
10:03:12coffeepotblimey, okay fair enough!
10:07:32*Arrrr quit (Ping timeout: 244 seconds)
10:09:35*fredrik92 quit (Ping timeout: 244 seconds)
10:09:36reactormonkAraq_, any way to get the zero working? https://gist.github.com/fb4f4f588b5424554ad505e661fc3bff
10:10:36Araq_it helps to know the syntax :P
10:11:13Araq_proc zero[T: seq](): T = discard
10:11:16*Arrrr joined #nim
10:11:16*Arrrr quit (Changing host)
10:11:16*Arrrr joined #nim
10:13:31reactormonkBest way to do something x times?
10:16:42*JohnNovak joined #nim
10:18:07*enthus1ast joined #nim
10:23:16*enthus1ast quit (Quit: Leaving.)
10:24:03*themagician quit (Ping timeout: 244 seconds)
10:24:09veganskAraq_, hi! How can I check the presence of a function with needed signature in macro?
10:27:09Araq_use macros.getType
10:27:29Araq_but I would avoid it. it's bad style.
10:28:30Araq_macros shouldn't impose so many restrictions ("you need to declare a proc with xyz beforehand")
10:28:30reactormonkAraq_, hm. can I do the same thing with int? proc zero[T: int](): T = 0
10:28:40Araq_reactormonk: yes
10:29:12reactormonkhttps://gist.github.com/ed4fab889181509b090bec12efb7cef3 gives me monoid.nim(7, 26) Error: type mismatch: got (int literal(0)) but expected 'seq[int]'
10:29:45*chrisheller joined #nim
10:29:52*themagician joined #nim
10:30:07*M-max1 is now known as TheManiac
10:31:09Araq_zero[T]() # is the call syntax
10:31:25reactormonkmonoid.nim(12, 12) Error: ambiguous call; both monoid.zero() and monoid.zero() match for: ()
10:32:15Araq_get rid of these:
10:32:18Araq_proc zero[T]: T
10:32:18Araq_proc add[T](a, b: T): T
10:32:44Araq_oh and for zero you should use typedesc, otherwise you cannot overload properly :P
10:35:42veganskAraq_, I want to create compile time serializer that can be customized via function declaration
10:36:27*vendethiel joined #nim
10:38:27Araq_vegansk: valid use case I guess ;-)
10:38:39*vendethiel- quit (Ping timeout: 276 seconds)
10:38:44Araq_watch out what you handle nnkSymChoice properly then
10:38:51Araq_bbl
10:39:57*themagician quit (Ping timeout: 276 seconds)
10:40:27reactormonkAraq_, how would I use typedesc here? proc zero[T: typedesc : seq] ?
10:40:48reactormonkah nope, typedesc[seq]
10:41:22*dmitry_p joined #nim
10:42:40*GangstaCat joined #nim
10:48:51reactormonkhttps://gist.github.com/cab00e6420d9f0074f39cd67bf908067 gives me monoid.nim(17, 14) Error: type mismatch: got (int literal(3), int literal(3))
10:50:53*ephja joined #nim
10:55:42*Arrrr quit (Quit: WeeChat 1.4)
11:25:02*Varriount quit (Ping timeout: 244 seconds)
11:25:13*Varriount joined #nim
11:25:38dom96hello guys
11:25:38*Arrrr joined #nim
11:25:52coffeepothey dom96 :)
11:27:10dom96Really nice comparison between Go's interfaces and Nim's type classes: https://news.ycombinator.com/item?id=11495570
11:28:39*jackv quit (Ping timeout: 244 seconds)
11:28:55*jackv joined #nim
11:29:49coffeepot"Nim has generics but doesn't have interfaces, which makes things even worse in my opinion" but nim has late binding on generics which i often find meand i dont even need interfaces
11:30:03coffeepot*means
11:30:15reactormonkstructural typing means you don't need interfaces.
11:30:36dom96and you can emulate interfaces with closures ;)
11:35:43coffeepotah sounds like i meant structural typing too rather than late binding which appears to be done at run time
11:36:10coffeepoti love this about nim
11:39:01coffeepotare there any other compiled languages that have this feature?
11:41:40ArrrrIs nim always discussed in HN ?
11:42:04dom96Arrrr: not really, why?
11:42:31ArrrrEvery link discussing nim here comes always from HN
11:43:06dom96HN discusses new technologies a lot
11:43:33ArrrrI see
11:45:39ArrrrShould nim have interfaces?
11:47:06dom96perhaps, but implemented using macros
11:47:38reactormonkconcepts?
11:52:51*niv hmms
11:53:06*fredrik92 joined #nim
11:55:16nivcan anyone tell me why this doesn't work? https://gist.github.com/niv/09820260f74df345ada38354c7c947af
11:55:30nivoh, it's for asynchttpserver, of course
11:55:59ephjais there much of a point in trying to remain compatible with releases before 1.0?
11:56:06ephjaa package can't depend on a specific branch, right?
11:56:15ephjathat would have made it easier
11:57:08ephjagist wants to run flash? :E
11:57:45nivprobably for copy/paste plugin
11:58:57nivah, i think i figured it out. my client was just disconnecting again after the headers came in
11:58:59nivnever-mind.
12:00:02fredrik92argh... when your download is so slow because the server you are downloding from, can only serve you the file at 13.7 MiB/sec... -.-
12:00:34niv100mbit plebians unite?
12:01:45*dmitry_p quit (Remote host closed the connection)
12:01:47*Varriount quit (Disconnected by services)
12:01:47*Varriount_ joined #nim
12:02:14fredrik92well, I'm sitting on the university backbone => 1 GBit/sec down and up
12:03:00niv100mbit isnt exactly a slouch though even for todays standards
12:03:03fredrik92kinda weird feeling when your HDD becomes the I/O bottleneck instead of the NIC... :O
12:03:48nivthe obvious answer is NVMe :)
12:04:47*krux02 quit (Ping timeout: 250 seconds)
12:05:03*krux02 joined #nim
12:05:43*Sembei joined #nim
12:06:26*BitPuffin joined #nim
12:06:31*Amrykid2 quit (Ping timeout: 250 seconds)
12:06:44*Amrykid joined #nim
12:07:23*Pisuke quit (Ping timeout: 250 seconds)
12:10:25*boopisaway quit (Ping timeout: 250 seconds)
12:11:06ephjafredrik92: oh man. life is tough :p
12:12:14*boopisaway joined #nim
12:14:19*regtools_ quit (Ping timeout: 250 seconds)
12:15:01*PMunch joined #nim
12:16:20*mat4 joined #nim
12:22:12*regtools joined #nim
12:22:30*JohnNovak quit (Quit: Page closed)
12:24:16*nim-buildbot quit (Ping timeout: 250 seconds)
12:25:26*yglukhov joined #nim
12:39:54*mnemonikk joined #nim
12:39:54*mnemonikk quit (Changing host)
12:39:54*mnemonikk joined #nim
12:46:27*krux02 quit (Quit: Verlassend)
12:46:53*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
12:47:04*coffeepot joined #nim
12:47:41*coffeepot quit (Client Quit)
12:47:50*coffeepot joined #nim
12:54:04Varriount_dom96, Arrrr: The most ubiquitus and binary-friendly way to implement interfaces is as a structure containing function pointers. This is what the COM binary interface does.
13:02:41*zahary joined #nim
13:02:49*enthus1ast joined #nim
13:11:59*aziz_ joined #nim
13:13:36*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
13:13:46*coffeepot joined #nim
13:14:28ArrrrBut then said structure != original object
13:15:14*zahary1 joined #nim
13:16:15*M-Quora1 joined #nim
13:17:07*M-Quora quit (Ping timeout: 276 seconds)
13:17:07*vqrs quit (Ping timeout: 276 seconds)
13:17:16*Jesin quit (Ping timeout: 276 seconds)
13:17:17*Amun_Ra quit (Ping timeout: 276 seconds)
13:17:18*joebo quit (Ping timeout: 276 seconds)
13:17:18*reactormonk quit (Ping timeout: 276 seconds)
13:17:27*sillytime quit (Excess Flood)
13:17:29*zahary quit (Read error: Connection reset by peer)
13:17:45*darkf_ joined #nim
13:17:48*nchambers joined #nim
13:17:56*arnetheduck quit (Ping timeout: 276 seconds)
13:17:56*darkf quit (Ping timeout: 276 seconds)
13:17:58*SirCmpwn quit (Ping timeout: 276 seconds)
13:18:30*SirCmpwn joined #nim
13:18:31*joebo joined #nim
13:18:52*aziz_ quit (Remote host closed the connection)
13:19:02*mat4 quit (Quit: Leaving)
13:19:13*vqrs joined #nim
13:20:27Varriount_Arrrr: Embed the object in the structure?
13:21:11*arnetheduck joined #nim
13:21:24Varriount_Arrrr: Or the other way around, and have a child type that hold the interface object in some form.
13:22:34*Jesin joined #nim
13:27:17*Amun_Ra joined #nim
13:28:24*drew__ joined #nim
13:30:13ArrrrWell, i think that when we talk about interfaces, and oop in general, people expect the same support as in languages such as Java/c#. Otherwise, nobody would care.
13:30:35ArrrrI think people expect to be able to compare one interface and one object based on its identity
13:33:07Varriount_Arrrr: Ugh. The problem with that is that C# and Java interfaces are rather complex behind the scenes, especially when an object implements more than one interface.
13:34:11Varriount_Arrrr: https://blogs.msdn.microsoft.com/oldnewthing/20040205-00/?p=40733
13:35:00*Varriount_ quit (Read error: Connection reset by peer)
13:35:04*reactormonk joined #nim
13:36:42*darkf_ is now known as darkf
13:37:34*Varriount joined #nim
13:41:29*drew__ quit (Quit: Page closed)
13:46:29*filcuc_ joined #nim
13:47:16*coffeepot quit (Ping timeout: 264 seconds)
13:47:52*DecoPerson_ quit (Ping timeout: 264 seconds)
13:48:28*enthus1ast quit (Ping timeout: 264 seconds)
13:48:29*jackv quit (Ping timeout: 264 seconds)
13:48:32*dthrvr quit (Ping timeout: 264 seconds)
13:49:04*arnetheduck quit (Ping timeout: 264 seconds)
13:49:07*nsf quit (Ping timeout: 264 seconds)
13:49:07*ldlework quit (Ping timeout: 264 seconds)
13:49:07*izi quit (Ping timeout: 264 seconds)
13:49:08*filcuc quit (Ping timeout: 264 seconds)
13:49:08*jck quit (Ping timeout: 264 seconds)
13:49:09*kingofoz quit (Ping timeout: 264 seconds)
13:49:28*arnetheduck joined #nim
13:49:38fredrik92Varriount_: also, marshaling objects to and from COM in e.g. .NET is a pain in the a**!!! Exactly because objects in the CLR aren't actually COM objects...
13:49:48*kingofoz joined #nim
13:50:01*jck joined #nim
13:51:33*DecoPerson_ joined #nim
13:53:37*ldlework joined #nim
13:54:55*jackv joined #nim
13:59:00*pregressive joined #nim
14:00:33*coffeepot joined #nim
14:01:42*dthrvr joined #nim
14:02:20*nsf joined #nim
14:09:54*izi joined #nim
14:10:13*BitPuffin quit (Ping timeout: 252 seconds)
14:16:11*pregressive quit (Remote host closed the connection)
14:26:19*gokr quit (Ping timeout: 260 seconds)
14:26:39*pregressive joined #nim
14:32:00*dorei quit (Quit: Page closed)
14:35:06*darkf quit (Quit: Leaving)
14:40:50*ics joined #nim
14:47:11*nchambers is now known as MrKrabs
14:54:33*MrKrabs is now known as nchambers
14:58:55*fredrik92 quit (Ping timeout: 244 seconds)
15:08:14*fredrik92 joined #nim
15:15:38*gokr joined #nim
15:23:12*PMunch quit (Ping timeout: 244 seconds)
15:23:22nivdom96: remember my question about grabbing fds from asynchttp?
15:24:58nivdom96: https://github.com/niv/websocket.nim got a bit carried away. turns out, it's already perfectly possible with the server, and the client part isn't really needed
15:25:13*Sentreen joined #nim
15:26:59*Sentreen quit (Client Quit)
15:45:33*doering joined #nim
15:46:19doeringhow do I cant a pointer to an int and vice versa? The compiler always tells me it's invalid, but I need it.
15:48:08reactormonkdoering, you probably want addr
15:48:22doeringnever mind I found out on my own, I was kind of stupid here
15:49:29doeringreactormonk: It is for an opengl function that takes an address, that actually is used as an offset in the buffer
15:49:39doeringso it's not an address anymore
15:52:37ephjaglDrawElements?
15:52:56ephjaI dunno why they chose a pointer type
15:53:39doeringI do know, when there is no buffer bound, it is actually use as an in memory pointer
15:56:27Araq_opengl predates sane API design.
15:56:52reactormonkvulkan ftw?
15:59:10*filcuc_ quit (Read error: Connection reset by peer)
16:00:17Arrrrmad 90's
16:01:19ephjawhy can't package names contain dashes anymore?
16:03:38def-ephja: probably because identifiers in nim can't
16:03:51*themagician joined #nim
16:04:08def-to tell apart foo - bar and "foo-bar"
16:04:58federico3wut?
16:06:01dom96niv: awesome
16:06:46dom96because "foo-bar" means "foo minus bar"
16:07:00dom96not "identifier `foo-bar`"
16:07:27dom96hence you cannot call 'module-foo.bar()'
16:07:38dom96hence package names cannot contain dashes
16:08:42*enthus1ast joined #nim
16:08:46ephjaok
16:10:27dom96niv: please don't use waitFor like this: https://github.com/niv/websocket.nim/blob/master/websocket/server.nim#L32
16:10:55*fredrik92 quit (Quit: going home . . .)
16:11:54nivdom96: await doesnt work in templates
16:11:57*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:12:40dom96niv: yeah, but using 'waitFor' means that it will make everything run synchronously
16:12:49dom96You should be able to just write 'yield'
16:13:12nivjust for the writes and they're basically free
16:15:13ephjado you need two dependency entries in order to restrict the version to a range?
16:15:35dom96niv: even so, using waitFor like that could be dangerous
16:15:40ephjafor a nimble package, in case it wasn't obvious
16:16:14dom96ephja: foo >= 0.3 & <= 0.5 ?
16:17:16ephjanevermind
16:19:31*arnetheduck quit (Ping timeout: 244 seconds)
16:19:59ephjawhat about specific branches? otherwise it's not worth trying to remain compatible with both releases and devel
16:20:17ephjabut that's too much work anyway if the project in question isn't small
16:21:26dom96ephja: foo#branch
16:22:46cheatfateAraq_, do you make all windows staff in asyncdispatch?
16:23:30Araq_no, I patched it a bit, perhaps. it's mostly Varriount's and dom96's work
16:23:44*brson joined #nim
16:24:10federico3version locking is not without drawbacks: it encourages developers to break backward compatibility (without doing smooth transitions), and removes the need to update code to be compatible with newer releases
16:24:17cheatfateis it possible in github to check author of specified line in file?
16:26:21ArrrrWho do you want to kill?
16:27:21dom96cheatfate: click the 'blame' button
16:27:35dom96It's likely that I wrote it heh
16:29:21*desophos joined #nim
16:29:31dom96cheatfate: https://github.com/nim-lang/Nim/blame/devel/lib/pure/asyncdispatch.nim
16:29:34cheatfatedom96, i just want to talk about situation when WSARecv returns 0 (operation completed immediately)
16:29:51*vendethiel quit (Ping timeout: 244 seconds)
16:30:14*vendethiel joined #nim
16:30:31cheatfatewindows has macro `hasoverlappediocompleted()`
16:30:54cheatfateit checks overlapped structure member .Internal to be equal with STATUS_PENDING
16:31:35cheatfateso if this member has STATUS_PENDING, than overlapped io operation is still pending
16:31:38cheatfatebut WSARecv returns 0
16:33:15cheatfatethe problem is in handling this (completed immediately)
16:33:53cheatfatebecause nim's asyncio uses inplace callback handling it causes a problems i think
16:33:57cheatfateor can cause problems
16:34:01cheatfatein future
16:35:07*yglukhov quit (Remote host closed the connection)
16:37:17cheatfatei'm googling and trying to find information about how to properly handle this (completed immediately) and there no precision info about that
16:38:52ephjafederico3: maybe if it's restricted to specific minor or patch version ranges
16:40:34ephjawhat about (foo >= 1.0 & < 2.0)? I guess it depends on the project size and the importance of stability
16:41:23federico3ephja: that would be a more reasonable tradeoff, *if* packages envforce semantic versioning
16:42:06ephjaindeed
16:42:38federico3...and nimble filters only on major versions
16:44:20ephja"for example: > 0.2 & < 1.0 which will install a package with the version greater than 0.2 and less than 1.0." so, this example is partially redundant?
16:44:22dom96cheatfate: why do you think it can cause a problem?
16:45:05dom96"and nimble filters only on major versions", what do you mean by that?
16:46:55federico3dom96: that the version locking can specify foo >= 1 & < 2 to lock down on the major
16:47:28federico3(under the assumption that SemVer is being followed)
16:47:33dom96yes, it can. But you said 'nimble filters *only*'.
16:48:05nivdom96: sorry, had to go away for a bit. how would i go about using yield? just use that instead of waitFor?
16:48:06dom96Nimble resolves the dependency versions based on what you tell it
16:48:33dom96niv: yeah, should work. You could also just not use a template, it's not really necessary, is it?
16:48:40federico3that's, the point: encourage users not to pin down versions restrictively
16:48:41nivits not, but its pretty :p
16:50:02federico3e.g. nimble would refuse to do >= 0.0.1, < 0.3.7 unless overridden with a special flag
16:51:04ephjabut not for < x.0?
16:51:16dom96federico3: ahh, okay. Yes, we need a new syntax for semver. As with many things, there is already an issue for it... https://github.com/nim-lang/nimble/issues/130
16:56:36ephjaI wonder how many people are actually going to rely on minor version ranges
17:02:14ephjabut I don't mind having restrictive defaults. it would be trivial to circumvent it
17:04:55*space-wizard joined #nim
17:09:48*McSpiros joined #nim
17:14:51*enthus1ast quit (Ping timeout: 264 seconds)
17:18:17*desophos_ joined #nim
17:18:37*pregress_ joined #nim
17:20:31*desophos quit (Ping timeout: 252 seconds)
17:20:32*DecoPerson_ quit (Ping timeout: 252 seconds)
17:20:33*SirCmpwn quit (Ping timeout: 252 seconds)
17:20:33*nim-buildbot quit (Ping timeout: 252 seconds)
17:20:43*Varriount_ joined #nim
17:20:43*Varriount quit (Disconnected by services)
17:21:05*pregressive quit (Ping timeout: 252 seconds)
17:21:06*ldlework quit (Ping timeout: 252 seconds)
17:21:09*chrisheller quit (Ping timeout: 252 seconds)
17:21:51*DecoPerson_ joined #nim
17:26:03*SirCmpwn joined #nim
17:30:31*yglukhov joined #nim
17:34:08*yglukhov quit (Remote host closed the connection)
17:34:21*yglukhov joined #nim
17:35:08nivdom96: https://github.com/niv/websocket.nim/blob/master/websocket/server.nim better?
17:35:58*ldlework joined #nim
17:36:08dom96niv: yep :)
17:38:29ephjaneat
17:45:01cheatfatedom96, is it possible to find where exception was generated in async?
17:46:16cheatfatehttps://gist.github.com/cheatfate/a099938fce63768948461224634cbdfc
17:46:34cheatfatedom96, i just want to find where this exception was generated
17:47:06dom96Here I think: https://gist.github.com/cheatfate/a099938fce63768948461224634cbdfc#file-exception-txt-L51
17:47:40*brson_ joined #nim
17:48:10cheatfatebut line 208 [var recvIntoFut = recvInto(socket.fd.AsyncFD, buf, size, flags)]
17:48:48*vendethiel- joined #nim
17:49:09*desophos__ joined #nim
17:49:28cheatfatei think this error was generated by mine anotify but i couldn't find it
17:50:54*vendethiel quit (Ping timeout: 276 seconds)
17:50:54*brson quit (Ping timeout: 276 seconds)
17:50:54*nsf quit (Ping timeout: 276 seconds)
17:51:00dom96the next line the traceback should show you a line number but instead shows it in system.nim, I guess because of some template
17:51:20dom96but look up what's on that line in system
17:51:23dom96might give you a clue
17:51:33*desophos_ quit (Ping timeout: 276 seconds)
17:51:59*Jesin quit (Quit: Leaving)
17:53:09cheatfatesystem.nim[2510] in [template newException*(exceptn: typedesc, message: string): expr =] -> e.msg = message
17:53:11*yglukhov quit (Remote host closed the connection)
17:53:47*nsf joined #nim
17:54:22*Jesin joined #nim
17:54:29*yglukhov joined #nim
17:54:50dom96oh :\
17:56:36*Varriount_ quit (Read error: Connection reset by peer)
17:56:52*Varriount joined #nim
18:02:05*yglukhov quit (Remote host closed the connection)
18:02:42ephjais that template needed anymore?
18:03:20dom96yes
18:12:20ephjayeah it's better to have it
18:12:35*yglukhov joined #nim
18:12:36ephjawould typedesc[ExceptionConcept] work?
18:13:27*zama quit (Ping timeout: 260 seconds)
18:13:38nivdom96: you think i should publish that thing on nimble?
18:14:15dom96niv: go for it :)
18:14:30ephjasomething like that should make nim more appealing
18:14:42nivits not RFC-complete yet though
18:14:46ephjahas anyone added a canvas interface yet?
18:16:08ephjathat's fine. just start at version 0.1
18:16:28*vendethiel joined #nim
18:17:30*chrisheller joined #nim
18:17:51*vendethiel- quit (Ping timeout: 244 seconds)
18:19:31federico3canvas?
18:20:23*yglukhov quit (Remote host closed the connection)
18:21:52ephjaHTML5 canvas (graphics API)
18:22:58cheatfatedom96, so you cant help me with place where exception was generated?
18:23:16*desophos__ is now known as desophos
18:23:48dom96cheatfate: do you see any newException() calls in recvInto proc?
18:25:40nivbah nimble didnt remember my access token
18:26:25*zama joined #nim
18:28:02cheatfatedom96, asyncdispatch is really unpredictable, i just added "echo()" near exception generations in recvInto and got absolutely another error
18:29:03cheatfatedom96, it looks like asyncdispatch didn't allow any modifications for it and will work only with its current state...
18:29:35cheatfatedom96, and this is not good, imho
18:34:25cheatfatedom96, if you remember https://github.com/nim-lang/Nim/issues/3919, this happens only because of handling "immediate completion". If you will start to ignore "immediate completion" you will not get stack overflow i think
18:37:57doeringwhen I have examples that can make the compiler segfault, or generate invalid c code, where should I post them?
18:39:26cheatfatedoering, fill an issues on github
18:39:47cheatfatedoering, https://github.com/nim-lang/Nim/issues
18:42:22ArrrrWould be nice if the compile told you why certain identifier is ambiguous, like "moduleA.myId, moduleB.myId"
18:42:27ephjawill the tuple shortcut ever work with named fields ((x: T, y: U))?
18:44:14*Varriount quit (Disconnected by services)
18:44:14*Varriount_ joined #nim
18:44:57*rok joined #nim
18:46:51*fredrik92 joined #nim
18:50:43*chrisheller quit (Ping timeout: 252 seconds)
18:53:05*Jesin quit (Quit: Leaving)
18:53:09ArrrrDoesn't it work?
18:56:46ephjanah
18:57:23Arrrrlike, let a = (x: 123, y: 456) ?
19:01:20ephjaI was referring to tuple types. maybe it would be a bad idea to support "var a: (x: int, y: int)" too
19:02:01ArrrrYes, i'd prefer to define vars like a: (x, y: int)
19:03:14ephjawas that a typo?
19:03:41ephja"let a: (x: int, y: int) = (x: 1, y: 2)"
19:04:21Arrrrfrom tuple[x, y: int] -> (x, y: int)
19:04:35ArrrrBut now that i think about it, anon procs may conflict
19:08:10ephjaok
19:10:33*yglukhov joined #nim
19:12:27ephjayglukhov: just when I was checking out nimsl. hi
19:12:30ephjainteresting project
19:16:49cheatfatedom96, https://github.com/nim-lang/Nim/issues/3919
19:21:19dom96Are you sure the crash doesn't simply disappear because you removed the code which receives the data?
19:21:34yglukhovephja: hey, thanks =). still needs some more love, but a nice proof of concept =)
19:24:16*Arrrr quit (Quit: WeeChat 1.4)
19:37:24*mlitwiniuk quit (Ping timeout: 244 seconds)
19:39:46*mlitwiniuk joined #nim
19:44:52ephjayglukhov: ok. can basic mvp shaders for OpenGL 3 be created?
19:47:45*chrisheller joined #nim
19:47:56ephjaI don't see out/in in the output, so maybe not
19:48:52doeringthe problem with nimsl is, that shader stages do not really map very well to functions
19:49:31doeringso it's more a proof of concept, that the nim expressions can be translated into glsl, but for the rest of it, you need more
19:50:20yglukhovephja, well, you can define attributes and uniforms and varyings to the "main" function, so yes. but uniform samplers are not supported yet. and also there needs to be another way of defining uniforms/varyings/attributes conditionnaly. I know the way how to get it done, but its just not there yet.
19:51:22doeringyglukhov, I have support for uniforms varyings attributs samplers instancing in my shader macro
19:51:27doeringand it works
19:51:56yglukhovdoering, can you show it please? =)
19:52:14doeringyes if you are willing to spend some time
19:52:41doeringto get it runnig it needs some time, but you can see the examples if you want
19:53:02yglukhovyeah, i just want to get the basic feeling of how it looks like
19:53:11doeringhttps://github.com/krux02/opengl-sandbox
19:53:22doeringI have no readme yet or any explanation
19:53:30doeringbut in examples you can see a bit
19:54:34doeringsandbox.nim is probably the best to get started
19:55:01doeringdeferred_shading.nim is also worth looking at
19:55:16doeringand mesh_loading_tiny.nim
19:55:35doeringthe rest is just something i started that doesn't work at all
19:56:26doeringIn deferred shading, there is a classical deferred shading pipeline, with hundreds of lights that get rendered with instancing
19:58:23yglukhovah neat. but the main idea of my nimsl project is using nim instead of glsl + ability to run shader code on the cpu + ability to reuse nim procs in both nim code and shader code. it seems like we have different points.
19:59:12doeringnot really
19:59:50ephjaok but attribute and varying were deprecated at some point, right? but I guess it's not difficult to migrate to in/out
19:59:56doeringthere is no reason, why I wouldn't be able to integrate nimsl in my project, too
20:00:06doeringthe projects to orthogonal things
20:00:16doeringand I think together they would really be good
20:01:09*alexsystemf_ joined #nim
20:01:15doeringyes if you are interested to use any core opengl (3.2 onwards) you need to use in/out
20:01:32ephjaI'll keep an eye on the libraries
20:01:50doeringbut the proc is still called glAttrib
20:02:24yglukhovtrue. my point is codegen, while your point is cpu+gpu interop. there's no conflict here =)
20:02:31doeringyou can staar it ;)
20:02:32ephjaI'd like to use vulkan when a driver becomes available, but GLSL can still be used, right?
20:02:59ephjaI have starred them
20:03:23yglukhovdoering: do older gl versions allow in/out?
20:03:39doeringsorry old opengl does not support in/out
20:05:11yglukhovok, different codegen behavior then. im writing a game now, and targeting gl es 2.0, so can't use in/out unconditionally
20:06:08yglukhovbut it should be easy to handle anyway
20:06:12doeringMy goal is to make advanced features of the rendering pipeline easy to use
20:06:34doeringso I do not target old opengl versions
20:07:08yglukhovand my goal is to replace glsl (and maybe hlsl) with nim
20:07:10yglukhov=)
20:07:13doeringbut since everything is macro based, there should be an opetion, that the generated parts of glsl are glsl 1.2 compatible
20:09:51doeringI could allow an optional argument to the macro that sets the shader version
20:10:37doeringand with your library I would import nim function in the glsl code
20:18:44*kingofoz quit (Ping timeout: 244 seconds)
20:19:41*kingofoz joined #nim
20:22:01*chrisheller quit (Ping timeout: 252 seconds)
20:25:29doeringyglukhov: I made some screenshots http://imgur.com/a/h9uwi
20:26:04yglukhovcool!
20:29:59*McSpiros quit (Quit: Page closed)
20:30:14federico3nice
20:33:07cheatfatedom96, please check first post in issue and you will see "(1874 calls omitted) ..." and i'm not deleted code which receiving data i have deleted code which i have marked...
20:33:24cheatfatedom96, removed code if just duplication of code in callback
20:40:17*Ven_ joined #nim
21:00:23*endragor_ joined #nim
21:03:47*endragor quit (Ping timeout: 260 seconds)
21:04:57*endragor_ quit (Ping timeout: 260 seconds)
21:08:21*enthus1ast joined #nim
21:09:01*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:12:16*cheatfate_ joined #nim
21:12:31*yglukhov_ joined #nim
21:13:25*cheatfate quit (Read error: Connection reset by peer)
21:15:04*yglukhov quit (Ping timeout: 244 seconds)
21:16:36dom96cheatfate_: I know that the code which you deleted is only the highlighted code. But deleting that code will prevent the future from completing and thus can prevent the data from being received.
21:18:30*chrisheller joined #nim
21:22:58cheatfate_dom96, you think, if WSARecv completed immediatly with "0" result your callback will not be called?
21:24:00cheatfate_dom96, but you must read your comment at https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L766-L768
21:24:47cheatfate_dom96, because callback would be called even if WSARecv completed immediately
21:28:09cheatfate_dom96, this is patch which works correct https://gist.github.com/cheatfate/95cf1abb158688adbd07bf26f5040f05/revisions
21:29:31*thotypous joined #nim
21:38:15*Demon_Fox joined #nim
21:45:55*rok quit (Quit: rok)
21:46:50*Jesin joined #nim
21:52:48*thotypous quit (Ping timeout: 250 seconds)
21:53:24*thotypous joined #nim
21:53:33*Amun_Ra quit (Ping timeout: 268 seconds)
21:54:51*kingofoz quit (Ping timeout: 244 seconds)
21:55:02*kingofoz joined #nim
21:55:18*vendethiel quit (Ping timeout: 276 seconds)
21:56:53*Trustable quit (Remote host closed the connection)
22:00:18*vendethiel joined #nim
22:00:22*elrood quit (Quit: Leaving)
22:04:39*vqrs quit (Ping timeout: 268 seconds)
22:07:01*vqrs joined #nim
22:08:25*Amun_Ra joined #nim
22:08:46*space-wi_ joined #nim
22:09:21*space-wi_ quit (Max SendQ exceeded)
22:10:01*space-wi_ joined #nim
22:11:26*space-wizard quit (Ping timeout: 268 seconds)
22:12:11*Demon_Fox quit (Quit: Leaving)
22:19:26*cheatfate__ joined #nim
22:19:28*cheatfate_ quit (Read error: Connection reset by peer)
22:21:22*space-wi_ quit (Ping timeout: 252 seconds)
22:23:15*vendethiel quit (Ping timeout: 276 seconds)
22:24:34*yglukhov_ quit (Remote host closed the connection)
22:26:01*space-wizard joined #nim
22:34:37*cheatfate__ is now known as cheatfate
22:36:18*PMunch joined #nim
22:37:18*Demon_Fox joined #nim
22:46:08federico3there seems to be no way to remove data from a Stream - what should I use as a fifo buffer?
22:47:11*space-wizard quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:48:26*fredrik92 quit (Ping timeout: 268 seconds)
22:49:54*doering quit (Ping timeout: 276 seconds)
22:53:01*space-wizard joined #nim
23:02:24*darkf joined #nim
23:08:00*vendethiel joined #nim
23:28:53*vendethiel quit (Ping timeout: 244 seconds)
23:33:17*fredrik92 joined #nim
23:37:36*fredrik92 quit (Client Quit)