| 00:06:54 | * | Demon_Fox quit (Ping timeout: 246 seconds) |
| 00:10:32 | * | Demon_Fox joined #nim |
| 00:14:31 | * | dddddd quit (Ping timeout: 250 seconds) |
| 00:18:45 | * | vasher_ quit (Quit: Connection closed for inactivity) |
| 00:24:42 | * | jaco60 quit (Ping timeout: 256 seconds) |
| 00:26:57 | * | Jehan` quit (Quit: Leaving) |
| 00:27:12 | * | johnsoft joined #nim |
| 00:31:28 | Varriount_ | Somebody said my name? |
| 00:35:01 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:38:07 | * | Varriount_ is now known as Varriount |
| 00:38:20 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 00:55:27 | * | vendethiel- quit (Ping timeout: 256 seconds) |
| 01:00:03 | * | bjz joined #nim |
| 02:42:58 | * | darkf joined #nim |
| 02:45:29 | * | dalarmmst quit (Ping timeout: 246 seconds) |
| 02:52:27 | * | MatrixBridge quit (Remote host closed the connection) |
| 02:54:31 | onionhammer | Varriount_: stuff working? |
| 02:55:45 | * | MatrixBridge joined #nim |
| 02:57:26 | * | MatrixBridge is now known as 5EXABJ6GG |
| 02:57:27 | * | MatrixBridge joined #nim |
| 02:57:28 | * | MatrixBridge quit (Remote host closed the connection) |
| 02:59:11 | reactormonk | pigmej, you tested it, right? |
| 03:00:41 | * | charmander is now known as dtscode |
| 03:11:52 | * | thaless quit (Quit: Leaving) |
| 03:27:19 | * | ozra quit (Ping timeout: 246 seconds) |
| 03:49:28 | * | vasher_ joined #nim |
| 03:54:27 | * | Demon_Fox_ joined #nim |
| 03:56:28 | * | Demon_Fox quit (Ping timeout: 252 seconds) |
| 04:05:26 | * | darkf_ joined #nim |
| 04:05:35 | * | darkf quit (Ping timeout: 248 seconds) |
| 04:07:21 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
| 04:10:33 | * | darkf_ is now known as darkf |
| 04:23:50 | * | milosn quit (Ping timeout: 256 seconds) |
| 04:26:07 | * | elbow_jason quit (Remote host closed the connection) |
| 04:26:37 | * | milosn joined #nim |
| 04:27:36 | * | zezba9000 left #nim (#nim) |
| 04:28:22 | * | vendethiel joined #nim |
| 04:30:05 | * | woadwarr_ joined #nim |
| 04:42:12 | * | woadwarrior joined #nim |
| 04:44:31 | * | ddl_smurf quit (Quit: ddl_smurf) |
| 04:45:11 | * | woadwarr_ quit (Ping timeout: 265 seconds) |
| 05:40:25 | * | woadwarr_ joined #nim |
| 05:42:45 | * | woadwarrior quit (Ping timeout: 256 seconds) |
| 05:43:32 | * | vendethiel quit (Ping timeout: 252 seconds) |
| 05:58:45 | * | vasher_ quit (Quit: Connection closed for inactivity) |
| 06:13:09 | * | jszymanski quit (Quit: computer sleeps...) |
| 06:13:18 | * | jszymanski joined #nim |
| 06:13:28 | * | vendethiel joined #nim |
| 06:36:01 | * | vendethiel quit (Ping timeout: 256 seconds) |
| 06:41:30 | * | vendethiel joined #nim |
| 06:49:07 | * | woadwarrior joined #nim |
| 06:49:24 | * | woadwarr_ quit (Ping timeout: 265 seconds) |
| 06:56:05 | * | woadwarrior quit (Ping timeout: 246 seconds) |
| 07:05:19 | * | vendethiel quit (Ping timeout: 248 seconds) |
| 07:19:43 | * | dalarmmst joined #nim |
| 07:25:06 | * | Demon_Fox joined #nim |
| 07:26:07 | * | Demon_Fox_ quit (Ping timeout: 248 seconds) |
| 07:40:44 | * | vendethiel joined #nim |
| 07:46:49 | * | fowl quit (Read error: Connection reset by peer) |
| 07:53:12 | * | fowl joined #nim |
| 08:01:51 | * | vendethiel quit (Ping timeout: 246 seconds) |
| 08:02:02 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
| 08:04:09 | * | vendethiel joined #nim |
| 08:10:08 | * | yglukhov__ joined #nim |
| 08:13:55 | * | bjz quit (Read error: Connection reset by peer) |
| 08:18:37 | * | bjz joined #nim |
| 08:26:53 | * | milosn quit (Ping timeout: 252 seconds) |
| 08:28:03 | * | milosn joined #nim |
| 08:29:05 | * | vendethiel quit (Ping timeout: 244 seconds) |
| 08:35:17 | * | woadwarrior joined #nim |
| 08:44:54 | * | gokr joined #nim |
| 08:50:21 | * | vendethiel joined #nim |
| 08:55:21 | * | Ven joined #nim |
| 09:04:58 | * | gunn quit (Ping timeout: 276 seconds) |
| 09:11:29 | * | milosn quit (Read error: Connection reset by peer) |
| 09:11:41 | * | milosn joined #nim |
| 09:15:44 | * | filcuc joined #nim |
| 09:24:05 | * | milosn quit (Ping timeout: 252 seconds) |
| 09:24:56 | * | milosn joined #nim |
| 09:29:24 | * | strcmp1 quit (Quit: Leaving) |
| 09:35:54 | * | 5EXABJ6GG quit (Remote host closed the connection) |
| 09:36:19 | * | MatrixBridge joined #nim |
| 10:01:15 | * | darkf_ joined #nim |
| 10:03:27 | * | darkf quit (Ping timeout: 248 seconds) |
| 10:09:50 | * | filcuc quit (Ping timeout: 244 seconds) |
| 10:29:48 | * | ddl_smurf joined #nim |
| 10:31:19 | * | jaco60 joined #nim |
| 10:36:30 | * | dddddd joined #nim |
| 10:39:35 | * | ozra joined #nim |
| 10:48:56 | pigmej | reactormonk: thing-at-point ? |
| 10:49:53 | pigmej | or nimsuggest changes ? I tested both, and I'm using both if so |
| 10:58:52 | * | filwit joined #nim |
| 11:04:12 | * | vasher_ joined #nim |
| 11:17:44 | * | filwit quit (Quit: Leaving) |
| 11:27:20 | * | Trustable joined #nim |
| 11:27:25 | * | Trustable quit (Remote host closed the connection) |
| 11:28:05 | * | Trustable joined #nim |
| 11:29:54 | * | BitPuffin|osx joined #nim |
| 11:33:31 | * | kas joined #nim |
| 11:38:04 | * | kas quit (Ping timeout: 255 seconds) |
| 11:42:06 | * | thales joined #nim |
| 11:42:30 | * | thales is now known as Guest42514 |
| 11:45:37 | * | BitPuffin|osx quit (Remote host closed the connection) |
| 11:45:50 | * | BitPuffin|osx joined #nim |
| 12:12:17 | * | arnetheduck joined #nim |
| 12:20:07 | r-ku | Araq: is it possible to hire you to write bnf grammar for nim for a reasonable price? |
| 12:21:24 | Araq | hrm, I guess that is the case |
| 12:21:50 | Araq | what is a BNF for you? |
| 12:22:32 | r-ku | that https://paste2box.com/6B20sg/LrcaVeSImfw#/JMepUbd9HJ6GiMuRDssjjN6r1RLoS5AC5L0Af1UcSwI/HzzAAqGx.txt |
| 12:22:49 | r-ku | damn wrong file, sorry |
| 12:23:06 | r-ku | Araq: that https://paste2box.com/FaPKRg/_EXnnMlApM4#/VTDH7wJvLOjEKsos1thoPexPqHn4Toc-cDboksCKVR8/WfNLKTnk.txt |
| 12:23:55 | * | darkf_ is now known as darkf |
| 12:24:54 | r-ku | its input for this https://github.com/JetBrains/Grammar-Kit |
| 12:27:39 | * | matkuki joined #nim |
| 12:29:55 | r-ku | anyhow should you agree ideally i think i arrange payment, after that whenever you are done send PR for https://github.com/r-ku/intelli-nim if thats ok |
| 12:31:52 | Araq | well I don't have time for this, I'd prefer to just help you without payment ;-) |
| 12:32:59 | Araq | the most interesting question is what to do with indentation based parsing. how does the Python parser handle it? |
| 12:33:18 | r-ku | i fear it would be more time consuming and end result be of lesser quality. besides im lazy ;) |
| 12:33:32 | r-ku | python turns ident/dedent into tokens afaik |
| 12:33:34 | r-ku | at least intellij plugin for python does |
| 12:33:55 | Araq | how does Haskell do it? |
| 12:34:03 | r-ku | for someone who never written a grammar in his life this is very confusing as you may have guessed hehe |
| 12:34:13 | r-ku | idk, dont even know what haskell looks like |
| 12:34:44 | Araq | doc/grammar.txt already exists, you only need to adapt it |
| 12:35:09 | Araq | but it uses my own extensions cause EBNF is stupid :P |
| 12:35:24 | Araq | that said, these extensions are trivial sugar you can do without |
| 12:35:44 | r-ku | yeah.. i saw grammar in manual, thought maybe its incomplete, but even if 100% complete i could not understand it from the first line (ind/ded) |
| 12:36:03 | Araq | it's complete, it's generated from the parser |
| 12:36:34 | r-ku | oh wow, i would not have thought the reverse process was possible. well great |
| 12:36:50 | Araq | but the IND{>} IND{=} DED tokens are problematic |
| 12:38:22 | Araq | and then of course we also use an attributed grammar (iirc that's the term) |
| 12:38:27 | Araq | section(p) = COMMENT? p / (IND{>} (p / COMMENT)^+IND{=} DED) |
| 12:38:43 | Araq | where rules can take other rules |
| 12:38:50 | Araq | but again, not hard to inline away |
| 12:39:24 | r-ku | yeah well for you ;) this is exactly why i rather pay you :D |
| 12:39:44 | matkuki | A little help please. What's the correct conversion from a Python C function 'PyObject* PyErr_Format(PyObject *exception, const char *format, ...)' to Nim? |
| 12:39:45 | matkuki | 'proc PyErr_Format*(exception: PyObjectPtr, format: cstring, rest: varargs[expr]): PyObjectPtr' doesn't seem to be right, compiler gives: 'Error: internal error: getTypeDescAux(tyExpr)' ! |
| 12:40:03 | arnetheduck | hi, is there a convention for constructors in a type hierarchy? it looks like the convention for constructors is newXxx, but that doesn't chain well for a deep hierarchy.. |
| 12:40:58 | Araq | arnetheduck: I think the convention is proc init(x: var Foo) and proc newFoo(): Foo = init(result) for the reasons you outline |
| 12:41:21 | Araq | matkuki: depends on whether you want to wrap or re-implement |
| 12:41:52 | matkuki | Araq: wrap |
| 12:41:54 | arnetheduck | oki, so plain init without type name, noted & thanks |
| 12:42:09 | Araq | r-ku: can you embed *actions* into the grammar? |
| 12:42:22 | r-ku | no idea |
| 12:42:29 | r-ku | no idea what action is in this context either |
| 12:43:33 | Araq | matkuki: then the dots simply become the .varargs pragma |
| 12:43:45 | Araq | and c2nim would have told you too :-) |
| 12:44:06 | matkuki | thanks, let me try it |
| 12:45:00 | Araq | r-ku: can you give me the haskell implementation? |
| 12:45:34 | r-ku | ill look it up |
| 12:46:40 | matkuki | Araq: beautiful, it works. Thanks for reminding me of c2nim! |
| 12:51:40 | r-ku | Araq: seems all these plugins have parser implemented themselves, not through grammar-kit. two of them are incomplete abandonware. the seemingly complete parser here if its of any use https://github.com/carymrobbins/intellij-haskforce/blob/master/gen/com/haskforce/parser/HaskellParser.java |
| 12:52:44 | r-ku | err actually comment says its generated but im yet to find Haskell.bnf :| |
| 12:54:17 | Araq | r-ku: well as a first version I think you can simply map IND{>}, IND{=} to newline followed by optional spaces |
| 12:54:40 | Araq | and DED to nothing or perhaps a lookahead non-consuming \n |
| 12:57:47 | r-ku | i guess that could work. also see this: module = stmt ^* (';' / IND{=}) is ^ and / also non-standard stuff? |
| 12:58:54 | r-ku | ah Araq here is haskell bnf grammar: https://github.com/carymrobbins/intellij-haskforce/blob/master/src/com/haskforce/Haskell.bnf |
| 12:59:30 | Araq | r-ku: / is ordered choice, ^* is explained in the manual |
| 13:00:44 | r-ku | found it |
| 13:06:42 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:14:26 | matkuki | UUUHHH, colored text during compilation in 0.11.3. Nice! |
| 13:15:39 | Araq | https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-17800010.3 -.- |
| 13:15:55 | Araq | Nim's way is much cleaner, IMHO |
| 13:16:31 | Araq | so .. but how does this thing do the actions in the grammar |
| 13:24:39 | Araq | WHITESPACESEMITOK="Synthetic semicolon" |
| 13:24:41 | Araq | WHITESPACELBRACETOK="Synthetic leftbrace" |
| 13:24:42 | Araq | WHITESPACERBRACETOK="Synthetic rightbrace" |
| 13:25:01 | * | silven quit (Ping timeout: 264 seconds) |
| 13:25:26 | * | silven joined #nim |
| 13:27:59 | Araq | https://github.com/carymrobbins/intellij-haskforce/blob/master/src/com/haskforce/parsing/_HaskellParsingLexer.flex#L184 |
| 13:28:45 | * | vasher_ quit (Quit: Connection closed for inactivity) |
| 13:30:22 | Araq | so now we know... it uses a customized lexer. Meh. |
| 13:30:24 | Araq | bbl |
| 13:32:18 | * | yglukhov__ quit (Quit: Be back later ...) |
| 13:48:50 | * | boopsiesisaway is now known as boopsies |
| 13:57:50 | * | zaquest is now known as ace15 |
| 13:59:13 | * | ace15 is now known as zaquest |
| 14:02:24 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 14:07:17 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]) |
| 14:12:14 | * | filcuc joined #nim |
| 14:15:30 | * | Ven joined #nim |
| 14:16:40 | * | apense joined #nim |
| 14:38:07 | * | darkf quit (Quit: Leaving) |
| 14:39:48 | * | filcuc quit (Quit: Konversation terminated!) |
| 14:41:25 | * | kas joined #nim |
| 14:44:34 | * | apense quit (Read error: Connection reset by peer) |
| 14:44:58 | * | apense joined #nim |
| 14:45:48 | * | kas quit (Ping timeout: 264 seconds) |
| 14:50:24 | * | kas joined #nim |
| 15:05:20 | * | askatasuna joined #nim |
| 15:07:07 | arnetheduck | btw, are the any guidelines to choose between the "return x" and "result = x" styles? |
| 15:12:47 | def- | arnetheduck: prefer "result = x" as it doesn't change control flow, use "return x" when necessary |
| 15:13:32 | def- | for very short procs it can be clearer to return the result directly, e.g. "proc f(x: int) = x * 2" |
| 15:38:50 | * | ddl_smurf quit (Quit: ddl_smurf) |
| 15:40:28 | * | kas quit (Ping timeout: 252 seconds) |
| 15:49:12 | * | Matthias247 joined #nim |
| 15:50:58 | * | fioco joined #nim |
| 15:52:20 | * | filcuc joined #nim |
| 15:53:58 | * | fioco left #nim (#nim) |
| 16:00:49 | * | Arrrr joined #nim |
| 16:08:45 | * | thepreacher joined #nim |
| 16:10:18 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:10:42 | * | ddl_smurf joined #nim |
| 16:13:08 | * | ddl_smurf quit (Client Quit) |
| 16:13:56 | * | filcuc quit (Ping timeout: 265 seconds) |
| 16:14:20 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 16:22:27 | ekarlso | arnetheduck: norsk ? |
| 16:32:36 | * | thepreacher quit (Remote host closed the connection) |
| 16:34:25 | * | thepreacher joined #nim |
| 16:34:29 | * | boopsies is now known as boopsiesisaway |
| 16:39:32 | reactormonk | pigmej, sweet. wanna create tests? :-@s9 |
| 16:40:02 | * | askatasuna quit (Ping timeout: 265 seconds) |
| 16:41:31 | reactormonk | how do I follow a symlink in nim? |
| 16:47:36 | * | dalarmmst quit (Ping timeout: 264 seconds) |
| 16:50:14 | Arrrr | just follow the money trail |
| 16:51:19 | * | dalarmmst joined #nim |
| 16:52:40 | * | thepreacher quit () |
| 16:57:56 | * | irezvov joined #nim |
| 16:59:22 | * | arnetheduck quit (Ping timeout: 255 seconds) |
| 17:00:55 | * | woadwarrior joined #nim |
| 17:02:39 | * | antranigv joined #nim |
| 17:03:38 | antranigv | when the Nim compiler compiles it self, does it get the same hash fingerprint? did anyone try that |
| 17:03:38 | antranigv | ? |
| 17:07:56 | reactormonk | antranigv, it should |
| 17:08:34 | Xe | the build id in gcc might fuck with that |
| 17:08:37 | reactormonk | ... the compiler does the usual old -> new -> new |
| 17:10:37 | antranigv | Xe, sure? I did try to check another compiler, which, again uses GCC, and it did work (I did get the same hash fingerprint) |
| 17:10:48 | * | yglukhov__ joined #nim |
| 17:12:14 | * | thepreacher joined #nim |
| 17:13:14 | avsej | dom96, Araq: https://github.com/nim-lang/Nim/pull/3013 |
| 17:15:14 | * | yglukhov__ quit (Ping timeout: 246 seconds) |
| 17:17:11 | reactormonk | avsej, yeah yeah |
| 17:22:45 | avsej | reactormonk, do you know what does this comment means? https://github.com/nim-lang/Nim/blob/devel/compiler/llstream.nim#L15 is libreadline support is going to be deprecated or something like that? |
| 17:23:13 | Arrrr | https://github.com/nim-lang/Nim/blob/devel/doc/readme.txt "Nim's documenation system" |
| 17:23:24 | reactormonk | avsej, it pretty much tells you that gnureadline is used by default unless by windows or if you wanna force it |
| 17:23:54 | avsej | it does not compiles with -d:useGnuReadline |
| 17:24:02 | reactormonk | huh |
| 17:24:05 | reactormonk | now that's a problem |
| 17:24:16 | reactormonk | you on windows? |
| 17:24:33 | avsej | Hint: linenoise [Processing] |
| 17:24:33 | avsej | Error: unhandled exception: invalid integer: -3 [ValueError] |
| 17:24:33 | avsej | FAILURE |
| 17:24:38 | avsej | fedora linux |
| 17:25:11 | avsej | last three lines of `compiler/nim1 c -d:release -d:useGnuReadline compiler/nim.nim` |
| 17:26:07 | * | kas joined #nim |
| 17:33:17 | reactormonk | huh, lemme see if it still boots fine here |
| 17:33:30 | * | yglukhov__ joined #nim |
| 17:34:04 | reactormonk | can confirm, someone fucked up |
| 17:36:32 | reactormonk | avsej, honestly, not sure if that's still relevant for booting, because nim i is dead. On another note, it should compile. |
| 17:37:35 | * | superfunc joined #nim |
| 17:37:41 | avsej | the error does not give me any clue where to search |
| 17:37:59 | * | yglukhov__ quit (Ping timeout: 252 seconds) |
| 17:38:19 | avsej | `nim i` dead because it technically not possible to continue its development, or just lack of maintainer? |
| 17:46:53 | * | Demon_Fox quit (Quit: Leaving) |
| 17:47:25 | * | antranigv left #nim ("ISON vahe labelle Waithamai antranigv norayr noch noch^off sssilver") |
| 17:47:57 | avsej | I see it in GSOC ideas: https://github.com/nim-lang/Nim/wiki/GSoC-2015-Ideas#create-a-new-repl-for-nim-using-tinycc. Does anybody works on it? |
| 17:51:24 | avsej | nothing from nim project was accepted this year |
| 18:07:46 | reactormonk | we know :-( |
| 18:14:42 | Arrrr | Google doesn't want competitors |
| 18:18:21 | federico3 | indeed |
| 18:18:51 | * | ddl_smurf joined #nim |
| 18:22:44 | * | thepreacher quit (Remote host closed the connection) |
| 18:34:14 | * | elliot` joined #nim |
| 18:35:29 | elliot` | Hi, I was wondering about sets in nim. I just read in the manual that sets are bitvectors. Does that mean a set of uint32's would take 4 gigabytes of memory? How would I represent such a set in nim? |
| 18:36:27 | reactormonk | elliot`, you probably want a hashset / table for that |
| 18:37:47 | elliot` | Hashing int's is kinda stupid ... is there a way to just sort the ints when I put them in the set so I can use binary search to find them? |
| 18:45:03 | Arrrr | http://nim-lang.org/docs/intsets.html |
| 18:45:46 | Arrrr | And also http://nim-lang.org/docs/algorithm.html#sort,openArray[T],proc(T,T) |
| 18:47:43 | elliot` | The former is what I was looking for, thanks |
| 18:47:53 | * | milosn quit (Quit: Lost terminal) |
| 18:48:36 | elliot` | Another thing: in nim, how easy is it to write distributed computing software? Say I want to do a MAP operation over a hundred processors, would I have to do anything special? |
| 18:49:14 | * | milosn joined #nim |
| 18:50:15 | * | boopsiesisaway is now known as boopsies |
| 18:50:32 | elliot` | Last, where can I find a tutorial on nim macros? |
| 18:51:19 | irezvov | elliot`: http://nim-lang.org/docs/macros.html |
| 18:51:50 | irezvov | it isn't toturial, but it contains a lot of usefull docs |
| 18:53:01 | irezvov | also you can look at macro code in nim or external modules |
| 18:53:46 | irezvov | https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1403 for example |
| 18:54:34 | irezvov | or my network macros - https://github.com/SPY/nim-memcached/blob/master/netdef.nim |
| 19:02:04 | * | milosn_ joined #nim |
| 19:02:31 | * | milosn quit (Ping timeout: 244 seconds) |
| 19:02:35 | * | elliot` left #nim ("Killed buffer") |
| 19:04:52 | * | milosn_ is now known as milosn |
| 19:07:59 | * | Arrrr quit (Quit: WeeChat 1.2) |
| 19:16:34 | * | Matthias247 joined #nim |
| 19:23:31 | * | thepreacher joined #nim |
| 19:27:47 | * | thepreacher quit (Read error: Connection reset by peer) |
| 19:28:05 | * | thepreacher joined #nim |
| 19:28:25 | pigmej | reactormonk: yeah yeah I remember about that tests ;P |
| 19:28:57 | pigmej | dom96: Maybe I have stupid question, BUT, how do I handle that sleepAsync with recv? |
| 19:29:13 | pigmej | I can't let x = socket.recv(size) or sleepAsync(15) |
| 19:35:11 | * | askatasuna joined #nim |
| 19:39:12 | tmku | there are no stupid question, pigmej |
| 19:39:21 | tmku | questions* |
| 19:39:44 | pigmej | tmku: there are :) |
| 19:45:44 | dom96 | pigmej: var recvFut = socket.recv(size); var timeoutFut = sleepAsync(15); await recvFut or timeoutFut; if not recvFut.finished: echo("timed out") |
| 19:46:00 | pigmej | ah, this way |
| 19:46:09 | pigmej | thx |
| 19:46:59 | irezvov | dom96: hi, have you seen my code with not working raise statement which i've posted on friday? |
| 19:47:11 | dom96 | irezvov: nope |
| 19:47:27 | irezvov | dom96: https://gist.github.com/SPY/d4a34cc0771308753430 |
| 19:47:54 | irezvov | first version works, second - no |
| 19:48:06 | dom96 | irezvov: yeah, there are still bugs with 'await' in try catch statements. |
| 19:48:46 | dom96 | use var fut = memcache.get(); if fut.failed: # error happened. |
| 19:49:10 | dom96 | as a workaround for now |
| 19:49:27 | irezvov | my "manual" version works anyway |
| 19:49:43 | irezvov | so it is not problem |
| 19:50:30 | irezvov | looks like raise statement doesn't fail future, but just throws exception |
| 19:51:08 | fowl | Hey irezvov my apologies |
| 19:51:29 | fowl | I said i would help the other night but i fell asleep |
| 19:51:52 | irezvov | fowl: sleeping is more important :) |
| 19:57:34 | * | kas quit (Remote host closed the connection) |
| 19:59:27 | dom96 | irezvov: it does if you mark your proc "{.async.}" |
| 19:59:27 | irezvov | btw, i've dived in asyncdispatcher code and understood how it works. it has helped me to write async freer |
| 20:00:17 | irezvov | dom96: does what? |
| 20:00:45 | dom96 | irezvov: fails the future |
| 20:00:59 | irezvov | yeah, it should :) |
| 20:03:07 | irezvov | as i've understood this case handled there - https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1211 |
| 20:03:43 | irezvov | but this catch case doesn't work properly |
| 20:04:16 | irezvov | maybe because of iterator stuff |
| 20:05:17 | dom96 | irezvov: yep, that's where it's done |
| 20:05:26 | dom96 | irezvov: can you give me some code which shows that it doesn't work? |
| 20:06:01 | irezvov | ofc, https://github.com/SPY/nim-memcached/blob/master/memcacheasync.nim this file |
| 20:06:25 | irezvov | but you needed memcache server for test |
| 20:07:45 | irezvov | i will push test case with fail part now |
| 20:09:02 | * | aziz joined #nim |
| 20:10:10 | Araq | reactormonk: I tested the new linenoise on Linux. how come it doesn't work for you? |
| 20:10:40 | irezvov | dom96: done |
| 20:11:54 | dom96 | irezvov: Well... I would like some shorter code... |
| 20:12:35 | irezvov | dom96: i'll try to write short snippet |
| 20:12:46 | dom96 | thank you |
| 20:19:25 | irezvov | dom96: done, https://gist.github.com/SPY/5b35c1d9582e3f30c15f |
| 20:20:58 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 20:26:08 | dom96 | irezvov: that's really odd |
| 20:26:14 | irezvov | and i have another question: Does "result" treated special way in quote block? |
| 20:26:43 | Araq | no, but 'quote' uses a hygienic template under the hood |
| 20:27:03 | Araq | don't use quote, use templates and getAst instead |
| 20:27:11 | fowl | You have to do smthin like let res = ident"result" |
| 20:28:03 | irezvov | i workaround it with special symbol for result, but it looks odd |
| 20:28:16 | irezvov | thx for clarification |
| 20:29:09 | pigmej | hmm, dom96 is there any send / recv from / to buffer in asyncnet / |
| 20:29:09 | pigmej | ? |
| 20:29:18 | irezvov | Araq: maybe it deserve special notice in quote macro description? |
| 20:29:28 | dom96 | irezvov: please report it on github in the meantime. |
| 20:29:29 | Araq | sure |
| 20:29:38 | pigmej | I just see recvLineInto, but my data is not line based |
| 20:30:11 | pigmej | I wish I could make zero copy thingy there if possible |
| 20:30:18 | dom96 | pigmej: asyncdispatch.recvInto |
| 20:30:31 | dom96 | but the *Into procedures will change |
| 20:30:45 | pigmej | and what about sendFrom ? |
| 20:30:54 | pigmej | (most preferably buffer or asyncFile) |
| 20:31:19 | dom96 | not spported |
| 20:31:21 | dom96 | *supported |
| 20:32:25 | pigmej | hmm, |
| 20:32:38 | pigmej | any plans for that or not supported because not possible ? |
| 20:32:54 | dom96 | haven't thought about it |
| 20:33:07 | dom96 | so no plans |
| 20:33:12 | dom96 | and not sure if it's possible |
| 20:33:38 | pigmej | k |
| 20:34:47 | pigmej | I needed to write proxy like thingy, for one experiment, but I will check how nim performs even with that extra memory cop |
| 20:34:49 | pigmej | copy* |
| 20:35:12 | irezvov | dom96: https://github.com/nim-lang/Nim/issues/3014 |
| 20:35:29 | dom96 | irezvov: thanks! |
| 20:39:00 | * | Guest42514 quit (Quit: Leaving) |
| 20:40:56 | dom96 | It's segfaulting in popCurrentException |
| 20:41:02 | dom96 | looks like a Nim bug. |
| 20:42:40 | dom96 | Araq: Mind taking a look? I left a comment with the gdb back trace. |
| 20:43:12 | * | thepreacher quit (Remote host closed the connection) |
| 20:43:18 | * | filcuc joined #nim |
| 20:46:52 | Araq | meh, I'm drunk, but ok |
| 20:48:15 | irezvov | dom96: why is stacktrace switched off for callback wrapper? ( #{.push stackTrace: off.} ) |
| 20:49:53 | Araq | oh ffs, can't you give 'cb' a decent name? |
| 20:50:03 | Araq | it always crashes in "cb" |
| 20:50:23 | Araq | and no, "decent name" doesn't mean "callback" |
| 20:51:07 | * | thepreacher joined #nim |
| 20:52:42 | dom96 | Araq: what do you suggest? |
| 20:52:59 | dom96 | irezvov: because 'cb' gets called a lot |
| 20:53:05 | Araq | getAsyncCb |
| 20:53:18 | Araq | just append Cb to the thing you wrap |
| 20:54:16 | irezvov | but it could be more then one cb for function |
| 20:54:40 | irezvov | *per function |
| 20:56:52 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 20:56:53 | * | Ven joined #nim |
| 20:57:57 | dom96 | Araq: what? |
| 20:58:07 | dom96 | 'cb' is used for all async procedures |
| 20:58:31 | Araq | yes and the async procedure has a name |
| 20:58:40 | Araq | so use the name |
| 20:58:49 | Araq | and derive the callback's name from that |
| 20:59:06 | Araq | so we get meaningful stack traces |
| 21:00:41 | irezvov | even JS has good stack trace for promise code :) |
| 21:04:00 | dom96 | so you want me to generate a 'cb' for each async procedure? |
| 21:04:32 | Araq | I thought that's what you do already |
| 21:05:32 | Araq | template createCb |
| 21:07:07 | * | irezvov quit (Ping timeout: 246 seconds) |
| 21:08:37 | dom96 | hrm, you're right. |
| 21:09:21 | dom96 | I already pass a name in there. |
| 21:09:31 | dom96 | Too bad I can't just convert it into an ident in the template from a string. |
| 21:10:01 | Araq | yeah so pass another thing to the template |
| 21:10:14 | dom96 | ugh, it's confusing enough |
| 21:12:49 | * | dalarmmst quit (Remote host closed the connection) |
| 21:18:48 | * | johnsoft quit (Ping timeout: 246 seconds) |
| 21:19:01 | * | johnsoft joined #nim |
| 21:28:50 | * | aziz quit (Read error: Connection reset by peer) |
| 21:29:09 | * | thepreacher quit () |
| 21:31:37 | * | jszymanski quit (Quit: computer sleeps...) |
| 21:35:43 | * | askatasuna quit (Ping timeout: 276 seconds) |
| 21:38:30 | * | Trustable quit (Quit: Leaving) |
| 21:39:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:41:48 | * | filcuc quit (Quit: Konversation terminated!) |
| 21:42:13 | * | thales joined #nim |
| 21:42:37 | * | thales is now known as Guest54694 |
| 21:48:19 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:55:14 | * | Kingsquee joined #nim |
| 21:57:56 | reactormonk | Araq, I have on idea. Which linux? |
| 21:58:15 | Araq | mint, 64bits |
| 21:58:43 | dom96 | Araq: Any ideas what the cause of that crash may be? |
| 21:58:59 | reactormonk | Araq, got an Arch image somewhere? |
| 22:00:30 | * | bjz joined #nim |
| 22:01:20 | * | bjz quit (Client Quit) |
| 22:02:08 | Araq | dom96: it calls popCurrentException twice |
| 22:02:14 | Araq | but pushes only once |
| 22:02:31 | Araq | because it re-enters the callback |
| 22:02:40 | Araq | but the details escape me |
| 22:02:47 | dom96 | I see |
| 22:02:57 | dom96 | Comment that on github please |
| 22:03:37 | * | bjz joined #nim |
| 22:07:31 | * | heinrich5991 quit (Ping timeout: 250 seconds) |
| 22:10:23 | * | heinrich5991 joined #nim |
| 22:18:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 22:20:35 | * | mnemonikk quit (Ping timeout: 258 seconds) |
| 22:20:44 | * | mnemonikk_ joined #nim |
| 22:21:14 | * | heinrich5991 quit (Ping timeout: 252 seconds) |
| 22:21:36 | * | profan quit (Ping timeout: 252 seconds) |
| 22:22:54 | * | heinrich5991 joined #nim |
| 22:26:44 | * | Guest54694 quit (Ping timeout: 246 seconds) |
| 22:43:39 | * | vasher_ joined #nim |
| 22:58:56 | * | bjz joined #nim |
| 23:03:19 | * | superfunc quit (Quit: Lost terminal) |
| 23:04:29 | * | testingg joined #nim |
| 23:05:32 | * | Guest54694 joined #nim |
| 23:06:07 | * | dddddd quit (Ping timeout: 255 seconds) |
| 23:10:55 | * | testingg quit (Quit: Page closed) |
| 23:12:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 23:28:44 | * | boopsies is now known as boopsiesisaway |
| 23:29:12 | Araq | dom96: it works with this popCurrentException |
| 23:29:22 | Araq | proc popCurrentException {.compilerRtl, inl.} = |
| 23:29:24 | Araq | if currException != nil: |
| 23:29:25 | Araq | currException = currException.parent |
| 23:30:07 | Araq | but by construction there is a pop for every push. No clue how can this ever happen. |
| 23:30:26 | Araq | tried a couple of convoluted control flow constructs |
| 23:30:39 | Araq | they all produce the correct control flow. |
| 23:31:11 | Araq | there is no way in hell I can dream up as convoluted control flow as async produces |
| 23:39:32 | * | vendethiel quit (Ping timeout: 246 seconds) |
| 23:44:12 | * | gokr quit (Quit: Leaving.) |
| 23:47:43 | reactormonk | Dunno, imo async needs to work with futures otherwise you're going to hell and back with exceptions |
| 23:48:10 | Araq | no idea what that means |
| 23:48:36 | reactormonk | If you have an async call, you get a future back, which is an either between a result or an exception |
| 23:48:45 | * | thepreacher joined #nim |
| 23:49:03 | Araq | and what do you think we do? |
| 23:49:10 | reactormonk | ... which would basically be a case object success: T fail: Exception (roughly) |
| 23:49:29 | reactormonk | You don't have any exceptions anymore to handle. |
| 23:52:28 | * | dddddd joined #nim |