00:04:05 | * | smt quit (Ping timeout: 240 seconds) |
00:10:24 | user1101 | why release v1.0 when we can wait a bit longer and release nim with destructors? That way Nim might get the "GC-free" cred from the get-go, and not suffer the same fate as D |
00:25:36 | * | krux02 quit (Remote host closed the connection) |
00:35:05 | FromGitter | <AxDSan> how would you go around creating bindings from something to Nim? |
00:35:10 | FromGitter | <AxDSan> is there like a golden rule? |
00:37:22 | shashlick | What are you looking to wrap |
00:38:51 | FromGitter | <AxDSan> Python to Nim? |
00:40:36 | FromGitter | <AxDSan> well... it's actually https://www.frida.re/ |
00:41:16 | FromGitter | <AxDSan> seems interesting https://gist.github.com/oleavr/e6af8791adbef8fbde06 right? |
00:41:27 | FromDiscord | <treeform> 1.0 is just a number |
01:16:41 | * | xkapastel joined #nim |
01:25:42 | FromGitter | <phrmoy> well, will there be breaking changes from 1.0 onwards? |
01:26:08 | FromGitter | <phrmoy> Because that's what we would expect from 1.0, other than just being number ^^ |
01:26:52 | FromGitter | <phrmoy> and how's using Discord compared to Slack? |
01:38:24 | * | floppydh quit (Remote host closed the connection) |
01:39:13 | * | floppydh joined #nim |
01:56:21 | * | chemist69 quit (Ping timeout: 256 seconds) |
02:03:29 | * | dddddd quit (Read error: Connection reset by peer) |
02:05:38 | * | S1tiSchu joined #nim |
02:07:08 | * | SitiSchu quit (Ping timeout: 265 seconds) |
02:09:17 | FromGitter | <gogolxdong> How to create `command DescribeInstances :` using macro? I tried template but it convert `:` to `,` |
02:25:23 | FromDiscord | <2vg> shashlick: Does your mofuw benchmarking code use the routes macro ? |
02:25:51 | shashlick | I just tested your hello world |
02:26:31 | FromDiscord | <2vg> routes macro has a pattern matching process. |
02:26:31 | FromDiscord | <2vg> plaintext benchmark requires another optimal code. |
02:27:19 | shashlick | Can you send me what you'd like tested, I can try that |
02:29:32 | FromDiscord | <2vg> try this code: https://ghostbin.com/paste/pcj6n |
02:29:51 | FromDiscord | <2vg> The benchmark URL is / plaintext |
02:30:00 | FromDiscord | <2vg> * /plaintext |
02:44:29 | shashlick | 2vg: it does better than before, but slower than httpbeast still - https://clbin.com/PN09L |
02:44:36 | shashlick | dom96: ^^ |
02:45:35 | FromDiscord | <treeform> https://ldjam.com/ Ludum Dare is this weekend, for do people want to make nim games? |
02:52:01 | FromDiscord | <2vg> shashlick: great. |
02:52:01 | FromDiscord | <2vg> but, here, the difference between mofuw and httpbeast may be due to the following reason. |
02:52:01 | FromDiscord | <2vg> The size of response (mofuw has a Date header and a Server header, not only an increase in the amount of transfer, but also a delay to obtain time) |
02:57:36 | shashlick | ya I noticed that in the code |
02:57:42 | shashlick | just commented on the PR as well |
03:11:22 | * | user1101 quit (Quit: user1101) |
03:34:05 | * | Pwntus quit (Ping timeout: 240 seconds) |
03:37:25 | * | Pwntus joined #nim |
03:54:07 | * | Lord_Nightmare2 joined #nim |
03:57:21 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
03:57:21 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
04:26:45 | * | user1101 joined #nim |
04:45:56 | * | user1101 quit (Quit: user1101) |
04:51:45 | Tanger | Hey folks! When writing tests for a project that will involve more than 1 source file, is it recommended to write tests in a `when isMainModule` block or to have a separate tests directory? |
04:52:21 | FromDiscord | <treeform> I almost always use a separate tests directory |
04:55:33 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
04:59:09 | * | Lord_Nightmare joined #nim |
05:16:31 | * | nsf joined #nim |
05:17:47 | * | r3d9u11 joined #nim |
05:31:21 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
05:31:41 | * | Lord_Nightmare2 joined #nim |
05:32:35 | * | Lord_Nightmare2 is now known as Lord_Nightmare |
05:36:58 | * | shashlick quit (Ping timeout: 240 seconds) |
05:43:12 | FromGitter | <gogolxdong> 'yield' cannot be used within 'try' in a non-inlined iterator |
05:44:32 | * | shashlick joined #nim |
05:47:51 | Tanger | Thanks treeform, that's what I'm more inclined to use. Keeps it all in one place |
05:55:20 | * | shashlick quit (Ping timeout: 256 seconds) |
05:55:43 | * | shashlick joined #nim |
05:56:24 | FromGitter | <gogolxdong> 'yield' only allowed in an iterator in code `var content =await client.getContent(url)` |
06:02:19 | * | r3d9u11 quit (Remote host closed the connection) |
06:04:20 | * | xet7 joined #nim |
06:08:37 | * | DarkArctic quit (Ping timeout: 246 seconds) |
06:17:54 | * | DarkArctic joined #nim |
06:27:26 | * | PMunch joined #nim |
06:56:16 | * | xet7_ joined #nim |
06:56:51 | * | xet7 is now known as Guest72873 |
06:57:04 | * | xet7_ is now known as xet7 |
06:57:41 | * | Guest72873 quit (Ping timeout: 256 seconds) |
07:20:39 | * | Arrrr joined #nim |
07:20:39 | * | Arrrr quit (Changing host) |
07:20:39 | * | Arrrr joined #nim |
07:30:43 | * | Zevv left #nim (#nim) |
07:48:45 | * | rokups joined #nim |
08:02:22 | FromGitter | <mratsim> @user1101: The tests to confirm that everything works fine GC-free seq and strings would be too long. |
08:02:37 | * | leru joined #nim |
08:04:47 | * | leru quit (Remote host closed the connection) |
08:06:24 | * | max3 quit (Quit: Connection closed for inactivity) |
08:06:55 | * | abeaumont quit (Ping timeout: 246 seconds) |
08:07:03 | * | smt joined #nim |
08:23:00 | FromGitter | <mratsim> Mindblown: https://forum.nim-lang.org/t/3757/2#23421 |
08:35:26 | * | SunDwarf quit (Ping timeout: 276 seconds) |
08:41:20 | * | SunDwarf joined #nim |
08:44:22 | * | couven92 joined #nim |
08:45:34 | * | couven92 quit (Read error: Connection reset by peer) |
08:46:02 | * | couven92 joined #nim |
09:02:51 | * | xet7 quit (Read error: Connection timed out) |
09:03:26 | * | xet7 joined #nim |
09:09:40 | Tanger | Am I crazy in thinking that I read somewhere that you could put constraints on types and raise a compilation error if a variable doesn't meet those constraints? |
09:13:58 | Tanger | Nevermind, it was concepts, haha |
09:43:51 | * | abeaumont joined #nim |
10:11:54 | * | vantage joined #nim |
10:12:03 | vantage | yo |
10:27:25 | * | xet7 quit (Read error: Connection timed out) |
10:27:55 | * | xet7 joined #nim |
10:30:21 | * | Vladar joined #nim |
10:42:51 | * | Arrrr quit (Ping timeout: 240 seconds) |
11:21:19 | * | Arrrr joined #nim |
11:35:31 | FromGitter | <zetashift> heya vantage |
11:35:44 | FromGitter | <zetashift> @treeform I'm planning to enter LDjam with Nim |
11:36:05 | FromGitter | <zetashift> not sure what to use, I'm currently messing around with godot-nim |
11:36:20 | * | user1101 joined #nim |
11:37:25 | FromDiscord | <geckojsc> Oh nice |
11:38:25 | Arrrr | Someone who published his game on steam opensourced the game engine he used |
11:38:55 | PMunch | zetashift, oh cool. I did a weekend game jam with just Nim, SDL, and my gamelib stuff |
11:40:31 | Araq | mratsim: GC-free seqs and strings too long? |
11:40:34 | Araq | what does that mean? |
11:41:03 | FromGitter | <krux02> PMunch: I hope that my Opengl Sandbox will be the perfect game jam library for the future |
11:41:04 | FromGitter | <zetashift> yea impbox right? |
11:41:40 | FromGitter | <zetashift> his engine was a pico8-ish type of engine, he also entered in the previous jam with Nim |
11:42:06 | FromGitter | <krux02> I like the ideo of pico, it is minimal and yet productive. |
11:42:18 | FromGitter | <allochi_twitter> The PICO-8 engin in Nim, I tried it, it is fun |
11:42:22 | FromGitter | <krux02> My Game library will also be minimal in a certain sense |
11:42:37 | FromGitter | <allochi_twitter> I tried both PICO-8 and PICO-8 in Nim :) |
11:42:49 | Arrrr | Link? |
11:43:05 | FromGitter | <krux02> it will not throw complex data structures at you or other complicated stuff, but it will require you to write your own shaders (which will be trivial) |
11:43:14 | FromGitter | <allochi_twitter> https://github.com/ftsf/nico |
11:43:25 | FromGitter | <allochi_twitter> it’s called NICO |
11:43:46 | Arrrr | Ah, yes, I was talking about this. I thought pico was ported to nim |
11:43:51 | FromGitter | <zetashift> @krux02 game library as in SDL and raylib? |
11:43:52 | FromGitter | <allochi_twitter> Oh, there is also a youtube building a space shooter with it |
11:44:10 | FromGitter | <krux02> well, when programming a CPU is easy, then why should it be hard to program a GPU |
11:44:13 | FromGitter | <allochi_twitter> I think it was with it |
11:44:16 | FromGitter | <krux02> I don't know raylib |
11:44:33 | FromGitter | <allochi_twitter> @krux02 I’m install Arch ;) |
11:44:51 | FromGitter | <allochi_twitter> On a VM though |
11:46:02 | FromGitter | <krux02> yes like raylib, but instead DrawCube DrawCubeWires etc one has to write that on your own |
11:47:22 | FromGitter | <krux02> I will provede a libraray with vertex data of primitive objects such as cubes, but one has to write the shader for the cube manually. |
11:47:31 | FromGitter | <mratsim> @Araq to properly test the new runtime on all supported environments, would require a long period of time. (3 months? 6 months?) |
11:48:40 | FromGitter | <krux02> for everybody who didn.t notice it when I announced it yesterday evening, I finished my ast pattern matching library |
11:48:42 | FromGitter | <krux02> https://github.com/krux02/ast-pattern-matching |
11:50:05 | Araq | mratsim: well I need to finish the implementation but testing is rather easy, it's not platform specific, once it's green on travis and appveyor it'll be good enough for most people |
12:01:23 | FromGitter | <allochi_twitter> regarding building games NICO check this youtube https://www.youtube.com/watch?v=EwM1Z3WdqjM |
12:06:40 | PMunch | krux02, link? |
12:07:27 | PMunch | https://github.com/krux02/opengl-sandbox |
12:07:29 | PMunch | That thing? |
12:09:24 | PMunch | I focused more on game utility functions than actual rendering and such: https://github.com/PMunch/SDLGamelib/tree/master/gamelib |
12:09:53 | PMunch | Much of it doesn't even use SDL at all, so I've been considering to strip out the SDL parts or make it optional |
12:10:32 | FromGitter | <krux02> PMunch, yes |
12:11:18 | FromGitter | <krux02> PMunch, it is nice if you just integrate SDL well and don't redefine SDL stuff just to strip it out. |
12:14:40 | Araq | any news on GCC-3 ? |
12:15:09 | FromGitter | <krux02> nope |
12:15:22 | PMunch | krux02, oh yeah that wasn't my plan. I was thinking about stripping out the SDL-specific stuff into it's own library, or hide it behind a compile-time switch |
12:15:23 | FromGitter | <krux02> I tried to install gcc-3 locally on arch, did not work out |
12:15:45 | Araq | maybe there is still a mingw lying around that is based on gcc-3 |
12:15:49 | FromGitter | <krux02> it compiled for hours and then it failed, and thangs to the defalt setting of yaourt it cleaned up everything afterwards |
12:15:55 | PMunch | That way it can be used without using SDL, but you could still use it with SDL if you'd like |
12:15:59 | FromGitter | <krux02> yaourt sucks |
12:16:05 | Araq | that would be the best option in fact, as then I can keep supporting it |
12:16:34 | * | dddddd joined #nim |
12:18:27 | FromGitter | <krux02> Araq: can you merge this: https://github.com/nim-lang/packages/pull/705 |
12:19:36 | Araq | lol |
12:19:46 | Araq | "thangs to the defalt setting of yaourt it cleaned up everything afterwards" |
12:20:10 | Araq | yeah, these transaction based package managers are a bit detached from reality. |
12:20:33 | Araq | well you all know my opinion on package managers... |
12:20:53 | FromGitter | <krux02> well can't do with them and not without them? |
12:21:01 | Araq | yes. |
12:23:49 | FromGitter | <krux02> well good package managers are rare. Dependencies are not easy. |
12:25:38 | FromGitter | <krux02> the words package manager/built tool is sbt. |
12:26:01 | FromGitter | <krux02> strictly it is just a built tool that uses another package manager for it's packages, but the built files are horrible |
12:26:09 | * | byte512 quit (Ping timeout: 264 seconds) |
12:26:30 | FromGitter | <krux02> they invented their own declarative language with their own assignment operatiors and everything to define project settings |
12:26:40 | FromGitter | <krux02> and then they advertise that everything is scala |
12:26:49 | FromGitter | <zetashift> sbt is horrible ><, Scala guys are working to fix and Mill looks promosing |
12:26:59 | FromGitter | <zetashift> promising* |
12:27:13 | FromGitter | <krux02> I hate sbt since scala 2.7 |
12:27:26 | FromGitter | <krux02> before that I didn't know scala |
12:27:36 | Araq | interesting I thought sbt would be good |
12:27:46 | FromGitter | <krux02> no it is horrible |
12:27:47 | Araq | because it's a Scala DSL ;-) |
12:27:56 | Araq | and we're doing something similar with Nimble... |
12:27:57 | FromGitter | <zetashift> https://github.com/lihaoyi/mill |
12:28:15 | FromGitter | <krux02> every time I wanted to configuer something I was like: In scala it would be easy, but how do I do this in this good damn syntax |
12:28:29 | FromGitter | <krux02> and then the tutorials avoided pertty good to explain the right things |
12:29:27 | FromGitter | <krux02> well the only good thing about sbt is that no configuartion at all is alreday working pretty well |
12:29:58 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
12:30:07 | * | vantage joined #nim |
12:30:23 | FromGitter | <krux02> but as soon as you have to edit an sbt file, it's pure horror of frustration and being blocked entirely because it is just super confusing how it works |
12:31:03 | Araq | template `--`*(key, val: untyped) = |
12:31:03 | Araq | ## A shortcut for ``switch(astToStr(key), astToStr(val))``. |
12:31:03 | Araq | switch(astToStr(key), strip astToStr(val)) |
12:31:16 | Araq | --checks: off |
12:31:34 | Araq | this is NimScript, the one thing that is kinda special |
12:31:50 | Araq | and people already struggled with it :-) |
12:31:59 | Araq | good we didn't do more of these. |
12:32:50 | FromGitter | <data-man> Why not take gcc 3 from the releases's archive? |
12:33:04 | vantage | i like it, since its similar to the command line api |
12:33:28 | * | byte512 joined #nim |
12:34:46 | FromGitter | <krux02> Araq: the closer the build tool is to simple nim programming, the better. Don't add special stuff, special operators, or in general special |
12:35:12 | FromGitter | <krux02> make it that you don't need to explain things and really thing about if you really need to add a new operator |
12:35:54 | FromGitter | <krux02> and it should be clear what the goal of such a build scrip is. |
12:36:05 | FromGitter | <krux02> That was one of my main problems in CMAKE |
12:36:23 | FromGitter | <krux02> I just had no idea what this CMAKE file was supposed to do in order to build the project |
12:36:32 | FromGitter | <krux02> because building the project is clearly not what CMAKE does |
12:36:45 | FromGitter | <krux02> it generates build files that build the project |
12:36:57 | FromGitter | <krux02> and to do that it needs to set values |
12:37:03 | FromGitter | <data-man> Just use Tup. |
12:37:10 | FromGitter | <krux02> and then magic happens |
12:38:38 | FromGitter | <data-man> And Fossil instead of Git :-D |
12:38:50 | FromGitter | <krux02> what is fossil? |
12:39:05 | Araq | data-man we would need fossil-hub first though |
12:39:28 | Araq | fossil is version management from the SQLite author(s) |
12:39:41 | FromGitter | <data-man> @krux02: Version Control System sqlite-based fossil-scm.org |
12:40:01 | FromGitter | <krux02> is that good or bad? |
12:40:12 | Araq | krux02: never used it, looks good on paper |
12:40:45 | FromGitter | <krux02> yea you never know the disadvantages of a technology until you use it |
12:40:50 | * | smt` joined #nim |
12:41:57 | FromGitter | <mratsim> “fight with it” —> fixed for you |
12:42:48 | Araq | every tool that builds a makefile is fundamentally broken. the 'make' algorithm is perhaps 100 lines of code, you gain nothing by not implementing it on your own. |
12:43:31 | FromGitter | <data-man> There is hosting for Fossil repos http://chiselapp.com |
12:43:31 | * | sendell joined #nim |
12:43:35 | * | smt quit (Ping timeout: 256 seconds) |
12:46:18 | Araq | but does VSCode have fossil integration? |
12:46:50 | FromGitter | <alehander42> @krux02 ast_pattern_matching looks great |
12:47:14 | FromGitter | <data-man> https://sqlite.org/whynotgit.html - Why SQLite Does Not Use Git |
12:47:33 | FromGitter | <alehander42> still, I played with its internals and it seems very veryNimNode |
12:47:39 | FromGitter | <alehander42> which is very concerning |
12:47:52 | FromGitter | <krux02> Araq: I agree on that make algorithm. It is super trivial. |
12:48:20 | vantage | aleh why concerning? |
12:48:21 | FromGitter | <data-man> @Araq: https://github.com/darkmusic/fossil-vscode |
12:48:43 | FromGitter | <alehander42> replacing NimNode with more general stuff wouldn't be too hard, but it also expects `children` etc and assumes all those special int/string mappings to newLit etc |
12:48:44 | * | xkapastel quit (Quit: Connection closed for inactivity) |
12:49:00 | FromGitter | <alehander42> that's great, but it makes it very unsuitable for other types |
12:49:01 | dom96 | Dissertation demo finished. Whew. |
12:49:29 | dom96 | In case you guys want to see: https://picheta.me/obfuscator (UI shamelessly based on the playground :)) |
12:49:44 | PMunch | dom96, dissertation demo? Are you soon done with your studies? |
12:49:46 | FromGitter | <alehander42> ( @vantage it's a great lib, I just wanted to convert it for all kinds of types :D ) |
12:49:57 | FromGitter | <krux02> Well I am a bit tired of learning git. And it works for me. I don't want to learn another tool. |
12:50:08 | * | byte512 quit (Ping timeout: 256 seconds) |
12:50:10 | dom96 | PMunch: yep, 2 exams and a dissertation hand in are left |
12:50:25 | PMunch | Cool! Good luck! |
12:50:36 | dom96 | Thanks :) |
12:51:33 | FromGitter | <krux02> well yea it does obfuscate |
12:51:41 | vantage | why are macros in nim |
12:52:00 | * | byte512 joined #nim |
12:52:03 | vantage | why are macro errors in nim text based |
12:52:12 | FromGitter | <krux02> vantage: to get people interested in the language, such as me :P |
12:52:32 | vantage | why arent they something like MacroError |
12:52:55 | vantage | krux i made a typo |
12:52:56 | FromGitter | <krux02> vantage: macroerror would not be better at all |
12:53:11 | vantage | whats the reasoning? |
12:53:45 | vantage | wouldnt it be better to have error messages standardised? |
12:54:00 | FromGitter | <alehander42> @dom96 well done! is it somehow reversible? (you have "comments" in the name of example , I thought they are just removed) |
12:54:01 | FromGitter | <krux02> macroError would not add any information to the error it would just put the prefix Macro to the error that would not help at all |
12:54:29 | * | xet7 quit (Read error: Connection timed out) |
12:54:33 | FromGitter | <alehander42> @vantage those are on compile time, so they usually fail immediately to the top, it wouldn't make a lot of sense to use exceptions for them |
12:54:36 | dom96 | alehander42: all obfuscation is reversible with enough time :) |
12:54:41 | FromGitter | <krux02> vantage: well it is a very good advantage of the macros package to provide custom error messages |
12:54:45 | FromGitter | <alehander42> you can still use exceptions internally in the macros |
12:55:04 | * | xet7 joined #nim |
12:56:05 | dom96 | alehander42: Maybe i'm not sure what you mean, the comments are indeed removed. |
12:56:15 | vantage | im mentioning this cause i realised that macro errors dont give a similar error message to compile and runtime |
12:56:39 | FromGitter | <krux02> I would even say to call an error macroerror harmful. It is like the c++ error "error using const ..." |
12:56:41 | FromGitter | <alehander42> @krux02 I think your matching API can still be usable for all other object types without many(maybe any changes), if it adds some hooks, e.g. `matchInt NimNode, newLit` `matchIdent NimNode, ident` |
12:56:45 | dom96 | vantage: You can raise exceptions at compile-time too IIRC |
12:56:49 | vantage | i cant just ctrl click the error to jump to it |
12:56:51 | dom96 | and you'll get a stack trace |
12:57:18 | FromGitter | <krux02> @alehander42 yes I think so, too. I even thought about supporting somthing like that. |
12:58:41 | FromGitter | <alehander42> and maybe `matchUnnamedArgs NimNode, children` so you can still have nkStuff(a, b, c) which wouldn't make a lot of sense for many other types |
12:59:08 | FromGitter | <alehander42> which would usually use `myDisc(a: stuff, b: b)` |
12:59:22 | vantage | there are some other things, i wish i could add a noob mode to nim. things newbies do which are common errors, explained in plain english |
13:01:12 | FromGitter | <krux02> vantage: I thought about (only thoght I won't do it) writing a book: "simple nim" that explains an easy subset of nim that people can get productive with fast, without learning everything. A bit oriented towards little schemer |
13:01:31 | * | SenasOzys quit (Ping timeout: 268 seconds) |
13:02:21 | FromGitter | <krux02> @alehander42 at the moment I have no interest to extend the ast matching library further. That is why i have released it as version 1.0.0. I just want to focus on something else now. But your can create a PR that implements what you want. |
13:02:24 | vantage | yeah nim doesnt have a steep learning curve, but the hill is very high... so... |
13:02:44 | FromGitter | <krux02> If it works and does not cause too many conflicts I might merge it. |
13:04:19 | FromGitter | <alehander42> @krux02 sounds great, I'll first write some example tests demonstrating what would my goal be, and if it seems good, I'll make a PR when I have time |
13:08:59 | FromGitter | <krux02> @alehander42 Don't be afraid that I might point you out on your mistakes, expect it. ;) |
13:15:42 | FromGitter | <alehander42> <3 can't wait |
13:22:51 | * | smt` quit (Read error: Connection reset by peer) |
13:22:58 | * | Arrrr quit (Read error: Connection reset by peer) |
13:24:26 | dom96 | hrm, wasn't there a flag that let's you enable nil exceptions in Nim? |
13:26:15 | * | smt joined #nim |
13:26:32 | PMunch | dom96, you thinking of this: https://nim-lang.org/docs/segfaults.html ? |
13:26:49 | dom96 | looks like it, cool :) |
13:30:06 | PMunch | Yeah, just discovered it yesterday by accident :P |
13:30:22 | PMunch | Was looking through modules in the stdlib and wondered what "segfaults" would be about :P |
13:30:39 | PMunch | "include segfaults" sounds like a recipe for disaster |
13:31:51 | dom96 | hah true |
13:31:59 | dom96 | that should be a --define |
13:33:43 | Araq | no way. it should be a module |
13:33:53 | Araq | and actually it shouldn't exist. |
13:34:29 | dom96 | also, does this only turn SIGSEGV into an exception? |
13:34:40 | dom96 | isn't SIGSEGV possible for a lot more than just nil accesses? |
13:35:22 | Araq | yeah, there is some logic to detect true 'nil' accesses |
13:35:29 | Araq | involved. |
13:35:42 | dom96 | okay cool |
13:35:46 | dom96 | But why shouldn't it exist? |
13:35:51 | dom96 | and why not behind a define? |
13:36:22 | Araq | because if your software quality is so poor it has nil access bugs you should fix that, not patch over it |
13:36:52 | vantage | araq what about external code? |
13:37:08 | Araq | and yeah I know I get part of the blame for this by not designing 'nil' properly |
13:37:39 | Araq | vantage: external code that has serious bugs needs to be fixed or abandoned. |
13:38:49 | FromGitter | <alehander42> I think some kind of improved flow-based nil checking like https://github.com/nim-lang/Nim/issues/7248 would be also very good |
13:39:52 | FromGitter | <alehander42> but I am not sure how hard(or easy) would it be to implement that at least for some classes of nil accesses/constructs |
13:42:47 | dom96 | compile-time nil checks would certainly help |
13:43:25 | federico3 | that segfaults module is underrated |
13:43:49 | * | SenasOzys joined #nim |
13:44:40 | vantage | feder underrated means its better than people give it credit for |
13:46:31 | dom96 | Here is the context of why I asked: https://github.com/dom96/jester/issues/139 |
13:48:06 | Araq | massive slow down? got some numbers to share? |
13:49:25 | Araq | btw how hard is it to make 'await' a standalone template? |
13:49:45 | Araq | quite some work, right? |
13:51:15 | dom96 | I don't have numbers, I'm guessing |
13:52:50 | Araq | it's probably hard to measure, another successfully predicted branch |
13:56:19 | * | couven92 quit (Quit: Client disconnecting) |
13:59:07 | dom96 | so you think I should add that? |
13:59:46 | Araq | assert req != nil |
14:00:00 | Araq | you can use an assertion for it |
14:00:13 | dom96 | sure, that's what I suggested to do |
14:00:22 | Araq | oh ok. |
14:00:25 | dom96 | i.e. check it in debug mode |
14:00:41 | Araq | yeah it's just for development |
14:00:52 | dom96 | and only there because of possible performance issues |
14:01:32 | Araq | I wouldn't argue performance I would argue defensive programming is wrong. |
14:05:51 | dom96 | well anyway, we need better async stack traces |
14:13:47 | shashlick | araq: tissue is working pretty nicely, check out comment on https://github.com/nim-lang/nim/issues/1500 which was automatically posted |
14:13:57 | shashlick | https://github.com/genotrance/tissue |
14:14:37 | Araq | nice :-) |
14:15:09 | * | leru joined #nim |
14:15:45 | shashlick | let me know if any feedback - i have found some which no longer crash, 1154 was closed, note posted to 741 |
14:16:41 | Araq | well these that do no longer crash should make it to the test suite anyway |
14:18:01 | shashlick | oh ya, sure |
14:18:29 | Araq | I'd like PRs like "closes #123" |
14:21:33 | FromGitter | <krux02> Araq: gitter actually embeds that name and I get a link to "Closures do not work yet" issue |
14:24:33 | shashlick | https://github.com/nim-lang/nim/issues/1145 still crashes - stack overflow |
14:27:35 | Araq | туплес счоулд нот бе рецурсиве |
14:27:46 | Araq | tuples should not be recursive |
14:31:59 | FromGitter | <alehander42> wow araq careful with that poweruser alphabet |
14:33:30 | shashlick | araq: question - to add test cases, how do you test issues which crashed in the past but give an error during compile after fix? |
14:34:06 | Araq | hmm this ant is 4 times bigger than most |
14:35:04 | shashlick | e.g. https://github.com/nim-lang/nim/issues/2383 |
14:35:28 | Araq | shashlick: tests/errmsgs/ shows how to test for error messages |
14:35:53 | shashlick | neat |
14:37:58 | Araq | hmm this ant could invade the smaller ant colony. I wonder what would happen. |
14:38:16 | Araq | time for an experiment. |
14:39:34 | Araq | the small ants are all dead. |
14:40:02 | * | PMunch quit (Quit: Leaving) |
14:43:21 | * | miran joined #nim |
14:45:58 | shashlick | Araq: so adding a discard at the top of file will make sure testament will mark that failed compile as a passed test? |
14:48:44 | * | BitPuffin joined #nim |
14:50:14 | Araq | if the discard has the proper format, yes |
14:50:27 | Araq | you can test it via |
14:50:33 | Araq | tt cat errmsgs |
14:50:47 | Araq | where tt should be your alias for tests/testament/tester |
14:51:11 | Araq | everybody should have this alias :P |
14:51:26 | shashlick | okay so I still need a separate file for each test case, hope that's okay with appveyor |
14:51:59 | Araq | both CIs are equally unreliable IME |
14:52:06 | Araq | :-) |
14:52:43 | Araq | but hey, they are free, can't complain |
14:59:48 | FromGitter | <data-man> @shashlick: You can get PR instead of issue. ⏎ ⏎ > Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request. ⏎ > This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. |
14:59:48 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5ad75d646d7e07082b09f1b2] |
15:00:17 | * | leru quit (Remote host closed the connection) |
15:00:40 | FromGitter | <data-man> Just tiny hint. :) |
15:00:46 | * | leru joined #nim |
15:02:04 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:02:13 | * | nut joined #nim |
15:02:28 | nut | vscode on mac - does someone else get this error - Activating extension 'kosz78.nim' failed: Path must be a string. Received undefined. |
15:03:04 | Araq | no. |
15:03:18 | Yardanico | nut, do you have Nim in your path? or IDK what it's called in macos :) |
15:04:14 | dom96 | That PATH is the PATH on all operating systems |
15:05:08 | nut | yes. echo $PATH => /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/nim/bin:~/.nimble/bin |
15:05:11 | Araq | btw how do I get different color schemes to work on VSCode on OSX? |
15:05:22 | Yardanico | Araq, they worked for me before |
15:05:30 | nut | `nim --version` on terminal works for me |
15:05:42 | Yardanico | nut, do you have nimsuggest in your path? |
15:05:49 | Araq | nut: the terminal has its own idea of PATH |
15:05:56 | shashlick | data-man - ya I filter PRs out |
15:06:00 | nut | Yardanico: yes |
15:06:25 | nut | Araq: where else can I test whether my path is correct? |
15:08:44 | nut | nim/bin folder is added to my /etc/paths |
15:10:58 | Araq | nut: that seems correct |
15:11:23 | dom96 | nut: Seems like you should create an issue on kosz78's repo |
15:11:47 | dom96 | This one https://github.com/pragmagic/vscode-nim/ |
15:11:53 | nut | I am not on github :( |
15:12:41 | nut | In the extension, is there no setting to add the path to the binaries? |
15:13:38 | Araq | also edit your .bashrc maybe |
15:29:41 | * | xet7 quit (Read error: Connection timed out) |
15:30:25 | * | xet7 joined #nim |
15:35:12 | miran | i want to pass a range to a proc that will be used in a for loop, e.g. `for i in myRange`, how do i do that? |
15:35:36 | miran | i have tried `myRange: range`, but that is an invalid type |
15:37:18 | miran | i guess i could pass separately start, end, and step.... |
15:37:45 | FromGitter | <alehander42> HSlice ? |
15:38:36 | FromGitter | <alehander42> https://nim-lang.org/docs/system.html#Slice |
15:41:06 | dom96 | In case we want yet another IM service, I made this: https://nim.zulipchat.com/ |
15:42:42 | dom96 | It's threaded-by-default which is kinda nice |
15:43:13 | FromGitter | <krux02> hmm: why is callsite deprecated? |
15:43:51 | shashlick | is there an easy command line to create a PR on github |
15:44:07 | FromGitter | <krux02> shashlick: probably |
15:44:09 | Araq | shashlick: nimble has code to do exactly that |
15:44:19 | FromGitter | <alehander42> @shashlick I don't know but I found it very easy to write such a function for gitlab api |
15:44:36 | shashlick | so there's no easy "git abc def" command line for it? |
15:44:36 | Araq | krux02: I don't like it and it makes the compiler's internals more messy |
15:45:02 | FromGitter | <krux02> Araq: and what if I want to get the lineinfo of the macro invocation? |
15:45:28 | Araq | krux02: instantiationInfo() ? |
15:45:38 | FromGitter | <alehander42> it seems hub is popular, but I don't know if it works for that @shashlick |
15:45:49 | FromGitter | <krux02> ok, that might work |
15:46:00 | FromGitter | <krux02> then it can stay deprecated. |
15:46:18 | shashlick | ok |
15:47:39 | FromGitter | <genotrance> PR test case for #1154 - https://github.com/nim-lang/Nim/pull/7648 |
15:51:32 | * | xet7 quit (Read error: Connection timed out) |
15:51:54 | * | xet7 joined #nim |
15:54:17 | Araq | nice. |
15:54:43 | * | xkapastel joined #nim |
15:58:54 | * | nut_ joined #nim |
15:58:59 | nut_ | The issue was apparently fixed in 2017 https://github.com/pragmagic/vscode-nim/pull/52 Hmmm.. |
15:59:55 | * | nut quit (Ping timeout: 260 seconds) |
16:02:43 | shashlick | https://github.com/nim-lang/Nim/pull/7649 for #2416 |
16:03:20 | shashlick | how easy is it to integrate nim test execution on a private server with github |
16:08:24 | * | SenasOzys quit (Ping timeout: 276 seconds) |
16:10:02 | * | xet7 quit (Read error: Connection timed out) |
16:10:25 | * | xet7 joined #nim |
16:11:01 | * | SenasOzys joined #nim |
16:15:05 | * | nut_ quit (Ping timeout: 260 seconds) |
16:18:04 | * | sendell quit (Remote host closed the connection) |
16:22:18 | * | nsf joined #nim |
16:23:48 | euantor | probably easy if you run Jenkins on a private server |
16:23:53 | euantor | THough I've never done it |
16:26:19 | * | nut joined #nim |
16:26:22 | dom96 | Surely there are better ways than Jenkins |
16:26:39 | FromGitter | <krux02> when I use the fmt macro from strformat how do I add a newLine to the end? |
16:26:41 | dom96 | Jenkins is synonymous with bloatware to me |
16:26:53 | FromGitter | <alehander42> you use `&"stuff"` |
16:27:03 | dom96 | yes, or fmt("\n") |
16:27:07 | dom96 | or "\n".fmt |
16:27:33 | nut | Araq: dom96: Fixed the vscode plugin issue. IDK for what reason, the plugin does not search the PATH for `nim` binary, but it searches for a `symlink to the nim binary`, so I created symlinks and added them to path, and now it works. |
16:27:42 | FromGitter | <krux02> @alehander42 the point of fmt is to not use & constantly |
16:28:04 | FromGitter | <alehander42> well I hate fmt |
16:28:08 | FromGitter | <krux02> and when I need to do "&" constantly again for newline then fmt is pretty pointless |
16:28:09 | FromGitter | <alehander42> with a passion |
16:28:25 | FromGitter | <krux02> why? |
16:28:31 | FromGitter | <krux02> I wrote something like it on my own |
16:28:44 | FromGitter | <krux02> but much shorter |
16:29:20 | FromGitter | <alehander42> :D I was being dramatic |
16:29:24 | FromGitter | <alehander42> I love `&`/fmt |
16:29:29 | FromGitter | <alehander42> I just prefer `&` than fmt |
16:29:50 | Araq | fmt "\n" |
16:29:55 | FromGitter | <alehander42> for my personal needs I often need this \\n thing |
16:30:05 | FromGitter | <krux02> http://ix.io/1878 |
16:30:06 | FromGitter | <alehander42> and `&` is shorter |
16:30:08 | FromGitter | <krux02> that is my version |
16:30:18 | FromGitter | <alehander42> and this `fmt "\n" vs fmt"\n"` is pure nightmare :D |
16:30:53 | FromGitter | <alehander42> but otherwise I love the interpolation thing, use it all the time |
16:30:56 | FromGitter | <krux02> yes that is very surprising |
16:31:12 | Araq | lol omg |
16:31:12 | FromGitter | <krux02> that fmt"\n" is different from fmt "\n" |
16:31:21 | Araq | that is how the language is defined |
16:31:27 | Araq | it's not even a 'fmt' thing |
16:31:35 | FromGitter | <krux02> yea |
16:31:39 | Araq | one is a raw string litearl, the other a command call |
16:32:08 | shashlick | kicked off a full test on my server to see how fast it is |
16:32:21 | Araq | I personally find fmt"\n" stupid, it means fmt doesn't only parse {} but also backslashes |
16:32:24 | FromGitter | <alehander42> i know but come on, this particular edge case is not perfect for reading |
16:32:25 | FromGitter | <krux02> javascript people also complain about how bad javascript is by pointing out their NaN values they got :shrug: |
16:33:10 | FromGitter | <alehander42> overally I am cautious with command calls, they're nice in moderation, but have many gotchas |
16:33:37 | Araq | which gotchas? never found one, they grew on me |
16:33:56 | Araq | and the more I use them, the more I appreciate them |
16:36:30 | * | nut quit (Quit: Page closed) |
16:36:31 | shashlick | so test ran in 19 minutes on my server, appveyor and travis takes 45+ minutes |
16:37:23 | FromGitter | <alehander42> `check a 2, 4` |
16:37:28 | FromGitter | <alehander42> that's a gotcha |
16:37:45 | Araq | how so? |
16:38:06 | FromGitter | <alehander42> well one could easily expect this is |
16:38:10 | Araq | it's check(a(2), 4) |
16:38:13 | FromGitter | <alehander42> `check(a(2, 4))` |
16:38:32 | FromGitter | <alehander42> no, wait |
16:38:39 | Araq | nah, command call expressions only take a single argument |
16:39:22 | FromGitter | <alehander42> well yeah, that was surprising for me cause I was used to ruby's no `(` args |
16:39:29 | FromGitter | <alehander42> and even if i know the rule |
16:39:43 | * | Vantage_ joined #nim |
16:39:47 | FromGitter | <alehander42> still it's easier to visually parse when there is max one command call on a line |
16:40:35 | Vantage_ | Why are identifiers defined the way they are, with only allowing one underscore after the first letter? |
16:40:47 | FromGitter | <alehander42> especially as echo can take many args |
16:41:09 | Araq | because underscores are separators, they better separate something |
16:41:24 | FromGitter | <alehander42> so actually I always thought commands can have >1 arg |
16:41:39 | FromGitter | <alehander42> cause echo is usually a command |
16:42:17 | Araq | a command statement can take more than one argument :-) |
16:43:31 | FromGitter | <alehander42> now, I can see how that makes sense |
16:43:45 | Araq | yay :-) |
16:43:59 | Araq | quite some discussions went into this feature... |
16:44:49 | FromGitter | <alehander42> but still I think my heuristic is good for me: use only one command call on a line |
16:45:07 | FromGitter | <alehander42> yeah, it seems tricky :D |
16:46:59 | FromGitter | <alehander42> did you plan on supporting named args :D |
16:48:22 | * | Pwntus quit (Changing host) |
16:48:22 | * | Pwntus joined #nim |
16:50:25 | FromGitter | <krux02> how do I get the first value of a set? |
16:50:36 | FromGitter | <krux02> I know I have a set with one element, how do I get it? |
16:52:40 | miran | krux02: you still think we don't need `pop` for sets? ;) |
16:53:16 | miran | i did an ugly hack for that: `for n in mySet: let a = n; break` or something like that |
16:53:41 | FromGitter | <krux02> miran: pop is mutating the set |
16:53:48 | FromGitter | <krux02> I don't want to mutate a set |
16:53:48 | dom96 | Hrm, that sounds like a wrong approach to using sets |
16:53:53 | miran | so is `incl` |
16:54:15 | FromGitter | <krux02> incl? |
16:54:22 | * | xet7 quit (Read error: Connection timed out) |
16:54:27 | dom96 | You should be mainly testing if your set contains a certain value |
16:54:29 | FromGitter | <krux02> dom96: what is a wrong aproach to use sets |
16:54:35 | miran | oh, you just want to get the value, not remove it? |
16:54:44 | miran | maybe something like `peek` in deques? |
16:54:52 | FromGitter | <krux02> no, I have a situation where I know my set contans one value |
16:54:55 | FromGitter | <krux02> and I want that value |
16:55:04 | * | xet7 joined #nim |
16:55:40 | dom96 | https://en.wikipedia.org/wiki/Set_(abstract_data_type) |
16:55:59 | FromGitter | <krux02> I don't need a link that tells me what a set is |
16:56:07 | FromGitter | <krux02> I want that value that is in my set |
16:56:27 | miran | dom96: see the "additional operations" - we need (some of) these! |
16:56:37 | FromGitter | <krux02> I know what a set is, and that a set does not have an order |
16:57:00 | FromGitter | <krux02> so indexing does not really make that much sense. |
16:57:07 | dom96 | krux02: what are you storing in your set? |
16:57:18 | FromGitter | <krux02> NimNodeKind |
16:57:43 | Vantage_ | krux convert to array or seq then get the first element |
16:58:31 | FromGitter | <krux02> well I think really the best solution here is the iterators approach |
16:58:45 | dom96 | So you want to get this NimNodeKind |
16:58:49 | dom96 | Then what will you do with it? |
16:58:55 | FromGitter | <krux02> print it |
16:58:57 | miran | Vantage_: you can iterate through set elements, no need to convert to seq/array |
16:59:12 | FromGitter | <Vindaar> The `items` iterator does the following: ⏎ ⏎ ```for h in 0..high(s.data): ⏎ if isFilled(s.data[h].hcode): yield s.data[h].key``` ⏎ ⏎ So I guess a s.data[0] should work? [https://gitter.im/nim-lang/Nim?at=5ad77960102fac7b7b26ee3e] |
16:59:19 | dom96 | Why don't you just print the set? |
16:59:21 | miran | you iterate and stop immediately after the first one |
16:59:21 | FromGitter | <krux02> I want a different message when the set is empty, when the set has one value and for evenything else |
16:59:43 | dom96 | iterating through a set to do this sounds like a hack to me |
16:59:58 | dom96 | Possibly a sign that you're using a set for something you're not supposed to be |
16:59:58 | miran | it is a hack!! |
17:00:04 | FromGitter | <krux02> dom96: yes but still the best solution |
17:00:13 | miran | no, i use it exactly for what it is |
17:00:22 | dom96 | Maybe you should use a seq instead? |
17:00:30 | FromGitter | <krux02> dom96: nope, I am using a set for exactly what it is supposed to do |
17:00:40 | * | Sembei quit (Read error: Connection reset by peer) |
17:01:00 | FromGitter | <krux02> I special case on the empty set, but apart from that. Just a normal set |
17:01:22 | FromGitter | <krux02> dom96: nope I should not |
17:01:25 | dom96 | what are you using it for? |
17:01:31 | FromGitter | <krux02> a set is what I want |
17:01:43 | FromGitter | <krux02> because I use the `in` test a lot on it |
17:01:43 | * | Sembei joined #nim |
17:01:55 | FromGitter | <krux02> it is just for printing where I want to have it look nice |
17:02:41 | FromGitter | <krux02> just be warned, I have to leave very very soon |
17:03:48 | FromGitter | <krux02> dom96: I have a special type MatchingError. and one member is expectedKind |
17:03:52 | FromGitter | <krux02> that member is a set |
17:04:15 | FromGitter | <krux02> most of the time that set is just a single element |
17:04:31 | euantor | Regarding Jenkins dom96 - probably because it’s Java |
17:04:53 | FromGitter | <krux02> and for that case I want to make the string representation nicer, so that it doesn't print the {} and has a sentence that fits a singular kind. |
17:05:12 | euantor | We use it at work and it does what it needs to. There are probably better options, but we’ve looked at some such as JetBrains TeamCity |
17:05:51 | dom96 | Okay, perhaps we do need a `pick` then |
17:06:18 | FromGitter | <krux02> and why call it pick? |
17:06:22 | FromGitter | <krux02> and nod `[]`? |
17:06:59 | dom96 | *shrug* |
17:07:02 | dom96 | that's what WP calls it |
17:07:56 | miran | yeah, we need both `pick` and `pop`! |
17:07:59 | FromGitter | <krux02> yea but we are not WP, and it is already bad enough that `card` is not called `len` |
17:10:30 | FromGitter | <krux02> well I have to go, I think I go with the iterator solution for now |
17:35:58 | FromDiscord | <claude> anyone know how to add source hyperlinks to documentation? i don't know what to do with `--docSeeSrcURl` |
17:37:35 | Vantage_ | iterating sounds best |
17:37:52 | Vantage_ | maybe make a proc getsinglevalue() |
17:38:41 | shashlick | planning on automating test case creation also in tissue |
17:40:51 | Vantage_ | claude http://docutils.sourceforge.net/docs/user/rst/quickref.html#internal-hyperlink-targets |
17:42:04 | FromDiscord | <claude> no i mean the `nim doc` switch that adds links to source automatically |
17:49:24 | dom96 | claude: google can often help: https://github.com/nim-lang/Nim/issues/7150 :) |
17:51:19 | Vantage_ | https://nim-lang.org/docs/docgen.html#related-options-see-source-switch |
17:52:52 | FromDiscord | <claude> yes i was stuck with the docgen guide thats why i asked |
17:55:58 | FromDiscord | <claude> and nothing im trying is working |
17:56:28 | FromDiscord | <claude> my command: `nim doc2 "--docSeeSrcUrl:https://github.com/<author>/<repo>/blob/`git log -n 1 --format=%H` " --project websocket` (yes i replaced the <author> and <repo>) |
17:56:32 | * | guibar joined #nim |
17:56:51 | dom96 | All I can advise is to look at what `koch docs` does, it will be calling `nim doc2` with a --docSeeSrcUrl |
17:58:24 | Vantage_ | claude wrong app |
17:58:38 | Vantage_ | claude nimweb |
17:58:45 | Vantage_ | inside tools |
17:58:59 | Vantage_ | or nvm |
18:01:37 | * | guibar quit (Quit: Konversation terminated!) |
18:01:49 | * | Vantage_ quit (Quit: Page closed) |
18:10:23 | * | Vantage_ joined #nim |
18:10:31 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
18:10:55 | Vantage_ | is there a macro like python's f-string |
18:10:57 | Vantage_ | in nim |
18:11:24 | Demos[m] | yep |
18:11:25 | Demos[m] | strfmt |
18:11:30 | Demos[m] | I think it's called |
18:11:31 | FromGitter | <alehander42> `&` |
18:11:38 | Demos[m] | it's a package on nimble |
18:11:58 | Vantage_ | dank |
18:11:59 | FromGitter | <alehander42> yes , but strfmt is an older solution |
18:12:04 | FromGitter | <alehander42> please don't use it |
18:12:11 | FromGitter | <alehander42> now we have strformat module in the stdlib |
18:12:14 | Vantage_ | so what use now |
18:12:31 | FromGitter | <alehander42> so you can use `fmt"my value {2 + 2}"` |
18:12:39 | FromGitter | <alehander42> or `&"my value {2 + 2}"` |
18:12:46 | Vantage_ | why not the package maintainer mark his package obsolete? |
18:12:52 | FromGitter | <alehander42> (most of the time `&` and `fmt` are interchangable) |
18:13:27 | FromGitter | <alehander42> well, stdlib support is pretty new |
18:13:44 | Demos[m] | oh oops |
18:13:47 | FromGitter | <alehander42> the repo is last updated 5 months ago, so it was still useful then |
18:14:51 | * | SenasOzys quit (Ping timeout: 240 seconds) |
18:26:41 | * | SenasOzys joined #nim |
18:27:11 | Vantage_ | thanks |
18:29:14 | * | SenasOzys_ joined #nim |
18:29:53 | * | SenasOzys quit (Read error: Connection reset by peer) |
18:30:58 | * | nsf quit (Quit: WeeChat 2.0.1) |
18:33:54 | * | krux02 joined #nim |
18:36:02 | * | Vantage_ quit (Quit: Page closed) |
18:41:09 | * | krux02 quit (Ping timeout: 264 seconds) |
18:46:06 | * | S1tiSchu quit (Read error: Connection reset by peer) |
18:51:52 | * | guibar joined #nim |
18:52:41 | * | guibar quit (Client Quit) |
18:53:14 | * | guibar joined #nim |
18:54:33 | * | guibar quit (Client Quit) |
18:58:42 | FromGitter | <krux02> dom96: I think it's rude to just escape user names without asking, and it is even more rude to declare an issue that mentions it as Low Priority, so please remove that Low Priority tag. |
19:00:36 | * | xet7 quit (Read error: Connection timed out) |
19:01:25 | * | xet7 joined #nim |
19:06:16 | FromGitter | <alehander42> @krux02 I added as an issue my PR suggestion |
19:08:06 | * | leru quit (Quit: Konversation terminated!) |
19:09:29 | * | PMunch joined #nim |
19:10:43 | * | Senketsu quit (Quit: Lost terminal) |
19:11:45 | FromGitter | <dandevelo> Is there any way to access private (non-exported) fields for a structure from another file? |
19:12:42 | FromGitter | <dandevelo> Reason behind this: I declare structures in a types.nim file but I implement methods on that structure in another file |
19:27:09 | PMunch | Hmm, what was the case with static arguments to macros? |
19:27:27 | PMunch | I'm trying to parse one untyped argument and a sequence of strings |
19:28:35 | PMunch | And static[seq[string]] works fine if I call it with a sequence literal, but not if I try to call it from another macro where I generate the sequence |
19:34:50 | Araq | krux02: on the positive side, this made me change my mind about escape |
19:35:00 | Araq | I now agree with you it should be deprecated. |
19:36:43 | * | couven92 joined #nim |
19:36:46 | FromGitter | <krux02> Araq: good to hear. |
19:40:30 | * | rokups quit (Quit: Connection closed for inactivity) |
19:40:33 | FromGitter | <GULPF> @Araq does that mean that I can do what I describe here? https://github.com/nim-lang/Nim/pull/7570#issuecomment-380918245 |
19:41:09 | * | byte512 quit (Ping timeout: 264 seconds) |
19:41:55 | * | byte512 joined #nim |
19:50:02 | * | rauss quit (Read error: Connection reset by peer) |
19:50:38 | * | rauss joined #nim |
19:50:46 | PMunch | Any input on the static issue? |
19:52:55 | FromDiscord | <treeform> Wow my phone thing git merged |
19:53:02 | FromDiscord | <treeform> Php* |
19:59:48 | * | nsf joined #nim |
20:07:32 | * | rauss quit (Read error: Connection reset by peer) |
20:08:08 | * | rauss joined #nim |
20:09:37 | * | miran quit (Quit: Konversation terminated!) |
20:15:48 | planetis[m] | for the += operators to work with my container type, the get proc need to return var T, right? |
20:18:05 | FromGitter | <krux02> += should not be defined on a container type |
20:18:48 | FromGitter | <krux02> += could as well be elementwise `+=` |
20:19:15 | * | Vantage joined #nim |
20:19:16 | planetis[m] | I have a matrix |
20:19:31 | FromGitter | <krux02> just look at nim-glm |
20:19:38 | FromGitter | <krux02> I implemented that |
20:19:44 | planetis[m] | ok, and the m[0, 1] += 1 doesn't work |
20:19:49 | FromGitter | <krux02> first parameter of `+=` needs to be var |
20:19:59 | planetis[m] | ok thanks |
20:20:20 | FromGitter | <krux02> m[0,1] needs to return a `var T` |
20:20:45 | FromGitter | <krux02> and then on that `var T` you can call the `+=` operator that has `var T` as first argument |
20:21:45 | planetis[m] | so I need both a `[]` that returns T and one that returns var T |
20:22:02 | FromGitter | <krux02> yes |
20:22:14 | FromGitter | <krux02> one takes a var matrix as arugment and the other one just a matrix |
20:22:53 | FromGitter | <krux02> for nim glm I also implemented all swizzle operations |
20:22:56 | FromDiscord | <treeform> Wow my php thing got merged! |
20:23:09 | planetis[m] | great many thanks krux02! |
20:23:12 | FromGitter | <krux02> v.xzwy = v2.xxyy |
20:23:35 | FromGitter | <krux02> np |
20:23:56 | planetis[m] | is that graphics stuff? |
20:24:33 | planetis[m] | oh I am doing numerical computations |
20:24:43 | planetis[m] | and need eigenvectors |
20:25:08 | planetis[m] | neo is nice but it links with lapack |
20:32:45 | * | SenasOzys_ quit (Ping timeout: 264 seconds) |
20:34:34 | FromDiscord | <geckojsc> hey, I asked this the other day but I'm still not really sure |
20:34:40 | FromDiscord | <geckojsc> how would you translate typedef uintptr_t GPU_TextureHandle; to nim ? |
20:35:21 | dom96 | krux02: rude? It's not a critical bug, the Nimble file generated is valid Nim code. |
20:37:01 | PMunch | geckojsc, type uintptr_t = GPU_TextureHandle? |
20:37:06 | FromGitter | <krux02> dom96: How do you feel when in an automatically generated e-mail your name is written wrong? |
20:38:48 | FromDiscord | <geckojsc> well, I mean for the purposes of library bindings, something like type TextureHandle = <something> |
20:39:06 | FromDiscord | <geckojsc> I noticed the standard library does things like type cuint* {.importc: "unsigned int", nodecl.} = uint32 |
20:39:19 | FromDiscord | <geckojsc> so it just guesses that cuint is the same as uint32? |
20:39:23 | * | xet7 quit (Read error: Connection timed out) |
20:39:57 | FromDiscord | <geckojsc> I'm not really sure what's going on, or how I can tell the language what a uintptr_t is in a cross-platform manner |
20:40:03 | * | xet7 joined #nim |
20:40:04 | dom96 | krux02: I can't say. Can't recall that ever happening to me. |
20:42:48 | Araq | GULPF yeah |
20:42:51 | FromGitter | <krux02> dom96: You don't concider it a critical bug. But I think you wouldn't be very happy either when I call you Dominik Pi0x630x68eta |
20:43:46 | FromGitter | <krux02> And it would make you even more unhappy if that is the way your name gets inserted automatically everywhere. |
20:43:53 | * | SenasOzys_ joined #nim |
20:43:59 | Araq | krux02: rude or not, you might as well use this time to fix it |
20:44:14 | dom96 | Sorry, but there are far more critical issues in the Nimble repo |
20:44:19 | Araq | shouldn't take long to make a PR |
20:44:28 | dom96 | Issues that actually break functionality |
20:49:19 | * | timotheecour joined #nim |
20:49:49 | Araq | hey timotheecour welcome |
20:49:50 | * | timotheecour quit (Client Quit) |
20:49:57 | Araq | oh well. |
20:54:27 | Vantage | BTW why's it called nim? |
20:54:46 | PMunch | Vantage, comes from Nimrod |
20:55:02 | PMunch | It was actually called Nimrod up until 0.10 IIRC |
20:55:05 | Vantage | I know that but why |
20:55:12 | Vantage | why why why |
20:55:21 | Vantage | does it mean dumb |
20:55:26 | PMunch | Ah no |
20:55:28 | Vantage | Why the crown |
20:55:30 | PMunch | Common misconception |
20:55:35 | PMunch | Nimrod was a biblical king |
20:55:43 | PMunch | Known for his skill in hunting |
20:55:43 | Vantage | nimrodius |
20:56:10 | Vantage | why not mention this in the manual? |
20:56:24 | PMunch | The term "nimrod" meaning idiot actually comes from bugs bunny ironically calling the hunter for "Nimrod" |
20:56:29 | Vantage | Or maybe I should just make a PR |
20:56:46 | PMunch | This reference was lost on the young audience and everyone just assumed he was calling him an idiot |
20:56:50 | Vantage | oh. that actually makes sense now |
20:56:52 | Vantage | lol |
20:56:54 | Vantage | baaad |
20:57:05 | PMunch | So the crown is from king Nimrod |
20:57:11 | Vantage | sarcasmn |
20:57:19 | Araq | PMunch, never heard it explain so well before :-) |
20:57:26 | Araq | *it being explained |
20:57:31 | Vantage | the greatest chasm of them all |
20:57:51 | * | Vladar quit (Quit: Leaving) |
20:57:52 | Vantage | Bugs Bunny was being sarcastic. |
20:58:04 | Vantage | was that the first type I heard sarcasm |
20:58:11 | PMunch | Not sure where the honey badger comes from though |
20:58:25 | PMunch | Haha, thanks Araq :) |
20:58:32 | Vantage | honey badger? |
20:58:52 | Araq | honey badgers don't give a shit and eat snakes |
20:59:02 | Araq | Python = snake |
20:59:15 | Vantage | oh gawd |
20:59:17 | Vantage | nooo |
20:59:24 | Araq | lol |
20:59:34 | Araq | the honey badger is not official, relax |
20:59:59 | Vantage | I like it |
21:00:21 | dom96 | I still think Lion makes more sense |
21:00:53 | Vantage | why? |
21:01:00 | dom96 | Because a lion is the king of the jungle |
21:01:13 | Vantage | thanks for explaining btw PMunch |
21:01:22 | dom96 | and the honey badger is Bitcoin's mascot |
21:01:23 | PMunch | Vantage, no problem :) |
21:02:36 | Vantage | is there a "What happens when you call nim" section in the manual? |
21:02:47 | PMunch | Vantage, behold the honey badger: https://github.com/nim-lang/assets/blob/master/Art/mascot.svg |
21:02:50 | Vantage | Like what config files can I use |
21:03:18 | PMunch | He really has that "don't give a shit and eat snakes" look to him :P |
21:03:37 | PMunch | Vantage, this thing: https://nim-lang.org/docs/nimc.html ? |
21:03:51 | Vantage | If he was tearing into a snake then that'd be better |
21:04:21 | PMunch | Oh well, I'm off to bed |
21:04:28 | * | PMunch quit (Quit: leaving) |
21:08:30 | * | girvo quit (Quit: Ping timeout (120 seconds)) |
21:08:56 | * | girvo joined #nim |
21:16:03 | shashlick | is the honey badger on the website? |
21:16:28 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:20:38 | Vantage | It would be nice to know which settings in nim compile are on by default and which aren't |
21:27:54 | Araq | they are all on except --threads, experimental, ssl |
21:35:14 | Vantage | ok :) |
21:40:53 | * | jrbrt joined #nim |
21:42:23 | * | rockcavera quit (Ping timeout: 256 seconds) |
21:43:58 | shashlick | when you pass an object to a proc, can you ensure a copy is made so that the proc can be spawn()'d? |
21:44:04 | * | jrbrt quit (Client Quit) |
21:48:04 | shashlick | looks like it is done by default per the manual |
21:48:42 | shashlick | https://nim-lang.org/docs/manual.html#type-bound-operations-deepcopy |
21:48:48 | * | couven92 quit (Quit: Client Disconnecting) |
21:48:51 | shashlick | but I don't understand the proc signature requirement |
21:53:25 | * | xet7 quit (Read error: Connection timed out) |
21:53:54 | Araq | you don't have to do anything |
21:53:55 | * | xet7 joined #nim |
21:54:04 | Araq | only if you want to override the =deepCopy behaviour |
21:55:37 | * | rockcavera joined #nim |
21:58:05 | FromGitter | <krux02> shashlick: when you pass stuff to other threads, it is copied. This is also required, because ref types are collected by the GC and the GC is thread local. Meaning ref objects are in a way owned by the thread. |
21:59:29 | FromGitter | <krux02> when you pass pointers to other threads, it does not deep copy. So when you want to prevent a deep copy (for some reason) convert the ref type to a ptr type |
22:00:07 | FromGitter | <krux02> but you should be aware that the ptr won't keep the object alive when the original therad doesn't have refs to that object anymore. |
22:02:48 | Araq | you can use protect() dispose() on these casted pointers though |
22:03:25 | Araq | so that the GC that is responsible knows external threads keep it alive |
22:08:59 | * | themagician quit () |
22:14:43 | shashlick | cool thanks guys |
22:15:39 | FromGitter | <krux02> did not know that. but doesnt that make the pointers essentially to shared pointers? |
22:15:56 | FromGitter | <krux02> wich synchronization |
22:24:16 | Araq | krux02: it's still not a shared pointer |
22:24:40 | Araq | protect() just marks the thing as a fake root so the GC won't collect it |
22:24:50 | Araq | dispose() disables it as a fake root |
22:25:13 | Araq | you still need to watch out you don't convert it to 'ref' |
22:29:40 | * | xet7 quit (Read error: Connection timed out) |
22:30:26 | * | xet7 joined #nim |
22:48:08 | FromGitter | <zacharycarter> dom96: is the VPS docker-enabled? the new playground version I'm building uses dind but it needs to be passed the location of the docker daemon in order to work, so the VPS has to have docker available as well |
22:48:25 | FromGitter | <zacharycarter> if we can't make that work - I'm thinking about turning the compile procedure into a lambda job and hosting it on AWS |
22:48:41 | FromGitter | <zacharycarter> and then the process running on the VPS could just call it |
22:48:47 | FromGitter | <zacharycarter> but it'd be sweet if the VPS had docker support |
22:49:04 | dom96 | zacharycarter: I don't see why it wouldn't |
22:49:34 | * | xet7 quit (Read error: Connection timed out) |
22:49:55 | * | xet7 joined #nim |
22:49:55 | dom96 | Please don't overcomplicate it though. Docker within docker sounds like it will cause trouble. |
22:50:19 | dom96 | also, are we sure that running arbitrary code in a docker container is secure? |
22:50:33 | FromGitter | <zacharycarter> well that's what the playground does today |
22:50:42 | FromGitter | <zacharycarter> or did until docker crapped out on the machine |
22:51:02 | FromGitter | <zacharycarter> I mean docker is nice because it containerizes your app and eases deployment |
22:51:30 | * | Vantage quit (Read error: Connection reset by peer) |
22:51:37 | dom96 | When it craps out it doesn't exactly inspire confidence |
22:51:44 | FromGitter | <zacharycarter> I don't have to fuck with systemd - I can just ship a docker-compose.yaml that spins up my nim process along with an nginx instance that reverse proxies it |
22:51:59 | FromGitter | <zacharycarter> well I don't have any idea why it crapped out :/ I didn't exactly maintain the droplet all that well |
22:52:14 | FromGitter | <zacharycarter> all I had was a cron job to clean up the temp files that the nim process created for compiling each request |
22:52:43 | FromGitter | <zacharycarter> I don't mind hosting this on my own infrastructure - so that we don't have to worry about my stuff bringing down the VPS |
22:52:58 | FromGitter | <zacharycarter> but if that's the case - I'm going to do things with docker and ease deployment so I don't have to work with systemd etc |
22:53:17 | FromGitter | <zacharycarter> I just don't have the time / bandwidth to maintain and monitor this thing |
22:53:27 | FromGitter | <zacharycarter> well monitor it - I can maintain it / improve it |
22:53:30 | FromGitter | <zacharycarter> but I'm not a sysadmin |
22:54:20 | dom96 | Once you set up systemd/nginx there isn't a lot to do |
22:54:34 | dom96 | or am I missing something? |
22:58:52 | FromGitter | <Varriount> @zacharycarter I like systemd |
22:59:09 | FromGitter | <Varriount> Much better than init, anyway |
22:59:23 | FromGitter | <zacharycarter> I'm not trying to poo all over systemd |
23:00:08 | FromGitter | <zacharycarter> but no - there's more to the playground than that |
23:00:31 | FromGitter | <zacharycarter> the playground needs FS access and a tmp directory to store files in - I have not explored ephemeral FS yet |
23:00:37 | FromGitter | <zacharycarter> so that needs to be managed too |
23:00:55 | FromGitter | <zacharycarter> with docker - it's much easier, as the container FS is ephemeral already |
23:01:18 | FromGitter | <zacharycarter> not to mention, again, I can spin up all of this in a container with one command, and restrict network / FS access from the container to the host machine |
23:01:42 | FromGitter | <zacharycarter> which is why people have tried to write compiler bombs, etc... on the playground and never cause any real damage |
23:02:19 | FromGitter | <zacharycarter> they kill their own process and that's pretty much it |
23:02:28 | dom96 | I'm not saying you shouldn't use docker at all |
23:02:37 | dom96 | It's necessary for a sandbox |
23:02:45 | FromGitter | <zacharycarter> you can also harden docker, and I believe docker to already be pretty secure - https://docs.docker.com/engine/security/security/#conclusions |
23:03:49 | dom96 | I just don't think you should bundle the actual backend in a docker container |
23:04:21 | FromGitter | <zacharycarter> why not? |
23:04:37 | FromGitter | <zacharycarter> again - I could just turn it into a FaaS |
23:04:49 | FromGitter | <zacharycarter> and then we don't have to worry about any of it |
23:04:57 | dom96 | because it's a complex architecture |
23:05:36 | FromGitter | <zacharycarter> in what capacity? |
23:06:23 | FromGitter | <zacharycarter> like - I think docker is simplifying things |
23:06:39 | FromGitter | <zacharycarter> but I feel like you're viewing it as making things more complex - or maybe just less secure? |
23:07:05 | FromGitter | <zacharycarter> I can definitely just deliver a binary - but I feel like docker helps with testing on a local machine |
23:07:10 | FromGitter | <zacharycarter> docker helps with deployment |
23:07:12 | dom96 | I'm just worried because you mentioned it crapping out. If you add another layer of docker into this then the odds of that happening again sounds even more likely |
23:07:24 | FromGitter | <zacharycarter> I think the odds will be less likely tbh |
23:07:49 | FromGitter | <zacharycarter> because the filesystem manipulation / etc that the process actually performs will be containerized |
23:08:02 | dom96 | It's your project so it's your choice |
23:08:08 | dom96 | I have no experience with docker |
23:08:15 | FromGitter | <zacharycarter> I think the only way it craps out - is if the docker daemon running on the host isn't responsive |
23:08:35 | FromGitter | <zacharycarter> well you have a wonderful world to explore IMO :) |
23:08:42 | dom96 | definitely |
23:08:50 | FromGitter | <zacharycarter> docker is the tits |
23:09:13 | FromGitter | <zacharycarter> you install docker - and then never have to install any program on your machine again, without trying it out first |
23:09:22 | FromGitter | <zacharycarter> in a containerized environment |
23:09:58 | FromGitter | <zacharycarter> you can spin up a db, a web app, a backend service and a web proxy with one command and two yaml files |
23:10:06 | FromGitter | <zacharycarter> and again - it's all containerized |
23:10:30 | FromGitter | <zacharycarter> and then you can add something like - Nomad, or Kubernetes or Apache Mesos on top of all this |
23:10:42 | FromGitter | <zacharycarter> and then when your docker container running the nim playground goes down |
23:10:48 | FromGitter | <zacharycarter> it just spins up another |
23:11:14 | FromGitter | <zacharycarter> it can horizontally auto scale based on cluster metrics |
23:11:14 | FromGitter | <zacharycarter> etc |
23:11:16 | dom96 | okay, well, at the minute the playground is down |
23:11:23 | dom96 | So let's get it up again |
23:11:30 | FromGitter | <zacharycarter> yeah I know - that's why I'm working on this new version |
23:11:35 | dom96 | People do depend on it now |
23:11:35 | FromGitter | <zacharycarter> because the old version was a PITA to maintain |
23:11:53 | FromGitter | <zacharycarter> and I can't readily fix the old playground without destroying the droplet |
23:12:11 | FromGitter | <zacharycarter> because I don't know how to get docker working on it again - I spent a few hours on Monday evening or whatever day it went down, trying to figure it out |
23:12:41 | dom96 | so what's the hold up on the new version? |
23:14:22 | FromGitter | <zacharycarter> nothing atm - it's just I only got the host and child docker processes to communicate with each other the other night, so now I'm in the middle of moving the code over and getting everything working - I'm pretty sure I'm almost there, I'd say like 80% |
23:14:45 | FromGitter | <zacharycarter> but I wanted to check on the docker thing to make sure I wasn't going down a path I shouldn't be |
23:14:51 | dom96 | okay, so you just need time. |
23:14:59 | FromGitter | <zacharycarter> yeah - def by the end of the week I'll be done |
23:15:47 | FromGitter | <zacharycarter> job's driving me insane right now AND I'm waiting to hear back from the game dev opportunity so I'm a bit frazzled but I'm nearing the finish line too |
23:15:56 | * | BitPuffin quit (Remote host closed the connection) |
23:16:25 | FromGitter | <zacharycarter> I also started another branch for the project and I'm looking into addressing some of the feature requests that our BDFL and others have made |
23:17:38 | FromGitter | <zacharycarter> I'd like to eventually arrive at something that looks more like - https://webassembly.studio/ - minus the project selection GUI - than what we have today |
23:18:08 | FromGitter | <zacharycarter> and I talked to the author of that project about adding Nim support and he told me what needed to be done, so that's on my todo list as well in the next couple of weeks |
23:18:54 | FromGitter | <zacharycarter> they're using the VSCode editor which I think makes sense for the playground too |
23:20:03 | * | wishi_ quit (Remote host closed the connection) |
23:20:04 | * | byte512 quit (Ping timeout: 246 seconds) |
23:20:06 | dom96 | btw I reused your site a bit to make a web front end for my dissertation project, hope you don't mind :) https://picheta.me/obfuscator |
23:20:17 | federico3 | dom96: docker is not necessary for sandboxing (on the contrary...) |
23:20:59 | FromGitter | <zacharycarter> not at all :) |
23:21:20 | FromGitter | <zacharycarter> isn't containerization different from sandboxing? |
23:21:23 | * | byte512 joined #nim |
23:21:33 | federico3 | it is |
23:22:16 | * | wishi joined #nim |
23:25:46 | dom96 | 'night |
23:29:43 | FromGitter | <zacharycarter> I don't pretend to be an infrastructure person / sysadmin but as a software dev I feel like docker / other container solutions are a godsend |
23:37:56 | * | xet7 quit (Read error: Connection timed out) |
23:38:24 | * | xet7 joined #nim |
23:50:58 | * | user1101_ joined #nim |
23:52:40 | * | user1101_ quit (Client Quit) |
23:53:01 | * | user1101 quit (Ping timeout: 256 seconds) |
23:54:20 | * | user1101 joined #nim |
23:56:25 | * | user1101 quit (Read error: Connection reset by peer) |
23:58:19 | * | user1101 joined #nim |