00:28:19 | FromGitter | <zacharycarter> krux02: are you around by any chance? |
00:44:38 | FromGitter | <zacharycarter> nevermind, think I answered my own question |
01:18:00 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/CxJr/Screen-Shot-2017-07-10-at-9.16.58-PM.png) |
01:23:41 | FromGitter | <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:57 | shashlick | I 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:57 | Araq | shashlick: 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:54 | yunfan | hi, are there any module that could let me easily build a http api service easily? |
06:02:34 | Araq | asynchttpserver + json? |
06:07:29 | * | kunev quit (Ping timeout: 248 seconds) |
06:08:47 | * | kunev joined #nim |
06:13:30 | * | Vladar joined #nim |
06:15:23 | yunfan | ok 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:38 | euantor | yunfan: 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:49 | FromGitter | <andreaferretti> or rosencrantz https://github.com/andreaferretti/rosencrantz |
08:11:00 | * | pwntus joined #nim |
08:37:21 | surma | I’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:38 | surma | Also, 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:11 | FromGitter | <Varriount> surm |
08:44:05 | yunfan | euantor: thanks, for that, i am just curous of it |
08:46:19 | Araq | surma: don't use 'var NimNode' and you'll be fine |
08:46:21 | FromGitter | <Varriount> surma: The fact that you're both returning a value from the macro and modifying an parameter might be the cause. |
08:47:10 | surma | Araq: As a parameter or the local variable? or both? Just leave them as ``untyped``? |
08:47:23 | Araq | as 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:52 | surma | You 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:45 | FromGitter | <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:17 | couven92 | surma, 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:43 | couven92 | surma, like I do here: https://github.com/couven92/nim-windowssdk/blob/master/src/windowssdk/ansiwide.nim#L43 |
09:47:15 | couven92 | th 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:51 | surma | couven92: Thanks. But even then the backticks disappear :( |
11:24:58 | Araq | surma: nkAccQuoted produce the backticks |
11:25:10 | Araq | they are not part of the string/identifier |
11:25:31 | surma | Araq: 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:04 | Araq | surma: who says they are gone? |
11:27:28 | Araq | could be an AST renderer glitch |
11:27:48 | surma | ``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:28 | Araq | you have mainMemory=* |
11:28:34 | Araq | not 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:47 | surma | Oh, so the star _needs_ to go outside the backtick |
11:35:52 | surma | Araq: Lol that fixes it. |
11:35:58 | surma | Thanks so much everyone for your time :) |
11:37:56 | Araq | you'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:18 | shashlick | Araq: 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:25 | Araq | hmm to the pcre module? not sure |
14:03:00 | * | yglukhov joined #nim |
14:08:25 | shashlick | basically 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:04 | euantor | You can always post things to the Nim blog too by opening a PR here: https://github.com/nim-lang/website |
14:09:27 | euantor | It it's something useful/interesting, I'm sure it would be a good fit there |
14:10:40 | FromGitter | <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:08 | Araq | TiberiumN: Yes I know. the ui wrapper is full of additional linker commands. |
14:15:26 | Araq | but it's not clear if the default config should be concerned about it |
14:20:47 | federico3 | some tips on doing 1-complement sum (on uints)? |
14:33:05 | FromGitter | <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:36 | salewski | I have the feeling that nimble accepts no CUSTOM ADDITIONAL parameters? |
14:45:07 | subsetpark | salewski: you can put compiler parameters into `nim.cfg`, as well as use `nimble c` to perform arbitrary compilation operations |
14:45:10 | salewski | Something like: nimble install gintro --without:deprecated |
14:46:52 | salewski | subsetpark: can you give an example for nimble c use? |
14:47:35 | subsetpark | sure |
14:47:49 | subsetpark | in the ansible playbook for my application, i deploy in two steps: |
14:48:00 | subsetpark | 1. nimble install -d # install all dependencies |
14:48:53 | subsetpark | 2. nimble c --threads:on -d:release {{ project_name.nim }} # Compile the application itself with specific compiler flags |
14:49:57 | subsetpark | (in that case, it's because I don't want the behavior of `nimble install`, which intalls into the nimble binary directory) |
14:51:16 | salewski | OK, thanks. Maybe that even helps with my recent gintro package issues: https://forum.nim-lang.org/t/3031 |
14:51:52 | salewski | I will try that... |
14:57:42 | salewski | No, I think "nimble c" will also work only for local packages. |
14:58:14 | salewski | But generally the user will type only "nimble install gintro" |
14:58:59 | salewski | And for that, there seems to be no way to execute the before hook or to pass parameters. |
14:59:39 | salewski | So I have to ask the user to download the package by git clone, cd into package |
14:59:54 | salewski | directory and execute local nimble commands. |
15:01:02 | salewski | Maybe dom96 will have a better idea at some time. Bye. |
15:03:12 | * | salewski quit (Quit: WeeChat 1.4) |
15:04:02 | Araq | TiberiumN: 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:31 | Arrrr | Hmm, how can i tell if a generic argument is a proc? |
15:41:39 | * | Trustable joined #nim |
15:46:45 | Arrrr | Mmm 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:39 | koppeh | Mhh.. type mismatch, got array[0..8, float64], expected ref openArray[T] |
17:12:05 | koppeh | Am I misusing / misunderstanding ref, or is array not compatible with ref openArray, ..? |
17:12:24 | koppeh | Do I need to create a reference to my array? |
17:13:10 | koppeh | (I assume a non-reference openArray means copying..?) |
17:14:47 | flyx | well you cannot assign a non-ref type to a ref-type |
17:15:19 | FromGitter | <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:15 | koppeh | https://gist.github.com/copygirl/0a4ba312f717e6b51b6114b273492810 |
17:16:31 | skrylar | i suspect you could but what sense would that make |
17:16:36 | koppeh | I suppose it has to be var? |
17:16:42 | skrylar | openarrays can only be made by the compiler during function calls IIRC |
17:16:48 | skrylar | so its just a ref to a constant? |
17:16:57 | FromGitter | <Varriount> Don't use a 'ref' type for the openarray |
17:17:03 | * | couven92 quit (Quit: Client disconnecting) |
17:17:25 | koppeh | I guess I'll just go with a seq then. |
17:17:42 | FromGitter | <Varriount> koppeh: Make sure to use addr seq[0] in that case |
17:18:06 | koppeh | Right. |
17:18:44 | * | smt quit (Ping timeout: 260 seconds) |
17:19:04 | koppeh | Then.. how am I misunderstanding ref and non-ref? |
17:19:15 | koppeh | You can't get a reference to a const? |
17:19:30 | skrylar | not generally |
17:19:56 | skrylar | well, it's mostly that openarrays are sorta weird |
17:20:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:20:26 | skrylar | they 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:43 | skrylar | which is what [Turbo]Pascal does, and not what va_args (C) do |
17:31:18 | * | yglukhov joined #nim |
17:31:57 | Araq | koppeh: use 'var' instead of 'ref', Nim is not c# |
17:32:13 | koppeh | (I like C#.) |
17:32:21 | koppeh | But yeah I haven't wrapped my head around some things. |
17:33:02 | koppeh | ref is part of the type.. right? Is that my mistake? |
17:33:26 | * | yglukhov quit (Remote host closed the connection) |
17:34:13 | skrylar | koppeh yes, ref is part of the type |
17:34:41 | skrylar | "ref foo" is roughly analogous to "foo*" |
17:35:02 | koppeh | Mhh I think comparisons to c(++) won't help me understand. |
17:35:10 | skrylar | C# also has pointers, though. |
17:35:13 | skrylar | In unsafe code |
17:35:21 | koppeh | I still haven't quite understood the difference between & and * and such. |
17:35:37 | skrylar | var in the context of a parameter is like C#'s "inout" IIRC |
17:35:37 | koppeh | ref = class and non-ref = struct? |
17:36:42 | koppeh | Yeah, 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:44 | PMunch | I think I've found a bug with the deques module |
17:44:56 | PMunch | I was doing some macro stuff and I needed to parse the AST |
17:45:17 | PMunch | I add nodes I have to check further into a deque to use as a stack |
17:45:40 | subsetpark | koppeh: 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:14 | PMunch | So 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:52 | koppeh | subsetpark: I just derped up and misunderstood what "ref" means. |
17:47:36 | subsetpark | ok, 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:47 | subsetpark | cos i don't know C# |
17:49:10 | yglukhov | C# classes = ref objects. structs = objects. |
17:49:34 | yglukhov | dmo96: are you around? |
17:51:53 | * | pilne joined #nim |
17:53:00 | dom96 | yglukhov: yes |
17:53:55 | yglukhov | dom96: 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:03 | PMunch | Minimal example: http://ix.io/yrl, output: http://ix.io/yrm |
17:57:23 | yglukhov | dom96: and after that please see https://github.com/nim-lang/Nim/pull/6059 |
18:02:12 | PMunch | https://github.com/nim-lang/Nim/issues/6081 |
18:03:47 | skrylar | i 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:50 | skrylar | >.< |
18:13:31 | dom96 | yglukhov: Reviewed the first one |
18:13:31 | * | yglukhov quit (Remote host closed the connection) |
18:13:47 | * | yglukhov joined #nim |
18:16:56 | dom96 | And reviewed the second oen |
18:16:57 | dom96 | *one |
18:17:09 | dom96 | Araq: please take a look at https://github.com/nim-lang/Nim/pull/6059 |
18:18:04 | yglukhov | dom96: thanks, so mostly styling issues, as far as see |
18:18:24 | subsetpark | dom96: any chance for my nimble PR ?? :D |
18:18:45 | dom96 | yglukhov: yep, need to know what Araq thinks though. |
18:19:22 | Araq | oh yeah, I think that macro only detects explicit .gcsafe annotations, not inferred onces and as such, it's wrong |
18:19:55 | dom96 | subsetpark: sure :) |
18:20:05 | subsetpark | yay! |
18:20:10 | Araq | and now I need to find out who the hell the missing 5 Cylons are |
18:20:15 | dom96 | In fact, this makes me realise that GitHub is failing me. |
18:20:22 | dom96 | Too many notifications D: |
18:20:34 | Araq | if you know, don't spoiler it! |
18:20:38 | subsetpark | dom96: I find /pulls invaluable for this sort of thing |
18:21:17 | dom96 | ooh, cool. |
18:21:32 | dom96 | Araq: So are you happy with the changes? |
18:21:57 | Araq | no I said |
18:22:02 | Araq | oh yeah, I think that macro only detects explicit .gcsafe annotations, not inferred onces and as such, it's wrong |
18:22:34 | yglukhov | dom96: conversion works indeed. updated. |
18:22:41 | dom96 | I don't know if you're talking about the previous state of the macro or what the PR introduces. |
18:22:52 | Araq | what the PR introduces |
18:23:36 | dom96 | subsetpark: but see, /pulls doesn't show your Nimble PR :\ |
18:23:43 | yglukhov | Araq: explicit {.gcsafety.} detection doesn't change anything. it only improves the error message. but the errors will still be there. |
18:23:52 | subsetpark | ah, because i don't have permissions to assign it to you |
18:25:58 | yglukhov | Araq: overall the solution relies completely on nim's gcsafety inference. |
18:30:40 | dom96 | subsetpark: merged :) |
18:31:26 | subsetpark | yeah! |
18:33:58 | Araq | yglukhov: hmmm |
18:36:20 | PMunch | Hmm, I should write that test case for dumpAstGen.. |
18:36:57 | PMunch | This deque bug is weird by the way.. |
18:37:10 | yglukhov | Araq: i know, it's so genious it might not be immediately obvious ;) |
18:42:24 | * | eldiz joined #nim |
18:46:45 | krux02 | projects in Nim are a bit complicated in my opinion |
18:47:05 | Araq | krux02: in what way? |
18:47:25 | krux02 | In the way that it is not obvious on how they work |
18:47:31 | * | PMunch quit (Quit: leaving) |
18:48:09 | krux02 | The 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:36 | krux02 | for the most part I tried to get with "nim c -r" as far as possible |
18:48:46 | krux02 | because that is trivial |
18:49:01 | krux02 | and I want my project to be trivial |
18:49:31 | krux02 | trivial to use and trivial to understand the project structure |
18:50:32 | krux02 | wait I use wrong project structure |
18:52:19 | dom96 | what problems did you run into? |
18:52:22 | yglukhov | krux02: 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:57 | krux02 | well yes, but a project for applications as a main executable and it should be obvious to detect that |
18:57:05 | krux02 | and then there should be a standard way to run it |
18:57:15 | krux02 | for single file projects it is "nim c -r" |
18:57:30 | krux02 | but as soon as there are more files, what is the algorithm to detect the main? |
18:58:50 | krux02 | but 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:26 | yglukhov | just name you main file "main.nim" and call it a day? =) |
19:08:17 | * | yglukhov quit (Remote host closed the connection) |
19:08:26 | Araq | krux02: the trick is that every relative path is relative to the file it appears in |
19:08:51 | Araq | this 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:01 | krux02 | Araq: 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:25 | krux02 | It would be nice if it would be clear how to structure my project without thinking about it or configuring it |
19:13:20 | krux02 | I remember that in sbt (horribly complicated scala build tool with good defaults) the project structure was already given |
19:14:04 | krux02 | src file were in ./src/main/scala(/package) |
19:14:45 | krux02 | then there was ./src/test/scala for all test cases |
19:15:31 | krux02 | ./lib was for other jar files that were automatically on the classpath (java termilogy for you can access the library) |
19:15:52 | krux02 | that was a very simple config free workflow |
19:16:49 | krux02 | that gave the project some structure |
19:17:13 | krux02 | but anyway, that is just a feeling nothing more |
19:17:25 | krux02 | I just found a bug, not sure if it is reported |
19:17:40 | krux02 | import foo[bar,baz] # works nicely |
19:17:54 | krux02 | include foo[bar,baz] # does not |
19:20:24 | Araq | I think that wasn't implemented, I don't think thats a bug :P |
19:20:43 | Araq | nimble tells you some directory layout iirc |
19:20:44 | krux02 | well shouldn't include/import share the parsing code for that? |
19:21:28 | krux02 | well I just realized that I should have foobarpkg/ folder |
19:21:38 | krux02 | that is nice it is some guidance |
19:27:04 | krux02 | Araq: 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:03 | Araq | krux02: --debugger:native to your config |
19:32:23 | krux02 | Araq: I found this section in the documentation: https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files |
19:32:53 | krux02 | but it doesn't tell how a cfg file is structured |
19:38:36 | Araq | so read config/nim.cfg |
19:39:34 | Araq | or use a .nims file instead, that uses NimScript which is Nim |
19:41:34 | krux02 | --debugger:native |
19:41:45 | krux02 | that is the content of ~/.config/nim.cfg |
19:42:58 | * | Vladar quit (Quit: Leaving) |
19:48:16 | krux02 | Well I think the structure of cfg files could be documented a bit more |
19:48:47 | krux02 | I 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:07 | deech | Hi 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:39 | dom96 | deech: sadly this is not supported right now. |
20:36:54 | dom96 | You either use the package name, and then reinstall your package every time you make changes to it |
20:36:56 | FromGitter | <krux02> deech, well either you make one project a subproject, or you don't specify it as a local dependency |
20:37:07 | dom96 | or just specify the path to your Nimble package using the `--path` flag |
20:37:51 | dom96 | This is actually a fairly simple feature to implement in Nimble if anybody wants to take a crack at it. |
20:38:00 | dom96 | There is an issue for it in Nimble's bug tracker somewhere |
20:42:45 | deech | So if I had some local dependency `A` in `../nim-A` I could just add 'requires "A"' and do `nimble build --path=../A`? |
20:47:39 | Xe | can nim concepts be used like interfaces in Go? |
20:56:41 | dom96 | deech: not really, Nimble will look for 'A' in ~/.nimble. |
20:57:03 | dom96 | You can omit the "requires" to prevent that for now |
20:57:14 | dom96 | Xe: No, but they will offer similar functionality |
20:57:35 | Xe | dom96: how do you test for concept matching? |
20:58:09 | dom96 | `is` iirc |
21:00:39 | deech | dom96: Thanks! |
21:01:28 | * | ShalokShalom quit (Remote host closed the connection) |
21:06:19 | * | Matthias247 joined #nim |
21:06:22 | FromGitter | <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:59 | FromGitter | <krux02> it is debug, so yea I guessed it |
21:16:37 | * | nsf quit (Quit: WeeChat 1.7.1) |
21:16:59 | FromGitter | <krux02> is still someone here? |
21:17:19 | * | krux02 joined #nim |
21:18:16 | * | nsf joined #nim |
21:18:46 | krux02 | Araq: I currently want to write a function with a magic that returns an object |
21:19:03 | krux02 | how do I construct an object constructor from the compiler? |
21:19:09 | krux02 | can I do that? |
21:26:47 | * | arnetheduck quit (Remote host closed the connection) |
21:30:05 | Xe | dom96: 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:27 | FromGitter | <krux02> Xe: yes, a string |
21:46:44 | FromGitter | <krux02> a string is appendable |
21:47:18 | FromGitter | <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:17 | dom96 | ^ |
21:49:31 | Xe | s |
21:51:55 | Xe | i somehow managed to get a .nim file that when compiled doesn't result in a nimcache directory or a resultant binary |
21:52:19 | Xe | https://gist.github.com/Xe/d4b47176b24ce61dd2bcc50961ac9fa3 |
21:54:08 | Xe | weird |
21:54:16 | Xe | when i comment out the `log` function it makes a nimcache |
21:57:39 | Xe | oh |
21:57:43 | Xe | i forgot the equals |
21:57:45 | Xe | lol |
22:01:01 | * | yglukhov quit (Remote host closed the connection) |
22:01:33 | Xe | ugh |
22:01:39 | Xe | something seems fucked with concepts |
22:01:44 | Xe | and varargs combined |
22:07:58 | * | arnetheduck quit (Ping timeout: 260 seconds) |
22:10:10 | Xe | https://gist.github.com/Xe/d1627d002d109c358ae29fcc0a702050 |
22:11:09 | Xe | dom96: 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:41 | Xe | oh |
23:11:51 | Xe | you can't store concepts in sequences or varargs? |
23:11:52 | Xe | that's dumb |
23:12:16 | FromGitter | <krux02> Xe: well not really |
23:12:44 | Xe | go lets you put interfaces in slices, maps and channels |
23:12:51 | FromGitter | <krux02> Xe: concepts are new, complicated in design and are mainly for compile time polymorphism |
23:12:55 | FromGitter | <krux02> and you want to opposite |
23:13:08 | Xe | opposite? |
23:13:19 | FromGitter | <krux02> I mean run time polymorphism |
23:13:30 | Xe | how would i do runtime polymorphism then? |
23:13:59 | FromGitter | <krux02> and if I remember correctly there is some form of vtable for concepts |
23:14:24 | FromGitter | <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:45 | FromGitter | <krux02> I don't use concepts |
23:18:10 | FromGitter | <krux02> Xe: a bit more respect please |
23:18:21 | Xe | ? |
23:18:43 | FromGitter | <krux02> don't say something is dump when you have no idea how hard it might be to get it right |
23:19:18 | Xe | i guess i misunderstood concepts as a more advanced version of Go interfaces |
23:19:37 | FromGitter | <krux02> no concepts have little to do with go interfaces |
23:20:13 | FromGitter | <krux02> they are mainly to resolve symbols at compile time |
23:20:38 | FromGitter | <krux02> but there is something like the go interfaces in nim |
23:21:17 | FromGitter | <krux02> https://nim-lang.org/docs/manual.html#generics-vtable-types |
23:39:04 | * | Nobabs27 joined #nim |
23:48:28 | krux02 | Xe: are vtable-types what you are looking for? |
23:48:41 | Xe | krux02: i think so, but i am not sure how to use them |
23:48:56 | krux02 | well I can't tell you |
23:49:05 | krux02 | because I never used them |
23:49:25 | krux02 | but if you are lucky maybe you will get some help here soon from people who actually used them |
23:51:30 | krux02 | I guess when your concept is MyConcept then all you need to do is MyConcept.vtref |
23:51:34 | krux02 | but I am not sure |