00:07:36 | * | user0 joined #nim |
00:10:10 | * | chemist69 quit (Ping timeout: 255 seconds) |
00:10:29 | * | dankrad quit (Ping timeout: 240 seconds) |
00:11:46 | * | rauss quit (Quit: WeeChat 1.9) |
00:16:45 | * | dankrad joined #nim |
00:19:18 | FromGitter | <watzon> Damn, someone needs to write a book just on macros |
00:20:24 | FromGitter | <watzon> ```code paste, see link``` ⏎ ⏎ I have it working for one, now I just have to figure out how to dynamically get the fields/properties based on `n` [https://gitter.im/nim-lang/Nim?at=596ff7481c8697534a3f8e0d] |
00:23:53 | * | chemist69 joined #nim |
00:38:47 | * | smt_ is now known as smt |
00:48:02 | FromGitter | <krux02> I would like to get some feedback on this issue I just created for nimsuggest: https://github.com/nim-lang/nimsuggest/issues/66 |
00:48:13 | FromGitter | <krux02> especially if you share my opinion |
00:48:37 | FromGitter | <krux02> @watzon well I have written a lot of macros |
00:48:50 | FromGitter | <krux02> quote do is your friend |
00:49:13 | FromGitter | <watzon> @krux02 what do you mean? :D |
00:52:14 | FromGitter | <krux02> @watzon you can always instanciate nim code blocks with quote do |
00:52:25 | FromGitter | <krux02> let xxx = quote do: |
00:52:34 | FromGitter | <krux02> and then you just write code |
00:55:00 | FromGitter | <krux02> http://ix.io/yAv |
00:55:17 | FromGitter | <krux02> @watzon that snippet does the same, as you do |
00:55:37 | FromGitter | <watzon> Oh awesome |
00:56:00 | FromGitter | <krux02> with the backticks `` you can insert nodes |
00:56:45 | FromGitter | <watzon> Ok, so here's the big question: how would I make that process dynamic? I want to be able to pass an Object in and have it create an initialization proc for that object |
00:57:06 | FromGitter | <krux02> only problem is, for some reason when you use result in the quote block, it will bind to a symbol from the result variable of the macro |
00:57:16 | FromGitter | <krux02> that doesn't make a lot of sense at all |
00:57:29 | FromGitter | <krux02> therefore I put a workaround in with the ident node |
00:57:50 | FromGitter | <krux02> ident"foobar" is the same as newIdentNode("foobar") |
00:58:31 | FromGitter | <krux02> well when it is just to iterate the fields of an object, you don't even need macros for that |
01:00:53 | * | yingjun_ joined #nim |
01:01:27 | FromGitter | <krux02> http://ix.io/yAw |
01:02:31 | FromGitter | <krux02> with getImpl you can jump to an implementation of a type and then iterate the fields if you want to ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59700127bf7e6af22cf612c8] |
01:03:19 | * | v17d quit (Remote host closed the connection) |
01:03:36 | * | rauss joined #nim |
01:08:41 | FromGitter | <watzon> @krux02 what if I wanted to pass in a type and a variant of that type and get the fields? |
01:09:05 | FromGitter | <watzon> For instance: ⏎ ⏎ ```NodeKind = enum ⏎ nkValue, ⏎ nkLiteral``` [https://gitter.im/nim-lang/Nim?at=597002b02723db8d5e2a5cef] |
01:10:10 | FromGitter | <krux02> well that works |
01:10:31 | FromGitter | <krux02> the parameters of the macro need to be "typed" |
01:10:47 | FromGitter | <krux02> typed means that the typechecker run and resolves symbols |
01:11:13 | FromGitter | <krux02> in the macro all parameters no matter if type or untyped will be of type NimNode |
01:11:52 | FromGitter | <krux02> but in a typed argument you will never find identifier nodes you will always find symbols |
01:13:18 | FromGitter | <krux02> @watzon can you write me what your createNodeInitProc should genereate for those arguments? |
01:16:42 | FromGitter | <watzon> I would like to be able to iterate over all of the props and create a proc like this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Where the name of the proc is the name of the variant and it's parameters are all of the parameters that the variant would accept, which in the case of `nkValue` would be line, column, and value. (we can forget about `nodeId` for now) [https://gitter.i |
01:16:42 | FromGitter | ... m/nim-lang/Nim?at=5970047abf7e6af22cf61fa8] |
01:26:04 | * | arnetheduck joined #nim |
01:26:39 | FromGitter | <krux02> @watzon |
01:26:42 | FromGitter | <krux02> `````` |
01:26:54 | FromGitter | <krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=597006ddc101bc4e3aa0da15] |
01:30:13 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:43:59 | * | chemist69 joined #nim |
01:47:41 | * | def-pri-pub joined #nim |
01:51:30 | FromGitter | <watzon> @krux02 Thanks for that! Think I'm starting to get it now |
01:52:32 | FromGitter | <watzon> ```code paste, see link``` ⏎ ⏎ How can I check if two NimNode`s are equal? [https://gitter.im/nim-lang/Nim?at=59700ce0bc46472974084cd8] |
02:01:05 | * | arnetheduck quit (Ping timeout: 240 seconds) |
02:36:43 | FromGitter | <Alan-FGR> @zacharycarter thank you :). Looking at it again after a day it really doesn't look too bad :P... maybe could be iterated into an alternative logo, I certainly would be happy to display it in a product using nim, maybe a splash screen or something |
03:01:23 | * | endragor joined #nim |
03:21:23 | * | onionhammer1 joined #nim |
03:21:37 | * | onionhammer quit (Ping timeout: 248 seconds) |
03:32:31 | * | pilne quit (Quit: Quitting!) |
03:36:03 | * | onionhammer1 quit (Ping timeout: 260 seconds) |
03:40:58 | * | def-pri-pub quit (Quit: leaving) |
03:46:46 | * | krux02 quit (Remote host closed the connection) |
03:56:01 | * | ShalokShalom quit (Ping timeout: 255 seconds) |
03:56:51 | * | onionhammer1 joined #nim |
04:23:57 | * | andrzejku joined #nim |
04:39:23 | * | yingjun_ quit (Remote host closed the connection) |
04:39:34 | * | SusWombat quit (Quit: Leaving) |
04:41:59 | * | yingjun_ joined #nim |
04:46:21 | * | yingjun_ quit (Remote host closed the connection) |
04:48:23 | * | Lord_Nightmare quit (Ping timeout: 260 seconds) |
04:50:16 | * | Lord_Nightmare joined #nim |
04:56:46 | * | bahtiyar joined #nim |
05:03:23 | * | yingjun_ joined #nim |
05:05:57 | * | andrzejku quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
05:14:44 | * | andrzejku joined #nim |
05:33:33 | * | rauss quit (Quit: WeeChat 1.9) |
05:35:37 | * | skrylar joined #nim |
05:36:48 | * | dankrad quit (Ping timeout: 260 seconds) |
05:39:28 | * | bahtiyar quit (Remote host closed the connection) |
06:21:40 | * | yingjun_ quit (Remote host closed the connection) |
06:28:54 | * | yingjun_ joined #nim |
06:36:16 | * | nsf joined #nim |
06:49:57 | * | big_num joined #nim |
06:55:02 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
07:30:52 | * | wHATEver joined #nim |
07:31:10 | * | Snircle quit (Ping timeout: 240 seconds) |
07:31:16 | * | wHATEver is now known as Guest15762 |
07:31:45 | * | myp quit (Ping timeout: 248 seconds) |
07:46:02 | * | yingjun_ quit (Remote host closed the connection) |
07:50:07 | * | ShalokShalom joined #nim |
07:51:31 | * | yingjun_ joined #nim |
07:52:43 | * | yglukhov joined #nim |
07:54:53 | * | ShalokShalom quit (Remote host closed the connection) |
07:56:46 | * | yglukhov quit (Ping timeout: 246 seconds) |
08:08:40 | * | adeohluwa joined #nim |
08:15:01 | dave24 | will `someFunc(if getSomeBool(): "YES" else: "NO")` generate the strings as constant literals, or are they garbage collected? |
08:15:47 | dave24 | `someFunc` is a C function that stores a pointer to the given string and uses it later. |
08:16:21 | * | andrzejku quit (Quit: Textual IRC Client: www.textualapp.com) |
08:18:51 | * | yglukhov joined #nim |
08:22:59 | * | big_num quit (Quit: Bye.) |
08:33:46 | * | Vladar joined #nim |
08:36:18 | * | Arrrr joined #nim |
08:40:20 | * | dom96|w joined #nim |
08:43:59 | Araq | constant literals but is seems funky to rely on that, instead write |
08:44:13 | Araq | someFunc(if getSomeBool(): cstring"YES" else: cstring"NO") |
08:47:43 | dave24 | ah ok, thx. One followup question, if I pass a string directly to the function(no `if: else:`) and the function expects a cstring, will it always be a constant literal? It looks like that in the generated code but I'm not sure. |
08:51:32 | Araq | yes |
08:51:51 | dave24 | Nice, Thank you! |
09:01:25 | * | couven92 joined #nim |
09:11:00 | crem | Where does nim store the generated c code? I'm curious to take a look at it. |
09:11:19 | crem | Or there's some command line to keep it.. Or something. |
09:11:30 | FromGitter | <andreaferretti> nimcache |
09:11:55 | crem | indeed! thanks |
09:11:57 | FromGitter | <andreaferretti> you should see this directory whenever you compile nim code |
09:12:18 | crem | Yes, I just compiled something from root directory, so didn't see the newly created one. :) |
09:12:38 | * | v17d joined #nim |
09:12:39 | * | Arrrr quit (Read error: Connection reset by peer) |
09:16:02 | Araq | crem: 1. use -d:release before looking at the code |
09:16:12 | Araq | 2. look at the produced assembler code instead |
09:18:26 | crem | Thanks. Indeed with -d:release it's more readable. Well, I didn't actually want to read the code, just was curious to look at. |
09:20:18 | Araq | I'm tired of people who point out redundant temporaries being generated that are optimized away by a simple copy propagation pass :P |
09:21:19 | * | arnetheduck joined #nim |
09:22:05 | crem | It may happen that C compiler would take care about them anyway. |
09:22:42 | crem | Do you know if there is a nim syntax highlight for sublimetext? |
09:23:47 | Araq | yes there is |
09:24:25 | Araq | https://github.com/Varriount/NimLime |
09:26:22 | crem | Thanks. I had it, just sublime somehow didn't recognize the format from extension. |
09:33:00 | couven92 | Araq, why is the release code more readable? |
09:33:25 | couven92 | (Isn't it normally the Debug code that is more readable? :O) |
09:35:45 | crem | Do you know where to report website bugs to? The "discard" link in the "comments" section of the tutorial leads to non-existing #discard-statement, should be #procedures-discard-statement. |
09:36:21 | couven92 | crem, http://github.com/nim-lang/Nim/issues |
09:37:21 | couven92 | The Nim manual and tutorial sites are part of the Nim repo (in the `doc` folder) |
09:38:02 | couven92 | otherwise the actual http://nim-lang.org/ landing page lives in the https://github.com/nim-lang/website repo |
09:40:24 | crem | Thanks. Sorry for asking basics. |
09:40:52 | couven92 | crem we've all been there and done that! no worries :) |
09:42:06 | Araq | couven92: mostly because line tracking statements bloat the code |
09:42:19 | couven92 | ah... okay that makes sense |
09:54:12 | crem | Here: https://nim-lang.org/docs/tut1.html#control-flow-statements-for-statement there's something about "built-in $ operator", yet there's no $ operator in the example code snippets. Do I miss something? For integer i, both "echo i" and "echo $i" compile fine for me. |
09:57:06 | Araq | crem: please report it, too much editing turned into an incoherent mess :D |
09:57:32 | Araq | the examples used to read 'echo $i' but then people wrote $ in echos which is not required |
10:05:46 | * | planhths joined #nim |
10:09:25 | crem | Is there a code formatting tool for nim? |
10:13:50 | crem | Is it expected for this code https://pastebin.com/Eyk4UV4P to sigsegv? |
10:17:52 | * | yingjun_ quit (Remote host closed the connection) |
10:18:03 | * | yingjun joined #nim |
10:18:59 | * | yingjun quit (Remote host closed the connection) |
10:19:22 | Araq | crem: why would it segfault? o.O compiler crash? |
10:20:25 | Araq | there is no formatting tool and I have no fucking clue why people want one. indentation based syntax implies there is little left to format, for better or worse |
10:20:38 | crem | Indeed, it's compiler who says sigsegv. |
10:21:33 | crem | I use autoformat for both C++ and python (and go, but i hate go). Those are great! Quickly type, format, and get a beautiful code. |
10:22:34 | crem | So, is it expected for compiler to say "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" when it attempts to compile that? |
10:22:37 | * | yingjun joined #nim |
10:23:22 | Araq | of course not a compiler should never crash :-) |
10:23:47 | Araq | I just quickly type, what's there to format? |
10:24:14 | Araq | do you type foo=3 and then it becomes foo = 3 or what? |
10:25:59 | FromGitter | <ChristianWitts> Something akin to gofmt would be nice, to have 1 canonical style |
10:26:13 | crem | Yes. Or if it's an array/map declaration, everything becomes neatly formatted. Or long lines are split at 80 characters. Or two empty lines between functions. |
10:26:58 | crem | Even without canonical style, it actually increases productivity a lot. |
10:28:14 | * | Vladar quit (Remote host closed the connection) |
10:32:19 | Araq | if you say so. I don't spend my time writing code, I'm mostly reading, thinking and swearing |
10:33:37 | Araq | and before you ask, indentation for me is about not having a series of pointless } } } taking up valuable screen space |
10:33:50 | yglukhov | Araq, dom96: there's a flaw in nimble getInstallFiles. it is not memory friendly at all, and causes out of mem in memory-tight environment. |
10:34:15 | Araq | yglukhov: what is getInstallFiles? |
10:34:32 | dom96|w | Ahh, nice. So that's what was causing the OOMs |
10:34:39 | yglukhov | it's a function in nimble, used to get the list of files that are going to be installed |
10:35:04 | Araq | why does it cause OOM in release builds then and not in debug builds? |
10:35:28 | dom96|w | this shouldn't be a problem unless you've got a hell of a lot of files |
10:35:38 | dom96|w | so perhaps there are two different issues |
10:37:30 | yglukhov | dom96: well in my case i've got a "build" folder in the root of the proj, that wasn't added to skipDirs, so in my case adding "build" to skipDirs fixed it |
10:44:52 | * | yingjun quit (Remote host closed the connection) |
10:57:59 | * | vendethiel quit (Ping timeout: 240 seconds) |
10:59:40 | * | vendethiel joined #nim |
11:15:14 | * | arnetheduck quit (Remote host closed the connection) |
11:18:32 | dom96|w | yglukhov: please document this in one of the related issues (or create a new one) if you haven't already :) |
11:24:56 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:29:08 | * | v17d quit (Ping timeout: 260 seconds) |
11:45:24 | * | yingjun joined #nim |
11:49:30 | * | yingjun quit (Ping timeout: 240 seconds) |
12:00:33 | * | dom96|w joined #nim |
12:08:38 | crem | That's weird that I happened to have g++ on my windows machine. :-\ |
12:09:01 | crem | Hmm strawberry perl has it included. |
12:15:13 | Zevv | do i understand well the both re and nre depend on the prce lib? |
12:15:30 | Zevv | is there any built in (simple) pattern matching available in Nim? |
12:15:41 | couven92 | crem, you can also use the Visual Studio C/C++ compiler if you want to... I wrote the vccexe tool for that ;) |
12:16:13 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
12:19:43 | * | dom96|w joined #nim |
12:19:45 | crem | I do have it installed, and actually thought for some time that it was used. |
12:21:52 | * | dom96|w quit (Read error: Connection reset by peer) |
12:25:08 | crem | it seems that nim took from pascal white a lot (or possibbly pascal and nim took a lot from some common predecessor). Bit-backed sets, non-0-based arrays, and/or as a bitwise operators, and types and vars declaration also resemble pascal a lot. |
12:27:14 | * | Vladar joined #nim |
12:28:07 | * | chemist69 quit (Ping timeout: 255 seconds) |
12:28:30 | crem | Why card() for sets and not some universal len().. Also not sure that * and + for sets is better than say 'and' and 'or'. |
12:28:30 | * | chemist69 joined #nim |
12:36:46 | crem | In nim, are local variables initialized to default value if no initializer is specified? |
12:42:59 | FromGitter | <ChristianWitts> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5970a553329651f46ea6e3c6] |
12:44:03 | FromGitter | <ChristianWitts> `by default integers will be 0 and strings will be nil. nil is a special value which signifies the lack of a value for any reference type, you will learn more about this later.` |
12:45:01 | crem | Ok thanks. I also tried that and got 0, but that doesn't mean anything. :) |
12:46:11 | * | Snircle joined #nim |
12:48:27 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
12:51:13 | crem | You cannot pass an interator (or the result of calling an interator) into a procedure, can you? |
12:53:13 | FromGitter | <TiberiumN> dom96: will you release results of nim community survey in this month, or in the next? |
12:55:19 | Araq | crem: well card() is not exactly O(1) while 'len' usually is but I never use card anyway |
12:56:57 | * | krux02 joined #nim |
12:59:52 | FromGitter | <Varriount> crem: Feel free to post issues for the sublime text plugin. I can't promise I'll get to them quickly, but at least I'll know about them. |
13:01:35 | Araq | krux02: http://en.cppreference.com/w/cpp/language/copy_elision worth taking a look at |
13:04:37 | krux02 | Araq: yes I think I read that once |
13:05:20 | krux02 | nim normally compiles to C and C does not have constructor/destructors that can be optimized away from the C compiler |
13:06:55 | krux02 | I had once the idea that in Nim, a function that returns a complex object could be compiled to a C function that passes result as an argument |
13:08:24 | Araq | we can optimize them away in the Nim compiler, I don't understand your remark |
13:10:46 | * | couven92 quit (Ping timeout: 276 seconds) |
13:15:12 | krux02 | http://ix.io/yAW |
13:15:19 | krux02 | Araq, that is what I mean |
13:16:35 | krux02 | There is no copying going on anymore the type is directly constructed at the right address |
13:21:57 | Araq | yes? I fail to see the connection |
13:22:24 | FromGitter | <andreaferretti> in fact I ad mistakenly assumed that the whole point of the result variable is that it would be allocated on the previous stack frame |
13:22:38 | FromGitter | <andreaferretti> so no need to move the returned value |
13:22:49 | FromGitter | <andreaferretti> but now I think this does not (always?) happen |
13:24:28 | FromGitter | <krux02> Well the connection is that a result variable compiled to a functing with the result variable as an argument is to me copy/move elision |
13:24:38 | FromGitter | <krux02> there is no copy/move anymore |
13:28:38 | Araq | andreaferretti: it happens if more efficient iirc |
13:31:27 | * | tdc joined #nim |
13:34:13 | FromGitter | <krux02> I remember I once had a case where I could improve the performance my making the result explicitly an argument. I still did not do it because it was not significant enough and I prefer nice code. |
13:34:24 | * | adeohluwa joined #nim |
13:36:38 | crem | There's no multilevel namespaces / module packages in nim, are there? |
13:42:14 | krux02 | you are right. Nim does not provide a java package nesting hell |
13:44:03 | crem | Well, in python it's totally fine. And in C++. In any reasonably large project name collisions will be likely. |
13:44:59 | krux02 | well, super deep package nesting is not something to prevent name collisions, it is just annoying |
13:46:00 | crem | There is something in between "super deep nesting" and "no nesting". But yes, top level package naming in python is actually an issue too. |
13:46:32 | * | nsf quit (Quit: WeeChat 1.9) |
13:46:46 | krux02 | and nim fails on name collision and you can do something about it. Unlike c++ that secretly discards on random thing on name collision and really lets you want to cry |
13:47:22 | crem | Well, in C++ there are namespaces, and they help. |
13:47:30 | krux02 | just use a unique package name and make sure within that package you don't have collisions |
13:47:42 | krux02 | and there are not so many possible collisions |
13:47:48 | * | yingjun joined #nim |
13:48:06 | krux02 | nim has a package that also works as a namespace |
13:48:16 | krux02 | helps for disambiguation on name collision |
13:48:33 | krux02 | when the function foo collides from two packages a and b |
13:48:41 | krux02 | then you can still call it with a.foo or b.foo |
13:50:33 | krux02 | name collision is something that has been taken care of. If you are afraid, try to find an example that you think might cause a problem. Compile it, and see if you are happy with what happens. |
13:50:54 | krux02 | when you really see a problem then you can create an issue, but you need to have a concrete example. |
13:52:16 | * | yingjun quit (Ping timeout: 260 seconds) |
13:53:55 | crem | For small and medium projects it's probably fine, but for a large company that keeps all projects in a single code repository (and they can reuse libraries from each other), that just wouldn't work. |
13:55:34 | yglukhov | crem: which language are you coming from? |
13:55:52 | crem | C++ and python mostly. |
13:56:33 | krux02 | then you should feel home in nim |
13:57:04 | crem | I do! I really like it. Especially after I tried go. :) |
13:57:18 | krux02 | I tried go before nim, too. |
13:57:34 | Araq | all projects in a single repo or not is completely irrelevant for namespacing |
13:57:49 | yglukhov | ok, so as someone whos working on a pretty big project, with around 50 transitive dependencies, i have to assure you that name collision is really unlikely. specifically, in all of our code we have 3 places, where action is explicitly taken regarding name collision. |
13:58:23 | yglukhov | crem: nim is somewhat better namespaced than c++, because every module gets its own namespace |
13:58:43 | * | user0 left #nim (#nim) |
13:59:05 | Araq | that one thing that doesn't scale at all is --nimblePath ;-) |
13:59:08 | * | user0 joined #nim |
13:59:09 | crem | But then you have collisions of module names pretty soon I guess. Or i'm missing something. |
13:59:15 | krux02 | c++ has argument dependent namespace lookup, nim has lookup in any namespace :P |
13:59:32 | yglukhov | and importing module is like using namespace in c++. still, you can import without "polluting", and fully-qualify, but there's just no reason to do it. |
13:59:51 | yglukhov | crem: also note, that unlike #include, imports do not propagate |
13:59:52 | krux02 | well there is |
14:00:03 | krux02 | when there a a bunch on untyped temlates with short names |
14:00:15 | krux02 | see html package |
14:00:19 | yglukhov | s/no reason/rarely ;) |
14:00:24 | Araq | then you have disambiguate, krux02 |
14:00:50 | Araq | disambiguation works, heck you can do 'import "foo/module" as m; import "bar/module" as m2' |
14:01:05 | krux02 | yes that, but even when you don't need to disambiguate, namespace pollution can pollute autocompletion |
14:01:30 | yglukhov | crem all in all, nim gives you exhaustive control over disambiguating, just 99.999% it works automatically. |
14:01:54 | crem | Ah so there are path imports! Ok, that improves things a lot. |
14:02:25 | * | user0 left #nim (#nim) |
14:02:29 | crem | So, then it's like #includes. In terms of module names collision. |
14:02:41 | * | user0 joined #nim |
14:02:48 | krux02 | yes thare are path imports and there are includes as well |
14:03:06 | yglukhov | crem: are you talking about module names disambiguation or symbol disambiguation? |
14:03:07 | crem | There are path imports! |
14:03:52 | crem | module names mostly, for symbol there are the same mechanisms as in python, as far as I understand. |
14:04:15 | crem | That's what confused me: 15:42 < krux02> you are right. Nim does not provide a java package nesting hell |
14:04:33 | krux02 | sorry |
14:04:37 | yglukhov | ah ok, i misunderstood that initially. |
14:04:56 | crem | But krux02 actually meant not that they are not possible, just not customary. |
14:05:29 | yglukhov | true |
14:05:35 | krux02 | well I ment that there is no hell |
14:05:56 | krux02 | :P |
14:06:32 | FromGitter | <andreaferretti> they are not possible in the sense that there are no subpackages |
14:06:42 | FromGitter | <andreaferretti> just packages inside folders |
14:06:56 | FromGitter | <andreaferretti> there is no relation between foo and foo/bar |
14:07:38 | Araq | speaking of which ... can we deprecate --path and --nimblePath? :P |
14:08:09 | yglukhov | Araq: i'm using path... |
14:08:20 | yglukhov | just don't remember why |
14:08:22 | yglukhov | =) |
14:08:22 | Araq | yeah me too |
14:11:13 | Araq | but now that we have import x / [a, b, c] we can move away from --path |
14:12:43 | Araq | or rather instead of --path which is package agnostic we could have package specific location hints |
14:13:23 | yglukhov | Araq: so here's the case. let's say you're doing a project that is both a library and executable. let's call it nimx, for example. it is not installed in nimble packages, and in its code, you import something, like "import nimx.something" |
14:13:32 | yglukhov | how would that work? |
14:14:09 | Araq | so I can do import p1 / [bar, baz]; import p2 / [x, y, z] and then in my config I can have p1 = "../deps/p1" |
14:14:46 | yglukhov | "and then in my config I can have..." - does config support that? |
14:14:56 | Araq | no, it's a proposal |
14:15:11 | yglukhov | oh ok |
14:15:19 | * | chemist69 quit (Disconnected by services) |
14:15:24 | * | chemist69_ joined #nim |
14:17:51 | yglukhov | Araq: sounds like my nimbleoverride thing (which i abandoned already). but the point is. when you compile main file, nim looks recursively upwards for nimbleoverride files, to add such mappings you're speaking of. |
14:18:11 | yglukhov | s/but//g |
14:18:25 | Araq | why did you abandon it? |
14:20:19 | yglukhov | because nimsuggest knows nothing about it. so for now, i just keep a bunch of 'path="$home/projects/something"' entries in nim.cfg of the compiler. works great, except it is in nim's repo =) |
14:21:01 | yglukhov | so you have to stash it occasionally and not forget to restore, because otherwise stupid things happen =) |
14:29:09 | * | rauss joined #nim |
14:39:47 | FromGitter | <andreaferretti> I assume nimble would then populate this config automatically, is this what you mean? |
14:39:53 | FromGitter | <andreaferretti> just as now it handles path |
14:51:50 | * | v17d joined #nim |
15:12:22 | * | planhths quit (Ping timeout: 255 seconds) |
15:16:40 | Araq | maybe ;-) |
15:20:05 | FromGitter | <zacharycarter> I'm working on aws lambda for nim right now |
15:20:15 | FromGitter | <zacharycarter> hopefully will have something before I leave for the weekend |
15:26:22 | * | Trustable joined #nim |
15:27:03 | LyndsySimon | I'd like to use Nim in a functional way, using immutables exclusively. Is that even a sane approach? |
15:28:24 | Araq | it's never a sane approach anywhere :P |
15:28:35 | FromGitter | <andreaferretti> it can be done |
15:28:49 | FromGitter | <andreaferretti> but many libraries have mutable data types |
15:28:54 | FromGitter | <andreaferretti> (starting from seq) |
15:29:11 | FromGitter | <andreaferretti> that said, there is support for many things you would want to do in a functional language |
15:29:18 | FromGitter | <andreaferretti> including an effect system |
15:29:28 | LyndsySimon | andreaferetti: I'm seeing that sequences are used pretty extensively in the stdlin |
15:29:31 | LyndsySimon | stdlib* |
15:29:35 | FromGitter | <andreaferretti> yep |
15:29:41 | * | nsf joined #nim |
15:29:49 | FromGitter | <andreaferretti> notice that sequences declared with `let` are in fact immutable |
15:29:58 | LyndsySimon | ooooh. That's a good point. |
15:30:13 | FromGitter | <andreaferretti> and you can transform them with the usual `map`, `filter` and so on |
15:30:16 | FromGitter | <andreaferretti> see sequtils |
15:30:19 | FromGitter | <andreaferretti> you can write more |
15:30:29 | * | enthus1ast__ joined #nim |
15:30:54 | FromGitter | <andreaferretti> still, I am not sure being strict about mutation will be productive |
15:31:27 | FromGitter | <andreaferretti> it would be nice if someone wrote an efficient library for immutable, persistent collections |
15:31:40 | FromGitter | <andreaferretti> there isn't one afaik |
15:31:57 | LyndsySimon | andreaferetti: I'll add it to my list, but I don't know that I have the skill to do that :( |
15:32:57 | LyndsySimon | My background is mostly Python, but I write Ruby these days at work. I've dabbled in Clojure and *loved* it, but didn't like how often I had to drop back into using mutables to interface with Java, and hated the JVM stack. |
15:33:30 | LyndsySimon | I'd use Common Lisp, but I've not found a decent way to compile it to a portable binary that's anywhere near as nice as Nim's. |
15:33:50 | crem | When both object field and property (with the same name) is accessible, how is it determined what of those will be used? i.e. will it be direct assignment/reading of the value or through the property? |
15:34:01 | LyndsySimon | So I'm in this weird spot where I really like the idea of Nim, but I want to use it in a very lispy way. |
15:34:28 | * | v17d quit (Ping timeout: 255 seconds) |
15:35:59 | Araq | crem: field access is preferred unless visibility forbids it |
15:36:18 | LyndsySimon | I keep running up against the language itself when trying to write lispy code, which tells me it isn't really designed for the way I want to do it. |
15:36:56 | crem | Araq: then first example here: https://nim-lang.org/docs/tut2.html#object-oriented-programming-properties is wrong. (it doesn't say that last three lines are from different module) |
15:37:32 | Araq | crem: yes. another case of editing until things make no sense anymore ... |
15:38:54 | Araq | LyndsySimon: just mutate your stuff, nobody cares that the full history of 1..6 is 1,2,3,4,5,6 |
15:42:38 | Araq | and the real quicksort mutates the array, the Haskell 3 liner is a caricature of the algorithm |
15:42:40 | Araq | ;-) |
15:42:43 | * | PMunch joined #nim |
15:51:43 | * | PMunch quit (Ping timeout: 246 seconds) |
16:02:21 | * | v17d joined #nim |
16:05:16 | * | kunev quit (Ping timeout: 260 seconds) |
16:07:01 | * | kunev joined #nim |
16:13:54 | crem | There are no constructors/desctructors, only defer like in go, are there? That's not that nice, C++'s RAII is good. |
16:14:35 | * | PMunch joined #nim |
16:14:50 | yglukhov | crem: exactly what i said 2 years ago. now look at me. still here :D |
16:15:52 | * | PMunch quit (Client Quit) |
16:16:04 | * | PMunch joined #nim |
16:16:16 | PMunch | That's weird |
16:16:51 | PMunch | My client seemed to be connected but wasn't.. |
16:17:08 | PMunch | https://github.com/ngtk3/nim-gtk3 why isn't this in Nimble? |
16:19:55 | crem | yglukhov: that's exactly what those who write in go say. :) |
16:20:42 | * | gangstacat quit (Quit: Ĝis!) |
16:22:17 | crem | And that topic is not covered in tutorial at all. :-\ |
16:23:27 | yglukhov | crem: nim is a bit different story imo. it gives you nice metaprogramming stuff to do things-that-would-have-required-raii differently. |
16:24:21 | yglukhov | it may be unusual when you're used to raii, the paradigm is kinda shifted |
16:25:03 | yglukhov | also note that raii has performance drawbacks |
16:25:48 | crem | Well, I just want not to forget to close resources. If only there was some magical operator/function which is called when a variable goes out of scope.. |
16:26:32 | yglukhov | withLock myLock: doMyStuff() |
16:26:40 | yglukhov | or just defer: release(myLock) |
16:26:41 | yglukhov | =) |
16:26:59 | yglukhov | or a finalizer |
16:27:13 | yglukhov | that will fire eventually |
16:27:28 | crem | hm, what is withLock.. |
16:28:44 | yglukhov | thats a template. you can write your own. it's just to demonstrate that there are ways to write api that is impossible to misuse (by forgetting to dispose smth, for example) |
16:28:55 | * | gangstacat joined #nim |
16:29:05 | yglukhov | i think there's actual withLock template in locks.nim std lib or smth |
16:30:22 | yglukhov | gotta go, later |
16:30:44 | * | yglukhov quit (Remote host closed the connection) |
16:31:17 | PMunch | Hmm, I'm implementing the slice operation for a custom collection type. Is there any documentation for what a slice actually is? |
16:32:14 | * | yglukhov joined #nim |
16:33:31 | crem | How can I take an address of a variable? |
16:33:31 | * | yglukhov quit (Read error: Connection reset by peer) |
16:33:45 | * | yglukhov joined #nim |
16:34:27 | ehmry | ``addr``, but only variables actually declared with ``var`` |
16:35:09 | ehmry | you probably don't actually want the address of a variables, it makes for unportable code |
16:35:35 | PMunch | crem are you asking how to do something like the pointer to a pointer thing in C to be able to update memory passed in? |
16:35:41 | crem | Probably not, but just wondering. Will it return pointer of that type or just some numerical address? |
16:36:34 | ehmry | yes, a typed pointer |
16:37:05 | crem | Ok, thanks. I understand that I probably won't need that ever, just asking for better understanding. |
16:37:07 | PMunch | If so then either consider returning a tuple of some sort, or do something like "proc change(x: var int)" and then you can change x for the original scope |
16:37:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:38:54 | crem | This https://pastebin.com/Eyk4UV4P is expected to return false, right? |
16:39:52 | crem | There is no "goto" in nim! Surely noone hopes that someone will use nim as a target language for compilation. :) |
16:40:35 | FromGitter | <Varriount> crem: You can use the `emit` pramgma |
16:40:52 | FromGitter | <Varriount> Emit the goto in C code... |
16:42:06 | PMunch | And you have blocks, so you can define a block with "block hello:" and then drop out of it by doing "break hello" |
16:42:42 | PMunch | It's not as flexible as a goto but it covers one of the most used cases for the goto statement. |
16:44:24 | crem | I just wanted to check if I could goto into "statements expression" and realized that I cannot. In g++ the same thing ({ ... }) didn't always work correct. |
16:44:54 | crem | But without RAII, you usually write all those defer mutex.unlock, right? |
16:48:44 | * | dom96|w joined #nim |
16:51:48 | * | couven92 joined #nim |
16:57:29 | * | krux02 quit (Remote host closed the connection) |
16:59:48 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:01:46 | ehmry | meh, if its not c++, raii just isn't how you do things |
17:03:13 | * | dankrad joined #nim |
17:04:02 | ehmry | if I really need to closely manage something I pass a proc to a proc that bookends the proc with acquire and release |
17:06:15 | * | dankrad quit (Read error: Connection reset by peer) |
17:08:30 | * | dankrad joined #nim |
17:09:38 | * | endragor quit (Remote host closed the connection) |
17:11:45 | * | endragor joined #nim |
17:11:45 | * | dankrad quit (Read error: Connection reset by peer) |
17:13:23 | PMunch | Hmm, with slices is a always lower than b? |
17:16:12 | * | endragor quit (Ping timeout: 260 seconds) |
17:16:48 | * | dankrad joined #nim |
17:18:27 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
17:22:31 | * | yglukhov joined #nim |
17:26:49 | * | itseris quit (Ping timeout: 268 seconds) |
17:27:18 | * | yglukhov quit (Ping timeout: 260 seconds) |
17:27:55 | * | handlex joined #nim |
17:33:28 | FromGitter | <Varriount> PMunch: Depends on what the container supports. |
17:33:57 | FromGitter | <Varriount> Actual slice objects `1..4` just contain two integers. The object doesn't put any constraint on it. |
17:34:14 | PMunch | Ah, okay |
17:34:28 | * | handlex quit (Ping timeout: 240 seconds) |
17:43:16 | * | dom96|w joined #nim |
17:46:28 | * | dankrad quit (Ping timeout: 240 seconds) |
17:46:51 | crem | In https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality, does toLower also lowers unicode characters? But only first byte is checked for equality, so two unicode identifiers, one capitalied and one not, are the same, right? Unless ascii identifiers. |
17:48:35 | Araq | only A-Z is lowercased really |
17:50:53 | * | yingjun joined #nim |
17:51:18 | FromGitter | <ephja> I use --path, but I guess I never thought of referencing the parent directory explicitly |
17:55:05 | * | yingjun quit (Ping timeout: 240 seconds) |
17:57:59 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
18:03:06 | FromGitter | <zacharycarter> AWS |
18:03:08 | FromGitter | <zacharycarter> lambda |
18:03:10 | FromGitter | <zacharycarter> say hello to Nim! |
18:03:24 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/uMSc/Screen-Shot-2017-07-20-at-2.02.52-PM.png) |
18:03:27 | FromGitter | <zacharycarter> sorry meant to put that on one line :P hit enter too many times |
18:03:45 | * | enthus1ast__ quit (Ping timeout: 248 seconds) |
18:04:37 | * | dankrad joined #nim |
18:11:01 | * | vlad1777d joined #nim |
18:11:50 | * | v17d quit (Ping timeout: 240 seconds) |
18:12:26 | * | yglukhov joined #nim |
18:16:13 | * | Matthias247 joined #nim |
18:21:00 | * | jsgrant joined #nim |
18:23:53 | federico3 | what happens if I use emit in a template? Is the C code injected in the wrong place? |
18:28:05 | * | Sentreen quit (Ping timeout: 240 seconds) |
18:32:44 | * | Vladar quit (Quit: Leaving) |
18:35:27 | Araq | federico3: it works |
18:40:22 | * | dddddd joined #nim |
18:40:32 | * | Sentreen joined #nim |
18:41:33 | subsetpark | zacharycarter - what are you doing? Compiling to js? |
18:42:49 | FromGitter | <zacharycarter> nope |
18:43:05 | FromGitter | <zacharycarter> running a binary via python and cross compiling to linux |
18:43:09 | FromGitter | <zacharycarter> doing this all with docker |
18:43:23 | FromGitter | <zacharycarter> I'm basically taking the same route golang does but I still have some work to do |
18:44:19 | PMunch | Hmm, I've got a custom data structure and I'm currently implementing slice operations and such. Should I do bounds checking? |
18:44:56 | subsetpark | ok, that's fair |
18:45:12 | subsetpark | why not just compile the nim to a dll and use ctypes, in that case? |
18:45:26 | crem | From manual: Whether an operator is used a prefix operator is also affected by preceding whitespace (introduced in 0.13.0) (with example that "echo $foo" is parsed as "echo($foo)"). Can anyone elaborate? How was it parsed before 0.13.0? |
18:46:09 | * | PMunch quit (Quit: leaving) |
18:46:49 | FromGitter | <zacharycarter> subsetpark that's the plan |
18:47:06 | FromGitter | <zacharycarter> basically compile to a so and then dlopen / dlclose |
18:47:12 | FromGitter | <zacharycarter> with python like go does |
18:47:23 | FromGitter | <zacharycarter> but the quickest approach was just to get a binary and execute that from python |
18:47:31 | FromGitter | <zacharycarter> so I did that as a poc |
18:52:27 | crem | Sublime syntax highlighter isn't aware of nim's case insensivity it seems. |
18:55:30 | crem | is uint32 ordinal? |
18:57:05 | Araq | crem: it was parsed as (echo) $ (foo) |
18:57:13 | Araq | aka a binary operator |
18:58:23 | crem | I'm actually not sure what echo is. I thought it's a reserved word which couldn't be a part of expression anyway. |
18:58:53 | Araq | echo is a built-in proc but you could write your own, it doesn't use compiler magic |
18:59:08 | crem | So, now echo$foo is still parsed as (echo)$(foo), and echo $ foo is echo ($foo), right? |
18:59:30 | Araq | no, echo $foo is unary |
18:59:37 | Araq | echo $ foo is binary |
18:59:48 | crem | I can write a proc which doesn't need parentheses for params? Interesting. |
18:59:48 | Araq | echo$foo too is binary |
19:00:20 | Araq | you don't need to do anything for this to work really, it's called the "command syntax" |
19:00:45 | crem | So "is also affected by preceding whitespace" is not totally precise then. Should be "whitespace around". |
19:00:58 | crem | Ok, reading further. :) |
19:02:13 | Araq | it works as you think it should work :P |
19:03:06 | crem | oh, that v_A_r ў: b_oO_l; e_c_ho ў compiles.. |
19:04:38 | FromGitter | <zacharycarter> Araq: I plan on creating something similar to : https://github.com/eawsy/aws-lambda-go-shim |
19:05:15 | FromGitter | <zacharycarter> it might make sense to get in touch with the maintainers of that project |
19:05:38 | FromGitter | <zacharycarter> see if they'd be willing to adopt it |
19:06:03 | FromGitter | <zacharycarter> either way I think AWS lambda support could / would bring some more eyes to Nim |
19:06:43 | crem | There's no signed modulo operator, is there? |
19:06:59 | FromGitter | <Varriount> mod? |
19:08:02 | crem | mod! like in pascal. Indeed, works. |
19:08:16 | crem | And there's no default meaning of % operator, right? |
19:08:18 | Araq | zacharycarter: not sure what it's about |
19:08:41 | Araq | crem: it's a string format operator like Python's |
19:08:53 | FromGitter | <zacharycarter> Araq: AWS lambda = serverless computing basically run a function of code in amazon's infrastructure and pay for the compute time |
19:09:03 | FromGitter | <zacharycarter> there are no instances, etc to manage |
19:09:05 | Araq | in strutils.nim, but it's also used for JSON construction |
19:09:27 | FromGitter | <zacharycarter> currently it only supports Java, C#, Python, NodeJS and Golang through a Shim |
19:09:51 | FromGitter | <zacharycarter> it's quite a popular service amongst the amazon web services community / userbase |
19:11:05 | crem | Ah! and div for integer division! :) That's actually good that / is float, although after lots of C++ I often make mistakes of using / as integer division also in python3. |
19:12:16 | subsetpark | zacharycarter - i'd love to see how it goes for you with the .so! |
19:12:41 | FromGitter | <zacharycarter> subsetpark: I'm going camping this weekend but I will give the shared library a go next week and report back |
19:12:52 | FromGitter | <zacharycarter> I desperately need a blog at this point and to start writing articles on this stuff |
19:13:49 | subsetpark | Yeah, I've been meaning to do a whole thing about the same topic |
19:14:11 | subsetpark | I've also been meaning to write a utility library that just gives you the ctypes for nim types |
19:14:27 | FromGitter | <zacharycarter> could def be handy |
19:15:35 | * | w-p joined #nim |
19:15:40 | Araq | crem: you can't really make a mistake here, Nim's type system prevents that |
19:16:08 | * | nhywyll joined #nim |
19:16:29 | w-p | noob help request. i'm reading this page: https://nim-lang.org/docs/asynchttpserver.html, and i cannot for the life of me find documentation that explains the use of %* |
19:16:37 | w-p | can anyone point me in the right direction? |
19:16:39 | def- | w-p: json module |
19:17:20 | def- | https://nim-lang.org/docs/json.html#creating-json |
19:17:31 | w-p | right... which says 'This module can also be used to comfortably create JSON using the %* operator:' |
19:17:56 | w-p | sorry if i'm dense, i'm just trying to understand what it means. |
19:18:11 | def- | https://nim-lang.org/docs/json.html#%*.m,untyped |
19:18:16 | Araq | https://nim-lang.org/docs/theindex.html#%60%25%2A%60 |
19:18:19 | def- | > Convert an expression to a JsonNode directly, without having to specify % for every element. |
19:19:18 | w-p | right. macro. ok. thanks. like i said, noob. - but trying. |
19:19:25 | FromGitter | <ephja> the lexim match syntax is not valid anymore apparently |
19:21:43 | FromGitter | <ephja> ```foo: ⏎ of 1: discard ⏎ of 2: discard``` [https://gitter.im/nim-lang/Nim?at=597102c7c101bc4e3aa5397f] |
19:23:31 | * | w-p quit (Quit: Leaving) |
19:30:15 | Araq | ephja: yeah I need to update lexim -.- |
19:42:38 | * | Nimbecile joined #nim |
19:44:06 | * | arnetheduck joined #nim |
19:44:52 | crem | openarray is a bit cumbersome name for that useful concept, and it's not that precise.. why is it "open"? array_view or slice would be nicer. |
19:46:03 | crem | I guess all those range, slice, etc were already taken for something else. |
19:47:37 | FromGitter | <ephja> it's a neat lib. I'm guessing the json error is caused by the marshal module |
19:53:46 | * | nsf quit (Quit: WeeChat 1.9) |
19:54:41 | * | yglukhov quit (Remote host closed the connection) |
19:55:42 | Nimbecile | Hi Araq...just a reminder that "Unofficial packages" are not showing on website. I'm using Wayback machine to view when needed, so no hurry. |
20:02:22 | FromGitter | <stisa> Nimbecile: you can also search with `nimble search <keyword>` or with something like http://nimism.co |
20:05:40 | Araq | Nimbecile: thanks for the reminder |
20:05:45 | Araq | let me look into it now |
20:06:12 | FromGitter | <Varriount> @Araq Here's a chance to test out your immutable string type: https://forum.nim-lang.org/t/3062 |
20:06:23 | * | rauss quit (Quit: WeeChat 1.9) |
20:18:32 | Araq | tried a similar program, no difference |
20:22:02 | * | yglukhov joined #nim |
20:22:25 | * | dankrad quit (Ping timeout: 248 seconds) |
20:22:27 | * | PMunch joined #nim |
20:24:10 | * | dankrad joined #nim |
20:24:58 | * | itseris joined #nim |
20:29:58 | * | vlad1777d quit (Ping timeout: 268 seconds) |
20:32:32 | * | Nimbecile left #nim (#nim) |
20:37:58 | * | itseris quit (Ping timeout: 276 seconds) |
20:40:48 | * | itseris joined #nim |
20:42:57 | * | itseris quit (Client Quit) |
20:43:22 | * | vlad1777d joined #nim |
20:44:38 | PMunch | Hmm, is there a way to document constants with docgen? |
20:50:40 | * | jenkins joined #nim |
20:51:35 | FromGitter | <ephja> I'll check the source |
20:54:57 | PMunch | Oh the irony, I can't find any good documentation of how docgen works.. |
20:56:11 | * | nsf joined #nim |
21:04:41 | * | Trustable quit (Remote host closed the connection) |
21:10:26 | Araq | https://nim-lang.org/docs/tools.html |
21:10:34 | Araq | https://nim-lang.org/docs/docgen.html |
21:11:33 | Araq | our "search" input field is too stupid to understand "docgen" though .... |
21:12:52 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/QI4h/Screen-Shot-2017-07-20-at-5.12.28-PM.png) |
21:15:21 | PMunch | Yeah I've seen those Araq. But it's a bit lacking in what happens with for example a const block |
21:15:49 | Araq | ah I missed the "good" word |
21:16:03 | Araq | well we have docs and you're free to improve them |
21:16:16 | Araq | not sure what to say about consts |
21:16:19 | Araq | const |
21:16:29 | Araq | foo* = "string" ## this is super helpful |
21:27:03 | PMunch | Aah okay, that helps :P |
21:27:32 | PMunch | What does "Error: Invalid argument for 'high'" mean? |
21:27:58 | PMunch | I have a high proc which works just fine within my module. But apparently not when I import it.. |
21:28:50 | PMunch | It is defined as "proc high*[T](vec: PersistentVector[T]): int" |
21:30:42 | Araq | you must not overload 'high' |
21:31:03 | Araq | that's in the spec :P |
21:31:20 | Araq | but detecting it is as much work as fixing it, so *shrug* |
21:34:46 | * | Nimbecile joined #nim |
21:37:09 | * | Nimbecile left #nim (#nim) |
21:37:26 | * | Nimbecile joined #nim |
21:53:12 | PMunch | Aah |
21:53:58 | * | yingjun joined #nim |
21:54:57 | * | dankrad quit (Ping timeout: 240 seconds) |
21:55:11 | PMunch | Hmm, removing the high proc makes the main module throw the same error.. |
21:56:20 | PMunch | And in the importing module.. |
21:56:24 | * | dankrad joined #nim |
21:56:35 | * | vlad1777d quit (Ping timeout: 240 seconds) |
21:57:03 | PMunch | ix.io/yBl |
21:57:11 | PMunch | That's my code |
21:57:37 | PMunch | I'm off to take a shower. I'll be back later |
21:58:08 | * | yingjun quit (Ping timeout: 240 seconds) |
21:58:16 | * | vlad1777d joined #nim |
22:03:27 | * | dankrad quit (Ping timeout: 240 seconds) |
22:03:45 | * | vlad1777d quit (Ping timeout: 248 seconds) |
22:04:56 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:10:50 | * | vlad1777d joined #nim |
22:15:22 | * | jenkins quit (Quit: WeeChat 1.9) |
22:16:46 | * | Nimbecile left #nim (#nim) |
22:21:22 | PMunch | Oh wow. 1_000_000 inserts into the persistent data structure (all million lists accessible and immutable) 4.5s about 400MB of RAM. Allocating 15_000 sequences for the same goal took 4.5s as well but used almost twice the RAM. |
22:21:51 | PMunch | And that's with two orders of magnitude less data |
22:22:24 | PMunch | First list is one element, next is two, then three etc. All the way to 1_000_000/15_000 elements |
22:22:34 | * | aziz joined #nim |
22:22:41 | * | PMunch quit (Quit: leaving) |
22:23:13 | * | aziz quit (Client Quit) |
22:29:00 | * | nhywyll quit (Quit: nhywyll) |
22:34:00 | * | dankrad joined #nim |
22:34:58 | * | tdc quit (Ping timeout: 240 seconds) |
22:52:58 | * | vlad1777d quit (Ping timeout: 240 seconds) |
22:54:22 | * | vlad1777d joined #nim |
22:58:36 | couven92 | where would I install Nim on Ubuntu when running install.sh? |
22:58:42 | * | nsf quit (Quit: WeeChat 1.9) |
22:59:30 | couven92 | /usr/bin or /usr/local/bin? |
23:00:09 | couven92 | (I don't usually do Linux, I literally have no clue what the difference would be :P) |
23:08:54 | * | Nikky quit (Quit: WeeChat 1.8) |
23:09:06 | * | Nikky joined #nim |
23:15:20 | FromGitter | <Varriount> Probably /usr/local/bin |
23:15:28 | FromGitter | <Varriount> /usr/bin is for system stuff, I think |
23:16:02 | FromGitter | <Varriount> Anyone got a better version of the Nim program at https://forum.nim-lang.org/t/3062 |
23:16:13 | FromGitter | <Varriount> I still don't know why the python version is so fast |
23:17:02 | FromGitter | <Varriount> PMunch: Is that good or bad? |
23:29:31 | * | yglukhov quit (Remote host closed the connection) |
23:30:32 | * | yglukhov joined #nim |
23:35:23 | * | yglukhov quit (Ping timeout: 260 seconds) |
23:44:10 | * | couven92 quit (Quit: Client Disconnecting) |
23:54:35 | * | pilne joined #nim |
23:55:55 | * | yingjun joined #nim |
23:59:58 | * | yingjun quit (Ping timeout: 240 seconds) |