00:57:29 | * | arkurious quit (Quit: Leaving) |
01:13:07 | FromDiscord | <Hi02Hi> is `object of Foo[bool]` possible? |
01:24:16 | FromDiscord | <leorize> yes |
01:24:40 | * | TakinOver joined #nim |
01:35:37 | FromDiscord | <Bung> @leorize does nim generated dll supposed to work ? I tried differient compile flags , it will raise differient errors |
01:36:16 | FromDiscord | <leorize> they do work on linux atleast |
01:36:19 | FromDiscord | <leorize> what are you trying to do? |
01:39:13 | FromDiscord | <Bung> I compiled dll to be a theme then use its render procs render html, with just `--app:lib` I always get nil access in loop , well, the place may differient. am sure all items in sequence are not nil. |
01:39:52 | FromDiscord | <leorize> can I see the code? |
01:40:42 | * | PersonMcGuy quit (Quit: Client closed) |
01:41:45 | FromDiscord | <Bung> https://github.com/bung87/crown_ui/blob/82788573515b5450b57514ed51b0de3a9dee5c86/src/crown_ui/generator.nim#L467 |
01:43:01 | FromDiscord | <Bung> the main proc I point to my local blog source, It can use `example` directory, but that case it runs without problem. |
01:45:57 | FromDiscord | <leorize> what's the target for the library? |
01:46:05 | FromDiscord | <leorize> to be linked with something else or to be loaded as a plugin? |
01:46:34 | FromDiscord | <Bung> load as theme system |
01:47:12 | FromDiscord | <leorize> loaded as a plugin? |
01:47:29 | FromDiscord | <Bung> yeah . |
01:47:53 | FromDiscord | <leorize> can I see the loader and how the loaded library is used? |
01:48:33 | FromDiscord | <Bung> `# const exampleDir = currentSourcePath.parentDir.parentDir.parentDir / "example"` you can uncomment this line |
01:49:06 | mst | this may be a stupid question but I'm not sure where I'd look - I can see how to build a C-loadable shared library from nim code but is it possible to have -two- shared libraries loaded into the same C program and have them share an ORC ? |
01:49:25 | FromDiscord | <leorize> `-d:useNimRtl` is your friend here |
01:49:42 | FromDiscord | <leorize> alternatively `-d:useMalloc` also works |
01:49:58 | mst | hrm? |
01:50:18 | mst | sorry, was that to Bung or to me, can't tell |
01:50:23 | mst | too ignorant just yet :/ |
01:50:32 | FromDiscord | <leorize> orc is not a stack-scanning garbage collector |
01:50:45 | FromDiscord | <leorize> it's more of a destructor-based one |
01:50:52 | mst | I know it's not, it's an optimised implementation of the recycler paper |
01:51:01 | FromDiscord | <leorize> so as long as you share the memory allocator between the two libraries, it should work |
01:51:20 | FromDiscord | <leorize> `-d:useMalloc` is a good way since you will share the memory allocator with the C program too |
01:51:42 | mst | yeah, it's how to get the ORC cycle-breaking code shared that I was pondering |
01:52:05 | FromDiscord | <leorize> `-d:useNimRtl` would be what you're looking for |
01:52:11 | FromDiscord | <leorize> but that option is extremely experimental |
01:52:32 | mst | ah, so that creates a shared library for the runtime that both can link against? |
01:52:36 | FromDiscord | <Bung> I tried all flags you suggested and tried change gc |
01:53:16 | mst | extremely experimental is fine, a big reason I came to nim is that I wanted a recycler based refcounting gc |
01:53:36 | FromDiscord | <leorize> see that for generating nimrtl |
01:53:50 | FromDiscord | <leorize> @Bung\: I need to see the code where you load the compiled plugin |
01:53:55 | mst | I can totally live with sharp edges that I might have to patch, it's still a huge improvement over trying to implement the entire bastard thing myself |
01:54:48 | * | mst was seriously considering a full recycler implementation in rust before realising nim existed |
01:54:59 | FromDiscord | <Bung> it's in `build` proc from line 514:`let libTheme = loadLib(themePath)` to 534: `unloadLib(libTheme)` |
01:55:45 | mst | leorize, thank you |
01:56:47 | FromDiscord | <leorize> @Bung\: first, you need nimrtl |
01:57:14 | FromDiscord | <leorize> secondly, you're exporting a procedure with `cdecl` but you're calling it with `stdcall` |
01:58:00 | FromDiscord | <leorize> you might find shashlick's plugins handy for this\: https://github.com/genotrance/plugins |
01:58:02 | fn | <R2D299> itHub: 7"Plugin system for Nim" |
02:05:35 | * | jkl quit (Quit: ZNC 1.8.2 - https://znc.in) |
02:07:47 | FromDiscord | <Bung> `-d:useNimRtl` I get compile time error. |
02:08:39 | FromDiscord | <Bung> without `stdcall` symbol can't be casted. |
02:09:31 | FromDiscord | <Bung> I dont quite get the idea of plugins package, it only has apis document.. |
02:13:58 | FromDiscord | <leorize> plugins let you do the exact thing that you're doing |
02:14:04 | FromDiscord | <leorize> more structured, of course |
02:14:10 | FromDiscord | <leorize> change it to `cdecl`↵(@Bung) |
02:14:53 | FromDiscord | <leorize> since the two heaps are not shared |
02:14:53 | FromDiscord | <leorize> if you can't `-d:useNimRtl`, then I'd say passing memory between your program and the plugin is very dangerous |
02:21:12 | FromDiscord | <Bung> sent a long message, see http://ix.io/3rkh |
02:21:59 | FromDiscord | <Bung> when use `-d:useNimRtl` , highlite module problem ? |
02:24:00 | FromDiscord | <leorize> looks so to me |
02:24:14 | FromDiscord | <leorize> `--gc:orc -d:useMalloc` is a viable alternative |
02:24:37 | FromDiscord | <ajusa> Any ways around the fact that you can't name two fields the same thing in variant objects? |
02:25:15 | FromDiscord | <ajusa> I know there's an open RFC, but should I just prefix the kind or something like that to the field name so that they don't clash? |
02:25:32 | mst | ajusa, use different names for the fields and use a virtual method to have the same name for usage? |
02:26:08 | FromDiscord | <Bung> with `--gc:orc -d:useMalloc` it even acess ref object's string field became nil. |
02:27:51 | FromDiscord | <Bung> I thought with `--app:lib` every thing works fine, the fact is not that easy. |
02:27:51 | FromDiscord | <ajusa> In reply to @mst "<@102899813149855744>, use different names": oooh good idea |
02:28:51 | mst | I wasn't intending to be condescending, the 'virtual method' part was the reason I mentioned it ;) |
02:29:16 | mst | (I mean, I do totally manage to be condescending unintentionally sometimes, but I was hoping this wasn't one of them) |
02:29:30 | FromDiscord | <ajusa> No no I legitimately think it's a good idea, thanks for the advice. It didn't occur to me at all |
02:30:39 | FromDiscord | <leorize> yea, its one of the lesser tested features↵(@Bung) |
02:30:48 | mst | the way it quoted only included the "use different names" part of what I'd said so I wanted to check :D |
02:31:17 | mst | but esp. given Nim's ability to have setter methods that work with = I -think- you can end up with something pretty clean |
02:31:54 | mst | (I have a lot of experience in multiple languages of painting myself into a corner and having to get creative to escape ;) |
02:33:01 | FromDiscord | <Bung> @leorize Thanks let me know that! I spend whole day with no clue. |
02:34:23 | FromDiscord | <leorize> @ajusa\: you might want to give https://github.com/nim-lang/RFCs/issues/368 a bump |
02:39:12 | FromDiscord | <Bung> I looked plugins module, it seems it do hot reload module , version files, call dll proc with string arg, so if my dll's proc params are all serialized , things could be simpler ? |
02:44:18 | * | jkl joined #nim |
02:55:42 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
02:57:25 | * | Gustavo6046 joined #nim |
03:14:30 | * | Guest3434 joined #nim |
03:14:38 | * | Guest3434 quit (Client Quit) |
03:43:07 | FromDiscord | <@bracketmaster-5a708063d73408ce4> can I define a variable in nim that can only take on values between 0 and 5 inclusive? |
03:47:24 | FromDiscord | <@bracketmaster-5a708063d73408ce4> I seem to have been able to do this some time ago |
03:50:51 | FromDiscord | <leorize> [BracketMaster (Yehowshua Immanuel)](https://matrix.to/#/@bracketmaster-5a708063d73408ce4f8ad7ee:gitter.im)\: yes, use the range type |
03:51:50 | * | federico3 quit (Changing host) |
03:51:50 | * | federico3 joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:37 | * | supakeen joined #nim |
04:20:40 | FromDiscord | <stu002> Can more experienced nimsters comment on trying to associate a type in a concept, as per here: https://forum.nim-lang.org/t/8161 |
04:21:33 | FromDiscord | <Elegantbeef> Ah sorry you had the fun experience of that one response |
04:23:22 | FromDiscord | <Elegantbeef> What's the point of the Epsilon type? |
04:23:22 | FromDiscord | <Elegantbeef> Basically a wild card? |
04:45:07 | FromDiscord | <stu002> In this case it's a relative error term for the "equality" test. So comparing f64's could use something other than f64 for the epsilon term. |
04:45:37 | FromDiscord | <stu002> But I can see completely different usages of concepts where some kind of "associated" type is very handy |
04:46:28 | FromDiscord | <stu002> Template concepts I think will work, but seems a wrong-ish use of the template type |
04:50:12 | FromDiscord | <ElegantBeef> Ah well the bridge is being comically slow, so you may want to look at the devel concepts, also they're generics 😄 |
04:50:24 | FromDiscord | <ElegantBeef> like this is the modern concept method https://media.discordapp.net/attachments/371759389889003532/858932321640906752/unknown.png |
04:50:59 | FromDiscord | <ElegantBeef> I dont know if the old generics have a way to say "This parameter slot can be any of these types" |
04:51:34 | FromDiscord | <ElegantBeef> old concepts |
05:05:52 | FromDiscord | <Rika> Concept with generic T |
05:05:54 | FromDiscord | <Rika> Probably |
05:21:46 | FromDiscord | <stu002> In reply to @ElegantBeef "I dont know if": Very nice! Will try that out right now |
05:22:55 | FromDiscord | <stu002> Are the "new style" concepts a Nim V2.x feature or could appear in a 1.x release? |
05:24:25 | FromDiscord | <Elegantbeef> They're in `devel` right now and will probably be released with 1.6 afaik |
05:25:13 | FromDiscord | <stu002> Am I right in saying the new style concepts don't have concept refinement, i.e. a "type T is ParentConcept" clause allowed? |
05:26:50 | FromDiscord | <Elegantbeef> Dont know if they do, hopefully some remnants of the old style since it seems new style are limited in some regards |
05:27:22 | FromDiscord | <Elegantbeef> old style stay\ |
05:28:11 | FromDiscord | <stu002> I was going off comments in Github for that observation, I'd better actually implement some tests myself first |
05:28:27 | FromDiscord | <Rika> In reply to @stu002 "Am I right in": It’s not recommended per the new concept RFC |
05:29:18 | FromDiscord | <stu002> In reply to @Rika "It’s not recommended per": That could be a big problem for me and for Nim libraries like "Emmy". Sigh. |
05:29:48 | FromDiscord | <Rika> You can still do it just not supposedly inside another concept |
05:30:26 | FromDiscord | <stu002> In reply to @Rika "You can still do": Interesting, are there more examples of the new style concepts somewhere? |
05:34:38 | FromDiscord | <stu002> I'd be very happy with `type NumTest = concept of Something` if that came about. |
05:35:26 | FromDiscord | <Elegantbeef> What'd that do |
05:36:22 | FromDiscord | <Elegantbeef> You could do that with macros if i understand the implication of "This needs all conditions of X" |
05:36:51 | FromDiscord | <stu002> I haven't thought this through but as an alternative to the old style `...type T` and `T is Something` in the concept body. |
05:39:07 | FromDiscord | <stu002> I don't have enough experience with Nim to know how macros would work out in practice as a work-around, but wouldn't we end up with hundreds of slightly different concept refinement macros--one for each library? |
05:41:57 | FromDiscord | <stu002> My use of concepts is very similar to the use here: https://github.com/andreaferretti/emmy/blob/master/emmy/structures.nim |
05:42:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3rkV |
05:42:59 | FromDiscord | <stu002> In reply to @Elegantbeef "Well the idea i": That's neat too. |
05:44:21 | FromDiscord | <Elegantbeef> I truthfully havent used concepts much so only have some brief theoretical knowledge of them 😀 |
05:46:26 | FromDiscord | <stu002> I'm sure there's a very good reason the new concepts don't include refinement (as generics can do), but have too little Nim experience to judge |
05:54:20 | * | Guest31 joined #nim |
05:55:48 | * | Guest31 quit (Client Quit) |
06:02:38 | FromDiscord | <Rika> Why can’t you make a type that says “concept and concept and concept” |
06:02:55 | FromDiscord | <Rika> Aka what you want except the concepts themselves do not restrict |
06:07:45 | FromDiscord | <impbox [ftsf]> concepts seemed like a cool concept, but i've only used them a little |
06:18:07 | FromDiscord | <Rika> I always treated it as a way to do static duck typing |
06:31:19 | FromDiscord | <haxscramper> @mratsim at nim conf you talked about status providing some sort of support for nimble development (approximately `19:14` in the talk). Can you talk about that more - from what I can understand you are aiming to improve nimble features that status needs, correct? |
06:55:44 | FromDiscord | <impbox [ftsf]> is there a way to force sending content-length with a zero length body post with httpclient? |
06:55:58 | FromDiscord | <impbox [ftsf]> remote server is returning 411 Length Required |
06:57:30 | FromDiscord | <Rika> Does putting it in the sent headers not work? I forgot if you could manually force headers though |
06:59:13 | FromDiscord | <impbox [ftsf]> I tried including it in the headers argument to `request` |
07:00:16 | FromDiscord | <Rika> How did it go? |
07:00:29 | FromDiscord | <Rika> Wait that’s a dumb question |
07:00:55 | FromDiscord | <Rika> Are you sure the server accepts an empty post? |
07:01:52 | FromDiscord | <impbox [ftsf]> yep, was previously working too |
07:02:15 | FromDiscord | <impbox [ftsf]> hmm wonder if i can fix it by reverting nim version |
07:14:27 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3rlh |
07:14:29 | FromDiscord | <impbox [ftsf]> so content-length is being sent |
07:14:39 | * | PMunch joined #nim |
07:14:39 | FromDiscord | <impbox [ftsf]> so maybe it's the remote server that's wrong |
07:15:05 | FromDiscord | <impbox [ftsf]> maybe expecting "Content-Length" instead of "content-length" |
07:18:35 | FromDiscord | <Rika> So a noncompliant server lol |
07:18:57 | FromDiscord | <impbox [ftsf]> could be... i can only speculate so far, will try and narrow it down |
07:20:45 | FromDiscord | <impbox [ftsf]> nope, same issue with Content-Length: 0 |
07:20:46 | * | PMunch quit (Ping timeout: 252 seconds) |
07:22:43 | FromDiscord | <impbox [ftsf]> ok.. i just realised it's totally unrelated. sorry ~_~ |
07:22:52 | FromDiscord | <impbox [ftsf]> i'm setting headers where i'm supposed to set body content |
07:25:51 | FromDiscord | <Rika> Lol |
07:26:04 | FromDiscord | <impbox [ftsf]> I'm certain it used to work so confused |
07:26:12 | FromDiscord | <Rika> Good thing it’s resolved now though |
07:32:04 | FromDiscord | <impbox [ftsf]> I haven't managed to resolve it, but oh well. I don't think nim is the problem here |
07:32:28 | FromDiscord | <Rika> Check with another language if you want to truly make sure lol |
07:32:40 | FromDiscord | <impbox [ftsf]> good idea |
07:33:10 | * | PMunch joined #nim |
07:40:41 | FromDiscord | <impbox [ftsf]> hmm it return 200 via python |
07:42:45 | FromDiscord | <Rika> Maybe analyse the difference between the requests sent by both |
07:43:03 | FromDiscord | <impbox [ftsf]> yep, that's my next step, a bit harder since it's https |
07:43:34 | FromDiscord | <Rika> Can’t you make a dummy server to send the request to |
07:44:08 | FromDiscord | <impbox [ftsf]> yeah I guess I can! I guess the reponse doesn't matter since I just want to compare what's being sent |
07:44:12 | fn | <ForumUpdaterBot99> New thread by Alexeypetrushin: Why other templates stop working if the T -> Option[T] converter defined?, see https://forum.nim-lang.org/t/8166 |
07:44:19 | FromDiscord | <impbox [ftsf]> thanks for rubber ducking, my brain is tired today |
07:45:31 | FromDiscord | <Rika> It’s fine |
07:46:36 | FromDiscord | <Avatarfighter> o/ Rika how are you 😄 |
07:46:58 | FromDiscord | <Rika> I’ve been stressed for weeks |
07:47:29 | FromDiscord | <Avatarfighter> What about ? |
07:47:50 | FromDiscord | <Rika> I’ll talk about it in #offtopic since it’s not very related |
07:48:12 | FromDiscord | <Avatarfighter> 👍 |
07:53:07 | PMunch | Is there a way to see the live comments for the NimConf videos? |
07:53:36 | PMunch | Can we get coloured nicks for the FromDiscord bot as well? |
07:53:54 | PMunch | Should be a really simple copy/paste from the freenode/libera bridga |
07:57:53 | FromDiscord | <Avatarfighter> Live comments as in the chat ? |
07:58:36 | FromDiscord | <Avatarfighter> You should be able to maximize the chat box on the right by clicking on it and then changing it from "Top chat replay" -> "Live chat replay" to see what people were talking about |
07:59:38 | FromDiscord | <saem> [Araq (Andreas Rumpf)](https://matrix.to/#/@araq-560408fc0fc9f982beb1b5e2:gitter.im) I enjoyed the Zen of Nim talk, quite a bit. |
08:00:25 | FromDiscord | <hamidb80> In reply to @saem "[Araq (Andreas Rumpf)](https://matrix.to/#/@araq-56": quite a bit.? |
08:01:30 | FromDiscord | <saem> More than the typical programming talk on YouTube. |
08:01:52 | PMunch | @Avatarfighter, chat box on the right? |
08:02:54 | FromDiscord | <Avatarfighter> PMunch: there should be a little box that says "Show chat replay" on the right above the playlist of nimconf |
08:02:55 | PMunch | Ah right, I found it :) |
08:03:13 | PMunch | I mean that is some horrible UX right there |
08:03:17 | FromDiscord | <Avatarfighter> yeah it is |
08:03:26 | PMunch | Why isn't it with the other chat?! :P |
08:03:31 | FromDiscord | <Avatarfighter> right lol |
08:03:43 | FromDiscord | <Avatarfighter> make sure you switch it from "Top chat replay" to "Live chat replay" |
08:04:16 | fn | <ForumUpdaterBot99> New thread by Lecale: Execute process without waiting for the result, see https://forum.nim-lang.org/t/8167 |
08:09:50 | FromDiscord | <saem> Anyhow, bunch of interesting points. I understand they're meant to be taken together, yet the structured programming one stood out. I'm wondering if I'm currently reading between the lines but you leak towards structured concurrency approaches as well? |
08:11:03 | FromDiscord | <impbox [ftsf]> Interesting, comparing nim http request to python's requests: python doesn't lowercase the header names, sends Content-Length: 0 as the last header before the body, maybe that's significant |
08:13:39 | FromDiscord | <impbox [ftsf]> https://media.discordapp.net/attachments/371759389889003532/858983467843584010/unknown.png |
08:14:13 | FromDiscord | <Avatarfighter> I'm really surprised you need to send Content-Length with no payload, that doesn't comply with the http spec |
08:15:30 | FromDiscord | <Avatarfighter> oh nevermind I read the spec wring |
08:15:32 | FromDiscord | <Avatarfighter> (edit) "wring" => "wrong" |
08:15:42 | FromDiscord | <Avatarfighter> I thought you had specified a Transfer-Encoding |
08:16:55 | FromDiscord | <stu002> In reply to @Rika "I always treated it": In other languages it's a kind of ad-hoc polymorphism and I found it a very natural way to think about some problem domains, e.g. abstract algebra. In that domain I can create functions that deal with (say) a Group, knowing that I'll also have the capabilities of a Monoid as every group is a Monoid (with extra capabilities). |
08:18:45 | FromDiscord | <saem> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/858979943677034531): Araq (Andreas Rumpf) I enjoyed the Zen of Nim talk quite a bit. |
08:20:07 | * | max22- joined #nim |
08:20:58 | FromDiscord | <impbox [ftsf]> ok, fixed the issue! the x-secretkey was being read from a file and included a newline which was getting included in the header text which broke up the headers |
08:21:16 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3rlF |
08:21:20 | FromDiscord | <impbox [ftsf]> so the headers after the newline didn't get read by the server |
08:23:02 | FromDiscord | <saem> That was also my hope with concepts, well a compiler time variety that wouldn't necessary play seamlessly with dynamic linking as a fair compromise, but alas they seem to be moving further away from that with the newer version. It's been a while since I really dug in.↵(@stu002) |
08:23:03 | FromDiscord | <Elegantbeef> Insert my normal "Strings were a mistake" comment here |
08:32:28 | FromDiscord | <mratsim> In reply to @haxscramper "<@!570268431522201601> at nim conf": We had someone hired part-time to work on developer toolings, including nimble but iirc they got busy and we are looking for a new person. |
08:33:55 | FromDiscord | <haxscramper> In reply to @mratsim "We had someone hired": For full-time nimble development? Also, are these points still relevant: https://gitter.im/nim-lang/Nim?at=5c990b3d2fb6800d807ca70a |
08:35:19 | FromDiscord | <mratsim> In reply to @haxscramper "For full-time nimble development?": documentation and vscode as well: https://github.com/nim-lang/RFCs/issues/300 |
08:36:08 | FromDiscord | <mratsim> In reply to @haxscramper "For full-time nimble development?": maybe not, some of them still are but we can rediscuss the objectives |
09:02:13 | FromDiscord | <haxscramper> In reply to @mratsim "We had someone hired": From what I read on your job postings etc. you are mostly looking for people with rust/Cxx/Go development experience, correct? What do you think about idea of "just copy cargo for nim?" |
09:02:47 | FromDiscord | <haxscramper> Or at least a meaningful subset of features |
09:05:00 | FromDiscord | <mratsim> In reply to @haxscramper "From what I read": Would work for us I think. |
09:15:46 | FromDiscord | <Rika> What features are you guys thinking of copying |
09:17:45 | FromDiscord | <haxscramper> package features, build/development/package-specific confgurations |
09:18:10 | FromDiscord | <haxscramper> centralized with support for custom registries and fallback to git repositories |
09:19:41 | FromDiscord | <haxscramper> generali desig |
09:19:43 | FromDiscord | <haxscramper> (edit) "desig" => "design" |
09:19:48 | FromDiscord | <Clonkk> reproducible builds, lockfile, dependencies resolution, way of deploying source, binary, shared library, third parties shared libaries from the package manager |
09:20:02 | FromDiscord | <Clonkk> That would be my go-to list for package manage features |
09:20:21 | FromDiscord | <haxscramper> I'm mostly talkint about not reinventing the wheel and instead just copying cargo design decisions |
09:20:51 | FromDiscord | <haxscramper> where it makes sense |
09:22:17 | FromDiscord | <Rika> `package features`? the specific configs are nice yes |
09:22:27 | FromDiscord | <Clonkk> Rust is only based on atoml file if I'm not mistkaen ? |
09:22:31 | FromDiscord | <haxscramper> correct |
09:22:40 | FromDiscord | <haxscramper> Though they have support for build scripts |
09:22:58 | FromDiscord | <haxscramper> In nimble it is somewhat more complicated |
09:23:10 | FromDiscord | <Clonkk> Yeah because having a way to script some stuff can be useful. Maybe we could take some inspiration from Groovy as well |
09:23:14 | FromDiscord | <Rika> In reply to @SneakyBaguette "reproducible builds, lockfile, dependencies": lock file would be nice, better dep. res. is being worked on already i believe |
09:23:15 | FromDiscord | <Clonkk> Just some thoughts |
09:23:37 | FromDiscord | <Rika> im not really one to use a language's package manager to install binaries |
09:25:09 | FromDiscord | <Clonkk> If oyu have a package that wraps a library, you may end up needing to download / rebuild the third_party library usig a specific versions / compile time options. In this situations, having a scripting language in PM can really shines |
09:25:50 | FromDiscord | <ElegantBeef> Yea it does seem so, so i guess i'm here now |
09:26:25 | FromDiscord | <haxscramper> In reply to @Rika "lock file would be": no, I don't think it is |
09:26:26 | FromDiscord | <ElegantBeef> Matrix bridge dieded |
09:26:57 | * | max22- quit (Ping timeout: 268 seconds) |
09:31:19 | FromDiscord | <Rika> it aint? huh |
09:32:01 | FromDiscord | <haxscramper> at one of the dev meetings araq briefly mentioned he wrote sat solver that can be used for nimble. I think |
09:32:02 | FromDiscord | <ElegantBeef> Well third party dependencies are just terrible for any automated build like you have a few options if the package doesnt exist, check the system package manger, clone the repo then build it from a script, all of which depends on the OS or even just distribution 😄 |
09:32:04 | FromDiscord | <haxscramper> that's all |
09:36:10 | FromDiscord | <Clonkk> In reply to @ElegantBeef "Well third party dependencies": It's because third parties can be terrible and non-standard that you need a scripting language ^^ |
09:36:46 | FromDiscord | <ElegantBeef> Are we talking about third party system libraries? |
09:36:55 | FromDiscord | <Clonkk> Not necessarily "system" |
09:37:33 | FromDiscord | <Rika> even given a scripting language its terrible is it not |
09:37:44 | FromDiscord | <ElegantBeef> Well there are so many ways to source them |
09:38:39 | FromDiscord | <ElegantBeef> Like think about just sdl2, you can fetch the .dll for windows easily, but now fetch it on linux, oh you now have to figure out what package manager the user uses then send the install for that specific one to sdl2, then if they're using an obscure one you have to clone the repo and build the project 😄 |
09:39:01 | FromDiscord | <Clonkk> For example, the FFTW3 wrapper uses some specific compile options to have threads capabilities. The OS package manager do not offer a package with the options I want.↵Since I can't distribute a third_parties libraries that is specific to a Nimble package, the only solution is to ask the user to compile it themselves (which isn't robust and may break other package on their system that uses FFTW with different options) |
09:39:20 | FromDiscord | <Clonkk> So ideally, there would need to be a way to tell Nimble that X package depends on X third_parties |
09:39:35 | FromDiscord | <ElegantBeef> Sure that's doable but i dont see how you can safely manage a build of that package |
09:39:42 | FromDiscord | <Rika> its nontrivial |
09:39:48 | FromDiscord | <Clonkk> It's not trivial at all |
09:41:02 | FromDiscord | <Clonkk> But the more libraries I wrap, the more I want something like it 😄 |
09:41:14 | FromDiscord | <ElegantBeef> But it's a logistical nightmare 😄 |
09:42:13 | FromDiscord | <Clonkk> Realistically, having a "lib" folders where you can tell nimble to install shared libraries would be enough |
09:42:23 | FromDiscord | <Clonkk> (edit) "enough" => "~~enough~~ a start" |
09:43:07 | FromDiscord | <ElegantBeef> Wonder the licensing implications of that |
09:43:46 | FromDiscord | <ElegantBeef> I'm tired and silly |
09:45:18 | FromDiscord | <Clonkk> In reply to @ElegantBeef "Wonder the licensing implications": Licensing is complicated when you get down non-obvious case tbh |
09:46:03 | FromDiscord | <ElegantBeef> But as hax did point out most nimble packages can be resolved using simple comparison on the parsed semver versions, and i atleast had a single depth version of that in nimble, though it's a dumb impl since it doesnt do anything but the packaged deps and first level children 😄 |
09:49:25 | FromDiscord | <haxscramper> I don't think it is necessary to manage external package versions from nimble |
09:49:52 | FromDiscord | <haxscramper> Whoever writes wrapper for external library can just manage versions appropriately |
09:50:19 | FromDiscord | <haxscramper> Like a lot of system packages don't follow semver |
09:51:13 | FromDiscord | <ElegantBeef> Yea it's just hell out in the real world 😄 |
09:51:28 | FromDiscord | <ElegantBeef> Every versioning for itself |
09:53:43 | FromDiscord | <haxscramper> `Versions of TeX are numbered by adding additional digits of pi, because Knuth doesn't want to add new features: it's supposed to be stable and only bug-fixed, so the idea is it's approaching a limit.` |
09:53:45 | FromDiscord | <haxscramper> `> pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021/Arch Linux)` |
09:53:55 | FromDiscord | <haxscramper> god, please no |
09:55:31 | FromDiscord | <Clonkk> In reply to @haxscramper "Whoever writes wrapper for": Yes, that's probably the most pragmatic solution |
10:27:54 | FromDiscord | <bolino> Hi there! |
10:28:02 | FromDiscord | <bolino> Hi there! |
10:28:15 | PMunch | Haha, such a troll versioning :P |
10:28:29 | PMunch | And hi @bolino |
10:32:01 | FromDiscord | <bolino> sent a long message, see http://ix.io/3rmA |
10:32:24 | FromDiscord | <bolino> (edit) "http://ix.io/3rmA" => "https://paste.rs/1RG" |
10:32:32 | FromDiscord | <bolino> (I'm pretty new to Nim, please excuse the newbieness) |
10:34:04 | PMunch | For that you need a static variable |
10:34:44 | PMunch | const colorsCorrespondance = parseJson(staticRead("data/colors.json")) |
10:34:47 | PMunch | Something like that |
10:36:02 | FromDiscord | <zetashift> If I have a string `data` how to I get the pointer from that? `data.addr` returns a `<ptr string>` but I need a `pointer` type |
10:36:58 | PMunch | cast[pointer](data[0].addr) |
10:37:39 | PMunch | data[0].addr if you want the pointer to the actual string data. data.addr if you want a pointer to the string object that contains the length, capacity, and reference to the string data |
10:37:51 | FromDiscord | <Avatarfighter> In reply to @PMunch "const colorsCorrespondance = parseJson(staticRead("": oh woah that works ? |
10:38:04 | PMunch | I think so |
10:38:04 | FromDiscord | <Rika> why wouldnt it... |
10:38:23 | FromDiscord | <Avatarfighter> well i don't know I didn't think I could read a file during compiletime 🤷♂️ |
10:39:05 | PMunch | Oh, that part definitely works :) |
10:39:16 | PMunch | staticRead can read files during compile-time |
10:39:43 | PMunch | Hmm, but I got this error when I tried it: Error: invalid type: 'JsonNode' for const |
10:40:33 | PMunch | Ah right.. |
10:41:17 | PMunch | It would work if you parsed it in a macro or something, and used it on compile-time. But you can't read the data in, and store it as pre-parsed JSON in the binary. But you could staticRead the JSON data as a string, and then parse it on runtime |
10:41:25 | FromDiscord | <bolino> thanks @PMunch , will have a look and try! |
10:43:33 | FromDiscord | <bolino> so if I understand correctly, something like: |
10:44:04 | FromDiscord | <bolino> let colorsCorrespondanceStrin: string = staticRead("data/colors.json") |
10:44:31 | FromDiscord | <bolino> (edit) "let" => "`let" | "staticRead("data/colors.json")" => "staticRead("data/colors.json")`" |
10:44:47 | FromDiscord | <bolino> (edit) "colorsCorrespondanceStrin:" => "colorsCorrespondanceString:" |
10:45:51 | * | max22- joined #nim |
10:46:40 | FromDiscord | <bolino> ...and then parsing |
10:46:59 | FromDiscord | <Rika> not let, const |
10:47:04 | FromDiscord | <bolino> const |
10:48:17 | PMunch | Could use let as well |
10:48:22 | PMunch | Might even be better |
10:49:06 | PMunch | staticRead already reads the data into your program and basically turns your code into `let colorsCorrespondanceString = "<full content of the file>"` |
10:50:03 | PMunch | `const` in Nim would make that compiled completely away (at least it used to, I think there were some optimisations about this recently). So if you used the string twice in your program it would be pasted twice, which would double the size. |
10:51:06 | PMunch | But if you're just doing `parseJson(colorsCorrespondanceString)` as the first thing in your program and never use that variable again it would be the same. |
10:52:36 | PMunch | Oh wait, you can't do let there.. |
10:52:38 | PMunch | My bad :P |
10:53:56 | * | xet7 quit (Remote host closed the connection) |
10:55:09 | * | xet7 joined #nim |
10:55:25 | PMunch | http://ix.io/3rmO <- Something like this is what you need to do |
10:56:54 | * | arkurious joined #nim |
11:06:56 | FromDiscord | <bolino> Works like a charm! Thanks for the help |
11:08:39 | PMunch | No problem :) |
11:09:52 | FromDiscord | <bolino> One side question: would that impact the performances if the const is in the proc? SInce the scope is not the same |
11:09:59 | FromDiscord | <bolino> (edit) "SInce" => "Since" |
11:10:28 | PMunch | Shouldn't matter much |
11:11:47 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
11:12:15 | PMunch | Like this works just fine, and shouldn't matter for performance: http://ix.io/3rmU |
11:16:32 | FromDiscord | <bolino> Just wondering if it's rebuilded each time it's run |
11:16:54 | FromDiscord | <bolino> can put the const in global scope in case |
11:17:24 | FromDiscord | <bolino> Anyway it's just for my personal Nim culture! |
11:31:48 | PMunch | It will run the parsing each time it's run, just |
11:31:53 | PMunch | s/just/yes |
11:32:39 | PMunch | Not sure how I managed to mistype that :P |
11:33:56 | PMunch | You can use the global pragma though to avoid the variable being in the global scope, but still being stored and initialised once: https://nim-lang.org/docs/manual.html#pragmas-global-pragma |
11:48:49 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:00 | FromDiscord | <mvanbergen> <@&371760044473319454> <@&371760044473319454> <@&371760044473319454> |
11:49:00 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:01 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:02 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:03 | FromDiscord | <mvanbergen> <@&371760044473319454> <@&371760044473319454> |
11:49:03 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:04 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:04 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:05 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:06 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:10 | FromDiscord | <mvanbergen> <@&371760044473319454> <@&371760044473319454> |
11:49:10 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:11 | FromDiscord | <mvanbergen> <@&371760044473319454> <@&371760044473319454> |
11:49:12 | FromDiscord | <mvanbergen> <@&371760044473319454> <@&371760044473319454> v |
11:49:12 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:12 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:13 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:13 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:14 | FromDiscord | <mvanbergen> <@&371760044473319454> |
11:49:14 | FromDiscord | <mvanbergen> v |
12:01:07 | supakeen | Are you ok? |
12:01:34 | supakeen | How this looks in IRC: https://bpa.st/raw/PK2A ;) |
12:04:45 | PMunch | I think that was just a spammer.. |
12:05:13 | PMunch | Those v's are probably from trying to do "Ctrl+V, Enter" as fast as possible |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:37 | * | supakeen joined #nim |
12:10:30 | FromDiscord | <Bung> is there any guidelines rewrite nim program to none gc version ? |
12:11:56 | FromDiscord | <konsumlamm> ~~don't~~ |
12:15:59 | FromDiscord | <Bung> I haven't seen a real example that does not use gc |
12:29:38 | FromDiscord | <mratsim> In reply to @Bung "I haven't seen a": Weave and constantine don't use the GC |
12:33:06 | FromDiscord | <Bung> @mratsim Thanks! I'll take a look at Weave |
12:35:14 | fn | <ForumUpdaterBot99> New thread by LemongrabThree: Cast Procedure to GC-Safe: expression cannot be cast to proc (){.closure, gcsafe.}, see https://forum.nim-lang.org/t/8168 |
12:40:03 | FromDiscord | <dom96> In reply to @haxscramper "<@!570268431522201601> at nim conf": the lock files PR is already that |
12:41:21 | FromDiscord | <dom96> In reply to @impbox "yep, that's my next": `curl -v` is your friend here (it shows the data it sends :)) |
12:45:22 | FromDiscord | <dom96> In reply to @impbox "so it looked like": this looks like a bug in Nim, please report it if you haven't already. We should either error or remove the newlines so header values can't mess up what is sent. |
12:51:39 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
12:51:55 | * | Gustavo6046 joined #nim |
12:58:28 | * | Gustavo6046 quit (Ping timeout: 250 seconds) |
13:00:56 | * | max22- quit (Ping timeout: 268 seconds) |
13:01:17 | * | Guest87 joined #nim |
13:02:58 | FromDiscord | <mratsim> In reply to @Bung "<@!570268431522201601> Thanks! I'll take": Basically Weave has it's own memory pool |
13:03:06 | FromDiscord | <mratsim> (edit) "it's" => "its" |
13:03:22 | FromDiscord | <impbox [ftsf]> hmm yeah I'm not sure if it's a bug in nim, but definitely a gotcha, I'm not sure everyone would want the overhead of the checks, but it could certainly catch some user issues |
13:03:22 | FromDiscord | <mratsim> and I alloc/free manually |
13:03:40 | FromDiscord | <impbox [ftsf]> I wonder if other http libraries do newline checks for header data |
13:06:46 | * | Gustavo6046 joined #nim |
13:07:50 | * | ss joined #nim |
13:10:44 | FromDiscord | <dom96> the overhead is minimal and can be done as an assert |
13:10:48 | FromDiscord | <dom96> (edit) "and" => "but" |
13:10:59 | * | Guest87 quit (Quit: Client closed) |
13:16:18 | * | Gustavo6046 quit (Ping timeout: 272 seconds) |
13:17:14 | * | Gustavo6046 joined #nim |
13:26:37 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
13:27:53 | * | Gustavo6046 joined #nim |
13:28:02 | * | max22- joined #nim |
13:29:18 | FromDiscord | <Bung> @mratsim I see, that's more advanced topic. |
13:32:43 | * | aeverr quit (Ping timeout: 246 seconds) |
13:36:10 | FromDiscord | <mratsim> In reply to @Bung "<@!570268431522201601> I see, that's": the short version is use alloc/alloc0/allocShared and dealloc/freeShared |
13:36:41 | FromDiscord | <mratsim> another one is "import system/ansi_c" and use c_malloc / c_calloc and c_free |
13:36:57 | FromDiscord | <mratsim> the short version will not use the GC but will use Nim memory allocator. |
13:37:03 | FromDiscord | <mratsim> the second is plain C |
13:43:03 | * | Schnouki joined #nim |
13:44:59 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3rnn |
13:52:08 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
13:52:28 | * | Gustavo6046 joined #nim |
13:54:27 | * | aeverr joined #nim |
13:55:06 | FromDiscord | <haxscramper> Maybe "this month in nim" should include PR/RFC highlights |
13:56:16 | FromDiscord | <haxscramper> So community could have a general idea of where the project is heading without having to dig though layers of github issues, cross-referenced RFCs and code comments |
13:57:05 | FromDiscord | <dom96> I think a milestone will already do that |
13:57:50 | FromDiscord | <haxscramper> In reply to @dom96 "I think a milestone": https://github.com/nim-lang/Nim/milestones?direction=asc&sort=count&state=open this? |
13:57:52 | FromDiscord | <konsumlamm> is it possible to make something "package-private" or something, so that it's available in other modules of the same package, but the package doesn't export it? |
13:58:00 | FromDiscord | <konsumlamm> preferably without using `include` |
13:58:00 | FromDiscord | <haxscramper> Last updated four months ago |
13:58:06 | FromDiscord | <haxscramper> For 1.4.0 |
13:58:14 | FromDiscord | <dom96> In reply to @haxscramper "https://github.com/nim-lang/Nim/milestones?directio": yep, something like this |
13:58:16 | FromDiscord | <konsumlamm> ye, the milestones aren't really up to date |
13:58:48 | FromDiscord | <haxscramper> They don't have enough community engagement and they just feel like a slightly cleaned up github issues. |
13:59:12 | FromDiscord | <haxscramper> I'm talking more about concrete article, that say "we are here, working on these thingsx |
13:59:15 | * | Gustavo6046 quit (Ping timeout: 268 seconds) |
13:59:18 | FromDiscord | <haxscramper> (edit) "thingsx" => "things"" |
13:59:20 | FromDiscord | <dom96> If we keep them updated and link to them from the readme I think it will work quite well |
13:59:32 | FromDiscord | <dom96> writing an article is even harder |
13:59:40 | FromDiscord | <dom96> and is even less likely to be kept up to date |
13:59:53 | FromDiscord | <dom96> but maybe we can try that too to encourage contributions |
14:00:30 | * | Gustavo6046 joined #nim |
14:00:56 | FromDiscord | <haxscramper> In reply to @dom96 "and is even less": It doesn't have to be kept up to date. Just say what happened this month. Or write about current state of most wanted features like concepts, IC, lockfiles |
14:01:24 | FromDiscord | <haxscramper> Like a release note. You write it once and then don't update because it is done |
14:03:25 | FromDiscord | <haxscramper> In reply to @haxscramper "I don't think just": Or these kind of things |
14:04:07 | FromDiscord | <haxscramper> When karax was moved to another organization @willyboar made a forum posts about that |
14:04:17 | FromDiscord | <haxscramper> I think that was them at least |
14:04:20 | FromDiscord | <Bung> Can simply add todo list section to readme or create a pined issue list all todos. |
14:04:42 | FromDiscord | <haxscramper> So what? People would just have to dig through all issues again |
14:05:02 | FromDiscord | <haxscramper> To figure out what is going on. Better not do anything then, as it is not much better. |
14:05:53 | FromDiscord | <Bung> it's much better than current state. |
14:06:26 | FromDiscord | <haxscramper> There can be dozens of comemnts on each issue and RFC that express different opinions |
14:06:50 | FromDiscord | <Bung> the current state is like "hey , I want contribute to nimble , what I can do?" , answers "none" |
14:07:05 | FromDiscord | <haxscramper> This is a different thing |
14:07:46 | FromDiscord | <haxscramper> Im not talking about making it simpler to contribute, I'm talking about illuminating current state of the project |
14:08:04 | FromDiscord | <haxscramper> These two can and should be done separately in my opinion |
14:10:00 | FromDiscord | <Bung> "dozens of comemnts" can be sumarize to one sentence, some are features like other language's package manager have. just like features: 1:xxx, 2:xxx |
14:11:14 | FromDiscord | <haxscramper> Whatever. I'm not talking about this. |
14:12:06 | FromDiscord | <haxscramper> Not exactly. Having to go through issues is just one side of the problem as I see it. Though it is not really a problem per se |
14:12:14 | FromDiscord | <haxscramper> Not a technical one |
14:12:26 | * | ss quit (Quit: Leaving) |
14:12:34 | FromDiscord | <haxscramper> So maybe not worth the bother in the end. |
14:13:13 | FromDiscord | <willyboar> In reply to @haxscramper "When karax was moved": Not me. It was @ajusa |
14:13:44 | FromDiscord | <haxscramper> Alright, sorry for wrong ping then. But anyway, that is a good illustration of what I'm talking about |
14:13:47 | * | Gustavo6046_ joined #nim |
14:14:26 | FromDiscord | <willyboar> Do you want nimble to move to a separate org? |
14:14:37 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
14:15:32 | FromDiscord | <haxscramper> No, as I said earlier I don't think it makes any meaningful difference. |
14:16:03 | * | Gustavo6046_ is now known as Gustavo6046 |
14:16:48 | FromDiscord | <Bung> it's form of contributors, but the fact is no much contributors. |
14:17:18 | FromDiscord | <haxscramper> In reply to @haxscramper "No, as I said": Don't have any concrete arguments against it though, just personal opinion |
14:17:54 | FromDiscord | <dom96> In reply to @haxscramper "It doesn't have to": well, you still need to write the monthly post 🙂 |
14:19:04 | FromDiscord | <dom96> Having a milestone that says "This is what we want to get done" will already make things better IMO |
14:19:19 | FromDiscord | <dom96> Nimble to separate org too hah |
14:19:45 | FromDiscord | <willyboar> Why not both milestone and article |
14:19:55 | FromDiscord | <haxscramper> because it requires more effort |
14:20:31 | FromDiscord | <dom96> Maybe we can do quarterly updates. I doubt we'll get enough done in a month, but it depends on the community |
14:20:36 | FromDiscord | <haxscramper> And the problem with this kind of things is - only compiler developers really know what is going on, and they have more important things to do |
14:20:40 | FromDiscord | <dom96> Certainly someone from the community could write the blog post too |
14:21:16 | FromDiscord | <Bung> why not add a blog to nimble.directory ? |
14:21:31 | FromDiscord | <haxscramper> We already have nim blog on the webside |
14:21:33 | FromDiscord | <haxscramper> (edit) "webside" => "website" |
14:21:50 | FromDiscord | <dom96> yeah |
14:22:14 | FromDiscord | <willyboar> Nimble.directory is a personal project not official |
14:22:28 | FromDiscord | <dom96> that too |
14:23:23 | * | rockcavera joined #nim |
14:23:23 | * | rockcavera quit (Changing host) |
14:23:23 | * | rockcavera joined #nim |
14:23:50 | FromDiscord | <Bung> ok. maybe write a article "the bad parts of nimble" will attract people take more effort to nimble. |
14:24:00 | FromDiscord | <dom96> lol |
14:24:13 | FromDiscord | <Bung> 😆 |
14:25:04 | FromDiscord | <haxscramper> In reply to @Bung "ok. maybe write a": I'm writing and RFC about that |
14:25:07 | FromDiscord | <haxscramper> now |
14:25:30 | FromDiscord | <Bung> yeah , the title should be "bold" |
14:25:44 | FromDiscord | <dom96> The title should be "A future vision for Nimble" 🙂 |
14:25:47 | FromDiscord | <konsumlamm> ok, so i came to the conclusion that `include` is a horrible idea |
14:25:56 | FromDiscord | <haxscramper> I want to test/review lockfiles PR and test viability of centralized version storage |
14:26:06 | FromDiscord | <haxscramper> latter one idk how it is called exactly |
14:26:18 | FromDiscord | <willyboar> You can create a new repo - new-nimble - and call people to open issues |
14:26:18 | FromDiscord | <dom96> yeah, not sure what you mean by "centralised version storage" |
14:26:23 | FromDiscord | <haxscramper> database of requirements for all versions of all packages |
14:26:38 | FromDiscord | <haxscramper> Just quick test of how hard would it be to do this |
14:26:41 | FromDiscord | <willyboar> And add a to-do list or whatever in the readme |
14:26:55 | FromDiscord | <haxscramper> Same with #890 where I parsed all packages that existed at the time and showed some numbers |
14:27:03 | FromDiscord | <dom96> In reply to @willyboar "You can create a": We already have a repo for issues, let's not |
14:27:04 | FromDiscord | <haxscramper> that were relevant at the time |
14:27:20 | FromDiscord | <dom96> Ahh, a centralised package repo |
14:27:28 | FromDiscord | <haxscramper> In reply to @willyboar "You can create a": can we just work with what we got now? Now new issues, no new repos |
14:28:16 | FromDiscord | <dom96> We could write an RFC for just the centralised package repo concept |
14:28:25 | FromDiscord | <haxscramper> In reply to @dom96 "Ahh, a centralised package": yeah, basically I want to add a proof-of-concept implemnentation to the RFC. Not a fully implementation, just an example |
14:28:42 | FromDiscord | <haxscramper> In reply to @dom96 "We could write an": I expect my RFC to be taken apart and discussed separately at some point |
14:29:05 | FromDiscord | <haxscramper> For now I just want to have a centralized starting point for discussion |
14:29:16 | FromDiscord | <dom96> sure, I only fear that we will have too much discussion |
14:29:42 | FromDiscord | <haxscramper> there is a lot of issues to unpack, so I'm afraid that can't be really avoided |
14:29:53 | FromDiscord | <willyboar> Personally I loved to see an official package hosting similar to rubygems |
14:29:56 | FromDiscord | <haxscramper> People have accumulated a lot of requests here and there |
14:30:03 | FromDiscord | <willyboar> Semi off topic |
14:30:11 | FromDiscord | <haxscramper> this is on topic of dependency resolution |
14:30:30 | FromDiscord | <dom96> @haxscramper consider being ruthless about prioritisation |
14:30:36 | FromDiscord | <dom96> i.e. not discussing every single thing |
14:31:42 | FromDiscord | <haxscramper> Alright, do I choose to focus on dependency resolution and centralized repo or support for task-level dependencies and package features? |
14:31:46 | FromDiscord | <haxscramper> I can't decide |
14:31:49 | FromDiscord | <dom96> also love how the Nim v2 milestone was created in 2018 lol |
14:32:15 | FromDiscord | <gerwy> what does `ordinal type expected` means? |
14:32:29 | FromDiscord | <dom96> task-level deps is IMO a _relatively_ minor feature that doesn't need discussion |
14:32:38 | FromDiscord | <dom96> we already know how it should work |
14:32:46 | FromDiscord | <gerwy> i have a const that is float and i multiply it with an int (im scaling something down)↵so what should i do with it? |
14:33:41 | FromDiscord | <konsumlamm> In reply to @Life Sucks "what does `ordinal type": that it expected an ordinal type, something like an `int` or an enum |
14:33:52 | FromDiscord | <konsumlamm> In reply to @Life Sucks "i have a const": convert the int to a float |
14:34:36 | FromDiscord | <haxscramper> In reply to @dom96 "task-level deps is IMO": what about package features then? |
14:35:06 | FromDiscord | <dom96> what package features? 🙂 |
14:35:12 | FromDiscord | <haxscramper> Or moving from I-need-full-compiler-to-read-manifest |
14:35:46 | FromDiscord | <haxscramper> Or long list of general usability issues |
14:36:42 | FromDiscord | <gerwy> In reply to @konsumlamm "convert the int to": Oh okay fixed the issue, I really should know that you can't make array the size of float |
14:37:24 | FromDiscord | <haxscramper> array with a size "`0.4 of int`" |
14:37:55 | FromDiscord | <haxscramper> !eval echo sizeof(int).float() 0.4 |
14:37:57 | NimBot | Compile failed: /usercode/in.nim(1, 26) Error: invalid token: (\29) |
14:39:56 | FromDiscord | <Bung> I've create one for inspiration . https://github.com/bung87/The-bad-parts-of-nimble |
14:39:59 | fn | <R2D299> itHub: 7"<No Description>" |
14:41:42 | FromDiscord | <haxscramper> In reply to @Bung "yeah , the title": speaking of which - I dont' want to start a flame war |
14:42:11 | FromDiscord | <Avatarfighter> Does nimble support upgrading project dependencies all at once ? |
14:42:20 | FromDiscord | <haxscramper> no, I don't think it does |
14:42:44 | FromDiscord | <Bung> it's just for attracting people. |
14:43:07 | FromDiscord | <haxscramper> I don't like attracting people with clickbaits |
14:43:20 | FromDiscord | <dom96> In reply to @haxscramper "Or moving from I-need-full-compiler-to-read-manifes": that might have sailed, I see plenty of packages doing crazy things in their metadata 🙂 |
14:43:53 | FromDiscord | <haxscramper> well, my personal opinion on that one is - "can you just f-ing stop?" |
14:43:59 | FromDiscord | <haxscramper> and I need two things |
14:44:00 | FromDiscord | <haxscramper> three |
14:44:06 | FromDiscord | <haxscramper> name, version and requirements |
14:44:34 | FromDiscord | <haxscramper> you can do any number of `staticRead()` for anything else, thats your problem, but manifest must be self-contained |
14:44:55 | FromDiscord | <haxscramper> otherwise it is not possible to build any centalized package repo. |
14:45:06 | FromDiscord | <haxscramper> I've seen package whose version depends on evaluation date |
14:45:29 | FromDiscord | <haxscramper> I mean sure, yeah, but we can't account for every little insanity people have put in their `.nimble` file |
14:45:31 | FromDiscord | <dom96> it is possible |
14:45:56 | FromDiscord | <dom96> evaluate the .nimble file on publish and store the metadata statically |
14:46:12 | FromDiscord | <dom96> I would say we only want to store tagged versions anyway |
14:46:27 | PMunch | Has anyone made a generic bezier curve/spline thing in Nim? |
14:46:50 | FromDiscord | <dom96> PMunch: pretty sure Pixie supports this |
14:47:21 | PMunch | Sure, but I need to be able to give an X and get a Y out of it |
14:48:20 | PMunch | Basically I want to create something like this: https://www.theinsidetips.com/wp-content/uploads/2020/04/Curves_01.jpg |
14:48:43 | PMunch | But I need to be able to read out the colours along the line |
14:50:22 | PMunch | I guess I could use the tween algorithms in SDLGamelib |
14:56:22 | FromDiscord | <InventorMatt> PMunch: depends on how generic of a spine you want. a bit ago I started work on translating nurbspy to nim but I still have a bit to go on that |
15:19:49 | FromDiscord | <alehander42> wow 20 notifs |
15:28:36 | FromDiscord | <Bung> long time no see @alehander42 |
15:30:37 | FromDiscord | <clyybber> In reply to @alehander42 "wow 20 notifs": yeah, a spammer :/ |
15:31:05 | FromDiscord | <alehander42> @Bung ah hey! |
15:31:08 | FromDiscord | <Avatarfighter> o/ alehander 😄 |
15:31:30 | FromDiscord | <alehander42> hey @Avatarfighter happy to see you |
15:31:49 | FromDiscord | <alehander42> yes, 20 notifs really make you jump a bit |
15:31:51 | FromDiscord | <Avatarfighter> Me too 🙂 how have you been ? |
15:32:10 | FromDiscord | <alehander42> fine, some rest, some work 😄 |
15:32:35 | FromDiscord | <Bung> sounds good |
15:32:47 | FromDiscord | <alehander42> what's new with you |
15:32:55 | FromDiscord | <alehander42> guys |
15:33:18 | FromDiscord | <Avatarfighter> Nothing too new with me, wrote a killer bot using async and I'm very happy with its scaleability |
15:33:34 | FromDiscord | <alehander42> what does it kill |
15:33:37 | FromDiscord | <alehander42> killing sounds bad! |
15:33:38 | FromDiscord | <Bung> writting a web framework and a static site generator. |
15:33:48 | FromDiscord | <Avatarfighter> scalps products :p |
15:34:10 | FromDiscord | <alehander42> @Bung ah very cool |
15:34:16 | FromDiscord | <Avatarfighter> ^ |
15:34:45 | FromDiscord | <alehander42> @Avatarfighter hm, sounds unethical 😦 i am not familiar with those kinds of products enough |
15:35:56 | FromDiscord | <Avatarfighter> It is a little unethical yeah, sadly the product I want is already heavily scalped, not doing GPUs/HDDs though it's a bit of a niche market |
15:36:23 | FromDiscord | <Avatarfighter> (edit) "it's" => "the stuff I'm doing is" |
15:37:57 | FromDiscord | <alehander42> 😦 I hope there is an ethical exit of this |
15:38:28 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
15:39:36 | * | PMunch quit (Quit: leaving) |
15:40:37 | FromDiscord | <Avatarfighter> Yeah I'm only testing my software not actually buying it |
15:40:41 | FromDiscord | <Avatarfighter> it's fun |
15:44:44 | FromDiscord | <alehander42> otherwise i keep on debugging my stuff as well |
15:45:03 | FromDiscord | <alehander42> worked on some experiments, but still mostly trying to learn/todo there |
15:48:38 | FromDiscord | <alehander42> wow there was a nimconf again |
15:48:40 | FromDiscord | <alehander42> didn't know |
15:48:51 | FromDiscord | <dom96> hah, nice to see you back alehander42 🙂 |
15:51:37 | FromDiscord | <clyybber> In reply to @dom96 "hah, nice to see": thank the spammer :D :D |
15:52:52 | FromDiscord | <Sabena Sema> how does nim do compile time floating point functions? |
15:53:23 | FromDiscord | <Sabena Sema> if I compile nim with msvc x86 (which uses x87 for floating point) and use `math.sin(x)` at compile time do I get the x87 results? |
15:53:29 | FromDiscord | <Sabena Sema> even when targeting some other arch |
15:53:43 | FromDiscord | <Sabena Sema> bagh I'll just test |
15:53:56 | FromDiscord | <clyybber> it uses those that were used when compiling the compiler |
16:15:39 | * | Gustavo6046 joined #nim |
16:24:49 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:29:49 | * | Gustavo6046 joined #nim |
16:46:23 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
17:00:56 | * | Gustavo6046 joined #nim |
18:09:51 | FromDiscord | <timotheecour> currently, both float32 and float64 are operated on using float64 ("mostly"); for simplicity's sake, but it comes with caveats |
18:10:05 | FromDiscord | <timotheecour> (edit) "currently, ... both" added "in VM," |
18:25:41 | * | Gustavo6046 quit (Ping timeout: 265 seconds) |
18:32:02 | * | Gustavo6046 joined #nim |
18:32:58 | fn | <ForumUpdaterBot99> New thread by Alexeypetrushin: Is there a way to build better Nim DSL for plotting?, see https://forum.nim-lang.org/t/8169 |
18:37:04 | * | SebastianM joined #nim |
18:54:30 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
18:54:31 | FromDiscord | <OffenseTeacher> Hey guys, I am trying to send a post request using Nim's httpclient while being proxy aware. There is an example here that shows how to get the os proxy url from env variables (Linux only): https://nim-lang.org/docs/httpclient.html#proxy↵Any idea how to do it for Windows ? There are no env variable that holds proxy information afaik |
18:55:00 | * | Gustavo6046 joined #nim |
18:59:40 | fn | <bung99> can you use git cli ? |
19:00:55 | fn | <bung99> use git cii is easy solution , you can just export https_proxy= |
19:02:24 | fn | <bung99> or you may use .nims putEnv("https_proxy",yourproxy) |
19:08:59 | FromDiscord | <arnetheduck> In reply to @haxscramper "<@!570268431522201601> at nim conf": we're sponsoring the work to bring lock files to nimble, among other things - we're also looking to hire someone to help work with nim tooling on a more regular bases |
19:09:00 | FromDiscord | <OffenseTeacher> I don't know if the target system will have git cli installed. I think I have found a solution: read from registry:↵[HCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings]↵ProxyServer=xxx.xxx.xxx.xxx:yyyy (REG_SZ)↵ProxyEnable= (REG_DWORD) |
19:09:19 | FromDiscord | <arnetheduck> (edit) "bases" => "basis" |
19:09:23 | * | supakeen quit (Remote host closed the connection) |
19:09:48 | * | supakeen joined #nim |
19:10:13 | * | Guest92 joined #nim |
19:11:22 | * | Guest92 quit (Client Quit) |
19:12:07 | FromDiscord | <arnetheduck> In reply to @haxscramper "I mean sure, yeah,": the insanity is having a non-declarative project description, sucks for making any kind of tooling |
19:16:11 | fn | <bung99> @OffenseTeacher I dont think the httpclient looking up to registry |
19:18:04 | FromDiscord | <dom96> In reply to @arnetheduck "the insanity is having": with great power comes great responsibility 🙂 |
19:18:16 | FromDiscord | <haxscramper> And great pain in the ass |
19:18:16 | FromDiscord | <OffenseTeacher> no but I can lookup the registry before using other ways |
19:18:43 | FromDiscord | <dom96> honestly though, I'm happy to revert to a declarative approach |
19:19:34 | FromDiscord | <dom96> One way we could compromise is by still allowing tasks |
19:19:53 | FromDiscord | <willyboar> @arnetheduck why don't you hire @dom96? |
19:20:09 | fn | <bung99> haha |
19:20:16 | FromDiscord | <dom96> lol |
19:20:17 | FromDiscord | <arnetheduck> declarative formats tend to have extension points where you can plug in your non-declarative parts |
19:20:32 | FromDiscord | <arnetheduck> for one, he didn't apply 😉 |
19:20:38 | FromDiscord | <haxscramper> In reply to @dom96 "honestly though, I'm happy": I think just enforcing declarative subset for some of the important metadata is fine |
19:20:46 | FromDiscord | <dom96> I've had plenty of Status recruiters trying to poach me ;P |
19:21:12 | FromDiscord | <haxscramper> So the only thing necessary IMO is that things like version = "1.2.2" didn't require code evaluation |
19:21:42 | FromDiscord | <dom96> In reply to @haxscramper "I think just enforcing": Sure, I'm all for it. But the main motivation for this feature was to enable `version` to be set from a Nim module lol |
19:21:48 | FromDiscord | <Rika> ~~only crazy people script the version number anyway~~ |
19:21:59 | FromDiscord | <arnetheduck> Facebook and Status are a bit on the opposite ends of some spectra, as well, I guess |
19:22:08 | FromDiscord | <haxscramper> Using nim syntax and some simple, limited subset of a language (like boolean expressions for optional dependencies) |
19:22:43 | FromDiscord | <Rika> that would still require some rudimentary evaluation then |
19:22:55 | FromDiscord | <dom96> In reply to @arnetheduck "Facebook and Status are": In what way? I think they are actually very alike |
19:22:56 | FromDiscord | <haxscramper> Yeah, but not full compiler multi-pass |
19:23:18 | FromDiscord | <haxscramper> In reply to @dom96 "In what way? I": when defined(windows) is a reasonable thing to support and not particularly hard I think |
19:24:06 | FromDiscord | <haxscramper> (edit) removed "I think" |
19:24:12 | FromDiscord | <dom96> In reply to @haxscramper "when defined(windows) is a": hm, this would require some thought |
19:24:53 | FromDiscord | <Rika> it is, but i thought this was supposed to alleviate ease of parsing for tooling |
19:25:00 | FromDiscord | <haxscramper> Well, everything would require some thought, but if we only allow defined/and/or/not it would already be quite useful |
19:25:14 | FromDiscord | <haxscramper> In reply to @Rika "it is, but i": This is a tradeoff |
19:25:26 | FromDiscord | <haxscramper> I think staticRead for version is an abomination |
19:25:29 | FromDiscord | <dom96> Already leading to too much complexity IMO |
19:25:42 | FromDiscord | <dom96> once you start reimplementing certain Nim constructs you might as well go all the way |
19:25:52 | FromDiscord | <haxscramper> What is not "too much" while still supporting optional dependencies then? |
19:26:05 | FromDiscord | <dom96> anything that needs evaluation is too much |
19:26:24 | FromDiscord | <Rika> but that is needed for (custom) optional dependencies |
19:26:35 | fn | <bung99> why not only allow static meta data |
19:26:36 | FromDiscord | <haxscramper> Alright, so how do we get optional deps then? Or development dependency |
19:26:52 | * | SebastianM quit (Quit: Bye) |
19:26:58 | FromDiscord | <haxscramper> In my case it would be like when defined(developmetMode) |
19:27:02 | FromDiscord | <Rika> In reply to @haxscramper "Alright, so how do": how other languages do it: offer it in a noncustom way |
19:27:07 | FromDiscord | <Rika> of course, that's not nim-like |
19:27:10 | FromDiscord | <dom96> development mode is probably better handled in the tasks |
19:27:20 | FromDiscord | <dom96> a `requires "..."` can mutate the dep list |
19:27:27 | FromDiscord | <dom96> (edit) "a `requires "..."` ... can" added "in a task" |
19:27:36 | FromDiscord | <dom96> task dev: ... |
19:27:40 | FromDiscord | <Rika> im just saying, you dont need evaluation for dev deps, but of course it's massively different from what we're all thinking when we think of dev deps |
19:28:09 | FromDiscord | <dom96> as for OS-specific deps, maybe we just don't support these? what's the trade off to doing this? |
19:28:24 | fn | <bung99> you can just add a scope keyword , development, production reserved. |
19:28:50 | FromDiscord | <haxscramper> In reply to @dom96 "as for OS-specific deps,": Every user of my software would have to figure out how to install requirements or I would have to write a post-install task |
19:28:58 | FromDiscord | <dom96> imagine Nimble getting a dependency graph: now you get different combinations of graphs per OS |
19:29:00 | FromDiscord | <haxscramper> This is an acceptable trade-off |
19:29:06 | FromDiscord | <haxscramper> So no worries here |
19:29:26 | FromDiscord | <dom96> well, I mean: you just include all the deps |
19:29:30 | FromDiscord | <dom96> even if they are windows-specific |
19:29:42 | FromDiscord | <dom96> I think you'd just end up installing some useless deps |
19:29:43 | FromDiscord | <Rika> doesnt npm handle os-specific deps |
19:29:53 | FromDiscord | <haxscramper> Even hybrid ones that would fail building on different os? |
19:30:01 | FromDiscord | <Rika> im pretty sure they have some sort of mechanism for os-specific deps |
19:30:20 | FromDiscord | <haxscramper> Or ones that have before/after install takes that would fail |
19:30:24 | FromDiscord | <dom96> if it's really a big problem we can come up with some syntax like: requires_win or something. I'm sure other package managers do it in a similar way |
19:30:49 | FromDiscord | <Rika> okay i think npm uses optional so if it fails it still continues |
19:30:54 | FromDiscord | <dom96> but here is another problem: allowing tasks to change deps screws us |
19:31:09 | FromDiscord | <dom96> before install: requires.add("lol") |
19:31:25 | FromDiscord | <haxscramper> Then disallow this |
19:31:45 | FromDiscord | <dom96> yeah, I think we'd need to |
19:31:48 | FromDiscord | <haxscramper> Make all congratulation declarative |
19:31:57 | FromDiscord | <haxscramper> task: static list of requires |
19:32:08 | FromDiscord | <haxscramper> Top-level: also static list of requires |
19:33:07 | FromDiscord | <dom96> I think this needs its own RFC 🙂 |
19:33:28 | FromDiscord | <dom96> and the RFC needs to contain answers to all these problems |
19:34:06 | FromDiscord | <dom96> As a general point that's off-topic to our discussion, I think we need to be stricter about our RFCs. Often times they are severely too light on details (which leads to far too much discussions about silly things) |
19:38:36 | FromDiscord | <haxscramper> Or I might need to disable compilation of a binary for a hybrid package |
19:40:41 | FromDiscord | <Bung> I think disable is fine, when user want , use do `nimble build pkgname` or some like |
19:42:11 | FromDiscord | <Bung> or like `nimble install pkgname -b` |
19:44:07 | FromDiscord | <aleclarson> can i not assign a proc to a variable? |
19:44:21 | * | Gustavo6046 quit (Remote host closed the connection) |
19:44:30 | FromDiscord | <Rika> you can, mind clarifying |
19:47:06 | FromDiscord | <aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3rp4 |
19:47:14 | * | Gustavo6046 joined #nim |
19:49:58 | FromDiscord | <aleclarson> no worries, i can work around it |
19:52:00 | * | bkay quit (Quit: Leaving) |
19:52:16 | * | beshr joined #nim |
19:52:22 | * | Gustavo6046 quit (Ping timeout: 272 seconds) |
19:53:11 | * | Gustavo6046 joined #nim |
19:54:53 | * | beshr quit (Changing host) |
19:54:53 | * | beshr joined #nim |
19:56:02 | FromDiscord | <arnetheduck> In reply to @dom96 "In what way? I": I'd ask the same question 😉 |
19:56:03 | FromDiscord | <Rika> what is toQuery? |
19:56:09 | FromDiscord | <Rika> ah |
19:56:13 | FromDiscord | <Rika> you're using a global |
19:58:10 | FromDiscord | <arnetheduck> declarative vs not is really something more of a first principle, it's not something you write an RFC about |
20:00:47 | FromDiscord | <aleclarson> In reply to @Rika "what is toQuery?": it's the proc that contains the variable i'm trying to assign a proc to. in some cases, `toQuery` is assigned to that variable, so it prevents `toQuery` from being gc-safe like the other procs i'm assigning to the variable. |
20:01:00 | FromDiscord | <aleclarson> anyway, i figured out a workaround \:) |
20:21:28 | FromDiscord | <Bung> @timotheecour what's the state of rtl .cdecl and .closure compatibility? I've seen you create a issue about when use nimrtl |
20:22:55 | FromDiscord | <timotheecour> do you have a link? |
20:26:55 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/issues/8303 |
20:27:46 | FromDiscord | <ElegantBeef> Someone just reminded me that i was meaning to see about making the pragma error message more to the point, where if the only mismatch is pragmas you just print `proc mismatch due to pragmas, got gcsafe, expected [gcsafe, noSideEffect] ` 😄 |
20:43:28 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:52:29 | * | Gustavo6046 joined #nim |
20:52:31 | * | Gustavo6046 quit (Remote host closed the connection) |
20:52:59 | * | Gustavo6046 joined #nim |
20:58:53 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:59:36 | * | Gustavo6046 joined #nim |
21:06:43 | * | Gustavo6046 quit (Remote host closed the connection) |
21:17:23 | FromDiscord | <timotheecour> @ElegantBeef PR welcome, it's a known annoyance |
21:18:16 | * | Gustavo6046 joined #nim |
21:18:19 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
21:20:57 | * | Gustavo6046 joined #nim |
21:25:27 | FromDiscord | <timotheecour> @Bung IMO the proper fix (with no runtime cost) is `alias`, possibly with `alias Callable[R, T]` to optionally restrict to an alias with a specific input/output types, refs https://github.com/nim-lang/Nim/pull/11992 and https://github.com/nim-lang/Nim/pull/18241; it relates intimately with https://github.com/nim-lang/Nim/issues/18220 |
21:30:20 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
21:31:53 | * | Gustavo6046 joined #nim |
21:37:13 | FromDiscord | <Bung> @timotheecour is cant be simply pass compiler check ? |
21:45:30 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
21:45:55 | FromDiscord | <dom96> In reply to @arnetheduck "declarative vs not is": well, there are questions to be answered. An RFC should provide that answer |
21:45:58 | * | Gustavo6046 joined #nim |
21:48:48 | * | Gustavo6046 quit (Excess Flood) |
21:49:14 | * | Gustavo6046 joined #nim |
21:52:39 | * | Gustavo6046_ joined #nim |
21:52:50 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
21:55:14 | * | Gustavo6046_ is now known as Gustavo6046 |
22:01:43 | * | Gustavo6046 quit (Ping timeout: 258 seconds) |
22:04:13 | * | Gustavo6046 joined #nim |
22:08:51 | * | arkurious quit (Quit: Leaving) |
22:24:59 | * | Gustavo6046 quit (Remote host closed the connection) |
22:25:49 | * | Gustavo6046 joined #nim |
22:35:18 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:36:08 | FromDiscord | <ElegantBeef> A lovely start 😄 https://media.discordapp.net/attachments/371759389889003532/859200519603748894/unknown.png |
22:36:09 | * | Gustavo6046 joined #nim |
22:36:51 | FromDiscord | <checkersai> Is there a significant difference between using the `SharedPtr` from fusion and using `ref`s with `--gc:arc`? |
22:39:28 | FromDiscord | <Recruit_main707> it probably will be more painful |
22:42:41 | FromDiscord | <checkersai> why? |
22:44:16 | FromDiscord | <Recruit_main707> well, i guess its harder to use |
22:54:19 | * | max22- quit (Remote host closed the connection) |
22:57:15 | FromDiscord | <timotheecour> In reply to @Bung "<@!427948629249228800> is cant be": looking at this again, maybe, for this specific pragma; it looks like cdecl affects name mangling of the declaration, which IIUC shouldn't matter for proc arguments, so sigmatch could ignore it; I may be missing something though |
23:01:06 | * | Gustavo6046_ joined #nim |
23:04:02 | * | Gustavo6046 quit (Ping timeout: 272 seconds) |
23:04:13 | * | Gustavo6046_ is now known as Gustavo6046 |
23:06:16 | * | stkrdknmibalz joined #nim |
23:08:17 | FromDiscord | <Bung> I thought if the program know where the call routine is ,closure or not does not have much differences. |
23:21:31 | FromDiscord | <timotheecour> > closure or not does not have much differences.↵that i don't understand; if you pass a closure or a non-closure as argument to a proc, how could generated machine code handle both |
23:22:01 | FromDiscord | <ElegantBeef> Remember that closures are twice the size of a nimcall and point to an environment, so they're not nearly close to the same thing 😄 |
23:22:27 | FromDiscord | <ElegantBeef> Trying to make some tests for my error messages and oh boy is testament not liking it |
23:24:22 | FromDiscord | <timotheecour> @ElegantBeef yes for closure; but my earlier question was whether sigmatch could ignore cdecl (IIUC it's for mangling, which shouldn't matter for an argument to a proc) |
23:25:09 | FromDiscord | <timotheecour> > Trying to make some tests for my error messages and oh boy is testament not liking it↵maybe best to show the WIP first before fixing a bunch of tests so we all agree on the error messages it should give first? |
23:25:18 | FromDiscord | <timotheecour> (edit) "> Trying to make some tests for my error messages and oh boy is testament not liking it↵maybe best to show the WIP ... first" added "PR" |
23:25:40 | FromDiscord | <ElegantBeef> Not really fixing tests, was going to implement tests, but sure PR i guess 😄 |
23:28:05 | FromDiscord | <Bung> so the main point is make compiler pass , ignore the pragmas make the program work I think. |
23:28:21 | FromDiscord | <ElegantBeef> Yea with the other calling conventions is a little less sensible that there is an type mismatch |
23:29:16 | FromDiscord | <Bung> In reply to @ElegantBeef "Remember that closures are": am not from c , could you provide some link I can read more ? |
23:30:34 | FromDiscord | <Bung> In reply to @ElegantBeef "Yea with the other": that will make things simpler , will not have so much mismatch errors. |
23:32:13 | * | Gustavo6046 quit (Remote host closed the connection) |
23:32:31 | FromDiscord | <exelotl> In reply to @checkersai "Is there a significant": see this comment: https://github.com/nim-lang/Nim/pull/17333#issuecomment-868922491 |
23:32:55 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/intern.html#code-generation-for-closures |
23:33:16 | * | Gustavo6046 joined #nim |
23:37:36 | FromDiscord | <ElegantBeef> Personally i dont find the type mismatch an issue as much as the diagnosabillity due to long error messages which hid the important details at the end 😄 |
23:43:39 | FromDiscord | <Bung> `proc add(x: int): proc (y: int): proc (z: int): int {.closure.} {.closure.} =` oh , the first time I see a proc like this. |
23:44:46 | FromDiscord | <timotheecour> no, the type mismatch is a serious issue for composability; pragmas that don't affect codegen shouldn't be considered by sigmatch; but for the other ones, diagnosability in error messages is an important issue, so your PR is indeed welcome 🙂 |
23:46:30 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:46:55 | * | Gustavo6046 joined #nim |
23:52:26 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |