00:00:10 | FromGitter | <TiberiumN> this is already implemented in nim |
00:00:55 | FromGitter | <zetashift> yea the book mentions that most languages already have a thing for this but it wants to teach to do it your way |
00:01:03 | FromGitter | <zetashift> well not your way but from the ground up |
00:02:58 | oddduck | How would I wrap foo->bar? |
00:05:27 | * | rosshadden quit (Quit: WeeChat 1.9) |
00:10:32 | * | def-pri-pub joined #nim |
00:13:28 | FromGitter | <zetashift> I feel like when I finally get to compile this all I'm gonna have a clusterfuck of errors |
00:15:53 | * | endragor joined #nim |
00:19:57 | * | endragor quit (Ping timeout: 240 seconds) |
00:21:38 | def-pri-pub | zacharycarter: hey, I logged a new issue for zengine and got back to you on that one for example 01 |
00:26:12 | * | arnetheduck joined #nim |
00:52:42 | * | yglukhov joined #nim |
00:57:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:04:10 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:18:23 | * | chemist69 joined #nim |
01:51:55 | * | def-pri-pub quit (Quit: leaving) |
01:52:52 | * | arnetheduck quit (Ping timeout: 260 seconds) |
02:03:01 | * | chemist69 quit (Ping timeout: 276 seconds) |
02:04:30 | * | astronavt joined #nim |
02:04:43 | * | astronavt left #nim (#nim) |
02:05:39 | * | mahmudov quit (Remote host closed the connection) |
02:13:04 | * | def-pri-pub joined #nim |
02:14:28 | * | mahtov2 joined #nim |
02:16:26 | * | chemist69 joined #nim |
02:17:30 | * | mahtov quit (Ping timeout: 268 seconds) |
02:18:50 | * | acidx quit (Ping timeout: 255 seconds) |
02:19:17 | * | insomniac quit (Ping timeout: 255 seconds) |
02:19:41 | * | acidx joined #nim |
02:19:49 | * | insomniac joined #nim |
02:29:38 | * | oddduck quit (Quit: Page closed) |
02:29:59 | * | dddddd quit (Remote host closed the connection) |
02:41:18 | * | endragor joined #nim |
02:54:45 | * | yglukhov joined #nim |
02:59:07 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:02:19 | * | Nimbecile left #nim (#nim) |
03:24:58 | * | skrylar joined #nim |
03:43:53 | skrylar | today i learned yes afl-fuzz does work with nim and also i apparently managed a deserializer that doesn't crash |
03:51:25 | skrylar | that face when the program doesn't break 8-) |
04:05:23 | * | sz0 joined #nim |
04:22:03 | * | def-pri-pub quit (Quit: leaving) |
04:56:34 | * | yglukhov joined #nim |
05:00:37 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:19:57 | * | rauss quit (Ping timeout: 260 seconds) |
05:32:31 | * | tdc joined #nim |
05:35:02 | * | tdc_ joined #nim |
05:38:37 | * | tdc quit (Ping timeout: 240 seconds) |
05:47:07 | * | dankrad quit (Ping timeout: 240 seconds) |
05:47:32 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
06:00:39 | * | yglukhov joined #nim |
06:04:58 | * | yglukhov quit (Ping timeout: 258 seconds) |
06:20:44 | * | tankfeeder joined #nim |
06:23:29 | * | Sentreen quit (Ping timeout: 248 seconds) |
06:37:33 | * | Sentreen joined #nim |
06:40:49 | skrylar | didn't i read somewhere that futures are in the stdlib |
06:41:06 | skrylar | i was just looking at macros for handling rpc stuff and realized return values don't quite work over networks, but futures do |
06:41:24 | * | tdc__ joined #nim |
06:44:07 | * | tdc_ quit (Ping timeout: 240 seconds) |
06:50:18 | * | skrylar headscratches. Maybe it's my bad, but i have this little snippet that uses gettypeimpl on a typedesc passed in to a macro, and it doesn't show if something is public or not |
06:51:04 | * | nsf joined #nim |
06:51:22 | ftsf | the `=deepCopy` proc, it says it's invoked whenever passed to a spawned proc, but is it used by deepCopy ? |
06:52:10 | skrylar | i think that method is for magic |
06:52:57 | ftsf | hmm yeah, it doesn't seem to be used by deepCopy, which is what I was hoping it would be used by |
06:53:13 | ftsf | not sure if I can override the behaviour of deepcopy |
06:54:04 | * | sz0 quit (Quit: Connection closed for inactivity) |
06:56:17 | skrylar | i don't imagine why not |
06:57:03 | skrylar | Well, it might throw up ambiguity errors with the existing one at worst. But you can namespace them apart. |
06:57:42 | ftsf | ahh i mean, make deepCopy behave in a different way for different types |
06:57:47 | ftsf | not make a new deepcopy |
06:57:59 | ftsf | deepcopy is magic =( |
06:58:00 | skrylar | deep-copy doesn't do anything intelligent with pointers as far as i know. it just makes copies of strings and sequences, i think, but pointers are always just bit-copied over afaik. i made a custom clone command for my tree types that truly did need copies |
06:58:30 | ftsf | yeah, it seems like =deepCopy should be used in this case, and makes sense, but doesn't appear to be used |
06:59:16 | ftsf | deepcopy is nice because i don't have to make it care about inherited types |
06:59:43 | ftsf | if i make a clone method it'll have to know how to handle every inherited type afaict |
06:59:45 | skrylar | eh.. i mean it could be argued as something worthy of an issue/post, although i think deepcopy is intended to be a primitive |
07:01:07 | ftsf | i guess i'll see how it works during spawn |
07:01:20 | skrylar | nods |
07:01:32 | skrylar | haven't done any concurrency things in nim yet sadly |
07:01:40 | ftsf | me either |
07:01:56 | ftsf | well, not using Nim's concurrency stuff at least, just foreign threads |
07:02:28 | skrylar | afaik the official and stable way to thread in nim is each one gets its own gc and you talk over channels or using shared memory blobs |
07:02:39 | skrylar | but i'm out of date on that front |
07:03:36 | skrylar | some macro wizard might be able to acquire iced coffee script's await/async sugar in a nim macro |
07:03:52 | ftsf | dang, spawn is magic too |
07:04:07 | skrylar | spawn always is |
07:04:19 | skrylar | spawn/fork/run are primitives :< |
07:04:26 | ftsf | never figured out where the code for magic stuff lives |
07:04:34 | skrylar | i don't know if nim reacts poorly to forks |
07:05:19 | skrylar | i would suppose not because that doesn't mess with memory significantly and other GC-langs can survive forks for concurrency (ex. python interpreters) but that's unix only |
07:05:24 | * | tdc__ quit (Quit: Leaving) |
07:05:56 | * | tdc__ joined #nim |
07:06:06 | * | tdc__ is now known as tdc |
07:11:07 | * | insomniac quit (Changing host) |
07:11:07 | * | insomniac joined #nim |
07:18:59 | * | yglukhov joined #nim |
07:23:16 | * | yglukhov quit (Ping timeout: 260 seconds) |
07:27:47 | * | cspar_ joined #nim |
07:31:12 | * | cspar quit (Ping timeout: 260 seconds) |
07:31:23 | Araq | ftsf: deepCopy does invoke =deepCopy |
07:31:41 | * | yglukhov joined #nim |
07:31:44 | ftsf | Araq, ooh, interesting then! |
07:31:49 | Araq | maybe there is a bug here but it's supposed to work as you described |
07:31:55 | ftsf | i wonder why my proc is not being called... |
07:47:21 | skrylar | hmmm |
07:49:20 | * | sakalli joined #nim |
07:57:05 | Araq | report a snippet? |
07:57:38 | ftsf | will have to make a smaller case when i get back, about to go out to a playtesting event with my new nim game =) |
07:57:56 | * | Vladar joined #nim |
07:58:08 | ftsf | https://twitter.com/impbox/status/894819555360464896 |
08:01:38 | skrylar | ah gamedev. i remember aspiring to be one of those |
08:02:04 | skrylar | watching macros obliterate boilerplate makes my day |
08:03:05 | ftsf | skrylar, well gamedev certainly pays less than my old job, but it's fun |
08:03:31 | skrylar | ftsf i switched over to machine learning |
08:03:37 | skrylar | it pays nothing but well |
08:04:23 | * | nattefrost joined #nim |
08:05:02 | ftsf | gamedev pays one of those words =p |
08:05:12 | skrylar | i love jobs that pay "it" |
08:05:28 | skrylar | slightly more legal than jobs that pay in "but" |
08:09:04 | skrylar | well ML can pay a lot dependingo n what you do with it |
08:15:46 | * | v17d joined #nim |
08:31:30 | * | Arrrr joined #nim |
08:31:30 | * | Arrrr quit (Changing host) |
08:31:30 | * | Arrrr joined #nim |
08:40:48 | * | sakalli quit (Ping timeout: 240 seconds) |
08:45:20 | * | couven92 joined #nim |
08:47:33 | * | Ven joined #nim |
08:47:56 | * | Ven is now known as Guest71418 |
08:53:07 | * | Guest71418 quit (Ping timeout: 240 seconds) |
08:58:53 | * | Ven_ joined #nim |
09:02:10 | * | jinshil quit (Quit: Good-bye!) |
09:05:45 | couven92 | Araq, regarding the Testament pretty-HTML, I saw your message from yesterday... You're saying I should wait for the parallel tester and then rework my pretty-HTML to be generated on the fly while the parallel tester is running, instead of having an `html` command? |
09:09:11 | couven92 | alternatively we could replace SQLite with on-the-fly JSON output, and then let the `html` command to read the JSON... With JSON we would have the benefit of being able to simply append test runs to an existing JSON file, so that we could capture multiple test runs and have the ability to compare them if one needed to |
09:10:39 | * | sakalli joined #nim |
09:19:18 | * | Tiberium joined #nim |
09:22:05 | Araq | couven92: I wasn't saying much, I was asking what you think about it. I don't know what's more work, merge now and adapt later or wait for the parallel stuff to be ready |
09:22:33 | couven92 | Araq, is someone actively working on parallel testament yet? |
09:22:43 | Araq | yes, see the other PR |
09:23:14 | couven92 | ah, https://github.com/nim-lang/Nim/pull/6190 ? |
09:24:25 | couven92 | well pretty-HTML is not that much of an issue, I think we can wait for parallel testament first. If someone REALLY want pretty-HTML they are welcome to clone my branch |
09:25:13 | couven92 | If I get time during next weekend, maybe I'll see if I can help @singularperturbation with his PR |
09:27:15 | couven92 | because even though I opened issue #6197, I don't really know the inner workings of the vm that well, that I start dealing with VM on 32-bit |
09:29:14 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
09:29:32 | couven92 | in the meantime Araq, should we merge https://github.com/nim-lang/Nim/pull/6195 ? I'm actually surprise I didn't catch that one earlier... :O |
09:31:31 | Araq | I don't understand that one, why do we need /EHsc? |
09:31:58 | couven92 | Because else VCC starts whining in some cases |
09:32:39 | couven92 | on the other hand... I think it actually is the default... so maybe we don't need that at all |
09:33:25 | couven92 | But /EH does: "Specifies the kind of exception handling used by the compiler, when to optimize away exception checks, and whether to destroy C++ objects that go out of scope because of an exception." |
09:35:43 | * | mahtov2 quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
09:36:48 | * | mahtov joined #nim |
09:40:28 | * | Ven_ quit (Ping timeout: 240 seconds) |
09:51:53 | * | skrylar joined #nim |
09:52:42 | FromGitter | <couven92> Anyways, Araq, the point of #6195 is not really /EHsc but adding C++ options for VCC. Without those Nim tries to run cl directly and fails because of that. |
09:58:35 | * | Tiberium quit (Quit: Textual IRC Client: www.textualapp.com) |
10:06:05 | * | sakalli quit (Ping timeout: 240 seconds) |
10:06:56 | Araq | ok got it |
10:07:31 | couven92 | dom96, when creating a new thread on the forums the RST help specifies this link http://nim-lang.org/rst.html which leads to a 404 |
10:09:44 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
10:10:34 | FromGitter | <moigagoo> Hi! I'm trying this template code from "Nim in Action" and the official Nim manual: ⏎ ⏎ ```template `!=` (a, b: untyped) = ⏎ not (a == b) ⏎ ⏎ doAssert 5 != 4``` ⏎ ⏎ Compilation fails with `templates.nim(4, 12) Error: expression 'true' is of type 'bool' and has to be discarded` [https://gitter.im/nim-lang/Nim?at=59898e1a614889d4752b4353] |
10:10:44 | FromGitter | <moigagoo> Nim 0.17.0 on Windows. |
10:10:58 | FromGitter | <moigagoo> Is it a bug to report, or am I missing something? |
10:14:26 | Araq | maybe a documentation bug, but the template needs a return type like 'untyped' or 'bool' |
10:14:36 | FromGitter | <moigagoo> UPD: Adding `untyped` return type to the template fixes it. Probably should be mentioned in the manual. The book is already finished, so I guess it stays there :-( |
10:14:53 | FromGitter | <moigagoo> I'm too slow) |
10:15:23 | Araq | books can have revisions :-) |
10:15:35 | FromGitter | <moigagoo> Will report anyway :-) |
10:15:58 | FromGitter | <moigagoo> Also, it's OK in the manual, it's just that I'm not attentive ernough. |
10:16:02 | * | mahtov quit (Ping timeout: 268 seconds) |
10:16:19 | * | mahtov joined #nim |
10:16:41 | * | ldlework quit (Ping timeout: 268 seconds) |
10:16:52 | * | Calinou quit (Remote host closed the connection) |
10:17:54 | * | bodie_ quit (Ping timeout: 268 seconds) |
10:17:55 | * | askatasuna quit (Ping timeout: 268 seconds) |
10:18:00 | * | Calinou joined #nim |
10:18:24 | * | ldlework joined #nim |
10:18:24 | * | ldlework quit (Changing host) |
10:18:24 | * | ldlework joined #nim |
10:19:44 | * | Amun_Ra quit (Ping timeout: 268 seconds) |
10:19:45 | * | bodie_ joined #nim |
10:20:13 | * | askatasuna joined #nim |
10:20:31 | * | Amun_Ra joined #nim |
10:20:42 | couven92 | Araq, I'm writing up a Nim Forum post for upcoming Android support. Is csources updated with the android stuff already? I guess you only update that for each Nim release, correct? So I should probably write how to get csources onto your android as well, right? |
10:22:08 | * | haha_ joined #nim |
10:27:31 | * | Ven joined #nim |
10:27:55 | * | Ven is now known as Guest80852 |
10:34:31 | Araq | meh, I can regenerate csources tonight |
10:38:52 | federico3 | how to get the last N sequence elements *if* present? |
10:42:45 | * | dom96|w joined #nim |
10:47:48 | couven92 | there we go: https://forum.nim-lang.org/t/3098 |
10:48:06 | * | Guest80852 quit (Ping timeout: 268 seconds) |
10:58:16 | * | mahtov quit (Ping timeout: 246 seconds) |
11:08:15 | couven92 | oh right... Araq, we probably should also merge https://github.com/nim-lang/Nim/pull/6194 now that the forum post is out :P I wouldn't want people to try and run nimscript on android and fail immediately :O |
11:09:39 | couven92 | sorry for this high maintanence :P I'm back to my day job again now... So I'll probably stay reasonably quiet until the weekend :D |
11:27:09 | * | v17d quit (Remote host closed the connection) |
11:30:07 | * | mahtov joined #nim |
11:30:41 | Araq | pity, I wanted you to do more stdlib work |
11:31:09 | Araq | editDistance for unicode comes to mind |
11:33:51 | * | krux02 joined #nim |
11:34:50 | FromGitter | <TiberiumN> is it safe to use clang instead of gcc? on my project, compiling with -d:release and --forceBuild gcc 7.1.1 takes ~18 seconds, while clang 4.0.1 takes ~12 seconds |
11:35:08 | Araq | travis only uses clang, in fact |
11:35:17 | Araq | so yes. very safe to do that. |
11:35:25 | FromGitter | <TiberiumN> because I heard it's really faster than gcc |
11:35:32 | FromGitter | <TiberiumN> at compiling times |
11:35:38 | Araq | gcc tends to produce better code though |
11:35:54 | FromGitter | <TiberiumN> well I don't need very much speed in my project :) |
11:36:13 | Araq | eventually clang will catch up but it's taking them much longer than I expected |
11:36:17 | FromGitter | <krux02> well most of the time the speed is fast enough without many optimizations |
11:36:28 | FromGitter | <TiberiumN> because it's still C |
11:36:36 | FromGitter | <krux02> I mean people program in python, and still get things done |
11:36:41 | FromGitter | <TiberiumN> ah, yes, true |
11:37:23 | FromGitter | <krux02> I just like to be able to write fast code when i need to and not waste a lot of space |
11:40:15 | * | Ven joined #nim |
11:40:39 | * | Ven is now known as Guest12799 |
11:41:15 | * | arnetheduck joined #nim |
11:44:50 | * | Tiberium joined #nim |
11:46:11 | * | Tiberium quit (Client Quit) |
11:46:29 | * | Tiberium joined #nim |
11:49:29 | euantor | clang sometimes produces faster code, like in my "Faster Command Line Tools in Nim" |
11:53:25 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:55:55 | * | EastByte quit (Quit: WeeChat 1.8) |
11:56:51 | * | EastByte joined #nim |
11:57:09 | * | sakalli joined #nim |
12:02:21 | * | tdc_ joined #nim |
12:04:45 | * | tdc__ joined #nim |
12:05:37 | * | tdc quit (Ping timeout: 240 seconds) |
12:08:16 | * | tdc_ quit (Ping timeout: 268 seconds) |
12:19:45 | * | tdc joined #nim |
12:20:02 | Tiberium | euantor, well I want to use it because it's faster at compiling stuff :) |
12:20:31 | euantor | It's the default compiler on macOS which is the only reason I use it |
12:20:46 | Tiberium | debug build of my app takes 7 seconds to compile (without nimcache) |
12:22:52 | * | tdc__ quit (Ping timeout: 260 seconds) |
12:27:33 | * | Arrrr quit (Read error: Connection reset by peer) |
12:27:38 | * | Tiberium quit (Remote host closed the connection) |
12:34:50 | * | dom96|w joined #nim |
12:37:05 | * | tdc_ joined #nim |
12:39:43 | * | tdc quit (Ping timeout: 268 seconds) |
12:44:58 | FromGitter | <timmyjose> I personally like the better error messages clang produces |
12:48:26 | * | tdc__ joined #nim |
12:51:16 | * | tdc joined #nim |
12:51:28 | * | tdc_ quit (Ping timeout: 240 seconds) |
12:53:59 | * | tdc__ quit (Ping timeout: 258 seconds) |
12:56:37 | * | tdc quit (Ping timeout: 240 seconds) |
13:00:54 | * | tdc joined #nim |
13:07:27 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
13:08:48 | * | ShalokShalom joined #nim |
13:11:06 | * | dom96|w joined #nim |
13:16:29 | * | dddddd joined #nim |
13:34:02 | couven92 | Araq, uhm have actually never dealt with Levenshtein distance before... |
13:35:01 | couven92 | a stupid variant of me would use string.toRunes and then change editDistance to take a seq[Rune] instead of string... |
13:35:16 | * | rauss joined #nim |
13:35:44 | couven92 | but probably using the string.runes iterator would be better here... |
13:38:06 | * | haha_ quit (Quit: haha_) |
13:39:43 | * | Tiberium joined #nim |
13:40:43 | * | haha_ joined #nim |
13:42:21 | Tiberium | is there any info on using debugger for nim in vscode? |
13:42:56 | couven92 | @Tiberium, can VS Code use GDB? |
13:43:00 | Tiberium | yes |
13:43:44 | couven92 | what if you you configure your launch.json as you would for a normal C project and replace the gcc command in task.json with nim compile? |
13:44:34 | Tiberium | well if I try to press F5, debugger starts and immediatly stops |
13:44:54 | Tiberium | ah |
13:45:01 | Tiberium | it seems executable path is wrong |
13:45:14 | Tiberium | ah! i'm dumb |
13:45:19 | Tiberium | i didn't had gdb installed :D |
13:45:50 | couven92 | yeah... without a debugger installed, running a debugger will be quite hard... :P |
13:49:37 | Tiberium | is there any stuff planned on improving debugging experience? for example name objects as they're named in my code, not T5_ or T6_ |
13:50:36 | couven92 | some day, I should really write a research paper on that and implement step-by-step debugging Nim in Visual Studio :P |
13:51:20 | couven92 | maybe when I am done with my M.Sc. and need a new freetime research project :P |
13:52:12 | Tiberium | well at least it works |
13:52:48 | krux02 | couven92: yes debugging support in Nim, please. |
13:52:56 | krux02 | It is one of the weaknesses of Nim |
13:53:32 | couven92 | krux02, yeah, I'd love to be able to get the rich debugging that I get when debugging a C# app... would be nice! :) |
13:53:43 | krux02 | Tiberium: T5_ and T6_ are actually temporary variables, your local variables are properly named in the generated code |
13:53:51 | Tiberium | ah, ok |
13:54:43 | * | haha_ quit (Quit: haha_) |
13:55:41 | krux02 | I debug with gdb, and debugging with the command line debugger is a pain, since it is the command line debugger, but surprisingly a lot of things are not that bad |
13:56:34 | krux02 | breakpoints can be set to functions and tab completion completes the function names |
13:57:10 | couven92 | krux02, I think the only time I have used GDB was when I had a subject where I needed to write an optimized matrix multiplier in x86 Assembly and we had to use GAS syntax |
13:57:34 | * | haha_ joined #nim |
13:57:39 | krux02 | well, I don't debug the assembly, it actually shows the source location |
13:57:57 | * | Sentreen quit (Ping timeout: 260 seconds) |
13:58:02 | krux02 | just use "tui enable" and you see the source |
13:58:37 | krux02 | overall it's a horrible debugging experience, but it can debug |
13:59:26 | couven92 | but krux02 isn't it so that when you actually have gdb support that lot's of GUIs give you a pretty decent experience |
14:00:04 | Tiberium | I dream that Nim some day would have same debugging experience as Python in PyCharm :) |
14:01:39 | Araq | Tiberium: make it happen... |
14:02:36 | Araq | krux02: what are the current pain points? |
14:07:34 | krux02 | The initial pain point is, that the default build, the debug build, has no debug information. |
14:07:45 | krux02 | I never quite understood that one. |
14:08:08 | krux02 | Then the debugger does not understand builtin Nim Types |
14:08:48 | krux02 | seq and string should be types that the debugger understands and displays as such |
14:09:02 | couven92 | Araq, krux02, hmmm... this is interesting: https://msdn.microsoft.com/en-us/library/bb145934.aspx |
14:09:36 | krux02 | meaning that in a visual debugger (e.g. visual-studio-code) a local variables should be explorable |
14:10:39 | * | Sentreen joined #nim |
14:11:25 | Araq | it's a pointer to a struct with length, cap info followed by a variably sized array as the last struct member. |
14:11:46 | krux02 | I know |
14:11:56 | Araq | as far as I'm concerned there is not even a hack in there, it's Ansi C and the debugger should be able to deal with Ansi C. |
14:12:15 | Araq | enums and sets of enums are a different story |
14:12:25 | Araq | oh I see |
14:12:27 | krux02 | well when I use command line gdb (which is not really my favorite tool) it is somewhat aceptable |
14:12:43 | Araq | it cannot map the array length to the len field |
14:13:28 | krux02 | but when I want to debug in a frontend, then I wuold like gdb to know that seq is not a pointer and two integers, but actually a sequence with N members |
14:14:37 | krux02 | yes, exactly |
14:14:46 | Araq | yeah I can see why the debugger fails |
14:16:05 | krux02 | there is a possibility to embed a python script in the executable that is automatically loaded by gdb |
14:16:48 | krux02 | this is how I embed the python script in the executable: https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/debug.nim |
14:17:20 | krux02 | and this is the python script I can load https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/nim-gdb.py |
14:17:54 | krux02 | The problem is here: https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/nim-gdb.py#L58 |
14:18:49 | krux02 | I have mentioned it once in the past, but seq types need actually seq values |
14:18:56 | krux02 | sorry seq names |
14:19:58 | krux02 | so for example it would be nice when a types starts with TY_NIMSEQ_, it is a seq type and the debugger doesn't have false positives |
14:21:02 | Araq | ok, that's feasible |
14:21:15 | couven92 | Hmm... theoretically, with https://github.com/Microsoft/microsoft-pdb we should be able to create Nim pdb file that can be used by the Windows native debugger, right? |
14:22:54 | FromGitter | <krux02> should I open an issue for that? |
14:25:59 | Araq | a PR would be nicer, but sure |
14:26:33 | FromGitter | <krux02> Well the array to string PR is ready |
14:27:03 | FromGitter | <krux02> I decided handling '\0' in echo properly is another construction site |
14:27:15 | FromGitter | <krux02> not part of that PR |
14:32:23 | Araq | ah good. |
14:37:30 | Araq | ah one more thing: That code you posted that breaks my reordering pass, did you extract that from a realworld example that broke? |
14:37:40 | Araq | or was that constructed to break it? |
14:37:49 | FromGitter | <krux02> It was constructed to break |
14:38:17 | FromGitter | <krux02> I just wanted to show that these reordering can break things |
14:38:38 | Araq | as if I didn't know :P |
14:38:40 | FromGitter | <krux02> reorderings and static side effects at the same time are a bad thing to do |
14:38:49 | Araq | but |
14:39:00 | Araq | a) a simple 'when true' block means "keep it in order" |
14:39:25 | Araq | b) these static .compiletime vars are super bad for modularity (incremental compilations) |
14:40:33 | FromGitter | <krux02> I don't use them and I would not use them |
14:40:42 | FromGitter | <krux02> I just used them to break the compilation :P |
14:41:11 | Araq | good to know |
14:42:03 | FromGitter | <krux02> In the beginning they scared me, now I just don't use them, because I think that at least for the compilation there should not be any side effect |
14:42:31 | FromGitter | <krux02> but there is one thing that I would like to ask if you have a nice solution for it |
14:42:55 | * | tfr joined #nim |
14:43:17 | * | tfr quit (Client Quit) |
14:43:23 | * | haha_ quit (Quit: haha_) |
14:43:55 | * | icieyes joined #nim |
14:43:56 | Araq | ooohh deja-vu |
14:44:12 | Araq | I've read this exact sentence before |
14:45:22 | FromGitter | <krux02> for my opengl macros, I create a shader program for every macreo instance. Is it possible to collect all of the macro instances into a single initialization block? |
14:47:10 | FromGitter | <krux02> meaning: callMacro(); [...]; callMacro(); [...]; callMacro(); generates this: var a = 0; if a == 0: initA(); [...] var b = 0; if b == 0; initB(); [...] var c = 0; ib c == 0; initC(); |
14:48:04 | icieyes | hey, happened to see on the logs you mention {.compiletime.} vars interfering with reordering pass. Should I be concerned over my use of them in my ECS? I use them a fair bit to collect a list of ident names to build the addComponent logic |
14:48:27 | icieyes | however the entire system is confined to one module |
14:48:42 | Araq | icieyes: if you collect a list the order shouldn't matter |
14:48:47 | FromGitter | <krux02> I would like to have this generated: let vars: array[3;int] = initAll(); [...] let a = vars[0] [...] let b = vars[1] [...] let c = vars[2] |
14:48:55 | icieyes | excellent :) |
14:49:02 | Araq | it's just when you depend on the exact integer position values things would break |
14:49:16 | FromGitter | <krux02> I know how to do it with a static var |
14:49:48 | Araq | krux02: my solutions all use static vars for this too |
14:49:50 | FromGitter | <krux02> I could create a static var of type seq[NimNode] and append the init code every time I invoke a macro |
14:50:02 | Araq | that's what I do, yeah |
14:50:35 | FromGitter | <krux02> well that works |
14:51:16 | FromGitter | <krux02> it there an end of compilation invoked macro then? |
14:51:58 | FromGitter | <krux02> because I need to generate the init function at the end when all macros have been instanciated |
14:52:18 | FromGitter | <krux02> and I would like to have the code that generates the init function in the library. |
14:52:20 | Araq | yeah, no, I used an explicit static call like generateFile() ... |
14:52:53 | FromGitter | <krux02> ok |
14:53:09 | Araq | usually though it means your macro has a too narrow view on things |
14:53:11 | FromGitter | <krux02> that is the exact reason I did not adopt this |
14:53:12 | Araq | so instead of: |
14:53:19 | Araq | proc foo() {.m.} |
14:53:24 | Araq | proc bar() {.m.} |
14:53:28 | Araq | use |
14:53:30 | Araq | m: |
14:53:35 | Araq | proc foo() |
14:53:39 | Araq | proc bar() |
14:54:17 | FromGitter | <krux02> ok, I understand |
14:54:21 | Araq | then you don't need static vars or "generateFile" |
14:55:19 | Araq | in fact, this is what I should have used too |
14:55:31 | FromGitter | <krux02> thanks for the advice |
14:55:51 | FromGitter | <krux02> that would in fact work and provides perfect control over scoping |
14:56:40 | icieyes | incidentally if I understand you both I think I'm doing the same thing with my ECS too. Declaring systems adds to static seq of idents, then after they're all done I have a generate proc to create the addcomponent that ensures components are added to the right system |
14:57:15 | FromGitter | <krux02> I don't know if it's a problem, but is it ok to call that block macro on the entire file? |
14:57:24 | icieyes | got a bit worried about the compiletime talk as it works amazingly well right now, so glad to hear it's not gonna break |
14:57:51 | * | Guest12799 quit (Ping timeout: 268 seconds) |
14:59:22 | * | javax left #nim (#nim) |
14:59:28 | FromGitter | <krux02> I would just filter out what I really want to be a macro invocation and then forward the rest of the ast to the compiler |
14:59:40 | FromGitter | <krux02> I hope that would not break compilation speed |
15:09:10 | Araq | might as well tell you about my long term goals for Nim's metaprogramming |
15:09:30 | krux02 | and what are your long term goals? |
15:10:38 | krux02 | the metaprogramming I've seen in Nim is the most powerful metaprogramming I've seen so far |
15:10:50 | Araq | complex macros will be compiled into a separate helper exe and receive the ASTs as JSON or some similar serialized structure |
15:11:19 | Araq | macro invocations are cached much like we cache stuff for 'staticExec' |
15:12:02 | krux02 | well how do you want to cache a macro invocation? |
15:12:20 | Araq | that's the easy part, ASTs are easy since they are trees. types will be available as IDs into a persistent graph |
15:13:13 | krux02 | how do you mean that? |
15:13:23 | krux02 | I mean the types |
15:13:55 | icieyes | what does this mean for the programmer? Faster compilation, or does it mean new abilities? |
15:14:15 | krux02 | when I have an untyped macro and I pass an identifier, the type in that context could change but the argument to the macro would be identical |
15:14:21 | Araq | icieyes: faster compilations, more features when it comes to type introspections |
15:14:42 | Araq | and even less bugs since we don't rely that much on Nim's VM anymore |
15:15:32 | * | willprice joined #nim |
15:15:40 | icieyes | nice, well I must say I'm already utterly impressed by the current state of macros. The only downside is I miss them badly in other languages now! |
15:15:51 | krux02 | does it mean that I can ask from an untyped macro to look up the type of an identifier? |
15:16:09 | * | haha_ joined #nim |
15:16:25 | couven92 | Araq, can Nim spit out a source map file (like the TypeScript compiler et.al.) that provide machine-readable mappings between the produced C/C++/JS/OBJC code and the actual LOC in a nim source file? |
15:16:26 | Araq | krux02: yes, it means more control over the semantic checking since essentially you don't write macros, but compiler plugins |
15:16:29 | krux02 | Well the downside I see with macros is that they have far to many node kinds |
15:17:06 | * | haha_ quit (Client Quit) |
15:17:45 | Araq | krux02: that'll also go away but we need a bijection from old ASTs to new ASTs |
15:19:05 | krux02 | currently the standard library doesn't use macros AFAIK, is that related to the fact that macros could be slow? |
15:19:45 | Araq | no, it's because we're conservative in their usage |
15:19:57 | Araq | to make it easier to get started |
15:20:36 | krux02 | what do you mean to make it easier to get started? |
15:21:04 | Araq | it means people can read tut1 and use the language |
15:21:19 | krux02 | isn't it easier to get started if the standard library has a few things implemented as macros so that they work as an example? |
15:21:50 | Araq | huh, I don't know. :-) |
15:21:52 | euantor | Only if it makes sense to implement them as macros |
15:21:55 | krux02 | to my taste the standard library has too much "magic" |
15:22:16 | euantor | Implementing things as macros for the sake of it would be a bad idea, but if it makes sense, I see no problem with it |
15:22:26 | Araq | what do you mean? the '.magic' pragma in system.nim? |
15:22:48 | krux02 | yes, I think it is used too often. |
15:23:07 | Araq | this comes up regularly |
15:23:20 | Araq | and nobody gave me concrete numbers |
15:23:38 | krux02 | It is is a total blocker when people want to look up how things in the standard library work |
15:23:53 | krux02 | it is easy to look up sourcecode, but it is hard to follow a magic |
15:24:02 | icieyes | krux02 out of interest are there any examples of things that you dont feel should be magic? |
15:24:08 | krux02 | what do you mean with concrete number? |
15:24:13 | Araq | C#/Golang/c++ do not have a protoytpe for `+` for ints. Nim does, but the implementation is 'magic'. what's the problem? |
15:24:31 | krux02 | no that is not a problem |
15:24:38 | Araq | I can hide the prototype like C#, would that make you stop complaining? :P |
15:26:26 | Araq | by concrete number I mean "out of X magics, Y could be implemented directly in system.nim, not in the codegen" |
15:27:16 | Araq | my half assed guess is this number is 5 out of 120 |
15:27:36 | * | Ven joined #nim |
15:28:00 | * | Ven is now known as Guest99057 |
15:28:32 | Araq | btw .magic: "Foo" needs you need to grep for mFoo in the compiler's sources to find the implementation |
15:28:44 | couven92 | (ah, found it: `nim --genMapping`) |
15:29:11 | Araq | there are no exceptions to this rule. |
15:30:28 | krux02 | well that is something that I needed to learn, too. But initially it was a showstopper when I found a magic |
15:30:49 | Araq | --embedsrc embeds the original source code as comments |
15:30:49 | Araq | in the generated output |
15:30:54 | Araq | couven92 ^ |
15:32:16 | couven92 | Araq, well genMapping would actually be more helpfule for creating a custom PDB... Since the mappings need to be machine readable without the need to understand code |
15:32:30 | Araq | krux02: well usually we don't expect Nim users to become Nim compiler developers and I don't know if say, a tooltip hovering over 'new' should highlight what the C codegen will transform it to |
15:33:09 | Araq | in fact, no tool does that, Eclipse doesn't show the JVM bytecode for int.'+' |
15:33:47 | icieyes | while i'm here, I have something I've been mulling over. I've got a System[T] type where T is a tuple, is there any way I can make a list of these systems, or is my only option to change T to a ref object supertype and use subtypes for individual systems? |
15:33:52 | * | Trustable joined #nim |
15:34:08 | Araq | couven92: genMapping doesn't do anything useful, I'm afraid |
15:34:26 | Araq | patch the compiler instead? |
15:34:37 | couven92 | Araq, my thoughts exactly! :) |
15:34:49 | krux02 | well I have a tooltip that allows me to expand macros in C, and in fact it would be very useful if there would be some nimsuggest support to jump to the generated C file |
15:34:50 | couven92 | couldn't we just emit a tsc-like sourcemap file? |
15:35:27 | Araq | icieyes: er ... that's a classical example of a heterogenous container, right? so subtyping or sumtypes are your only choices |
15:35:28 | * | willprice quit (Ping timeout: 268 seconds) |
15:35:33 | * | yglukhov quit (Remote host closed the connection) |
15:35:46 | Araq | or you transform the container into a proc |
15:36:31 | Araq | which is what I would do for an entity system |
15:37:30 | couven92 | Araq, --genMapping actually breaks the compiler... it causes nim to ignore the vcc.exe config option! (prompting nim to try and fail invoking cl.exe directly) |
15:39:41 | icieyes | Araq: I knew in my heart it was so... The problem I'm trying to solve is when I add components at run time, I generate code to check every system to see if the typeId is in the system.supported list. This is a poor solution not least because the more systems, the slower run-time add is. Ideally I could use the typeId as an index into a list of syst |
15:39:42 | icieyes | ems that need to be updated, but without having the systems in a list that's not possible. |
15:40:13 | couven92 | Araq, even worse, that's also true for `--genScript`! :O |
15:40:43 | Araq | icieyes: https://gist.github.com/Araq/bfcf12baa58ac2ab57641984f0b512c1 |
15:40:59 | Araq | were my latest musings before I stopped thinking about the problem |
15:44:06 | * | ofelas joined #nim |
15:46:13 | * | endragor quit (Remote host closed the connection) |
15:47:22 | icieyes | Araq: well that's rather interesting, sparks some thoughts. For a start you can add multiple of the same type of component to an entity which isn't possible in my setup. However how would, say, the physics system retrieve Position components to update them? |
15:48:02 | Araq | actually, I have a BTree implementation that allows for multiple keys of the same value |
15:48:18 | Araq | so constructions like BTree[Key, seq[Value]] are not required |
15:48:47 | Araq | and can be simplified to BTree[Key, Value] |
15:49:02 | icieyes | what I wanted to avoid is lookups within the 'run' loop of a system. To that end I construct a tuple for each system that contains refs to the components required, so in the system itself you get items.position or items.velocity etc without additional lookups |
15:49:39 | Araq | the component-wise updates are super fast, BTree iterations can be close to array iterations |
15:49:48 | icieyes | really!? :-o |
15:50:00 | icieyes | ok that's something to consider |
15:50:28 | icieyes | what about cache locality though? Although my components being refs kinda nukes that i guess, depending on the state of the cache |
15:50:30 | * | endragor joined #nim |
15:50:52 | Araq | even better. the data structures are blobs and be serialized to disk easily and it's network transparent |
15:50:58 | Araq | because it doesn't use pointers, but IDs |
15:51:07 | icieyes | ok now you really have my interest |
15:52:15 | icieyes | is there a nim module for btrees? My google fu fails me |
15:52:37 | Araq | I need to clean up and open source my implementation :-) |
15:53:00 | Araq | cache locality is what I meant by "close to array iterations" |
15:53:06 | icieyes | :) oooh yes it sounds like a great addition to stdlib |
15:53:25 | couven92 | or at the very least a nimble |
15:54:15 | Araq | to answer your physics question: I think it would just be a 'target: EntityID' field in the Physics object |
15:54:32 | icieyes | yes definitely, cache locality > doing less work in many cases it seems. I've learnt that more instructions is very often way faster than less instructions and a jump |
15:54:58 | Araq | but maybe you need to split up things further so that positions have their own IDs ? |
15:55:09 | * | endragor quit (Ping timeout: 255 seconds) |
15:55:40 | icieyes | to be fair, most entity systems don't allow multiple components of the same type, which does make implementation easier |
15:56:28 | Araq | yeah in the real world, I would not use ComponentID = distinct int but ComponentID = enum ... |
15:57:05 | Araq | becuase if you can't enumerate your components upfront you have no idea what you're doing :P |
15:57:24 | Araq | and are solved a paper tiger instead of programming a game |
15:57:27 | Araq | *are solving |
15:58:06 | icieyes | yes I agree |
16:00:28 | krux02 | Araq: where is the logic that decides how a type is named in the C backend? |
16:01:02 | Araq | ccgtypes.nim |
16:01:12 | krux02 | I would like to give it a try to generate |
16:01:18 | icieyes | although right now I'm using Component = ref object of rootobj despite the, what, two indirections? My reasoning was that because systems are grinding through the same types, those types would end up in cache, and editing components is "direct" in that I don't need to copy data or do extra lookups. I don't know how this would compare to using btree |
16:01:18 | icieyes | s where presumably you'd have to copy on insert (not really an issue) else if you're using refs it's probably not much of an advantage over what I'm doing already |
16:03:57 | icieyes | more speed is always good though in games, especially when you have thousands of entities interacting! |
16:04:16 | icieyes | tanks for the food for thought |
16:04:18 | Araq | icieyes: depends on the game, I would try to take this "it's persistent ouf of the box" further to allow for incremental development. where the state is kept in RAM and you develop the game via "hot code reloading" |
16:04:19 | icieyes | *thanks |
16:04:49 | Araq | perhaps by re-loading a DLL that you develop in Nim |
16:05:07 | Araq | perhaps via inter process shared memory |
16:05:15 | icieyes | I probably won't do that to be honest, the Nim compiler is fast enough for me right now ;) |
16:05:42 | Araq | do not underestimate the power of pointerfree programming ;-) |
16:06:31 | icieyes | definitely agree there. I haven't got to marshalling state to disc yet, so that will be when I start cursing I expect (not to mention multiplayer but that's way in the future) |
16:06:57 | Araq | icieyes: it's not about compile-times really. for testing you would need to *re-run* your game all the time to get it into the state where it fails |
16:07:27 | * | haha_ joined #nim |
16:08:57 | Araq | if in your level it takes 30 minutes until you reach the end boss (which has buggy behaviour), you would need to replay 30 minutes of your game even if the compile times are 0s. Well you get the idea. |
16:09:33 | icieyes | that's a good point, especially for bugs that accumulate over the level where you can't just load the state on its own |
16:10:46 | icieyes | to be honest I'm not sure how I would go about hotloading |
16:12:34 | * | tankfeeder quit (Quit: Connection closed for inactivity) |
16:13:22 | icieyes | something for me to research I think. In the mean time, I must go. Thanks for the help and ponder points Araq. |
16:13:38 | krux02 | well that was easy to implement |
16:14:07 | krux02 | I changed one line |
16:14:09 | krux02 | http://ix.io/yZx |
16:14:26 | * | icieyes quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:19:36 | Araq | hey ... you cannot just leave. there is more to the design |
16:20:06 | Araq | it also gives you memory safety and "weakrefs" out of the box. weakrefs are just entity IDs that you don't re-use |
16:21:10 | Araq | krux02: yeah quite possible, create a PR. the tests for it are exhaustive, if it's green it works |
16:28:29 | * | yglukhov joined #nim |
16:32:05 | * | yeeve quit (Remote host closed the connection) |
16:32:08 | * | haha_ quit (Quit: haha_) |
16:32:28 | * | yglukhov quit (Ping timeout: 240 seconds) |
16:33:36 | * | mahtov2 joined #nim |
16:34:39 | * | haha_ joined #nim |
16:34:39 | * | yglukhov joined #nim |
16:35:48 | * | mahtov quit (Ping timeout: 260 seconds) |
16:36:30 | * | dankrad joined #nim |
16:39:32 | * | Guest99057 quit (Ping timeout: 260 seconds) |
16:47:36 | couven92 | Araq, is it just me or is something terribly broken when running `koch boot -d:release` on current devel (`koch boot` works fine)? |
16:47:54 | couven92 | In iteration 2 I get: msgs.nim(602, 32) Error: ambiguous call; both tables.[](t: var Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(167, 5)] and tables.[](t: Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(161, 5)] match for: (Table[system.string, system.int32], |
16:47:54 | couven92 | string) |
16:48:10 | Araq | that's a regression we blame MS for ... |
16:48:34 | couven92 | please elaborate? |
16:48:48 | * | vivus joined #nim |
16:50:43 | * | nhywyll joined #nim |
16:50:46 | couven92 | Isn't that a message coming from nim? I.e. BEFORE vcc is invoked? How is Microsoft responsible for that? |
16:51:26 | Araq | vcc miscompiles Nim |
16:51:57 | couven92 | oh, I see... just the new vcc compiler (VS17), or VCC in general? |
16:52:09 | Tiberium | vcc compiler isn't new is VS17 AFAIK |
16:52:24 | Araq | I don't know, would be nice if you could take a deeper look what happens here |
16:53:24 | couven92 | okay... I guess that task also falls on me then, since I am one of those few who actually use vcc... AFAIK vcc is quite unpopular, right? |
16:54:48 | * | pilne joined #nim |
16:55:19 | couven92 | crap... doing Nim stuff is just too much fun! :P This way, I'll never get my M.Sc. finished!! :O |
16:57:09 | Araq | write your M.Sc. in Nim? |
16:58:45 | * | rauss quit (Quit: WeeChat 1.9) |
16:59:20 | couven92 | yeah, that's a thought... Since I am doing stuff related to IoT and Mobile devices, I actually thought about doing just that, now with the advent of Nim on Android! :D |
16:59:20 | * | rauss joined #nim |
17:01:45 | couven92 | Araq, for the vcc thing... I'll have to look at the actual C code produced in iteration 1, right? |
17:03:43 | couven92 | and compare with the c code generated for gcc... |
17:04:04 | couven92 | okay... I'll have a look when I get home |
17:04:10 | Araq | hmm nah, that's futile |
17:04:34 | * | itseris quit (Quit: Konversation terminated!) |
17:04:36 | Araq | instead you need to see what data structure gets prematurely collected because vcc optimizes away a stack root |
17:05:19 | Araq | in fact, I can probably tell you |
17:05:20 | * | dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:10:16 | couven92 | okay, that would be a relief :D |
17:12:08 | * | Matthias247 joined #nim |
17:12:34 | * | dave24 quit (Ping timeout: 255 seconds) |
17:14:08 | * | dave24 joined #nim |
17:17:50 | * | itseris joined #nim |
17:21:21 | * | Parashurama joined #nim |
17:24:15 | * | vivus quit (Quit: Leaving) |
17:24:33 | Parashurama | Hey! |
17:24:35 | Parashurama | Could I have some feedback on PR: https://github.com/nim-lang/Nim/pull/5908 |
17:24:36 | Parashurama | It's been quite some time since I posted it and it could use some code review. |
17:26:26 | couven92 | Parashurama, well, it would need to be merged with origin/devel as it has conflicts that need to be resolved |
17:28:57 | Parashurama | yeah, i know it's an easy fix. I was thinking more about the content of the PR. |
17:38:08 | * | couven92 quit (Quit: Client disconnecting) |
17:38:17 | * | onionhammer joined #nim |
17:39:19 | * | PMunch joined #nim |
17:45:46 | * | elev___ joined #nim |
17:45:49 | * | elev___ left #nim (#nim) |
17:55:33 | * | Ven joined #nim |
17:55:57 | * | Ven is now known as Guest43717 |
17:58:41 | Araq | Parashurama: looks ok to me, maybe you can reduce the boilerplate a bit |
18:00:23 | Araq | tyInt8, tyInt16, tyInt32 can all use the same code when you use some smart expression instead of 0xFFFF |
18:00:29 | Araq | same for the unsigned types |
18:07:43 | * | couven92 joined #nim |
18:11:00 | * | haha_ quit (Quit: haha_) |
18:11:00 | * | Guest43717 quit (Ping timeout: 260 seconds) |
18:13:26 | couven92 | Araq, okay I'm back... I'd be happy to look into the VCC issues, you said you had hints for me? |
18:16:48 | * | vivus joined #nim |
18:16:55 | krux02 | what is with the pull requests that have failed the tests, but that is a bug on it's own |
18:17:11 | krux02 | AppVeyor was unable to build non-mergeable |
18:17:18 | krux02 | when the PR is in fact mergeable |
18:17:30 | couven92 | krux02, which one do you mean? |
18:17:48 | krux02 | https://github.com/nim-lang/Nim/pull/6200 |
18:18:07 | krux02 | https://github.com/nim-lang/Nim/pull/6139 |
18:19:15 | krux02 | Build execution time has reached the maximum allowed time for your plan (90 minutes). |
18:19:22 | krux02 | often that is the reason the build fails |
18:19:42 | Parashurama | Araq: Can you confirm that int/uint is always 64bits in VM (on 32bits or 64bits platform?) |
18:20:10 | krux02 | well I can confirm that all ints are stored internally as an 64bit int on the vm |
18:20:35 | couven92 | krux02, even when nim vm is compiled 32-bit? |
18:20:39 | Araq | Parashurama: confirmed but it's probably a bad idea |
18:24:45 | * | sz0 joined #nim |
18:25:24 | Araq | couven92: compiler/semcall.nim |
18:25:36 | Araq | var syms: seq[tuple[s: PSym, scope: int]] |
18:25:56 | * | Sentreen quit (Ping timeout: 260 seconds) |
18:26:06 | Araq | add some calls to GC_ref(syms) and to GC_unref(syms) |
18:26:14 | Araq | and see if it makes a difference |
18:26:24 | couven92 | will do, thanks! :) |
18:27:11 | Araq | that's in line 71 |
18:27:33 | Parashurama | Araq: A way to solve int size problems in VM might be to keep int64 storage but respect sizeof(int) in int operation. |
18:27:35 | Parashurama | (clamp to u32 between each operation when sizeof(int) < 8) |
18:27:51 | Parashurama | (clamp to u32 between each operation when sizeof(int) < 8 |
18:29:46 | Parashurama | ie: insert toNarrow opcode between each operation when required. we already do this to emulate int8, int16,int32 in VM. |
18:30:02 | dom96 | hello guys |
18:30:08 | * | Jesin quit (Quit: Leaving) |
18:30:15 | Parashurama | hey. |
18:32:49 | * | Jesin joined #nim |
18:32:49 | * | Ven_ joined #nim |
18:33:54 | dom96 | In case you don't have my book and want a chance to win it, you can ask questions here for a chance to win: https://coderanch.com/f/60/ol |
18:34:18 | dom96 | (organised by my publisher, I for one think that website needs a redesign more than the Nim forum) |
18:34:25 | * | mahmudov joined #nim |
18:35:39 | krux02 | We should convince some super rich people that investing in Nim is a good idea |
18:37:11 | krux02 | but the problem is that super rich people don't invest in companies that would help everybody, they only invest in useless crap |
18:37:29 | * | willprice joined #nim |
18:38:16 | Tiberium | dom96, i have a feeling that this website mostly consist of people who wants to win something xD (e.g. people with 300, sometimes 3k posts) |
18:38:29 | dom96 | quite possibly lol |
18:38:29 | Tiberium | I mean not win something they want, but just win something |
18:38:35 | dom96 | There is 4 books to win |
18:38:38 | * | smt_ joined #nim |
18:38:42 | dom96 | You guys may as well have a go :) |
18:40:11 | * | Sentreen joined #nim |
18:40:29 | mahmudov | if riches at favor.... |
18:40:46 | dom96 | omg |
18:40:47 | mahmudov | other is capitalism |
18:40:51 | dom96 | I can't reset my password on this website |
18:42:16 | * | smt quit (Ping timeout: 260 seconds) |
18:49:43 | * | yglukhov quit (Remote host closed the connection) |
18:50:12 | * | mahmudov quit (Ping timeout: 260 seconds) |
18:51:46 | subsetpark | is the `rationals` module the best solution for human-friendly floating point math? |
18:52:05 | * | Ven_ quit (Ping timeout: 240 seconds) |
18:53:13 | FromGitter | <zetashift> man that site looks straight outta 2006 |
18:53:19 | FromGitter | <zetashift> maybe erlier |
18:54:34 | * | Ven joined #nim |
18:54:59 | * | Ven is now known as Guest91583 |
19:03:07 | * | mahmudov joined #nim |
19:05:48 | * | nattefrost quit (Remote host closed the connection) |
19:06:13 | * | smt_ is now known as smt |
19:07:03 | * | yglukhov joined #nim |
19:10:02 | * | tdc quit (Ping timeout: 258 seconds) |
19:17:00 | * | Guest91583 is now known as Ven`` |
19:21:17 | couven92 | Araq, okay, sorry I had to wrap my head around pickBestCandidate first... Your suggestion is to increase GC ref on `sym` each time it is assigned, and decrese ref before next assignment? |
19:22:14 | couven92 | ah, no, GC ref on syms... okay... got it, sorry :P |
19:25:06 | FromGitter | <krux02> I just wrote the first version the get rid of semantic nil values in strings |
19:30:55 | * | Vladar quit (Quit: Leaving) |
19:34:36 | couven92 | Araq, nope, I am not able to find out what is wrong with VCC... But I am totally clueless as to what I am looking at so it's very probable that I just put GC_refs/unrefs at all the wrong places... |
19:46:11 | rauss | Tiberium: Have you used signals with godot-nim yet? |
19:47:26 | Tiberium | well I tried but I don't know how :) |
19:48:03 | Tiberium | I've wanted to ask endragor |
19:48:09 | Tiberium | here on irc :) |
19:48:17 | Tiberium | he's here sometimes, maybe in the gitter |
19:48:39 | * | Tiberium quit (Remote host closed the connection) |
19:51:20 | FromGitter | <TiberiumN> also it's not fully clear for me how to create new objects :p |
19:51:48 | * | Ven`` quit (Ping timeout: 240 seconds) |
19:55:00 | rauss | Yeah me either. Thanks |
19:55:16 | * | Trustable quit (Remote host closed the connection) |
19:59:42 | FromGitter | <krux02> type MyType = object [...]; var mt: MyType; mt.a = 123 |
19:59:45 | FromGitter | <krux02> yay |
20:00:20 | FromGitter | <TiberiumN> but at least it looks very promising :) |
20:00:20 | FromGitter | <krux02> ah sorry it was about godot |
20:01:07 | * | Ven joined #nim |
20:01:26 | FromGitter | <TiberiumN> yes |
20:01:30 | * | Ven is now known as Guest83286 |
20:04:38 | krux02 | Araq: I was about to make nil string and equal to empty string, but strutils.formatEng relies on it |
20:04:51 | FromGitter | <TiberiumN> I wonder if it would be possible to create some plugin for Godot editor to automatically generate template . nim file for needed object |
20:05:31 | FromGitter | <TiberiumN> without manually creating new GDNative script, attaching it to the object, creating .nim file |
20:07:37 | * | scriptum joined #nim |
20:15:15 | rauss | TiberiumN boy do I have a thing for you |
20:15:41 | rauss | https://github.com/acleverpun/generator-godot |
20:16:08 | rauss | I don't have docs yet, but it's otherwise quite complete. |
20:16:59 | rauss | But yes, built-in plugin wolud be much better |
20:24:32 | FromGitter | <gokr> What's the best stuff for Emacs and Nim? |
20:25:05 | FromGitter | <gokr> I happen to know one of the Emacs maintainers... and I am luring him into Nim :) |
20:25:55 | FromGitter | <krux02> I use emacs and nim |
20:26:11 | FromGitter | <krux02> there is a nim-mode and I am using it, but it has problems |
20:26:58 | FromGitter | <gokr> Mmm, seems to be two of those |
20:27:05 | FromGitter | <gokr> I looked at: https://github.com/nim-lang/Nim/wiki/editor-support |
20:28:19 | FromGitter | <gokr> @krux02 Are you german? And... is Arne common in Germany? |
20:28:54 | FromGitter | <krux02> I am german and the name is not that common, but also not totally uncommon |
20:29:00 | FromGitter | <gokr> Interesting. |
20:29:13 | FromGitter | <gokr> It's a common swedish name |
20:31:04 | dom96 | yay front page of HN |
20:32:47 | * | skrylar joined #nim |
20:32:50 | * | rauss quit (Quit: WeeChat 1.9) |
20:32:54 | FromGitter | <TiberiumN> krux02: well, Godot is a game engine :) |
20:33:04 | subsetpark | dom96: FedeOmoto's gmp library in nimble is currently broken because of .nimble compat issues. There's a PR to fix it (it's really simple) but he hasn't touched that repo in a couple years, nor has he looked at the PR |
20:33:10 | subsetpark | how can we fix things? |
20:33:47 | dom96 | subsetpark: fork and change the URL in packages.json |
20:34:50 | subsetpark | like, open a PR to the main nimble repo? |
20:44:43 | * | skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
20:48:33 | * | Serenitor joined #nim |
20:54:23 | Araq | krux02: formatEng needs to take an Option[string] then or something |
20:54:59 | Araq | but since we still want to release 0.17.2 with the parser change and bugfixes and no other changes |
20:55:24 | Araq | your nil change PR will have to wait a bit |
20:55:35 | Araq | also the db_* modules are all affected by this change |
20:56:00 | Araq | not a big problem since I want to change the API anyway and move it to a separate Nimble package |
20:56:10 | Araq | but we need to have a migration plan |
20:56:23 | FromGitter | <krux02> yes I agree |
20:58:13 | dom96 | subsetpark: yes, the packages repo |
20:58:54 | Araq | maybe we need to have const NilString* = when defined(nimNoNil): "" else: string(nil) |
20:58:57 | Araq | in system.nim |
21:00:12 | yglukhov | hey guys, introducing a tiny state machine impl. https://github.com/yglukhov/state_machine |
21:00:19 | FromGitter | <krux02> hmm I am not sure how that value should be used |
21:02:17 | dom96 | 4 space indent :'( |
21:02:54 | dom96 | yglukhov: y'all need some linter :) |
21:03:21 | yglukhov | nah, i use 4 spaces in all of my projects =) |
21:04:35 | * | Sentreen quit (Ping timeout: 240 seconds) |
21:06:04 | subsetpark | dom96: done! |
21:09:33 | dom96 | subsetpark: merged! |
21:09:46 | subsetpark | taking care of business :) |
21:12:40 | subsetpark | hm - I guess I had thought that gmp would help with float precision issues as well as bignums. maybe i was wrong though? .3 + .6 still = .899999999999 ? |
21:13:12 | FromGitter | <krux02> well gmp increases the precision, but floating point is still floating point |
21:14:11 | FromGitter | <krux02> I don't know if it is gmp, but there is a decimal floating point type that has the same rounding behaviour as decimal types |
21:14:40 | subsetpark | yeah - bignum, which uses gmp, has a Rat type which I rather thought would help with that stuff |
21:14:43 | subsetpark | but i guess not |
21:15:39 | subsetpark | krux02: when you say 'there is a decimal ... type', you don't mean it's already available in Nim do you? |
21:16:24 | FromGitter | <krux02> I don't know if it is already in Nim |
21:16:45 | subsetpark | i haven't seen any implementations of it yet |
21:16:52 | subsetpark | which surprises me |
21:17:23 | * | Sentreen joined #nim |
21:17:24 | * | gangstacat joined #nim |
21:17:53 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:18:50 | FromGitter | <krux02> http://dec64.com/ |
21:20:01 | FromGitter | <krux02> there is a c wrapper for it |
21:20:02 | FromGitter | <krux02> http://dec64.com/dec64_math.html |
21:20:20 | FromGitter | <krux02> but be aware, just because you have decimal number doesn't mean you don't have rounding errors |
21:20:44 | FromGitter | <krux02> you still have the same precision problems as float64 just with a different base |
21:21:19 | * | Serenit0r joined #nim |
21:23:16 | * | Serenitor quit (Ping timeout: 268 seconds) |
21:23:39 | * | Parashurama quit (Quit: ChatZilla 0.9.93 [Firefox 54.0.1/20170630112252]) |
21:23:53 | subsetpark | krux02: very interesting |
21:24:06 | subsetpark | worth writing a nim wrapper for sure |
21:25:48 | shodan45 | dom96: congrats on the book! |
21:26:18 | shodan45 | I'd buy it right now if I weren't in financial hell |
21:27:00 | * | Serenit0r quit (Ping timeout: 260 seconds) |
21:27:53 | * | Serenitor joined #nim |
21:29:28 | dom96 | shodan45: If I could I would totally give you a free copy! Do keep an eye out on Mannings and Nim's twitter though, there are discounts occasionally. |
21:30:02 | * | dddddd quit (Remote host closed the connection) |
21:30:38 | shodan45 | dom96: thanks... don't be too generous, though. that's part of why I'm in financial hell..... ;( |
21:33:14 | dom96 | shodan45: Hope you get out of it soon! :) |
21:34:12 | * | ofelas quit (Quit: shutdown -h now) |
21:34:36 | subsetpark | I've got my hard copy on the way! Very excited |
21:36:15 | subsetpark | afl is very fun to watch... |
21:40:40 | dom96 | afl? |
21:45:04 | * | krux02 quit (Remote host closed the connection) |
21:48:52 | dom96 | subsetpark: replied to the jester issue |
21:49:41 | subsetpark | dom96: american fuzzy lop, a fuzzer |
21:49:46 | subsetpark | and thanks, i'll dig deeper |
21:57:10 | FromGitter | <TiberiumN> dom96: just a little note - it's definitely possible to "crack" manning pdf and remove all license info, I've tried it with my friend. ⏎ only for educational purposes of course |
21:58:42 | dom96 | sure, but who knows if you've got all of it? |
21:59:16 | FromGitter | <TiberiumN> if i convert it to djvu after that it's 100% :) |
22:02:11 | FromGitter | <TiberiumN> but only for educational purposes, no big distributing |
22:03:36 | * | nsf quit (Quit: WeeChat 1.9) |
22:05:05 | FromGitter | <TiberiumN> also manning has some hidden text in pdfs (dots at different pages and locations) |
22:18:58 | * | BitPuffin|osx quit (Ping timeout: 255 seconds) |
22:23:30 | * | Guest83286 quit (Ping timeout: 240 seconds) |
22:23:45 | * | dom96|w joined #nim |
22:27:06 | * | dom96|w quit (Client Quit) |
22:28:38 | * | willprice quit (Ping timeout: 268 seconds) |
22:30:27 | * | nhywyll quit (Ping timeout: 240 seconds) |
22:31:33 | * | ShalokShalom_ joined #nim |
22:31:42 | * | ShalokShalom_ quit (Remote host closed the connection) |
22:32:21 | * | PMunch quit (Quit: leaving) |
22:33:08 | * | gangstacat quit (Quit: Leaving) |
22:43:02 | * | nhywyll joined #nim |
22:46:07 | * | ShalokShalom quit (Read error: Connection reset by peer) |
22:48:02 | * | def-pri-pub joined #nim |
22:49:16 | * | Jesin quit (Quit: Leaving) |
22:53:21 | * | nhywyll quit (Ping timeout: 248 seconds) |
22:57:38 | * | sz0 quit (Quit: Connection closed for inactivity) |
23:15:04 | * | mahmudov quit (Ping timeout: 276 seconds) |
23:15:57 | * | scriptum quit (Quit: Leaving) |
23:27:17 | * | rauss joined #nim |
23:31:27 | FromGitter | <k0pernicus> Does anyone here is working on a machine learning library and/or natural language processing library? :-) ⏎ I saw niML (no updates since 3 years) and Arraymancer (tensor lib), but no updated "statistical" ML library. ⏎ Also, I did not found any NLP Nim lib |
23:36:01 | FromGitter | <k0pernicus> (or maybe I can try to use, for the moment, Python libraries and use them using the Python2 wrapper for Nim...) |
23:37:06 | FromGitter | <krux02> Well you should propably just go with a wrappery |
23:37:22 | FromGitter | <krux02> try to find a good library that has a C interface and use that |
23:37:36 | FromGitter | <k0pernicus> I thought so too... |
23:38:27 | FromGitter | <zetashift> Tensorflow/Torch have pretty good C API's right? |
23:39:17 | FromGitter | <krux02> well when you have a good C API you can still exploit the Nim features to make working with the library a bit more pleasant |
23:39:49 | FromGitter | <zetashift> yea but making wrappers for those should be alot easier too |
23:40:03 | FromGitter | <k0pernicus> I think so, but I don't want to use DL actually - just "basic things" like SVM, KMeans or Affinity Propagation |
23:40:11 | FromGitter | <k0pernicus> C++ is ok? |
23:40:14 | FromGitter | <k0pernicus> Or just C? |
23:40:15 | FromGitter | <zetashift> ah |
23:40:39 | FromGitter | <krux02> you can use c++, too, but then you have to compile your entire project as a c++ project |
23:40:47 | FromGitter | <k0pernicus> Arf |
23:41:07 | FromGitter | <krux02> understandable though, because you cannot call c++ functions from C |
23:41:17 | FromGitter | <k0pernicus> Yep, I understand |
23:43:14 | FromGitter | <k0pernicus> Actually, C++ libs are more abundant than C libs... :-( |
23:43:15 | FromGitter | <k0pernicus> https://github.com/josephmisiti/awesome-machine-learning#c |
23:43:25 | * | couven92 quit (Quit: Client Disconnecting) |
23:43:36 | FromGitter | <krux02> don't worry too much, you can use c++ |
23:44:47 | FromGitter | <k0pernicus> Yep |
23:46:27 | FromGitter | <krux02> you can even map generics to templates and such |
23:46:46 | FromGitter | <krux02> I think you have to hack a bit with the emit pragma, but it's possible |
23:47:20 | FromGitter | <k0pernicus> I am exploring the project Urhonimo, which uses c2nim |
23:47:21 | FromGitter | <k0pernicus> https://github.com/3dicc/Urhonimo |
23:47:57 | FromGitter | <krux02> you should play a bit with c2nim |
23:48:11 | FromGitter | <krux02> there are a few parameter you need to get right for c2nim |
23:48:26 | FromGitter | <k0pernicus> I didn't write C++ code since 3/4 years (since I discovered Rust actually...), but it might be like riding bycicle |
23:48:31 | FromGitter | <k0pernicus> Ok |
23:48:45 | FromGitter | <k0pernicus> I will try on simple examples first to get familiar with |
23:48:58 | * | yglukhov quit (Remote host closed the connection) |
23:49:00 | FromGitter | <krux02> I can't remember everything, but I used c2nim and then I manually fixed the generated sourcer and then I realized that I had to use other parameters and I could do everything again |
23:49:30 | FromGitter | <krux02> really explore c2nim because you can only use it once at the beginnig |
23:49:38 | FromGitter | <k0pernicus> :-O |
23:49:42 | FromGitter | <k0pernicus> Ok |
23:49:50 | * | rauss quit (Quit: WeeChat 1.9) |
23:49:55 | FromGitter | <krux02> well c++ is easier to read than to write |
23:50:05 | FromGitter | <k0pernicus> Ah ah ^^ |
23:50:09 | FromGitter | <k0pernicus> So true :-) |
23:50:11 | FromGitter | <krux02> you don't need to hassle with the quirks when you just need to read it |
23:50:28 | FromGitter | <krux02> unless someone exploited templates |
23:50:45 | FromGitter | <k0pernicus> Ooooh yeah... |
23:50:56 | * | rauss joined #nim |
23:51:27 | FromGitter | <k0pernicus> C++ templates can be really a pain in the arse -_- |
23:51:38 | * | jinshil joined #nim |
23:51:53 | FromGitter | <krux02> I mean I like the templates, but people use them stupidly |
23:52:05 | FromGitter | <k0pernicus> Totaly agreed |
23:52:23 | FromGitter | <k0pernicus> Personal experience: research projects |
23:52:26 | FromGitter | <k0pernicus> No documentation |
23:52:36 | FromGitter | <k0pernicus> Templates everywhere |
23:52:50 | FromGitter | <krux02> yes |
23:52:56 | FromGitter | <krux02> seme experience here |
23:53:24 | FromGitter | <krux02> researchers want to feel smart and everything should be "generic" and "flexible" for the future |
23:53:32 | FromGitter | <krux02> and then compilation times from hell |
23:53:46 | FromGitter | <k0pernicus> Ah ah, right |
23:53:55 | FromGitter | <k0pernicus> Actually, they don't care so much here... |
23:53:59 | FromGitter | <krux02> 30 minutes compilation time on a fast computer and on my slow computer is was 2 hours |
23:54:14 | FromGitter | <krux02> that does matter |
23:54:35 | FromGitter | <krux02> unless you prefer to spent your time compiling |
23:54:35 | FromGitter | <k0pernicus> They write the code for a research article, they publish it, paper accepted -> new project, and students will maintain the C++ code during their internships... |
23:56:27 | FromGitter | <krux02> yes, and no studends don't maintain code, they make it worse |
23:56:44 | FromGitter | <k0pernicus> Yep, I did actually... |
23:57:23 | FromGitter | <k0pernicus> (but I wrote the documentation! :-] #PersonalExcuses) |
23:57:40 | FromGitter | <krux02> yes that is just how it works. The founder of the project is resposible to keep everything clean, the student just can't do that |
23:58:14 | FromGitter | <krux02> well that is good |
23:58:36 | FromGitter | <krux02> students normally write bad code that is why they are students |
23:59:23 | FromGitter | <k0pernicus> Right |