<< 26-06-2020 >>

00:04:36*endragor quit (Ping timeout: 256 seconds)
00:37:24*endragor joined #nim
00:42:13*fredrikhr quit (Ping timeout: 246 seconds)
00:43:34*oddp quit (Ping timeout: 240 seconds)
00:51:18*krux02_ quit (Remote host closed the connection)
00:55:57*Tlongir joined #nim
01:08:27*lritter quit (Quit: Leaving)
01:10:50*Kaivo quit (Ping timeout: 260 seconds)
01:25:59PrestigeI have a proc that takes type A, where type A itself is = proc(...) but if I pass a proc with the same signature in, it declares the types don't match (proc(...) but expected type A)
01:26:19Yardanicothey're probably not the same type even if you think so :)
01:26:26Yardanicoe.g. closures, gcsafe, locks, etc
01:26:27Prestigehmm
01:26:30Yardanicoshow code :P
01:29:13PrestigeYou're right I needed to add a pragma, thanks
01:36:35leorizethis is why that message needs highlighting to show why something doesn't match...
01:52:35*chemist69 quit (Ping timeout: 272 seconds)
01:53:56*chemist69 joined #nim
01:55:57FromGitter<timotheecour> things that will improve sigmatch error: ⏎ ⏎ 1) show the type kind (often becomes clear after that) ⏎ 2) use the more informative `preferMixed` ⏎ 3) show the loc, eg : defined at foo.nim(1,2) [https://gitter.im/nim-lang/Nim?at=5ef555ad405be935cdc257e6]
01:56:55FromGitter<timotheecour> I’d do it but updating tests isn’t super fun
02:39:15*polypus74 quit (Quit: WeeChat 2.8)
02:40:12FromGitter<ynfle> Is there a library for dealing with points?
02:41:42FromDiscord<impbox> Ynfle, like 2d space points?
02:41:49FromGitter<ynfle> Yup
02:41:58FromDiscord<impbox> glm library is pretty good
02:41:59FromGitter<ynfle> I made my own type but just wondering
02:42:22FromGitter<ynfle> In stdlib?
02:42:28*muffindrake quit (Ping timeout: 260 seconds)
02:42:32FromDiscord<impbox> Nimble glm
02:42:48FromDiscord<impbox> stdlib had basic2d but it's been removed i think
02:42:59FromDiscord<impbox> glm is better
02:44:36*muffindrake joined #nim
02:47:45FromGitter<ynfle> 👍
03:52:44*chemist69 quit (Ping timeout: 244 seconds)
03:54:02*chemist69 joined #nim
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:38*supakeen joined #nim
04:15:54*waleee-cl quit (Quit: Connection closed for inactivity)
04:32:13FromDiscord<Zed> how can i output the generated c files in the current directory rather then in nimcache?
04:48:31*nsf joined #nim
04:58:32leorizeyou can't
04:58:37leorizebut you can move the nimcache
04:59:02leorizein fact it's even possible to make the current directory the nimcache :P
04:59:09leorize--nimcache:/path/to/cache
05:15:02*narimiran joined #nim
05:17:02TlongirCan I access Nim's error messages during compilation? Like if I want to get "and has to be discarded" if nim's on 1.2.2, but if I also want to get "and has to be used" if someone's running the devel branch?
05:20:13leorizeyou can't, why do you want to though?
05:31:23FromDiscord<Yardanico> the only usecase would be if they want to make something like inim 😛
05:44:01shashlick@leorize - https://travis-ci.org/github/genotrance/nightest/jobs/702269394 - koch test not working
05:46:59shashlickalso on windows, koch test recompiles testament which then complains that ssl is missing - https://travis-ci.org/github/genotrance/nightest/jobs/702269397
05:49:10leorize[m]shashlick: nim is not in PATH for linux
05:50:05leorize[m]and it also appears that Nim is not in PATH for windows too :p
05:51:10shashlickis that what bothers testament? okay let me try
05:53:39*solitudesf- joined #nim
05:56:52leorize[m]yea, koch won't use the prebuilt testament and will build it's own in testament/testament
05:57:20leorize[m]if the bin folder is not in PATH the dlls won't be found by testament
05:57:54*narimiran quit (Ping timeout: 240 seconds)
05:58:11shashlicklinux 32-bit issue - https://travis-ci.org/github/genotrance/nightest/jobs/702271588
05:58:16leorize[m]koch also tries to look for nim in PATH to pass as argument to testament so you need nim there too
05:59:15shashlickhow come windows still fails - i added bin to path - https://travis-ci.org/github/genotrance/nightest/jobs/702271590
05:59:28*narimiran joined #nim
06:00:33shashlicknever mind on windows
06:03:24Yardanicowould it be okay for me to make a bot which would post new forum post/thread notifications in the chat? or maybe I can make it to only notify of new posts in the main chat, and other stuff in the separate discord channel or something
06:03:50Yardanicobecause apparently nim forum has a nice JSON api, and to not overdo requests I would only check once every 5 minutes
06:04:56leorize[m]Yardanico: make a new #nim-rss channel I guess?
06:05:10Yardanicoah right
06:05:26leorize[m]or you can use #nim-news with disbot too
06:05:38Yardanicowell yeah but it's already bridged to discord #github-events lol
06:05:45Yardanicomaybe I should ask 4raq to set up a github webhook
06:05:47leorize[m]shashlick: I'll look into 32bit later, gtg
06:05:53Yardanicoso we can have nice github events in discord :D
06:06:00leorize[m]Yardanico: bridge smarter :p
06:06:37leorize[m]I can pull in a matrix bot to do the same :p
06:06:38Yardanicobut yeah, I want to do it for the forum so potentially more people visit it :P
06:07:19*solitudesf- is now known as solitudesf
06:08:30FromDiscord<Zed> can i interface with js libraries with nim?
06:08:37FromDiscord<Zed> or does it only compile to js
06:08:43Yardanicoif you compile with the JS backend - yes
06:08:46Yardanicoof course you can
06:08:56Yardanicobut you shouldn't use Nim's JS backend for NodeJS
06:09:15FromDiscord<Zed> i found this↵https://github.com/exokitxr/exokit
06:09:21FromDiscord<Zed> it would be an interesting nim project
06:09:28Yardanicoah, for the browser, then sure
06:09:49Yardanicojust an example (for node though) of js interfacing when you compile to JS https://play.nim-lang.org/#ix=2q1D
06:11:39FromDiscord<aeos> hi, how do I destructure a sequence, or turn a seq into something destructurable?↵↵`let (a, b) = @["a", "b"]`
06:11:45Yardanicothere's a lib for this
06:11:59Yardanicohttps://github.com/technicallyagd/unpack
06:12:32FromDiscord<aeos> ah alright. should i not try to write nim as a functional language?
06:12:40Yardanicowell, you can
06:12:45Yardanicothere are some FP libraries
06:13:08FromDiscord<aeos> yeah but it's not really a first class citizen it feels like
06:13:17Yardanicowell sure, not by default :)
06:14:00Yardanicobut with macros you can make it feel like a first-class citizen
06:14:03Yardanicosee https://github.com/vegansk/nimfp
06:14:06Yardanicohttps://github.com/zero-functional/zero-functional
06:14:13Yardanicohttps://github.com/andreaferretti/patty
06:14:31Yardanicojust some examples
06:19:12Tlongir@leorize[m], we parse compilation errors to trigger stuff. So we look for substrings like that to pinpoint different errors and handle them accordingly. Just wanted a backwards compatible way without having to hardcode in both strings
06:25:41*rockcavera quit (Remote host closed the connection)
06:35:47YardanicoTlongir: there's no such a way I think
06:36:51Yardanicoyou can get messages from https://github.com/nim-lang/Nim/blob/devel/compiler/lineinfos.nim though
06:37:47YardanicoI mean if you want to hardcode better :P
06:38:07Yardanicoah wait actually
06:51:11*PMunch joined #nim
06:52:21*dmi00 quit (Remote host closed the connection)
06:53:26*pietroppeter joined #nim
06:54:14*dmi0 joined #nim
06:59:45*Senny quit (Ping timeout: 272 seconds)
07:00:11*endragor quit (Remote host closed the connection)
07:00:40*endragor joined #nim
07:01:45*Vladar joined #nim
07:06:14*endragor quit (Ping timeout: 265 seconds)
07:08:24Yardanicook, with enough hacks I can get nice "starting context" for posts on the forum
07:08:45Yardanicofor https://forum.nim-lang.org/t/6483 - https://i.imgur.com/ti1tln4.png
07:09:07Yardanicothat involves some html parsing and some hardcoded logic to deal with quotes
07:10:10Yardanicoi limit to 50 characters but by whole words
07:14:00*marnix joined #nim
07:18:45*endragor joined #nim
07:18:58FromDiscord<Rika> will added quit procs run on SIGINT?
07:25:02PMunchI think so
07:32:54*Jjp137 quit (Ping timeout: 240 seconds)
07:39:55FromDiscord<Rika> uh, are there any good usecases for quit procs? since theyre {.noconv.}
07:40:24FromDiscord<Rika> im assuming i cant use it to setup graceful shutdown
07:40:25PMunchThere are some, but they're pretty rare
07:40:51FromDiscord<Rika> hm, how would i go about executing graceful shutdown for SIGINT then
07:47:45PMunchRegister a handler for SIGINT that sets a flag and have a part of your normal program check this flag and gracefully exit
07:47:53PMunchI think that's how you should do it
07:51:36FromDiscord<Rika> handler? where can i find those
07:57:01FromDiscord<lqdev> well there's setControlCHook
07:57:36FromDiscord<Rika> still takes in a {.noconv.}
07:58:38FromDiscord<lqdev> hm
08:00:26FromDiscord<Rika> well i found https://nim-lang.org/docs/selectors.html#registerSignal%2CSelector%5BT%5D%2Cint%2CT but ill have to figure out how it works
08:14:32Yardanicoso guys I'll do a test run of the forum updater thing in this channel (only for new forum threads)
08:18:35*nikita` joined #nim
08:19:35Yardanicoit should post the last thread and post rn
08:19:44Yardanicoah no, only last thread, sry
08:19:48FromDiscord<ForumUpdater> New thread by Adilh: Choosing Nim
08:20:35FromDiscord<Rika> :thonk: also here?
08:22:40Yardanicohere only threads
08:22:44Yardanicoin #forum-events threads + posts
08:22:57Yardanicolemme try to make a new post
08:23:56Yardanicoyass it works
08:24:14FromDiscord<Rika> smh
08:24:15FromDiscord<Rika> pinged me
08:24:23Yardanicoyes
08:24:24FromDiscord<Rika> lmao
08:24:34Yardanicoah, need to embed the link too
08:24:38Yardanicowhy I forgot about this lol
08:26:10Yardanico(https://google.com)
08:28:06FromDiscord<Rika> another muted channel :SonoYay:
08:29:09Yardanicook it works fine
08:29:14Yardaniconow lets just wait for ppl to post stuff
08:29:18YardanicoI'm running it on my own PC for now
08:31:08Yardanicocurrent code - https://gist.github.com/Yardanico/6f95d35631da3f9bddf37c2082e2b5f4
08:31:32Yardanicoit's not really clean since I just hacked it together (especially the thread/post removal logic and stuff)
08:37:01PMunch@Rika, yeah that's why I said it should only set a flag, and then the actual logic should be in your regular Nim program
08:39:07FromDiscord<Rika> wouldnt setting a flag require it to be a closure though
08:39:14FromDiscord<Rika> unless you mean to use selectors
08:39:22Yardanicowell not exactly
08:39:33Yardanicohmm wait lemme see selectors
08:39:47Yardanico"The data is application-defined data, which will be passed when signal raises."
08:39:53Yardanicoyou can just pass a pointer to the flag lol
08:40:37PMunch@Rika, nah just flip a global bool variable
08:40:47Yardanicoah right, if it runs in the same thread its ok
08:40:51FromDiscord<Rika> i can use a global in a noconv?
08:40:55Yardanicoyes sure why not?
08:41:04FromDiscord<Rika> dunno, assumed i cant
08:41:07PMunchOr yeah, what Yardanico said is another way
08:41:24Yardanicousing globals doesn't make it a closure
08:41:44FromDiscord<Rika> ill go for the control c hook
08:41:47FromDiscord<Rika> sounds simpler
08:43:06*Jjp137 joined #nim
08:56:19FromDiscord<ForumUpdater> New thread by Moigagoo: Norm 2.0.0, see https://forum.nim-lang.org/t/6471
08:56:21FromDiscord<ForumUpdater> New post by Moigagoo in Norm 2.0.0: You are right, update is a far from optimal operation in the current ... (https://forum.nim-lang.org/t/6471#40091)
08:56:39Yardanicoehh, it shouldn't have posted the thread itself
08:57:00Araq<ForumUpdater> ? awesome
08:57:03Yardanicoyes
08:57:13Yardanicoit's around 100 lines of code, since nim forum's json requests are easy to do :P
09:03:07*pietroppeter quit (Quit: Connection closed for inactivity)
09:06:12FromDiscord<Rika> the control c hook thing isnt working too well xd, maybe ill try selectors
09:07:29*krux02 joined #nim
09:09:05Yardanicook I think I fixed the forum updater bot, will restart it and clean files, so it should only show a new post right now
09:09:43FromDiscord<ForumUpdater> New post by Moigagoo in : You are right, update is a far from optimal operation in the current ... (https://forum.nim-lang.org/t/0#40091)
09:09:50Yardanicothe title though :D
09:10:11FromDiscord<Rika> "fixed" 😛
09:10:28FromDiscord<lqdev> @Rika you can always set up a signal trap https://github.com/liquid600pgm/pomod/blob/master/src/pomod.nim#L197
09:10:45FromDiscord<lqdev> the same should work with any set of signals (including SIGINT)
09:11:00FromDiscord<lqdev> adding a `when defined(posix)` would probably be a good idea
09:11:15FromDiscord<Rika> nice
09:11:25FromDiscord<Rika> i have 0 plans for windows support so nice
09:12:27Yardanicoi think I fixed it this time
09:12:47FromDiscord<ForumUpdater> New post by Moigagoo in Norm 2.0.0: You are right, update is a far from optimal operation in the current ... (https://forum.nim-lang.org/t/6471#40091)
09:13:02Yardaniconow let it run :P
09:13:37Yardanicobut damn the code grows fast, it's already ~180 lines
09:13:39FromDiscord<Rika> now i have no idea how to use anything in the posix module
09:13:45FromDiscord<Rika> where can i read info on these
09:13:54Yardanicoin posix specification :D
09:14:38FromDiscord<Rika> man pages time?
09:14:40FromDiscord<Rika> ok
09:15:01*pietroppeter joined #nim
09:17:25*nikita` quit (Quit: leaving)
09:17:35FromDiscord<Elegant Beef> Take it from me rika, you read the posix man pages then cry you dont get it and throw a fit and run
09:17:35FromDiscord<lqdev> well basically you just call `sighold` for any signals you want to catch
09:18:03FromDiscord<lqdev> then you create a `SigSet`, call `sigemptyset` on it, and add any signals you want to catch with `sigaddset`
09:18:11FromDiscord<Rika> im reading that sighold is deprecated :ThonkDumb:
09:18:16FromDiscord<lqdev> uh
09:18:17FromDiscord<lqdev> maybe
09:18:22FromDiscord<Rika> and sigset too
09:18:24FromDiscord<lqdev> idk, I just used what works
09:18:28FromDiscord<Rika> :ThonkDumb: :ThonkDumb: :ThonkDumb: :ThonkDumb:
09:18:36FromDiscord<lqdev> then if those are deprecated I have no clue
09:18:41FromDiscord<Rika> ill just uh
09:18:42FromDiscord<Rika> use them i guess
09:18:46FromDiscord<lqdev> XD
09:18:50FromDiscord<Rika> well ill try using newer apis first
09:18:59FromDiscord<Rika> or rather ill look into how to do the same thing with newer apis
09:19:18FromDiscord<Rika> https://man7.org/linux/man-pages/man2/sigaction.2.html↵what
09:19:21FromDiscord<lqdev> where did you read that it's deprecated?
09:19:30FromDiscord<Rika> https://man7.org/linux/man-pages/man3/sighold.3.html
09:19:48*vicfred quit (Quit: Leaving)
09:20:04FromDiscord<lqdev> damn it
09:20:10FromDiscord<lqdev> but the callback based method is shit
09:20:19*nikita` joined #nim
09:20:46FromDiscord<lqdev> perhaps sigsuspend could work, idk
09:20:50FromDiscord<Rika> knowing posix theyll prolly support this for a few more years lol
09:20:54FromDiscord<lqdev> it really depends on what you want to do
09:21:10FromDiscord<Rika> sigsuspend blocks til signal is emitted tho is it
09:21:14FromDiscord<Rika> doesnt it*
09:21:17FromDiscord<lqdev> yes
09:21:24FromDiscord<Rika> i just wanna gracefully exit
09:21:47FromDiscord<Rika> cant block the thread because i need to do some stuff after signal
09:22:20FromDiscord<lqdev> I guess sigprocmask? idk
09:22:36FromDiscord<Rika> already reading into it
09:22:54FromDiscord<lqdev> btw offline docs ftw
09:23:07FromDiscord<lqdev> I just use `man` in my terminal
09:23:35FromDiscord<Rika> eh i know i'm not using my terminal now
09:23:43FromDiscord<Rika> whichever is faster to get to
09:25:45FromDiscord<ForumUpdater> New post by Moigagoo in Norm 2.0.0: You are right, update is a far from optimal operation in the current ... (https://forum.nim-lang.org/t/6471#40091)
09:29:39*dddddd quit (Ping timeout: 258 seconds)
09:29:56*oddp joined #nim
09:30:36*krux02 quit (Remote host closed the connection)
09:31:51*ForumUpdaterBot joined #nim
09:34:00*ForumUpdaterBot quit (Client Quit)
09:41:08*ForumUpdaterBot joined #nim
09:41:19ForumUpdaterBotNew post by Moigagoo in Norm 2.0.0: You are right, update is a far from optimal operation in the current ... (https://forum.nim-lang.org/t/6471#40091)
09:41:20Yardanicosorry for so much spam today :( just made it IRC instead
09:41:52Yardanicoit now posts to Discord (#forum-events), IRC (#nim), Telegram (nim chat) lol
09:42:02Yardanicoall in 200 loc (and yes it's async now)
09:45:59alehander92_hm what is ForumUpdater
09:46:03alehander92_ah it makes sense
09:46:08alehander92_wait i got confused
09:46:11Yardanico?
09:46:32alehander92_yeah it makes sense
09:46:38alehander92_can it also link reddit
09:46:42alehander92_or this would be too much
09:46:44YardanicoXD
09:46:51YardanicoI certainly can do that
09:46:55Yardanicoeven stackoverflow with enough time lol
09:47:00alehander92_oh i forgot
09:47:02alehander92_about it
09:47:08Yardanicobut for reddit I would only post new posts, not comments
09:47:14Yardanicobecause they're really rare
09:47:18Yardanico1-2 posts per day max
09:47:37alehander92_makes sense
09:47:46alehander92_there can be also
09:47:49alehander92_hn comments related to nim
09:47:53alehander92_but this is too much probably
09:48:22YardanicoI think the feature set is okay for now :P
09:48:26Yardanicowe will see how users like it or not
09:49:01Yardanicoit should be pretty stable though, as I only do HTTPS requests (and check the response codes to not raise exceptions) and irc client
09:49:11Yardanicoit uses only 11mb ram
09:49:31YardanicoI'll let it run on my PC for today
09:54:57alehander92_sounds good
10:18:45*ForumUpdaterBot quit (Remote host closed the connection)
10:19:04*ForumUpdaterBot joined #nim
10:19:12*muffindrake quit (Ping timeout: 260 seconds)
10:22:05*vikfret joined #nim
10:25:11*tane joined #nim
10:25:11Yardanicomade a repo for it - https://github.com/Yardanico/nimeventer
10:34:58ForumUpdaterBotNew post by Mratsim in Choosing Nim: SageMath is a loose collection of C/C++/Fortran/Cython/Python ... (https://forum.nim-lang.org/t/6488#40092)
10:36:15*muffindrake joined #nim
10:37:00*drdee joined #nim
10:42:37*fredrikhr joined #nim
10:43:09ForumUpdaterBotNew post by Mratsim in Procedure overloading with explicit parameters: For me variant/tagged unions/discriminated unions == Sum Type, ... (https://forum.nim-lang.org/t/6489#40093)
10:43:46PMunchHmm, I think these post updates might be annoying..
10:44:14YardanicoPMunch: why? :( I think that they are much less common than normal chat messages
10:44:19FromDiscord<InventorMatt> I just installed nim on my lubuntu atomic pi using apt-get install nim and I appear to be missing the strformat library. is there a simple way to fix this?
10:44:32Yardanicoyes - use choosenim or download a release yourself
10:44:39Yardanicoapt probably installed an ancient nim version
10:45:17PMunchYardanico, just a hunch, I might be wrong :)
10:45:27FromDiscord<InventorMatt> I tried using choosenim initially but then it had difficulty finding the standard library itself
10:45:54Yardanicowhat arch is your atomic pi?
10:45:56Yardanicoarchitecture
10:46:09Yardanicoaarch64 (arm64), armv6, armv7, armv7a? :P
10:47:32FromDiscord<InventorMatt> Intel Atom x5-Z8350
10:47:37Yardanicooh so x86_64
10:47:42*oddp quit (Ping timeout: 256 seconds)
10:47:49Yardanicohttps://github.com/nim-lang/nightlies/releases/download/2020-06-26-version-1-2-ba808ba/nim-1.2.4-linux_x64.tar.xz for x86_64
10:47:55Yardanicohttps://github.com/nim-lang/nightlies/releases/download/2020-06-26-version-1-2-ba808ba/nim-1.2.4-linux_x32.tar.xz for x86
10:48:05Yardanicoit's not exactly the latest stable, but it's from the stable 1.2 branch
10:48:16narimiranit is exactly the latest stable :D
10:48:19YardanicoXD
10:48:26narimiranthe one that is coming out later today :)
10:48:30FromDiscord<InventorMatt> thanks. I'll try that
10:49:19FromDiscord<Vindaar> @mratsim Since you seem to drown in github notifications, probably a good idea to merge this quickly so that arraymancer can be installed for people on devel again: https://github.com/mratsim/Arraymancer/pull/461
10:49:20disbot[docs] fix `docs.nim` imports, paramCount/Str are defined again
10:59:10FromDiscord<mratsim> done
10:59:53FromDiscord<Vindaar> thanks!
11:10:07FromDiscord<InventorMatt> what is new in nim 1.2.4?
11:10:11Yardanicobugfixes
11:10:26Yardanicoits a patch release after all
11:18:11ForumUpdaterBotNew post by Digitalcraftsman in Procedure overloading with explicit parameters: Thanks for all the responses in this vivid discussion. I've started to ... (https://forum.nim-lang.org/t/6489#40094)
11:29:13*ForumUpdaterBot quit (Remote host closed the connection)
11:37:40*Romanson joined #nim
11:49:38PMunchWhat's the difference between the defines `MacOS` and `MacOSX`?
11:52:37FromDiscord<Zed> The 'X'
11:55:46ZevvDude, your nick is even cooler then mine
11:55:57ZevvI feel this bond, bro
11:56:44FromDiscord<Zed> ok
11:56:49FromDiscord<Zed> what's your nickname?
11:57:13FromDiscord<Zed> wait, you are talking to me right?
11:57:25Zevvwho else!
11:57:47FromDiscord<Zed> i didn't think nicknames show up on irc
11:57:50FromGitter<alehander92> i am often confused
11:57:55FromGitter<alehander92> by zed and zevv
11:58:03FromDiscord<Zed> i am zed
11:58:07FromDiscord<Zed> he is zevv
11:58:07Zevvi am zevv
11:58:09Zevvhe is zed
11:58:18FromGitter<alehander92> cool
11:58:23FromGitter<alehander92> i wanna give you candy
11:58:25FromDiscord<Zed> together we are zevv
11:58:37Zevvno, that's wrong
11:58:54FromDiscord<Zed> how, first 2 letters of mine + last 2 of yours
11:59:18Zevvno i am also confused
12:00:40FromDiscord<Rika> Yes
12:00:47FromDiscord<Rika> I have no partner
12:00:49FromDiscord<Zed> together we are ZE(d)+(ze)VV
12:00:53Zevvhttps://www.youtube.com/watch?v=xdGo4PmsUKY&feature=youtu.be&t=5368
12:01:37FromDiscord<Zed> ah so you are also director
12:04:38AraqPMunch, never ues 'MacOS'
12:04:53Araqwe should remove it, MacOS is the classic Mac
12:05:41Zevvttps://i.ytimg.com/vi/Px727NPdcto/hqdefault.jpg
12:05:49Zevvargh the h fell off
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:38*supakeen joined #nim
12:07:02PMunchAraq, right
12:12:06Yardanicooh shoot logged out of the WM
12:12:09Yardanicoforgot I ran the bot
12:12:12Yardanicowill start it in screen now
12:12:46Yardanicobtw, the "codename" for it was forum_stalker :P
12:12:50*ForumUpdaterBot joined #nim
12:12:59ForumUpdaterBotNew post by Hlaaftana in Procedure overloading with explicit parameters: Procedures use " static dispatch " meaning which overload is called is ... (https://forum.nim-lang.org/t/6489#40095)
12:16:31FromDiscord<Rika> macOS is the new name tho
12:16:43FromDiscord<Rika> https://en.wikipedia.org/wiki/MacOS
12:16:53Yardanicoyes, but it's "new" for quite a long time
12:17:01Yardanicofor 4 years now
12:21:12ForumUpdaterBotNew post by Shucks in Choosing Nim: INim is great. Also if you're using VSCode you can try Code Runner ... (https://forum.nim-lang.org/t/6488#40096)
12:23:30*lritter joined #nim
12:29:41*NimBot joined #nim
12:37:16*oddp joined #nim
12:53:34PMunchHmm, I have all the videos running on top of each other now
12:53:40PMunchBut they don't sync properly..
13:03:01*rockcavera joined #nim
13:03:08*dddddd joined #nim
13:18:14*zedeus quit (Ping timeout: 240 seconds)
13:20:19*zedeus joined #nim
13:22:29Araqso ...
13:22:57Yardanicoso? 😨
13:24:47Araqscope based destruction is annoying
13:25:01AraqI feel like I'm doing work I should have done 5 months ago
13:25:21Araq"first get it right, then make it fast" doesn't always work
13:25:37Araqnow that I'm making it fast I need to get right once again
13:28:34*dddddd_ joined #nim
13:28:52FromGitter<phdye> "first get it right, then make it fast" is a bit of a misnomer. "get it right" only covers "what" must be done and generally "in what order". Once you move to "make it fast" everything about the "how" may change and often does.
13:30:42*dddddd__ joined #nim
13:31:26*dddddd quit (Ping timeout: 260 seconds)
13:31:29*Romanson quit ()
13:31:33*nsf quit (Quit: WeeChat 2.8)
13:31:35*dddddd__ is now known as dddddd
13:33:37*dddddd_ quit (Ping timeout: 246 seconds)
13:36:34*dddddd quit (Ping timeout: 256 seconds)
13:39:15*dddddd joined #nim
13:39:59*zedeus quit (Ping timeout: 260 seconds)
13:41:32*zedeus joined #nim
13:41:38Araqwell if I had focusses on scopes from the beginning we would have scope based ARC already with essentially the same amount of code working
13:42:02Araqon the other hand, I had good reasons for doing it function-based when I started
13:44:25FromDiscord<mratsim> well, usually you prototypes and then you trhow away/rewrite the prototype
13:44:26FromDiscord<Rika> might be a dumb question, but is a Selector[T] thread safe?
13:44:38FromDiscord<Yardanico> care to read docs? 🙂
13:44:43FromDiscord<Yardanico> "To use threadsafe version of this module, it needs to be compiled with both -d:threadsafe and --threads:on options."
13:44:55FromDiscord<Rika> care to not be an ass next time?
13:44:55FromDiscord<Yardanico> literally at the top of https://nim-lang.org/docs/selectors.html 😄
13:45:01FromDiscord<mratsim> unless someone vetoes refactoring because you can't sell them to clients
13:45:03FromDiscord<Yardanico> @Rika i'm half joking 🙂
13:45:11FromDiscord<Rika> ok im half mad-- oh wait
13:45:18FromDiscord<mratsim> I wasn't aware of this -d:threadsafe flag :?
13:45:24FromDiscord<Yardanico> neither was I \
13:45:46FromDiscord<Rika> man i should just block you, you've been on my nerves for a few days'
13:45:52FromDiscord<Yardanico> wat
13:45:56FromDiscord<Rika> irritating
13:45:57narimiran??
13:46:00FromDiscord<Yardanico> how
13:46:10FromDiscord<Yardanico> btw seems like -d:threadsafe is only used in selectors.nim
13:46:13FromDiscord<mratsim> the RTFM got on Rika's nerve
13:46:17FromDiscord<Yardanico> lib/pure/selectors.nim:32: const hasThreadSupport = compileOption("threads") and defined(threadsafe)
13:46:26FromDiscord<Rika> the hell does rtfm mean
13:46:33FromDiscord<mratsim> Read the "Fine" manual
13:46:47FromDiscord<Yardanico> read the f*cking manual (sorry for my russian)
13:46:49FromDiscord<Rika> perhaps ive already read it
13:46:54FromDiscord<Rika> and perhaps ive just forgotten
13:47:05FromDiscord<mratsim> I understand, happens to me too
13:47:08FromDiscord<Rika> or are those concepts that cant get through your thick skull
13:47:26FromDiscord<Yardanico> you like my thicc skull huh
13:47:32narimirantoo much NaCl here recently
13:47:33FromDiscord<mratsim> >_>
13:47:46FromDiscord<Rika> perhaps ive just snapped
13:48:01Yardanicoat least we rarely get trolls in here nowadays
13:48:50FromDiscord<mratsim> 1 out of 10 people, is a troll, if you don't see a troll around you, look in the mirror 😉
13:48:52FromDiscord<willyboar> Well we have a V Lang Activist a few days ago
13:48:59FromDiscord<Yardanico> where
13:49:09*vikfret quit (Remote host closed the connection)
13:49:14FromDiscord<mratsim> he left, name started with a L iirc
13:49:24FromDiscord<willyboar> Luke
13:49:28FromDiscord<Rika> its been a really long time since i got that mad
13:49:41FromDiscord<Yardanico> what happened, are you mad because you can't play osu!catch at the same level anymore
13:49:53FromDiscord<Rika> that would just make me sad tho
13:50:07FromDiscord<Rika> and its been like that since a year already
13:53:50*zedeus quit (Ping timeout: 260 seconds)
13:53:57FromDiscord<Rika> now i wonder why this threadsafe flag is needed for selectors
13:54:12*ForumUpdaterBot quit (Ping timeout: 256 seconds)
13:54:44Yardanicowhy he quit
13:55:05Yardanico"Error: unhandled exception: File descriptor not registered. [ValueError]" nice error amirite
13:55:23*ForumUpdaterBot joined #nim
13:56:00Yardanicoah right because I reconnected to the internet
14:26:18*PMunch quit (Quit: Leaving)
14:49:25*zedeus joined #nim
14:51:33FromDiscord<hassel> sent a code paste, see https://play.nim-lang.org/#ix=2qf1
14:51:38FromDiscord<Rika> using selectors with asyncdispatch is kinda funky, is that normal?
14:53:51FromDiscord<Rika> https://play.nim-lang.org/#ix=2qf2↵these two dumped AST trees will show you why theyre failing @hassel
14:54:07FromDiscord<Rika> not really free enough to fully fix it, so
14:54:36FromDiscord<hassel> oh, i see now. thanks! 🙂
14:54:55FromGitter<alehander92> i should just block you all guys
14:55:13FromGitter<alehander92> but i am so bad at irc i'd probably become a president of UK or something
14:55:25FromDiscord<Rika> whats wrong?
14:56:40FromGitter<alehander92> i am kidding
14:56:51FromGitter<alehander92> :P
14:58:56*lbart quit (Ping timeout: 258 seconds)
15:02:46FromDiscord<willyboar> Alehander92 we should arrange that conversation.
15:03:12FromDiscord<willyboar> Or create this repo
15:03:30FromDiscord<willyboar> And use issues
15:05:33alehander92_weell
15:05:42alehander92_yeah whatever you decide guys
15:05:56alehander92_from 1st july i might be able to offer a little time
15:06:08alehander92_but i am really not the top expert in web dev as well
15:08:10*lbart joined #nim
15:08:57FromDiscord<willyboar> I made some talks with PMunch. After all we are on similar timezones
15:09:09FromDiscord<willyboar> We are in the same
15:10:12alehander92_yeah +2
15:10:24alehander92_sounds cool!
15:15:17*endragor quit (Remote host closed the connection)
15:15:22*lbart quit (Ping timeout: 265 seconds)
15:16:12*lbart joined #nim
15:19:44*endragor joined #nim
15:20:14*marnix quit (Ping timeout: 240 seconds)
15:21:49FromGitter<ynfle> Any way to do `newLetStmt("map".ident, map)` where map is a table? How would I convert `map` to it's AST?
15:23:15ForumUpdaterBotNew post by Reneha in Norm 2.0.0: In my view a reasonable solution would be to store a duplicate in a map ... (https://forum.nim-lang.org/t/6471#40097)
15:24:13*endragor quit (Ping timeout: 264 seconds)
15:27:08*marnix joined #nim
15:27:22FromGitter<ynfle> Nvm
15:42:35ForumUpdaterBotNew post by Bpr in Procedure overloading with explicit parameters: Imagine swapping out Nim's object variants for Rust's enums. I think ... (https://forum.nim-lang.org/t/6489#40098)
15:43:30leorize[m]Yardanico: you can put the feed elsewhere...
15:43:43Yardanicowhy? :(
15:43:47YardanicoI really don't understand
15:43:59Yardanicothat's so bad about having a feed like that
15:44:03Yardanicoit's not like we get 10 posts per minute
15:44:33Yardanicos/that/what
15:44:43leorize[m]it's irrelevant to any conversion here, that's all
15:44:59leorize[m]feeds are better off staying out of the main communication channels
15:46:10leorize[m]it's not like moving this to, say #nim-news cost anything...
15:47:47FromDiscord<mratsim> it's in forum-events
15:47:52Yardanicoin discord - yes
15:48:05FromDiscord<mratsim> it can spark discussion though, I'm on the fence
15:49:14leorize[m]it's kinda like how github events, if posted here can spark discussion too
15:49:25ForumUpdaterBotNew post by Lqdev in Procedure overloading with explicit parameters: I'm surprised noone answered OP's question so far. So going back: proc ... (https://forum.nim-lang.org/t/6489#40099)
15:49:29leorize[m]most of the time it's just irrelevant
15:49:36alehander92_maybe for new posts
15:49:39alehander92_it is useful
15:49:41leorize[m]if we want to have a discussion we can just start one by copying the link
15:49:43alehander92_but not for each comment
15:50:07alehander92_like, new posts usually are interesting or are by a newcomer or for a big problem and sometimes ppl dont realize there is irc etc
15:50:21leorize[m]and you can already see how the bot randomly inserts itself in the middle of a conversation
15:50:22alehander92_on the other hand, comments can be less interesting
15:51:08alehander92_yeah, but we get like several posts a day
15:51:10alehander92_they are ok
15:51:29leorize[m]we have other channels that people do subscribe to as feeds
15:51:30*marnix quit (Ping timeout: 256 seconds)
15:51:44alehander92_but new posts are rare events and often are interesting enough
15:51:53leorize[m]I don't see why this has to be in the main channel
15:52:02alehander92_e.g. the first nimbus ad was there, nimconf / library announcements etc
15:52:26ForumUpdaterBotNew thread by Zhongdechan: How to load multiple shared libraries?, see https://forum.nim-lang.org/t/6494
15:52:38alehander92_i think if it happened 3-4 times a day at most it wouldn't annoy anyone
15:52:43leorize[m]doesn't mean it can't go into #nim-news...
15:52:57alehander92_yeah, like now, we can ask ourselves: why is this moderated
15:52:57alehander92_huh
15:53:00leorize[m]anyone that tracks Nim are already in #nim-news
15:53:13Yardanicoalehander92_: because they person just got registered probably :)
15:53:16alehander92_that's literally false
15:53:18alehander92_i am not there
15:53:22FromGitter<wrq> my two cents: it's pretty annoying having offtopic bot feeds here
15:53:23alehander92_and i follow all kinds of nim stuff
15:53:23leorize[m]like we have an entire channel dedicated as a feed...
15:53:36Yardanico@wrq well it's not offtopic too :C
15:53:43leorize[m]you should join then :)
15:53:50FromGitter<wrq> it's literally a random forum post, it's entirely offtopic
15:53:54alehander92_ok lets' try it with posts only if this is a good compromise
15:53:58Yardanicookay ill make it only post new threads then
15:54:02alehander92_well it's a user question
15:54:02Yardanicobut really that makes it less useful
15:54:07alehander92_its exactly the point of this channel
15:54:13alehander92_so it cant be offtopic
15:54:50leorize[m]it's offtopic if we are having a conversation and a random post just appear in the middle of it
15:55:14*ForumUpdaterBot quit (Remote host closed the connection)
15:55:48*ForumUpdaterBot joined #nim
16:00:42alehander92_and if a random user comes with a question
16:00:52alehander92_his random question would also be in the middle of convo
16:01:05alehander92_that's the point of irc
16:01:15alehander92_we can use slack
16:01:22alehander92_if we want good separation of conversations
16:03:59leorizethe response would be here instead of having to go to the forums
16:05:31leorizethe updater bot brings nothing into the conversation than some random posts
16:05:48leorizeI don't think it's any harm to put it in a news channel (that we already have)
16:06:07leorizeand if we want to start a conversation around it we can just copy the link over
16:06:10leorizeit's not even hard
16:07:39leorizeand on discord this bot is already in a separated channel if I'm interpreting mratsim correctly
16:07:43leorizeso why not here too?
16:07:53Yardanicobecause on discord it's much easier to view other channels
16:07:57Yardanicobecause it's still the same server
16:08:02Yardanicobut irc is not centralized like that
16:08:09Yardanicoit's more effort to join and check another channel
16:08:12leorizewell it's not like it goes to some other server here :P
16:08:16leorize /join #nim-news
16:08:19leorizebam you're in
16:08:28leorizeadd it to your autojoin list and you're done
16:08:32leorizedoesn't cost anything
16:08:50leorize#nim-news doesn't even enforce registration
16:09:09Yardanicothe thing is that it's harder for users to even discover #nim-news
16:09:14Yardanicoand also it's "spammed" by disbot
16:09:20Yardanicoso it would be harder to see individual forum threads
16:09:29Yardanicoand if I create a yet another IRC channel, it'll be even less used
16:09:55leorizegive it some colors and it should pop right out
16:10:13Yardanicoyeah and people will of course check #nim-news and scroll to see some forum posts :)
16:10:17leorizemaybe it's spammed by disbot because there's simply more activities on github than the forum
16:10:29Yardanicobut they're different
16:10:40Yardanicogithub is mostly about issues/RFCs/PRs
16:10:57Yardanicoforum is about general nim-related discussions
16:10:59FromDiscord<Rika> i'm hitting a weird segfault bug with asyncdispatch but i cant repro it...
16:11:17alehander92_are you on linux
16:11:21FromDiscord<Rika> yes
16:11:44leorizeYardanico: well issues/rfcs/prs are not nim-related discussions? :P
16:11:47alehander92_you can `rr binary` the binary
16:11:53Yardanicothey are, but they're different
16:11:57FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2qfl
16:12:02alehander92_and then you'll be able to reproduce it many times
16:12:05alehander92_in the same way
16:12:07alehander92_and gdb it
16:12:13leorizenot so much other than non-development questions can happen
16:12:15FromDiscord<Rika> rr?
16:12:18alehander92_if you capture the error once
16:12:24leorizeif we have a lot of talk here all the ForumUpdaterBot posts will be gone too
16:12:27Yardanico@rika what's the actual error?
16:12:31leorizejust like the feeds you just posted earlier
16:12:33alehander92_https://github.com/mozilla/rr/
16:12:41Yardanicoah sigsegv
16:13:12alehander92_(disclaimer working on a project based on it) but it is useful for reproduction imho
16:13:38leorizeI don't think it's really justifiable to have a feed bot run in the main conversation channel
16:13:47leorize(and we should advertise #nim-news too :P)
16:13:57Yardaniconot a lot of people would really read it
16:14:03Yardanicobecause it's too much github events
16:14:06Yardanicoas I said before
16:14:29leorizeenough people who care would read it
16:14:42Yardanicoand others wouldn't even know it exists
16:14:47leorizeI follow most of the discussions that appear on #nim-news for example
16:14:51FromDiscord<Rika> i think its a race condition
16:14:54FromDiscord<Rika> somehow
16:14:59YardanicoI just want to make the community a bit "stronger" in the sense that people use both forums and IRC
16:14:59leorizethen we just have to tell people that it exists :P
16:15:00FromDiscord<Rika> (i'm compiling with threads on
16:15:01Yardaniconot just one
16:15:45leorizenot sure how well that'd work
16:15:45alehander92_rika its really useful to be able to record a failed run of such an example
16:16:01Yardanico@Rika well you might be missing locks in your own code :P
16:16:03alehander92_it might be trickier if multithreading tho
16:16:10leorizeyou can try letting #forum-events run on #general, then you'll see how it's like on irc
16:16:18Yardanico??
16:16:20FromDiscord<Rika> Yardanico: well i'm not touching anything with the other thread
16:16:24leorizeif we start any discussion here on irc around ForumUpdaterBot, discord people won't see it
16:16:30Yardanicowdym lol
16:16:39Yardanicothey would?
16:16:49leorizeI thought you scoped ForumUpdaterBot to #forum-events?
16:17:00leorizedoes it also post in the main channel?
16:17:04FromDiscord<Rika> the forum bot message from irc still goes through the bridgef
16:17:07Yardanicoit's in a separate channel on discord for easier separation, also in main channel (it posts with the IRC client)
16:17:08FromDiscord<Rika> so we still see the bot
16:17:14Yardanicoand telegram
16:17:21leorizeah, I see (make it join #nim-news too please)
16:18:35Yardanicookay, I'll do it a bit later
16:21:20leorizein #nim-news you can make it run for every events :P
16:27:55*nsf joined #nim
16:35:05FromDiscord<Varriount> Anyone know if Nim has the equivalent of a copy constructor? I want to say you can achieve it with the sink/lent stuff, but can't remember the details
16:36:00leorize`=` operator
16:38:13FromDiscord<Varriount> leorize: That about a move constructor?
16:38:21FromDiscord<Varriount> *What about
16:38:26leorize`=sink`
16:38:42leorizebe sure to read
16:38:43FromDiscord<Varriount> Thanks!
16:38:45leorize~destructor
16:38:45disbotdestructor: 11https://nim-lang.org/docs/destructors.html -- leorize
16:39:15leorizeit can be a bit messy but it contains expectations on how these hooks should be implemented
16:41:24FromDiscord<InventorMatt> is there anyway to get the name and path from a File type?
16:41:56FromDiscord<mratsim> If you can do that from a File handle in C yes but pretty sure you can't
16:42:13FromDiscord<mratsim> because even if you delete the file it doesn't invalidate the handle use in Nim
16:42:49FromDiscord<InventorMatt> okay, thanks
16:47:08*drdee quit (Quit: Leaving)
16:48:01FromDiscord<mratsim> Even from a usage point of view, you would have a race
16:48:37FromDiscord<mratsim> you display something but a user can move the file in betwwen or trash it
16:49:02FromDiscord<mratsim> so you can only use that as an information but you cannot base any file processing on that
16:50:33*B4s1l3 joined #nim
16:50:33*B4s1l3 is now known as opDispatch
17:04:59FromDiscord<codic> how can i use a js async function in nim?
17:05:33FromDiscord<codic> like `async (args) =>`
17:09:06FromDiscord<InventorMatt> I am mainly using it because I want it for debugging purposes. So I can echo the file location. I just created a namedFile type and a few procs for it to get the functionality i need
17:11:30Yardanicofinally
17:11:36Yardanicothe indent cursing feature works
17:12:00FromDiscord<Rika> alehander92: cant use rr, i'm on amd
17:12:33Yardanicoisn't this beautiful? :D https://i.imgur.com/2BB6RB1.png
17:12:51FromDiscord<Rika> ouch
17:13:03Yardanicoand yes it compiles
17:13:43FromDiscord<Rika> Yardanico: why dont you switch the "random indent style" *per line*? this does mean that you have to ensure each line is the same indent level now though
17:13:52Yardanico??
17:13:55Yardanicothat's what I do already
17:14:04Yardanicoeach line can have any of the indents at different levels
17:14:19FromDiscord<Rika> then why does the object's fields look so neat
17:14:23Yardanicohmm lets see
17:14:32Yardanicoit should use different ones
17:14:52FromDiscord<Rika> some of them still look very neat
17:14:55Yardanicoah I get what you mean
17:15:21Yardanicoyeah "fixed"
17:15:23FromDiscord<Rika> yeah its gonna make it much worse
17:15:27FromDiscord<Rika> so much worse
17:15:32FromDiscord<Rika> nice
17:15:48Yardanicoits randomized of course https://i.imgur.com/92dyUDf.png
17:16:17Yardanicoit's just that it took me some tens of minutes to properly handle indentation :P
17:16:25FromDiscord<codic> time to repost
17:16:28FromDiscord<codic> how can i use a js async function in nim?
17:16:30FromDiscord<Rika> this is AWFUL
17:16:35Yardanico@codic I don't know
17:17:00Yardanicotime to do case insensitivity thing
17:17:10Yardanicoat least for keywords
17:17:10FromDiscord<codic> oh welp
17:17:19FromDiscord<codic> nvm got it
17:17:19FromDiscord<codic> https://nim-lang.org/docs/asyncjs.html
17:17:36FromDiscord<mratsim> First alpha release of Status Nim desktop messenger: https://github.com/status-im/nim-status-client/releases/tag/0.1.0-alpha.0
17:17:40Yardanicoyay
17:18:41FromDiscord<Vindaar> neat!
17:24:03Yardanico@Rika accidental "feature" https://i.imgur.com/K57sD0m.png
17:41:27FromDiscord<Rika> owwie
17:42:17Yardanicoi did something really bad
17:42:49FromDiscord<Rika> you mean good?
17:43:00Yardanicoyeah
17:46:39Yardanicoi think I should use the compiler's lexer
17:47:58*waleee-cl joined #nim
17:52:55*clemens3 quit (Quit: WeeChat 2.7)
17:59:22FromDiscord<Rika> when i run the buggy server in valgrind i get a lot of valgrind warnings i assume 🤔
17:59:35Yardanicovalgrind with nim doesn't play really well
17:59:41Yardanicounless you compile with --gc:arc -d:useMalloc
17:59:55FromDiscord<Rika> cant, using async
18:00:03Yardanicothat's the thing
18:00:08Yardanicoyou can still try -d:useMalloc but it won't really help
18:00:24FromDiscord<Rika> i did get this though
18:00:36FromDiscord<Shucks> How to get that fancy indent color blocks
18:00:50Yardanicoindent-rainbow plugin in vscode
18:00:58FromDiscord<Shucks> thank you
18:01:04FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=2qfE
18:01:25Yardanicois that with -d:useMalloc or without it?
18:01:29FromDiscord<Rika> w/o
18:01:31Yardanicobecause by default nim has it's own allocator
18:01:36Yardanicoand valgrind wouldn't really understand
18:01:40FromDiscord<Rika> lets see with malloc then
18:01:42Yardanicotry with -d:useMalloc
18:02:08FromDiscord<Rika> still there
18:15:03FromDiscord<Technisha Circuit> I feel sick↵> @Rika accidental "feature" https://i.imgur.com/K57sD0m.png
18:18:06FromDiscord<Technisha Circuit> ~~Can i do |--gc:arc` in js?~~
18:18:12Yardanicono, JS has it's own GC
18:18:14FromDiscord<Technisha Circuit> (edit) '|--gc:arc`' => '`--gc:arc`'
18:18:22FromDiscord<Technisha Circuit> ~~O~~
18:19:18Araqwe try to support destructors well though even for js
18:19:26Araqbut it's entirely untested :-/
18:19:52disrupteky'know, i think these incels might be on to something.
18:20:03Yardanicobtw I'm surprised that nim lexer is so easy to take out of the compiler, slap the compiler / [modules] line and it just works standalone
18:20:18Yardanicoand the stripped down binary is under 300kb
18:25:03*nsf quit (Quit: WeeChat 2.8)
18:25:23*Senny joined #nim
18:25:59disruptekleorize: what's the problem with news?
18:26:33leorize[m]there aren't any, I was just saying that Yardanico should move his bot to #nim-news
18:26:33*vicfred joined #nim
18:26:35disrupteki ignore all discord traffic, so i think i'm only seeing half the issue.
18:26:53disruptekokay.
18:27:14disruptekare you gonna be around for awhile?
18:28:27zedeusi think it might be ok if it only posts new threads, keeps queue of them, and only posts new threads if the chat is relatively quiet (ie. no messages for x minutes or < x messages per minute)
18:28:51zedeusthen it won't be too spammy and won't disrupt conversations
18:30:30disrupteki think #nim-something makes sense because it's easier to opt-in/out, filter, log, spam, whatever.
18:30:58disruptekbut i dunno what this bot even does. i think i'm ignoring yard, too.
18:31:15zedeusi agree, it's just that yard's idea was encouraging people to go to the forum by exposing them to new content they might otherwise not see
18:31:28disrupteksounds good.
18:33:18Zevvhttp://zevv.nl/div/out.gif
18:33:43zedeusneat.
18:34:02leorize[m]can someone with commit access restart this CI run? https://github.com/nim-lang/Nim/pull/14826/checks?check_run_id=812144507
18:34:02disbotasyncnet, net: don't attempt SSL_shutdown if a fatal error occurred
18:34:09ZevvStil calculating. It will finish the day PMunch's compilation finishes
18:34:11leorize[m]the failure seems unrelated
18:34:16YardanicoZevv: I have bad news for yoiu
18:34:17Yardanicoyou*
18:34:20zedeushe had to stop the compilation :(
18:34:25Zevvawww
18:35:14zedeusimage approximation using boxes is cool
18:35:27zedeusi did image approximation using random walks, creates some cool results
18:35:46ZevvI wrapped this lib the other day, it's just a test to see how it does on this
18:35:47Zevvhttps://github.com/zevv/nimcmaes
18:36:24ZevvI've got this brother in law who understands and uses this stuff, and he told me about it. It seems that it's hardly used outside acedemia, but it's so very usefull for all kind of everyday problems
18:36:24FromDiscord<codic> what is wrong with this code? it says invalid indentation on line 5 https://hatebin.com/ksvhicmpyk
18:36:37FromDiscord<codic> using js backend btw
18:36:42disruptekZevv: you make me want to be a better plant.
18:37:01Yardanico@codic no need for comma
18:37:14Yardanicoremove comma from line 6 and 7 (name and aliases)
18:37:15FromDiscord<codic> ah
18:37:18zedeusZevv: interesting stuff, have you found a use case yet? besides approximating da vinci art
18:37:33Zevvsure, I've been using it for years for all kinds of stuff
18:37:46ZevvGeneratic IIR filter coefficents for arbritary responses
18:37:57ZevvCalculating optimal geometry for strandbeest robot legs
18:38:23zedeusyou're blowing my mind
18:38:26Zevvabout everything where you have N continuous inputs and you want an optimum
18:38:52disruptekwhat do you have to do with strandbeest?
18:38:55disruptekgtfo
18:39:34Zevvnot "the" strandbeest, but I tried to find optimal leg geomtry one day
18:39:59disrupteki could send you a photo, but i have to verify your age first.
18:40:29Zevvhttp://zevv.nl/div/strandbeest.gif
18:41:00disruptekcancel my order.
18:41:19Zevvthe hunchback of the beach, right
18:42:26FromDiscord<Vindaar> @Zevv wow, that's some interesting stuff. I've never heard of that library
18:42:51Zevvneither had I. I tried finding some layman explanations of it to put in the readme, but everyting I find is way-over-my-head tecincal
18:43:11Zevvit's just not commonly used. But the black-boxness makes it a nice choice for whatever you throw at it
18:43:39ZevvI believe it's proven to be the best thing for throwing random problems at. There's beter solutions if you know the domain, but if you don't, this is the one to pick.
18:43:58FromDiscord<Vindaar> Have to give it a try one of these days
18:44:00ZevvI don't understand much of the theory, but it feels kalmanfilterlike
18:44:34FromDiscord<Vindaar> the readme could use a link to the C library
18:44:37FromDiscord<codic> using the js backend, how do i have parameters to a proc be the same as i declared in the code? eg `proc (a,b)` should transpile into a,b, not a_something, b_something. for variables i can do exportc, so i did exportc on the proc as well to no avail
18:44:54Zevvvindaar: sure, willdo
18:45:42FromDiscord<juan_carlos> F5 broke waiting for Fidget to be published. :|
18:46:21ZevvIf I had the courage I would take it apart and reassemble it in nim on top of Weave
18:46:47FromDiscord<InventorMatt> Zevv: could you share your code for the strandbeest calculator(Jansen linkage)?
18:46:47FromDiscord<Vindaar> damn, that's a fun idea. If only there was more time in a day, huh
18:47:30ZevvInventorMatt: not sure if it is of any use, it was just something I started and abandoned
18:47:33Zevvand it's just C
18:47:43FromDiscord<codic> also, how do i get my seqs to compile into a js array [] instead of an array inside an array [[]]
18:47:43Zevvvindaar: yeah, and more years in a life
18:47:58FromDiscord<Vindaar> 😐
18:48:16ZevvInventorMatt: http://ix.io/2qfU
18:48:21Zevvfwiw
18:49:00FromDiscord<InventorMatt> thank, I have a bachelors in mechanical engineering and I have a strong interest in linkages and robotics
18:49:54Zevvbasically it's a spring constellation where the length of the joints is driven by the CMA-ES algo. Then it spins the wheel on the drive side and calculates the path on the leg tip. The algorithm was supposed to find a constellation where the leg tip would make a nice flat trajectory on the floor, and then be lifted over to the other side quickly
18:50:02FromDiscord<codic> welp
18:50:28*casaca quit (Remote host closed the connection)
18:51:26FromDiscord<codic> exportc did the trick for the double arrays
18:51:40FromDiscord<codic> i'm still confused on:
18:51:40FromDiscord<codic> using the js backend, how do i have parameters to a proc be the same as i declared in the code? eg proc (a,b) should transpile into a,b, not a_something, b_something. for variables i can do exportc, so i did exportc on the proc as well to no avail
18:52:56leorizeturns out Nim don't transpile :P
18:53:35leorizethe short answer is: no you can't control that easily
18:53:42FromDiscord<lqdev> *rika triggered because you mentioned transpilation*
18:55:10FromDiscord<codic> wait
18:55:11leorizewait the answer is actually: no you can't, at all
18:55:11FromDiscord<codic> you can't?
18:55:18leorizewhy do you need that?
18:55:18FromDiscord<codic> welp
18:55:36FromDiscord<codic> i'm using discord.js and the paramters become - actually, you're right, it doesn't matter
18:57:02leorizejust letting you know that 99% of the time you don't need exportc on JS
18:57:09leorizeor even C for that matter
18:57:35leorizeit's only important when you absolutely need the name to be the same as what you declared
18:59:00FromDiscord<codic> yeah, thought it might be the cause of one of my problems. i have the js code https://hatebin.com/odswcjuitn as one of the commands in a js bot. ported it to nim https://hatebin.com/wzmwaqgqgf but it refuses to work
18:59:06FromDiscord<codic> no errors
18:59:18FromDiscord<codic> ohhh
18:59:20FromDiscord<codic> wait i'm stupid
19:00:02FromDiscord<codic> or not. thought it was a name conflict, but same issue without it
19:00:28FromDiscord<codic> (without it == after changing the name, in this case)
19:07:43FromDiscord<codic> so welp
19:25:51leorizeit appears that you need to create a jsobject?
19:26:10leorizemodule.exports is a variable taking an object from what I can tell
19:29:50*clemens3 joined #nim
19:33:41*synshroud joined #nim
19:36:03*haxscramper joined #nim
19:37:24*lritter quit (Quit: Leaving)
19:37:53*casaca joined #nim
19:39:27haxscramperI have nested `mapIt` - how Do I access outer `it` from inner expression? `mapIt(it.mapIt(it + #[it from outer map]#))` - I want to have both `it` available in the innermost scope.
19:41:12*fredrikhr quit (Ping timeout: 265 seconds)
19:42:03FromDiscord<Rika> prolly use regular `map` instead
19:42:23FromDiscord<Rika> that way you control the naming of `it`, albeit needing to make a proc for that
19:42:39FromDiscord<Rika> though that's slightly mitigated by either `sugar` or the do syntax
19:43:47FromDiscord<Rika> map do (it1: Type) -> RetType:↵ it1.map do (it2: Type2) -> RetType2:↵ it1 + it2
19:43:50FromDiscord<Rika> i think this works
19:44:41Yardanicofinally it's out :P https://github.com/Yardanico/nuglifier
19:44:51haxscramperIf I have variable shadowing (either by templates or by nested blocks) is it possible to access wariable from outer scope?
19:45:02*Senny quit (Ping timeout: 260 seconds)
19:46:12haxscramperI mean in general - is there some way to get outer variable or it is completely invisible to inner scope?
19:47:24FromDiscord<Rika> its shadowed
19:47:33FromDiscord<Rika> dont think you can do anything once its shadowed
19:48:06*synshroud quit (Quit: ZNC 1.7.5 - https://znc.in)
19:52:14*ForumUpdaterBot quit (Ping timeout: 240 seconds)
19:52:46*ForumUpdaterBot joined #nim
19:55:04leorizehaxscramper: you can't get the outer scope again
19:55:24leorizeuse the normal map, it might be slower but it'd work better for your case
19:56:44haxscramperIs it possible to access list of defined symbols from `typed` macro? I think using `do+map` would be better, just curious if it is possible to somehow get access to the outer scope.
19:57:11leorizeyou can access all symbol within the scope
19:57:24haxscramperWon't use it, just wondering if I can write some kind of `macro unshadow(s: typed, level: int): ...`
19:57:39leorizeyou can't do that :P
20:00:00leorizehttps://play.nim-lang.org/#ix=2qgq
20:00:21leorizebtw here's how to do that with mapIt
20:00:34leorizeI fully expect that this will be slower than using a normal map lol
20:03:35haxscramperI don't really care about performance at this point. BTW - I spend last year writing `mapIt(...)` and it never ocurred to me I can also use it with colon.
20:05:37*ForumUpdaterBot quit (Ping timeout: 264 seconds)
20:11:45FromDiscord<Rika> lmao
20:13:56haxscramperIs it possible to use variable name for `untyped` template parameter? `template mapItt(expr: untyped, itvar: untyped = it #[default injection name]#): untyped =`. I can do this by passing variable name as string to macro, but that just looks ugly.
20:16:41leorize[m]currently that's not possible
20:16:55*vikfret joined #nim
20:17:10haxscramperAh, I forgot about template overloading - I can just define one with default argument and use `it` as parameter internally.
20:17:12*vikfret is now known as Cybuster
20:18:17haxscramperhttps://play.nim-lang.org/#ix=2qgy
20:28:22*haxscramper left #nim ("ERC (IRC client for Emacs 26.3)")
20:29:10*Trustable joined #nim
20:30:55*Vladar quit (Quit: Leaving)
20:34:55*kungtotte quit (Read error: Connection reset by peer)
20:35:47*kungtotte joined #nim
20:46:22*waleee-cl quit (Quit: Connection closed for inactivity)
21:13:27*krux02 joined #nim
21:16:36*waleee-cl joined #nim
21:23:11*narimiran quit (Ping timeout: 265 seconds)
21:38:28FromDiscord<lqdev> is `{..a}` tokenized as `{. . a }` or `{ .. a }`?
21:38:44FromDiscord<lqdev> I've read in the manual it's the latter
21:43:41*tane quit (Quit: Leaving)
21:48:13*fredrikhr joined #nim
21:53:02*solitudesf quit (Ping timeout: 256 seconds)
21:53:55*nikita` quit (Quit: leaving)
22:05:47FromDiscord<mratsim> What happened to Nim stable directory hiearchy?? My CI is broken all other the place
22:06:19FromDiscord<mratsim> https://dev.azure.com/numforge/Weave/_build/results?buildId=738&view=logs&j=3e9b2beb-deba-59ca-c4e3-14471ee37ba8&t=44334f4d-35d6-5760-823c-2ddf83e28a42&l=254
22:06:48*Senny joined #nim
22:07:49FromDiscord<Vindaar> first error is already in line 26 though
22:12:49*Trustable quit (Remote host closed the connection)
22:14:59FromDiscord<Rika> finally, got a somewhat small repro for the bug i've been getting
22:15:24FromDiscord<lqdev> is it possible to construct an empty tuple?
22:15:41FromDiscord<Rika> tried `tuple[void]`?
22:16:23FromDiscord<lqdev> but how do I construct such a tuple?
22:16:28FromDiscord<lqdev> `(,)` does not work
22:17:18FromDiscord<lqdev> `default(tuple[])` seems to do the trick
22:18:40FromDiscord<lqdev> damn what I'm doing is entering hack territory
22:18:44FromDiscord<lqdev> I should probably stop
22:20:26FromDiscord<Vindaar> or embrace "the hack"
22:20:54FromDiscord<Vindaar> if you should do that kinda depends on what you're doing though 😛
22:21:18FromDiscord<lqdev> well I'm trying to add unnecessary flexibility to an already inflexible macro
22:23:31FromDiscord<Vindaar> already inflexible? still inflexible or do you mean its beyond repair in that regard?
22:23:48FromDiscord<lqdev> no
22:24:05FromDiscord<lqdev> I'm saying that it's a simple macro made for one use case
22:24:06FromDiscord<Vindaar> oh, you mean the implementation I guess
22:24:12FromDiscord<Vindaar> ah
22:25:52FromDiscord<Rika> so heres some small code to repro the async bug (either mine or nim's) i'm getting https://play.nim-lang.org/#ix=2qgU dont run it in playground tho LOL
22:25:59FromDiscord<lqdev> oh man turns out that "flexibility" was actually necessary
22:26:09FromDiscord<lqdev> well, shit.
22:26:13FromDiscord<lqdev> I'll fix it tomorrow
22:26:17FromDiscord<lqdev> goodnight
22:26:36FromDiscord<Vindaar> good night!
22:27:31*notandinus quit (Quit: ERC (IRC client for Emacs 26.3))
22:27:35FromDiscord<Rika> good night to you
22:27:36FromDiscord<mratsim> @Vindaar, so there is a tag 1.2.4 on the website but not on github branches :/
22:27:53FromDiscord<Vindaar> yay :/
22:28:19FromDiscord<Rika> oh also ignore the `discard await`, i wrote this hastily
22:28:46*team\andinus joined #nim
22:29:20*team\andinus is now known as notandinus
22:35:48FromDiscord<Rika> update to the weird issue i'm getting: added what command i used to compile https://play.nim-lang.org/#ix=2qgV
22:42:24FromDiscord<Rika> what the hell
22:42:32FromDiscord<Rika> okay so the async bug is because of -d:threadsafe???
22:46:22leorize[m]zedeus: I think you'll like #14826
22:46:24disbothttps://github.com/nim-lang/Nim/pull/14826 -- 3asyncnet, net: the SIGPIPE avoidance package for SSL_shutdown()
22:46:32zedeusyep!
22:47:06*tinAndi joined #nim
22:49:29leorizeof course macosx will not have sigtimedwait()...
22:49:37leorizeI hate this
22:49:57*Prestige quit (Quit: Prestige)
22:50:18*tinAndi quit (Quit: tinAndi)
22:52:08Zoom[m]Hey, have you seen OpenDiablo2 in Go? I'm disappointed it's not one of you, guys! Would be great to see the original one being reimplemented in Nim. Devilution is C++ of course, but there's some process injection project for the original written (again) in Go.
22:55:31FromDiscord<mratsim> One thing I know quite well from Diablo 2 are all the bugs and "rollover" points :P.↵There was a very active community of "cheater's duel" with people coming with edited characters. And the goal was discovering all the bugs of the client.↵In particular you couldn't have more than 9 millions health otherwise you rolled to -1 and you died.↵Also your elemental resistance/absorb needed to be very flexible because if you absorbed too muc
22:58:13Zoom[m]The first one even had item and money duplicating, besides other smaller bugs.
23:00:19Zoom[m]Still the atmosphere of D1 is unbeatable, from my POV. Feels like a proper dungeon crawl, not an animation series for pre-schoolers.
23:00:40Zoom[m]BTW, is there any roguelikes in Nim?
23:00:47FromDiscord<Rika> leorize: try using selectors? dunno, heard it had full support for macosx and its an easier interface than to use raw signal procs
23:02:08leorizeit doesn't apply for this case unfortunately...
23:02:22*Prestige joined #nim
23:02:28leorizethe only alternative API that can be use to implement this doesn't have timeout and is prone to race condition
23:03:48FromDiscord<exelotl> if I had infinite time and money I'd love to make a roguelike in Nim x)
23:06:16Zoom[m]exelotl, If you had infinite time and money you could probably make like a third of DwarfFortress.
23:06:48FromDiscord<exelotl> aw heck yeah
23:06:57FromDiscord<exelotl> DwarfBackyard
23:08:36FromDiscord<exelotl> caves of qud looks really nice http://www.cavesofqud.com/
23:11:20FromDiscord<exelotl> still, I don't know if I have the patience to really get into a game like that
23:11:54*Prestige quit (Quit: Prestige)
23:13:49FromDiscord<exelotl> POWDER is my favourite roguelike, cause it's reasonably simple (movement is only 4 directions, no races and classes)
23:13:50*Prestige joined #nim
23:14:55FromDiscord<Rika> how do i add tls to asynchttpserver?
23:15:11leorizeask federico3 :P
23:15:20FromDiscord<Rika> has he?
23:15:46leorize!pr ssl server
23:15:54leorize!help
23:16:07leorize!pull ssl server
23:16:09disbothttps://github.com/nim-lang/Nim/pull/13961 -- 3Add SSL / HTTPS server test [don't merge yet] 7& 13 more...
23:16:16leorize^ you can refer to that
23:16:59FromDiscord<Rika> well it passes ci so why no merge T_T
23:17:05FromDiscord<Rika> still at "DONT MERGE"?
23:17:10leorizeask the man :P
23:23:06*pietroppeter quit (Quit: Connection closed for inactivity)
23:31:31*sschwarzer joined #nim
23:33:37sschwarzerHow should I go about editing https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers ? I'd like to make a few changes. Should I just go ahead or first describe the changes I want to make somewhere for discussion?
23:33:51FromDiscord<Rika> i'd like to know here
23:34:22sschwarzerOk ...
23:34:33FromDiscord<Rika> mind describing it here?
23:35:41sschwarzerUnder "execution model", I'd like to remove "JIT". CPython doesn't use a JIT. There are Python implementation that _do_ have a JIT, e. g. PyPy, but the next row is "written using C", so the table seems to focus on CPython.
23:36:52sschwarzerPython has more metaprogramming features than in the table (decorators, getattr, setattr), but maybe that would be a bit too wordy to add it to the table?
23:37:03FromDiscord<mratsim> if the changes are potentially controversial or substantial, I would create a gist and post on the forum but what you are proposing is fine for direct editing
23:37:18FromDiscord<Rika> what metaprogramming features?
23:37:23FromDiscord<mratsim> import ast
23:37:27FromDiscord<mratsim> 😄
23:37:43sschwarzerTyping in Python is sometimes described as "static with dynamic binding" because objects don't change their type.
23:38:20FromDiscord<mratsim> that's called strong typing
23:38:21sschwarzermratsim: yes, you can indeed manipulate and compile the AST as in Nim. I think it's rarely used though, but sometimes it is.
23:39:00FromDiscord<mratsim> You can have static compilation + weak typing (C, thank you integer promotion rules and pointer decays)
23:39:09FromDiscord<mratsim> and fynamic language + strong typing
23:39:12FromDiscord<mratsim> dynamic*
23:39:25sschwarzerThe "biggest integer in the stdlib" seems to have no limits. I tried `int("1" + 10000 * "0")` and get a looong number, no exception. :)
23:40:05FromDiscord<Rika> you should put that biggest integer thing
23:40:08sschwarzerAnonymous functions (lambdas) are one expression, not one line.
23:40:30FromDiscord<mratsim> arbitrary precision integer
23:40:32sschwarzerRika: There doesn't seem to be a "biggest integer" in Python
23:40:33FromDiscord<mratsim> is enough
23:41:05FromDiscord<Rika> yeah i know, ive tried
23:41:06sschwarzerImmutability: Basic types (numbers, strings) are immutable.
23:41:09*krux02_ joined #nim
23:41:11FromDiscord<Rika> it just gets more and more memory hungry
23:41:20FromDiscord<Rika> they are not in a sense
23:41:38FromDiscord<Rika> we mean immutable as in "can change the value in a variable" so doing stuff like:
23:41:48FromDiscord<Rika> a = ""↵a += "test"↵still counts as mutable
23:41:50sschwarzerTherefore "function arguments immutability" "mutable" wouldn't apply to basic types
23:42:04FromDiscord<Rika> ah, i see
23:42:20FromDiscord<Rika> change it to "mostly mutable" since lists, dicts, etc are still mutable
23:42:50sschwarzerRika: That creates a new string and binds it to the name `a`. "Variables" work differently in Python. You have objects and names, names don't identify a storage location.
23:43:39*krux02 quit (Ping timeout: 244 seconds)
23:43:58sschwarzerFile extensions: I'm not sure these are (still?) used somewhere. I've never seen pyz and pyx is only(?) used for Cython
23:44:31sschwarzerIndentation for control flow is either tabs or spaces, but not mixed in the same file.
23:44:42sschwarzerMixing them is a syntax error
23:44:59leorizeit's enforced now? nice
23:45:10sschwarzerStrictly speaking you can indent however you want while in expressions.
23:45:21sschwarzerleorize: since Python 3
23:46:32sschwarzerRegarding the import syntax: You can also use `import math, os, sys` in Python, and you can also use brackets to split imports over several lines.
23:48:29sschwarzerIn "Exports" we could say that while the language doesn't stop you from accessing any symbol, it's a strong convention to mark "private" identifiers with a leading underscore.
23:49:02FromDiscord<Technisha Circuit> Okay, using Nimpy, is there a way to have my procs from Nim (with the exportpy pragma) carry over to the `pyBuiltinsModule().exec` function?
23:49:11sschwarzerI'd change the try/import example to explicitly catch `ImportError`.
23:50:02FromDiscord<Technisha Circuit> Also, would c2nim work on a Cython C file? :P
23:50:30sschwarzerThe section "Arrays" seems to describe only Nim's arrays. Should there be some information about Python lists (can store arbitrary types, also mixed types)
23:51:16sschwarzerTechnisha Circuit: Only if pure C is also valid Cython, I guess ;-)
23:51:31FromDiscord<Technisha Circuit> Then that she work :P
23:51:41FromDiscord<Technisha Circuit> Also↵> Okay, using Nimpy, is there a way to have my procs from Nim (with the exportpy pragma) carry over to the `pyBuiltinsModule().exec` function?
23:51:43FromDiscord<Technisha Circuit> :p
23:51:48sschwarzerThere would probably more potential changes, but that's how far I read :)
23:53:58sschwarzerOh, I forgot one thing, the regex entry in the table. Python doesn't use the `pcre` library as far as I know, but I'd say for nearly all purposes the regular expressions are Perl-compatible. If there are incompatibilities, they're probably rather obscure features.
23:53:59FromDiscord<Technisha Circuit> Anyone? ;-;
23:54:02sschwarzerhttps://docs.python.org/3/library/re.html#regular-expression-syntax
23:54:06*FromDiscord quit (Remote host closed the connection)
23:54:20*FromDiscord joined #nim
23:55:20FromDiscord<Technisha Circuit> ~~Also, is it possible to use Python's GC in Nim~~
23:56:09sschwarzerI haven't worked with Nimpy, only know of it's existence
23:56:14sschwarzer;-)
23:56:17FromDiscord<Technisha Circuit> Oh?
23:56:21FromDiscord<Technisha Circuit> Nimpy is really nice
23:56:21sschwarzerit's -> its
23:56:30FromDiscord<Technisha Circuit> :p
23:57:15sschwarzer*sigh* I'd like try do many things, but don't find so much time. Maybe I should code more instead of reading forum and answering forum entries. ;-)
23:58:07sschwarzerI think meanwhile I like Nim more than Python, and I've been using Python for 20 years, given talks etc.
23:58:38FromDiscord<Technisha Circuit> O
23:58:49FromDiscord<Technisha Circuit> I also like Nim more then Python :P
23:59:20FromDiscord<Technisha Circuit> But Nim doesn't have a big community as it should really have which saddens me
23:59:56FromDiscord<Technisha Circuit> The Nim Discord now has 1025 members