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:25 | yuta | cncl: to turn off auto indenting for ":" key set: |
07:15:30 | yuta | (define-key nim-mode-map ":" nil) |
07:18:49 | * | yuta quit (Read error: Connection reset by peer) |
07:19:10 | cncl | oh nice, thanks |
07:22:24 | krux02 | is that to put in .emacs in global scope? |
07:22:38 | krux02 | I have the same issue |
07:22:47 | krux02 | and I actually created an issue on github |
07:23:18 | krux02 | https://github.com/nim-lang/nim-mode/issues/102 |
07:27:06 | Xe | so 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:18 | Xe | template doPython(a: expr): expr = |
07:27:20 | Xe | echo a.astToStr.unescape |
07:27:22 | Xe | execPython a.astToStr.unescape |
07:27:24 | Xe | doPython: |
07:27:26 | Xe | print "hi" |
07:27:53 | Xe | the 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:24 | def- | Xe: you could use a macro and then do something with the ast |
07:41:53 | Xe | def-: i just want to get the string representation of the AST under the doPython statement |
07:42:07 | Xe | as in raw |
07:42:56 | Xe | unless you can do that trivially in a macro and i'm just braindead lol |
07:42:58 | def- | macro doPython(a: untyped): stmt = echo a.repr |
07:44:12 | Xe | hmm |
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:30 | JohnNovak | hi there |
09:03:02 | coffeepot | hello :) |
09:05:43 | * | elrood joined #nim |
09:10:04 | reactormonk | JohnNovak, sup, how do you like nim so far? |
09:11:09 | JohnNovak | reactormonk: i like it a lot, but i'm struggling a bit with the OOP parts at the moment |
09:11:42 | reactormonk | JohnNovak, don't think OOP too much. |
09:12:08 | reactormonk | JohnNovak, toss me a problem you're trying to solve |
09:13:30 | JohnNovak | reactormonk: 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:04 | Arrrr | Everything i used to do with class is now replaced by enum and case objects |
09:27:15 | reactormonk | Arrrr, also known as ADT |
09:27:34 | Arrrr | ADT? |
09:28:11 | reactormonk | Arrrr, https://en.wikipedia.org/wiki/Algebraic_data_type |
09:28:38 | CcxCZ | ADTs are handy |
09:29:05 | CcxCZ | Can 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:13 | reactormonk | not 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:03 | coffeepot | is 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:03 | Araq_ | coffeepot: yes. |
10:01:11 | * | nsf joined #nim |
10:01:36 | coffeepot | Araq_ how come? Polluting scope or some other reason? |
10:02:34 | Araq_ | it breaks composibility in sublte ways that somebody needs to write a book about |
10:03:12 | coffeepot | blimey, okay fair enough! |
10:07:32 | * | Arrrr quit (Ping timeout: 244 seconds) |
10:09:35 | * | fredrik92 quit (Ping timeout: 244 seconds) |
10:09:36 | reactormonk | Araq_, any way to get the zero working? https://gist.github.com/fb4f4f588b5424554ad505e661fc3bff |
10:10:36 | Araq_ | it helps to know the syntax :P |
10:11:13 | Araq_ | 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:31 | reactormonk | Best 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:09 | vegansk | Araq_, hi! How can I check the presence of a function with needed signature in macro? |
10:27:09 | Araq_ | use macros.getType |
10:27:29 | Araq_ | but I would avoid it. it's bad style. |
10:28:30 | Araq_ | macros shouldn't impose so many restrictions ("you need to declare a proc with xyz beforehand") |
10:28:30 | reactormonk | Araq_, hm. can I do the same thing with int? proc zero[T: int](): T = 0 |
10:28:40 | Araq_ | reactormonk: yes |
10:29:12 | reactormonk | https://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:09 | Araq_ | zero[T]() # is the call syntax |
10:31:25 | reactormonk | monoid.nim(12, 12) Error: ambiguous call; both monoid.zero() and monoid.zero() match for: () |
10:32:15 | Araq_ | get rid of these: |
10:32:18 | Araq_ | proc zero[T]: T |
10:32:18 | Araq_ | proc add[T](a, b: T): T |
10:32:44 | Araq_ | oh and for zero you should use typedesc, otherwise you cannot overload properly :P |
10:35:42 | vegansk | Araq_, I want to create compile time serializer that can be customized via function declaration |
10:36:27 | * | vendethiel joined #nim |
10:38:27 | Araq_ | vegansk: valid use case I guess ;-) |
10:38:39 | * | vendethiel- quit (Ping timeout: 276 seconds) |
10:38:44 | Araq_ | watch out what you handle nnkSymChoice properly then |
10:38:51 | Araq_ | bbl |
10:39:57 | * | themagician quit (Ping timeout: 276 seconds) |
10:40:27 | reactormonk | Araq_, how would I use typedesc here? proc zero[T: typedesc : seq] ? |
10:40:48 | reactormonk | ah nope, typedesc[seq] |
10:41:22 | * | dmitry_p joined #nim |
10:42:40 | * | GangstaCat joined #nim |
10:48:51 | reactormonk | https://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:38 | dom96 | hello guys |
11:25:38 | * | Arrrr joined #nim |
11:25:52 | coffeepot | hey dom96 :) |
11:27:10 | dom96 | Really 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:49 | coffeepot | "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:03 | coffeepot | *means |
11:30:15 | reactormonk | structural typing means you don't need interfaces. |
11:30:36 | dom96 | and you can emulate interfaces with closures ;) |
11:35:43 | coffeepot | ah sounds like i meant structural typing too rather than late binding which appears to be done at run time |
11:36:10 | coffeepot | i love this about nim |
11:39:01 | coffeepot | are there any other compiled languages that have this feature? |
11:41:40 | Arrrr | Is nim always discussed in HN ? |
11:42:04 | dom96 | Arrrr: not really, why? |
11:42:31 | Arrrr | Every link discussing nim here comes always from HN |
11:43:06 | dom96 | HN discusses new technologies a lot |
11:43:33 | Arrrr | I see |
11:45:39 | Arrrr | Should nim have interfaces? |
11:47:06 | dom96 | perhaps, but implemented using macros |
11:47:38 | reactormonk | concepts? |
11:52:51 | * | niv hmms |
11:53:06 | * | fredrik92 joined #nim |
11:55:16 | niv | can anyone tell me why this doesn't work? https://gist.github.com/niv/09820260f74df345ada38354c7c947af |
11:55:30 | niv | oh, it's for asynchttpserver, of course |
11:55:59 | ephja | is there much of a point in trying to remain compatible with releases before 1.0? |
11:56:06 | ephja | a package can't depend on a specific branch, right? |
11:56:15 | ephja | that would have made it easier |
11:57:08 | ephja | gist wants to run flash? :E |
11:57:45 | niv | probably for copy/paste plugin |
11:58:57 | niv | ah, i think i figured it out. my client was just disconnecting again after the headers came in |
11:58:59 | niv | never-mind. |
12:00:02 | fredrik92 | argh... 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:34 | niv | 100mbit 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:14 | fredrik92 | well, I'm sitting on the university backbone => 1 GBit/sec down and up |
12:03:00 | niv | 100mbit isnt exactly a slouch though even for todays standards |
12:03:03 | fredrik92 | kinda weird feeling when your HDD becomes the I/O bottleneck instead of the NIC... :O |
12:03:48 | niv | the 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:06 | ephja | fredrik92: 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:04 | Varriount_ | 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:28 | Arrrr | But 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:27 | Varriount_ | Arrrr: Embed the object in the structure? |
13:21:11 | * | arnetheduck joined #nim |
13:21:24 | Varriount_ | 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:13 | Arrrr | Well, 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:35 | Arrrr | I think people expect to be able to compare one interface and one object based on its identity |
13:33:07 | Varriount_ | 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:11 | Varriount_ | 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:38 | fredrik92 | Varriount_: 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:22 | niv | dom96: remember my question about grabbing fds from asynchttp? |
15:24:58 | niv | dom96: 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:19 | doering | how 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:08 | reactormonk | doering, you probably want addr |
15:48:22 | doering | never mind I found out on my own, I was kind of stupid here |
15:49:29 | doering | reactormonk: It is for an opengl function that takes an address, that actually is used as an offset in the buffer |
15:49:39 | doering | so it's not an address anymore |
15:52:37 | ephja | glDrawElements? |
15:52:56 | ephja | I dunno why they chose a pointer type |
15:53:39 | doering | I do know, when there is no buffer bound, it is actually use as an in memory pointer |
15:56:27 | Araq_ | opengl predates sane API design. |
15:56:52 | reactormonk | vulkan ftw? |
15:59:10 | * | filcuc_ quit (Read error: Connection reset by peer) |
16:00:17 | Arrrr | mad 90's |
16:01:19 | ephja | why can't package names contain dashes anymore? |
16:03:38 | def- | ephja: probably because identifiers in nim can't |
16:03:51 | * | themagician joined #nim |
16:04:08 | def- | to tell apart foo - bar and "foo-bar" |
16:04:58 | federico3 | wut? |
16:06:01 | dom96 | niv: awesome |
16:06:46 | dom96 | because "foo-bar" means "foo minus bar" |
16:07:00 | dom96 | not "identifier `foo-bar`" |
16:07:27 | dom96 | hence you cannot call 'module-foo.bar()' |
16:07:38 | dom96 | hence package names cannot contain dashes |
16:08:42 | * | enthus1ast joined #nim |
16:08:46 | ephja | ok |
16:10:27 | dom96 | niv: 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:54 | niv | dom96: await doesnt work in templates |
16:11:57 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:12:40 | dom96 | niv: yeah, but using 'waitFor' means that it will make everything run synchronously |
16:12:49 | dom96 | You should be able to just write 'yield' |
16:13:12 | niv | just for the writes and they're basically free |
16:15:13 | ephja | do you need two dependency entries in order to restrict the version to a range? |
16:15:35 | dom96 | niv: even so, using waitFor like that could be dangerous |
16:15:40 | ephja | for a nimble package, in case it wasn't obvious |
16:16:14 | dom96 | ephja: foo >= 0.3 & <= 0.5 ? |
16:17:16 | ephja | nevermind |
16:19:31 | * | arnetheduck quit (Ping timeout: 244 seconds) |
16:19:59 | ephja | what about specific branches? otherwise it's not worth trying to remain compatible with both releases and devel |
16:20:17 | ephja | but that's too much work anyway if the project in question isn't small |
16:21:26 | dom96 | ephja: foo#branch |
16:22:46 | cheatfate | Araq_, do you make all windows staff in asyncdispatch? |
16:23:30 | Araq_ | no, I patched it a bit, perhaps. it's mostly Varriount's and dom96's work |
16:23:44 | * | brson joined #nim |
16:24:10 | federico3 | version 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:17 | cheatfate | is it possible in github to check author of specified line in file? |
16:26:21 | Arrrr | Who do you want to kill? |
16:27:21 | dom96 | cheatfate: click the 'blame' button |
16:27:35 | dom96 | It's likely that I wrote it heh |
16:29:21 | * | desophos joined #nim |
16:29:31 | dom96 | cheatfate: https://github.com/nim-lang/Nim/blame/devel/lib/pure/asyncdispatch.nim |
16:29:34 | cheatfate | dom96, 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:31 | cheatfate | windows has macro `hasoverlappediocompleted()` |
16:30:54 | cheatfate | it checks overlapped structure member .Internal to be equal with STATUS_PENDING |
16:31:35 | cheatfate | so if this member has STATUS_PENDING, than overlapped io operation is still pending |
16:31:38 | cheatfate | but WSARecv returns 0 |
16:33:15 | cheatfate | the problem is in handling this (completed immediately) |
16:33:53 | cheatfate | because nim's asyncio uses inplace callback handling it causes a problems i think |
16:33:57 | cheatfate | or can cause problems |
16:34:01 | cheatfate | in future |
16:35:07 | * | yglukhov quit (Remote host closed the connection) |
16:37:17 | cheatfate | i'm googling and trying to find information about how to properly handle this (completed immediately) and there no precision info about that |
16:38:52 | ephja | federico3: maybe if it's restricted to specific minor or patch version ranges |
16:40:34 | ephja | what about (foo >= 1.0 & < 2.0)? I guess it depends on the project size and the importance of stability |
16:41:23 | federico3 | ephja: that would be a more reasonable tradeoff, *if* packages envforce semantic versioning |
16:42:06 | ephja | indeed |
16:42:38 | federico3 | ...and nimble filters only on major versions |
16:44:20 | ephja | "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:22 | dom96 | cheatfate: why do you think it can cause a problem? |
16:45:05 | dom96 | "and nimble filters only on major versions", what do you mean by that? |
16:46:55 | federico3 | dom96: that the version locking can specify foo >= 1 & < 2 to lock down on the major |
16:47:28 | federico3 | (under the assumption that SemVer is being followed) |
16:47:33 | dom96 | yes, it can. But you said 'nimble filters *only*'. |
16:48:05 | niv | dom96: sorry, had to go away for a bit. how would i go about using yield? just use that instead of waitFor? |
16:48:06 | dom96 | Nimble resolves the dependency versions based on what you tell it |
16:48:33 | dom96 | niv: yeah, should work. You could also just not use a template, it's not really necessary, is it? |
16:48:40 | federico3 | that's, the point: encourage users not to pin down versions restrictively |
16:48:41 | niv | its not, but its pretty :p |
16:50:02 | federico3 | e.g. nimble would refuse to do >= 0.0.1, < 0.3.7 unless overridden with a special flag |
16:51:04 | ephja | but not for < x.0? |
16:51:16 | dom96 | federico3: 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:36 | ephja | I wonder how many people are actually going to rely on minor version ranges |
17:02:14 | ephja | but 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:08 | niv | dom96: https://github.com/niv/websocket.nim/blob/master/websocket/server.nim better? |
17:35:58 | * | ldlework joined #nim |
17:36:08 | dom96 | niv: yep :) |
17:38:29 | ephja | neat |
17:45:01 | cheatfate | dom96, is it possible to find where exception was generated in async? |
17:46:16 | cheatfate | https://gist.github.com/cheatfate/a099938fce63768948461224634cbdfc |
17:46:34 | cheatfate | dom96, i just want to find where this exception was generated |
17:47:06 | dom96 | Here I think: https://gist.github.com/cheatfate/a099938fce63768948461224634cbdfc#file-exception-txt-L51 |
17:47:40 | * | brson_ joined #nim |
17:48:10 | cheatfate | but 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:28 | cheatfate | i 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:00 | dom96 | the 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:20 | dom96 | but look up what's on that line in system |
17:51:23 | dom96 | might give you a clue |
17:51:33 | * | desophos_ quit (Ping timeout: 276 seconds) |
17:51:59 | * | Jesin quit (Quit: Leaving) |
17:53:09 | cheatfate | system.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:50 | dom96 | oh :\ |
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:42 | ephja | is that template needed anymore? |
18:03:20 | dom96 | yes |
18:12:20 | ephja | yeah it's better to have it |
18:12:35 | * | yglukhov joined #nim |
18:12:36 | ephja | would typedesc[ExceptionConcept] work? |
18:13:27 | * | zama quit (Ping timeout: 260 seconds) |
18:13:38 | niv | dom96: you think i should publish that thing on nimble? |
18:14:15 | dom96 | niv: go for it :) |
18:14:30 | ephja | something like that should make nim more appealing |
18:14:42 | niv | its not RFC-complete yet though |
18:14:46 | ephja | has anyone added a canvas interface yet? |
18:16:08 | ephja | that'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:31 | federico3 | canvas? |
18:20:23 | * | yglukhov quit (Remote host closed the connection) |
18:21:52 | ephja | HTML5 canvas (graphics API) |
18:22:58 | cheatfate | dom96, so you cant help me with place where exception was generated? |
18:23:16 | * | desophos__ is now known as desophos |
18:23:48 | dom96 | cheatfate: do you see any newException() calls in recvInto proc? |
18:25:40 | niv | bah nimble didnt remember my access token |
18:26:25 | * | zama joined #nim |
18:28:02 | cheatfate | dom96, asyncdispatch is really unpredictable, i just added "echo()" near exception generations in recvInto and got absolutely another error |
18:29:03 | cheatfate | dom96, it looks like asyncdispatch didn't allow any modifications for it and will work only with its current state... |
18:29:35 | cheatfate | dom96, and this is not good, imho |
18:34:25 | cheatfate | dom96, 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:57 | doering | when I have examples that can make the compiler segfault, or generate invalid c code, where should I post them? |
18:39:26 | cheatfate | doering, fill an issues on github |
18:39:47 | cheatfate | doering, https://github.com/nim-lang/Nim/issues |
18:42:22 | Arrrr | Would be nice if the compile told you why certain identifier is ambiguous, like "moduleA.myId, moduleB.myId" |
18:42:27 | ephja | will 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:09 | Arrrr | Doesn't it work? |
18:56:46 | ephja | nah |
18:57:23 | Arrrr | like, let a = (x: 123, y: 456) ? |
19:01:20 | ephja | I was referring to tuple types. maybe it would be a bad idea to support "var a: (x: int, y: int)" too |
19:02:01 | Arrrr | Yes, i'd prefer to define vars like a: (x, y: int) |
19:03:14 | ephja | was that a typo? |
19:03:41 | ephja | "let a: (x: int, y: int) = (x: 1, y: 2)" |
19:04:21 | Arrrr | from tuple[x, y: int] -> (x, y: int) |
19:04:35 | Arrrr | But now that i think about it, anon procs may conflict |
19:08:10 | ephja | ok |
19:10:33 | * | yglukhov joined #nim |
19:12:27 | ephja | yglukhov: just when I was checking out nimsl. hi |
19:12:30 | ephja | interesting project |
19:16:49 | cheatfate | dom96, https://github.com/nim-lang/Nim/issues/3919 |
19:21:19 | dom96 | Are you sure the crash doesn't simply disappear because you removed the code which receives the data? |
19:21:34 | yglukhov | ephja: 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:52 | ephja | yglukhov: ok. can basic mvp shaders for OpenGL 3 be created? |
19:47:45 | * | chrisheller joined #nim |
19:47:56 | ephja | I don't see out/in in the output, so maybe not |
19:48:52 | doering | the problem with nimsl is, that shader stages do not really map very well to functions |
19:49:31 | doering | so 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:20 | yglukhov | ephja, 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:22 | doering | yglukhov, I have support for uniforms varyings attributs samplers instancing in my shader macro |
19:51:27 | doering | and it works |
19:51:56 | yglukhov | doering, can you show it please? =) |
19:52:14 | doering | yes if you are willing to spend some time |
19:52:41 | doering | to get it runnig it needs some time, but you can see the examples if you want |
19:53:02 | yglukhov | yeah, i just want to get the basic feeling of how it looks like |
19:53:11 | doering | https://github.com/krux02/opengl-sandbox |
19:53:22 | doering | I have no readme yet or any explanation |
19:53:30 | doering | but in examples you can see a bit |
19:54:34 | doering | sandbox.nim is probably the best to get started |
19:55:01 | doering | deferred_shading.nim is also worth looking at |
19:55:16 | doering | and mesh_loading_tiny.nim |
19:55:35 | doering | the rest is just something i started that doesn't work at all |
19:56:26 | doering | In deferred shading, there is a classical deferred shading pipeline, with hundreds of lights that get rendered with instancing |
19:58:23 | yglukhov | ah 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:12 | doering | not really |
19:59:50 | ephja | ok but attribute and varying were deprecated at some point, right? but I guess it's not difficult to migrate to in/out |
19:59:56 | doering | there is no reason, why I wouldn't be able to integrate nimsl in my project, too |
20:00:06 | doering | the projects to orthogonal things |
20:00:16 | doering | and I think together they would really be good |
20:01:09 | * | alexsystemf_ joined #nim |
20:01:15 | doering | yes if you are interested to use any core opengl (3.2 onwards) you need to use in/out |
20:01:32 | ephja | I'll keep an eye on the libraries |
20:01:50 | doering | but the proc is still called glAttrib |
20:02:24 | yglukhov | true. my point is codegen, while your point is cpu+gpu interop. there's no conflict here =) |
20:02:31 | doering | you can staar it ;) |
20:02:32 | ephja | I'd like to use vulkan when a driver becomes available, but GLSL can still be used, right? |
20:02:59 | ephja | I have starred them |
20:03:23 | yglukhov | doering: do older gl versions allow in/out? |
20:03:39 | doering | sorry old opengl does not support in/out |
20:05:11 | yglukhov | ok, different codegen behavior then. im writing a game now, and targeting gl es 2.0, so can't use in/out unconditionally |
20:06:08 | yglukhov | but it should be easy to handle anyway |
20:06:12 | doering | My goal is to make advanced features of the rendering pipeline easy to use |
20:06:34 | doering | so I do not target old opengl versions |
20:07:08 | yglukhov | and my goal is to replace glsl (and maybe hlsl) with nim |
20:07:10 | yglukhov | =) |
20:07:13 | doering | but since everything is macro based, there should be an opetion, that the generated parts of glsl are glsl 1.2 compatible |
20:09:51 | doering | I could allow an optional argument to the macro that sets the shader version |
20:10:37 | doering | and 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:29 | doering | yglukhov: I made some screenshots http://imgur.com/a/h9uwi |
20:26:04 | yglukhov | cool! |
20:29:59 | * | McSpiros quit (Quit: Page closed) |
20:30:14 | federico3 | nice |
20:33:07 | cheatfate | dom96, 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:24 | cheatfate | dom96, 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:36 | dom96 | cheatfate_: 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:58 | cheatfate_ | dom96, you think, if WSARecv completed immediatly with "0" result your callback will not be called? |
21:24:00 | cheatfate_ | dom96, but you must read your comment at https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncdispatch.nim#L766-L768 |
21:24:47 | cheatfate_ | dom96, because callback would be called even if WSARecv completed immediately |
21:28:09 | cheatfate_ | 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:08 | federico3 | there 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) |