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:59 | Prestige | I 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:19 | Yardanico | they're probably not the same type even if you think so :) |
01:26:26 | Yardanico | e.g. closures, gcsafe, locks, etc |
01:26:27 | Prestige | hmm |
01:26:30 | Yardanico | show code :P |
01:29:13 | Prestige | You're right I needed to add a pragma, thanks |
01:36:35 | leorize | this 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:57 | FromGitter | <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:55 | FromGitter | <timotheecour> I’d do it but updating tests isn’t super fun |
02:39:15 | * | polypus74 quit (Quit: WeeChat 2.8) |
02:40:12 | FromGitter | <ynfle> Is there a library for dealing with points? |
02:41:42 | FromDiscord | <impbox> Ynfle, like 2d space points? |
02:41:49 | FromGitter | <ynfle> Yup |
02:41:58 | FromDiscord | <impbox> glm library is pretty good |
02:41:59 | FromGitter | <ynfle> I made my own type but just wondering |
02:42:22 | FromGitter | <ynfle> In stdlib? |
02:42:28 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:42:32 | FromDiscord | <impbox> Nimble glm |
02:42:48 | FromDiscord | <impbox> stdlib had basic2d but it's been removed i think |
02:42:59 | FromDiscord | <impbox> glm is better |
02:44:36 | * | muffindrake joined #nim |
02:47:45 | FromGitter | <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:13 | FromDiscord | <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:32 | leorize | you can't |
04:58:37 | leorize | but you can move the nimcache |
04:59:02 | leorize | in fact it's even possible to make the current directory the nimcache :P |
04:59:09 | leorize | --nimcache:/path/to/cache |
05:15:02 | * | narimiran joined #nim |
05:17:02 | Tlongir | Can 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:13 | leorize | you can't, why do you want to though? |
05:31:23 | FromDiscord | <Yardanico> the only usecase would be if they want to make something like inim 😛 |
05:44:01 | shashlick | @leorize - https://travis-ci.org/github/genotrance/nightest/jobs/702269394 - koch test not working |
05:46:59 | shashlick | also on windows, koch test recompiles testament which then complains that ssl is missing - https://travis-ci.org/github/genotrance/nightest/jobs/702269397 |
05:49:10 | leorize[m] | shashlick: nim is not in PATH for linux |
05:50:05 | leorize[m] | and it also appears that Nim is not in PATH for windows too :p |
05:51:10 | shashlick | is that what bothers testament? okay let me try |
05:53:39 | * | solitudesf- joined #nim |
05:56:52 | leorize[m] | yea, koch won't use the prebuilt testament and will build it's own in testament/testament |
05:57:20 | leorize[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:11 | shashlick | linux 32-bit issue - https://travis-ci.org/github/genotrance/nightest/jobs/702271588 |
05:58:16 | leorize[m] | koch also tries to look for nim in PATH to pass as argument to testament so you need nim there too |
05:59:15 | shashlick | how 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:33 | shashlick | never mind on windows |
06:03:24 | Yardanico | would 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:50 | Yardanico | because apparently nim forum has a nice JSON api, and to not overdo requests I would only check once every 5 minutes |
06:04:56 | leorize[m] | Yardanico: make a new #nim-rss channel I guess? |
06:05:10 | Yardanico | ah right |
06:05:26 | leorize[m] | or you can use #nim-news with disbot too |
06:05:38 | Yardanico | well yeah but it's already bridged to discord #github-events lol |
06:05:45 | Yardanico | maybe I should ask 4raq to set up a github webhook |
06:05:47 | leorize[m] | shashlick: I'll look into 32bit later, gtg |
06:05:53 | Yardanico | so we can have nice github events in discord :D |
06:06:00 | leorize[m] | Yardanico: bridge smarter :p |
06:06:37 | leorize[m] | I can pull in a matrix bot to do the same :p |
06:06:38 | Yardanico | but 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:30 | FromDiscord | <Zed> can i interface with js libraries with nim? |
06:08:37 | FromDiscord | <Zed> or does it only compile to js |
06:08:43 | Yardanico | if you compile with the JS backend - yes |
06:08:46 | Yardanico | of course you can |
06:08:56 | Yardanico | but you shouldn't use Nim's JS backend for NodeJS |
06:09:15 | FromDiscord | <Zed> i found this↵https://github.com/exokitxr/exokit |
06:09:21 | FromDiscord | <Zed> it would be an interesting nim project |
06:09:28 | Yardanico | ah, for the browser, then sure |
06:09:49 | Yardanico | just an example (for node though) of js interfacing when you compile to JS https://play.nim-lang.org/#ix=2q1D |
06:11:39 | FromDiscord | <aeos> hi, how do I destructure a sequence, or turn a seq into something destructurable?↵↵`let (a, b) = @["a", "b"]` |
06:11:45 | Yardanico | there's a lib for this |
06:11:59 | Yardanico | https://github.com/technicallyagd/unpack |
06:12:32 | FromDiscord | <aeos> ah alright. should i not try to write nim as a functional language? |
06:12:40 | Yardanico | well, you can |
06:12:45 | Yardanico | there are some FP libraries |
06:13:08 | FromDiscord | <aeos> yeah but it's not really a first class citizen it feels like |
06:13:17 | Yardanico | well sure, not by default :) |
06:14:00 | Yardanico | but with macros you can make it feel like a first-class citizen |
06:14:03 | Yardanico | see https://github.com/vegansk/nimfp |
06:14:06 | Yardanico | https://github.com/zero-functional/zero-functional |
06:14:13 | Yardanico | https://github.com/andreaferretti/patty |
06:14:31 | Yardanico | just some examples |
06:19:12 | Tlongir | @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:47 | Yardanico | Tlongir: there's no such a way I think |
06:36:51 | Yardanico | you can get messages from https://github.com/nim-lang/Nim/blob/devel/compiler/lineinfos.nim though |
06:37:47 | Yardanico | I mean if you want to hardcode better :P |
06:38:07 | Yardanico | ah 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:24 | Yardanico | ok, with enough hacks I can get nice "starting context" for posts on the forum |
07:08:45 | Yardanico | for https://forum.nim-lang.org/t/6483 - https://i.imgur.com/ti1tln4.png |
07:09:07 | Yardanico | that involves some html parsing and some hardcoded logic to deal with quotes |
07:10:10 | Yardanico | i limit to 50 characters but by whole words |
07:14:00 | * | marnix joined #nim |
07:18:45 | * | endragor joined #nim |
07:18:58 | FromDiscord | <Rika> will added quit procs run on SIGINT? |
07:25:02 | PMunch | I think so |
07:32:54 | * | Jjp137 quit (Ping timeout: 240 seconds) |
07:39:55 | FromDiscord | <Rika> uh, are there any good usecases for quit procs? since theyre {.noconv.} |
07:40:24 | FromDiscord | <Rika> im assuming i cant use it to setup graceful shutdown |
07:40:25 | PMunch | There are some, but they're pretty rare |
07:40:51 | FromDiscord | <Rika> hm, how would i go about executing graceful shutdown for SIGINT then |
07:47:45 | PMunch | Register a handler for SIGINT that sets a flag and have a part of your normal program check this flag and gracefully exit |
07:47:53 | PMunch | I think that's how you should do it |
07:51:36 | FromDiscord | <Rika> handler? where can i find those |
07:57:01 | FromDiscord | <lqdev> well there's setControlCHook |
07:57:36 | FromDiscord | <Rika> still takes in a {.noconv.} |
07:58:38 | FromDiscord | <lqdev> hm |
08:00:26 | FromDiscord | <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:32 | Yardanico | so 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:35 | Yardanico | it should post the last thread and post rn |
08:19:44 | Yardanico | ah no, only last thread, sry |
08:19:48 | FromDiscord | <ForumUpdater> New thread by Adilh: Choosing Nim |
08:20:35 | FromDiscord | <Rika> :thonk: also here? |
08:22:40 | Yardanico | here only threads |
08:22:44 | Yardanico | in #forum-events threads + posts |
08:22:57 | Yardanico | lemme try to make a new post |
08:23:56 | Yardanico | yass it works |
08:24:14 | FromDiscord | <Rika> smh |
08:24:15 | FromDiscord | <Rika> pinged me |
08:24:23 | Yardanico | yes |
08:24:24 | FromDiscord | <Rika> lmao |
08:24:34 | Yardanico | ah, need to embed the link too |
08:24:38 | Yardanico | why I forgot about this lol |
08:26:10 | Yardanico | (https://google.com) |
08:28:06 | FromDiscord | <Rika> another muted channel :SonoYay: |
08:29:09 | Yardanico | ok it works fine |
08:29:14 | Yardanico | now lets just wait for ppl to post stuff |
08:29:18 | Yardanico | I'm running it on my own PC for now |
08:31:08 | Yardanico | current code - https://gist.github.com/Yardanico/6f95d35631da3f9bddf37c2082e2b5f4 |
08:31:32 | Yardanico | it's not really clean since I just hacked it together (especially the thread/post removal logic and stuff) |
08:37:01 | PMunch | @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:07 | FromDiscord | <Rika> wouldnt setting a flag require it to be a closure though |
08:39:14 | FromDiscord | <Rika> unless you mean to use selectors |
08:39:22 | Yardanico | well not exactly |
08:39:33 | Yardanico | hmm wait lemme see selectors |
08:39:47 | Yardanico | "The data is application-defined data, which will be passed when signal raises." |
08:39:53 | Yardanico | you can just pass a pointer to the flag lol |
08:40:37 | PMunch | @Rika, nah just flip a global bool variable |
08:40:47 | Yardanico | ah right, if it runs in the same thread its ok |
08:40:51 | FromDiscord | <Rika> i can use a global in a noconv? |
08:40:55 | Yardanico | yes sure why not? |
08:41:04 | FromDiscord | <Rika> dunno, assumed i cant |
08:41:07 | PMunch | Or yeah, what Yardanico said is another way |
08:41:24 | Yardanico | using globals doesn't make it a closure |
08:41:44 | FromDiscord | <Rika> ill go for the control c hook |
08:41:47 | FromDiscord | <Rika> sounds simpler |
08:43:06 | * | Jjp137 joined #nim |
08:56:19 | FromDiscord | <ForumUpdater> New thread by Moigagoo: Norm 2.0.0, see https://forum.nim-lang.org/t/6471 |
08:56:21 | FromDiscord | <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:39 | Yardanico | ehh, it shouldn't have posted the thread itself |
08:57:00 | Araq | <ForumUpdater> ? awesome |
08:57:03 | Yardanico | yes |
08:57:13 | Yardanico | it'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:12 | FromDiscord | <Rika> the control c hook thing isnt working too well xd, maybe ill try selectors |
09:07:29 | * | krux02 joined #nim |
09:09:05 | Yardanico | ok 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:43 | FromDiscord | <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:50 | Yardanico | the title though :D |
09:10:11 | FromDiscord | <Rika> "fixed" 😛 |
09:10:28 | FromDiscord | <lqdev> @Rika you can always set up a signal trap https://github.com/liquid600pgm/pomod/blob/master/src/pomod.nim#L197 |
09:10:45 | FromDiscord | <lqdev> the same should work with any set of signals (including SIGINT) |
09:11:00 | FromDiscord | <lqdev> adding a `when defined(posix)` would probably be a good idea |
09:11:15 | FromDiscord | <Rika> nice |
09:11:25 | FromDiscord | <Rika> i have 0 plans for windows support so nice |
09:12:27 | Yardanico | i think I fixed it this time |
09:12:47 | FromDiscord | <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:02 | Yardanico | now let it run :P |
09:13:37 | Yardanico | but damn the code grows fast, it's already ~180 lines |
09:13:39 | FromDiscord | <Rika> now i have no idea how to use anything in the posix module |
09:13:45 | FromDiscord | <Rika> where can i read info on these |
09:13:54 | Yardanico | in posix specification :D |
09:14:38 | FromDiscord | <Rika> man pages time? |
09:14:40 | FromDiscord | <Rika> ok |
09:15:01 | * | pietroppeter joined #nim |
09:17:25 | * | nikita` quit (Quit: leaving) |
09:17:35 | FromDiscord | <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:35 | FromDiscord | <lqdev> well basically you just call `sighold` for any signals you want to catch |
09:18:03 | FromDiscord | <lqdev> then you create a `SigSet`, call `sigemptyset` on it, and add any signals you want to catch with `sigaddset` |
09:18:11 | FromDiscord | <Rika> im reading that sighold is deprecated :ThonkDumb: |
09:18:16 | FromDiscord | <lqdev> uh |
09:18:17 | FromDiscord | <lqdev> maybe |
09:18:22 | FromDiscord | <Rika> and sigset too |
09:18:24 | FromDiscord | <lqdev> idk, I just used what works |
09:18:28 | FromDiscord | <Rika> :ThonkDumb: :ThonkDumb: :ThonkDumb: :ThonkDumb: |
09:18:36 | FromDiscord | <lqdev> then if those are deprecated I have no clue |
09:18:41 | FromDiscord | <Rika> ill just uh |
09:18:42 | FromDiscord | <Rika> use them i guess |
09:18:46 | FromDiscord | <lqdev> XD |
09:18:50 | FromDiscord | <Rika> well ill try using newer apis first |
09:18:59 | FromDiscord | <Rika> or rather ill look into how to do the same thing with newer apis |
09:19:18 | FromDiscord | <Rika> https://man7.org/linux/man-pages/man2/sigaction.2.html↵what |
09:19:21 | FromDiscord | <lqdev> where did you read that it's deprecated? |
09:19:30 | FromDiscord | <Rika> https://man7.org/linux/man-pages/man3/sighold.3.html |
09:19:48 | * | vicfred quit (Quit: Leaving) |
09:20:04 | FromDiscord | <lqdev> damn it |
09:20:10 | FromDiscord | <lqdev> but the callback based method is shit |
09:20:19 | * | nikita` joined #nim |
09:20:46 | FromDiscord | <lqdev> perhaps sigsuspend could work, idk |
09:20:50 | FromDiscord | <Rika> knowing posix theyll prolly support this for a few more years lol |
09:20:54 | FromDiscord | <lqdev> it really depends on what you want to do |
09:21:10 | FromDiscord | <Rika> sigsuspend blocks til signal is emitted tho is it |
09:21:14 | FromDiscord | <Rika> doesnt it* |
09:21:17 | FromDiscord | <lqdev> yes |
09:21:24 | FromDiscord | <Rika> i just wanna gracefully exit |
09:21:47 | FromDiscord | <Rika> cant block the thread because i need to do some stuff after signal |
09:22:20 | FromDiscord | <lqdev> I guess sigprocmask? idk |
09:22:36 | FromDiscord | <Rika> already reading into it |
09:22:54 | FromDiscord | <lqdev> btw offline docs ftw |
09:23:07 | FromDiscord | <lqdev> I just use `man` in my terminal |
09:23:35 | FromDiscord | <Rika> eh i know i'm not using my terminal now |
09:23:43 | FromDiscord | <Rika> whichever is faster to get to |
09:25:45 | FromDiscord | <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:19 | ForumUpdaterBot | 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:41:20 | Yardanico | sorry for so much spam today :( just made it IRC instead |
09:41:52 | Yardanico | it now posts to Discord (#forum-events), IRC (#nim), Telegram (nim chat) lol |
09:42:02 | Yardanico | all in 200 loc (and yes it's async now) |
09:45:59 | alehander92_ | hm what is ForumUpdater |
09:46:03 | alehander92_ | ah it makes sense |
09:46:08 | alehander92_ | wait i got confused |
09:46:11 | Yardanico | ? |
09:46:32 | alehander92_ | yeah it makes sense |
09:46:38 | alehander92_ | can it also link reddit |
09:46:42 | alehander92_ | or this would be too much |
09:46:44 | Yardanico | XD |
09:46:51 | Yardanico | I certainly can do that |
09:46:55 | Yardanico | even stackoverflow with enough time lol |
09:47:00 | alehander92_ | oh i forgot |
09:47:02 | alehander92_ | about it |
09:47:08 | Yardanico | but for reddit I would only post new posts, not comments |
09:47:14 | Yardanico | because they're really rare |
09:47:18 | Yardanico | 1-2 posts per day max |
09:47:37 | alehander92_ | makes sense |
09:47:46 | alehander92_ | there can be also |
09:47:49 | alehander92_ | hn comments related to nim |
09:47:53 | alehander92_ | but this is too much probably |
09:48:22 | Yardanico | I think the feature set is okay for now :P |
09:48:26 | Yardanico | we will see how users like it or not |
09:49:01 | Yardanico | it 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:11 | Yardanico | it uses only 11mb ram |
09:49:31 | Yardanico | I'll let it run on my PC for today |
09:54:57 | alehander92_ | 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:11 | Yardanico | made a repo for it - https://github.com/Yardanico/nimeventer |
10:34:58 | ForumUpdaterBot | New 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:09 | ForumUpdaterBot | New 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:46 | PMunch | Hmm, I think these post updates might be annoying.. |
10:44:14 | Yardanico | PMunch: why? :( I think that they are much less common than normal chat messages |
10:44:19 | FromDiscord | <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:32 | Yardanico | yes - use choosenim or download a release yourself |
10:44:39 | Yardanico | apt probably installed an ancient nim version |
10:45:17 | PMunch | Yardanico, just a hunch, I might be wrong :) |
10:45:27 | FromDiscord | <InventorMatt> I tried using choosenim initially but then it had difficulty finding the standard library itself |
10:45:54 | Yardanico | what arch is your atomic pi? |
10:45:56 | Yardanico | architecture |
10:46:09 | Yardanico | aarch64 (arm64), armv6, armv7, armv7a? :P |
10:47:32 | FromDiscord | <InventorMatt> Intel Atom x5-Z8350 |
10:47:37 | Yardanico | oh so x86_64 |
10:47:42 | * | oddp quit (Ping timeout: 256 seconds) |
10:47:49 | Yardanico | https://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:55 | Yardanico | https://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:05 | Yardanico | it's not exactly the latest stable, but it's from the stable 1.2 branch |
10:48:16 | narimiran | it is exactly the latest stable :D |
10:48:19 | Yardanico | XD |
10:48:26 | narimiran | the one that is coming out later today :) |
10:48:30 | FromDiscord | <InventorMatt> thanks. I'll try that |
10:49:19 | FromDiscord | <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:20 | disbot | ➥ [docs] fix `docs.nim` imports, paramCount/Str are defined again |
10:59:10 | FromDiscord | <mratsim> done |
10:59:53 | FromDiscord | <Vindaar> thanks! |
11:10:07 | FromDiscord | <InventorMatt> what is new in nim 1.2.4? |
11:10:11 | Yardanico | bugfixes |
11:10:26 | Yardanico | its a patch release after all |
11:18:11 | ForumUpdaterBot | New 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:38 | PMunch | What's the difference between the defines `MacOS` and `MacOSX`? |
11:52:37 | FromDiscord | <Zed> The 'X' |
11:55:46 | Zevv | Dude, your nick is even cooler then mine |
11:55:57 | Zevv | I feel this bond, bro |
11:56:44 | FromDiscord | <Zed> ok |
11:56:49 | FromDiscord | <Zed> what's your nickname? |
11:57:13 | FromDiscord | <Zed> wait, you are talking to me right? |
11:57:25 | Zevv | who else! |
11:57:47 | FromDiscord | <Zed> i didn't think nicknames show up on irc |
11:57:50 | FromGitter | <alehander92> i am often confused |
11:57:55 | FromGitter | <alehander92> by zed and zevv |
11:58:03 | FromDiscord | <Zed> i am zed |
11:58:07 | FromDiscord | <Zed> he is zevv |
11:58:07 | Zevv | i am zevv |
11:58:09 | Zevv | he is zed |
11:58:18 | FromGitter | <alehander92> cool |
11:58:23 | FromGitter | <alehander92> i wanna give you candy |
11:58:25 | FromDiscord | <Zed> together we are zevv |
11:58:37 | Zevv | no, that's wrong |
11:58:54 | FromDiscord | <Zed> how, first 2 letters of mine + last 2 of yours |
11:59:18 | Zevv | no i am also confused |
12:00:40 | FromDiscord | <Rika> Yes |
12:00:47 | FromDiscord | <Rika> I have no partner |
12:00:49 | FromDiscord | <Zed> together we are ZE(d)+(ze)VV |
12:00:53 | Zevv | https://www.youtube.com/watch?v=xdGo4PmsUKY&feature=youtu.be&t=5368 |
12:01:37 | FromDiscord | <Zed> ah so you are also director |
12:04:38 | Araq | PMunch, never ues 'MacOS' |
12:04:53 | Araq | we should remove it, MacOS is the classic Mac |
12:05:41 | Zevv | ttps://i.ytimg.com/vi/Px727NPdcto/hqdefault.jpg |
12:05:49 | Zevv | argh the h fell off |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:38 | * | supakeen joined #nim |
12:07:02 | PMunch | Araq, right |
12:12:06 | Yardanico | oh shoot logged out of the WM |
12:12:09 | Yardanico | forgot I ran the bot |
12:12:12 | Yardanico | will start it in screen now |
12:12:46 | Yardanico | btw, the "codename" for it was forum_stalker :P |
12:12:50 | * | ForumUpdaterBot joined #nim |
12:12:59 | ForumUpdaterBot | New 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:31 | FromDiscord | <Rika> macOS is the new name tho |
12:16:43 | FromDiscord | <Rika> https://en.wikipedia.org/wiki/MacOS |
12:16:53 | Yardanico | yes, but it's "new" for quite a long time |
12:17:01 | Yardanico | for 4 years now |
12:21:12 | ForumUpdaterBot | New 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:34 | PMunch | Hmm, I have all the videos running on top of each other now |
12:53:40 | PMunch | But 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:29 | Araq | so ... |
13:22:57 | Yardanico | so? 😨 |
13:24:47 | Araq | scope based destruction is annoying |
13:25:01 | Araq | I feel like I'm doing work I should have done 5 months ago |
13:25:21 | Araq | "first get it right, then make it fast" doesn't always work |
13:25:37 | Araq | now that I'm making it fast I need to get right once again |
13:28:34 | * | dddddd_ joined #nim |
13:28:52 | FromGitter | <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:38 | Araq | well 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:02 | Araq | on the other hand, I had good reasons for doing it function-based when I started |
13:44:25 | FromDiscord | <mratsim> well, usually you prototypes and then you trhow away/rewrite the prototype |
13:44:26 | FromDiscord | <Rika> might be a dumb question, but is a Selector[T] thread safe? |
13:44:38 | FromDiscord | <Yardanico> care to read docs? 🙂 |
13:44:43 | FromDiscord | <Yardanico> "To use threadsafe version of this module, it needs to be compiled with both -d:threadsafe and --threads:on options." |
13:44:55 | FromDiscord | <Rika> care to not be an ass next time? |
13:44:55 | FromDiscord | <Yardanico> literally at the top of https://nim-lang.org/docs/selectors.html 😄 |
13:45:01 | FromDiscord | <mratsim> unless someone vetoes refactoring because you can't sell them to clients |
13:45:03 | FromDiscord | <Yardanico> @Rika i'm half joking 🙂 |
13:45:11 | FromDiscord | <Rika> ok im half mad-- oh wait |
13:45:18 | FromDiscord | <mratsim> I wasn't aware of this -d:threadsafe flag :? |
13:45:24 | FromDiscord | <Yardanico> neither was I \ |
13:45:46 | FromDiscord | <Rika> man i should just block you, you've been on my nerves for a few days' |
13:45:52 | FromDiscord | <Yardanico> wat |
13:45:56 | FromDiscord | <Rika> irritating |
13:45:57 | narimiran | ?? |
13:46:00 | FromDiscord | <Yardanico> how |
13:46:10 | FromDiscord | <Yardanico> btw seems like -d:threadsafe is only used in selectors.nim |
13:46:13 | FromDiscord | <mratsim> the RTFM got on Rika's nerve |
13:46:17 | FromDiscord | <Yardanico> lib/pure/selectors.nim:32: const hasThreadSupport = compileOption("threads") and defined(threadsafe) |
13:46:26 | FromDiscord | <Rika> the hell does rtfm mean |
13:46:33 | FromDiscord | <mratsim> Read the "Fine" manual |
13:46:47 | FromDiscord | <Yardanico> read the f*cking manual (sorry for my russian) |
13:46:49 | FromDiscord | <Rika> perhaps ive already read it |
13:46:54 | FromDiscord | <Rika> and perhaps ive just forgotten |
13:47:05 | FromDiscord | <mratsim> I understand, happens to me too |
13:47:08 | FromDiscord | <Rika> or are those concepts that cant get through your thick skull |
13:47:26 | FromDiscord | <Yardanico> you like my thicc skull huh |
13:47:32 | narimiran | too much NaCl here recently |
13:47:33 | FromDiscord | <mratsim> >_> |
13:47:46 | FromDiscord | <Rika> perhaps ive just snapped |
13:48:01 | Yardanico | at least we rarely get trolls in here nowadays |
13:48:50 | FromDiscord | <mratsim> 1 out of 10 people, is a troll, if you don't see a troll around you, look in the mirror 😉 |
13:48:52 | FromDiscord | <willyboar> Well we have a V Lang Activist a few days ago |
13:48:59 | FromDiscord | <Yardanico> where |
13:49:09 | * | vikfret quit (Remote host closed the connection) |
13:49:14 | FromDiscord | <mratsim> he left, name started with a L iirc |
13:49:24 | FromDiscord | <willyboar> Luke |
13:49:28 | FromDiscord | <Rika> its been a really long time since i got that mad |
13:49:41 | FromDiscord | <Yardanico> what happened, are you mad because you can't play osu!catch at the same level anymore |
13:49:53 | FromDiscord | <Rika> that would just make me sad tho |
13:50:07 | FromDiscord | <Rika> and its been like that since a year already |
13:53:50 | * | zedeus quit (Ping timeout: 260 seconds) |
13:53:57 | FromDiscord | <Rika> now i wonder why this threadsafe flag is needed for selectors |
13:54:12 | * | ForumUpdaterBot quit (Ping timeout: 256 seconds) |
13:54:44 | Yardanico | why he quit |
13:55:05 | Yardanico | "Error: unhandled exception: File descriptor not registered. [ValueError]" nice error amirite |
13:55:23 | * | ForumUpdaterBot joined #nim |
13:56:00 | Yardanico | ah right because I reconnected to the internet |
14:26:18 | * | PMunch quit (Quit: Leaving) |
14:49:25 | * | zedeus joined #nim |
14:51:33 | FromDiscord | <hassel> sent a code paste, see https://play.nim-lang.org/#ix=2qf1 |
14:51:38 | FromDiscord | <Rika> using selectors with asyncdispatch is kinda funky, is that normal? |
14:53:51 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2qf2↵these two dumped AST trees will show you why theyre failing @hassel |
14:54:07 | FromDiscord | <Rika> not really free enough to fully fix it, so |
14:54:36 | FromDiscord | <hassel> oh, i see now. thanks! 🙂 |
14:54:55 | FromGitter | <alehander92> i should just block you all guys |
14:55:13 | FromGitter | <alehander92> but i am so bad at irc i'd probably become a president of UK or something |
14:55:25 | FromDiscord | <Rika> whats wrong? |
14:56:40 | FromGitter | <alehander92> i am kidding |
14:56:51 | FromGitter | <alehander92> :P |
14:58:56 | * | lbart quit (Ping timeout: 258 seconds) |
15:02:46 | FromDiscord | <willyboar> Alehander92 we should arrange that conversation. |
15:03:12 | FromDiscord | <willyboar> Or create this repo |
15:03:30 | FromDiscord | <willyboar> And use issues |
15:05:33 | alehander92_ | weell |
15:05:42 | alehander92_ | yeah whatever you decide guys |
15:05:56 | alehander92_ | from 1st july i might be able to offer a little time |
15:06:08 | alehander92_ | but i am really not the top expert in web dev as well |
15:08:10 | * | lbart joined #nim |
15:08:57 | FromDiscord | <willyboar> I made some talks with PMunch. After all we are on similar timezones |
15:09:09 | FromDiscord | <willyboar> We are in the same |
15:10:12 | alehander92_ | yeah +2 |
15:10:24 | alehander92_ | 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:49 | FromGitter | <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:15 | ForumUpdaterBot | New 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:22 | FromGitter | <ynfle> Nvm |
15:42:35 | ForumUpdaterBot | New 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:30 | leorize[m] | Yardanico: you can put the feed elsewhere... |
15:43:43 | Yardanico | why? :( |
15:43:47 | Yardanico | I really don't understand |
15:43:59 | Yardanico | that's so bad about having a feed like that |
15:44:03 | Yardanico | it's not like we get 10 posts per minute |
15:44:33 | Yardanico | s/that/what |
15:44:43 | leorize[m] | it's irrelevant to any conversion here, that's all |
15:44:59 | leorize[m] | feeds are better off staying out of the main communication channels |
15:46:10 | leorize[m] | it's not like moving this to, say #nim-news cost anything... |
15:47:47 | FromDiscord | <mratsim> it's in forum-events |
15:47:52 | Yardanico | in discord - yes |
15:48:05 | FromDiscord | <mratsim> it can spark discussion though, I'm on the fence |
15:49:14 | leorize[m] | it's kinda like how github events, if posted here can spark discussion too |
15:49:25 | ForumUpdaterBot | New 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:29 | leorize[m] | most of the time it's just irrelevant |
15:49:36 | alehander92_ | maybe for new posts |
15:49:39 | alehander92_ | it is useful |
15:49:41 | leorize[m] | if we want to have a discussion we can just start one by copying the link |
15:49:43 | alehander92_ | but not for each comment |
15:50:07 | alehander92_ | 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:21 | leorize[m] | and you can already see how the bot randomly inserts itself in the middle of a conversation |
15:50:22 | alehander92_ | on the other hand, comments can be less interesting |
15:51:08 | alehander92_ | yeah, but we get like several posts a day |
15:51:10 | alehander92_ | they are ok |
15:51:29 | leorize[m] | we have other channels that people do subscribe to as feeds |
15:51:30 | * | marnix quit (Ping timeout: 256 seconds) |
15:51:44 | alehander92_ | but new posts are rare events and often are interesting enough |
15:51:53 | leorize[m] | I don't see why this has to be in the main channel |
15:52:02 | alehander92_ | e.g. the first nimbus ad was there, nimconf / library announcements etc |
15:52:26 | ForumUpdaterBot | New thread by Zhongdechan: How to load multiple shared libraries?, see https://forum.nim-lang.org/t/6494 |
15:52:38 | alehander92_ | i think if it happened 3-4 times a day at most it wouldn't annoy anyone |
15:52:43 | leorize[m] | doesn't mean it can't go into #nim-news... |
15:52:57 | alehander92_ | yeah, like now, we can ask ourselves: why is this moderated |
15:52:57 | alehander92_ | huh |
15:53:00 | leorize[m] | anyone that tracks Nim are already in #nim-news |
15:53:13 | Yardanico | alehander92_: because they person just got registered probably :) |
15:53:16 | alehander92_ | that's literally false |
15:53:18 | alehander92_ | i am not there |
15:53:22 | FromGitter | <wrq> my two cents: it's pretty annoying having offtopic bot feeds here |
15:53:23 | alehander92_ | and i follow all kinds of nim stuff |
15:53:23 | leorize[m] | like we have an entire channel dedicated as a feed... |
15:53:36 | Yardanico | @wrq well it's not offtopic too :C |
15:53:43 | leorize[m] | you should join then :) |
15:53:50 | FromGitter | <wrq> it's literally a random forum post, it's entirely offtopic |
15:53:54 | alehander92_ | ok lets' try it with posts only if this is a good compromise |
15:53:58 | Yardanico | okay ill make it only post new threads then |
15:54:02 | alehander92_ | well it's a user question |
15:54:02 | Yardanico | but really that makes it less useful |
15:54:07 | alehander92_ | its exactly the point of this channel |
15:54:13 | alehander92_ | so it cant be offtopic |
15:54:50 | leorize[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:42 | alehander92_ | and if a random user comes with a question |
16:00:52 | alehander92_ | his random question would also be in the middle of convo |
16:01:05 | alehander92_ | that's the point of irc |
16:01:15 | alehander92_ | we can use slack |
16:01:22 | alehander92_ | if we want good separation of conversations |
16:03:59 | leorize | the response would be here instead of having to go to the forums |
16:05:31 | leorize | the updater bot brings nothing into the conversation than some random posts |
16:05:48 | leorize | I don't think it's any harm to put it in a news channel (that we already have) |
16:06:07 | leorize | and if we want to start a conversation around it we can just copy the link over |
16:06:10 | leorize | it's not even hard |
16:07:39 | leorize | and on discord this bot is already in a separated channel if I'm interpreting mratsim correctly |
16:07:43 | leorize | so why not here too? |
16:07:53 | Yardanico | because on discord it's much easier to view other channels |
16:07:57 | Yardanico | because it's still the same server |
16:08:02 | Yardanico | but irc is not centralized like that |
16:08:09 | Yardanico | it's more effort to join and check another channel |
16:08:12 | leorize | well it's not like it goes to some other server here :P |
16:08:16 | leorize | /join #nim-news |
16:08:19 | leorize | bam you're in |
16:08:28 | leorize | add it to your autojoin list and you're done |
16:08:32 | leorize | doesn't cost anything |
16:08:50 | leorize | #nim-news doesn't even enforce registration |
16:09:09 | Yardanico | the thing is that it's harder for users to even discover #nim-news |
16:09:14 | Yardanico | and also it's "spammed" by disbot |
16:09:20 | Yardanico | so it would be harder to see individual forum threads |
16:09:29 | Yardanico | and if I create a yet another IRC channel, it'll be even less used |
16:09:55 | leorize | give it some colors and it should pop right out |
16:10:13 | Yardanico | yeah and people will of course check #nim-news and scroll to see some forum posts :) |
16:10:17 | leorize | maybe it's spammed by disbot because there's simply more activities on github than the forum |
16:10:29 | Yardanico | but they're different |
16:10:40 | Yardanico | github is mostly about issues/RFCs/PRs |
16:10:57 | Yardanico | forum is about general nim-related discussions |
16:10:59 | FromDiscord | <Rika> i'm hitting a weird segfault bug with asyncdispatch but i cant repro it... |
16:11:17 | alehander92_ | are you on linux |
16:11:21 | FromDiscord | <Rika> yes |
16:11:44 | leorize | Yardanico: well issues/rfcs/prs are not nim-related discussions? :P |
16:11:47 | alehander92_ | you can `rr binary` the binary |
16:11:53 | Yardanico | they are, but they're different |
16:11:57 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2qfl |
16:12:02 | alehander92_ | and then you'll be able to reproduce it many times |
16:12:05 | alehander92_ | in the same way |
16:12:07 | alehander92_ | and gdb it |
16:12:13 | leorize | not so much other than non-development questions can happen |
16:12:15 | FromDiscord | <Rika> rr? |
16:12:18 | alehander92_ | if you capture the error once |
16:12:24 | leorize | if we have a lot of talk here all the ForumUpdaterBot posts will be gone too |
16:12:27 | Yardanico | @rika what's the actual error? |
16:12:31 | leorize | just like the feeds you just posted earlier |
16:12:33 | alehander92_ | https://github.com/mozilla/rr/ |
16:12:41 | Yardanico | ah sigsegv |
16:13:12 | alehander92_ | (disclaimer working on a project based on it) but it is useful for reproduction imho |
16:13:38 | leorize | I don't think it's really justifiable to have a feed bot run in the main conversation channel |
16:13:47 | leorize | (and we should advertise #nim-news too :P) |
16:13:57 | Yardanico | not a lot of people would really read it |
16:14:03 | Yardanico | because it's too much github events |
16:14:06 | Yardanico | as I said before |
16:14:29 | leorize | enough people who care would read it |
16:14:42 | Yardanico | and others wouldn't even know it exists |
16:14:47 | leorize | I follow most of the discussions that appear on #nim-news for example |
16:14:51 | FromDiscord | <Rika> i think its a race condition |
16:14:54 | FromDiscord | <Rika> somehow |
16:14:59 | Yardanico | I just want to make the community a bit "stronger" in the sense that people use both forums and IRC |
16:14:59 | leorize | then we just have to tell people that it exists :P |
16:15:00 | FromDiscord | <Rika> (i'm compiling with threads on |
16:15:01 | Yardanico | not just one |
16:15:45 | leorize | not sure how well that'd work |
16:15:45 | alehander92_ | rika its really useful to be able to record a failed run of such an example |
16:16:01 | Yardanico | @Rika well you might be missing locks in your own code :P |
16:16:03 | alehander92_ | it might be trickier if multithreading tho |
16:16:10 | leorize | you can try letting #forum-events run on #general, then you'll see how it's like on irc |
16:16:18 | Yardanico | ?? |
16:16:20 | FromDiscord | <Rika> Yardanico: well i'm not touching anything with the other thread |
16:16:24 | leorize | if we start any discussion here on irc around ForumUpdaterBot, discord people won't see it |
16:16:30 | Yardanico | wdym lol |
16:16:39 | Yardanico | they would? |
16:16:49 | leorize | I thought you scoped ForumUpdaterBot to #forum-events? |
16:17:00 | leorize | does it also post in the main channel? |
16:17:04 | FromDiscord | <Rika> the forum bot message from irc still goes through the bridgef |
16:17:07 | Yardanico | it's in a separate channel on discord for easier separation, also in main channel (it posts with the IRC client) |
16:17:08 | FromDiscord | <Rika> so we still see the bot |
16:17:14 | Yardanico | and telegram |
16:17:21 | leorize | ah, I see (make it join #nim-news too please) |
16:18:35 | Yardanico | okay, I'll do it a bit later |
16:21:20 | leorize | in #nim-news you can make it run for every events :P |
16:27:55 | * | nsf joined #nim |
16:35:05 | FromDiscord | <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:00 | leorize | `=` operator |
16:38:13 | FromDiscord | <Varriount> leorize: That about a move constructor? |
16:38:21 | FromDiscord | <Varriount> *What about |
16:38:26 | leorize | `=sink` |
16:38:42 | leorize | be sure to read |
16:38:43 | FromDiscord | <Varriount> Thanks! |
16:38:45 | leorize | ~destructor |
16:38:45 | disbot | destructor: 11https://nim-lang.org/docs/destructors.html -- leorize |
16:39:15 | leorize | it can be a bit messy but it contains expectations on how these hooks should be implemented |
16:41:24 | FromDiscord | <InventorMatt> is there anyway to get the name and path from a File type? |
16:41:56 | FromDiscord | <mratsim> If you can do that from a File handle in C yes but pretty sure you can't |
16:42:13 | FromDiscord | <mratsim> because even if you delete the file it doesn't invalidate the handle use in Nim |
16:42:49 | FromDiscord | <InventorMatt> okay, thanks |
16:47:08 | * | drdee quit (Quit: Leaving) |
16:48:01 | FromDiscord | <mratsim> Even from a usage point of view, you would have a race |
16:48:37 | FromDiscord | <mratsim> you display something but a user can move the file in betwwen or trash it |
16:49:02 | FromDiscord | <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:59 | FromDiscord | <codic> how can i use a js async function in nim? |
17:05:33 | FromDiscord | <codic> like `async (args) =>` |
17:09:06 | FromDiscord | <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:30 | Yardanico | finally |
17:11:36 | Yardanico | the indent cursing feature works |
17:12:00 | FromDiscord | <Rika> alehander92: cant use rr, i'm on amd |
17:12:33 | Yardanico | isn't this beautiful? :D https://i.imgur.com/2BB6RB1.png |
17:12:51 | FromDiscord | <Rika> ouch |
17:13:03 | Yardanico | and yes it compiles |
17:13:43 | FromDiscord | <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:52 | Yardanico | ?? |
17:13:55 | Yardanico | that's what I do already |
17:14:04 | Yardanico | each line can have any of the indents at different levels |
17:14:19 | FromDiscord | <Rika> then why does the object's fields look so neat |
17:14:23 | Yardanico | hmm lets see |
17:14:32 | Yardanico | it should use different ones |
17:14:52 | FromDiscord | <Rika> some of them still look very neat |
17:14:55 | Yardanico | ah I get what you mean |
17:15:21 | Yardanico | yeah "fixed" |
17:15:23 | FromDiscord | <Rika> yeah its gonna make it much worse |
17:15:27 | FromDiscord | <Rika> so much worse |
17:15:32 | FromDiscord | <Rika> nice |
17:15:48 | Yardanico | its randomized of course https://i.imgur.com/92dyUDf.png |
17:16:17 | Yardanico | it's just that it took me some tens of minutes to properly handle indentation :P |
17:16:25 | FromDiscord | <codic> time to repost |
17:16:28 | FromDiscord | <codic> how can i use a js async function in nim? |
17:16:30 | FromDiscord | <Rika> this is AWFUL |
17:16:35 | Yardanico | @codic I don't know |
17:17:00 | Yardanico | time to do case insensitivity thing |
17:17:10 | Yardanico | at least for keywords |
17:17:10 | FromDiscord | <codic> oh welp |
17:17:19 | FromDiscord | <codic> nvm got it |
17:17:19 | FromDiscord | <codic> https://nim-lang.org/docs/asyncjs.html |
17:17:36 | FromDiscord | <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:40 | Yardanico | yay |
17:18:41 | FromDiscord | <Vindaar> neat! |
17:24:03 | Yardanico | @Rika accidental "feature" https://i.imgur.com/K57sD0m.png |
17:41:27 | FromDiscord | <Rika> owwie |
17:42:17 | Yardanico | i did something really bad |
17:42:49 | FromDiscord | <Rika> you mean good? |
17:43:00 | Yardanico | yeah |
17:46:39 | Yardanico | i 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:22 | FromDiscord | <Rika> when i run the buggy server in valgrind i get a lot of valgrind warnings i assume 🤔 |
17:59:35 | Yardanico | valgrind with nim doesn't play really well |
17:59:41 | Yardanico | unless you compile with --gc:arc -d:useMalloc |
17:59:55 | FromDiscord | <Rika> cant, using async |
18:00:03 | Yardanico | that's the thing |
18:00:08 | Yardanico | you can still try -d:useMalloc but it won't really help |
18:00:24 | FromDiscord | <Rika> i did get this though |
18:00:36 | FromDiscord | <Shucks> How to get that fancy indent color blocks |
18:00:50 | Yardanico | indent-rainbow plugin in vscode |
18:00:58 | FromDiscord | <Shucks> thank you |
18:01:04 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2qfE |
18:01:25 | Yardanico | is that with -d:useMalloc or without it? |
18:01:29 | FromDiscord | <Rika> w/o |
18:01:31 | Yardanico | because by default nim has it's own allocator |
18:01:36 | Yardanico | and valgrind wouldn't really understand |
18:01:40 | FromDiscord | <Rika> lets see with malloc then |
18:01:42 | Yardanico | try with -d:useMalloc |
18:02:08 | FromDiscord | <Rika> still there |
18:15:03 | FromDiscord | <Technisha Circuit> I feel sick↵> @Rika accidental "feature" https://i.imgur.com/K57sD0m.png |
18:18:06 | FromDiscord | <Technisha Circuit> ~~Can i do |--gc:arc` in js?~~ |
18:18:12 | Yardanico | no, JS has it's own GC |
18:18:14 | FromDiscord | <Technisha Circuit> (edit) '|--gc:arc`' => '`--gc:arc`' |
18:18:22 | FromDiscord | <Technisha Circuit> ~~O~~ |
18:19:18 | Araq | we try to support destructors well though even for js |
18:19:26 | Araq | but it's entirely untested :-/ |
18:19:52 | disruptek | y'know, i think these incels might be on to something. |
18:20:03 | Yardanico | btw 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:18 | Yardanico | and the stripped down binary is under 300kb |
18:25:03 | * | nsf quit (Quit: WeeChat 2.8) |
18:25:23 | * | Senny joined #nim |
18:25:59 | disruptek | leorize: what's the problem with news? |
18:26:33 | leorize[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:35 | disruptek | i ignore all discord traffic, so i think i'm only seeing half the issue. |
18:26:53 | disruptek | okay. |
18:27:14 | disruptek | are you gonna be around for awhile? |
18:28:27 | zedeus | i 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:51 | zedeus | then it won't be too spammy and won't disrupt conversations |
18:30:30 | disruptek | i think #nim-something makes sense because it's easier to opt-in/out, filter, log, spam, whatever. |
18:30:58 | disruptek | but i dunno what this bot even does. i think i'm ignoring yard, too. |
18:31:15 | zedeus | i 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:28 | disruptek | sounds good. |
18:33:18 | Zevv | http://zevv.nl/div/out.gif |
18:33:43 | zedeus | neat. |
18:34:02 | leorize[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:02 | disbot | ➥ asyncnet, net: don't attempt SSL_shutdown if a fatal error occurred |
18:34:09 | Zevv | Stil calculating. It will finish the day PMunch's compilation finishes |
18:34:11 | leorize[m] | the failure seems unrelated |
18:34:16 | Yardanico | Zevv: I have bad news for yoiu |
18:34:17 | Yardanico | you* |
18:34:20 | zedeus | he had to stop the compilation :( |
18:34:25 | Zevv | awww |
18:35:14 | zedeus | image approximation using boxes is cool |
18:35:27 | zedeus | i did image approximation using random walks, creates some cool results |
18:35:46 | Zevv | I wrapped this lib the other day, it's just a test to see how it does on this |
18:35:47 | Zevv | https://github.com/zevv/nimcmaes |
18:36:24 | Zevv | I'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:24 | FromDiscord | <codic> what is wrong with this code? it says invalid indentation on line 5 https://hatebin.com/ksvhicmpyk |
18:36:37 | FromDiscord | <codic> using js backend btw |
18:36:42 | disruptek | Zevv: you make me want to be a better plant. |
18:37:01 | Yardanico | @codic no need for comma |
18:37:14 | Yardanico | remove comma from line 6 and 7 (name and aliases) |
18:37:15 | FromDiscord | <codic> ah |
18:37:18 | zedeus | Zevv: interesting stuff, have you found a use case yet? besides approximating da vinci art |
18:37:33 | Zevv | sure, I've been using it for years for all kinds of stuff |
18:37:46 | Zevv | Generatic IIR filter coefficents for arbritary responses |
18:37:57 | Zevv | Calculating optimal geometry for strandbeest robot legs |
18:38:23 | zedeus | you're blowing my mind |
18:38:26 | Zevv | about everything where you have N continuous inputs and you want an optimum |
18:38:52 | disruptek | what do you have to do with strandbeest? |
18:38:55 | disruptek | gtfo |
18:39:34 | Zevv | not "the" strandbeest, but I tried to find optimal leg geomtry one day |
18:39:59 | disruptek | i could send you a photo, but i have to verify your age first. |
18:40:29 | Zevv | http://zevv.nl/div/strandbeest.gif |
18:41:00 | disruptek | cancel my order. |
18:41:19 | Zevv | the hunchback of the beach, right |
18:42:26 | FromDiscord | <Vindaar> @Zevv wow, that's some interesting stuff. I've never heard of that library |
18:42:51 | Zevv | neither 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:11 | Zevv | it's just not commonly used. But the black-boxness makes it a nice choice for whatever you throw at it |
18:43:39 | Zevv | I 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:58 | FromDiscord | <Vindaar> Have to give it a try one of these days |
18:44:00 | Zevv | I don't understand much of the theory, but it feels kalmanfilterlike |
18:44:34 | FromDiscord | <Vindaar> the readme could use a link to the C library |
18:44:37 | FromDiscord | <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:54 | Zevv | vindaar: sure, willdo |
18:45:42 | FromDiscord | <juan_carlos> F5 broke waiting for Fidget to be published. :| |
18:46:21 | Zevv | If I had the courage I would take it apart and reassemble it in nim on top of Weave |
18:46:47 | FromDiscord | <InventorMatt> Zevv: could you share your code for the strandbeest calculator(Jansen linkage)? |
18:46:47 | FromDiscord | <Vindaar> damn, that's a fun idea. If only there was more time in a day, huh |
18:47:30 | Zevv | InventorMatt: not sure if it is of any use, it was just something I started and abandoned |
18:47:33 | Zevv | and it's just C |
18:47:43 | FromDiscord | <codic> also, how do i get my seqs to compile into a js array [] instead of an array inside an array [[]] |
18:47:43 | Zevv | vindaar: yeah, and more years in a life |
18:47:58 | FromDiscord | <Vindaar> 😐 |
18:48:16 | Zevv | InventorMatt: http://ix.io/2qfU |
18:48:21 | Zevv | fwiw |
18:49:00 | FromDiscord | <InventorMatt> thank, I have a bachelors in mechanical engineering and I have a strong interest in linkages and robotics |
18:49:54 | Zevv | basically 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:02 | FromDiscord | <codic> welp |
18:50:28 | * | casaca quit (Remote host closed the connection) |
18:51:26 | FromDiscord | <codic> exportc did the trick for the double arrays |
18:51:40 | FromDiscord | <codic> i'm still confused on: |
18:51:40 | FromDiscord | <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:56 | leorize | turns out Nim don't transpile :P |
18:53:35 | leorize | the short answer is: no you can't control that easily |
18:53:42 | FromDiscord | <lqdev> *rika triggered because you mentioned transpilation* |
18:55:10 | FromDiscord | <codic> wait |
18:55:11 | leorize | wait the answer is actually: no you can't, at all |
18:55:11 | FromDiscord | <codic> you can't? |
18:55:18 | leorize | why do you need that? |
18:55:18 | FromDiscord | <codic> welp |
18:55:36 | FromDiscord | <codic> i'm using discord.js and the paramters become - actually, you're right, it doesn't matter |
18:57:02 | leorize | just letting you know that 99% of the time you don't need exportc on JS |
18:57:09 | leorize | or even C for that matter |
18:57:35 | leorize | it's only important when you absolutely need the name to be the same as what you declared |
18:59:00 | FromDiscord | <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:06 | FromDiscord | <codic> no errors |
18:59:18 | FromDiscord | <codic> ohhh |
18:59:20 | FromDiscord | <codic> wait i'm stupid |
19:00:02 | FromDiscord | <codic> or not. thought it was a name conflict, but same issue without it |
19:00:28 | FromDiscord | <codic> (without it == after changing the name, in this case) |
19:07:43 | FromDiscord | <codic> so welp |
19:25:51 | leorize | it appears that you need to create a jsobject? |
19:26:10 | leorize | module.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:27 | haxscramper | I 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:03 | FromDiscord | <Rika> prolly use regular `map` instead |
19:42:23 | FromDiscord | <Rika> that way you control the naming of `it`, albeit needing to make a proc for that |
19:42:39 | FromDiscord | <Rika> though that's slightly mitigated by either `sugar` or the do syntax |
19:43:47 | FromDiscord | <Rika> map do (it1: Type) -> RetType:↵ it1.map do (it2: Type2) -> RetType2:↵ it1 + it2 |
19:43:50 | FromDiscord | <Rika> i think this works |
19:44:41 | Yardanico | finally it's out :P https://github.com/Yardanico/nuglifier |
19:44:51 | haxscramper | If 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:12 | haxscramper | I mean in general - is there some way to get outer variable or it is completely invisible to inner scope? |
19:47:24 | FromDiscord | <Rika> its shadowed |
19:47:33 | FromDiscord | <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:04 | leorize | haxscramper: you can't get the outer scope again |
19:55:24 | leorize | use the normal map, it might be slower but it'd work better for your case |
19:56:44 | haxscramper | Is 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:11 | leorize | you can access all symbol within the scope |
19:57:24 | haxscramper | Won't use it, just wondering if I can write some kind of `macro unshadow(s: typed, level: int): ...` |
19:57:39 | leorize | you can't do that :P |
20:00:00 | leorize | https://play.nim-lang.org/#ix=2qgq |
20:00:21 | leorize | btw here's how to do that with mapIt |
20:00:34 | leorize | I fully expect that this will be slower than using a normal map lol |
20:03:35 | haxscramper | I 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:45 | FromDiscord | <Rika> lmao |
20:13:56 | haxscramper | Is 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:41 | leorize[m] | currently that's not possible |
20:16:55 | * | vikfret joined #nim |
20:17:10 | haxscramper | Ah, 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:17 | haxscramper | https://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:28 | FromDiscord | <lqdev> is `{..a}` tokenized as `{. . a }` or `{ .. a }`? |
21:38:44 | FromDiscord | <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:47 | FromDiscord | <mratsim> What happened to Nim stable directory hiearchy?? My CI is broken all other the place |
22:06:19 | FromDiscord | <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:49 | FromDiscord | <Vindaar> first error is already in line 26 though |
22:12:49 | * | Trustable quit (Remote host closed the connection) |
22:14:59 | FromDiscord | <Rika> finally, got a somewhat small repro for the bug i've been getting |
22:15:24 | FromDiscord | <lqdev> is it possible to construct an empty tuple? |
22:15:41 | FromDiscord | <Rika> tried `tuple[void]`? |
22:16:23 | FromDiscord | <lqdev> but how do I construct such a tuple? |
22:16:28 | FromDiscord | <lqdev> `(,)` does not work |
22:17:18 | FromDiscord | <lqdev> `default(tuple[])` seems to do the trick |
22:18:40 | FromDiscord | <lqdev> damn what I'm doing is entering hack territory |
22:18:44 | FromDiscord | <lqdev> I should probably stop |
22:20:26 | FromDiscord | <Vindaar> or embrace "the hack" |
22:20:54 | FromDiscord | <Vindaar> if you should do that kinda depends on what you're doing though 😛 |
22:21:18 | FromDiscord | <lqdev> well I'm trying to add unnecessary flexibility to an already inflexible macro |
22:23:31 | FromDiscord | <Vindaar> already inflexible? still inflexible or do you mean its beyond repair in that regard? |
22:23:48 | FromDiscord | <lqdev> no |
22:24:05 | FromDiscord | <lqdev> I'm saying that it's a simple macro made for one use case |
22:24:06 | FromDiscord | <Vindaar> oh, you mean the implementation I guess |
22:24:12 | FromDiscord | <Vindaar> ah |
22:25:52 | FromDiscord | <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:59 | FromDiscord | <lqdev> oh man turns out that "flexibility" was actually necessary |
22:26:09 | FromDiscord | <lqdev> well, shit. |
22:26:13 | FromDiscord | <lqdev> I'll fix it tomorrow |
22:26:17 | FromDiscord | <lqdev> goodnight |
22:26:36 | FromDiscord | <Vindaar> good night! |
22:27:31 | * | notandinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
22:27:35 | FromDiscord | <Rika> good night to you |
22:27:36 | FromDiscord | <mratsim> @Vindaar, so there is a tag 1.2.4 on the website but not on github branches :/ |
22:27:53 | FromDiscord | <Vindaar> yay :/ |
22:28:19 | FromDiscord | <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:48 | FromDiscord | <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:24 | FromDiscord | <Rika> what the hell |
22:42:32 | FromDiscord | <Rika> okay so the async bug is because of -d:threadsafe??? |
22:46:22 | leorize[m] | zedeus: I think you'll like #14826 |
22:46:24 | disbot | https://github.com/nim-lang/Nim/pull/14826 -- 3asyncnet, net: the SIGPIPE avoidance package for SSL_shutdown() |
22:46:32 | zedeus | yep! |
22:47:06 | * | tinAndi joined #nim |
22:49:29 | leorize | of course macosx will not have sigtimedwait()... |
22:49:37 | leorize | I hate this |
22:49:57 | * | Prestige quit (Quit: Prestige) |
22:50:18 | * | tinAndi quit (Quit: tinAndi) |
22:52:08 | Zoom[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:31 | FromDiscord | <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:13 | Zoom[m] | The first one even had item and money duplicating, besides other smaller bugs. |
23:00:19 | Zoom[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:40 | Zoom[m] | BTW, is there any roguelikes in Nim? |
23:00:47 | FromDiscord | <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:08 | leorize | it doesn't apply for this case unfortunately... |
23:02:22 | * | Prestige joined #nim |
23:02:28 | leorize | the only alternative API that can be use to implement this doesn't have timeout and is prone to race condition |
23:03:48 | FromDiscord | <exelotl> if I had infinite time and money I'd love to make a roguelike in Nim x) |
23:06:16 | Zoom[m] | exelotl, If you had infinite time and money you could probably make like a third of DwarfFortress. |
23:06:48 | FromDiscord | <exelotl> aw heck yeah |
23:06:57 | FromDiscord | <exelotl> DwarfBackyard |
23:08:36 | FromDiscord | <exelotl> caves of qud looks really nice http://www.cavesofqud.com/ |
23:11:20 | FromDiscord | <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:49 | FromDiscord | <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:55 | FromDiscord | <Rika> how do i add tls to asynchttpserver? |
23:15:11 | leorize | ask federico3 :P |
23:15:20 | FromDiscord | <Rika> has he? |
23:15:46 | leorize | !pr ssl server |
23:15:54 | leorize | !help |
23:16:07 | leorize | !pull ssl server |
23:16:09 | disbot | https://github.com/nim-lang/Nim/pull/13961 -- 3Add SSL / HTTPS server test [don't merge yet] 7& 13 more... |
23:16:16 | leorize | ^ you can refer to that |
23:16:59 | FromDiscord | <Rika> well it passes ci so why no merge T_T |
23:17:05 | FromDiscord | <Rika> still at "DONT MERGE"? |
23:17:10 | leorize | ask the man :P |
23:23:06 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
23:31:31 | * | sschwarzer joined #nim |
23:33:37 | sschwarzer | How 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:51 | FromDiscord | <Rika> i'd like to know here |
23:34:22 | sschwarzer | Ok ... |
23:34:33 | FromDiscord | <Rika> mind describing it here? |
23:35:41 | sschwarzer | Under "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:52 | sschwarzer | Python 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:03 | FromDiscord | <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:18 | FromDiscord | <Rika> what metaprogramming features? |
23:37:23 | FromDiscord | <mratsim> import ast |
23:37:27 | FromDiscord | <mratsim> 😄 |
23:37:43 | sschwarzer | Typing in Python is sometimes described as "static with dynamic binding" because objects don't change their type. |
23:38:20 | FromDiscord | <mratsim> that's called strong typing |
23:38:21 | sschwarzer | mratsim: 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:00 | FromDiscord | <mratsim> You can have static compilation + weak typing (C, thank you integer promotion rules and pointer decays) |
23:39:09 | FromDiscord | <mratsim> and fynamic language + strong typing |
23:39:12 | FromDiscord | <mratsim> dynamic* |
23:39:25 | sschwarzer | The "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:05 | FromDiscord | <Rika> you should put that biggest integer thing |
23:40:08 | sschwarzer | Anonymous functions (lambdas) are one expression, not one line. |
23:40:30 | FromDiscord | <mratsim> arbitrary precision integer |
23:40:32 | sschwarzer | Rika: There doesn't seem to be a "biggest integer" in Python |
23:40:33 | FromDiscord | <mratsim> is enough |
23:41:05 | FromDiscord | <Rika> yeah i know, ive tried |
23:41:06 | sschwarzer | Immutability: Basic types (numbers, strings) are immutable. |
23:41:09 | * | krux02_ joined #nim |
23:41:11 | FromDiscord | <Rika> it just gets more and more memory hungry |
23:41:20 | FromDiscord | <Rika> they are not in a sense |
23:41:38 | FromDiscord | <Rika> we mean immutable as in "can change the value in a variable" so doing stuff like: |
23:41:48 | FromDiscord | <Rika> a = ""↵a += "test"↵still counts as mutable |
23:41:50 | sschwarzer | Therefore "function arguments immutability" "mutable" wouldn't apply to basic types |
23:42:04 | FromDiscord | <Rika> ah, i see |
23:42:20 | FromDiscord | <Rika> change it to "mostly mutable" since lists, dicts, etc are still mutable |
23:42:50 | sschwarzer | Rika: 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:58 | sschwarzer | File extensions: I'm not sure these are (still?) used somewhere. I've never seen pyz and pyx is only(?) used for Cython |
23:44:31 | sschwarzer | Indentation for control flow is either tabs or spaces, but not mixed in the same file. |
23:44:42 | sschwarzer | Mixing them is a syntax error |
23:44:59 | leorize | it's enforced now? nice |
23:45:10 | sschwarzer | Strictly speaking you can indent however you want while in expressions. |
23:45:21 | sschwarzer | leorize: since Python 3 |
23:46:32 | sschwarzer | Regarding 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:29 | sschwarzer | In "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:02 | FromDiscord | <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:11 | sschwarzer | I'd change the try/import example to explicitly catch `ImportError`. |
23:50:02 | FromDiscord | <Technisha Circuit> Also, would c2nim work on a Cython C file? :P |
23:50:30 | sschwarzer | The 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:16 | sschwarzer | Technisha Circuit: Only if pure C is also valid Cython, I guess ;-) |
23:51:31 | FromDiscord | <Technisha Circuit> Then that she work :P |
23:51:41 | FromDiscord | <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:43 | FromDiscord | <Technisha Circuit> :p |
23:51:48 | sschwarzer | There would probably more potential changes, but that's how far I read :) |
23:53:58 | sschwarzer | Oh, 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:59 | FromDiscord | <Technisha Circuit> Anyone? ;-; |
23:54:02 | sschwarzer | https://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:20 | FromDiscord | <Technisha Circuit> ~~Also, is it possible to use Python's GC in Nim~~ |
23:56:09 | sschwarzer | I haven't worked with Nimpy, only know of it's existence |
23:56:14 | sschwarzer | ;-) |
23:56:17 | FromDiscord | <Technisha Circuit> Oh? |
23:56:21 | FromDiscord | <Technisha Circuit> Nimpy is really nice |
23:56:21 | sschwarzer | it's -> its |
23:56:30 | FromDiscord | <Technisha Circuit> :p |
23:57:15 | sschwarzer | *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:07 | sschwarzer | I think meanwhile I like Nim more than Python, and I've been using Python for 20 years, given talks etc. |
23:58:38 | FromDiscord | <Technisha Circuit> O |
23:58:49 | FromDiscord | <Technisha Circuit> I also like Nim more then Python :P |
23:59:20 | FromDiscord | <Technisha Circuit> But Nim doesn't have a big community as it should really have which saddens me |
23:59:56 | FromDiscord | <Technisha Circuit> The Nim Discord now has 1025 members |