<< 26-07-2019 >>

00:04:30*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:17:27*bozaloshtsh_ quit (Ping timeout: 264 seconds)
00:17:35*bozaloshtsh joined #nim
00:17:36*bozaloshtsh quit (Changing host)
00:17:36*bozaloshtsh joined #nim
00:27:46*NimBot joined #nim
00:29:46*shomodj joined #nim
00:38:52FromDiscord_<turbosoggy> Why use nim inatead of Go
00:49:49shashlickDepends what you want to do but Nim is much more powerful for me
00:50:21shashlickI used Go briefly before I discovered Nim and felt restricted
00:50:49FromDiscord_<turbosoggy> What do u like about nim
00:50:55shashlickBut it hasn't stopped it from being a successful language so you need to look at it subjectively
00:51:31shashlickI like the ability to start high level like python but then go down to the machine like C when I need to
00:52:38FromDiscord_<turbosoggy> Go dosent provide that?
00:52:40shashlickAnd the advanced features like macros when you have to go there
00:54:09*Tyresc quit (Quit: WeeChat 2.5-dev)
00:55:15shashlickMaybe but I didn't use it beyond a point since I felt restricted
00:56:25shashlickSee https://chameth.com/2018/12/09/over-the-top-optimisations-in-nim/ for what I'm talking about
01:09:36rayman22201Go doesn't have generics, Nim has full lisp style macros.
01:11:04rayman22201That is the biggest difference really. I actually like Go. But I like abstraction and meta-programming more. :-) Nim gives me the performance of Go but the flexibility of lisp.
01:11:17rayman22201(while still being type safe)
01:35:34*laaron quit (Remote host closed the connection)
01:38:17*laaron joined #nim
02:03:56*ertp07 quit (Read error: Connection reset by peer)
02:04:20*ertp07 joined #nim
02:11:00FromDiscord_<treeform> I did some 3d graphics and go, and not able to add vectors was a pain.
02:12:11FromGitter<awr1> @mratsim made some improvements to the cpuinfo stuff https://github.com/nim-lang/Nim/pull/11816/files
02:12:24FromGitter<awr1> added bfloat16 and vp2intersect too
02:12:43*arecaceae quit (Remote host closed the connection)
02:13:02*arecaceae joined #nim
02:17:04*theelous3 quit (Ping timeout: 246 seconds)
02:17:07*theelous3_ quit (Ping timeout: 245 seconds)
02:29:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:30:17*laaron joined #nim
02:35:07*ertp07 quit (Read error: Connection reset by peer)
02:35:51*ertp07 joined #nim
02:50:22*chimez joined #nim
02:52:07*chimez quit (Client Quit)
02:56:24*onionhammer quit (Quit: WeeChat 1.9.1)
03:05:28*ertp07 quit (Read error: Connection reset by peer)
03:05:43*ertp07 joined #nim
03:47:59shashlickhere's a list of known nimterop based wrappers - https://github.com/nimterop/nimterop/wiki/Wrappers - please expand
03:49:44FromGitter<zacharycarter> @krux02 - I'm not :P but a few things in our game's architecture are written in scala - one of the game servers and I also believe one of the client side settings parsers (I'm not sure why they chose scala there - but I haven't really looked at it that closely either. I don't think it runs on the actual device the game is running on). So I've had to do a bit of Scala programming since I started there
03:50:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
03:51:03*laaron joined #nim
03:51:22*fjellfras joined #nim
04:04:39*laaron quit (Remote host closed the connection)
04:07:36*laaron joined #nim
04:12:18*actuallybatman quit (Ping timeout: 248 seconds)
04:27:40*actuallybatman joined #nim
04:31:24FromGitter<awr1> scala is weird to me
04:32:13FromGitter<awr1> it comes across as somewhat verbose
04:34:03FromGitter<zacharycarter> it is weird - but probably not if you're used to functional programming
04:34:20*actuallybatman quit (Ping timeout: 272 seconds)
04:34:40*nsf joined #nim
04:37:36FromGitter<awr1> if feels verbose compared to hardcore FP langs
04:37:52FromGitter<awr1> *it
04:39:07FromGitter<awr1> it also feels like it has way too many hacks, such as the way tuples are manually implemented as `Tuple`, `Tuple2`, `Tuple3`, etc.
04:40:08FromGitter<zacharycarter> well - I'm guessing some of that is because it's on the JVM and Java was a predecessor
04:40:26FromGitter<awr1> yeah that's kind of what i inferred, that it's a limitation of the JVM
04:40:55FromGitter<awr1> kotlin has a similar limitation: `Pair`, `Triple`, etc.
04:43:08FromGitter<zacharycarter> yeah
04:44:44*laaron quit (Remote host closed the connection)
04:47:17*laaron joined #nim
04:54:03*ertp07 quit (Ping timeout: 264 seconds)
04:56:12*ertp07 joined #nim
05:23:36*absolutejam2 joined #nim
05:24:10*actuallybatman joined #nim
05:45:27*dddddd quit (Remote host closed the connection)
05:45:56FromGitter<kdheepak> Is there a way to store multiple different instances of types in a sequence?
05:46:18FromGitter<kdheepak> I have a large data structure that I'm deserializing
05:47:34FromGitter<kdheepak> and I'm able to deserialize the parts I want into appropriate types/objects in nim but there are multiple different types in there and i want to maintain the order so I want to store it in a array of some sort.
05:48:05FromGitter<awr1> you need variants
05:48:55*solitudesf joined #nim
05:53:11FromGitter<kdheepak> Thanks!
05:54:38FromGitter<kdheepak> Awesome I think that worked!
05:59:10FromGitter<kdheepak> When would one use generics versus variants?
06:00:14FromGitter<kdheepak> I think I wouldn't be able to store objects of multiple different types in a seq if I used generics, is that right/
06:00:27*ertp07 quit (Ping timeout: 245 seconds)
06:00:52FromGitter<zacharycarter> no
06:01:10FromGitter<zacharycarter> you could use inheritance for that
06:01:47FromGitter<zacharycarter> Lists are examples of generic containers - you can have a list of integers, a list of strings, etc...
06:02:03FromGitter<zacharycarter> but you can't have strings and integers in the same list
06:02:13FromGitter<zacharycarter> hopefully that helps to clarify
06:11:15*ertp07 joined #nim
06:11:37FromGitter<awr1> generic types are determined to their "actual types" at compile time
06:13:01FromGitter<awr1> variants and inheritance/methods allow for runtime type dynamicism
06:30:51*ertp07 quit (Read error: Connection reset by peer)
06:31:13*ertp07 joined #nim
06:36:04*Cthalupa quit (Ping timeout: 246 seconds)
06:37:27*Cthalupa joined #nim
06:37:39*Vladar joined #nim
06:39:06*absolutejam2 quit (Ping timeout: 272 seconds)
06:45:37FromGitter<zacharycarter> shashlick: is nimtreesitter incorporated into nimgen? In other words - if I want to try to produce bindings for a C++ library - should I be using Nimgen or treesitter?
06:52:36*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
06:53:47*laaron joined #nim
06:55:02*Tanger quit (Quit: Leaving)
06:57:43*ertp07 quit (Ping timeout: 250 seconds)
06:58:17*laaron quit (Remote host closed the connection)
06:58:34*laaron joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:03*ertp07 joined #nim
07:02:06*ertp07 quit (Read error: Connection reset by peer)
07:02:48*ertp07 joined #nim
07:04:39*gmpreussner joined #nim
07:06:34*PMunch joined #nim
07:08:16*laaron quit (Remote host closed the connection)
07:08:34FromDiscord_<Avatarfighter> Hello everyone!
07:08:38*laaron joined #nim
07:08:47FromGitter<alehander42> hey
07:09:11FromDiscord_<Avatarfighter> Oh hey alehander, you're just the guy I was looking for haah
07:09:24FromGitter<alehander42> : )
07:10:25FromDiscord_<Avatarfighter> Do you remember the wait code you had send in the chat a day or two ago?
07:10:56FromDiscord_<Avatarfighter> now, i'm not saying im having trouble using it, butttt i'm having trouble using it 😛
07:11:18FromDiscord_<Avatarfighter> here is the code specifically https://gitter.im/nim-lang/Nim?at=5d38759854d123414cd848a0
07:12:10FromGitter<alehander42> okk
07:12:48FromDiscord_<Avatarfighter> this is probably a stupid question but, when you use it do you await the function itself or are you discarding what is returned, and if you are awaiting it are you giving it the `async` pragma>
07:13:03FromGitter<alehander42> i am awaiting it indeed
07:13:23FromGitter<alehander42> this one doesnt need the async pragma
07:13:37FromGitter<alehander42> because it "manually" generates a Promise object
07:13:46FromDiscord_<Avatarfighter> Ah ok I thought I was doing something wrong, that leads me to my main issue now haha
07:14:04FromGitter<alehander42> yeah
07:14:48FromDiscord_<Avatarfighter> I import asyncjs since I was told that I shouldn't use asyncdispatch because asyncjs replaces it for targetting js but `await` is an undeclared identifier, ahve you had any issues with this?
07:14:59FromGitter<alehander42> yes, probably you use it
07:15:04FromGitter<alehander42> out of an async function
07:15:22FromGitter<alehander42> basically await is only defined inside an async function
07:15:39FromGitter<alehander42> so e.g. if you want to use it on top level
07:15:39Araqin devel there should be a better error message
07:16:19FromDiscord_<Avatarfighter> oh shoot I forgot about that part of async, I'm not going to lie the only time I used async was once in python so I have no clue how the magic of async works other than it creates iterators
07:17:02FromDiscord_<Avatarfighter> Alrighty, that fixes my issue thank you alehander!
07:17:18FromGitter<ahcm> apropos error messages, fatal.nim:39 is nit really helpful ;-)
07:17:23FromGitter<alehander42> proc topLevel {.async.} = .. ⏎ discard topLevel()
07:17:30FromGitter<alehander42> should work for top level stuff iirc
07:17:38FromGitter<alehander42> in the javascript backend*
07:17:42Araq'discard'?
07:17:50Araqdon't use that for async
07:17:53FromGitter<alehander42> there isnt waitFor defined
07:18:00FromGitter<alehander42> i know, thats why i said the javascript backend
07:18:14FromGitter<alehander42> maybe we should define it
07:18:23FromDiscord_<Avatarfighter> is devel the bleeding edge branch of nim should I use that over 0.20.2?
07:19:16FromDiscord_<Avatarfighter> actually i know its the "bleeding edge" branch of nim so rather I should be asking do you guys suggest using it over the most recent release?
07:22:24Araqno. You should use a released version.
07:23:09Araqhaving said that, devel is comparatively stable since we have "important packages"
07:25:59FromDiscord_<Avatarfighter> Alright that makes sense, thank you Araq!
07:26:22*absolutejam2 joined #nim
07:26:26FromGitter<zacharycarter> I just use choosenim and the stable channel
07:26:37FromGitter<zacharycarter> and whenever a new version of Nim is released, I update stable
07:26:53FromDiscord_<Avatarfighter> same
07:28:07FromGitter<zacharycarter> @Varriount: many moons ago you mentioned in Nim LLVM that you had thought you figured out windows support for it - did that ever pan out or did you run into some blocker(s)?
07:30:39*ertp07 quit (Ping timeout: 250 seconds)
07:31:57*ertp07 joined #nim
07:33:54*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:36:02FromDiscord_<Avatarfighter> does anyone know what this karax error means, `karax.nim(597, 14) `same(kxi.currentTree, document.getElementById(kxi.rootId))` [AssertionError]` and if so any ideas on a fix?
07:37:23FromDiscord_<Avatarfighter> rip that wasn't what i meant to send
07:37:40FromDiscord_<Avatarfighter> the error message sent incorrectly, let me slap it in a txt
07:37:59FromDiscord_<Avatarfighter> https://dsh.re/538aa
07:39:41Araqit means you're misusing karax and don't understand the virtual dom
07:39:57Araqjust an educated guess of course, no offense implied
07:40:03FromDiscord_<Avatarfighter> That is true dont worry haha
07:40:36FromDiscord_<Avatarfighter> Dang I didn't think I was doing anything too outrageous with karax :L
07:45:05leorizedo you have the problematic source?
07:46:21FromDiscord_<Avatarfighter> My js script is my problematic source sadly and I'm trying to figure out why currently its probably because of jquery but i'm trying to be sure
07:46:38leorizeare you trying to modify the generated dom from karax?
07:47:55FromDiscord_<Avatarfighter> yes, but it seems that my method is incompatible with the generated dom
07:48:09leorizekarax assumes that it's in control of the dom
07:48:16leorizeif you want to modify it, you have to tell karax
07:48:39FromGitter<ahcm> Error: undeclared identifier: 'TimeInfo' <-- shouldn't that be in times?
07:48:56FromDiscord_<Avatarfighter> leorize: Would you mind telling me how to do that by chance?
07:49:05FromGitter<alehander42> usually you want to change your state instead, and make your VNode-functions generate different DOM based on that change
07:50:08FromGitter<alehander42> e.g. in an onClick handler ... change a.enabled to true .. ⏎ ⏎ in buildHtml ⏎ ⏎ if a.enabled: ... [https://gitter.im/nim-lang/Nim?at=5d3ab0b006e1c511e1acd53f]
07:50:20leorize@Avatarfighter: what exactly are you doing via jquery?
07:51:46FromDiscord_<Avatarfighter> my jquery currently uses the jquery onready to call a function which updates an elements text, then iterates over a group of elements and updates their lengths programatically and then i bind the clicking of another element to show a modal
07:52:11FromDiscord_<Avatarfighter> https://dsh.re/d05bf
07:52:16FromDiscord_<Avatarfighter> my js code ^
07:52:39leorizemake it call a nim function
07:53:24*shomodj joined #nim
07:53:42FromDiscord_<Avatarfighter> leorize: what do you mean ? Do you mean translate all that to a nim function ?
07:54:19leorizewell instead of manipulating the real dom, manipulate the vdom via a nim callback
07:54:41FromDiscord_<Avatarfighter> oh that is probably a great idea
07:56:29leorizekarax does have a way that let you manipulate the real dom, but it should only be used when you want to use something that take total control of that node, like an editor or some chart drawing js code
07:57:20FromDiscord_<Avatarfighter> oh ok that makes sense
07:57:58*shomodj quit (Ping timeout: 245 seconds)
08:00:10*absolutejam2 quit (Ping timeout: 272 seconds)
08:03:09FromGitter<kdheepak> The nim documentation says the following: ⏎ ⏎ ```type ⏎ Element = object ⏎ attr1: string ⏎ attr2: seq[int]``` ⏎ ⏎ that Element and attr1 and attr2 will ALWAYS be copied? I'm passing types of Element into multiple different functions and there are a lot more attributes, I'm assuming copying is going to be expensive. [https://gitter.im/nim-lang/Nim?at=5d3ab3bda0a9760d34a0f5f5]
08:03:21*laaron quit (Remote host closed the connection)
08:04:21leorizedon't worry
08:04:30leorizepassing to functions is something else
08:04:32*absolutejam2 joined #nim
08:04:48leorizethey will only be copied if their size < 3x float size
08:05:24*laaron joined #nim
08:05:25FromGitter<kdheepak> i see, so they are moved in other cases? Thanks for the quick answers!
08:05:35FromGitter<kdheepak> So when would you recommend using ref/
08:05:47*krux02 joined #nim
08:05:49leorizewhen you need the reference semantics
08:06:40FromGitter<kdheepak> ```x = Element() ⏎ function1(x) ⏎ function2(x)``` [https://gitter.im/nim-lang/Nim?at=5d3ab49004534306f32da3e7]
08:07:34*jolav joined #nim
08:07:58FromGitter<kdheepak> Can you elaborate on what you mean by reference semantics? Or suggest some good reading material/
08:08:07FromGitter<kdheepak> ?*
08:08:18FromGitter<alehander42> here it depends if function1 takes a `Element` or `ref Element`
08:08:25FromGitter<alehander42> `var Element` * sorry
08:08:41leorizereference semantics means:
08:08:53leorizevar a = "string"
08:08:57leorizevar b = a
08:09:02leorizeb[0] = "a"
08:09:14leorizeecho a --> "atring"
08:09:25leorize(note this is just a demo, not how Nim strings work)
08:10:42FromGitter<kdheepak> I see
08:10:53*absolutejam2 quit (Ping timeout: 268 seconds)
08:11:42FromGitter<kdheepak> Got it!
08:11:46FromGitter<kdheepak> Thanks for the answers!
08:12:44FromGitter<kdheepak> and var and let are purely mutable and immutable semantics? They have nothing to do with where it was allocated (stack/heap), is that correct?
08:13:06leorizeyep
08:14:01*clyybber joined #nim
08:14:52clyybberAraq: I wrote about the problem here: https://irclogs.nim-lang.org/25-07-2019.html#08:07:56
08:16:15*shomodj joined #nim
08:16:26FromGitter<kdheepak> Thanks! this is all really useful!
08:16:37leorizenp
08:16:45FromGitter<kdheepak> The manual documentation has significantly improved since the last time I read it :)
08:17:15FromGitter<kdheepak> But I think clarifying some of this there as well could be useful.
08:17:27FromGitter<kdheepak> Maybe it's obvious to others?
08:18:39leorizeI think it's just hard to describe :P
08:18:50FromDiscord_<Avatarfighter> guys, its such a good feeling when karax doesn't throw an assertionerror anymore haha
08:19:11leorizethat's the joy of doing things correctly :)
08:19:50FromDiscord_<Avatarfighter> I got clicking on an element working and i'm not going to lie im genuinely excited
08:20:53*shomodj quit (Ping timeout: 245 seconds)
08:23:44FromDiscord_<Avatarfighter> leorizeL do you have any idea on how to walk the elements that are made by the proc that `setRenderer` calls?
08:23:46*jolav left #nim (#nim)
08:23:51FromDiscord_<Avatarfighter> leorize:*
08:24:50leorizewalk the elements? you mean walk the vdom or the dom?
08:25:34FromDiscord_<Avatarfighter> walk the vdom specifically
08:26:14FromDiscord_<Avatarfighter> since from my understanding I will get an AssertionError by editing the dom?
08:26:25FromGitter<kdheepak> One of my types is printing fine if I have `object` but if change it to `ref object` 1) I have to add a custom `$` formatting, 2) even if I add a custom `$` formatting it doesn't print it out correctly when it is in a `seq`.
08:26:28*xet7 quit (Quit: Leaving)
08:26:54leorize@Avatarfighter: well, the vdom is in the result variable of the rendering function
08:28:53leorize@kdheepak: any examples of what you're trying to do?
08:29:05FromDiscord_<Avatarfighter> Argh :L I'm in way over my head I guess, I'm just trying to find a good way to convert this js function, https://dsh.re/ed936 to be in nim while being compatible with the karax dom
08:29:21FromGitter<kdheepak> I'm not able to replicate it in a simple example unfortunately :(
08:29:41*xet7 joined #nim
08:31:36FromGitter<kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d3aba680d0ffc397586de66]
08:31:57leorize@Avatarfighter: I'm not fluent in JS, but I'm assuming that you're trying to get the rendered width then manipulate it?
08:32:06FromGitter<kdheepak> I've copy pasted bits from my code and this works as expected
08:32:08leorizesome kind of a timer process bar?
08:32:40FromDiscord_<Avatarfighter> leorize: yes that is exactly what I'm trying to do, I just want to know if its even possible to do with how the karax dom works
08:32:53leorizetotally possible
08:33:02FromGitter<kdheepak> But when I print it in my larger program attributes shows up as this: `, attributes: ..., `
08:33:03leorizeand no you don't need jquery :P
08:33:12FromDiscord_<Avatarfighter> Please enlighten me haha
08:33:43FromDiscord_<Avatarfighter> this is a side note but the `discardable` pragma is so nice
08:34:01*go|dfish quit (Ping timeout: 244 seconds)
08:34:11leorizethat's a sign that you might be misusing it :P
08:34:25FromDiscord_<Avatarfighter> hahaha
08:34:44leorizekdheepak: I'm not sure but it looks fine here: https://play.nim-lang.org/#ix=1PxI
08:35:17FromDiscord_<Avatarfighter> i hope not, its just for a proc that advances the index of my buffer and returns the new index
08:35:42FromDiscord_<Avatarfighter> thats for a completely unrelated thing to me understanding karax
08:36:17FromGitter<kdheepak> What version of nim is running in the playground?
08:36:21leorizeAvatarfighter: save the state somewhere
08:36:31leorize!eval echo NimVersion
08:36:34NimBot0.20.2
08:36:42leorize^ that's your answer @kdheepak
08:38:16FromDiscord_<Avatarfighter> leorize: what do you happen to mean by "the state"
08:38:40leorizetypically, you'll be using the real dom to store things like the current width, etc.
08:38:49leorizewith karax, you'll need to keep track of 'em yourself
08:39:09FromGitter<kdheepak> In my code, I'm not able to `echo element`. I have to do `echo element[]` in order for it to compile.
08:40:22leorizewith that exact code?
08:41:53FromGitter<kdheepak> In my larger codebase, yeah. In the example it works fine. I can't figure out what's going on. Trying a few things now.
08:41:53leorize@Avatarfighter: so here is how I'd do it:
08:42:31leorizecreate an object that stores the width and a TimeOut
08:42:32*absolutejam2 joined #nim
08:43:09FromGitter<kdheepak> Okay I think I figured it out.
08:43:29leorizemake a proc that'll adjust that width every second
08:43:37leorizethen just setTimeout() it
08:44:05leorizein that proc, call redraw() (or is it some other name?) once you've adjusted your width
08:44:12FromGitter<kdheepak> The default printing worked on my `object` but not on my `ref object`. and when I added custom formatting `$` functions, I needed to forward declare because it was calling it in cycles
08:44:33leorize@Avatarfighter: I'll just make an example instead, please wait :P
08:44:52FromDiscord_<Avatarfighter> wait so I have my shining new object that stores the width and the timeout, but how do I make my bleeding edge proc update the element haha
08:45:08leorizenewTimer(state)
08:45:12leorizeeasy
08:45:15leorize:P
08:45:19FromDiscord_<Avatarfighter> o
08:45:49FromDiscord_<Avatarfighter> momento de cerebro muy grande
08:46:23*shomodj joined #nim
08:46:30leorize@kdheepak: ref object does not dereference to object automatically
08:47:13FromGitter<kdheepak> And default print formatting is defined for `object` but not for `ref object`?
08:48:08FromDiscord_<Avatarfighter> leorize: do you happen to have an example of how to use this, I'm not exactly the fastest of learners when it comes to this lol
08:48:32leorize@kdheepak: yea
08:52:06*absolutejam2 quit (Ping timeout: 244 seconds)
08:54:03*ertp07 quit (Ping timeout: 264 seconds)
08:58:32FromDiscord_<Avatarfighter> wow I didn't realize you can
08:59:06FromDiscord_<Avatarfighter> huh that's interesting that you have to dereference but it makes sense
09:02:34*ertp07 joined #nim
09:14:56leorize@Avatarfighter: http://ix.io/1PxW/nim
09:15:03leorizeprobably not the best way to do it, but it works :P
09:17:48FromDiscord_<Avatarfighter> thank you leorize, you're truly a lifesaver, I'll try and repay your help whenever I can 😄
09:19:44*clyybber quit (Quit: WeeChat 2.5)
09:21:17*absolutejam2 joined #nim
09:21:55*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:25:49*absolutejam2 quit (Ping timeout: 246 seconds)
09:26:50FromDiscord_<Avatarfighter> OH WOW THAT IS AWESOME
09:26:53FromDiscord_<Avatarfighter> I just realized
09:26:55FromDiscord_<Avatarfighter> holy crap
09:27:04FromDiscord_<Avatarfighter> whaaaaat
09:27:46FromDiscord_<Avatarfighter> I was trying to figure out how you were accessing the width of the element and then it hit me
09:27:48FromDiscord_<Avatarfighter> wowow
09:32:15leorizewell there's also an another way to get the width
09:33:20leorizeonce a VNode is rendered, `VNode.dom` gives you the DOM node, which you can get the width from as usual
09:34:08FromDiscord_<Avatarfighter> dang that was really cool haha
09:37:51FromDiscord_<Avatarfighter> dang the vdom is really cool, I'm looking at how karax is implemented and its pretty amazing
09:41:06dom96alehander42: yes... the JS version of async shouldn't encourage bad patterns...
09:43:12*noonien joined #nim
09:43:52FromGitter<alehander42> @dom96 i guess waitFor would still just invoke the function in javascript
09:43:57FromGitter<alehander42> as there is no clear equivalent
09:44:00FromGitter<alehander42> iirc
09:44:30dom96asyncCheck is the equivalent, unless calling an async function on the JS backend blocks...
09:45:07dom96How are failures handled in JS async? what happens when an async proc raises an exception? Does it get stored in the Future?
09:47:43FromDiscord_<Avatarfighter> leorize: stupid question but what does `f` in width attribute of https://dsh.re/3a827 do?
09:47:57FromGitter<mratsim> conversion to float32
09:48:10FromGitter<mratsim> well not conversion, it tags it as a float32 literal
09:48:38FromDiscord_<Avatarfighter> ah that makes sense, thank you mratsim
09:48:45*shomodj joined #nim
09:49:14*shomodj quit (Client Quit)
09:49:26FromDiscord_<Avatarfighter> i assumed it was something like that but I just wanted to make sure
09:49:32*shomodj joined #nim
09:51:42*actuallybatman quit (Ping timeout: 245 seconds)
09:53:27FromGitter<alehander42> dom96 so
09:54:03*abm joined #nim
09:54:06FromGitter<alehander42> i dont think so
09:54:14FromGitter<alehander42> i think they just raise
09:54:19FromGitter<alehander42> and you have to catch it
09:54:24FromGitter<alehander42> or you get DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
09:54:38dom96This is just a nodejs thing, right?
09:54:50FromGitter<alehander42> yes, but i guess the browser should work similarly
09:55:02dom96Do browsers ship with support for promises?
09:55:19FromDiscord_<Avatarfighter> safari + chrome + firefox do iirc
09:55:33FromGitter<alehander42> what do you mean
09:55:40FromGitter<alehander42> of course
09:55:43dom96https://caniuse.com/#feat=promises
09:55:49FromDiscord_<Avatarfighter> everything ships with promises except internet explorer
09:55:51FromGitter<alehander42> or maybe i just havent used older browser sorry
09:55:55FromGitter<alehander42> lately
09:56:06FromGitter<alehander42> yeah, forgot about older :(
09:56:28*nif quit (Quit: ...)
09:56:32*aexoxea joined #nim
09:56:38*nif_ joined #nim
09:56:49FromGitter<alehander42> otherwise i meant on top level
09:57:07FromGitter<alehander42> iirc calling an async function on top level in node seems to await it
09:57:13dom96the exception needs to go somewhere
09:57:21FromGitter<alehander42> so in a sense, i guess it "blocks" it in this case only
09:57:25dom96you can't just "raise" when the promise was already returned
09:57:29dom96you need to store that state in the promise
09:57:53FromGitter<alehander42> hm, i am not sure how it works
09:58:06FromGitter<alehander42> but e.g. in the console i get Promise { <state>: "pending" }
09:58:13FromGitter<alehander42> or Promise { <state>: "rejected" }
09:58:19FromGitter<alehander42> and then the raised error
09:58:32FromGitter<alehander42> and yeah, its inside, you're right!
09:58:38FromGitter<alehander42> in reason
09:59:00dom96if you discard a promise then you'll lose the error
09:59:04dom96this is the point in asyncCheck
09:59:14dom96to make sure the error is raised
09:59:33dom96What are you using these promises for btw?
10:00:21FromGitter<alehander42> promises are basically Future
10:00:26FromGitter<alehander42> in javascript afaik
10:02:28FromGitter<alehander42> "What happens when a regular error occurs and is not caught by try..catch? The script dies. Similar thing happens with unhandled promise rejections. ⏎ ⏎ The JavaScript engine tracks such rejections and generates a global error in that case. You can see it in the console if you run the example above."
10:08:24*fjellfras quit (Quit: Leaving)
10:10:33*ertp07 quit (Ping timeout: 250 seconds)
10:11:50*gangstacat joined #nim
10:15:11dom96Okay, might be worth to create a no-op `asyncCheck` for this to make sure we use the same conventions across backends.
10:15:38FromGitter<alehander42> so it feels to me asyncCheck is equivalent to
10:15:40FromGitter<alehander42> not really
10:15:42FromGitter<alehander42> it is no-op
10:15:49FromGitter<alehander42> it is not *
10:16:02FromGitter<alehander42> it should be call().catch(e => ignore)
10:16:16FromGitter<alehander42> as otherwise it will actually bubble up the errr
10:16:53*ertp07 joined #nim
10:18:15dom96no, check the asyncCheck implementation
10:18:18dom96it doesn't ignore errors
10:18:48FromGitter<alehander42> ah ok
10:19:05FromGitter<alehander42> but it doesnt wait? so e.g. what does normal nim
10:19:12FromGitter<alehander42> use when awaiting on a top level
10:19:14FromGitter<alehander42> waitFor ?
10:20:02FromGitter<alehander42> e.g. waitFor myAsyncEntry
10:20:08dom96This does give me an idea, I feel like I tried it before though. It might be better to do what JS does in the long-run and that way we can avoid having to force people to use `asyncCheck` everywhere
10:20:10dom96yes, waitFor
10:22:19FromGitter<alehander42> so maybe waitFor should be also no-op but the issue is that it only makes sense on top level
10:22:52FromGitter<alehander42> nah its still not the same
10:23:08dom96waitFor doesn't really make sense for JS
10:23:41FromGitter<alehander42> but my issue is
10:23:56FromGitter<alehander42> how to write "await this top level call"
10:24:03FromGitter<alehander42> in a way that works for both backends
10:25:10*jmiven quit (Quit: reboot)
10:25:58*jmiven joined #nim
10:27:43dom96in JS you'd have an `onLoad` proc which shouldn't block, so you'd just use asyncCheck
10:27:43*ertp07 quit (Read error: Connection reset by peer)
10:28:08dom96in node I have no idea
10:28:08*ertp07 joined #nim
10:29:32*stefanos82 joined #nim
10:32:01FromGitter<alehander42> in node you seem to be able to just call them on top level
10:32:07FromGitter<alehander42> and the script seems to await those
10:32:16FromGitter<alehander42> they have a flag to enable await directly
10:32:19FromGitter<alehander42> but its not on by default
10:32:31FromGitter<alehander42> actually you can await in browser console
10:32:38FromGitter<alehander42> but not sure about <script>
10:33:15FromGitter<alehander42> so currently i am using discard for that goal in the javascript backend
10:33:28FromGitter<alehander42> asyncCheck makes more sense but still a bit weird
10:36:12*floppydh joined #nim
10:37:29FromGitter<alehander42> also, a bit offtopic: did asyncdispatch have some leaks which got fixed?(or am i confusing it with jester's handlers)
10:38:22FromGitter<alehander42> i will eventually need to write a nim gdb-mi lib one day (and i havent used native async a lot) and i wondered if i should be careful with something
10:45:38*shomodj_ joined #nim
10:47:49*Avatarfighter joined #nim
10:48:30*absolutejam2 joined #nim
10:49:16*shomodj quit (Ping timeout: 272 seconds)
10:51:39*HP-YC9 quit (Remote host closed the connection)
10:52:03*HP-YC9 joined #nim
10:52:50*absolutejam2 quit (Ping timeout: 248 seconds)
10:55:34*lritter joined #nim
11:01:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
11:02:10*ng0 joined #nim
11:02:25*laaron joined #nim
11:07:06*nif_ quit (Quit: ...)
11:07:15*nif joined #nim
11:27:49*absolutejam2 joined #nim
11:32:32*absolutejam2 quit (Ping timeout: 245 seconds)
11:40:35*Avatarfighter quit (Ping timeout: 260 seconds)
11:47:31*absolutejam2 joined #nim
11:52:07*absolutejam2 quit (Ping timeout: 246 seconds)
12:13:41*theelous3 joined #nim
12:13:46*theelous3_ joined #nim
12:19:20*nsf quit (Quit: WeeChat 2.4)
12:24:03*ertp07 quit (Ping timeout: 264 seconds)
12:24:59*theelous3_ quit (Quit: is outty)
12:28:07dom96alehander42: yes, some leaks were fixed
12:31:23*ertp07 joined #nim
12:36:30FromDiscord_<Avatarfighter> Thank you to everyone who has helped me past and present means a lot !
12:36:56*absolutejam2 joined #nim
12:39:42*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:40:08FromDiscord_<Avatarfighter> finally converted everything from html/js -> nim so that's pretty hype!
12:40:17*laaron joined #nim
12:41:30*absolutejam2 quit (Ping timeout: 244 seconds)
12:51:29dom96Nice :D
12:51:38PMunch@Avatarfighter, what did you port?
12:53:04*leorize quit (Quit: WeeChat 2.4)
12:53:53*leorize joined #nim
12:56:34*theelous3 quit (Read error: Connection reset by peer)
13:04:56FromDiscord_<Avatarfighter> @PMunch im porting my python/html/js password manager to nim and then i'm going to bundle all that up into an exe 😃
13:05:29PMunchAah, cool!
13:07:14*dddddd joined #nim
13:08:54FromDiscord_<Avatarfighter> i just gotta do the python -> nim now and then we're all set so that's hype
13:30:50FromGitter<alehander42> is it a web app
13:30:53FromGitter<alehander42> or electron?
13:31:15FromGitter<alehander42> @dom96 awesome, i'd try to port an existing impl probably
13:31:26FromGitter<alehander42> but i suspect most are not async-based (C etc)
13:31:45FromGitter<alehander42> currently i use a reactive stream-based javascript gdb-mi lib
13:33:08FromDiscord_<Avatarfighter> alehander42: I built it to be ran in a webkit window using PySide2(QT5), but right now I'm redesigning it to be ran in a modern browser(sorry internet explorer) until I figure out a lib that allows html/js and that isn't electron
13:33:36FromGitter<alehander42> well, whatever allows html/js has to carry something like a browser
13:33:45FromGitter<alehander42> afaik CEF etc
13:33:51FromGitter<alehander42> are used by some apps (spotify?)
13:33:55FromGitter<alehander42> which might be lighter
13:34:25disruptekwell, they need a renderer, but they don't need a browser per se.
13:34:26FromGitter<alehander42> i am in the electron camp :( :)
13:34:38disruptekyour gdb-mi is in electron?
13:34:40FromGitter<alehander42> well : renderer, javascript engine, css engine..
13:34:52FromDiscord_<Avatarfighter> Electron is really cool, its just that it consumes a bit too much ram for my liking haha 😃
13:34:53FromGitter<alehander42> what is the difference with a browser engine here
13:35:02*shomodj joined #nim
13:35:15FromGitter<alehander42> disruptek: no, it runs in a separate process
13:35:32disruptekthis, i never understood. why not have that stuff simply serve up web pages so a browser can render it.
13:35:38FromGitter<alehander42> but that process started with the Javascript backend because of electron veeeery long ago
13:35:45FromGitter<alehander42> which was a wrong decision of mine
13:36:13FromGitter<alehander42> but yeah: on the other hand if i just provide the same async gdb API through C
13:36:25FromGitter<alehander42> it should be easy to reuse almost all the code
13:36:48FromDiscord_<Avatarfighter> disruptek: that is what i'm currently doing, that main reason I had it do QT5 webkit was because I badly scaled a few divs and I was too lazy to fix it once I got the embedded browser working lol
13:36:52FromGitter<alehander42> just converting some system api-s to use os.nim and js assoc to tables
13:37:43FromGitter<alehander42> disruptek: because browsers are still different: and making sure the user uses a compatible one is hard
13:37:57FromDiscord_<Avatarfighter> Once I'm confident that my code is presentable to the general public I'll probably upload it so that anyone interested can take a peak at my spaghetti code 😃
13:38:20FromGitter<alehander42> on the other hand, its not too hard, because all web apps do it (either iut works or not)
13:38:27FromDiscord_<Avatarfighter> welll
13:38:44FromGitter<alehander42> but after all, usually you have that choice: you can use slack in browser or app
13:39:00*shomodj_ quit (Ping timeout: 272 seconds)
13:39:12livcdalehander42: sciter
13:39:20livcdit is not a browser but has all of it
13:39:52FromGitter<alehander42> but does it use latest stuff
13:39:57FromGitter<alehander42> 1) v8 ?
13:40:11FromGitter<alehander42> css3 etc
13:40:18FromGitter<alehander42> iirc it has its own css engine
13:40:40FromDiscord_<Avatarfighter> sciter looks really cool
13:40:48FromDiscord_<Avatarfighter> i just found that like not even 2 seconds ago
13:41:07FromGitter<alehander42> i'd love to use something which is sublime-like as UI
13:41:19FromGitter<alehander42> but i have to target browser as well
13:41:21FromGitter<alehander42> so i cant
13:41:25FromDiscord_<Avatarfighter> well
13:41:34*absolutejam2 joined #nim
13:41:47leorizesometimes I wish native ui can be done as easily as web ui
13:41:47livcdalehander42: it has its own engine for html,css,and JS (well its own TIScript
13:42:03FromDiscord_<Avatarfighter> you *could* shove something like https://hastebin.com/ozocimidec.js in your html to ward off IE users 😛
13:42:24FromDiscord_<Avatarfighter> it produces this: https://dsh.re/3f1a1a
13:42:42disrupteki wish web ui can be done as easily as native ui 🙄
13:42:46FromDiscord_<Avatarfighter> same
13:42:57FromGitter<alehander42> i have to try it one day, but for now electron
13:43:01FromDiscord_<Avatarfighter> the closest i've been to that is QT Designer
13:43:11FromDiscord_<Avatarfighter> drag and drop elements and then use css to edit the style its so nice
13:43:15FromGitter<alehander42> also, electron is probably not the memory bottleneck in my project .. so back to fixing the other stuff
13:43:28disruptekqt is pretty great.
13:43:35leorizedisruptek: I've written stuff in karax and it's mind blowing easy
13:43:59disrupteki'm hoping to write my next front-end in karax.
13:44:34disruptekreally, i just want to forget everything i know about the web.
13:44:42disruptekit all makes me sad.
13:44:53FromDiscord_<Avatarfighter> karax is super nice
13:44:57FromDiscord_<Avatarfighter> i highly recommend
13:45:11FromDiscord_<Avatarfighter> although the vdom took a day or three to understand for me, I support 👍
13:45:58FromGitter<alehander42> karax is good !
13:46:12FromGitter<alehander42> writing some karax views now
13:46:17*absolutejam2 quit (Ping timeout: 245 seconds)
13:46:38livcdi read about what sublime uses
13:46:52livcdto me it works similarly like sciter
13:47:02FromGitter<alehander42> i even use karax for backend server views
13:47:16FromGitter<alehander42> what does it use
13:47:17FromGitter<Riderfighter> What do you mean by backend server views?
13:47:18FromGitter<alehander42> isnt it a c++ lib
13:47:28FromGitter<alehander42> templates for jester
13:47:36FromGitter<Riderfighter> ohh
13:47:37FromGitter<alehander42> only as a html generator basically
13:47:40FromGitter<Riderfighter> That's sweet
13:48:15leorizeno idea if a model like karax could be applied for native ui :/
13:48:45FromGitter<Riderfighter> I wouldn't be surprised if it could tbh
13:50:27FromDiscord_<Avatarfighter> im looking for electron bindings for nim right now haha
13:50:53FromDiscord_<Avatarfighter> all this talk about html/js/css/browsers has got me excited!
13:51:14FromGitter<alehander42> what do you mean by bindings
13:51:15FromGitter<alehander42> you can directly use it
13:51:35FromDiscord_<Avatarfighter> whoops yeah i just figured that out
13:51:36FromGitter<alehander42> generating an index file (usually with -d:nodejs) and renderer file
13:51:57FromGitter<alehander42> now, if you mean type mappings for electron api-s: yes, this should be good
13:52:00FromDiscord_<Avatarfighter> sorry if bindings wasn't the correct word, wasn't sure how to phrase that
13:52:17FromGitter<alehander42> to add, but for now one can manually type just what he needs or use dynamic js object
13:52:20dom96leorize: Why not? React Native is a thing
13:52:57FromDiscord_<Avatarfighter> ^
13:53:24leorize.
13:53:32FromGitter<alehander42> no problem, just wanted to motivate you that its work avatarfiggter
13:53:35FromGitter<alehander42> works*
13:53:49FromGitter<alehander42> dom96 oh yeah that would be good
13:53:53FromGitter<Riderfighter> Don't worry, I'm motivated right now !
13:54:31FromGitter<alehander42> wow you're double-avataring
13:54:36FromDiscord_<Avatarfighter> yeah sorry about that
13:55:16FromDiscord_<Avatarfighter> i have gitter on my browser and i'm used to switching to it to talk 😛
13:56:26disrupteki'm streaming a nim i3ipc port.
13:56:48leorizereact native is interesting
13:56:54leorizedisruptek: oooh
13:58:13*shomodj_ joined #nim
13:58:29leorizeno async api?
13:58:49disrupteksorry?
14:00:38*PMunch quit (Remote host closed the connection)
14:00:40leorizesince i3 ipc uses sockets, an asynchronous api should be possible, no?
14:00:52*shomodj quit (Ping timeout: 245 seconds)
14:00:58disrupteksure.
14:01:04disruptekwe haven't gotten that far. ;-)
14:01:14disrupteki just started this.
14:02:37lqdev[m]man, compile times surely get painful when your project gets large enough. especially because nim check slows down along with it, so you can't see errors immediately
14:02:49lqdev[m]I really hope incremental compilation will come soon
14:04:02livcdalehander42: sublime ?
14:05:27FromGitter<alehander42> i dont use nim check
14:05:37FromGitter<alehander42> do people love it?
14:05:55leorizedisruptek: it's int32 instead of int'32
14:05:55FromGitter<alehander42> do you usually jump to your errors in your IDE? is this working in code?
14:06:08disrupteki wish it was the same code when you compiled...
14:06:10FromGitter<alehander42> livcd: yes, i thought sublime uses its own c++ lib
14:07:21*aexoxea quit (Quit: Goodbye!)
14:07:32livcdalehander42: it uses skia for rendering and then native api of each platform
14:09:56FromGitter<alehander42> yeah, they do include a python scripting engine
14:09:57FromGitter<alehander42> as well
14:10:01FromGitter<alehander42> maybe its similar
14:13:03dom96I'm surprised people use `nim check`, most of the time it gives really wild errors
14:15:26disruptekhow can i pack this int into a string (binary)?
14:16:05disruptekthe problem with check is that it doesn't match compilation. i mean, that's a huge problem.
14:16:40FromGitter<Riderfighter> disruptek if you dont mind another dependency you can use struct to pack ints/floats/bools to their binary format
14:17:47disruptekthat's what i want, thanks. :-)
14:18:27FromGitter<Riderfighter> np idk what your use case is but I guess I might shamelessly plug in my packet lib https://github.com/Riderfighter/binio/
14:18:32leorizedisruptek: NESM have macros to parse/create binary data
14:19:19leorizehttps://github.com/xomachine/NESM
14:19:30disruptekwow, this is awesome. lol
14:19:59disruptekthis is really what you use? o.O
14:20:33FromGitter<Riderfighter> NESM is crazy jeez
14:20:45FromGitter<Riderfighter> just going to bookmark this for later :P
14:21:20leorizeNESM is one of those package that hooked me to nim
14:21:47leorizedisruptek: check out its documentation
14:21:57FromGitter<Riderfighter> ngl when I found out that you could overload a proc I was hooked
14:23:03leorizeguess you're from python/go
14:24:03FromGitter<Riderfighter> yessir
14:24:22leorizeI originally wrote pascal so overloading is a trivial thing :P
14:25:34FromGitter<Riderfighter> I'm considerably better at Python than anything else I code in I just really like trying new languages and nim has gotten me hooked ever since @alehander42 helped me a bit with binio https://dsh.re/1fd88
14:25:48FromGitter<Riderfighter> ^ that script unpacks binary data to a specified struct
14:27:03FromGitter<Riderfighter> NESM is really cool so I would definitely say use that over my stuff haha
14:27:37leorizewhen I found it someone was using it to parse TCP packets on the forums
14:28:08FromGitter<Riderfighter> that's really cool wow
14:28:24FromGitter<Riderfighter> jeez guys this is too much cool stuff for me I want to start another project now
14:30:01leorizeoh yea, and here's the link to disruptek's stream: https://www.twitch.tv/disruptek
14:31:26*absolutejam2 joined #nim
14:32:21FromGitter<Riderfighter> rip I wish I could check that out I'm using cellular data as my internet right now
14:32:38livcddisruptek: no sound?
14:33:14disruptekno sound?
14:33:21disrupteknone at all? or am i just quiet?
14:33:26livcdnone at all
14:33:36disruptekwow.
14:34:09FromGitter<Riderfighter> rip
14:34:18livcdbut dont worry about me i need to go in a few mins :D
14:34:35disruptekthis isn't a quickie in any event. i'm just learning.
14:34:47leorizeyou're using pulseaudio, right?
14:35:12disruptekyeah, like a boss.
14:35:14leorizepavucontrol is useful for these kinds of sound testing :P
14:35:21skrylar[m]janet looks like a lispy lua... hmm
14:35:49disrupteki know, it's working. i think i'm just not actually capturing it.
14:36:03disruptekthe wayland capturer is kinda new and i had to hack it to get it to work this well.
14:36:09disruptek(which is to say, barely)
14:36:18*absolutejam2 quit (Ping timeout: 268 seconds)
14:38:36skrylar[m]still haven't used nesm here but yeah nim macros are pretty neat
14:39:15skrylar[m]did some partial flatbuffers and such that made use of macros that called out to templates so you could specify a type to have an auto serializer or write a manual one and it all worked seamlessly
14:41:30FromGitter<Riderfighter> Thank you for this :)
14:41:31FromGitter<Riderfighter> guys NESM is everything I wished my lib was
14:42:16shashlick@zacharycarter nimgen doesn't use tree-sitter, nimterop does
14:42:21shashlickWhat are you trying to do?
14:42:49leorizedisruptek: I don't think IPPROTO_IP is a valid protocol for unix sockets
14:43:06disrupteki use it elsewhere.
14:43:07*absolutejam2 joined #nim
14:44:36disruptekinvalid argument vs. protocol not supported
14:48:50leorizetry stracing your program
14:49:42leorize`cast[Protocol](0)`
14:50:06disruptekriddle me this, batman...
14:50:28leorizeI see the prob now
14:50:44leorizethe struct sent to connect was incorrect
14:51:08disruptekyeah.
14:51:20leorizestdlib problems I s'pose
14:51:25disruptekoh, i'm dumb. i'm sending path instead of addy, i bet.
14:53:06*ertp07 quit (Read error: Connection reset by peer)
14:53:27*ertp07 joined #nim
14:58:21disruptekit's like i'm recv'ing twice.
14:58:53leorizedamn the latency is high between the stream and here
14:59:14disruptektry chatting in there; i wish to spam.
14:59:31leorizeI don't have a twitch account
15:00:28leorizetry reading the source of the function
15:00:40disruptekwell, we know this code isn't going to work as it sits, because we're getting back a package that we'll need to de-serialize.
15:00:48disrupteks/package/packet/
15:07:22disruptekit's only getting 98 bytes, which is fine. i guess it's working fine.
15:07:33disrupteki just need a way to handle short reads better.
15:08:22*absolutejam2 quit (Ping timeout: 245 seconds)
15:13:55*laaron quit (Remote host closed the connection)
15:16:01*laaron joined #nim
15:18:48FromGitter<kaushalmodi> having some fun: https://play.nim-lang.org/#ix=1PAE
15:28:22*ertp07 quit (Ping timeout: 245 seconds)
15:38:36*ertp07 joined #nim
15:44:16disruptekleorize: wow, this is going to work. nesm for the win, thanks. :-D
15:45:32FromGitter<Riderfighter> NESM is awesome!
15:45:40FromGitter<Riderfighter> thanks leorize :D
15:49:00*laaron quit (Remote host closed the connection)
15:53:03*arecaceae quit (Remote host closed the connection)
15:53:22*arecaceae joined #nim
15:53:31*laaron joined #nim
15:54:04*dgreen joined #nim
16:01:35*floppydh quit (Quit: WeeChat 2.5)
16:02:01leorizewe really need somewhere to feature the cool nimble stuff
16:02:22FromGitter<Riderfighter> https://nimble.directory ?
16:02:39FromGitter<Riderfighter> we could make a nim-awesome repo haha
16:02:41leorizeit doesn't have that functionality :P
16:02:43FromGitter<Riderfighter> replace/update the old one
16:02:56leorizeand yes someone made awesome-nim, but it doesn't have enough attention
16:03:15FromGitter<Riderfighter> yeah
16:03:38FromGitter<Riderfighter> idk, it would definitely be fun though!
16:03:57disruptekwhat's the problem you want to solve, exactly?
16:05:03*ertp07 quit (Read error: Connection reset by peer)
16:05:16*ertp07 joined #nim
16:07:28*go|dfish joined #nim
16:07:47Zevvkaushalmodi: argh no please don't
16:09:25FromGitter<Riderfighter> what would be kind of nice would be a community showcase/gallery site where people would be able to vote for which packages are to be included on the site and then the only time moderation for the page would be needed is if a package was upvoted as a meme or there is an update to the page
16:11:15leorizethere's a "Featured packages" section already, just that it's underutilized
16:11:47FromGitter<kaushalmodi> Zevv: I don't like that either.. I was learning/checking to see if I *can* do that :P
16:12:22Zevv:)
16:12:47FromGitter<Riderfighter> Leorize: where is the featured package specifically is it on nim-lang.org?
16:13:01leorizefeatured projects I mean
16:13:05leorizeright in the front page
16:13:13leorizeif you scroll down
16:13:18FromGitter<Riderfighter> yep I found it my bad haha
16:14:33FromGitter<Riderfighter> Yeah I *guess* its what we were talking about specifically, but in my opinion a dedicated community page would be a better implementation than that.
16:15:18Zevvkaushalmodi: try to make this work : http://ix.io/1PBM :)
16:15:38Zevvthis, actually: http://ix.io/1PBO
16:16:38FromDiscord_<treeform> Does choosenim install koch? Does not look like it. But nim is asking me to run koch
16:20:23leorizekoch is the nim source builder
16:20:35leorizeit's for compiler development only
16:20:42leorizeguess you're hit with a crash?
16:27:33*ertp07 quit (Ping timeout: 250 seconds)
16:28:40*leorize quit (Ping timeout: 260 seconds)
16:30:13FromDiscord_<treeform> Yeah
16:30:42FromDiscord_<treeform> Maybe it should say something else on a comiler crash.
16:30:50FromGitter<kaushalmodi> Zevv: yeah that won't work because that := temp returns bool
16:33:31*leorize joined #nim
16:35:22*ertp07 joined #nim
16:37:29FromGitter<kaushalmodi> Zevv: ⏎ ⏎ ```template `:=`*[T](v: T; expr: typed): T {.dirty.} = v = expr; v``` [https://gitter.im/nim-lang/Nim?at=5d3b2c49f3e76e1327102351]
16:39:15FromGitter<kaushalmodi> there is also: https://kaushalmodi.github.io/elnim/#ifLet.m%2Cuntyped%2Cuntyped%2Cuntyped :)
16:40:03*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:41:51shashlickKoch can also build and update nimble
16:42:12shashlickIt makes sense to have choosenim shim koch as well
16:42:46shashlickKoch binary is included in all binary builds and built by choosenim as part of source build
16:43:00shashlickSo just a shim is needed
16:43:22*actuallybatman joined #nim
16:45:05dom96No. Why would you update nim from under choosenim?
16:58:42FromGitter<Riderfighter> does anyone know how to make a div take up as much space as possible while respecting margins?
16:59:09FromGitter<Riderfighter> this is a css question, kinda related to karax :)
16:59:30FromGitter<Riderfighter> (https://files.gitter.im/nim-lang/Nim/ngwX/image.png)
16:59:37FromGitter<Riderfighter> whoops
17:01:49shashlick@dom96 - you could update nimble, updating nim isn't possible since there's no git repo
17:05:21shashlick@dom96 - is it possible to compare PkgTuple with PackageInfo in nimble?
17:06:07dom96shashlick: again, something choosenim should do
17:06:08dom96Compare how?
17:06:31shashlickso i'm working on https://github.com/nim-lang/nimble/issues/504
17:08:12shashlickand i need to compare whether a PkgTuple obtained from getRevDeps() is already in the pkgsToDelete which is a seq of PackageInfo
17:08:12*ertp07 quit (Read error: Connection reset by peer)
17:08:20FromGitter<zacharycarter> shaslick: ahh nimterop is what I was thinking of - thinking about attempting to produce bindings for https://magnum.graphics/
17:09:40*ertp07 joined #nim
17:10:17shashlick@zacharycarter - if it is C++, you need c2nim
17:10:40shashlickbut nimterop now supports c2nim imports as well so you might want to use that if there's a lot of preprocessor stuff
17:15:15*donpdonp joined #nim
17:15:49donpdonpim trying to compile a hello world that does import nimx/window. nimx was installed with nimble but nim says its not found.
17:17:59donpdonpoh looks like the nimble install didnt actually finish.
17:18:51donpdonpturns out answering No to 'X exists, overwrite?' stops the install entirely :(
17:22:12*nif quit (Quit: ...)
17:22:21*nif_ joined #nim
17:28:49shashlickhow do you do [i for i in seq where condition] in Nim
17:33:41FromGitter<kaushalmodi> shashlick: look at the procs in sequtils
17:34:11FromGitter<kaushalmodi> https://nim-lang.github.io/Nim/sequtils#filter.i%2CopenArray%5BT%5D%2Cproc%28T%29 ?
17:34:31shashlicki did but i need a field from each object, not the object itself
17:35:50FromGitter<kaushalmodi> I am trying to understand ..
17:36:13FromGitter<kaushalmodi> you have a seq of objects?
17:36:42shashlickya and i want the name field for each object in a new seq
17:36:56FromGitter<Riderfighter> just a side note, can't you do `for field in object.fields`
17:37:12FromGitter<Riderfighter> you'll need typeinfo
17:37:27FromGitter<kaushalmodi> you don't need typeinfo
17:37:31FromGitter<Riderfighter> do you not?
17:37:33*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:37:38FromGitter<Riderfighter> huh today i learned lol
17:37:52FromGitter<kaushalmodi> https://nim-lang.github.io/Nim/iterators.html#fields.i%2CT
17:38:52FromGitter<Riderfighter> typeinfo introduces an iterator which returns the name: string, type: type of each field though
17:39:07FromGitter<kaushalmodi> https://play.nim-lang.org/#ix=1PCM
17:39:19shashlickvar res: seq[string]; for i in objects: res.add i.name
17:39:31FromGitter<Riderfighter> yeah
17:39:34FromGitter<Riderfighter> @kaushalmodi my bad haha
17:40:03*laaron joined #nim
17:40:05shashlicki want `let res = xyz` where xyz gives me that res above
17:40:34FromGitter<Riderfighter> I'm bad at reading documentation apparently @kaushalmodi
17:41:02FromGitter<kaushalmodi> you're not
17:41:18FromGitter<kaushalmodi> the same `fields` iterator is simply defined for different signature in typeinfo
17:41:28FromGitter<kaushalmodi> another example: https://play.nim-lang.org/#ix=1PCN
17:44:11shashlickno solution for me?
17:44:16FromGitter<kaushalmodi> shashlick: https://play.nim-lang.org/#ix=1PCO
17:44:22FromGitter<kaushalmodi> `fieldPairs`
17:44:59shashlicki know which field, don't need fieldPairs
17:45:14FromGitter<kaushalmodi> hmm.. thinking
17:45:31shashlicksimplify this for me - http://ix.io/1PCR/nim
17:46:31*donpdonp left #nim ("WeeChat 2.4")
17:46:58FromGitter<kaushalmodi> what is `pkgsToDelete`?
17:47:20FromGitter<kaushalmodi> is it a seq of objects? if so, what's that object's type defn?
17:48:45shashlickya, has a name field
17:48:50shashlickthat's all i want
17:51:31shashlickgot it - `namesOfPkgsToDelete = pkgsToDelete.mapIt(it.name)`
17:51:58FromGitter<kaushalmodi> cool
17:52:27FromGitter<kaushalmodi> the "where condition" bit in your initial message got me confused :)
17:53:24shashlickawesome, my code is one line now, peace out
17:54:25FromGitter<kaushalmodi> the "It" variants are awesome
17:54:33FromGitter<kaushalmodi> also find a way to use `filterIt` :)
17:55:38shashlicki used it in the next line
17:55:44shashlickwill share the PR shortly
18:02:01*ertp07 quit (Ping timeout: 250 seconds)
18:02:13*Jesin quit (Quit: Leaving)
18:05:15*ertp07 joined #nim
18:05:25FromGitter<Obround> How do you make your own try-except template in nim? I've tried this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ This raises an error. [https://gitter.im/nim-lang/Nim?at=5d3b40e56ec2e14223f56bf6]
18:06:19shashlicki think you can only pass one block to a template
18:07:34*Jesin joined #nim
18:08:23FromGitter<Obround> Oh... I'm new to Nim :D But still, is there some way you can make your own try-except thing in Nim?
18:11:49solitudesfhttps://play.nim-lang.org/#ix=1PCW
18:12:18solitudesf0/5 is expression and not statement
18:14:13FromGitter<Riderfighter> @Obround could you elaborate on what you are trying to make by any chance ?
18:15:15FromGitter<Obround> @Riderfighter -- I am writing a compiler that transpiles to Nim, and for the error handling, I need a custom try-except bolck.
18:16:20FromGitter<Obround> <solitudesf> -- The problem with that is that if some incorrect code is put in the try block, an error will be raised.
18:17:04FromGitter<SolitudeSF> and why it shouldn't be raised?
18:18:11FromGitter<Obround> It is because the except clause should kick in; The code fails at the try block
18:18:36FromGitter<SolitudeSF> your try block isn't throwing exceptions, its just incorrect
18:19:17FromGitter<Obround> Exactly; If the try block stuff is incorrect, then the except block should kick in
18:19:32FromGitter<SolitudeSF> well, thats not how try/except works
18:20:13FromGitter<Obround> I'm trying to make it work like Python's try-except statement
18:22:22FromGitter<SolitudeSF> it wont work like that. nim is compiled so every instance of code should be statically correct.
18:22:52FromGitter<Obround> Oh, ok... hmm...
18:22:52FromGitter<SolitudeSF> it doesnt even make sense. you can see at compiletime that your code is wrong, just dont write it
18:24:32FromGitter<Obround> But how would you use try-except to find out if a variable isn't defined? This raises an error: ⏎ ⏎ ```try: ⏎ echo var_that_is_non_existent ⏎ except: ⏎ echo "Var not defined"``` [https://gitter.im/nim-lang/Nim?at=5d3b4560a0a9760d34a5646f]
18:27:49FromGitter<Riderfighter> Well the main thing is that when you would compile your nim program, the compiler will catch that the variable isn't defined, at compile time the compiler makes sure everything is correct
18:28:33FromGitter<Riderfighter> https://play.nim-lang.org/#ix=1PDb
18:28:38FromGitter<Riderfighter> here is an example of what i mean ^
18:29:20FromGitter<Riderfighter> the compiler will stop the program from building because the var isn't defined anywhere
18:30:36FromGitter<Riderfighter> @Obround does that help in anyway?
18:30:44lqdev[m]`type mismatch: got <tuple of (proc (token: Token): Expr{.locks: <unknown>.}, nil)> but expected 'tuple of (proc (token: Token): Expr{.noSideEffect, gcsafe, locks: 0.}, proc (left: Expr, token: Token): Expr{.noSideEffect, gcsafe, locks: 0.})'` uhhh, I never made the `.noSideEffect` constrain in my tuple. why is there an error?
18:31:07lqdev[m]it's worth noting this proc throws an exception
18:31:21FromGitter<mratsim> exceptions do not affect no Sideffect
18:31:55FromGitter<mratsim> closures are a pain, explicitly tag the signature/pragma of the higher order function
18:32:06FromGitter<Obround> @Riderfighter -- A little...
18:32:08FromGitter<mratsim> if you have a minimal example open a bug
18:32:41FromGitter<mratsim> I think you need {.locks: 0.}
18:33:00lqdev[m]@mratsim I already added the `.nimcall` pragma to the procs in the tuple
18:33:08FromGitter<Riderfighter> @Obround the compiler that nim uses checks the code fully before it compiles to make sure that it will work before running, this eliminates the need of checking if a variable is defined
18:33:18lqdev[m]`.locks: 0` does not help
18:33:29FromGitter<kaushalmodi> @Obround look into `declaredInScope`
18:34:19FromGitter<Obround> Ok
18:36:09*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:36:18*laaron- joined #nim
18:36:43*ertp07 quit (Quit: Quit)
18:37:56*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/bcODltrWbUSccqyusIUhlVcX >
18:38:24lqdev[m]the declaration of `parseParen` is `proc parseParen(token: Token): Expr =`
18:40:00FromGitter<mratsim> what is the Parser type?
18:42:04FromGitter<mratsim> What I was saying is that you often have to tag gcsafe and locks: 0 like here - https://github.com/nim-lang/Nim/issues/5415
18:42:25FromGitter<mratsim> and the caller with nimcall
18:43:06*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/YiyumGOiJJqBvudOrOhBjbkr >
18:43:40FromGitter<mratsim> thanks, let me see
18:45:41FromGitter<awr1> @Obround nim is statically checked and does not work like dynamic languages. if you want to have multiple paths in case of a variable existing/not existing, you need compile time constraints, i.e. `when declared` and `when declaredInScope`
18:51:39FromGitter<mratsim> @lqdev[m], somehow this works for me: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d3b4bbbf3e76e1327111af3]
18:52:13lqdev[m]yes, but as I said, parseParen throws an exception
18:52:15FromGitter<awr1> @Obround if you are just trying to make sure your code is "correct" when you run it and that you didn't misspell a variable name (or similar errors) - there is no need: the compiler will statically catch your mistake
18:52:29lqdev[m]when I remove the raise statement the error goes away
18:52:54FromGitter<awr1> e.g.
18:52:57FromGitter<awr1> !echo(x)
18:53:02FromGitter<awr1> whoops
18:53:05FromGitter<awr1> !eval echo(x)
18:53:07NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'x'
18:53:12FromGitter<mratsim> exception doesn't change anything
18:53:32*nsf joined #nim
18:59:04FromGitter<mratsim> what could help is tagging the proc like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d3b4d78ad9a483d8c46f9ea]
19:00:04lqdev[m]I already solved the issue by not using a table at all, but thanks anyway.
19:02:48*dgreen quit (Ping timeout: 244 seconds)
19:05:10FromGitter<mratsim> I think higher order function pragma inference is one of the most annoying thing in Nim.
19:12:44*absolutejam2 joined #nim
19:21:56*rockcavera quit (Remote host closed the connection)
19:34:26*absolutejam3 joined #nim
19:35:59*absolutejam2 quit (Ping timeout: 258 seconds)
19:39:21*absolutejam4 joined #nim
19:39:37*absolutejam3 quit (Ping timeout: 245 seconds)
19:41:14*krux02_ joined #nim
19:42:59*krux02 quit (Ping timeout: 250 seconds)
19:56:11shashlick@SolitudeSF - you here?
19:56:20solitudesfye
19:56:57shashlickhey am just looking at your nimble PR - nimble build uses compileOptions
19:57:07shashlickmaybe rename commandLineFlags to that?
19:57:48solitudesfwell, i cant reuse the name, its an object variant
19:58:18shashlickoh i see
19:58:33solitudesfthats why i went for installOptions
19:58:38solitudesfso its kinda the same but different
19:59:15shashlickmeh, then installOptions sounds better, sorry for the roundabout
19:59:34shashlickalmost seems like there should be a common flags field
19:59:48shashlickbut it won't be applicable to every kind
20:10:31*actuallybatman quit (Ping timeout: 246 seconds)
20:14:52shashlick@dom96 - https://github.com/nim-lang/nimble/pull/683
20:23:28*shashlick quit (Ping timeout: 246 seconds)
20:26:23*shashlick joined #nim
20:33:25*shashlick quit (Read error: Connection reset by peer)
20:34:53*shashlick joined #nim
20:36:19*actuallybatman joined #nim
20:36:57*Vladar quit (Remote host closed the connection)
20:40:46*absolutejam4 quit (Ping timeout: 258 seconds)
20:49:14*Cthalupa quit (Ping timeout: 244 seconds)
20:49:44*rockcavera joined #nim
20:50:09*Cthalupa joined #nim
20:52:56*Kaivo quit (Quit: WeeChat 2.5)
21:02:25*shomodj joined #nim
21:03:14*absolutejam4 joined #nim
21:10:07*nsf quit (Quit: WeeChat 2.4)
21:13:17*stefanos82 quit (Quit: Quitting for now...)
21:14:45*Kaivo joined #nim
21:17:53*Kaivo quit (Client Quit)
21:18:11*Kaivo joined #nim
21:19:37*Kaivo_ joined #nim
21:22:57*Kaivo quit (Ping timeout: 245 seconds)
21:23:47*Kaivo_ quit (Client Quit)
21:24:03*Kaivo joined #nim
21:29:59dom96Why must people write new async frameworks? Why can't they write more web frameworks?
21:31:23*lmariscal quit (Quit: I'm out!)
21:31:54*lmariscal joined #nim
21:32:00FromGitter<awr1> lol whoops
21:32:09FromGitter<awr1> i need to add emacs autosave files to my global gitignore
21:33:20FromGitter<mratsim> @dom96, we wanted to use asyncdispatch in production but encountered showstopper bugs.
21:34:21dom96mratsim: Showstopper bugs that couldn't be fixed in upstream?
21:37:25FromGitter<mratsim> I can't say about that, most were probably fixable in the core lib, but it's also a question of time-to-market, we have aggressive deadlines and async processing is a core part of our need
21:37:51FromGitter<mratsim> For core stuff we need to be able to advance without waiting for upstream
21:39:52dom96Yes, I've heard this before. I'm still skeptical whether you really needed to break the API to move fast
21:39:55*lmariscal quit (Quit: I'm out!)
21:40:28*lmariscal joined #nim
21:47:23Zevvhow big is this breakage?
21:48:08FromGitter<mratsim> They are detailed in the readme: https://github.com/status-im/nim-chronos#core-differences-between-the-standard-library-asyncdispatch-and-chronos
21:48:33Zevvah ok, I know that one
21:49:22dom96Honestly, I know cheatfate hates me, but it's really not cool to be spreading FUD about asyncdispach
21:49:58FromGitter<awr1> idk why `--styleCheck:hint` is not working properly, i've had to depend on the CI in a stupid manner to catch my errors in this PR
21:52:03Zevvdom96, I don't know anything abount the background, and I don't think I want to know, but it is such a shame that the nim stdlib can not benefit from all this work done on chronos - it is not a matter of preferences, simply a matter of more time and effort beging put in chronos at this time. Would it not be possible to get the best of both? If we..
21:52:19FromGitter<awr1> unless i'm using the wrong flag for checking for case incorrectness
21:52:36FromGitter<mratsim> I don't think he hates you. It's probably more related about frustration with all the bugs he raised in the past.
21:52:40ZevvIf we identify the API differences, we might be able to plug chronos into the stdlib and make minimal changes or add a layer to keep it stdlib compatible
21:52:53FromGitter<mratsim> and He didn't stop raising bugs to core asyncdispatch after starting chronos
21:54:11Zevvthe community could then keep chronos as an upstream and merge fixes and whatever, and take care to maintain compatibility where needed.
21:54:57dom96yeah, that might work, it would probably be just as much work as simply going through the additions/fixes in chronos and porting them over though
21:55:47*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:56:33*Kaivo quit (Quit: WeeChat 2.5)
21:56:44FromGitter<mratsim> What do you mean by "plug chronos into the stdlib"?
21:56:57FromGitter<mratsim> use a fixed version of chronos in the stdlib?
21:57:47Zevvwell "fixed", nim stdlib could just pull and merge from upstream to keep up to date
21:58:06FromGitter<mratsim> like a git submodule?
21:58:53Zevvthat's just the implementation, I don't know nor care - it's about having a solid async lib that is actively maintained with more manpower then people can volunteer in their free time
21:59:31ZevvAre the API differences mutually exclusive? Would it be possible to offer both stdlib and chronos API on top of the same lib?
21:59:35FromGitter<mratsim> that's an interesting solution, this might be also interesting for other libraries like bigint, crypto
22:00:43Zevvand then again and again there is of course the discussion what is at all to be *in* the stdlib. The compiler does not do async stuff, so async could just be dropped from stdlib
22:01:26FromGitter<mratsim> I don't think a stdlib should be defined by what is needed by a compiler
22:01:36Zevvother discussion, sorry
22:01:52Zevvthat's a different discussion, I mean
22:01:55FromGitter<mratsim> I think it should at the minimum be about OS abstraction and setting a standard API
22:02:22FromGitter<mratsim> but then i don't kow the limit
22:03:02Zevvright. and I really understand dom's point that a API split is really not nice - but Nimm is still pre 1.0, so when is a better time to change API's then now?
22:03:34dom96It's too late by now
22:04:13dom96Even if we were at 0.5 we would still have the problem that there is a lot of code out there that relies on the current API
22:05:09Zevvright, thus my question above: how different are the API's, and would it be possible to provide a glue layer?
22:07:20dom96Unrecognizably different from what I can tell: https://github.com/status-im/nim-chronos/blob/master/tests/testserver.nim
22:09:42Zevvyeah, man, this is hard stuff - there just is no right answer
22:09:56disrupteklet the market decide.
22:10:15dom96I agree, no solution is perfect, but surely there is a "best" decision
22:10:50dom96disruptek, because that works so well for society? :P
22:10:59FromGitter<Riderfighter> Hello party people
22:11:08FromGitter<Riderfighter> What are we discussing this fine day/night
22:11:22Zevvalso - personal preference - one of the 'bad' sides of chronos is this generic pointer passing - *poof* there goes your 'safe language' marketing argument
22:11:43dom96Zevv, link? 0_o
22:12:27dom96Riderfighter: what to do with regards to Chronos and asyncdispatch
22:12:36dom96hm, maybe I should stream tomorrow some async dev
22:12:47Zevvjust the chronos readme: To resolve this issue, we have introduced a unified callback type, CallbackFunc CallbackFunc* = proc (arg: pointer = nil) {.gcsafe.}
22:13:19FromGitter<Riderfighter> dom96: Isn't chronos the revamped version of asyncdispatch?
22:13:30ZevvRiderfighter: right
22:13:38*Kaivo joined #nim
22:14:01Zevvthe problem is that their revamping resulted in something that might be good
22:14:06FromGitter<mratsim> Concepts would help ... in my task system tryout, I'm having trouble because my Scheduler is specialized over T, so I will have one scheduler per type which is bad. Nim's FlowVar avoid that by using inheritance from a non-generic. But I don't want to involve the GC in threads if I can avoid it
22:14:12dom96yeah, by the way, that "callbacks issue" is made out to be far more horrible than it really is
22:14:31Zevvyeah, I don't see why that was a problem anyhow.
22:14:45Zevvyour callbacks should just take what is needed, why should there be only one type?
22:15:03dom96mratsim: I've tried concepts recently and couldn't get basic examples to work :/
22:15:14dom96It's also just far more complicated than it needs to be
22:15:19FromGitter<mratsim> well here I'm talking more about VTables
22:15:24dom96I want to be able to write a list of proc signatures
22:16:12dom96Zevv, I also don't see why the order of how Future[T] callbacks are scheduled matters
22:16:17FromGitter<mratsim> if you could hold several types implementing the same concept in the same seq that would help a lot as you wouldn't need to cast all your prof to pointer, all your callbacks to pointer or whatever else
22:17:01Zevvdom96: I guess that's just the "least surprise" principle. *If* order ever matters, you would expect stuff to be handled in the order you did the setup in
22:17:14dom96mratsim: yes, that would be handy. For this case though, multiple callback types are fine
22:17:57dom96Zevv, meh, I suppose. I never actually add more than one callback (my implementation allowed just one and things were fine :P)
22:18:05dom96Also, this isn't even an issue in asyncdispatch anymore https://github.com/nim-lang/Nim/issues/7197
22:18:41Zevvright
22:18:48Zevvlong ago fixed even
22:19:03dom96in fact, only one issue listed in that readme is open
22:19:23Zevvyou do have a point there
22:19:54dom96This is why I get so frustrated when things like this are posted: https://forum.nim-lang.org/t/5048#31685
22:20:39ZevvI hear you
22:21:05dom96Zevv, Thank you for being so understanding
22:21:45ZevvI guess my biggest pro-chronos argument is that it is a version 2 made *by the original author* who had new insights on how to improve things. This was not a fork in anger by someone else, it is cheatfate understanding that his past decisions are causing limitatins.
22:22:06ZevvI have done this in the past a few times, and usually for good reasons also.
22:22:32disruptekthere is a hole in the language that concepts could fill.
22:22:43disruptekasyncdispatch is damned near trivial, imo.
22:22:45Zevvbut the FUD is not helping, that is true
22:22:45dom96But... I created asyncdispatch, or am I misunderstanding what you mean
22:23:58disruptekmy issue with std/async is with the exception handling...
22:24:06Zevvoh - wait, I should do a better inspection of the git logs then - I saw *tons* of cheatfate in the blames the other day when doing the ioselectors stuff, so I got that wrong .Sorry for that!
22:25:03Zevvaw man :/
22:25:11ZevvI didn't know
22:25:25dom96cheatfate did contribute a lot
22:25:30shashlick@dom96 - don't want to distract but was looking at the nimble PR
22:25:48dom96but a lot of the blames being assigned to him are likely because of the ioselectors split that was done
22:25:50dom96in https://github.com/nim-lang/Nim/pull/6585
22:26:05Zevvah right, that explains
22:26:05FromGitter<Riderfighter> sorry if this may be a bit blunt but I can't exactly understand the point of making another async lib if the standard lib already has one, couldn't someone just pull request their edits?
22:26:27Zevvand the async stuff is still mostly yours in the blame, true
22:26:50shashlick@dom96 - getRevDeps() returns a seq of PkgTuple - any reason why it doesn't return a seq of PackageInfo
22:27:14dom96Riderfighter: hehe, I know, right? :)
22:27:22dom96Riderfighter: in all seriousness, here is the reasoning: https://irclogs.nim-lang.org/26-07-2019.html#21:37:25
22:27:42FromGitter<Riderfighter> thank you for the link, I'm missing context to this conversation haha
22:27:48*a_b_m joined #nim
22:28:21FromGitter<Riderfighter> ah makes sense
22:28:23disruptekthat log/link widget is nicely designed.
22:28:38FromGitter<Riderfighter> ^
22:28:58FromGitter<Riderfighter> the nim site has so many subdomains its actually mind boggling for me haha
22:29:15dom96disruptek, the timestamps were contributed by ... @ddmgy https://github.com/nim-lang/nimbot/pull/10. Props to them!
22:30:06*tefter joined #nim
22:30:12dom96btw I need an excuse to rebuild NimBot, so please make some PRs there. Make NimBot learn from IRC logs or something :)
22:30:27dom96Pretty sure we've had the same binary build of NimBot running for like 4 years now
22:30:39disrupteksounds like it doesn't need an update.
22:30:58*abm quit (Ping timeout: 248 seconds)
22:31:32FromGitter<Riderfighter> oh wow 4 years?
22:31:41dom96probably exaggerating slightly lol
22:31:44dom96but at least 2
22:31:49FromGitter<Riderfighter> haha
22:33:57disrupteki really like my lil irc bot, but it does make me spend too much time shooting the shit on irc.
22:34:08disruptekcute, though.
22:34:33dom96I do wonder how well NimBot could answer questions if we did some ML magic on the IRC logs
22:34:40FromGitter<Varriount> zacharycarter: Yes, I found out a way. I don't recall how I did it though
22:35:07disruptekwhat would be useful is a !grep we could use to pull out the most relevant 3-4 lines from logs.
22:35:23disruptek(with links to the logs, etc.)
22:35:25dom96disruptek, agreed. Implement it ;)
22:35:48disruptekhey, i didn't say it was more useful than what i'm working on. ;-)
22:35:48FromGitter<Riderfighter> this is completely unrelated to nim, but I managed to use 100Gigs of my 100Gig cellular plan and my provider downgraded my speed to a mere 200kilobits download
22:36:15disruptek100g cell or sat?
22:36:26FromGitter<Riderfighter> Cell
22:36:52Zevv200k should be enough for everyone.
22:37:11dom96-- Bill Gates
22:37:37disrupteki lived 10,000' up on a mountaintop in colorado and was limited to sat, no cell. annoying.
22:37:41FromGitter<Riderfighter> you'd think that 200kilobits would be fast but my slack/discord wont even connect anymore
22:37:52Zevvslack is so braindead
22:37:58dom96Riderfighter: This is why you should switch to IRC, clearly superior
22:38:05FromGitter<Riderfighter> i honestly might
22:38:27FromGitter<Riderfighter> Zevv: I must use slack for a hackathon I'm helping organize
22:38:42Zevvyeah, one of my customers uses it, but I loathe it
22:39:02FromGitter<Riderfighter> apparently they revamped the mac app to load faster
22:39:06FromGitter<mratsim> Mmmh I don't know if it's nimsuggest or VScode but I think I'm gonna have to go back on sublime text during the summer. Too much heat to deal with CPU going crazy
22:39:10FromGitter<Riderfighter> but I don't believe it
22:39:15Zevvit takes ages to load, it is utterly confused when I resume my laptop at another network, and I cant use my own tooling on the logs
22:39:23FromGitter<Riderfighter> @mratsim probably vscode
22:39:46dom96mratsim: just write a script that keeps running `killall nimsuggest`
22:39:57disruptekwhat slack's good for is integration, but beyond that, screw it.
22:40:08FromGitter<Riderfighter> trueee
22:40:15FromGitter<mratsim> I tried disabling the nim extension and still see crazy spike while typing code
22:40:21FromGitter<Riderfighter> killall vscode
22:40:40disruptekthere's your problem right there: only chumps type code.
22:40:52disruptekdictation is where it's at.
22:40:53FromGitter<mratsim> others copy paste?
22:40:54FromGitter<Riderfighter> speech to text is the best way to code
22:40:57disruptekit's 2019 ffs.
22:41:06FromGitter<Riderfighter> live as if you were in 2020
22:41:07Zevvbut hey, I'm just still living in the 90's. I drive a '95 Volvo 940, do my editing in Vi, chat on IRC and play music from CD
22:41:09FromGitter<Riderfighter> speech to text smh
22:41:32dom96I've been wondering how good eye-tracking tech is nowadays
22:41:41dom96Whether it could be used for efficient typing
22:41:46FromGitter<Riderfighter> hahah
22:41:59FromGitter<Riderfighter> eye-tracking is pretty impressive atm
22:42:10FromGitter<Riderfighter> you could definitely set up an eye based keyboard
22:42:57*solitudesf quit (Ping timeout: 245 seconds)
22:43:35dom96It's in my huge list of projects :)
22:43:45FromGitter<Riderfighter> omg that's awesome
22:43:51shashlick@dom96 - http://ix.io/1PEi
22:43:54shashlicklooks okay?
22:44:43disruptekhead-tracking is excellent these days, but i'm not sure how hard it'd be for us to integrate it. i could definitely make it work with my compositor code i wrote today, if i could get interop working.
22:44:52disrupteknot sure i want to wear a hat all day, though.
22:44:57Zevvwell, temperatures dropped below 25C, time to do some sleeping. dom96: sorry for the confusion earlier
22:45:07dom96shashlick, getRevDeps returns PkgTuples because it can contains a version range, PackageInfo is a specific package version
22:45:18dom96Zevv, no worries. Have a nice night!
22:45:19disrupteknite zevv
22:45:41FromGitter<Riderfighter> gn zevv
22:46:01shashlickBut revdeps are only used during uninstall and you need specific versions anyway
22:47:05FromGitter<Riderfighter> stupid question but does the sockets lib compile to nodejs?
22:47:21dom96shashlick, perhaps, but the rev deps file consists of a name + version range tuple. You can't represent that using PackageInfo
22:47:25FromGitter<Riderfighter> I have some high doubts about it doing that but nim surprises me everyday
22:47:33dom96Riderfighter: nope
22:47:48FromGitter<Riderfighter> alrighty thanks dom96 :)
22:47:54dom96But why would you want to use node? :P
22:48:09FromGitter<Riderfighter> karax + electron haha
22:48:18dom96shashlick, your hash function can probably work just as well with just the `mypath` since I'm assuming that's unique
22:48:20FromGitter<Riderfighter> the sockets was for something else I was planning
22:48:34dom96Riderfighter: does electron depend on node?
22:48:39FromGitter<mratsim> I think it's VSCode default "GPU Acceleration" that is causing issues and GPU<-> CPU transfers for no reason
22:48:45shashlickI agree
22:48:47FromGitter<Riderfighter> dom96: sadly yes :(
22:48:55dom96Riderfighter: huh, how come?
22:49:03FromGitter<Riderfighter> electron is a node framework
22:49:05shashlickBut pkgtuple isn't useful during removal
22:50:26FromGitter<Riderfighter> dom96: I'm trying to find a suitable html/js/css engine/thing to run my password manager and I was thinking of making a cool ui for some clientless bots and electron is looking pretty good due to nim allowing js stuff in the code :P
22:50:45dom96shashlick, maybe I decided to cover all bases and include as much info in there as possible. Maybe we will need the full version range in the future
22:51:15dom96Riderfighter: You should look into how hard it would be to create a Nim-based electron :D
22:51:37*krux02_ quit (Remote host closed the connection)
22:52:11FromGitter<Riderfighter> dom96: don't worry I already found an example which I can copy paste from github :D https://github.com/bluenote10/nim-electron-karax
22:52:27FromGitter<mratsim> no one wants to do a Sublime Text in Nim?
22:52:53FromGitter<Riderfighter> have you guys seen this site for nim documentation? https://devdocs.io/nim/
22:53:11FromGitter<Riderfighter> it has a darktheme lol
22:53:33dom96Riderfighter: That's cool, what would be even cooler is if there was no dependencies on node/npm ;P But I know, time consuming, I just want Nim to take over the world.
22:53:49dom96mratsim: I've tried, it's called Aporia :)
22:54:03FromGitter<mratsim> Does it still compile?
22:54:19FromGitter<Riderfighter> dom96: I mean if you wanna make a js/css/html engine that is standalone real quick I wouldn't mind
22:54:30dom96mratsim: doubt it.
22:54:41dom96mratsim: should be trivial to fix it though
22:56:12dom96Riderfighter: sure, you should be able to find the source code somewhere in here: https://libraryofbabel.info/ (or you would be if it supported all of ASCII...)
22:56:33*shomodj joined #nim
22:56:34FromGitter<Riderfighter> hahah
22:57:20shashlick@mratsim - feud
22:57:41shashlick@dom96 - okay so either i can update getRevDeps to return a HashSet[PackageInfo] or write a separate proc
22:57:44shashlickwhat do you prefer
22:58:01dom96separate proc please
22:58:02FromGitter<Riderfighter> I wish there were QT bindings :(
22:58:47shashlickgetAllRevDeps() returns a seq[PackageInfo]
22:58:57shashlickin either case, both are only used during removal
22:59:29dom96shashlick, you can change that one to return a HashSet
22:59:42shashlickbut that proc recurses to return all dependencies
22:59:52shashlickpart of the uninstall everything PR I wrote a while ago
23:00:50shashlickagain both are used in the same context so i don't see the purpose of seq[PkgTuple] which is only useful as an input from the nimble file
23:00:59*shomodj quit (Ping timeout: 244 seconds)
23:01:11shashlickanyway, you know better so i'll write a separate proc to convert seq[PkgTuple] into a HashSet[PackageInfo]
23:01:34dom96yeah, let's do that for now and then we can think about removing the seq[PkgTuple] variant
23:01:41dom96Once we have more test coverage this should be easier
23:02:22shashlickokay can I rename that proc then? cause it is returning ranges
23:03:16shashlickthen we can have getRevDepTups() which is the rename, getAllRevDeps() and getRevDeps() both which return HashSet[PackageInfo]
23:03:53shashlickboth call getRevDevTups() internally
23:03:58FromGitter<Riderfighter> omv
23:03:59FromGitter<Riderfighter> om
23:04:03FromGitter<Riderfighter> crap
23:04:06FromGitter<Riderfighter> sorry for the spam
23:04:23FromGitter<Riderfighter> I was going to say "omg" to finding this https://bitbucket.org/chromiumembedded/cef
23:04:57*tefter quit (Remote host closed the connection)
23:05:27dom96shashlick, sure
23:05:33FromGitter<Riderfighter> time to make bindings amirite guys
23:05:55FromGitter<Riderfighter> but I'll attempt to do that tomorrow after I sleep on this idea
23:06:07FromGitter<Riderfighter> Thank you everyone for all the help you have given!
23:06:20FromGitter<Riderfighter> Enjoy the rest of your day/night :)
23:06:37disrupteknight 'fighter
23:09:12*actuallybatman quit (Ping timeout: 245 seconds)
23:09:52*cornfeedhobo quit (Remote host closed the connection)
23:12:37*cornfeedhobo joined #nim
23:13:23*tefter joined #nim
23:20:28*absolutejam4 quit (Ping timeout: 245 seconds)
23:20:48*gangstacat quit (Quit: Ĝis!)
23:36:49dom96mratsim: Any ideas about this? https://github.com/status-im/nim-metrics
23:38:18FromGitter<kayabaNerve> Slack < IRC
23:38:44dom96Has this also been reinvented because Status needs to move fast? I've implemented this here https://github.com/dom96/prometheus/
23:38:46FromGitter<kayabaNerve> I prefer discord over IRC but I won't say discord is better
23:39:18FromGitter<kayabaNerve> WebView > CEF > Electron > React
23:40:06FromGitter<kayabaNerve> And WebView is dead while using MSHTML which is IE/Edge
23:44:13FromGitter<awr1> is @kaushalmodi in here
23:44:55FromGitter<awr1> trying to find your notes page, i have a friend that might be interested in nim that it would be helpful for
23:45:43disruptekhttp://scripter.co/
23:46:27FromGitter<awr1> thanks
23:48:58FromGitter<kaushalmodi> Thanks for sharing :)
23:49:16FromGitter<kaushalmodi> @Riderfighter yep, I use devdocs
23:49:46FromGitter<kaushalmodi> https://scripter.co/accessing-devdocs-from-emacs/
23:53:32shashlickdevdocs is out of date and doesn't link the source
23:53:34shashlickelse i'd use it
23:53:51disruptekis there no way to have a variant object wherein two variants share the same variant fields?
23:55:37FromGitter<awr1> i wish i could get docs from emacs without having to dedicate a whole pane/half of my screen