<< 11-07-2017 >>

00:28:19FromGitter<zacharycarter> krux02: are you around by any chance?
00:44:38FromGitter<zacharycarter> nevermind, think I answered my own question
01:18:00FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/CxJr/Screen-Shot-2017-07-10-at-9.16.58-PM.png)
01:23:41FromGitter<zacharycarter> all opengl this time around again
01:29:19*chemist69 quit (Ping timeout: 255 seconds)
01:43:04*chemist69 joined #nim
02:37:19*def-pri-pub joined #nim
02:45:22*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:07:57shashlickI figured out statically linking PCRE, now I'm curious what minimum build flags for PCRE are required by Nim: http://www.pcre.org/original/doc/html/pcrebuild.html. I see JIT referenced in pcre.nim. Not sure about other things like UTF, etc.
03:09:56*vendethiel joined #nim
03:39:48*pilne quit (Quit: Quitting!)
03:40:01*jsgrant_ joined #nim
03:45:54*def-pri-pub quit (Quit: leaving)
04:16:23*vendethiel quit (Ping timeout: 268 seconds)
04:49:25*SusWombat joined #nim
05:11:57Araqshashlick: well you also need UTF-8 support
05:41:14*nsf joined #nim
05:45:58*ShalokShalom joined #nim
06:00:27*yunfan joined #nim
06:00:54yunfanhi, are there any module that could let me easily build a http api service easily?
06:02:34Araqasynchttpserver + json?
06:07:29*kunev quit (Ping timeout: 248 seconds)
06:08:47*kunev joined #nim
06:13:30*Vladar joined #nim
06:15:23yunfanok will check that
06:45:11*Arrrr joined #nim
06:57:11*yglukhov joined #nim
06:57:46*yglukhov quit (Remote host closed the connection)
06:58:01*yglukhov joined #nim
07:06:57*shashlick quit (Quit: Connection closed for inactivity)
07:41:04*pontus quit (Remote host closed the connection)
07:49:44*jonesz_ quit (Quit: leaving)
08:00:38euantoryunfan: Might also be worth checking out Jester to make routing easier: https://github.com/dom96/jester
08:02:28*couven92 joined #nim
08:04:37*Vladar quit (Remote host closed the connection)
08:09:49FromGitter<andreaferretti> or rosencrantz https://github.com/andreaferretti/rosencrantz
08:11:00*pwntus joined #nim
08:37:21surmaI’m trying to build a macro that replaces a certain character in nnkIdents. However, for some reason, my nnkAccQuoted notes get lost while executing the macro. Can anyone take a look and tell me what I am doing wrong: https://gist.github.com/surma/5660163d2e16706110614b53f0ca3479
08:37:38surmaAlso, if I’m doing macros wrong in general, happy to get feedback. I found them really hard to debug, so I am poking in the dark a bit
08:43:11FromGitter<Varriount> surm
08:44:05yunfaneuantor: thanks, for that, i am just curous of it
08:46:19Araqsurma: don't use 'var NimNode' and you'll be fine
08:46:21FromGitter<Varriount> surma: The fact that you're both returning a value from the macro and modifying an parameter might be the cause.
08:47:10surmaAraq: As a parameter or the local variable? or both? Just leave them as ``untyped``?
08:47:23Araqas parameter
08:47:59*yglukhov quit (Remote host closed the connection)
08:51:17*arnetheduck joined #nim
09:01:52*PMunch joined #nim
09:02:03*yglukhov joined #nim
09:02:06*PMunch quit (Client Quit)
09:07:15*yglukhov quit (Remote host closed the connection)
09:07:50*yglukhov joined #nim
09:12:05*yglukhov quit (Ping timeout: 240 seconds)
09:14:40*yglukhov joined #nim
09:20:52surmaYou mind taking another look? I am now not returning a new tree but modifying the existing one, but the operator-backticks are still lost in the transition: https://gist.github.com/surma/5660163d2e16706110614b53f0ca3479
09:27:23*gokr joined #nim
09:33:34*yglukhov quit (Remote host closed the connection)
09:34:38*yglukhov joined #nim
09:35:45FromGitter<TiberiumN> @trustable-code thank you very much, it works now with visual studio compiler 32bits and mingw 32bits.
09:39:13*yglukhov quit (Ping timeout: 248 seconds)
09:42:57*Arrrr quit (Ping timeout: 248 seconds)
09:44:17couven92surma, maybe don't change the existing NimNode, return a new NimNode instead...
09:45:59*Arrrr joined #nim
09:45:59*Arrrr quit (Changing host)
09:45:59*Arrrr joined #nim
09:46:43couven92surma, like I do here: https://github.com/couven92/nim-windowssdk/blob/master/src/windowssdk/ansiwide.nim#L43
09:47:15couven92th link does sth very similar to what you want to do: it replaces an Ident string with a different Ident string
09:49:47*yglukhov joined #nim
10:04:20*avital_ joined #nim
10:04:29*avital_ left #nim (#nim)
10:09:55*v17d joined #nim
10:13:13*nightmared quit (Ping timeout: 258 seconds)
10:14:14*nightmared joined #nim
10:14:39*yglukhov quit (Remote host closed the connection)
10:20:40*yglukhov joined #nim
10:21:55*yglukhov_ joined #nim
10:21:56*yglukhov quit (Read error: Connection reset by peer)
10:22:35*yglukhov_ quit (Remote host closed the connection)
10:23:11*yglukhov joined #nim
10:23:45*Vladar joined #nim
10:27:58*yglukhov quit (Ping timeout: 260 seconds)
10:56:20*Arrrr quit (Disconnected by services)
10:56:20*Arrrr1 joined #nim
10:56:23*SusWombat quit (Remote host closed the connection)
11:00:51*Arrrr1 quit (Ping timeout: 255 seconds)
11:17:34*xet7 quit (Ping timeout: 268 seconds)
11:23:51surmacouven92: Thanks. But even then the backticks disappear :(
11:24:58Araqsurma: nkAccQuoted produce the backticks
11:25:10Araqthey are not part of the string/identifier
11:25:31surmaAraq: Yeah, and it’s there on the input tree. I am changing the children of the nnkAccQuoted. But in the output the backticks are gone
11:26:05*krux02 joined #nim
11:26:21*krux02 quit (Remote host closed the connection)
11:26:35*krux02 joined #nim
11:27:04Araqsurma: who says they are gone?
11:27:28Araqcould be an AST renderer glitch
11:27:48surma``expandMacros`` doesn’t shot them and the fact the assignment in the last line throws an error ``attempting to call undeclared routine: 'mainMemory='``
11:28:01*Sentreen quit (Ping timeout: 248 seconds)
11:28:28Araqyou have mainMemory=*
11:28:34Araqnot mainMemory=
11:31:45*gokr quit (Ping timeout: 248 seconds)
11:32:09*krux02 quit (Disconnected by services)
11:32:09*krux02- joined #nim
11:32:11*krux02- is now known as krux02
11:32:24*krux02 quit (Disconnected by services)
11:32:24*krux02- joined #nim
11:32:26*krux02- is now known as krux02
11:32:39*krux02 quit (Disconnected by services)
11:32:39*krux02- joined #nim
11:32:42*krux02- is now known as krux02
11:32:55*krux02 quit (Disconnected by services)
11:32:55*krux02- joined #nim
11:33:04*krux02 joined #nim
11:33:04*xet7 joined #nim
11:35:47surmaOh, so the star _needs_ to go outside the backtick
11:35:52surmaAraq: Lol that fixes it.
11:35:58surmaThanks so much everyone for your time :)
11:37:56Araqyou're welcome
11:39:17*krux02_ joined #nim
11:39:30*krux02 quit (Remote host closed the connection)
11:39:45*krux02- quit (Remote host closed the connection)
11:41:54*Sentreen joined #nim
11:42:06*krux02_ quit (Remote host closed the connection)
11:49:50*yglukhov joined #nim
12:02:47*Snircle joined #nim
12:15:27*yglukhov quit (Remote host closed the connection)
12:16:59*yglukhov joined #nim
12:17:22*shashlick joined #nim
12:22:20*gokr joined #nim
12:46:03*krux02 joined #nim
12:47:14*yglukhov quit (Remote host closed the connection)
12:47:31*yglukhov joined #nim
12:58:49*smt quit (Read error: Connection reset by peer)
12:59:16*smt joined #nim
13:06:07*nsf quit (Quit: WeeChat 1.7.1)
13:20:35*xet7 quit (Ping timeout: 240 seconds)
13:33:20*yglukhov quit (Remote host closed the connection)
13:33:58*xet7 joined #nim
13:36:52*federico3p left #nim ("User left")
13:48:18shashlickAraq: thanks re pcre. I can document how to build static pcre into nim binaries, is there a place I can put that info?
13:49:25Araqhmm to the pcre module? not sure
14:03:00*yglukhov joined #nim
14:08:25shashlickbasically the steps I figured out, I can document somewhere - wiki or part of tutorial or elsewhere. Else i'll just put it on my blog
14:09:04euantorYou can always post things to the Nim blog too by opening a PR here: https://github.com/nim-lang/website
14:09:27euantorIt it's something useful/interesting, I'm sure it would be a good fit there
14:10:40FromGitter<TiberiumN> Araq, I have a "problem" with visual studio compiler (14.0 version) and --app:gui ⏎ When compiling for --app:gui, on linker stage VCC shows that it can't resolve *imp*MessageBoxA@16 symbol ⏎ ⏎ adding --passL:"user32.lib" fixes this problem [https://gitter.im/nim-lang/Nim?at=5964dc60bf7e6af22cc8f6f4]
14:15:08AraqTiberiumN: Yes I know. the ui wrapper is full of additional linker commands.
14:15:26Araqbut it's not clear if the default config should be concerned about it
14:20:47federico3some tips on doing 1-complement sum (on uints)?
14:33:05FromGitter<TiberiumN> Araq: thanks, but at least I think user32.lib should be added to the config (if --app:gui is defined on windows), because without it compilation with --app:gui will fail
14:42:24*cs_ joined #nim
14:43:10*salewski joined #nim
14:43:58*cs_ quit (Client Quit)
14:44:36salewskiI have the feeling that nimble accepts no CUSTOM ADDITIONAL parameters?
14:45:07subsetparksalewski: you can put compiler parameters into `nim.cfg`, as well as use `nimble c` to perform arbitrary compilation operations
14:45:10salewskiSomething like: nimble install gintro --without:deprecated
14:46:52salewskisubsetpark: can you give an example for nimble c use?
14:47:35subsetparksure
14:47:49subsetparkin the ansible playbook for my application, i deploy in two steps:
14:48:00subsetpark1. nimble install -d # install all dependencies
14:48:53subsetpark2. nimble c --threads:on -d:release {{ project_name.nim }} # Compile the application itself with specific compiler flags
14:49:57subsetpark(in that case, it's because I don't want the behavior of `nimble install`, which intalls into the nimble binary directory)
14:51:16salewskiOK, thanks. Maybe that even helps with my recent gintro package issues: https://forum.nim-lang.org/t/3031
14:51:52salewskiI will try that...
14:57:42salewskiNo, I think "nimble c" will also work only for local packages.
14:58:14salewskiBut generally the user will type only "nimble install gintro"
14:58:59salewskiAnd for that, there seems to be no way to execute the before hook or to pass parameters.
14:59:39salewskiSo I have to ask the user to download the package by git clone, cd into package
14:59:54salewskidirectory and execute local nimble commands.
15:01:02salewskiMaybe dom96 will have a better idea at some time. Bye.
15:03:12*salewski quit (Quit: WeeChat 1.4)
15:04:02AraqTiberiumN: PRs are welcome
15:12:37*Arrrr joined #nim
15:12:37*Arrrr quit (Changing host)
15:12:37*Arrrr joined #nim
15:14:23*nsf joined #nim
15:28:31ArrrrHmm, how can i tell if a generic argument is a proc?
15:41:39*Trustable joined #nim
15:46:45ArrrrMmm doesn't matter ...
16:10:57*jsgrant_ quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg[(at)]jsgrant.io & I'll try to get back to you within 24-36 hours.)
16:16:11*Jesin quit (Quit: Leaving)
16:33:08*yglukhov quit (Remote host closed the connection)
16:57:41*skrylar joined #nim
17:11:39koppehMhh.. type mismatch, got array[0..8, float64], expected ref openArray[T]
17:12:05koppehAm I misusing / misunderstanding ref, or is array not compatible with ref openArray, ..?
17:12:24koppehDo I need to create a reference to my array?
17:13:10koppeh(I assume a non-reference openArray means copying..?)
17:14:47flyxwell you cannot assign a non-ref type to a ref-type
17:15:19FromGitter<Varriount> koppeh: Can I see your code? I'm not sure you can have a 'ref openarray' type
17:15:50*yglukhov joined #nim
17:16:15koppehhttps://gist.github.com/copygirl/0a4ba312f717e6b51b6114b273492810
17:16:31skrylari suspect you could but what sense would that make
17:16:36koppehI suppose it has to be var?
17:16:42skrylaropenarrays can only be made by the compiler during function calls IIRC
17:16:48skrylarso its just a ref to a constant?
17:16:57FromGitter<Varriount> Don't use a 'ref' type for the openarray
17:17:03*couven92 quit (Quit: Client disconnecting)
17:17:25koppehI guess I'll just go with a seq then.
17:17:42FromGitter<Varriount> koppeh: Make sure to use addr seq[0] in that case
17:18:06koppehRight.
17:18:44*smt quit (Ping timeout: 260 seconds)
17:19:04koppehThen.. how am I misunderstanding ref and non-ref?
17:19:15koppehYou can't get a reference to a const?
17:19:30skrylarnot generally
17:19:56skrylarwell, it's mostly that openarrays are sorta weird
17:20:05*yglukhov quit (Ping timeout: 240 seconds)
17:20:26skrylarthey are arrays of fixed size, but that size isn't known until the function call is generated by the compiler, and i think those are basically turned in to seq's and not arrays
17:20:43skrylarwhich is what [Turbo]Pascal does, and not what va_args (C) do
17:31:18*yglukhov joined #nim
17:31:57Araqkoppeh: use 'var' instead of 'ref', Nim is not c#
17:32:13koppeh(I like C#.)
17:32:21koppehBut yeah I haven't wrapped my head around some things.
17:33:02koppehref is part of the type.. right? Is that my mistake?
17:33:26*yglukhov quit (Remote host closed the connection)
17:34:13skrylarkoppeh yes, ref is part of the type
17:34:41skrylar"ref foo" is roughly analogous to "foo*"
17:35:02koppehMhh I think comparisons to c(++) won't help me understand.
17:35:10skrylarC# also has pointers, though.
17:35:13skrylarIn unsafe code
17:35:21koppehI still haven't quite understood the difference between & and * and such.
17:35:37skrylarvar in the context of a parameter is like C#'s "inout" IIRC
17:35:37koppehref = class and non-ref = struct?
17:36:42koppehYeah, var would be C#'s "ref" keyword (when with function parameters).
17:39:37*Trustable quit (Remote host closed the connection)
17:40:58*PMunch joined #nim
17:41:12*yglukhov joined #nim
17:41:18*PMunch quit (Remote host closed the connection)
17:41:36*PMunch joined #nim
17:42:44PMunchI think I've found a bug with the deques module
17:44:56PMunchI was doing some macro stuff and I needed to parse the AST
17:45:17PMunchI add nodes I have to check further into a deque to use as a stack
17:45:40subsetparkkoppeh: you can get pretty far not bothering with `ref` at all and only dealing with `var`; functions can pass around `var`s and mutate them just fine. ref means 'create a *new* value which holds a reference to this other value on the heap' - so it only comes into play once you need to make several values that all refer to the same location in memory
17:46:14PMunchSo I add them with addFirst, and remove them with popFirst. But they always come back as nil lit nodes. If I do a peekFirst and then a discard popFirst it works fine
17:46:52koppehsubsetpark: I just derped up and misunderstood what "ref" means.
17:47:36subsetparkok, i'm not sure how your class/struct analogy works but if it's context-specific to C# then it might be right
17:47:47subsetparkcos i don't know C#
17:49:10yglukhovC# classes = ref objects. structs = objects.
17:49:34yglukhovdmo96: are you around?
17:51:53*pilne joined #nim
17:53:00dom96yglukhov: yes
17:53:55yglukhovdom96: so what do you think of https://github.com/nim-lang/Nim/pull/5938, can we merge it? it's a good improvent IMO
17:56:58*shashlick quit (Quit: Connection closed for inactivity)
17:57:03PMunchMinimal example: http://ix.io/yrl, output: http://ix.io/yrm
17:57:23yglukhovdom96: and after that please see https://github.com/nim-lang/Nim/pull/6059
18:02:12PMunchhttps://github.com/nim-lang/Nim/issues/6081
18:03:47skrylari just looked at what it would take to do a general sync server thingy with nim. and then went crosseyed at all the rfcs involved in http/webdav/etc
18:03:50skrylar>.<
18:13:31dom96yglukhov: Reviewed the first one
18:13:31*yglukhov quit (Remote host closed the connection)
18:13:47*yglukhov joined #nim
18:16:56dom96And reviewed the second oen
18:16:57dom96*one
18:17:09dom96Araq: please take a look at https://github.com/nim-lang/Nim/pull/6059
18:18:04yglukhovdom96: thanks, so mostly styling issues, as far as see
18:18:24subsetparkdom96: any chance for my nimble PR ?? :D
18:18:45dom96yglukhov: yep, need to know what Araq thinks though.
18:19:22Araqoh yeah, I think that macro only detects explicit .gcsafe annotations, not inferred onces and as such, it's wrong
18:19:55dom96subsetpark: sure :)
18:20:05subsetparkyay!
18:20:10Araqand now I need to find out who the hell the missing 5 Cylons are
18:20:15dom96In fact, this makes me realise that GitHub is failing me.
18:20:22dom96Too many notifications D:
18:20:34Araqif you know, don't spoiler it!
18:20:38subsetparkdom96: I find /pulls invaluable for this sort of thing
18:21:17dom96ooh, cool.
18:21:32dom96Araq: So are you happy with the changes?
18:21:57Araqno I said
18:22:02Araqoh yeah, I think that macro only detects explicit .gcsafe annotations, not inferred onces and as such, it's wrong
18:22:34yglukhovdom96: conversion works indeed. updated.
18:22:41dom96I don't know if you're talking about the previous state of the macro or what the PR introduces.
18:22:52Araqwhat the PR introduces
18:23:36dom96subsetpark: but see, /pulls doesn't show your Nimble PR :\
18:23:43yglukhovAraq: explicit {.gcsafety.} detection doesn't change anything. it only improves the error message. but the errors will still be there.
18:23:52subsetparkah, because i don't have permissions to assign it to you
18:25:58yglukhovAraq: overall the solution relies completely on nim's gcsafety inference.
18:30:40dom96subsetpark: merged :)
18:31:26subsetparkyeah!
18:33:58Araqyglukhov: hmmm
18:36:20PMunchHmm, I should write that test case for dumpAstGen..
18:36:57PMunchThis deque bug is weird by the way..
18:37:10yglukhovAraq: i know, it's so genious it might not be immediately obvious ;)
18:42:24*eldiz joined #nim
18:46:45krux02projects in Nim are a bit complicated in my opinion
18:47:05Araqkrux02: in what way?
18:47:25krux02In the way that it is not obvious on how they work
18:47:31*PMunch quit (Quit: leaving)
18:48:09krux02The problem is not that I can't look up how they work, I see the problem in that I need to do it
18:48:36krux02for the most part I tried to get with "nim c -r" as far as possible
18:48:46krux02because that is trivial
18:49:01krux02and I want my project to be trivial
18:49:31krux02trivial to use and trivial to understand the project structure
18:50:32krux02wait I use wrong project structure
18:52:19dom96what problems did you run into?
18:52:22yglukhovkrux02: i think you could use any project structure including that allowing to just nim c -r, no?
18:53:32*Jesin joined #nim
18:56:57krux02well yes, but a project for applications as a main executable and it should be obvious to detect that
18:57:05krux02and then there should be a standard way to run it
18:57:15krux02for single file projects it is "nim c -r"
18:57:30krux02but as soon as there are more files, what is the algorithm to detect the main?
18:58:50krux02but don't worry too much I haven't thought about the real problem too much, it just bothers me that I have to think about it
19:01:26yglukhovjust name you main file "main.nim" and call it a day? =)
19:08:17*yglukhov quit (Remote host closed the connection)
19:08:26Araqkrux02: the trick is that every relative path is relative to the file it appears in
19:08:51Araqthis means you don't need --path at all and stuff can build out of the box via 'nim c main.nim'
19:11:23*yglukhov joined #nim
19:12:01krux02Araq: Well don't spend too much time on my problem I haven't spend enough time to actually find the correct words for it. But it feels to me like I do something very trivial and common, but still I don't feel guided and I have to think my own way to structure my project
19:12:25krux02It would be nice if it would be clear how to structure my project without thinking about it or configuring it
19:13:20krux02I remember that in sbt (horribly complicated scala build tool with good defaults) the project structure was already given
19:14:04krux02src file were in ./src/main/scala(/package)
19:14:45krux02then there was ./src/test/scala for all test cases
19:15:31krux02./lib was for other jar files that were automatically on the classpath (java termilogy for you can access the library)
19:15:52krux02that was a very simple config free workflow
19:16:49krux02that gave the project some structure
19:17:13krux02but anyway, that is just a feeling nothing more
19:17:25krux02I just found a bug, not sure if it is reported
19:17:40krux02import foo[bar,baz] # works nicely
19:17:54krux02include foo[bar,baz] # does not
19:20:24AraqI think that wasn't implemented, I don't think thats a bug :P
19:20:43Araqnimble tells you some directory layout iirc
19:20:44krux02well shouldn't include/import share the parsing code for that?
19:21:28krux02well I just realized that I should have foobarpkg/ folder
19:21:38krux02that is nice it is some guidance
19:27:04krux02Araq: is there a way for nim to enable debug builds by default (I mean including debugging symbols used by gdb?
19:27:50*Sentreen quit (Ping timeout: 240 seconds)
19:30:03Araqkrux02: --debugger:native to your config
19:32:23krux02Araq: I found this section in the documentation: https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files
19:32:53krux02but it doesn't tell how a cfg file is structured
19:38:36Araqso read config/nim.cfg
19:39:34Araqor use a .nims file instead, that uses NimScript which is Nim
19:41:34krux02--debugger:native
19:41:45krux02that is the content of ~/.config/nim.cfg
19:42:58*Vladar quit (Quit: Leaving)
19:48:16krux02Well I think the structure of cfg files could be documented a bit more
19:48:47krux02I mean they are very useful and do exactly what I want, but it is not very obvious
19:51:59*krux02 quit (Remote host closed the connection)
20:02:05*Arrrr quit (Read error: Connection reset by peer)
20:31:34*deech joined #nim
20:33:07deechHi all, how do I specify a local dependency in my .nimble file? I'm working on two projects at once.
20:36:03*yglukhov quit (Remote host closed the connection)
20:36:39dom96deech: sadly this is not supported right now.
20:36:54dom96You either use the package name, and then reinstall your package every time you make changes to it
20:36:56FromGitter<krux02> deech, well either you make one project a subproject, or you don't specify it as a local dependency
20:37:07dom96or just specify the path to your Nimble package using the `--path` flag
20:37:51dom96This is actually a fairly simple feature to implement in Nimble if anybody wants to take a crack at it.
20:38:00dom96There is an issue for it in Nimble's bug tracker somewhere
20:42:45deechSo if I had some local dependency `A` in `../nim-A` I could just add 'requires "A"' and do `nimble build --path=../A`?
20:47:39Xecan nim concepts be used like interfaces in Go?
20:56:41dom96deech: not really, Nimble will look for 'A' in ~/.nimble.
20:57:03dom96You can omit the "requires" to prevent that for now
20:57:14dom96Xe: No, but they will offer similar functionality
20:57:35Xedom96: how do you test for concept matching?
20:58:09dom96`is` iirc
21:00:39deechdom96: Thanks!
21:01:28*ShalokShalom quit (Remote host closed the connection)
21:06:19*Matthias247 joined #nim
21:06:22FromGitter<krux02> hmm forgot it again, what was the proc do debug a symbol of the vm in the compiler?
21:09:01*yglukhov joined #nim
21:11:04*yglukhov quit (Remote host closed the connection)
21:11:59FromGitter<krux02> it is debug, so yea I guessed it
21:16:37*nsf quit (Quit: WeeChat 1.7.1)
21:16:59FromGitter<krux02> is still someone here?
21:17:19*krux02 joined #nim
21:18:16*nsf joined #nim
21:18:46krux02Araq: I currently want to write a function with a magic that returns an object
21:19:03krux02how do I construct an object constructor from the compiler?
21:19:09krux02can I do that?
21:26:47*arnetheduck quit (Remote host closed the connection)
21:30:05Xedom96: does nim have anything like a stringbuilder?
21:30:11*arnetheduck joined #nim
21:31:21*yglukhov joined #nim
21:33:21*nsf quit (Quit: WeeChat 1.7.1)
21:37:51*deech quit (Remote host closed the connection)
21:46:27FromGitter<krux02> Xe: yes, a string
21:46:44FromGitter<krux02> a string is appendable
21:47:18FromGitter<krux02> in the compiler there is also a "rope" datastructure I don't know if it's in the standartd library as well
21:49:17dom96^
21:49:31Xes
21:51:55Xei somehow managed to get a .nim file that when compiled doesn't result in a nimcache directory or a resultant binary
21:52:19Xehttps://gist.github.com/Xe/d4b47176b24ce61dd2bcc50961ac9fa3
21:54:08Xeweird
21:54:16Xewhen i comment out the `log` function it makes a nimcache
21:57:39Xeoh
21:57:43Xei forgot the equals
21:57:45Xelol
22:01:01*yglukhov quit (Remote host closed the connection)
22:01:33Xeugh
22:01:39Xesomething seems fucked with concepts
22:01:44Xeand varargs combined
22:07:58*arnetheduck quit (Ping timeout: 260 seconds)
22:10:10Xehttps://gist.github.com/Xe/d1627d002d109c358ae29fcc0a702050
22:11:09Xedom96: am i doing anything obviously wrong with the above slog.nim?
22:13:03*Jesin quit (Quit: Leaving)
22:38:42*arnetheduck joined #nim
22:39:16*Matthias247 quit (Read error: Connection reset by peer)
23:11:41Xeoh
23:11:51Xeyou can't store concepts in sequences or varargs?
23:11:52Xethat's dumb
23:12:16FromGitter<krux02> Xe: well not really
23:12:44Xego lets you put interfaces in slices, maps and channels
23:12:51FromGitter<krux02> Xe: concepts are new, complicated in design and are mainly for compile time polymorphism
23:12:55FromGitter<krux02> and you want to opposite
23:13:08Xeopposite?
23:13:19FromGitter<krux02> I mean run time polymorphism
23:13:30Xehow would i do runtime polymorphism then?
23:13:59FromGitter<krux02> and if I remember correctly there is some form of vtable for concepts
23:14:24FromGitter<krux02> I don't know it exactly at the moment, because I don't use it, but there is something that should aid you
23:14:45FromGitter<krux02> I don't use concepts
23:18:10FromGitter<krux02> Xe: a bit more respect please
23:18:21Xe?
23:18:43FromGitter<krux02> don't say something is dump when you have no idea how hard it might be to get it right
23:19:18Xei guess i misunderstood concepts as a more advanced version of Go interfaces
23:19:37FromGitter<krux02> no concepts have little to do with go interfaces
23:20:13FromGitter<krux02> they are mainly to resolve symbols at compile time
23:20:38FromGitter<krux02> but there is something like the go interfaces in nim
23:21:17FromGitter<krux02> https://nim-lang.org/docs/manual.html#generics-vtable-types
23:39:04*Nobabs27 joined #nim
23:48:28krux02Xe: are vtable-types what you are looking for?
23:48:41Xekrux02: i think so, but i am not sure how to use them
23:48:56krux02well I can't tell you
23:49:05krux02because I never used them
23:49:25krux02but if you are lucky maybe you will get some help here soon from people who actually used them
23:51:30krux02I guess when your concept is MyConcept then all you need to do is MyConcept.vtref
23:51:34krux02but I am not sure