<< 18-04-2020 >>

00:00:08*krux02 quit (Ping timeout: 265 seconds)
00:01:01*voltist joined #nim
00:07:14*dwdv quit (Ping timeout: 240 seconds)
00:09:59*zacharycarter quit (Ping timeout: 258 seconds)
00:13:58*lritter joined #nim
00:16:41FromDiscord<KingDarBoja> Jumm, I expect the guys to show up at this time
00:27:39voltist@Vindaar o/
00:28:12FromDiscord<Rika> it is i
00:29:56FromDiscord<KingDarBoja> Rika-sensei!
00:31:54*Tyresc quit (Quit: WeeChat 2.9-dev)
01:03:39*krux02_ quit (Remote host closed the connection)
01:06:44FromDiscord<Rika> ._. the nim syntax highlighting regex is still pretty wonk
01:06:44FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/700874922045472898/unknown.png
01:07:35*chemist69 quit (Ping timeout: 246 seconds)
01:08:41*ZoomZoomZoom quit (Read error: Connection reset by peer)
01:09:48*chemist69 joined #nim
01:10:54FromDiscord<Elegant Beef> @Gary M has been working on it a bit got to here yesterday
01:10:54FromDiscord<Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/700875971862986823/MzNOi4v.png
01:11:06FromDiscord<Rika> i know
01:11:09FromDiscord<Rika> i was there
01:11:22FromDiscord<Rika> @Gary M new bug lol
01:11:33FromDiscord<Elegant Beef> I mean i know him from a different server, so he pmed me, so didnt see it here
01:11:54FromDiscord<Rika> something weird from the string literal highlighter it seems
01:17:37FromDiscord<KingDarBoja> Eleigant: what editor is that? Looks neat 😄
01:18:51FromDiscord<Rika> still vscode im psure
01:19:36leorize@Rika: I have a degree in parsing Nim with regex, do you need my help? :P
01:20:51*lritter quit (Ping timeout: 265 seconds)
01:20:54FromDiscord<Rika> nah this plugin needs your help
01:21:19*lritter joined #nim
01:21:27leorizeso what's the prob?
01:21:56leorizeI mean, where can I see the code?
01:22:03leorizeis it written in nim?
01:22:50FromDiscord<Rika> uh no its just a json soup of regex
01:22:58FromDiscord<Rika> actually i think Gary M did a lot of work on it
01:23:03FromDiscord<Rika> so maybe wait for them to report
01:23:05leorizecan you generate this json?
01:23:12leorizeif you can't you're in for trouble
01:23:22FromDiscord<Rika> you can... from yaml
01:23:37leorizeyea you're doomed
01:24:49FromDiscord<Rika> it just looks like this
01:24:49FromDiscord<Rika> https://cdn.discordapp.com/attachments/371759389889003532/700879475721764945/unknown.png
01:26:37leorizeI don't know how vscode treat these patterns, but I will tell you that `##[` can start anywhere
01:27:06FromDiscord<Elegant Beef> Yea that was gary's vscode
01:27:50FromDiscord<Elegant Beef> I believe he is using tree-sitter now to get better highlighting
01:28:16FromDiscord<Rika> leorize: that's what the regex says though
01:28:32FromDiscord<Rika> "get any combo of space or tabs and `#[`"
01:28:39FromDiscord<Rika> 0 to inf amount
01:28:57leorizeuhmm then why do you even need it?
01:29:57FromDiscord<Rika> i dont know with the creator
01:29:59FromDiscord<Rika> i didnt make this
01:30:18FromDiscord<KingDarBoja> I am curious by the theme Elegant is using on VSCode right now
01:30:20PrestigeElegant Beef: you have any thoughts on using XSelectInput vs XSetWindowAttributes?
01:30:40PrestigeI haven't found much info on why to use one over the other, for setting up event masks for the root window
01:30:55leorizevscode should implement proper semantic highlighting
01:31:17leorizethen they can use nimsuggest to highlight the code
01:31:26leorizemuch better than trying to use some third party parser
01:32:03FromDiscord<Rika> i think PMunch is planning to do it?
01:32:24FromDiscord<Rika> also vscode already uses info from nimsuggest to show popups
01:32:29FromDiscord<Rika> and suggestions of course
01:32:52leorizewell but not highlighting, arguably the most important :P
01:33:36FromDiscord<Rika> yeah haha
01:34:03FromDiscord<Rika> the issue with that is that the file has to be saved before highlighting updates
01:34:25leorizenot really
01:34:32leorizeit can save the file to a temporary location
01:34:44leorizethe plugin probably already do so
01:34:53FromDiscord<Rika> nope i dont think so
01:35:06leorizeit does, that's the only way nimsuggest communication can be done
01:35:19leorizesuggestion data don't just appear out of nowhere
01:35:33FromDiscord<Rika> suggestions dont update after modification,
01:35:45FromDiscord<Rika> only after save
01:36:01leorizeoh you mean you gotta save it atleast once?
01:36:03leorizethen yea
01:43:22FromGitter<gogolxdong> Will there be problem when insert into a sequence head in a thread and pop in another thread
01:47:53FromDiscord<Elegant Beef> No i dont prestige, i just got tiling somewhat working, using maprequest over create window
01:48:07FromDiscord<Elegant Beef> But when i close windows 1 mystery window survives
01:48:10PrestigeNice good to know
01:48:22Prestigehm close them how, like a key shortcut?
01:48:27*dadada quit (Ping timeout: 250 seconds)
01:48:31FromDiscord<Elegant Beef> No internally
01:48:49Prestigehm is the root window not closing maybe?
01:48:59FromDiscord<Elegant Beef> Maybe not
01:49:44FromDiscord<Elegant Beef> or it's not sending a message properly
01:49:54FromDiscord<Elegant Beef> or it's not sending a message i expect
01:50:19PrestigeIs there a simple way to debug that while it's running? Like using notify-send or similar
01:50:47FromDiscord<Elegant Beef> I've been doing `Xephyr :5 & sleep 1; DISPLAY=:5 wm
01:50:50FromDiscord<Elegant Beef> I've been doing `Xephyr :5 & sleep 1; DISPLAY=:5 wm`
01:52:01Prestigehm I guess u can see echo statements from there
01:52:07FromDiscord<Elegant Beef> yea
01:52:35FromDiscord<Elegant Beef> Wrote this nimscript to handle it
01:52:36FromDiscord<Elegant Beef> https://hatebin.com/cckjjcwbzz
01:59:46*dadada joined #nim
02:00:09*dadada is now known as Guest69899
02:04:02FromDiscord<Elegant Beef> Ah my issue was my delete logic was only attempting to delete if i had more than 1 window not equal or greater
02:05:00*utlagi joined #nim
02:05:12*utlagi left #nim (#nim)
02:20:24*muffindrake quit (Ping timeout: 256 seconds)
02:22:25FromDiscord<KingDarBoja> Arrr
02:22:38FromDiscord<KingDarBoja> Been like 2 hours looking for the difference on my code with python source code
02:22:42FromDiscord<Rika> nice
02:22:43*muffindrake joined #nim
02:22:45FromDiscord<KingDarBoja> Ugh only 1 tests isn't passing lol
02:22:53FromDiscord<KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/src/language/print_location.nim My module
02:23:27FromDiscord<KingDarBoja> https://github.com/graphql-python/graphql-core/blob/master/src/graphql/language/print_location.py Source on Python
02:24:24FromDiscord<KingDarBoja> https://github.com/KingDarBoja/Phosphate/blob/master/tests/language/test_print_location.nim#L52 The test failing, I can't pinpoint what's missing
02:26:20FromDiscord<Rika> did you compare the outputs
02:27:14FromDiscord<KingDarBoja> I did but not sure why the first two tests are okay whereas the third one is completely different
02:28:08FromDiscord<KingDarBoja> The string ("thirdLocation") is the thing that's different
02:29:32FromDiscord<KingDarBoja> Quote from leorize (I think): "Maybe I am not looking at the right angle"
02:36:02FromDiscord<Gary M> Like beef said I'm looking into using Tree-sitter mainly as a syntax highlighter passing through a Vscode extension. It will probably take a while to write it all but it has the ability to right comprehensive tests so in the end it should be pretty robust 😄 We'll see.
02:36:22FromDiscord<Gary M> Ha, write*
02:37:22FromDiscord<Rika> yeah right
02:37:26FromDiscord<Rika> 😛
02:39:16disruptekwut
02:39:19FromDiscord<Gary M> Hey, it's the default for Atom :P
02:39:35shashlickits also the backend for nimterop
02:39:42FromDiscord<Gary M> Yes
02:40:10disruptekwhy aren't you guys using lsp and such?
02:40:42FromDiscord<Rika> does it work just as well :thonk:
02:40:54disruptekjust as well as what?
02:41:34FromDiscord<Rika> as the regular vscode nim extension
02:41:56disrupteki dunno. i admit i don't know anything about this. i use nvim.
02:42:12disrupteki'm just surprised that anyone ever wants to reinvent this wheel.
02:42:24FromDiscord<Gary M> Vscode LSP support doesn't have syntax highlighting I'm pretty sure.
02:42:39disruptekthat'd shock me.
02:42:52leorizelsp don't have semantic highlight
02:42:53FromDiscord<Gary M> It's a wheel that's built in a pretty REGEX flavored rubber thanks to Textmates grammar
02:43:38leorizenimsuggest was ahead of its time :P
02:44:09FromDiscord<Rika> realtime semantic highlighting when
02:44:40leorizeonce they finally merged the lsp semantic highlighting proposal
02:44:53FromDiscord<Gary M> So it's either struggling with correctly formatting a json using some Ruby flavored REGEX called Oniguruma
02:44:54leorizeonce that's in I'll fix nimlsp up and nim.nvim will move to nimlsp
02:45:01FromDiscord<Rika> thats a nice name
02:45:03FromDiscord<Rika> oniguruma
02:45:26FromDiscord<Gary M> Or maybe doing something different with tree sitter
02:45:59FromDiscord<Gary M> And I believe it won't be running regex all the time so it's supposed to be faster, idk
02:46:07FromDiscord<Rika> sounds better
02:46:25FromDiscord<Gary M> Or at least it won't be running a large textmate file worth of regex
03:09:03*endragor joined #nim
03:21:12FromDiscord<KingDarBoja> Sup
03:21:31FromDiscord<Mask> hello
03:24:23*endragor quit (Remote host closed the connection)
03:31:27FromGitter<gogolxdong> I found sometimes program stucks somewhere
03:31:56FromGitter<gogolxdong> when inserting into a sequence in a thread and pop in another thread
03:34:02FromDiscord<KingDarBoja> Okay, I found my issue
03:34:17FromDiscord<KingDarBoja> I was missing a equal sign on some if comparison
03:34:26FromDiscord<KingDarBoja> Like val + 1 < string.len
03:34:40FromDiscord<Rika> nice
03:34:45FromDiscord<KingDarBoja> But actually, it was <= as `..` is not inclusive
03:35:02FromDiscord<Rika> ???? `..` is inclusive
03:35:08FromDiscord<KingDarBoja> And ofc Python handles the list subset safely, but Nim doesn't, so I always do these kind of checks
03:35:13FromDiscord<KingDarBoja> `..<` oops
03:35:31FromDiscord<Rika> nim does it safely just doesnt assume you want until the end
03:35:59FromDiscord<KingDarBoja> Yeah but what I meant is
03:36:13FromDiscord<KingDarBoja> Python can handle index values out of the limit
03:36:34FromDiscord<KingDarBoja> Like "abcd" is a string, yo ucan subset it like a[0:999]
03:36:43FromDiscord<Rika> i dont think thats good design
03:36:54FromDiscord<KingDarBoja> And it will be fine
03:37:10FromDiscord<KingDarBoja> That's why I always keep on mind the len check
03:37:16FromDiscord<KingDarBoja> But looks like I missed this one lol
03:37:54FromDiscord<Rika> use templates or macros
03:38:51FromDiscord<KingDarBoja> Explain sensei
03:39:33FromDiscord<Rika> `template withinBounds(idx, arr) = idx < arr.len` or something like that
03:41:01*FromDiscord <KingDarBoja> red eyes meme
03:42:32FromDiscord<KingDarBoja> But this also means that I should check again my proc that uses those checks as I always use `<`
03:43:02FromDiscord<KingDarBoja> Instead of `<=` for comparing things like `i + 1 < someLength`
03:43:20FromDiscord<KingDarBoja> https://tenor.com/view/simon-cowell-laser-eyes-gif-10617238 The red eyes gif btw
03:45:30FromDiscord<Rika> not a meme i know of
03:55:42*Romanson joined #nim
04:04:57*waleee-cl quit (Quit: Connection closed for inactivity)
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:44*supakeen joined #nim
04:11:36FromDiscord<Elegant Beef> Prestige, did you add `_NET_ACTIVE_WINDOW` to your root window?
04:11:42FromDiscord<Elegant Beef> If so, how
04:13:52Prestigeprobably set the atom but I haven't
04:14:02FromDiscord<Elegant Beef> Yea i dont get the atoms
04:14:38FromDiscord<Elegant Beef> Like the XChangeProperty takes 2 Atoms one being property and the other being type
04:17:13FromDiscord<Mask> hi i'm having an issue installing a package
04:17:15FromDiscord<Mask>
04:17:15FromDiscord<Mask> https://cdn.discordapp.com/attachments/371759389889003532/700922867038158879/unknown.png
04:17:24FromDiscord<Mask>
04:17:24FromDiscord<Mask> https://cdn.discordapp.com/attachments/371759389889003532/700922904552144926/unknown.png
04:17:27FromDiscord<Mask> i literally just installed nim
04:17:30FromDiscord<Mask> i'm on linux
04:17:40FromDiscord<Mask> it says i am using version 0.17.2
04:17:50FromDiscord<Elegant Beef> did you use choosenim?
04:17:55FromDiscord<Mask>
04:17:55FromDiscord<Mask> https://cdn.discordapp.com/attachments/371759389889003532/700923034147749928/unknown.png
04:18:08FromDiscord<Mask> no i'm not familiar with that
04:18:15FromDiscord<Elegant Beef> Using ubuntu derivative?
04:18:25FromDiscord<Mask> linux mint xcfe yes
04:18:27FromDiscord<Rika> nim 0.17 is very old
04:18:31FromDiscord<Elegant Beef> Yea
04:18:35FromDiscord<Mask> how can i get the updated verison
04:18:40FromDiscord<Mask> i installed with apt
04:18:44FromDiscord<Rika> uninstall the nim from apt
04:18:46FromDiscord<Elegant Beef> Get choosenim
04:18:56FromDiscord<Rika> install choosenim either from apt or from somewhere
04:19:02FromDiscord<Rika> then use choosenim for nim
04:19:05*nsf joined #nim
04:19:09FromDiscord<Mask> i can just alias it right
04:19:11FromDiscord<Elegant Beef> Yea the nim version on the ubuntu repo is shite
04:19:12FromDiscord<Mask> for less typing?
04:19:26FromDiscord<Elegant Beef> its 0.20.2-1 on ubuntu
04:19:44FromDiscord<Elegant Beef> choosenim is a nim version manager
04:19:45FromDiscord<Mask> uh it can't find the package. Is it called choosenim or something else
04:19:52*rockcavera quit (Read error: Connection reset by peer)
04:19:59FromDiscord<Mask> nvm i can figure this part out i think
04:20:16FromDiscord<Elegant Beef> You can just download a release from nim's site iirc
04:22:20*rockcavera joined #nim
04:22:20*rockcavera quit (Changing host)
04:22:20*rockcavera joined #nim
04:23:04FromDiscord<Mask> works. Thanks for the help
04:44:34FromDiscord<Mask> well i'm having another dependancy issue
04:44:34FromDiscord<Mask> i've tried numerous ubuntu support things for this error, various installs of sdl dev packages etc. nothing seems to work
04:44:35FromDiscord<Mask> https://cdn.discordapp.com/attachments/371759389889003532/700929744761257984/unknown.png
04:56:30*endragor joined #nim
05:00:32*xcm quit (Remote host closed the connection)
05:02:48*noonien quit (Quit: Connection closed for inactivity)
05:03:13*xcm joined #nim
05:12:15*zacharycarter joined #nim
05:13:28*narimiran joined #nim
05:30:07*zacharycarter quit (Ping timeout: 260 seconds)
05:42:23Prestigethis xlib code is killing me inside
05:43:03*audiophile quit (Quit: Going offline, see ya! (www.adiirc.com))
05:45:06*NimBot joined #nim
05:49:33FromDiscord<KingDarBoja> I had to rely on a bool flag to pass into a tuple so I can use it as a None check cuz I was too lazy to rely on Options module lol
05:49:54*narimiran quit (Quit: leaving)
05:51:50*couven92 joined #nim
06:11:10*solitudesf joined #nim
06:20:40*xet7 quit (Remote host closed the connection)
06:33:55FromDiscord<Mask> is nimgame2 really the way to go for making games in nim
06:35:36FromDiscord<Rika> theres the godot bindings
06:41:38FromDiscord<Varriount> Or if you're comfortable with C, SDL or Allegro
06:47:54FromDiscord<Rika> man i'm loving npeg, or maybe making PEGs are just super fun
06:48:01FromDiscord<Rika> parsing legitimately hasnt been easier
06:51:27*narimiran joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:50*gmpreussner joined #nim
07:05:47*narimiran quit (Ping timeout: 260 seconds)
07:08:14*ryan_ joined #nim
07:08:52Zevv\o/
07:09:22Zevvdon't forget to make friendly colorful little graphs every now and then for even more gratification
07:10:25*number_one quit (Ping timeout: 250 seconds)
07:30:31*Romanson quit (Quit: Connection closed for inactivity)
07:31:20*rockcavera quit (Remote host closed the connection)
07:45:56FromDiscord<Elegant Beef> Same prestige it feels poorly documented and very obscure on what's supposed to be done
07:49:37*supakeen quit (Quit: WeeChat 1.9.1)
07:50:17*dddddd quit (Ping timeout: 250 seconds)
07:50:17voltist@Vindaar That spike raster plot you devised has been working well. Have you seen my new issue on the ggplotnim repo?
07:50:54*supakeen joined #nim
07:59:40*couven92 quit (Read error: Connection reset by peer)
07:59:54PrestigeElegant Beef I figured out a few things (maybe things you already had set up) but I'm feeling pretty good moving forward
08:00:03*couven92 joined #nim
08:00:09PrestigeDo you want a link to my repo?
08:00:10FromGitter<Vindaar> @voltist: sorry, I was asleep
08:00:11PrestigeBb
08:01:10FromGitter<Vindaar> happy to hear the spike raster plots work well for you! `geom_bar` indeed does not support negative heights so far. I'll take a look at it
08:03:49FromGitter<Vindaar> it's a one line fix though. I simply didn't think about that case
08:10:36voltist@Vindaar Coolio
08:10:37*Vladar joined #nim
08:11:22FromDiscord<Elegant Beef> Sure prestige
08:11:43FromDiscord<Elegant Beef> Mine's currently private cause i dont like having unfinished software publically available
08:11:56Prestigehttps://github.com/avahe-kellenberger/nimdow
08:12:13PrestigeI am just learning nim and like open source so, no shame :)
08:13:00*narimiran joined #nim
08:16:32*narimiran quit (Client Quit)
08:16:41FromDiscord<Elegant Beef> Well i love open source to
08:17:03FromDiscord<Elegant Beef> but i dislike unusable software visible cause it just fees weird 😄
08:17:10FromDiscord<Elegant Beef> feels*
08:18:50FromGitter<Vindaar> @voltist: just pushed a PR to fix it https://github.com/Vindaar/ggplotnim/pull/65
08:18:50disbotAllow negative bars when using stat = "identity", fixes #64
08:19:53Guest69899Error: internal error: getTypeDescAux(tyProxy)
08:20:00Guest69899does this mean I hit on a Nim bug?
08:20:07*Guest69899 is now known as dadada
08:20:21leorizedadada: yep
08:21:48voltist@Vindaar Neat, thanks!
08:21:59FromGitter<Vindaar> you're welcome!
08:23:15dadadaleorize: it says I should rerun the compilation with ./koch , but there's no ./koch, and no koch in PATH either
08:23:28dadadawhen koch is this important, why isn't it setup by choosenim?
08:23:40leorizekoch is the build tool for the compiler
08:24:09leorizethat instruction is for when you want to debug only
08:24:47dadadaas long as Nim is in a state where the user is likely to need to debug it, I think koch should be installed per default
08:25:07*letto quit (Ping timeout: 260 seconds)
08:25:38dadadaor maybe koch's functionality should be integrated into nim/nimble
08:25:53*muffindrake quit (Remote host closed the connection)
08:26:25*muffindrake joined #nim
08:26:35leorizedadada: ./koch is like `make`
08:26:37dadadaI somewhat agree with krux02 that Nim could use a better CLI, if it was command based (git-like), it could have nim koch .., etc.
08:26:48FromDiscord<Elegant Beef> Well prestige if you want here is my shitty wm currently, made it public just for you :P
08:26:49FromDiscord<Elegant Beef> https://github.com/beef331/goodwm
08:27:12PrestigeAy thanks, that's great
08:27:54FromDiscord<Elegant Beef> No organization cause im a gibbon
08:28:17dadadaleorize: I understand that, it's just not very helpful to split up tools a Nim developer is likely to require in his Nim life, because eventually you're going to need them and the hassle of separate installation is unjustified in times where everybody has 1TB+ of storage
08:28:35FromDiscord<Rika> uh
08:28:40FromDiscord<Rika> *hides in 500gb*
08:29:09dadadaRika: you're really proving my point, when 500gb is considered "not a lot"
08:29:16leorize[m]dadada: well do you want the entire compiler source bundled with your compiler installation?
08:29:30leorize[m]oh wait it's already bundled :p
08:29:56*letto joined #nim
08:30:17dadadaleorize[m]: you're wording it as if that was a giant file, when in reality the average video on youtube, probably requires more space than Nim's entire compiler source (by far)
08:31:03*hax-scramper quit (Read error: Connection reset by peer)
08:31:17dadadaleorize[m]: when somebody installs the gcc-toolchain, you can always expect there to be make, so when somebody installs the nim-toolchain, I think it should be expected that there's koch
08:32:01*hax-scramper joined #nim
08:33:45solitudesfthats just not true
08:34:07*narimiran joined #nim
08:34:10*solitudesf quit (Quit: Leaving)
08:34:46dadadasolitudesf: what's not true?
08:35:26voltist@Vindaar Great, it works! How would I go about putting a line down the x axis? Just geom_line with its own data entry?
08:37:09dadadaleorize[m]: the same works seems to work on play.nim-lang.org, there's only the one difference that I merged two modules into one file on play.nim-lang.org
08:37:29dadadas/the same/the same code/
08:37:51dadadaboth on version 1.2.0
08:38:09PrestigeHmm I need to look into how nimble wants me repo structured
08:38:20dadadawhat OS is play.nim-lang.org running?
08:38:25FromDiscord<Rika> linux
08:38:27PrestigeI fought it for a while and dislike the structure it was okay with
08:38:33dadadaI'm on linux to
08:38:34dadadatoo
08:39:03*narimiran quit (Ping timeout: 258 seconds)
08:41:17FromGitter<Vindaar> @voltist: yes, essentially. Not quite sure what you mean by "down the x axis" though. In parallel to the x axis or orthogonal?
08:43:10FromGitter<Vindaar> e.g. on the y = 0 line: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ using `linerange` is easier, because then you don't have to specify two points and thus add something to a DF [https://gitter.im/nim-lang/Nim?at=5e9abd9ee920022432b44c7a]
08:43:50FromGitter<Vindaar> note that the `xMin` and `xMax` values are from 0 to 1, since the x axis is discrete and thus covers (0, 1) by definition
08:44:13voltistYeah that's exactly what I had in mind, thanks
08:49:18FromGitter<Vindaar> :)
08:51:11FromGitter<Vindaar> ok, the PR is merged now
08:53:11*dwdv joined #nim
08:55:03*leth left #nim ("ERC (IRC client for Emacs 26.3)")
08:58:06voltist@Vindaar Good stuff https://liamsc.com/misc/forward.png
08:58:37FromDiscord<Rika> oh no, small issue i have with PEGs now; theyre slower than my current solution. at least the one i made...
08:58:54FromGitter<Vindaar> @voltist: nice!
09:17:42*couven92 quit (Read error: Connection reset by peer)
09:18:07*couven92 joined #nim
09:19:14*couven92 quit (Read error: Connection reset by peer)
09:19:37*couven92 joined #nim
09:19:59*Trustable joined #nim
09:26:36*hax-scramper quit (Ping timeout: 265 seconds)
09:31:13*wiltzutm[m] joined #nim
09:45:14*Trustable quit (Remote host closed the connection)
09:49:36*hax-scramper joined #nim
09:55:15*couven92 quit (Read error: Connection reset by peer)
09:55:41*couven92 joined #nim
10:11:08FromDiscord<__ibrahim__> hello, i try to compile server.nim on linux centos it says `Error: cannot open file: asyncdispatch`
10:11:22FromDiscord<__ibrahim__> hello, i try to compile server.nim on linux centos it says
10:11:22FromDiscord<__ibrahim__> `Error: cannot open file: asyncdispatch`
10:13:37FromDiscord<Yardanico> @__ibrahim__ how did you install Nim? and what's it version (run "nim -v")
10:14:01FromDiscord<__ibrahim__> nim 1.2.0
10:14:08FromDiscord<__ibrahim__> i installed it on centos 8 using snap
10:14:30FromDiscord<Yardanico> really strange, maybe nim can't find the stdlib with the snap image, what if you try to import any other module like "import strutils"?
10:14:42*couven92 quit (Read error: Connection reset by peer)
10:15:04FromDiscord<__ibrahim__> cannot open file: strutils
10:15:09*couven92 joined #nim
10:15:29Yardanicohuh, guess something's wrong with the snap image then
10:15:35FromDiscord<__ibrahim__> maybe there is a better way to install thatn snap
10:15:36lqdev[m]try installing using choosenim.
10:15:55FromDiscord<__ibrahim__> ok
10:15:58lqdev[m]anything is better than snap, to be honest
10:16:15FromDiscord<__ibrahim__> im gonna delete the nim in snap
10:16:33Yardanicoyeah, do that so there would be no conflicts
10:16:54FromDiscord<__ibrahim__> exporting file path to ~/.profile with snap didnt work either
10:17:15Yardanicothat wouldn't work, nim has it's own logic for detecting stdlib location
10:22:08*letto quit (Quit: Konversation terminated!)
10:24:20*letto joined #nim
10:24:39FromDiscord<__ibrahim__> it worked
10:24:42Yardaniconice
10:25:33FromDiscord<__ibrahim__> btw i have
10:25:33FromDiscord<__ibrahim__> `export PATH=/home/***/.nimble/bin:$PATH`
10:25:33FromDiscord<__ibrahim__> but the terminal isnt detecting nim
10:25:50FromDiscord<__ibrahim__> in ~/.bash_profile
10:25:56Yardanicowhat terminal?
10:25:57FromDiscord<__ibrahim__> any ideas?
10:26:04Yardanicobash_profile will only work for bash
10:26:06FromDiscord<__ibrahim__> default centos
10:27:12Yardanicowell, did you reopen the terminal after adding that to ~/.bash_profile ?
10:27:23FromDiscord<__ibrahim__> nim
10:27:23FromDiscord<__ibrahim__> bash: nim: command not found...
10:27:25FromDiscord<__ibrahim__> yes i have
10:27:26Yardanicoalsl does /home/<yourname/.nimble/bin contain "nim" symlink?
10:27:44Yardanicoafter installing choosenim you need to install nim
10:27:50Yardanicovia choosenim
10:28:04Yardanicolike "choosenim stable"
10:28:43FromDiscord<__ibrahim__> ./choosenim stable
10:28:43FromDiscord<__ibrahim__> version 1.2.0 already selected
10:29:25Yardanicowhere is that choosenim binary located?
10:29:42FromDiscord<__ibrahim__> in .nimble/bin
10:30:33Yardanicocan you run nim from the same folder?
10:30:43FromDiscord<__ibrahim__> yes if i do ./nim it works
10:31:06FromDiscord<__ibrahim__> else if im outside i need to type the whole path for it to work
10:32:38Yardanicowell then for some reason stuff in ~/.bash_profile isn't getting applied, sorry, don't really know why it's that way, but it's related to the shell and not nim really, try to relogin or something
10:34:25FromDiscord<__ibrahim__> ok thank you
10:34:29Yardanicotry doing "source ~/.bash_profile" and see if nim works after that
10:34:36FromDiscord<__ibrahim__> it works
10:34:42FromDiscord<__ibrahim__> but in new shell
10:34:44FromDiscord<__ibrahim__> it doesnt
10:35:07Yardanicowell yes "source ~/.bash_profile" works for current shell session only
10:35:14Yardanicoso for some reason bash on your system doesn't read ~/.bash_profile
10:35:20FromDiscord<Rika> use ~/.profile then no?
10:35:34*hf joined #nim
10:35:54*hf is now known as Guest38383
10:35:56*Guest38383 is now known as Faulander
10:36:32FromDiscord<__ibrahim__> doesnt work there either
10:37:42FromDiscord<__ibrahim__> im sure there must be something i did wrong, but anyway thanks alot for the help guys
10:39:36*voltist quit (Remote host closed the connection)
10:40:12Faulanderhey guys, i have a unicode/utf8 problem. i am running the console program on a linux machine, connected via ssh from windows cmd.exe all utf8 symbols are scrambled and not correctly displayed. i already set the codepage of the windows terminal to 65001, i am out of ideas.
10:44:54*krux02 joined #nim
10:44:55Yardanicowhat happens if other programs on that linux machine try to output utf8 characters?
10:45:52Faulanderno clue if i have another program that outputs utf8 chars
10:46:03Faulanderi could write up a small nim program
10:47:04Yardanicotry to write a bash script which outputs some utf8 chars
10:47:08Yardanicoand run it via ssh from windows
10:47:17Yardanicoif output is still scrambled - it's not a nim issue
10:47:28Yardanicobut rather due to that ssh client not supporting utf8 or something
10:51:55dom96Faulander, there is a bug for this on the issue tracker IIRC
10:54:02Faulanderi try with putty, there i can set the encoding
10:54:37Faulanderthere are two things i hate about programming: Encoding and TIME/DATE Issues
10:55:53Yardanicowell there are much less encoding issues on *nix since almost all of them use UTF-8 by default nowadays :)
10:57:31FromDiscord<__ibrahim__> am i supposed to be able to compile to js using the async stuff?
11:02:22Faulanderdoesn't work on putty with utf-8 encoding either
11:03:15dom96@__ibrahim__ you are not
11:03:34dom96You may be able to use https://nim-lang.org/docs/asyncjs.html though
11:04:05dom96Although you won't get a seamless C/JS async/await experience with that I'm afraid
11:06:21Faulanderhere's a screenshot, just echoing some utf-8 characters: https://imgur.com/a/S19HtYR
11:06:37Yardanicomaybe you don't have fonts or something?
11:07:55FromDiscord<__ibrahim__> cool, thanks dom96
11:08:03Faulanderthe first one is: U+22D8, &#8920;
11:08:05disbothttps://github.com/nim-lang/Nim/issues/8920 -- 5[Regression (?)] -Inf.int throws OverflowError ; snippet at 12https://play.nim-lang.org/#ix=2ivs
11:08:51Yardanico?
11:09:03Yardanicoah lol disbot reacted to hash8920
11:09:04FromDiscord<Rika> bot recognized #8920 part
11:09:06disbothttps://github.com/nim-lang/Nim/issues/8920 -- 5[Regression (?)] -Inf.int throws OverflowError ; snippet at 12https://play.nim-lang.org/#ix=2ivs
11:09:11FromDiscord<Rika> lmao
11:10:02*Faulander giggles
11:10:35*noonien joined #nim
11:12:24Faulanderaccording to this page: https://cs.nyu.edu/~yap/html/mathematical_operators.html all of the characters are in the COURIER NEW font, which putty uses (and windows cmd.exe)
11:25:10*lritter quit (Quit: Leaving)
11:27:53*crem quit (Quit: WeeChat 2.6)
11:51:37*liblq-dev joined #nim
12:00:50*zacharycarter joined #nim
12:01:17*endragor quit (Remote host closed the connection)
12:02:43*opal quit (Ping timeout: 240 seconds)
12:06:01*supakeen quit (Quit: WeeChat 1.9.1)
12:06:37*supakeen joined #nim
12:08:39*dadada quit (Ping timeout: 260 seconds)
12:09:25*dadada joined #nim
12:09:49*dadada is now known as Guest91062
12:16:30zacharycarterhow can I get an unsafe pointer from a ref object?
12:16:38zacharycarter`addr`?
12:16:47zacharycarterthat would give me a pointer to the reference right?
12:17:38zacharycarteryeah - i guess a cast is the right way
12:17:40dom96addr myRef[]
12:17:49zacharycarterthanks dom
12:20:18zacharycarter@dom96: I'm passing this pointer to a thread func, and I'd like to be able to get back to the ref object so do I need to box the object in the thread func to do so?
12:20:36zacharycartercasting to a pointer and then casting back to the ref object worked - but is that correct at all?
12:22:17Araqit is.
12:23:32zacharycarterthanks Araq
12:24:19dom96huh, how can that work? Are you using boehm?
12:24:52dom96accessing an object allocated in another thread's heap should fail
12:24:53zacharycarterarc
12:25:10dom96oh
12:26:11zacharycarterarc's making all my Nim dreams come true
12:26:46zacharycarteralthough now I realize I probably could have done a lot more with the default GC had I understood memory management better - but regardless, arc makes it easier to reason about things
12:28:24*audiophile joined #nim
12:35:59*crem joined #nim
12:36:15*endragor joined #nim
12:40:34*endragor quit (Ping timeout: 240 seconds)
12:47:34*xcm quit (Ping timeout: 240 seconds)
12:49:51*xcm joined #nim
13:09:20*endragor joined #nim
13:13:39*endragor quit (Ping timeout: 256 seconds)
13:14:30*muffindrake quit (Quit: muffindrake)
13:17:40*couven92 quit (Read error: Connection reset by peer)
13:18:09*couven92 joined #nim
13:19:27*xcm quit (Read error: Connection reset by peer)
13:21:28*xcm joined #nim
13:21:38*ryan_ quit (Remote host closed the connection)
13:21:56*ryan_ joined #nim
13:22:00*Mister_Magister quit (Ping timeout: 256 seconds)
13:22:25*letto quit (Remote host closed the connection)
13:22:36*Mister_Magister joined #nim
13:22:50*letto joined #nim
13:45:13Yardanicocontinued doing http://www.craftinginterpreters.com today, on functions chapter, the author implements return statement with Java exceptions (well, I did the same in Nim), and the for most stupid microbenchmark with recursive fibonacci with n = 20 my interpreter is about 30ms vs python 17ms :P
13:45:42Yardanicowhen I finish this first part I'll write the second implementation in C as the author does just so I can learn a bit about C and lower-level stuff
13:48:52zacharycarterWould be cool to write the second implementation in Nim
13:49:01zacharycartermaybe I'll do that when I have time
13:49:19Yardanicowell it's pretty low-level since you implement everything starting from hash tables
13:49:38zacharycartersounds fun :D
13:51:32AraqYardanico: what the...?
13:52:02Araqah you mean your interpreter vs Python's interpreter and not your interpreter written in Python
13:52:07Araqconfusing...
13:52:15YardanicoAraq: it's the most naive implementation, I'm just following the book with some changes because I"m writing Nim and not Java :P
13:52:25YardanicoI bet Java implementation would be slower
13:52:45Araqwell as I keep saying, just copy Nim's VM
13:53:05Yardanicofor a real toy interpreter I'll maybe just do this, but I need to learn some stuff so I can understand what's going on it that VM :D
13:53:12Yardanico*in
13:53:36AraqI don't even understand what is there to "understand"
13:53:51Araqyou have a loop with a case statement inside.
13:56:11Araqin fact, calling these things "virtual machines" is hyperbole, it's liking calling a bike a "virtual airplane"
13:56:18Araq*like
13:57:32nisstyreYardanico: the python interpreter is of course written in C and heavily optimized
13:57:54Yardaniconisstyre: well yeah, but also my interpreter is very bare-bones and Python interpreter probably has to initialize more stuff
13:57:57nisstyreso I would actually say those numbers reflect really well on Nim for what it's doing
13:58:17nisstyreYardanico: I'd have to look at what it's doing but ok
13:58:37Araqnisstyre: the Python interpreter isn't "heavily optimized", but it's ok
13:58:53nisstyrefair enough
13:59:21Yardanicojust to give you some info - environments in my current implementation are just TableRefs, and in recursive fibonacci with n = 20 the call stack probably has more than 100 depth
13:59:56nisstyreYardanico: so no tail-call elimination then I guess
14:00:02nisstyrethat would be the first thing I'd try to implement
14:00:17*muffindrake joined #nim
14:00:42Araqwell that would defeat the purpose which is to measure function call overhead
14:00:56nisstyreactually your code probably isn't tail recursive
14:00:56Yardanicoalso gc:arc gives just around same speeds
14:01:01nisstyreyeah
14:01:16Yardaniconisstyre: it's just this example from the book itself https://gist.github.com/Yardanico/f042367d4025105302cfeaa0deecc121
14:01:29nisstyreyeah that's what I figured
14:01:59livcdhow do I find out what's wrong with this? https://paste.centos.org/view/15d00dd6
14:03:01Yardanicolivcd: probably you're trying to echo a nil value?
14:03:04Araqlivcd: -d:useMalloc + valgrind
14:05:03livcdok
14:08:11livcdMaybe something with streams and arc?
14:08:28*rokups joined #nim
14:09:15livcdalso maybe something with cpp and streams? with c it's 0.052s with cpp it's 0.52
14:11:52Araqhuh? now you're talking about runtimes
14:13:20*endragor joined #nim
14:17:40disruptekbikes, airplanes, runtimes.
14:19:04*narimiran joined #nim
14:19:34*solitudesf joined #nim
14:26:25livcdoh nvm it's my fault
14:26:46*narimiran quit (Quit: leaving)
14:27:53Araqlivcd: what a refreshing outcome. usually it's the Nim compiler's fault. Or mine.
14:28:36FromDiscord<EdgyNerd> how can I initialise an array of 500 2's?
14:29:16Yardanicowell there's https://nim-lang.org/docs/algorithm.html#fill%2CopenArray%5BT%5D%2CT
14:29:26Yardanicobut idk if you can initialize an array with a different value
14:29:34FromDiscord<Rika> var a: array[500, int]; for i in 0..499: a[i] = 2
14:29:35Araq2 &* 500 EdgyNerd
14:29:55FromDiscord<Rika> @EdgyNerd see araq's reply
14:30:06FromDiscord<EdgyNerd> oh yep that'll work, thanks
14:30:23FromDiscord<Rika> should i just read through the whole system docs...
14:30:30FromDiscord<Rika> so i learn this stuff
14:30:40disrupteknope; araq gets pissy when you rtfm.
14:30:48disruptekhe likes the handholding.
14:30:55Araqmy solution only works in a hypothetical Nim where we are allowed to have new operators
14:31:28Araq:D
14:32:58livcddoes async work well with arc in this hypothetical Nim?
14:34:16Araqlivcd: yup
14:35:10*couven92 quit (Read error: Connection reset by peer)
14:35:25livcdcool!
14:35:36*couven92 joined #nim
14:35:40AraqI should probably hack together some prototype and call it Arcyncq
14:44:49disruptek~stream
14:44:50disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:44:53Yardanicoyay
14:45:16disrupteki think i added a bug yesterday.
14:46:24Araqdisruptek: you're a good boy. It takes courage to add bugs.
14:53:53FromDiscord<Recruit_main707> `short month_days[] = {31,28,31};` whats the nim equivalent to something like this?
14:54:18Yardanicolet month_days = [31'i16, 28, 31]
14:54:30FromDiscord<Recruit_main707> ok, thanks
14:54:31Yardanicoif you really want it to be "short" (16-bit int)
14:54:46FromDiscord<Recruit_main707> nah, it was just an example
14:59:04livcdwhat is disruptek working on?
14:59:20Yardanicohe'll be working on a compiler shortly
14:59:25Yardanicobut just now he fixed his pulseaudio tool
15:01:02Araqhe works on IC
15:01:14AraqI help him by telling him things he already knows
15:01:40livcdi checked it on github but I have no idea what it does
15:03:09Araqlivcd: in the end it will make your recompiles faster
15:03:28livcdAraq: no i meant his pulseauto tool
15:03:50Araqlol
15:05:36livcddisruptek what the heck is that pulseauto for? :P
15:05:52disruptekare there no docs?
15:06:30FromDiscord<Rika> its pulse AUDIO not pulseauto
15:06:41disrupteknah.
15:06:43disruptek!repo pulseauto
15:06:44disbothttps://github.com/disruptek/pulseauto -- 9pulseauto: 11setup pulseaudio stream levels via app names or pids 15 1⭐ 0🍴
15:09:55livcddisruptek: you are a human guinea pig
15:10:00*Trustable joined #nim
15:11:40FromDiscord<Rika> m
15:11:41FromDiscord<Rika> i see
15:12:04disruptekwut
15:12:20livcdguinea pigs are hungry all the time
15:12:43disruptekseriously.
15:12:45livcdthey are a little fooddiggers
15:12:49*zacharycarter quit (Ping timeout: 264 seconds)
15:16:38*xcm is now known as Guest30329
15:16:38*Guest30329 quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
15:18:26*xcm joined #nim
15:19:53dom96lolwat
15:20:20Yardanico@dom96 https://www.twitch.tv/disruptek :D
15:21:10FromDiscord<Recruit_main707> would the bridge bot be able to work at any server?
15:21:31FromDiscord<Recruit_main707> ie: someone wants to connect a discord server and a gitter one?
15:21:31FromDiscord<Rika> i dont see why not
15:21:37FromDiscord<Rika> oh
15:21:38Yardanico@Recruit_main707 wdym exactly?
15:21:52FromDiscord<Rika> which bridge, first of all
15:22:10Yardanicoircord is only for IRC<->Discord, but it manages "FromGitter" and "[m]" names in IRC so they appear with nice suffixes on Discord
15:22:23Yardanicocreating a matterbridge alternative to bridge different platforms is kinda harder :)
15:22:34FromDiscord<Rika> you should also manage kde bridge style names, -m i think is what they use
15:22:51YardanicoI don't think we have any in Nim channel here :P
15:23:04FromDiscord<Rika> we had one before
15:23:28Yardanicook help me fix the bridge itself instead so we can finally use it here
15:23:43FromDiscord<Rika> aight im out
15:24:04FromDiscord<Recruit_main707> so, it cant connect a gitter server and a discord one?
15:24:11FromDiscord<Rika> i mean i would but i still have no clue what the issue is
15:24:27Yardanico@Recruit_main707 "ircord" is for Discord<->IRC
15:24:52Yardanicothere's also my 2-year-old simple twitchrelay app to bridge IRC and Twitch IRC chats
15:25:03Yardanicowhen dom or 4raq started doing some streams on Twitch
15:25:33Yardanicoyou can still find references of it, e.g. on gitter #nim-offtopic is mapped to nim-lang/twitch
15:25:35Yardanicohttps://github.com/Yardanico/twitchrelay
15:29:54FromDiscord<Recruit_main707> how could i check the endianness of the machine my code runs on?
15:30:12Yardanicohttps://nim-lang.org/docs/system.html#cpuEndian
15:30:54Yardanicothat const is either littleEndian or bigEndian depending on your target, but generally most architectures are LE
15:30:59Yardanicolike x86 and x86_64 are little endian
15:31:06FromDiscord<Recruit_main707> is it available at runtime?
15:31:13Yardanicoehm
15:31:21Yardanicoyou can't run the code you compiled for little endian arch on a big-endian really
15:31:24FromDiscord<Recruit_main707> yeah, that const answered me
15:31:31Yardanicomaybe you want functions which swap endianness instead?
15:31:34FromDiscord<Skaruts> is there a Nim equivalent to C's `#define Foo`?
15:31:44Yardanico-d:Foo
15:32:09Yardanicoit depends on what you want to do
15:32:10FromDiscord<Rika> `when defined(Foo):`?
15:32:13FromDiscord<Recruit_main707> Yaradinco: i want that, (i already found them) but i must check wether it should be done
15:32:21Yardanico@Recruit_main707 yeah it's not hard
15:32:24Yardanicolemme show
15:32:37FromDiscord<Skaruts> something that can be used with `when` conditions
15:32:52FromDiscord<Skaruts> when defined, or something along those lines
15:33:01Yardanicowhen defined is for any symbol
15:33:34FromDiscord<Rika> i was ignored 😦
15:33:42FromDiscord<Skaruts> so it checks for the existence of a variable?
15:34:36FromDiscord<Skaruts> @Rika no you weren't :), just that that's what it's for, but not what I'm looking for here
15:34:44Yardanicocan you better explain what you want?
15:34:52FromDiscord<Rika> that ^
15:35:29FromDiscord<Skaruts> well, conditional compiling, based on whether something has been defined
15:35:34Yardanicowhen defined
15:35:43Yardanicothere's also "when compiles"
15:35:53Yardanicohttps://nim-lang.org/docs/system.html#compiles%2Cuntyped
15:35:57FromDiscord<Skaruts> but how to define something, is what I'm asking
15:35:58Yardanicohttps://nim-lang.org/docs/system.html#defined%2Cuntyped
15:36:15FromDiscord<Rika> on compile, add `-d:Foo`
15:36:35FromDiscord<Skaruts> can't be done through code?
15:36:36Yardanico@Skaruts mainly it's done via -d (short for --define) in the compiler, yes
15:36:42Yardanico@Skaruts will also work for consts
15:36:56Yardanicoand types
15:37:03Yardanicoah wait actually no
15:37:17Yardanicoit only works for -d:, for variables you need https://nim-lang.org/docs/system.html#declared%2Cuntyped
15:38:23FromDiscord<Rika> defined is for feature flags aint it
15:38:35Yardanicofor any compiler defines
15:39:09FromDiscord<Skaruts> that may help
15:39:25FromDiscord<Skaruts> gonna give it a try
15:39:36FromDiscord<Yardanico> @Recruit_main707 see how I did it here https://github.com/Yardanico/nimnbt/blob/00b6ff31547ea3bbe5d4027bd9e5b03415f1f8a4/src/nimnbt.nim#L35
15:39:40FromDiscord<Yardanico> about endianness
15:39:58FromDiscord<Yardanico> and after that code there are usages of it
15:40:43FromDiscord<Recruit_main707> nice, thanks
15:40:44FromDiscord<Yardanico> I do it because "The datatypes representing numbers are in big-endian in the PC version, but Pocket Version is in little-endian."
15:41:00FromDiscord<Yardanico> that code is pretty old though, but I still remembered that I used endianness here 😛
15:46:54FromDiscord<Recruit_main707> this code only complains the second time, why??
15:46:54FromDiscord<Recruit_main707> https://play.nim-lang.org/#ix=2ix9
15:47:54FromDiscord<Rika> ran it once and it complained
15:48:37FromDiscord<Recruit_main707> i mean, those two lines are the same, but it only errors in the second one, (here i have isLittle defined: https://play.nim-lang.org/#ix=2ixd)
15:48:47Yardanicobecaise there's no isLittle
15:48:51Yardanicothat's my own constant
15:48:54Yardanicocheck my code again
15:49:04Yardanicohttps://github.com/Yardanico/nimnbt/blob/00b6ff31547ea3bbe5d4027bd9e5b03415f1f8a4/src/nimnbt.nim#L33
15:49:05FromDiscord<Recruit_main707> i know, i have it defined obv :P
15:49:14FromDiscord<Recruit_main707> that second url has it
15:49:33Yardanicotype mismatch: got <seq[byte]> but expected 'uint16' is pretty self-explanatory
15:49:39Yardanicobyte is 1 byte, uint16 is 2 bytes
15:49:58FromDiscord<Rika> @Recruit_main707 islittle is true
15:50:02FromDiscord<Rika> when collapses the statement
15:50:08Yardanicoand what buf[0..1] is supposed to mean?
15:50:08FromDiscord<Rika> so 1st is never read
15:50:14Yardanicooh I get what you're trying to do
15:50:33FromDiscord<Rika> when is compile time so any nonmatching branches are completely removed from runtime
15:50:35FromDiscord<Recruit_main707> i will swapEndian16 one of those
15:50:37Yardanicoyou want to make an uint16 from two bytes?
15:50:53FromDiscord<Recruit_main707> yes
15:53:11Yardanicoare you dealing with streams?
15:53:15Yardanico(streams module)
15:53:26FromDiscord<Recruit_main707> no
15:53:31FromDiscord<Recruit_main707> at least not for now
15:54:16FromDiscord<Recruit_main707> `uint16(buf[1] shl buf[0])` should i do something like this?
15:54:19Yardanicotry https://forum.nim-lang.org/t/2626#16256
15:54:38FromDiscord<Rika> buf[1] shl 8 and buf[0] or something like that i'd do
15:54:41Yardanicoor https://forum.nim-lang.org/t/2626#16241
15:55:06Araqbuf[1] shl 8 or buf[0]
15:55:19Araq'or', not 'and'
15:55:20Yardanicoand then jus swap endianness if you need
15:55:25FromDiscord<Rika> oooops
15:55:35FromDiscord<Rika> sorry for being brainlet lol
15:55:47FromDiscord<Recruit_main707> ok thank you all
15:57:21*hax-scramper quit (Ping timeout: 250 seconds)
15:57:29*rockcavera joined #nim
15:57:35*chemist69 quit (Ping timeout: 272 seconds)
15:58:07*chemist69 joined #nim
15:58:54*zacharycarter joined #nim
16:02:41*hax-scramper joined #nim
16:05:28federico3https://github.com/nim-lang/Nim/issues/9785 how comes this is high priority and had no updates in years?
16:05:31disbotCrash in Nim's SSL handling code ; snippet at 12https://play.nim-lang.org/#ix=2ixp
16:07:21*crem quit (Quit: WeeChat 2.8)
16:07:54*crem joined #nim
16:07:58leorizefederico3: because no one could reproduce it
16:08:48FromDiscord<Recruit_main707> `buf[1] shl 8 or buf[0]` how would this code be used for 32 bit, and 64 bit?
16:09:21*nsf quit (Quit: WeeChat 2.8)
16:09:37leorizeI played with FutureStreams and the API of it is kinda useless
16:09:55leorizeguess I'm off to design my own :/
16:10:06FromDiscord<Rika> buf[4] shl 24 or ... 16 or ... 8 or buf[0]
16:12:09FromDiscord<Recruit_main707> another vscode error, openArray never gets highlighted despite being a type...
16:13:09Yardanicoit's not that smart really
16:13:21dom96leorize: please do and make a PR for the stdlib
16:13:31Yardanicoit highlights only stuff which starts with an uppercase character (because most nim types are like this) and for special stuff like "openarray"
16:13:38Yardanicoyes it highlights "openarray" but not "openArray"
16:14:25krux02leorize, you mean mean FutureStreams don't provide value to Nim?
16:14:53*xcm quit (Read error: Connection reset by peer)
16:14:59*liblq-dev quit (Ping timeout: 256 seconds)
16:17:02*xcm joined #nim
16:17:20leorizekrux02: I mean that the API make it useless
16:17:24leorizemaybe I'm using it wrong
16:18:54leorizeYardanico: so it has no concept of Nim's style insensitivity
16:19:22Yardanicoleorize: yeah, it really only differentiates between Type and type by first character
16:19:38Yardanicoso Type and TyPE will get highlighted, but not openArray even if it's a type
16:19:41leorizedom96: I'm not even sure if I'm using FutureStream correctly
16:19:47leorizehow are you even supposed to use that?
16:20:19leorizeI'm having an input stream from a pipe and it's async
16:21:51FromDiscord<Rika> well, syntax highlighters cant determine if a symbol is a type
16:22:04FromDiscord<Rika> it can prolly do openarray properly though
16:22:05Yardanicowell vscode nim plugin uses nimsuggest for other things
16:22:34Yardanicoand believe it or not - nimsuggest can provide highlightings too
16:22:43Yardanicoindirectly, but you can get all symbols from the file and highlight all types for example
16:22:56FromDiscord<Rika> yeah
16:22:59FromDiscord<Rika> but it doesnt use that
16:23:09FromDiscord<Rika> because syntax highlighting is faster than semantic highlighting
16:23:20Yardanicoyou can use both
16:23:21leorizeI don't think vscode even support dynamic highlighting
16:23:26leorizeyea you can use both
16:23:29leorizetry nim.nvim
16:23:56FromDiscord<Rika> in vscode?
16:24:03Yardanicoin general
16:24:28FromDiscord<exelotl> wtfff I accidentally enabled a Nim REPL in vcode????
16:24:28FromDiscord<exelotl> https://cdn.discordapp.com/attachments/371759389889003532/701105879709122649/unknown.png
16:24:31FromDiscord<Rika> well yeah but not in vscode i dont think
16:24:41FromDiscord<Rika> @exelotl yeah, `nim secret`
16:24:53Yardanico@exelotl yeah for some reason it binds "Alt+Enter" for "nim secret"
16:25:01Yardanico"nim secret" is called like that for a reason though
16:25:09Yardanicoah wait it's not alt enter
16:25:17FromDiscord<exelotl> shift + enter
16:25:49Yardanicoye
16:26:25shashlickAraq: seeing a crash when printing a PNode, any ideas? https://pastebin.com/CRPNMtTw
16:26:33shashlickThis is devel on osx
16:27:06krux02Yardanico: for emacs I highlight everything as a type that follows a `:`
16:27:20Yardanicokrux02: well I mean types appearing in code
16:27:27Yardanicolike "newSeq[MyType]()"
16:27:50krux02sorry, I don't do that anymore
16:28:19krux02now it is everything that is declared as a type in system.nim and everything that starts with a capital letter.
16:29:00FromDiscord<Recruit_main707> Araq: is it openarray or openArray by "default"
16:29:00krux02regular expression based highlighting only.
16:29:16krux02Recruit_main707: you can just look at the declaration in system.nim
16:29:19krux02and then you see it.
16:29:45Yardanicoit's openArray but I've always used it as "openarray" lol :D
16:29:45krux02Spoiler: it is `openArray`
16:30:08FromDiscord<Recruit_main707> ok
16:30:21krux02The nim compiler uses a strict mode that enforces to use the style of the declaration.
16:30:40krux02So you would get an error if you use `openarray` instead of `openArray` in one of the files.
16:31:15FromDiscord<Rika> why is it lowercase?
16:31:17FromDiscord<Rika> compat?
16:33:38FromDiscord<exelotl> vscode only highlights `openarray`
16:34:10FromDiscord<exelotl> I kinda find it more readable too :\
16:34:40FromDiscord<exelotl> or rather, more aesthetically pleasing
16:36:46*xcm quit (Ping timeout: 265 seconds)
16:40:50disruptekleorize: did you say you had a fix for nimsuggest?
16:41:09leorize[m]fix for what?
16:41:18*xcm joined #nim
16:41:19disruptekcompiler misbehavior.
16:41:49leorizewhat misbehavior lol :P
16:42:00leorizein general then I don't have any fix
16:42:00disruptekdoesn't work.
16:42:05disruptekdoh.
16:42:14leorizeif about the forward decl problem then I do have an idea
16:42:16disruptekincludes support?
16:42:28leorizeyea the forward decl problem
16:42:38leorizeinclude is processed correctly by nimsuggest
16:42:43leorizejust that forward decl is not
16:43:00disruptekoh, well, i guess it's something wrong with my setup.
16:43:20leorizeanyway to reproduce this?
16:43:33leorizeand what kind of include support are you talking about?
16:43:57disruptekcgen.nim imports a lot of other ccg* files that have lotsa errors for me.
16:44:08disruptekand i cannot jump to defs in them.
16:44:11leorizeit's due to your auto linter
16:44:25leorizecan't jump to defs because I haven't fixed the forward decl thing yet
16:44:31leorizethough it appears to be rather hard :/
16:45:36leorizeso the idea I have now is to capture the symbol `ref`, then if it has `sfForward`, wait until compilation is completed, then evaluate the symbol again
16:46:06leorizeoh yea, how stable has `indent-rewrite` been for you?
16:46:17leorizeI'd like to merge that one in to work on other things
16:46:32disrupteki dunno, i think nimsuggest is very unstable for my work.
16:46:43disruptekwhat's my linter called?
16:47:50leorizei dunno what you use
16:47:52leorizeale?
16:47:57leorizeneomake?
16:48:03leorizeor syntastic?
16:48:14disruptekale, but even disabled, it's still broken.
16:48:17disruptekmissing symbols.
16:48:23disruptekon an include.
16:48:36leorizehmm gotta investigate that one then :/
16:48:55disrupteknot sure it could ever work.
16:48:56leorizeI'm working on something rn, so it'll be awhile before I can work on it
16:49:04disrupteknp
16:53:53*waleee-cl joined #nim
16:54:03*liblq-dev joined #nim
16:57:27zacharycarterIs this valid C? `typedef volatile int* foo` - most of the explanations and example code I've encountered around volatile show it being used in variable declarations not type declarations`
16:57:57leorizeyea it's valid
16:58:41zacharycarterI couldn't figure out how to do this in Nim so I did - {.emit: "typedef volatile int* foo_t".} and then type Foo {.importc: "foo_t".} = object
16:59:05zacharycarterthen I declared `var f: Foo` and checked out the generated C code and it seems produce what I expect
16:59:20zacharycarterI know I need to use volatileload etc with this
16:59:27FromDiscord<Recruit_main707> `@Recruit_main707, you want to check if Nim has native ways to read scalars from memory` so thats the question :P
17:00:20leorizeif you have a pointer you can get a value
17:06:34*audiophile_ joined #nim
17:09:10*audiophile quit (Ping timeout: 256 seconds)
17:12:46FromDiscord<Recruit_main707> https://play.nim-lang.org/#ix=2iy1 cant you edit an openArray?
17:12:59Yardanicoyou need to write it as "var openArray[byte"
17:13:05Yardanico*]
17:13:14FromDiscord<Recruit_main707> ah right 😁
17:16:56livcdwth is wrong with vscode and nim. Sometiems I just dont get any syntax error checking wtf
17:17:13Yardanicoit runs "nim check" and it's not always perfect :)
17:17:38FromDiscord<Rika> wish you could pass in raw text via some sorta IPC instead of needing to save the file
17:17:55FromDiscord<Recruit_main707> i clicked randomly over the problems ta and it fixed it, dont know if it had something to do though xD
17:18:05FromDiscord<Rika> actually, nim check needs the whole project directory
17:18:10FromDiscord<Rika> so im not sure how well that would go...
17:18:52FromDiscord<Rika> huh wait why does nim check need project directory anyway what
17:18:56livcdYardanico: sometimes i dont see anything "running"
17:19:06Yardanicowell "nim check" isn't running constantly
17:19:21FromDiscord<Rika> i think he means he doesnt see it running when it should
17:20:57leorize@Rika: well the IPC here is a file :P
17:21:25leorizeit's arguably much simpler than any alternative
17:21:34FromDiscord<Rika> hmm i guess it is
17:21:34leorizethough I think LSP have its own way
17:27:02*fALSO joined #nim
17:27:05fALSOHello
17:27:10leorizehi
17:27:54fALSOTrying out nim for the first time, going to take a look at the parseopt library
17:28:08*rokups quit (Quit: Connection closed for inactivity)
17:28:12leorizeI'd say don't use that one :P
17:28:24fALSOi need three arguments
17:28:30leorizeusually these third party packages get the job done faster:
17:28:32leorize!repo cligen
17:28:34disbothttps://github.com/c-blake/cligen -- 9cligen: 11Nim library to infer/generate command-line-interfaces 15 168⭐ 12🍴 7& 1 more...
17:28:35leorize!repo argparse
17:28:37disbothttps://github.com/iffy/nim-argparse -- 9nim-argparse: 11Argument parsing for Nim 15 33⭐ 3🍴 7& 1 more...
17:28:55fALSO-m name [ -r time ] [ -s repeats ]
17:28:58disruptek2nd argument: you can get better support for cligen.
17:29:03fALSOok
17:29:16fALSOgonna look into your urls ;-)
17:29:17YardanicofALSO: yeah cligen will be really easy to use for your use-case
17:29:48fALSOi have this made on a bash script using getopt, but its becoming too huge and hard to understand
17:29:58fALSOgoing to take a look at doing this in nim ;-)
17:30:06fALSOread about the lang on hacker news
17:30:14fALSOlooks like python somehow
17:30:27fALSOthank you yardanico leorize
17:30:29disruptekthe interwebs add 10lbs.
17:31:13YardanicofALSO: it might look like python on the first glance, but it really is very different :)
17:31:45fALSOthis clingen also seems to need = separating the key from the value
17:31:50FromDiscord<Recruit_main707> someone knows a bit of go in here?
17:32:13*tane joined #nim
17:32:22leorizemost of us kinda do :P
17:32:55FromDiscord<Recruit_main707> `math.Float32bits(n)` is this the same as `cast[uint32](n)` in nim?
17:33:09*endragor quit (Remote host closed the connection)
17:33:45Yardanico"Float32bits returns the IEEE 754 binary representation of f, with the sign bit of f and the result in the same bit position. Float32bits(Float32frombits(x)) == x."
17:34:00Yardanicoyeah
17:34:03Yardanico"func Float32bits(f float32) uint32 { return *(*uint32)(unsafe.Pointer(&f)) }" implementation
17:34:14Yardanicoit's the same as casting
17:34:50leorizehttps://github.com/alaviss/nim-ryu/blob/master/basicconv.nim#L34-L52
17:34:56FromDiscord<Recruit_main707> thank god, because i didnt understand shit in the wiki (that thing you have cited)
17:34:59leorizeI have a bunch of helpers here that you're free to copy
17:36:36Yardanico@Recruit_main707 you could just check the source code :P
17:36:54Yardanicoby clicking on "Float32bits" in the header here https://golang.org/pkg/math/#Float32bits
17:37:21FromDiscord<Recruit_main707> oh
17:48:56*dddddd joined #nim
18:03:52*xet7 joined #nim
18:12:39*endragor joined #nim
18:17:30*endragor quit (Ping timeout: 258 seconds)
18:28:34disruptek~bentley
18:28:34disbotbentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek
18:28:34disbotbentley: 11a good boy
18:30:21dom96disruptek, is that your pupper?
18:30:28disruptekyeah.
18:41:48ZevvI can see that lump you found while petting him some time ago
18:41:59disruptekyeah.
18:42:17disruptekwait.
18:42:26disruptekyeah, it's still there.
18:42:33Zevvgood!
18:42:49disruptekit's wore down to a nub.
18:48:00*zacharycarter quit (Ping timeout: 256 seconds)
18:52:04Araqdisruptek: my code works
18:52:15disruptekwhat?
18:52:32AraqSSA for DrNim
18:52:58disrupteki wish that meant something to me.
18:53:10disrupteksingle something assignment?
18:53:10Araqbut it's very complex. now what? rewrite? document it well? if so, where?
18:53:22disruptekjust tests.
18:53:31Araqand I should really work on something more important...
18:53:32disruptekit is the nim way!
18:53:46disruptekpeople think you spend too much time on drnim and not enough on arc.
18:53:48Araqso ... how to get out of this dilemma?
18:54:07Zevvwhich is more fun?
18:54:17Araqdisruptek: cooldome fixes ARC though and I review and merge his PRs
18:54:19Zevvlet the minions do the mundane work, focus on the stuff that keeps you going!
18:55:01disruptekitym nimions
18:55:03AraqZevv: right now DrNim makes my head explode which is why I'm doing it. I pretend to work on stuff nobody else can do
18:55:46Zevvaraq: sweet, that's the stuff worth working on. Noone wants to see araq burned out on boring jobs
18:57:11FromGitter<Araq> check this out: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e9b4d87a9ca1862064921cb]
18:58:01Zevvthat is darn sweet!
18:58:03*kenran joined #nim
18:58:19disruptek#12818
18:58:21ZevvWill it be performant enough for real use?
18:58:21disbothttps://github.com/nim-lang/Nim/issues/12818 -- 3inheritance and generics and ambiguous error message ; snippet at 12https://play.nim-lang.org/#ix=24K1
18:58:46*kenran quit (Client Quit)
18:58:55AraqZevv: it's pretty slow
18:59:06*kenran joined #nim
18:59:26Araqbut we can cache the results, I ensured the string representation is sound and cachable
19:00:46disruptek#13510
19:00:47disbothttps://github.com/nim-lang/Nim/issues/13510 -- 3mutable iteration over mutable type produces a codegen error ; snippet at 12https://play.nim-lang.org/#ix=2cJp
19:04:40*xcm quit (Read error: Connection reset by peer)
19:04:57*endragor joined #nim
19:06:36*xcm joined #nim
19:06:37*zacharycarter joined #nim
19:07:20*xet7 quit (Ping timeout: 258 seconds)
19:08:47*xet7 joined #nim
19:11:27*endragor quit (Ping timeout: 260 seconds)
19:12:14*hax-scramper quit (Ping timeout: 240 seconds)
19:13:17FromGitter<sheerluck> Don't you think that is nice for gitter users that <Araq> from IRC switched to @Araq from Gitter when he wanted to paste code snippet?
19:13:24*fALSO left #nim (#nim)
19:17:07Yardanicohe could paste code right here in IRC and nobody will say a thing :P
19:21:16*xcm quit (Ping timeout: 256 seconds)
19:27:37FromDiscord<KingDarBoja> Hi guys
19:30:13Yardanicogreetings
19:30:24*xcm joined #nim
19:33:37FromDiscord<KingDarBoja> ❤️
19:37:43FromGitter<zetashift> hiya
19:39:56FromDiscord<KingDarBoja> o/
19:41:13*abm joined #nim
19:41:24FromDiscord<KingDarBoja> Watching anime right now instead of coding xD
19:43:13FromGitter<zetashift> sounds like me
19:43:35leorize[m]dom96: did you model FutureStream[T] after C#?
19:43:55leorize[m]I don't quite understand how this interface should be used
19:44:15leorize[m]at first I thought it would the the async equivalent of `Stream`
19:44:19*audiophile_ quit (Quit: Going offline, see ya! (www.adiirc.com))
19:44:37*audiophile_ joined #nim
19:44:53*audiophile_ quit (Client Quit)
19:47:30FromDiscord<KingDarBoja> Sounds very Dart to me
19:49:45leorizethe greatest feature that I can see in FutureStream is the ability to reuse memory
19:50:03leorizesince you consume the value in the stream
19:50:24leorizebut then with a little tweak to Future[T] it would work like that too
19:52:37leorizeI think I'm misunderstanding futurestream
19:52:52leorizegonna see how rust do this kind of thing
19:54:58*hax-scramper joined #nim
19:57:48Yardanicooh guess I found a bug with gc:arc with my interpreter, maybe it's related to object variants
20:02:41*Jesin quit (Quit: Leaving)
20:05:19Yardanicoseems I can make a relatively small repro, hmm
20:12:15disruptekyeah, variant objs are a little tricky for discriminator reasons.
20:12:18PrestigeElegant Beef: Why do you use XChangeWindowAttributes and XSelectInput? I thought they'd both do the same thing (registering the event mask)
20:16:14*hax-scramper quit (Ping timeout: 256 seconds)
20:16:35Yardanicodisruptek: it seems to not be caused by object variants though :)
20:17:30Yardanicocan't think of a good title though
20:20:15Yardanicoalso discovered a compiler SIGSEGV crash in the process, lol
20:27:43*Jesin joined #nim
20:29:52AraqSaturday night, nothing better to do
20:30:16Araqhttps://github.com/nim-lang/Nim/pull/11865 we can discuss it here if you want to
20:30:19disbot[feature] allow `import foo {.privateImport.}` ; snippet at 12https://play.nim-lang.org/#ix=2iAE
20:31:05YardanicoAraq: is code like https://play.nim-lang.org/#ix=2iAF supposed to work at all? It works with refc, but not with arc
20:31:19YardanicoI'm in the process of creating the issue so I wanted to ask
20:31:39Yardanicoalso doesn't work with orc
20:31:51AraqYardanico, no. well the fact that it moves is a bug but afterwards you would have a cycle anyway
20:32:03Araqit's a known bug, somewhat hard to fix :P
20:32:07Araqor maybe not
20:32:09disruptekthis private import is definitely a problem.
20:32:11Yardanicoah ok, then I don't need the issue?
20:32:23Araqit's a known bug
20:32:34Araqbut once fixed you're left with a memory leak
20:32:37Araq:P
20:33:08Araqdisruptek, the feature or the lack of this feature?
20:33:13*xcm quit (Remote host closed the connection)
20:33:16disrupteklack of
20:33:28Araqwhy?
20:33:47FromDiscord<Recruit_main707> sorry to interrupt. Can something like this be done? https://play.nim-lang.org/#ix=2iAG
20:33:48disruptekbecause i have to introduce /structure/ just to hide exports.
20:34:03YardanicoAraq: and what about compiler SIGSEGV if "type A = TableRef[string, B] B = A"
20:34:15Yardanicowhen trying to use these (I understand it's a endless recursion)
20:34:22disruptekopenArray is for use in proc params.
20:34:27AraqYardanico, that's new :-)
20:34:49disruptekit's senseless as a /type/ definition.
20:34:56FromDiscord<Recruit_main707> disruptek, so i should use a seq then right?
20:35:02disruptekyeah.
20:35:10FromDiscord<Recruit_main707> oki
20:35:11disruptekor array, etc.
20:35:15AraqRecruit_main707: you can use ptr UncheckedArray[byte]
20:35:30*xcm joined #nim
20:35:30FromDiscord<Recruit_main707> is ptr necesary?
20:35:42Araqyes
20:36:02*Trustable quit (Remote host closed the connection)
20:36:03Araqdisruptek, please elaborate
20:36:25disrupteki want to hide code in different files.
20:36:29FromDiscord<Recruit_main707> as the language creator, which one is the best way (and i stop disturbing)
20:36:38disruptekthese bits need to talk to each other, so a lot of stuff gets exported.
20:36:50disruptekbut i really don't want to impose all that shit on the user of my library.
20:37:02AraqRecruit_main707: depends on the use case
20:37:04disruptekor even expose it to them.
20:37:33YardanicoI think private imports might be useful in some (not a lot of) cases
20:37:36Yardanicobut still
20:37:44disrupteki think it's reasonable to hand my users unloaded weaponry.
20:37:50Araqdisruptek, this changes the argument entirely
20:38:03disrupteki'm nothing if not predictable.
20:38:17Yardanicohttps://github.com/nim-lang/Nim/issues/14015
20:38:19disbotCompiler crash when types recursively depend on each other ; snippet at 12https://play.nim-lang.org/#ix=2iAJ
20:38:23Araqthe argument as I understood it was "other programmer X wrote Y and I seek to sneak into it"
20:38:48Araqyour argument is now "I myself private import my own stuff so that I don't have to export fields to others"
20:39:15Araqwhich is a totally different viewpoint that I'll sleep over, thanks
20:39:23FromDiscord<Recruit_main707> the original go struct has this: `Bytes []byte` this transpilation is pretty big and id rather dont go back to things i considered done.
20:40:01AraqRecruit_main707: use a seq[byte] then or a 'ref seq[byte]' to emulate zero-copy slices
20:40:18disruptekthe way krux does it explains the problem quite well.
20:40:24FromDiscord<Recruit_main707> ok cool
20:40:27disruptekhe just includes everything in a single file.
20:40:52disruptekstuff he exports is exported. everything else just works and has access to everything else.
20:41:08disruptekthis is a solution but it's not a pleasant one.
20:42:02disrupteki guess you can use this strategy across directories, which means it's the go technique. i like the way that works.
20:42:09AraqI prefer it over faking privacy fwiw. "Ah ok, these fields are hidden, only the getters/setters can mutate it. -- Er argh, private imports everywhere"
20:43:08Araqit's faking hygiene where there isn't any, it's the typical "as long as it's beautiful it cannot be bad" feature
20:43:26Araqsee also "we need a more beautfiul .emit statement"
20:43:29disruptekif you import a dir, we import dirname.nim. if you import a dir and no dirname.nim exists, we simply concat all files? but they are unordered. :-(
20:43:54disrupteki guess we have this today without changing anything.
20:44:09Araqthe Go way is simply to 'include' all the files, you can do the same in Nim
20:44:19disruptekthat's what i'm saying.
20:44:35disruptekbut we could have the compiler re-order them and then you don't need a root-level `include`.
20:44:47disruptekbut, go gets away with that.
20:44:57disruptekit'd take work that we agree the user can do instead, for us.
20:45:13disruptekplus, it lets you further fracture the directory and stuff.
20:45:38disrupteki like it.
20:46:00Araqmaybe but it's beginning to look like an entirely different feature
20:46:27Araq"I want 'import dir' to work, it shall create a concat'ed file with .codeReordering inside"
20:46:29disruptekit changes nothing. users just need to be taught how to best use the semantics we have.
20:46:44disruptekno, i don't want that.
20:46:50Araqwell too bad
20:47:04Araqit would be simpler to do than .privateImport
20:47:14disruptekwe don't need to change anything.
20:47:33disruptekwe just use krux02 approach; works great.
20:49:55krux02what is my approach?
20:50:08disruptekinclude everything in a file.
20:50:15krux02ok
20:50:24krux02yea I do that.
20:50:26disruptekwe are on mumble.
20:50:29krux02Araq recommended me to do it
20:50:32krux02ok
20:50:36*FromDiscord <KingDarBoja> Gods are speaking, what a good moment to be alive
20:51:46Yardanicoxdd
20:56:16FromDiscord<Elegant Beef> So prestige, i've got window selection working now, but still have not implemented `_NET_ACTIVE_WINDOW`
20:56:36*kenran quit (Quit: leaving)
20:56:37PrestigeNice
20:56:50PrestigeI'm trying to think of a way to allow a config file for keybindings
20:57:21PrestigeMaybe I'll just hardcore it for now and do that later
20:57:25YardanicoPrestige: use cfg (parsecfg) or TOML (parsetoml) :P
20:57:34YardanicoTOML is really nice and has a nim lib https://github.com/NimParsers/parsetoml
20:58:18Prestigeoh nice, thanks Yardanico
20:58:26Yardanicoparsecfg is in stdlib
20:58:45FromDiscord<Elegant Beef> Look at my config.nim file and the setup proc for inspiration on how
20:58:56FromDiscord<Elegant Beef> I was sorta interested in using nims as a config file but that seems silly 😄
20:59:14Yardanicowell you can do that
20:59:15FromDiscord<Elegant Beef> setup proc inside goodwm.nim
20:59:20Yardanicojust embed the vm in your app
20:59:22Yardaniconimvm I mean
20:59:30Yardanicoand you will be able to evaluate .nims in your compiled apps
20:59:44FromDiscord<Elegant Beef> Yea i intend to
21:00:01FromDiscord<Elegant Beef> <https://github.com/Serenitor/embeddedNimScript> Looking at this for it
21:00:06FromDiscord<Elegant Beef> Since i also want widgets
21:00:23FromDiscord<Elegant Beef> widgets using nims*
21:03:10*couven92 quit (Read error: Connection reset by peer)
21:03:34*couven92 joined #nim
21:03:47FromDiscord<Elegant Beef> I do plan on doing the thing that will probably turn anyone away from my WM and that is forcing the usage of my status bar, although it'll be made using either nuklear or cimgui so atleast should be fairly customizable
21:12:46*opal joined #nim
21:25:45FromGitter<awr1> https://github.com/nim-lang/Nim/pull/13985
21:25:46disbotMake bitand, bitor, bitxor varargs-friendly
21:26:00FromGitter<awr1> by a macro, is a template sufficient?
21:26:44*couven92 quit (Read error: Connection reset by peer)
21:27:06*couven92 joined #nim
21:28:39FromGitter<awr1> or is there something i'm missing about how varargs for-loops are implemented
21:32:26FromGitter<awr1> also i was thinking of an addition to bitops: `func bitSlice[T: SomeInteger](bits :T; slice :Slice[T])`
21:32:44FromGitter<awr1> that extracts a slice of bits and shifts them accordingly
21:36:08*solitudesf quit (Ping timeout: 256 seconds)
21:48:45leorize@awr1: varargs is just a syntactic sugar for openArray
21:49:11FromGitter<awr1> i see
21:49:45FromGitter<awr1> is that totally true though? because individual members of varargs can have differing types can't they?
21:49:52leorizenope they can't
21:49:54FromGitter<awr1> or wait no they can't
21:49:55disrupteknope.
21:49:55FromGitter<awr1> yeah
21:50:10FromGitter<awr1> because echo works by $ing them in the argument
21:51:10FromGitter<awr1> yeah i think i might make an extra PR for this, making slices work with bits
21:51:14*xcm quit (Remote host closed the connection)
21:51:19FromGitter<awr1> i think it would make for a nicer API
21:53:39*xcm joined #nim
21:59:25FromDiscord<Recruit_main707> i have no clue how to do something like this: https://play.nim-lang.org/#ix=2iBc (sorry for all this lame questions i am asking)
22:00:19*couven92 quit (Quit: Client Disconnecting)
22:14:53*abm quit (Quit: Leaving)
22:19:07*tane quit (Quit: Leaving)
22:28:15*hax-scramper joined #nim
22:29:27*liblq-dev quit (Quit: WeeChat 2.7.1)
22:30:50Araq!rfc writeLine
22:30:51disbothttps://github.com/nim-lang/RFCs/issues/9 -- 3osproc: `waitForExit` can leave process object in inconsistent state (Windows) 7& 3 more...
22:30:58Araq!rfc write
22:31:00disbothttps://github.com/nim-lang/RFCs/issues/197 -- 3Allocation free printing: remove write(a: varargs[string]) 7& 29 more...
22:35:08leorizeRecruit_main707: well I'm not sure what you're trying to do
22:35:18leorizebut fwiw `streams` let you implement interfaces like that
22:38:00FromDiscord<Recruit_main707> I have a type, with a Bytes field, and I want to write something in that field, but I’d need it to be initialized, and I don’t know how to do it because it’s a field
22:38:38FromDiscord<Recruit_main707> (Having the Table initialized didn’t seem to work)
22:40:55leorizetry not to uppercase everything first :P
22:41:42leorizewell fwiw I'm still not sure what you're trying to do
22:41:47leorizeare you porting some C/C++ code?
22:43:03FromDiscord<Recruit_main707> It’s go
22:44:30leorizecan you give us a small complete example?
22:44:39FromGitter<awr1> what on earth
22:44:45leorizethe snippet doesn't compile because it doesn't have all the types
22:44:50FromGitter<awr1> i hope i screwed up something and this isn't a lexer bug
22:45:48FromDiscord<Recruit_main707> leorize: sadly, I can’t right now, but the only type it’s used and not defined in there is VOffestT which is an in32 iirc
22:46:21FromDiscord<Recruit_main707> It’s not very important
22:46:47FromGitter<awr1> okay it was my bad lol
22:47:38leorizeRecruit_main707: https://play.nim-lang.org/#ix=2iBv
22:49:30FromDiscord<Recruit_main707> [self pin]
22:49:54FromDiscord<Recruit_main707> So that I can search for this tomorrow morning :P
22:49:59FromDiscord<Recruit_main707> Thank you
22:55:23zacharycarterif you're debugging in lldb - how do you deal with templates and line numbers?
22:55:38zacharycarterI mean for adding breakpoints in nim source files
23:00:32*Vladar quit (Quit: Leaving)
23:01:12zacharycarterah you can do regex for setting breakpoints - perfect
23:06:22zacharycarterHmm - so I thought that `--exceptions:setjmp` solved my problems related to `--gc:arc` and threads but my program is intermittently crashing and whenever I run it through lldb I run into an EXC_BAD_ACCESS signal
23:06:59zacharycarterI looked at the frame variables and saw there was a nimErr local which I dereferenced and the message it has was - `error: Couldn't apply expression side effects : Couldn't dematerialize a result variable: couldn't read its memory`
23:07:18zacharycarterthis is happening inside `threadProcWrapper`
23:07:52Araqzacharycarter, which OS?
23:08:14zacharycarterAraq: macOS Mojave 10.14.6 (18G103)
23:08:42zacharycarterThe body of my thread function is simply `discard`
23:09:00Araqzacharycarter, try --tlsEmulation:off
23:09:09zacharycarterokay let me give that a shot
23:10:35disruptekAraq: yeah, ima eat. have a good night; effects system seems to work, but messages are tough.
23:10:37zacharycarterwell that got me to a new error - will try to look more into this - thanks Araq
23:40:22FromGitter<awr1> and did the PR: https://github.com/nim-lang/Nim/pull/14016
23:40:25disbotAdded bitslice operations for bitops ; snippet at 12https://play.nim-lang.org/#ix=2iBP
23:41:31FromGitter<awr1> wasn't sure if adding the non-mutating procs would be very helpful but i found it strange that they were mutating
23:44:27*Jjp137 quit (Read error: Connection reset by peer)
23:45:39*raz left #nim ("*fump*")
23:55:37*krux02_ joined #nim
23:58:23*krux02 quit (Ping timeout: 252 seconds)