<< 25-08-2020 >>

00:06:18*leorize quit (Quit: WeeChat 2.8)
00:30:57FromDiscord<Varriount> disruptek: Cream of bacon sounds... suspicious.
00:31:58FromDiscord<Varriount> I guess you might make such a thing by mixing cream and bacon, and cooking them together?
00:34:31FromDiscord<Rosen> found a recipe for cream of bacon soup and it actually looks great
00:34:32FromDiscord<Rosen> at least to me
00:34:40disrupteki'll let you know how it comes out in a few minutes.
00:37:16*arecacea1 quit (Remote host closed the connection)
00:38:02*arecacea1 joined #nim
00:54:18disruptekbetter than expected and worse than i'd hoped.
01:09:32*FromGitter quit (Ping timeout: 260 seconds)
01:10:07*oprypin quit (Ping timeout: 260 seconds)
01:43:20*apahl quit (Ping timeout: 244 seconds)
01:45:19*apahl joined #nim
01:46:39*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
01:50:08*FromGitter joined #nim
01:53:03*endragor joined #nim
02:09:42FromGitter<gogolxdong> Is Nim memory safe for now?
02:10:41*waleee-cl quit (Quit: Connection closed for inactivity)
02:12:17FromDiscord<Varriount> It always has been?
02:12:39FromDiscord<Varriount> Or rather, it depends on what you call "memory safe"
02:15:41FromDiscord<Elegant Beef> If you turn off the GC it's up to you to make it memory safe 😛
02:17:08FromDiscord<Elegant Beef> But that's if we're just talking about leaking of course
02:24:59*muffindrake quit (Ping timeout: 246 seconds)
02:27:19*muffindrake joined #nim
02:28:33FromDiscord<Varriount> @Elegant Beef Or you can use this garbage collection scheme: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125
02:29:58*sagax quit (Remote host closed the connection)
02:30:13FromDiscord<Elegant Beef> That's beautiful
02:33:14*awe00 quit (Ping timeout: 258 seconds)
02:33:16*pbb quit (Remote host closed the connection)
02:33:27FromDiscord<Varriount> Destroying the hardware: The ultimate garbage collection method.
02:33:39FromDiscord<Elegant Beef> And the memory cant be read, so it's safe
02:36:30*pbb joined #nim
02:41:16FromDiscord<Rosen> one of the only programs that *creates* garbage when it halts perhaps?
02:42:51FromDiscord<Elegant Beef> Those missles probably kill civilians and you're saying they're garbage... tsk tsk 😛
02:45:37*vicfred joined #nim
03:02:12*thomasross quit (Ping timeout: 256 seconds)
03:08:46*sagax joined #nim
03:22:32*endragor quit (Remote host closed the connection)
03:22:49*endragor joined #nim
03:23:35*endragor quit (Remote host closed the connection)
03:24:01*endragor joined #nim
03:29:01*endragor quit (Ping timeout: 264 seconds)
03:32:48*endragor joined #nim
03:47:26*pbb quit (Remote host closed the connection)
03:50:49*pbb joined #nim
03:57:23*rockcavera quit (Remote host closed the connection)
04:02:01*tsujp quit (Ping timeout: 246 seconds)
04:04:40*tsujp joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:37*supakeen joined #nim
04:38:13*arecacea1 quit (Remote host closed the connection)
04:38:32*arecacea1 joined #nim
04:43:20*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:43:27*njoseph joined #nim
04:58:07*hyiltiz quit (Ping timeout: 244 seconds)
05:01:51*hyiltiz joined #nim
05:01:51*hyiltiz quit (Changing host)
05:01:51*hyiltiz joined #nim
05:13:32*njoseph quit (Quit: No Ping reply in 180 seconds.)
05:14:37*njoseph joined #nim
05:35:32*solitudesf joined #nim
05:36:06*narimiran joined #nim
05:41:12silvernode[m]Good morning. I have been on vacation for a week already and haven't really hung out with everyone here. Why is it, that when I finally get a vacation to actually catch up on hobbies and learning stuff, I procrastinate nearly the entire vacation?
05:41:28silvernode[m]ha
05:41:43silvernode[m]I suspect I am not alone in that.
05:42:47narimiransilvernode[m]: because your vacation is too short
05:43:38silvernode[m]<narimiran "silvernode: because your vacatio"> I I think you are correct. I usually get the drive and motivation to do stuff at the end of it.
05:47:42*arecacea1 quit (Remote host closed the connection)
05:48:26*arecacea1 joined #nim
05:54:23*maier joined #nim
05:54:29*maier is now known as kenran
05:54:40*arecacea1 quit (Remote host closed the connection)
05:55:01*arecacea1 joined #nim
06:00:37*bung quit (Ping timeout: 258 seconds)
06:06:29*NimBot joined #nim
06:12:35*oprypin joined #nim
06:29:52*bung joined #nim
06:34:25*bung quit (Ping timeout: 264 seconds)
06:48:37*PMunch joined #nim
06:55:17Zevvi had the same. big plans but a total mental cresh, just porridge for brains in the first week
06:55:22Zevveb
06:55:28Zevvembrace that
07:13:59*Vladar joined #nim
07:14:41PMunchsilvernode[m], sounds like all of my vacations ever <_<
07:15:25silvernode[m]yeah I think we all just want to rest.
07:17:19PMunchI wonder how productive I would be if I had all the wealth I would need
07:17:43PMunchI.e. if the incentive to work for money was completely gone
07:18:17*bung joined #nim
07:32:41silvernode[m]<PMunch "I wonder how productive I would "> I have thought deep about this on many occasions and I think after awhile, most of us would absolutely need to be productive. Hungry to get something done and kill the boredem.
07:33:05PMunchExactly
07:33:28PMunchBut I wouldn't feel the pressure to get up super early in the morning and sit around being an unproductive zombie :P
07:34:12silvernode[m]Once you realize that months have gone by and you are free of the shackles, and that you can really work on whatever you want and at your own pace...hobbies would go into overdrive.
07:34:44silvernode[m]unless you have a soul sucking spouse. of course.
07:35:07*krux02 joined #nim
07:35:11*fredrikhr8 joined #nim
07:35:41PMunchWell, now you have the energy to get rid of them :P
07:36:37*hnOsmium0001 quit (Quit: Connection closed for inactivity)
07:38:45*fredrikhr quit (Ping timeout: 258 seconds)
07:38:45*fredrikhr8 is now known as fredrikhr
07:45:05FromDiscord<Varriount> I would like to both spend time on my hobbies and be paid for it...
07:46:25PMunchWe should convince some Russian oligarch or something to sponsor development of random Nim projects :P
07:46:45PMunchJust give us a couple million and we'll divide us amongst anyone who wants to write Nim
07:48:12FromDiscord<Elegant Beef> What is this a work based ponzi scheme
07:48:53PMunchWell, not really a ponzi scheme
08:03:40*Kaivo quit (Ping timeout: 258 seconds)
08:05:58*Kaivo joined #nim
08:18:09*Zectbumo quit (Remote host closed the connection)
08:30:35*zedeus quit (Ping timeout: 240 seconds)
08:32:54*zedeus joined #nim
08:38:28silvernode[m]I wan to start a network of audio/video media around Nim and dub them "NimCasts". The network can have a website, and a list of partner Nim programmers that also have audio/media episodes.
08:39:14silvernode[m]Anyone who would want to start a show can because part of the network of shows about Nim. This includes live streams too.
08:39:42FromDiscord<vieru> is there a way to unallocate a constant ?
08:40:07PMunchvieru, nope
08:40:19PMunchConstants are a compiler thing, they don't exist on runtime
08:40:33PMunchThey just get subbed in wherever you use them
08:40:35FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2vaO
08:40:39FromDiscord<vieru> yeah but they do ocupy memory
08:40:52PMunchSo `const x = 100; echo x` just gets rewritten to `echo 100`
08:41:27Oddmongeryes it's not allocation, it's just pre-computation
08:41:30PMunchYeah, that just gets rewritten to `writeFile("file2", "whatever the contents of 'file' was")`
08:41:55FromDiscord<vieru> idk man my file memory usage is 1mb without that code↵and with that code is 7mb
08:42:12FromDiscord<vieru> (edit) 'file' => 'executable'
08:42:30PMunchProbably because writeFile must allocate that string in memory
08:42:42PMunchBut it will get collected by the garbage collector as soon as the file writing is done
08:42:43Oddmongerthe file is included in your exe
08:43:16PMunchIs there a built-in way in Nim of echoing variables with their names?
08:43:34PMunchI want something like `dump x` to output "x: <value of x>"
08:43:35krux02PMunch, not that I know
08:43:45FromDiscord<vieru> so you're saying i shoudnt worry about this stuff
08:43:51krux02would be very helpful, I agree
08:43:52FromDiscord<vieru> gc will do its job ?
08:43:57PMunchvieru, exactly
08:43:59AraqPMunch, there is macros.dump
08:44:16FromDiscord<vieru> thanks
08:44:27PMunchI just get undeclared identifier even after importing macros..
08:44:31Araqno, there is now strformat
08:45:14Araqecho fmt"{expr=}"
08:45:15*awe00 joined #nim
08:45:24PMunchEh, that's too terse
08:46:11Araqhuh?
08:48:27silvernode[m]Now that Araq is here, I should ask about official LLVM support and whether or not it is a planned endeavor. I think I saw the ability to use clang somewhere so I guess that counts.
08:50:52silvernode[m]I have been looking into LLVM lately and discovered how amazing it is, so naturally I came here to see if my favorite programming language can use it.
08:51:47FromDiscord<Clyybber> PMunch: Its sugar.dump
08:52:12FromDiscord<Clyybber> silvernode: Theres NLVM
08:52:23FromDiscord<Clyybber> which is a LLVM backend for Nim
08:52:36silvernode[m]I saw that but it's not official right?
08:53:35silvernode[m]<FromDiscord "<Clyybber> which is a LLVM backe"> have you tried it?
08:54:46FromDiscord<Clyybber> yeah
08:55:13FromDiscord<Clyybber> to both questions :)
08:55:19silvernode[m]<FromDiscord "<Clyybber> yeah"> What was you impression of it?
08:55:25silvernode[m]oh ok
08:55:33silvernode[m]if it's official then I'm in
08:55:40FromDiscord<Clyybber> It works :)
08:55:46FromDiscord<Clyybber> no, its *not* official
08:55:55silvernode[m]aw
08:56:07silvernode[m]It would be cool if it was default
08:56:23FromDiscord<Clyybber> maybe in the future
08:56:51FromDiscord<Clyybber> keep in mind you can still get llvm out of Nim without NLVM
08:57:01silvernode[m]The error messages and debugging was awesome with it when I used Rust a few times.
08:57:19silvernode[m]<FromDiscord "<Clyybber> keep in mind you can "> is that because of how diverse LLVM is?
08:57:20FromDiscord<Clyybber> thats probably unrelated to LLVM
08:57:31FromDiscord<Clyybber> its because you can compile C to LLVM
08:58:24silvernode[m]yeah I was old by someone (who probably didn' know wha they were talking about) that the error messages in rust were from LLVM. I guess that's BS
08:59:19silvernode[m]If we can get that level of detail with our error messages in Nim, it would be fantastic.
08:59:50silvernode[m]That's one of the biggest hurdles I have faced while learning Nim.
09:00:49FromDiscord<Elegant Beef> Yea i just ran into a pretty annoying problem i feel an error message would've been nice, trying to use methods without the base type imported should tell you, import the god damned base type 😄
09:02:14FromDiscord<Elegant Beef> I spent vastly more time than i'd like to admit trying to figure out why that happen, eventually i just tried include and realize that the only difference with the include vs import is that a single type wasnt present
09:02:48PMunchAah, thanks @Clyybber
09:05:55silvernode[m]<FromDiscord "<Elegant Beef> I spent vastly mo"> Yeah disruptek asked me back in Feb when I first started using Nim what I think is the biggest problem for adoption of Nim. I said whitespace, but after programming with Nim for the better part of a year now, I think the error messages are a actual issue.
09:06:19silvernode[m]Whitespace it not a problem
09:06:52Araqerror messages are generally good these days, what in particular did you encounter?
09:08:07FromDiscord<haxscramper> Error messages are not that good when it comes to errors in template-generated code. It takes just couple of `mapIt().filterIt()` to generate several screens worth of text. Type mismatches on function types are also could be improved
09:08:20silvernode[m]I would trade anything to have detailed error messages. I otherwise we spend hours going crazy just like you did
09:08:37FromDiscord<haxscramper> I checked how error messages in compiler are passed to the user - right now everything is basically squeezed into single string and passed over to message printer. Well, except for type mismatch errors where it first collects all alternatives and then prints them.
09:08:50Zevvhexscramper: can you come up with concrete examples of bad error messages?
09:08:52FromDiscord<Elegant Beef> If that is to me I had sub types declared in seperate files and the master type in a file i didnt import in the main module where the method call was happening so the conversion from Controller -> AiController or Controller -> PlayerController needed to be explicit
09:09:05silvernode[m]<Araq "error messages are generally goo"> Usually it's "instantiation of fmt from here" messages
09:09:32FromDiscord<Elegant Beef> And ther was no indication that the base class needed to be imported for the methods to work
09:09:40silvernode[m]I think that messages in particular needs work
09:09:58silvernode[m] * I think that message in particular needs work
09:10:37silvernode[m]Araq: Overall though, the error messages are pretty good.
09:10:42Araq<Elegant Beef> I think that's a language wart moreso than a problem of error messages
09:11:04AraqI keep asking for attaching procs to types, not many are too happy about it
09:11:08FromDiscord<haxscramper> Zevv: https://play.nim-lang.org/#ix=2vb3
09:11:22FromDiscord<haxscramper> It approaches C++ level of template-error-maddness
09:11:32FromDiscord<Elegant Beef> Well either way it was unclear the problem and how to resolve it, what do you mean attaching procs to type, like member functions?
09:11:40FromDiscord<haxscramper> Yes, not everyone writes tonts of templates like that
09:12:05silvernode[m]<FromDiscord "<haxscramper> Zevv: ">https://play"> I didn't know you could put discard there 🙂
09:12:12FromDiscord<haxscramper> But showing /original/ source code is much better than generated-one
09:12:33FromDiscord<Elegant Beef> I was actually originally using a proc on the base type and converting to the required type inside the proc, which works equally well as methods i feel, just since methods were there though they were "more proper" for this type of inheritance OOP
09:12:50FromDiscord<Elegant Beef> thought*
09:14:15Zevvhexscramper: there is a lot of noise in there, but the first line is spot on, right?
09:14:22*Trustable joined #nim
09:15:13Zevvbut you're right, having expanded code in the error messages is not helpful here
09:15:46FromDiscord<haxscramper> Yes. Like, /technically/ this is not an issue whatsoever. Just there is too much noise
09:15:49Zevvit approaches C++ level of template-error-madness
09:16:08FromDiscord<haxscramper> Actually, I looked how messages are dealt with in compiler
09:16:26Zevvthey're pretty flat
09:16:39FromDiscord<haxscramper> And maybe I will try to do something with it? I'm not sure if I can pull that off, but I want to at least try
09:17:02Zevvbut what is the root problem then
09:17:49FromDiscord<haxscramper> Ideally I want to have at least something like that - https://github.com/haxscramper/hmisc#hmischexceptions-documentation - pretty hacky right now, but works somewhat
09:19:44Zevvits cool for some, but not for others. I can't stand the "modern" gcc errors with soo much arrows and white space and colors
09:20:19FromDiscord<Elegant Beef> Yea just tell me why im a dullard and get on with it
09:21:04FromDiscord<Elegant Beef> Like do we really need arrows to say "You fucked up here"
09:21:17FromDiscord<haxscramper> If there is concrete type for reporting errors in code (~CodeError~) it is just a matter of representation - pretty-pring everying in the terminal, output old-style errors in cases where it is necessary, generate json ouput for automatic processing etc.
09:22:27FromDiscord<haxscramper> Right now it all happens using strings which means there is no configuration possible at all.
09:22:37FromDiscord<haxscramper> I'
09:23:34FromDiscord<haxscramper> I'm not really sure if I understood the logic of error handling in compiler, but from what I saw - various procedures just call 'handle error' proc that prints things, and optionally quits.
09:24:31FromDiscord<Clyybber> also are we talking compile error messages or runtime?
09:24:37FromDiscord<Clyybber> silvernode ^
09:25:43FromDiscord<haxscramper> Why not raise exception for fatal compilation errors with absolutely all information necessary. This is personal preference of course, but when error happens I usually don't even think about how expensive it would be to print nice message - there is nothing else to do anyway.
09:27:27FromDiscord<Rika> i like the error arrows, otherwise i wouldnt notice that i was looking at the wrong line
09:27:33FromDiscord<Rika> or the wrong portion or the line
09:27:44FromDiscord<Rika> colors on errors are eh, they look cool but thats it
09:28:46FromDiscord<Elegant Beef> I'd rather just capture the snippet of the error and display it in one line with line number/file on the side
09:29:00Zevvwe can ask disruptek to do it, sure he'll find a matching rainbow colored animated dingbat for each possible error
09:29:16FromDiscord<Elegant Beef> Well it might make his balls hurt though
09:29:20FromDiscord<Elegant Beef> Cant think with throbbing balls
09:30:05*zedeus quit (Ping timeout: 240 seconds)
09:30:12FromDiscord<haxscramper> > I'd rather just capture the snippet of the error and display it in one line with line number/file on the side
09:30:25FromDiscord<Elegant Beef> No too much noise imo
09:31:10FromDiscord<haxscramper> If I remove errors it would be better? Just leave upper part of the message + source code
09:31:46FromDiscord<Rika> that's too vertically long for me
09:31:53FromDiscord<Elegant Beef> `file.nim line# (wrong code)`↵`optional arrow`↵`Error description`
09:32:00FromDiscord<Elegant Beef> That's somethin i can get behind
09:32:08*zedeus joined #nim
09:32:14FromDiscord<Elegant Beef> at minimum 2-3 lines of error
09:33:20FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2vb7
09:33:38FromDiscord<haxscramper> AFAIK rust has all possible compiler errors indexed - compiler just shows simple error and there is a webiste with long description. Is it a good idea?
09:33:40FromDiscord<Elegant Beef> I dont like the multiple erros in one area
09:33:50FromDiscord<Rika> its not, its part of the same error
09:33:53FromDiscord<Rika> just more context
09:34:28FromDiscord<Elegant Beef> So... it's noise
09:34:33FromDiscord<Rika> > AFAIK rust has all possible compiler errors indexed - compiler just shows simple error and there is a webiste with long description. Is it a good idea?↵@haxscramper no, unless they also link to the (local installation of the) site in the error
09:34:46FromDiscord<Rika> i sometimes program in no-internet situations
09:35:02FromDiscord<Elegant Beef> `$a` isnt the issue `@a` is the way i see it in their example
09:35:03FromDiscord<Rika> > So... it's noise↵@Elegant Beef everything is noise to you it feels
09:35:14FromDiscord<haxscramper> But if there was such installation it is acceptable?
09:35:37FromDiscord<Rika> i think so, as long as the link is there too
09:36:11FromDiscord<Elegant Beef> it sincerely took me like 5 seconds to extract information from that screenshot, although it's 3:30am here
09:36:41FromDiscord<haxscramper> > `$a` isnt the issue `@a` is the way i see it in their example↵@Elegant Beef Need more colors!!! :)
09:36:46FromDiscord<Rika> i think the indentation is important, makes it easier for us humans to determine what lines are related to each other
09:36:52FromDiscord<Elegant Beef> I went to the arrows first, and went nope, then went to to the top and nope, then went to the error finally
09:37:20FromDiscord<haxscramper> Oh, yes, arrows like x3 times more flashy then the error itself.
09:37:23FromDiscord<Elegant Beef> It needs the actual error looking like an error being red and the context arrows being white unless it's error
09:37:46FromDiscord<Elegant Beef> Multiple arrows made the error ambigious to where it was
09:37:57FromDiscord<Elegant Beef> `$a` isnt the error, `@a` is
09:39:57FromDiscord<Elegant Beef> Anywho i sleep forward all my hatemail to your least favourite person
09:40:18FromDiscord<haxscramper> To sum up: actual error message should be red, arrow annotations white/dim. Don't put too many arrows all over the place
09:40:19FromDiscord<Rika> what if that person is you
09:40:43FromDiscord<Elegant Beef> Rika at this point i'd just be happy i made an impression on someone
09:40:45FromDiscord<Rika> hax: not always possible when using older terminal
09:40:45FromDiscord<Elegant Beef> 😄
09:41:06FromDiscord<Rika> dont recognize beef as a human, got it
09:42:25FromDiscord<haxscramper> There should be like 600+ page book on 'error printing best practices' or something and seems like I need to read it
09:43:33FromDiscord<Rika> if we're gonna go all in with color why even bother with arrows; color the bg red for errors or something
09:43:44FromDiscord<--HA--> sent a long message, see http://ix.io/2vb9
09:44:33FromDiscord<Rika> isnt `void*` == `pointer`
09:45:25FromDiscord<Rika> i dont see how the `type pointer with calling it with nimstrvar[0].addr` would fail
09:45:35FromDiscord<--HA--> That is what I found in a forum post, too. I tried this basically <https://forum.nim-lang.org/t/3045>
09:46:47FromDiscord<--HA--> sent a code paste, see https://play.nim-lang.org/#ix=2vba
09:48:36FromDiscord<Rika> perhaps? also i think you dont need to convert to cstring
09:58:55FromDiscord<--HA--> That also happens implicitly, yes. I tried some variations but never got a positive result.
10:04:50FromDiscord<Rika> maybe check if magick is "returning an exception" via its exceptions api
10:06:51FromDiscord<--HA--> That is a good idea, thanks @Rika
10:14:11*zielmicha__ quit (Read error: Connection reset by peer)
10:14:43*rayman22201 quit (Read error: Connection reset by peer)
10:14:43*alehander92 quit (Read error: Connection reset by peer)
10:15:20*l1x quit (Read error: Connection reset by peer)
10:15:33*rayman22201 joined #nim
10:15:34*zielmicha__ joined #nim
10:15:39FromDiscord<krisppurg> Is Nim beginner friendly for new programmers?
10:15:46*l1x joined #nim
10:15:46*alehander92 joined #nim
10:16:56FromDiscord<ache of head> Hmm
10:17:04FromDiscord<ache of head> I'd say there are languages more suited for beginners
10:17:38FromDiscord<ache of head> But, for example, I'd say I'd learn Nim as a beginner more easily than, say, Java
10:18:46FromDiscord<Rika> Not as much as python and javascript is
10:18:55FromDiscord<Rika> Documentation is everything for beginners
10:19:12FromDiscord<Rika> And nim is fairly lacking there
10:19:29FromDiscord<Rika> (I mean Documentation in the sense of tutorials guides and stuff as well(
10:20:05*awe00_ joined #nim
10:20:09silvernode[m]<FromDiscord "<krisppurg> Is Nim beginner frie"> I think it could be good for beginners since they don't have expectations but on the other hand, there are easier languages they could start with. In the end it depends on the person and their intention. Everyone's brain works differently.
10:20:15FromDiscord<haxscramper> I think nim is a good language for beginners in programming actually. Documentation is lacking when it comes to relatively high-level stuff. Things like types/iterations etc. are described good enough in the manual
10:20:18PMunchUgh, I think I need some sleep... Really can't do math today
10:21:15PMunchI'd say Nim is very beginner friendly because of the helpful community
10:21:23silvernode[m]<PMunch "Ugh, I think I need some sleep.."> 1 sheep x 10 sheep x 50 sheep x 100 sheep.
10:21:25*awe00 quit (Ping timeout: 240 seconds)
10:21:32PMunchIf you're stuck on something you can almost always just ask and get a good reply
10:21:55FromDiscord<haxscramper> And there is like, close to zero of things like `__name__ == 'main'`, special variables end things when you need to keep in mind when starting in python. At least for me it is somewhat confusing
10:22:02FromDiscord<Rika> Beware of dis___tek though ;)
10:22:09PMunchHaha :P
10:22:30silvernode[m]<PMunch "If you're stuck on something you"> yeah I think that is the best point yet. I have seen beginners give up because they go into the python irc and there are just so much going on that they get ignored.
10:22:33FromDiscord<Rika> Ah yeah I always have to search the proper magic variable or method in python
10:22:51FromDiscord<Clyybber> you ask disruptek how to echo a variable and you get back a reflection on the nature of the universe, data and mutations
10:23:51FromDiscord<Clyybber> what more is disruptek than an abstract entity thinking about abstract entities with throbbing balls?
10:24:55FromDiscord<haxscramper> To check if `distinct ptr[T]` is non-nil I first need to cast it back to `ptr`, right?
10:25:14silvernode[m]Maybe beginners should start with assembly and move to Nim once they can't take the pain. That way they appreciate it and stick with it when they have problems. 🙂
10:25:59FromDiscord<Recruit_main707> haxcramper, maybe you can borrow the isNil function
10:26:24PMunchAnyone wants to help me write my simple iterator? Basically I have an array that I want to use as a circular buffer. By passing in two exclusively increasing indices (stop always larger than start) I want to essentially get all the values for that range mod the sequence. I had it working just fine, but I'm struggling with if you give a sequence like 0..15 on a buffer of size 10, that should repeat the first five elements again..
10:26:49FromDiscord<Recruit_main707> or create a template `==` that casts itfor you at least
10:27:28FromDiscord<Rika> disruptek is great but newbies must not interact with them or they may face severe consequences
10:29:26silvernode[m]<PMunch "Anyone wants to help me write my"> "circular buffer", I don't think I'd be of much use there. That must be deeper into programming than I have gone yet.
10:29:55PMunchGod damn it...
10:30:09PMunchI've spent hours writing this thing, and just realised how to do it in three lines..
10:30:18PMunchNvm, two lines..
10:30:19FromDiscord<Rika> lol
10:30:33FromDiscord<Rika> using a modulo
10:30:48FromDiscord<Rika> and a for loop over a range
10:30:50silvernode[m]<PMunch "I've spent hours writing this th"> That's good though, since you get a valuable lesson.
10:30:55PMunchfor i in start..stop: field buffer[i mod array.len]
10:31:29silvernode[m]I love it when that kind of stuff happens to me. It makes me a better programmer.
10:31:33PMunch@Rika, exactly...
10:31:46FromDiscord<Rika> rip lol
10:31:57PMunchI had all this complex logic about splitting the range into subranges and such
10:32:00PMunchA complete mess
10:32:17silvernode[m]I always do that to myself
10:32:29silvernode[m]that's why I come here and ask dumb questions all the time.
10:32:51PMunchEven struggled so much that I wrote an auto-test procedure to test a bunch of different combinations
10:33:35silvernode[m]<PMunch "Even struggled so much that I wr"> and this is why my text game is going to be a complete mess.
10:33:48PMunchHaha :P
10:34:07silvernode[m]over thinking is one of my biggest problems as a programmer.
10:34:45silvernode[m]when you spend days on something only to have someone look at your code and point out the solution in 5 seconds.
10:42:07*abm joined #nim
10:47:19*stisa[m] joined #nim
10:58:00FromGitter<alehander92> haxscramper
10:58:03FromGitter<alehander92> i love this
10:58:19FromGitter<alehander92> i also want to work on elm-like errors in some of my own projects
10:58:27FromGitter<alehander92> so i might follow this
10:58:31FromDiscord<haxscramper> Error message i pasted?
10:58:48FromGitter<alehander92> the idea of having more "fancy" messages*
11:00:08FromDiscord<haxscramper> Right now I'm just using quickly hacked together library, but I will probably move it into separate one + add suggestions from discussion above - configurable printing of error messages.
11:10:52*theelous3 joined #nim
11:12:14FromDiscord<--HA--> @Rika The image magick error is NoDecodeDelegateForThisImageFormat and it gave me a line in the c code. If I pass in an empty string I get the ZeroLengthBlobNotPermitted error I could see existed from the c source. So something is being passed to the function but no matter what I put in there the image format is not recognized. Read from a file directly works. Reading that same file into a string and passing it to MagickReadImageBlob doesn
11:14:15FromDiscord<Rika> prolly the magic header is unrecognized?
11:14:31FromDiscord<Rika> let me read the docs one moment
11:16:13FromDiscord<--HA--> It looks more like it is empty. I'm not very familiar with c but it seems like the magic header should be included in the error message and there is just nothing. And using the function MagickReadImage recognizes it fine. My best guess atm is that somehow I pass the data in a wrong way.
11:16:27FromDiscord<Rika> maybe
11:16:52FromDiscord<--HA--> I got MagickGetImageBlob working and passing that blob back to MagickReadImageBlob also doesn't work
11:17:33FromDiscord<Rika> i dont know what the issue would be, sorry
11:18:21FromDiscord<--HA--> Thank you for looking into it!
11:19:44shashlickWhich wrapper are you using
11:20:21shashlickAlso snippet may help
11:21:57FromDiscord<--HA--> It's posted above a bit. The discord link to the message probably does not help for IRC. No wrapper, if I understand the question correctly. I wrote a few proc with importc pragma.
11:26:46*lritter joined #nim
11:35:03FromDiscord<--HA--> I've been looking a lot at <https://github.com/zedeus/nimagemagick> but there is no read blob function there yet.
11:45:01*rockcavera joined #nim
11:45:37PMunchUgh, another math thing that's taking me waay to long to figure out
11:46:24PMunchI'm creating a particle system
11:46:55PMunchParticles should be able to move fast or slow, their x and y speed is stored as two int8s
11:47:11PMunchI want the slowest speed to be sub 1 pixel per frame
11:47:27FromDiscord<lqdev> make the velocity fixed point?
11:47:37PMunchLet's say minimum speed is one pixel every four frames or something
11:47:37FromDiscord<lqdev> and position ofc
11:47:48PMunchHmm, how would that work?
11:48:02FromDiscord<lqdev> then you shift whole numbers two bits to the right
11:48:24FromDiscord<lqdev> the two least-significant bits are then your representations of .0, .25, .5, and .75
11:48:30PMunchI was thinking just calculate the "I need to move x pixels every n frames" and then do a "if frame mod n: pos + x"
11:48:35FromDiscord<Rika> @--HA-- well because the wrapper is generated automatically, the code isnt there
11:48:41FromDiscord<lqdev> PMunch: mod is slow
11:48:41FromDiscord<Rika> but it will be when you use the library
11:48:50FromDiscord<lqdev> if you're using ints for speeds you're likely constrained
11:48:57FromDiscord<lqdev> so do not use mod
11:49:01FromDiscord<lqdev> unless you're not constrained
11:49:07FromDiscord<lqdev> then i don't see a reason for not using floats
11:49:46PMunchWell I'm mostly constrained in program space
11:50:00PMunchAs in the size of the program and the amount of stuff I can keep in RAM
11:50:08FromDiscord<lqdev> what about clock speeds?
11:50:34FromDiscord<lqdev> because `mod` is like, suuuuuuuper slow, esp. if your processor doesn't have an instruction for it
11:50:40FromDiscord<lqdev> same with division
11:50:54shashlick@--HA-- cstring is already a pointer
11:51:53PMunchIt's a 16Mhz chip
11:51:56shashlickYou could just pass blob.cstring
11:51:59FromDiscord<lqdev> hm
11:52:04PMunchBut I'm not 100% sure if I'm running it at that speed atm
11:52:10FromDiscord<lqdev> and is this in a tight loop?
11:52:28PMunchAh, yes it's running at 16Mhz
11:52:40PMunchYeah, but I'm already using mod and div all over the place
11:52:44FromDiscord<lqdev> oof
11:52:46PMunchSpeed doesn't seem to be much of an issue
11:53:07PMunchIt's just the images and level data that's filling up the puny amount of memory on this thing
11:53:42PMunch28672 bytes of program memory, and 2560 bytes of data memory
11:56:06FromDiscord<lqdev> fixed-point numbers are really simple: instead of representing your values as whole units, you represent it as 1/4 units (you assign two bits to the fractional part, so the format is 6.2 fixed-point, as in integer_bits.fractional_bits)
11:56:15FromDiscord<lqdev> well 1/4th
11:56:18FromDiscord<lqdev> it can be any fraction
11:56:24FromDiscord<lqdev> as long as the denominator is a power of two
12:05:37FromDiscord<--HA--> I just got it working with the inbuilt "logo:" image and using a different format. Thanks everyone for your help! Turns out the issues seems to be just with detection of the image type I'm working with, which is TGA. But I know it generally works now and my wrapper code is not the issue.
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:22*pbb quit (Ping timeout: 260 seconds)
12:06:24FromDiscord<Rika> nice
12:06:37*supakeen joined #nim
12:08:53*waleee-cl joined #nim
12:12:06PMunchlqdev, this is very promising!
12:14:01*pbb joined #nim
12:14:56Zevvmake sure to shift back after multiplying :)
12:16:33PMunchShift back?
12:16:43FromDiscord<lqdev> when rendering i guess
12:16:56PMunchI need to use everything <1 as every n frames add another pixel
12:16:59FromDiscord<lqdev> you have to be careful 'cause now 1 means 1/4th of a pixel and not a single pixel
12:17:45PMunchI guess I could create a procedure that takes a static[float] and converts it automatically
12:18:39FromDiscord<lqdev> distinct types to the rescue!
12:29:45*Vladar quit (Remote host closed the connection)
12:36:11Zevvpmunch: you can just add or sub your 6.2s, but if you multiply then, you get a 12.4, which you have to shr by 2 to make it a .2 again
12:40:01PMunchUhm..
12:40:49Zevvfor example, 3.25*5.75 would be 13*23=299. you do 299 shr 2 to get your answer = 75, meaning 18.75 in 6.2
12:40:52Zevvdoes that make sense?
12:41:10Zevvbut maybe you dont ever need to multiply, so then it doesnt matter :)
12:41:35PMunchAh right, I see
12:41:43PMunchNo I don't think I need to multiply :P
12:41:51Zevvuntil you do!
12:41:53PMunchBut having a fixed-point library for Nim would be cool
12:42:18Zevvthere must be a few
12:43:50*FromDiscord quit (Remote host closed the connection)
12:44:06*FromDiscord joined #nim
12:44:09Zevvwell, there seem to be none. pmunch to the rescue!
12:44:48PMunchI'm barely awake enough to make myself coffee, let alone writing complex bit-shift mathy libraries!
12:45:41FromDiscord<Rika> speaking of weird decimal math, i think i made a float16 library some time ago
12:46:53PMunchHmmmm
12:47:10PMunchI guess I could also store the positions as fixed-point..
12:47:18PMunchThat would solve a lot of my issues..
12:47:40Zevvwell, if you want your positions to increment sub-int, I guess you should right
12:47:47PMunchYeah
12:48:28PMunchMy plan was to use a scheme of adding another pixel every N frames to simulate it
12:48:36Zevvbut with 6.2 you can only go up to 63.75
12:48:38PMunchAnd keeping the position an integer
12:48:49Zevvnah way too complex
12:49:11PMunchI store the position as an int16 at the moment
12:49:28PMunchSo that would be a 14.2
12:49:29Zevvso that would be a 14.2
12:49:40Zevvdude will you marry my. disruptek refused
12:49:43PMunchHaha, exactly
12:50:29PMunchOof, long distance marriage?
12:50:52Zevvwho cares, it's 2020 and we have irc
12:50:57PMunchHaha :P
12:51:16Zevvlet me see how nice generic fixedpoint can be put in some type system
12:52:09PMunchI mean this project is part of a gamejam to make a pretty and simple game. With extra points for simple source code
12:52:29PMunchI'm going hard for the simple source code thing with some crazy Nim macros
12:52:44Zevvhehe
12:52:55PMunchShowing them generic fixed point numbers would definitely be cool
12:56:02PMunchHmm, what's the best way to do rounding?
13:02:54Zevvto whole numers?
13:02:58PMunchYeah
13:03:02Zevvjust like normal floats. add 0.5 and truncate
13:03:08PMunchAaah
13:03:10PMunchOfc
13:03:12Zevvassuming > 0 of c
13:03:47PMunchAre you making a library now by the way?
13:05:26Zevvfiddling a bit
13:05:34Zevvto see if I can make something generic
13:05:38PMunchNice
13:05:44Zevvso you can say, my T is a 6.2
13:05:49Zevvchange that to 5.3
13:05:52Zevvand everything just works
13:06:59ZevvI made a few in C over the years for customers
13:07:03Zevvbut I can't find any in my own repos
13:07:32PMunchThat's amazing!
13:07:49PMunchWait, not on runtime?
13:08:04Zevv?
13:08:18PMunchYou can't change a 6.2 to a 5.3 on runtime
13:08:38Zevvwell, you could convert between them. but I'm trhing to make types for those
13:08:45PMunchYeah okay
13:08:51Zevvso you define your speed as a FixedPoint[uint8, 2]
13:08:56PMunchYeah
13:08:59Zevvand your location as a FixedPoint[16, 2]
13:09:12PMunchAnd then just location += speed
13:09:27Zevvright. But that's already where the complexity lies - mixing them
13:09:40Zevvwhat if I add a 16.4 to a 8.2. what should the output be?
13:09:43PMunchAdd a round function and a compile-time float -> fixed converter and that's pretty much everything I need :P
13:10:05PMunchI'd say that's not possible
13:10:12PMunchWithout a converter
13:10:17Zevvwell, `+=` should work of course
13:10:21FromDiscord<mratsim> I have some fixed point arithmetic hidden
13:10:25PMunchYeah, but only with the same base
13:10:36PMunchWell, same fix point
13:10:45FromDiscord<mratsim> https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/io/color_conversions.nim#L105-L106
13:10:59PMunchSo taking a 14.2 and adding a 6.2 should work
13:11:42ZevvI guess so
13:12:10ZevvOh I thought mratsim already came spoiling our fun with a complete fp math lib
13:12:11Zevvbut no :)
13:12:16*Zevv waves to mratsim
13:12:30PMunchWell I guess that could also require conversion. But it would be the same as just doing int16(7'u8)
13:12:58FromDiscord<mratsim> Nah, I don't have enough time for that
13:13:11Zevvain't nobody got time for that!
13:13:20FromDiscord<mratsim> I want to wrap up my crypto lib so that it starts being useful and then I want to explore multithreaded async
13:13:36Zevvain't nobody got time for that either!
13:14:17FromDiscord<mratsim> Luckily there is a very fresh article on Rust futures which I find quite elegant and actually "zero cost abstraction": https://axelforsman.tk/2020/08/24/rust-style-futures-in-c.html
13:14:26FromDiscord<mratsim> the article is on how to implement them in C
13:15:02ZevvAw don't let disruptek hear, he's all set to make CPS the next big thing
13:15:09FromDiscord<mratsim> Also those futures doesn't involve the GC which makes them threading friendly
13:15:40Zevvooh that looks interesting indeed
13:15:51FromDiscord<mratsim> I don't mind exploring CPS either but before that I need a good handle on the high level problem
13:15:56FromDiscord<mratsim> threading done.
13:16:01Zevv\o/
13:16:03FromDiscord<mratsim> Next is async and iterators
13:16:29Zevvalso cps!
13:18:00FromDiscord<mratsim> I mean, the 3 use cases of CPS is unifying threading, async, iterators and in general everything that uses callbacks
13:18:25Zevvcoroutines
13:18:32Zevvbut, yes
13:18:46FromDiscord<mratsim> once I have an idea of how to write those libraries, I would have a better idea on the magical solution 😉
13:19:10FromDiscord<mratsim> if it is the magical solution*
13:19:28FromDiscord<mratsim> ah yes macro composition as well. But I think I'm OK on the macro front
13:19:31Zevvdisruptek got CPS to a kind-of-working state. We can do async like stuff already, implement iterators and coroutines, implement longjmp style gotos, exception handling, etc
13:19:35FromDiscord<Admin> How would i change the available elliptic curves for a http client ?
13:21:19FromDiscord<stisa> Pmunch I just saw this for fixed point numbers https://gitlab.com/lbartoletti/fpn not sure how complete it is tho
13:22:10PMunchHmm, not the prettiest solution
13:22:11Zevvit's not very generic, comes with a few predefined types only
13:22:16Zevvand it has a sucky api
13:22:24PMunchYeah, was about to say
13:22:48PMunchSeems almost like a port of some C library
13:26:11FromDiscord<Admin> > How would i change the available elliptic curves for a http client ?↵anyone have a clue ?
13:26:17Zevvbwah, my converter does not like to be [T, W] generic
13:26:59Zevvdon't know Admin, if it's possible it should probably in the 'net' docs
13:27:14Zevvnot sure how much of openssl is actually exported into Nim land at this time
13:29:09FromDiscord<mratsim> genotrance / shashlick has a full export in nimssl
13:29:39Zevvis that mixable with the normal (async) net?
13:30:30FromDiscord<mratsim> I think it's all setup in the sslcontext and one of the init function accepts that context
13:30:38Zevvah right
13:30:39FromDiscord<mratsim> but you might need a cast
13:31:04FromDiscord<mratsim> because the highlevel type name probably differ
13:32:45shashlicki don't think nimssl is functional yet
13:33:45shashlicki just point those who ask to my rsa.nim test in nimterop or the pkcs7 wrapper here - https://gist.github.com/genotrance/53d3ae50434ad73365d45bdd6a0ff97d
13:36:32shashlicki felt openssl was too large to wrap everything but now that you can generate an output file, maybe it's worth it
13:37:21Zevvopenssl is hell. all of it.
13:37:52Zevvmratsim should just put the crown on his crypto lib by making us a nice nim native TLS1.[23] implementation
13:38:34FromDiscord<mratsim> Note that we are undergoing security audit and are using BearSSL for basic crypto: https://github.com/status-im/nim-bearssl↵- https://github.com/status-im/nim-libp2p/tree/master/libp2p/crypto
13:39:48Zevvexcellent choice
13:40:01FromDiscord<mratsim> I don't know if I want to implement TLS. It's a super complex beast, it's been done to death, it's unlikely to attract people to Nim because of BoringSSL, BearSSL, WolfSSL, mbedTLS, ...
13:40:35Zevvtrue, I was not being serious. But I *do* feel that it might pay to take a secure and compact SSL lib and make it part of the nim stdlib
13:40:46FromDiscord<mratsim> i.e. underexplored crypto with no big libs that is complex to implement and complex to optimize is a better way to attract people to Nim
13:40:53FromDiscord<mratsim> ah yes sure.
13:41:15FromDiscord<mratsim> But I don't see how that's possible.
13:41:33ZevvI also think that good crypto primitives with a a solid API should be part of the core stdlib, but so many people with so many opinions on that
13:42:11Zevvwell, as long as we target C/C++ we could just move any lib into the stdlib as long as the license agrees?
13:42:28FromDiscord<mratsim> The issue with crypto is that we want it to be both fast (HTTP server bottlenecked by crypto) and secure.
13:43:07FromDiscord<mratsim> A pure Nim one would need assembly for both to ensure the compiler doesn't introduce branches that would leak secrets
13:43:15FromDiscord<mratsim> Assembly like this: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/limbs_asm_montmul_x86.nim#L127-L188
13:43:21Zevvno but pure nim is not soemthing we would want I think
13:43:30FromDiscord<mratsim> and this is totally contrary to the stdlib philosophy so far
13:43:37Zevvlet the security people do their security thing in their libs
13:43:46FromDiscord<mratsim> and I don't see how many people would be willing to maintain this
13:43:49Zevvwe could pull bearssl into the stdlib, technically?
13:43:54FromDiscord<mratsim> yes
13:43:59ZevvI would so vote or that
13:44:01Zevv /for/
13:44:41FromDiscord<mratsim> but a crypto API in the stdlib is actually simple
13:45:05Zevvsure, but if we have something like bearssl, any crypo primitives could lie on top of that as well
13:45:13Zevvno need to have nim implementations?
13:45:23FromDiscord<mratsim> you need "newContext" "generateSecretKey", "derivePublickey", "sign", "verify"
13:45:43FromDiscord<mratsim> and you can use OpenSSL or BearSSL behind
13:45:43Zevvand some things for symmetrical cryoto of course and hashes
13:45:46Zevvright
13:46:21Zevvbut still nothing like that exists, it seems
13:46:38Zevvthere's 23 differetn nim crypto libs that all do just one or two things, and all have different APIs and most are not maintained
13:46:46ZevvI don't dare touch any of them and just bind EVP
13:47:20FromDiscord<mratsim> This is what we are doing there:↵- https://github.com/status-im/nim-blscurve/blob/master/blscurve/blst/bls_sig_min_pubkey_size_pop.nim↵- https://github.com/status-im/nim-blscurve/blob/master/blscurve/miracl/bls_signature_scheme.nim
13:47:39FromDiscord<mratsim> 2 backends, same API
13:47:59Zevvright. all that stuff would look so nice in nims stdlib
13:48:02shashlickso is there value in a full openssl wrapper
13:48:44FromDiscord<mratsim> only if it can be used in Async net I think
13:49:02PMunchArgh, why can't I use a procedure that takes a static[float] inside a macro..
13:49:04FromDiscord<mratsim> if you also need to rewrite async net, I don't think there is that much value, too much friction anyway
13:49:27shashlickwell, I don't know what is missing in async net ssl wise so no idea
13:49:40FromDiscord<mratsim> @PMunch, remove static and tag {.compileTime.}
13:49:56shashlicki'm just not sure we need a 10mb nim wrapper that covers all of ssl
13:49:58FromDiscord<mratsim> it's like const in macros
13:50:21PMunchHmm, that works
13:52:07*WilhelmVonWeiner joined #nim
13:52:20FromDiscord<mratsim> in a VM context, there is no const or static, just let and plain values.
13:53:02FromDiscord<mratsim> This is annoying when you want to do `static: debugEcho ...` in a proc that is called at both runtime and compile-time
13:53:03PMunchHmm, negative values doesn't seem to work very well with my fixed point implementation..
13:53:52FromDiscord<mratsim> Floats are sign-and-magnitude based and ints are two-complement
13:54:08WilhelmVonWeinershould one use `proc main = ` over writing their code at the top level of a file?
13:56:18FromDiscord<ache of head> AFAIK Nim uses `when isMainModule:`
13:57:54PMunchWilhelmVonWeiner, it gives a very slight performance boost, but it won't be called implicitly
13:58:25PMunch`when isMainModule` is used to run code only when that file is the main module being compiled
13:58:34PMunchSo you can have a tool and a library in the same file
13:58:37shashlicki might enable nimterop to split wrapper output into multiple files - only seems warranted for complex libs though
13:59:04PMunchIf you compile the file you get the tool, but if you import it you won't get the tool included
14:01:05WilhelmVonWeinerthat's pretty cool
14:01:22WilhelmVonWeinerI think I will get into the habit of writing proc main
14:03:27FromDiscord<mratsim> You can also do "when isMainModule: proc main() = "
14:06:13Zevvbwah. `converter fromFloat*[T, W](v: float): FixedPoint[T, W] =`: cannot instantiate `T`
14:07:47*liblq-dev joined #nim
14:09:15FromDiscord<mratsim> yep, need proc and typedesc (https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/io/color_conversions.nim#L105-L106)
14:09:54Zevvyeah yeah but that sucks. I have my type for that
14:10:11Zevvmy type `Speed` is `FixedPoint[uint8, 2]`
14:10:17Zevvand I just want to work with `Speed`
14:10:22Zevvand never have to refer to the definition
14:10:57FromDiscord<Recruit_main707> Generics can’t get their type from return types
14:11:28FromDiscord<Rika> you must explicitly define the generic types
14:11:34FromDiscord<Rika> since converters are implicit
14:11:41ZevvYeah I know. but I hate it :)
14:11:44FromDiscord<Rika> its not really possible
14:12:22ZevvI'll make a `proc set[T, W](f: var FixedPoint[T, W], val: float)` then
14:15:02Zevvbut I don't want to have floats at run time
14:15:06Zevvthat should all be magiced away
14:25:11*narimiran quit (Ping timeout: 256 seconds)
14:25:49FromDiscord<mratsim> > its not really possible↵@Rika You never tried to break the law of causality. parameter (cause) -> return type (consequence) is such an outdated concept.
14:26:11FromDiscord<ache of head> 🤣
14:26:16FromDiscord<ache of head> Or…?
14:26:19FromDiscord<ache of head> Was this serious?
14:27:08FromDiscord<ache of head> My sarcasm and humor sensors are pretty bad compared to other people.
14:27:24FromDiscord<mratsim> Depends on the field, seems like in geopolitics and sociology, causality is walking on its head.
14:27:28planetis[m]you can try my fixed point lib https://gist.github.com/planetis-m/c13529cac44b4a9de3f073de502315ee
14:28:00planetis[m]there is another one in gitlab https://gitlab.com/lbartoletti/fpn
14:28:15FromDiscord<mratsim> I'm surprised you only have 16 gists @planetis, it feels like you have gist for everything to me
14:29:13planetis[m]well not everything, just simple stuff
14:29:28PMunchThat looks promising, but I need to add a 6.2 to a 14.2
14:30:30ZevvPMunch: http://ix.io/2vct
14:30:39planetis[m]multithreading ie seems like rocket science to me
14:30:46Zevvit's a start, but it's cumbersome to make good mix & match possible between types
14:31:04Zevvthis allows adding types with the same precision, assuming the first is larger or the same then the second
14:31:10Zevvso you can do Pos += Speed
14:31:45FromDiscord<mratsim> @planetis: start by a threadpool (which I didn't do :D)
14:31:55FromDiscord<mratsim> you can go far with a threadpool
14:32:05FromGitter<alehander92> zevv
14:32:09FromGitter<alehander92> i started with my ir/assembly stuff
14:32:42FromGitter<alehander92> can you give an example of an useful small thing to target: i want to target x86_64, maybe raspberry and 1 more
14:33:00FromGitter<alehander92> to have different things to make sure it's more general
14:36:47FromDiscord<mratsim> What do you want to use your IR / assembly for? Are you writing a compiler/code generator?
14:39:37Zevvyeah i don't know. he says its for "fun"
14:39:40Zevv"fun", he says
14:40:02FromDiscord<mratsim> I have "fun" writing bigints and crypto in pure assembly
14:40:08Zevvalehander: if you want to go extreme, target at least one 64 bit and one 8 bit device.
14:40:17FromDiscord<mratsim> I have even more "fun" debugging carry bugs/off-by-one
14:40:59FromGitter<alehander92> mratsim yeah a small subset of c one
14:41:08FromDiscord<mratsim> It's actually one area where the current compilers are broken
14:41:30Zevvalehander92: but making it 'generic' is not easy - different cpu's have different address modes, different numbers of registers, etc
14:41:36FromGitter<alehander92> mostly wanting to improve syntax errors / learn more about optimizations / start going deeper into c/asm for cv
14:41:40FromDiscord<mratsim> so, you can start with bigint addition on fixed sized bigint, sayd uint256
14:41:40Zevvso I'd be surprised if you could whip up something that would just work on x86 and arm
14:41:53FromGitter<alehander92> zevv yeah but this is good
14:41:56FromDiscord<mratsim> and then multiplication
14:42:23FromGitter<alehander92> that's the point, to make me think of what is abstract optimization and what is arch-specific
14:42:42FromGitter<alehander92> well, 8bit .. might be a bit strange
14:42:56FromGitter<alehander92> how easy can i find such a device/emulator, chip8?
14:43:12Zevvpick avr, so much available for that
14:43:18Zevvthey call it 'arduino' these days
14:43:43FromGitter<alehander92> what other things are "strange"
14:43:57FromGitter<alehander92> are there common cpus without registers
14:43:59FromGitter<alehander92> or without heap
14:44:19FromGitter<alehander92> (ok the last thing is probably userland-specific)
14:44:40FromGitter<alehander92> ok, with 4bit words or 10bit
14:44:44FromGitter<alehander92> or something like that
14:44:48Zevvdon't exist anymore these days
14:45:02Zevvbut really man, just target 1 first
14:45:05Zevvthat's hard enough as it is
14:45:19FromGitter<alehander92> yeah, but i want 2
14:45:21FromGitter<alehander92> otherwise my ir
14:45:25FromGitter<alehander92> would fit the 1 too much
14:46:10Zevvarm thumb
14:49:52FromDiscord<mratsim> 12-bit and 24-bit are likely to be audio DSP
14:49:54*hnOsmium0001 joined #nim
14:50:24FromDiscord<mratsim> AVR has a lot of crypto/bigint implementation
14:50:38FromDiscord<mratsim> so big int multiplication on it is interesting
14:50:51FromDiscord<mratsim> also ARM book as a big int in assembly section
14:50:57Zevvwell, interesting. it's just carrying and carrying and carrying
14:51:08Zevv"do stuff lots of times"
14:51:52FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/747830605236142141/unknown.png
14:52:06FromGitter<alehander92> hm, i am more interested in non-math opt
14:52:26FromGitter<alehander92> math ones are very cool, but :D I mostly wanted to go through gcc flags
14:52:30FromGitter<alehander92> and see what is easy to learn
14:52:59ZevvPMunch: ping
14:53:02FromGitter<alehander92> i mostly want something that i can easily tst on
14:53:05PMunchPong
14:53:08FromDiscord<mratsim> My advice, pick something that you can show
14:53:16FromDiscord<mratsim> like raytracing *cough*
14:53:21FromGitter<alehander92> so i should either get it from a friend/buy or find an emulator
14:53:21ZevvPMunch: that ix I just posted
14:53:35PMunchOooh
14:53:36Zevvcan you think of a way to make the `set()` compile time
14:53:38FromGitter<alehander92> mratsim haha, well i prefer parsing
14:54:01disruptekalehander92: pick some gameboy stuff or whatever, then you'll have lots of roms to test with.
14:54:04FromDiscord<mratsim> parse a demo scene file and transform it to many arch
14:54:13FromDiscord<mratsim> or a mandelbrot fractal
14:54:26FromGitter<alehander92> i should look at common benchmarks
14:54:41FromGitter<alehander92> but i am far away from this
14:54:56FromDiscord<mratsim> Are compile brainfuck to multiple arch
14:55:04PMunchMake a toFixed compileTime procedure and make set a template that expands to "f = toFixed[T, W](val)"?
14:55:10FromGitter<alehander92> no i dislike it
14:55:59FromGitter<alehander92> but thanks man
14:56:08FromGitter<alehander92> i should keep in mind some math usecases
14:56:23FromGitter<alehander92> but this is not really a super serious project
14:57:10FromGitter<alehander92> disruptek thanks
14:57:44ZevvPMunch: but I want to be able to make arrays and seqs as well, without havinc to specify for each element
14:57:56FromGitter<alehander92> i think i might target rpi / arduino / something very old like chip8 just for ease of test first
14:57:57PMunchAh..
14:58:09FromGitter<alehander92> (and x86_64) later more, thanks for the tips
14:58:14PMunchAnd I guess converters can't be {.compileTime.}?
14:58:24ZevvI can't even convert this because the type is generic
15:00:06*MarderIII joined #nim
15:02:50Zevvbah that would have been nice if converters worked
15:03:18disruptekwhen you have the money you need, it doesn't matter how productive you are because what is production at that point?
15:04:07disrupteki started three different businesses, and was busy inventing shit all the time. but for what?
15:04:21Zevvwell, did you do it for the money?
15:04:50ZevvI asked my accountant once what I would need to do to get rich. "Well, not what you're doing now" was the answer
15:05:20disruptekthat's the point; you have to look at this from the other perspective.
15:05:25disruptekit's like star trek.
15:05:40disruptekonce you can just hit a button and get food, you need new goals.
15:05:56Zevvand once you're the ADHD entrepreneur type of person, you need new goals
15:06:05Zevvall the time
15:09:25disruptekif you combine that person with a button that doesn't produce food, you have a real problem.
15:10:11Zevvwhat's the name of the function that should be called "sign" that does if v < 0.0: -1.0 else: 1.0
15:10:33Zevvoooh. `sgn`
15:11:03disruptekjust use ndoc
15:11:17disruptek`ndoc sign` it's the second hit.
15:11:36Zevvndoc
15:11:37Zevvwut
15:11:50disruptekalehander92's new project.
15:11:53disruptek!repo disruptek/ndoc
15:11:54disbothttps://github.com/disruptek/ndoc -- 9ndoc: 11like pydoc but for nim 15 0⭐ 0🍴
15:12:00Zevvdude
15:12:03Zevvtalking about productivity
15:12:26FromDiscord<ache of head> Hey, what was the operator for explicitly indicating types of number literals? Like, I have a 1 that I want to be a uint8. I think there was something like an apostrophe…?
15:12:26Zevvyou're not the ADHD entrepreneur type, are you
15:12:45*kenran quit (Ping timeout: 240 seconds)
15:12:46disruptek1.uint8 or 1'u8
15:12:56Zevvor uint8(1)
15:12:57FromDiscord<ache of head> thank you very much!
15:12:57*Vladar joined #nim
15:13:24disruptek1'u8 is annotation, the others are conversion.
15:13:44FromDiscord<ache of head> I see
15:13:44FromDiscord<ache of head> Thanks!
15:14:27disruptekwhat i've learned about ADHD is that it manifests in mysterious ways.
15:15:10Zevvit does, it does
15:17:50FromDiscord<Rebel> Let's say hypothetically someone wanted to do inbranch llvm obfuscation such as with YANSOllvm↵how hard would that be to do with Nim? Would the easiest way just be using clang with the c files↵that are produced?
15:18:00Zevveh disruptek you're smart. think for me.
15:18:11Zevvhttps://github.com/zevv/nimfix/blob/master/fixedpoint.nim
15:18:36ZevvI have a type `FixedPoint[T, W]`. to be used like `type Speed = FixedPoint[uint8, 2]`
15:18:56FromDiscord<Rebel> (edit) 'inbranch' => 'in tree'
15:19:13ZevvI want to be able to say something like "var s: Speed = 1.25" and `var s: seq[Speed] = @[ 1,25, 3.5 ]`
15:19:13disruptekrebel: yes, just use clang. it works fine.
15:19:22Zevvbut converters don't fly beause of the generics it seems
15:19:40Zevvhow would you make this so that its both consice, and that the floats don't survive to run time
15:19:53disruptekyou can run the converter to instantiate the generics, right?
15:20:00disruptekprime the pump.
15:20:01Zevvconverter says no.
15:20:05Zevvcan't innstatitate T
15:20:28disruptekare you sure you know what i'm saying?
15:20:43ZevvI have no clue
15:20:46Zevvreally
15:20:57FromDiscord<mratsim> welcome to low level programming "I have no clue" 😛
15:21:25ZevvI hardly ever do
15:21:30Zevvit's mostly talk
15:21:40ZevvI got a way for that for many years
15:22:05Zevvand the fun part is: the further I get in my career, the more often I say "dude I have no clue what that is". and people kind of respect that. really.
15:23:56disruptekso the way generics work is, basically, once they've been called with types, they can be called without types.
15:24:20Zevvsure. but how does one "prime the pump"
15:24:38ZevvI have ideas, but these dont apply to nim
15:25:56disruptekput the values in the box[](somevar)
15:26:50disruptekconv[int8, 3](dx) looks like
15:30:37Zevvhmm first I shell cook dinner, so I have been told
15:30:58disruptekwe need a trampoline that lets you register into different stages.
15:31:15disruptekso you can catch continuations pre-bounce, post-bounce.
15:32:08Zevvwhy "need"
15:32:12Zevvi think we need tons of stff
15:32:43disrupteki mean, it needs to come in the box.
15:34:01disruptekthis is basically what our tubes are built on, but it's so generic a concept that it should be available outside of tubes.
15:34:45disrupteki have to get coffee and shoot a horse, but i'll look at your converter when i get back.
15:35:02FromDiscord<ache of head> Oof
15:35:09FromDiscord<ache of head> I figured that the static seq doesn't work
15:35:11FromDiscord<ache of head> cause it's not static xD
15:52:06*dddddd quit (Remote host closed the connection)
15:53:46*dddddd joined #nim
15:58:24Zevvyeah sure butem in the box, but i dont want to dry
15:58:40Zevvtheres a type like Speed that is already [uint8, 2]
15:58:50Zevvhm this smells so gooood
15:59:10disruptekthis is bullshit.
15:59:44Zevvits hard to put pig in things and make'm smell bad
16:00:03disrupteki beg to differ.
16:00:15disruptekwitness aged cream of bacon soup.
16:00:35disruptek"it's raining too hard to shoot horses"
16:00:42disruptekhow is this even a fucking thing?
16:00:47Zevvit si, it is, so says the horse
16:00:53disruptekdamnit vermont sucks.
16:01:30Zevvtry vermouth
16:01:59FromDiscord<lqdev> Zevv: https://github.com/zevv/nimfix/blob/master/fixedpoint.nim#L40
16:01:59FromDiscord<lqdev> lol
16:02:11disruptekokay, i ran your file.
16:02:13*dsrw joined #nim
16:02:15disruptekwhat am i supposed to get?
16:02:36*liblq-dev quit (Quit: WeeChat 2.9)
16:06:09disruptekyour converter converts the wrong way.
16:08:38Zevvno this is the other way
16:08:44Zevvthe right one is not in here yet
16:09:22Zevvpull, line #13
16:10:47Zevvits not the usage that is erroring, its the definition of the converter itself
16:11:43disrupteki guess my last lady visitor drank up the vermouth.
16:12:03Zevvnext time, shoot her, rain or not
16:12:34Zevvbut what about the converter. what do i put in whose box
16:12:48Zevvbecause I tried putting thing in boxes
16:12:52Zevvbut that didn't work out
16:13:25Zevvthese are pretty nasty generics like this
16:13:31Zevv[T1, T2, W1, W2]
16:13:32Zevvbrr
16:14:26*dsrw quit (Quit: Textual IRC Client: www.textualapp.com)
16:14:43*dsrw joined #nim
16:14:54disrupteki dunno how this can work.
16:15:07Zevvbut I still respect you
16:15:15disruptekweird.
16:15:22Zevvyes, I should loathe you
16:15:37disruptekwell, let's not go overboard.
16:15:58Zevvbut as always the question arises: is this a bug, and/or am I plain stupid?
16:16:28Zevvthe prefered answer on #nim is "generics cant instantiate on return type"
16:16:50disrupteknah.
16:17:03disruptekthis isn't that. you aren't providing types anywhere.
16:17:16*waleee-cl quit (Quit: Connection closed for inactivity)
16:17:23disruptekit's like an equation it cannot solve because there are too many variables.
16:17:29Zevvsure. I know that.
16:17:41disruptekmake it work as procs, first. i'm wary of the converter interaction.
16:17:47ZevvThus came my original question: would you know some way to do this consise and neat
16:17:57ZevvI normally don't use converters.
16:18:01Zevvbut when I do
16:18:03ZevvI do it for PMunch
16:18:17disruptekthey have such limited use.
16:18:41ZevvMy problem is that I have a type that is a "specified" FixedPoint type
16:18:48Zevvlike Speed being a FixedPoint[int8, 2]
16:18:57ZevvNow I want to assign a variable of type Speed with a float
16:19:03Zevvand this float should only exist a compile time
16:19:12Zevvand even better, I want to do that with arrays or seqs as well
16:19:23Zevvthat was my original intent. The converters came in as a side effect when I wasn't looking
16:19:32disruptekyeah, it doesn't work as a converter but it works as a proc.
16:20:07Zevvyeah, but then you have to repeat your type. Like 'uint8, 2'
16:20:11Zevvbut I want to talk about Speed
16:20:58disruptekseems to be due to interaction with other stuff.
16:21:07Zevvit's like life
16:21:19disruptekmessy.
16:21:23Zevvmessy.
16:21:54disrupteki tried to get into a house last night and there was a huge spider on the handle of the door.
16:22:01disrupteki was like, "not tonight, motherfucker!"
16:22:08*snowolf quit (Remote host closed the connection)
16:22:26Zevvand who's house was that
16:22:30*dsrw_ joined #nim
16:22:30disruptekknocked him off and go inside. then when i went to leave, i slipped on the steps and fell on my ass.
16:22:39disruptekthe door hit me in the face twice.
16:22:46Zevvand the spider?
16:22:51disruptekif they don't get me comin', they get me goin'.
16:23:01disruptekdunno what happened to the spider.
16:23:03Zevvmessy.
16:23:06disruptekmessy.
16:23:12*dsrw quit (Quit: Textual IRC Client: www.textualapp.com)
16:23:16*snowolf joined #nim
16:23:25Zevvok, I'll see if I can macro this somehow
16:23:33disruptekholdon, i'm not done with it.
16:23:41Zevvneither am I
16:24:37disruptekits fundamentally never going to work because it has no idea what you're trying to create.
16:25:25Zevvwell, the converter ist
16:25:32Zevvwhat I want to do is basicalyl this:
16:25:34disruptekyou need a converter that converts to Speed.
16:25:35Zevvvar a: Speed = 3.1415
16:25:39*dsrw_ is now known as dsrw
16:25:45Zevvyes, but I don't want to make a converter for every thing
16:25:46disruptekor, make Speed.set.
16:25:48ZevvNim knows what Speed is
16:25:58ZevvSpeed is a FixedPoint[int8, 2]
16:26:06Zevvso I don't want to have to say that twice
16:26:10ZevvI have kids for that
16:26:40disruptekwhere do you need the converter?
16:26:55Zevvvar dx: Speed = -1.3
16:27:04ZevvInitialization stuff. I want to talk human floats in my source
16:27:12disruptekahhh, okay, lemme see.
16:27:36Zevvor var ss: seq[Speed] = @[ -1.3, 2.4 ]
16:29:22disruptekseems like this should be possible, then.
16:30:11FromGitter<cloudhan> `var a = 1 -2` triggers a compiling error, is the space significant or it is a compiler bug?
16:30:20disruptekstupid return value dispatch.
16:31:19disruptekcloudhan: - is a unary operator.
16:31:31Zevvspace is significant. This parses as `var a = (1) (-2)`
16:31:38Zevvit's deliberate
16:33:40disruptekthe irony is that converters are by their very nature "dispatch on return type."
16:34:31Zevvuntil they don't
16:34:49Zevvthey are like generic methods. The work. Sometimes.
16:35:22disruptekwe need to prime the pump.
16:37:46disruptek#2869
16:37:48disbothttps://github.com/nim-lang/Nim/issues/2869 -- 3Generic converter with no generic param doesn't compile when there is another generic converter with the same name ; snippet at 12https://play.nim-lang.org/#ix=2vd8
16:41:43Zevvnot sure if this is my problem, is it?
16:42:00disruptekno, just funny coincidence.
16:42:00Zevvhm it is
16:42:05disrupteknah.
16:42:13Zevvn't
16:42:24Zevvi wasn't done typing
16:42:27Zevvhave patience
16:42:36disrupteklol
16:43:33disruptek#4554
16:43:34disbothttps://github.com/nim-lang/Nim/issues/4554 -- 3converter fails to work with multiple generic types
16:44:44Zevv"showstopper"
16:44:47Zevvha. ha.
16:45:08disruptekzah is working on it.
16:45:16Zevvsince 2017
16:45:23disruptekthese things take time.
16:45:30disruptekyou want it done right, don't you?
16:46:56disrupteksome day i'm going to have to learn the frontend.
16:49:47FromDiscord<Rika> how do i increase the buffer size of stdio (and is this even a good idea?)a
16:49:51FromDiscord<Rika> (edit) 'idea?)a' => 'idea?)'
16:50:18leorize[m]why would you want to increase the buffer size?
16:51:42FromDiscord<Rika> i feel like the flickering when i write to the same line is because the buffer is flushed out before i manually flush it
16:53:16disruptekare you using a single write?
16:53:42FromDiscord<Rika> no
16:53:44disruptekZevv: use a macro.
16:53:48FromDiscord<Rika> let me try that
16:55:16FromDiscord<Rika> seems to be better yeah
17:00:16*vsantana joined #nim
17:04:30*vsantana quit (Client Quit)
17:08:29Oddmongerdoes «const» belong to macros ?
17:08:40Oddmongeri think so, but not sure
17:09:12dsrwI'm trying to better understand how procs returning `var string` are supposed to work, specifically https://github.com/nim-lang/Nim/blob/devel/lib/pure/parsecsv.nim#L336. It seems like a `var string` proc doesn't have to return anything, but, if it doesn't, there's no way to check for `nil`, so it's basically a guaranteed SIGSEGV.
17:09:14*kenran joined #nim
17:10:59dsrwDo I have that right? Is this behaviour something that may change in the future?
17:11:47FromDiscord<Rika> wdym? strings arent nilable?
17:12:22FromDiscord<Rika> ah wait
17:12:33leorize[m]dsrw: that example is two years old
17:12:56leorize[m]I'm pretty sure a lot have changed since :P
17:13:31dsrwAgreed, but in this case you still get the SIGSEGV, at least on 1.2.6.
17:14:05*kenran quit (Ping timeout: 240 seconds)
17:14:24leorize[m]ah yea, the compiler should enforce a return value for `var T`
17:14:56leorize[m]the fix for that module in particular is to just throw a KeyError exception
17:16:00dsrwOk. That's what I thought. I'll check github for a similar issue, and file one if it doesn't exist. Thanks!
17:16:27dsrw(and maybe submit a fix for parsecsv while I'm at it)
17:18:27disruptekthere are a few cases like that in stdlib.
17:20:09Zevvso, I use a macro, right
17:20:12Zevvthe pain
17:20:13Zevvthe agony
17:20:51dsrwAny thoughts on why that proc is using `var string` to begin with?
17:22:44dsrwIt seems like `string` would be fine. I can't think of why you'd need to mutate the result.
17:24:20PMunchZevv, aaw you're even using converters for me :) I guess I have to seriously consider your marriage proposal :P
17:24:34Zevvnope, converters are out. broken, so broken
17:24:41ZevvI now need to do macros with types
17:24:44Zevvthe things I do for love
17:25:00ZevvHow the *Hell* do I get to the generics passed to my FixedPoint from inside the macro
17:25:16ZevvUsually I try all permutations of getType, getTypeImpl and getTypeInst until I get something that looks ok
17:25:17FromDiscord<Clyybber> Zevv: Whats the W generic param for?
17:25:19Zevvbut it's not coming out today
17:25:31ZevvBits after the comma
17:25:32FromDiscord<Clyybber> oh, I see it now
17:25:34FromDiscord<Clyybber> yeah
17:25:35Zevvstatic(int)
17:25:56Zevvmaking fixed point libs with fixed sizes is for sissies
17:25:59Zevvreal men do this fully generic
17:26:07FromDiscord<Clyybber> yeah
17:26:09Zevvand run into compiler bugs on the road
17:26:18Zevvthen we summon our knight
17:26:23Zevvmay he slay these monsters for us
17:26:29FromDiscord<Clyybber> and scream NIM NIM NIM
17:26:47Zevvno, we just *say* that
17:27:11Zevvso are there more getTypeThings I can do
17:27:20PMunchHaha, I seriously need to order one of those tshirts
17:27:23ZevvI know my S is a FixedPoint
17:27:28Zevvbut I don't know what's in the box
17:27:29PMunchI wonder if FOSDEM 2021 will happen..
17:27:36PMunchOh well, got to go
17:27:38*PMunch quit (Quit: leaving)
17:27:45ZevvPMunch: until we meet again!
17:28:47disruptekstupid concepts.
17:29:52Zevvstupid macros
17:29:57Zevvcan't get to my genericParams
17:32:21ZevvHow the *hell* was I supposed to know that there is a `symbol` field in my getTypeInst[1] that I can do getImpl on
17:32:25Zevvhow. how?!
17:47:39disruptekleorize[m]: i'm attempting to adapt your ci. naively edited the file and pushed it.
17:48:13disruptekfar superior to travis so far.
17:48:31disruptekif it's really this easy, i will integrate it into nimph asap.
17:54:56disruptekleorize[m]: if this stuff only looks at changes to src/ or tests/ then that's a problem; it should track .cfg, .nimble, .nims files, too, and any .nim that isn't in src/ as well.
17:54:57*narimiran joined #nim
17:57:05Zevvhttps://github.com/nim-lang/Nim/issues/15225
17:57:07disbotGeneric converter: cannot instantiate ; snippet at 12https://play.nim-lang.org/#ix=2vdA
17:57:29ZevvI must just be doing something wrong. This is a very simple thing.
17:57:41Zevvdisruptek: what's "leorize's ic" ?
17:58:01*bra-ket joined #nim
17:58:23disruptekthat repro crashes dust.
17:58:52FromDiscord<Clyybber> Zevv: Why would that work
17:58:54disruptekleorize has been developing github actions for nim test matrices.
17:58:57FromDiscord<Clyybber> Your T is floating in the air
17:59:17*zyklon quit (Ping timeout: 260 seconds)
17:59:23Zevvclyybber: I must be stupid today. 's' has a type, right?
17:59:27disruptekbecause it's typed.
17:59:27ZevvT is 'uint8' for s
17:59:27FromDiscord<Clyybber> because nim doesn't have return type overloading
17:59:37FromDiscord<Clyybber> yeah, but nim doesn't have that feature
17:59:42Zevvbut isn't that the whole thing for converters?
17:59:42FromDiscord<Clyybber> *yet*
17:59:49Zevvisn't that what converters *are*
17:59:52FromDiscord<Clyybber> fair point
17:59:55FromDiscord<Clyybber> lol
18:00:53disruptekthe irony is that converters are by their very nature "dispatch on return type."
18:00:57Zevvso, should i delete the issue then?
18:01:02disruptekno.
18:01:10Zevvbut now everybody will think I am stupid
18:01:14Zevv s/think/know/
18:01:16disrupteknah.
18:01:18Zevvwe can't have that
18:01:43disruptekhey i fixed my stupid macro exception issue.
18:01:59Zevvwhich one of your stupid macro exception issues is that
18:02:03FromDiscord<Clyybber> nah everybody will say, you stupid
18:02:08FromDiscord<Clyybber> and then realize me stupid
18:02:18Zevvand then realize clyybber stupid?
18:02:26FromDiscord<Clyybber> disruptek: Fixed as in fixed in nim?
18:02:30FromDiscord<Clyybber> Zevv: ye
18:02:36Zevvhehe
18:03:07disrupteknah.
18:03:31disruptek#15160
18:03:33disbothttps://github.com/nim-lang/Nim/issues/15160 -- 5exceptions codegen broken inside macros ; snippet at 12https://play.nim-lang.org/#ix=2vdJ
18:03:52disrupteksomeone might decide that it's still a bug, but i'm okay with separate symbols.
18:04:10FromDiscord<Clyybber> Can you explain what symbols you mean?
18:04:21disruptekexcept Foo as bar: # symbol bar
18:04:37FromDiscord<Clyybber> and you can't have an except Bar as bar after that?
18:04:42disruptekright.
18:04:45FromDiscord<Clyybber> Thats a bug
18:04:46Zevvthat's funny
18:04:49disrupteknot with the same gensym'd bar.
18:04:57FromDiscord<Clyybber> well
18:04:58Zevvit's a different scope, isn't it?
18:05:01disruptekit is.
18:05:02FromDiscord<Clyybber> hmm
18:05:10*myphs joined #nim
18:05:16FromDiscord<Clyybber> you using the same sym is weird for sure
18:05:34FromDiscord<Clyybber> so yeah, not a bug, but could have a nicer error message I suppose
18:05:38*vsantana joined #nim
18:06:03disruptekif you could do that, you could probably solve the bug.
18:06:24Zevvhehe
18:06:24*kungtotte quit (Read error: Connection reset by peer)
18:09:53*kungtotte joined #nim
18:11:04leorize[m]"disruptek" (https://matrix.to/#/@freenode_disruptek:matrix.org): I only track those folder due to how my project structure work
18:11:27disruptekyep.
18:11:36leorize[m]you can use a generic "on: [push, pull_request]" and it will run on those events unconditionally
18:12:08Zevvdisruptek: https://axelforsman.tk/2020/08/24/rust-style-futures-in-c.html
18:12:21disruptekyeah, i haven't read it yet.
18:12:26Zevvneither have I :)
18:12:40FromDiscord<Clyybber> wait, I'm not crazy right. defined and declared is not the same
18:12:49*hyiltiz quit (Ping timeout: 264 seconds)
18:13:17disrupteki dunno what declared is.
18:13:31FromDiscord<Clyybber> it checks if a symbol is declared
18:13:38FromDiscord<Clyybber> and defined checks if its defined
18:13:54FromDiscord<Clyybber> via -d and the like
18:13:59FromDiscord<Clyybber> the weird thing is
18:14:02FromDiscord<Clyybber> they share a magic
18:14:09disrupteklol
18:14:33disruptekmaybe declared works on defines.
18:14:42*Zectbumo joined #nim
18:14:44Zevvok I read it. it sucks
18:14:49disruptekZevv: that's the kind of article dom96 will like.
18:14:53FromDiscord<Clyybber> not really, their implementation simply branches on the name of your invocation
18:15:02disruptekhe loves to use other language designs as justification.
18:15:05Zevvit's duffs fake coroutines with futures
18:15:15*tane joined #nim
18:15:29Zevvthe do the duffs thing because they must in C. Rust knows how to do the cps
18:15:34Zevv"turn the code into a state machine"
18:15:37Zevvhell yeah
18:15:58Zevvonce you did that properly, you can drop the futures
18:16:19Zevv"The coroutines for implementing the future state machine we have described are stackless,"
18:16:44Zevv "CPS is just about moving the stack to the heap" - Zevv
18:16:55disrupteknot just that.
18:17:03disruptekthe stack becomes dynamic.
18:17:06Zevvanyway, PMunch, you can do that fixedpoint stuff yourself. I hate this
18:17:09disruptekyou can resize it, retype it, etc.
18:17:19FromDiscord<Clyybber> Zevv: :(
18:17:22Zevvdaft punk should make a song about that
18:17:27FromDiscord<Clyybber> lol
18:17:32disrupteki don't know how to do things like clone stacks without cps.
18:17:54Zevvclone where to? there is only one stack
18:17:58Zevvso yes
18:18:40*vicfred quit (Read error: Connection reset by peer)
18:18:47*vicfred_ joined #nim
18:30:29Zevvso now instead of doing smart things with generic converters
18:30:38ZevvI now create a template that defines the type and also makes a converter
18:30:46FromDiscord<Clyybber> why though
18:30:50FromDiscord<Clyybber> why all this stuff
18:30:56Zevvbecause of love
18:31:07FromDiscord<Clyybber> why not simply say make your conversions explicit
18:31:12*disruptek will eat for food.
18:31:14FromDiscord<Clyybber> nobody likes implicit conversions anyways
18:31:19ZevvClyybber: it's *too* explicit
18:31:29ZevvNo I don't need *converters* perse
18:31:35Zevvbut I need functions to work with my 'friendly' types
18:31:37*vsantana quit (Read error: Connection reset by peer)
18:31:37FromDiscord<Clyybber> Zevv: what is
18:31:38disrupteki think he lost a bet with pmunch.
18:31:46FromDiscord<Clyybber> what is too explicit
18:31:46*vsantana joined #nim
18:31:50ZevvI have a type 'Speed' which is 'FixedPoint[int16, 4]'
18:31:55ZevvI want to be able to convert 3.5 to Speed
18:31:56FromDiscord<Clyybber> yeah
18:32:01FromDiscord<Clyybber> Speed(3.5)
18:32:06FromDiscord<Clyybber> is what should be possible
18:32:07ZevvNo, that's wrong
18:32:19*andinus quit (Remote host closed the connection)
18:32:20Zevvspeed is a distinct int type
18:32:24Zevvso that will just assign 3
18:32:41FromDiscord<Clyybber> overwrite the explicit conversion
18:32:47Zevvhow
18:32:54Zevv`=` ?
18:33:05FromDiscord<Clyybber> define a proc with the same name
18:33:10Zevvdude
18:33:12FromDiscord<Clyybber> I'm not sure that will overwrite it tho
18:33:14Zevvreally
18:33:14disruptekleorize[m]: why does this ci build nim instead of using your nightlies artifacts?
18:33:33*hyiltiz joined #nim
18:33:33*hyiltiz quit (Changing host)
18:33:33*hyiltiz joined #nim
18:33:47ZevvClyybber: you're just making this up, are you
18:33:51FromDiscord<Clyybber> nah
18:34:28Zevvredefinition of 'Speed', previous declaration here
18:34:45FromDiscord<Clyybber> ah, damnit.
18:34:55FromDiscord<Clyybber> Then it must have worked because I had the original type not exported
18:35:03FromDiscord<Clyybber> well, I think we should make it work
18:35:06FromDiscord<Clyybber> make it an idiom
18:35:09disruptekhonestly, this is the sort of abstraction that we need to get right.
18:35:21disruptekit has to be easier than this to hide stuff.
18:35:34Zevvbut then again: `Speed` is a derived type. I don't want to create a proc to make a Speed every time I define the type
18:35:44Zevvthe user makes his type, and then should be able to work with it
18:35:54Zevvyou can't ask the user to define the type as a specific FixedPoint
18:36:00Zevvand then also create a proc to do the conversion
18:36:01disruptekpoint made, zevv, just need to decide which bugs you must fix to achieve it.
18:36:23Zevvjust let me make my point, damnit!
18:37:45*hyiltiz quit (Ping timeout: 240 seconds)
18:40:22leorize[m]disruptek: scripting to get the latest artifact is a PITA, not to mention that my new nightlies still hasn't been merged
18:40:37leorize[m]I've an idea on how to solve the former, so there's that
18:40:46disruptekhmm, lemme know if i can write something.
18:41:23disruptekthis stuff should be much easier once king's graphql is ready.
18:42:27*hyiltiz joined #nim
18:42:27*hyiltiz quit (Changing host)
18:42:27*hyiltiz joined #nim
18:43:42*Jesin quit (Quit: Leaving)
18:43:44*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
18:44:17*pbb joined #nim
18:49:40*pbb quit (Remote host closed the connection)
18:50:54*pbb joined #nim
18:51:10*Jesin joined #nim
18:51:45*Zectbumo quit (Read error: Connection reset by peer)
18:55:38*a_b_m joined #nim
18:55:56*waleee-cl joined #nim
18:57:42FromGitter<kingramx> I searched whole the internet including deepweb and darkweb :/ and couldn't find anything about how retrieve json-data from .json file and use them in .nim file ⏎ could someone please help ???
18:59:06*abm quit (Ping timeout: 260 seconds)
19:00:17krux02disruptek, I have a question about math.round, why was it undeprecated?
19:00:27ZevvI'm pretty sure the darkweb should have that info kingramx
19:00:31FromDiscord<özgürlük> I'd like to ask a question, is there a library for making discord bots in nim?
19:00:39disruptekdid i undeprecate math.round?
19:00:50FromDiscord<Rosen> json parsing is a dark art
19:00:56krux02oh sorry, you did not it was narimiran
19:00:59FromDiscord<Rika> @özgürlük `dimscord`
19:01:03krux02not you
19:01:05disruptekokay.
19:01:24krux02narimiran, why did you undeprecate math.round?
19:01:32krux02https://github.com/nim-lang/Nim/pull/15224
19:01:33disbotremove deprecation from `math.round`
19:01:42Zevvkingramx: did you also happen to read the 'json' library page of the nim stdlib documentation?
19:02:06FromDiscord<özgürlük> @Rika thanks, the discord library i searched was super outdated
19:02:20narimirankrux02: yes, i did it, because we decided it is the best to de-deprecate it
19:02:29krux02best for what?
19:02:45krux02I deprecated it, because it should be removed without substitution.
19:02:51narimiranIYO
19:02:59krux02?
19:03:34krux02what does IYO mean?
19:03:38narimiranin your opinion
19:03:54FromDiscord<Clyybber> If we deprecate it we should replace it with quantize
19:04:05disrupteklol
19:04:07FromDiscord<Clyybber> but not this weird "drop your round in" implementation of quantize
19:04:11krux02why replace it with anything?
19:04:24FromDiscord<Clyybber> because a stdlib should provide stuff you often need
19:04:30FromDiscord<Rika> because many programmers use round?
19:04:34FromGitter<alehander92> krux02 there is a quantize pr
19:04:35FromDiscord<Rika> and think of using round?
19:04:40FromGitter<alehander92> maybe he's not aware of it
19:04:48FromDiscord<Clyybber> alehander92: That one was closed, he's talking about that pr
19:04:55krux02I argued that decimal rounding in a math library for binary numbers doesn't make sense and serves no purpose.
19:04:56FromGitter<alehander92> ah sorry
19:05:11FromGitter<kingramx> @Zevv yeah, I read that doc but u know document does not contain anything about how to retrieve data from json file and only talks about how to parse our data into json
19:05:45narimiran"serves no purpose" -- citation needed
19:05:45krux02decimal rounding does make sense if you have a decimal floating point number type (they do exist)
19:05:48FromDiscord<Rika> the math library works on binary-represented numbers but they process in decimal
19:06:11disruptekkingramx: let js = parseJson(readFile("somefilename.json"))
19:07:29krux02narimiran, "decimal rounding [...] serves no purpose", krux02:21:04:55
19:07:38krux02there, I cited myself :P
19:07:44disruptekmakes sense to me.
19:07:53disrupteki mean, krux02's argument.
19:08:01narimirangreat, now i'm going to enjoy my evening. ping me tomorrow if you want to argue some more
19:08:54krux02narimiran, I read the issue that is linked to the PR that you made, but I don't see the use case for the rounding function that you want to preserve.
19:09:10krux02The only use case originally was for printing and there it didn't work reliably.
19:09:17*quetzalb quit (Remote host closed the connection)
19:09:26krux02therefore there was the message to use strutils instead
19:09:35krux02the message that you gracefully removed.
19:10:04*kenran joined #nim
19:10:26disrupteknarimiran: is it a bad idea to backport exitprocs?
19:10:55krux02narimiran, did you leave?
19:11:00narimirandisruptek: link?
19:11:03narimirankrux02: trying to
19:11:06FromDiscord<Lod> clear
19:11:07FromGitter<kingramx> @disruptek Really thanks for this
19:11:23disrupteknarimiran: it's a module in std?
19:11:25*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
19:11:39FromDiscord<haxscramper> When I use `{.byaddr.}` in macro I get `Error: invalid pragma: byaddr` error. Example: https://play.nim-lang.org/#ix=2ve5 . What can cause this?
19:11:55FromDiscord<haxscramper> Using it for regular variables works as expected
19:11:59krux02narimiran, I am trying to get an explanation from you.
19:12:16krux02I would really like to know about the use case for the deprecated round function.
19:12:31disruptekkingramx: hope it helps.
19:13:01narimirandisruptek: i'll see tomorrow about it
19:13:01krux02I can only think of use cases where `round` would be an false friend that provides you with something that doesn't work
19:13:25disrupteknarimiran: i have no opinion. just noticed tests failing. 😉
19:13:50krux02and that is why I wanted the function to be gone.
19:14:18*pbb joined #nim
19:14:34disruptekkrux02: maybe it's enough just to provide a compile-time warning.
19:15:03krux02like one that {.deprecated.} would provide?
19:15:17*kenran quit (Ping timeout: 265 seconds)
19:15:38disrupteklike that, but without intimating that the procedure will be removed.
19:16:09krux02I think it should be removed.
19:16:35krux02And in fork of Nim it is already removed, and it won't come back.
19:17:49FromDiscord<Rika> then do you propose division be removed as it isnt exact for floats either
19:18:03disruptekhuh?
19:18:19FromDiscord<Rika> wasnt that the argument
19:18:27krux02No
19:19:15FromGitter<kingramx> > *<disruptek>* @kingramx: hope it helps. ⏎ ⏎ It helped a lot ⏎ but I have another silly question: ⏎ Why retrieved data is surrounded by " " ? ... [https://gitter.im/nim-lang/Nim?at=5f4564334823780937418fd9]
19:19:43krux02Rika: The argument is: Decimal rounding for binary floating point numbers is actually no rounding at all.
19:21:12FromDiscord<Rika> why so
19:21:52krux02if you round 0.123 to 0.1 then it is the rounding that this function provides.
19:22:00krux02but actually it isn't
19:22:06krux02because 0.1 doesn't exist
19:22:29krux02and the result of the rounding will use the full internal mantissa to try to represent 0.1 as precise as possible.
19:23:08krux02In other words, you loose precision, yes, but you don't shorten the internal representation at all.
19:23:33krux02a rounded is supposed to require fewer byets to represent it, but the opposite is the case
19:24:06disruptekkingramx: surrounded by " "?
19:24:09disruptek~paste
19:24:10disbotpaste: 11a frowned-upon behavior in chat; please use a service such as https://play.nim-lang.org/ or http://ix.io/ or https://gist.github.com/ and supply us a URL instead. -- disruptek
19:24:34FromDiscord<lqdev> @haxscramper that pragma… doesn't exist
19:24:44FromDiscord<lqdev> did you mean {.byref.}?
19:24:55FromDiscord<lqdev> it's used to annotate _object types_ tho and not variables
19:25:41FromDiscord<haxscramper> https://nim-lang.org/docs/decls.html
19:26:21FromGitter<kingramx> > *<disruptek>* @kingramx: surrounded by " "? ⏎ ⏎ yes, surrounded by " "
19:26:26FromDiscord<haxscramper> It worked beautifully until I tried to put in macro
19:27:03disruptekkingramx: what does that mean? whitespace you didn't expect? paste the code into the playground or ix.
19:27:24FromDiscord<Kaynato> A question about template/macro appropriateness for code substitution:
19:28:24FromDiscord<haxscramper> > did you mean {.byref.}?↵@lqdev Actually I get the same error with `{.byref.}`, which means the question now is: "I get 'invalid pragma error' each time I try to use pragma on variable in `quote do`'
19:28:39FromDiscord<lqdev> that's odd
19:28:51FromDiscord<lqdev> maybe `quote` is doing some funny business with idents
19:29:32FromDiscord<Kaynato> More or less, I'm thinking about something to take in `proc(...): T`, a list of args to pass into that proc to fill some preceding argument spots, and do some things with calling the proc with that arg and some local variables, and then returning a `seq[T]`
19:29:42FromDiscord<Lod> Is there any nimble tutorial?
19:30:56FromDiscord<Kaynato> Would something like `template findInfo*[T](fun: proc(varargs[auto]): T, args: varargs[auto]): seq[T]` be possible/appropriate? Or would a macro be suggested?
19:31:52FromDiscord<lqdev> `proc(varargs[auto])` isn't valid syntax
19:32:47FromDiscord<Kaynato> I'm guessing that there's no good way to pass-through-distribute varargs from template to function?
19:33:19FromDiscord<Kaynato> And/or that there are ways but that they are discouraged vs using macro in this sort of use case?
19:33:32FromDiscord<haxscramper> Yes, it was due to `quote do:`. Interpolating `byaddr` as variable into pragma solved the issue.
19:34:04FromGitter<kingramx> > *<disruptek>* @kingramx: what does that mean? whitespace you didn't expect? paste the code into the playground or ix. ⏎ ⏎ https://play.nim-lang.org/#ix=2ved
19:35:10planetis[m]krux02: to be clear, the math module has two round procs, one with a ``places`` argument, the other without, would you remove both?
19:36:50planetis[m]i have a use case for round(x: float): float but not for the other one
19:46:37*superbia joined #nim
19:52:35*quetzalb joined #nim
20:04:28*vsantana quit (Quit: leaving)
20:10:05*myphs quit (Ping timeout: 258 seconds)
20:13:29*natrys joined #nim
20:15:10*drewr` quit (Remote host closed the connection)
20:16:40*drewr` joined #nim
20:18:23*Vladar quit (Quit: Leaving)
20:18:54*drewr` quit (Client Quit)
20:19:43*drewr joined #nim
20:22:25disruptek!requires gram
20:22:26disbotgram: 11disruptek/ram 71 total
20:22:30*narimiran quit (Quit: leaving)
20:23:01*MarderIII quit (Ping timeout: 264 seconds)
20:23:18disruptekkingramx: https://play.nim-lang.org/#ix=2vev
20:24:00disruptek(you wanna getStr() on the JsonNode to retrieve its string value as opposed to merely rendering it)
20:26:27Zevvwell PMunch, for what it's worth: https://github.com/zevv/nimfix
20:26:33Zevvit might or might not be usable, I dunno
20:29:25*apahl quit (Ping timeout: 240 seconds)
20:30:32*apahl joined #nim
20:31:15*awe00 joined #nim
20:32:25*awe00_ quit (Ping timeout: 240 seconds)
20:35:52krux02planetis[m]: Initially when I stumbled upon it, there was only the version with the two arguments (second argument with default value). I introduced the one argument round function, becaues it would make sense to have it and tagged the other one as deprecated.
20:36:09krux02so to answer your question, round with one argument is fine.
20:50:03FromGitter<iffy> How do I fix this concept/type error? https://play.nim-lang.org/#ix=2veB Error: invalid type: 'var AsyncSocket' in this context: 'StringSocket[asyncnet.AsyncSocket]' for var
20:52:59FromDiscord<dom96> You can't have an `Option[var T]`
20:53:11FromDiscord<dom96> You can't even have an `Option[var string]`
20:53:26FromGitter<kingramx> > *<disruptek>* (you wanna getStr() on the JsonNode to retrieve its string value as opposed to merely rendering it) ⏎ ⏎ TNX A LOT
20:53:33FromDiscord<dom96> `var` can only be used in the context of proc parameter types
20:55:14FromDiscord<Varriount> (for now)
20:58:44FromDiscord<dom96> @Varriount oh? How so?
20:59:32FromDiscord<Varriount> dom96: I believe @timotheecour had plans to do stack escape analysis
20:59:48FromDiscord<Varriount> To allow using `var` in structures
21:03:35*NimBot joined #nim
21:04:54FromDiscord<dom96> cool
21:04:54FromDiscord<dom96> With `ref` it's not a big deal not to have this feature though
21:04:55*ForumUpdaterBot quit (Read error: Connection reset by peer)
21:04:55*ForumUpdaterBot joined #nim
21:05:54disruptek🏀⚽
21:08:29disruptekleorize[m]: actions looks really good, thanks. found my first matrix snafu, too.
21:09:58disruptekwe don't care about backporting arc fixes that are fixed in devel, right?
21:10:56*kenran joined #nim
21:11:23*thomasross joined #nim
21:15:55*kenran quit (Ping timeout: 240 seconds)
21:22:06*lritter quit (Quit: Leaving)
21:22:57*tane quit (Quit: Leaving)
21:23:51*Jesin quit (Quit: Leaving)
21:25:11*natrys quit (Quit: natrys)
21:26:04*Jesin joined #nim
21:33:47*Sembei joined #nim
21:51:51FromGitter<alehander92> wow dude
21:51:55FromGitter<alehander92> i like football
21:52:25*solitudesf quit (Ping timeout: 240 seconds)
21:52:26disruptekwhere's my password generator?
22:24:52FromDiscord<Kaynato> Is there a sane way to extract one arg type of a function referred to by a compile-time generated identifier in a macro?
22:25:47disrupteksure; you can get the type of the symbol if the macro takes a typed input.
22:27:07FromDiscord<Kaynato> The proc's symbol is generated at compile-time - would it be possible to, after generating the identifier, to pass it into another macro that takes in typed? Or, since those would all be NimNodes, would it be already wrong
22:27:20disrupteknah, it'll work fine.
22:28:00disruptekyou can write procs that operate on nodes, too, of course.
22:28:07disruptekthey will be compile-time procs.
22:37:10FromDiscord<Kaynato> Hmm, so trying to inspect the proc directly after `let procName = newIdentNode(prefix & suffix.strVal)` doesn't work, since at that point it's only an Ident and not an actual typed proc
22:37:40FromDiscord<Kaynato> But if I first return it from this macro, and then, through the template, pass it into another macro, then I can treat it as typed?
22:37:47disrupteksure.
22:38:33FromDiscord<Kaynato> There's no way to directly bind the ident in the local scope?
22:38:45disruptekthere is, but it's not /in/ local scope.
22:38:53disruptekit's just data at this point.
22:39:13FromDiscord<Kaynato> Ahh, that tracks. So I have to dip it through the actual scope to actualize it.
22:39:28disruptekyou have to dip it through semantic analysis.
22:39:50disruptekthe compiler has to get hold of it and figure out what it means before it can answer questions about it.
22:40:27FromDiscord<Kaynato> Right. Node manipulation / AST work is done before imports?
22:40:51disrupteki dunno what that means.
22:42:22FromDiscord<Kaynato> Ahhh. Ok. So the problem itself is that I'm constructing a macro to wrap certain vk calls so I eventually get a seq[T] out of it.
22:42:24disruptekyou can produce your own ast nodes that import. that should probably answer your question.
22:42:59FromDiscord<Kaynato> The type T is not defined by the vk proc's return type but is rather in `ptr T` as the last arg to the function, which itself I am generating the ident of in the macro
22:43:42disruptekyou're not generating the proc, only the ident of it?
22:43:50FromDiscord<Kaynato> Yes.
22:44:04FromDiscord<Kaynato> I'm trying to sidestep the current clunky temp of just passing the desired return type into the template itself and have it infer the return type from the argtype of the proc to which the ident refers
22:44:35disrupteksounds doable.
22:45:05*awe00 quit (Ping timeout: 240 seconds)
22:45:29disruptekit might be easier to just use a compile-time lookup table.
22:46:55FromDiscord<Kaynato> Something like finding all the procs of that pattern from vulkan and generate a table mapping their names to their ostensible return types, right?
22:47:30disruptekyeah; consider that you can do this at compile-time and have a table with nodes, etc.
22:48:04FromDiscord<Kaynato> https://pastebin.com/raw/Y7GCuhL6
22:49:16FromDiscord<Kaynato> Currently broken pending edits to get rType from vkFuncName. I'm thinking that I have to first produce vkFuncName outside of vkGetMacro, get the lastArgType, and then pass that into vkGetMacro....?
22:49:34disruptekyou've ruled out using the existing vulkan stuff made in nim?
22:49:42disruptek'cause there are a few...
22:49:55FromDiscord<Kaynato> I'm working off clybber's
22:50:09FromDiscord<Kaynato> Frag as far as I can tell is still WIP
22:51:23disruptekyou're using untyped nodes which probably won't have what you need to actually compose the proc name.
22:51:29disruptekunless i'm missing something.
22:52:03FromDiscord<Kaynato> I've been using it like `vkEnumerate[VkPhysicalDevice](PhysicalDevices, state.instance)` with the previous pass-in-return-type scheme
22:52:48FromDiscord<Kaynato> Works perfectly fine - the template passes the nodes into the macro and generates the code
22:53:13FromDiscord<Kaynato> I could possibly compromise with something like `vkGet(vkEnumeratePhysicalDevices, state.instance)`?
22:53:39FromDiscord<Kaynato> That way I'd be passing the proc as-is directly to the macro. Hm.
22:54:11disruptekwell, i'd want to get stuff typed as early as possible.
22:54:39disruptekit's hard to do much untyped. to put that another way, it's easier to write bugs.
22:55:15FromDiscord<Kaynato> First mode is probably just a little redundant. I'll probably settle for passing in the vk function as-is instead of cutting corners with composing names
22:57:19*awe00 joined #nim
22:57:26FromDiscord<Kaynato> Thank you!
22:58:21disrupteksure; i think you have a better sense of where you're going than i do. 😉
22:59:26*a_b_m quit (Read error: Connection reset by peer)
23:05:30FromGitter<alehander92> disruptek
23:05:40FromGitter<alehander92> dude i found my photos from hackathons in uni
23:05:46FromGitter<alehander92> i've had yellow-ish hair
23:05:57FromGitter<alehander92> we were all so naive
23:05:58disrupteklets see.
23:08:52disruptekat least your /went/ to uni.
23:09:09disruptekthe only yellow hair i had was a girl named candy.
23:10:25FromGitter<alehander92> https://scontent-sof1-1.xx.fbcdn.net/v/t1.0-9/1003829_461438437310227_1085524231_n.jpg?_nc_cat=102&_nc_sid=e007fa&_nc_ohc=jbEY0PrJCKMAX9iNVrs&_nc_ht=scontent-sof1-1.xx&oh=5857183aa49e09703da176324c6e0936&oe=5F6A874D
23:10:38disruptekhaha
23:10:47disruptekthat's pretty bad.
23:11:10disruptekwhere's the hackathon code?
23:11:27FromDiscord<Clyybber> there is no code, it was all yellow hair
23:11:45FromDiscord<Clyybber> always has been
23:11:46disruptekoh, it was beautician's school.
23:11:49*kenran joined #nim
23:12:14disruptekyes, i realize 10 people are furiously paging through dictionaries now.
23:13:12FromGitter<alehander92> https://scontent-sof1-1.xx.fbcdn.net/v/t31.0-8/1404916_461722333948504_66767065_o.jpg?_nc_cat=105&_nc_sid=e007fa&_nc_ohc=kfXKWvLIKCIAX8p5U_0&_nc_ht=scontent-sof1-1.xx&oh=ed399fc86a2cbe173b1ba17b43d67180&oe=5F6BDEC2
23:13:17FromGitter<alehander92> here i am on a computer!
23:13:45FromGitter<alehander92> with probably free food
23:13:53disruptekthose were the days.
23:14:02FromGitter<alehander92> in an incredibly technological env
23:14:10FromGitter<alehander92> i wanted
23:14:11FromGitter<alehander92> dude
23:14:19FromGitter<alehander92> i failed my team and my friend
23:14:30FromGitter<alehander92> i finally i wanted to combine music with auto code linting
23:14:43disruptekwut
23:14:54disruptekclyybber: where is your skiplists pr?
23:14:54FromGitter<alehander92> so while you read your code and you're on a bad section it starts some heavy dramatic music
23:14:57FromGitter<alehander92> iirc
23:15:16disruptekhmm, code smell as a service.
23:15:18disruptekit's not crazy.
23:15:37disruptekto quote duran duran, "i smell like a sound"
23:15:50disruptekso surely we can hear a smell.
23:15:56disrupteka code smell.
23:16:04FromGitter<alehander92> https://www.facebook.com/media/set/?set=ms.c.eJxFk8dtQDEMQzcK1Mv~_iwURP53jA0VZzVHaJmW~_MdX5E2AHBznaxkTq4xawkENK0~%3B1xtY3u0t97~_XI~_Hjt9Hvv5Tcl9rP3xyvnjcYCdnJfv1b9zui9YRcFFTrCRGyzk~%3BXvf9sunamDGK~_ZjQa7T2Y~%3BqXj359aMG~%3B9BvcXqwHkN8MN4R34x35C~%3Bm9~_svl~%3B2FQndyQWe~_vP1Ysr~_Ye8~_YP~%3BtY6a~_bVzbrqzz~%3Bm2cNmHrffrKabGDOrxPM9xrzNeq4h3nzGwcz38Cf9OMekvegi~%3Bj~_Z~_jczw70z2~_ix7V
23:16:04FromGitter... k5PenI571~%3Bh3IsZBvHjr0K~%3BahZMP8tMioR4N8~_9T~_~_jUXMHVHvDxuMN~%3B3~_0~_x9GP~%3Byv1bBJjxcfvSZD2Jfox6Xv~%3BB~_7RE~%3B0ou7Ef4XmHe0mTk5z1Yox9n~%3BX3~_fvX23WeUkm9~_kZzf3H569hfflO~_G.bps.a.461720503948687&type=1&__tn__=HH-R
23:16:09FromGitter<alehander92> oh no those links
23:16:11FromGitter<alehander92> ok i am stopping
23:16:16Yardanicojust mirror it to imgur :)
23:16:26FromGitter<alehander92> sorry
23:16:30Yardanicothat link looks like it'll take all my data
23:16:38FromGitter<alehander92> yeah i prefer my linters normal
23:16:40FromGitter<alehander92> and textual
23:16:46*kenran quit (Ping timeout: 258 seconds)
23:17:00disruptekwhy are you on gitter, anyway?
23:17:06FromGitter<alehander92> it's a bit eastern european
23:17:12FromGitter<alehander92> i cant pay my irc cloud service
23:17:14disrupteki can't find my can opener.
23:17:21FromGitter<alehander92> i know this is an absolute blast for normal people
23:17:29disruptekirc cloud service?
23:17:31FromGitter<alehander92> they would be like "paying .. your irc .. cloud .. dude "
23:17:42disruptekyou can use my bouncer if you want.
23:17:46FromGitter<alehander92> but i am too lazy to setup my bouncer
23:18:05FromGitter<alehander92> and irccloud is just a very ok app and i was like ok give them money
23:18:21FromGitter<alehander92> how does this bouncer reuse work
23:18:31disruptekwhat?
23:18:57FromGitter<alehander92> "you can use my bouncer if you want"
23:19:01disruptekdidn't i just open an old can of something yesterday?
23:19:38disrupteki can make you an account and then you can connect to it.
23:19:40disruptekwhat else?
23:19:56FromGitter<alehander92> ok, sounds .. good?
23:20:01FromGitter<alehander92> i have no idea how it all works
23:20:15FromGitter<alehander92> but it sounds legal
23:20:17disrupteklemme try to figure out my password.
23:20:30disruptekit's not the least legal thing i do.
23:21:10disrupteki just found a file named ruptek\u{17}u
23:21:44disrupteki think this is a bad sign.
23:22:13disruptekoh wait, do you have a static ip?
23:26:21*awe00 quit (Ping timeout: 256 seconds)
23:31:16FromGitter<alehander92> i
23:31:22FromGitter<alehander92> do i
23:31:40FromGitter<alehander92> how do i find out
23:32:06disruptekdoes your ip ever change?
23:32:22FromGitter<alehander92> i dont know man
23:32:25disruptek'cause if it does, i have to teach the bot how to let you in or something.
23:37:09*krux02_ joined #nim
23:39:25*krux02 quit (Ping timeout: 240 seconds)
23:41:26disruptekwhat's good about microwaves is they kill most of the bugs.
23:42:00FromGitter<alehander92> yeah i am trying to figure it out
23:42:05FromGitter<alehander92> but not quite sure
23:42:28FromGitter<alehander92> it's not a big thing right now
23:43:08disruptekgood, 'cause it's sounding complicated.
23:43:30FromGitter<alehander92> :) no
23:46:11*ptdel joined #nim