00:08:45 | * | Electrux joined #nim |
00:13:34 | * | Electrux quit (Ping timeout: 264 seconds) |
00:22:29 | * | smt quit (Ping timeout: 268 seconds) |
00:25:24 | * | xkapastel joined #nim |
00:28:42 | FromGitter | <honewatson> @metasyn also if you like vim you could try spacemacs with nim layer and autocomplete layer which has good support with nim suggest |
00:40:45 | * | Electrux joined #nim |
00:44:57 | * | Electrux quit (Ping timeout: 240 seconds) |
00:45:58 | * | find0x90 joined #nim |
00:51:17 | * | yglukhov[i] joined #nim |
00:55:41 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
01:09:44 | * | Electrux joined #nim |
01:14:27 | * | Electrux quit (Ping timeout: 265 seconds) |
01:16:54 | * | smt joined #nim |
01:23:07 | FromGitter | <ephja> it takes quite some time to bootstrap now |
01:25:29 | * | find0x90_ joined #nim |
01:27:35 | FromGitter | <ephja> 35*4 seconds |
01:27:59 | * | find0x90 quit (Ping timeout: 256 seconds) |
01:55:27 | FromGitter | <ephja> 4, 3, w/e |
01:56:16 | * | Electrux joined #nim |
01:59:01 | * | find0x90_ quit (Quit: find0x90_) |
02:00:57 | * | Electrux quit (Ping timeout: 264 seconds) |
02:04:16 | FromGitter | <ephja> life is tough |
02:15:23 | * | Electrux joined #nim |
02:19:18 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b232225202c8f71f5030605] |
02:19:32 | FromGitter | <gogolxdong> How to make this right? |
02:19:35 | * | Electrux quit (Ping timeout: 240 seconds) |
02:23:30 | FromGitter | <gogolxdong> hints cannot add to node kind: nkEmpty when it's plain provider concatenating. but it's a string ,right? |
02:24:08 | FromGitter | <gogolxdong> or provider & "DescribeInstanceCallback" hints NimNode & string |
02:26:27 | * | Electrux joined #nim |
02:30:57 | * | Electrux quit (Ping timeout: 240 seconds) |
02:43:59 | FromGitter | <gogolxdong> hints ``` |
02:44:05 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2327f5c277fb705dcf8099] |
02:46:22 | * | Electrux joined #nim |
02:51:06 | * | Electrux quit (Ping timeout: 268 seconds) |
02:51:28 | * | craigger quit (Quit: bye) |
02:51:38 | * | craigger joined #nim |
02:51:52 | * | Electrux joined #nim |
03:18:15 | * | Jesin quit (Quit: Leaving) |
03:29:23 | FromGitter | <gogolxdong> echo repr result ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b23329282b1b355c9596899] |
03:30:33 | FromGitter | <gogolxdong> manually written newProc results the same with getAst of template. says proc has no type. |
03:31:38 | FromGitter | <gogolxdong> What am I missing? |
03:35:18 | * | yglukhov[i] joined #nim |
03:39:56 | * | yglukhov[i] quit (Ping timeout: 265 seconds) |
03:49:05 | * | Electrux quit (Ping timeout: 240 seconds) |
03:54:39 | * | random_auroras joined #nim |
03:54:53 | random_auroras | Is the two-items tuple iterator a special case or does it generalize for any number of items? |
03:54:57 | random_auroras | https://nim-by-example.github.io/for_iterators/ |
03:57:05 | * | Electrux joined #nim |
03:58:17 | * | endragor joined #nim |
04:07:17 | * | rockcavera quit (Remote host closed the connection) |
04:11:44 | FromGitter | <kaushalmodi> pairs is a fixed case that returns a 2-value thing.. a tuple with 2 items |
04:11:51 | FromGitter | <kaushalmodi> the item types could be anything though |
04:13:10 | random_auroras | FromGitter: Thanks |
04:13:10 | FromGitter | random_auroras, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
04:13:41 | FromGitter | <kaushalmodi> You're welcome. If you search for "pairs" here: https://nim-lang.org/docs/lib.html. You will find many examples. |
04:15:57 | * | random_auroras left #nim ("thanks for the help") |
04:48:39 | * | yglukhov[i] joined #nim |
04:52:45 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
04:56:40 | FromGitter | <Varriount> I wonder if a macro could generalize for any number of items. |
05:09:21 | * | jxy joined #nim |
05:17:52 | * | miran joined #nim |
05:23:09 | * | smt quit (Remote host closed the connection) |
05:28:59 | * | xkapastel quit (Quit: Connection closed for inactivity) |
05:39:43 | * | nsf joined #nim |
05:45:47 | Araq | varriount: a for loop macro? |
05:48:01 | * | Electrux quit (Quit: WeeChat 2.1) |
05:48:19 | * | Electrux joined #nim |
06:01:04 | * | jjido joined #nim |
06:16:19 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:18:21 | * | miran quit (Ping timeout: 264 seconds) |
06:23:37 | * | tribly quit (Quit: WeeChat 2.1) |
06:24:14 | * | xet7 joined #nim |
06:39:24 | * | rockcavera joined #nim |
06:44:43 | FromGitter | <Varriount> Araq: Yes, but I was pondering more on how such a macro would rewrite the body. |
06:46:18 | * | jjido joined #nim |
06:54:42 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:56:00 | * | thomasross quit (Read error: Connection reset by peer) |
06:56:12 | * | thomasross joined #nim |
07:06:18 | * | yglukhov[i] joined #nim |
07:12:05 | * | Cthalupa quit (Ping timeout: 260 seconds) |
07:13:30 | * | Cthalupa joined #nim |
07:14:27 | * | rockcavera quit (Killed (verne.freenode.net (Nickname regained by services))) |
07:17:51 | * | xet7 quit (Remote host closed the connection) |
07:19:36 | * | xet7 joined #nim |
07:27:11 | * | NimBot joined #nim |
08:11:28 | FromGitter | <mratsim> here you go: https://github.com/numforge/loop-fusion |
08:11:51 | FromGitter | <mratsim> It can probably be transformed into a for loop macro |
08:12:12 | FromGitter | <mratsim> right now it creates a custom zip on the fly. |
08:12:39 | FromGitter | <mratsim> (pun unintended) |
08:13:40 | FromGitter | <mratsim> A generic for loop on variadic number of items should be a good addition to sugar.nim |
08:14:23 | * | rokups joined #nim |
08:21:25 | FromGitter | <rokups> how do i confirm email for old forum account? |
08:25:15 | FromGitter | <mratsim> ping @dom96 with your account if you’re stuck |
08:26:27 | FromGitter | <rokups> ah made new account. no problem :) |
08:59:13 | * | tribly joined #nim |
09:12:25 | * | krux02 joined #nim |
09:14:31 | FromGitter | <gogolxdong> my macro errors at runtime |
09:14:53 | FromGitter | <gogolxdong> ```code paste, see link``` |
09:15:19 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b2383a78864a936cc8a3655] |
09:16:46 | FromGitter | <mratsim> result should be untyped no? |
09:17:33 | FromGitter | <mratsim> rule of thumbs: macro —> untyped results. proc —> NimNode results. |
09:19:09 | * | xet7 quit (Quit: Leaving) |
09:19:41 | FromGitter | <gogolxdong> Sharp |
09:21:08 | * | xet7 joined #nim |
09:26:58 | Yardanico | @mratsim you have a typo "communauty" twice in your changelog - https://github.com/mratsim/Arraymancer/blob/master/changelog.md |
09:27:37 | FromGitter | <mratsim> haha, thanks, I even have def instead of proc somehow in a .rst xD |
09:49:35 | * | brainproxy quit (Ping timeout: 260 seconds) |
09:54:06 | * | elrood joined #nim |
09:57:42 | * | dddddd joined #nim |
10:18:42 | * | Vladar joined #nim |
10:26:44 | * | rokups quit (Quit: Connection closed for inactivity) |
10:28:32 | FromGitter | <codenoid> helo |
10:28:42 | PMunch | Hi |
10:28:44 | FromGitter | <codenoid> nim not installed on my laptop |
10:28:52 | FromGitter | <codenoid> idk |
10:31:54 | FromGitter | <codenoid> https://i.amz.mshcdn.com/Z4RoLEzGGaYG3COtPATqwQkHGl8=/950x534/filters:quality(90)/https%3A%2F%2Fblueprint-api-production.s3.amazonaws.com%2Fuploads%2Fcard%2Fimage%2F469418%2Fe5582afd-4887-478d-8043-0071299682c3.jpg |
10:32:22 | PMunch | What? |
10:33:19 | PMunch | whois codenoid |
10:33:24 | PMunch | Woops :P |
10:33:42 | FromGitter | <kaushalmodi> @mratsim The loop fusion library looks really cool! Thanks for sharing. |
10:33:45 | PMunch | And they're here through Gitter, so that wouldn't have worked anyways :P |
10:34:59 | FromGitter | <codenoid> i have hard time when trying to instsall nim without apt-get install or just `make` |
10:36:22 | PMunch | codenoid, OS? |
10:36:32 | FromGitter | <codenoid> it's has been 32hours :" , |
10:36:35 | FromGitter | <codenoid> Ubuntu 16.04.04 |
10:37:21 | PMunch | Have you tried choosenim? |
10:39:32 | FromGitter | <codenoid> yes i choose nim |
10:42:30 | PMunch | No the program "choosenim" |
10:43:24 | PMunch | Run this command: "curl https://nim-lang.org/choosenim/init.sh -sSf | sh" |
10:43:51 | * | brainproxy joined #nim |
10:49:21 | FromGitter | <codenoid> i'm little bit confused when chosenim ask me a question "Can choosenim record and send anonymised telemetry data? [y/n]", at least nim has been installed on my machine |
10:53:56 | PMunch | Yeah I'm not sure what telemetry data that is, maybe dom96 can shed some light on it |
10:54:10 | PMunch | But I'm guessing it's only which Nim version you currently have selected |
10:54:26 | PMunch | But nice that managed to install it |
10:54:49 | PMunch | If you want to change to a different version (or update Nim when a new version drops) you can do that through the choosenim tool |
10:55:04 | PMunch | Just have a look at "choosenim --help" to see how it works |
10:55:18 | dom96 | codenoid: read the message below that |
10:55:23 | dom96 | It's a link to more information |
10:56:08 | FromGitter | <codenoid> https://goo.gl/NzUEPf |
10:56:14 | FromGitter | <codenoid> whooott |
10:56:48 | FromGitter | <codenoid> really, I am shocked |
10:56:54 | FromGitter | <codenoid> gitter show your picture |
10:57:06 | FromGitter | <codenoid> out of my expectation |
10:57:15 | dom96 | what? |
10:59:08 | dom96 | If you have a problem with it then answer "n" |
11:00:22 | FromGitter | <7sDream> @codenoid ⏎ hello Rikka, I'm Yuuta :P |
11:01:06 | FromGitter | <codenoid> show your eye :p |
11:03:04 | FromGitter | <7sDream> https://i.loli.net/2018/06/15/5b239cdb98fd7.jpg |
11:10:18 | elrood | to make it look less shady, you could just state clearly and transparently which kind of date is collected and what for. just a notion of telemetry and a link doesn't leave a good impression |
11:10:27 | elrood | *data |
11:13:19 | dom96 | It's already a long message |
11:13:24 | dom96 | and it seems people don't even read all of it |
11:13:56 | elrood | even more reason to drop unnecessary data collection |
11:13:57 | dom96 | Also, this is how homebrew's telemetry is presented |
11:14:17 | dom96 | Except that it's opt-oit |
11:14:19 | dom96 | *out |
11:14:42 | dom96 | If you don't like the telemetry then it's trivial to answer "no" |
11:14:48 | dom96 | I don't see an issue |
11:15:51 | FromGitter | <mratsim> put a link to the source code :p |
11:16:25 | dom96 | https://github.com/dom96/choosenim/blob/master/analytics.md#where-is-the-code |
11:17:06 | PMunch | elrood, it's not unnecessary though.. It let's us know what versions of Nim are used, and what systems people use Nim on.. |
11:19:11 | elrood | doesn't make it necessary. and quite apparently it has a strange flavour for other people as well |
11:20:35 | * | noonien joined #nim |
11:22:03 | dom96 | It's necessary to learn what exceptions people are getting |
11:22:33 | dom96 | Many people won't bother to report such errors if they are just starting out with Nim |
11:22:36 | dom96 | They'll just give up |
11:22:49 | PMunch | Well it's not necessary, which is why you can opt out.. |
11:24:52 | elrood | you're mixing up necessary and valuable or convenient there |
11:25:37 | PMunch | Yeah as I said, it's not necessary |
11:25:43 | * | nsf quit (Quit: WeeChat 2.1) |
11:26:54 | elrood | it might not be an issue for you, but many people care, and the impression that your developer tools collect data about you isn't something i'd be comfortable with. lower the barriers to adoption for nim, don't raise them |
11:28:14 | PMunch | Pfft, most people use an IDE that probably reports stuff to their creators without asking.. |
11:28:28 | PMunch | And as we said, you can just opt out.. |
11:29:06 | Araq | elrood: iirc choosenim does ask. what else would there be to do? |
11:29:43 | FromGitter | <kayabaNerve> What Nim IDEs exist BESIDES Aporia? |
11:30:16 | FromGitter | <kayabaNerve> I've been using Atom, which is my default editor, with a Nim package but I'm debating bumping it up\ |
11:30:31 | elrood | well, you could for example not convey the impression that data collection is something your tools' developers want to do in the first place |
11:31:05 | FromGitter | <kayabaNerve> I do need something that allows me to set custom include directories and then factors that into syntax highlighting versus just yelling variable X doesn't exist... That's my current issue with Atom. |
11:31:12 | elrood | you can also just shrug it off, of course. many of you have grown up with facebook, google and an increasing number of everybody elses collecting your data as if it was the most normal thing in the world. but people increasingly care about princliples of data economy and the sort |
11:32:00 | elrood | ← can't type. meh |
11:32:31 | FromGitter | <kayabaNerve> elrood: Get a Nim based neural net to predict what you would type and type it for you. |
11:33:31 | FromGitter | <narimiran> @kayabaNerve you could try vscode - it is "atom as it should have been" |
11:34:05 | elrood | alexa/google/siri, type anotherrant for me on irc.. oh, wait.. ;P |
11:34:38 | Araq | elrood: ok, so nothing but removing this code would make you happy, got it. |
11:35:03 | FromGitter | <narimiran> btw, vscode has telemetry enabled by default! ;) |
11:35:09 | Araq | I'm not mocking you, just wanted a clear answer and I got it, thanks. |
11:35:24 | Araq | it's a respectable position to take. |
11:35:55 | elrood | Araq, nah, besides the point, i'm perfectly happy not using choosenim at all, just drawing attention to something that probably will further decrease the number of potential nim users |
11:36:39 | FromGitter | <narimiran> elrood: but there is an option (in plain sight) where you can easily opt-out? |
11:36:50 | FromGitter | <alehander42> so if it would be an opt-in ? |
11:36:54 | FromGitter | <alehander42> wouldn't that be fine? |
11:38:36 | FromGitter | <kayabaNerve> @narimiran I consider it the devil and does it even support Nim? |
11:38:43 | elrood | i think i've clearly stated what i see as problematic about it, and it's not actually something i personally have an issue with. in the interest of other people feeling comfortable using nim's tools i'd just not collect telemetry data at all, and be done with it |
11:38:56 | FromGitter | <kayabaNerve> And I know Visual Studio != VS Code. I've tried and hate both |
11:39:31 | FromGitter | <narimiran> @kayabaNerve yeah, there is a nim extension, it's doing its job quite alright. i rate it 5/7. |
11:39:37 | FromGitter | <kayabaNerve> Opt-in anonymous data is helpful. I enable it for small projects I trust the team behind and like. I don't do it for commercial corporations or VLC though |
11:40:17 | FromGitter | <kayabaNerve> @narimiran Can I set custom compiler flags/include directories, and will the syntax highlighting fail if I do: ⏎ import customModuleOnlyFoundInCompilerIncludeFlag ⏎ ⏎ discard customModule.myVar [https://gitter.im/nim-lang/Nim?at=5b23a5a16b24803e845aa6df] |
11:40:27 | FromGitter | <kayabaNerve> Thanks for the answer btw |
11:40:59 | FromGitter | <narimiran> @kayabaNerve regarding the devil part and hating VS and vscode - this would probably become big offtopic discussion so i won't go there |
11:41:18 | FromGitter | <kaushalmodi> Hello folks, is there an example flow in place that generates binaries for a Nim project in all the different platforms? |
11:41:26 | * | brainproxy quit (Ping timeout: 268 seconds) |
11:41:30 | dom96 | I like to think choosenim's telemetry is a nice compromise |
11:41:32 | FromGitter | <kayabaNerve> @kaushalmodi You need cross compilers |
11:41:46 | FromGitter | <narimiran> @kayabaNerve regarding the thing you want - i have no idea. it would be best to try it yourself (if only it isn't devil :P) |
11:41:48 | dom96 | It forces you to make a choice, it doesn't automatically opt you in, and it doesn't automatically opt you out |
11:42:11 | FromGitter | <kayabaNerve> I like that and would opt-in |
11:42:22 | FromGitter | <kaushalmodi> @kayabaNerve Any pointers? |
11:42:46 | FromGitter | <kaushalmodi> I'd like to publish binaries like Go projects do: https://github.com/gohugoio/hugo/releases |
11:44:25 | FromGitter | <kayabaNerve> Learn NimScript, Nake, or Make. That's in order of modern preference. No idea if NimScript is enough though. ⏎ ⏎ Get cross compilers. You'll likely want a Linux OS. Get Windows x64 GCC, x32, same for Mac, same for Linux. You can likely find builds for all, for a 64 bit Linux host, in a package repo. ⏎ ⏎ Start using the --cpu and --platform compiler flags. [https://git |
11:44:25 | FromGitter | ... ter.im/nim-lang/Nim?at=5b23a699ebf21755ca341562] |
11:44:33 | FromGitter | <kayabaNerve> Learn how to use when |
11:45:07 | FromGitter | <kayabaNerve> *--cpu and --os |
11:45:19 | FromGitter | <kayabaNerve> *x86 not x32 |
11:46:45 | FromGitter | <kaushalmodi> I have access to only a GNU/Linux system. I have never used cross compilers, but would this be correct: It allows me to generate bianries for other OSes from my OS. |
11:47:14 | FromGitter | <kaushalmodi> Also, is there a Nim project I can learn from? |
11:50:02 | FromGitter | <mratsim> nimx maybe? it targets all + android |
11:50:26 | FromGitter | <kaushalmodi> Found this: https://forum.nim-lang.org/t/3487#21805 |
11:50:40 | FromGitter | <mratsim> but start by reading this: https://nim-lang.org/docs/nimc.html#cross-compilation |
11:50:56 | FromGitter | <kaushalmodi> I also need to look into compiling to "statically linked musl" |
11:51:00 | FromGitter | <mratsim> If you only want to support desktop (Linux, Windows, Mac) just use a proper CI. |
11:52:03 | FromGitter | <mratsim> Here is Travis to test on Mac and Linux: https://github.com/mratsim/Arraymancer/blob/master/.travis.yml |
11:52:08 | FromGitter | <kaushalmodi> Rust binaries get compiled to musl target, and they just work everywhere |
11:52:20 | FromGitter | <mratsim> and appveyor for windows: https://github.com/mratsim/Arraymancer/blob/master/.appveyor.yml |
11:52:44 | FromGitter | <mratsim> you can ask the CI, to build artifacts and publish them automatically as well |
11:52:57 | Araq | yeah probably you need musl |
11:53:33 | FromGitter | <kaushalmodi> @kayabaNerve @mratsim many thanks for all those pointers! |
11:54:21 | FromGitter | <kaushalmodi> Dumb question... Is "musl" a statically linking compiler you install from somewhere? |
11:54:50 | Araq | it's an alternative libc implementation that links statically |
11:55:11 | Araq | it's only required because we haven't got rid of libc (yet!) |
11:56:10 | FromGitter | <kaushalmodi> And libc is the same glibc that causes choosenim installation issues? |
11:56:38 | FromGitter | <kayabaNerve> Libc is provided by glibc |
11:56:44 | FromGitter | <kayabaNerve> libc isn't only by glibc |
11:57:08 | FromGitter | <kaushalmodi> Hmm, TIL.. TIL many things! |
11:57:38 | FromGitter | <kaushalmodi> What if choosenim is compiled using musl? |
12:01:33 | Araq | what if it isn't? |
12:01:50 | Araq | what's the topic/problem? |
12:02:22 | FromGitter | <kaushalmodi> It doesn't work on my machine as the glibc on RHEL 6.6 is too old |
12:03:50 | FromGitter | <kaushalmodi> I have gone down the rabbit hole to update glibc, installing GNU bison, GNU ld.. still unsuccessful in updating glibc |
12:04:15 | FromGitter | <mratsim> Which version is it? |
12:04:22 | FromGitter | <mratsim> Nim compiles fine with GCC 4.9 |
12:04:44 | FromGitter | <mratsim> ah glib, mmm |
12:04:55 | dom96 | It's "just" a case of compiling choosenim on an older Linux |
12:05:41 | FromGitter | <kaushalmodi> Ref: https://github.com/dom96/choosenim/issues/15 |
12:06:57 | dom96 | I guess it's even older than Ubuntu Trusty :) |
12:07:05 | FromGitter | <kaushalmodi> dom96: If it's compiled to a static binary, shouldn't that permanently resolve the issue? |
12:08:41 | dom96 | AFAIK it's not a good idea to statically link glibc |
12:09:15 | dom96 | https://news.ycombinator.com/item?id=9317192 |
12:12:20 | * | xet7 quit (Ping timeout: 276 seconds) |
12:13:35 | FromGitter | <kaushalmodi> dom96: Thanks. I'm am just trying to figure out the best way to generate the binaries for a little utility I am working on (noxhugo). I'd like to use Go binary releases as an example as they "just work".. and trying to figure out how to do that in Nim. |
12:14:14 | FromGitter | <kaushalmodi> And then as a side discussion, glibc dependency issues for dynamically linked binaries and choosenim came up. |
12:14:46 | dom96 | I was thinking of using this: https://github.com/wheybags/glibc_version_header |
12:15:29 | FromGitter | <kaushalmodi> In the end, I just want to have statically linked binaries for that utility of mine so that I don't have to support such dependencies issues (which I would be incapable of resolving). That's all :) |
12:16:11 | FromGitter | <kaushalmodi> So thinking along those lines, I thought if choosenim can be Go-like "just works" static binary too.. |
12:16:45 | dom96 | I guess you can also statically link against musl |
12:16:50 | dom96 | but who knows if that works with Nim :) |
12:18:43 | * | krux02 quit (Remote host closed the connection) |
12:24:28 | * | xet7 joined #nim |
12:32:10 | Demos[m] | don't static link glibc, it's usually not what you want |
12:33:32 | Demos[m] | instead pick the oldest systems you'd like to support (for example RHEL 5, and build/link against it's version of gcc) |
12:34:10 | Demos[m] | although, you can also just compile your program and see if it imports symbols from a version of gcc that's too new |
12:35:35 | elrood | more often than not that's more of a hassle than statically linking though. you just have to know what you're doing and not dynamically load any other libraries, and you should be fine |
12:36:48 | Demos[m] | right, point is static linking against glibc on linux is like trying to static link against kernel32.dll on windows |
12:36:50 | Demos[m] | don't do it |
12:40:08 | * | TheLemonMan joined #nim |
12:42:33 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
12:44:44 | TheLemonMan | Araq, I'd say that if two non-instantiated generic types are equal the relation between them is isEqual |
12:47:39 | * | NimBot joined #nim |
12:55:06 | FromGitter | <kaushalmodi> giving up on local glibc update: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Cloning and building nim locally is way easier than upgrading glibc to make choosenim work. [https://gitter.im/nim-lang/Nim?at=5b23b72ae87f0c7bee8e061a] |
13:08:15 | Araq | TheLemonMan: yeah and I would agree but some logic relies on isGeneric to mean "and now instantiate it" |
13:13:40 | TheLemonMan | oh, I see, I'll change it then |
13:14:48 | * | brainproxy joined #nim |
13:15:29 | * | endragor quit (Remote host closed the connection) |
13:15:34 | TheLemonMan | is `==` ok as comparison operator there? |
13:16:18 | * | CodeVance joined #nim |
13:16:25 | * | CodeVance quit (Client Quit) |
13:17:24 | Araq | probably not but I need to investigate the real cause of this bug |
13:25:48 | * | cspar joined #nim |
13:36:07 | * | cryptocat1094 joined #nim |
13:51:45 | * | Vladar quit (Quit: Leaving) |
13:57:45 | * | Vladar joined #nim |
14:03:10 | * | brainproxy quit (Ping timeout: 245 seconds) |
14:17:28 | * | floppydh quit (Quit: WeeChat 2.1) |
14:19:47 | * | miran joined #nim |
14:22:52 | FromGitter | <kaushalmodi> The test in terminal.nim looks wrong.. can someone confirm? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b23cbbc1c7d4214379b47a3] |
14:23:06 | FromGitter | <kaushalmodi> the "ordinary text" and "styled text" are swapped |
14:23:28 | FromGitter | <kaushalmodi> Just confirming that what I see is not due to an anomaly of my terminal. |
14:23:31 | FromGitter | <kaushalmodi> xterm |
14:28:10 | * | PMunch quit (Quit: Leaving) |
14:29:23 | FromGitter | <SolitudeSF> for me styled text is not bright nor underscored |
14:29:45 | * | riidom joined #nim |
14:30:51 | * | brainproxy joined #nim |
14:32:07 | FromGitter | <kaushalmodi> the underscore, blink depends on your termcaps |
14:32:30 | FromGitter | <kaushalmodi> but I see "styled text" as ordinary and "ordinary text" in blue with cyan bg |
14:32:56 | FromGitter | <ephja> good old palettes |
14:33:29 | shashlick | kaushalmodi: I believe the setBackground/Foreground calls impact the following write calls, not preceding |
14:34:21 | * | FromGitter quit (Remote host closed the connection) |
14:34:45 | shashlick | looks like FromGitter is out to lunch |
14:35:17 | * | krux02 joined #nim |
14:35:32 | krux02 | how do I disable the warnings about spacing? |
14:35:48 | krux02 | they are pretty annoying and I am not going to change my spacing because of it |
14:35:53 | * | FromGitter joined #nim |
14:36:55 | FromGitter | <genotrance> @kaushalmodi: I believe the setBackground/Foreground calls impact the following write calls, not preceding |
14:39:30 | FromGitter | <kaushalmodi> (https://files.gitter.im/nim-lang/Nim/W74G/image.png) |
14:39:50 | FromGitter | <kaushalmodi> (https://files.gitter.im/nim-lang/Nim/QN67/image.png) |
14:41:26 | FromGitter | <kaushalmodi> Either there's a bug somewhere or the commands are used incorrectly in that test. the `styledEcho` macro behaves as expected.. but the ones before that, the lower level procs are acting strange. |
14:43:29 | Araq | krux02: but you should. |
14:54:47 | * | shashlick quit (Remote host closed the connection) |
14:55:04 | * | shashlick joined #nim |
14:56:00 | * | Trustable joined #nim |
15:08:53 | * | jdhorwitz joined #nim |
15:09:14 | * | jdhorwitz quit (Client Quit) |
15:19:15 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
15:32:35 | * | xet7 quit (Remote host closed the connection) |
15:34:19 | * | xet7 joined #nim |
15:39:15 | * | rockcavera joined #nim |
15:42:54 | * | xkapastel joined #nim |
15:46:24 | krux02 | Araq: this produces lots of warnings, and I don't want to change that code: http://ix.io/1dsG |
15:46:40 | krux02 | I have a lot of code layouted like that |
15:47:50 | dom96 | Nim's threadpool is M:N multi-threading, right? |
15:48:23 | krux02 | waht is M colon N multi threading? |
15:48:54 | dom96 | https://news.ycombinator.com/item?id=17320506 |
15:49:11 | dom96 | Here is the WP definition: https://en.wikipedia.org/wiki/Thread_(computing)#M:N_(hybrid_threading) |
15:49:47 | * | cspar quit (Ping timeout: 245 seconds) |
15:50:14 | FromGitter | <kaushalmodi> I can use a macro expert's help in this PR: https://github.com/nim-lang/Nim/pull/8047 :) |
15:52:06 | dom96 | Oh well, I replied that anyway and I'm going to edit the spreadsheet and hope I'm right :) |
15:53:06 | Yardanico | but does nim have lightweight threads? |
15:53:38 | Yardanico | threadpool is a different thing, no? |
15:53:45 | Yardanico | lightweight threads are something like coroutines in Go |
15:55:46 | dom96 | Yeah, but you could spawn async procedures ;) |
15:56:03 | dom96 | It really depends what they mean by lightweight threads |
15:56:58 | * | xet7 quit (Remote host closed the connection) |
15:57:13 | krux02 | kaushalmodi: I would make the macro args to varargs[untyped] |
15:57:20 | * | xet7 joined #nim |
15:57:24 | krux02 | not because it is necessary, but because you can |
15:58:36 | * | xet7 quit (Remote host closed the connection) |
15:58:47 | krux02 | untyped ast is simpler to work with (fewer ast variations) and you don't make the user that that you do some logic based on getType{Inst,Impl} |
15:58:58 | * | xet7 joined #nim |
15:59:28 | krux02 | I would even try to implement it without a macro |
15:59:35 | krux02 | just with a template, I think that is possible |
15:59:59 | krux02 | template code is easier to read and maintain than macro code. |
16:01:04 | FromGitter | <kaushalmodi> I tried making that change, but that introduced a functional bug |
16:04:52 | FromGitter | <kaushalmodi> (https://files.gitter.im/nim-lang/Nim/hYIh/image.png) |
16:04:55 | miran | krux02: re code snippet @17:46 - this shouldn't produce warnings, agreed |
16:05:29 | miran | warnings should be for mixing spaces and no-spaces. not for spaces and multi-spaces |
16:05:37 | FromGitter | <kaushalmodi> see above.. part above the yellow line has that deprecated callsite code |
16:05:41 | * | cspar joined #nim |
16:05:49 | Araq | krux02, that code is wrong and nimpretty will rewrite it. |
16:06:08 | FromGitter | <kaushalmodi> below the yellow line is with varargs[typed] -> varargs[untyped] and removed callsite() lines |
16:06:26 | FromGitter | <kaushalmodi> the code runs, no errors, but is functionally incorrect |
16:07:11 | FromGitter | <kaushalmodi> If there is no opposition from anyone I can attempt rewriting styledWriteLine, styledEcho and the new styledWrite using templates. |
16:09:06 | FromGitter | <kaushalmodi> *Can the IRC folks see the image I pasted above?* |
16:09:41 | miran | @kaushajmodi: we can click on the link and see it in browser |
16:10:21 | FromGitter | <kaushalmodi> OK cool, just checking. Thanks! |
16:10:27 | * | nsf joined #nim |
16:18:36 | * | rokups joined #nim |
16:23:09 | FromGitter | <rokups> ```code paste, see link``` ⏎ ⏎ results in `Error: type mismatch: got <string> but expected 'ustring = distinct string'`. any idea why defined `[]` operator would interfere with proc `[]`(s: string, i: int)`? [https://gitter.im/nim-lang/Nim?at=5b23e7ed8864a936cc8b46e4] |
16:36:06 | FromGitter | <Vindaar> @kaushalmodi see here: https://github.com/nim-lang/Nim/pull/8047#issuecomment-397676285 |
16:36:31 | FromGitter | <Vindaar> Tested it on a couple of cases and it seems to work for me |
16:36:35 | FromGitter | <Yardanico> @rokups it doesn't do that on devel, but you have an error in your proc - "foo" is of type string |
16:36:53 | FromGitter | <Yardanico> maybe the compiler is not smart enough to detect that you want "foo" to be of type "ustring" |
16:37:27 | FromGitter | <Yardanico> ```proc `[]`*(s: ustring, i: int): ustring = ustring"foo"``` |
16:37:34 | FromGitter | <Yardanico> or ustring("foo") |
16:43:02 | FromGitter | <rokups> odd. it happens on devel. and it used to work in the past |
16:43:11 | FromGitter | <ephja> I think he wanted to call [] defined in system |
16:43:29 | FromGitter | <ephja> @rokups the error is on line 2 though and doesn't involve line 3 |
16:43:47 | FromGitter | <rokups> its on line 3 |
16:44:14 | FromGitter | <rokups> wait damn, i messed up test |
16:45:22 | Yardanico | you have an error in your proc body |
16:45:26 | Yardanico | it doesn't affect line 3 at all |
16:46:17 | * | xet7 quit (Remote host closed the connection) |
16:47:45 | * | xet7 joined #nim |
16:48:12 | FromGitter | <rokups> well sucks. i cant make a minimal testcase that would be convenient for anyone to look at :| |
16:51:45 | * | Vladar quit (Quit: Leaving) |
16:57:00 | FromGitter | <kaushalmodi> @Vindaar Thanks! While the PR doesn't need that macro anymore, your comment is helpful. Why do you have `result[^1].add(arg)` instead of `result.add(arg)`. I was just following the example of `styledEcho`. |
16:58:53 | * | miran quit (Ping timeout: 276 seconds) |
17:02:57 | * | fvs joined #nim |
17:12:12 | * | smt joined #nim |
17:13:52 | FromGitter | <Vindaar> @kaushalmodi the reason is that if you simply use `result.add(arg)`, you will add `arg` as a new node to the statement list, i.e. resulting in the following code (excluding the newline part): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b23f3d0d128fa71f66cf442] |
17:15:31 | Yardanico | @kaushalmodi you can see what code you've generated in your macro |
17:18:30 | FromGitter | <kaushalmodi> I really need to starting learning about macros. I don't yet know how to read that tree and what Call, Curly, etc. mean. I am saving this reference to my notes for future. Thanks! |
17:18:57 | * | Trustable quit (Remote host closed the connection) |
17:19:00 | FromGitter | <Yardanico> well, just read macros documentation :) |
17:19:05 | FromGitter | <Yardanico> and this tree is just an AST tree |
17:19:38 | FromGitter | <ephja> if semantic analysis for included files work then maybe it's just the vscode extension that's broken |
17:21:10 | FromGitter | <kaushalmodi> @Yardanico Yes, it's just that I haven't yet got to that. Learning macros is on my list :) |
17:23:46 | * | cspar quit (Ping timeout: 264 seconds) |
17:24:32 | * | Trustable joined #nim |
17:33:43 | * | Trustable quit (Remote host closed the connection) |
17:34:39 | * | Trustable joined #nim |
17:36:23 | * | Perkol joined #nim |
17:37:13 | * | Trustable quit (Remote host closed the connection) |
17:46:46 | FromGitter | <krux02> @kaushalmodi just look at node.repr and node.treeRepr, and then you will learn and understand a lot |
17:47:15 | FromGitter | <krux02> dumpTree can really help you to understand how nim parses a tree |
17:47:33 | * | nsf quit (Quit: WeeChat 2.1) |
18:08:27 | Araq | krux02. can you confirm n.ident should be written as n.strVal ? |
18:16:47 | krux02 | Araq: yes |
18:16:51 | krux02 | I can |
18:17:18 | krux02 | when n is a NimNode and you want to get the string value of identifier, then yes |
18:20:25 | subsetpark | I know globals can be marked {.threadvar.} to make them thread-local, but what exactly does that do? Does it reinitialize a new copy of the variable for each thread? Or does it simply tell the compiler that I'm doing that manually? |
18:21:42 | krux02 | subsetpark, I am not sure exactly, I just know that thread_local makes an instance of that variables per thread. |
18:21:47 | krux02 | (in c++) |
18:23:30 | subsetpark | I have the impression that all I have to do is mark as {.threadvar.} and it will magically be taken care of (esp. because it doesn't get mutated) - I just want to make sure that I am not mistaken, and that I don't have to actually change how I instantiate it myself |
18:25:24 | dom96 | you do have to instantiate it yourself |
18:25:33 | dom96 | (in each thread) |
18:26:25 | subsetpark | hm ok |
18:27:43 | subsetpark | so if i have a proc which makes use of a hash table (which never changes), and I want to be GC-safe - can I instantiate within the proc and mark as {.global.} ? |
18:28:13 | * | rokups quit (Quit: Connection closed for inactivity) |
18:28:21 | subsetpark | (because I don't want to re-instantiate every time the proc is called) |
18:32:22 | * | xkapastel quit (Quit: Connection closed for inactivity) |
18:35:00 | * | Perkol quit (Quit: Leaving) |
18:36:15 | * | jjido joined #nim |
18:48:22 | dom96 | create a proc that checks if the global variable has be initialised |
18:48:28 | dom96 | if so return the variable |
18:48:33 | dom96 | otherwise init and return the variable |
19:01:11 | subsetpark | ok that works |
19:01:50 | subsetpark | Well actually I'm trying to replace the table with nested case statements but that makes sense to me |
19:08:21 | subsetpark | dom96: so oddly, I still get GcUnsafe2 errors even without a table at all |
19:08:58 | subsetpark | there are no global variables, and the compiler doesn't explain why the original proc is unsafe |
19:09:06 | subsetpark | and even marking it gcsafe leaves it still unsafe :/ |
19:14:14 | * | Vladar joined #nim |
19:17:50 | * | xkapastel joined #nim |
19:18:00 | * | Trustable joined #nim |
19:24:06 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:33:13 | Yardanico | https://github.com/gemath/xpegs |
19:36:51 | dom96 | ooh |
19:38:42 | * | xet7 quit (Remote host closed the connection) |
19:42:28 | * | Trustable quit (Remote host closed the connection) |
19:51:16 | Araq | subsetpark: gist your code |
19:52:19 | subsetpark | Araq: it was a forward-declaration issue. I don't know why the original proc is marked as unsafe, but marking the forward declaration makes it compile |
19:56:11 | * | cryptocat1094 quit (Quit: WeeChat 1.6) |
20:01:23 | * | krux02 quit (Remote host closed the connection) |
20:13:45 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
20:16:35 | * | jjido joined #nim |
20:32:02 | * | xet7 joined #nim |
20:34:47 | * | krux02 joined #nim |
20:36:05 | * | xet7 quit (Remote host closed the connection) |
20:39:12 | FromGitter | <mratsim> ah, @krux02, @Araq, I was writing macros and add the ident is deprecated notice but didn’t find what I was supposed to use instead to get the identifier. |
20:39:26 | FromGitter | <mratsim> had not add |
20:40:36 | krux02 | mratsim: the identifier node is deprecated |
20:40:46 | krux02 | you have three opetions |
20:40:54 | krux02 | node == ident"some name" |
20:41:02 | krux02 | node.eqIdent("someName") |
20:41:20 | krux02 | node.strVal == "someName" |
20:41:33 | krux02 | but the last one is not acconding to nim identifier equality rules |
20:41:55 | krux02 | there is cmpIgnoreStyle, but that is misleading, because it does not compare according to nim style |
20:43:01 | Araq | ugh, I hate Nim's comments. |
20:43:16 | Araq | ## vs # vs #[]# vs ##[]## |
20:43:41 | Araq | nimpretty will never get them right lol |
20:44:21 | Araq | the original Nim was much better in this regard. comments are part of the AST, deal with it. |
20:45:34 | dom96 | meh |
20:45:35 | FromGitter | <mratsim> basically a non existing ident as untyped parameter and want to create a newIdentNode from that so I guess I have to use `newIdentNode(foo.strVal)` |
20:45:45 | dom96 | I like being able to put my comments wherever I please |
20:46:11 | Araq | mratsim: or copyNode(foo) |
20:46:28 | FromGitter | <ephja> does being part of the AST imply otherwise? |
20:46:42 | Araq | dom96: yeah and then the tooling doesn't understand it, it sucks. |
20:47:10 | Araq | Nim is about ASTs, not about string munging. |
20:47:35 | Araq | ephja: that comments can only occur in specific places as they are part of the grammar. |
20:48:37 | FromGitter | <mratsim> @Araq: copyNimNode is not documented :/ |
20:48:50 | * | nsf joined #nim |
20:49:42 | FromGitter | <ephja> yes but do they have to follow the same indentation rules? |
20:50:55 | dom96 | yes |
20:55:51 | * | elrood quit (Quit: Leaving) |
20:56:05 | * | xet7 joined #nim |
20:56:45 | FromGitter | <ephja> why can't it depend on the node type? |
21:08:00 | * | Vladar quit (Quit: Leaving) |
21:08:48 | * | noonien quit (Quit: Connection closed for inactivity) |
21:12:39 | federico3 | Araq: how's nimpretty getting on? |
21:24:22 | Araq | federico3: only one bug away from release *cough* |
21:24:33 | federico3 | \o/ |
21:25:32 | FromGitter | <ephja> it's just one big bug isn't it? |
21:27:25 | Araq | well I just fixed it |
21:27:43 | Araq | so comment handling seems sane now. |
21:27:55 | Araq | but indentation handling isn't :-( |
21:31:01 | * | krux02 quit (Remote host closed the connection) |
21:36:03 | FromGitter | <Varriount> Araq: How long did it take you to work the initial version of Nim |
21:36:28 | FromGitter | <Varriount> Initial version of Nims parser and lexer |
21:37:04 | Araq | can't remember. it took me at least 2 years for bootstrapping |
21:37:26 | Araq | but that included developing a GC too. |
21:38:25 | FromGitter | <Varriount> I'm just writing a lexer and parser for a simple command line shell, and that's been somewhat challenging. |
21:40:05 | * | Electrux quit (Ping timeout: 260 seconds) |
21:41:41 | FromDiscord | <treeform> nimpretty? is that a nim code formatter? |
21:42:04 | FromDiscord | <treeform> link? |
21:42:19 | * | Electrux joined #nim |
21:42:45 | Araq | it's a general purpose beautifier. later versions will also help you in finding a prettier girlfriend |
21:43:41 | FromDiscord | <treeform> i have one too but its space indent/character based, i use it on python, coffeescript and nim. But its not super advanced. Your will be better. |
21:44:53 | FromGitter | <notTito> noice |
21:45:24 | FromGitter | <Varriount> Araq: Will it be able to make hastily-written c++ code pretty? |
21:46:29 | Araq | well it's general purpose. you inject it into your blood, everything is beautiful afterwards. |
21:46:54 | * | Electrux quit (Ping timeout: 260 seconds) |
21:46:59 | * | brainpro1 joined #nim |
21:47:54 | * | brainproxy quit (Ping timeout: 256 seconds) |
21:48:27 | Araq | treeform: please elaborate how it works |
21:48:52 | FromGitter | <notTito> lol got a bit dark |
21:48:59 | shashlick | Araq, so did you decide to retain {.define.} or is it gone? |
21:49:28 | Araq | shashlick: seems easy to support with AST replays |
21:49:54 | Araq | but better change the defaults so that no .define is necessary |
21:50:59 | shashlick | It's not catastrophic but will be nice if I can define usePcreHeader in nimpcre instead of requiring end user to specify it in command line or .cfg |
21:52:18 | * | Electrux joined #nim |
21:52:36 | shashlick | That way all you do is nimble install and import and you no longer need to rely on the dll |
21:54:53 | Araq | yeah, so patch nimpcre to default to static linking |
21:56:41 | * | Electrux quit (Ping timeout: 260 seconds) |
21:58:37 | FromGitter | <ephja> is 'nimsuggest' ever defined when the cmd isn't cmdIdeTools? |
22:02:12 | Araq | not sure lol |
22:05:07 | FromGitter | <ephja> just wondering because of: "when defined(nimsuggest): if c.config.cmd == cmdIdeTools: ..." |
22:06:41 | Notkea | hello! what would be the idiomatic way of chaining Futures in Nim? |
22:07:13 | shashlick | nimpcre already compiles in the pcre source code |
22:07:49 | FromGitter | <ephja> has no one tried to regex away all the countups? :p |
22:10:23 | shashlick | But nim's pcre implementation requires that define to skip the dynlib, that's why I want to define it in nimpcre |
22:11:14 | Araq | ephja: well there are multiple commands for 'nimsuggest' available |
22:11:27 | Araq | but I guess that's a different 'cmd' field then :P |
22:11:51 | Araq | Notkea: 'or', 'and' combinators, or set the completion callback |
22:12:18 | * | Electrux joined #nim |
22:16:57 | * | Electrux quit (Ping timeout: 240 seconds) |
22:22:18 | * | Electrux joined #nim |
22:26:57 | * | Electrux quit (Ping timeout: 240 seconds) |
22:32:18 | * | Electrux joined #nim |
22:35:35 | Notkea | thanks! it seems that I cannot find the doc for asyncfutures on nim-lang.org/docs/lib.html :/ |
22:36:57 | * | Electrux quit (Ping timeout: 264 seconds) |
22:40:19 | FromDiscord | <treeform> Araq, it works to make sure spaces are consistent. It checks indentaion, (), operator spaceing and lines between stuff. Its language agnostic so it can't do the really deep things. As it just looks at lines and characters and counts spaces. |
22:40:50 | * | Electrux joined #nim |
22:44:57 | * | shashlick quit (Remote host closed the connection) |
22:45:05 | * | Electrux quit (Ping timeout: 240 seconds) |
22:45:11 | * | shashlick joined #nim |
22:50:01 | * | nsf quit (Quit: WeeChat 2.1) |
22:52:19 | * | Electrux joined #nim |
22:57:05 | * | Electrux quit (Ping timeout: 248 seconds) |
22:57:22 | * | girvo quit (Ping timeout: 260 seconds) |
22:59:18 | * | girvo joined #nim |
23:01:02 | * | Electrux joined #nim |
23:05:45 | * | Electrux quit (Ping timeout: 264 seconds) |
23:12:05 | * | Electrux joined #nim |
23:16:59 | * | Electrux quit (Ping timeout: 256 seconds) |
23:22:16 | * | Electrux joined #nim |
23:26:57 | * | Electrux quit (Ping timeout: 248 seconds) |
23:27:48 | * | Electrux joined #nim |
23:37:23 | * | Electrux quit (Ping timeout: 268 seconds) |
23:42:20 | * | Electrux joined #nim |
23:47:01 | * | Electrux quit (Ping timeout: 256 seconds) |