<< 08-08-2017 >>

00:00:10FromGitter<TiberiumN> this is already implemented in nim
00:00:55FromGitter<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:03FromGitter<zetashift> well not your way but from the ground up
00:02:58oddduckHow would I wrap foo->bar?
00:05:27*rosshadden quit (Quit: WeeChat 1.9)
00:10:32*def-pri-pub joined #nim
00:13:28FromGitter<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:38def-pri-pubzacharycarter: 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:53skrylartoday i learned yes afl-fuzz does work with nim and also i apparently managed a deserializer that doesn't crash
03:51:25skrylarthat 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:49skrylardidn't i read somewhere that futures are in the stdlib
06:41:06skrylari 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:22ftsfthe `=deepCopy` proc, it says it's invoked whenever passed to a spawned proc, but is it used by deepCopy ?
06:52:10skrylari think that method is for magic
06:52:57ftsfhmm yeah, it doesn't seem to be used by deepCopy, which is what I was hoping it would be used by
06:53:13ftsfnot sure if I can override the behaviour of deepcopy
06:54:04*sz0 quit (Quit: Connection closed for inactivity)
06:56:17skrylari don't imagine why not
06:57:03skrylarWell, it might throw up ambiguity errors with the existing one at worst. But you can namespace them apart.
06:57:42ftsfahh i mean, make deepCopy behave in a different way for different types
06:57:47ftsfnot make a new deepcopy
06:57:59ftsfdeepcopy is magic =(
06:58:00skrylardeep-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:30ftsfyeah, it seems like =deepCopy should be used in this case, and makes sense, but doesn't appear to be used
06:59:16ftsfdeepcopy is nice because i don't have to make it care about inherited types
06:59:43ftsfif i make a clone method it'll have to know how to handle every inherited type afaict
06:59:45skrylareh.. 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:07ftsfi guess i'll see how it works during spawn
07:01:20skrylarnods
07:01:32skrylarhaven't done any concurrency things in nim yet sadly
07:01:40ftsfme either
07:01:56ftsfwell, not using Nim's concurrency stuff at least, just foreign threads
07:02:28skrylarafaik 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:39skrylarbut i'm out of date on that front
07:03:36skrylarsome macro wizard might be able to acquire iced coffee script's await/async sugar in a nim macro
07:03:52ftsfdang, spawn is magic too
07:04:07skrylarspawn always is
07:04:19skrylarspawn/fork/run are primitives :<
07:04:26ftsfnever figured out where the code for magic stuff lives
07:04:34skrylari don't know if nim reacts poorly to forks
07:05:19skrylari 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:23Araqftsf: deepCopy does invoke =deepCopy
07:31:41*yglukhov joined #nim
07:31:44ftsfAraq, ooh, interesting then!
07:31:49Araqmaybe there is a bug here but it's supposed to work as you described
07:31:55ftsfi wonder why my proc is not being called...
07:47:21skrylarhmmm
07:49:20*sakalli joined #nim
07:57:05Araqreport a snippet?
07:57:38ftsfwill 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:08ftsfhttps://twitter.com/impbox/status/894819555360464896
08:01:38skrylarah gamedev. i remember aspiring to be one of those
08:02:04skrylarwatching macros obliterate boilerplate makes my day
08:03:05ftsfskrylar, well gamedev certainly pays less than my old job, but it's fun
08:03:31skrylarftsf i switched over to machine learning
08:03:37skrylarit pays nothing but well
08:04:23*nattefrost joined #nim
08:05:02ftsfgamedev pays one of those words =p
08:05:12skrylari love jobs that pay "it"
08:05:28skrylarslightly more legal than jobs that pay in "but"
08:09:04skrylarwell 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:45couven92Araq, 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:11couven92alternatively 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:05Araqcouven92: 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:33couven92Araq, is someone actively working on parallel testament yet?
09:22:43Araqyes, see the other PR
09:23:14couven92ah, https://github.com/nim-lang/Nim/pull/6190 ?
09:24:25couven92well 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:13couven92If I get time during next weekend, maybe I'll see if I can help @singularperturbation with his PR
09:27:15couven92because 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:32couven92in 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:31AraqI don't understand that one, why do we need /EHsc?
09:31:58couven92Because else VCC starts whining in some cases
09:32:39couven92on the other hand... I think it actually is the default... so maybe we don't need that at all
09:33:25couven92But /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:42FromGitter<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:56Araqok got it
10:07:31couven92dom96, 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:34FromGitter<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:44FromGitter<moigagoo> Nim 0.17.0 on Windows.
10:10:58FromGitter<moigagoo> Is it a bug to report, or am I missing something?
10:14:26Araqmaybe a documentation bug, but the template needs a return type like 'untyped' or 'bool'
10:14:36FromGitter<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:53FromGitter<moigagoo> I'm too slow)
10:15:23Araqbooks can have revisions :-)
10:15:35FromGitter<moigagoo> Will report anyway :-)
10:15:58FromGitter<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:42couven92Araq, 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:31Araqmeh, I can regenerate csources tonight
10:38:52federico3how to get the last N sequence elements *if* present?
10:42:45*dom96|w joined #nim
10:47:48couven92there 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:15couven92oh 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:39couven92sorry 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:41Araqpity, I wanted you to do more stdlib work
11:31:09AraqeditDistance for unicode comes to mind
11:33:51*krux02 joined #nim
11:34:50FromGitter<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:08Araqtravis only uses clang, in fact
11:35:17Araqso yes. very safe to do that.
11:35:25FromGitter<TiberiumN> because I heard it's really faster than gcc
11:35:32FromGitter<TiberiumN> at compiling times
11:35:38Araqgcc tends to produce better code though
11:35:54FromGitter<TiberiumN> well I don't need very much speed in my project :)
11:36:13Araqeventually clang will catch up but it's taking them much longer than I expected
11:36:17FromGitter<krux02> well most of the time the speed is fast enough without many optimizations
11:36:28FromGitter<TiberiumN> because it's still C
11:36:36FromGitter<krux02> I mean people program in python, and still get things done
11:36:41FromGitter<TiberiumN> ah, yes, true
11:37:23FromGitter<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:29euantorclang 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:02Tiberiumeuantor, well I want to use it because it's faster at compiling stuff :)
12:20:31euantorIt's the default compiler on macOS which is the only reason I use it
12:20:46Tiberiumdebug 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:58FromGitter<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:02couven92Araq, uhm have actually never dealt with Levenshtein distance before...
13:35:01couven92a 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:44couven92but 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:21Tiberiumis there any info on using debugger for nim in vscode?
13:42:56couven92@Tiberium, can VS Code use GDB?
13:43:00Tiberiumyes
13:43:44couven92what 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:34Tiberiumwell if I try to press F5, debugger starts and immediatly stops
13:44:54Tiberiumah
13:45:01Tiberiumit seems executable path is wrong
13:45:14Tiberiumah! i'm dumb
13:45:19Tiberiumi didn't had gdb installed :D
13:45:50couven92yeah... without a debugger installed, running a debugger will be quite hard... :P
13:49:37Tiberiumis 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:36couven92some day, I should really write a research paper on that and implement step-by-step debugging Nim in Visual Studio :P
13:51:20couven92maybe when I am done with my M.Sc. and need a new freetime research project :P
13:52:12Tiberiumwell at least it works
13:52:48krux02couven92: yes debugging support in Nim, please.
13:52:56krux02It is one of the weaknesses of Nim
13:53:32couven92krux02, 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:43krux02Tiberium: T5_ and T6_ are actually temporary variables, your local variables are properly named in the generated code
13:53:51Tiberiumah, ok
13:54:43*haha_ quit (Quit: haha_)
13:55:41krux02I 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:34krux02breakpoints can be set to functions and tab completion completes the function names
13:57:10couven92krux02, 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:39krux02well, I don't debug the assembly, it actually shows the source location
13:57:57*Sentreen quit (Ping timeout: 260 seconds)
13:58:02krux02just use "tui enable" and you see the source
13:58:37krux02overall it's a horrible debugging experience, but it can debug
13:59:26couven92but 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:04TiberiumI dream that Nim some day would have same debugging experience as Python in PyCharm :)
14:01:39AraqTiberium: make it happen...
14:02:36Araqkrux02: what are the current pain points?
14:07:34krux02The initial pain point is, that the default build, the debug build, has no debug information.
14:07:45krux02I never quite understood that one.
14:08:08krux02Then the debugger does not understand builtin Nim Types
14:08:48krux02seq and string should be types that the debugger understands and displays as such
14:09:02couven92Araq, krux02, hmmm... this is interesting: https://msdn.microsoft.com/en-us/library/bb145934.aspx
14:09:36krux02meaning that in a visual debugger (e.g. visual-studio-code) a local variables should be explorable
14:10:39*Sentreen joined #nim
14:11:25Araqit's a pointer to a struct with length, cap info followed by a variably sized array as the last struct member.
14:11:46krux02I know
14:11:56Araqas 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:15Araqenums and sets of enums are a different story
14:12:25Araqoh I see
14:12:27krux02well when I use command line gdb (which is not really my favorite tool) it is somewhat aceptable
14:12:43Araqit cannot map the array length to the len field
14:13:28krux02but 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:37krux02yes, exactly
14:14:46Araqyeah I can see why the debugger fails
14:16:05krux02there is a possibility to embed a python script in the executable that is automatically loaded by gdb
14:16:48krux02this is how I embed the python script in the executable: https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/debug.nim
14:17:20krux02and this is the python script I can load https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/nim-gdb.py
14:17:54krux02The problem is here: https://github.com/krux02/opengl-sandbox/blob/master/fancyglpkg/nim-gdb.py#L58
14:18:49krux02I have mentioned it once in the past, but seq types need actually seq values
14:18:56krux02sorry seq names
14:19:58krux02so 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:02Araqok, that's feasible
14:21:15couven92Hmm... 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:54FromGitter<krux02> should I open an issue for that?
14:25:59Araqa PR would be nicer, but sure
14:26:33FromGitter<krux02> Well the array to string PR is ready
14:27:03FromGitter<krux02> I decided handling '\0' in echo properly is another construction site
14:27:15FromGitter<krux02> not part of that PR
14:32:23Araqah good.
14:37:30Araqah one more thing: That code you posted that breaks my reordering pass, did you extract that from a realworld example that broke?
14:37:40Araqor was that constructed to break it?
14:37:49FromGitter<krux02> It was constructed to break
14:38:17FromGitter<krux02> I just wanted to show that these reordering can break things
14:38:38Araqas if I didn't know :P
14:38:40FromGitter<krux02> reorderings and static side effects at the same time are a bad thing to do
14:38:49Araqbut
14:39:00Araqa) a simple 'when true' block means "keep it in order"
14:39:25Araqb) these static .compiletime vars are super bad for modularity (incremental compilations)
14:40:33FromGitter<krux02> I don't use them and I would not use them
14:40:42FromGitter<krux02> I just used them to break the compilation :P
14:41:11Araqgood to know
14:42:03FromGitter<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:31FromGitter<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:56Araqooohh deja-vu
14:44:12AraqI've read this exact sentence before
14:45:22FromGitter<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:10FromGitter<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:04icieyeshey, 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:27icieyeshowever the entire system is confined to one module
14:48:42Araqicieyes: if you collect a list the order shouldn't matter
14:48:47FromGitter<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:55icieyesexcellent :)
14:49:02Araqit's just when you depend on the exact integer position values things would break
14:49:16FromGitter<krux02> I know how to do it with a static var
14:49:48Araqkrux02: my solutions all use static vars for this too
14:49:50FromGitter<krux02> I could create a static var of type seq[NimNode] and append the init code every time I invoke a macro
14:50:02Araqthat's what I do, yeah
14:50:35FromGitter<krux02> well that works
14:51:16FromGitter<krux02> it there an end of compilation invoked macro then?
14:51:58FromGitter<krux02> because I need to generate the init function at the end when all macros have been instanciated
14:52:18FromGitter<krux02> and I would like to have the code that generates the init function in the library.
14:52:20Araqyeah, no, I used an explicit static call like generateFile() ...
14:52:53FromGitter<krux02> ok
14:53:09Araqusually though it means your macro has a too narrow view on things
14:53:11FromGitter<krux02> that is the exact reason I did not adopt this
14:53:12Araqso instead of:
14:53:19Araqproc foo() {.m.}
14:53:24Araqproc bar() {.m.}
14:53:28Araquse
14:53:30Araqm:
14:53:35Araq proc foo()
14:53:39Araq proc bar()
14:54:17FromGitter<krux02> ok, I understand
14:54:21Araqthen you don't need static vars or "generateFile"
14:55:19Araqin fact, this is what I should have used too
14:55:31FromGitter<krux02> thanks for the advice
14:55:51FromGitter<krux02> that would in fact work and provides perfect control over scoping
14:56:40icieyesincidentally 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:15FromGitter<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:24icieyesgot 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:28FromGitter<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:40FromGitter<krux02> I hope that would not break compilation speed
15:09:10Araqmight as well tell you about my long term goals for Nim's metaprogramming
15:09:30krux02and what are your long term goals?
15:10:38krux02the metaprogramming I've seen in Nim is the most powerful metaprogramming I've seen so far
15:10:50Araqcomplex macros will be compiled into a separate helper exe and receive the ASTs as JSON or some similar serialized structure
15:11:19Araqmacro invocations are cached much like we cache stuff for 'staticExec'
15:12:02krux02well how do you want to cache a macro invocation?
15:12:20Araqthat's the easy part, ASTs are easy since they are trees. types will be available as IDs into a persistent graph
15:13:13krux02how do you mean that?
15:13:23krux02I mean the types
15:13:55icieyeswhat does this mean for the programmer? Faster compilation, or does it mean new abilities?
15:14:15krux02when 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:21Araqicieyes: faster compilations, more features when it comes to type introspections
15:14:42Araqand even less bugs since we don't rely that much on Nim's VM anymore
15:15:32*willprice joined #nim
15:15:40icieyesnice, 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:51krux02does 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:25couven92Araq, 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:26Araqkrux02: yes, it means more control over the semantic checking since essentially you don't write macros, but compiler plugins
15:16:29krux02Well the downside I see with macros is that they have far to many node kinds
15:17:06*haha_ quit (Client Quit)
15:17:45Araqkrux02: that'll also go away but we need a bijection from old ASTs to new ASTs
15:19:05krux02currently the standard library doesn't use macros AFAIK, is that related to the fact that macros could be slow?
15:19:45Araqno, it's because we're conservative in their usage
15:19:57Araqto make it easier to get started
15:20:36krux02what do you mean to make it easier to get started?
15:21:04Araqit means people can read tut1 and use the language
15:21:19krux02isn'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:50Araqhuh, I don't know. :-)
15:21:52euantorOnly if it makes sense to implement them as macros
15:21:55krux02to my taste the standard library has too much "magic"
15:22:16euantorImplementing 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:26Araqwhat do you mean? the '.magic' pragma in system.nim?
15:22:48krux02yes, I think it is used too often.
15:23:07Araqthis comes up regularly
15:23:20Araqand nobody gave me concrete numbers
15:23:38krux02It is is a total blocker when people want to look up how things in the standard library work
15:23:53krux02it is easy to look up sourcecode, but it is hard to follow a magic
15:24:02icieyeskrux02 out of interest are there any examples of things that you dont feel should be magic?
15:24:08krux02what do you mean with concrete number?
15:24:13AraqC#/Golang/c++ do not have a protoytpe for `+` for ints. Nim does, but the implementation is 'magic'. what's the problem?
15:24:31krux02no that is not a problem
15:24:38AraqI can hide the prototype like C#, would that make you stop complaining? :P
15:26:26Araqby concrete number I mean "out of X magics, Y could be implemented directly in system.nim, not in the codegen"
15:27:16Araqmy 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:32Araqbtw .magic: "Foo" needs you need to grep for mFoo in the compiler's sources to find the implementation
15:28:44couven92(ah, found it: `nim --genMapping`)
15:29:11Araqthere are no exceptions to this rule.
15:30:28krux02well that is something that I needed to learn, too. But initially it was a showstopper when I found a magic
15:30:49Araq --embedsrc embeds the original source code as comments
15:30:49Araq in the generated output
15:30:54Araqcouven92 ^
15:32:16couven92Araq, 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:30Araqkrux02: 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:09Araqin fact, no tool does that, Eclipse doesn't show the JVM bytecode for int.'+'
15:33:47icieyeswhile 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:08Araqcouven92: genMapping doesn't do anything useful, I'm afraid
15:34:26Araqpatch the compiler instead?
15:34:37couven92Araq, my thoughts exactly! :)
15:34:49krux02well 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:50couven92couldn't we just emit a tsc-like sourcemap file?
15:35:27Araqicieyes: 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:46Araqor you transform the container into a proc
15:36:31Araqwhich is what I would do for an entity system
15:37:30couven92Araq, --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:41icieyesAraq: 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:42icieyesems that need to be updated, but without having the systems in a list that's not possible.
15:40:13couven92Araq, even worse, that's also true for `--genScript`! :O
15:40:43Araqicieyes: https://gist.github.com/Araq/bfcf12baa58ac2ab57641984f0b512c1
15:40:59Araqwere 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:22icieyesAraq: 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:02Araqactually, I have a BTree implementation that allows for multiple keys of the same value
15:48:18Araqso constructions like BTree[Key, seq[Value]] are not required
15:48:47Araqand can be simplified to BTree[Key, Value]
15:49:02icieyeswhat 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:39Araqthe component-wise updates are super fast, BTree iterations can be close to array iterations
15:49:48icieyesreally!? :-o
15:50:00icieyesok that's something to consider
15:50:28icieyeswhat 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:52Araqeven better. the data structures are blobs and be serialized to disk easily and it's network transparent
15:50:58Araqbecause it doesn't use pointers, but IDs
15:51:07icieyesok now you really have my interest
15:52:15icieyesis there a nim module for btrees? My google fu fails me
15:52:37AraqI need to clean up and open source my implementation :-)
15:53:00Araqcache locality is what I meant by "close to array iterations"
15:53:06icieyes:) oooh yes it sounds like a great addition to stdlib
15:53:25couven92or at the very least a nimble
15:54:15Araqto answer your physics question: I think it would just be a 'target: EntityID' field in the Physics object
15:54:32icieyesyes 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:58Araqbut 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:40icieyesto be fair, most entity systems don't allow multiple components of the same type, which does make implementation easier
15:56:28Araqyeah in the real world, I would not use ComponentID = distinct int but ComponentID = enum ...
15:57:05Araqbecuase if you can't enumerate your components upfront you have no idea what you're doing :P
15:57:24Araqand are solved a paper tiger instead of programming a game
15:57:27Araq*are solving
15:58:06icieyesyes I agree
16:00:28krux02Araq: where is the logic that decides how a type is named in the C backend?
16:01:02Araqccgtypes.nim
16:01:12krux02I would like to give it a try to generate
16:01:18icieyesalthough 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:18icieyess 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:57icieyesmore speed is always good though in games, especially when you have thousands of entities interacting!
16:04:16icieyestanks for the food for thought
16:04:18Araqicieyes: 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:19icieyes*thanks
16:04:49Araqperhaps by re-loading a DLL that you develop in Nim
16:05:07Araqperhaps via inter process shared memory
16:05:15icieyesI probably won't do that to be honest, the Nim compiler is fast enough for me right now ;)
16:05:42Araqdo not underestimate the power of pointerfree programming ;-)
16:06:31icieyesdefinitely 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:57Araqicieyes: 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:57Araqif 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:33icieyesthat'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:46icieyesto be honest I'm not sure how I would go about hotloading
16:12:34*tankfeeder quit (Quit: Connection closed for inactivity)
16:13:22icieyessomething for me to research I think. In the mean time, I must go. Thanks for the help and ponder points Araq.
16:13:38krux02well that was easy to implement
16:14:07krux02I changed one line
16:14:09krux02http://ix.io/yZx
16:14:26*icieyes quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:19:36Araqhey ... you cannot just leave. there is more to the design
16:20:06Araqit also gives you memory safety and "weakrefs" out of the box. weakrefs are just entity IDs that you don't re-use
16:21:10Araqkrux02: 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:36couven92Araq, is it just me or is something terribly broken when running `koch boot -d:release` on current devel (`koch boot` works fine)?
16:47:54couven92In 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:54couven92string)
16:48:10Araqthat's a regression we blame MS for ...
16:48:34couven92please elaborate?
16:48:48*vivus joined #nim
16:50:43*nhywyll joined #nim
16:50:46couven92Isn't that a message coming from nim? I.e. BEFORE vcc is invoked? How is Microsoft responsible for that?
16:51:26Araqvcc miscompiles Nim
16:51:57couven92oh, I see... just the new vcc compiler (VS17), or VCC in general?
16:52:09Tiberiumvcc compiler isn't new is VS17 AFAIK
16:52:24AraqI don't know, would be nice if you could take a deeper look what happens here
16:53:24couven92okay... 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:19couven92crap... doing Nim stuff is just too much fun! :P This way, I'll never get my M.Sc. finished!! :O
16:57:09Araqwrite your M.Sc. in Nim?
16:58:45*rauss quit (Quit: WeeChat 1.9)
16:59:20couven92yeah, 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:45couven92Araq, for the vcc thing... I'll have to look at the actual C code produced in iteration 1, right?
17:03:43couven92and compare with the c code generated for gcc...
17:04:04couven92okay... I'll have a look when I get home
17:04:10Araqhmm nah, that's futile
17:04:34*itseris quit (Quit: Konversation terminated!)
17:04:36Araqinstead you need to see what data structure gets prematurely collected because vcc optimizes away a stack root
17:05:19Araqin fact, I can probably tell you
17:05:20*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:10:16couven92okay, 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:33ParashuramaHey!
17:24:35ParashuramaCould I have some feedback on PR: https://github.com/nim-lang/Nim/pull/5908
17:24:36ParashuramaIt's been quite some time since I posted it and it could use some code review.
17:26:26couven92Parashurama, well, it would need to be merged with origin/devel as it has conflicts that need to be resolved
17:28:57Parashuramayeah, 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:41AraqParashurama: looks ok to me, maybe you can reduce the boilerplate a bit
18:00:23AraqtyInt8, tyInt16, tyInt32 can all use the same code when you use some smart expression instead of 0xFFFF
18:00:29Araqsame 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:26couven92Araq, 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:55krux02what is with the pull requests that have failed the tests, but that is a bug on it's own
18:17:11krux02AppVeyor was unable to build non-mergeable
18:17:18krux02when the PR is in fact mergeable
18:17:30couven92krux02, which one do you mean?
18:17:48krux02https://github.com/nim-lang/Nim/pull/6200
18:18:07krux02https://github.com/nim-lang/Nim/pull/6139
18:19:15krux02Build execution time has reached the maximum allowed time for your plan (90 minutes).
18:19:22krux02often that is the reason the build fails
18:19:42ParashuramaAraq: Can you confirm that int/uint is always 64bits in VM (on 32bits or 64bits platform?)
18:20:10krux02well I can confirm that all ints are stored internally as an 64bit int on the vm
18:20:35couven92krux02, even when nim vm is compiled 32-bit?
18:20:39AraqParashurama: confirmed but it's probably a bad idea
18:24:45*sz0 joined #nim
18:25:24Araqcouven92: compiler/semcall.nim
18:25:36Araq var syms: seq[tuple[s: PSym, scope: int]]
18:25:56*Sentreen quit (Ping timeout: 260 seconds)
18:26:06Araqadd some calls to GC_ref(syms) and to GC_unref(syms)
18:26:14Araqand see if it makes a difference
18:26:24couven92will do, thanks! :)
18:27:11Araqthat's in line 71
18:27:33ParashuramaAraq: A way to solve int size problems in VM might be to keep int64 storage but respect sizeof(int) in int operation.
18:27:35Parashurama(clamp to u32 between each operation when sizeof(int) < 8)
18:27:51Parashurama(clamp to u32 between each operation when sizeof(int) < 8
18:29:46Parashuramaie: insert toNarrow opcode between each operation when required. we already do this to emulate int8, int16,int32 in VM.
18:30:02dom96hello guys
18:30:08*Jesin quit (Quit: Leaving)
18:30:15Parashuramahey.
18:32:49*Jesin joined #nim
18:32:49*Ven_ joined #nim
18:33:54dom96In 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:18dom96(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:39krux02We should convince some super rich people that investing in Nim is a good idea
18:37:11krux02but 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:16Tiberiumdom96, 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:29dom96quite possibly lol
18:38:29TiberiumI mean not win something they want, but just win something
18:38:35dom96There is 4 books to win
18:38:38*smt_ joined #nim
18:38:42dom96You guys may as well have a go :)
18:40:11*Sentreen joined #nim
18:40:29mahmudovif riches at favor....
18:40:46dom96omg
18:40:47mahmudovother is capitalism
18:40:51dom96I 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:46subsetparkis the `rationals` module the best solution for human-friendly floating point math?
18:52:05*Ven_ quit (Ping timeout: 240 seconds)
18:53:13FromGitter<zetashift> man that site looks straight outta 2006
18:53:19FromGitter<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:17couven92Araq, 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:14couven92ah, no, GC ref on syms... okay... got it, sorry :P
19:25:06FromGitter<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:36couven92Araq, 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:11raussTiberium: Have you used signals with godot-nim yet?
19:47:26Tiberiumwell I tried but I don't know how :)
19:48:03TiberiumI've wanted to ask endragor
19:48:09Tiberiumhere on irc :)
19:48:17Tiberiumhe's here sometimes, maybe in the gitter
19:48:39*Tiberium quit (Remote host closed the connection)
19:51:20FromGitter<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:00raussYeah me either. Thanks
19:55:16*Trustable quit (Remote host closed the connection)
19:59:42FromGitter<krux02> type MyType = object [...]; var mt: MyType; mt.a = 123
19:59:45FromGitter<krux02> yay
20:00:20FromGitter<TiberiumN> but at least it looks very promising :)
20:00:20FromGitter<krux02> ah sorry it was about godot
20:01:07*Ven joined #nim
20:01:26FromGitter<TiberiumN> yes
20:01:30*Ven is now known as Guest83286
20:04:38krux02Araq: I was about to make nil string and equal to empty string, but strutils.formatEng relies on it
20:04:51FromGitter<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:31FromGitter<TiberiumN> without manually creating new GDNative script, attaching it to the object, creating .nim file
20:07:37*scriptum joined #nim
20:15:15raussTiberiumN boy do I have a thing for you
20:15:41rausshttps://github.com/acleverpun/generator-godot
20:16:08raussI don't have docs yet, but it's otherwise quite complete.
20:16:59raussBut yes, built-in plugin wolud be much better
20:24:32FromGitter<gokr> What's the best stuff for Emacs and Nim?
20:25:05FromGitter<gokr> I happen to know one of the Emacs maintainers... and I am luring him into Nim :)
20:25:55FromGitter<krux02> I use emacs and nim
20:26:11FromGitter<krux02> there is a nim-mode and I am using it, but it has problems
20:26:58FromGitter<gokr> Mmm, seems to be two of those
20:27:05FromGitter<gokr> I looked at: https://github.com/nim-lang/Nim/wiki/editor-support
20:28:19FromGitter<gokr> @krux02 Are you german? And... is Arne common in Germany?
20:28:54FromGitter<krux02> I am german and the name is not that common, but also not totally uncommon
20:29:00FromGitter<gokr> Interesting.
20:29:13FromGitter<gokr> It's a common swedish name
20:31:04dom96yay front page of HN
20:32:47*skrylar joined #nim
20:32:50*rauss quit (Quit: WeeChat 1.9)
20:32:54FromGitter<TiberiumN> krux02: well, Godot is a game engine :)
20:33:04subsetparkdom96: 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:10subsetparkhow can we fix things?
20:33:47dom96subsetpark: fork and change the URL in packages.json
20:34:50subsetparklike, 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:23Araqkrux02: formatEng needs to take an Option[string] then or something
20:54:59Araqbut since we still want to release 0.17.2 with the parser change and bugfixes and no other changes
20:55:24Araqyour nil change PR will have to wait a bit
20:55:35Araqalso the db_* modules are all affected by this change
20:56:00Araqnot a big problem since I want to change the API anyway and move it to a separate Nimble package
20:56:10Araqbut we need to have a migration plan
20:56:23FromGitter<krux02> yes I agree
20:58:13dom96subsetpark: yes, the packages repo
20:58:54Araqmaybe we need to have const NilString* = when defined(nimNoNil): "" else: string(nil)
20:58:57Araqin system.nim
21:00:12yglukhovhey guys, introducing a tiny state machine impl. https://github.com/yglukhov/state_machine
21:00:19FromGitter<krux02> hmm I am not sure how that value should be used
21:02:17dom964 space indent :'(
21:02:54dom96yglukhov: y'all need some linter :)
21:03:21yglukhovnah, i use 4 spaces in all of my projects =)
21:04:35*Sentreen quit (Ping timeout: 240 seconds)
21:06:04subsetparkdom96: done!
21:09:33dom96subsetpark: merged!
21:09:46subsetparktaking care of business :)
21:12:40subsetparkhm - 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:12FromGitter<krux02> well gmp increases the precision, but floating point is still floating point
21:14:11FromGitter<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:40subsetparkyeah - bignum, which uses gmp, has a Rat type which I rather thought would help with that stuff
21:14:43subsetparkbut i guess not
21:15:39subsetparkkrux02: when you say 'there is a decimal ... type', you don't mean it's already available in Nim do you?
21:16:24FromGitter<krux02> I don't know if it is already in Nim
21:16:45subsetparki haven't seen any implementations of it yet
21:16:52subsetparkwhich 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:50FromGitter<krux02> http://dec64.com/
21:20:01FromGitter<krux02> there is a c wrapper for it
21:20:02FromGitter<krux02> http://dec64.com/dec64_math.html
21:20:20FromGitter<krux02> but be aware, just because you have decimal number doesn't mean you don't have rounding errors
21:20:44FromGitter<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:53subsetparkkrux02: very interesting
21:24:06subsetparkworth writing a nim wrapper for sure
21:25:48shodan45dom96: congrats on the book!
21:26:18shodan45I'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:28dom96shodan45: 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:38shodan45dom96: thanks... don't be too generous, though. that's part of why I'm in financial hell..... ;(
21:33:14dom96shodan45: Hope you get out of it soon! :)
21:34:12*ofelas quit (Quit: shutdown -h now)
21:34:36subsetparkI've got my hard copy on the way! Very excited
21:36:15subsetparkafl is very fun to watch...
21:40:40dom96afl?
21:45:04*krux02 quit (Remote host closed the connection)
21:48:52dom96subsetpark: replied to the jester issue
21:49:41subsetparkdom96: american fuzzy lop, a fuzzer
21:49:46subsetparkand thanks, i'll dig deeper
21:57:10FromGitter<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:42dom96sure, but who knows if you've got all of it?
21:59:16FromGitter<TiberiumN> if i convert it to djvu after that it's 100% :)
22:02:11FromGitter<TiberiumN> but only for educational purposes, no big distributing
22:03:36*nsf quit (Quit: WeeChat 1.9)
22:05:05FromGitter<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:27FromGitter<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:01FromGitter<k0pernicus> (or maybe I can try to use, for the moment, Python libraries and use them using the Python2 wrapper for Nim...)
23:37:06FromGitter<krux02> Well you should propably just go with a wrappery
23:37:22FromGitter<krux02> try to find a good library that has a C interface and use that
23:37:36FromGitter<k0pernicus> I thought so too...
23:38:27FromGitter<zetashift> Tensorflow/Torch have pretty good C API's right?
23:39:17FromGitter<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:49FromGitter<zetashift> yea but making wrappers for those should be alot easier too
23:40:03FromGitter<k0pernicus> I think so, but I don't want to use DL actually - just "basic things" like SVM, KMeans or Affinity Propagation
23:40:11FromGitter<k0pernicus> C++ is ok?
23:40:14FromGitter<k0pernicus> Or just C?
23:40:15FromGitter<zetashift> ah
23:40:39FromGitter<krux02> you can use c++, too, but then you have to compile your entire project as a c++ project
23:40:47FromGitter<k0pernicus> Arf
23:41:07FromGitter<krux02> understandable though, because you cannot call c++ functions from C
23:41:17FromGitter<k0pernicus> Yep, I understand
23:43:14FromGitter<k0pernicus> Actually, C++ libs are more abundant than C libs... :-(
23:43:15FromGitter<k0pernicus> https://github.com/josephmisiti/awesome-machine-learning#c
23:43:25*couven92 quit (Quit: Client Disconnecting)
23:43:36FromGitter<krux02> don't worry too much, you can use c++
23:44:47FromGitter<k0pernicus> Yep
23:46:27FromGitter<krux02> you can even map generics to templates and such
23:46:46FromGitter<krux02> I think you have to hack a bit with the emit pragma, but it's possible
23:47:20FromGitter<k0pernicus> I am exploring the project Urhonimo, which uses c2nim
23:47:21FromGitter<k0pernicus> https://github.com/3dicc/Urhonimo
23:47:57FromGitter<krux02> you should play a bit with c2nim
23:48:11FromGitter<krux02> there are a few parameter you need to get right for c2nim
23:48:26FromGitter<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:31FromGitter<k0pernicus> Ok
23:48:45FromGitter<k0pernicus> I will try on simple examples first to get familiar with
23:48:58*yglukhov quit (Remote host closed the connection)
23:49:00FromGitter<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:30FromGitter<krux02> really explore c2nim because you can only use it once at the beginnig
23:49:38FromGitter<k0pernicus> :-O
23:49:42FromGitter<k0pernicus> Ok
23:49:50*rauss quit (Quit: WeeChat 1.9)
23:49:55FromGitter<krux02> well c++ is easier to read than to write
23:50:05FromGitter<k0pernicus> Ah ah ^^
23:50:09FromGitter<k0pernicus> So true :-)
23:50:11FromGitter<krux02> you don't need to hassle with the quirks when you just need to read it
23:50:28FromGitter<krux02> unless someone exploited templates
23:50:45FromGitter<k0pernicus> Ooooh yeah...
23:50:56*rauss joined #nim
23:51:27FromGitter<k0pernicus> C++ templates can be really a pain in the arse -_-
23:51:38*jinshil joined #nim
23:51:53FromGitter<krux02> I mean I like the templates, but people use them stupidly
23:52:05FromGitter<k0pernicus> Totaly agreed
23:52:23FromGitter<k0pernicus> Personal experience: research projects
23:52:26FromGitter<k0pernicus> No documentation
23:52:36FromGitter<k0pernicus> Templates everywhere
23:52:50FromGitter<krux02> yes
23:52:56FromGitter<krux02> seme experience here
23:53:24FromGitter<krux02> researchers want to feel smart and everything should be "generic" and "flexible" for the future
23:53:32FromGitter<krux02> and then compilation times from hell
23:53:46FromGitter<k0pernicus> Ah ah, right
23:53:55FromGitter<k0pernicus> Actually, they don't care so much here...
23:53:59FromGitter<krux02> 30 minutes compilation time on a fast computer and on my slow computer is was 2 hours
23:54:14FromGitter<krux02> that does matter
23:54:35FromGitter<krux02> unless you prefer to spent your time compiling
23:54:35FromGitter<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:27FromGitter<krux02> yes, and no studends don't maintain code, they make it worse
23:56:44FromGitter<k0pernicus> Yep, I did actually... 
23:57:23FromGitter<k0pernicus> (but I wrote the documentation! :-] #PersonalExcuses)
23:57:40FromGitter<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:14FromGitter<krux02> well that is good
23:58:36FromGitter<krux02> students normally write bad code that is why they are students
23:59:23FromGitter<k0pernicus> Right