00:18:06 | * | avatarfighter joined #nim |
00:27:10 | leorize | Prestige: 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:00 | FromGitter | <awr1> some do |
01:04:07 | FromGitter | <awr1> seems that Xlib just returns a status |
01:04:55 | FromGitter | <awr1> the issue is that a /0 gets put in the middle of the string |
01:05:21 | FromGitter | <awr1> thus it needs to be resized to a smaller extent |
01:06:10 | FromGitter | <awr1> `cstring.len` finds the nullchar |
01:15:55 | * | dddddd quit (Remote host closed the connection) |
01:22:51 | disruptek | i thought we solved this problem a few days ago. |
01:25:01 | disruptek | good evening, peeps. |
01:26:55 | Prestige | o/ |
01:45:07 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:46:49 | * | chemist69 joined #nim |
02:03:36 | dadada | Nim provides a OS independend method to get the config dir, getConfigDir |
02:04:06 | dadada | but for application data there isn't an analog proc |
02:04:07 | FromDiscord | <Rika> who are you answering |
02:04:15 | dadada | I'm observing |
02:04:38 | dadada | I'd like to get $HOME/.local/share/ OS independently.... |
02:05:36 | * | theelous3 quit (Read error: Connection reset by peer) |
02:05:41 | FromDiscord | <Rika> theres no counterpart for that in windows i dont think |
02:06:21 | dadada | Rika, not a regular Windows user here, but I think I've seen something like user specific application data folders |
02:06:44 | FromDiscord | <Rika> AppData/Roaming? |
02:06:49 | FromDiscord | <Rika> thats gotten with getConfigDir |
02:09:26 | dadada | well... 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:37 | dadada | s/strange/straight |
02:09:39 | dadada | lol |
02:09:44 | FromDiscord | <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:45 | dadada | it's always strange I gotta admit |
02:09:49 | FromDiscord | <Rika> USERPROFILE is an env |
02:10:05 | FromDiscord | <Rika> and regular data (non portable data) in AppData/Local |
02:10:32 | dadada | well, so there is a distinction |
02:10:37 | FromDiscord | <Rika> you can always create a new proc with the data i now told you |
02:10:39 | FromDiscord | <Rika> not exactly |
02:10:48 | FromDiscord | <Rika> portable data (not only config) can go in Roaming |
02:11:07 | FromDiscord | <Rika> anything that doesnt make sense moving goes into Local |
02:11:34 | FromDiscord | <Rika> like some sort of large cache or something, though that goes elsewhere (i dont have a good example basically) |
02:12:23 | dadada | lucky that less than 2% worldwide uses Windows |
02:12:53 | dadada | oh wait, I live in a dreamworld, ... |
02:13:16 | FromDiscord | <Never Listen To Beef> lol |
02:13:26 | FromDiscord | <Never Listen To Beef> Hey linux went up a bit over the past bit |
02:13:52 | FromDiscord | <Never Listen To Beef> Sooo close to 1% of steam users! |
02:14:31 | dadada | you actually have to care about idiosyncracies of Windows, just because so many people use it... |
02:14:58 | dadada | Never Listen To Beef: it's probably a little higher when you account for Wine being confused with Windows |
02:15:15 | FromDiscord | <Never Listen To Beef> Wut? |
02:15:24 | dadada | maybe 1.2% :-) |
02:15:31 | FromDiscord | <Never Listen To Beef> Steam stats is from hardware surveys and with steam play nobody is using steam through wine that often |
02:16:11 | dadada | there are even people using virtualization to play Windows games on Linux, so they technically use both |
02:16:18 | dadada | GPU pass through |
02:17:13 | FromDiscord | <Never Listen To Beef> Yea i know that |
02:17:33 | FromDiscord | <Never Listen To Beef> but the wine thing isnt really a thing with steam proton anymore, except a few cases of games |
02:18:23 | dadada | I wont go into a discussion of steam proton being a beefed up (get the pun?) wine |
02:18:49 | FromDiscord | <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:06 | FromDiscord | <Never Listen To Beef> The virtualization is an issue for accuracy though |
02:19:44 | leorize | if they use virtualization to use steam, just count them in as a windows user |
02:19:56 | dadada | don'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:14 | FromDiscord | <Never Listen To Beef> Im certainly not, it also matters who steam asks for a survey |
02:20:21 | FromDiscord | <Never Listen To Beef> And when |
02:20:30 | FromDiscord | <Never Listen To Beef> It's a large iffy data noise |
02:20:38 | dadada | leorize: 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:47 | leorize | steam data is correct only when you use it to account for steam users |
02:21:59 | leorize | don't try to extrapolate the amount of linux users from steam lol |
02:22:15 | FromDiscord | <Never Listen To Beef> Hey im a gamer/gamedev it's the only base that matters 😛 |
02:22:37 | * | muffindrake joined #nim |
02:23:14 | leorize | be a real dev and release a linux version |
02:23:20 | leorize | :P |
02:24:20 | dadada | I second that |
02:24:37 | FromDiscord | <Never Listen To Beef> I uh, always do release a linux version for anything i make |
02:24:50 | dadada | :P fine |
02:24:56 | FromDiscord | <Never Listen To Beef> 100% of my gamejam games have linux versions |
02:25:01 | FromDiscord | <Never Listen To Beef> So fight me! |
02:25:17 | dadada | okay, enough ranting, I' |
02:25:24 | dadada | ve some work to do |
02:27:30 | * | Jjp137 joined #nim |
02:34:51 | skrylar[m] | heh. must be fun to do things other than shave yaks :B |
02:35:25 | FromDiscord | <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:26 | FromDiscord | <Never Listen To Beef> https://hatebin.com/tzsjbrfuiq |
02:35:36 | FromDiscord | <Never Listen To Beef> No one said im an employed gamedev 😄 |
02:36:55 | FromDiscord | <Never Listen To Beef> I do have libvulkan.so.1 and also have modern vulkan drivers |
02:45:25 | leorize | you have them |
02:45:29 | leorize | you just didn't link to them |
02:46:18 | FromDiscord | <Never Listen To Beef> I mean it should link, i did ` {.link: "/usr/lib/x86_64-linux-gnu/libvulkan.so.1".}` |
02:46:32 | leorize | yea that's why it didn't link |
02:46:55 | leorize | do this instead `{.link: "-lvulkan".}` |
02:47:06 | leorize | or `{.passL: "-lvulkan".}` |
02:47:09 | leorize | try both and see what works |
02:47:56 | FromDiscord | <Never Listen To Beef> Latter worked |
02:48:15 | leorize | technically you'd have to use `{.passL: staticExec("pkg-config --libs vulkan").}` |
02:48:24 | leorize | but "-lvulkan" should work for most system |
02:48:38 | leorize | use the above if you want cross-distro compatibility |
02:48:47 | skrylar[m] | this potato only runs gl 2.1 :X |
02:48:50 | leorize | (though the only distro this would add support for is NixOS) |
02:49:15 | FromDiscord | <Never Listen To Beef> Nah gotta support the only good gaming distro Ubuntu |
02:49:17 | FromDiscord | <Never Listen To Beef> 😛 |
02:49:56 | skrylar[m] | shuttleworth is too cozy with MS these days for my taste |
02:50:50 | FromDiscord | <Never Listen To Beef> If i werent using a ubuntu derived i'd probably use debian, cause im too silly |
02:56:00 | FromDiscord | <Rika> i was thinking of trying out nixos |
02:59:31 | skrylar[m] | its painful for a desktop |
03:09:45 | disruptek | i thought you just use it for your dev env. |
03:10:50 | Prestige | @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:11 | Prestige | Going to try digging through ff's source code |
03:11:20 | * | Romanson joined #nim |
03:11:41 | disruptek | the bot crashed because it opened too many files. |
03:11:51 | FromDiscord | <Rika> nice |
03:12:06 | FromDiscord | <Rika> skrylar: theres a reason i never went past thinking about it |
03:12:24 | disruptek | rika: chickened out? |
03:12:36 | FromDiscord | <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:55 | zacharyc1rter | ooph someone at work just said JSON returned from curl was not human readable |
04:05:59 | zacharyc1rter | I 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:32 | nisstyre | pipe it to jq |
04:08:27 | * | avatarfighter quit (Ping timeout: 240 seconds) |
04:08:37 | zacharyc1rter | no I realize that |
04:09:01 | zacharyc1rter | but json is definitely human readable |
04:09:41 | zacharyc1rter | jq just pretty prints it |
04:10:03 | nisstyre | it depends on your definition of human readable |
04:10:16 | zacharyc1rter | the definition is that a human can read it lol |
04:10:28 | nisstyre | ok I can read a hex dump from wireshark |
04:10:34 | nisstyre | does that make it "human readable" ? |
04:10:50 | zacharyc1rter | yes |
04:10:54 | nisstyre | ok fair enough then |
04:12:40 | FromGitter | <awr1> https://github.com/ebran/grim this is really interesting, it reminds me of DOT |
04:14:30 | zacharyc1rter | looks neat |
04:17:17 | FromDiscord | <Never Listen To Beef> Everything is human readable assuming the human is smart enough |
04:19:06 | zacharyc1rter | I mean true but I just mean representations that don't require the assistance of tooling to interpret |
04:19:36 | zacharyc1rter | and json, when it's not pretty printed, is certainly decipherable |
04:39:57 | * | avatarfighter joined #nim |
05:12:29 | * | narimiran joined #nim |
05:17:52 | FromGitter | <bung87> anyone intersted ? https://github.com/bung87/ts2nim/blob/master/__tests__/compiler-spec.ts |
05:18:10 | FromGitter | <bung87> typescript to nim transpiler |
05:22:16 | FromDiscord | <Rika> ooo |
05:23:06 | FromDiscord | <Rika> bung87 make /** comments into ## comments, perhaps? |
05:24:05 | FromGitter | <bung87> yeah ,that's right, checked std comment style just now |
05:24:14 | FromDiscord | <Rika> also why are `number`s `int`s? there arent any int types in js |
05:28:13 | FromGitter | <bung87> js internal number is int64 |
05:29:06 | FromDiscord | <Rika> well it literally says here https://www.typescriptlang.org/docs/handbook/basic-types.html#number |
05:29:09 | FromDiscord | <Rika> that theyre all floats |
05:31:08 | FromDiscord | <Rika> bung87: more issues, ## is not multiline comment, it is for documentation comment, just like /** (double asterisk) js comment |
05:31:09 | FromGitter | <bung87> ok, that's a plobem, I thought int is more common for practice. |
05:31:19 | FromDiscord | <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:43 | FromGitter | <bung87> thanks , change it then |
05:33:09 | FromDiscord | <Rika> i dont know any typescript but i can fix the test |
05:33:45 | FromGitter | <bung87> I'll fix current problem you reported |
05:34:38 | FromDiscord | <Rika> i wish i could help XD but its in typescript not nim so i really cannot |
05:36:11 | FromGitter | <bung87> I just thought someone has compiler experience could help me design the code pattern, make it more maintainable, |
05:36:47 | FromDiscord | <Rika> i dont have that either, sorry 😦 |
05:37:37 | FromDiscord | <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:01 | FromGitter | <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:02 | silvernode | I can't figure out why I am not getting any output on line 24 https://play.nim-lang.org/#ix=2l6S |
06:01:41 | silvernode | I'm basically just playing with objects and passing data around |
06:02:37 | FromDiscord | <Rika> because x and y are 0? |
06:02:57 | FromDiscord | <Rika> changing them to 1 gives a seq seq int w/ 0 |
06:03:26 | silvernode | I thought that might be it, but I thought it would still print 0 |
06:03:32 | FromDiscord | <Rika> why would it? |
06:03:43 | FromDiscord | <Rika> it makes 0 seqs with 0 0-values in it |
06:04:08 | FromDiscord | <Rika> x = 0, 0 seqs in the seq |
06:04:17 | FromDiscord | <Rika> y = 0, 0 0-values inside the nested seq |
06:06:07 | silvernode | Ah, 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:17 | FromDiscord | <Rika> newSeqWith(n, things) |
06:07:17 | FromDiscord | <Rika> it creates a new seq with n things in it |
06:08:04 | FromDiscord | <Rika> newSeq[type](n) |
06:08:04 | FromDiscord | <Rika> it creates a new seq with n of type (uses default values) |
06:08:24 | FromDiscord | <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:57 | silvernode | I 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:47 | silvernode | I 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:15 | FromDiscord | <Rika> if the array isnt sparse it would just be better to have an array of positions |
06:14:22 | FromDiscord | <Rika> i mean if it ***is*** sparse |
06:15:02 | FromDiscord | <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:10 | silvernode | I can't change arrays in Nim though, correct? |
06:16:58 | FromDiscord | <Rika> i mean, array in terms of general terminology |
06:17:08 | FromDiscord | <Rika> you cant change the size of an array but you can change the contents |
06:18:20 | silvernode | ah ok |
06:18:20 | silvernode | So for a grid I would want an array inside of an array |
06:18:42 | FromDiscord | <Rika> okay lets go back to nim terminology now |
06:18:58 | FromDiscord | <Rika> so if your grid has many entities maybe a seq in a seq is better |
06:19:05 | FromDiscord | <Rika> many meaning like half the thing is filled |
06:19:13 | FromDiscord | <Rika> (also know that im no game programmer) |
06:19:38 | FromDiscord | <Rika> but if it's just a few entities like let's say 30 entities |
06:19:48 | FromDiscord | <Rika> then a single seq storing positions should be fine, no? |
06:20:26 | FromDiscord | <Rika> also your choice if you want SoA or AoS, but SoA is much harder to use |
06:20:28 | FromDiscord | <Rika> https://en.wikipedia.org/wiki/AoS_and_SoA |
06:20:47 | FromDiscord | <Never Listen To Beef> I typically use 1D arrays regardless |
06:20:47 | FromDiscord | <Rika> (though this might be overwhelming, since this is only a console game, no?) |
06:20:58 | FromDiscord | <Rika> ah yeah, forgot that |
06:21:20 | FromDiscord | <Rika> if your field is square just store the length of one row and modulo the index |
06:21:23 | FromDiscord | <Rika> to get the column |
06:21:31 | FromDiscord | <Never Listen To Beef> You can map n dimensiona arrays into a single dimension array |
06:21:42 | FromDiscord | <Rika> yeah yeah yeah totally forgot about that |
06:23:01 | FromDiscord | <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:25 | FromDiscord | <Rika> there probably are |
06:27:22 | * | avatarfighter quit (Ping timeout: 260 seconds) |
06:33:58 | silvernode | Well 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:37 | silvernode | My 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:03 | silvernode | So 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:00 | FromDiscord | <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:51 | silvernode | I wish I didn' have to work today. Time to clock in now, have a good day everyone. |
06:52:06 | FromDiscord | <Rika> see you |
06:53:52 | PMunch | Hmm, 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:52 | PMunch | custom options. But `withCustomOpts: <if we have custom opts> do: <if we don't have custom opts>` reads really weird.. |
06:54:22 | PMunch | Allowing withCustomOpts to have an `else` clause would be amazing |
06:54:23 | FromDiscord | <Rika> "branches"? |
06:54:47 | FromDiscord | <Rika> oh |
06:54:48 | PMunch | Of course as an extension it would be even better if it could take elif and of branches as well.. |
06:55:07 | FromDiscord | <Rika> ***its boring dsl time*** |
06:55:30 | PMunch | Yeah, DSLs could solve this, but then everything would be in a block |
06:55:44 | FromDiscord | <Rika> block? not really no? |
06:55:55 | PMunch | Yes? |
06:56:09 | FromDiscord | <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:11 | FromDiscord | <Rika> right? |
06:56:17 | PMunch | Like you would need something that took all the code `else` branch included |
06:56:32 | FromDiscord | <Rika> ah thats what you mean, well yes |
06:56:37 | * | silvernode quit (Ping timeout: 256 seconds) |
06:56:38 | PMunch | Yes |
06:56:47 | FromDiscord | <Rika> a visual block is what you mean |
06:56:51 | PMunch | Yes |
06:56:59 | FromDiscord | <Rika> i dont see the issue but thats my opinioon |
06:57:27 | PMunch | Like you would need one macro customOpts: <DSL code> |
06:57:39 | FromDiscord | <Rika> mm |
06:57:53 | PMunch | Where <DSL code> could be something like if hasCustomOpts: <something> else: <something else> |
06:58:03 | PMunch | Which might be fine for this case |
06:58:22 | PMunch | But I've definitely missed this in the past.. |
06:58:38 | PMunch | And I don't like to wrap everything in DSLs.. |
06:58:53 | * | idf joined #nim |
06:59:20 | skrylar[m] | well its nothing special, but logs. https://git.sr.ht/~skrylar/sklog |
07:03:34 | PMunch | Hmm, that seems cool |
07:04:01 | PMunch | How would you say it compares to e.g. chronicles? |
07:04:09 | * | Senketsu joined #nim |
07:05:38 | skrylar[m] | never heard of |
07:05:56 | PMunch | https://github.com/status-im/nim-chronicles |
07:06:16 | * | Guest83905 quit (Ping timeout: 246 seconds) |
07:06:19 | * | sz0 joined #nim |
07:10:37 | PMunch | Oh 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:05 | Prestige | PMunch: 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:31 | PMunch | I've worked a fair bit with it, but it's been a while |
07:15:49 | Prestige | I think mostly gimp and firefox have been an issue, been trying to listen for events to make applications fullscreen |
07:16:10 | Prestige | ff has been a "special" case, seems like I'm not receiving anything |
07:18:00 | PMunch | Yeah, some applications don't behave very well.. |
07:18:32 | Prestige | Just 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:49 | PMunch | I unfortunately haven't gotten as far with mine as to try and run too many different programs under it.. |
07:19:51 | Prestige | I 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:53 | PMunch | Tags? |
07:21:07 | Prestige | Yeah, using a tag system as opposed to workspaces |
07:21:30 | PMunch | Hmm, interesting |
07:21:39 | Prestige | sort of allows you to add windows to multiple "workspaces" or view multiple workspaces at the same time |
07:21:44 | PMunch | That's why you were asking about showing one window on multiple workspaces? |
07:21:53 | PMunch | Haha, yeah |
07:22:30 | Prestige | I'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:34 | PMunch | Haha, yea wasn't that last Friday or something? :P |
07:23:44 | Prestige | Probably lol |
07:23:54 | PMunch | I have kind of the same feeling, everything feels super long ago. But the days feel super short |
07:23:58 | Prestige | I am still planning on helping with nimlsp but I want to get my wm to beta first |
07:24:15 | PMunch | I was actually planning on doing something on nimlsp today |
07:24:32 | PMunch | I've realised I need to rewrite quite a bit in my WM to go forwards with it.. |
07:25:17 | Prestige | oh 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:46 | FromDiscord | <Rika> it should do the latter |
07:25:49 | FromDiscord | <Rika> imo |
07:26:38 | Prestige | hm 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:45 | Prestige | Perhaps I should just read the docs again |
07:26:52 | Prestige | when it isn't 3am |
07:27:13 | PMunch | Haha, remember that all of this is built on top of nimsuggest |
07:27:35 | PMunch | So issues like that are likely to stem from there |
07:27:51 | PMunch | Well, it might actually give both now that I think about it |
07:28:02 | PMunch | And in that case it shouldn't be that hard |
07:30:01 | * | Romanson quit (Quit: Connection closed for inactivity) |
07:34:28 | PMunch | Hint: 21944 LOC; 865.383 sec; 20.771GiB peakmem |
07:34:28 | PMunch | Tihi |
07:34:54 | Prestige | :o |
07:35:33 | PMunch | Just the same shenanigans as yesterday |
07:35:40 | Prestige | Oh, lol |
07:35:45 | PMunch | GCC was also using a solid 15Gb at the same time |
07:36:01 | Prestige | That's nuts |
07:36:58 | * | Guest30659 quit (Ping timeout: 272 seconds) |
07:38:47 | skrylar[m] | grin might have been neat for some of the debug dumps i had to deal with |
07:39:50 | skrylar[m] | yea chronicles has a lot more going on |
07:40:45 | PMunch | Wait, is "grin" a program, or was that meant as an expression? :P |
07:40:58 | PMunch | But yeah, chronicles is pretty neat. Very featured |
07:40:59 | skrylar[m] | its a lib that was linked earlier |
07:41:03 | PMunch | Oh |
07:41:20 | PMunch | I was just wondering how sklog was different |
07:41:23 | skrylar[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:29 | PMunch | I can see it is standalone, that is neat |
07:41:46 | PMunch | Oh yeah, I can totally see that argument |
07:42:28 | skrylar[m] | i would like to add in hawktracer-esque telemetry |
07:42:31 | * | dadada__ joined #nim |
07:42:58 | * | NimBot joined #nim |
07:43:08 | skrylar[m] | basic tracing https://www.hawktracer.org/ |
07:43:54 | PMunch | Huh, can't find anyone mentioning grin.. |
07:45:18 | skrylar[m] | FromGitter <awr1> https://github.com/ebran/grim this is really interesting, it reminds me of DOT |
07:47:01 | PMunch | Dot is such a nice tool |
07:47:21 | PMunch | Basically turn anything that can output to stdout to pretty graphs :) |
07:48:32 | Zevv | dot++ |
07:51:34 | * | Anastasia joined #nim |
07:52:57 | skrylar[m] | oh that is a lot of machinery in chronicles |
07:53:17 | PMunch | Yardanico, I managed to compile and run the generated code! |
07:53:44 | PMunch | Took ~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:07 | Prestige | PMunch: how much ram do u have man, lol |
07:54:23 | PMunch | Haha, this is my work machine. It has 64Gb |
07:54:29 | Prestige | Ah, nice. |
07:54:31 | Araq | PMunch, cool... :-) |
07:54:53 | PMunch | I think the IT guy just wanted to build a really high-spec machine, it's waaaay to overpowered for what I do |
07:55:44 | PMunch | But 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:55 | FromGitter | <bung87> 64Gb mem, fit working deep learnning things... |
07:56:17 | FromDiscord | <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:38 | PMunch | Recruit_main707, what in Nim? |
07:57:57 | skrylar[m] | >multiple virtual machines ... thats probably why they stuffed it with ram |
07:58:42 | PMunch | Probably :P I have definitely noticed that I now only have 8Gb when working from home |
07:58:53 | PMunch | I'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:20 | FromDiscord | <Never Listen To Beef> I have 16GB and i've rarely ever gon over 10GB |
08:02:30 | FromDiscord | <Never Listen To Beef> People that use a lot scare me |
08:02:55 | Prestige | I go over 3 sometimes when I play games, I'm usually under 1 |
08:04:45 | PMunch | I'm currently sitting at 3.2, closing FF brings me down to 0.4.. |
08:05:19 | FromDiscord | <Rika> i'm at 5 right now, because firefox |
08:05:29 | FromDiscord | <Rika> i have a little under 600 tabs LO |
08:06:06 | FromDiscord | <Never Listen To Beef> I almost never have more like 2 tabs |
08:06:10 | * | dadada__ quit (Ping timeout: 256 seconds) |
08:06:35 | FromDiscord | <Recruit_main707> my average is 40 |
08:07:12 | PMunch | I'm at 114 now I think |
08:07:25 | PMunch | I don't really use bookmarks |
08:07:29 | PMunch | I just leave stuff open |
08:07:37 | FromDiscord | <Rika> same here |
08:08:20 | FromDiscord | <Recruit_main707> 22 only today, im improving |
08:08:26 | * | Vladar joined #nim |
08:09:38 | FromDiscord | <Rika> well i am too considering that i can go up to a thousand lol |
08:09:40 | FromDiscord | <Never Listen To Beef> Ah i use bookmarks, and close my browser completely |
08:10:00 | FromDiscord | <Rika> i also close my browser completely, its just that i save sessions |
08:10:10 | FromDiscord | <Never Listen To Beef> Yea i dont count that as completely |
08:10:26 | FromDiscord | <Never Listen To Beef> Im a weird person that dislikes saved sessions |
08:10:27 | FromDiscord | <Rika> then you have a faulty definition |
08:12:37 | * | dadada joined #nim |
08:12:50 | FromDiscord | <Never Listen To Beef> eh i never said i was dictionary |
08:13:02 | * | dadada is now known as Guest54677 |
08:14:01 | PMunch | Araq, what are your thoughts on solving 14253? |
08:14:45 | PMunch | !issue 14253 |
08:14:46 | disbot | https://github.com/nim-lang/Nim/issues/14253 -- 3Assignment to `default` leads to assignment for `nodecl` |
08:17:22 | Araq | it should just work, it would be a simple C backend improvement |
08:18:14 | PMunch | What should work though? Not assigning a value, or assigning `default`? |
08:19:01 | Araq | let x = 0 |
08:19:17 | Araq | assigning default |
08:19:34 | Araq | no need to change the language definition for better C interop |
08:22:09 | PMunch | But `= 0` not doing anything is just weird |
08:23:19 | Araq | oh hmmm |
08:23:24 | Araq | good point |
08:23:41 | PMunch | I 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:57 | Araq | the old way is var UPP {.importc, header.}: cint |
08:24:00 | PMunch | Same as importing a procedure without giving it a body |
08:24:30 | PMunch | Yeah, but if it is a const in C Nim will still allow you to generate an assignment for it.. |
08:24:37 | Araq | maybe you're right and 'let UPP' is the most natural way to write it |
08:24:40 | PMunch | Which would throw a C error |
08:25:27 | * | fredrikhr joined #nim |
08:25:45 | PMunch | It was the first thing I tried, so definitely the most natural to me :) |
08:27:27 | PMunch | It 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:35 | Araq | write an RFC already |
08:29:35 | * | krux02 joined #nim |
08:30:38 | * | Senketsu quit (Quit: WeeChat 2.8) |
08:33:03 | PMunch | Will do! |
08:34:10 | FromGitter | <timotheecour> => https://github.com/nim-lang/Nim/issues/14253#issuecomment-625110027 |
08:34:13 | disbot | ➥ Assignment to `default` leads to assignment for `nodecl` ; snippet at 12https://play.nim-lang.org/#ix=2l7t |
08:35:25 | PMunch | Wait, how did you get those working on C-time? |
08:36:13 | * | Guest54677 quit (Ping timeout: 246 seconds) |
08:41:20 | FromGitter | <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:20 | FromGitter | ... “<foo.h>".}: int = discard` |
08:41:50 | * | letto joined #nim |
08:42:36 | * | dadada__ joined #nim |
08:49:32 | FromDiscord | <Never Listen To Beef> Clearly we needd Cconst just to keep people on their feet |
08:49:35 | FromDiscord | <Never Listen To Beef> need* |
08:51:05 | FromDiscord | <Rika> c-c-c-c-const |
08:51:31 | skrylar[m] | c-c-c-cant you see. |
08:52:30 | Araq | '= discard' is not acceptable to me, it's like D's '= void', re-using keywords because keywords are expensive to add |
08:52:40 | PMunch | Exactly |
08:52:55 | PMunch | The more I thought about it the less I liked it |
08:52:56 | FromGitter | <timotheecour> i also suggested `auto` in that thread |
08:53:13 | Araq | 'auto' is the same problem, the better solution is |
08:53:16 | PMunch | auto is definitely better |
08:53:18 | Araq | let x {.importc.} |
08:53:22 | Araq | without the '=' |
08:53:30 | Araq | or maybe use the existing .noinit pragma |
08:54:25 | FromGitter | <timotheecour> that’d be a redundant pragma; it should be implied by importc. |
08:54:57 | * | ftsf quit (Ping timeout: 260 seconds) |
08:56:16 | Araq | well you can import a variable from C, set its value and claim afterward it should be immutable :-) |
08:56:36 | Araq | which is what 'let x {.importc.} = value' does :-) |
08:56:51 | FromGitter | <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:55 | Araq | but we should allow to not have the '= value' part |
08:57:49 | Araq | iirc correctly the existence of '=' is done in sema, not in the parser |
08:58:15 | skrylar[m] | is there even a lot of nim code in the wild in the first place (re: version restrictions) |
08:58:53 | skrylar[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:58 | PMunch | Yeah, you can get an empty LetSection in a macro, so it can't be an error in the parser |
08:59:36 | Araq | skrylar[m], it doesn't matter, we won't get a "lot of Nim" code when we constantly break things |
09:01:04 | FromGitter | <timotheecour> @araq I meant for `const`, not `let`; see: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5eb3ce50d898fe7a376f3031] |
09:01:09 | skrylar[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:24 | Araq | when false: |
09:01:24 | Araq | let x: int |
09:01:31 | Araq | compiles fine, no parser change required |
09:02:17 | PMunch | Better 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:21 | FromGitter | <timotheecour> but then you loose on the ability to have it work at CT, as i mentioned. |
09:02:46 | Araq | timotheecour: that's the point, you don't know the value, it comes from C |
09:02:47 | FromGitter | <timotheecour> `when false: const TEST {.importc, nodecl.}: cint` fails |
09:03:00 | FromDiscord | <clyybber> maybe we should steal "undefined" from zig? |
09:03:12 | Araq | skrylar[m], Golang doesn't break anything |
09:03:23 | PMunch | It's not undefined though, it's just not defined by us |
09:03:37 | FromGitter | <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:46 | FromDiscord | <clyybber> Yeah, emitting the `=` makes most sense here |
09:04:07 | FromDiscord | <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:13 | FromDiscord | <Never Listen To Beef> on nimble ofc |
09:05:14 | FromGitter | <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:29 | PMunch | That is the consensus I think beef |
09:06:03 | FromDiscord | <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:18 | skrylar[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:36 | Araq | timotheecour: 'const' for importc is a design with unknown problems |
09:50:02 | Araq | 'let' doesn't have any obvious problems, that's the difference |
09:50:14 | Araq | plus it doesn't need a parser patch at all |
09:50:31 | Araq | so even if you want 'const' so badly, let's please not conflate these two |
09:51:16 | FromDiscord | <Rika> haha, `let`'s |
09:52:41 | FromGitter | <timotheecour> well ok, we can have `let x: {.importc.}` and another syntax for const (`const x: {.importc.} = auto`) |
09:53:08 | FromDiscord | <Rika> how would a compile time importc work? |
09:53:09 | FromGitter | <timotheecour> (i meant `let x: {.importc.}: int` and `const x: {.importc.}: int = auto`) |
09:54:07 | FromGitter | <timotheecour> That was discussed earlier; i guess i shoudl just go ahead and submit that PR... |
09:57:50 | FromDiscord | <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:10 | FromDiscord | <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:27 | FromDiscord | <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:38 | FromDiscord | <Recruit_main707> aka: changing a few numbers |
10:12:39 | * | dadada joined #nim |
10:13:01 | * | dadada is now known as Guest7724 |
10:15:12 | FromDiscord | <Yardanico> Good morning/day/night :P |
10:15:26 | FromDiscord | <Recruit_main707> hello |
10:16:15 | PMunch | Hello Yardanico :) |
10:17:43 | FromDiscord | <Recruit_main707> is gravityzwell in this server?? |
10:18:27 | Yardanico | lemme check |
10:18:43 | Yardanico | no |
10:19:28 | FromDiscord | <Recruit_main707> time to send a few emails then |
10:20:01 | PMunch | Yardanico, did you see that I was able to compile and run the 5 letter version? |
10:20:08 | Yardanico | PMunch: yeah, impressive :) |
10:20:19 | Yardanico | both on Nim and at the C compiler |
10:20:25 | PMunch | Yeah |
10:20:34 | Yardanico | btw https://github.com/nim-lang/fusion/pull/3 how did this even happen |
10:20:35 | disbot | ➥ Hot Fix Bug |
10:20:38 | PMunch | I'm trying with 6 now, but I don't have very high hopes :P |
10:20:44 | Yardanico | btreetables.mim |
10:20:48 | Yardanico | https://github.com/nim-lang/fusion/blob/master/src/fusion/btreetables.mim |
10:20:49 | Yardanico | XD |
10:21:06 | PMunch | Hahaha |
10:23:08 | Yardanico | btw, 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:08 | Yardanico | oh wait they don't need hashing? |
10:25:11 | Yardanico | damn |
10:26:19 | Yardanico | oh, so it's a performance/memory tradeoff |
10:27:29 | * | liblq-dev joined #nim |
10:32:35 | PMunch | The 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:46 | PMunch | I 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:45 | narimiran | Yardanico: they are sorted by default |
10:39:36 | narimiran | btw, the current implementation is just a "proof of concept", and it should be optimized |
10:40:15 | narimiran | see https://github.com/nim-lang/Nim/pull/13890 for a bit more detail |
10:40:16 | disbot | ➥ [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:15 | Yardanico | matrix spam again, yay |
10:44:16 | * | wiltzutm[m] joined #nim |
10:44:47 | FromDiscord | <Rika> matrix spam? |
10:46:17 | Yardanico | matrix-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:28 | PMunch | Rika, people using Matrix can connect directly to IRC. But it's a bit flaky, so sometimes all matrix users drop and reconnect |
10:46:31 | Yardanico | ofc you can disable showing join/leave messages in the IRC client though |
10:46:44 | PMunch | But it can be useful for regular use.. |
10:46:48 | Yardanico | yeah |
10:47:08 | FromDiscord | <Rika> i have it disabled, osu's irc is pretty insane |
10:47:16 | FromDiscord | <Rika> well, when i do use irc |
10:47:20 | FromDiscord | <Rika> of course right now i am not lol |
10:48:06 | supakeen | I use weechat's smart thingy which works well and I have a shortcut to show/hide them at will. |
10:48:18 | supakeen | I think it only shows quits if someone leaves shortly after a message/mention. |
10:49:34 | Yardanico | btw nim-regex now works with arc (with that nfamacro) just fine, thanks to @cooldome for fixing it :P |
10:49:59 | Yardanico | there's https://github.com/nim-lang/Nim/issues/14251 but it's not really related to nim-regex |
10:50:02 | disbot | ➥ [ARC] Undeclared variable in C with inline pragma and iterators ; snippet at 12https://play.nim-lang.org/#ix=2l7S |
10:50:03 | Yardanico | left* |
10:50:09 | FromDiscord | <clyybber> \o/ |
10:50:23 | Yardanico | lets try the nim-regex benchmark |
10:54:45 | Yardanico | seems to be around the same which is ok |
10:54:49 | Yardanico | and in some benchmarks arc is faster |
10:55:14 | Yardanico | hmm, in some ones it's slower though :P |
10:56:02 | FromDiscord | <clyybber> Surprises me that it works at all |
10:56:04 | Yardanico | email regex is 3x slower with arc seems like |
10:56:24 | FromDiscord | <clyybber> I assumed a regex engine would use a lot of case statements |
10:56:31 | FromDiscord | <clyybber> with early exits ala break and return |
10:56:43 | Yardanico | it constructs an NFA at compile-time by default |
10:56:56 | Yardanico | so at runtime it already has the parsed regex pattern |
10:56:59 | Yardanico | but yeah |
10:57:15 | FromDiscord | <clyybber> Yeah, so it constructs case statements |
10:57:17 | FromDiscord | <clyybber> probably |
10:57:18 | Yardanico | it does use case statements with early returns :P |
10:57:26 | FromDiscord | <clyybber> Got lucky then :D |
11:04:47 | PMunch | Hmm, 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:55 | PMunch | I 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:59 | PMunch | https://github.com/nim-lang/Nim/pull/14258 |
11:34:00 | disbot | ➥ Allow let to not have value when using importc |
11:42:11 | * | Jjp137 joined #nim |
11:47:41 | FromDiscord | <clyybber> PMunch: Hmm, I don't know, I always use testament |
11:47:56 | FromDiscord | <clyybber> ./koch test is probably testament I suppose |
11:48:09 | PMunch | Araq, what `s` are you talking about? |
11:48:13 | FromDiscord | <clyybber> what was the recent bug that had to do with arc/exceptions and nimble? |
11:49:18 | FromDiscord | <clyybber> @Yardanico I think you discovered that one |
11:49:31 | Yardanico | yep |
11:49:32 | FromGitter | <Vindaar> @voltist: are you around? |
11:49:37 | Yardanico | basically nimble relies on UB in nim |
11:49:41 | FromDiscord | <clyybber> Yardanico: Did you open an issue for it? |
11:49:43 | Yardanico | yes |
11:49:52 | Yardanico | https://github.com/nim-lang/nimble/issues/798 |
11:49:54 | disbot | ➥ Nimble doesn't work with --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2kKF |
11:49:56 | FromDiscord | <clyybber> thanks |
11:49:58 | Yardanico | I really consider that as an UB :P |
11:50:10 | Yardanico | " 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:50 | FromDiscord | <clyybber> Yeah, I wonder how I should treat it in the DFA |
11:50:50 | Yardanico | 4raq told that it's strange this works with default GC |
11:51:17 | FromDiscord | <clyybber> Ok, so raising does not lead to an implicit return |
11:51:28 | FromDiscord | <clyybber> of the result variable I mean |
11:59:30 | * | letto quit (Quit: Konversation terminated!) |
12:01:21 | * | letto joined #nim |
12:02:45 | FromGitter | <waghanza> hi, is this ok to build an app on *alpine* (with `musl`), but to run it on *linux* (with `glibc`) |
12:02:46 | FromGitter | <waghanza> ? |
12:03:58 | FromDiscord | <Rika> if its possible in c, its prolly possible in nim |
12:05:54 | Yardanico | @waghanza if you compile the app with musl _statically_ - yes |
12:05:55 | dadada__ | 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:59 | Yardanico | if you link to musl dynamically, no |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:15 | Yardanico | since if you link to musl dynamically then you'll need to have musl available on your system |
12:06:25 | Yardanico | although 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:18 | PMunch | dadada, most variables can be printed just with $, or you can use .repr |
12:08:43 | dadada | yes, I know, most, I need something that works on all! |
12:09:09 | PMunch | reprshould work on all |
12:09:38 | PMunch | But it might not fit your definition of "pretty" |
12:10:09 | dadada | well, 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:25 | PMunch | There is also `dump` from the sugar module |
12:11:38 | * | ertp07 joined #nim |
12:13:37 | PMunch | Which does something like this: https://play.nim-lang.org/#ix=2l88 |
12:14:18 | PMunch | It still requires $ though |
12:15:22 | * | theelous3 joined #nim |
12:19:45 | * | exelotl joined #nim |
12:22:59 | FromGitter | <Vindaar> @voltist: my curiosity got the better of me: https://gist.github.com/Vindaar/72bc67ff93613619bba2fdeffc3a24e9 |
12:23:15 | FromGitter | <Vindaar> i.e. neither the formula, nor the parameters seem to make sense |
12:23:36 | FromGitter | <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:31 | PMunch | I feel like this should at least throw a warning.. https://play.nim-lang.org/#ix=2l8c |
12:44:26 | * | lritter joined #nim |
12:52:50 | FromDiscord | <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:42 | PMunch | This is just confusing: https://play.nim-lang.org/#ix=2l8j |
12:58:27 | * | zacharyc2rter joined #nim |
13:05:26 | disruptek | agree. |
13:07:04 | zacharyc2rter | what's confusing about it? |
13:07:44 | zacharyc2rter | oh I see |
13:08:28 | zacharyc2rter | maybe look at the generated C code? |
13:09:10 | zacharyc2rter | but uh basically the second assignment doesn't happen is my guess |
13:09:23 | zacharyc2rter | `let test2 {.nodecl, importc.}: cint = 42` that one |
13:16:27 | * | konvertex joined #nim |
13:17:53 | PMunch | Yes, that is what happens |
13:17:58 | PMunch | But it is confusing that it doesn't |
13:20:07 | PMunch | It happens with cstrings as well: https://play.nim-lang.org/#ix=2l8r |
13:20:18 | PMunch | Why are literals ignored in this way? |
13:21:50 | zacharyc2rter | because of nodecl |
13:22:07 | zacharyc2rter | however in the first assignment it's the result of that expression |
13:22:35 | PMunch | I know it's because of nodecl, but why only in the case of literals? |
13:23:13 | PMunch | Looking 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:52 | zacharyc2rter | file an issue I guess - I know the same thing happens with typedefs and types |
13:25:55 | zacharyc2rter | let 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:07 | zacharyc2rter | PMunch: 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:43 | zacharyc2rter | err sorry let me fix that |
13:42:34 | zacharyc2rter | https://play.nim-lang.org/#ix=2l8B |
13:44:04 | zacharyc2rter | actually I don't think it's the same thing at all, nevermind. |
13:45:18 | zacharyc2rter | I 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:39 | PMunch | Yeah it's obvious why it happens, but it looks very strange and it should be consistent |
13:51:49 | FromGitter | <kaushalmodi> nim-regex just got even more awesome! https://github.com/nitely/nim-regex/commit/fdeb60ef9980f2ac46e28598efda6f4b6d68b7f5#diff-0c88c9acc6458974b569d4f97da31c85R1657 |
14:05:45 | shashlick | nim doc doesn't seem to suppress hints with `--hints:off` |
14:06:28 | shashlick | never mind |
14:11:06 | * | narimiran quit (Ping timeout: 256 seconds) |
14:12:54 | zacharyc2rter | if I have a type with a function pointer field - why can't I use the `discardable` pragma on that field? |
14:16:31 | Yardanico | wdym discardable pragma on a field? |
14:16:35 | Yardanico | ah I understand |
14:17:12 | zacharyc2rter | I think it's a bug - you should be able to do this |
14:18:33 | Yardanico | yeah seems so |
14:19:04 | Yardanico | but discardable itself is generally not considered good in nim :P |
14:19:20 | Yardanico | so maybe there's not much support for it in some cases |
14:19:43 | zacharyc2rter | I think it's up to the programmer |
14:20:09 | FromDiscord | <clyybber> zacharycarter: Whats the error? |
14:20:26 | Yardanico | @clyybber invalid pragma: discardable |
14:20:51 | Yardanico | https://play.nim-lang.org/#ix=2l8T |
14:20:51 | liblq-dev | is it possible to disable doc generation for some symbol? |
14:21:00 | liblq-dev | like, iirc Rust has #[no_doc] |
14:21:14 | FromDiscord | <clyybber> Ok, yeah thats a bug |
14:21:43 | Yardanico | i'll open the issue or someone else? :P |
14:21:54 | zacharyc2rter | I was filling it out but sure go for it :) |
14:21:58 | Yardanico | ah nvm |
14:22:05 | Yardanico | go yourself, it's your issue after all ;) |
14:22:09 | zacharyc2rter | haha okay |
14:22:45 | Yardanico | I have 15 open issues in nim tracker anyway |
14:23:06 | Yardanico | half of them are low priority though |
14:23:17 | zacharyc2rter | beast mode |
14:24:16 | FromDiscord | <clyybber> Yardanico: And the other half are showstopper :D |
14:24:19 | Yardanico | XD |
14:24:21 | FromDiscord | <clyybber> Its a good mix |
14:24:46 | Yardanico | well 4 of my arc issues are already closed, and I didn't submit any arc issues today, so I gotta find them |
14:25:32 | FromGitter | <alehander92> ooi |
14:28:13 | FromDiscord | <clyybber> zacharycarter: Somehow you opened it twice |
14:28:16 | FromDiscord | <clyybber> I closed one |
14:30:27 | PMunch | What's the best way to iterate over the keys of an ordered table and deleting those that don't meet some predicate? |
14:30:41 | PMunch | I can't do a normal for loop over the keys, because it complains that the size changes |
14:31:00 | PMunch | I can store the keys in a sequence, but that feels a bit heavy handed.. |
14:31:31 | liblq-dev | this is what I usually do, and I don't know of another method |
14:31:51 | liblq-dev | you can write a keepItIf for tables, if you really want to |
14:32:10 | FromDiscord | <Rika> Loop through the table and add the keys to a result instead or something |
14:32:10 | liblq-dev | but then you're allocating another table, which feels even more expensive than allocating a seq |
14:33:27 | disruptek | make it work and move on. |
14:35:24 | PMunch | Hmmm |
14:37:53 | zacharyc2rter | clyybber: thanks - github 404'd for me when I pressed the open button the first time |
14:38:53 | FromDiscord | <clyybber> yeah, github is really wonky today |
14:40:19 | Yardanico | yeah I noticed it too a bit earlier |
14:41:58 | * | oculux joined #nim |
14:42:15 | Yardanico | https://github.com/treeform/staticglfw sounds nice |
14:42:24 | Yardanico | now we also need to do the same for cimgui :) |
14:42:37 | Yardanico | and then we'll have single-binary gui apps with imgui and glfw |
14:42:52 | * | natrys joined #nim |
14:46:56 | zacharyc2rter | just use sokol and not glfw :P |
14:47:00 | * | ertp07 quit (Ping timeout: 272 seconds) |
14:47:09 | zacharyc2rter | and then you just need to link an object file |
14:47:48 | zacharyc2rter | is disruptek streaming yet? |
14:47:58 | disruptek | ~stream |
14:47:58 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
14:48:07 | Yardanico | zacharyc2rter: he indeed is |
14:48:15 | zacharyc2rter | niceeeee |
15:01:34 | * | ertp07 joined #nim |
15:14:37 | FromDiscord | <clyybber> zacharycarter: I have a fix |
15:17:02 | * | thomasross joined #nim |
15:18:43 | FromDiscord | <clyybber> zacharyc2rter: Right here: https://github.com/nim-lang/Nim/pull/14262 :) |
15:18:45 | disbot | ➥ Fix #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:56 | liblq-dev | so, uhh, recursive module dependencies when? |
15:25:10 | liblq-dev | they constantly piss me off |
15:25:23 | liblq-dev | I can't structure my project in a sensible way because Nim lacks support for them |
15:25:27 | FromDiscord | <clyybber> never had that problem |
15:27:00 | FromDiscord | <clyybber> I actually think it forces you to structure your project in a sensible way |
15:27:19 | * | waleee-cl joined #nim |
15:27:54 | liblq-dev | yeah, and make all your fields public even though they should be private. funny joke. |
15:28:14 | FromDiscord | <clyybber> umm.. |
15:30:34 | liblq-dev | look, I don't want to expose my implementation details to the end user |
15:30:58 | liblq-dev | and have to tell them "don't look it's internal" everywhere around the code |
15:31:21 | liblq-dev | this 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:46 | FromGitter | <alehander92> hm |
15:31:49 | FromGitter | <alehander92> but cant you write one |
15:32:00 | FromGitter | <alehander92> weren't the doc comments just nodes in the tree |
15:32:23 | FromGitter | <alehander92> ah you're talking about fields appearing there |
15:34:10 | * | letto_ joined #nim |
15:34:54 | FromGitter | <alehander92> <3 |
15:34:59 | FromDiscord | <clyybber> or just leave them private? |
15:35:14 | FromDiscord | <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:31 | Prestige | dom96: 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:54 | dom96 | Prestige, pictures! |
16:36:06 | Yardanico | Prestige: that was fast :P |
16:36:11 | Yardanico | I only received their email yesterday |
16:36:19 | Yardanico | that they shipped my book |
16:41:06 | Prestige | https://i.ibb.co/NZ9NtxB/IMG-20200507-123954.jpg |
16:41:44 | zacharyc2rter | so much wasted potential Prestige |
16:41:51 | zacharyc2rter | could have put anything in that pic |
16:41:58 | zacharyc2rter | everyone would have opened it |
16:42:09 | * | exelotl joined #nim |
16:42:20 | Prestige | Lol zacharyc2rter I'll do a photoshoot after work :P |
16:42:24 | zacharyc2rter | niceeeeee |
16:45:01 | * | Trustable joined #nim |
16:45:38 | * | Vladar joined #nim |
16:45:46 | dom96 | Prestige, beautiful! What is that WM? :D |
16:46:47 | Yardanico | @Clyybber hooray! |
16:46:54 | Yardanico | btw I'm thinking of trying ircord on the mail channel in a few days |
16:46:59 | Yardanico | most stuff is fixed |
16:47:01 | Yardanico | like mentions |
16:47:04 | Prestige | Unfortunately it's my work macbook hooked up to a monitor D: running yabai to make it somewhat bearable lol |
16:47:13 | Yardanico | and dimscord by @KrispPugg is also getting fixes |
16:47:19 | Prestige | dom96: I usually run awesome or dwm on my personal machines |
16:50:46 | dom96 | Yardanico, awesome |
16:51:07 | dom96 | Prestige, might be time for me to dive back into the Linux world :) |
16:51:53 | Prestige | Things 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:05 | livcd | Any frontend person that can compare Karax to whatever they usually use? |
16:58:35 | zacharyc2rter | Karax has a virtual dom and does dom diffing |
16:58:45 | zacharyc2rter | so in that sense it is similar to react / vuejs / angular |
16:58:55 | zacharyc2rter | however it differs in that it follows the elm philosophy that components should be stateless |
16:59:08 | zacharyc2rter | I think though stateful components are also supported |
16:59:43 | zacharyc2rter | I don't think Karax has anything like redux / vuex etc... IE an application wide state store |
17:13:51 | dom96 | afaik karax has no philosophy |
17:14:01 | dom96 | in fact, it has no components |
17:14:43 | zacharyc2rter | meh I haven't used it in a while |
17:17:45 | dom96 | I'm starting to seriously consider setting up a patreon/github support/something like that for myself |
17:18:19 | dom96 | The 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:25 | dom96 | (One example being routing for karax) |
17:19:09 | dom96 | Having 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:37 | FromGitter | <alehander92> sounds good |
17:21:06 | FromGitter | <Willyboar> especially for httpbeast :) |
17:21:29 | dom96 | I could give Patreons a vote on what they want me to work on :) |
17:21:51 | * | terps joined #nim |
17:21:51 | dom96 | but httpbeast is pretty much done :D |
17:22:58 | dom96 | Willyboar: what do you think it needs? |
17:23:44 | FromGitter | <Willyboar> I don't know :P |
17:24:15 | FromGitter | <Willyboar> Is it ready for production? |
17:24:42 | dom96 | I don't consider it ready to be put naked to the internet |
17:24:46 | dom96 | so I could work on that |
17:24:51 | disruptek | dom96: i'll sponsor some nimph bugfixing if you have some time to write nim professionally. |
17:24:56 | dom96 | but to be put behind nginx it's veyr much ready |
17:24:58 | dom96 | *very |
17:25:59 | dom96 | disruptek, 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:27 | disruptek | so it's not about the money? |
17:26:43 | dom96 | not primarily |
17:27:03 | dom96 | but I do think having another source of income would be both good for me and for Nim |
17:27:04 | disruptek | so the reason you don't fix bugs in software you're familiar with is because you don't want to. |
17:27:14 | dom96 | Right now a lot of donations to Nim are being unused |
17:27:25 | Yardanico | yeah I saw |
17:27:38 | Yardanico | I contribute to opencollective and the budget just seems to be unused (?) |
17:28:03 | Yardanico | https://opencollective.com/nim/expenses is empty xd |
17:28:21 | dom96 | disruptek, sure, that's about right. |
17:28:26 | Prestige | Would be pretty awesome getting paid to work on nim libs |
17:28:40 | zacharyc2rter | start a patreon |
17:28:46 | disruptek | would be pretty awesome to have a job, full stop. |
17:29:12 | Yardanico | i guess an idea where nim lib devs are getting paid (even a bit) for changes might be a kinda good idea |
17:29:14 | Prestige | True |
17:29:16 | Yardanico | from opencollective for example |
17:29:18 | FromDiscord | <Recruit_main707> someone wants to help transpile this to nim?? |
17:29:19 | FromDiscord | <Recruit_main707> there are more options than go if youd rather have other references |
17:29:19 | FromDiscord | <Recruit_main707> https://github.com/google/flatbuffers/blob/712866d57b5e95b64858db31425816eb97ea7630/go/builder.go#L107 |
17:29:23 | dom96 | disruptek, what's blocking you? |
17:29:38 | disruptek | my pleasant disposition. |
17:29:51 | Prestige | vvifuigvkdjndcrdkjhugrvhgfjtjngjitujjibuljiu |
17:30:00 | Prestige | ignore that :P |
17:30:38 | supakeen | I will find deeper meaning, Prestige and you can't stop me. |
17:30:41 | dom96 | disruptek, tried going after the job offers posted in the monthly HN threads? |
17:30:53 | Prestige | Lol supakeen |
17:31:06 | FromDiscord | <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:33 | supakeen | Likely iterates over b.vtables in reverse, @Recruit_main707. |
17:31:33 | * | ptdel joined #nim |
17:31:39 | supakeen | But depends on what it is doing in the {...}. |
17:31:40 | dom96 | Recruit_main707: reverse iteration? |
17:31:44 | Yardanico | you need countdown |
17:31:52 | Yardanico | countdown(b.vtables.len - 1, 0): |
17:31:53 | Yardanico | for x in * |
17:32:09 | FromDiscord | <Recruit_main707> or reversing the sequence right? |
17:32:16 | Yardanico | ? |
17:32:20 | Yardanico | depends on what you do inside the code |
17:32:35 | dom96 | reversing the sequence is costly |
17:32:41 | Prestige | ^ |
17:32:42 | Yardanico | for ; i >= 0 && b.vtable[i] == 0; i-- {} |
17:32:42 | FromDiscord | <Recruit_main707> then say no more |
17:32:52 | FromDiscord | <Recruit_main707> thank you |
17:32:53 | Yardanico | they just decrement i as long as b.vtable[i] == 0 |
17:33:12 | Yardanico | while i >= 0 and b.vtables[i] == 0: dec i |
17:33:36 | dom96 | for i in countdown(b.len, 0): ... |
17:33:44 | FromDiscord | <Recruit_main707> thats the 1st for loop, i mean the second one |
17:33:54 | FromDiscord | <Recruit_main707> (have i highlighted the wrong one? |
17:33:54 | Yardanico | for i := len(b.vtables) - 1; i >= 0; i-- { is just countdown |
17:34:10 | FromDiscord | <Recruit_main707> ok |
17:34:10 | * | Jesin joined #nim |
17:34:13 | Yardanico | damn go sure has weird loop syntax |
17:36:24 | Yardanico | gcc 10.1 released |
17:36:33 | FromDiscord | <Recruit_main707> hype |
17:36:44 | Yardanico | https://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:16 | FromDiscord | <clyybber> Nim doesn't generate headers |
17:50:26 | FromDiscord | <clyybber> So I don't think we are affected |
17:51:00 | disruptek | shashlick: i just had to move the toast binary into nimterop/ in order to build golden. |
17:51:12 | FromDiscord | <clyybber> aha! |
17:51:20 | FromDiscord | <clyybber> maybe thats teh same issue? |
17:51:37 | FromDiscord | <clyybber> disruptek: What error did you get without doing that? |
17:52:08 | disruptek | /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:45 | FromDiscord | <clyybber> Ah, ok |
17:54:54 | FromDiscord | <clyybber> Nevermind then |
17:55:19 | Yardanico | I think we should soon start testing important packages with arc too? on the CI i mena |
17:55:21 | Yardanico | *mean |
17:55:32 | Yardanico | once we have deepCopy and shallowCopy in arc :) |
17:55:45 | Yardanico | https://github.com/nim-lang/Nim/issues/13997 |
17:55:46 | disbot | ➥ ARC: deepCopy in new runtime feature missing, do we have alternatives? |
17:56:48 | shashlick | disruptek: made some more fixes for clyybber |
17:57:18 | shashlick | it 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:01 | shashlick | clyybber 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:14 | dom96 | My god, what has CanYa done to the Bountysource site |
18:11:39 | FromDiscord | <Recruit_main707> is while more or less eficient than a for loop? its not right? they are just goto in asm |
18:12:03 | dom96 | We're still getting $600 there (amazing) but the site is so badly broken I cannot access any admin-side info |
18:25:15 | FromGitter | <alehander92> heyy |
18:25:22 | FromGitter | <alehander92> is it ok to call an async function |
18:25:29 | FromGitter | <alehander92> in a callback procedure for another future? |
18:26:09 | FromGitter | <alehander92> i get some gc errors like http://ix.io/2laO |
18:29:48 | PMunch | dom96, 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:42 | Yardanico | mumble be like |
18:55:43 | Yardanico | https://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:46 | PMunch | Hmm, 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:43 | Zevv | not harder them am OCR network I guess |
19:04:52 | Zevv | it'll have to look at its own output to learn from that |
19:05:26 | FromDiscord | <Technisha Circuit> Is there a hjson package for Nim? |
19:05:36 | someunknownuser | PMunch: You would probably want to use a GAN architecture for that. |
19:05:41 | FromDiscord | <Technisha Circuit> Json != Hjson |
19:06:08 | PMunch | Zevv, I mean it would be super easy to generate images of what each character is supposed to look like |
19:06:25 | PMunch | So the training data set should be pretty simple |
19:06:51 | PMunch | Hmm, 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:59 | someunknownuser | I 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:59 | PMunch | Oh right, one of those thingss |
19:08:08 | PMunch | Yes, that might be what you'd need |
19:08:14 | * | sagax quit (Ping timeout: 260 seconds) |
19:09:04 | PMunch | "without making identical copies", I wouldn't mind that though.. |
19:09:33 | someunknownuser | I 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:35 | FromDiscord | <InventorMatt> arraymancer is probably the best framework for it in nim |
19:11:39 | PMunch | @mratsim, any pointers? |
19:12:02 | * | terps joined #nim |
19:15:17 | leorize | it somehow concerns me that a parser need deepCopy |
19:16:01 | * | chapl joined #nim |
19:16:07 | leorize | then I realised that it doesn't and the author just assumed that Nim has python semantics :P |
19:16:12 | PMunch | leorize, are you looking at parsetoml? |
19:16:16 | leorize | yep |
19:16:26 | Zevv | I might be naive here, but what is the technical issue with deepcopy? cycles? |
19:16:32 | FromDiscord | <mratsim> GANs are too complex for Arraymancer right now |
19:16:33 | PMunch | Yeah that entire project is a bit of a mess.. |
19:16:50 | FromDiscord | <mratsim> I didn't implement, the Instance Normalization layer iirc |
19:16:56 | PMunch | It was inherited from someone else, and with new TOML versions it has grown increasingly hairy.. |
19:16:59 | leorize | PMunch: I started writing my own toml parser because I was scared of that code |
19:17:11 | leorize | but I never wrote more than the lexer :P |
19:17:30 | PMunch | mratsim, could a more traditional network work for this? |
19:17:32 | leorize | Zevv: the issue is RTTI |
19:17:57 | PMunch | leorize, yes it isn't the best.. But it has 100% coverage of the TOML spec IIRC |
19:18:16 | FromDiscord | <mratsim> an autoencoder would work |
19:18:19 | leorize | Zevv: not much of a problem for simple types, but it's a problem for inherited refs afaict |
19:18:32 | FromDiscord | <mratsim> but I would miss deconvolution in Arraymancer I think :p |
19:18:47 | Zevv | leorize: Ah right, that makes sense |
19:18:49 | FromDiscord | <mratsim> have to check out, it's been a while that I looked into those deep learning arch |
19:20:33 | FromDiscord | <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:41 | FromDiscord | <mratsim> so I wanted to write a compile |
19:20:45 | FromDiscord | <mratsim> compiler* |
19:20:55 | FromDiscord | <mratsim> but then I need multithreading that is better than OpenMP |
19:20:55 | * | Guest12311 quit (Ping timeout: 246 seconds) |
19:21:05 | FromDiscord | <mratsim> and then you don't have time anymore :p |
19:21:29 | * | dadada joined #nim |
19:21:37 | PMunch | Haha, 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:55 | skrylar[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:22 | skrylar[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:08 | FromGitter | <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:19 | FromDiscord | <mratsim> @treeform do you plan to publish Greenlet on nimble? |
19:47:38 | FromDiscord | <treeform> No they don't work well. |
19:47:50 | FromDiscord | <mratsim> ah, what's the issue? |
19:48:18 | FromDiscord | <treeform> there no i/o code that uses them. |
19:48:36 | FromDiscord | <treeform> so its only a switching mechanism, it needs whole i/o stack written. |
19:48:48 | FromDiscord | <mratsim> well, I think it's perfect fit for my need 😛 |
19:48:55 | FromDiscord | <treeform> Also GC issues. |
19:49:05 | FromDiscord | <treeform> but I think arc made them work. |
19:49:19 | FromDiscord | <treeform> they did not work with refc gc |
19:49:36 | FromDiscord | <mratsim> not a problem for me either but I can submodule your repo |
19:49:42 | FromDiscord | <treeform> After greenlets, I looked into windows fibers |
19:49:52 | FromDiscord | <treeform> I had more luck with fibers, but windows only. |
19:50:24 | FromDiscord | <mratsim> Use case is described here: https://github.com/nim-lang/RFCs/issues/222 |
19:50:24 | FromDiscord | <mratsim> |
19:50:25 | FromDiscord | <mratsim> But basically to debug concurrent data structures, I need precise control of threads interleaving. |
19:50:27 | disbot | ➥ Correct-by-construction Nim programs ; snippet at 12https://play.nim-lang.org/#ix=2lbm |
19:50:50 | FromDiscord | <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:08 | FromDiscord | <treeform> I wish linux had a similar API but linux does not. |
19:51:14 | FromDiscord | <treeform> After all this learning I just use threads... |
19:51:21 | FromDiscord | <treeform> Threads work well enough for me. |
19:52:38 | FromDiscord | <treeform> @mratsim thats RFC is pretty cool. |
19:52:43 | FromDiscord | <treeform> @mratsim that RFC is pretty cool. |
19:52:57 | FromDiscord | <mratsim> (on something, back in 10min) |
19:55:53 | FromDiscord | <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:27 | FromDiscord | <treeform> My recommendation is to still try to use real threads. |
19:56:28 | FromDiscord | <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:39 | FromDiscord | <mratsim> I can't debug concurrent data structure with real threads |
19:57:00 | FromDiscord | <treeform> maybe try https://nim-lang.org/docs/coro.html |
19:57:07 | FromDiscord | <treeform> its part of the standard library |
19:57:34 | FromDiscord | <mratsim> I need to control their resume and suspend according to the the atomics "relaxed/acquire/release" semantics |
19:57:59 | FromDiscord | <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:55 | FromDiscord | <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:05 | FromDiscord | <mratsim> i.e. ucontext is problematic |
19:59:42 | FromDiscord | <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:02 | FromDiscord | <mratsim> but i'll submodule your lib that's fine |
20:00:11 | FromDiscord | <treeform> ok |
20:01:30 | FromDiscord | <treeform> My plan for greenlet was slowly transform the C parts into nim. |
20:01:41 | FromDiscord | <treeform> making it mostly nim with some assembly |
20:01:43 | FromDiscord | <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:52 | FromDiscord | <mratsim> and it's very very simple |
20:02:16 | FromDiscord | <treeform> neat |
20:02:42 | FromDiscord | <treeform> I think you are more qualified to write some thing like "greenlet" then I am. |
20:03:10 | FromDiscord | <mratsim> well the IO part I'm unfamiliar with it so ... |
20:03:24 | FromDiscord | <mratsim> anyway, for now I'll just use greenlet |
20:03:39 | FromDiscord | <mratsim> at least now you know that it actually has a perfect use-case 😉 |
20:04:46 | FromDiscord | <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:13 | FromDiscord | <treeform> I also really like UDP... which does not need epoll/kpoll stuff. |
20:05:23 | FromDiscord | <treeform> I also really like UDP... which does not need epoll/kpoll stuff that TCP needs. |
20:05:58 | FromDiscord | <mratsim> you can't do interesting things without IO though: no networking, no file, no display |
20:06:13 | FromDiscord | <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:34 | FromDiscord | <treeform> This way your process never does streaming io. |
20:07:49 | FromDiscord | <treeform> It only gets a large packet and responds with a large packet. |
20:07:57 | FromDiscord | <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:05 | dadada | there'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:57 | Araq | dadada: macros.parseExpr |
20:21:49 | * | narimiran quit (Ping timeout: 246 seconds) |
20:22:05 | FromGitter | <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:56 | FromDiscord | <mratsim> seq can be passed to varargs |
20:23:51 | FromGitter | <deech> noice! |
20:43:14 | * | silvernode quit (Ping timeout: 256 seconds) |
20:47:08 | * | idf joined #nim |
20:50:10 | dadada | survey, who here uses vim keybindings (independend from editor) besides me? |
20:52:20 | skrylar[m] | i used to have the whole emacs+evil thing for a while |
20:52:57 | dadada | me, 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:54 | voltist | @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:09 | voltist | Although I've only tried two more |
21:04:25 | * | matti joined #nim |
21:05:16 | * | GlorygirlBi quit (Client Quit) |
21:05:42 | FromGitter | <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:52 | voltist | It's different enough that I'm hesitant to actually implement anything for my research until the authors get back to me |
21:12:28 | FromGitter | <Vindaar> yeah, I understand that. are you working on something that builds on this? |
21:14:07 | FromGitter | <Willyboar> hmmm this is strange. Does asynchttpserver has problem with 1.2.0? |
21:28:57 | disruptek | show us the paste. |
21:29:04 | FromDiscord | <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:05 | disbot | ➥ Couple of typo fixes with "_". |
21:30:34 | Araq | haven't you heard? I'm taking a holiday |
21:31:29 | * | idf quit (Ping timeout: 246 seconds) |
21:31:38 | Yardanico | Araq: is it because it's holidays in Russia ? :P |
21:32:13 | * | avatarfighter quit (Remote host closed the connection) |
21:32:13 | Yardanico | krux clyybber disruptek me in mumble, i like that activity |
21:32:24 | FromGitter | <Willyboar> Araq: https://www.youtube.com/watch?v=IBtGmxU1wzs |
21:32:24 | Araq | no... because of my mother |
21:32:24 | * | avatarfighter joined #nim |
21:33:41 | * | livcd quit (Remote host closed the connection) |
21:33:48 | voltist | @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:46 | liblq-dev | I'm getting an error with concepts that I can't quite understand |
21:46:54 | * | solitudesf quit (Ping timeout: 272 seconds) |
21:46:56 | liblq-dev | I have a proc called `draw` in one module, it's public |
21:47:29 | liblq-dev | then there's this concept https://github.com/liquid600pgm/aglet/blob/master/src/aglet/target.nim#L13 |
21:47:42 | liblq-dev | but for some reason it doesn't match my proc |
21:48:28 | liblq-dev | http://ix.io/2lbT ← this is the error message |
21:49:31 | FromGitter | <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:11 | FromDiscord | <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:06 | Yardanico | because it's not that easy to do with nim :) |
22:45:58 | * | natrys quit (Quit: natrys) |
22:46:50 | FromDiscord | <queersorceress> why not? it just requires the symbols be exported |
22:53:16 | disruptek | gonna grab some food; bbiab. |
22:53:24 | disruptek | no, enemas. |
22:53:24 | FromDiscord | <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:49 | skrylar[m] | aren't concepts broken in nim o_O |
22:59:19 | skrylar[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:47 | skrylar[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:55 | FromDiscord | <Avahe> @Elegant Beef so I just accidentally fixed the issue with fullscreen applications |
23:00:14 | skrylar[m] | accidental fixing o/ |
23:00:30 | FromDiscord | <Never Listen To Beef> lol |
23:00:31 | FromDiscord | <Never Listen To Beef> How? |
23:00:59 | FromDiscord | <Avahe> Removed SubstructureRedirectMask from clients' event mask |
23:01:06 | FromDiscord | <Avahe> It actually fixed like 5 bugs at once |
23:01:30 | FromDiscord | <Avahe> 100% accidental after spending 2.5 days trying to fix this |
23:01:47 | FromDiscord | <Never Listen To Beef> so now you get the property change notification when you fullscreen a window? |
23:02:06 | FromDiscord | <Avahe> Well a ClientMessage |
23:02:15 | FromDiscord | <Avahe> I'm not listening for PropertyNotify at all |
23:03:07 | FromDiscord | <Never Listen To Beef> What mask is required for Client Messages? |
23:06:43 | FromDiscord | <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:05 | skrylar[m] | hmmh. seems i should look over MuVM and WASM |
23:19:28 | skrylar[m] | altho i don't think wasm is meant for self mutating systems. |
23:20:58 | skrylar[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:21 | zacharycarter | gg |
23:55:25 | zacharycarter | whoops sorry |
23:58:44 | * | Trustable quit (Remote host closed the connection) |