<< 07-05-2020 >>

00:18:06*avatarfighter joined #nim
00:27:10leorizePrestige: doesn't most C proc that write into a buffer gives you the amount it wrote afterwards?
00:27:43*Trustable quit (Remote host closed the connection)
00:50:20*fredrikhr quit (Ping timeout: 256 seconds)
00:51:00*ryan_ joined #nim
00:53:10*tjiblet_thebless quit (Ping timeout: 246 seconds)
01:01:19*ryan_ is now known as tangangle
01:04:00FromGitter<awr1> some do
01:04:07FromGitter<awr1> seems that Xlib just returns a status
01:04:55FromGitter<awr1> the issue is that a /0 gets put in the middle of the string
01:05:21FromGitter<awr1> thus it needs to be resized to a smaller extent
01:06:10FromGitter<awr1> `cstring.len` finds the nullchar
01:15:55*dddddd quit (Remote host closed the connection)
01:22:51disrupteki thought we solved this problem a few days ago.
01:25:01disruptekgood evening, peeps.
01:26:55Prestigeo/
01:45:07*chemist69 quit (Ping timeout: 272 seconds)
01:46:49*chemist69 joined #nim
02:03:36dadadaNim provides a OS independend method to get the config dir, getConfigDir
02:04:06dadadabut for application data there isn't an analog proc
02:04:07FromDiscord<Rika> who are you answering
02:04:15dadadaI'm observing
02:04:38dadadaI'd like to get $HOME/.local/share/ OS independently....
02:05:36*theelous3 quit (Read error: Connection reset by peer)
02:05:41FromDiscord<Rika> theres no counterpart for that in windows i dont think
02:06:21dadadaRika, not a regular Windows user here, but I think I've seen something like user specific application data folders
02:06:44FromDiscord<Rika> AppData/Roaming?
02:06:49FromDiscord<Rika> thats gotten with getConfigDir
02:09:26dadadawell... I really don't care if Windows has a sane directory structure, but I do care about keeping my Linux environment strange, and if there was a getApplicationContentDir(), even if it would simply return the same as getConfigDir() for Windows, it would make the whole thing more streamlined, when having to think about cross-platform
02:09:37dadadas/strange/straight
02:09:39dadadalol
02:09:44FromDiscord<Rika> in windows theres no distinction for config file and data file storage, but afaik usually you put config in USERPROFILE/AppData/Roaming
02:09:45dadadait's always strange I gotta admit
02:09:49FromDiscord<Rika> USERPROFILE is an env
02:10:05FromDiscord<Rika> and regular data (non portable data) in AppData/Local
02:10:32dadadawell, so there is a distinction
02:10:37FromDiscord<Rika> you can always create a new proc with the data i now told you
02:10:39FromDiscord<Rika> not exactly
02:10:48FromDiscord<Rika> portable data (not only config) can go in Roaming
02:11:07FromDiscord<Rika> anything that doesnt make sense moving goes into Local
02:11:34FromDiscord<Rika> like some sort of large cache or something, though that goes elsewhere (i dont have a good example basically)
02:12:23dadadalucky that less than 2% worldwide uses Windows
02:12:53dadadaoh wait, I live in a dreamworld, ...
02:13:16FromDiscord<Never Listen To Beef> lol
02:13:26FromDiscord<Never Listen To Beef> Hey linux went up a bit over the past bit
02:13:52FromDiscord<Never Listen To Beef> Sooo close to 1% of steam users!
02:14:31dadadayou actually have to care about idiosyncracies of Windows, just because so many people use it...
02:14:58dadadaNever Listen To Beef: it's probably a little higher when you account for Wine being confused with Windows
02:15:15FromDiscord<Never Listen To Beef> Wut?
02:15:24dadadamaybe 1.2% :-)
02:15:31FromDiscord<Never Listen To Beef> Steam stats is from hardware surveys and with steam play nobody is using steam through wine that often
02:16:11dadadathere are even people using virtualization to play Windows games on Linux, so they technically use both
02:16:18dadadaGPU pass through
02:17:13FromDiscord<Never Listen To Beef> Yea i know that
02:17:33FromDiscord<Never Listen To Beef> but the wine thing isnt really a thing with steam proton anymore, except a few cases of games
02:18:23dadadaI wont go into a discussion of steam proton being a beefed up (get the pun?) wine
02:18:49FromDiscord<Never Listen To Beef> Well the thing is though you arent running steam through wine, so steam runs natively, which is why i said that isnt an issue as much
02:19:06FromDiscord<Never Listen To Beef> The virtualization is an issue for accuracy though
02:19:44leorizeif they use virtualization to use steam, just count them in as a windows user
02:19:56dadadadon't forget people dual booting into Windows for playing games, this changes stats definitely
02:20:02*Jjp137 quit (Read error: No route to host)
02:20:07*muffindrake quit (Ping timeout: 240 seconds)
02:20:14FromDiscord<Never Listen To Beef> Im certainly not, it also matters who steam asks for a survey
02:20:21FromDiscord<Never Listen To Beef> And when
02:20:30FromDiscord<Never Listen To Beef> It's a large iffy data noise
02:20:38dadadaleorize: accepted, but if they're using Linux for 50% or more of everything else, they're at least a 50:50 user, and not a 100% Windows user
02:21:47leorizesteam data is correct only when you use it to account for steam users
02:21:59leorizedon't try to extrapolate the amount of linux users from steam lol
02:22:15FromDiscord<Never Listen To Beef> Hey im a gamer/gamedev it's the only base that matters 😛
02:22:37*muffindrake joined #nim
02:23:14leorizebe a real dev and release a linux version
02:23:20leorize:P
02:24:20dadadaI second that
02:24:37FromDiscord<Never Listen To Beef> I uh, always do release a linux version for anything i make
02:24:50dadada:P fine
02:24:56FromDiscord<Never Listen To Beef> 100% of my gamejam games have linux versions
02:25:01FromDiscord<Never Listen To Beef> So fight me!
02:25:17dadadaokay, enough ranting, I'
02:25:24dadadave some work to do
02:27:30*Jjp137 joined #nim
02:34:51skrylar[m]heh. must be fun to do things other than shave yaks :B
02:35:25FromDiscord<Never Listen To Beef> So uh @clyybber gary's got me testing his vulkan project and on build with linux i get these nice issues
02:35:26FromDiscord<Never Listen To Beef> https://hatebin.com/tzsjbrfuiq
02:35:36FromDiscord<Never Listen To Beef> No one said im an employed gamedev 😄
02:36:55FromDiscord<Never Listen To Beef> I do have libvulkan.so.1 and also have modern vulkan drivers
02:45:25leorizeyou have them
02:45:29leorizeyou just didn't link to them
02:46:18FromDiscord<Never Listen To Beef> I mean it should link, i did ` {.link: "/usr/lib/x86_64-linux-gnu/libvulkan.so.1".}`
02:46:32leorizeyea that's why it didn't link
02:46:55leorizedo this instead `{.link: "-lvulkan".}`
02:47:06leorizeor `{.passL: "-lvulkan".}`
02:47:09leorizetry both and see what works
02:47:56FromDiscord<Never Listen To Beef> Latter worked
02:48:15leorizetechnically you'd have to use `{.passL: staticExec("pkg-config --libs vulkan").}`
02:48:24leorizebut "-lvulkan" should work for most system
02:48:38leorizeuse the above if you want cross-distro compatibility
02:48:47skrylar[m]this potato only runs gl 2.1 :X
02:48:50leorize(though the only distro this would add support for is NixOS)
02:49:15FromDiscord<Never Listen To Beef> Nah gotta support the only good gaming distro Ubuntu
02:49:17FromDiscord<Never Listen To Beef> 😛
02:49:56skrylar[m]shuttleworth is too cozy with MS these days for my taste
02:50:50FromDiscord<Never Listen To Beef> If i werent using a ubuntu derived i'd probably use debian, cause im too silly
02:56:00FromDiscord<Rika> i was thinking of trying out nixos
02:59:31skrylar[m]its painful for a desktop
03:09:45disrupteki thought you just use it for your dev env.
03:10:50Prestige@Elegant Beef I have no idea why ff won't fullscreen in our WMs, spent about 5 hours today trying to figure out why
03:11:11PrestigeGoing to try digging through ff's source code
03:11:20*Romanson joined #nim
03:11:41disruptekthe bot crashed because it opened too many files.
03:11:51FromDiscord<Rika> nice
03:12:06FromDiscord<Rika> skrylar: theres a reason i never went past thinking about it
03:12:24disruptekrika: chickened out?
03:12:36FromDiscord<Rika> ya damn troll lmao
03:30:08*thomasross quit (Ping timeout: 256 seconds)
03:46:17*rockcavera quit (Remote host closed the connection)
04:03:55zacharyc1rterooph someone at work just said JSON returned from curl was not human readable
04:05:59zacharyc1rterI wonder what they think when they open a binary in a text editor
04:06:02*supakeen quit (Quit: WeeChat 1.9.1)
04:06:46*supakeen joined #nim
04:07:32nisstyrepipe it to jq
04:08:27*avatarfighter quit (Ping timeout: 240 seconds)
04:08:37zacharyc1rterno I realize that
04:09:01zacharyc1rterbut json is definitely human readable
04:09:41zacharyc1rterjq just pretty prints it
04:10:03nisstyreit depends on your definition of human readable
04:10:16zacharyc1rterthe definition is that a human can read it lol
04:10:28nisstyreok I can read a hex dump from wireshark
04:10:34nisstyredoes that make it "human readable" ?
04:10:50zacharyc1rteryes
04:10:54nisstyreok fair enough then
04:12:40FromGitter<awr1> https://github.com/ebran/grim this is really interesting, it reminds me of DOT
04:14:30zacharyc1rterlooks neat
04:17:17FromDiscord<Never Listen To Beef> Everything is human readable assuming the human is smart enough
04:19:06zacharyc1rterI mean true but I just mean representations that don't require the assistance of tooling to interpret
04:19:36zacharyc1rterand json, when it's not pretty printed, is certainly decipherable
04:39:57*avatarfighter joined #nim
05:12:29*narimiran joined #nim
05:17:52FromGitter<bung87> anyone intersted ? https://github.com/bung87/ts2nim/blob/master/__tests__/compiler-spec.ts
05:18:10FromGitter<bung87> typescript to nim transpiler
05:22:16FromDiscord<Rika> ooo
05:23:06FromDiscord<Rika> bung87 make /** comments into ## comments, perhaps?
05:24:05FromGitter<bung87> yeah ,that's right, checked std comment style just now
05:24:14FromDiscord<Rika> also why are `number`s `int`s? there arent any int types in js
05:28:13FromGitter<bung87> js internal number is int64
05:29:06FromDiscord<Rika> well it literally says here https://www.typescriptlang.org/docs/handbook/basic-types.html#number
05:29:09FromDiscord<Rika> that theyre all floats
05:31:08FromDiscord<Rika> bung87: more issues, ## is not multiline comment, it is for documentation comment, just like /** (double asterisk) js comment
05:31:09FromGitter<bung87> ok, that's a plobem, I thought int is more common for practice.
05:31:19FromDiscord<Rika> so no matter if they are multiline or single line, theyre still ##s
05:31:34*zacharyc1rter quit (Ping timeout: 240 seconds)
05:32:14*zacharycarter quit (Ping timeout: 240 seconds)
05:32:43FromGitter<bung87> thanks , change it then
05:33:09FromDiscord<Rika> i dont know any typescript but i can fix the test
05:33:45FromGitter<bung87> I'll fix current problem you reported
05:34:38FromDiscord<Rika> i wish i could help XD but its in typescript not nim so i really cannot
05:36:11FromGitter<bung87> I just thought someone has compiler experience could help me design the code pattern, make it more maintainable,
05:36:47FromDiscord<Rika> i dont have that either, sorry 😦
05:37:37FromDiscord<Rika> anyone know if theres a code quality service that supports nim?
05:37:39*waleee-cl quit (Quit: Connection closed for inactivity)
05:39:01FromGitter<bung87> that's fine ,any other help also welcome.
05:40:14*dadada quit (Ping timeout: 240 seconds)
05:42:33*dadada joined #nim
05:42:56*dadada is now known as Guest82746
05:58:17*silvernode joined #nim
06:01:02silvernodeI can't figure out why I am not getting any output on line 24 https://play.nim-lang.org/#ix=2l6S
06:01:41silvernodeI'm basically just playing with objects and passing data around
06:02:37FromDiscord<Rika> because x and y are 0?
06:02:57FromDiscord<Rika> changing them to 1 gives a seq seq int w/ 0
06:03:26silvernodeI thought that might be it, but I thought it would still print 0
06:03:32FromDiscord<Rika> why would it?
06:03:43FromDiscord<Rika> it makes 0 seqs with 0 0-values in it
06:04:08FromDiscord<Rika> x = 0, 0 seqs in the seq
06:04:17FromDiscord<Rika> y = 0, 0 0-values inside the nested seq
06:06:07silvernodeAh, I thought I was just creating seqs with some numbers in it. Previously I used newSeqWith with an iterator and it worked fine. I guess I don't know what newSeqWith actually does
06:06:20*zacharycarter joined #nim
06:06:21*zacharyc1rter joined #nim
06:06:22*Guest82746 quit (Ping timeout: 260 seconds)
06:07:17FromDiscord<Rika> newSeqWith(n, things)
06:07:17FromDiscord<Rika> it creates a new seq with n things in it
06:08:04FromDiscord<Rika> newSeq[type](n)
06:08:04FromDiscord<Rika> it creates a new seq with n of type (uses default values)
06:08:24FromDiscord<Rika> so basically newSeq[int](20) == newSeqWith(20, default(int))
06:10:34*zacharyc1rter quit (Ping timeout: 240 seconds)
06:10:34*zacharycarter quit (Ping timeout: 240 seconds)
06:10:57silvernodeI see now, hmm, all I want to do is set some values for the x and y in a grid layout by using some seqs and custom types. I think I need to do it a different way
06:12:39*dadada__ joined #nim
06:13:08*solitudesf joined #nim
06:13:47silvernodeI need to not use the position coordinates as the basis for the seq creation. I need to create the seqs before hand and then populate them with data.
06:14:15FromDiscord<Rika> if the array isnt sparse it would just be better to have an array of positions
06:14:22FromDiscord<Rika> i mean if it ***is*** sparse
06:15:02FromDiscord<Rika> because if you have a 100x100 grid with just 4 or 10 entities then that's a lot of 0'd out memory for so little entities
06:16:10silvernodeI can't change arrays in Nim though, correct?
06:16:58FromDiscord<Rika> i mean, array in terms of general terminology
06:17:08FromDiscord<Rika> you cant change the size of an array but you can change the contents
06:18:20silvernodeah ok
06:18:20silvernodeSo for a grid I would want an array inside of an array
06:18:42FromDiscord<Rika> okay lets go back to nim terminology now
06:18:58FromDiscord<Rika> so if your grid has many entities maybe a seq in a seq is better
06:19:05FromDiscord<Rika> many meaning like half the thing is filled
06:19:13FromDiscord<Rika> (also know that im no game programmer)
06:19:38FromDiscord<Rika> but if it's just a few entities like let's say 30 entities
06:19:48FromDiscord<Rika> then a single seq storing positions should be fine, no?
06:20:26FromDiscord<Rika> also your choice if you want SoA or AoS, but SoA is much harder to use
06:20:28FromDiscord<Rika> https://en.wikipedia.org/wiki/AoS_and_SoA
06:20:47FromDiscord<Never Listen To Beef> I typically use 1D arrays regardless
06:20:47FromDiscord<Rika> (though this might be overwhelming, since this is only a console game, no?)
06:20:58FromDiscord<Rika> ah yeah, forgot that
06:21:20FromDiscord<Rika> if your field is square just store the length of one row and modulo the index
06:21:23FromDiscord<Rika> to get the column
06:21:31FromDiscord<Never Listen To Beef> You can map n dimensiona arrays into a single dimension array
06:21:42FromDiscord<Rika> yeah yeah yeah totally forgot about that
06:23:01FromDiscord<Never Listen To Beef> I was actually thinking about a 2D/3D array module that did that but i feel like it'd be sorta silly
06:23:11*sz0 quit (Quit: Connection closed for inactivity)
06:23:25FromDiscord<Rika> there probably are
06:27:22*avatarfighter quit (Ping timeout: 260 seconds)
06:33:58silvernodeWell the new design I want to have is basically tiles in a grid and tiles can have events and other data. So when you land on a tile, things can happen to the player
06:36:07*dadada__ quit (Ping timeout: 260 seconds)
06:41:37silvernodeMy boss came up to my car and started talking my head off, so now I am reading all the messages here.
06:42:33*dadada joined #nim
06:42:56*dadada is now known as Guest83905
06:44:48*zacharyc1rter joined #nim
06:44:48*zacharycarter joined #nim
06:45:03silvernodeSo it seems like I would want to use AoS since it is generally more intuitive and supported by most languages according to Wikipedia
06:47:14*PMunch joined #nim
06:49:00FromDiscord<Rika> thats a big oof
06:49:07*zacharyc1rter quit (Ping timeout: 246 seconds)
06:49:07*zacharycarter quit (Ping timeout: 246 seconds)
06:51:51silvernodeI wish I didn' have to work today. Time to clock in now, have a good day everyone.
06:52:06FromDiscord<Rika> see you
06:53:52PMunchHmm, how technically difficult would it be to make macros/templates be able to accept branches? I know we can use `do` but they can really make stuff hard to read. E.g. I have a "withCustomOpts" macros in my code, it checks some structure if we have custom options, and if they match what we expect, it then injects a variable that is cast to the correct type from the data. Simple stuff. But I also have an `else` part which is if we don't have any
06:53:52PMunchcustom options. But `withCustomOpts: <if we have custom opts> do: <if we don't have custom opts>` reads really weird..
06:54:22PMunchAllowing withCustomOpts to have an `else` clause would be amazing
06:54:23FromDiscord<Rika> "branches"?
06:54:47FromDiscord<Rika> oh
06:54:48PMunchOf course as an extension it would be even better if it could take elif and of branches as well..
06:55:07FromDiscord<Rika> ***its boring dsl time***
06:55:30PMunchYeah, DSLs could solve this, but then everything would be in a block
06:55:44FromDiscord<Rika> block? not really no?
06:55:55PMunchYes?
06:56:09FromDiscord<Rika> anything within the "macro block" can either resolve into the block the macro is in or you can add the block yourself
06:56:11FromDiscord<Rika> right?
06:56:17PMunchLike you would need something that took all the code `else` branch included
06:56:32FromDiscord<Rika> ah thats what you mean, well yes
06:56:37*silvernode quit (Ping timeout: 256 seconds)
06:56:38PMunchYes
06:56:47FromDiscord<Rika> a visual block is what you mean
06:56:51PMunchYes
06:56:59FromDiscord<Rika> i dont see the issue but thats my opinioon
06:57:27PMunchLike you would need one macro customOpts: <DSL code>
06:57:39FromDiscord<Rika> mm
06:57:53PMunchWhere <DSL code> could be something like if hasCustomOpts: <something> else: <something else>
06:58:03PMunchWhich might be fine for this case
06:58:22PMunchBut I've definitely missed this in the past..
06:58:38PMunchAnd I don't like to wrap everything in DSLs..
06:58:53*idf joined #nim
06:59:20skrylar[m]well its nothing special, but logs. https://git.sr.ht/~skrylar/sklog
07:03:34PMunchHmm, that seems cool
07:04:01PMunchHow would you say it compares to e.g. chronicles?
07:04:09*Senketsu joined #nim
07:05:38skrylar[m]never heard of
07:05:56PMunchhttps://github.com/status-im/nim-chronicles
07:06:16*Guest83905 quit (Ping timeout: 246 seconds)
07:06:19*sz0 joined #nim
07:10:37PMunchOh damn, kodkuce, I didn't mean to not respond to you yesterday. I was hopping back and forth between VPNs and for me it looks like I typed repiles to you :(
07:12:34*dadada joined #nim
07:12:57*dadada is now known as Guest30659
07:13:05PrestigePMunch: How familiar are you with xlib? Running into some weird issues with my wm, think it's related to propertynotify events. Trying to find ways to research particular errors
07:13:31PMunchI've worked a fair bit with it, but it's been a while
07:15:49PrestigeI think mostly gimp and firefox have been an issue, been trying to listen for events to make applications fullscreen
07:16:10Prestigeff has been a "special" case, seems like I'm not receiving anything
07:18:00PMunchYeah, some applications don't behave very well..
07:18:32PrestigeJust going a little crazy, spent about 2 days trying to get some sort of indication from ff that it wants to be fullscreen lol. Gotta try again tomorrow.
07:18:49PMunchI unfortunately haven't gotten as far with mine as to try and run too many different programs under it..
07:19:51PrestigeI have tags and a single tiling layout finished, borders indicating active windows, closing and fullscreening applications. trying to listen for application messages now, been a headache
07:20:53PMunchTags?
07:21:07PrestigeYeah, using a tag system as opposed to workspaces
07:21:30PMunchHmm, interesting
07:21:39Prestigesort of allows you to add windows to multiple "workspaces" or view multiple workspaces at the same time
07:21:44PMunchThat's why you were asking about showing one window on multiple workspaces?
07:21:53PMunchHaha, yeah
07:22:30PrestigeI've been waist deep in xlib for a while, I feel like last time we spoke was over a month ago but it's probably only been a week lol
07:23:34PMunchHaha, yea wasn't that last Friday or something? :P
07:23:44PrestigeProbably lol
07:23:54PMunchI have kind of the same feeling, everything feels super long ago. But the days feel super short
07:23:58PrestigeI am still planning on helping with nimlsp but I want to get my wm to beta first
07:24:15PMunchI was actually planning on doing something on nimlsp today
07:24:32PMunchI've realised I need to rewrite quite a bit in my WM to go forwards with it..
07:25:17Prestigeoh one random thing about nimlsp I was curious about, if I go to definition, I will go to a forward declaration of a proc. I noticed in other LSPs with C, it jumps to the implementation.. Idk which is correct
07:25:46FromDiscord<Rika> it should do the latter
07:25:49FromDiscord<Rika> imo
07:26:38Prestigehm I think there's also 'go-to-implementation' so I'm unsure. But, it is the way other languages' lsps seem to behave
07:26:45PrestigePerhaps I should just read the docs again
07:26:52Prestigewhen it isn't 3am
07:27:13PMunchHaha, remember that all of this is built on top of nimsuggest
07:27:35PMunchSo issues like that are likely to stem from there
07:27:51PMunchWell, it might actually give both now that I think about it
07:28:02PMunchAnd in that case it shouldn't be that hard
07:30:01*Romanson quit (Quit: Connection closed for inactivity)
07:34:28PMunchHint: 21944 LOC; 865.383 sec; 20.771GiB peakmem
07:34:28PMunchTihi
07:34:54Prestige:o
07:35:33PMunchJust the same shenanigans as yesterday
07:35:40PrestigeOh, lol
07:35:45PMunchGCC was also using a solid 15Gb at the same time
07:36:01PrestigeThat's nuts
07:36:58*Guest30659 quit (Ping timeout: 272 seconds)
07:38:47skrylar[m]grin might have been neat for some of the debug dumps i had to deal with
07:39:50skrylar[m]yea chronicles has a lot more going on
07:40:45PMunchWait, is "grin" a program, or was that meant as an expression? :P
07:40:58PMunchBut yeah, chronicles is pretty neat. Very featured
07:40:59skrylar[m]its a lib that was linked earlier
07:41:03PMunchOh
07:41:20PMunchI was just wondering how sklog was different
07:41:23skrylar[m]12-factors argument is you just dump to stdout because if you want log rotation or shipping or beautification you ... get another program to do it, because thats code that doesn't matter to a microserver.
07:41:29PMunchI can see it is standalone, that is neat
07:41:46PMunchOh yeah, I can totally see that argument
07:42:28skrylar[m]i would like to add in hawktracer-esque telemetry
07:42:31*dadada__ joined #nim
07:42:58*NimBot joined #nim
07:43:08skrylar[m]basic tracing https://www.hawktracer.org/
07:43:54PMunchHuh, can't find anyone mentioning grin..
07:45:18skrylar[m]FromGitter <awr1> https://github.com/ebran/grim this is really interesting, it reminds me of DOT
07:47:01PMunchDot is such a nice tool
07:47:21PMunchBasically turn anything that can output to stdout to pretty graphs :)
07:48:32Zevvdot++
07:51:34*Anastasia joined #nim
07:52:57skrylar[m]oh that is a lot of machinery in chronicles
07:53:17PMunchYardanico, I managed to compile and run the generated code!
07:53:44PMunchTook ~35Gb of RAM, and had to increase the stack limit of the machine to 128Mb, but it does actually work!
07:53:48*Anastasia quit (Client Quit)
07:54:07PrestigePMunch: how much ram do u have man, lol
07:54:23PMunchHaha, this is my work machine. It has 64Gb
07:54:29PrestigeAh, nice.
07:54:31AraqPMunch, cool... :-)
07:54:53PMunchI think the IT guy just wanted to build a really high-spec machine, it's waaaay to overpowered for what I do
07:55:44PMunchBut it's nice to not have to worry about RAM when I'm running multiple virtual machines and docker containers (and my FF instance with waay to many tabs..)
07:55:55FromGitter<bung87> 64Gb mem, fit working deep learnning things...
07:56:17FromDiscord<Recruit_main707> in nim?
07:56:26*salotz[m] quit (*.net *.split)
07:56:27*codic quit (*.net *.split)
07:56:27*watzon quit (*.net *.split)
07:56:27*BitPuffin quit (*.net *.split)
07:56:27*golechwi1 quit (*.net *.split)
07:56:27*sepples quit (*.net *.split)
07:56:27*Northstrider quit (*.net *.split)
07:56:38PMunchRecruit_main707, what in Nim?
07:57:57skrylar[m]>multiple virtual machines ... thats probably why they stuffed it with ram
07:58:42PMunchProbably :P I have definitely noticed that I now only have 8Gb when working from home
07:58:53PMunchI've ordered some more to put it that way..
08:01:30*salotz[m] joined #nim
08:01:30*BitPuffin joined #nim
08:01:30*codic joined #nim
08:01:30*watzon joined #nim
08:01:30*Northstrider joined #nim
08:01:30*golechwi1 joined #nim
08:01:30*sepples joined #nim
08:02:20FromDiscord<Never Listen To Beef> I have 16GB and i've rarely ever gon over 10GB
08:02:30FromDiscord<Never Listen To Beef> People that use a lot scare me
08:02:55PrestigeI go over 3 sometimes when I play games, I'm usually under 1
08:04:45PMunchI'm currently sitting at 3.2, closing FF brings me down to 0.4..
08:05:19FromDiscord<Rika> i'm at 5 right now, because firefox
08:05:29FromDiscord<Rika> i have a little under 600 tabs LO
08:06:06FromDiscord<Never Listen To Beef> I almost never have more like 2 tabs
08:06:10*dadada__ quit (Ping timeout: 256 seconds)
08:06:35FromDiscord<Recruit_main707> my average is 40
08:07:12PMunchI'm at 114 now I think
08:07:25PMunchI don't really use bookmarks
08:07:29PMunchI just leave stuff open
08:07:37FromDiscord<Rika> same here
08:08:20FromDiscord<Recruit_main707> 22 only today, im improving
08:08:26*Vladar joined #nim
08:09:38FromDiscord<Rika> well i am too considering that i can go up to a thousand lol
08:09:40FromDiscord<Never Listen To Beef> Ah i use bookmarks, and close my browser completely
08:10:00FromDiscord<Rika> i also close my browser completely, its just that i save sessions
08:10:10FromDiscord<Never Listen To Beef> Yea i dont count that as completely
08:10:26FromDiscord<Never Listen To Beef> Im a weird person that dislikes saved sessions
08:10:27FromDiscord<Rika> then you have a faulty definition
08:12:37*dadada joined #nim
08:12:50FromDiscord<Never Listen To Beef> eh i never said i was dictionary
08:13:02*dadada is now known as Guest54677
08:14:01PMunchAraq, what are your thoughts on solving 14253?
08:14:45PMunch!issue 14253
08:14:46disbothttps://github.com/nim-lang/Nim/issues/14253 -- 3Assignment to `default` leads to assignment for `nodecl`
08:17:22Araqit should just work, it would be a simple C backend improvement
08:18:14PMunchWhat should work though? Not assigning a value, or assigning `default`?
08:19:01Araqlet x = 0
08:19:17Araqassigning default
08:19:34Araqno need to change the language definition for better C interop
08:22:09PMunchBut `= 0` not doing anything is just weird
08:23:19Araqoh hmmm
08:23:24Araqgood point
08:23:41PMunchI would expect `let somevar {.nodecl, cimport.} = 10` to work with a global variable in C that just hasn't been initialised in the C code. But `let SOMECONST {.nodecl, importc.}: cint` makes sense as it we don't actually assign it a value.
08:23:57Araqthe old way is var UPP {.importc, header.}: cint
08:24:00PMunchSame as importing a procedure without giving it a body
08:24:30PMunchYeah, but if it is a const in C Nim will still allow you to generate an assignment for it..
08:24:37Araqmaybe you're right and 'let UPP' is the most natural way to write it
08:24:40PMunchWhich would throw a C error
08:25:27*fredrikhr joined #nim
08:25:45PMunchIt was the first thing I tried, so definitely the most natural to me :)
08:27:27PMunchIt would tell Nim to not allow assignment to it, which is exactly what we want for C consts. And it would allow you to import things like error codes much easier (looking at you manpages that only lists the constant names for error codes without ever mentioning their actual values)
08:28:15*abm joined #nim
08:28:35Araqwrite an RFC already
08:29:35*krux02 joined #nim
08:30:38*Senketsu quit (Quit: WeeChat 2.8)
08:33:03PMunchWill do!
08:34:10FromGitter<timotheecour> => https://github.com/nim-lang/Nim/issues/14253#issuecomment-625110027
08:34:13disbotAssignment to `default` leads to assignment for `nodecl` ; snippet at 12https://play.nim-lang.org/#ix=2l7t
08:35:25PMunchWait, how did you get those working on C-time?
08:36:13*Guest54677 quit (Ping timeout: 246 seconds)
08:41:20FromGitter<timotheecour> for the common case where the symbol is defined via a C macro, I call the preprocessor (with proper caching etc) to get the value; it’s available at nim CT ; for the case where it’s a compile time const. (eg C enum) it’s also doable but more complicated and that I haven’t done yet; for the other cases, you can just use the `let`variant, eg `let difficultCase {.importc: “DifficultCase", header:
08:41:20FromGitter... “<foo.h>".}: int = discard`
08:41:50*letto joined #nim
08:42:36*dadada__ joined #nim
08:49:32FromDiscord<Never Listen To Beef> Clearly we needd Cconst just to keep people on their feet
08:49:35FromDiscord<Never Listen To Beef> need*
08:51:05FromDiscord<Rika> c-c-c-c-const
08:51:31skrylar[m]c-c-c-cant you see.
08:52:30Araq'= discard' is not acceptable to me, it's like D's '= void', re-using keywords because keywords are expensive to add
08:52:40PMunchExactly
08:52:55PMunchThe more I thought about it the less I liked it
08:52:56FromGitter<timotheecour> i also suggested `auto` in that thread
08:53:13Araq'auto' is the same problem, the better solution is
08:53:16PMunchauto is definitely better
08:53:18Araqlet x {.importc.}
08:53:22Araqwithout the '='
08:53:30Araqor maybe use the existing .noinit pragma
08:54:25FromGitter<timotheecour> that’d be a redundant pragma; it should be implied by importc.
08:54:57*ftsf quit (Ping timeout: 260 seconds)
08:56:16Araqwell you can import a variable from C, set its value and claim afterward it should be immutable :-)
08:56:36Araqwhich is what 'let x {.importc.} = value' does :-)
08:56:51FromGitter<timotheecour> I’m also fine with changing the parser so there’s no RHS after `=`; the downside you may want to consider is that I don’t see how it’d work with backward compatibility in mind, eg: ⏎ this won’t compile for nim < 1.3.5 despite the `when` because lexer will complain ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb3cd5322f9c45c2a753e72]
08:56:55Araqbut we should allow to not have the '= value' part
08:57:49Araqiirc correctly the existence of '=' is done in sema, not in the parser
08:58:15skrylar[m]is there even a lot of nim code in the wild in the first place (re: version restrictions)
08:58:53skrylar[m]altho.. alpine was still sporting an insanely outdated version. redid all the packaging and mailed to maintainer but i think that person is dead or something
08:58:58PMunchYeah, you can get an empty LetSection in a macro, so it can't be an error in the parser
08:59:36Araqskrylar[m], it doesn't matter, we won't get a "lot of Nim" code when we constantly break things
09:01:04FromGitter<timotheecour> @araq I meant for `const`, not `let`; see: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb3ce50d898fe7a376f3031]
09:01:09skrylar[m]humm the go folk break builds constantly and nobody seems to care as long as they have the big g logo on it ^^;;;;;;
09:01:24Araqwhen false:
09:01:24Araq let x: int
09:01:31Araqcompiles fine, no parser change required
09:02:17PMunchBetter to break things to make them better than to be stuck with bad stuff. Sometimes you have to rip the band-aid off
09:02:21FromGitter<timotheecour> but then you loose on the ability to have it work at CT, as i mentioned.
09:02:46Araqtimotheecour: that's the point, you don't know the value, it comes from C
09:02:47FromGitter<timotheecour> `when false: const TEST {.importc, nodecl.}: cint` fails
09:03:00FromDiscord<clyybber> maybe we should steal "undefined" from zig?
09:03:12Araqskrylar[m], Golang doesn't break anything
09:03:23PMunchIt's not undefined though, it's just not defined by us
09:03:37FromGitter<timotheecour> my point is we can, in many cases, and I have a branch that does exactly that (that’s the whole point of proposal 5)
09:03:46FromDiscord<clyybber> Yeah, emitting the `=` makes most sense here
09:04:07FromDiscord<Never Listen To Beef> What skyrlar mentioned makes me wonder will unmaintained packages that are outdated and no longer work get replaced with maintained versions if one is made?
09:04:13FromDiscord<Never Listen To Beef> on nimble ofc
09:05:14FromGitter<timotheecour> however we can simply backport the parser change to 1.0 and 1.2, in which case I’d be fine with skipping `=` (but only in this case)
09:05:29PMunchThat is the consensus I think beef
09:06:03FromDiscord<Never Listen To Beef> If so nice
09:06:10*dadada__ quit (Ping timeout: 256 seconds)
09:12:28*dadada joined #nim
09:12:52*dadada is now known as Guest86362
09:18:18*tangangle quit (Ping timeout: 272 seconds)
09:20:07*Tlongir joined #nim
09:25:18skrylar[m]people sometimes send pr's for version updates
09:36:15*Guest86362 quit (Ping timeout: 260 seconds)
09:39:48*k0mpjut0r quit (Quit: killed)
09:39:48*unclechu quit (Quit: killed)
09:39:48*Demos[m] quit (Quit: killed)
09:39:49*GitterIntegratio quit (Quit: killed)
09:39:49*BitPuffin quit (Quit: killed)
09:39:49*codic quit (Quit: killed)
09:39:50*dzamo[m] quit (Quit: killed)
09:39:50*skrylar[m] quit (Quit: killed)
09:39:56*sirikon quit (Quit: killed)
09:39:56*Guest30980 quit (Quit: killed)
09:39:56*dannyfritz[m] quit (Quit: killed)
09:40:01*lqdev[m] quit (Quit: killed)
09:40:08*tml[m] quit (Quit: killed)
09:40:08*reversem3 quit (Quit: killed)
09:40:08*polypoid[m] quit (Quit: killed)
09:40:08*vycb[m] quit (Quit: killed)
09:40:08*planetis[m] quit (Quit: killed)
09:40:08*wiltzutm[m] quit (Quit: killed)
09:40:13*nerdrat[m] quit (Quit: killed)
09:40:14*yassen[m] quit (Quit: killed)
09:40:15*anti[m] quit (Quit: killed)
09:40:34*watzon quit (Quit: killed)
09:40:35*salotz[m] quit (Quit: killed)
09:40:36*khanate[m]0 quit (Quit: killed)
09:42:34*dadada__ joined #nim
09:42:43*Jjp137 quit (Ping timeout: 246 seconds)
09:47:43*Trustable joined #nim
09:49:36Araqtimotheecour: 'const' for importc is a design with unknown problems
09:50:02Araq'let' doesn't have any obvious problems, that's the difference
09:50:14Araqplus it doesn't need a parser patch at all
09:50:31Araqso even if you want 'const' so badly, let's please not conflate these two
09:51:16FromDiscord<Rika> haha, `let`'s
09:52:41FromGitter<timotheecour> well ok, we can have `let x: {.importc.}` and another syntax for const (`const x: {.importc.} = auto`)
09:53:08FromDiscord<Rika> how would a compile time importc work?
09:53:09FromGitter<timotheecour> (i meant `let x: {.importc.}: int` and `const x: {.importc.}: int = auto`)
09:54:07FromGitter<timotheecour> That was discussed earlier; i guess i shoudl just go ahead and submit that PR...
09:57:50FromDiscord<clyybber> disruptek, Araq: Regarding try: finally: scoping, the only way to accomplish it is to extract all declarations out of try: to before the try:
09:58:10FromDiscord<clyybber> Everything else is insanity (telling you as I'm currently working on the DFA :p)
09:58:29*skrylar[m] joined #nim
10:01:42*exelotl quit (Ping timeout: 256 seconds)
10:03:54*voltist quit (Quit: Ping timeout (120 seconds))
10:04:14*voltist joined #nim
10:05:54*dadada__ quit (Ping timeout: 240 seconds)
10:11:27FromDiscord<Recruit_main707> is it me or updating NimStudio would be as easy as: https://devblogs.microsoft.com/visualstudio/how-to-upgrade-extensions-to-support-visual-studio-2019/
10:11:38FromDiscord<Recruit_main707> aka: changing a few numbers
10:12:39*dadada joined #nim
10:13:01*dadada is now known as Guest7724
10:15:12FromDiscord<Yardanico> Good morning/day/night :P
10:15:26FromDiscord<Recruit_main707> hello
10:16:15PMunchHello Yardanico :)
10:17:43FromDiscord<Recruit_main707> is gravityzwell in this server??
10:18:27Yardanicolemme check
10:18:43Yardanicono
10:19:28FromDiscord<Recruit_main707> time to send a few emails then
10:20:01PMunchYardanico, did you see that I was able to compile and run the 5 letter version?
10:20:08YardanicoPMunch: yeah, impressive :)
10:20:19Yardanicoboth on Nim and at the C compiler
10:20:25PMunchYeah
10:20:34Yardanicobtw https://github.com/nim-lang/fusion/pull/3 how did this even happen
10:20:35disbotHot Fix Bug
10:20:38PMunchI'm trying with 6 now, but I don't have very high hopes :P
10:20:44Yardanicobtreetables.mim
10:20:48Yardanicohttps://github.com/nim-lang/fusion/blob/master/src/fusion/btreetables.mim
10:20:49YardanicoXD
10:21:06PMunchHahaha
10:23:08Yardanicobtw, I am kinda noobish in the mathematical/algorithm side of things, so what are the advantages of a b-tree tables over normal ones?
10:25:08Yardanicooh wait they don't need hashing?
10:25:11Yardanicodamn
10:26:19Yardanicooh, so it's a performance/memory tradeoff
10:27:29*liblq-dev joined #nim
10:32:35PMunchThe benefit of hash tables is that if your `hash` procedure is cheap you can find pin-point exactly where in memory an entry in a table should be. So optimally it's a single pointer dereference to get there. This is a gross oversimplification of course :P
10:33:46PMunchI was actually thinking about implementing a table system I made for a seminar on green computing in Nim
10:34:35*oculux quit (Ping timeout: 260 seconds)
10:38:45narimiranYardanico: they are sorted by default
10:39:36narimiranbtw, the current implementation is just a "proof of concept", and it should be optimized
10:40:15narimiransee https://github.com/nim-lang/Nim/pull/13890 for a bit more detail
10:40:16disbot[WIP, help needed] introduce BTree-based Tables
10:44:07*nerdrat[m] joined #nim
10:44:07*BitPuffin joined #nim
10:44:07*Demos[m] joined #nim
10:44:07*tml[m] joined #nim
10:44:07*khanate[m]0 joined #nim
10:44:07*reversem3 joined #nim
10:44:07*GitterIntegratio joined #nim
10:44:07*unclechu joined #nim
10:44:07*watzon joined #nim
10:44:07*dzamo[m] joined #nim
10:44:07*k0mpjut0r joined #nim
10:44:08*codic joined #nim
10:44:08*salotz[m] joined #nim
10:44:08*Cadey1 joined #nim
10:44:08*lqdev[m] joined #nim
10:44:13*yassen[m] joined #nim
10:44:14*vycb[m] joined #nim
10:44:14*anti[m] joined #nim
10:44:14*sirikon joined #nim
10:44:14*dannyfritz[m] joined #nim
10:44:14*polypoid[m] joined #nim
10:44:15*planetis[m] joined #nim
10:44:15Yardanicomatrix spam again, yay
10:44:16*wiltzutm[m] joined #nim
10:44:47FromDiscord<Rika> matrix spam?
10:46:17Yardanicomatrix-freenode bridge is not that stable, sometimes it crashes and 20-30 people leave (because they're connected from matrix), and then they join
10:46:28PMunchRika, people using Matrix can connect directly to IRC. But it's a bit flaky, so sometimes all matrix users drop and reconnect
10:46:31Yardanicoofc you can disable showing join/leave messages in the IRC client though
10:46:44PMunchBut it can be useful for regular use..
10:46:48Yardanicoyeah
10:47:08FromDiscord<Rika> i have it disabled, osu's irc is pretty insane
10:47:16FromDiscord<Rika> well, when i do use irc
10:47:20FromDiscord<Rika> of course right now i am not lol
10:48:06supakeenI use weechat's smart thingy which works well and I have a shortcut to show/hide them at will.
10:48:18supakeenI think it only shows quits if someone leaves shortly after a message/mention.
10:49:34Yardanicobtw nim-regex now works with arc (with that nfamacro) just fine, thanks to @cooldome for fixing it :P
10:49:59Yardanicothere's https://github.com/nim-lang/Nim/issues/14251 but it's not really related to nim-regex
10:50:02disbot[ARC] Undeclared variable in C with inline pragma and iterators ; snippet at 12https://play.nim-lang.org/#ix=2l7S
10:50:03Yardanicoleft*
10:50:09FromDiscord<clyybber> \o/
10:50:23Yardanicolets try the nim-regex benchmark
10:54:45Yardanicoseems to be around the same which is ok
10:54:49Yardanicoand in some benchmarks arc is faster
10:55:14Yardanicohmm, in some ones it's slower though :P
10:56:02FromDiscord<clyybber> Surprises me that it works at all
10:56:04Yardanicoemail regex is 3x slower with arc seems like
10:56:24FromDiscord<clyybber> I assumed a regex engine would use a lot of case statements
10:56:31FromDiscord<clyybber> with early exits ala break and return
10:56:43Yardanicoit constructs an NFA at compile-time by default
10:56:56Yardanicoso at runtime it already has the parsed regex pattern
10:56:59Yardanicobut yeah
10:57:15FromDiscord<clyybber> Yeah, so it constructs case statements
10:57:17FromDiscord<clyybber> probably
10:57:18Yardanicoit does use case statements with early returns :P
10:57:26FromDiscord<clyybber> Got lucky then :D
11:04:47PMunchHmm, how does ./koch test decide what to run?
11:08:20*Guest7724 quit (Ping timeout: 256 seconds)
11:09:47*dadada__ joined #nim
11:09:54*monokrom joined #nim
11:13:55PMunchI added a test-case (not checked in to git) and tried to run it but it gives me the same number of total tests with and without the file
11:33:59PMunchhttps://github.com/nim-lang/Nim/pull/14258
11:34:00disbotAllow let to not have value when using importc
11:42:11*Jjp137 joined #nim
11:47:41FromDiscord<clyybber> PMunch: Hmm, I don't know, I always use testament
11:47:56FromDiscord<clyybber> ./koch test is probably testament I suppose
11:48:09PMunchAraq, what `s` are you talking about?
11:48:13FromDiscord<clyybber> what was the recent bug that had to do with arc/exceptions and nimble?
11:49:18FromDiscord<clyybber> @Yardanico I think you discovered that one
11:49:31Yardanicoyep
11:49:32FromGitter<Vindaar> @voltist: are you around?
11:49:37Yardanicobasically nimble relies on UB in nim
11:49:41FromDiscord<clyybber> Yardanico: Did you open an issue for it?
11:49:43Yardanicoyes
11:49:52Yardanicohttps://github.com/nim-lang/nimble/issues/798
11:49:54disbotNimble doesn't work with --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2kKF
11:49:56FromDiscord<clyybber> thanks
11:49:58YardanicoI really consider that as an UB :P
11:50:10Yardanico" Nimble relies on the fact that after catching the exception the variable initialized in the "try" block still contains useful info (for validation)"
11:50:20*Trustable quit (Remote host closed the connection)
11:50:50FromDiscord<clyybber> Yeah, I wonder how I should treat it in the DFA
11:50:50Yardanico4raq told that it's strange this works with default GC
11:51:17FromDiscord<clyybber> Ok, so raising does not lead to an implicit return
11:51:28FromDiscord<clyybber> of the result variable I mean
11:59:30*letto quit (Quit: Konversation terminated!)
12:01:21*letto joined #nim
12:02:45FromGitter<waghanza> hi, is this ok to build an app on *alpine* (with `musl`), but to run it on *linux* (with `glibc`)
12:02:46FromGitter<waghanza> ?
12:03:58FromDiscord<Rika> if its possible in c, its prolly possible in nim
12:05:54Yardanico@waghanza if you compile the app with musl _statically_ - yes
12:05:55dadada__are there any official pretty printers for variables in Nim that work on all variables? or do I need to resort to https://nimble.directory/pkg/print
12:05:59Yardanicoif you link to musl dynamically, no
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:15Yardanicosince if you link to musl dynamically then you'll need to have musl available on your system
12:06:25Yardanicoalthough some distros (even if they're glibc based) have musl in their repos, for example arch does
12:06:26*dadada__ is now known as dadada
12:06:45*supakeen joined #nim
12:08:18PMunchdadada, most variables can be printed just with $, or you can use .repr
12:08:43dadadayes, I know, most, I need something that works on all!
12:09:09PMunchreprshould work on all
12:09:38PMunchBut it might not fit your definition of "pretty"
12:10:09dadadawell, it does need to show the contents of things, that would be pretty
12:11:22*ertp07 quit (Read error: Connection reset by peer)
12:11:25PMunchThere is also `dump` from the sugar module
12:11:38*ertp07 joined #nim
12:13:37PMunchWhich does something like this: https://play.nim-lang.org/#ix=2l88
12:14:18PMunchIt still requires $ though
12:15:22*theelous3 joined #nim
12:19:45*exelotl joined #nim
12:22:59FromGitter<Vindaar> @voltist: my curiosity got the better of me: https://gist.github.com/Vindaar/72bc67ff93613619bba2fdeffc3a24e9
12:23:15FromGitter<Vindaar> i.e. neither the formula, nor the parameters seem to make sense
12:23:36FromGitter<Vindaar> though the parameters as they are fitted by me certainly have big errors attached to them based on how I extracted data points from their plot
12:25:29*krux02 quit (Remote host closed the connection)
12:25:30*rockcavera joined #nim
12:31:54*chemist69 quit (Ping timeout: 244 seconds)
12:32:48*chemist69 joined #nim
12:35:41*zacharycarter joined #nim
12:37:07*zacharyc1rter joined #nim
12:39:31PMunchI feel like this should at least throw a warning.. https://play.nim-lang.org/#ix=2l8c
12:44:26*lritter joined #nim
12:52:50FromDiscord<Yardanico> fyi, I enabled bridge betwee #nim-news on IRC and #news on Discord (and also fixed color code stripping in ircord :P)
12:57:42PMunchThis is just confusing: https://play.nim-lang.org/#ix=2l8j
12:58:27*zacharyc2rter joined #nim
13:05:26disruptekagree.
13:07:04zacharyc2rterwhat's confusing about it?
13:07:44zacharyc2rteroh I see
13:08:28zacharyc2rtermaybe look at the generated C code?
13:09:10zacharyc2rterbut uh basically the second assignment doesn't happen is my guess
13:09:23zacharyc2rter`let test2 {.nodecl, importc.}: cint = 42` that one
13:16:27*konvertex joined #nim
13:17:53PMunchYes, that is what happens
13:17:58PMunchBut it is confusing that it doesn't
13:20:07PMunchIt happens with cstrings as well: https://play.nim-lang.org/#ix=2l8r
13:20:18PMunchWhy are literals ignored in this way?
13:21:50zacharyc2rterbecause of nodecl
13:22:07zacharyc2rterhowever in the first assignment it's the result of that expression
13:22:35PMunchI know it's because of nodecl, but why only in the case of literals?
13:23:13PMunchLooking at that code I would assume both assigned the variable. Or since they are nodecl, neither of them.
13:24:04*ertp07 quit (Ping timeout: 256 seconds)
13:24:05*dadada quit (Ping timeout: 256 seconds)
13:25:49*dddddd joined #nim
13:25:52zacharyc2rterfile an issue I guess - I know the same thing happens with typedefs and types
13:25:55zacharyc2rterlet me show you what i mean
13:27:37*dadada joined #nim
13:28:00*dadada is now known as Guest12153
13:32:24*ertp07 joined #nim
13:33:54*ertp07 quit (Read error: Connection reset by peer)
13:41:07zacharyc2rterPMunch: not exactly the same issue, but it's hard to reason about what's going on here as well: https://play.nim-lang.org/#ix=2l8y
13:41:33*ertp07 joined #nim
13:41:43zacharyc2rtererr sorry let me fix that
13:42:34zacharyc2rterhttps://play.nim-lang.org/#ix=2l8B
13:44:04zacharyc2rteractually I don't think it's the same thing at all, nevermind.
13:45:18zacharyc2rterI do think your example is confusing but I have a feeling the reason it's happening is because of the assignment of an expression vs an int literal
13:46:39PMunchYeah it's obvious why it happens, but it looks very strange and it should be consistent
13:51:49FromGitter<kaushalmodi> nim-regex just got even more awesome! https://github.com/nitely/nim-regex/commit/fdeb60ef9980f2ac46e28598efda6f4b6d68b7f5#diff-0c88c9acc6458974b569d4f97da31c85R1657
14:05:45shashlicknim doc doesn't seem to suppress hints with `--hints:off`
14:06:28shashlicknever mind
14:11:06*narimiran quit (Ping timeout: 256 seconds)
14:12:54zacharyc2rterif I have a type with a function pointer field - why can't I use the `discardable` pragma on that field?
14:16:31Yardanicowdym discardable pragma on a field?
14:16:35Yardanicoah I understand
14:17:12zacharyc2rterI think it's a bug - you should be able to do this
14:18:33Yardanicoyeah seems so
14:19:04Yardanicobut discardable itself is generally not considered good in nim :P
14:19:20Yardanicoso maybe there's not much support for it in some cases
14:19:43zacharyc2rterI think it's up to the programmer
14:20:09FromDiscord<clyybber> zacharycarter: Whats the error?
14:20:26Yardanico@clyybber invalid pragma: discardable
14:20:51Yardanicohttps://play.nim-lang.org/#ix=2l8T
14:20:51liblq-devis it possible to disable doc generation for some symbol?
14:21:00liblq-devlike, iirc Rust has #[no_doc]
14:21:14FromDiscord<clyybber> Ok, yeah thats a bug
14:21:43Yardanicoi'll open the issue or someone else? :P
14:21:54zacharyc2rterI was filling it out but sure go for it :)
14:21:58Yardanicoah nvm
14:22:05Yardanicogo yourself, it's your issue after all ;)
14:22:09zacharyc2rterhaha okay
14:22:45YardanicoI have 15 open issues in nim tracker anyway
14:23:06Yardanicohalf of them are low priority though
14:23:17zacharyc2rterbeast mode
14:24:16FromDiscord<clyybber> Yardanico: And the other half are showstopper :D
14:24:19YardanicoXD
14:24:21FromDiscord<clyybber> Its a good mix
14:24:46Yardanicowell 4 of my arc issues are already closed, and I didn't submit any arc issues today, so I gotta find them
14:25:32FromGitter<alehander92> ooi
14:28:13FromDiscord<clyybber> zacharycarter: Somehow you opened it twice
14:28:16FromDiscord<clyybber> I closed one
14:30:27PMunchWhat's the best way to iterate over the keys of an ordered table and deleting those that don't meet some predicate?
14:30:41PMunchI can't do a normal for loop over the keys, because it complains that the size changes
14:31:00PMunchI can store the keys in a sequence, but that feels a bit heavy handed..
14:31:31liblq-devthis is what I usually do, and I don't know of another method
14:31:51liblq-devyou can write a keepItIf for tables, if you really want to
14:32:10FromDiscord<Rika> Loop through the table and add the keys to a result instead or something
14:32:10liblq-devbut then you're allocating another table, which feels even more expensive than allocating a seq
14:33:27disruptekmake it work and move on.
14:35:24PMunchHmmm
14:37:53zacharyc2rterclyybber: thanks - github 404'd for me when I pressed the open button the first time
14:38:53FromDiscord<clyybber> yeah, github is really wonky today
14:40:19Yardanicoyeah I noticed it too a bit earlier
14:41:58*oculux joined #nim
14:42:15Yardanicohttps://github.com/treeform/staticglfw sounds nice
14:42:24Yardaniconow we also need to do the same for cimgui :)
14:42:37Yardanicoand then we'll have single-binary gui apps with imgui and glfw
14:42:52*natrys joined #nim
14:46:56zacharyc2rterjust use sokol and not glfw :P
14:47:00*ertp07 quit (Ping timeout: 272 seconds)
14:47:09zacharyc2rterand then you just need to link an object file
14:47:48zacharyc2rteris disruptek streaming yet?
14:47:58disruptek~stream
14:47:58disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:48:07Yardanicozacharyc2rter: he indeed is
14:48:15zacharyc2rterniceeeee
15:01:34*ertp07 joined #nim
15:14:37FromDiscord<clyybber> zacharycarter: I have a fix
15:17:02*thomasross joined #nim
15:18:43FromDiscord<clyybber> zacharyc2rter: Right here: https://github.com/nim-lang/Nim/pull/14262 :)
15:18:45disbotFix #14260
15:19:43*thomasross quit (Max SendQ exceeded)
15:20:11*thomasross joined #nim
15:22:36*Guest12153 is now known as dadada
15:24:56liblq-devso, uhh, recursive module dependencies when?
15:25:10liblq-devthey constantly piss me off
15:25:23liblq-devI can't structure my project in a sensible way because Nim lacks support for them
15:25:27FromDiscord<clyybber> never had that problem
15:27:00FromDiscord<clyybber> I actually think it forces you to structure your project in a sensible way
15:27:19*waleee-cl joined #nim
15:27:54liblq-devyeah, and make all your fields public even though they should be private. funny joke.
15:28:14FromDiscord<clyybber> umm..
15:30:34liblq-devlook, I don't want to expose my implementation details to the end user
15:30:58liblq-devand have to tell them "don't look it's internal" everywhere around the code
15:31:21liblq-devthis would've been a million times easier if Nim has a {.nodoc.} pragma or similar, where I could just hide them from the docs, but sadly it doesn't
15:31:46FromGitter<alehander92> hm
15:31:49FromGitter<alehander92> but cant you write one
15:32:00FromGitter<alehander92> weren't the doc comments just nodes in the tree
15:32:23FromGitter<alehander92> ah you're talking about fields appearing there
15:34:10*letto_ joined #nim
15:34:54FromGitter<alehander92> <3
15:34:59FromDiscord<clyybber> or just leave them private?
15:35:14FromDiscord<clyybber> and structure your project "better"?
15:36:35*letto__ joined #nim
15:37:18*letto quit (Ping timeout: 258 seconds)
15:38:34*letto_ quit (Read error: Connection reset by peer)
15:43:59*letto__ quit (Quit: Konversation terminated!)
15:46:12*ertp07 quit (Ping timeout: 260 seconds)
15:46:13*letto joined #nim
15:52:20*khanate[m]0 quit (Quit: Idle for 30+ days)
16:00:48*ertp07 joined #nim
16:27:31Prestigedom96: Your book just arrived :)
16:30:15*Vladar quit (Quit: Leaving)
16:32:01*exelotl quit (Ping timeout: 264 seconds)
16:32:45*someunknownuser joined #nim
16:35:54dom96Prestige, pictures!
16:36:06YardanicoPrestige: that was fast :P
16:36:11YardanicoI only received their email yesterday
16:36:19Yardanicothat they shipped my book
16:41:06Prestigehttps://i.ibb.co/NZ9NtxB/IMG-20200507-123954.jpg
16:41:44zacharyc2rterso much wasted potential Prestige
16:41:51zacharyc2rtercould have put anything in that pic
16:41:58zacharyc2rtereveryone would have opened it
16:42:09*exelotl joined #nim
16:42:20PrestigeLol zacharyc2rter I'll do a photoshoot after work :P
16:42:24zacharyc2rterniceeeeee
16:45:01*Trustable joined #nim
16:45:38*Vladar joined #nim
16:45:46dom96Prestige, beautiful! What is that WM? :D
16:46:47Yardanico@Clyybber hooray!
16:46:54Yardanicobtw I'm thinking of trying ircord on the mail channel in a few days
16:46:59Yardanicomost stuff is fixed
16:47:01Yardanicolike mentions
16:47:04PrestigeUnfortunately it's my work macbook hooked up to a monitor D: running yabai to make it somewhat bearable lol
16:47:13Yardanicoand dimscord by @KrispPugg is also getting fixes
16:47:19Prestigedom96: I usually run awesome or dwm on my personal machines
16:50:46dom96Yardanico, awesome
16:51:07dom96Prestige, might be time for me to dive back into the Linux world :)
16:51:53PrestigeThings have really gotten better in the past few years for Linux. Everything else feels clunky to me
16:55:53*silvernode joined #nim
16:58:05livcdAny frontend person that can compare Karax to whatever they usually use?
16:58:35zacharyc2rterKarax has a virtual dom and does dom diffing
16:58:45zacharyc2rterso in that sense it is similar to react / vuejs / angular
16:58:55zacharyc2rterhowever it differs in that it follows the elm philosophy that components should be stateless
16:59:08zacharyc2rterI think though stateful components are also supported
16:59:43zacharyc2rterI don't think Karax has anything like redux / vuex etc... IE an application wide state store
17:13:51dom96afaik karax has no philosophy
17:14:01dom96in fact, it has no components
17:14:43zacharyc2rtermeh I haven't used it in a while
17:17:45dom96I'm starting to seriously consider setting up a patreon/github support/something like that for myself
17:18:19dom96The amount of projects I have to maintain, and the amount of things that would be very valuable to the community that I developed but is stuck as part of another project is far too high
17:18:25dom96(One example being routing for karax)
17:19:09dom96Having a patreon would give enough motivation to get these things out there and would hopefully enable me more and more to work on these things into the future
17:19:37FromGitter<alehander92> sounds good
17:21:06FromGitter<Willyboar> especially for httpbeast :)
17:21:29dom96I could give Patreons a vote on what they want me to work on :)
17:21:51*terps joined #nim
17:21:51dom96but httpbeast is pretty much done :D
17:22:58dom96Willyboar: what do you think it needs?
17:23:44FromGitter<Willyboar> I don't know :P
17:24:15FromGitter<Willyboar> Is it ready for production?
17:24:42dom96I don't consider it ready to be put naked to the internet
17:24:46dom96so I could work on that
17:24:51disruptekdom96: i'll sponsor some nimph bugfixing if you have some time to write nim professionally.
17:24:56dom96but to be put behind nginx it's veyr much ready
17:24:58dom96*very
17:25:59dom96disruptek, not sure if serious, but if you are: I think working on a codebase that I don't have much context on would not allow me to have the most impact
17:26:27disruptekso it's not about the money?
17:26:43dom96not primarily
17:27:03dom96but I do think having another source of income would be both good for me and for Nim
17:27:04disruptekso the reason you don't fix bugs in software you're familiar with is because you don't want to.
17:27:14dom96Right now a lot of donations to Nim are being unused
17:27:25Yardanicoyeah I saw
17:27:38YardanicoI contribute to opencollective and the budget just seems to be unused (?)
17:28:03Yardanicohttps://opencollective.com/nim/expenses is empty xd
17:28:21dom96disruptek, sure, that's about right.
17:28:26PrestigeWould be pretty awesome getting paid to work on nim libs
17:28:40zacharyc2rterstart a patreon
17:28:46disruptekwould be pretty awesome to have a job, full stop.
17:29:12Yardanicoi guess an idea where nim lib devs are getting paid (even a bit) for changes might be a kinda good idea
17:29:14PrestigeTrue
17:29:16Yardanicofrom opencollective for example
17:29:18FromDiscord<Recruit_main707> someone wants to help transpile this to nim??
17:29:19FromDiscord<Recruit_main707> there are more options than go if youd rather have other references
17:29:19FromDiscord<Recruit_main707> https://github.com/google/flatbuffers/blob/712866d57b5e95b64858db31425816eb97ea7630/go/builder.go#L107
17:29:23dom96disruptek, what's blocking you?
17:29:38disruptekmy pleasant disposition.
17:29:51Prestigevvifuigvkdjndcrdkjhugrvhgfjtjngjitujjibuljiu
17:30:00Prestigeignore that :P
17:30:38supakeenI will find deeper meaning, Prestige and you can't stop me.
17:30:41dom96disruptek, tried going after the job offers posted in the monthly HN threads?
17:30:53PrestigeLol supakeen
17:31:06FromDiscord<Recruit_main707> specially this: `for i := len(b.vtables) - 1; i >= 0; i-- {...}` what the hell is this??
17:31:20*Jesin quit (Quit: Leaving)
17:31:33supakeenLikely iterates over b.vtables in reverse, @Recruit_main707.
17:31:33*ptdel joined #nim
17:31:39supakeenBut depends on what it is doing in the {...}.
17:31:40dom96Recruit_main707: reverse iteration?
17:31:44Yardanicoyou need countdown
17:31:52Yardanicocountdown(b.vtables.len - 1, 0):
17:31:53Yardanicofor x in *
17:32:09FromDiscord<Recruit_main707> or reversing the sequence right?
17:32:16Yardanico?
17:32:20Yardanicodepends on what you do inside the code
17:32:35dom96reversing the sequence is costly
17:32:41Prestige^
17:32:42Yardanicofor ; i >= 0 && b.vtable[i] == 0; i-- {}
17:32:42FromDiscord<Recruit_main707> then say no more
17:32:52FromDiscord<Recruit_main707> thank you
17:32:53Yardanicothey just decrement i as long as b.vtable[i] == 0
17:33:12Yardanicowhile i >= 0 and b.vtables[i] == 0: dec i
17:33:36dom96for i in countdown(b.len, 0): ...
17:33:44FromDiscord<Recruit_main707> thats the 1st for loop, i mean the second one
17:33:54FromDiscord<Recruit_main707> (have i highlighted the wrong one?
17:33:54Yardanicofor i := len(b.vtables) - 1; i >= 0; i-- { is just countdown
17:34:10FromDiscord<Recruit_main707> ok
17:34:10*Jesin joined #nim
17:34:13Yardanicodamn go sure has weird loop syntax
17:36:24Yardanicogcc 10.1 released
17:36:33FromDiscord<Recruit_main707> hype
17:36:44Yardanicohttps://gcc.gnu.org/gcc-10/porting_to.html does the -fno-common affect nim?
17:36:44*dadada quit (Ping timeout: 272 seconds)
17:38:58*krux02 joined #nim
17:42:32*dadada joined #nim
17:42:55*dadada is now known as Guest12311
17:43:52*ertp07 quit (Ping timeout: 256 seconds)
17:44:48*rockcavera quit (Remote host closed the connection)
17:50:13*ertp07 joined #nim
17:50:16FromDiscord<clyybber> Nim doesn't generate headers
17:50:26FromDiscord<clyybber> So I don't think we are affected
17:51:00disruptekshashlick: i just had to move the toast binary into nimterop/ in order to build golden.
17:51:12FromDiscord<clyybber> aha!
17:51:20FromDiscord<clyybber> maybe thats teh same issue?
17:51:37FromDiscord<clyybber> disruptek: What error did you get without doing that?
17:52:08disruptek/home/adavidoff/nims/1.3/lib/system/fatal.nim(49, 5) Error: unhandled exception: cimport.nim(131, 12) `fileExists(toastExe)` toast not compiled: /home/adavidoff/git/golden/deps/pkgs/nimterop-0.4.4/nimterop/toast make sure 'nimble build' or 'nimble install' built it [AssertionDefect]
17:54:45FromDiscord<clyybber> Ah, ok
17:54:54FromDiscord<clyybber> Nevermind then
17:55:19YardanicoI think we should soon start testing important packages with arc too? on the CI i mena
17:55:21Yardanico*mean
17:55:32Yardanicoonce we have deepCopy and shallowCopy in arc :)
17:55:45Yardanicohttps://github.com/nim-lang/Nim/issues/13997
17:55:46disbotARC: deepCopy in new runtime feature missing, do we have alternatives?
17:56:48shashlickdisruptek: made some more fixes for clyybber
17:57:18shashlickit will be 0.5.0 now since the nimble version has changed, still haven't tagged since i'm midway fixing the noHeader issue
17:57:22*fredrikhr quit (Ping timeout: 256 seconds)
17:58:01shashlickclyybber had issues with specifying --path
18:03:59*reversem3 left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
18:10:49*avatarfighter joined #nim
18:11:14dom96My god, what has CanYa done to the Bountysource site
18:11:39FromDiscord<Recruit_main707> is while more or less eficient than a for loop? its not right? they are just goto in asm
18:12:03dom96We're still getting $600 there (amazing) but the site is so badly broken I cannot access any admin-side info
18:25:15FromGitter<alehander92> heyy
18:25:22FromGitter<alehander92> is it ok to call an async function
18:25:29FromGitter<alehander92> in a callback procedure for another future?
18:26:09FromGitter<alehander92> i get some gc errors like http://ix.io/2laO
18:29:48PMunchdom96, well that sucks..
18:36:41*sirikon left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
18:36:44*vycb[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
18:37:08*fredrikhr joined #nim
18:43:54*terps quit (Ping timeout: 244 seconds)
18:55:42Yardanicomumble be like
18:55:43Yardanicohttps://i.imgur.com/2P698o2.png
18:56:54*zacharyc1rter quit (Remote host closed the connection)
18:56:54*zacharycarter quit (Remote host closed the connection)
18:56:54*zacharyc2rter quit (Remote host closed the connection)
18:58:46*zacharycarter joined #nim
19:02:46PMunchHmm, how hard would it be to set up a neural network that takes one byte of input and tries to draw a character of fixed size? Basically a reverse OCR.
19:04:43Zevvnot harder them am OCR network I guess
19:04:52Zevvit'll have to look at its own output to learn from that
19:05:26FromDiscord<Technisha Circuit> Is there a hjson package for Nim?
19:05:36someunknownuserPMunch: You would probably want to use a GAN architecture for that.
19:05:41FromDiscord<Technisha Circuit> Json != Hjson
19:06:08PMunchZevv, I mean it would be super easy to generate images of what each character is supposed to look like
19:06:25PMunchSo the training data set should be pretty simple
19:06:51PMunchHmm, GAN sounds familiar.. Been way too long since I've looked at this kind of stuff..
19:06:56*Vladar quit (Quit: Leaving)
19:07:59someunknownuserI was recently looking into GANs and stumbled upon this article (using Keras and Python): https://medium.com/@mattiaspinelli/simple-generative-adversarial-network-gans-with-keras-1fe578e44a87 I however did not try the example myself.
19:07:59PMunchOh right, one of those thingss
19:08:08PMunchYes, that might be what you'd need
19:08:14*sagax quit (Ping timeout: 260 seconds)
19:09:04PMunch"without making identical copies", I wouldn't mind that though..
19:09:33someunknownuserI do not know how difficult it might be to translate / replicate something like this in nim. I am aware that there are some deep learning frameworks for nim, but I am not too familiar with any of them sadly.
19:11:19*narimiran joined #nim
19:11:35FromDiscord<InventorMatt> arraymancer is probably the best framework for it in nim
19:11:39PMunch@mratsim, any pointers?
19:12:02*terps joined #nim
19:15:17leorizeit somehow concerns me that a parser need deepCopy
19:16:01*chapl joined #nim
19:16:07leorizethen I realised that it doesn't and the author just assumed that Nim has python semantics :P
19:16:12PMunchleorize, are you looking at parsetoml?
19:16:16leorizeyep
19:16:26ZevvI might be naive here, but what is the technical issue with deepcopy? cycles?
19:16:32FromDiscord<mratsim> GANs are too complex for Arraymancer right now
19:16:33PMunchYeah that entire project is a bit of a mess..
19:16:50FromDiscord<mratsim> I didn't implement, the Instance Normalization layer iirc
19:16:56PMunchIt was inherited from someone else, and with new TOML versions it has grown increasingly hairy..
19:16:59leorizePMunch: I started writing my own toml parser because I was scared of that code
19:17:11leorizebut I never wrote more than the lexer :P
19:17:30PMunchmratsim, could a more traditional network work for this?
19:17:32leorizeZevv: the issue is RTTI
19:17:57PMunchleorize, yes it isn't the best.. But it has 100% coverage of the TOML spec IIRC
19:18:16FromDiscord<mratsim> an autoencoder would work
19:18:19leorizeZevv: not much of a problem for simple types, but it's a problem for inherited refs afaict
19:18:32FromDiscord<mratsim> but I would miss deconvolution in Arraymancer I think :p
19:18:47Zevvleorize: Ah right, that makes sense
19:18:49FromDiscord<mratsim> have to check out, it's been a while that I looked into those deep learning arch
19:20:33FromDiscord<mratsim> Basically, it's a super pain to write gradients manually and then go and do them on CPU, Cuda and OpenCL and then optimize them without breaking the gradient
19:20:41FromDiscord<mratsim> so I wanted to write a compile
19:20:45FromDiscord<mratsim> compiler*
19:20:55FromDiscord<mratsim> but then I need multithreading that is better than OpenMP
19:20:55*Guest12311 quit (Ping timeout: 246 seconds)
19:21:05FromDiscord<mratsim> and then you don't have time anymore :p
19:21:29*dadada joined #nim
19:21:37PMunchHaha, classic
19:21:41*chapl quit (Remote host closed the connection)
19:21:53*dadada is now known as Guest15871
19:22:14*monokrom quit (Ping timeout: 240 seconds)
19:26:55skrylar[m]Yardanico: hash tables allocate blocks of memory and not all of that is used (fill rate), although some linear probing ones will push the fill rate a bit more (ex. robinhoods, the one i did a port for.) trees don't alloc more than they need but they also aren't O(1)
19:27:34*ertp07 quit (Ping timeout: 256 seconds)
19:28:22skrylar[m]@Recruit_main707 i largely did that (https://github.com/Skrylar/skflatbuffers) but somehow people keep forgetting and then mentioning it again xD
19:29:47*ertp07 joined #nim
19:31:40*tane joined #nim
19:32:08FromGitter<alehander92> mratsim, ohh
19:38:09*terps quit (Ping timeout: 244 seconds)
19:43:53*rockcavera joined #nim
19:44:17*beatmox quit (Quit: ...)
19:45:30*PMunch quit (Quit: leaving)
19:45:54*PMunch joined #nim
19:46:43*PMunch quit (Remote host closed the connection)
19:47:19FromDiscord<mratsim> @treeform do you plan to publish Greenlet on nimble?
19:47:38FromDiscord<treeform> No they don't work well.
19:47:50FromDiscord<mratsim> ah, what's the issue?
19:48:18FromDiscord<treeform> there no i/o code that uses them.
19:48:36FromDiscord<treeform> so its only a switching mechanism, it needs whole i/o stack written.
19:48:48FromDiscord<mratsim> well, I think it's perfect fit for my need 😛
19:48:55FromDiscord<treeform> Also GC issues.
19:49:05FromDiscord<treeform> but I think arc made them work.
19:49:19FromDiscord<treeform> they did not work with refc gc
19:49:36FromDiscord<mratsim> not a problem for me either but I can submodule your repo
19:49:42FromDiscord<treeform> After greenlets, I looked into windows fibers
19:49:52FromDiscord<treeform> I had more luck with fibers, but windows only.
19:50:24FromDiscord<mratsim> Use case is described here: https://github.com/nim-lang/RFCs/issues/222
19:50:24FromDiscord<mratsim>
19:50:25FromDiscord<mratsim> But basically to debug concurrent data structures, I need precise control of threads interleaving.
19:50:27disbotCorrect-by-construction Nim programs ; snippet at 12https://play.nim-lang.org/#ix=2lbm
19:50:50FromDiscord<treeform> Fibers is a low level threading like API that works on windows. That give you more control. It works with windows I/O.
19:51:08FromDiscord<treeform> I wish linux had a similar API but linux does not.
19:51:14FromDiscord<treeform> After all this learning I just use threads...
19:51:21FromDiscord<treeform> Threads work well enough for me.
19:52:38FromDiscord<treeform> @mratsim thats RFC is pretty cool.
19:52:43FromDiscord<treeform> @mratsim that RFC is pretty cool.
19:52:57FromDiscord<mratsim> (on something, back in 10min)
19:55:53FromDiscord<mratsim> Basically I need to find bugs on concurrent data structure I need to simulate threads and need to control when they suspend and when they resume
19:56:27FromDiscord<treeform> My recommendation is to still try to use real threads.
19:56:28FromDiscord<mratsim> So I replace atomics/locks/condition variables with my own type that would suspend the "fake thread" (a coroutines) in order I decide
19:56:39FromDiscord<mratsim> I can't debug concurrent data structure with real threads
19:57:00FromDiscord<treeform> maybe try https://nim-lang.org/docs/coro.html
19:57:07FromDiscord<treeform> its part of the standard library
19:57:34FromDiscord<mratsim> I need to control their resume and suspend according to the the atomics "relaxed/acquire/release" semantics
19:57:59FromDiscord<mratsim> there is no GC-ed type because they are not threadsafe so that's not an issue and there is no IO either you don't hsare IO between threads
19:58:55FromDiscord<mratsim> also it needs very high performance because for example 3 threads that access 3 variables, it's all permutations of access A-B-C A-C-B B-A-C that needs to be explored to find concurrency bugs
19:59:05FromDiscord<mratsim> i.e. ucontext is problematic
19:59:42FromDiscord<mratsim> also x86-only is fine, that's something that is run for testing and it "simulate" so if simulation is good, it would work on any platforms
20:00:02FromDiscord<mratsim> but i'll submodule your lib that's fine
20:00:11FromDiscord<treeform> ok
20:01:30FromDiscord<treeform> My plan for greenlet was slowly transform the C parts into nim.
20:01:41FromDiscord<treeform> making it mostly nim with some assembly
20:01:43FromDiscord<mratsim> as an example, when I formally verified this data structure that wakeups sleeping threads, it's 9million states to explore: https://github.com/mratsim/weave/blob/master/weave/cross_thread_com/event_notifiers.nim
20:01:52FromDiscord<mratsim> and it's very very simple
20:02:16FromDiscord<treeform> neat
20:02:42FromDiscord<treeform> I think you are more qualified to write some thing like "greenlet" then I am.
20:03:10FromDiscord<mratsim> well the IO part I'm unfamiliar with it so ...
20:03:24FromDiscord<mratsim> anyway, for now I'll just use greenlet
20:03:39FromDiscord<mratsim> at least now you know that it actually has a perfect use-case 😉
20:04:46FromDiscord<treeform> I also feel like most programs spend their time not in io... unless you are chat server or some thing. Most servers do some work so too... you want real threads for most things to utilize the cores.
20:05:13FromDiscord<treeform> I also really like UDP... which does not need epoll/kpoll stuff.
20:05:23FromDiscord<treeform> I also really like UDP... which does not need epoll/kpoll stuff that TCP needs.
20:05:58FromDiscord<mratsim> you can't do interesting things without IO though: no networking, no file, no display
20:06:13FromDiscord<treeform> I was thinking of experimenting of a model where you have single threaded TCP proxy that talks to your servers over UDP.
20:07:34FromDiscord<treeform> This way your process never does streaming io.
20:07:49FromDiscord<treeform> It only gets a large packet and responds with a large packet.
20:07:57FromDiscord<mratsim> I'm looking at coro, but it doesn't have the same API has createThread while greenlet does so minus point (perf not withstanding)
20:10:11*D_ quit (Ping timeout: 244 seconds)
20:10:36*Guest15871 is now known as dadada
20:11:05dadadathere's no proc to convert a treeRepr() string into code again or into a astGenRepr form?
20:11:37*idf quit (Ping timeout: 264 seconds)
20:13:29*D_ joined #nim
20:14:57Araqdadada: macros.parseExpr
20:21:49*narimiran quit (Ping timeout: 246 seconds)
20:22:05FromGitter<deech> Dumb q, how do I write a seq of strings to a file using the standard library? I only see a `writeLine` that takes `varargs[string ...]`.
20:22:56FromDiscord<mratsim> seq can be passed to varargs
20:23:51FromGitter<deech> noice!
20:43:14*silvernode quit (Ping timeout: 256 seconds)
20:47:08*idf joined #nim
20:50:10dadadasurvey, who here uses vim keybindings (independend from editor) besides me?
20:52:20skrylar[m]i used to have the whole emacs+evil thing for a while
20:52:57dadadame, too, that's how I started to learn vim :-)
20:55:21*ertp07 quit (Read error: Connection reset by peer)
20:56:26*ertp07 joined #nim
20:59:23*beatmox_ joined #nim
21:02:28*GlorygirlBi joined #nim
21:03:54voltist@Vindaar I think the issue is just with SHL1. The other channels still have the problem with the form of the equation, but once that is corrected they seem to match the graphs.
21:03:55*matti quit ()
21:04:09voltistAlthough I've only tried two more
21:04:25*matti joined #nim
21:05:16*GlorygirlBi quit (Client Quit)
21:05:42FromGitter<Vindaar> @voltist: That's good to hear. It's also possible the shape for SHL1 isn't actually as different as my plot makes it appear, because of my approach to get the data
21:10:52voltistIt's different enough that I'm hesitant to actually implement anything for my research until the authors get back to me
21:12:28FromGitter<Vindaar> yeah, I understand that. are you working on something that builds on this?
21:14:07FromGitter<Willyboar> hmmm this is strange. Does asynchttpserver has problem with 1.2.0?
21:28:57disruptekshow us the paste.
21:29:04FromDiscord<treeform> Araq, could you merge some of my fixes for cairo? https://github.com/nim-lang/cairo/pull/15/files I also added CI system to run tests.
21:29:05disbotCouple of typo fixes with "_".
21:30:34Araqhaven't you heard? I'm taking a holiday
21:31:29*idf quit (Ping timeout: 246 seconds)
21:31:38YardanicoAraq: is it because it's holidays in Russia ? :P
21:32:13*avatarfighter quit (Remote host closed the connection)
21:32:13Yardanicokrux clyybber disruptek me in mumble, i like that activity
21:32:24FromGitter<Willyboar> Araq: https://www.youtube.com/watch?v=IBtGmxU1wzs
21:32:24Araqno... because of my mother
21:32:24*avatarfighter joined #nim
21:33:41*livcd quit (Remote host closed the connection)
21:33:48voltist@Vindaar Yeah I'm interested in using their experimentally-acquired parameters for my simulations
21:37:00*tane quit (Quit: Leaving)
21:44:46*NimBot joined #nim
21:46:46liblq-devI'm getting an error with concepts that I can't quite understand
21:46:54*solitudesf quit (Ping timeout: 272 seconds)
21:46:56liblq-devI have a proc called `draw` in one module, it's public
21:47:29liblq-devthen there's this concept https://github.com/liquid600pgm/aglet/blob/master/src/aglet/target.nim#L13
21:47:42liblq-devbut for some reason it doesn't match my proc
21:48:28liblq-devhttp://ix.io/2lbT ← this is the error message
21:49:31FromGitter<Vindaar> @voltist: Would be interested in hearing more about it, if you can share. ⏎ But first I gotta sleep.. Good night everyone!
22:03:00*someunknownuser quit (Quit: someunknownuser)
22:05:56*liblq-dev quit (Quit: WeeChat 2.8)
22:34:48*abm quit (Read error: Connection reset by peer)
22:36:03*leorize quit (Ping timeout: 240 seconds)
22:41:11FromDiscord<queersorceress> hmmm, @dom96 i'm working on writing a test case for the PR i put up and i'm curious as to why the test site for nimble is setup to run the binary and interpolate the behavior/output rather than attaching tests to the interfaces directly
22:45:06Yardanicobecause it's not that easy to do with nim :)
22:45:58*natrys quit (Quit: natrys)
22:46:50FromDiscord<queersorceress> why not? it just requires the symbols be exported
22:53:16disruptekgonna grab some food; bbiab.
22:53:24disruptekno, enemas.
22:53:24FromDiscord<Rika> liblq-dev: <Frame, Program, Mesh[ttriangle.Vertex]> -> <Mesh, OpenGl>; afaik draw must definitely be only 2 parameters and the order must bethe same
22:57:49skrylar[m]aren't concepts broken in nim o_O
22:59:19skrylar[m]last i tried you can just wing it and the nim compiler let you try to call stuff that may not be available on the type your generic resolves to; it will be happy if it can, and just treat it like the resolved generic wrote bum code if it can't, so.
22:59:47skrylar[m]which is nice because so many languages try to make you specify every litle thing and then half the complexity comes from the specification to be allowed to do the thing you already know is gonna work if it just tried it xD
22:59:55FromDiscord<Avahe> @Elegant Beef so I just accidentally fixed the issue with fullscreen applications
23:00:14skrylar[m]accidental fixing o/
23:00:30FromDiscord<Never Listen To Beef> lol
23:00:31FromDiscord<Never Listen To Beef> How?
23:00:59FromDiscord<Avahe> Removed SubstructureRedirectMask from clients' event mask
23:01:06FromDiscord<Avahe> It actually fixed like 5 bugs at once
23:01:30FromDiscord<Avahe> 100% accidental after spending 2.5 days trying to fix this
23:01:47FromDiscord<Never Listen To Beef> so now you get the property change notification when you fullscreen a window?
23:02:06FromDiscord<Avahe> Well a ClientMessage
23:02:15FromDiscord<Avahe> I'm not listening for PropertyNotify at all
23:03:07FromDiscord<Never Listen To Beef> What mask is required for Client Messages?
23:06:43FromDiscord<Avahe> Just ClientMessage (same way you add a listener for map requests, etc)
23:08:00*ertp07 quit (Ping timeout: 256 seconds)
23:09:24*ertp07 joined #nim
23:18:05skrylar[m]hmmh. seems i should look over MuVM and WASM
23:19:28skrylar[m]altho i don't think wasm is meant for self mutating systems.
23:20:58skrylar[m]anyway if some mu-esque vm were to hypothetically appear, wouldn't that solve the nimscript/repl/compile time evaluation feature set
23:27:01*konvertex quit (Ping timeout: 256 seconds)
23:30:11*leorize joined #nim
23:50:40*krux02_ joined #nim
23:53:54*krux02 quit (Ping timeout: 240 seconds)
23:55:21zacharycartergg
23:55:25zacharycarterwhoops sorry
23:58:44*Trustable quit (Remote host closed the connection)