00:00:23 | Yardanico | yeah, I don't see using being used often (pun intended) |
00:01:02 | Yardanico | but it's not even an experimental feature |
00:01:11 | Yardanico | so it's there to stay for all time nim 1.x will exist |
00:01:54 | Yardanico | of course in nim 2.0 we'll all just tell the compiler to write code for us |
00:02:16 | FromDiscord | <Recruit_main707> Who would want that |
00:02:21 | Yardanico | also another interesting thing is how people write case statements |
00:02:30 | FromDiscord | <Recruit_main707> Writing Nim is enjoyable |
00:02:33 | Yardanico | there are 4 ways of indenting/writing them in Nim |
00:03:34 | Yardanico | https://play.nim-lang.org/#ix=2mWz |
00:03:38 | Yardanico | I prefer the 4th one btw |
00:04:22 | * | leorize quit (Remote host closed the connection) |
00:04:51 | * | leorize joined #nim |
00:05:05 | Yardanico | the manual covers this though so it's all fine |
00:06:52 | FromDiscord | <exelotl> Only villains use #2 or #3 |
00:06:57 | leorize[m] | disruptek's fav is the 3rd |
00:07:33 | * | rockcavera quit (Read error: Connection reset by peer) |
00:07:44 | Yardanico | @exelotl I dislike 1st and 2nd ones |
00:07:47 | Yardanico | 3rd and 4th are fine imo |
00:07:48 | FromDiscord | <Recruit_main707> 1st one |
00:07:54 | * | rockcavera joined #nim |
00:08:04 | Yardanico | I don't like extra indentation there for some reason :P |
00:08:33 | FromDiscord | <exelotl> If there's a : then there should be indentation following it |
00:08:39 | Yardanico | hmm |
00:08:39 | FromGitter | <xmonader> what is the difference between 1, 2 AND 3,4 ? |
00:08:45 | Yardanico | no difference |
00:08:47 | Yardanico | just how it loks |
00:08:52 | Yardanico | they all work exactly the same |
00:09:06 | FromGitter | <xmonader> yeah i understand, i just can't see the difference between 1 and 2 |
00:09:07 | FromDiscord | <exelotl> I usually use #4 anyways |
00:09:12 | Yardanico | @xmonader indetation |
00:09:16 | FromGitter | <xmonader> also can't see the difference in 3,4 |
00:09:16 | FromDiscord | <Recruit_main707> Wether there is : in the first line of each |
00:09:18 | Yardanico | ah sorry |
00:09:19 | Yardanico | : |
00:09:20 | Yardanico | yeah |
00:09:24 | leorize | as someone who wrote indent scripts for Nim, I hate 2, 3 |
00:09:27 | Yardanico | @xmonader the diff between 1 and 2 is the colon |
00:09:35 | Yardanico | same for 3 and 4 |
00:09:56 | FromGitter | <xmonader> ah thanks, I've some visual problems I don't see things easily |
00:10:59 | FromDiscord | <Rika> I would use 1 but I do not |
00:11:13 | FromDiscord | <Rika> I use 4 instead because styling told me to |
00:11:29 | FromGitter | <xmonader> I think ⏎ `match a with ` without colon makes more sense to me |
00:18:09 | * | samuelb_ quit (Quit: Leaving) |
00:23:06 | * | bbarker joined #nim |
00:25:27 | * | krux02_ quit (Remote host closed the connection) |
00:26:15 | * | Brandon__ quit (Ping timeout: 256 seconds) |
00:37:24 | FromGitter | <bung87> does the vscode editor format follow this ? https://nim-lang.org/docs/nep1.html#introduction-conventions-for-multiminusline-statements-and-expressions , I have not run format command successfully for a while. |
00:41:30 | Yardanico | format command uses nimpretty |
00:41:34 | Yardanico | but it was fixed only recently in the extension |
00:41:37 | Yardanico | and nimpretty itself has bugs |
00:45:06 | FromGitter | <bung87> ok, what's your editor for nim? |
00:45:16 | * | gxt__ joined #nim |
00:45:30 | Yardanico | sublime text 3 (nimlime + nimlsp), but I don't really use nimpretty anyway |
00:45:41 | Yardanico | I didn't say vscode is bad, but the extension has it's own problems :) |
00:46:42 | FromGitter | <bung87> I know the author almost maintained alone. |
00:46:43 | * | gxt_ quit (Ping timeout: 240 seconds) |
00:46:55 | Yardanico | well same goes for nimlsp and for nimlime |
00:49:26 | * | konvertex quit (Ping timeout: 264 seconds) |
00:50:03 | dadada | jeder Mensch (nicht ich) mit Microsoft Office arbeitet, ..., also ist diese Software zentral für die Menschheit, sie gehört zugleich nicht der Menschheit, bedenklich, |
00:50:23 | dadada | sry, the message was for Araq ... :-) |
00:51:28 | Yardanico | he's sleeping now I think :P |
00:51:28 | FromGitter | <bung87> dont worry |
00:51:56 | FromGitter | <bung87> Latest commit 4 hours ago |
00:52:09 | Yardanico | ? |
00:52:23 | FromGitter | <bung87> araq |
00:52:24 | Yardanico | well yes |
00:52:33 | Yardanico | it was ~23:00 there 4 hours ago |
00:52:36 | Yardanico | now it's ~2:52 AM |
00:52:39 | Yardanico | in Germany\ |
00:52:56 | FromGitter | <bung87> yeah time for sleeping |
01:00:52 | Yardanico | can you guys test if the example from https://github.com/nim-lang/Nim/issues/14425 crashes for you with --gc:arc or not? |
01:04:36 | * | lritter_ joined #nim |
01:04:47 | * | lritter quit (Ping timeout: 272 seconds) |
01:09:15 | FromDiscord | <speckledlemon> Does a tool for generating package templates exist other than <https://github.com/hiway/cookiecutter-nim-cli> ? |
01:09:28 | Yardanico | nimble itself makes a package template for you |
01:09:35 | Yardanico | with src dir, tests dir, nimble file |
01:10:06 | Yardanico | and this extension seems to do the same but worse :P |
01:10:11 | Yardanico | try "nimble init" |
01:10:21 | * | zacharycarter joined #nim |
01:11:25 | FromDiscord | <speckledlemon> thanks! |
01:11:44 | Yardanico | also see https://github.com/nim-lang/nimble#creating-packages |
01:13:15 | FromDiscord | <JSGrant> _kinda wishes that choosenim would be part of the normal 'tools' distribution_ |
01:13:19 | Yardanico | no |
01:15:15 | FromDiscord | <JSGrant> Yandanico: Is that in-reference to me, or? lol |
01:15:20 | Yardanico | yes |
01:15:39 | FromDiscord | <JSGrant> Any reasoning behind it, or? |
01:16:07 | Yardanico | 1) it's not cross-platform (no windows support) 2) if you have nim repo (or nim distro downloaded), you don't really need choosenim IMO |
01:16:31 | Yardanico | I only would agree if it would actually be coupled with koch and stuff so it would update the files you installed and not install nim somewhere else |
01:17:17 | Yardanico | I don't think there are any languages which _ship_ a version chooser with the compiler |
01:17:28 | Yardanico | well, at least the ones I know of |
01:18:37 | FromDiscord | <JSGrant> Well, maybe not ship; But as-far as I can tell -- Rust officially supports and actively mentions rustup? |
01:19:36 | FromDiscord | <JSGrant> _also doesn't know enough (or next to anything, honestly) about the architecture of choosenim -- but these mostly sound like missing features (sans argument 2)?_ |
01:21:28 | FromDiscord | <JSGrant> Evidently as-per the rustup site; The footer does mention " rustup is an official Rust project. " |
01:22:08 | FromDiscord | <JSGrant> But as-said if the distinction is "shipped" I think that's a fair distinction |
01:26:37 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:28:38 | * | chemist69 joined #nim |
01:40:20 | * | sz0 quit (Quit: Connection closed for inactivity) |
01:41:55 | * | nphg1 joined #nim |
01:44:11 | * | nphg quit (Ping timeout: 246 seconds) |
02:19:23 | * | martinium joined #nim |
02:19:56 | martinium | I am trying to play around with parallel processing in Nim. I am trying to experiment making a simple line counting program multi-core/parallel |
02:20:26 | martinium | any good Nim resources for writing parallel/multicore code? |
02:26:20 | zedeus | https://github.com/mratsim/weave |
02:26:27 | FromDiscord | <Elegant Beef> Nim in action has a fairly good chapter on it |
02:27:04 | * | team\andinus joined #nim |
02:27:43 | martinium | man this library looks reallll nice |
02:27:49 | martinium | thanks zedeus |
02:36:03 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:38:01 | * | muffindrake joined #nim |
02:43:02 | * | fredrikhr quit (Quit: Client Disconnecting) |
02:48:22 | * | zacharycarter quit (Ping timeout: 260 seconds) |
02:50:08 | FromGitter | <xmonader> any idea how to fix that ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec73de03ffa6106f1c7e5b5] |
02:50:17 | * | Tongir joined #nim |
02:50:26 | FromGitter | <xmonader> different lock levels :/ |
02:52:57 | * | Tlanger quit (Ping timeout: 260 seconds) |
02:53:28 | * | audiofile quit (Quit: Going offline, see ya! (www.adiirc.com)) |
02:55:06 | FromGitter | <xmonader> this code was valid in nim 1.0 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec73f09225dc25f549a96f9] |
03:05:46 | * | Tlanger joined #nim |
03:08:28 | * | Tongir quit (Ping timeout: 256 seconds) |
03:08:35 | * | endragor joined #nim |
03:15:46 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:19:31 | * | Senketsu joined #nim |
03:28:08 | * | chemist69 quit (Ping timeout: 244 seconds) |
03:28:40 | * | dadada quit (Ping timeout: 265 seconds) |
03:29:12 | * | chemist69 joined #nim |
03:35:32 | * | zacharycarter joined #nim |
03:58:18 | * | thomasross quit (Ping timeout: 260 seconds) |
04:00:30 | * | NimBot joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:39 | * | supakeen joined #nim |
04:10:40 | * | rockcavera quit (Remote host closed the connection) |
04:40:19 | * | rmt quit (Quit: Leaving) |
04:41:21 | zacharycarter | what does `(unsigned short)-1` mean in C/C++? |
04:41:32 | zacharycarter | like one minus the limit of unsigned short? |
04:42:14 | zacharycarter | oh I guess it his the limit |
04:42:29 | zacharycarter | learn something new every day - I was always very confused by this |
04:44:09 | Prestige | Is out xrandr wrapper incomplete? |
04:45:02 | zacharycarter | huh? |
04:45:28 | Prestige | is our* |
04:46:08 | zacharycarter | no idea... |
04:46:27 | Prestige | Maybe XRRGetCrtcInfo isn't supposed to be in there? But I'm seeing a call to it in xrandr.c |
04:46:27 | zacharycarter | didn't even know what xrandr was until just now |
04:47:05 | zacharycarter | so far 900ish lines of imgui ported to Nim - working on a test backend with sokol, just got the default font loaded I think |
04:47:18 | zacharycarter | should hopefully be able to render a window by tomorrow |
05:04:22 | * | dddddd quit (Ping timeout: 265 seconds) |
05:06:00 | * | sbeam joined #nim |
05:09:23 | * | sbeam quit (Client Quit) |
05:14:15 | disruptek | cool, i'd like to use it for this poe project. |
05:14:53 | zacharycarter | I think eventually I want to port sokol to Nim too |
05:15:06 | zacharycarter | I started on this once and got decently far but I should finish that port as well |
05:15:41 | disruptek | i realized recently that i don't care about supporting other platforms. let other people submit PRs for windows, etc. |
05:15:50 | disruptek | i'm in the "make it work" phase. |
05:16:18 | zacharycarter | yeah - I agree |
05:16:48 | zacharycarter | well kind of anyway - eventually shit needs to work across 64 bit os's |
05:16:58 | zacharycarter | but it might as well work on one first |
05:17:27 | Prestige | Hm if I have a ptr T and want to get the next location in memory how can I access it? Like myPtr[1] |
05:18:04 | zacharycarter | I'm going to bed - cya all tomorrow |
05:21:41 | shashlick | disruptek what you working on |
05:21:57 | Prestige | Perhaps an unchecked array to wrap the variable and then I can access it |
05:25:33 | leorize[m] | Prestige: cast it to ptr UncheckedArray[T] |
05:26:02 | Prestige | Ah thanks leorize[m] |
05:31:27 | * | narimiran joined #nim |
05:34:49 | Prestige | Not sure if I'm doing this incorrectly: https://0x0.st/i9dl.png the first echo is fine, the second gives me an illegal storage access error leorize[m] |
05:35:07 | * | zacharycarter quit (Ping timeout: 260 seconds) |
05:36:20 | Prestige | I thought sizes[0] would be the same pointer as pSizes |
05:37:44 | leorize[m] | you have to cast `ptr T` into `ptr UncheckedArray[T]` not `ptr UncheckedArray[ptr T]` :P |
05:38:52 | Prestige | I see, thanks that worked |
05:42:15 | * | solitudesf joined #nim |
05:46:16 | * | martinium quit (Ping timeout: 258 seconds) |
06:00:19 | * | couven92 quit (Read error: Connection reset by peer) |
06:00:24 | * | fredrikhr joined #nim |
06:19:44 | * | fredrikhr quit (Read error: Connection reset by peer) |
06:19:50 | * | couven92 joined #nim |
06:19:50 | * | lritter_ quit (Quit: Leaving) |
06:20:11 | * | couven92 quit (Read error: Connection reset by peer) |
06:20:33 | * | fredrikhr joined #nim |
06:25:14 | team\andinus | https://nim-lang.org/docs/times.html |
06:25:34 | team\andinus | how do i get current time in this format? (Wed, 18 Mar 2020 13:59:19 +0530) |
06:25:55 | team\andinus | now().format("ddd, dd MMM yyyy hh:mm:ss zz") returns Fri, 22 May 2020 11:52:28 +05 |
06:25:58 | team\andinus | and |
06:26:18 | FromDiscord | <Rika> ? |
06:26:21 | FromDiscord | <Rika> i dont see the issue |
06:26:22 | team\andinus | echo now().format("ddd, dd MMM yyyy hh:mm:ss zzz") returns Fri, 22 May 2020 11:52:11 +05:30 |
06:26:36 | team\andinus | issue is i want +0530 |
06:26:54 | team\andinus | it returns +05 on "zz" and +05:30 on "zzz" |
06:27:22 | * | nphg1 is now known as nphg |
06:27:27 | * | Faulander quit (Read error: Connection reset by peer) |
06:27:38 | team\andinus | do i have to write something to remove ':' manually or can times package do this? |
06:27:55 | * | Faulander joined #nim |
06:29:09 | team\andinus | this is for email header btw |
06:29:18 | leorize | that's not supported from what I can tell |
06:29:54 | leorize | you can do your own formatting though, `.utcOffset` stores the offset |
06:32:46 | team\andinus | i c |
06:32:53 | team\andinus | is this a bug? https://play.nim-lang.org/#ix=2mXj |
06:33:24 | team\andinus | it should return "Fri, 22 May 2020 06:33:00 +00:00" right? |
06:53:56 | * | opDispatch joined #nim |
06:59:18 | opDispatch | what's better for nim ? vim or emac ? |
06:59:33 | FromDiscord | <Rika> either |
06:59:48 | FromDiscord | <Rika> is your nickname really `opDispatch` or is yardanico's bridge bugged? |
07:00:43 | opDispatch | no it's opDispatch. This is a powerful operator overload in dlang. |
07:01:48 | opDispatch | in short, when you write "a.b" and if "a" has no "b" member, opDispatch is called at compile time to let you solve "b". |
07:02:06 | FromDiscord | <Rika> yeah, since there's something called `opDispatch` too in the library the bot is using lol |
07:02:13 | FromDiscord | <Rika> some of us thought it was a bug |
07:02:19 | opDispatch | ah ok I see. |
07:02:43 | FromDiscord | <Rika> nim doesnt need no op dispatch! |
07:02:50 | FromDiscord | <Rika> weve got ufcs 😛 |
07:03:03 | FromDiscord | <Rika> but from what ive heard, vim is better for nim |
07:03:12 | opDispatch | D too but opDispatch is still necessary in some cases |
07:03:13 | FromDiscord | <Rika> but nim also has an LSP implementation |
07:03:52 | opDispatch | thing JSON chain, e.g a["b"]["c"] = "prop", can be written a.b.c = "prop" |
07:04:04 | opDispatch | *think |
07:04:32 | opDispatch | with safe access in case the sub objects dont exist |
07:05:17 | opDispatch | anyway, I guess LSP is the way to go nowadays... |
07:07:15 | * | sz0 joined #nim |
07:08:12 | FromDiscord | <Rika> sometimes that json dot-operator idea can backfire, what if you have a proc with the same name as a key and a newbie didnt realize that? |
07:09:43 | opDispatch | you can start the chain from a special type, e.g prop = JSONChain(myJSONValue).a.b.unwrap(); |
07:10:04 | opDispatch | so that from the special type it's clear that solving is done in a special fashion |
07:11:26 | opDispatch | look at my stuff for that to get a better idea, https://gitlab.com/basile.b/iz/-/blob/master/import/iz/sugar.d#L2096 |
07:13:01 | * | Senketsu quit (Ping timeout: 272 seconds) |
07:13:32 | FromDiscord | <Rika> hmm, i think thats possible too in nim, but also possibly needs an experimental feature |
07:13:44 | opDispatch | AST macros maybe ? |
07:15:53 | FromDiscord | <Rika> dot operators |
07:15:55 | FromDiscord | <Rika> prolly |
07:16:07 | leorize | yea we do have dot operators |
07:16:26 | FromDiscord | <Rika> https://nim-lang.org/docs/manual_experimental.html#special-operators-dot-operators was right |
07:16:49 | opDispatch | are Nim operators tied to a struc/record or can they freestand ? |
07:17:11 | FromDiscord | <Rika> freestand? |
07:17:25 | opDispatch | i.e free functions at the global scope |
07:17:35 | opDispatch | VS member functions |
07:17:39 | leorize | nim don't have functions tied to a sobject |
07:17:40 | FromDiscord | <Elegant Beef> We have UFCS so they're the same |
07:17:41 | FromDiscord | <Rika> me dumb me no understand |
07:17:44 | FromDiscord | <Rika> oh |
07:17:45 | leorize | nim don't have member functions |
07:17:46 | FromDiscord | <Rika> that |
07:17:54 | FromDiscord | <Elegant Beef> They behave the same i should say |
07:18:19 | FromDiscord | <Elegant Beef> if left hand matches the first param it's passed in |
07:18:57 | opDispatch | sorry, I should have precised that I'm in the process of asking myself if I should dive in a new PL or not, so I know nothing of Nim ;) |
07:19:14 | FromDiscord | <Elegant Beef> Everyone here will say use nim 😛 |
07:19:52 | FromDiscord | <Rika> that is fine |
07:19:57 | FromDiscord | <Elegant Beef> D and nim share a lot i believe |
07:20:09 | leorize | you can ask @timotheecour |
07:20:13 | FromDiscord | <Rika> i should read into d too i guess it looks interesting to me |
07:21:37 | FromDiscord | <Elegant Beef> From my understanding is it's practically nim but with cleaner C syntax instead of python like 😄 |
07:21:59 | leorize | nah, it's very much different :P |
07:22:09 | FromDiscord | <Elegant Beef> Yea i've not looked into it |
07:23:06 | leorize | nim is much more flexible however |
07:23:53 | FromDiscord | <Rika> how? |
07:25:33 | leorize | iirc D doesn't distinguish between gc-ed mem and unmanaged |
07:26:48 | leorize | also we have, uh, proper ufcs :P |
07:26:57 | FromDiscord | <Rika> whats improper about theirs |
07:26:57 | FromDiscord | <Rika> lmao |
07:28:12 | leorize | https://github.com/timotheecour/D_vs_nim |
07:28:21 | leorize | according to this, no ufcs for locals? |
07:28:21 | FromDiscord | <Rika> 😮 nice thanks |
07:28:29 | leorize | the material is old though |
07:28:34 | leorize | take it with a grain of salt |
07:28:40 | FromDiscord | <Rika> > UFCS supported everywhere ↵this is a lie |
07:28:48 | FromDiscord | <Rika> i can tell one place where ufcs does not work |
07:29:01 | FromDiscord | <Rika> and that is `toSeq` and its compile-time brothers |
07:29:19 | opDispatch | actuall about D memory, the library i linked previously has a whole system of manual management. |
07:30:15 | opDispatch | but it's true that mixing manual and GC are a PITA and usually requires work or a specialized library |
07:30:21 | FromDiscord | <Rika> sounds like a pain |
07:31:47 | opDispatch | the problem is when you mix the two in an agreggate. Roots to GC stuff that are located in manually allocated aggregates must be manually declared to the GC otherwise it can abruptly free them |
07:32:37 | leorize | well that's definitely a pita |
07:32:57 | opDispatch | this problem is solved using deep static introspection of members and attributes |
07:34:17 | FromDiscord | <Rika> small question, it says nim has no raii |
07:34:22 | FromDiscord | <Rika> now it does, right? |
07:34:26 | FromDiscord | <Rika> i know the repo is ol |
07:34:27 | FromDiscord | <Rika> d |
07:34:35 | leorize | we don't have RAII |
07:34:51 | leorize | destructors is not RAII, mind you :P |
07:34:52 | alehander92 | oii |
07:35:03 | leorize | or is it? |
07:35:05 | leorize | not sure :P |
07:35:39 | * | leorize quit (Remote host closed the connection) |
07:35:39 | * | gxt__ quit (Write error: Connection reset by peer) |
07:35:39 | * | opal quit (Read error: Connection reset by peer) |
07:38:11 | * | opal joined #nim |
07:42:18 | * | gxt__ joined #nim |
07:43:52 | * | Trustable joined #nim |
07:45:12 | * | jwm224 quit (Ping timeout: 260 seconds) |
07:47:06 | * | jwm224 joined #nim |
07:47:49 | FromGitter | <gogolxdong> Can acyclic , cursor ,etc. pragma be removed with --gc:orc ? |
07:50:17 | * | opDispatch is now known as TypeNull |
07:51:24 | FromDiscord | <Rika> huh D has a lot of keywords |
07:52:49 | TypeNull | yeah, and many a reused so it could be worse |
07:53:34 | FromGitter | <gogolxdong> I mean these keywords are related to cycle reference, if I'm right, which is resolved by orc, so wondering whether these could be removed. |
07:53:46 | TypeNull | sadly it has no syntax to use them as identifier |
07:54:02 | FromDiscord | <Rika> ooh, new person? |
07:54:10 | FromDiscord | <Rika> hello owo |
07:54:25 | TypeNull | even FreePascal can dot this, e.g const &begin: integer; |
07:54:38 | FromDiscord | <Rika> @gogolxdong: i wasnt referring to you, |
07:54:40 | FromDiscord | <Rika> sorry* |
07:55:00 | FromDiscord | <Rika> https://github.com/nim-lang/RFCs/issues/34↵this looks interesting |
07:57:21 | TypeNull | no it doesnt |
07:57:49 | TypeNull | maybe the link that work does more ;) |
07:58:12 | TypeNull | https://github.com/nim-lang/RFCs/issues/34 |
07:58:29 | * | Vladar joined #nim |
07:58:57 | TypeNull | ah the autor is timothee. This guy is good, he has written his own D compiler a few years ago |
07:59:32 | TypeNull | mmmh maybe I mismatch him with someone else |
07:59:57 | FromDiscord | <Rika> it works on discord /shrug |
08:01:17 | TypeNull | yeah it's Timon Gehr that has written a D compiler not RFC34's author |
08:01:52 | * | leorize joined #nim |
08:02:10 | TypeNull | looks like the link contained a LF, just because "this" |
08:02:20 | TypeNull | *before |
08:02:23 | FromDiscord | <Rika> yeah, i added that |
08:03:13 | Araq | gogolxdong: that is true but .acyclic and .cursor help the ORC too |
08:03:32 | FromDiscord | <Rika> @willyboar smh |
08:03:42 | Araq | but you can leave them out and add them in after profiling shows it's worth it |
08:04:15 | FromDiscord | <willyboar> sorry can't resist |
08:05:37 | * | TypeNull left #nim ("Konversation terminated!") |
08:10:26 | FromGitter | <timotheecour> @araq I’m peering though sysstr.nim an I’m noticing realloc is not called in many (all) places, so you’re forcing a realloc for string/seq pessimistically; am I missing something? |
08:13:53 | Araq | I don't understand the question |
08:16:13 | Araq | maybe sysstr.nim is in worse shape than I remember it ;-) |
08:19:30 | FromGitter | <timotheecour> So the classic std::vector algorithm for resizing is to use realloc when capacity < newLen; but where when space < newLen, a new seq/string is created instead, whereas realloc MAY reuse same memory if OS has enough space past capacity |
08:21:13 | FromGitter | <timotheecour> @Rika ⏎ ⏎ > <FromDiscord>** <Rika> > UFCS supported everywhere ↵this is a lie ⏎ ⏎ instead of saying it’s a lie, send a PR next time please ;-) ? I’ve updated https://github.com/timotheecour/D_vs_nim/commit/4baa152fe75f70dd999b4b485194fca5b927b03c [https://gitter.im/nim-lang/Nim?at=5ec78b794c9b0f060d17e1c0] |
08:21:19 | Araq | I'm well aware of the algorithm and we try to do the same :-) |
08:22:31 | FromGitter | <timotheecour> for example here: `result = cast[PGenericSeq](newSeq(typ, r))` |
08:23:51 | * | neceve joined #nim |
08:24:54 | FromGitter | <xmonader> can someone help with that error? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec78c56ff7a920a7204abcd] |
08:25:29 | FromGitter | <xmonader> that's what im trying to do https://github.com/xmonader/nim-servy/commit/8dc04ed25a66990bd664da72c645166fe706c7a2 |
08:25:33 | * | liblq-dev joined #nim |
08:27:47 | leorize | you're trying to capture a mutable variable into a closure |
08:28:07 | leorize | that's forbidden, it's unsafe |
08:28:21 | leorize | not mutable variable but `var` reference |
08:28:29 | FromGitter | <xmonader> that used to work :( |
08:28:42 | FromGitter | <xmonader> even when i converted it to a proc, still didn't work.. |
08:29:12 | leorize | why are you writing closures instead of procs though? |
08:33:08 | leorize | I can see why this is unsafe when you put async in, but this should be safe without async |
08:33:12 | leorize | probably a bug |
08:33:25 | leorize | but you should write actual procs though |
08:33:37 | FromGitter | <xmonader> it sounded more intuitive as API, but I'm changing it to procs yet https://github.com/xmonader/nim-servy/commit/4fbe64d3f103145f2ed0c3aacf442448e83ca839 |
08:33:57 | FromGitter | <xmonader> @leorize yes, it worked without aysnc indeed |
08:34:10 | FromGitter | <xmonader> I'm changing all procs to async to unify with the websocket lib |
08:34:24 | leorize | please never do things like that :P |
08:34:31 | leorize | async is overhead piled on overhead |
08:34:38 | leorize | only use it when you need it |
08:35:07 | FromGitter | <xmonader> well, not sure i know the way around it in that case |
08:35:31 | FromGitter | <xmonader> I can try removing it again and see where I reach, but if a language feature I can'tuse as I expect it's shame :( |
08:35:55 | leorize | well it depends |
08:36:03 | leorize | if you want async io then ofc async is the way to go |
08:36:09 | leorize | but remember that everything has a cost |
08:37:10 | leorize | oh and nimcall can be passed as closure iirc |
08:37:53 | leorize | I'm not sure why your logger even need R/W access to the request and response though |
08:38:25 | leorize | and the design of these look like they need to be done synchronously |
08:38:34 | FromGitter | <xmonader> it's an example middleware |
08:38:43 | FromGitter | <xmonader> some of them will manipulate the request headers for instance |
08:39:05 | FromGitter | <xmonader> e.g cors middleware |
08:39:11 | leorize | ah, I see |
08:39:21 | leorize | if you want to pass mutable things into async stuff, use ref |
08:39:45 | FromGitter | <xmonader> and then addrof right? |
08:39:53 | FromGitter | <xmonader> let me quickly try that thank you |
08:40:02 | leorize | no, please no :P |
08:40:24 | leorize | it means making Request and friends `ref object` |
08:40:32 | leorize | this is the fundamental problem with async |
08:41:09 | leorize | since you are gonna swap context around, a `var` that you captured might no longer be there the next time your function resumes |
08:41:24 | leorize | this is why capturing `var` is unsafe |
08:41:43 | FromGitter | <xmonader> aha :( will try that ^_^ |
08:43:49 | skrylar[m] | hoi |
08:44:21 | Prestige | o/ |
08:56:18 | * | abm joined #nim |
09:05:09 | * | endragor quit (Remote host closed the connection) |
09:06:58 | * | letto_ joined #nim |
09:07:24 | FromGitter | <xmonader> @leorize it works only one problem I want also a function that generates handler objects e.g static middleware https://github.com/xmonader/nim-servy/blob/master_ws_mem/src/servy.nim#L887 ⏎ ⏎ problem is it returns a closure, ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=5ec7964c9da05a060a23aee7] |
09:08:00 | * | letto quit (Ping timeout: 272 seconds) |
09:11:54 | leorize | async and nimcall don't go together :P |
09:12:01 | leorize | you're tagging so much |
09:12:14 | leorize | don't tag unless you have to :P |
09:13:19 | leorize | change your proc types |
09:13:31 | leorize | just put closure in there and remove everything else |
09:15:42 | * | endragor joined #nim |
09:16:25 | FromGitter | <xmonader> hmm it's still expecting {.gcsafe, locks: <unknown>.}' after their removal |
09:16:46 | FromGitter | <xmonader> ```code paste, see link``` |
09:20:21 | FromGitter | <xmonader> also changing the signature to that ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec79955778fad0b131c0d57] |
09:23:57 | leorize | a rule of thumb, ignore {.locks.} |
09:24:04 | leorize | it's not used by any nim code in circulation |
09:24:26 | leorize | also remove `{.async.}` |
09:24:44 | leorize | `{.async.}` is a transformer, it has little to no meaning in a proc type |
09:25:08 | * | s4mu3lbk joined #nim |
09:25:09 | leorize | though we should just adjust the macro to generate the `{.closure.}` tag for proc types instead |
09:26:11 | * | s4mu3lbk quit (Remote host closed the connection) |
09:26:41 | * | s4mu3lbk joined #nim |
09:28:42 | FromGitter | <bung87> {.bycopy.}{.byref.} only annotation for type? |
09:29:58 | FromGitter | <timotheecour> {.Evalonce .} (need to update that PR) |
09:30:43 | leorize | bung87: unless you're interfacing with C, don't use it |
09:31:18 | FromGitter | <bung87> ok |
09:31:49 | FromGitter | <bung87> alaviss is you? |
09:33:23 | leorize | yea |
09:34:00 | FromGitter | <timotheecour> not sure how it relates to C btw |
09:34:10 | FromDiscord | <dom96> Why do people not just get consistent nicks? 😛 |
09:34:35 | skrylar[m] | i do that '_' |
09:34:54 | FromGitter | <bung87> about SQLITE_TRANSIENT ,SQLITE_STATIC , safety is first? then make it to SQLITE_TRANSIENT by default |
09:35:09 | * | dadada joined #nim |
09:35:20 | leorize | yea, though we should think if exposing the entire `bind` process is a good idea |
09:35:32 | * | dadada is now known as Guest91926 |
09:35:54 | leorize | timotheecour: `{.bycopy.}` and `{.byref.}` signify how a parameter will be passed |
09:36:09 | FromGitter | <bung87> ok,then I make it default. |
09:36:12 | leorize | it's only relevent when you're interfacing with C, since they have strict pass-by-value |
09:36:23 | leorize | relevant* |
09:36:27 | FromGitter | <timotheecour> no that’s not what this feature is about at all |
09:36:41 | FromGitter | <bung87> I can grab bind proccess from ormin :P |
09:37:04 | FromGitter | <xmonader> @leorize like that? https://gist.github.com/xmonader/305fa8172d689bfd73abf88bdb5dadb5 ⏎ because with that still getting ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec79d407da67d06fac47848] |
09:37:05 | leorize | timotheecour: ? |
09:38:08 | FromGitter | <timotheecour> oh lol, nevermind, i misread :-) sorry! |
09:38:45 | FromDiscord | <Zed> has anybody tried getting audio input with nim? like with a microphone? |
09:38:47 | leorize | xmonader: line info please? :P |
09:39:15 | leorize | @Zed: I don't think we have a general purpose audio library |
09:39:23 | leorize | I might be wrong though |
09:39:54 | FromDiscord | <Zed> There's a couple on nimble but they seem very unstable and unfinished |
09:40:03 | FromGitter | <xmonader> ... /home/xmonader/wspace/nim-servy/src/servy.nim(1045, 77) Error: type mismatch: got <proc (request: Request, response: Response): Future[system.bool]{.closure.}> but expected 'proc (request: Request, response: Response): Future[system.bool]{.gcsafe, locks: <unknown>.}' ⏎ I pushed my local changes https://github.com/xmonader/nim-servy/blob/master_ws_mem/src/servy.nim |
09:40:26 | FromDiscord | <flywind> sent a code paste, see http://ix.io/2mXW |
09:40:35 | skrylar[m] | audio library is .. well |
09:40:45 | skrylar[m] | playback or editing really |
09:42:20 | leorize | @xmonader: add `{.closure.}` to these: https://github.com/xmonader/nim-servy/blob/master_ws_mem/src/servy.nim#L410-L411 |
09:44:04 | * | liblq-devel joined #nim |
09:44:18 | * | lqdev joined #nim |
09:44:29 | * | lqdev quit (Client Quit) |
09:44:29 | * | liblq-devel quit (Client Quit) |
09:47:22 | FromGitter | <xmonader> @leorize sadly the same error, it only starts when i remove the middlewares ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec79faab101510b200d99e7] |
09:49:01 | FromGitter | <xflywind> ```type MiddlewareFunc* = proc(req: Request, res: Response): Future[bool] {.closure, gcsafe.}``` |
09:52:04 | FromGitter | <bung87> I may unify all db_* api so that I can introduce new bind proccess api.. |
09:53:01 | * | couven92 joined #nim |
09:53:08 | FromGitter | <bung87> for now apis seems fine that sqlite have. |
09:53:26 | * | fredrikhr quit (Disconnected by services) |
09:53:30 | * | couven92 is now known as fredrikhr |
10:01:52 | FromGitter | <xmonader> @xflywind still the same ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec7a310778fad0b131c2350] |
10:02:14 | FromGitter | <xmonader> I even tried adding gcsafe to basicAuth, newStaticMiddleware functions too, but no good |
10:02:48 | * | couven92 joined #nim |
10:06:42 | FromGitter | <xflywind> Middlewares is seq of closure function. It can't accept nimcall function unless your first item is closure function. |
10:07:40 | FromGitter | <xmonader> @xflywind what!!? it worked btw |
10:07:53 | FromGitter | <xmonader> but .. what?? |
10:07:56 | alehander92 | thmm |
10:07:59 | FromGitter | <xflywind> [doNothingClosureMiddleware(), loggingMiddleware, , ...., ] |
10:08:02 | FromDiscord | <dom96> sounds like this could use a better error message |
10:09:10 | FromGitter | <xmonader> @xflywind i changed the order to one of the closure ones, but that's totally unexpected .. how would people even know that limitation? |
10:09:46 | FromGitter | <xflywind> @xmonader I don't know why, I just failed many times to get the right result. :-) |
10:09:51 | FromGitter | <xmonader> and the way i see it the whole nimcall, closure, locks, gcsafe is completely deceiving without good defaults too |
10:10:02 | FromGitter | <xmonader> > @xmonader I don't know why, I just failed many times to get the right result. :-) ⏎ ⏎ Hahahaha! thanks for doing the hard work! |
10:10:31 | FromGitter | <xflywind> np |
10:10:39 | FromDiscord | <dom96> Please report this as a bug, people shouldn't waste so much time diagnosing type mismatches like this |
10:11:15 | FromGitter | <xmonader> I will, creating a bug report already with the diffs too thanks |
10:11:43 | FromGitter | <xmonader> or post in the forum? |
10:11:44 | FromDiscord | <mratsim> closures and callbacks semcheck are super super annoying |
10:11:45 | * | konvertex joined #nim |
10:12:20 | FromDiscord | <mratsim> I hate having to put {.nimcall.}{.locks:0.} {.gcsafe.} and friends to please the Nim compiler |
10:12:52 | FromDiscord | <dom96> agreed |
10:13:03 | FromDiscord | <dom96> The rules should be fixed IMO |
10:15:18 | * | rockcavera joined #nim |
10:19:02 | FromGitter | <bung87> @leorize I'll take a break for this PR, though seems fine so far. |
10:19:31 | skrylar[m] | make a macro for {.mratcall.} :p |
10:19:53 | * | Vladar quit (Quit: Leaving) |
10:23:19 | * | a_b_m joined #nim |
10:25:51 | * | abm quit (Ping timeout: 260 seconds) |
10:34:54 | * | dddddd joined #nim |
10:35:37 | FromGitter | <xmonader> I opened a bug https://github.com/nim-lang/Nim/issues/14429 will reference it in the forum issue for concurrency/parallism too |
10:39:03 | * | narimiran quit (Quit: leaving) |
10:42:43 | * | brainbomb quit (Quit: Leaving.) |
10:43:21 | Araq | so... everybody happy with the dots? |
10:44:39 | dom96 | the dots? |
10:47:15 | solitudesf | i just disabled the hint. before it was at least marginally useful, now its just noise. |
11:00:41 | * | vegai quit (Remote host closed the connection) |
11:01:20 | alehander92 | which hint |
11:01:53 | alehander92 | wow processing |
11:04:02 | FromGitter | <xmonader> very cool just did some websocket interaction over nim-servy with treeform/ws library :D |
11:04:17 | alehander92 | wow this is new |
11:04:21 | alehander92 | ok it sounds good |
11:04:31 | alehander92 | but its a bit strange that i can still see CC: there |
11:04:33 | alehander92 | by default |
11:05:22 | alehander92 | also `verbosity:0` now still shows `...` |
11:05:37 | alehander92 | which reminds me : i could've just used `verbosity:0` until now |
11:15:01 | * | tane joined #nim |
11:37:41 | * | endragor quit (Remote host closed the connection) |
11:54:29 | * | endragor joined #nim |
12:01:23 | * | fredg joined #nim |
12:01:50 | FromDiscord | <Yardanico> Yeah I like the dots but why they're only for Nim processing and not for CC as alehander mentioned? |
12:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:07 | * | Guest91926 quit (Ping timeout: 246 seconds) |
12:06:41 | * | supakeen joined #nim |
12:07:38 | FromDiscord | <dom96> can someone show an example of the dots? |
12:13:02 | * | dadada joined #nim |
12:13:25 | * | dadada is now known as Guest11303 |
12:13:57 | FromDiscord | <Yardanico> https://camo.githubusercontent.com/3422d046a2f6474930674c078f6bd6ec5034c18f/68747470733a2f2f692e696d6775722e636f6d2f7665667a33336e2e706e67 from my message about a small bug (no newline) |
12:16:05 | * | opDispatch joined #nim |
12:16:59 | opDispatch | BTW related to a previous conversation, related to UFCS or dot operator, isn't it a problem when you have pipelines on several lines in NIM ? |
12:17:17 | * | waleee-cl joined #nim |
12:17:24 | FromDiscord | <Yardanico> It's not really a problem |
12:19:00 | opDispatch | yeah really stuff like https://dpaste.org/4hdF |
12:19:38 | opDispatch | you can do it on several lines too ? |
12:21:03 | FromDiscord | <mratsim> @Araq can we have dinosaur game while waiting for compilation too? 😛 |
12:22:47 | FromDiscord | <Yardanico> @opDispatch yes that works just fine |
12:22:50 | FromDiscord | <Yardanico> https://play.nim-lang.org/#ix=2mYu |
12:23:36 | FromDiscord | <Yardanico> And please don't call Nim "NIM", I'm really not sure why some people like to use it in uppercase |
12:26:24 | opDispatch | mmh that does not work |
12:26:31 | Guest11303 | can custom pragmas be attached to templates, doesn't seem to work for me |
12:26:48 | * | Guest11303 is now known as dadada |
12:27:10 | opDispatch | the "hi" is missing, which I find quite malpolite |
12:27:17 | FromDiscord | <Clyybber> Guest11303: No |
12:27:24 | FromDiscord | <Clyybber> But it might be lifted in the future |
12:27:30 | dadada | opDispatch: hi |
12:28:35 | dadada | opDispatch: I'm lurking here almost every day in the last time, so this makes it seem to me like I'm never really away from the chat, sorry, if that offends you |
12:29:22 | dadada | Clyybber: ah, I hope so, I want Nim's features to be consistent |
12:30:10 | opDispatch | ok I think I've reached the bit |
12:30:15 | opDispatch | bot* |
12:31:05 | opDispatch | well anyway I think that in the example the idea would be to concatenate |
12:31:15 | opDispatch | this is not done obiously |
12:32:59 | Yardanico | opDispatch: ? it's quite easy |
12:33:15 | Yardanico | https://play.nim-lang.org/#ix=2mYx |
12:33:27 | Yardanico | you can check that it works on the playground just fine |
12:34:27 | Yardanico | "mmh that does not work" can you show a concrete example? |
12:34:49 | opDispatch | ok got it to work bag of perverts https://play.nim-lang.org/#ix=2mYy |
12:34:57 | Yardanico | ??? |
12:36:16 | opDispatch | Yardanico, the first example that was given to me didn't work at all |
12:36:27 | Yardanico | https://play.nim-lang.org/#ix=2mYu works just fine |
12:36:50 | opDispatch | no it just outputs "worl" |
12:36:53 | Yardanico | so? |
12:36:59 | opDispatch | *"world" |
12:37:03 | Yardanico | I just showed that you can span dot operator over multiple lines |
12:37:10 | Yardanico | if you check the proc definitions you can see that they don't concat |
12:37:13 | Yardanico | they just return a new string |
12:37:22 | Yardanico | it's just a simple exampl which is trivial to modify |
12:38:46 | Yardanico | although it won't really be efficient |
12:38:56 | Yardanico | well maybe it will be with arc, idk |
12:39:53 | opDispatch | the point is that I asked about pipeline and the first answer I get was not a really pipeline, it just output the last pipeline result you see. But yeah I agree it was easy to make it better |
12:40:08 | Yardanico | well I just showed that you can span . over multiple lines |
12:41:25 | opDispatch | but that didn't show a frank relationship between each statement |
12:41:37 | Yardanico | well it's really simple |
12:41:44 | opDispatch | between each line, rather |
12:41:48 | Yardanico | a().b().c() b accepts the return value of a |
12:41:51 | Yardanico | c accepts the return value of b |
12:42:36 | opDispatch | cant you just accept that your first example was bad goddmanit |
12:43:00 | Yardanico | no because it wasn't :P i mean it wasn't exactly what you asked for, but it perfectly showed how can you do multiline chaining of calls |
12:44:24 | * | audiofile joined #nim |
12:44:50 | opDispatch | alright |
12:44:55 | * | opDispatch left #nim ("Konversation terminated!") |
12:45:02 | Yardanico | :/ |
12:51:13 | * | dadada quit (Ping timeout: 264 seconds) |
12:52:55 | * | dadada joined #nim |
12:53:18 | * | dadada is now known as Guest31184 |
12:59:56 | * | xet7 quit (Remote host closed the connection) |
13:02:02 | FromGitter | <xmonader> websocket support in servy :) https://github.com/xmonader/nim-servy#websockets |
13:05:58 | * | xet7 joined #nim |
13:07:19 | * | D_ quit (Ping timeout: 244 seconds) |
13:13:08 | * | D_ joined #nim |
13:13:55 | FromDiscord | <Rika> jesus this op dude is rude 😛 |
13:15:41 | * | Vladar joined #nim |
13:15:58 | FromDiscord | <Rika> i dont even know what the difference of his example and yard's |
13:21:05 | * | xet7 quit (Quit: Leaving) |
13:22:54 | * | dcmertens joined #nim |
13:23:41 | dcmertens | Just finished Chapter 3 of Nim in Action. It seems odd that there is no way to do non-blocking reads from stdin |
13:23:49 | dcmertens | couldn't this be achieved with a select()? |
13:24:01 | Yardanico | dcmertens: it might be possible with https://nim-lang.org/docs/asyncfile.html nowadays |
13:24:18 | dcmertens | Yardanico, thanks |
13:24:19 | Yardanico | you just do create AsyncFD(0) for stdin and read asynchronously I guess |
13:25:46 | dcmertens | cool. I'm glad to know about threaded programming, but it seemed odd that it was *required* for this |
13:26:21 | Yardanico | don't worry, nim in action talks about threading later |
13:35:50 | alehander92 | dcmertens i think its a property |
13:35:56 | alehander92 | of many os-es overally |
13:36:00 | alehander92 | i tried once |
13:36:10 | * | lain quit (Remote host closed the connection) |
13:37:09 | dcmertens | oh yeah, on Windows, select() only works on sockets, not on files |
13:38:20 | alehander92 | and i read https://stackoverflow.com/questions/717572/how-do-you-do-non-blocking-console-i-o-on-linux-in-c |
13:38:23 | alehander92 | so i used |
13:38:36 | * | lain joined #nim |
13:38:49 | alehander92 | something from some status-im code and extracted it to a small module |
13:39:21 | alehander92 | http://ix.io/2mYW |
13:41:00 | alehander92 | this particular example might not make a lot of sense if one doesnt use nim-prompt |
13:41:20 | alehander92 | and asynctools though |
13:41:59 | alehander92 | but anyway, it should be somehow similar for one to use threads to read from stdin |
13:42:41 | dcmertens | cool. Thanks! |
13:42:49 | alehander92 | and it it possible to write an abstraction which makes it easier |
13:43:07 | alehander92 | but maybe one needs to add that to a cleaner lib solution |
13:44:40 | alehander92 | reading more : it might be actually possible |
13:45:07 | alehander92 | but obviously i am not an expert in this .. so just one needs to research more :D |
13:49:20 | * | brainbomb joined #nim |
13:49:45 | * | zacharycarter joined #nim |
13:56:33 | * | s4mu3lbk quit (Ping timeout: 258 seconds) |
14:03:49 | * | fredrikhr quit (Ping timeout: 264 seconds) |
14:04:25 | * | endragor quit (Remote host closed the connection) |
14:04:31 | FromDiscord | <mratsim> @dcmertens, it's not possible in any language, you need an extra thread that you can block |
14:05:16 | FromDiscord | <mratsim> it's not too hard to add, see https://github.com/mratsim/weave/issues/137 |
14:05:18 | disbot | ➥ Dedicated threadpool for blocking tasks |
14:05:26 | * | fredrikhr joined #nim |
14:09:36 | FromDiscord | <dom96> amazing how much the NimCopy's in JS can affect performance |
14:09:49 | FromDiscord | <dom96> Went from 4k ops/s to 800million ops/s |
14:11:29 | FromDiscord | <dom96> https://github.com/nim-lang/Nim/issues/14430 |
14:11:33 | disbot | ➥ JS: Unnecessary NimCopy when assigning tuples ; snippet at 12https://play.nim-lang.org/#ix=2mZ2 |
14:18:52 | leorize | I suppose we need sink optimization in js land |
14:19:00 | Yardanico | @dom96 did you try with latest devel? just to make sure |
14:19:07 | Yardanico | there was a PR which did some js improvements |
14:20:21 | Yardanico | https://github.com/nim-lang/Nim/pulls?q=is%3Apr+is%3Aclosed+author%3Ahlaaftana |
14:20:36 | Yardanico | https://github.com/nim-lang/Nim/pull/14158 |
14:20:38 | disbot | ➥ many bugfixes for js |
14:21:47 | Yardanico | I guess I can try myself |
14:22:18 | leorize | http://ix.io/2mZ5 <- not sure if this is a good sample |
14:22:50 | FromDiscord | <dom96> I can try later, but right now focused on other things |
14:23:09 | FromDiscord | <dom96> > http://ix.io/2mZ5 <- not sure if this is a good sample↵@leorize[IRC]#0000 yeah, that should work |
14:23:42 | leorize | though I do think that tuple construction can be done better for these cases |
14:24:37 | Yardanico | wait did someone break js backend in devel |
14:24:53 | Yardanico | or my local copy is broken :D |
14:25:13 | Yardanico | ah nvm had threads:on in a config |
14:25:21 | leorize | Yardanico: your bot also didn't manage to highlight me :P |
14:25:28 | Yardanico | wdym? |
14:25:50 | leorize | see dom ping |
14:26:03 | leorize | it uses discord notation |
14:26:05 | Yardanico | yeah, but usually your IRC client should check if your nickname is in a substring |
14:26:10 | Yardanico | leorize: well that's discord's feature |
14:26:22 | Yardanico | I mean I can try to replace that in the bot but still |
14:26:40 | leorize | weechat limits the amount of context where highlight would be checked afaik :P |
14:26:43 | Yardanico | leorize: your code generates this for JS btw - https://play.nim-lang.org/#ix=2mZ6 |
14:27:12 | Yardanico | on latest devel |
14:27:12 | leorize | yea, just have to test on older nim :P |
14:27:25 | Yardanico | lemme try on 1.0.6 |
14:27:28 | leorize | still this is not too efficient |
14:28:09 | leorize | maybe one day we will see optimization for these cases |
14:32:26 | Yardanico | @dom96 this is what I get for js backend on latestl devel (for geometry.nim) http://ix.io/2mZa/js |
14:32:47 | Yardanico | ah right need to check before your last commit |
14:33:11 | FromDiscord | <dom96> pretty sure you need to use that `intersect` otherwise it won't be compiled in |
14:33:25 | Yardanico | oh I thought you had tests for in in geometry.nim :P |
14:33:29 | Yardanico | I'll add some call now |
14:33:32 | FromDiscord | <dom96> I do for some |
14:33:39 | FromDiscord | <dom96> not this one I guess 😛 |
14:34:59 | Yardanico | you do though :D |
14:35:10 | alehander92 | dom96 wow yeah nim does a lot of nimCopy |
14:35:19 | Yardanico | proc intersect*[T](line1, line2: LineSegment[T], epsilon = 0.001): bool = calls the one with var point |
14:36:47 | Yardanico | ah yeah it got compiled now |
14:36:51 | Yardanico | and no there are no nimcopy in it :) |
14:36:58 | Yardanico | lemme show |
14:37:16 | Yardanico | https://play.nim-lang.org/#ix=2mZc |
14:37:51 | FromDiscord | <dom96> Cool, then we can close that issue |
14:37:56 | FromDiscord | <dom96> I should benchmark my game with devel it seems |
14:38:13 | alehander92 | you even commented |
14:38:15 | alehander92 | :D :D :D |
14:38:16 | Yardanico | well your change still makes the codegen a bit better |
14:38:20 | alehander92 | the PR |
14:38:36 | Yardanico | @dom96 after your commit - https://play.nim-lang.org/#ix=2mZd |
14:38:43 | FromDiscord | <dom96> true |
14:38:45 | * | theelous3_ quit (Quit: is outty) |
14:38:55 | FromDiscord | <dom96> it's a little crazy how slow nimcopy is |
14:39:00 | FromDiscord | <dom96> I wonder if there is space to optimise it |
14:39:11 | alehander92 | isn't it just many repetitions of nimCopy |
14:40:00 | FromDiscord | <dom96> Don't think so |
14:41:36 | Yardanico | @dom96 one thing is that I had to add two more imports from lenientops to graphics.nim |
14:41:38 | Yardanico | from lenientops import `/`, `+`, `-` |
14:42:34 | Yardanico | in simple.nim I had to dereference events before echoing them |
14:43:05 | FromDiscord | <dom96> looks like I will be chasing nimcopy for a while |
14:43:19 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713401611556356168/unknown.png |
14:43:45 | leorize | try nim 1.2? |
14:43:54 | FromDiscord | <dom96> yeah, I will |
14:45:25 | FromDiscord | <dom96> Looks like I did eliminate that bottleneck at least though |
14:45:40 | FromDiscord | <dom96> collision detection no longer shows up in the profiler |
14:45:49 | FromDiscord | <dom96> it's just mostly eatCollidedParticles now |
14:47:31 | FromDiscord | <dom96> lol, those dots. |
14:47:41 | Yardanico | :D |
14:48:01 | FromDiscord | <dom96> next step: in-place replacement of the module that's currently being compiled? |
14:48:08 | FromDiscord | <dom96> with a emoji hourglass? |
14:48:17 | Yardanico | why not just use something like https://github.com/Yardanico/spinny/ then :D (my fork, the upstream still didn't merge the PR) |
14:48:26 | alehander92 | wow good idea! |
14:48:48 | alehander92 | very flashy :D |
14:49:08 | Yardanico | (and I made the fork because I was too annoyed by the fact that this lib used JSON for spinners definitions and parsed them at runtime) |
14:49:54 | Yardanico | at least I found one more arc bug when working on it |
14:50:10 | FromDiscord | <dom96> 1231 vs 1031 NimCopy (1.0.6 vs. 1.3.5) |
14:50:19 | Yardanico | what about performance :D |
14:50:54 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713403523764584508/unknown.png |
14:50:56 | FromDiscord | <dom96> lol |
14:51:00 | Yardanico | lol |
14:51:00 | FromDiscord | <dom96> It generates broken JS |
14:51:08 | Yardanico | a regression yay |
14:51:22 | Yardanico | maybe due to https://github.com/nim-lang/Nim/pull/14158 |
14:51:24 | disbot | ➥ many bugfixes for js |
14:51:30 | FromDiscord | <dom96> My instinct to avoid devel has been proven right 😛 |
14:51:51 | leorize | go 1.2 lol |
14:52:02 | Yardanico | I think it'll mostly have the same amount of NimCopy |
14:52:04 | Yardanico | i can be wrong though |
14:53:34 | FromDiscord | <dom96> ugh, my choosenim is broken D: |
14:54:48 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713404502677651476/unknown.png |
14:54:53 | FromDiscord | <dom96> Greatest error ever |
14:55:16 | Yardanico | hmm |
14:55:23 | Yardanico | did you rebuild nimble when going to devel? |
14:55:41 | FromDiscord | <dom96> nope |
14:55:58 | FromDiscord | <dom96> pretty annoying that shit like this can happen |
14:56:09 | Yardanico | that error can be due to https://github.com/nim-lang/Nim/pull/14390 if you didn't update nimble I gues |
14:56:10 | Yardanico | s |
14:56:11 | disbot | ➥ fixes #14126 [backport:1.2] |
14:56:13 | Yardanico | not exactly sure though |
14:56:44 | FromDiscord | <dom96> yay, I'm sure many will run into this |
14:57:00 | disruptek | ~stream |
14:57:00 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
14:57:09 | disruptek | returning to async i/o on linux. |
14:58:58 | alehander92 | oii |
15:00:22 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713405903235448913/unknown.png |
15:00:23 | FromDiscord | <dom96> really? |
15:00:33 | FromDiscord | <dom96> choosenim now depends on `make`? |
15:01:29 | Yardanico | nimterop be like |
15:01:36 | Yardanico | well it's compiling bzip2 |
15:03:52 | FromDiscord | <dom96> No Nim package should depend on `make` |
15:04:01 | FromDiscord | <dom96> This goes against the whole philosophy of Nim |
15:04:13 | Yardanico | 4raq wasn't happy with nimterop either ;P |
15:04:17 | Yardanico | isn't* |
15:04:29 | FromDiscord | <dom96> I know |
15:04:45 | shashlick | What's the problem with make |
15:04:54 | FromDiscord | <dom96> The problem is I don't have it |
15:04:57 | FromDiscord | <dom96> and I don't want to install it |
15:05:07 | FromDiscord | <dom96> I just want to quickly get into choosenim and fix a bug |
15:05:16 | FromDiscord | <dom96> But now I have to deal with dozens of dependencies |
15:08:47 | FromDiscord | <dom96> I gave it a try |
15:08:55 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713408058931281920/unknown.png |
15:09:12 | FromDiscord | <dom96> maybe the `make` I downloaded is wrong |
15:15:47 | FromDiscord | <dom96> shashlick: any ideas? |
15:16:05 | shashlick | You just need make |
15:16:28 | shashlick | Or you can install bzip2 with headers |
15:16:28 | FromDiscord | <dom96> yes, I downloaded http://gnuwin32.sourceforge.net/packages/make.htm and it gave me that error |
15:17:03 | shashlick | You on windows? |
15:17:07 | FromDiscord | <dom96> yes |
15:17:19 | shashlick | With mingw? Doesn't that come with make? |
15:17:47 | FromDiscord | <dom96> doesn't look like it |
15:18:05 | FromDiscord | <dom96> I'm looking in ~\.choosenim\toolchains\mingw64\bin and it's not there |
15:18:42 | shashlick | There should be a mingw32-make which should get used instead |
15:19:17 | FromDiscord | <dom96> yeah, it's there |
15:19:36 | FromDiscord | <dom96> it doesn't get added to path by choosenim |
15:19:38 | shashlick | After downloading make like you did and added to path, did it give a different error? |
15:20:10 | FromDiscord | <dom96> https://media.discordapp.net/attachments/371759389889003532/713410887888928788/unknown.png |
15:20:17 | FromDiscord | <dom96> that's with mingw32-make |
15:22:08 | shashlick | timothee reported that too |
15:22:24 | shashlick | I need to see how to reproduce it |
15:22:37 | shashlick | I cannot so far |
15:22:56 | FromDiscord | <dom96> Unfortunately this is the risk with dependencies |
15:23:06 | shashlick | Even last night I got it working across a large matrix |
15:23:15 | shashlick | Larger than our CI |
15:23:25 | FromDiscord | <dom96> The more you've got the higher the chance of problems for people with different configurations |
15:23:29 | shashlick | Well you cannot be independent either |
15:26:10 | shashlick | So the bzip2 makefile sets CC=cc |
15:26:24 | shashlick | So seeing CC=gcc should fix that |
15:26:29 | shashlick | But I've never had to do it |
15:26:49 | shashlick | Does cc.exe not exist or not in the path again? |
15:27:02 | shashlick | This might explain the variability |
15:28:30 | FromDiscord | <dom96> Anyway, I was able to diagnose the problem I had: https://github.com/dom96/choosenim/issues/199 |
15:28:33 | disbot | ➥ Nimarchive cannot overwrite existing extraction? ; snippet at 12https://play.nim-lang.org/#ix=2mZw |
15:29:24 | FromDiscord | <dom96> which tbh in this scenario I wouldn't want choosenim to overwrite these DLLs |
15:30:49 | * | dddddd quit (Ping timeout: 264 seconds) |
15:30:58 | FromDiscord | <dom96> crazy how just me renaming a DLL caused choosenim to break |
15:31:33 | dcmertens | hahaha |
15:31:42 | dcmertens | you renamed a DLL and expected things to work?? |
15:33:41 | FromDiscord | <dom96> Umm. It's not a DLL that choosenim depends on at runtime |
15:33:58 | dcmertens | :-) |
15:34:03 | dcmertens | I'm just giving you a hard time |
15:34:06 | * | WasmAddict joined #nim |
15:34:27 | FromDiscord | <dom96> Anyway, 1.2.0 actually regresses my game to 4fps in Firefox |
15:34:28 | FromDiscord | <dom96> fun |
15:34:51 | WasmAddict | Hey all, has there been any updates in the support of web assembly? I always find myself searching around on google about nim and wasm support and end up in vague echoes of people talking about it on the internet. |
15:35:45 | FromDiscord | <dom96> I did an experiment and concluded that WebAsm is a waste of time |
15:35:55 | FromDiscord | <dom96> Nim's JS backend is all you need |
15:36:11 | WasmAddict | Waste of time for "what"? |
15:36:17 | WasmAddict | FYI, i'm not talking about emscripten, just basic wasm |
15:36:27 | * | dcmertens notes the name of the person who is talking |
15:37:15 | FromDiscord | <dom96> Why do you want wasm support in Nim? |
15:37:48 | WasmAddict | So I can do incredibly fast math in a web browser using Nim |
15:38:20 | FromDiscord | <dom96> have you benchmarked webasm vs js for the math you want to do? |
15:38:31 | WasmAddict | you do realize webasm is dead, yes? |
15:39:10 | FromDiscord | <dom96> Hrm? |
15:39:18 | WasmAddict | sorry, my brain read that as asm.js |
15:39:37 | WasmAddict | I feel like you are attacking my potential use case |
15:39:50 | WasmAddict | Yes, I can imagine a use case javascript sucks at math compared to web assembly |
15:40:17 | WasmAddict | I'll go with ... i'm writing a zip library |
15:40:37 | shashlick | dom96 - why is it doing the dlls again - it should be checking for the condition |
15:40:53 | FromDiscord | <dom96> shashlick: because it checks whether all DLLs are there |
15:40:55 | shashlick | dom96 - was i right about the bzip2 thing |
15:41:10 | FromDiscord | <dom96> shashlick: I gave up trying to fix it |
15:41:33 | shashlick | okay i'll experiment with a choosenim specific mingw - i always use the global install |
15:41:55 | * | WasmAddict quit (Remote host closed the connection) |
15:41:56 | shashlick | are you good with the two open PRs? i'll fix these two |
15:42:13 | Yardanico | sad that WasmAddict left |
15:42:20 | Yardanico | I wanted to say that you can already use clang's wasm-32 backend with nim |
15:46:01 | FromDiscord | <dom96> hm, can't repro the slowdown from 1.2.0 now |
15:46:12 | FromDiscord | <dom96> In any case, not seeing significant speed up. |
15:46:28 | FromDiscord | <dom96> at least it works though |
15:46:58 | shashlick | dom96: are you good with the two open choosenim PRs |
15:47:09 | FromDiscord | <dom96> What do you mean? |
15:47:15 | FromDiscord | <dom96> Why wouldn't I be? |
15:47:22 | shashlick | can we merge then :D |
15:47:40 | FromDiscord | <dom96> oh, you mean do I like the two PRs that are there |
15:47:45 | FromDiscord | <dom96> I haven't reviewed them I guess |
15:47:54 | shashlick | very small, should take 2 minutes |
15:54:46 | FromDiscord | <dom96> done |
15:56:29 | shashlick | Cool, will fix the other two issues |
15:59:24 | * | s4mu3lbk joined #nim |
16:06:28 | FromDiscord | <IanIAnIAN> About the conference; is there a list of talks we can expect to see ? |
16:08:19 | Yardanico | well it will be there, yes |
16:08:22 | Yardanico | submission deadline is 31th |
16:08:28 | Yardanico | of May |
16:09:19 | FromDiscord | <IanIAnIAN> 31st of May 🙂 he told the bot |
16:18:59 | dcmertens | Rather than simply ask, I decided to try to test nim's capacity for closures |
16:19:06 | dcmertens | Alas, I am running into compiler errors |
16:19:31 | dcmertens | I am trying to return a tuple of three procedures that take void an return ints |
16:19:52 | Yardanico | dcmertens: "take void" that's not really a thing |
16:19:53 | dcmertens | then I am attempting to construct each anonymous function and store it in a variable |
16:20:00 | Yardanico | or you mean proc (): int |
16:20:07 | dcmertens | ^^ yes |
16:20:17 | Yardanico | can you show ,more code please? :) |
16:20:42 | dcmertens | sure. Is there a preferred paste bin? |
16:20:58 | Yardanico | play.nim-lang.org |
16:21:03 | leorize | ~playground |
16:21:04 | disbot | playground: 11an online in-the-browser IDE for simple Nim experiments at http://argentina-ni.ml/ |
16:21:04 | disbot | playground: 11https://play.nim-lang.org the official Nim playground, can run Nim in the browser and share snippets |
16:21:05 | Yardanico | (it uses ix.io for pastes) |
16:21:58 | dcmertens | https://play.nim-lang.org/#ix=2mZT |
16:22:25 | Yardanico | well, I think sugar doesn't support void really |
16:22:36 | dcmertens | haha, well that wouldn't help, then |
16:22:42 | Yardanico | dcmertens: but your code can work |
16:22:53 | dcmertens | cool |
16:23:32 | Yardanico | lemme see |
16:24:52 | Yardanico | and I don't think you can capture var arguments in closures anyway |
16:25:08 | * | brainbomb quit (Quit: Leaving.) |
16:25:16 | leorize | yea you can't atm |
16:25:26 | leorize | once analysis gets better it will be safer to do so |
16:25:28 | dcmertens | And here is the error stating as much: "'i' is of type <var int> which cannot be captured as it would violate memory safety" |
16:25:31 | Yardanico | yep |
16:25:35 | Yardanico | you can't capture var arguments in closures |
16:26:00 | dcmertens | ok, I was just being lazy |
16:26:45 | dcmertens | Here's the revised version, and it works: https://play.nim-lang.org/#ix=2mZW |
16:27:27 | dcmertens | well, apart from the spurious variables v1 and v2 |
16:27:46 | dcmertens | How does nim do this? Does it use a trampoline provided by FFI? |
16:28:07 | dcmertens | That is, would the closures be valid for passing to a C function that wants a function pointer? |
16:28:22 | Yardanico | closure is a function with a hidden env pointer |
16:28:33 | dcmertens | put differently, how do I view the C code this produces? |
16:28:44 | * | dcmertens looks up nim -h |
16:29:18 | Yardanico | dcmertens: on *nix it's in ~/.cache/nim/filename_(d|r)/files |
16:29:25 | Yardanico | d for debug r for release (-d:release or -d:danger) |
16:29:36 | Yardanico | I wouldn't recommend you to read C code without compiling with -d:danger :) |
16:29:54 | dcmertens | thanks |
16:29:57 | leorize | use --nimcache and specify the location yourself |
16:30:04 | * | liblq-dev quit (Ping timeout: 272 seconds) |
16:30:05 | leorize | better than digging the system temp folder |
16:30:47 | Yardanico | well ~/.cache/nim is in user's home folder :) |
16:35:46 | * | Guest31184 quit (Ping timeout: 272 seconds) |
16:36:39 | FromGitter | <bung87> cant't call macro from template? |
16:36:51 | Yardanico | you can, depends on what you mean by "call" |
16:37:22 | FromGitter | <bung87> the editor hint :`undeclared identifier:` |
16:39:05 | Yardanico | well if you "call" a macro from a template in one module |
16:39:10 | Yardanico | and then call a template from another |
16:39:16 | Yardanico | then you need to bind the macro in the template |
16:39:20 | Yardanico | like "bind macroName" |
16:39:26 | Yardanico | in the template |
16:39:39 | Yardanico | https://nim-lang.org/docs/manual.html#generics-bind-statement |
16:40:18 | * | fredrikhr quit (Quit: Client Disconnecting) |
16:40:25 | FromGitter | <bung87> same.. |
16:40:30 | Yardanico | show more code please? |
16:40:51 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ec800924c9b0f060d19150d] |
16:41:13 | FromGitter | <bung87> other thing is I may not able call it under if statement. |
16:41:18 | Yardanico | why did you make it a template though? |
16:41:36 | FromGitter | <bung87> simple to write : ( |
16:42:08 | * | dadada joined #nim |
16:42:31 | * | dadada is now known as Guest43983 |
16:42:59 | FromGitter | <bung87> ok I change to macro |
16:45:16 | * | couven92 quit (Read error: Connection reset by peer) |
16:45:17 | leorize | you don't really need to do the `if` |
16:45:22 | * | fredrikhr joined #nim |
16:45:27 | leorize | for the args length check |
16:45:29 | Yardanico | ah lol I didn't see yeah |
16:45:36 | Yardanico | @bung87 templates are just code substitution |
16:46:02 | leorize | you might want to store the SqlPrepared in a temporary variable though |
16:46:11 | * | couven92 joined #nim |
16:46:21 | Yardanico | oh yeah, double evaluation |
16:49:49 | * | fredrikhr quit (Ping timeout: 258 seconds) |
16:50:08 | * | onionhammer quit (Quit: WeeChat 2.6) |
16:50:29 | * | onionhammer joined #nim |
16:52:48 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
16:57:11 | * | audiofile quit (Quit: Going offline, see ya! (www.adiirc.com)) |
16:59:49 | FromGitter | <bung87> hmm, I need rewrite my previouse merged PR.. |
17:06:04 | * | liblq-dev joined #nim |
17:06:06 | * | Guest43983 quit (Ping timeout: 260 seconds) |
17:06:27 | * | couven92 quit (Ping timeout: 272 seconds) |
17:12:02 | FromGitter | <bung87> evaluated by compiler ? |
17:12:13 | * | dadada__ joined #nim |
17:21:49 | * | MightyJoe joined #nim |
17:23:13 | * | cyraxjoe quit (Ping timeout: 246 seconds) |
17:33:23 | * | NimBot joined #nim |
17:34:06 | * | dcmertens quit (Quit: Leaving) |
17:35:48 | * | dadada__ quit (Ping timeout: 256 seconds) |
17:39:54 | * | fredg quit (Ping timeout: 240 seconds) |
17:42:21 | * | dadada joined #nim |
17:42:44 | * | dadada is now known as Guest41291 |
17:45:48 | * | fredg joined #nim |
17:56:53 | * | Guest38566 quit (Quit: leaving) |
17:57:02 | * | WilhelmVonWeiner joined #nim |
18:02:30 | * | MightyJoe quit (Ping timeout: 256 seconds) |
18:26:47 | FromDiscord | <Yardanico> @bung87 templates are code substitution |
18:27:43 | FromDiscord | <Yardanico> If you have a template which uses an argument "test" passes to it twice, and call that template like mytempl(fun(3)) then proc "fun" will be called twice |
18:29:10 | FromDiscord | <FromIRC> Uptime - 1 day, 22 hours, 53 minutes, 9 seconds, 54 milliseconds, 563 microseconds, and 820 nanoseconds |
18:29:11 | FromDiscord | <Yardanico> !status |
18:31:03 | FromDiscord | <Yardanico> https://play.nim-lang.org/#ix=2n0T @bung87 |
18:41:22 | FromGitter | <bung87> @Yardanico ah , I see |
18:42:08 | FromGitter | <bung87> just wondering why says " double evaluation" |
18:42:35 | FromGitter | <bung87> it's just a pointer |
18:57:28 | FromDiscord | <Yardanico> Well someone might create a procedure to return that pointer |
18:57:38 | FromDiscord | <Yardanico> And modify it or something |
18:57:42 | * | zacharycarter quit (Remote host closed the connection) |
18:57:54 | FromDiscord | <Yardanico> So to be safe it's better to use a variable so it's evaluated one |
18:57:55 | FromDiscord | <Yardanico> Once* |
18:58:05 | FromGitter | <fowlmouth> when the template is evaluated its just like inlining the code so in the example, data is not the result of calling tt(), it is the literal expression tt() |
18:59:53 | FromDiscord | <Recruit_main707> could a dll check wether anotehr dll should be reloaded? |
19:09:59 | * | dddddd joined #nim |
19:10:16 | FromGitter | <bung87> I understand how template works, just not know why store a pointer |
19:12:36 | FromGitter | <bung87> std lib `{.experimental: "codeReordering".}` accept? otherwise would move bunch of code... |
19:14:04 | FromGitter | <bung87> in js store a ref so that will not trigger hunt prototype chain. in Nim I dont know |
19:17:36 | * | konvertex quit (Quit: quit) |
19:19:53 | leorize | bung87: templates parameters are substituted in |
19:21:59 | leorize | meaning that an expression like: `db.exec(thisExpensiveCall(), params)` will have `thisExpensiveCall()` substituted into all instances of `ps` in the template |
19:24:40 | FromGitter | <bung87> that's about the result code generated ? |
19:25:45 | * | Guest41291 quit (Ping timeout: 256 seconds) |
19:26:43 | * | dadada joined #nim |
19:27:06 | * | dadada is now known as Guest79222 |
19:29:42 | FromGitter | <bung87> in the ast tree `thisExpensiveCall ` is just a symbol |
19:34:09 | * | lritter joined #nim |
19:41:58 | FromGitter | <bung87> I can image this case ⏎ ⏎ ```template tpl1(): ⏎ for loop:``` [https://gitter.im/nim-lang/Nim?at=5ec82b067da67d06fac5ea68] |
19:42:15 | FromGitter | <bung87> ` tpl2()` |
19:43:20 | FromGitter | <bung87> this may fit the case described upon |
19:46:29 | FromGitter | <bung87> found template in template not code reorder well. |
19:58:15 | * | waleee-cl joined #nim |
19:58:39 | * | brainbomb joined #nim |
19:59:23 | FromDiscord | <Recruit_main707> lmao, i just passed a python complex Structure to my nim function, which expects a nim Object, (of the same characteristics) and it worked out of the box, it was so impressive |
20:10:04 | alehander92 | bung87 i am not sure |
20:10:09 | alehander92 | this would be accepted in stdlib |
20:11:21 | alehander92 | otherwise |
20:11:25 | alehander92 | the issue is very subtle |
20:11:51 | alehander92 | imagine your template generates `echo arg ... b = arg` |
20:12:12 | alehander92 | and you call `tmpl(download())` |
20:12:18 | alehander92 | the final code is |
20:12:23 | alehander92 | echo download() .. b = download() |
20:12:32 | alehander92 | bam , two downloads |
20:12:51 | * | zacharycarter joined #nim |
20:12:55 | alehander92 | actually not too obvious and very important to prevent |
20:15:59 | * | brainbomb quit (Quit: Leaving.) |
20:16:52 | FromDiscord | <Yardanico> @Recruit_main707 that's nice but it might not work sometimes :) |
20:16:55 | FromDiscord | <Yardanico> Stuff like alignment |
20:17:55 | FromDiscord | <Recruit_main707> sometimes as in, otehr situatons? or sometimes as in, run it twice and get different results? |
20:19:38 | Yardanico | sometimes as in - different interpreter version, different bitness of the computer, etc :) |
20:19:51 | FromDiscord | <Recruit_main707> fine for me :) |
20:22:04 | livcd | i just want to say nim is really cool |
20:22:39 | Yardanico | github server errors AAAAaaa |
20:22:43 | zacharycarter | in C - does `*dst++` mean dereference `dst` and then increment the pointer? |
20:22:53 | zacharycarter | or increment the derferenced value? |
20:23:10 | Yardanico | https://stackoverflow.com/questions/859770/post-increment-on-a-dereferenced-pointer might help |
20:23:31 | Yardanico | https://stackoverflow.com/a/860053/5476128 |
20:23:31 | Zevv | haha |
20:23:35 | zacharycarter | ah okay so it's the former |
20:23:36 | zacharycarter | thanks |
20:23:45 | zacharycarter | that's what I figured but wanted to make sure |
20:24:07 | alehander92 | i think its better to not use it |
20:24:12 | alehander92 | yourself if possible |
20:24:23 | zacharycarter | I'm not - just reading imgui source code |
20:24:32 | zacharycarter | hope everyone is ready for nimgui :) |
20:24:54 | Yardanico | well we already have bindings for cimgui, you are making bindings for imgui directly? |
20:24:54 | Zevv | it's pretty idiomatic |
20:25:02 | zacharycarter | no I'm porting imgui to nim |
20:25:04 | * | s4mu3lbk quit (Read error: Connection reset by peer) |
20:25:05 | Yardanico | oh lol |
20:25:15 | FromDiscord | <Recruit_main707> respect + |
20:25:49 | zacharycarter | I think I almost have window rendering working |
20:25:51 | zacharycarter | hopefully by the end of today |
20:25:54 | * | s4mu3lbk joined #nim |
20:26:02 | FromDiscord | <Recruit_main707> thats cool |
20:26:40 | FromGitter | <bung87> @alehander92 I got it |
20:27:10 | zacharycarter | hopefully by the end of today |
20:27:15 | zacharycarter | whoops sorry |
20:27:33 | * | Vladar quit (Quit: Leaving) |
20:28:49 | FromGitter | <bung87> the param could be a call expression, when pass it to template , its like a call expression NimNode. |
20:29:03 | Yardanico | yes, as people said (me too), templates are just code substitution |
20:29:57 | FromGitter | <bung87> ah, I aways need read doc when deal with template macros... |
20:30:21 | Yardanico | nim templates are a bit similar to C macros, but are still more powerful :) |
20:30:44 | FromGitter | <bung87> I hope theres doc describe the hidden details. |
20:31:07 | Yardanico | https://nim-lang.org/docs/manual.html#templates |
20:31:51 | FromGitter | <bung87> I mean manual describe it seperately |
20:32:23 | Yardanico | well the manual tells you that ": It is a simple substitution mechanism that operates on Nim's abstract syntax trees." |
20:32:23 | FromGitter | <bung87> templates, macros, compile time proc, typed,untyped, NimNode |
20:33:00 | FromGitter | <bung87> what's the relationship between these. |
20:33:00 | Yardanico | they're all in the manual |
20:33:08 | Yardanico | well wdym "relationship" |
20:33:21 | Yardanico | templates are macros are separate features |
20:33:27 | Yardanico | compiletime is a pragma which is different too |
20:33:43 | * | nsf joined #nim |
20:34:31 | Yardanico | typed/untyped - https://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters |
20:34:59 | Yardanico | "untyped" allows you to pass **any** valid nim syntax even if it has undeclared variables, procedures, etc |
20:35:19 | Yardanico | "typed" only allows you to pass stuff which is actually a semantically valid nim code which was already checked by the compiler for all different kinds of errors |
20:37:19 | FromGitter | <bung87> simple question , when a variable become a NimNode? |
20:38:01 | Yardanico | untyped/typed become NimNode in macros |
20:38:09 | Yardanico | or if you have a compiletime proc which EXPLICITLY accepts a "NimNode" |
20:38:19 | Yardanico | like proc a (data: NimNode) = |
20:38:49 | FromGitter | <bung87> I know typed that the compiler parse it as individual variable, untyped could be a bunch of code. |
20:39:11 | Yardanico | not neccesarily |
20:40:08 | FromGitter | <bung87> "untyped/typed become NimNode in macros" what about in template |
20:40:18 | Yardanico | templates don't operate on NimNode |
20:40:23 | Yardanico | they are just simple code substitution |
20:41:38 | Yardanico | @bung87 about typed - https://play.nim-lang.org/#ix=2n1K |
20:41:43 | Yardanico | that code is perfectly valid |
20:42:04 | FromGitter | <bung87> ok , one more question :P , ast tree node and NimNode what's relationship? |
20:42:37 | Yardanico | what is " ast tree node" ? |
20:42:50 | FromDiscord | <Elegant Beef> Do you just mean a branch on the ast? |
20:43:13 | FromDiscord | <Elegant Beef> NimNode is just the base AST node that has object variants for each node kind |
20:43:24 | Yardanico | yeah |
20:43:29 | Yardanico | all AST nodes are NimNode |
20:43:42 | FromDiscord | <Elegant Beef> Kind/value is the only difference |
20:43:54 | FromDiscord | <Elegant Beef> And im glad i did macro stuff so i can say this with certainty! |
20:44:14 | FromDiscord | <Elegant Beef> "Beef is not as much a numpty" should be my new name |
20:44:39 | FromDiscord | <Elegant Beef> If you're writting macros become great friends with dumpTree |
20:44:42 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/ast.nim#L723 for the compiler representation |
20:44:46 | Yardanico | @Elegant there's also treeRepr |
20:44:47 | Yardanico | astGenRepr |
20:44:48 | Yardanico | lispRepr |
20:44:56 | Zevv | and just repr! |
20:44:58 | FromGitter | <bung87> the example intersting |
20:44:58 | FromDiscord | <Elegant Beef> eh i use treeRepr and dumpTree |
20:45:31 | FromGitter | <bung87> thought untyped should be second param. |
20:46:00 | Yardanico | why? |
20:46:05 | Yardanico | code is typed since it has a return value |
20:46:08 | Yardanico | it's a statement list expression |
20:46:19 | Yardanico | https://nim-lang.org/docs/manual.html#statements-and-expressions-statement-list-expression |
20:46:22 | FromDiscord | <Elegant Beef> I've got this nice template with mratsim's help for adding levels to a LUT↵https://play.nim-lang.org/#ix=2n1M |
20:46:52 | FromDiscord | <Elegant Beef> Templates/macros are awesome, although typed versions behave weird |
20:47:26 | Yardanico | also the difference between typed/untyped is that with untyped you will just get idents |
20:47:27 | Yardanico | not symbols |
20:47:41 | * | audiofile joined #nim |
20:47:42 | Yardanico | but with "typed" you get symbols and can get their types definitions and stuff |
20:48:18 | FromGitter | <bung87> `test(hello,2):` |
20:48:49 | Yardanico | that's 3 arguments |
20:48:54 | FromGitter | <bung87> hello and 2 will into the first param |
20:49:16 | Yardanico | yes |
20:49:22 | Yardanico | you can avoid that by checking if "name" is a single node |
20:49:25 | Yardanico | or something like that |
20:50:00 | FromGitter | <bung87> ok, learned new thing |
20:50:19 | Yardanico | anyway most of this can be found in the manual (which contains a lot of info people ask about) and macros docs |
20:52:05 | shashlick | @zacharycarter what motivated you to port imgui |
20:53:14 | shashlick | Why not make better bindings instead |
20:54:57 | FromGitter | <bung87> when you say ident , it might be just get name information? |
20:55:09 | Yardanico | ident is just node with a string for the name |
20:55:13 | Yardanico | it's not attached to any type |
20:55:32 | Yardanico | I mean you can try to get the type with things like parseExpr and stuff |
20:55:42 | * | martinium joined #nim |
20:55:54 | FromGitter | <bung87> ok, very clear explaination. |
21:09:34 | * | s4mu3lbk quit (Quit: Leaving) |
21:09:57 | alehander92 | this is true |
21:09:59 | alehander92 | but you can actually gener |
21:10:10 | alehander92 | new code which then checks the type itself with `when` |
21:10:17 | alehander92 | or using a typed macro or overload |
21:10:22 | alehander92 | its a hack but its also possible |
21:10:35 | alehander92 | if you somehow need to start with untyped |
21:14:36 | FromGitter | <bung87> ok :P |
21:30:09 | FromGitter | <bung87> i got error when bindSym to a iterator |
21:34:45 | * | smitop joined #nim |
21:35:53 | * | neceve quit (Ping timeout: 260 seconds) |
21:44:04 | * | inv2004 joined #nim |
21:44:40 | inv2004 | Hello, Are there anything like "default generic" ? I would like to define something like iterator items[T=K](x: K): T |
21:45:24 | inv2004 | to be able to call "for x in k:" and "for x in k.items[:int]:" |
21:46:35 | zacharycarter | whoops sorr |
21:46:59 | Yardanico | inv2004: just define another non-generic proc I guess? |
21:47:11 | Yardanico | well I mean iterator |
21:47:33 | * | a_b_m quit (Remote host closed the connection) |
21:47:38 | inv2004 | @Yardanico, overloaded 'items' leads to ambiguous calls |
21:48:20 | FromGitter | <bung87> hmm. I finally make code no warning in editor.. |
21:48:25 | FromGitter | <bung87> but got ` Error: internal error: proc has no result symbol` |
21:49:00 | FromGitter | <bung87> can't return callIlterator() in macro? |
21:49:05 | Yardanico | ? |
21:50:09 | FromGitter | <bung87> ```nnkCall.newTree( ⏎ fastRows, ⏎ dbBind, ⏎ preparedStatement ⏎ )``` [https://gitter.im/nim-lang/Nim?at=5ec849102c49c45f5a973f75] |
21:51:08 | FromGitter | <bung87> the last line I call a iterator in macro |
21:51:21 | Yardanico | uhh |
21:51:26 | Yardanico | you can't just "call" an iterator |
21:51:32 | Yardanico | you need to have it in a for loop for example |
21:52:35 | FromGitter | <bung87> ah, let me think how to handle this. |
21:55:19 | FromGitter | <bung87> I guess I need read https://nim-lang.org/docs/manual.html#macros-for-loop-macro |
21:55:35 | Yardanico | if you want to CREATE a macro iterator for a for loop - yes |
21:55:40 | Yardanico | if you want to make a for loop in your own macro - no |
21:56:09 | inv2004 | @Yardanico, https://play.nim-lang.org/#ix=2n27 |
21:56:28 | Yardanico | inv2004: well one alternative would be to use typedesc instead of generics |
21:58:36 | Yardanico | e.g. https://play.nim-lang.org/#ix=2n28 |
21:59:38 | Yardanico | maybe there's a better way, I don't know, I don't use generics very often :) |
22:00:05 | inv2004 | @Yardanico, thx, I just completed reading first page about typedesc |
22:00:49 | inv2004 | ah, it not not normal generic :( |
22:00:59 | Yardanico | wdym? |
22:01:13 | inv2004 | it is in argument also |
22:01:19 | Yardanico | yes but it's compile-time only |
22:01:23 | Yardanico | typedesc doesn't exist at runtime |
22:01:34 | Yardanico | "These values exists only during the compilation phase, but since all values must have a type, typedesc is considered their special type." |
22:01:51 | inv2004 | Yep, it is clear, I thank you for your solution |
22:01:52 | Yardanico | and nim iterators are always inlined anyway |
22:01:59 | Yardanico | (except if it's a closure iterator of course) |
22:02:01 | FromGitter | <bung87> the example doest show that can yield |
22:02:13 | Yardanico | @bung87 ? |
22:02:20 | inv2004 | the only thing that it is not .items[:string] |
22:02:24 | Yardanico | well yes |
22:02:30 | FromGitter | <bung87> the doc https://nim-lang.org/docs/manual.html#macros-for-loop-macro |
22:02:44 | Yardanico | @bung87 you're looking at the _wrong_ place |
22:03:03 | Yardanico | if you want to create an NimNode which will then be a for loop - you need to construct an ast |
22:03:05 | * | audiofile quit (Quit: Going offline, see ya! (www.adiirc.com)) |
22:03:16 | Yardanico | try astGenRepr on the input of your macro to see how a for loop would look |
22:03:37 | Yardanico | inv2004: I might know the alternative, lemme try |
22:04:15 | Yardanico | ah nvm |
22:04:38 | inv2004 | ok, thx anyway - will apply your solution in the library |
22:05:06 | inv2004 | But if you find solution, for example during sleep - ping me in telegram :) |
22:07:34 | FromGitter | <bung87> but it's iterator, I can just using for loop, can I consider they are same performance? |
22:08:37 | FromGitter | <bung87> it will be used as `for xx in myMacro:` |
22:09:00 | FromGitter | <bung87> `myMacro (a,b,c)` |
22:09:05 | Yardanico | oh, well you might try |
22:09:15 | Yardanico | but generally it's not ok to use experimental features in the stdlib |
22:09:16 | Yardanico | really not ok |
22:09:31 | Yardanico | well I guess it wouldn't hurt |
22:10:15 | FromGitter | <bung87> em .. fighting hours just modify hundred lines... so sad |
22:11:06 | inv2004 | bung87, try rust - you will fight month with 20 lines sometimes :) |
22:11:12 | FromGitter | <bung87> I'll just try , might not be able commit in to my PR |
22:11:38 | FromGitter | <bung87> oh, that's heard even so sad.. |
22:11:51 | * | brainbomb joined #nim |
22:12:06 | * | abm joined #nim |
22:13:34 | FromDiscord | <speckledlemon> How is documentation automatically generated for packages? |
22:13:40 | Yardanico | it uses docstrings |
22:13:47 | Yardanico | doc comments* |
22:13:49 | Yardanico | # is a normal comment |
22:13:52 | Yardanico | ## is a documentation comment |
22:14:05 | Yardanico | https://nim-lang.org/docs/manual.html#lexical-analysis-comments |
22:14:10 | Yardanico | "Documentation comments are comments that start with two ##. Documentation comments are tokens; they are only allowed at certain places in the input file as they belong to the syntax tree!" |
22:14:10 | FromDiscord | <Elegant Beef> and multiline can be done the same way as comments just with two # |
22:14:19 | FromDiscord | <speckledlemon> Right, but what tool do I use for the generation? |
22:14:23 | FromDiscord | <Elegant Beef> nim doc |
22:14:23 | Yardanico | "nim doc" |
22:14:43 | Yardanico | nim doc suports RST and a subset of markdown for code formatting |
22:14:58 | Yardanico | for (relatively) simple example check https://github.com/Yardanico/nim-mathexpr/blob/master/src/mathexpr.nim :) |
22:14:59 | FromDiscord | <speckledlemon> For each file individually? |
22:15:40 | Yardanico | https://nim-lang.org/docs/docgen.html |
22:15:46 | Yardanico | you can use "nim doc --project" for the whole project |
22:15:53 | Yardanico | but read that page :) |
22:20:49 | FromDiscord | <speckledlemon> mmmm nice output. wish some of this was discoverable under `nim --help` |
22:22:34 | * | Guest79222 quit (Ping timeout: 265 seconds) |
22:22:46 | Yardanico | tried --fullhelp ? :) |
22:22:51 | FromDiscord | <speckledlemon> and it's choking on a backtick somewhere with a line number that doesn't make sense |
22:22:59 | Yardanico | why? |
22:23:10 | FromDiscord | <speckledlemon> welp forgot about that one |
22:24:10 | FromDiscord | <speckledlemon> the line number is way before any backtick, but it goes away when I remove all the backticks |
22:26:11 | * | liblq-dev quit (Quit: WeeChat 2.8) |
22:26:48 | * | brainbomb quit (Quit: Leaving.) |
22:27:11 | * | fredg quit (Quit: Lost terminal) |
22:28:10 | skrylar[m] | araq may finally get his immgui of sorts |
22:28:16 | Yardanico | lel |
22:28:50 | skrylar[m] | if it weren't for this insomnia i would have done the earcut tesselator today |
22:31:28 | FromDiscord | <speckledlemon> Oh, it’s RST, not Markdown :facepalm: |
22:31:36 | Yardanico | yes |
22:31:45 | Yardanico | as I said, it's RST and a bit of markdown |
22:33:20 | skrylar[m] | i also made a silly script that makes asciidoc from nim modules by ripping the #- lines |
22:33:44 | * | nsf quit (Quit: WeeChat 2.8) |
22:38:20 | * | inv2004 quit (Quit: Leaving) |
22:42:10 | FromGitter | <bung87> when I use `varargs[untyped]` should check if one is not `nnkBracket` ? |
22:42:41 | FromGitter | <bung87> seems only this could valid compile but cause runtime error |
22:44:29 | FromGitter | <bung87> I also want check it's when args.len == 0 , but pass `[]` will not make it true |
22:48:54 | * | solitudesf quit (Ping timeout: 240 seconds) |
22:57:39 | FromDiscord | <Recruit_main707> Can you convert an ptr Uncheckedarray[T] to a seq[T] somehow? |
22:58:57 | Yardanico | by copying |
22:59:41 | Yardanico | var s = newSeq[int](lenOfArray); for i in 0 ..< lenOfArray: myseq[i] = array[i] |
23:01:15 | FromDiscord | <Recruit_main707> Can you access the len of an Uncheckedarray? |
23:01:27 | FromDiscord | <Recruit_main707> Or that would need to be managed separately |
23:01:49 | Yardanico | you need to get the length from somewhere else |
23:01:58 | Yardanico | usually from the C side if you interface with C libs |
23:02:17 | FromDiscord | <Generic> an UncheckArray has no length |
23:02:19 | FromDiscord | <Recruit_main707> That's easy I guess |
23:02:39 | FromDiscord | <Generic> it's just an address you can make relative accesses from |
23:05:01 | FromDiscord | <Recruit_main707> And, what would be a better practice:↵Having an unpopulated array of 64 (maximum yet really uncommon) complex objects? Or having a seq of them despite the number of them being the same for the whole execution time? |
23:05:23 | Yardanico | array of course |
23:05:27 | FromDiscord | <Recruit_main707> A partially unpopulated* |
23:05:57 | FromDiscord | <Generic> it depends if it's possible that not all of them are going to be used then a seq |
23:05:57 | Yardanico | how complex we're talking about? |
23:06:02 | FromDiscord | <Generic> but otherwise an array |
23:06:08 | FromDiscord | <Recruit_main707> They are approximately objects of 12 floats approx |
23:06:18 | FromDiscord | <Recruit_main707> +- |
23:06:42 | Yardanico | that's not that much |
23:06:48 | Yardanico | 6kb |
23:06:49 | FromDiscord | <Generic> that's really not much |
23:06:51 | Yardanico | yeah go with an array |
23:06:55 | FromDiscord | <Recruit_main707> K |
23:06:59 | Yardanico | it's only ~6kb on 64-bit |
23:07:08 | FromDiscord | <Recruit_main707> That simplifies the problem :) |
23:07:40 | * | tane quit (Quit: Leaving) |
23:10:25 | Yardanico | tfw js devs are talking "look my webpage now uses 1mb less download" and nim devs are talking "omg what do I do i have a 6kb variable it's too much !11" |
23:10:33 | Yardanico | /s |
23:10:52 | zacharycarter | web dev is cancer |
23:12:15 | Prestige | I agree |
23:12:17 | zacharycarter | my boss was asking today why our AWS costs doubled since March |
23:12:29 | zacharycarter | and all I could say was - this is what happens when you throw more hardware at inefficient software |
23:12:50 | zacharycarter | and then, like most managers, he talked about his glory days as a developer |
23:23:36 | FromDiscord | <exelotl> https://media.discordapp.net/attachments/251865928311111691/713428034329378856/received_2606328639622941.png |
23:24:07 | zacharycarter | :D |
23:25:43 | FromGitter | <bung87> does varargs can get len? |
23:26:20 | FromDiscord | <exelotl> yeah should be able to |
23:27:18 | FromGitter | <bung87> template/generic instantiation of `>` from here |
23:27:29 | FromGitter | <bung87> `if args.len > 0:` |
23:30:26 | FromGitter | <bung87> oh, another thing cause |
23:35:14 | FromGitter | <bung87> seems like can't pass varargs to another macro that accept varargs.. |
23:35:46 | FromDiscord | <Clyybber> \> template/generic instantiation of > from here↵Thats not an error.. |
23:36:27 | FromGitter | <bung87> `Error: invalid type: 'untyped' in this context: 'proc (x: varargs[untyped]): int{.noSideEffect.}' for proc` |
23:36:35 | FromGitter | <bung87> ok, the error message is |
23:37:26 | FromDiscord | <exelotl> varargs[untyped] can only be used in macros |
23:37:45 | FromDiscord | <mratsim> The unit in httpclient progress reporting seems wrong when i compare to my system monitor, anyone can reproduce? https://nim-lang.org/docs/httpclient.html#progress-reporting |
23:37:55 | FromDiscord | <exelotl> (and in templates, but that's only useful if you're forwarding it to a macro) |
23:38:46 | * | zacharycarter quit (Ping timeout: 246 seconds) |
23:39:29 | FromGitter | <bung87> yeah, am passing varargs from template to macro. |
23:41:06 | FromGitter | <bung87> `if args.len > 0:` I commented this then can compile |
23:41:22 | FromDiscord | <exelotl> but the error message says proc |
23:42:37 | * | abm quit (Read error: Connection reset by peer) |
23:44:10 | * | smitop quit (Quit: Connection closed for inactivity) |
23:44:32 | Prestige | Trying to write a small snippet to ask a question but having trouble replicating the condition. Can someone tell me what's going wrong here? https://play.nim-lang.org/#ix=2n2y |
23:45:22 | FromDiscord | <Elegant Beef> getPFoo doesnt return |
23:45:37 | Prestige | Oh woops |
23:45:52 | FromDiscord | <Elegant Beef> Still errors though |
23:46:17 | Prestige | Yeah |
23:47:23 | FromDiscord | <Elegant Beef> Oh you dont intialize B |
23:47:26 | FromDiscord | <Elegant Beef> It's a ref object |
23:47:37 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2n2B |
23:47:58 | Prestige | Oh I didn't know I needed to do that, thanks |
23:48:58 | FromDiscord | <Elegant Beef> Well refs are on the heap and ar nilable |
23:49:01 | FromDiscord | <Elegant Beef> are* |
23:49:48 | Prestige | Just thought it implicity initialized w/result, ty |
23:50:05 | FromDiscord | <Elegant Beef> nah the result always starts as the default value |
23:50:10 | FromDiscord | <Elegant Beef> in the case of refs, nil |
23:50:44 | * | exelotl joined #nim |
23:51:20 | FromDiscord | <exelotl> sent a code paste, see http://ix.io/2n2C |
23:51:49 | FromGitter | <bung87> ```system.len: proc (x: TOpenArray: openArray or varargs): int{.noSideEffect.}``` |
23:51:50 | * | dadada joined #nim |
23:52:10 | FromGitter | <bung87> only this one looks like the error message shows. |
23:52:14 | * | dadada is now known as Guest81561 |
23:53:30 | FromDiscord | <exelotl> I like how Nim has all this clever stuff to ensure my functions are threadsafe and prevent me from accessing guarded memory without a lock |
23:53:44 | FromDiscord | <exelotl> so that I can forget to initialise the lock and have my program silently fail |
23:54:44 | FromDiscord | <exelotl> bung87: can you share your code? |
23:56:38 | FromGitter | <bung87> almost like this https://play.nim-lang.org/#ix=2n2D |
23:57:21 | FromGitter | <bung87> am on devel , playground is 1.2 |
23:59:39 | FromGitter | <bung87> https://github.com/nim-lang/Nim/blob/ef5b766a087c667b2f91393b2a913785396ba944/lib/impure/db_sqlite.nim#L785 in this template |
23:59:55 | FromDiscord | <Elegant Beef> Well exelotl use channels 😛 |