<< 28-06-2021 >>

00:57:29*arkurious quit (Quit: Leaving)
01:13:07FromDiscord<Hi02Hi> is `object of Foo[bool]` possible?
01:24:16FromDiscord<leorize> yes
01:24:40*TakinOver joined #nim
01:35:37FromDiscord<Bung> @leorize does nim generated dll supposed to work ? I tried differient compile flags , it will raise differient errors
01:36:16FromDiscord<leorize> they do work on linux atleast
01:36:19FromDiscord<leorize> what are you trying to do?
01:39:13FromDiscord<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:52FromDiscord<leorize> can I see the code?
01:40:42*PersonMcGuy quit (Quit: Client closed)
01:41:45FromDiscord<Bung> https://github.com/bung87/crown_ui/blob/82788573515b5450b57514ed51b0de3a9dee5c86/src/crown_ui/generator.nim#L467
01:43:01FromDiscord<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:57FromDiscord<leorize> what's the target for the library?
01:46:05FromDiscord<leorize> to be linked with something else or to be loaded as a plugin?
01:46:34FromDiscord<Bung> load as theme system
01:47:12FromDiscord<leorize> loaded as a plugin?
01:47:29FromDiscord<Bung> yeah .
01:47:53FromDiscord<leorize> can I see the loader and how the loaded library is used?
01:48:33FromDiscord<Bung> `# const exampleDir = currentSourcePath.parentDir.parentDir.parentDir / "example"` you can uncomment this line
01:49:06mstthis 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:25FromDiscord<leorize> `-d:useNimRtl` is your friend here
01:49:42FromDiscord<leorize> alternatively `-d:useMalloc` also works
01:49:58msthrm?
01:50:18mstsorry, was that to Bung or to me, can't tell
01:50:23msttoo ignorant just yet :/
01:50:32FromDiscord<leorize> orc is not a stack-scanning garbage collector
01:50:45FromDiscord<leorize> it's more of a destructor-based one
01:50:52mstI know it's not, it's an optimised implementation of the recycler paper
01:51:01FromDiscord<leorize> so as long as you share the memory allocator between the two libraries, it should work
01:51:20FromDiscord<leorize> `-d:useMalloc` is a good way since you will share the memory allocator with the C program too
01:51:42mstyeah, it's how to get the ORC cycle-breaking code shared that I was pondering
01:52:05FromDiscord<leorize> `-d:useNimRtl` would be what you're looking for
01:52:11FromDiscord<leorize> but that option is extremely experimental
01:52:32mstah, so that creates a shared library for the runtime that both can link against?
01:52:36FromDiscord<Bung> I tried all flags you suggested and tried change gc
01:53:16mstextremely experimental is fine, a big reason I came to nim is that I wanted a recycler based refcounting gc
01:53:36FromDiscord<leorize> see that for generating nimrtl
01:53:50FromDiscord<leorize> @Bung\: I need to see the code where you load the compiled plugin
01:53:55mstI 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:59FromDiscord<Bung> it's in `build` proc from line 514:`let libTheme = loadLib(themePath)` to 534: `unloadLib(libTheme)`
01:55:45mstleorize, thank you
01:56:47FromDiscord<leorize> @Bung\: first, you need nimrtl
01:57:14FromDiscord<leorize> secondly, you're exporting a procedure with `cdecl` but you're calling it with `stdcall`
01:58:00FromDiscord<leorize> you might find shashlick's plugins handy for this\: https://github.com/genotrance/plugins
01:58:02fn<R2D299> itHub: 7"Plugin system for Nim"
02:05:35*jkl quit (Quit: ZNC 1.8.2 - https://znc.in)
02:07:47FromDiscord<Bung> `-d:useNimRtl` I get compile time error.
02:08:39FromDiscord<Bung> without `stdcall` symbol can't be casted.
02:09:31FromDiscord<Bung> I dont quite get the idea of plugins package, it only has apis document..
02:13:58FromDiscord<leorize> plugins let you do the exact thing that you're doing
02:14:04FromDiscord<leorize> more structured, of course
02:14:10FromDiscord<leorize> change it to `cdecl`↵(@Bung)
02:14:53FromDiscord<leorize> since the two heaps are not shared
02:14:53FromDiscord<leorize> if you can't `-d:useNimRtl`, then I'd say passing memory between your program and the plugin is very dangerous
02:21:12FromDiscord<Bung> sent a long message, see http://ix.io/3rkh
02:21:59FromDiscord<Bung> when use `-d:useNimRtl` , highlite module problem ?
02:24:00FromDiscord<leorize> looks so to me
02:24:14FromDiscord<leorize> `--gc:orc -d:useMalloc` is a viable alternative
02:24:37FromDiscord<ajusa> Any ways around the fact that you can't name two fields the same thing in variant objects?
02:25:15FromDiscord<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:32mstajusa, use different names for the fields and use a virtual method to have the same name for usage?
02:26:08FromDiscord<Bung> with `--gc:orc -d:useMalloc` it even acess ref object's string field became nil.
02:27:51FromDiscord<Bung> I thought with `--app:lib` every thing works fine, the fact is not that easy.
02:27:51FromDiscord<ajusa> In reply to @mst "<@102899813149855744>, use different names": oooh good idea
02:28:51mstI wasn't intending to be condescending, the 'virtual method' part was the reason I mentioned it ;)
02:29:16mst(I mean, I do totally manage to be condescending unintentionally sometimes, but I was hoping this wasn't one of them)
02:29:30FromDiscord<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:39FromDiscord<leorize> yea, its one of the lesser tested features↵(@Bung)
02:30:48mstthe way it quoted only included the "use different names" part of what I'd said so I wanted to check :D
02:31:17mstbut esp. given Nim's ability to have setter methods that work with = I -think- you can end up with something pretty clean
02:31:54mst(I have a lot of experience in multiple languages of painting myself into a corner and having to get creative to escape ;)
02:33:01FromDiscord<Bung> @leorize Thanks let me know that! I spend whole day with no clue.
02:34:23FromDiscord<leorize> @ajusa\: you might want to give https://github.com/nim-lang/RFCs/issues/368 a bump
02:39:12FromDiscord<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:07FromDiscord<@bracketmaster-5a708063d73408ce4> can I define a variable in nim that can only take on values between 0 and 5 inclusive?
03:47:24FromDiscord<@bracketmaster-5a708063d73408ce4> I seem to have been able to do this some time ago
03:50:51FromDiscord<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:40FromDiscord<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:33FromDiscord<Elegantbeef> Ah sorry you had the fun experience of that one response
04:23:22FromDiscord<Elegantbeef> What's the point of the Epsilon type?
04:23:22FromDiscord<Elegantbeef> Basically a wild card?
04:45:07FromDiscord<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:37FromDiscord<stu002> But I can see completely different usages of concepts where some kind of "associated" type is very handy
04:46:28FromDiscord<stu002> Template concepts I think will work, but seems a wrong-ish use of the template type
04:50:12FromDiscord<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:24FromDiscord<ElegantBeef> like this is the modern concept method https://media.discordapp.net/attachments/371759389889003532/858932321640906752/unknown.png
04:50:59FromDiscord<ElegantBeef> I dont know if the old generics have a way to say "This parameter slot can be any of these types"
04:51:34FromDiscord<ElegantBeef> old concepts
05:05:52FromDiscord<Rika> Concept with generic T
05:05:54FromDiscord<Rika> Probably
05:21:46FromDiscord<stu002> In reply to @ElegantBeef "I dont know if": Very nice! Will try that out right now
05:22:55FromDiscord<stu002> Are the "new style" concepts a Nim V2.x feature or could appear in a 1.x release?
05:24:25FromDiscord<Elegantbeef> They're in `devel` right now and will probably be released with 1.6 afaik
05:25:13FromDiscord<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:50FromDiscord<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:22FromDiscord<Elegantbeef> old style stay\
05:28:11FromDiscord<stu002> I was going off comments in Github for that observation, I'd better actually implement some tests myself first
05:28:27FromDiscord<Rika> In reply to @stu002 "Am I right in": It’s not recommended per the new concept RFC
05:29:18FromDiscord<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:48FromDiscord<Rika> You can still do it just not supposedly inside another concept
05:30:26FromDiscord<stu002> In reply to @Rika "You can still do": Interesting, are there more examples of the new style concepts somewhere?
05:34:38FromDiscord<stu002> I'd be very happy with `type NumTest = concept of Something` if that came about.
05:35:26FromDiscord<Elegantbeef> What'd that do
05:36:22FromDiscord<Elegantbeef> You could do that with macros if i understand the implication of "This needs all conditions of X"
05:36:51FromDiscord<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:07FromDiscord<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:57FromDiscord<stu002> My use of concepts is very similar to the use here: https://github.com/andreaferretti/emmy/blob/master/emmy/structures.nim
05:42:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3rkV
05:42:59FromDiscord<stu002> In reply to @Elegantbeef "Well the idea i": That's neat too.
05:44:21FromDiscord<Elegantbeef> I truthfully havent used concepts much so only have some brief theoretical knowledge of them 😀
05:46:26FromDiscord<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:38FromDiscord<Rika> Why can’t you make a type that says “concept and concept and concept”
06:02:55FromDiscord<Rika> Aka what you want except the concepts themselves do not restrict
06:07:45FromDiscord<impbox [ftsf]> concepts seemed like a cool concept, but i've only used them a little
06:18:07FromDiscord<Rika> I always treated it as a way to do static duck typing
06:31:19FromDiscord<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:44FromDiscord<impbox [ftsf]> is there a way to force sending content-length with a zero length body post with httpclient?
06:55:58FromDiscord<impbox [ftsf]> remote server is returning 411 Length Required
06:57:30FromDiscord<Rika> Does putting it in the sent headers not work? I forgot if you could manually force headers though
06:59:13FromDiscord<impbox [ftsf]> I tried including it in the headers argument to `request`
07:00:16FromDiscord<Rika> How did it go?
07:00:29FromDiscord<Rika> Wait that’s a dumb question
07:00:55FromDiscord<Rika> Are you sure the server accepts an empty post?
07:01:52FromDiscord<impbox [ftsf]> yep, was previously working too
07:02:15FromDiscord<impbox [ftsf]> hmm wonder if i can fix it by reverting nim version
07:14:27FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3rlh
07:14:29FromDiscord<impbox [ftsf]> so content-length is being sent
07:14:39*PMunch joined #nim
07:14:39FromDiscord<impbox [ftsf]> so maybe it's the remote server that's wrong
07:15:05FromDiscord<impbox [ftsf]> maybe expecting "Content-Length" instead of "content-length"
07:18:35FromDiscord<Rika> So a noncompliant server lol
07:18:57FromDiscord<impbox [ftsf]> could be... i can only speculate so far, will try and narrow it down
07:20:45FromDiscord<impbox [ftsf]> nope, same issue with Content-Length: 0
07:20:46*PMunch quit (Ping timeout: 252 seconds)
07:22:43FromDiscord<impbox [ftsf]> ok.. i just realised it's totally unrelated. sorry ~_~
07:22:52FromDiscord<impbox [ftsf]> i'm setting headers where i'm supposed to set body content
07:25:51FromDiscord<Rika> Lol
07:26:04FromDiscord<impbox [ftsf]> I'm certain it used to work so confused
07:26:12FromDiscord<Rika> Good thing it’s resolved now though
07:32:04FromDiscord<impbox [ftsf]> I haven't managed to resolve it, but oh well. I don't think nim is the problem here
07:32:28FromDiscord<Rika> Check with another language if you want to truly make sure lol
07:32:40FromDiscord<impbox [ftsf]> good idea
07:33:10*PMunch joined #nim
07:40:41FromDiscord<impbox [ftsf]> hmm it return 200 via python
07:42:45FromDiscord<Rika> Maybe analyse the difference between the requests sent by both
07:43:03FromDiscord<impbox [ftsf]> yep, that's my next step, a bit harder since it's https
07:43:34FromDiscord<Rika> Can’t you make a dummy server to send the request to
07:44:08FromDiscord<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:12fn<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:19FromDiscord<impbox [ftsf]> thanks for rubber ducking, my brain is tired today
07:45:31FromDiscord<Rika> It’s fine
07:46:36FromDiscord<Avatarfighter> o/ Rika how are you 😄
07:46:58FromDiscord<Rika> I’ve been stressed for weeks
07:47:29FromDiscord<Avatarfighter> What about ?
07:47:50FromDiscord<Rika> I’ll talk about it in #offtopic since it’s not very related
07:48:12FromDiscord<Avatarfighter> 👍
07:53:07PMunchIs there a way to see the live comments for the NimConf videos?
07:53:36PMunchCan we get coloured nicks for the FromDiscord bot as well?
07:53:54PMunchShould be a really simple copy/paste from the freenode/libera bridga
07:57:53FromDiscord<Avatarfighter> Live comments as in the chat ?
07:58:36FromDiscord<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:38FromDiscord<saem> [Araq (Andreas Rumpf)](https://matrix.to/#/@araq-560408fc0fc9f982beb1b5e2:gitter.im) I enjoyed the Zen of Nim talk, quite a bit.
08:00:25FromDiscord<hamidb80> In reply to @saem "[Araq (Andreas Rumpf)](https://matrix.to/#/@araq-56": quite a bit.?
08:01:30FromDiscord<saem> More than the typical programming talk on YouTube.
08:01:52PMunch@Avatarfighter, chat box on the right?
08:02:54FromDiscord<Avatarfighter> PMunch: there should be a little box that says "Show chat replay" on the right above the playlist of nimconf
08:02:55PMunchAh right, I found it :)
08:03:13PMunchI mean that is some horrible UX right there
08:03:17FromDiscord<Avatarfighter> yeah it is
08:03:26PMunchWhy isn't it with the other chat?! :P
08:03:31FromDiscord<Avatarfighter> right lol
08:03:43FromDiscord<Avatarfighter> make sure you switch it from "Top chat replay" to "Live chat replay"
08:04:16fn<ForumUpdaterBot99> New thread by Lecale: Execute process without waiting for the result, see https://forum.nim-lang.org/t/8167
08:09:50FromDiscord<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:03FromDiscord<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:39FromDiscord<impbox [ftsf]> https://media.discordapp.net/attachments/371759389889003532/858983467843584010/unknown.png
08:14:13FromDiscord<Avatarfighter> I'm really surprised you need to send Content-Length with no payload, that doesn't comply with the http spec
08:15:30FromDiscord<Avatarfighter> oh nevermind I read the spec wring
08:15:32FromDiscord<Avatarfighter> (edit) "wring" => "wrong"
08:15:42FromDiscord<Avatarfighter> I thought you had specified a Transfer-Encoding
08:16:55FromDiscord<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:45FromDiscord<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:58FromDiscord<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:16FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3rlF
08:21:20FromDiscord<impbox [ftsf]> so the headers after the newline didn't get read by the server
08:23:02FromDiscord<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:03FromDiscord<Elegantbeef> Insert my normal "Strings were a mistake" comment here
08:32:28FromDiscord<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:55FromDiscord<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:19FromDiscord<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:08FromDiscord<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:13FromDiscord<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:47FromDiscord<haxscramper> Or at least a meaningful subset of features
09:05:00FromDiscord<mratsim> In reply to @haxscramper "From what I read": Would work for us I think.
09:15:46FromDiscord<Rika> What features are you guys thinking of copying
09:17:45FromDiscord<haxscramper> package features, build/development/package-specific confgurations
09:18:10FromDiscord<haxscramper> centralized with support for custom registries and fallback to git repositories
09:19:41FromDiscord<haxscramper> generali desig
09:19:43FromDiscord<haxscramper> (edit) "desig" => "design"
09:19:48FromDiscord<Clonkk> reproducible builds, lockfile, dependencies resolution, way of deploying source, binary, shared library, third parties shared libaries from the package manager
09:20:02FromDiscord<Clonkk> That would be my go-to list for package manage features
09:20:21FromDiscord<haxscramper> I'm mostly talkint about not reinventing the wheel and instead just copying cargo design decisions
09:20:51FromDiscord<haxscramper> where it makes sense
09:22:17FromDiscord<Rika> `package features`? the specific configs are nice yes
09:22:27FromDiscord<Clonkk> Rust is only based on atoml file if I'm not mistkaen ?
09:22:31FromDiscord<haxscramper> correct
09:22:40FromDiscord<haxscramper> Though they have support for build scripts
09:22:58FromDiscord<haxscramper> In nimble it is somewhat more complicated
09:23:10FromDiscord<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:14FromDiscord<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:15FromDiscord<Clonkk> Just some thoughts
09:23:37FromDiscord<Rika> im not really one to use a language's package manager to install binaries
09:25:09FromDiscord<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:50FromDiscord<ElegantBeef> Yea it does seem so, so i guess i'm here now
09:26:25FromDiscord<haxscramper> In reply to @Rika "lock file would be": no, I don't think it is
09:26:26FromDiscord<ElegantBeef> Matrix bridge dieded
09:26:57*max22- quit (Ping timeout: 268 seconds)
09:31:19FromDiscord<Rika> it aint? huh
09:32:01FromDiscord<haxscramper> at one of the dev meetings araq briefly mentioned he wrote sat solver that can be used for nimble. I think
09:32:02FromDiscord<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:04FromDiscord<haxscramper> that's all
09:36:10FromDiscord<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:46FromDiscord<ElegantBeef> Are we talking about third party system libraries?
09:36:55FromDiscord<Clonkk> Not necessarily "system"
09:37:33FromDiscord<Rika> even given a scripting language its terrible is it not
09:37:44FromDiscord<ElegantBeef> Well there are so many ways to source them
09:38:39FromDiscord<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:01FromDiscord<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:20FromDiscord<Clonkk> So ideally, there would need to be a way to tell Nimble that X package depends on X third_parties
09:39:35FromDiscord<ElegantBeef> Sure that's doable but i dont see how you can safely manage a build of that package
09:39:42FromDiscord<Rika> its nontrivial
09:39:48FromDiscord<Clonkk> It's not trivial at all
09:41:02FromDiscord<Clonkk> But the more libraries I wrap, the more I want something like it 😄
09:41:14FromDiscord<ElegantBeef> But it's a logistical nightmare 😄
09:42:13FromDiscord<Clonkk> Realistically, having a "lib" folders where you can tell nimble to install shared libraries would be enough
09:42:23FromDiscord<Clonkk> (edit) "enough" => "~~enough~~ a start"
09:43:07FromDiscord<ElegantBeef> Wonder the licensing implications of that
09:43:46FromDiscord<ElegantBeef> I'm tired and silly
09:45:18FromDiscord<Clonkk> In reply to @ElegantBeef "Wonder the licensing implications": Licensing is complicated when you get down non-obvious case tbh
09:46:03FromDiscord<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:25FromDiscord<haxscramper> I don't think it is necessary to manage external package versions from nimble
09:49:52FromDiscord<haxscramper> Whoever writes wrapper for external library can just manage versions appropriately
09:50:19FromDiscord<haxscramper> Like a lot of system packages don't follow semver
09:51:13FromDiscord<ElegantBeef> Yea it's just hell out in the real world 😄
09:51:28FromDiscord<ElegantBeef> Every versioning for itself
09:53:43FromDiscord<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:45FromDiscord<haxscramper> `> pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021/Arch Linux)`
09:53:55FromDiscord<haxscramper> god, please no
09:55:31FromDiscord<Clonkk> In reply to @haxscramper "Whoever writes wrapper for": Yes, that's probably the most pragmatic solution
10:27:54FromDiscord<bolino> Hi there!
10:28:02FromDiscord<bolino> Hi there!
10:28:15PMunchHaha, such a troll versioning :P
10:28:29PMunchAnd hi @bolino
10:32:01FromDiscord<bolino> sent a long message, see http://ix.io/3rmA
10:32:24FromDiscord<bolino> (edit) "http://ix.io/3rmA" => "https://paste.rs/1RG"
10:32:32FromDiscord<bolino> (I'm pretty new to Nim, please excuse the newbieness)
10:34:04PMunchFor that you need a static variable
10:34:44PMunchconst colorsCorrespondance = parseJson(staticRead("data/colors.json"))
10:34:47PMunchSomething like that
10:36:02FromDiscord<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:58PMunchcast[pointer](data[0].addr)
10:37:39PMunchdata[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:51FromDiscord<Avatarfighter> In reply to @PMunch "const colorsCorrespondance = parseJson(staticRead("": oh woah that works ?
10:38:04PMunchI think so
10:38:04FromDiscord<Rika> why wouldnt it...
10:38:23FromDiscord<Avatarfighter> well i don't know I didn't think I could read a file during compiletime 🤷‍♂️
10:39:05PMunchOh, that part definitely works :)
10:39:16PMunchstaticRead can read files during compile-time
10:39:43PMunchHmm, but I got this error when I tried it: Error: invalid type: 'JsonNode' for const
10:40:33PMunchAh right..
10:41:17PMunchIt 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:25FromDiscord<bolino> thanks @PMunch , will have a look and try!
10:43:33FromDiscord<bolino> so if I understand correctly, something like:
10:44:04FromDiscord<bolino> let colorsCorrespondanceStrin: string = staticRead("data/colors.json")
10:44:31FromDiscord<bolino> (edit) "let" => "`let" | "staticRead("data/colors.json")" => "staticRead("data/colors.json")`"
10:44:47FromDiscord<bolino> (edit) "colorsCorrespondanceStrin:" => "colorsCorrespondanceString:"
10:45:51*max22- joined #nim
10:46:40FromDiscord<bolino> ...and then parsing
10:46:59FromDiscord<Rika> not let, const
10:47:04FromDiscord<bolino> const
10:48:17PMunchCould use let as well
10:48:22PMunchMight even be better
10:49:06PMunchstaticRead already reads the data into your program and basically turns your code into `let colorsCorrespondanceString = "<full content of the file>"`
10:50:03PMunch`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:06PMunchBut 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:36PMunchOh wait, you can't do let there..
10:52:38PMunchMy bad :P
10:53:56*xet7 quit (Remote host closed the connection)
10:55:09*xet7 joined #nim
10:55:25PMunchhttp://ix.io/3rmO <- Something like this is what you need to do
10:56:54*arkurious joined #nim
11:06:56FromDiscord<bolino> Works like a charm! Thanks for the help
11:08:39PMunchNo problem :)
11:09:52FromDiscord<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:59FromDiscord<bolino> (edit) "SInce" => "Since"
11:10:28PMunchShouldn't matter much
11:11:47*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
11:12:15PMunchLike this works just fine, and shouldn't matter for performance: http://ix.io/3rmU
11:16:32FromDiscord<bolino> Just wondering if it's rebuilded each time it's run
11:16:54FromDiscord<bolino> can put the const in global scope in case
11:17:24FromDiscord<bolino> Anyway it's just for my personal Nim culture!
11:31:48PMunchIt will run the parsing each time it's run, just
11:31:53PMunchs/just/yes
11:32:39PMunchNot sure how I managed to mistype that :P
11:33:56PMunchYou 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:49FromDiscord<mvanbergen> <@&371760044473319454>
11:49:00FromDiscord<mvanbergen> <@&371760044473319454> <@&371760044473319454> <@&371760044473319454>
11:49:00FromDiscord<mvanbergen> <@&371760044473319454>
11:49:01FromDiscord<mvanbergen> <@&371760044473319454>
11:49:02FromDiscord<mvanbergen> <@&371760044473319454>
11:49:03FromDiscord<mvanbergen> <@&371760044473319454> <@&371760044473319454>
11:49:03FromDiscord<mvanbergen> <@&371760044473319454>
11:49:04FromDiscord<mvanbergen> <@&371760044473319454>
11:49:04FromDiscord<mvanbergen> <@&371760044473319454>
11:49:05FromDiscord<mvanbergen> <@&371760044473319454>
11:49:06FromDiscord<mvanbergen> <@&371760044473319454>
11:49:10FromDiscord<mvanbergen> <@&371760044473319454> <@&371760044473319454>
11:49:10FromDiscord<mvanbergen> <@&371760044473319454>
11:49:11FromDiscord<mvanbergen> <@&371760044473319454> <@&371760044473319454>
11:49:12FromDiscord<mvanbergen> <@&371760044473319454> <@&371760044473319454> v
11:49:12FromDiscord<mvanbergen> <@&371760044473319454>
11:49:12FromDiscord<mvanbergen> <@&371760044473319454>
11:49:13FromDiscord<mvanbergen> <@&371760044473319454>
11:49:13FromDiscord<mvanbergen> <@&371760044473319454>
11:49:14FromDiscord<mvanbergen> <@&371760044473319454>
11:49:14FromDiscord<mvanbergen> v
12:01:07supakeenAre you ok?
12:01:34supakeenHow this looks in IRC: https://bpa.st/raw/PK2A ;)
12:04:45PMunchI think that was just a spammer..
12:05:13PMunchThose 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:30FromDiscord<Bung> is there any guidelines rewrite nim program to none gc version ?
12:11:56FromDiscord<konsumlamm> ~~don't~~
12:15:59FromDiscord<Bung> I haven't seen a real example that does not use gc
12:29:38FromDiscord<mratsim> In reply to @Bung "I haven't seen a": Weave and constantine don't use the GC
12:33:06FromDiscord<Bung> @mratsim Thanks! I'll take a look at Weave
12:35:14fn<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:03FromDiscord<dom96> In reply to @haxscramper "<@!570268431522201601> at nim conf": the lock files PR is already that
12:41:21FromDiscord<dom96> In reply to @impbox "yep, that's my next": `curl -v` is your friend here (it shows the data it sends :))
12:45:22FromDiscord<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:58FromDiscord<mratsim> In reply to @Bung "<@!570268431522201601> Thanks! I'll take": Basically Weave has it's own memory pool
13:03:06FromDiscord<mratsim> (edit) "it's" => "its"
13:03:22FromDiscord<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:22FromDiscord<mratsim> and I alloc/free manually
13:03:40FromDiscord<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:44FromDiscord<dom96> the overhead is minimal and can be done as an assert
13:10:48FromDiscord<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:18FromDiscord<Bung> @mratsim I see, that's more advanced topic.
13:32:43*aeverr quit (Ping timeout: 246 seconds)
13:36:10FromDiscord<mratsim> In reply to @Bung "<@!570268431522201601> I see, that's": the short version is use alloc/alloc0/allocShared and dealloc/freeShared
13:36:41FromDiscord<mratsim> another one is "import system/ansi_c" and use c_malloc / c_calloc and c_free
13:36:57FromDiscord<mratsim> the short version will not use the GC but will use Nim memory allocator.
13:37:03FromDiscord<mratsim> the second is plain C
13:43:03*Schnouki joined #nim
13:44:59FromDiscord<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:06FromDiscord<haxscramper> Maybe "this month in nim" should include PR/RFC highlights
13:56:16FromDiscord<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:05FromDiscord<dom96> I think a milestone will already do that
13:57:50FromDiscord<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:52FromDiscord<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:00FromDiscord<konsumlamm> preferably without using `include`
13:58:00FromDiscord<haxscramper> Last updated four months ago
13:58:06FromDiscord<haxscramper> For 1.4.0
13:58:14FromDiscord<dom96> In reply to @haxscramper "https://github.com/nim-lang/Nim/milestones?directio": yep, something like this
13:58:16FromDiscord<konsumlamm> ye, the milestones aren't really up to date
13:58:48FromDiscord<haxscramper> They don't have enough community engagement and they just feel like a slightly cleaned up github issues.
13:59:12FromDiscord<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:18FromDiscord<haxscramper> (edit) "thingsx" => "things""
13:59:20FromDiscord<dom96> If we keep them updated and link to them from the readme I think it will work quite well
13:59:32FromDiscord<dom96> writing an article is even harder
13:59:40FromDiscord<dom96> and is even less likely to be kept up to date
13:59:53FromDiscord<dom96> but maybe we can try that too to encourage contributions
14:00:30*Gustavo6046 joined #nim
14:00:56FromDiscord<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:24FromDiscord<haxscramper> Like a release note. You write it once and then don't update because it is done
14:03:25FromDiscord<haxscramper> In reply to @haxscramper "I don't think just": Or these kind of things
14:04:07FromDiscord<haxscramper> When karax was moved to another organization @willyboar made a forum posts about that
14:04:17FromDiscord<haxscramper> I think that was them at least
14:04:20FromDiscord<Bung> Can simply add todo list section to readme or create a pined issue list all todos.
14:04:42FromDiscord<haxscramper> So what? People would just have to dig through all issues again
14:05:02FromDiscord<haxscramper> To figure out what is going on. Better not do anything then, as it is not much better.
14:05:53FromDiscord<Bung> it's much better than current state.
14:06:26FromDiscord<haxscramper> There can be dozens of comemnts on each issue and RFC that express different opinions
14:06:50FromDiscord<Bung> the current state is like "hey , I want contribute to nimble , what I can do?" , answers "none"
14:07:05FromDiscord<haxscramper> This is a different thing
14:07:46FromDiscord<haxscramper> Im not talking about making it simpler to contribute, I'm talking about illuminating current state of the project
14:08:04FromDiscord<haxscramper> These two can and should be done separately in my opinion
14:10:00FromDiscord<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:14FromDiscord<haxscramper> Whatever. I'm not talking about this.
14:12:06FromDiscord<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:14FromDiscord<haxscramper> Not a technical one
14:12:26*ss quit (Quit: Leaving)
14:12:34FromDiscord<haxscramper> So maybe not worth the bother in the end.
14:13:13FromDiscord<willyboar> In reply to @haxscramper "When karax was moved": Not me. It was @ajusa
14:13:44FromDiscord<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:26FromDiscord<willyboar> Do you want nimble to move to a separate org?
14:14:37*Gustavo6046 quit (Read error: Connection reset by peer)
14:15:32FromDiscord<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:48FromDiscord<Bung> it's form of contributors, but the fact is no much contributors.
14:17:18FromDiscord<haxscramper> In reply to @haxscramper "No, as I said": Don't have any concrete arguments against it though, just personal opinion
14:17:54FromDiscord<dom96> In reply to @haxscramper "It doesn't have to": well, you still need to write the monthly post 🙂
14:19:04FromDiscord<dom96> Having a milestone that says "This is what we want to get done" will already make things better IMO
14:19:19FromDiscord<dom96> Nimble to separate org too hah
14:19:45FromDiscord<willyboar> Why not both milestone and article
14:19:55FromDiscord<haxscramper> because it requires more effort
14:20:31FromDiscord<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:36FromDiscord<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:40FromDiscord<dom96> Certainly someone from the community could write the blog post too
14:21:16FromDiscord<Bung> why not add a blog to nimble.directory ?
14:21:31FromDiscord<haxscramper> We already have nim blog on the webside
14:21:33FromDiscord<haxscramper> (edit) "webside" => "website"
14:21:50FromDiscord<dom96> yeah
14:22:14FromDiscord<willyboar> Nimble.directory is a personal project not official
14:22:28FromDiscord<dom96> that too
14:23:23*rockcavera joined #nim
14:23:23*rockcavera quit (Changing host)
14:23:23*rockcavera joined #nim
14:23:50FromDiscord<Bung> ok. maybe write a article "the bad parts of nimble" will attract people take more effort to nimble.
14:24:00FromDiscord<dom96> lol
14:24:13FromDiscord<Bung> 😆
14:25:04FromDiscord<haxscramper> In reply to @Bung "ok. maybe write a": I'm writing and RFC about that
14:25:07FromDiscord<haxscramper> now
14:25:30FromDiscord<Bung> yeah , the title should be "bold"
14:25:44FromDiscord<dom96> The title should be "A future vision for Nimble" 🙂
14:25:47FromDiscord<konsumlamm> ok, so i came to the conclusion that `include` is a horrible idea
14:25:56FromDiscord<haxscramper> I want to test/review lockfiles PR and test viability of centralized version storage
14:26:06FromDiscord<haxscramper> latter one idk how it is called exactly
14:26:18FromDiscord<willyboar> You can create a new repo - new-nimble - and call people to open issues
14:26:18FromDiscord<dom96> yeah, not sure what you mean by "centralised version storage"
14:26:23FromDiscord<haxscramper> database of requirements for all versions of all packages
14:26:38FromDiscord<haxscramper> Just quick test of how hard would it be to do this
14:26:41FromDiscord<willyboar> And add a to-do list or whatever in the readme
14:26:55FromDiscord<haxscramper> Same with #890 where I parsed all packages that existed at the time and showed some numbers
14:27:03FromDiscord<dom96> In reply to @willyboar "You can create a": We already have a repo for issues, let's not
14:27:04FromDiscord<haxscramper> that were relevant at the time
14:27:20FromDiscord<dom96> Ahh, a centralised package repo
14:27:28FromDiscord<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:16FromDiscord<dom96> We could write an RFC for just the centralised package repo concept
14:28:25FromDiscord<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:42FromDiscord<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:05FromDiscord<haxscramper> For now I just want to have a centralized starting point for discussion
14:29:16FromDiscord<dom96> sure, I only fear that we will have too much discussion
14:29:42FromDiscord<haxscramper> there is a lot of issues to unpack, so I'm afraid that can't be really avoided
14:29:53FromDiscord<willyboar> Personally I loved to see an official package hosting similar to rubygems
14:29:56FromDiscord<haxscramper> People have accumulated a lot of requests here and there
14:30:03FromDiscord<willyboar> Semi off topic
14:30:11FromDiscord<haxscramper> this is on topic of dependency resolution
14:30:30FromDiscord<dom96> @haxscramper consider being ruthless about prioritisation
14:30:36FromDiscord<dom96> i.e. not discussing every single thing
14:31:42FromDiscord<haxscramper> Alright, do I choose to focus on dependency resolution and centralized repo or support for task-level dependencies and package features?
14:31:46FromDiscord<haxscramper> I can't decide
14:31:49FromDiscord<dom96> also love how the Nim v2 milestone was created in 2018 lol
14:32:15FromDiscord<gerwy> what does `ordinal type expected` means?
14:32:29FromDiscord<dom96> task-level deps is IMO a _relatively_ minor feature that doesn't need discussion
14:32:38FromDiscord<dom96> we already know how it should work
14:32:46FromDiscord<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:41FromDiscord<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:52FromDiscord<konsumlamm> In reply to @Life Sucks "i have a const": convert the int to a float
14:34:36FromDiscord<haxscramper> In reply to @dom96 "task-level deps is IMO": what about package features then?
14:35:06FromDiscord<dom96> what package features? 🙂
14:35:12FromDiscord<haxscramper> Or moving from I-need-full-compiler-to-read-manifest
14:35:46FromDiscord<haxscramper> Or long list of general usability issues
14:36:42FromDiscord<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:24FromDiscord<haxscramper> array with a size "`0.4 of int`"
14:37:55FromDiscord<haxscramper> !eval echo sizeof(int).float() 0.4
14:37:57NimBotCompile failed: /usercode/in.nim(1, 26) Error: invalid token: (\29)
14:39:56FromDiscord<Bung> I've create one for inspiration . https://github.com/bung87/The-bad-parts-of-nimble
14:39:59fn<R2D299> itHub: 7"<No Description>"
14:41:42FromDiscord<haxscramper> In reply to @Bung "yeah , the title": speaking of which - I dont' want to start a flame war
14:42:11FromDiscord<Avatarfighter> Does nimble support upgrading project dependencies all at once ?
14:42:20FromDiscord<haxscramper> no, I don't think it does
14:42:44FromDiscord<Bung> it's just for attracting people.
14:43:07FromDiscord<haxscramper> I don't like attracting people with clickbaits
14:43:20FromDiscord<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:53FromDiscord<haxscramper> well, my personal opinion on that one is - "can you just f-ing stop?"
14:43:59FromDiscord<haxscramper> and I need two things
14:44:00FromDiscord<haxscramper> three
14:44:06FromDiscord<haxscramper> name, version and requirements
14:44:34FromDiscord<haxscramper> you can do any number of `staticRead()` for anything else, thats your problem, but manifest must be self-contained
14:44:55FromDiscord<haxscramper> otherwise it is not possible to build any centalized package repo.
14:45:06FromDiscord<haxscramper> I've seen package whose version depends on evaluation date
14:45:29FromDiscord<haxscramper> I mean sure, yeah, but we can't account for every little insanity people have put in their `.nimble` file
14:45:31FromDiscord<dom96> it is possible
14:45:56FromDiscord<dom96> evaluate the .nimble file on publish and store the metadata statically
14:46:12FromDiscord<dom96> I would say we only want to store tagged versions anyway
14:46:27PMunchHas anyone made a generic bezier curve/spline thing in Nim?
14:46:50FromDiscord<dom96> PMunch: pretty sure Pixie supports this
14:47:21PMunchSure, but I need to be able to give an X and get a Y out of it
14:48:20PMunchBasically I want to create something like this: https://www.theinsidetips.com/wp-content/uploads/2020/04/Curves_01.jpg
14:48:43PMunchBut I need to be able to read out the colours along the line
14:50:22PMunchI guess I could use the tween algorithms in SDLGamelib
14:56:22FromDiscord<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:49FromDiscord<alehander42> wow 20 notifs
15:28:36FromDiscord<Bung> long time no see @alehander42
15:30:37FromDiscord<clyybber> In reply to @alehander42 "wow 20 notifs": yeah, a spammer :/
15:31:05FromDiscord<alehander42> @Bung ah hey!
15:31:08FromDiscord<Avatarfighter> o/ alehander 😄
15:31:30FromDiscord<alehander42> hey @Avatarfighter happy to see you
15:31:49FromDiscord<alehander42> yes, 20 notifs really make you jump a bit
15:31:51FromDiscord<Avatarfighter> Me too 🙂 how have you been ?
15:32:10FromDiscord<alehander42> fine, some rest, some work 😄
15:32:35FromDiscord<Bung> sounds good
15:32:47FromDiscord<alehander42> what's new with you
15:32:55FromDiscord<alehander42> guys
15:33:18FromDiscord<Avatarfighter> Nothing too new with me, wrote a killer bot using async and I'm very happy with its scaleability
15:33:34FromDiscord<alehander42> what does it kill
15:33:37FromDiscord<alehander42> killing sounds bad!
15:33:38FromDiscord<Bung> writting a web framework and a static site generator.
15:33:48FromDiscord<Avatarfighter> scalps products :p
15:34:10FromDiscord<alehander42> @Bung ah very cool
15:34:16FromDiscord<Avatarfighter> ^
15:34:45FromDiscord<alehander42> @Avatarfighter hm, sounds unethical 😦 i am not familiar with those kinds of products enough
15:35:56FromDiscord<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:23FromDiscord<Avatarfighter> (edit) "it's" => "the stuff I'm doing is"
15:37:57FromDiscord<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:37FromDiscord<Avatarfighter> Yeah I'm only testing my software not actually buying it
15:40:41FromDiscord<Avatarfighter> it's fun
15:44:44FromDiscord<alehander42> otherwise i keep on debugging my stuff as well
15:45:03FromDiscord<alehander42> worked on some experiments, but still mostly trying to learn/todo there
15:48:38FromDiscord<alehander42> wow there was a nimconf again
15:48:40FromDiscord<alehander42> didn't know
15:48:51FromDiscord<dom96> hah, nice to see you back alehander42 🙂
15:51:37FromDiscord<clyybber> In reply to @dom96 "hah, nice to see": thank the spammer :D :D
15:52:52FromDiscord<Sabena Sema> how does nim do compile time floating point functions?
15:53:23FromDiscord<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:29FromDiscord<Sabena Sema> even when targeting some other arch
15:53:43FromDiscord<Sabena Sema> bagh I'll just test
15:53:56FromDiscord<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:51FromDiscord<timotheecour> currently, both float32 and float64 are operated on using float64 ("mostly"); for simplicity's sake, but it comes with caveats
18:10:05FromDiscord<timotheecour> (edit) "currently, ... both" added "in VM,"
18:25:41*Gustavo6046 quit (Ping timeout: 265 seconds)
18:32:02*Gustavo6046 joined #nim
18:32:58fn<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:31FromDiscord<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:40fn<bung99> can you use git cli ?
19:00:55fn<bung99> use git cii is easy solution , you can just export https_proxy=
19:02:24fn<bung99> or you may use .nims putEnv("https_proxy",yourproxy)
19:08:59FromDiscord<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:00FromDiscord<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:19FromDiscord<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:07FromDiscord<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:11fn<bung99> @OffenseTeacher I dont think the httpclient looking up to registry
19:18:04FromDiscord<dom96> In reply to @arnetheduck "the insanity is having": with great power comes great responsibility 🙂
19:18:16FromDiscord<haxscramper> And great pain in the ass
19:18:16FromDiscord<OffenseTeacher> no but I can lookup the registry before using other ways
19:18:43FromDiscord<dom96> honestly though, I'm happy to revert to a declarative approach
19:19:34FromDiscord<dom96> One way we could compromise is by still allowing tasks
19:19:53FromDiscord<willyboar> @arnetheduck why don't you hire @dom96?
19:20:09fn<bung99> haha
19:20:16FromDiscord<dom96> lol
19:20:17FromDiscord<arnetheduck> declarative formats tend to have extension points where you can plug in your non-declarative parts
19:20:32FromDiscord<arnetheduck> for one, he didn't apply 😉
19:20:38FromDiscord<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:46FromDiscord<dom96> I've had plenty of Status recruiters trying to poach me ;P
19:21:12FromDiscord<haxscramper> So the only thing necessary IMO is that things like version = "1.2.2" didn't require code evaluation
19:21:42FromDiscord<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:48FromDiscord<Rika> ~~only crazy people script the version number anyway~~
19:21:59FromDiscord<arnetheduck> Facebook and Status are a bit on the opposite ends of some spectra, as well, I guess
19:22:08FromDiscord<haxscramper> Using nim syntax and some simple, limited subset of a language (like boolean expressions for optional dependencies)
19:22:43FromDiscord<Rika> that would still require some rudimentary evaluation then
19:22:55FromDiscord<dom96> In reply to @arnetheduck "Facebook and Status are": In what way? I think they are actually very alike
19:22:56FromDiscord<haxscramper> Yeah, but not full compiler multi-pass
19:23:18FromDiscord<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:06FromDiscord<haxscramper> (edit) removed "I think"
19:24:12FromDiscord<dom96> In reply to @haxscramper "when defined(windows) is a": hm, this would require some thought
19:24:53FromDiscord<Rika> it is, but i thought this was supposed to alleviate ease of parsing for tooling
19:25:00FromDiscord<haxscramper> Well, everything would require some thought, but if we only allow defined/and/or/not it would already be quite useful
19:25:14FromDiscord<haxscramper> In reply to @Rika "it is, but i": This is a tradeoff
19:25:26FromDiscord<haxscramper> I think staticRead for version is an abomination
19:25:29FromDiscord<dom96> Already leading to too much complexity IMO
19:25:42FromDiscord<dom96> once you start reimplementing certain Nim constructs you might as well go all the way
19:25:52FromDiscord<haxscramper> What is not "too much" while still supporting optional dependencies then?
19:26:05FromDiscord<dom96> anything that needs evaluation is too much
19:26:24FromDiscord<Rika> but that is needed for (custom) optional dependencies
19:26:35fn<bung99> why not only allow static meta data
19:26:36FromDiscord<haxscramper> Alright, so how do we get optional deps then? Or development dependency
19:26:52*SebastianM quit (Quit: Bye)
19:26:58FromDiscord<haxscramper> In my case it would be like when defined(developmetMode)
19:27:02FromDiscord<Rika> In reply to @haxscramper "Alright, so how do": how other languages do it: offer it in a noncustom way
19:27:07FromDiscord<Rika> of course, that's not nim-like
19:27:10FromDiscord<dom96> development mode is probably better handled in the tasks
19:27:20FromDiscord<dom96> a `requires "..."` can mutate the dep list
19:27:27FromDiscord<dom96> (edit) "a `requires "..."` ... can" added "in a task"
19:27:36FromDiscord<dom96> task dev: ...
19:27:40FromDiscord<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:09FromDiscord<dom96> as for OS-specific deps, maybe we just don't support these? what's the trade off to doing this?
19:28:24fn<bung99> you can just add a scope keyword , development, production reserved.
19:28:50FromDiscord<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:58FromDiscord<dom96> imagine Nimble getting a dependency graph: now you get different combinations of graphs per OS
19:29:00FromDiscord<haxscramper> This is an acceptable trade-off
19:29:06FromDiscord<haxscramper> So no worries here
19:29:26FromDiscord<dom96> well, I mean: you just include all the deps
19:29:30FromDiscord<dom96> even if they are windows-specific
19:29:42FromDiscord<dom96> I think you'd just end up installing some useless deps
19:29:43FromDiscord<Rika> doesnt npm handle os-specific deps
19:29:53FromDiscord<haxscramper> Even hybrid ones that would fail building on different os?
19:30:01FromDiscord<Rika> im pretty sure they have some sort of mechanism for os-specific deps
19:30:20FromDiscord<haxscramper> Or ones that have before/after install takes that would fail
19:30:24FromDiscord<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:49FromDiscord<Rika> okay i think npm uses optional so if it fails it still continues
19:30:54FromDiscord<dom96> but here is another problem: allowing tasks to change deps screws us
19:31:09FromDiscord<dom96> before install: requires.add("lol")
19:31:25FromDiscord<haxscramper> Then disallow this
19:31:45FromDiscord<dom96> yeah, I think we'd need to
19:31:48FromDiscord<haxscramper> Make all congratulation declarative
19:31:57FromDiscord<haxscramper> task: static list of requires
19:32:08FromDiscord<haxscramper> Top-level: also static list of requires
19:33:07FromDiscord<dom96> I think this needs its own RFC 🙂
19:33:28FromDiscord<dom96> and the RFC needs to contain answers to all these problems
19:34:06FromDiscord<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:36FromDiscord<haxscramper> Or I might need to disable compilation of a binary for a hybrid package
19:40:41FromDiscord<Bung> I think disable is fine, when user want , use do `nimble build pkgname` or some like
19:42:11FromDiscord<Bung> or like `nimble install pkgname -b`
19:44:07FromDiscord<aleclarson> can i not assign a proc to a variable?
19:44:21*Gustavo6046 quit (Remote host closed the connection)
19:44:30FromDiscord<Rika> you can, mind clarifying
19:47:06FromDiscord<aleclarson> sent a code paste, see https://play.nim-lang.org/#ix=3rp4
19:47:14*Gustavo6046 joined #nim
19:49:58FromDiscord<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:02FromDiscord<arnetheduck> In reply to @dom96 "In what way? I": I'd ask the same question 😉
19:56:03FromDiscord<Rika> what is toQuery?
19:56:09FromDiscord<Rika> ah
19:56:13FromDiscord<Rika> you're using a global
19:58:10FromDiscord<arnetheduck> declarative vs not is really something more of a first principle, it's not something you write an RFC about
20:00:47FromDiscord<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:00FromDiscord<aleclarson> anyway, i figured out a workaround \:)
20:21:28FromDiscord<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:55FromDiscord<timotheecour> do you have a link?
20:26:55FromDiscord<Bung> https://github.com/nim-lang/Nim/issues/8303
20:27:46FromDiscord<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:23FromDiscord<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:27FromDiscord<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:13FromDiscord<Bung> @timotheecour is cant be simply pass compiler check ?
21:45:30*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
21:45:55FromDiscord<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:08FromDiscord<ElegantBeef> A lovely start 😄 https://media.discordapp.net/attachments/371759389889003532/859200519603748894/unknown.png
22:36:09*Gustavo6046 joined #nim
22:36:51FromDiscord<checkersai> Is there a significant difference between using the `SharedPtr` from fusion and using `ref`s with `--gc:arc`?
22:39:28FromDiscord<Recruit_main707> it probably will be more painful
22:42:41FromDiscord<checkersai> why?
22:44:16FromDiscord<Recruit_main707> well, i guess its harder to use
22:54:19*max22- quit (Remote host closed the connection)
22:57:15FromDiscord<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:17FromDiscord<Bung> I thought if the program know where the call routine is ,closure or not does not have much differences.
23:21:31FromDiscord<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:01FromDiscord<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:27FromDiscord<ElegantBeef> Trying to make some tests for my error messages and oh boy is testament not liking it
23:24:22FromDiscord<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:09FromDiscord<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:18FromDiscord<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:40FromDiscord<ElegantBeef> Not really fixing tests, was going to implement tests, but sure PR i guess 😄
23:28:05FromDiscord<Bung> so the main point is make compiler pass , ignore the pragmas make the program work I think.
23:28:21FromDiscord<ElegantBeef> Yea with the other calling conventions is a little less sensible that there is an type mismatch
23:29:16FromDiscord<Bung> In reply to @ElegantBeef "Remember that closures are": am not from c , could you provide some link I can read more ?
23:30:34FromDiscord<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:31FromDiscord<exelotl> In reply to @checkersai "Is there a significant": see this comment: https://github.com/nim-lang/Nim/pull/17333#issuecomment-868922491
23:32:55FromDiscord<ElegantBeef> https://nim-lang.org/docs/intern.html#code-generation-for-closures
23:33:16*Gustavo6046 joined #nim
23:37:36FromDiscord<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:39FromDiscord<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:46FromDiscord<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)