<< 26-10-2019 >>

00:03:30*Hideki_ joined #nim
00:05:00FromDiscord<SolarOmni> Think I'm gonna check out SDL2
00:07:37*Hideki_ quit (Ping timeout: 240 seconds)
00:29:47FromDiscord<SolarOmni> Nimble init isn't working? o.o
00:30:55FromDiscord<SolarOmni> I ran the installer properly and I just checked to make sure the paths were correct
00:34:41*GordonBGood joined #nim
00:40:56jkenDoes the standard lib have any kind of dynamically allocated ring buffer type?
00:41:13jkenor some kind of circule array/seq with a max length
00:41:16FromDiscord<treeform> deque?
00:41:16jkencircular*
00:41:23disruptekjken: see lists module.
00:42:15FromDiscord<treeform> maybe this can work for you? https://nim-lang.org/docs/deques.html
00:42:15disruptekyou will have to keep track of the length yourself, if you want to put runtime bounds on the ring.
00:42:45jkenah, okay.
00:43:10disruptektrivial to do, of course, just a heads-up that there's no `len` implemented, etc.
00:43:26jkenThanks!
00:44:10jkenI think a dequeue suits my needs more
00:44:18yumaikaso/
00:45:32disruptekthing is, deques aren't linked lists.
00:45:49yumaikasAre they build atop seq?
00:45:52disruptekie. they aren't circular and they are a seq underneath.
00:46:29FromDiscord<treeform> that's true, but he needed a ring buffer, not a linked circular list.
00:46:38yumaikasWouldn't index modulus length be enough for a ring buffer?
00:46:38jkenI asked for something circular but should have said something with a max length that is filo
00:46:48jkenfifo*
00:46:52disruptekahh, deques are perfect for that.
00:46:57jkenno, filo is right
00:47:01jkenits late here lol
00:47:16disruptekyou're making it feel pretty late here, too. 😁
00:47:26FromDiscord<treeform> deques can do both, there was and older queue module that did less
00:47:31yumaikasAre there any frameworks for game dev that target nim js at the moment?
00:47:54FromDiscord<treeform> dom96 had some thing, I think a webGL wrapper.
00:48:08yumaikasHrm... Ok
00:48:20yumaikasDoes dom96 do much with Nim these days?
00:48:38FromDiscord<treeform> I think so, he is here everyday.
00:48:58yumaikasAh, ok
00:49:50*yumaikas needs to send in a PR to clear out the 0.3.0 devel version of nim required on Jester
00:50:14*sz0 joined #nim
00:51:03yumaikastreeform: Mind if I ask what you use Nim for?
00:51:19FromDiscord<treeform> I use it for both work and play.
00:51:36FromDiscord<treeform> I love making stuff at home - mostly game dev related.
00:51:40yumaikasWhat *sorts* of work and play?
00:51:54yumaikasFair enough
00:52:02FromDiscord<treeform> At work I do internal data tools.
00:52:13yumaikasYeah, it seems like it'd be nice for that
00:52:36FromDiscord<treeform> Yeah I think nim is great
00:52:46FromDiscord<SolarOmni> Okay it's working after restarting >_>
00:52:59yumaikasRight now I use it at work for 1) spitting out pretty terminal colors and 2) for a little CLI punch-clock
00:53:16FromDiscord<treeform> thats how it starts
00:53:22yumaikasI made a light-weight wiki in it that I currently use for 3 websites
00:53:39FromDiscord<treeform> neat, did you use markdown for the wiki?
00:53:42disruptektreeform: where in chroma is the code that actually creates the README.md?
00:54:07shashlickwill npeg be faster than regex
00:54:15disruptekno.
00:54:18FromDiscord<treeform> disruptek, its a separate tool, https://github.com/treeform/mddoc
00:54:34disruptektreeform: aha! thanks. sorry to interrupt.
00:54:45FromDiscord<treeform> I just go to any of my repos and type `mddoc` and it regens the README.md
00:54:56FromDiscord<SolarOmni> So
00:55:05FromGitter<Vindaar> treeform: I've gotta go to bed now, but it'd be cool if you could take a look at https://github.com/treeform/chroma/issues/5 :)
00:55:11FromDiscord<SolarOmni> Can anyone recommend an IDE for Nim? Or is the extension for VSCode still good?
00:55:12FromDiscord<treeform> I think its nicer to have docs in the read me instead of some other HTML page. Because usually docs are small.
00:55:21FromGitter<Vindaar> good night!
00:55:25FromDiscord<treeform> I use VSCode, I recommend VSCode .
00:55:31FromDiscord<treeform> Vindaar, good night
00:55:40FromDiscord<SolarOmni> alrighty
00:55:44FromDiscord<SolarOmni> Night
00:55:56yumaikastreeform: yessir. I have the code at https://github.com/yumaikas/kbwiki
00:56:02yumaikasnight vindaar
00:56:11disruptekshashlick: there are two things that are great about npeg: 1) it's portable nim, and 2) zevv
00:56:44yumaikasAs opposed to RE/NRE which are tied to PRCE?
00:56:51disruptekyep.
00:57:29yumaikasThey work pretty handy on both windows and linux, which is about as portable as I need right now.
00:57:45yumaikasI suppose when I'm targeting JS I'll need to wrap JS regexen
00:58:47disruptekwell, you can't run pcre at compile-time, which is a show-stopper for some applications. that's the main reason i use npeg in openapi.
00:59:08yumaikasgood to know
00:59:19yumaikasdisruptek: What is openapi?
00:59:31disrupteki'm just saying... some of that portability is in the compile-time "platform."
00:59:44yumaikasyeah, in what nimscript can do
00:59:46disruptekhttps://github.com/disruptek/openapi
00:59:53FromDiscord<treeform> yumaikas, oh I wrapped JS regexes some place... I think it was like 3 lines of code pretty easy.
01:00:02yumaikasI don't doubt it'd be easy
01:00:29yumaikasAlso, does nim just generally have a 40k-ish overhead when compiling to JS (before gziping)
01:00:47disrupteki guess that doesn't say what openapi is. it's a yaml/json format for specifying how to operate web apis.
01:01:29FromDiscord<treeform> yumaikas, 40k sounds big, but if you have tons of types and other stuff I can believe it.
01:02:21yumaikastreeform: I might need to look into it more later, but when I was compiling some stuff to JS, it seemed about that big. It relied on htmlgen, tho
01:05:00yumaikasIDK. I was trying to figure out how to use Karax in the browser, and having a bit of a time with it
01:05:51FromDiscord<treeform> Yeah I don't use Karax, I use my fidget UI library.
01:06:09FromDiscord<treeform> So I don't know if Karax makes it generate a ton of code. You could look at what it is?
01:06:10FromGitter<Willyboar> Yumaikas i have a lib for console color
01:06:46yumaikastreeform: It looked like a lot of code for casting between nim and JS strings? It's been a week or two
01:07:03yumaikastreeform: What is your fidget UI library?
01:07:36FromDiscord<treeform> https://github.com/treeform/fidget
01:08:14FromDiscord<treeform> Its a UI lib I am working on but its not ready yet. I want to target web, windows, macOS, linux, iOS and Android.
01:08:27yumaikasThats....... ambitious
01:08:42yumaikas*That's
01:09:15FromDiscord<treeform> https://media.discordapp.net/attachments/142827852402917376/624658376068169760/unknown.png?width=1516&height=680
01:09:19yumaikasLooks like a project that could take 2.5+ years
01:09:22*yumaikas is in IRC
01:09:32FromDiscord<treeform> IRC?
01:09:51disruptekhe's the ghost in your machine, brah
01:09:57yumaikasThat screencap an example of it working?
01:10:05*yumaikas is now known as yumaikaghost
01:10:06FromDiscord<treeform> It's working for me on windows, mac and web right now.
01:10:17FromDiscord<treeform> Yeah its the thing it can render right now.
01:10:43yumaikaghosttreeform: Cool. Do see if you can make datatables, and treeviews. Those are some of the more sticky controls to get right
01:11:15yumaikaghostWell, if you're needing a challenge. You may not, lol
01:11:16FromDiscord<treeform> yumaikaghost, I have no plans on making them part of fidget, sorry!
01:11:54*yumaikaghost is slightly disappointed. Data tables are *handy* to have on hand
01:12:13yumaikaghostHopefully you at least have text boses
01:12:15yumaikaghost*boxes
01:12:33yumaikaghostWell, at least have them planned
01:13:09yumaikaghostStill, 'grats on getting something to run against windows, mac and web
01:13:12FromDiscord<treeform> yumaikaghost, text box was really hard to make: https://cdn.discordapp.com/attachments/142827852402917376/615585944103288872/2019-08-26_09-38-13.mp4
01:13:50yumaikaghostNot surprised. Text is *hard* to do well
01:13:55FromDiscord<treeform> yumaikaghost, I implemented my own font stack: https://github.com/treeform/typography
01:15:24yumaikaghosttreeform: This work in JS?
01:15:45FromDiscord<treeform> Yes, but in JS I use a HTML textbox.
01:15:51yumaikaghostlol, fair enough
01:15:57FromDiscord<treeform> On other platforms I use openGL.
01:16:01yumaikaghostI was more talking about your font stack
01:16:03yumaikaghostok
01:16:11yumaikaghostWhat's the target for this? gamedev?
01:16:19FromDiscord<treeform> No font stack does not work in JS mode.
01:16:27FromDiscord<treeform> Mainly because streams don't work in JS mode.
01:16:36FromDiscord<treeform> Which is getting fixed.
01:17:09FromDiscord<treeform> yumaikaghost, apps and games. I want to target both.
01:17:20yumaikaghostFair enough
01:18:13yumaikaghosttreeform: How hard is it to cross compile OpenGL from Mac to windows, or have you done it?
01:18:56yumaikaghost(Or rather, Nim code that binds to OpenGL)
01:19:17FromDiscord<treeform> To make a good high quality app, you need animations and usually charts and stuff. So they are all pretty graphical.
01:19:20*krux02_ quit (Remote host closed the connection)
01:19:36FromDiscord<treeform> I also want to abandon native look and feel. I think all really well designed apps do that now.
01:19:58yumaikaghostEh, I do think there's a case for using the native look and feel for some things.
01:20:03FromDiscord<treeform> Cross compiling is too hard. I just use a KVM and switch between machines.
01:20:18FromDiscord<treeform> Nothing beats real hardware... when you are doing graphics you want real hardware.
01:20:23yumaikaghostFair enough
01:21:03FromDiscord<treeform> Lets see I have 14 apps open
01:21:27yumaikaghostok....
01:22:08FromDiscord<treeform> No native look and feel: Chrome, Subline, VS Code, Figma, Cura, Steam, MagixVoxel, and Messanger
01:22:21FromDiscord<treeform> Oh and Discord - no native look and feel.
01:23:11yumaikaghostTo be fair, I wasn't saying that it's bad to get away from native look and feel, just that it's a nice default for when you're making something that doesn't need to impress
01:23:17FromDiscord<treeform> The only native look and feel apps I have open are: Commander and File Explorer.
01:23:27FromDiscord<treeform> Commander looks like butt
01:23:39FromDiscord<treeform> I bet it looked more like sublime or some thing
01:23:39yumaikaghostLike when I made a C# app for helping me extract names from SQL files
01:24:07FromDiscord<treeform> The only thing that has OK looking feel is File Explorer by Microsoft that ships with Windows.
01:24:29yumaikaghostYeah, that looks pretty decent. I think PowerShell ISE ends out looking decent as well.
01:24:31FromDiscord<treeform> Oh Also OBS. It looks ugly. I bet it would look much better if it did not follow the native look and feel.
01:24:41yumaikaghostNotepad++ I'm 50/50 on
01:24:54FromDiscord<treeform> I think the age of Native look and feel is gone.
01:25:02FromDiscord<treeform> If you have an app you want it to have your own brand
01:25:21*yumaikaghost puts Comic Sans *everywhere*
01:26:27yumaikaghosttreeform: What do you think of https://feed.junglecoder.com? First website I put together in Nim
01:26:33FromDiscord<treeform> To make an app for non-UI/UX people I would recommend downloading a Figma template.
01:26:41FromDiscord<treeform> And messing with that till you get some thing that looks like what you want.
01:27:04FromDiscord<treeform> There are so many to choose from: https://www.figmafreebies.com/
01:27:59FromDiscord<treeform> Take some thing like this:
01:28:01FromDiscord<treeform>
01:28:01FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/637462404862836736/free-preview800.png
01:28:13FromDiscord<treeform> And shuffle buttons and panels around till you get some thing to look nice.
01:28:20FromDiscord<treeform> Then use my export tool to fidget to make it work.
01:29:20*Hideki_ joined #nim
01:30:00yumaikaghostThat might be handy, though it'll probably be a good while before I'm using figma templates
01:31:26FromDiscord<treeform> That's another thing I don't get. We programmers positions divs and buttons by hand in code. We don't do that anywhere else. Do we make 3d models in code? Do we make 2d sprites in code? Do we make sound in code? We used to... but we don't.
01:31:28yumaikaghost(mostly because I'm either working with pre-existing UI at work, or I'm making something where that level of UI isn't a goal)
01:31:42FromDiscord<treeform> I think a time will come where we will not be making UIs in code.
01:31:47FromDiscord<treeform> I want to get there.
01:32:04FromDiscord<treeform> I just want to write the glue between the UI elements, I don't want to positions or layout UI elements in code.
01:32:37yumaikaghosttreeform: You ever used Windows Forms? That's GUI layout without code
01:32:52yumaikaghostHaving done it both ways, there are tradeoffs
01:33:04FromDiscord<treeform> I used windows forms. I used Visual Basic 1.0 on Win 3.11. It was great for what it did.
01:33:13FromDiscord<treeform> Then it got complex and awkward from there.
01:33:21FromDiscord<treeform> I also used flash, I also used XML.
01:33:23yumaikaghostI think xcode has interfacebuilder
01:33:34FromDiscord<treeform> I also used XCode iOS layout files.
01:34:05FromDiscord<treeform> The main issue they have is that they build their own design tools ... not the tools UI/UX designers wanted to use.
01:34:17yumaikaghostAnd all of that doesn't fit your vision of UI design?
01:34:28FromDiscord<treeform> The thing with Figma is that many UI/UX designers love it. Whole industry is switching to it from Photoshop/Illustartor/Sketch.
01:34:39yumaikaghost(Also, it sounds like you've been around the blog a couple more times than I have)
01:34:43yumaikaghost*block
01:35:25FromDiscord<treeform> I want to take tool people already use and love, Figma, and make it into a UI builder like WinForms/XML/XCode/Glade ...
01:35:38FromDiscord<treeform> Instead of the other way around.
01:36:11yumaikaghosttreeform: You should pitch this to Figma, if you haven't. Sounds like you're part of the way there
01:36:51FromDiscord<treeform> They have an plugin API, that just shipped like a month ago.
01:37:00FromDiscord<treeform> I already made a plugin.
01:37:10FromDiscord<treeform> Before that I was parsing their file format.
01:37:13yumaikaghostOk
01:37:31FromDiscord<treeform> Figma would not be interested in a Nim tool.
01:37:46FromDiscord<treeform> I bet that would do a UI builder that can build iOS, Android and HTML layout code.
01:37:56FromDiscord<treeform> Some one made a plug in to do Figma -> HTML.
01:38:01FromDiscord<treeform> Some one made a plugin to do Figma -> HTML.
01:40:43yumaikaghostcool
01:42:30*ftsf quit (Ping timeout: 246 seconds)
01:43:35yumaikaghosttreeform: Well, interesting to hear about fidget. Is that the main thing you've been working on in Nim then?
01:44:35*yumaikaghost is now known as yumaikas
01:48:27*stefantalpalaru quit (Ping timeout: 246 seconds)
02:02:11FromDiscord<treeform> yumaikaghost, I would not say its the main thing. I work on things that are on top of fidget.
02:02:49FromDiscord<treeform> Those are my main things. Fidget is a library for the main things.
02:33:18*Hideki_ quit (Ping timeout: 268 seconds)
02:38:29*oculuxe joined #nim
02:41:19*oculux quit (Ping timeout: 268 seconds)
02:57:47*GordonBGood quit (Remote host closed the connection)
02:59:10*sz0 quit (Quit: Connection closed for inactivity)
02:59:41*GordonBGood joined #nim
03:00:39*GordonBGood quit (Remote host closed the connection)
03:06:55*traviss quit (Quit: Leaving)
03:15:18*chemist69 quit (Ping timeout: 245 seconds)
03:17:35*chemist69 joined #nim
03:36:58FromDiscord<k1tt3hk4t> are tuples in Nim unboxed?
03:37:12FromDiscord<k1tt3hk4t> that is, is `(int, int)` the same as just having a struct with two integers in it
03:37:18FromDiscord<k1tt3hk4t> or is there some memory allocation going on
03:39:18FromDiscord<treeform> I don't think there is boxing in nim. I feel like it's the same. But I would look at c code to verify.
03:48:04*nif quit (Quit: ...)
03:48:14*nif joined #nim
04:05:10*GordonBGood joined #nim
04:09:18FromDiscord<Rika> ive been wondering if there is a deeper reason to nim disallowing tabs as indentation
04:11:12disrupteki think it's just cause guido regretted allowing them. silly, if you ask me.
04:18:38*chemist69 quit (Ping timeout: 245 seconds)
04:18:45FromDiscord<Rika> but thats guido
04:19:19disruptekyep.
04:20:26FromDiscord<Rika> ive been seeing more people use tabs over spaces because "readability" and "you can configure it in the good editors", but imo i think the fact that spaces are consistent to each editor, and "you can convert space -> tabs and back in the good editors" rebuts the arguments above well
04:20:47*chemist69 joined #nim
04:21:22disrupteki found it hard to row against the current on this one.
04:22:41disruptekit doesn't matter how easy it is to convert, because nim pretty isn't good enough to use against all commits, so you can't just edit in your preferred tabulator mode.
04:23:49disrupteki'll be using https://github.com/disruptek/gully soon and even less interested in `nim pretty` running on my code.
04:29:50*Hideki_ joined #nim
04:33:57*Hideki_ quit (Ping timeout: 240 seconds)
04:41:13FromDiscord<treeform> I think nim made the right choice on not allowing tabs.
05:02:52*fanta1 joined #nim
05:13:54shashlick@disruptek nitely's regex works at compile time
05:14:04shashlickThat's all I use these days
05:14:20disruptekoh, that one's pure nim, right?
05:14:36shashlickYep
05:14:39shashlickWorks great
05:15:09shashlickSpent some time optimizing toast, shaved off 20% perhaps
05:15:11disrupteki should take a look.
05:15:27shashlickIt's a drop in replacement for pcre
05:16:08disrupteknimterop got such a huge bump that it no longer bothers me.
05:16:23shashlickWhat kind of bump
05:16:31disruptekproblem is, i'm wed to nre api now.
05:16:37disrupteka speed bump.
05:16:58shashlickWell what changed?
05:17:10shashlickI used nre until last year
05:17:21shashlickMoving to regex was not much effort at all
05:17:22disrupteki dunno because you weren't releasing back then. 😁
05:17:27shashlickHeh
05:17:42disrupteki think it was mostly a caching change.
05:17:54shashlickI didn't release anything for 3 months since getHeader took a long time
05:18:06shashlickCaching had been in place for a long time now
05:18:36shashlickAnyway, as long as it is better now
05:18:46shashlickIt's good to see more wrappers showing up
05:19:42disruptekyeah, i just wanna get gully dogfood and then i will go back to golden and make some real progress.
05:20:16disrupteki feel bad for not exploiting nimgit more. 😄
05:20:57shashlickI want to get thru nested structs but it is a hard problem and I'm a bit tired of struggling
05:21:15disruptekis there a particular wrapper that is blocked?
05:21:40shashlickI really want to start on c++ but until c is smooth, feels like a bad idea
05:22:05shashlickThere's always weirdos who like nesting things
05:22:09shashlickJust because
05:22:27shashlickWhy would you allow 15k ways to do things
05:22:43shashlickJust makes maintenance a chore
05:22:54disrupteksounds like you are really anxious to add c++, alright.
05:25:32shashlickWell there's so many good c++ libraries out there that are hard to work with
05:27:04shashlickYou will always find good stuff since production grade performance = c++
05:27:32shashlickIf you can live in the Nim bubble and leverage such good libs why not
05:27:34disruptekheavier, but yes.
05:28:49disrupteki would love to use the aws cpp api instead of my own crap.
05:29:09shashlickEventually
05:29:21shashlickI hope to get around to Go and Rust too
05:29:37disruptekyeah, it's ridiculously large.
05:30:07shashlickLet's see, I can aspire, reality can be whatever
05:30:11disruptekgo should be pretty easy.
05:30:50disruptekmaybe that would be a better choice to do next, as it will grow your model without having so many unbearable challenges.
05:30:57shashlickWell assuming they build libs into dlls or make it relatively easy to do so
05:30:59FromDiscord<Rika> rust tho >_>
05:32:01shashlickCause tree-sitter can parse all of these and many more langs
05:32:24shashlickBut they need to be importc compatible
05:34:02shashlickMost of these newer languages distribute libs as source
05:34:21shashlickUnlike c/c++ which are static or dynamic libs
05:34:34shashlickThings will get harder with GCs as well
05:34:37shashlickLet's see
05:34:59disruptekyeah, my suggestion of dynamic lib use went over like a lead balloon.
05:38:41shashlickNim or Go
05:38:44*narimiran joined #nim
05:38:55disrupteknim
05:40:50*theelous3_ quit (Ping timeout: 265 seconds)
05:41:52shashlickIt's not like rust or go offer it either
05:42:25shashlickNim has --app:lib and works great
05:42:55shashlickJust that nimrtl isn't heavily tested
05:42:59FromDiscord<treeform> there are some many typescript bindings to js apis. There might be a way to convert them to nim js style things.
05:43:05disruptekwell, it was clearly unpopular in the nimble thread where i mentioned it.
05:43:45disruptektreeform: ah that's an interesting angle.
05:45:15shashlickYa as soon as you want to ship closed source stuff, you get stuck
05:45:35*theelous3 joined #nim
05:45:56disruptekoh, no, this was about dependencies and such.
05:48:25shashlickI vaguely remember the thread
05:49:54disruptekhttps://github.com/nim-lang/packages/issues/1051
05:51:05*solitudesf joined #nim
05:51:57disrupteki give up on this stuff, obviously.
05:53:07FromDiscord<treeform> I don't care about releases, git commit hash all the way
05:54:23disruptekwell, it'll be a losing battle until the tooling improves.
05:55:05disrupteki'm trying to make nimble work for me, but it's hard.
05:56:04*dddddd quit (Remote host closed the connection)
05:56:24FromDiscord<treeform> i made my own package manager thingy in 200 lines I like: https://github.com/treeform/nimby
05:58:07disruptekhonesty, i might use it.
05:58:43disrupteki have to think about this. but not at 2a. bbl 😉
06:00:51shashlickThat thread is exhausting, bed for me too
06:01:43FromDiscord<treeform> I guess I'll go to sleep for solidarity
06:01:53shashlickI'd work more on nimble but it takes too long to be enjoyable
06:02:49shashlickAnyway, point to learn in life is that there is no such thing as perfection so better to figure out how to live with it
06:02:55shashlickL8r
06:06:55Araqtreeform: hmm, we could join forces, I made something similar ("nawabs")
06:07:15Araqbut it took my more than 200 lines of code.
06:07:23Araqdo you evaulate .nimble files?
06:18:02*fanta1 quit (Quit: fanta1)
06:23:10*nsf joined #nim
06:23:10FromDiscord<treeform> I do not evaluate
06:23:28FromDiscord<treeform> I would prefer just json files
06:24:34FromDiscord<treeform> Instead of evaling the nimble file I was thinking maybe regex it?
06:27:12FromDiscord<treeform> The main ideas I wanted to try out were: url based install, always vendor and git submodules
06:28:00FromDiscord<treeform> What ideas you wanted to play with?
06:29:48Araqnimble evaluation is dead simple, you pass 'nim e foo.nimble' to the compiler
06:30:09FromDiscord<Chiqqum_Ngbata> Is the only supported protocol is http(s) ?
06:30:53FromDiscord<treeform> It passes it to git, so https and git and ssh?
06:32:00FromDiscord<Chiqqum_Ngbata> Nice
06:32:15FromDiscord<treeform> Araq, how do you get the variables out with nim e?
06:33:02Araqdunno the details but check Nimble's source code, Nimble uses 'nim e' for evaluation too
06:34:25FromDiscord<treeform> Ok
06:35:10FromDiscord<treeform> Araq, why did you start on nawabs?
06:36:42Araqnawabs is dead but I started it because nimble solves the wrong problems for me
06:37:59Araqthis whole "versioning" idea is wrong for small projects, too much mental overhead, too little gain
06:39:22Araqif stuff stops working a compiler error message is good enough. and it actually tells you the problem. instead of "foobar requires banana version 2 but you use version 3"
06:39:52FromDiscord<treeform> I feel versions are nice, but I want direct git hash, I want exact same code they saw.
06:40:31Araqyeah, that's it, if you want determinism, use git hashes, don't mess around with meaningless number triples
06:41:52FromDiscord<treeform> I am also just not into other ppls libraries.
06:42:26FromDiscord<treeform> Half the time if I use some one else lib, I fork it and modify it.
06:42:30FromDiscord<Chiqqum_Ngbata> Versions are good for frame of reference for end users, no? Version is out of date, read changelog for new version to get a sense for compatibility or upgrade path, bump dependency version
06:42:45FromDiscord<treeform> I don't even know how to make nimble use my new fork
06:42:55FromDiscord<Chiqqum_Ngbata> There's still the functional compatibility test at the end of the day
06:43:03Araqtreeform: via 'nimble develop'
06:43:33FromDiscord<treeform> I had so much issues with nimble develop
06:43:50AraqChiqqum_Ngbata: the picture changes for bigger projects
06:44:08FromDiscord<treeform> I think because it's still global path file some place
06:44:32Araqtreeform: nawabs predates 'nimble develop', for me ever since 'nimble develop' nimble became bearable
06:44:34FromDiscord<treeform> I think I have to manually fix it all the time
06:44:46Araqfor me it just works
06:46:40FromDiscord<treeform> I think what happens I have two projects, I nimble develop the same library twice
06:46:52FromDiscord<treeform> And now it gets confused
06:47:29Araqwell I have the "same" library only once in my projects dir
06:47:31FromDiscord<treeform> Also if I delete a lib, it gets confused and I have to delete the link file of some sort
06:47:57FromDiscord<treeform> What if you have two projects dir?
06:48:16Araqah, I don't
06:48:27Araqand that explains why I never had any trouble ;-)
06:48:35FromDiscord<treeform> I think that might be my problem
06:48:42Araqyes
06:50:08Araqlol yeah, the whole setup cannot work when you have multiple project dirs
06:50:11Araq:D
06:50:15FromDiscord<treeform> I largely make my own problems
06:50:46Araqthat's a very good argument for killing the nimbledir and to install packages locally
06:50:57Araqthank you, one more argument for me
06:52:21FromDiscord<treeform> Thoughts on packages.json?
06:53:49Araqit doesn't solve the problem that .nimble files solve
06:55:35FromDiscord<Chiqqum_Ngbata> TOML is a lot friendlier to human editing
06:56:24FromDiscord<treeform> Araq, what do you think nim's killer app would be?
06:58:46Araqhuh? we have nimbus, arraymancer, norm, your UI library, the windows UI library (for some reason I cannot remember UI library names)
06:58:59FromDiscord<Chiqqum_Ngbata> IMO some languages/platforms have more general utility than specific "killer" use cases. The killer app is probably exceptional case no?
06:59:20Araqyour UI lib could be the "killer app"
06:59:34*kungtotte quit (Quit: WeeChat 2.6)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:19FromDiscord<treeform> Hmm got to put more time into it then :) it's not even released.
07:04:01*theelous3 quit (Ping timeout: 268 seconds)
07:05:06*gmpreussner joined #nim
07:38:17*solitudesf quit (Ping timeout: 240 seconds)
07:39:48*solitudesf joined #nim
07:42:20FromGitter<alehander42> i think we can have cool web toolkits
07:42:27FromGitter<alehander42> but i wouldnt say they would be killer apps
07:43:49FromGitter<alehander42> i also think nim is very good for various cli tools / "system" software etc where currently go shines
07:43:58FromGitter<alehander42> e.g. if you write something like docker
07:44:10FromGitter<alehander42> i'd say nim might be a cool choice
07:45:08Araqfor cli tools everything that doesn't run on the JVM is fine anyway
07:45:21*fanta1 joined #nim
07:46:20FromGitter<alehander42> yes, but i just feel nim/go/crystal etc are nice for it
07:46:33FromGitter<alehander42> this class of languages
07:46:41FromGitter<alehander42> which dont require a vm
07:46:45FromGitter<alehander42> can produce binaries
07:47:16*GordonBGood quit (Remote host closed the connection)
07:47:16solitudesfcool, compiler says that it cant find the module that is clearly there and worked before. i bet its because i changed nimbleDir and it isnt actually respected properly. back to littering home i go.
07:47:19FromGitter<alehander42> but are not too low level like c++/rust, so its simpler to write
07:47:25*fanta1 quit (Client Quit)
07:47:39FromGitter<alehander42> so c#/java/etc python/ruby etc c++/rust etc dont quite do it for me
07:47:47FromGitter<alehander42> so i feel there are not so many languages well suited for it
07:48:03solitudesfah, i guess i should expect that if im not building with nimble, whatever
07:48:23FromGitter<alehander42> maybe the functional ones are also good, but they're bit less approachable
07:48:26*fanta1 joined #nim
07:50:32Araqwell self-contained binaries are nice but they are nice for everything, that's not related to "cli"
07:50:51FromGitter<alehander42> well, i feel ui apps are usually bigger
07:51:00FromGitter<alehander42> so people dont really care if they use a runtime
07:51:03FromGitter<alehander42> like .NET
07:51:07FromGitter<alehander42> or jvm
07:51:09FromGitter<alehander42> i mean, we use electron
07:51:40FromGitter<alehander42> its not so important to be easy to deploy/pass around
07:51:59Araqthe average cli comes with python, ruby, perl, bash and nobody cares. well I do, but I'm in the crackpot minority
07:52:14FromGitter<alehander42> yeah, but this is not perfect
07:52:22FromGitter<alehander42> distros have different versions
07:52:30FromGitter<alehander42> windows doesnt really come with some iirc
07:52:35FromGitter<alehander42> overally people do care
07:52:42FromGitter<alehander42> and thats why so many cli stuff is written in go
07:52:44FromGitter<alehander42> these days imo
07:52:53Araqyeah but the "cli" itself is an anachronism
07:53:11Araqand certainly not "perfect"
07:55:18Araqor to make this short: "hey, it's superb for cli development" is never going to be a "killer app", simply because cli itself is only relevant in the programmer bubble. Rails targets the web and the web is important.
07:56:29FromGitter<alehander42> well
07:56:38FromGitter<alehander42> its still an important niche
07:56:45FromGitter<alehander42> because if programmers like your tech
07:56:55FromGitter<alehander42> they would start using it for other stuff
07:57:00FromGitter<alehander42> writing web and other frameworks
07:57:11FromGitter<alehander42> so they can keep using it for the more public stuff they need to do
07:57:13*Vladar joined #nim
07:57:42FromGitter<alehander42> rails happened, because dhh and his peers found ruby and liked it
07:58:44FromGitter<alehander42> and i mean overally system software
07:58:46FromGitter<alehander42> not just cli tools
07:58:51FromGitter<alehander42> like docker and kubernete
08:01:35Araqyou can create a platform or target one. "cli" is not a platform anybody cares about. show your cli app to your Mum and she thinks "yay, DOS is back"
08:02:31Araqbbl
08:03:49*gmpreussner_ joined #nim
08:04:51*gmpreussner quit (Ping timeout: 240 seconds)
08:05:03FromGitter<alehander42> well, my mum programs excel man
08:07:13FromGitter<alehander42> i am just saying its a good niche, if you want ui, imo we need something like flutter which can target mobile
08:08:01FromGitter<alehander42> however thats part of the thing, almost every lang has a web/ui framework/toolkit ecosystem
08:08:08FromGitter<alehander42> its much bigger competitition
08:09:29FromGitter<alehander42> e.g. i think nim can be quite useful for web too, but it needs a much harder push
08:15:42*ng0 joined #nim
08:19:49FromDiscord<mratsim> Every language has Electron? :p
08:21:16*solitudesf quit (Remote host closed the connection)
08:24:37*solitudesf joined #nim
08:28:20FromGitter<sheerluck> > show your cli app to your Mum and she thinks "yay, DOS is back" ⏎ :D
08:31:40*Hideki_ joined #nim
08:35:38*Hideki_ quit (Ping timeout: 240 seconds)
08:59:42livcdi dont think so
08:59:58livcdthe only langs that have any GUI toolkits are Java and C#
09:01:48*Hideki_ joined #nim
09:03:11*tklohna_ joined #nim
09:12:52*rolfr joined #nim
09:13:27*rolfr quit (Client Quit)
09:21:36*kungtotte joined #nim
09:23:19*jjido joined #nim
09:26:05*luis_ joined #nim
09:26:55FromDiscord<mratsim> Pascal, Delphi, C++, Javascript
09:27:08FromDiscord<mratsim> arguably GTK is C as well
09:27:49FromDiscord<mratsim> Red/Rebol
09:27:54FromDiscord<mratsim> Swift
09:31:22*luis_ quit (Remote host closed the connection)
09:35:21*letto quit (Ping timeout: 246 seconds)
09:43:29lqdev[m]wait. c++ has a gui toolkit?
09:43:58*NimBot joined #nim
09:45:16leorize_wxWidgets, Qt
09:45:20*leorize_ is now known as leorize
09:45:34*letto joined #nim
09:45:43*lmariscal quit (Quit: Ping timeout (120 seconds))
09:46:21*lmariscal joined #nim
09:50:03Zevvwell, it doesn't *have* a toolkit like java
09:50:12Zevvbut there are common toolkits implemented in that language
10:04:42*Hideki_ quit (Ping timeout: 268 seconds)
10:05:58FromGitter<alehander42> mratsim yee not electron sorry
10:06:08FromGitter<alehander42> but many languages target ui
10:07:01FromGitter<alehander42> c#, java, typescript, javascript, swift, kotlin, c++, pascal, objective c, dart
10:07:15FromGitter<alehander42> probably even go, python as well
10:07:25FromGitter<alehander42> its a big field
10:10:18*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:12:04*fanta1 quit (Quit: fanta1)
10:18:47*jjido joined #nim
10:23:47*luis_ joined #nim
10:24:14*stefantalpalaru joined #nim
10:34:42*luis_ quit (Ping timeout: 265 seconds)
10:43:53*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:47:16*letto quit (Ping timeout: 265 seconds)
10:55:38*lritter joined #nim
11:01:05FromGitter<gogolxdong> @treeform does fidget use VDOM for js backend?
11:07:55*krux02 joined #nim
11:07:57*solitudesf quit (Ping timeout: 240 seconds)
11:41:01FromGitter<Willyboar> A little late for this but i strongly believe that nim needs a central library hosting like rubygems
11:42:57FromGitter<Willyboar> @treeform i liked nimby a lot.
11:47:57FromDiscord<mratsim> btw @Araq, I have a test case in Arraymancer that took ages to compile in 0.20.0:
11:47:57FromDiscord<mratsim> Hint: operation successful (109082 lines compiled; 11.859 sec total; 952.492MiB peakmem; Debug Build) [SuccessX]
11:47:57FromDiscord<mratsim>
11:47:57FromDiscord<mratsim> And was somehow mafically much faster and much more memory efficient since 0.20.2
11:47:57FromDiscord<mratsim> Hint: operation successful (128799 lines compiled; 2.194 sec total; 261.719MiB peakmem; Debug Build) [SuccessX]
11:48:31dom96Willyboar: It's not too late for this and it does need to happen
11:49:24dom96I've argued in one of Araq's recent RFCs that resources should be focused on that instead of a Nim distribution
11:49:35FromGitter<Willyboar> i mean late because they talk about it a few hours ago :)
11:51:31FromGitter<Willyboar> Of course can be done now.
11:52:06FromGitter<Willyboar> But i strongly believed that it must be official
11:52:49FromGitter<Willyboar> What did you think about @dom96 ?
11:53:02livcdi dont think there is even a possibility of having reasonably useful gui lib
11:53:40dom96Willyboar: oh I see, I misunderstood you. I think it's a must-have for any successful package ecosystem.
11:54:22dom96Somebody just need to write a good website for this and integrate Nimble with it
11:55:46FromDiscord<Rika> Isn't there nimble.directory or is that different
11:56:09FromGitter<Willyboar> Well yesterday i told federico if he is interested about a redesign
11:56:37FromGitter<Willyboar> but i think nimble.directory is not official
11:56:53*sealmove joined #nim
11:57:06FromDiscord<Rika> Oh really? Always thought it was official
11:57:15FromGitter<Willyboar> i am not sure
11:57:51FromGitter<Willyboar> but nimble.directory don't host packages
12:10:50zedeusdom96: would you rather I open the issue in Nim's or Jester's repo? it concerns asynchttpserver but I haven't tested without Jester
12:12:10dom96zedeus, nim
12:12:34dom96yeah, nimble.directory doesn't host packages
12:12:39dom96we would need it to do that
12:12:41dom96bbl
12:13:04FromGitter<Willyboar> @dom96 is nimble.directory official?
12:13:42FromDiscord<mratsim> it's not
12:14:31FromGitter<Willyboar> yes but federico is in the core team i think
12:24:37*jjido joined #nim
12:30:52*GordonBGood joined #nim
12:35:31*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:36:11*clyybber joined #nim
12:36:40Araqit's semi-official
12:39:30FromGitter<Willyboar> @Araq what did you think about an official package host?
12:40:05AraqI don't mind it but it's unrelated to my "Nim distribution" idea
12:41:33*jjido joined #nim
13:01:01*nsf quit (Quit: WeeChat 2.6)
13:04:48*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:07:28*dddddd joined #nim
13:08:09*GordonBGood quit (Remote host closed the connection)
13:11:53kungtotte+-
13:15:02*solitudesf joined #nim
13:18:05clyybber-+
13:18:20FromGitter<Willyboar> ++?
13:18:30clyybber#
13:18:36AraqHalf Life++ confirmed!
13:18:44clyybberHalf Life#
13:19:06clyybberThey should have called it C++++
13:19:26AraqC+=2
13:30:23*jjido joined #nim
13:41:36clyybberWe shall create C==
13:49:50sealmoveC++++ is C#
13:50:15sealmoveif you connect the 4 plus signs in a squarish way
13:50:45federico3...besides what does "official" mean in this context?
13:52:36*Romanson joined #nim
13:55:07*ng0 quit (Quit: Alexa, when is the end of world?)
13:55:32*ng0 joined #nim
13:56:33clyybbersealmove: Yeah, thats why I want C==
13:56:42clyybberIts C----
13:56:51clyybberAnd there already exists C--
13:57:17*ng0 quit (Client Quit)
13:57:37*ng0 joined #nim
13:57:37sealmovecool, although C# beats you beacuse it combines 4 symbols in 1, while you combine 4 symbols in 2
13:58:32*clyybber quit (Read error: Connection reset by peer)
13:58:38*clyybber1 joined #nim
13:58:56sealmovemaybe C≢ ?
13:59:36*ng0 quit (Client Quit)
13:59:55*ng0 joined #nim
14:00:13clyybber1Arguably C= would be enough since a - could be --
14:01:10*clyybber1 quit (Client Quit)
14:01:26*ng0 quit (Client Quit)
14:01:45*ng0 joined #nim
14:02:05*clyybber joined #nim
14:03:08*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:03:16federico3Willyboar, dom96: nimble.directory is not hosting packages at the moment (but it would be easy to add) but it's testing the installation and doc generation and hosting the generated docs, kind of like readthedocs.io for Python
14:05:43federico3it also has an api to sign package metadata to implement a trusted package list
14:08:32*ng0 quit (Quit: Alexa, when is the end of world?)
14:08:49*ng0 joined #nim
14:09:58*letto joined #nim
14:18:17*clyybber quit (Ping timeout: 240 seconds)
14:27:24FromGitter<Willyboar> Yes. I think nimble directory would be a nice base for that we are talking about.
14:33:21federico3is the unittest module kind-of deprecated? The "please consider to use the testament tool" remark does not bode well
14:33:36federico3can we fix it instead?
14:33:59disruptekapparently unittest, which works great for me, is being replaced with something built for testing the compiler which i don't know how to use.
14:34:42sealmovetestament
14:34:43federico3unittest has a lot of nice features that belong to a testing tool/lib
14:35:08sealmovewhat I dislike about unittest is that you can't split a testsuite to multiple files
14:35:15*solitudesf- joined #nim
14:35:38sealmoveI want to produce 1 junit out of multiple unittest files
14:36:12federico3sealmove: 1 junit makes sense but it does not need to be one testsuite
14:36:44sealmovestill, how do you get 1 junit out of many nim files?
14:36:45federico3sealmove: adding the requirement to https://github.com/nim-lang/Nim/issues/5114
14:36:50*solitudesf quit (Ping timeout: 240 seconds)
14:37:55sealmovefederico3: oh ok, nice, thanks
14:39:28*nsf joined #nim
14:41:32*baysao joined #nim
14:42:43*jjido joined #nim
14:44:03FromDiscord<Rika> is there a tutorial on testament or is testament still experimental
14:45:26FromGitter<alehander42> i dont think testament
14:45:40FromGitter<alehander42> should replace unittest
14:45:59FromGitter<alehander42> i think unittest with some improvements is pretty good for 70% of nim projects
14:46:10FromGitter<alehander42> and more similar to other lang frameworks
14:47:10federico3by all means we can improve unittest and add isolation
14:48:09sealmovetestament is not "experimental", it has been used for testing most of Nim codebase since forever
14:48:35sealmovedocumentation of how to use testament, especially in other projects, is lacking though
14:50:51sealmoveis there a way to represent all positive and negative numbers respectively in a way that `case` understands it? https://play.nim-lang.org/#ix=1ZTl
14:52:48Zevvsealmove: https://play.nim-lang.org/#ix=1ZTm
14:55:14sealmoveoh, didn't expect this to work, nice
14:55:14stefantalpalaru@sealmove, you can use Nim modules to split your test suite: https://github.com/status-im/nim-chronos/blob/master/tests/testall.nim
14:56:18*tklohna_ quit (Ping timeout: 252 seconds)
14:56:44*tklohna_ joined #nim
14:56:46sealmovestefantalpalaru: oh! this works? and it produces 1 junit?
14:58:29stefantalpalaruI'm not familiar with Java's unit testing, but you do get a single test binary: https://github.com/status-im/nim-chronos/blob/5f1391f39f1adc447874e21c590efcb4921fb822/chronos.nimble#L16
15:00:22sealmoveI don't see how this would work. testall.nim just imports the other tests. Yes, you get to compile them all in a single binary file, but I don't think you can get 1 junit file that way.
15:02:57*tklohna_ quit (Ping timeout: 265 seconds)
15:08:10AraqI don't want to maintain unittest.nim
15:08:36disruptekthus spaketh the powers that he.
15:09:01AraqI know it's very popular and we cannot really remove it
15:09:16Araqbut if you want to see its bugs fixed, create PRs for it
15:09:16disruptekso let it be written, so let it be done.
15:09:48disruptekwhat's the pain point for maintaining it, in your opinion?
15:10:00*sealmove quit (Quit: WeeChat 2.6)
15:14:12*theelous3_ joined #nim
15:14:18Araqthe used coding style looks like a stress-test for Nim's template expansion algorithm
15:15:53Araqbut ultimately it doesn't give me anything over 'when isMainModule: doAssert'
15:15:54*tklohna_ joined #nim
15:16:11Araqwhereas testament gives me process isolation and parallel testing
15:16:11disruptekthe only issue i have with it, which should be trivial to solve, is that it disrupts the new "symbol unused" warnings. i don't mind attempting to fix that.
15:16:35FromGitter<alehander42> araq talks about the compiler needs imo
15:16:38FromGitter<alehander42> which are widely different
15:16:40FromGitter<alehander42> than most
15:16:55disruptekyes, this is the same perspective from which krux02 approaches the problem, sadly.
15:17:02stefantalpalaruMuch easier to get parallel testing with a thread pool: https://github.com/stefantalpalaru/nim-unittest2
15:17:09disrupteki mean, at least they share the same perspective. 😁
15:17:15AraqI am not sure about that, you can test for good error messages
15:17:27Araqfor your DSL, for example via testament
15:17:30FromGitter<alehander42> but you can do it with expect .. this exception anyway
15:17:43FromGitter<alehander42> well, you can still make it easy to invoke a process and test its output
15:17:48FromGitter<alehander42> without making this the default mode
15:17:50Araqno, you can't test for good compiler error messages via unittest
15:17:51disruptekit's harder to test output with unittest.
15:17:54FromGitter<alehander42> most libs are small and its enough
15:18:02FromGitter<alehander42> to just run them directly calling them
15:18:05FromGitter<alehander42> as the user code would
15:18:11Araqsure but then so is 'when isMainModule'
15:18:15FromGitter<alehander42> not running 10 processes with each test
15:18:20FromGitter<alehander42> eh maybe
15:18:32FromGitter<alehander42> but still i find the idea of `check` and `expect` useful
15:18:38FromGitter<alehander42> they need some improvement
15:18:41FromGitter<alehander42> in impl
15:18:59FromGitter<alehander42> and the template thing
15:19:00disruptekyes, check could be better: it could unwrap the values.
15:19:06FromGitter<alehander42> one can implement a similar dsl without so much templates
15:19:20FromGitter<alehander42> i did for my project with function pointers
15:19:24Araqyeah but I don't see the value in the DSL
15:19:28FromGitter<alehander42> just didnt realize i can do it all with templates
15:19:45FromGitter<alehander42> well "test <this thing>: my test"
15:19:51FromGitter<alehander42> it cant be much more simpler imo
15:20:20FromDiscord<Chiqqum_Ngbata> {.skip.} and {.only.} pragmas
15:20:25FromGitter<alehander42> now, should it be in the same file or different, its a differentmatter
15:20:37Araqwell if you all like so much, how about you fix its bugs
15:20:47FromGitter<alehander42> well, i wrote my own little replacement :(
15:20:52Araqfor example the one that triggers "too many global variables"
15:20:53disruptekwhat bugs?
15:21:01FromGitter<alehander42> yeah i know
15:21:15FromGitter<alehander42> i also asked about that one several days ago
15:21:18disrupteki asked you what the pain point was and you said "it exercises the compiler which could help us identify flaws in that application sooner."
15:21:38disruptekand, "it doesn't help ME do anything i cannot already do elsewise."
15:21:46FromGitter<alehander42> i wonder
15:21:51FromGitter<alehander42> parallelizing shouldnt be too hard in principle
15:22:08FromGitter<alehander42> tests are supposed to mostly be independent
15:22:12Araqthat's your interpretation, disruptek
15:22:16FromGitter<alehander42> so with proper setup/teardown
15:22:16disruptekit is.
15:22:27FromGitter<alehander42> one should be ok to run them in parallel
15:22:30disruptekfeel free to put another spin on it.
15:22:40Araqwhat I really said was: "I don't like to maintain it because it looks overly complicated for what it does"
15:22:43FromGitter<alehander42> but i admit, maybe not so obvious
15:23:09Araq"Plus is lacks important features."
15:23:32FromGitter<alehander42> which are the main ones
15:23:51disrupteki expect to run golden on the compiler tests. maybe i can generalize it and put more of the testing into it. it already hashes input and output and measures exit code, memory, cpu. so it might be an upgrade for some.
15:23:52Araq"And it has known bugs nobody can be bothered to fix."
15:23:52FromGitter<alehander42> for me testament is useful only for big projects where you cant really call them easily programatically
15:23:59FromGitter<alehander42> and another *big* problem
15:24:02FromGitter<alehander42> of testament's design is
15:24:19Araqthat are 3 objective reasons to justify "I don't like to maintain it"
15:24:36FromGitter<alehander42> ok, my bad, not big,small
15:24:43FromGitter<alehander42> but you either have to compile many test files
15:24:50FromGitter<alehander42> which is still not very fast
15:25:07FromGitter<alehander42> or to somehow list the expected output of 20 different tests in tge same file
15:25:10FromGitter<alehander42> which is very confusing
15:25:16disruptekthe code works, today. today it is doing work. today it is getting the job done. it's unfriendly to remove it.
15:25:37disruptekis there an RFC for this testing discussion?
15:25:38FromGitter<alehander42> but if you can call your lib directly from nim, it doesnt make sense to me to start a new process and test its output
15:25:47FromGitter<alehander42> when you can test the actual nim values
15:25:51Araqit didn't get the {.deprecated.} pragma, so don't complain
15:25:52FromGitter<alehander42> and program your tests
15:26:02FromGitter<alehander42> yea
15:26:47Araqbecome a code owner for the module, fix the "too many globals" bug and you can remove the bitter comment about 'testament'
15:27:03disruptekis there an issue for the bug?
15:27:10Araqsure, one sec
15:27:33FromGitter<alehander42> ah i dont care so much about the testament comment
15:27:42FromGitter<alehander42> ok, i obviously care
15:27:48FromGitter<alehander42> but i just wanted to argue
15:27:49FromGitter<alehander42> mostly
15:28:02disrupteki found the issue.
15:28:07disruptekhttps://github.com/nim-lang/Nim/issues/8500
15:28:46Araqthere are also more here, https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+unittest+in%3Atitle
15:30:45*baysao_ joined #nim
15:31:01disruptekthis will surprise no one, but i'm having trouble finding the docs for testament.
15:31:23FromGitter<alehander42> https://www.wezm.net/technical/2019/10/useful-command-line-tools/
15:31:59federico3https://github.com/nim-lang/Nim/issues/5114 tracks improvements already
15:32:18federico3we can add a big cleanup and simplification
15:33:47*baysao quit (Ping timeout: 276 seconds)
15:34:03Araqhttps://github.com/nim-lang/Nim/blob/devel/doc/contributing.rst#compiler disruptek
15:34:11disruptekdanke.
15:34:29AraqI agree it needs to be moved to somewhere findable
15:34:36disruptekah, this is good docs, though, at least.
15:36:08Araqand yeah it needs further cleanup for a "general purpose testing tool", but it's getting there and is the tool we used for almost a decade now, it's not going away
15:37:31FromDiscord<k1tt3hk4t>
15:37:31FromDiscord<k1tt3hk4t> https://cdn.discordapp.com/attachments/371759389889003532/637676178013945876/2019-10-26-103613_1280x1024_scrot.png
15:37:34FromDiscord<k1tt3hk4t> did this inspired by those "beating C wc with (haskell/APL/futhark)" articles.. probably a silly competition given that mine doesn't support streaming yet but happy to see it's around 2x faster on files, as those two articles did
15:37:58FromDiscord<k1tt3hk4t> except without "cheating" and either using a GPU or multiple cores
15:38:31FromDiscord<k1tt3hk4t> (I assume the discord image link was sent over IRC? If not let me know)
15:38:33*baysao joined #nim
15:38:57disruptekit was, it's just, like, ridiculously enlarged.
15:39:03stefantalpalaruImplementing/using a different algorithm than the C version is also cheating.
15:40:18FromGitter<ingoogni> Very first attempt and stuck on the second line :( ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Error: cannot evaluate at compile time: res ... [https://gitter.im/nim-lang/Nim?at=5db468e2e886fb5aa2fda789]
15:40:31stefantalpalaru(made even more clear by Nim being compiled to C ;-))
15:41:05FromDiscord<k1tt3hk4t> well yeah, it's not a good way to benchmark C vs Nim, but language benchmarks are also kinda stupid imo :^P
15:41:08*baysao_ quit (Ping timeout: 265 seconds)
15:41:26FromDiscord<k1tt3hk4t> using the same algorithm in every language at the expense of it not being idiomatic or being overly complicated is kind of silly
15:41:29lqdev[m]is there any way I can run a macro which needs `typed` params in a macro with `untyped` params without exporting the first one?
15:42:11FromDiscord<k1tt3hk4t> in this case I just more found it amusing that people were fawning over the C implementation as "hAnD oPtImIzEd" when it was clearly just thrown together with a "good enough" badge on it
15:42:16disruptekingooni: use a seq if you want an array whose size is defined at runtime.
15:42:17lqdev[m]ingoogni: use a `seq` in this case. arrays are fixed size
15:42:30FromDiscord<k1tt3hk4t> and using that as "THE" measure of C's performance
15:42:52FromDiscord<k1tt3hk4t> it would be trivial for me to write the exact same as the Nim program in C using designated initializers to do the same LUT strategy
15:42:55disruptekalso, gitter is tough for some of us to read. better to use a pastebin service.
15:43:31lqdev[m]especially because gitter highlights the message with a bright yellow which has practically 0 contrast with the message's text
15:43:36lqdev[m](great design, 10/10)
15:44:19FromGitter<ingoogni> Ok, `seq` it will be.
15:44:29disruptekit's the fact that gitter consumes almost the entire screen with ads and presence list, so the trough in which the code sits is like 5 characters wide. and this, on a 4k display. it's inane.
15:45:39lqdev[m]disruptek: what ads? also, I hid my presence list long ago.
15:47:40lqdev[m]regarding my macros thing, right now I'm doing something like this: `result.add(newCall(ident"addProcAux", callArgs))` however, it requires `addProcAux` to be exported which I want to stay private because it's an implementation detail.
15:48:20disruptekhttps://imgur.com/QwQu9K7
15:48:40disrupteki mean, c'mon...
15:48:52lqdev[m]what the hell is this
15:49:03disruptekthat's what gitter looks like to me.
15:49:17lqdev[m]I guess they want you to sign in really bad
15:49:29lqdev[m]you can hide the user list using the icon in the bottom right corner
15:49:47lqdev[m]saves a tiny bit of space
15:49:56disrupteki know. but, every time i click a link? and, no, i don't want them to have access to my account.
15:50:19disrupteki swear, it's like no one tests the software they write.
15:50:33disrupteknot unit tests, tests for serviceability.
15:50:39disrupteksuitability for purpose.
15:50:45disruptekfitness.
15:51:24lqdev[m]I guess they're like microsoft: they make users test their updates, and then they don't fix it anyway because what's the point if it works on their VMs.
15:52:11*Trustable joined #nim
15:52:57disrupteknot sure what your macro comment is in reference to, but one hack i'm aware of is to `include` a file so you don't need to export its symbols.
15:53:03disruptekcould work for you here.
15:53:39disrupteki remember when gitter was created. i thought, "what a stupid idea."
15:55:21lqdev[m]disruptek: not what I need, the two macros are declared in the same file.
15:59:42disruptekmaybe what you want to do is (inside your macro) run a proc that yields a NimNode?
16:00:03disrupteki'm just reading scrollback from, i guess a day or two ago.
16:07:54stefantalpalaru@disruptek, you're holding it wrong. Sign in with GitHub and get this (sidebars can be folded by clicking on those hamburger buttons): https://i.imgur.com/c0LRCik.png
16:08:02lqdev[m]clyybber: Commodore?
16:08:03lqdev[m]clyybber: Commodore?
16:09:11disruptekstefantalpalaru: yes and no. i even wrote a bookmarklet to try to vanish some of the ui, but i guess the gitter folks are smarter than i am.
16:09:26Zevvdisruptek: nice eh this gitter thing
16:09:33disruptekit's choice, alright.
16:10:24Zevvone vs the other, hard choice: http://zevv.nl/div/shot.png
16:10:27disruptek"you're holding it wrong." true and so funny.
16:10:44ZevvI already hate things like whatsapp and 'modern' sms where you have these little clouds taking 80% of your screen estate away
16:10:53disruptekone of these days ima put my eye out with this thing.
16:12:32disruptekjavascript:(function() { $('#chat-input-wrapper').remove(); $('.right-toolbar').classList.add("collapsed"); $('div .root').remove(); })();
16:12:51disruptekmy bookmarklet. iirc, it does click some hamburgers or w/e and close some things. but, not enough.
16:14:36*nif quit (Quit: ...)
16:14:45*nif joined #nim
16:17:16disruptekstefantalpalaru: how well does unittest2 work?
16:20:27FromDiscord<treeform> gogolxdong, I do not use VDOM in fidget js backend. Do you think that would improve performance?
16:21:55FromDiscord<treeform> gogolxdong, reading about Virtual DOM on the react docs, I might be using some thing like this.
16:22:11FromDiscord<treeform> I have a cache where I minimize all HTML/CSS transitions.
16:22:45lqdev[m]Zevv, disruptek: at least discord has a compact mode which looks a little like IRC. it's quite usable.
16:22:47FromDiscord<treeform> I try very hard to make the most minimal amount of dom calls to update the page.
16:23:12*lqdev[m] uploaded an image: image.png (7KB) < https://matrix.org/_matrix/media/r0/download/matrix.org/RnecPgJsoylqUiUbNtHFFFBV >
16:23:33FromDiscord<treeform> gogolxdong, i also reuse HTML tags so that they don't have to be allocated again. I take DOM mutation and DOM node creation very seriously.
16:30:34lqdev[m]disruptek: regarding my macro issue, here's what I'm working with: http://ix.io/1ZTW/nim#n-249
16:31:21lqdev[m]line 227
16:31:41stefantalpalarudisruptek: unittest2 works as advertised. I'm waiting for the Nim 0.19.6 to 1.0.2 transition on Status projects before using it for Nimbus and nim-beacon-chain where the runtime of CI tests is becoming a problem.
16:31:58lqdev[m]the macros I want to keep private are on lines 227 and 249, and the macro that calls them is on line 261
16:32:09stefantalpalaruHad to wait for these fixes to reach us: https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+threadpool+is%3Aclosed+author%3Astefantalpalaru
16:32:44disruptekcool, i will use it instead. doesn't really make sense to develop the version in stdlib.
16:33:49disrupteklqdev[m]: why is getOverload a macro and not a procedure?
16:34:37lqdev[m]lqdev: making it a procedure somehow triggers the `error()` at line 259, haven't debugged it properly yet.
16:39:11disruptekmaybe writing comments would help.
16:41:30lqdev[m]sorry, haven't gotten to documenting the codebase yet.
16:41:59disrupteki find it useful to explain my assumptions.
17:08:00*ng0 quit (Ping timeout: 260 seconds)
17:14:04*ng0 joined #nim
17:17:52*Trustable quit (Remote host closed the connection)
17:19:26*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:23:12*Romanson quit (Quit: Connection closed for inactivity)
17:25:51*chun joined #nim
17:38:05lqdev[m]disruptek: I added some comments, they may help you a bit http://ix.io/1ZUc/nim#n-227
17:48:15FromGitter<auxym> Could anyone help my understand why this won't compile? https://play.nim-lang.org/#ix=1ZUe
17:48:48Yardanico@auxym there's no such field "keys" in a table
17:49:03YardanicoI think you should use let keys = toSeq(tab.keys)
17:49:38Yardanico(keys in an iterator)
17:49:39Yardanico*is
17:50:07FromGitter<auxym> huh. I guess I don't get ufcs then, I thought those would be equivalent
17:50:18FromGitter<auxym> tab.keys.toSeq vs toSeq(tab.keys)
17:50:26Yardanicowell toSeq is not a function but a template
17:50:39Yardanicoand keys is not a field but an iterator which can't be simply called like tab.keys()
17:50:57FromGitter<auxym> ah. I think I sort of get it
18:08:18*chun quit (Quit: Leaving)
18:11:02FromGitter<Willyboar> @dom96 , @FedericoCeratto i made a quick prototype https://nimble-prototype.netlify.com
18:12:42*ng0_ joined #nim
18:13:24FromGitter<Willyboar> of course everybodys feed is welcome
18:15:40*ng0 quit (Ping timeout: 260 seconds)
18:15:53*ng0_ is now known as ng0
18:23:52FromGitter<Willyboar> the showcase needs more work
18:24:12FromGitter<auxym> if I'm getting a SIGSEGV from the gc without using any unsafe feature (ptr, etc), how likely is it I've hit a compiler bug?
18:24:25FromGitter<auxym> (working on putting together a minimal example)
18:25:08FromGitter<alehander42> do you use openarray
18:26:25FromGitter<auxym> in my own proc defs? no. do I use any stdlib procs defined with openArray? likely
18:30:58federico3dom96: what happens when an async proc a() calls a sync proc b() and the latter calls "waitFor somethingAsync()" ?
18:34:07federico3Willyboar: nice!
18:34:30federico3Willyboar: "You don't have Nim in your computer." huh?
18:35:48FromGitter<Willyboar> hahaha of course i have. 1.0.2
18:35:50FromGitter<Willyboar> :)
18:35:56*filcuc joined #nim
18:38:19*nsf quit (Quit: WeeChat 2.6)
18:44:35*GordonBGood joined #nim
18:44:38federico3I mean: why is the page making that claim?
18:46:43FromGitter<Willyboar> I just put it to cover some space.
18:48:52FromGitter<Willyboar> But it is always a chance someone to come here first :)
18:49:34*sagax quit (Quit: Konversation terminated!)
18:51:09disrupteks/Treding/Trending/
18:52:10FromGitter<Willyboar> where?
18:52:12FromGitter<Willyboar> :)
18:52:22disruptekctrl-F
18:53:25FromGitter<Willyboar> ctrl - R
18:54:56federico3dom96: what happens when an async proc a() calls a sync proc b() and the latter calls "waitFor somethingAsync()" ? <--- it blocks, that sucks :(
18:55:02disrupteks/tly\.E/tly. E/
18:55:19*jjido joined #nim
18:55:24disruptekif you're in an async proc, you can await.
18:55:34disruptekif you don't want to wait, simply don't.
18:56:28disruptekbasically, you're right, but there are solutions that work in the ecosystem. which is to say, the `what color is your function?` ecosystem.
18:57:39disruptekwillyboar: the only important feature to me is to browse by package introduction date, with links to their homepages and maybe some repo/version stats. fwiw.
18:57:49FromGitter<alehander42> but isnt that the only reasonable behavior
18:58:10FromGitter<alehander42> what can somethingAsync do?
18:58:42FromGitter<alehander42> it *Blocks* the current thread until the specified future completes.
18:58:46disruptekwaitFor by definition means `wait for`. i think his point is that sync code doesn't have the affordances that async code does.
18:58:47FromGitter<alehander42> thats what the docs say
18:59:18FromGitter<alehander42> ah sotrrry
18:59:35disrupteki mean, everyone is right, here. 😀
18:59:43FromGitter<alehander42> i see, so he wants it to be async -inferring
18:59:49federico3disruptek: no, waitFor when called *within* a greenthread could block only that thread
18:59:50disrupteki think so?
19:00:23FromGitter<alehander42> asyncdispatch isnt defined for green threads tho
19:00:25disruptekagain, it's the `what color is your function` problem.
19:01:01FromGitter<alehander42> do you want it to await if its called by async and waitFor if its called by sync
19:01:08FromGitter<alehander42> thats what i thought is wanted
19:01:18FromGitter<alehander42> and it seems multisync might kinda do it
19:01:23federico3disruptek: the color is not enough: you have to be sure that all the functions are async-colored in your stack
19:01:37disruptekthat's the point of the argument, yes.
19:01:46disruptekbecause red demands red demands red.
19:02:04federico3and if you don't they'll just block without any warning
19:02:07FromGitter<alehander42> ah, is that about detecting async might call a "blocking" call?
19:02:15FromGitter<alehander42> i wanted to somehow typecheck that
19:02:20FromGitter<alehander42> but it seemed very hard to do
19:02:24FromGitter<alehander42> even with an effect system
19:02:32disruptekeffects become colors.
19:03:28disrupteklqdev[m]: i will look, but the idea was that documenting gets you to consider your own assumptions. it wasn't meant to be a criticism; sorry if it came across that way.
19:04:24federico3the only "solution" is to use async across all your code in case something somewhere might block now or in future :(
19:04:48disruptekvirtually everything is blocking unless you're writing go.
19:05:00FromGitter<alehander42> well, thats the point
19:05:24FromGitter<alehander42> you can annotate those primitives which "block" with `{.blocking.}` .. thing
19:05:46disruptekyes. async works, provided you grok the limitations and they align with your needs. if you show up with an expectation that won't be met, well, you are in for disappointment.
19:05:48FromGitter<alehander42> and somehow compiletime check that async stuff cant await them
19:05:59FromGitter<alehander42> but even this wouldnt really help all cases
19:06:06federico3disruptek: no, this is a syntax and tooling problem
19:06:10FromGitter<alehander42> because as araq said once iirc, what is blocking
19:06:16disruptekbut i think everything blocks.
19:06:17FromGitter<alehander42> e.g. a heavy loop
19:06:20FromGitter<alehander42> is also blocking
19:06:25disruptekan expression is blocking.
19:06:38FromGitter<alehander42> and go people thought about inserting preemptive stuff in loops as well
19:06:39FromGitter<alehander42> iirc
19:06:50FromGitter<alehander42> its not just a syntax problem with async/await
19:06:56federico3we are talking about async I/O which has nothing to do with blocking on CPU
19:07:04disruptekyes, that's why go works. it's full of yields.
19:07:14FromGitter<alehander42> ok, but generally it is similar: you need a way to say
19:07:30*vesper11 joined #nim
19:07:43FromGitter<alehander42> sorry, not the same indeed
19:07:49FromGitter<alehander42> "this operation is <blocking>"
19:08:16disruptekoh, if you just want async i/o, that's different.
19:08:30FromGitter<alehander42> and to prove that your await cant "wait" for code that somehow invokes it directly
19:08:36FromGitter<alehander42> or to automatically somehow offload it
19:08:42FromGitter<alehander42> to a thread and await that
19:08:47FromGitter<alehander42> (very handwavy)
19:09:20federico3the async support in Nim is about async i/o, not multithreading
19:09:34FromGitter<alehander42> but federico3 follow me here
19:09:40*vesper quit (Ping timeout: 264 seconds)
19:09:41FromGitter<alehander42> i am just talking about different possible solutions
19:10:13FromGitter<alehander42> or do you mean that you would never need
19:10:20FromGitter<alehander42> to use actual blocking io syscalls
19:10:39FromGitter<alehander42> in this case sorry, i was focused on detecting that you dont call those by *accident*
19:10:49federico3alehander42: I get your point, but you are describing a completely different approach :)
19:10:50disrupteki think he's saying he wants better effects percolation so that async can magically multisync everything.
19:11:33federico3"<alehander42> to a thread and await that" <-- you meant real thread on "green" thread here?
19:12:05FromGitter<alehander42> well, i suppose real thread, as otherwise the real thread which actually runs the green thread will still block
19:12:09FromGitter<alehander42> as its just a syscall
19:12:24FromGitter<alehander42> but i might be thinking of something else
19:13:15federico3alehander42: didn't you just described Go's runtime? :)
19:13:32FromGitter<alehander42> i probably got the idea to offload it from go yeah
19:13:38FromGitter<alehander42> i remember i was trying to read what they do
19:13:52federico3https://github.com/nim-lang/RFCs/issues/160 <-- then read this
19:15:25*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:17:13disrupteklqdev[m]: is 237-238 correct?
19:17:41*luis_ joined #nim
19:18:05lqdev[m]disruptek: yeah, it's a glitch in pygments's syntax highlighting
19:18:18disruptekno, i don't mean the highlight.
19:19:00disruptekyou're just basically add(ty) N times, right? just seems like a confusing way to express that.
19:19:08*luis_ quit (Client Quit)
19:19:24lqdev[m]well, how else would you do that?
19:19:30*luis_ joined #nim
19:19:36*ng0 quit (Ping timeout: 260 seconds)
19:19:44lqdev[m]oh, I'm an idiot.
19:19:59lqdev[m]that's why you shouldn't code at 11 pm
19:20:01lqdev[m]I see what you mean now
19:21:37disruptekif it were me, i'd rewrite that proc and heavily comment it. i'm just too stupid to write stuff like this.
19:21:50disruptekalso, i would eliminate the found bool by using block/break.
19:22:57disruptekbut, my criticism is purely syntax because i dunno what any of these values or indices represent. 😀
19:23:11*ng0 joined #nim
19:23:48lqdev[m]I get what you mean, I'll improve on that later. anyways, what about my original question?
19:26:09disruptekwell, i'm not sure what this stuff does.
19:26:24disruptekyou're marking up some nim for binding into wren?
19:27:48dom96federico3, of course it blocks. We should make `waitFor` be an error if used in an {.async.} proc.
19:28:00federico3:-/
19:28:05disruptekthat would not be good.
19:28:17disrupteki don't necessarily want to yield control in an async.
19:29:44*luis_ quit (Ping timeout: 276 seconds)
19:29:50lqdev[m]disruptek: exactly, I'm building a DSL whose purpose is to generate all the appropriate glue code for binding to Wren.
19:30:08disruptekcan i see some hello world input?
19:31:54disruptekyou say you don't want addProxAux to be public, but how is it public? it's accessible to the user's mod code?
19:32:00lqdev[m]disruptek: http://ix.io/1ZUM/nim
19:32:01lqdev[m]this is the problem
19:32:20disruptekthat helps, thanks.
19:32:24lqdev[m]the code generated by `foreign` has a call to `addProcAux`
19:32:25dom96federico3, why is this a problem?
19:32:48lqdev[m]but that macro is an implementation detail which I don't want visible to the user
19:33:05federico3dom96: see above:
19:33:18lqdev[m]brb
19:33:19disruptekoh, that's why you wanted it to be a macro? so it would dissolve?
19:33:21federico3 you have to be sure that all the functions are async-colored in your stack
19:33:30federico3and if you don't they'll just block without any warning
19:34:33dom96federico3, yes, it's a problem that we need to fix. I think the best way is with Nim's effect system.
19:34:53dom96But there is always the challenge of C libraries that you call into
19:34:59dom96You never know what they'll do
19:35:02dom96AFAIK Go has the same problem
19:35:15disruptekit does.
19:35:55federico3well of course you have to assume they'll block or ensure they are async
19:36:40disruptekor, in theory, you could position yourself on an empty thread for the ffi and then keep chugging along in your other threads.
19:37:22dom96yeah, I have a feeling Go might have some magic here
19:37:28disruptekwhich is how go does it, iirc.
19:37:35federico3unsurprisingly
19:37:53federico3but you have to pay the price of pinning a thread to a single "greenlet" for a while
19:39:45disrupteklqdev[m]: as a hack, you could make it crash at runtime, right?
19:40:25rayman22201am I missing all the fun async discussions?
19:40:40disruptekno, they won't start until you contribute. 😁
19:41:38rayman22201lol, uh oh!
19:42:32federico3our async discussion is blocked
19:42:53rayman22201lmao
19:43:01disruptekhow would nested tests work in #5114?
19:43:20disrupteki mean, what are the desired semantics?
19:43:42disruptekdo i have to specify dependencies or does it figure that out?
19:57:18FromDiscord<treeform> I ran 25,000 threads on Windows and it ran ok... Do we really need async?
19:57:43disruptekit makes sharing memory quite a bit easier.
20:00:17*gangstacat quit (Ping timeout: 276 seconds)
20:04:23lqdev[m]disruptek: yeah, a `ISwearIKnowWhatIAmDoing` parameter which causes a compilation error `user doesn't know what they're doing` when set to false.
20:06:05disrupteki was thinking maybe just add `.compileTime.`, but your idea works too. 🤣
20:12:52*gangstacat joined #nim
20:14:05*nsf joined #nim
20:21:45Zevvoi rayman22201 how is the async discussio going then
20:21:53Zevvyou dont stop do you
20:22:27disrupteki switched to semaphores but they aren't working, either.
20:26:44FromGitter<alehander42> circle road
20:28:45*Balu_ joined #nim
20:37:24*narimiran quit (Ping timeout: 268 seconds)
20:44:25FromDiscord<kodkuce> +1 on running 25k threads insted async tought, meybe option 2 build some new async that works with newruntime
20:47:47FromDiscord<kodkuce> dom is sharpening his axe
20:48:53rayman22201My sole purpose in Nim right now is making async work with new runtime.
20:49:19FromDiscord<kodkuce> i would blow you if i were a girl xD
20:49:47rayman22201And also fighting Dom with my +1 sword of yak shaving
20:50:22*GordonBGood quit (Remote host closed the connection)
20:51:05rayman22201Lol. I appreciate the sentiment but I'm happily married :-P
20:52:25rayman22201Zevv which async discussion are you referring to? There are so many *threads* xD
20:52:27FromDiscord<kodkuce> ok then when you go on dungeon run to kill all mighty Dom i can play support or suicide tank while you kill him
20:56:02rayman22201In all seriousness, I'm in a support roll. The real work for the better multithreaded async runtime is mratsim and project Picasso.
20:57:06Zevvrayman22201: all of them. youre like a pitbull there
20:57:27rayman22201X.X
20:57:32FromGitter<auxym> any reason why `new` isn't called implicitly on `result` in procs returning ref types? (that was the cause of my segfault earlier...)
20:58:06disruptekyeah, that would cause an undesireable alloc sometimes.
20:58:36rayman22201This ^
21:00:38FromGitter<auxym> aight, just wondering, seemed like a gotcha especially since there isn't even a compile time warning
21:00:51disruptekwhat would it say?
21:01:47disrupteknil is a valid value for a ref type. you might be returning a ref that you pluck somehow from other inputs to the proc, or even values outside the closure. check your assumptions.
21:03:40FromGitter<auxym> I see. Would it be possible in some limited cases to warn at compiletime against assignments on fields of `nil` refs? Just thinking out loud, have no idea if this is possible
21:03:53FromGitter<auxym> (and I'm entirely aware the mistake is mine)
21:05:08disruptekit's easy to do at runtime, but i'm not sure it's possible at compile-time. interesting question.
21:05:21rayman22201No nil refs is currently being worked on
21:06:16disrupteki can't think of a way to do it, but i wouldn't dare to say it's impossible.
21:07:43disruptekthere are ways you could hack in that functionality, with eg. overloading `.` or using macros to wrap field accesses and register assignments, etc. it's a lot of work for very little gain.
21:08:27disruptekwhat field are you in?
21:08:55disruptekif it's e-sports, i'd say go nuts. if you're in the medical field, i say please no. i value dom96 too highly.
21:12:04rayman22201https://github.com/nim-lang/RFCs/pull/169
21:12:12rayman22201https://github.com/nim-lang/Nim/pull/12401
21:14:13rayman22201mostly I am in the field of bullshitting. Don't get the wrong impression. I also value dom96 very highly!
21:15:17disruptekno, i know your field. i was directing that at auxym. 😜
21:16:16rayman22201lol. fair enough :-)
21:16:52FromGitter<auxym> toying around mostly :) thanks for humoring me though!
21:17:47rayman22201The thing about refs, I find it most helpful to think about them as a fancy pointers.
21:18:09rayman22201just like you can return a null pointer, you can return a nil ref.
21:19:46rayman22201But, when we finally get #12401, IMO you will get a lot of the null safety you are looking for though. stay tuned :-P
21:20:13disruptekyep, it'll be a really nice improvement.
21:21:58rayman22201@Zevv, My biggest annoyance right now is that I found a race condition in Virtual Async Events.
21:22:01*jjido joined #nim
21:22:51rayman22201The thing I don't understand is that I would expect regular Async Events to have the same race condition, but it doesn't.
21:23:45rayman22201This has me totally confused. I need to dig into the epoll Select Event implementation weeds again to see exactly what's happening there.
21:24:47*solitudesf- quit (Ping timeout: 265 seconds)
21:25:24rayman22201unfortunately I am quite busy with real life things this weekend, so I won't really have time to investigate for a while. :/
21:25:37rayman22201speaking of which, bbl
21:28:49FromGitter<auxym> rayman22201: #12401 sounds great!
21:31:05Zevvrayman22201: I'd be happy to look into your issues tomorrow. But I'm kind of not in the proper state of mind at this moment for any task requiring rational thinking
21:31:27disruptekZevv: is kodkuce over at your place?
21:31:33rayman22201lol. I'm jealous :-P
21:31:49Zevvwhat is kodkcuse
21:32:03rayman22201I'll poke you with more details tomorrow if I can
21:32:12Zevvplease do
21:34:39Zevvrayman22201: the good thing is that *you* found it, and not cheatfate, right?
21:39:41*ng0 quit (Quit: Alexa, when is the end of world?)
21:39:41*filcuc quit (Ping timeout: 268 seconds)
21:41:17rayman22201lol :/
21:41:55*Vladar quit (Quit: Leaving)
21:50:32*sagax joined #nim
21:57:54*stefantalpalaru quit (Quit: stefantalpalaru)
22:00:25*stefantalpalaru joined #nim
22:03:34*stefantalpalaru quit (Client Quit)
22:05:11*stefantalpalaru joined #nim
22:10:01*stefantalpalaru quit (Client Quit)
22:10:10*stefantalpalaru joined #nim
22:27:24*stefantalpalaru quit (Changing host)
22:27:24*stefantalpalaru joined #nim
22:35:42FromDiscord<kodkuce> lol
22:36:11*thomasross joined #nim
22:39:12*oculux joined #nim
22:41:17*oculuxe quit (Ping timeout: 240 seconds)
22:45:30*Hideki_ joined #nim
22:49:38*Hideki_ quit (Ping timeout: 240 seconds)
22:52:54*ng0 joined #nim
23:01:26*Hideki_ joined #nim
23:16:26*tklohna_ quit (Ping timeout: 252 seconds)
23:17:06*krux02_ joined #nim
23:17:19*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:19:52*krux02 quit (Ping timeout: 264 seconds)
23:22:52*setenforce quit (Quit: ZNC 1.7.4 - https://znc.in)
23:26:08*zedeus quit (Ping timeout: 245 seconds)
23:26:08FromDiscord<++x;> Been a while since i texted in here
23:26:30FromDiscord<++x;> Seems like the members increased
23:29:51*GordonBGood joined #nim
23:30:27*lritter quit (Ping timeout: 265 seconds)
23:32:01*krux02_ quit (Remote host closed the connection)
23:39:22jkensize() does not work for cstrings, anyone know how I can get the size of a string when cast to a cstring? or if there is a difference?
23:44:11jkenactually, looks like I can't get the size of a string either!
23:44:54*nsf quit (Quit: WeeChat 2.6)
23:44:58jkennew question, how do I get the size of a string?
23:46:42jkenstring.len * sizeOf(char) ?
23:57:36GordonBGoodI would say not quite due to the terminating null...
23:58:10GordonBGoodYou would have to do (string.len + 1) * char.sizeof
23:58:22GordonBGoodhttps://nim-lang.org/docs/manual.html#types-string-type