00:00:10 | CodeVance | toif your lazy use converters if you aren't lazy then wrap the proc |
00:00:27 | CodeVance | exelotl |
00:01:40 | stefanos82 | Araq, out of curiosity: did you ever use OCaml? If yes, what role did it play to your coding as a programmer, let alone as a researcher? |
00:04:27 | * | dddddd quit (Remote host closed the connection) |
00:05:22 | Araq | never really used it, its syntax was dynamite for me. However, I did use Standard ML |
00:05:55 | stefanos82 | I have found many similarities to Nim's syntax in so many ways. |
00:06:01 | stefanos82 | not all of them, but quite a few |
00:06:14 | stefanos82 | so far Nim has the best syntax |
00:06:26 | stefanos82 | I have even dare to say that Nim's syntax is way better than Python's |
00:06:52 | Araq | yay. :-) |
00:07:17 | Araq | the similarities to ML are due to ML's Pascal heritage and Pascal influenced Nim too. |
00:07:39 | Araq | other stuff like 'f a' for 'f(a)' were later additions |
00:07:45 | stefanos82 | I know that you used Pascal to build the first versions of it, isn't that correct? |
00:07:51 | FromGitter | <kayabaNerve> Araq: What would you think about implicit conversion support as long as it doesn't make it into the stdlib/compiler? |
00:08:14 | Araq | kayabyNerve we have lenientops in the stdlib. |
00:08:18 | FromGitter | <kayabaNerve> Meant to ask that since I'm working with a bunch of different representations of the exact same data. |
00:08:19 | stefanos82 | no implicit conversions -_- explicit is always better than implicit |
00:09:13 | Araq | stefanos82: I agree but I think it's fair if it's an explicit module import that gives you implicit conversions |
00:09:34 | FromGitter | <kayabaNerve> I mean like this: ⏎ proc myProc(x: typeX) ⏎ ⏎ implicit proc (x: typeX, y: typeY) ⏎ ... [https://gitter.im/nim-lang/Nim?at=5b493f3e641ecc065fa1571c] |
00:09:45 | FromGitter | <kayabaNerve> Completely ignore the syntax on the second proc please |
00:10:16 | stefanos82 | Araq: fair enough. Are they labeled or marked as "partially unsafe" though? Because an implicit conversion could open so many issues for you behind the scenes, without you realizing it |
00:10:44 | FromGitter | <kayabaNerve> That said, I have to go change something to SomeInteger. Couldn't find it earlier but now I have it. Thanks. |
00:10:53 | stefanos82 | this brought back some early C days with implicit value rounding and type casts -_- |
00:11:39 | FromGitter | <kayabaNerve> BTW, the reason I'm thinking of this is just because I have three number bases and it's a pain to constantly call conversions... I don't actually want it in the standard or not. Just wanted to ask about it |
00:12:26 | Araq | kayabaNerve: are you looking for Nim's "converter" keyword? |
00:13:12 | Araq | stefanos82: sometimes one needs to hack though, esp when interfacing with C that had no type discipline |
00:13:19 | FromGitter | <kayabaNerve> Possibly |
00:13:26 | Araq | and then you reach for lenientops or similar |
00:13:41 | stefanos82 | Araq: I know; that's why I mentioned above my C memories :/ |
00:14:18 | * | krux02 quit (Remote host closed the connection) |
00:16:29 | stefanos82 | Araq: btw, what is the actual objective or should I say, your ultimate mission with Nim's future? Faster compilation times or stabilizing the language by fixing its semantic design until 1.0's release? |
00:17:04 | stefanos82 | of course feel free to replace 1.0 with NG (next generation) if you like |
00:17:48 | FromGitter | <kayabaNerve> Araq: TIL! That's exactly what I was talking about. Thank you! |
00:18:18 | Araq | stefanos82: please read the github milestones for the plan :-) |
00:19:14 | stefanos82 | Araq: don't you have any TLDR; or something similar? Some terminologies are too advanced for my silly brain :/ |
00:19:44 | CodeVance | u can call it controlled implicit |
00:20:22 | CodeVance | There's also araq's musings @stefanso |
00:20:26 | CodeVance | stefanos82: |
00:21:17 | stefanos82 | actually, thanks to Araq it's not implicit nor explicit; it should be considered as complicit! |
00:21:29 | stefanos82 | because basically they are collaborating with you to do your job ;) |
00:21:39 | CodeVance | lol |
00:21:46 | CodeVance | I didn |
00:21:57 | CodeVance | didn't know of lenientops until now |
00:22:05 | stefanos82 | me neither |
00:22:12 | stefanos82 | but as you can see, I'm learning every day |
00:22:26 | CodeVance | nim isn't batteries included, It's super mech robot included |
00:23:54 | Araq | CodeVance: the musings are old though, I need to write new ones |
00:24:20 | CodeVance | I mentioned it in relation to your 'vision' |
00:25:42 | stefanos82 | Araq: I have just read about v2 milestone, about mapping the macro system to a compiler plug-in. Basically, will it work as a background service that will be communicating back and forth with the core, much like we do with RPC protocol?? |
00:26:04 | stefanos82 | weird...I inserted one "?" and printed 2 |
00:26:11 | FromGitter | <rayman22201> Pegs module is awesome btw. Exactly what I wanted. Much more clear than regex for huge log file parsing that needed. |
00:26:39 | Araq | stefanos82: that's one way of thinking about it |
00:27:07 | stefanos82 | Araq: that could increase the building process by orders of magnitude in my opinion |
00:27:31 | FromGitter | <kayabaNerve> Thanks again for converters. |
00:27:57 | Araq | we'll see about that, stefanos82. it's all pretty cacheable. |
00:28:47 | stefanos82 | I see a bright future for Nim. It goes to the right direction |
00:29:11 | stefanos82 | the best thing you have decided to do with Nim is the whole metaprogramming concept that uses macros and templates |
00:29:24 | stefanos82 | and generics, let's not forget those too! |
00:30:26 | Araq | generics should be mapped to macros :P |
00:30:38 | Araq | we'll get there... |
00:32:40 | stefanos82 | without knowing much about macros yet (I have just started reading the chapter about them), I was going to say the same thing since macros allow you to do pretty much everything |
00:38:39 | FromDiscord | <exelotl> CodeVance: thanks, I'll give that a try (I'm nearly at the metaprogramming chapter in the nim book, wasn't expecting to have to use it yet haha) |
00:39:46 | CodeVance | exelotl that isn't meta programming yet |
00:42:32 | CodeVance | TBH I don't see how generics can be mapped to macros. Unless you make every macro able to generate custom generics. Some kind of compile time hook? |
00:43:25 | zacharycarter | I think it's possible |
00:43:56 | zacharycarter | I mean - if they're possible without macros they should definitely be possible with macros |
00:44:06 | zacharycarter | not like generics need runtime info to function |
00:44:39 | zacharycarter | macros are already evaluated at compile time so |
00:45:15 | FromDiscord | <exelotl> wait using a nim template isn't metaprogramming? |
00:45:24 | CodeVance | ya you can get the same functionality of generics procs by using `any` param types and when statements |
00:45:27 | stefanos82 | the objective of Araq's is to move the macro system as a background service. |
00:45:56 | zacharycarter | templates are metaprogramming |
00:46:18 | zacharycarter | but you'll see the difference between them and macros when you get to macros |
00:46:19 | stefanos82 | so logically the macro system will be already warmed up for us *before* we start compiling actual Nim code |
00:46:26 | zacharycarter | I find templates much more usable than macros honestly |
00:46:31 | stefanos82 | therefore it *should be* considerably fast |
00:46:35 | zacharycarter | or at least - I find myself using them way more often |
00:46:36 | CodeVance | exelotl I said wrap. wrappers don't need templates. (though they might be cleaner) |
00:46:49 | Araq | no, not a "background" service. don't spread myths here. |
00:46:58 | Araq | but I need to sleep, we can talk later |
00:47:02 | Araq | good night |
00:47:07 | stefanos82 | my apologies Araq, but when you said plug-in, that's how I interpreted it |
00:47:13 | CodeVance | night |
00:47:36 | CodeVance | I see templates as compiler copy paste |
00:48:01 | * | BitPuffin quit (Remote host closed the connection) |
00:48:06 | FromDiscord | <exelotl> oh right, yeah I could just wrap it in another proc of course, just wondered if there's a more idiomatic way to do it x) |
00:48:40 | FromDiscord | <exelotl> or maybe that *is* the idiomatic way |
00:48:41 | CodeVance | there is not idiomatic. just domain specific. |
00:48:55 | FromDiscord | <exelotl> ah fair enough |
00:48:59 | CodeVance | not for nim at least |
00:50:25 | CodeVance | So your target is to make the library easy to use. if there are a bunch of functions with 0 and 1 instead of true false then it would be easier to use macros |
00:51:32 | FromDiscord | <exelotl> I really like that philosophy but it makes learning difficult because you don't even know what possibilities are available to you until you have more experience with the language |
00:51:49 | CodeVance | exelotl BTW go back and read "statement list expression" in the manual. Unless you have already done so. That explains how all the nim statements and expressions are laid out |
00:52:03 | skrylar | if you can get away with a tempmlate you should do so, because macros require effort :p |
00:52:10 | skrylar | and also suffer breakage with compiler updates |
00:52:16 | CodeVance | no they don't. not really |
00:52:27 | CodeVance | Just don't make a macro in a current project |
00:52:34 | CodeVance | make a new file |
00:52:39 | CodeVance | then compiling is much faster |
00:53:08 | FromDiscord | <exelotl> well, I'm aware that the common advice is to use the least powerful tool for the job when it comes to metaprogramming in nim |
00:53:08 | skrylar | well in rebol you just invoke parse and splat out a DSL on the spot. in nim you have to sit there and dumpTree for a while and pick apart the ASTs you get (thus, effort) |
00:53:37 | CodeVance | skrylar: hint reprAstGen |
00:53:49 | skrylar | and krux was literally talking earlier about said breakages =p |
00:53:50 | CodeVance | astgenrepr |
00:54:45 | FromDiscord | <exelotl> but yeah I really want to make a game engine that leverages the power of macros but the macro system is really daunting to me, it's one of the main reasons I'm reading the book |
00:54:48 | * | ofelas joined #nim |
00:57:05 | skrylar | its handy but mysterious :\ |
00:57:13 | CodeVance | hint astgenrepr. I don't think it gets easier. then hint repr result at the end of the macro. if it doesn't print its not valid |
00:57:28 | skrylar | it's too late to get it but it might have been nicer to just get the token stream instead inside a macro, because you can get weird shit |
00:57:45 | CodeVance | But like i said. depends on how many of the 0/1 true/false things there are |
00:57:49 | skrylar | i had a prototype of a FSM generator and the compiler got picky about pseudo function parameter groups |
00:58:25 | CodeVance | skrylar: psuedo function? |
00:59:04 | skrylar | it would accept foo(a, b, c: T, d: Y) but not foo(a, b, c: T; d: Y) |
00:59:21 | FromGitter | <rayman22201> you guys want a lisp reader macro system in Nim lol |
00:59:47 | CodeVance | rayman ther's already a list reader in nim . Nim itself XP |
00:59:51 | CodeVance | lisp |
01:00:14 | CodeVance | (echo 1,2,3,4) |
01:00:21 | FromGitter | <rayman22201> https://gist.github.com/chaitanyagupta/9324402 |
01:00:23 | FromGitter | <rayman22201> no that |
01:01:11 | FromGitter | <rayman22201> It's a type of macro that operates on the lexer instead of the parser |
01:04:10 | CodeVance | ya. You'd have to change the import the compiler for that |
01:04:13 | CodeVance | XD |
01:05:18 | FromGitter | <rayman22201> It would be a big change. I don't think Araq would go for it lol. Maybe in V2 when the compiler is all plugin based :-P |
01:08:55 | * | stefanos82 quit (Quit: Quitting for now...) |
01:34:16 | FromGitter | <kaushalmodi> exelotl: If you are somewhat familiar with Nim, you can skip to the last "9 Metaprogramming" section of the book. It starts out with very basics of templates and then macros. I happen to have just reached that section; currently on 9.4.1, 8% of the book to go (Kindle). |
01:43:54 | * | vivus quit (Quit: Leaving) |
05:08:47 | * | csgator joined #nim |
05:10:48 | * | lompik joined #nim |
05:10:55 | * | miran joined #nim |
05:17:26 | * | fastrom joined #nim |
05:36:02 | * | nsf joined #nim |
05:51:14 | * | donzx quit (Remote host closed the connection) |
05:51:36 | * | donzx joined #nim |
06:01:20 | * | csgator quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
06:25:14 | * | donzx quit (Remote host closed the connection) |
06:25:53 | * | donzx joined #nim |
06:25:53 | * | donlzx joined #nim |
06:26:26 | * | donlzx quit (Client Quit) |
06:26:30 | * | donzx quit (Client Quit) |
06:26:50 | * | lompik quit (Quit: WeeChat 2.1) |
06:26:54 | * | donlzx joined #nim |
06:36:32 | * | Vladar joined #nim |
07:11:10 | FromGitter | <tim-st> Can someone confirm that devel nim cannot compile filenames with umlauts and just hangs forever? |
07:11:26 | FromGitter | <tim-st> @Araq I think this is the problem from yesterday |
07:12:26 | * | fastrom quit (Quit: Leaving.) |
07:12:32 | FromGitter | <tim-st> nim git hash: dd47013017d75a2b1a8c80e12f273e18e86f7d72 |
07:22:29 | FromGitter | <bevo009> Just tried out the jester sample code, I get the same error on windows 10 and linux subsystem (Nim 0.18.0)...can anyone confirm? ⏎ .nimble\pkgs\jester-0.3.0\jester.nim(5, 38) Error: cannot open 'macrocache' |
07:24:52 | * | Trustable joined #nim |
07:25:15 | FromGitter | <tim-st> I think I read this requires devel |
07:25:24 | FromGitter | <bevo009> just read that |
07:25:57 | FromGitter | <bevo009> how do i downgrade to upgrade to v0.2.1 |
07:26:47 | FromGitter | <bevo009> nimble install jester 0.2.1? |
07:26:50 | FromGitter | <Varriount> @rayman22201 I'll be merging in that PR soon. I just need to test it locally. |
07:27:51 | FromGitter | <tim-st> Hm, devel can compile files with umlauts, there must be another problem :\ |
07:28:01 | FromGitter | <tim-st> really weird |
07:32:30 | FromGitter | <tim-st> Maybe the problem is: vscode+umlautsFilename; can someone try it? |
07:34:08 | FromGitter | <bevo009> well `nimble install jester 0.2.1` doesn't work, I still get 3.0...what's the correct command? |
07:34:24 | FromGitter | <tim-st> maybe ==0.2.1 ? |
07:35:22 | FromGitter | <tim-st> no |
07:36:55 | FromGitter | <tim-st> here is the example: nimble install nimgame@"> 0.5" |
07:37:36 | FromGitter | <tim-st> nimble install [email protected] |
07:38:02 | FromGitter | <bevo009> yep ta, `nimble install jester@"0.2.1"` |
07:38:15 | FromGitter | <bevo009> thanks Tim ;) |
07:38:41 | FromGitter | <bevo009> maybe I could have dropped the quotes as well |
07:40:43 | FromGitter | <tim-st> yes, seems only needed for `>` etc |
07:43:43 | FromGitter | <tim-st> but jester < 0.3.0 has security problems, only use this version for testing |
07:53:15 | FromGitter | <bevo009> now i get this error: `routes.nim(3, 1) template/generic instantiation from here ⏎ lib\core\macros.nim(384, 57) Error: undeclared identifier: 'Future'` |
07:56:07 | FromGitter | <kayabaNerve> How do I run the debug compiler (getting SIGSEGVs and no idea why) |
07:56:37 | FromGitter | <kayabaNerve> Well, to be honest, it's because I'm butchering Nim. That said, how do I run the debug compiler? |
07:57:48 | FromGitter | <kayabaNerve> By debug compiler, I mean, isn't there a way under koch to print a stack trace/line trace when a SIGSEGV occurs? |
08:01:56 | * | nsf quit (Quit: WeeChat 2.1) |
08:02:01 | FromGitter | <tim-st> compile in debug mode? |
08:02:30 | FromGitter | <tim-st> I think only in release mode information is missing |
08:03:28 | FromGitter | <bevo009> ay caramba, why doesnt this work? |
08:03:40 | FromGitter | <bevo009> maybe I should downgrade to 2.0 again |
08:08:22 | FromGitter | <bevo009> nope, that didn't work either |
08:08:24 | FromGitter | <bevo009> Shouldn't this sample code work on jester 0.2.1? |
08:08:36 | FromGitter | <bevo009> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b49af836534bc5d2e5a276c] |
08:26:38 | FromGitter | <bevo009> got it working, this is the correct example code for version 0.18.0 / 0.2.1 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b49b3bd66c1e833a9e76134] |
08:27:42 | Araq | kayabaNerve: koch temp c foo.nim |
08:28:07 | Araq | produces a debug version of the compiler, passes 'c foo.nim' to it and this debug version produces a stacktrace |
08:34:02 | * | xet7 joined #nim |
08:36:13 | FromGitter | <tim-st> Araq: I couldnt find out the problem, but there is definetly one, that for some code interrups compilation forever at devel |
08:40:00 | FromGitter | <tim-st> It seems if umlaut or ß or similiar in filename and something like this code, it fails: https://gist.github.com/tim-st/a7e4300a68e8c2b61381ff79ff71e1ca |
08:40:36 | FromGitter | <tim-st> when the filename is made normal, the same code echos 0 |
08:41:10 | FromGitter | <tim-st> if not it compiles forever |
08:45:00 | FromGitter | <tim-st> I tried other source code with special filename like `echo 1` and it worked, both things filename and source code seems related to this thing |
08:45:19 | FromGitter | <tim-st> *special filename and source code `echo 1` |
08:45:38 | * | dorelix joined #nim |
08:48:13 | Araq | tim-st: which OS? |
08:48:23 | FromGitter | <tim-st> win7x64 |
08:48:39 | FromGitter | <tim-st> gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 |
08:49:30 | FromGitter | <tim-st> Nim Compiler Version 0.18.1 [Windows: amd64] ⏎ Compiled at 2018-07-13 ⏎ Copyright (c) 2006-2018 by Andreas Rumpf ⏎ ⏎ git hash: dd47013017d75a2b1a8c80e12f273e18e86f7d72 ... [https://gitter.im/nim-lang/Nim?at=5b49b91995e03e3d7b49a3ac] |
08:52:24 | FromGitter | <tim-st> I have deleted nimcache and used [Running] nim c --verbosity:0 --hints:off --opt:none -r |
08:52:46 | * | csgator joined #nim |
08:53:08 | FromGitter | <tim-st> the same source code with only-ascii filename works expected :\ |
08:54:07 | * | csgator quit (Client Quit) |
08:55:06 | FromGitter | <tim-st> I remember there was a commit that allowed non-ascii filenames |
08:59:07 | FromGitter | <tim-st> this is a minimum not working code: |
08:59:10 | FromGitter | <tim-st> import re |
08:59:11 | FromGitter | <tim-st> let htm = "" ⏎ let m = htm.findAll(re"<P (.*?)</P>") ⏎ echo m.len |
08:59:23 | FromGitter | <tim-st> together with filename nonascii |
09:00:38 | * | donlzx quit (Remote host closed the connection) |
09:01:04 | * | donlzx joined #nim |
09:01:40 | FromGitter | <tim-st> with `regex` instead of `re`it works |
09:02:04 | * | ofelas quit (Quit: shutdown -h now) |
09:02:08 | FromGitter | <Lite5h4dow> ok, so i decided to dive into nuklear nim. however im having issues. i think im just dimb as fuck but i dont understand how binds work |
09:02:19 | FromGitter | <Lite5h4dow> do they change the format of the c commands? |
09:02:46 | FromGitter | <Lite5h4dow> because the source for nuklear nim liteally just includes the c srce and dependancies |
09:02:59 | FromGitter | <Lite5h4dow> yet nk_begin dosent even work |
09:03:22 | FromGitter | <Lite5h4dow> do i just have shit for brains or am i missing something here? |
09:03:53 | * | ofelas joined #nim |
09:05:03 | FromGitter | <kayabaNerve> Thanks Araq |
09:05:38 | * | donlzx quit (Remote host closed the connection) |
09:06:05 | * | donlzx joined #nim |
09:06:40 | FromGitter | <tim-st> @kayabaNerve are you on windows? |
09:10:21 | * | NimBot joined #nim |
09:17:08 | * | donlzx quit (Remote host closed the connection) |
09:17:34 | FromGitter | <bevo009> does jester have hot reload? |
09:17:34 | * | donlzx joined #nim |
09:20:19 | * | dddddd joined #nim |
09:21:01 | * | BitPuffin joined #nim |
09:22:57 | FromGitter | <Varriount> @Lite5h4dow What stage are you running into problems at? Compilation, or execution? |
09:23:00 | * | nsf joined #nim |
09:23:38 | FromGitter | <Varriount> @bevo009 For code, probably not. For static files, probably. |
09:23:59 | FromGitter | <bevo009> thanks |
09:32:36 | FromGitter | <Lite5h4dow> @Varriount writing. i keep getting linter errors saying this and that dosent exist |
09:32:43 | FromGitter | <Lite5h4dow> as a result it dosent even let me compile |
09:33:06 | FromGitter | <Lite5h4dow> (it does but it fails anyway) |
09:34:56 | FromGitter | <Varriount> @Lite5h4dow You are using some sort of IDE or build system? |
09:35:19 | FromGitter | <Lite5h4dow> atom with the nim addon and linter addon |
09:35:51 | FromGitter | <Varriount> Ok. And you are attempting to use https://github.com/zacharycarter/nuklear-nim? |
09:36:31 | FromGitter | <Lite5h4dow> correct |
09:37:56 | FromGitter | <Lite5h4dow> am i doing something wrong? |
09:39:08 | FromGitter | <Varriount> How did you install the package - through Nimble? |
09:39:11 | FromGitter | <Lite5h4dow> yes |
09:39:24 | FromGitter | <Lite5h4dow> `nimble install https://github.com/zacharycarter/nuklear-nim` |
09:41:35 | FromGitter | <Varriount> Hm, I'm wondering if Nimble checked out the sub module. |
09:43:40 | FromGitter | <Varriount> @Lite5h4dow Can you look in the Nimble directory and check if the nuklear submodule was downloaded? |
09:44:02 | FromGitter | <Lite5h4dow> hold on |
09:44:34 | FromGitter | <Varriount> Also, can you post a gist or paste on the errors that are being thrown during compilation? |
09:44:44 | FromGitter | <bevo009> nimble path nuklear-nim |
09:47:04 | FromGitter | <Lite5h4dow> `PS C:\WINDOWS\system32> nimble path nuklear-nim ⏎ ⏎ ``` Error: At least one of the specified packages was not found```` [https://gitter.im/nim-lang/Nim?at=5b49c698ba5f154b3b9e3f01] |
09:47:15 | FromGitter | <Lite5h4dow> but its installed |
09:47:20 | FromGitter | <Lite5h4dow> so im super confused rn |
09:47:22 | * | fastrom joined #nim |
09:47:40 | FromGitter | <bevo009> exact same name? |
09:47:48 | FromGitter | <Varriount> Try just "nuklear" |
09:48:28 | FromGitter | <Lite5h4dow> just the bind c file |
09:48:37 | FromGitter | <Lite5h4dow> didnt include the actual nuklear library |
09:48:54 | FromGitter | <Lite5h4dow> i take it i just need to download the nuklear source into that folder |
09:49:25 | FromGitter | <Varriount> No, you should just be able to do "nimble install nuklear" |
09:49:55 | FromGitter | <Lite5h4dow> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b49c742641ecc065fa23dd4] |
09:51:07 | * | fastrom quit (Client Quit) |
09:53:00 | * | fastrom joined #nim |
09:55:28 | FromGitter | <bevo009> Error: Specified directory (C:\Users\bevo\AppData\Local\Temp\nimble_17220\githubcom_vurtunnuklear\) does not contain a .nimble file. |
09:55:45 | FromGitter | <bevo009> Is that the problem? |
09:56:09 | FromGitter | <Lite5h4dow> how did you create that error |
09:56:25 | FromGitter | <Lite5h4dow> i want to try and replicate that to see ifd that is indeed the issue |
09:56:37 | FromGitter | <bevo009> I don't think there's a nimble file @ https://github.com/vurtun/nuklear |
09:56:57 | FromGitter | <bevo009> I ran this: nimble install https://github.com/vurtun/nuklear/ |
09:56:57 | FromGitter | <Lite5h4dow> there wouldnt be |
09:57:01 | FromGitter | <Lite5h4dow> its a c livrary |
09:57:25 | FromGitter | <Lite5h4dow> im using https://github.com/zacharycarter/nuklear-nim |
09:57:47 | FromGitter | <Lite5h4dow> its a bind for the c library |
09:57:51 | FromGitter | <bevo009> fair enough, I thought it might depend on nuklear |
10:00:19 | * | PMunch joined #nim |
10:02:11 | FromGitter | <tim-st> anyone get this file compiled with the same filename: https://gist.github.com/tim-st/162abe7f0b498477ccd5391380d1fb55 |
10:02:45 | * | Vladar quit (Quit: Leaving) |
10:03:50 | FromGitter | <kayabaNerve> @tim-st Yes, why? |
10:04:17 | FromGitter | <tim-st> on which os, nim version, compiler version? |
10:04:23 | FromGitter | <tim-st> for me it doesnt work... |
10:04:40 | FromGitter | <kayabaNerve> What doesn't? |
10:04:56 | FromGitter | <tim-st> it doesnt compile with filename `ää.nim` |
10:05:01 | FromGitter | <tim-st> only with `aa.nim` |
10:06:06 | * | nc-x joined #nim |
10:06:15 | nc-x | @tim-st doesn't compile for me on windows as well |
10:06:33 | FromGitter | <tim-st> nice, thanks! |
10:06:42 | FromGitter | <tim-st> so it's not my problem |
10:06:43 | nc-x | nim issues the following c command - gcc.exe -c -w -mno-ms-bitfields -IC:\Nim\lib -o C:\Users\alpha\AppData\Local\Temp\nimcache\ää\ää.c.o C:\Users\alpha\AppData\Local\Temp\nimcache\ää\ää.c |
10:06:59 | nc-x | in this command the path is wrong |
10:07:04 | FromGitter | <tim-st> nc-x: but try the same filename with just `echo 1` it works |
10:07:05 | FromGitter | <bevo009> gets to here then stalls: CC: ää |
10:07:14 | FromGitter | <tim-st> so the path isnt wrong |
10:07:25 | FromGitter | <tim-st> also when replacing by `import regex` it works |
10:07:38 | FromGitter | <tim-st> the problems is different, than just filepath |
10:07:44 | nc-x | yeah |
10:07:52 | FromGitter | <tim-st> really weird problem |
10:08:22 | FromGitter | <Lite5h4dow> @Varriount i downloaded the source and added it to the folder and it fixed it |
10:09:15 | FromGitter | <Lite5h4dow> wait no |
10:09:16 | FromGitter | <Lite5h4dow> nevermind |
10:09:19 | FromGitter | <Lite5h4dow> still broken |
10:09:46 | FromGitter | <Lite5h4dow> i wonder if @zacharycarter could shed some light |
10:09:56 | FromGitter | <kayabaNerve> I had working code; I spent 4 hours upgrading it; it doesn't work anymore. |
10:10:15 | FromGitter | <kayabaNerve> Never ever upgrade your code or change everything. Right now, I'm switch back to Ubuntu 8.04 |
10:10:32 | nc-x | Actually sorry. The path is not wrong. Windows cmd does not display unicode properly. After chcp 65001 I see correct path. |
10:11:03 | FromGitter | <tim-st> maybe @GULPF knows more about it ( https://github.com/nim-lang/Nim/issues/7897 ) |
10:11:38 | FromGitter | <tim-st> of course I used devel version, where it should work |
10:11:39 | nc-x | Compiling with the gcc command gives a lot of errors |
10:11:58 | FromGitter | <tim-st> didnt see one error with verbosity:3 |
10:12:19 | nc-x | `error: stray '\244' in program` and same for '\303` |
10:12:42 | nc-x | @tim-st Compile with --listCmd and then copy the gcc command and use it |
10:12:47 | FromGitter | <tim-st> but why does it work with other source code? is it `re` only problem? |
10:13:45 | FromGitter | <tim-st> --listCmd shows no error at all |
10:13:55 | FromGitter | <tim-st> just stays compiling |
10:14:34 | nc-x | copy the gcc command and use it |
10:15:02 | FromGitter | <tim-st> oh, ok, I guessed verbosity:3 gave me this too |
10:19:00 | FromGitter | <Varriount> @Lite5h4dow I'm going to see if I can install that library |
10:21:18 | nc-x | @tim-st I tried with msvc. The compiler does not hang but give similar error to gcc. I think (all?) C compilers do not support unicode in identifiers. |
10:22:03 | FromGitter | <tim-st> but why does `ä.nim` -> `echo 1` work? |
10:22:27 | FromGitter | <tim-st> https://github.com/nim-lang/Nim/issues/8318 |
10:23:11 | nc-x | Because the problem is with name mangling. The function name findall from regex is getting the `ää` appended to it. And the C compilers are choking on that. |
10:23:45 | FromGitter | <tim-st> ah, ok, but it should work easily when escaping filenames by hex |
10:23:50 | FromGitter | <tim-st> filename.toHex |
10:23:50 | * | Vladar joined #nim |
10:24:03 | FromGitter | <tim-st> at least for special chars |
10:27:56 | * | xet7 quit (Quit: Leaving) |
10:28:52 | FromGitter | <Varriount> @Lite5h4dow I was able to install the package, do you have an example I could run? |
10:30:38 | nc-x | @Varriount the nuklear-nim repo contains an example - https://github.com/zacharycarter/nuklear-nim/blob/master/examples/nuklear_nim_examples/glfw3_opengl3.nim |
10:31:20 | nc-x | And it contains a nimble file as well. |
10:31:35 | FromGitter | <Varriount> nc-x: Yes, however that fails to compiler due to something with the opengl package. |
10:32:36 | FromGitter | <Varriount> nc-x: `nimble build` for that directory gives me `Error: Nothing to build. Did you specify a module to build using the `bin` key in your .nimble file?`. |
10:33:04 | FromGitter | <Varriount> And compiling manually gives me `opengl.nim(391, 28) Error: undeclared identifier: 'stmt'` |
10:33:28 | Yardanico | stmt/expr were removed from devel |
10:33:44 | FromGitter | <Varriount> :\ |
10:34:03 | Yardanico | because they were deprecated a long time ago |
10:36:28 | nc-x | I get `opengl.nim(229, 23) Error: ordinal type expected` |
10:37:34 | FromGitter | <Varriount> nc-x: https://github.com/nim-lang/opengl/issues/56 |
10:41:31 | nc-x | Anyways `nimble` does download nuklear src code as well. So it should technically work. |
10:42:03 | * | nc-x quit (Quit: Page closed) |
10:50:29 | FromGitter | <Varriount> Good night. |
10:50:52 | FromGitter | <kayabaNerve> @Varriount You going to bed or saying that to someone? |
11:11:39 | * | Perkol joined #nim |
11:13:37 | FromGitter | <Lite5h4dow> @Varriount there is an example in the Nuklear Library |
11:13:47 | FromGitter | <Lite5h4dow> im guessing he went to bed |
11:19:17 | * | dorelix quit (Ping timeout: 268 seconds) |
11:35:58 | * | dorelix joined #nim |
11:37:23 | FromGitter | <Vindaar> is it by design or a bug that I can't catch an `IOError` when writing a file in nimscript? Raising it manually works just fine |
11:45:08 | * | krux02 joined #nim |
11:51:31 | * | stefanos82 joined #nim |
12:09:27 | dom96 | Hello everyone |
12:10:29 | stefanos82 | greetings dom96 |
12:28:56 | * | csgator joined #nim |
12:30:16 | * | csgator quit (Client Quit) |
12:34:01 | FromGitter | <kayabaNerve> So I have a Nimble library about some C files. All the files are in installFiles. I use importc for the functions. I don't do any header/passL/passC/compile pragmas. It compiles. It links. The .out crashes missing the symbol from my C file. The nimcache has file.c.o which is not any text file. |
12:34:08 | FromGitter | <kayabaNerve> Ideas on how to fix this? |
12:36:18 | FromGitter | <kayabaNerve> I used to have a compile/header pragma but I couldn't get the paths right in the Nimble package since it was handling it relative to the nimcache directory which isn't... usable AFAIk |
12:41:22 | FromGitter | <tim-st> I had this too, for me it turnt out I needed to compile an addtional c file |
12:46:10 | FromGitter | <tim-st> for me relative works with compile pragma perfect like `{.compile: "../a/b/file.c".}` |
13:01:23 | FromGitter | <kayabaNerve> Thanks @tim-st |
13:11:21 | * | Perkol quit (Remote host closed the connection) |
13:14:17 | * | find0x90 joined #nim |
13:18:25 | * | find0x90 quit (Ping timeout: 248 seconds) |
13:22:39 | stefanos82 | is it possible to use Nim procs inside pragmas? For instance, like the aforementioned {.compile: ... .}, can we use something like {.compile: getCurrentDir() & "a/b/file.c".} ? |
13:26:14 | * | find0x90 joined #nim |
13:33:27 | FromGitter | <tim-st> stefanos82: yes, just safe it inside a const string before and make `{.compile: s & "a/b/file.c".}` |
13:34:20 | FromGitter | <tim-st> or if you need `var` then the var needs to be compileTime var |
13:34:37 | FromGitter | <tim-st> or static block |
13:35:36 | dom96 | wow, just implemented HTTP pipelining in httpbeast |
13:35:59 | dom96 | The more threads I give to `wrk` the more req/s |
13:36:07 | Yardanico | dom96, yay \o/ |
13:36:15 | dom96 | 418k req/s with 32 threads and 64 connections |
13:36:16 | FromGitter | <tim-st> this means number one? |
13:36:32 | dom96 | Doubt it :P |
13:36:46 | FromGitter | <tim-st> does mofuw has this too? |
13:36:47 | dom96 | I don't have a lot of confidence in my skills, but we'll see |
13:37:05 | Yardanico | mofuw has multithreading too |
13:37:14 | FromGitter | <tim-st> ok |
13:37:31 | dom96 | mofuw gets 100k req/s for the same settings on my machine |
13:37:34 | Yardanico | dom96, wow |
13:37:44 | FromGitter | <tim-st> interesting :O |
13:37:48 | stefanos82 | dom96: beware with wrk's results though; you need to figure out its formula to produce your server's peak performance |
13:38:22 | FromGitter | <tim-st> yes, it doesnt behave like real requests |
13:38:25 | dom96 | Yeah, I think there is a bell curve with the amount of threads I throw at it |
13:39:41 | dom96 | Max I can get is 490k |
13:39:58 | dom96 | If I ask for more threads I start getting: unable to create thread 64: Too many open files |
13:40:16 | Yardanico | change ulimit :P |
13:40:25 | dom96 | oh, 128 connections + 72 threads works |
13:40:29 | dom96 | and got 600k req/s |
13:40:30 | dom96 | lol wtf |
13:40:50 | FromGitter | <tim-st> but it needs to be stable |
13:41:03 | dom96 | It's pretty stable so far |
13:41:16 | FromGitter | <bevo009> #dom96 https://phoenixframework.org/blog/the-road-to-2-million-websocket-connections |
13:41:18 | FromGitter | <tim-st> I think it depends much on how much files a system can open, I read rocksdb gets very unstable when too many files open |
13:41:30 | FromGitter | <tim-st> I think, lmdb doesnt have this open files problem |
13:41:45 | FromGitter | <tim-st> the more open files the easier the os gets unstable quickly |
13:41:55 | dom96 | I'm planning on benchmarking frameworks on my RPI |
13:42:02 | dom96 | I don't think anyone has done a comparison like that |
13:42:16 | FromGitter | <tim-st> which rpi? |
13:42:19 | FromGitter | <tim-st> 3? |
13:42:27 | dom96 | So yeah, I could use some tips on how to get rid of the limits |
13:42:29 | dom96 | yeah |
13:42:35 | dom96 | Not the latest model |
13:42:46 | dom96 | I could buy the latest model but I already have like 3 RPis lol |
13:43:05 | Yardanico | dom96, https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1 for macos |
13:43:06 | stefanos82 | dom96: there you go mate https://github.com/wg/wrk/issues/227 |
13:43:08 | krux02 | i used the rpi 3 today as well |
13:43:11 | Yardanico | AFAIK it works on macos sierra too |
13:43:22 | FromGitter | <tim-st> I only have rpi2, I think with my application in release mode a rpi3 can work as a server |
13:43:22 | krux02 | (to play Tales of Phantasio on the PlayStation emulator) |
13:43:32 | FromGitter | <tim-st> hahaha |
13:43:40 | dom96 | Yardanico: I went down this road already and it's annoying to set this on macOS |
13:43:55 | dom96 | so meh |
13:43:59 | Yardanico | well, it's pretty straightforward :) |
13:44:03 | Yardanico | just two lines in a file |
13:44:19 | dom96 | stefanos82: thanks |
13:44:26 | dom96 | Yardanico: It's not |
13:44:36 | dom96 | The later versions of mac make it more complex |
13:44:48 | Yardanico | dom96, IDK, this suggestion from SO worked for me on macOS Sierra |
13:44:55 | Yardanico | *high sierra |
13:45:19 | FromGitter | <tim-st> btw is it possible to limit the ram usage when many threads are enabled? |
13:45:20 | * | find0x90 quit (Quit: find0x90) |
13:45:27 | FromGitter | <tim-st> like set maximum to 75% ram? |
13:45:28 | dom96 | Maybe, but it's pointless to benchmark on my mac anyway |
13:45:41 | dom96 | I'd rather do it on my RPi |
13:45:48 | dom96 | I even bought a nice SD card |
13:48:05 | FromGitter | <tim-st> krux02: maybe you know it: can I force my process to only use a max amount of ram? |
13:48:17 | krux02 | yes you can |
13:48:22 | FromGitter | <tim-st> in nim? |
13:48:37 | krux02 | I don't know if "in nim" |
13:48:57 | FromGitter | <tim-st> and what happens if it reaches a blocking state, because it needs more data in ram? |
13:49:03 | FromGitter | <tim-st> or waiting |
13:49:18 | krux02 | In nim I would say, just allocate the maximum amount of ram you want to use and then don't allocate anything else anymor |
13:49:36 | FromGitter | <tim-st> yes, but if I do this, this memory would be shared |
13:49:44 | FromGitter | <tim-st> and I wanted to have multiple threads in one process |
13:50:13 | krux02 | tim-st: I am not 100% sure what happens when a process reaches it's maximum allowed ram, but the usual think that happens it, the program crashes. |
13:50:46 | FromGitter | <tim-st> ok, thanks, the idea is good, I then have to look if different threads can access the same allocated memory in nim |
13:51:12 | krux02 | when memory is allocated with malloc, but the process isn't allowed to get more memory, then malloc returns a null pointer. But almost no program checks for this possibility that malloc could return 0 and then you get a segmentation fault. |
13:51:41 | Araq | malloc doesn't return null reliably on your favorite OS. |
13:52:03 | krux02 | Araq: what do you mean? |
13:52:07 | FromGitter | <Vindaar> asking again, because more people around :): when writing a file with nimscript, is it normal that I cannot catch an `IOError`? My except is just ignored |
13:52:07 | Araq | because of memory overcommitment. |
13:52:15 | FromGitter | <tim-st> ok, just wanted to get sure, that when I have a server like dom96 said and it has so many requests that it should never reach more than 80% memory |
13:52:42 | Araq | and memory overcommitment was invented to hack around fork()s inherent design flaws. |
13:53:44 | krux02 | I have no idea what overcommitment is nor do I know the inherent design flaw of fork() |
13:54:41 | stefanos82 | Araq: did you see Alexandrescu's video that explains how flawed free() is? I honestly didn't know that and gave me goosebumps :S |
13:54:56 | krux02 | I did see it |
13:55:09 | krux02 | but I almost forgot everything |
13:55:13 | Araq | stefanos82: nope, but let me guess. it doesn't take a 'size' parameter? |
13:55:19 | stefanos82 | lol bingo |
13:55:24 | stefanos82 | C++ fixed it |
13:55:29 | stefanos82 | at least that's what he said |
13:55:38 | krux02 | not really |
13:55:43 | Araq | yeah, I noticed that long ago too. ;-) |
13:55:48 | krux02 | delete [] doesn't get a size parameter |
13:55:57 | stefanos82 | it returns it for you behind the scenes |
13:56:43 | stefanos82 | blimey, it's so hot that I want to GET TO DA CHOPPAAAA and fly away from here! |
13:57:11 | krux02 | stefanos82, what is returned behind the scenes? |
13:57:20 | stefanos82 | the size of the allocated memory |
13:57:40 | krux02 | well the size of the allocated memory is what you pass to malloc |
13:57:51 | krux02 | it isn't returned |
13:57:59 | krux02 | also not behind the scenes |
13:58:19 | krux02 | it is just stored in a table to manage the chunks of allocated memory blocks |
13:59:37 | stefanos82 | well, they fixed it; https://en.cppreference.com/w/cpp/memory/new/operator_delete |
13:59:40 | krux02 | or wait, do you mean the rounded up size of the allocated memory to block size? |
14:01:35 | Araq | stefanos82: https://github.com/nim-lang/Nim/blob/devel/lib/core/allocators.nim#L13 ;-) |
14:02:14 | stefanos82 | Araq: no need for extra convincing that Nim is a beauty man, I already know :P |
14:06:07 | Araq | oh Nim is far from perfection, but I take some pride in the fact that most of its mistakes are all new. ;-) |
14:09:34 | stefanos82 | Nim could gain traction if it had OCaml's quick compilation. I have no idea how they have implemented the language, but it's scary. You just say, for instance ocamlc -o fib fib.ml and boom; you have right in front of you a binary file ready for use |
14:10:18 | stefanos82 | overall Nim is a beauty |
14:10:33 | * | find0x90 joined #nim |
14:10:40 | stefanos82 | it has a bright future |
14:11:02 | zacharycarter | Nim does have pretty quick compilation |
14:11:12 | zacharycarter | But it's going to be based on the compiler speed of whatever backend you're targetting |
14:11:58 | zacharycarter | Nim can also do a lot of things OCaml can't |
14:12:47 | zacharycarter | GC for instance |
14:13:24 | zacharycarter | Ocaml has incremental m&s |
14:13:26 | zacharycarter | it will stop the world |
14:13:53 | Araq | why? did they add multi-threading finally? |
14:14:15 | Araq | it used to be thread local like Nim's iirc. |
14:15:09 | zacharycarter | I may be incorrect - but I was reading - https://v1.realworldocaml.org/v1/en/html/understanding-the-garbage-collector.html |
14:15:20 | stefanos82 | Araq: I know of this http://ocamllabs.io/doc/multicore.html |
14:15:41 | Yardanico | from ocaml.org: "The OCaml GC is synchronous. It doesn't run in a separate thread, and it can only get called during an allocation request. |
14:15:42 | Yardanico | " |
14:16:11 | Yardanico | ah, that's not the relevant info |
14:16:16 | FromGitter | <Bennyelg> Why I can't do something like that? ⏎ ⏎ ```proc shouldRun*(o: Job): bool = ⏎ now() > o.nextRun``` ⏎ ⏎ both now() and nextRun are DateTime type [https://gitter.im/nim-lang/Nim?at=5b4a05af26aa91065e93c412] |
14:16:31 | zacharycarter | I think if completion of the NLVM backend becomes possible / a reality, Nim will outshine most of its competitors |
14:16:38 | Yardanico | zacharycarter, why so? |
14:16:57 | Yardanico | as Araq said before, NLVM doesn't have any real advantages over C/C++ backends |
14:17:06 | zacharycarter | because that opens the door for real WASM suppoert |
14:17:07 | zacharycarter | support |
14:17:12 | zacharycarter | w/o emscripten / binaryen |
14:17:45 | FromGitter | <Yardanico> @Bennyelg you can? |
14:17:53 | FromDiscord | <awr> NLVM could be interesting in the future if it ever supported MCJIT |
14:18:09 | FromGitter | <Bennyelg> @Yardanico I can't I convert it now to Time and now its working |
14:18:24 | FromGitter | <Bennyelg> Datetime is not covered too , I 'll have to re check the manual |
14:18:38 | FromGitter | <Yardanico> ```code paste, see link``` ⏎ ⏎ works for me [https://gitter.im/nim-lang/Nim?at=5b4a063d73026160f5a08135] |
14:19:05 | zacharycarter | ``` |
14:19:06 | zacharycarter | WebAssembly initially focuses on C/C++, and a new, clean WebAssembly backend is being developed in upstream clang/LLVM, which can then be used by LLVM-based projects like Emscripten and PNaCl.``` |
14:19:17 | zacharycarter | ugh why did it copy / paste like that |
14:19:25 | zacharycarter | ```WebAssembly initially focuses on C/C++, and a new, clean WebAssembly backend is being developed in upstream clang/LLVM, which can then be used by LLVM-based projects like Emscripten and PNaCl.```` |
14:19:35 | Yardanico | zacharycarter, are you sure it will have any advantages over C+emscripten? |
14:19:42 | zacharycarter | whatever - that's the idea |
14:20:21 | zacharycarter | advantages? doubtful - but languages like Rust have this and you'll always get criticisms about how Nim doesn't have direct wasm support but Rust does |
14:20:23 | zacharycarter | blah blah blah |
14:20:39 | Yardanico | this is not really "direct" |
14:20:46 | Yardanico | because you still generate LLVM IR ;) |
14:20:48 | zacharycarter | I mean, having done some Nim -> wasm I know it's rather trivial once you know what you're doing |
14:21:01 | zacharycarter | haha well |
14:21:08 | stefanos82 | hmmm...should I drink a milkshake or drink a milkshake? -_- there is a third option of drinking a milkshake. Any suggestions? |
14:21:11 | zacharycarter | you don't have to use something like emscripten I guess is the point |
14:21:24 | zacharycarter | inject that shit into your bloodstream |
14:21:30 | zacharycarter | go hard |
14:21:56 | FromDiscord | <awr> are there any plans to enhance the way inference works for generic procs |
14:22:00 | stefanos82 | it's a homemade man therefore I will push it bloody hard into my veins! |
14:22:01 | FromDiscord | <awr> https://glot.io/snippets/f2wd7w3lbf |
14:22:50 | Yardanico | you can do "var n = newSeq[int](5)" so you won't have to specify "int" tiwce |
14:22:51 | Yardanico | *twice |
14:22:54 | zacharycarter | Araq: I'm looking at karax and trying to figure out where to attach this callback - would it be a good idea to allow buildHTML to take in a function pointer and when the VNode gets created, when it's first attached as a dom node - invoke it then? |
14:23:28 | zacharycarter | for now I've done this |
14:23:58 | FromDiscord | <awr> i'm not talking about combined declaration and initialization |
14:24:06 | * | zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/kQsoxWpeKpaNlazTcSmHMyxo > |
14:24:41 | * | zacharycarter sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/veTNwPHKyTBcZwFgnvWErocU > |
14:25:17 | Araq | awr: there is an RFC for that, accepted and won't require a language change. |
14:25:25 | zacharycarter | not sure if that makes sense or not though - or if there's a better approach |
14:25:31 | FromDiscord | <awr> cool! |
14:25:44 | Araq | zacharycarter: setRenderer() should just take yet another callback |
14:26:25 | Araq | don't mess the DOM creation events etc. Karax exposes these already but they are a PITA. wait for my new components prototype. |
14:26:35 | zacharycarter | okay |
14:28:22 | FromGitter | <Bennyelg> @Yardanico your code not work for me |
14:28:26 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a088973026160f5a085f8] |
14:28:40 | FromGitter | <Yardanico> oh maybe you're not on devel ;) |
14:28:45 | FromGitter | <Yardanico> there's a lot of fixes in devel as always |
14:29:07 | FromGitter | <Yardanico> there's no real reason to use stable Nim versions before 1.0 IMO |
14:29:48 | FromGitter | <Bennyelg> :/ |
14:29:54 | FromGitter | <Bennyelg> going to switch devel |
14:30:01 | FromGitter | <Yardanico> just compile devel every week, it's easy with choosenim |
14:30:34 | FromGitter | <citycide> can you not do imports for `runnableExamples`? would like to show some path joining in there |
14:32:10 | FromGitter | <Bennyelg> @Yardanico so every week you bin/nim c koch ? |
14:32:39 | Yardanico | I run it almost every day (when there's any significant fixes to the codegen/language features), or maybe once in 3 days :) |
14:32:44 | FromGitter | <tim-st> does the following `bin/nim c koch` also work as `bin\nim c koch` on linux/mac? |
14:32:54 | FromGitter | <Bennyelg> mac |
14:32:56 | FromGitter | <tim-st> on windows only second works |
14:33:14 | FromGitter | <tim-st> from here: https://github.com/nim-lang/Nim |
14:33:26 | zacharycarter | unix filepaths vs windows filepaths |
14:33:32 | FromGitter | <Bennyelg> yea Iknow |
14:33:33 | zacharycarter | windows uses backslashes |
14:33:33 | zacharycarter | unix uses forward slashes |
14:33:34 | FromGitter | <Bennyelg> almost finished |
14:33:49 | Yardanico | @tim-st you should use stdlib to join paths :) |
14:33:51 | FromGitter | <tim-st> I just ask to have a valid tutorial for all os |
14:34:07 | FromGitter | <tim-st> this is a nightly version tut from nim page |
14:34:12 | zacharycarter | bin\nim c koch does not work on osx |
14:34:17 | FromGitter | <tim-st> which doesnt work out of the box for windows |
14:34:21 | FromDiscord | <awr> that's interesting that choosenim doesn't use git to clone the repo |
14:34:24 | zacharycarter | bin/nim c koch does |
14:34:33 | FromDiscord | <awr> https://github.com/dom96/choosenim/blob/master/src/choosenim/download.nim |
14:35:04 | FromGitter | <tim-st> zacharycarter: ok, thanks |
14:35:32 | Yardanico | @awr https://github.com/dom96/choosenim/issues/12 |
14:37:11 | FromDiscord | <awr> hah |
14:37:56 | FromDiscord | <awr> i just have a cloned repo and i pull from devel and manually compile every once in a while |
14:38:01 | zacharycarter | np |
14:38:35 | Yardanico | @awr me too |
14:39:14 | * | find0x90 quit (Quit: find0x90) |
14:39:36 | FromDiscord | <awr> there's some bodges i have made in the nim stdlib that I should make issues for but i'm lazy |
14:39:56 | FromGitter | <Bennyelg> works like charm thanks @Yardanico |
14:42:18 | dom96 | https://github.com/dom96/httpbeast/commit/ecc7edecfe285c1359ba732ca8c2b3bbf0575127 :D |
14:44:00 | Yardanico | dom96, you're using "likely"?! |
14:44:52 | dom96 | Of course |
14:44:59 | dom96 | Optimising to the max |
14:48:53 | PMunch | What is this likely stuff? |
14:49:03 | PMunch | A hint to the branch predictor? |
14:49:06 | zacharycarter | if a branch is more likely to be taken? |
14:49:09 | zacharycarter | in a conditional? |
14:49:09 | dom96 | yep |
14:49:15 | PMunch | Cool |
14:49:26 | zacharycarter | I suggested doing that one time in Nim and someone told me it wasn't worth it |
14:49:27 | dom96 | No idea how much of a difference it actually makes |
14:49:39 | zacharycarter | but I don't remember who suggested that / how to actually benchmark it |
14:49:50 | Araq | probably me... :-) |
14:49:52 | dom96 | It'd be interesting to check how the asm differs |
14:49:59 | zacharycarter | haha maybe |
14:50:01 | Araq | I don't believe in 'likely' ;-) |
14:50:05 | * | donlzx quit (Ping timeout: 276 seconds) |
14:50:28 | PMunch | Hmm, interesting concept: http://www.toccata.io/2017/10/No-Booleans.html |
14:50:34 | PMunch | A language without booleans |
14:50:42 | FromGitter | <tim-st> no one knows what it does |
14:51:10 | PMunch | (The linked article is also interesting |
14:51:11 | PMunch | ) |
14:51:16 | * | PMunch quit (Quit: leaving) |
14:51:27 | FromDiscord | <awr> likely feels like it should be a pragma if anything |
14:51:31 | FromGitter | <tim-st> it's likely just a call to c's likely and also in c noone knows |
14:51:54 | stefanos82 | Araq, I wanted to ask you: when someone says about using REPL, do they mean they have to depend on a bytecode mechanism or not? |
14:52:41 | dom96 | https://stackoverflow.com/questions/109710/how-do-the-likely-and-unlikely-macros-in-the-linux-kernel-work-and-what-is-t |
14:53:58 | FromGitter | <tim-st> ok, that's good, but still noone calculated the probability number at which it makes definetly sense to use it |
14:54:17 | FromGitter | <tim-st> independent on the cpu |
14:54:47 | zacharycarter | https://github.com/hnes/libaco |
14:56:17 | FromGitter | <Lite5h4dow> @zacharycarter did you see my previous posts |
14:56:32 | zacharycarter | I didn't |
14:56:35 | zacharycarter | I havne't been as active lately |
14:56:37 | stefanos82 | dom96: I guess your article should be combined with this one too https://stackoverflow.com/questions/11227809/why-is-it-faster-to-process-a-sorted-array-than-an-unsorted-array |
14:56:38 | zacharycarter | what were they about? |
14:56:51 | FromGitter | <Lite5h4dow> i cant get you bindings for nuklear to work |
14:56:58 | zacharycarter | oh |
14:57:05 | zacharycarter | what issue are you having? |
14:57:24 | zacharycarter | I haven't compiled them in a while - I need to set up CI jobs for all my bindings I plan on actually using / think others might use |
14:57:30 | FromGitter | <Lite5h4dow> after i installed it the compiler cant see any of the functions of vulcan |
14:57:46 | FromGitter | <Lite5h4dow> but nuklear is a valid package |
14:57:56 | zacharycarter | well - I don't have a vulkan implementation for a nuklear backend |
14:57:58 | zacharycarter | that's something you'd have to write |
14:58:11 | FromGitter | <Lite5h4dow> so ¯\_(ツ)_/¯ |
14:58:14 | zacharycarter | nuklear is graphics API agnostic - so if you want to use it with Vulkan - you need to provide all the drawing code |
14:58:15 | FromGitter | <Lite5h4dow> nuklear sorry |
14:58:21 | zacharycarter | oh |
14:58:33 | zacharycarter | let me try to compile / run them - give me a few |
14:58:38 | FromGitter | <Lite5h4dow> tyty |
14:58:42 | FromDiscord | <awr> if you're going to do anything with vulkan i noticed a few bits of the vulkan nim package are broken |
14:58:55 | FromGitter | <Lite5h4dow> i misstyped |
14:58:57 | FromGitter | <Lite5h4dow> i meant nuklear |
14:59:05 | zacharycarter | I suggest anyone wanting to do graphics work at this point use BGFX |
14:59:35 | zacharycarter | if opengl deprecation hasn't proved something like BGFX is worth it - I don't know what will |
15:00:17 | FromGitter | <Lite5h4dow> damn ok |
15:00:20 | FromGitter | <Lite5h4dow> ill give that a go |
15:00:26 | FromGitter | <Lite5h4dow> i hadnt heard of BGFX |
15:00:37 | FromDiscord | <awr> there's also the vulkan portability subset thing |
15:00:43 | zacharycarter | there are bindings out there for it already - they're probably out of date, but I'll be updating mine once I start on my next graphics engine project |
15:00:50 | FromDiscord | <awr> https://www.khronos.org/vulkan/portability-initiative |
15:07:04 | FromGitter | <krux02> zacharycarte: OpenGL isn't deprecated. |
15:07:20 | zacharycarter | it is on osx |
15:07:30 | FromGitter | <krux02> There is a difference between deprecation and abandonment. Deprecation can only be done on something that you own. |
15:07:40 | zacharycarter | well whatever |
15:07:44 | FromGitter | <krux02> Apple isn't entitled to deprecate OpenGL |
15:07:55 | zacharycarter | I agree with you - but that's how they phrased it |
15:08:32 | FromGitter | <krux02> That is true. But that doesn't make it right. |
15:08:34 | zacharycarter | I guess they're deprecating their support for opengl |
15:08:36 | zacharycarter | is the better way to word it |
15:09:20 | zacharycarter | Lite5h4dow: the nuklear nim bindings are compiling / running fine for me on OSX |
15:09:44 | FromDiscord | <awr> apple "abandoned" openGL long before they made that annoucement imo |
15:09:45 | FromDiscord | <awr> https://support.apple.com/en-us/ht202823 |
15:09:48 | FromGitter | <krux02> well support can not be deprecated |
15:09:49 | zacharycarter | make sure you run nimble install in the examples/nuklear-nim-examples |
15:09:53 | zacharycarter | and run the examples from that directory |
15:10:03 | FromDiscord | <awr> they're all 4.1 |
15:10:32 | zacharycarter | also do a nimble install in the root of the project too |
15:10:40 | FromGitter | <krux02> yes, it is locked to version 4.1, because on never versions you could get better performance, but then metal wouldn't be that much of an improvement anymore. |
15:11:03 | FromGitter | <krux02> OpenGL is locked to version 4.1 to make Metal "shine" |
15:29:05 | miran | can a dictionary/table contain functions as values? |
15:29:38 | Yardanico | afaik yes |
15:31:36 | zacharycarter | function pointers sure |
15:31:45 | zacharycarter | procs - I don't think so |
15:31:48 | zacharycarter | but I could be wrong |
15:32:06 | miran | i'm trying to do `Table[string, (int, int) -> bool]` |
15:32:25 | Araq | miran: that works but might cause trouble in a compiletime context |
15:32:52 | miran | so it looks something like `{"less": `<`, "le": `<=`}` |
15:33:08 | Araq | `<` are not real procs |
15:33:34 | stefanos82 | Araq: what inspired you to design the {. .} for pragmas? I'm curious. |
15:34:03 | miran | Araq: ok, then i won't force that style. i already have the alternative solution.... |
15:34:51 | Araq | it was clear to me the 3 different bracket kinds () [] {} wouldn't do and so I came up with (. .) [. .] {. .} |
15:35:37 | Araq | for a systematic way of how to extend the brackets |
15:36:04 | Araq | but only {. .} are used for anything |
15:37:02 | Araq | and devel added [: ] because [. .] is not sexy enough :P |
15:38:57 | Araq | and (. .) can't be used because somebody said these look like boobs |
15:39:09 | Yardanico | lol |
15:39:31 | Yardanico | ( . ) khm |
15:39:38 | Yardanico | !vanish |
15:40:20 | miran | what is the probability that we'll see pattern matching in nim? |
15:41:27 | stefanos82 | Araq: I don't know whether it was coincidence or not, but Ocaml's flags are the same lol |
15:42:08 | stefanos82 | sorry, ocamlbuild's tags |
15:44:39 | stefanos82 | Araq: now I realized what they meant with boobs; I didn't see it at first ^_^ |
15:52:22 | dom96 | https://github.com/TechEmpower/FrameworkBenchmarks/pull/3933 |
15:52:33 | dom96 | I expect Jester to be rather slow |
15:52:40 | dom96 | I have some ideas on how to fix that though |
15:53:23 | FromGitter | <Bennyelg> whats wrong? ⏎ ⏎ ```let t1 = Job(nextRun: now(), lastRun: now()).every(10).seconds().friday()``` ⏎ ⏎ Traceback (most recent call last) ... [https://gitter.im/nim-lang/Nim?at=5b4a1c731c0f906b1452a026] |
15:53:39 | FromDiscord | <awr> nim needs < > everywhere just like C++ /s |
15:57:35 | * | Trustable quit (Remote host closed the connection) |
15:59:12 | FromGitter | <Bennyelg> https://github.com/2vg/mofuw wonderful |
15:59:21 | Yardanico | @Bennyelg look at httpbeast too! |
16:00:15 | dom96 | :D |
16:00:50 | FromGitter | <Bennyelg> Heheh Digging now, Looks so promising Nim is improving like hell and all thanks to you guys. |
16:02:57 | FromGitter | <Bennyelg> @dom96 any bentchmark ready ? for the httpbeast ? |
16:03:38 | dom96 | https://irclogs.nim-lang.org/14-07-2018.html#13:35:36 |
16:03:48 | * | csgator joined #nim |
16:04:19 | Araq | miran: pattern matching is not scheduled for v1, but there are nimble packages that implement it |
16:05:30 | miran | Araq: oh, yeah, i forgot about patty! haven't tried it yet, i might give it a chance |
16:05:52 | FromGitter | <Bennyelg> @dom96 freaking crazy |
16:06:08 | FromGitter | <Bennyelg> lol |
16:17:59 | * | donlzx joined #nim |
16:28:31 | FromGitter | <Bennyelg> how can I call any proc from a function? ⏎ e.g ⏎ proc a(func: proc()) = func |
16:28:52 | FromGitter | <Bennyelg> I want to wrap a procedure which receive procedure and run it |
16:29:12 | FromGitter | <Bennyelg> I tried something like ⏎ ⏎ ```proc exec*(o: var Job, fun: untyped) = ⏎ fun``` [https://gitter.im/nim-lang/Nim?at=5b4a24d866c1e833a9e84b68] |
16:29:24 | FromGitter | <Bennyelg> but I dont have actually any idea |
16:32:19 | dom96 | func() |
16:32:52 | Yardanico | don't use "func" btw, it's a keyword |
16:33:06 | FromGitter | <Bennyelg> but if my func is need parameters ? |
16:33:17 | FromGitter | <Bennyelg> ok |
16:33:24 | dom96 | oh yeah, good point |
16:33:40 | FromGitter | <Bennyelg> and func is a keyword for? |
16:33:44 | FromGitter | <Bennyelg> to be replace proc someday ? |
16:33:45 | Yardanico | for "func" :) |
16:33:52 | Yardanico | @Bennyelg - just call it like func(arg1, arg2) |
16:33:56 | FromGitter | <Bennyelg> but proc is func ? :O |
16:35:16 | FromGitter | <Bennyelg> i want to run something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a2643b5efcd5aeefccd9b] |
16:36:54 | * | donlzx quit (Quit: Leaving) |
16:37:10 | FromGitter | <Bennyelg> another way which will be even better is : ⏎ ⏎ ```exec(helloworld, args1, arg2, arg3)``` [https://gitter.im/nim-lang/Nim?at=5b4a26b5b5efcd5aeefcce78] |
16:41:47 | FromGitter | <Vindaar> You can do it with templates like this for example (if I understand you correctly :) ): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a27ca897d514b3c4e731d] |
16:42:35 | FromGitter | <Bennyelg> looks good, what was the magic here? just pass fun as an untyped instead of func ? |
16:42:38 | FromGitter | <Bennyelg> proc * |
16:43:19 | miran | @Bennyelg you can do it without templates, just by using procs |
16:43:24 | FromGitter | <Vindaar> it's template magic ;) replaces it at compile time. If you wanted to do it with a proc, you'd need to give the correct signature of the procs you need to wrap (although generics might help here too?) |
16:43:49 | miran | @Bennyelg @kaushalmodi has written about it couple of days ago |
16:44:27 | FromGitter | <Bennyelg> works like charm |
16:44:42 | * | csgator quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:44:48 | FromGitter | <Bennyelg> you were right procs also work I forgot to remove discard word in the begining of my request |
16:45:18 | miran | here it is: https://scripter.co/notes/nim/#lambda |
16:46:50 | FromGitter | <Bennyelg> every day I am amazed by how nim is so elastic. |
16:47:05 | FromGitter | <Vindaar> it never stops. I still get the same feeling :D |
16:47:22 | FromGitter | <Bennyelg> :D |
16:47:38 | FromGitter | <Vindaar> (ok, I only started using Nim ~Oct 2017) |
16:48:05 | FromGitter | <Bennyelg> around my time but I am doing some fun with it My guys at work don't want to switch they afraid. |
16:48:17 | FromGitter | <Bennyelg> we are using go and I want to leave. looking now for another job |
16:48:18 | FromGitter | <Bennyelg> lol |
16:48:25 | * | skrylar is attempting to make some of that switching pain lessened |
16:48:35 | FromGitter | <Bennyelg> but No jobs on nim currently :( |
16:48:42 | skrylar | we at least have (albeit an ugly) GUI for instance ;p |
16:49:07 | FromGitter | <Vindaar> I can imagine. I'm only at Uni, but my colleagues aren't too keen on using my code so far either (let alone using Nim themselves..). But I'll get them to eventually :P |
16:49:28 | skrylar | actually i know fltk is ugly and doesn't port to mac well, but its functionality is really solid :( never had to deal with bugs and screwy event dispatch likei gtk |
16:50:00 | * | skrylar has had gtk flat out refuse to move objects in a box layout, despite using the API calls to do so |
16:50:51 | FromGitter | <alehander42> is `func` working now :O |
16:51:04 | miran | @Vindar i was sure you had more nim experience!! |
16:51:25 | miran | @alehander42: yeah, i'm using `func` regularly now (in v0.18.1) |
16:52:16 | FromGitter | <Vindaar> @miran: well, since then I've been coding in Nim almost daily, since I switched (almost) completely, haha. But thanks :) |
16:52:55 | miran | i should step up my game |
16:52:59 | FromGitter | <Vindaar> :D |
16:58:30 | FromGitter | <kaushalmodi> miran: Cool, now I need to play with func vs proc :) |
16:58:41 | skrylar | question: do we have a preferred way of running background tasks in nim (a.k.a. setTimeout) |
16:59:14 | * | dddddd quit (Remote host closed the connection) |
16:59:47 | miran | @kaushalmodi: it's easy, just change every proc to func, and then try to see why it doesn't work at some places :) |
17:00:22 | miran | that helped me to refactor some of my code to make it more elegant |
17:00:23 | * | fvs joined #nim |
17:01:27 | * | endragor joined #nim |
17:07:56 | * | Ven`` joined #nim |
17:08:08 | FromGitter | <Bennyelg> @kaushalmodi what is the different |
17:08:17 | FromGitter | <Bennyelg> between func and proc :d |
17:08:44 | FromDiscord | <exelotl> I would also like to know |
17:10:31 | Yardanico | func is {.noSideEffect.} |
17:12:08 | FromDiscord | <exelotl> ah I see, so that could be useful for optimisation reasons or just for clarity/intent? |
17:13:15 | FromGitter | <kaushalmodi> @Bennyelg I don't know. That's why I'll need to play with those. |
17:13:59 | miran | just clarity |
17:14:07 | Yardanico | as I said, the only difference now is just that func is {.noSideEffect.} |
17:14:11 | Yardanico | like real "function" in maths |
17:14:34 | miran | but it is nice to be "just" clearer :) |
17:17:53 | FromGitter | <kaushalmodi> miran: Oh, that means no echoes in there. |
17:18:14 | skrylar | debugEcho exists |
17:18:21 | * | endragor quit (Remote host closed the connection) |
17:18:26 | skrylar | it does an echo while pretending not to have side effects, for that very reason |
17:18:30 | miran | and no globals (except for `const`) |
17:18:40 | FromGitter | <kaushalmodi> TIL. Thanks |
17:19:31 | skrylar | dom96, Araq is there already a timer system for async stuff |
17:19:56 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:21:45 | Araq | skrylar: yeah, there is, but I never used it :-) see eg. asyncSleep() |
17:23:11 | skrylar | https://nim-lang.org/docs/asyncdispatch.html#sleepAsync, hm |
17:23:26 | skrylar | these might work, will have to see |
17:23:55 | skrylar | bacon.js has this thing where you can make event streams either from timeouts or that take the value of a property on a timeout; looking in to what nonsense is required to support that nimside |
17:28:29 | * | develooper joined #nim |
17:28:48 | develooper | hello nim |
17:29:37 | * | develooper quit (Client Quit) |
17:30:12 | Yardanico | lol |
17:35:01 | FromGitter | <Vindaar> procrastination is strong in me again. problem: texlive is missing packages. solution: write nim program to compile tex file over and over again, parse output for missing package error and call `tlmgr` to install appropriate package. It worked, so I guess... yay? |
17:42:43 | * | Perkol joined #nim |
17:44:25 | miran | @Vindaar don't let the latex-haters to hear that!! |
17:44:45 | miran | btw, what packages did miss? |
17:46:30 | FromDiscord | <exelotl> lol that's a brilliant solution |
17:47:03 | Araq | Vindaar: :-) |
17:47:11 | Araq | miran: too late, I heard it. |
17:47:31 | miran | :) |
17:47:46 | FromGitter | <Vindaar> @miran: haha :D it was missing random stuff like mchem, siunitx etc. Freshly installed void linux, installed texlive 2018 from the repos. That only installs ~280 packages |
17:48:16 | FromGitter | <Vindaar> I mean I could have simply checked the header of the tex file and just parsed those or something :D this was a somewhat *inefficient* solution :D |
17:48:20 | miran | cant you install also all those texlive-xyz packages? |
17:49:12 | FromGitter | <Vindaar> In void linux there's only a minimum texlive package. I could have installed texlive-full manually of course |
17:49:38 | miran | but you're right - it is weekend - we need to make use of that extra free time :D |
17:50:55 | FromGitter | <Vindaar> It's not like next week is gonna be crazy again, haha (gonna reinstall our detector at our experiment at CERN starting Monday + I need to give a talk on Thursday. ughh) |
17:52:17 | miran | i just checked - in manjaro linux, you have huge amount of texlive packages, i thought the situation is the same in other distributions |
17:55:33 | FromGitter | <Vindaar> I think you're right for many distributions (although e.g. on Ubuntu these packages tend to be so old, that I always installed texlive manually anyways) |
17:55:53 | FromGitter | <Vindaar> but tbh `tlmgr` isn't such a bad tool actually :) |
17:58:37 | miran | yeah, old packages (and then using PPAs) is one of the reasons why i decided to leave linux mint (it is based on ubuntu LTS), and try my luck with manjaro |
18:00:35 | * | Trustable joined #nim |
18:01:11 | FromGitter | <Vindaar> hehe, same here. my desktop is still running mint 17 (too scared to do a `dist-upgrade` :P it works, so I'm happy...) |
18:10:58 | stefanos82 | @Vindaar: under Windows at work, I used to use TeXnicCenter which had the option to automatically fetch missing packages for me |
18:13:10 | * | find0x90 joined #nim |
18:17:20 | FromGitter | <Vindaar> stefanos82: that's handy! |
18:20:42 | skrylar | i hope heaps of closures don't cause issues xD |
18:21:25 | miran | stefanos82: MikTeX has the same ability |
18:22:58 | * | find0x90 quit (Quit: find0x90) |
18:24:05 | * | endragor joined #nim |
18:24:12 | * | endragor quit (Remote host closed the connection) |
18:28:56 | stefanos82 | miran: it's an IDE with MikTeX behind the scenes |
18:29:04 | miran | oh! |
18:29:34 | FromGitter | <Vindaar> https://gist.github.com/Vindaar/9ed80ee38faff8b6f3d3ce174d729f70 :D |
18:29:39 | stefanos82 | I don't remember whether TeXworks offers this option or not |
18:40:32 | * | find0x90 joined #nim |
18:46:14 | * | Perkol quit (Remote host closed the connection) |
19:18:36 | skrylar | nothing stupid happens if i delete a seq entry during an iterator right |
19:21:17 | FromGitter | <Vindaar> you mean an element of the seq you iterate over? |
19:24:01 | skrylar | yeah it doesn't work |
19:27:41 | skrylar | its easy enough to replace because only the 'current' element can get deleted |
19:27:59 | skrylar | implementing something like bacon.js (functional reactive programming / FRP) to nim because eeeh |
19:30:37 | skrylar | i remember a few years ago reading somebody's demo that was suggesting FRP is really useful for event chains |
19:30:48 | skrylar | Rust has adopted the primitives for iterators |
19:33:55 | Yardanico | I should use "cast[ptr int](addr(arg))[]" to get address of `arg` as int? |
19:34:12 | Yardanico | not to interface with C, just to get address |
19:35:35 | krux02 | Yardanico, you want the addr as int? |
19:35:38 | Yardanico | yes |
19:35:53 | krux02 | then you should do ``cast[uint](arg.unsafeAddr)`` |
19:35:55 | skrylar | addr(someint) will already be `ptr someint` |
19:36:06 | Yardanico | krux02, ok, thanks |
19:36:30 | krux02 | you know when unsafeAddr is ok to use? |
19:36:48 | skrylar | ~~never~~ during moments of extreme magic :b |
19:36:57 | Yardanico | krux02, I won't modify any memory by that address |
19:37:03 | Yardanico | I just need to get addr :P |
19:37:06 | krux02 | yes |
19:37:32 | krux02 | skrylar, unsafeAddr isn't any different than addr, it just compiler more often |
19:37:54 | skrylar | addr does a sanity test to see if you can write to the addr, unsafeaddr doesn't |
19:38:07 | skrylar | although either keyword should probably be in your "block and force an audit" list in phabricator ;) |
19:38:14 | krux02 | and when you have to use it it either means you did not get your types correct, or you just write wrapper code |
19:38:49 | krux02 | well I like to use addr, but I am very happy that in Nim I just don't need to do it |
19:39:21 | krux02 | passing parameters by reference implicityly really saves me using the `addr` operator. |
19:39:37 | krux02 | it is a simple and yet so powerful feature of the Nim programming language. |
19:39:48 | skrylar | i'm not anti addr (or even goto) ;p |
19:39:56 | skrylar | it's just a warning sign is all |
19:40:10 | krux02 | ok, then we don't need a discussion :P |
19:40:18 | Araq | "force an audit" nails it. |
19:41:09 | skrylar | Araq, phabricator actually has (if you make everyone use arc) the ability to auto-reject pushes based on conditions and alerts some maintainer to go/no-go it. there is a version that does it without arc but the commits still go through w/ a warning |
19:41:12 | skrylar | its neat |
19:41:20 | Araq | 'cast', 'ptr' and 'addr' are Nim's unsafe features. and everything else that is currently unsafe must be made safe :-) |
19:42:50 | skrylar | the sheer amount of closures being made by this module is giving my anneurisms :X |
19:43:15 | Araq | ugh, ticks in my leg |
19:56:07 | FromDiscord | <exelotl> ow that's not good, be safe |
20:03:40 | Araq | lol thanks, got a pair of tweezers |
20:15:53 | skrylar | first successful event piped through a filter :^) |
20:16:31 | skrylar | araq.filter(proc(x:thing): bool = return x.kind != tkTick) |
20:16:47 | skrylar | well, `keep`, but meh |
20:26:00 | FromDiscord | <exelotl> item_t* items = get_items(); // ptr to first item |
20:26:04 | FromDiscord | <exelotl> item_t* foo = &items[5]; // ptr to 6th item |
20:26:10 | FromDiscord | <exelotl> what's the equivalent in nim? |
20:26:21 | FromDiscord | <exelotl> let items:ItemPtr = getItems() # ptr to first item |
20:26:27 | FromDiscord | <exelotl> let foo = ???? |
20:27:44 | FromDiscord | <exelotl> (where ItemPtr and getItems are imported from C) |
20:35:11 | skrylar | https://github.com/Skrylar/cobweb/blob/master/cobweb.nim :D |
20:39:06 | FromGitter | <tim-st> skrylar: regarding your iterator question I found this in `re` docs: `Note that since this is an iterator you should not modify the string you are iterating over: bad things could happen.` |
20:39:44 | skrylar | tim-st: if the length of a seq changes length, there is an assertion error (debug mode?) |
20:39:57 | skrylar | changed it for a while loop with conditional increment |
20:40:05 | FromGitter | <tim-st> I dont know, sry |
20:40:54 | skrylar | wasn't a question. wrote a test :) |
20:41:12 | FromGitter | <tim-st> btw it seems `re` is much faster than `regex` unfortunately :\ |
20:44:40 | FromGitter | <tim-st> is it normal that this regex matches from <P to </P> ? `(?s)<P .*?#0007'>(.*?)</P>` |
20:44:59 | FromGitter | <tim-st> I assumed only in brackets matches |
20:46:51 | krux02 | tim-st: I am not sure about nim regular expressions, but if you want to match the actual character <, it might be that you have to escape it. |
20:47:02 | * | miran quit (Ping timeout: 244 seconds) |
20:47:05 | krux02 | but it depends on the regular expression library/mode |
20:47:27 | FromGitter | <tim-st> no I want to match (.*?) but it matches already at <P |
20:47:35 | FromGitter | <tim-st> I tried re and regex... |
20:48:09 | krux02 | originally regular expressions have some characters that you had to escape and some you did not. that was a bit confusing, so it got changed, kind of. Now there are more regular expression modes around. |
20:48:19 | * | miran joined #nim |
20:48:26 | krux02 | . is any character |
20:48:47 | krux02 | \w is [0-9a-zA-Z_] |
20:48:47 | FromGitter | <tim-st> yes, I use it like in python and it always worked until now |
20:49:09 | krux02 | well the python regular expressions are quite ok |
20:49:42 | FromGitter | <Vindaar> @tim-st can you clarify an example string you want to match and your regex? |
20:50:08 | FromGitter | <tim-st> it's a rtf converted to htm by word or something |
20:50:11 | FromGitter | <Vindaar> in general though, I find www.regex101.com super helpful |
20:50:26 | FromGitter | <tim-st> yes, thanks, I try it there |
20:50:33 | krux02 | I recommend the emacs commend re-builder that lets you interactively build a regular expression and see what it matching within an entire file. |
20:50:33 | FromGitter | <tim-st> also used this before |
20:50:42 | krux02 | command not commend |
20:50:45 | FromGitter | <Vindaar> if he uses emacs I second that :) |
20:51:00 | FromGitter | <tim-st> I dont touch emacs and vim and things |
20:51:11 | FromGitter | <rayman22201> https://regexr.com/ |
20:51:21 | FromGitter | <rayman22201> super nice interface for building regex |
20:51:35 | FromGitter | <rayman22201> If you like huge JS apps in your browser that is :-P |
20:52:31 | FromGitter | <tim-st> krux02: there was indeed an unescaped character, funny that it matched though quite fitting |
20:52:32 | krux02 | I wonder whis this this is so huge, regex is built into javascript and then there is text. |
20:52:40 | FromGitter | <data-man> @tim-st: There is nothing unexpected, PCRE has a long history of optimizations (decades!) |
20:53:16 | FromGitter | <tim-st> yes, I know, I also didnt expect it, just hoped gcc makes some magic and it's like 2 times slower only |
20:53:22 | FromGitter | <tim-st> but it seems like ten times |
20:53:28 | FromGitter | <tim-st> (guessed) |
20:53:41 | krux02 | gcc doesn't do magic |
20:53:48 | krux02 | don't expect the compiler to do magic |
20:53:51 | krux02 | compilers can't do that |
20:53:58 | * | find0x90 quit (Quit: find0x90) |
20:54:10 | krux02 | and the programmer is resposible to get the program run fast, not the compiler programmer. |
20:54:12 | skrylar | except stalin, who brutally optimizes |
20:54:30 | FromGitter | <tim-st> ok |
20:56:58 | krux02 | rayman22201: somehow RegExr seems to be weird. Neither \< nor < match the beginning of a word |
20:57:12 | krux02 | both just match the < character |
20:58:08 | FromGitter | <rayman22201> I don't think that is supported by JS regex |
20:59:34 | FromGitter | <rayman22201> I've actually never seen the `<` character used as a regex anchor. Is that a PCRE extension or something? |
21:00:08 | FromGitter | <Vindaar> skrylar: github.com/skrylar/*cobweb* -> stalin -> https://github.com/barak/stalin -> link in description: http://*cobweb*.ecn.purdue.edu/~qobi/so… -> full circle. I see what you did there :P (or maybe just a fun coincidence :D) |
21:02:45 | krux02 | rayman22201: I don't know where the < character got introduced, but it is one of the most important charactors that I use in regular expressions |
21:02:56 | krux02 | searching for word boundaries is very handy |
21:03:15 | FromGitter | <rayman22201> I can't even find it on google. there is the `\b' for word boundry? |
21:03:42 | krux02 | just do ``man grep`` |
21:03:46 | krux02 | on the terminal |
21:03:48 | FromGitter | <tim-st> < is for matching groups I think, and ^ and $ are anchors |
21:03:55 | krux02 | and everything is explaind to you |
21:04:16 | krux02 | tim-st: no () is for matching groups |
21:04:18 | skrylar | Vindaar: well, cobweb was originally a dataflow thing (think Excel equations, or lisp 'cells') |
21:04:28 | krux02 | but depending on the engine it can be \( \) or just ( ) |
21:04:30 | FromGitter | <tim-st> krux02: named groups |
21:04:37 | krux02 | no not names group |
21:04:46 | FromGitter | <Vindaar> skrylar: ahh, I had no idea :) |
21:04:55 | skrylar | Vindaar: i rewrote it so its now baconjs in native nim, but the whole point is to replace spaghetti code or GUI events and whatnot with a cobweb :p |
21:05:07 | FromGitter | <rayman22201> @krux02 That is interesting. Super non-standard |
21:05:09 | FromGitter | <tim-st> https://stackoverflow.com/questions/10059673/named-regular-expression-group-pgroup-nameregexp-what-does-p-stand-for |
21:05:52 | krux02 | Just to make sure we are talking about the same thing here, when I talk about regular expressions I mean the ones that you can use in vim, sed, grep, pearl and all other unix tools, I am never talking about javascript. |
21:06:12 | FromGitter | <tim-st> this is pcre |
21:07:11 | FromGitter | <rayman22201> It sure as hell isn't in the PCRE man page: https://pcre.org/pcre.txt |
21:07:52 | FromGitter | <rayman22201> I believe you. It's in the grep man page. It's just something I haven't seen before, and I have done a lot of PCRE stuff |
21:07:53 | FromGitter | <tim-st> it is: |
21:07:54 | FromGitter | <tim-st> There are several different ways of writing back references to named ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a662ad1428e5aefe8a38d] |
21:08:45 | krux02 | rayman22201: I am not 100% sure what you mean by non-standard, it works across vim emacs sed and grep. I tested them all. |
21:08:59 | FromGitter | <rayman22201> I consider PCRE the standard |
21:11:07 | FromGitter | <rayman22201> I'm not dogmatic about it though. I'm just surprised. It's super weird to me that all of these standard unix utilities have it but PCRE does not. |
21:12:23 | FromGitter | <rayman22201> It's also surprising to me that I can't find any history of it on google. (But I could just be googling the wrong things) |
21:12:55 | krux02 | I try to find the specification of the pcre |
21:13:01 | krux02 | but that document is just the C api |
21:14:35 | * | krux02 quit (Read error: Connection reset by peer) |
21:15:01 | FromGitter | <rayman22201> I did find this in the pcre man page on Ubuntu: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a67d46534bc5d2e5ba12b] |
21:15:12 | * | krux02 joined #nim |
21:17:55 | * | miran_ joined #nim |
21:18:24 | FromGitter | <tim-st> the regex doesnt work, although I tested it on the regex tester site |
21:18:27 | * | miran quit (Ping timeout: 240 seconds) |
21:18:37 | FromGitter | <tim-st> it always matches the full block |
21:18:53 | FromGitter | <tim-st> I use re.findAll(...) |
21:19:39 | FromGitter | <data-man> @krux02: https://www.pcre.org/original/doc/html/pcresyntax.html and https://www.pcre.org/current/doc/html/pcre2syntax.html |
21:20:11 | * | miran_ is now known as miran |
21:21:47 | FromGitter | <rayman22201> @tim-st do you have an example string? |
21:22:11 | krux02 | aparently I am in the gnu regular expression land |
21:22:17 | FromGitter | <tim-st> yes, wait a moment I try it in python first, I trust pythons re |
21:22:58 | FromGitter | <rayman22201> lmao @krux02 you have been drinking too much Richard Stallman toe tea :-P j/k |
21:23:09 | FromGitter | <tim-st> `re"(?s)<P .*?#0007'>\s*(.*?)\s*<\/SPAN.*?<\/P>"` is my regex |
21:23:26 | krux02 | https://www.gnu.org/software/grep/manual/html_node/The-Backslash-Character-and-Special-Expressions.html#The-Backslash-Character-and-Special-Expressions |
21:23:27 | FromGitter | <tim-st> this should only match the thing in brackets in the middle? |
21:23:59 | FromGitter | <tim-st> but it matches from <P to </P> |
21:24:34 | * | miran quit (Ping timeout: 260 seconds) |
21:24:50 | * | nsf quit (Quit: WeeChat 2.1) |
21:24:55 | krux02 | tim-st python is not gpl, so I doubt it has gnu regular expressions |
21:25:27 | FromGitter | <tim-st> I'm using pcre in nim |
21:25:50 | FromGitter | <tim-st> `This module is implemented by providing a wrapper around the PRCE (Perl-Compatible Regular Expressions) C library.` |
21:26:07 | Araq | re.nim ? |
21:26:12 | FromGitter | <tim-st> yes |
21:26:16 | FromGitter | <tim-st> import re |
21:26:35 | Araq | my stuff is unkillable :P |
21:27:11 | FromGitter | <tim-st> here is the target string: https://gist.github.com/tim-st/be9441b3c1065797a6ce16a7baca6035 |
21:27:44 | Araq | should have used my HTML parser ;-) |
21:28:07 | FromGitter | <tim-st> this is "htm" some weird ms office format |
21:29:33 | * | Jesin quit (Quit: Leaving) |
21:29:51 | FromGitter | <Vindaar> @tim-st it's working fine on my end, as far as I can tell? |
21:30:07 | FromGitter | <Bennyelg> how to sort list of elements by specific key |
21:30:24 | FromGitter | <tim-st> @Vindaar what's your output? |
21:31:12 | FromGitter | <Vindaar> oh, you said you're using `findAll` no? |
21:31:33 | FromGitter | <tim-st> which one are you using? |
21:31:41 | krux02 | I think regular the use expressions is a sign of hackyness. But the fact that the regular expression library is just stable and dosn't need constant revisions and improvements is really showing how well the software works. |
21:32:15 | FromGitter | <tim-st> I want the same like pythons re.findall() |
21:32:58 | krux02 | continue where you left off? |
21:33:28 | FromGitter | <Vindaar> `data` is your thing up there, `reg` your regex from above: https://gist.github.com/Vindaar/b555e2a347d6c1fb8fe3f4199f80d3fa |
21:33:44 | Araq | krux02: which library do you mean? |
21:33:53 | FromGitter | <Bennyelg> how to do something like this ? ⏎ ⏎ ```sortedByIt(s.listOfJobs, s.listOfJobs.atTime)``` [https://gitter.im/nim-lang/Nim?at=5b4a6c41897d514b3c4efd21] |
21:34:58 | krux02 | Araq: I am referring the the pcre library. |
21:35:15 | FromGitter | <tim-st> @Vindaar lol, that doesnt work for me... |
21:35:21 | krux02 | tim-st: I looked at re, and there is a re.findAll |
21:35:37 | krux02 | what is the problem with that? |
21:35:58 | FromGitter | <tim-st> for match in htm.findAll(re"(?s)<P .*?#0007'>\s*(.*?)\s*<\/SPAN.*?<\/P>"): ⏎ echo match |
21:36:21 | FromGitter | <tim-st> echos full block not like the result from Vindaar |
21:36:50 | FromGitter | <Vindaar> as you see, `findAll` also does that for me. But using the `=~` template (or `match` manually) works fine |
21:37:05 | FromGitter | <Vindaar> no idea what the difference is with `findAll` |
21:37:11 | krux02 | ah, you are right. a find should return a Match, not a string |
21:37:31 | FromGitter | <tim-st> @Vindaar ah, now I see it you had two echos^^ |
21:37:38 | FromGitter | <tim-st> so this is a bug?! |
21:37:48 | FromGitter | <tim-st> findall gives wrong result |
21:38:15 | krux02 | That is a valid criticism on the regular expression library. |
21:38:37 | FromGitter | <tim-st> no, pythons does it too, it's ok for findall |
21:38:40 | Araq | findAll does what its docs say it does |
21:38:51 | krux02 | Araq: that is not the problem |
21:39:05 | Araq | krux02: well PCRE version 10 has a new API and we should port re.nim to use that... |
21:39:09 | krux02 | the problem is that a match as subpatters that one might want ot access |
21:39:20 | krux02 | yes |
21:39:52 | FromGitter | <tim-st> oh, ok, so it doesnt care if I use brackets or not |
21:39:55 | Araq | it also uses a JIT |
21:40:07 | Araq | and the pure Nim implementation doesn't |
21:40:15 | FromGitter | <tim-st> then it's not possible to solve this problem with `re` |
21:40:44 | Araq | tim-st: try Nim's scanf :-) |
21:41:20 | FromGitter | <tim-st> ok, thanks, will have a look |
21:41:33 | krux02 | tim-st. This is a real problem that is solvable. You could try to improve the situation by porting the API over. |
21:42:09 | FromGitter | <tim-st> that's too time consuming |
21:42:44 | krux02 | well it is doable |
21:42:53 | FromGitter | <tim-st> I currently implement a perfect lmdb version in nim, that's more important since nim only supports the 20 years old sqlite |
21:43:12 | krux02 | what is lmdb? |
21:43:24 | FromGitter | <tim-st> kv database |
21:43:59 | FromGitter | <tim-st> 700k random reads per second on my laptop in debug mode |
21:44:03 | Araq | 20 years old sqlite is still unmatched. |
21:44:32 | FromGitter | <tim-st> no, the author of lmdb implemented sqlite using lmdb and it's 20 times quicker |
21:44:35 | * | chopzwei joined #nim |
21:44:45 | FromGitter | <tim-st> and additonally lmdb is much easier to use like hashmap |
21:50:51 | * | Trustable quit (Remote host closed the connection) |
21:53:25 | FromGitter | <data-man> @Araq: should PCRE2's wrapper and nre2 (for e.g.) had the same API as re/nre? |
21:54:09 | Araq | re.nim should use pcre2.nim but its API shouldn't change |
21:54:24 | FromGitter | <Vindaar> @Araq is there a specific reason why `strutils.removePrefix/Suffix`only offer in place versions? Less bloat? It's trivial to implement for me, sure |
21:57:00 | FromGitter | <rayman22201> @tim-st ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b4a71ac582aaa63076ab726] |
21:57:07 | FromGitter | <data-man> @Araq: do you have PCRE2 on Windows? |
21:58:37 | Araq | Vindaar: removeSuffix can be mapped to setLen() and so has an efficient inplace version. removePrefix follows removeSuffix for consistency. |
21:58:51 | FromGitter | <tim-st> @rayman22201 yes, it yields the very same text |
21:59:07 | FromGitter | <rayman22201> Is that what you want? |
21:59:09 | Araq | expression based variants are not available because we don't want to have two versions for every text handling proc |
21:59:11 | FromGitter | <tim-st> no |
21:59:16 | krux02 | Vindaar: don't ask questions about strutils. Many people had many ideas how that library should look, and now it is a mess. |
21:59:30 | FromGitter | <rayman22201> what is your goal then @tim-st ? I think I missed that part |
21:59:55 | Araq | krux02: it's not that bad. we only have remove 50% of the procs in there |
22:00:03 | FromGitter | <tim-st> I wanted only the content inside `(.*?)` |
22:00:17 | * | dddddd joined #nim |
22:00:24 | Araq | however, I need to figure out why I *always* need to import strutils. |
22:00:37 | Araq | something in there must be super useful. |
22:00:48 | FromGitter | <Vindaar> @Araq: ah, that makes sense :) ⏎ @krux02: haha :D |
22:00:57 | FromGitter | <tim-st> about strutils: the best way is to overload all to be in place and return new string with the same proc name, and this is always secure for the compiler to find out, but some people dont want this |
22:01:26 | FromGitter | <tim-st> like `a.strip; let b = a.strip` |
22:01:43 | FromGitter | <tim-st> first in place, second return new |
22:01:55 | FromGitter | <rayman22201> @tim-st that gives me only the inside content? |
22:02:11 | krux02 | Araq: I think the super usefull stuff of strutils could be moved to system. I mean when it is used anyway all the time it could be available all the time. |
22:02:25 | krux02 | moving things from strutils to system also doesn't really break something. |
22:02:26 | FromGitter | <tim-st> @rayman22201 I wanted this but it didnt work for me :( |
22:04:01 | FromGitter | <rayman22201> what version of Nim is running on the Nim playground? does anybody know? |
22:04:11 | FromGitter | <tim-st> echo NimVersion? |
22:04:27 | FromGitter | <tim-st> dunno how to start nim bot |
22:04:29 | FromGitter | <Vindaar> pretty sure it's 0.18.0 |
22:04:46 | FromGitter | <rayman22201> duh. thanks @tim-st. Yeah, it's 0.18.0 |
22:04:47 | Araq | krux02: no, system is too bloated already |
22:05:18 | FromGitter | <rayman22201> I think it's a regression. On Nim playground the regex works. On my machine with a nightly devel, it gives the whole string. |
22:05:23 | Araq | also, we need to find the useful parts first. |
22:05:31 | FromGitter | <tim-st> ah, I have nightly too |
22:05:34 | FromGitter | <tim-st> maybe this is the thing |
22:05:46 | FromGitter | <tim-st> or because of windows? |
22:06:06 | FromGitter | <tim-st> I also get whole string |
22:06:10 | FromGitter | <rayman22201> Well, I am Ubuntu, and it gives me the whole string |
22:06:23 | Araq | probably just toLower/toUpper, replace, replaceWord and `%` |
22:06:29 | * | Vladar quit (Quit: Leaving) |
22:06:36 | FromGitter | <rayman22201> I think it's a regression on devel. I will have to verify |
22:06:57 | FromGitter | <tim-st> Araq: contains |
22:07:08 | FromGitter | <tim-st> and maybe a few others |
22:07:28 | Araq | the rather uninspired allCharsInSet :-) |
22:08:06 | FromGitter | <tim-st> also I thought about some procs for strutils and sequtils should be the same |
22:08:26 | FromGitter | <tim-st> some time ago I wanted to concatenate seqs but there wasnt away |
22:08:47 | FromGitter | <tim-st> I think nearly everything from strutils can be used in sequtils too |
22:09:16 | FromGitter | <Vindaar> @tim-st https://nim-lang.org/docs/sequtils.html#concat,varargs[seq[T]] ? |
22:09:37 | FromGitter | <tim-st> when was this added? |
22:09:41 | FromGitter | <tim-st> :D |
22:09:54 | FromGitter | <Vindaar> ages ago I think. Ever since I've been using Nim it's been available afair |
22:10:04 | FromGitter | <tim-st> well, why is it called `concat` and not `add` |
22:10:23 | FromGitter | <tim-st> it's a problem in nim that every module introduces own styles |
22:10:32 | FromGitter | <tim-st> like sets -> `incl` |
22:10:39 | FromGitter | <tim-st> every `add` has an own name |
22:11:25 | FromGitter | <rayman22201> wow, 0.18.0 is showing the entire string as well... weird |
22:11:31 | FromGitter | <rayman22201> on my machine |
22:11:39 | FromGitter | <rayman22201> Nim Playground does the right thing though... |
22:11:43 | FromGitter | <Vindaar> because adding is something different from concatenating. `add` would add something to an existing `seq` in place, while `concat` concatenates different seqs to a new one? |
22:11:44 | FromGitter | <tim-st> yes, thought so, it's a compiled dll that does the work |
22:11:59 | krux02 | there is strutils and sequilts and algorithm |
22:12:05 | FromGitter | <rayman22201> so maybe different PCRE version |
22:12:14 | krux02 | I relly don't get the distinction between algorithm and sequtils |
22:12:50 | FromGitter | <tim-st> @Vindaar but I wanted `add` and it doesnt exists |
22:12:50 | krux02 | maybe those two can be joined |
22:13:20 | FromGitter | <tim-st> this is actually the proc that was missing, now we found it |
22:14:39 | FromGitter | <Vindaar> `add` like this? https://nim-lang.org/docs/system.html#add,seq[T],openArray[T] |
22:17:05 | FromGitter | <tim-st> now I remember^^ it was `find` xD |
22:17:28 | FromGitter | <tim-st> I needed to see if a subseq is inside the seq and if so find the index |
22:18:57 | FromGitter | <tim-st> so find and contains are missing in sequtils |
22:20:21 | FromGitter | <Vindaar> ```let s = @[@[1, 2], @[2, 3], @[3, 5]] ⏎ let inS = @[2, 3] ⏎ ⏎ echo s.find(inS) ⏎ # 1``` [https://gitter.im/nim-lang/Nim?at=5b4a772466c1e833a9e8f38c] |
22:20:27 | FromGitter | <Vindaar> works just fine |
22:20:46 | FromGitter | <tim-st> no, you have seq[seq] |
22:20:55 | FromGitter | <tim-st> I'm talking about same seq types |
22:21:17 | FromGitter | <tim-st> @[1,2,3] in @[1,2,3,4] ? -> true |
22:21:21 | FromGitter | <Vindaar> ahhh! |
22:21:43 | FromGitter | <tim-st> I really needed this proc to build my super fast unicode collation algorithm |
22:21:49 | FromGitter | <tim-st> I ended up writing it myself |
22:22:22 | dom96 | Reminder: answer our community survey here: https://goo.gl/forms/t2gWWBEDC1walw6s2 |
22:22:39 | FromGitter | <Vindaar> I mean that is quite specific, no? not *everything* has to be in the stdlib after all |
22:23:08 | FromGitter | <tim-st> yes, but also sequtils is specific as whole module |
22:27:12 | FromGitter | <Vindaar> @dom96 since you're around: `nimble path` seems to show the location of the package installation *including* what's specified as `srcDir` in the nimble file. Although that location doesn't actually exist in the corresponding `.nimble` folder. Is it supposed to be like that? |
22:28:22 | FromGitter | <Vindaar> already answered the survey :) |
22:29:05 | FromDiscord | <exelotl> uh, this is annoying https://cdn.discordapp.com/attachments/239878713016188939/467819715394535440/unknown.png |
22:29:47 | FromDiscord | <exelotl> now any time I try to print a `cint`, it uses the `$` I defined for the `Version` type |
22:30:06 | dom96 | Vindaar: It shouldn't be like that. |
22:30:28 | FromDiscord | <exelotl> I was hoping I could just define $ for the subtype and not have it affect the base type |
22:30:31 | FromGitter | <tim-st> just use cint.int |
22:30:47 | FromGitter | <Vindaar> ok, thought so! I could try to fix that in a few days |
22:30:51 | FromGitter | <tim-st> or distinct |
22:31:31 | FromDiscord | <exelotl> yeah I don't want to mess up cint for other code, but distinct is so annoying because I have to explicitly pull in all the operations I could ever want to use |
22:32:03 | FromGitter | <tim-st> hm^^ |
22:32:18 | skrylar | lmdb sounds interesting |
22:33:12 | FromGitter | <tim-st> it is, but it has downside: the database size is not growing automatically, you can resize on closed db or when no transaction is open, but I cannot find out for sure if no transaction is open |
22:33:25 | FromDiscord | <exelotl> oh wait you're right it's not too bad, in this case I can just do e.g. `proc error*(v:Version):bool = v.cint < 0` |
22:33:40 | FromGitter | <tim-st> I implement all procs to find out loadfactor and resize to do it manually |
22:34:49 | * | jamesroseman joined #nim |
22:39:48 | * | NimBot joined #nim |
22:45:49 | * | NimBot joined #nim |
22:46:49 | * | jamesroseman quit (Ping timeout: 260 seconds) |
22:46:59 | * | jamesroseman joined #nim |
22:51:45 | * | NimBot joined #nim |
22:57:41 | * | NimBot joined #nim |
23:03:35 | * | NimBot joined #nim |
23:09:42 | * | NimBot joined #nim |
23:10:20 | * | brainpro1 is now known as brainproxy |
23:15:44 | * | NimBot joined #nim |
23:21:31 | * | NimBot joined #nim |