00:03:03 | FromDiscord | <nikki> this makes the first choice p uniform, and the second choice q uniform among the rest but ur just swapping the last value for q with p |
00:04:48 | disruptek | there's a bug here; what is it? |
00:04:52 | disruptek | https://play.nim-lang.org/#ix=2Ek1 |
00:06:04 | disruptek | zedeus: why do you care about submodules? |
00:06:22 | zedeus | I wish I didn't have to |
00:06:35 | disruptek | what does that mean? |
00:07:05 | zedeus | nimble installs your package by recursively cloning it. since submodules being pinned is just how git works, it clones an old commit of jason, since you didn't update the submodule |
00:07:16 | zedeus | if nimph just ignores how git works that's great, but it breaks nimble |
00:07:52 | disruptek | well, i cannot reproduce your issue. |
00:08:19 | disruptek | frosty runs CI and doesn't check out jason, for example. |
00:08:23 | zedeus | all it takes is `git clone --recursive https://github.com/disruptek/frosty` |
00:08:36 | zedeus | and you'll see that it checks out an old commit |
00:09:22 | disruptek | well, i don't use that to develop modules. i use nimph. and i use nimble for CI. |
00:09:32 | zedeus | yeah, well then nimph is broken |
00:09:47 | disruptek | sure. |
00:10:08 | disruptek | nimph knows how to roll repositories and nimble is living in the dark ages, but okay, dude. |
00:10:21 | zedeus | it's just how git works, man |
00:10:27 | disruptek | i'm alright with it. |
00:10:33 | zedeus | so, are you going to update it? |
00:10:41 | zedeus | or should i find another package for serialization |
00:10:46 | disruptek | nah. i cannot see how to help you. try flatty. |
00:11:28 | zedeus | git submodule update --remote --merge |
00:12:03 | zedeus | then commit, tag, and push, and that's it |
00:12:18 | disruptek | sounds like too much work. |
00:12:41 | mipri | the less-work solution is to never use git submodules |
00:13:21 | disruptek | i think they are good. |
00:13:32 | disruptek | nimph-2 will use them extensively. |
00:13:44 | zedeus | disruptek insists on using submodules with his nimble alternative, but unfortunately he isn't using them like git intended, so the rest of us has to suffer |
00:14:02 | zedeus | i guess it's a sneaky marketing ploy to force us to use nimph |
00:14:16 | disruptek | there's only one user afaik, and that user is breaking my balls. as usual. |
00:15:43 | zedeus | one direct user, and tens of thousands of indirect users |
00:15:51 | disruptek | try flatty. |
00:16:16 | zedeus | guess I'll have to |
00:16:45 | disruptek | jason 0.3.2 is as up-to-date as i'm going to make it. |
00:16:51 | disruptek | if it works for you, great. |
00:17:05 | zedeus | just one commit away from actually working |
00:17:20 | disruptek | i just pushed it, chucklehead. |
00:17:35 | zedeus | it's stil in frosty, not jason |
00:17:56 | disruptek | okay, 0.4.3 then. |
00:18:14 | * | thomasross joined #nim |
00:18:22 | disruptek | but get used to this. we won't be pinning submodules. |
00:18:28 | * | Quibono quit (Remote host closed the connection) |
00:18:33 | disruptek | that's not the interface that anyone wants to use. |
00:18:38 | zedeus | it's how git works. |
00:18:46 | zedeus | I guess I'll get used to not using your packages then |
00:18:51 | disruptek | it's fine. |
00:18:57 | disruptek | there are many fish in the sea. |
00:19:01 | disruptek | try flatty. |
00:19:10 | zedeus | along with all other nimble users |
00:19:17 | disruptek | yeah, fuck 'em. |
00:19:45 | disruptek | life is too short to use nimble. |
00:21:24 | mipri | credibility nil when the only way to fix nimble here would be to add a bug to it. |
00:21:52 | disruptek | seems that a few hundred other people beat me to it. |
00:22:42 | disruptek | it's ridiculous to expect my package manager to use whatever version git is pointing to. |
00:23:00 | disruptek | that's a recommendation, it's not an authority. |
00:23:05 | mipri | if you don't like git submodules, don't use them |
00:23:21 | disruptek | if you don't like working package management, don't use nimph. |
00:23:22 | mipri | you using something that you only call git submodules is not liking them. |
00:23:46 | disruptek | the reason nimph uses them is because they allow other tooling to identify links. |
00:23:55 | mipri | imagine anyone listening to this conversation and then thinking "I'd better depend on nimph. Sounds like that won't bite me in the ass later." |
00:24:02 | zedeus | incorrect links |
00:24:17 | disruptek | they are only incorrect for /you/, chucklehead. |
00:24:27 | zedeus | the links include a commit, that's the problem |
00:24:50 | disruptek | no, it's not. |
00:25:05 | disruptek | the problem is that you don't have a package manager that understands how to roll your repo to the prescribed versions. |
00:25:31 | disruptek | what's the point of using git in nimble? |
00:25:35 | disruptek | none. |
00:25:44 | disruptek | what's the point of using submodules when almost no one does? |
00:25:45 | disruptek | none. |
00:26:01 | disruptek | what's the point of talking to me about nimble? |
00:26:01 | zedeus | so, actually following the links result in using the wrong versions, unless you use a custom solution (nimph) which ignore the commit that makes up half of the link. so why even use submodules? |
00:26:02 | disruptek | none. |
00:26:46 | zedeus | this isn't even about nimble |
00:26:56 | disruptek | because they allow tooling to discover links without having to invoke nim's vm. |
00:26:58 | mipri | you're breaking your repos and then patching a workaround into nimph. |
00:27:03 | disruptek | uh, no. |
00:27:12 | zedeus | basically |
00:27:19 | mipri | you know what else can allow tooling to discover links? anything. a file. you don't need to misuse this dumb feature |
00:27:19 | disruptek | whatever. don't fucking use my software, then. |
00:27:25 | mipri | I pray I never do. |
00:27:54 | disruptek | if the nim vm was faster, i wouldn't have to do this. |
00:28:07 | disruptek | if the configuration system was tighter and better standardized, i'd be able to use it. |
00:29:33 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
00:35:51 | FromDiscord | <nikki> Zoom: @ElegantBeef i believe this works: https://play.nim-lang.org/#ix=2Ek7 |
00:36:39 | FromDiscord | <nikki> reason: first value `p` is picked normally. for the second one, we need to pick among N - 1 things, but we just replace `p` with the high of the range |
00:58:06 | * | Quibono joined #nim |
01:10:22 | * | vicfred quit (Quit: Leaving) |
01:15:47 | * | Tanger joined #nim |
01:32:20 | * | voltist quit (Quit: The Lounge - https://thelounge.chat) |
01:34:16 | * | Quibono quit (Remote host closed the connection) |
01:34:21 | * | voltist joined #nim |
01:34:38 | * | hnOsmium0001 joined #nim |
02:15:02 | * | apahl quit (Ping timeout: 264 seconds) |
02:16:42 | * | apahl joined #nim |
02:24:04 | FromDiscord | <Rebel> When using hmac sha256 in Nim how do I just get the bytes I do not want the string. (https://play.nim-lang.org/#ix=2EkI) Why do people who use Nim prefer using strings over byte arrays when dealing with cryptography? |
02:24:42 | disruptek | what makes you think there's a difference? |
02:28:11 | FromDiscord | <Rebel> well I just wasted like an hour debugging because I didn't realize he was returning the string which is length 64 when I need the raw bytes of length 32 because I am talking to Python apps in this instance... which caused HMAC verification to fail. |
02:28:58 | FromGitter | <sealmove> huh |
02:29:16 | FromGitter | <sealmove> so raw bytes are 32 but string has length 64? :P |
02:31:19 | FromDiscord | <Rebel> Sha256 is 32 bytes I was getting the string back from nimcrypto's hmac sha256 proc and converting to that to a byte array which would be size 64.... |
02:32:48 | FromDiscord | <ElegantBeef> I'd imagine the reason is that you can use a string stream and easily write the data to send/encrypt, but there really is no difference so eh |
02:46:13 | FromDiscord | <Rebel> the answer was just to use the finish function |
02:46:18 | FromDiscord | <Rebel> (edit) "the answer was just to use the finish function ... " added "and use a buffer" |
03:02:22 | FromDiscord | <nikki> the type of `result` is `Digest[256]` and not `string ` right |
03:14:10 | Zoom[m] | disruptek I don't really get what you were trying to achieve, but your example doesn't give unique numbers, and Y is never Max |
03:21:05 | FromDiscord | <nikki> Zoom -- https://play.nim-lang.org/#ix=2Ek7 what do u think of this one |
03:21:36 | Zoom[m] | nikki I'll show you |
03:25:58 | Zoom[m] | https://imgur.com/a/kHYWPw9 |
03:26:03 | FromDiscord | <nikki> the logic is (using a specific example so it's clearer): for 1..10 for example: the first number is picked from 1..10 as expected. say it picked 3. for the second number, the range is 1..9, but if you get 3 it maps to 10 instead. so the range for the second number is 1..2 union 9..10 which is what you want |
03:26:34 | Zoom[m] | What I can say is that your way gives distinctly different results than dumb rand in a loop |
03:27:58 | FromDiscord | <nikki> seems like they are both uniformly distributed? also it's hard to really evaluate this without being sure that the `rand` primitive being used has uniform results |
03:28:21 | FromDiscord | <nikki> like try generating pairs of (a, b) (without the a != b constraint) and seeing if that looks evenly distributed |
03:29:56 | Zoom[m] | You can see there's something off with your approach as we reach 1400 while with looping we're maxing at 1200 |
03:30:41 | FromDiscord | <nikki> can't say for sure until i see the whole code generating these results |
03:31:28 | FromDiscord | <nikki> i'm wondering tho about the idea of having a unique id for each of these pairs and being able to just generate the id and generate the pair out of that back 🤔 would be interesting |
03:32:39 | FromDiscord | <nikki> like for the range 0-9 of 10 numbers, there are 10x10 - 10 results |
03:32:42 | FromDiscord | <nikki> i'll think about that approach |
03:32:46 | FromDiscord | <nikki> just curious / interested |
03:36:05 | Zoom[m] | I've added the control to the album. |
03:36:09 | FromDiscord | <ElegantBeef> I mean like i said nikki i did 100k samples with 0..10 and each value was around 9k, so it's pretty even atleast for the small 11 values 😄 |
03:40:31 | FromDiscord | <Rebel> oh nikki if you are curious https://play.nim-lang.org/#ix=2EkY |
03:40:53 | FromDiscord | <Rebel> oops wrong one lol |
03:40:59 | FromDiscord | <Rebel> (edit) "https://play.nim-lang.org/#ix=2EkY" => "https://play.nim-lang.org/#ix=2EkP" |
03:41:04 | FromDiscord | <Rebel> there you go |
03:41:17 | FromDiscord | <Rebel> but my MAC check still fails on Python side 🙃 |
03:41:25 | FromDiscord | <nikki> Zoom: given how the control looks, idk if this graphing approach is the right way to judge which things are uniform |
03:41:29 | FromDiscord | <nikki> it has to be by proof |
03:41:42 | FromDiscord | <nikki> but here's another approach: https://play.nim-lang.org/#ix=2El7 |
03:42:25 | FromDiscord | <nikki> this one works in the 0..<n range, and what it does is map a space of integers to the pairs you want |
03:42:55 | Zoom[m] | It's pretty clear when the squares are all close in temp we're at uniform. |
03:43:09 | FromDiscord | <nikki> right, but the control doesn't look like that? |
03:43:14 | * | muffindrake quit (Ping timeout: 264 seconds) |
03:43:34 | FromDiscord | <nikki> so the methodology seems to suggest that just generating possibly equal integers is non-uniform |
03:43:41 | FromDiscord | <nikki> in any case wonder what you think of this last attempt |
03:44:54 | FromDiscord | <nikki> i can explain it better if you want. one way to visualize it is to look at the graphs you have, and imagine assigning numbers to each allowed square starting at 0 moving upwards along columns then to the next row |
03:45:15 | * | muffindrake joined #nim |
03:47:24 | Zoom[m] | Eh, I get strange results with the last approach |
03:47:42 | Zoom[m] | I'm too sleepy to understand why, though :) |
03:48:02 | Zoom[m] | https://i.imgur.com/oW3FDG3.png |
03:48:24 | FromDiscord | <nikki> because it's exclusive, not inclusive, as explained by the name of the parameter in the function |
03:48:48 | FromDiscord | <nikki> and also my comment about working in the 0..<n range |
03:49:49 | FromDiscord | <nikki> https://play.nim-lang.org/#ix=2El8 |
03:49:55 | FromDiscord | <nikki> added a comment to the bottom explaining the logic |
03:50:23 | Zoom[m] | https://play.nim-lang.org/#ix=2El9 |
03:51:08 | FromDiscord | <nikki> still don't understand why your graphs are helpful if the control looks like the least uniform example |
03:51:11 | Zoom[m] | Here's the code for generating the stats for the gnuplot. |
03:52:30 | Zoom[m] | They are comparable. At the very least they allow to catch buggy versions. :) |
03:53:10 | FromDiscord | <nikki> https://play.nim-lang.org/#ix=2Ela fixed explanation |
03:53:39 | FromDiscord | <nikki> but yeah if you want to try this final ^ one, you have to use randPairs(max + 1) sorry or that can be in the func i.e., `let n = param + 1` |
03:54:07 | FromDiscord | <nikki> but yeah the control is the least uniform thing in your graph. can you explain that 🤔 or are we just going to ignore it |
03:54:18 | Zoom[m] | I think I'm going to wrap up for tonight, please, ping me here if anyone continues with the topic. I think we should at least document this in the forum, as it's rather interesting |
03:54:36 | FromDiscord | <nikki> haha aite, ttyl! |
03:57:34 | Zoom[m] | nikki, this looks the same as loops |
03:58:07 | FromDiscord | <nikki> haha nice! also in the max substitution one -- it seems to have put 1400 as the top of the heatmap but doesn't actually color any of the grid cells yellow and makes them orange (which is 1200) 🤔 |
03:58:24 | FromDiscord | <nikki> anyways the last one has the property that it only calls `rand` once, which maybe is nice |
03:58:53 | FromDiscord | <nikki> but it also means that you need to be able to call `rand` on a larger range than the input range (which may be a problem if it's eg. all of a big integer) |
03:59:01 | Zoom[m] | Updated the album with your second solution: https://imgur.com/a/kHYWPw9 |
03:59:16 | FromDiscord | <nikki> thanks for trying them out! |
04:00:15 | Zoom[m] | I should probably have added the labels for each square |
04:00:37 | Zoom[m] | Thanks for the fun, I'm out. |
04:00:42 | * | rockcavera quit (Remote host closed the connection) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:37 | * | supakeen joined #nim |
04:33:19 | * | thomasross quit (Ping timeout: 265 seconds) |
04:59:30 | * | apahl quit (Remote host closed the connection) |
04:59:56 | * | apahl joined #nim |
05:04:33 | * | xet7 quit (Remote host closed the connection) |
05:06:29 | * | vicfred joined #nim |
05:11:14 | * | vicfred quit (Client Quit) |
05:13:50 | * | NimBot joined #nim |
05:14:13 | * | xet7 joined #nim |
05:15:59 | * | narimiran joined #nim |
05:52:00 | * | solitudesf joined #nim |
06:26:00 | * | habamax joined #nim |
07:01:37 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
08:00:25 | * | PMunch joined #nim |
08:40:53 | * | Vladar joined #nim |
09:07:32 | * | Tanger quit (Quit: Leaving) |
09:16:46 | * | Oddmonger quit (Ping timeout: 246 seconds) |
09:19:33 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:29:41 | * | Oddmonger joined #nim |
09:33:14 | * | Oddmonger quit (Changing host) |
09:33:14 | * | Oddmonger joined #nim |
09:34:47 | * | neceve joined #nim |
09:38:39 | * | xace quit (Ping timeout: 256 seconds) |
09:58:48 | * | lritter joined #nim |
10:45:59 | ForumUpdaterBot | New thread by B3liever: A DSL to construct Nim AST based on karax, see https://forum.nim-lang.org/t/7098 |
10:49:09 | planetis[m] | i just couldnt resist 😁 |
10:50:06 | Araq | I love it |
10:50:15 | Araq | had the same idea but never implemented it |
10:52:59 | planetis[m] | yay glad you like it |
11:01:43 | Araq | I would name it 'buildAst' though, 'buildMacro' doesn't build a macro |
11:02:39 | Araq | or maybe 'buildNimTree' |
11:08:02 | planetis[m] | yes buildAst is better |
11:08:18 | planetis[m] | similar to getAst |
11:11:06 | FromDiscord | <Rika> looks awesome damn |
11:20:12 | * | abm joined #nim |
11:38:27 | * | cgfuh joined #nim |
12:03:35 | * | rockcavera joined #nim |
12:05:44 | * | xace joined #nim |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:34 | * | supakeen joined #nim |
13:01:15 | Zoom[m] | Sooo, I've updated the pretty pictures: https://imgur.com/a/kHYWPw9 |
13:04:47 | Zoom[m] | From what I see, there's not much difference in the outcomes for any routine except the coin toss, where my initial intuition proved to be correct - we have 1:2 total for both lower and higher "half" even though they contain different number of "bins". For others the standard deviation is fluctuating in 29-36 between program runs. |
13:06:06 | Zoom[m] | Gnuplot is fun, never used it before |
13:07:33 | Zoom[m] | The code: https://play.nim-lang.org/#ix=2EmY |
13:08:29 | PMunch | Isn't that control plot a bit worrying |
13:09:15 | * | Mortir joined #nim |
13:11:08 | Zoom[m] | Nope, look at the min, the colors are not consistent between images. |
13:11:51 | PMunch | I was more talking about the ~9x pooling around the bottom left and top right |
13:12:22 | FromDiscord | <Rika> i have no idea what im looking at |
13:12:33 | PMunch | Oh wait, that's the Coin toss? |
13:12:43 | Zoom[m] | Yep |
13:14:26 | ForumUpdaterBot | New thread by HJarausch: Real sets and tables anywhere? , see https://forum.nim-lang.org/t/7099 |
13:16:48 | Zoom[m] | That's what I was talking about. We have 1:2 for the smaller part, if it's just one bin we have about half of the pairs there, and for other half we have 1:2/8=1:16 for each |
13:18:24 | Zoom[m] | So I think the rand_pair_b or rand_pair_c should be used |
13:18:26 | ForumUpdaterBot | New thread by Bung: Amysql - Async MySQL Connector write in pure Nim., see https://forum.nim-lang.org/t/7100 |
13:19:25 | * | hmmmm joined #nim |
13:20:08 | hmmmm | hallo |
13:20:19 | hmmmm | anyone home |
13:20:37 | FromDiscord | <Rika> hello |
13:20:53 | Zoom[m] | Hola! |
13:20:54 | hmmmm | I have a super newbie question |
13:20:58 | FromDiscord | <Rika> sur |
13:20:59 | FromDiscord | <Rika> e |
13:21:04 | FromDiscord | <Rika> ask away |
13:21:21 | hmmmm | I was trying to write a proc to get as a return type a tuple |
13:21:58 | hmmmm | I stumbled a lot but it seems the idiomatic way to do that is passing a var parameter and let the function manipulate that |
13:22:10 | FromDiscord | <Rika> you want to return a tuple? |
13:22:18 | narimiran | hmmmm: what's the problem with returning a tuple? |
13:22:22 | hmmmm | I find it weird and a bit disturbing and was looking to confirm that is the accepted way |
13:22:50 | FromDiscord | <Rika> its accepted but its also okay to return a tuple |
13:23:09 | FromDiscord | <Rika> `proc someProc(): tuple[a: int, b: int] =...` is okay |
13:23:33 | hmmmm | ohh |
13:23:55 | narimiran | ...or `proc someProc(): (int, int) =...` |
13:24:14 | hmmmm | I was trying something like tuple[a,b : seq[int]] or something incredibly bad like that |
13:24:18 | FromDiscord | <haxscramper> !eval var tmp: proc(): proc(): proc(): proc(): proc(): tuple[a: proc(), b: proc()] |
13:24:22 | NimBot | <no output> |
13:24:37 | hmmmm | I'm not used to pass a lot of stuff in the declaration since I come to python and I'm a total noob |
13:25:06 | Zoom[m] | From my point of view having var args accentuates the mutable nature of your proc, if you're not mutating it's better to return |
13:25:11 | FromDiscord | <haxscramper> Returning multiple things from function using tuple is perfectly fine. `tuple[a,b : seq[int]] ` has nothing wrong with it |
13:25:17 | FromDiscord | <Rika> i dont see why tuple[a,b : seq[int]] woudlnt work |
13:25:23 | FromDiscord | <Rika> it should |
13:25:41 | narimiran | ..unless you're returning something else ;) |
13:25:52 | FromDiscord | <Rika> wrap it in another tuple 😄 |
13:26:44 | hmmmm | ok I'll re try it later since having a variable outside the scope of the proc that gets changed seems a bit out my confort zone |
13:26:51 | hmmmm | thanks all, see yall later |
13:27:07 | Zoom[m] | The question I think you should ask yourself first is what am I passing to a function and what am I doing with the data that I passed there |
13:27:16 | * | Mortir quit (Quit: leaving) |
13:27:28 | * | hmmmm quit (Remote host closed the connection) |
13:42:17 | * | hmmm joined #nim |
13:42:45 | hmmm | I'm back :o |
13:46:24 | narimiran | hmmm: where are the rest of "m"'s? |
13:47:17 | FromDiscord | <lqdev> he dropped one |
13:50:38 | planetis[m] | and i was wondering why he changed color (yes my client has bubble colors) |
13:51:00 | PMunch | My client also has coloured nicks, be he somehow has the same colour with both of those |
13:51:22 | narimiran | different color here too |
13:51:33 | FromDiscord | <lqdev> it's all white for me |
13:54:30 | ForumUpdaterBot | New thread by Gcao: Which one to choose, Asyncdispatch in Nim vs Chronos?, see https://forum.nim-lang.org/t/7101 |
14:13:30 | * | Kaivo quit (Quit: WeeChat 2.9) |
14:14:31 | ForumUpdaterBot | New thread by Zoom: Getting random non-equal int pairs, comparison of routines., see https://forum.nim-lang.org/t/7102 |
14:14:58 | * | habamax quit (Ping timeout: 246 seconds) |
14:15:44 | Oddmonger | i import foo in a.nim , and then import a.nim in b.nim . How can i use «foo» in b.nim ? |
14:16:09 | Oddmonger | it seems that «foo» is only visible in a.nim |
14:18:17 | narimiran | Oddmonger: `export` |
14:18:32 | narimiran | https://nim-lang.github.io/Nim/manual.html#modules-export-statement |
14:20:15 | Oddmonger | thank you |
14:24:34 | hmmm | I have another noob question |
14:25:18 | FromDiscord | <Rika> ask away |
14:25:40 | hmmm | oh rika hi! |
14:25:58 | hmmm | so I'm trying to nimify a python function exercise I made some time ago |
14:26:20 | hmmm | I have a recursive function that uses array, should I use @seq for the nim version? |
14:26:30 | narimiran | probably |
14:28:29 | hmmm | hmm |
14:28:40 | hmmm | ok and what if I have to slice that @seq? |
14:33:43 | FromDiscord | <notchris> morning Rika |
14:33:46 | FromDiscord | <Rika> theSeq[index1..<index2] |
14:33:49 | FromDiscord | <Rika> gm to you |
14:35:22 | hmmm | ok I'm making progress |
14:37:36 | hmmm | hey rika my python fuction takes 2 parameters and returns 2, but my nim proc takes 2 but can only return one, so I can't call it recursively |
14:37:49 | narimiran | hmmm: show us your python code |
14:38:24 | hmmm | nari what is the accepted way of sharing code here |
14:38:28 | FromDiscord | <shashlick> Use a tuple return value no |
14:38:34 | * | cgfuh quit (Quit: WeeChat 2.9) |
14:39:21 | narimiran | hmmm: use my full nick (tab completion), otherwise i'm not pinged. ix.io is popular, but any code-pasting site will do |
14:39:49 | * | cgfuh joined #nim |
14:40:11 | Zevv | hmmm: use any paste thing, ix.io is popular here, you can also post it in nim playground |
14:40:12 | narimiran | hmmm: or you can even use https://play.nim-lang.org/ for non-nim code :) |
14:40:23 | Zevv | oh what narimiran says |
14:40:41 | narimiran | PMunch: are you around? |
14:40:45 | Zevv | if i wasnt engaged to disruptek yet id ask narimiran to marry me |
14:41:13 | narimiran | Zevv: disruptek didn't turn you down? i'm disappointed in him! |
14:41:28 | narimiran | i guess he *does* have a soft spot after all |
14:41:46 | Zevv | he did but not on personal grounds, something about marriage in general I bet |
14:41:58 | narimiran | yep, that's more like him |
14:42:04 | Zevv | the guy is one huge soft spot with a big mouth on it |
14:42:27 | narimiran | (no comment) |
14:44:14 | narimiran | any json-gurus around? |
14:45:17 | Zevv | what is there to guru about json |
14:45:18 | narimiran | to be more concrete: is the stuff at the end of line 2 valid json? https://play.nim-lang.org/#ix=2Enz |
14:45:46 | narimiran | these commas after which is a closing bracket |
14:46:11 | Zevv | noper |
14:46:24 | Zevv | can't do that, because json |
14:46:26 | Zevv | json is great |
14:47:45 | narimiran | Zevv: ok, thought so. thanks! |
14:49:10 | planetis[m] | narimiran: hi can you merge https://github.com/nim-lang/fusion/pull/36 please |
14:49:11 | disbot | ➥ Make module smartptrs compile and expand tests |
14:49:13 | hmmm | narimiran https://paste.ofcode.org/UU5GtfApkxQsRXwnXPzkJK |
14:49:24 | planetis[m] | without it uniqueptr doesnt compile |
14:50:01 | narimiran | planetis[m]: oh wait, i though i already merged it. or was there a similar PR touching that code? |
14:50:48 | planetis[m] | yes i made two prs. https://github.com/nim-lang/fusion/pull/37 was the one you mention |
14:50:49 | disbot | ➥ Compile smartptrs without threads:on |
14:50:57 | PMunch | narimiran, I'm here now |
14:51:06 | PMunch | Just had to pop out to the dry cleaners for a second |
14:51:26 | Zevv | dry cleaner. I don't think I ever went to the dry cleaner in my life. Does that say anything about me? |
14:51:42 | narimiran | PMunch: ok, i rebased your jsondoc PR (it is in my branch, didn't want to force-push to yours), and it seems like i found a bug :) |
14:51:52 | PMunch | Gotta get the suits ready for Christmas :) |
14:52:14 | planetis[m] | that you dont own carpets |
14:52:16 | PMunch | (and partially because I just ordered a new suit and the pants where all wrinkly and I couldn't be arsed to iron it myself) |
14:52:23 | planetis[m] | ...or suits |
14:52:45 | PMunch | narimiran, oh right, that was never merged.. |
14:52:49 | PMunch | What's the bug? |
14:53:02 | narimiran | PMunch: let me make a small repro code, just a second |
14:53:04 | planetis[m] | narimiran thanks |
14:53:07 | * | tane joined #nim |
14:54:59 | planetis[m] | oh i was looking at the wrong pr, got confused too |
14:55:19 | narimiran | planetis[m]: this one is quite a mouthful :) `if (when compileOption("threads"): atomicLoadN(addr p.val[].atomicCounter, ATOMIC_CONSUME) == 0 else: p.val[].atomicCounter == 0):` |
14:55:47 | planetis[m] | yeah i put it in a seperate one bc i wasnt sure |
14:56:08 | planetis[m] | but it works |
14:56:40 | narimiran | planetis[m]: ok, i'll merge it |
14:56:52 | planetis[m] | thanks :) |
14:58:03 | narimiran | planetis[m]: but wait, this one is older than a merged one!? |
14:58:42 | planetis[m] | yes... did i messed up the merge? |
14:59:02 | narimiran | i'm not sure (and that's the reason enough to be careful) |
14:59:17 | narimiran | can you make a new PR based on the latest master, just to be sure? |
14:59:22 | planetis[m] | ok |
14:59:34 | narimiran | planetis[m]: great, ping me when you do |
15:01:08 | Zoom[m] | Hey, guys, Is there any official/semi-official Rossetacode effort going on? |
15:01:25 | PMunch | Zoom[m], nothing coordinated I think |
15:02:28 | Zoom[m] | Too bad, it's a great resource to promote idiomatic solutions to common problems. |
15:02:56 | Zoom[m] | Everyone has some real work to do, I suppose. |
15:03:13 | PMunch | I mean there are a lot of Nim code on Rosetta (I've even added some myself), but it's not a coordinated |
15:03:18 | PMunch | effort |
15:04:21 | Zoom[m] | Yeah, I see there's a lot, but some coordination which would encourage using some particular style would be of much help |
15:05:19 | Zoom[m] | What I mean is a git repo, of course. :) |
15:05:38 | planetis[m] | narimiran: done, https://github.com/nim-lang/fusion/pull/41 |
15:05:39 | disbot | ➥ fix smartptrs |
15:06:01 | narimiran | planetis[m]: oh, this is much cleaner now!! |
15:07:31 | narimiran | PMunch: hmmm, i can create a bug when i call my newly-created `rstToJson` proc (similar to `rstToLatex`), but not when i do `nim jsondoc`. let me try to see what's going on there.... |
15:09:31 | narimiran | PMunch: this is the stuff i'm experiencing: https://play.nim-lang.org/#ix=2Enz |
15:09:47 | * | abm quit (Read error: Connection reset by peer) |
15:10:17 | PMunch | I think there's a post-process step in there somewhere |
15:12:38 | ForumUpdaterBot | New thread by Lucas_Ullon: GC Safe Problem, see https://forum.nim-lang.org/t/7103 |
15:13:24 | narimiran | PMunch: ah yes, there's `sanitize` |
15:13:33 | narimiran | `var sane = generated.replace(", ]", "]") |
15:13:34 | narimiran | ` |
15:13:35 | PMunch | :) |
15:15:28 | planetis[m] | btw, was there a reason that alignedAlloc wasn't made public? |
15:16:49 | Araq | it's semver, all the good stuff is hidden |
15:16:58 | Araq | instead you get the bugfixes that might break your code |
15:17:34 | Araq | it's all completely nuts but semver's the industry standard so don't complain |
15:18:07 | FromDiscord | <Rika> i think semver only works with applications, and even then not completely |
15:18:31 | planetis[m] | ok i won't lol |
15:23:37 | narimiran | hmmm: sorry for the slow reply. i think a third func parameter will be needed in nim version of that code |
15:27:18 | narimiran | PMunch: yep, my "helper proc" was missing one call to `sanitize`, now it is ok |
15:28:01 | FromDiscord | <alehander42> oi |
15:37:05 | * | narimiran quit (Ping timeout: 240 seconds) |
15:37:24 | * | hmmmmm joined #nim |
15:37:34 | hmmmmm | I'm back ! :> |
15:37:42 | FromDiscord | <notchris> wb +3 m's |
15:38:17 | * | narimiran joined #nim |
15:38:49 | ForumUpdaterBot | New question by Andrea T.: statically compile a Nim program in macOS, see https://stackoverflow.com/questions/64860969/statically-compile-a-nim-program-in-macos |
15:39:18 | * | hmmm quit (Ping timeout: 272 seconds) |
15:39:34 | hmmmmm | narimiran what if I make a proc that takes a 2 value tuple that has in the first spot a @seq and in the second an int? |
15:40:05 | narimiran | hmmmmm: how does that help? |
15:40:14 | hmmmmm | helps with the recursion I think |
15:40:21 | narimiran | don't think so |
15:40:25 | hmmmmm | :( |
15:42:12 | hmmmmm | why nim procs can't return more than 1 value btw? |
15:42:27 | FromDiscord | <Rika> python procs cant either |
15:42:32 | solitudesf | what are tuples |
15:42:38 | hmmmmm | oh |
15:43:01 | hmmmmm | I'll keep trying, there must be a way |
15:43:12 | Prestige | return a tuple |
15:43:20 | Prestige | return (x, y) |
15:43:25 | hmmmmm | I agree! |
15:43:31 | hmmmmm | but x must be a seq! |
15:44:02 | solitudesf | so? |
15:44:07 | Prestige | proc foo(): (x: seq[int], y: string) |
15:44:45 | FromDiscord | <Rika> and x can be a seq idgi |
15:44:58 | FromDiscord | <Rika> tuples are just simpler objects |
15:45:12 | FromDiscord | <notchris> tuples confuse me idk why |
15:45:14 | solitudesf | Prestige, thats some weird mix or named/unnamed tuple syntax |
15:45:15 | Zevv | dont tuple |
15:45:18 | Zevv | they're nasty |
15:45:26 | Zevv | second class citizens |
15:45:28 | hmmmmm | Prestige can I do it like this -> proc foo(): (x: seq[int], y: int) : x: seq[int], y: int = |
15:45:39 | solitudesf | what |
15:46:07 | FromDiscord | <Rika> what |
15:46:14 | hmmmmm | I mean the proc must be able to call himself so it should return a seq and an in too |
15:46:19 | FromDiscord | <Rika> i dont understand what youre trying to do |
15:46:21 | FromDiscord | <Rika> no |
15:46:51 | Prestige | yeah I meant: https://play.nim-lang.org/#ix=2EnY |
15:46:54 | FromDiscord | <Rika> `proc foo(a: tuple[x: seq[int], y: int]): tuple[x: seq[int], y: int]` |
15:47:19 | hmmmmm | rika! |
15:47:23 | FromDiscord | <Rika> or just var it |
15:47:24 | hmmmmm | it's perfect |
15:47:36 | narimiran | hmmmmm: should your python proc return `[4, 5]`, or `9`? |
15:47:45 | hmmmmm | I'll try to use that first and maybe try the var later |
15:48:00 | hmmmmm | it should return [4,5] the only subset that sums to 9 |
15:48:05 | narimiran | hmmmmm: also, python pro-tip NEVER use `sum` as a variable name |
15:48:18 | hmmmmm | lol nari I'll keep in mind |
15:49:01 | narimiran | hmmmmm: and what if `listx` was `[3, 4, 5, 6]`? |
15:49:07 | narimiran | now it returns just `[3, 6]` |
15:49:23 | bung | I'd like to change a old test file to unittest style, does this kind of PR acceptable ? |
15:49:36 | hmmmmm | nari it returns the first subset that sums to 9 |
15:49:46 | bung | current it use doAssert |
15:50:20 | * | hnOsmium0001 joined #nim |
15:50:24 | FromDiscord | <flywind> `doassert` is preferred than `unittest` in `testament`. |
15:51:10 | notchris | whats the deal with flylind |
15:51:15 | notchris | why is that a default |
15:51:30 | Araq | bung, I prefer the other direction |
15:51:44 | notchris | oh wait its not a bot |
15:51:46 | notchris | jk |
15:52:01 | Araq | replace unittest based tests with testament tests |
15:52:43 | bung | when I run it directly I only get AssertionDefect |
15:53:18 | bung | with check I got expect something got other thing |
15:54:06 | bung | unless the test author write assert fails message param, I'd prefer unittest |
15:54:40 | FromDiscord | <flywind> Could you give a small example? |
15:55:15 | FromDiscord | <flywind> You could use raise and doAssertRaises I think |
15:55:16 | * | MyMind quit (Ping timeout: 256 seconds) |
15:56:09 | bung | https://paste.ofcode.org/3aTWYpcRkXhP9UBrsZX7pnj |
15:58:04 | FromDiscord | <flywind> Anyway you could use `unittest` locally and remove it when pushing. |
15:58:35 | FromDiscord | <notchris> just dont use tets |
15:58:37 | FromDiscord | <notchris> tests |
15:58:41 | FromDiscord | <notchris> problem solved |
15:58:55 | FromDiscord | <alehander42> 😄 |
15:58:56 | * | notchris hides |
15:59:13 | bung | no, that's not how things solved |
15:59:19 | * | hmmmm joined #nim |
15:59:23 | notchris | ORLY |
16:01:09 | * | hmmmmm quit (Ping timeout: 256 seconds) |
16:01:24 | * | krux02 joined #nim |
16:03:47 | FromDiscord | <Rika> cant break code if there is none |
16:04:24 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
16:06:17 | hmmmm | rika it works |
16:06:30 | FromDiscord | <Rika> congrats |
16:06:35 | hmmmm | I mean I'm able to pass data to it and echo it to console |
16:06:39 | hmmmm | still big steps |
16:10:12 | narimiran | hmmmm: here you go: https://play.nim-lang.org/#ix=2Eo9 |
16:10:47 | narimiran | spoiler alert: no tuples needed |
16:13:30 | * | blueberrypie quit (Quit: Ping timeout (120 seconds)) |
16:13:58 | * | blueberrypie joined #nim |
16:15:05 | * | hmmmmm joined #nim |
16:15:25 | * | MyMind joined #nim |
16:15:51 | hmmmmm | :0 |
16:15:56 | hmmmmm | nami that's very pretty |
16:16:02 | hmmmmm | how did you avoid tuples |
16:16:11 | narimiran | hmmmmm: by reading your python code |
16:16:17 | hmmmmm | :> |
16:16:17 | FromDiscord | <Rika> oof |
16:16:43 | narimiran | hmmmmm: where are tuples there!? |
16:16:52 | hmmmmm | I see no tuples! |
16:17:33 | * | hmmmm quit (Ping timeout: 260 seconds) |
16:19:31 | hmmmmm | return @[] is like returning none? |
16:19:43 | narimiran | hmmmmm: no, it returns an empty sequence |
16:20:01 | narimiran | that's the biggest difference between the two versions, IMO |
16:20:21 | hmmmmm | so if @[] evalues to false? |
16:20:27 | narimiran | no |
16:20:32 | narimiran | read my code |
16:20:38 | hmmmmm | I'm trying lol :D |
16:21:02 | narimiran | there's no implicit "booleaness" of 0 or zero-length stuff in nim |
16:21:11 | narimiran | you cannot do `while 1` |
16:21:16 | hmmmmm | oh |
16:21:16 | narimiran | or `if someInt` |
16:21:28 | hmmmmm | and what people do instead |
16:21:35 | narimiran | what i did |
16:21:38 | narimiran | `if withv.len > 0:` |
16:21:46 | hmmmmm | ah ok makes sense |
16:22:40 | solitudesf | amazing |
16:23:17 | hmmmmm | is it possible to make the same function but with a var parameter outside the function |
16:23:17 | * | solitudesf quit (Quit: Leaving) |
16:23:32 | narimiran | probably |
16:23:42 | * | MyMind quit (Ping timeout: 260 seconds) |
16:25:36 | hmmmmm | I've seen it in the tutorial functions that return nothing because they manipulate the external var |
16:25:39 | hmmmmm | it's interesting |
16:25:52 | hmmmmm | people do it a lot or it's an edge case? |
16:26:11 | narimiran | neither? :D |
16:26:14 | hmmmmm | lol |
16:26:20 | hmmmmm | :> |
16:27:16 | hmmmmm | ok, I'll try to look some other mini project to nimify, thanks for all the help people c u soon :> |
16:31:17 | * | MyMind joined #nim |
16:35:06 | * | hmmmm joined #nim |
16:36:51 | * | hmmmmm quit (Ping timeout: 256 seconds) |
16:39:35 | * | natrys joined #nim |
16:44:45 | * | hmmmmm joined #nim |
16:46:05 | * | hmmmm quit (Ping timeout: 260 seconds) |
16:47:39 | * | PMunch quit (Quit: leaving) |
16:57:20 | FromGitter | <eagledot> can somebody take a look ...https://play.nim-lang.org/#ix=2Eoe (https://play.nim-lang.org/#ix=2Eoe) |
16:57:55 | * | neceve quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
16:58:20 | * | neceve joined #nim |
16:59:16 | FromGitter | <eagledot> Actually updated ....https://play.nim-lang.org/#ix=2Eof (https://play.nim-lang.org/#ix=2Eof) |
17:08:42 | bung | should I merge my two PRs on same lib even on differient purpose ? |
17:15:13 | disruptek | no. |
17:18:59 | bung | test file has constant result compare that may not able auto solve comflicts. |
17:30:46 | * | hmmm joined #nim |
17:33:06 | * | habamax joined #nim |
17:41:56 | * | bung quit (Quit: Lost terminal) |
17:46:27 | * | thomasross joined #nim |
17:54:53 | disruptek | depend the 2nd PR upon the 1st. |
17:57:01 | FromDiscord | <Vindaar> @Zevv saw your heatmaps earlier. Thought I'd come in and post a ggplotnim solution only to end up fixing some issues. So thanks I guess, haha. Well, for anyone who doesn't want to use gnuplot: https://play.nim-lang.org/#ix=2Eot |
17:58:21 | FromDiscord | <Vindaar> https://media.discordapp.net/attachments/371759389889003532/777955728987521042/heatmap.png |
17:58:23 | hmmmmm | hallo nimlets |
17:58:37 | Zevv | that's neat |
17:59:24 | FromDiscord | <Vindaar> 🙂 |
17:59:50 | hmmmmm | nari u still around? |
18:02:54 | * | hmmm quit (Ping timeout: 265 seconds) |
18:05:47 | * | ehmry joined #nim |
18:10:04 | hmmmmm | how does a proc knows it should return something if you never specify "return"? |
18:10:16 | Zevv | the type of the last expression |
18:10:33 | Zevv | or assigning to `result` |
18:10:36 | hmmmmm | and how does it knows that it's the last one |
18:10:47 | Zevv | because there is nothing coming after it? |
18:10:47 | hmmmmm | oh so result is a special keyword like return? |
18:11:02 | Zevv | no, it's more like a magically injected variable |
18:11:13 | hmmmmm | hmm |
18:11:14 | Zevv | every proc with a return type has this variable |
18:11:41 | hmmmmm | wait I test something |
18:15:55 | FromDiscord | <LlamaLad7> which editor/editor plugin would you say has the best nim support at the moment? |
18:16:17 | FromDiscord | <Recruit_main707> vscode |
18:16:51 | FromDiscord | <Recruit_main707> vim would probably come second |
18:17:00 | FromDiscord | <Recruit_main707> https://github.com/nim-lang/Nim/wiki/Editor-Support |
18:17:10 | FromDiscord | <LlamaLad7> is that in order of completeness or something? |
18:17:46 | FromDiscord | <Recruit_main707> no |
18:18:00 | FromDiscord | <Recruit_main707> wait, what i said yes |
18:18:08 | FromDiscord | <Recruit_main707> the github list not |
18:18:13 | FromDiscord | <LlamaLad7> ok |
18:18:42 | FromDiscord | <LlamaLad7> thanks |
18:19:49 | Zoom[m] | Vindaar, wow, that's cool! Totaly missed the package. Post it on forum https://forum.nim-lang.org/t/7102 |
18:22:16 | hmmmmm | Zevv I made a test proc, it works if I use return, it makes strange noises if I use result, and if I don't use neither it says the variable I want to return "is declared but not used" |
18:22:52 | Zevv | show the code |
18:23:36 | FromGitter | <sealmove> @PMunch is it possible to call a read within a custom parser? In your example (http://ix.io/2EiE) `proc parseDnsName` only uses primitive reads like `readChar`. If codegen produced predictable names you could call a custom parser, but since `gensym` is used... |
18:25:12 | FromGitter | <sealmove> for example how would you do a conditional field of non-primitive type? |
18:25:20 | hmmmmm | https://paste.ofcode.org/AP24CHyT3BCivB3nX2XGcU |
18:30:14 | FromDiscord | <nikki> https://twitter.com/lzsthw/status/1328403367467610116?s=21 |
18:30:23 | FromDiscord | <nikki> some async-related questions from this person on twitter |
18:30:40 | FromDiscord | <nikki> i haven't used async much so didn't answer, but maybe someone else here is more familiar |
18:30:58 | FromDiscord | <nikki> (they posted their code in a previous tweet that this responds to) |
18:31:25 | * | abm joined #nim |
18:31:44 | * | abm quit (Client Quit) |
18:32:29 | * | jjido joined #nim |
18:41:41 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:44:56 | * | jjido joined #nim |
18:45:04 | FromDiscord | <alehander42> https://www.youtube.com/watch?v=qMtyTXDc9Fw disruptek |
18:45:23 | FromDiscord | <alehander42> i know you need that |
18:45:36 | FromDiscord | <alehander42> wow |
18:45:41 | FromDiscord | <alehander42> this is zed shaw? |
18:46:15 | planetis[m] | @dom96: ^ |
18:46:39 | FromDiscord | <alehander42> yeah @dom96 engage |
18:46:49 | disruptek | solution: use cps and not async/await. |
18:46:49 | FromDiscord | <alehander42> he is author of the probably most famous python book |
18:47:17 | FromDiscord | <alehander42> (edit) "he is author of the probably ... mostread" added " one of the" | "famous" => "read" | "book" => "books" |
18:47:44 | FromDiscord | <alehander42> (edit) "yeah @dom96 ... engage(maybe" added "we can" | "we canengage ... " added "(maybe inviting him to irc)" |
18:49:38 | planetis[m] | to late for edits (we can see them on irc), what you wanted to really say is: "dom unleash the beast" |
18:50:55 | FromDiscord | <alehander42> hahaha |
18:51:17 | FromDiscord | <alehander42> he .. uses nim a lot |
18:51:23 | FromDiscord | <alehander42> in the last several days |
18:51:41 | FromDiscord | <alehander42> could really use some context I guess |
18:51:45 | planetis[m] | btw is he using async wrong or that's how is it supposed to be written? |
18:52:10 | FromDiscord | <alehander42> https://twitter.com/lzsthw/status/1323291423752544262 |
18:52:22 | FromDiscord | <alehander42> ^ ok .. I really should go back to work 😄 😄 |
18:52:26 | FromDiscord | <alehander42> which reminds me |
18:54:41 | disruptek | sasha: wtf. |
18:54:51 | disruptek | the bridegroom only comes once? at midnight? |
18:55:25 | disruptek | async is not supposed to be written. |
18:56:09 | * | vicfred joined #nim |
18:56:13 | FromDiscord | <alehander42> wow that is the lamp parable |
18:56:20 | FromDiscord | <alehander42> i didn't make the connection before I think. |
18:56:44 | FromDiscord | <alehander42> I probably thought about revelation |
18:57:27 | FromDiscord | <alehander42> I really like the 7nd one: Remain with us, O Lord of Hosts |
18:59:21 | disruptek | this really is the best programming soundtrack. |
18:59:31 | disruptek | i mean, if you're a prudish evangelical. |
18:59:41 | FromDiscord | <alehander42> it's literally russian orthodox music |
19:00:00 | FromDiscord | <alehander42> 😄 |
19:00:32 | FromDiscord | <Daniel> Would it not be awesome for all this chat in discord/irc to be available on some live blog form, where it would stay forever on internet and be accessible through search engines, for educational and historical reasons |
19:00:46 | disruptek | well, it is. |
19:00:48 | FromDiscord | <alehander42> this amazing conversation inspired you, right |
19:01:05 | FromDiscord | <alehander42> imagine people in the tribulation analyzing it |
19:01:30 | FromDiscord | <Daniel> last week or two, this is the most exciting discord server for me, i am a member of more than dozen discord servers |
19:01:43 | disruptek | you need to get out more. |
19:01:45 | disruptek | just sayin'. |
19:01:59 | FromDiscord | <nikki> lulz |
19:02:05 | FromDiscord | <nikki> i went outside yday, was p solid |
19:02:08 | FromDiscord | <nikki> went to a park |
19:02:14 | FromDiscord | <nikki> sat on a blanket |
19:02:43 | FromDiscord | <Daniel> park is nice, contains good ions 😉 |
19:02:59 | FromDiscord | <alehander42> i want to go to taiga |
19:03:25 | FromDiscord | <alehander42> where are you from? |
19:03:32 | disruptek | planet xantu. |
19:03:54 | FromDiscord | <alehander42> ew |
19:04:02 | FromDiscord | <alehander42> those are the bad guys |
19:04:25 | disruptek | that's a matter of perspective. |
19:04:35 | * | hmmmmm quit (Remote host closed the connection) |
19:04:39 | FromDiscord | <alehander42> disruptek my father yesterday was angry with me for talking more about US politics than bulgarian |
19:04:45 | FromDiscord | <alehander42> maybe he'd like you |
19:04:50 | disruptek | doubtful. |
19:04:59 | FromDiscord | <alehander42> you don't know him |
19:05:32 | disruptek | no, but statistically speaking, it's very unlikely. |
19:05:42 | FromDiscord | <alehander42> I like you |
19:05:45 | FromDiscord | <alehander42> it might be genetic? |
19:06:07 | disruptek | could be, i guess. crazy does seem to run in families. |
19:07:08 | FromDiscord | <alehander42> we don't run |
19:07:09 | FromDiscord | <alehander42> a lot |
19:07:12 | FromDiscord | <Daniel> also, where can i find instructions how to setup Nim IDE on win10?....at the moment i am using Notepad++, where i need every time to save the file, then switch to command prompt compile with -r switch |
19:07:14 | FromDiscord | <alehander42> i need to work on my cardio |
19:07:30 | FromDiscord | <Daniel> (edit) "switch" => "switch..then go back to Notepad++" |
19:07:48 | FromDiscord | <alehander42> Daniel, i love the fact you write complete sentences , people try to teach me that a lot and I usually fail |
19:07:58 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:08:07 | FromDiscord | <alehander42> are you ok with using `vscode` ? |
19:08:19 | FromDiscord | <alehander42> probably simplest to setup with inline terminal |
19:08:24 | FromDiscord | <alehander42> or build config |
19:10:15 | FromDiscord | <Daniel> Honestly, i dont care if its vscode, notepad++ or any other editor, as long as there are instructions how to set it up and get it running in a better workflow as opposed to my current one. |
19:11:04 | FromDiscord | <Daniel> It would be very useful for every Nim newcomer as well. |
19:11:08 | FromDiscord | <alehander42> install vscode 🙂 |
19:11:24 | FromDiscord | <Daniel> ok, sec, let me google and download it |
19:11:41 | FromDiscord | <alehander42> then https://github.com/pragmagic/vscode-nim 🙂 |
19:12:04 | FromDiscord | <alehander42> you can follow the instructions |
19:12:21 | FromDiscord | <alehander42> and use terminal from Ctrl+Shift+` |
19:12:47 | FromDiscord | <alehander42> also, use ctrl+P and ctrl+shift+P |
19:12:48 | FromDiscord | <alehander42> a lot |
19:13:04 | FromDiscord | <alehander42> if you haven't used sublime or similar editor with command pallete |
19:13:09 | FromDiscord | <alehander42> i think those are the basic |
19:13:10 | FromDiscord | <alehander42> (edit) "basic" => "basics" |
19:16:21 | FromDiscord | <Daniel> do i install this one? https://media.discordapp.net/attachments/371759389889003532/777975360079659028/unknown.png |
19:16:45 | FromDiscord | <Daniel> Indeed, i nver used sublime or similar editor |
19:16:52 | FromDiscord | <Daniel> (edit) "nver" => "never" | "editor" => "editor." |
19:16:59 | FromDiscord | <nikki> https://marketplace.visualstudio.com/items?itemName=kosz78.nim |
19:17:07 | FromDiscord | <nikki> go to this ^ specific link |
19:17:31 | FromDiscord | <Daniel> k, sec |
19:19:38 | FromDiscord | <Daniel> Alright, i installed that particular extension, so far so good 👍 |
19:20:36 | * | PMunch joined #nim |
19:20:53 | FromDiscord | <nikki> time to code some nim 🙂 |
19:21:17 | FromDiscord | <Daniel> Looking into settings of this extensions, should do any particular setup? |
19:22:49 | FromDiscord | <alehander42> just follow the repo https://github.com/pragmagic/vscode-nim |
19:23:07 | FromDiscord | <alehander42> for the configuration |
19:23:22 | FromDiscord | <alehander42> i am not sure if it's super important to set it up |
19:23:40 | PMunch | Hmm, would be an interesting mini-series. Have the "famous" Nimmers show off their set-ups for Nim development |
19:25:04 | FromDiscord | <alehander42> 😄 dom96 and "i wrote my own ide once" |
19:25:13 | FromDiscord | <alehander42> yeah, many vim-ers |
19:25:15 | FromDiscord | <alehander42> i guess |
19:25:39 | FromDiscord | <alehander42> and Araq coming out with the "unix is wrong" stuff |
19:27:12 | ForumUpdaterBot | New thread by Zulu: Is there a torrent library for Nim?, see https://forum.nim-lang.org/t/7105 |
19:28:53 | PMunch | I'm a vim-er at least, but my set-up is pretty minimal |
19:29:04 | PMunch | I don't even have bindings for the LSP functions |
19:29:25 | PMunch | So I end up typing `:LspDefinition` every time I want to jump to def :P |
19:29:51 | * | hmmm joined #nim |
19:30:13 | FromDiscord | <dom96> I'm answering ^^^ |
19:30:34 | hmmm | hulla! |
19:31:49 | * | bung joined #nim |
19:31:58 | hmmm | vscode setup was very simple for me, you just search "nim" in the extension panel and install the first one |
19:32:13 | hmmm | if I did it anyone can do eet |
19:33:09 | FromDiscord | <haxscramper> Fusion CI fails on all tasks with `Unable to process command '::add-path::/home/runner/work/fusion/fusion/nim/bin' successfully.` ... `` Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. `` - I pushed PR with fix https://github.com/nim-lang/fusion/pull/35 (along with option to `[skip ci]` (like in main nim repo)) |
19:33:10 | disbot | ➥ Allow skipping CI run on commit, copied from Nim/#15289 (with fix from Nim/#15556) |
19:33:15 | FromDiscord | <Daniel> Success!!↵i just tested my first code in VSC:↵Although, Avast goes crazy when pressing F6, lol ...i like this, much better than manually doing compilation and saving in Notepad++ https://media.discordapp.net/attachments/371759389889003532/777979611501690900/unknown.png |
19:33:17 | FromDiscord | <haxscramper> Could someone look at it |
19:33:56 | FromDiscord | <haxscramper> In total it is a five-line fix |
19:40:41 | FromDiscord | <haxscramper> By the way, @alehander42 - I started writing article I talked about several days prior - https://gist.github.com/haxscramper/ad781ebd5a343b53197bf538a1252f83 - not finished yet, but `flow` macro idea turned out to be quite interesting |
19:40:44 | * | abm joined #nim |
19:41:23 | FromDiscord | <alehander42> hey , very cool |
19:41:40 | FromDiscord | <alehander42> it was a good example, I guess? |
19:41:54 | FromDiscord | <alehander42> are you planning on making flow a package |
19:42:42 | FromDiscord | <haxscramper> Yeah. Probably a bit too complicated though, because by the end of article there is too much code that is basically implementation details all over the place, so I need to make better explanation for this part too. |
19:43:32 | FromDiscord | <haxscramper> @alehander42 I thought about this - maybe sometime in the future, but for now `mapIt` is good enough. Though it does not look that pretty. And `zero_functional` is a good alternative too. |
19:44:23 | FromDiscord | <haxscramper> For now this is a "leave implementation details to the reader" or something like that. Although I wrote macro itself and added it to test suite |
19:44:37 | FromDiscord | <haxscramper> With support for only `map`, `filter` and `each` |
19:46:33 | * | waleee-cl joined #nim |
19:49:55 | * | vicfred quit (Quit: Leaving) |
19:52:44 | PMunch | narimiran, thanks for keeping my PRs up to date :) |
19:53:24 | FromDiscord | <Vindaar> @Zoom: thanks! Yes, I can post about it later |
19:54:19 | FromGitter | <sealmove> oh hey PMunch, if you read my question above it's wrong. I realized what's the problem. When making a custom parse proc, if you want to return something compatible with another parser, the return type will be a mess of nested tuples. I was wondering if there is a way around this. (if you don't understand what I am tell me and I'll make a demo). |
19:55:10 | Zoom[m] | Vindaar, I meant, just in that particular. I have no doubt you've posted about that whole awesome library and gained the deserved interest! |
19:55:21 | Zoom[m] | * Vindaar, I meant, just in that particular topic. I have no doubt you've posted about that whole awesome library and gained the deserved interest! |
19:55:31 | FromDiscord | <Vindaar> Haha, I'm aware, yes |
19:55:44 | FromDiscord | <Vindaar> There already is a thread about ggplotnim on the forum anyway |
19:56:09 | FromDiscord | <Vindaar> (pinging works fine from Matrix to Discord using `@` btw) |
19:56:38 | Zoom[m] | Yeah, I just understood my comment may have sounded a bit condescending, unintentionally. Thanks for the tip. |
19:57:15 | FromDiscord | <Vindaar> what, no. I didn't understand it that way, don't worry! |
19:58:03 | PMunch | sealmove, not entirely sure what you mean |
19:58:19 | PMunch | Do you want something that could add fields into the origin tuple? |
19:58:26 | * | jjido joined #nim |
19:58:38 | FromGitter | <sealmove> I'll show, w8 |
20:03:02 | FromDiscord | <alehander42> ok @haxscramper |
20:03:11 | FromDiscord | <alehander42> i hope i ll be able to look at it later |
20:05:21 | FromDiscord | <haxscramper> Alright. And also - do you know how I can get someone to review the implementation? Because it is mostly done ... technically. `Yardanico` said I could probably ping `timotheecour` for that |
20:05:57 | FromDiscord | <haxscramper> But I'm kind of hesitant to ping people just becase |
20:06:04 | FromDiscord | <alehander42> oh ping him |
20:06:46 | FromDiscord | <alehander42> i think he |
20:06:47 | FromGitter | <sealmove> custom parse procs have to return a tuple right? |
20:06:51 | FromDiscord | <alehander42> might have feedback |
20:06:53 | FromDiscord | <alehander42> if he has time |
20:07:07 | * | habamax quit (Ping timeout: 265 seconds) |
20:08:42 | PMunch | sealmove, don't think so |
20:09:18 | FromGitter | <sealmove> I assumed so because you used `tuple[labels: seq[string]]` instead of simply `seq[string]` |
20:10:49 | PMunch | Maybe I just like tuples :P |
20:11:03 | disruptek | kinky. |
20:11:17 | PMunch | It might have to be a tuple |
20:11:23 | PMunch | TBH I don't remember :P |
20:12:47 | FromGitter | <sealmove> well that's besides the point |
20:14:35 | hmmm | hey I have a stupid question |
20:14:42 | PMunch | Fire away |
20:15:17 | hmmm | I'm looking into the docs of parsecsv and there is from os import Parastr and from streams import newfilestream |
20:15:22 | hmmm | what do they do |
20:15:35 | disruptek | look at the docs for os, or the docs for streams. |
20:15:41 | hmmm | hmm |
20:15:44 | hmmm | how |
20:15:46 | disruptek | weird, i know. |
20:15:55 | disruptek | how did you look at the docs for parsecsv? |
20:16:03 | hmmm | looked on google :D |
20:16:07 | disruptek | try that. |
20:16:11 | hmmm | :| |
20:16:42 | PMunch | Stop being mean to him disruptek :P |
20:16:51 | disruptek | nothing mean about it. |
20:16:53 | hmmm | tell him PMunch |
20:16:58 | PMunch | hmmm, do you wonder what those procedures do, or what that syntax does? |
20:17:08 | hmmm | yes |
20:17:09 | PMunch | Like `from X import Y` |
20:17:26 | * | lritter quit (Ping timeout: 264 seconds) |
20:17:30 | hmmm | what do they do and if I need them to read a csv |
20:19:02 | PMunch | Well the `from X import Y` syntax just imports a specific thing from a module without importing the entire module |
20:19:14 | PMunch | Useful if you have naming clashes between modules |
20:19:27 | FromDiscord | <nikki> paramStr is for reading command line arguments to the program. it's just for the example in the parsecsv docs |
20:19:42 | FromDiscord | <nikki> newFileStream is for opening a stream to read from a file. again it's just for that example |
20:19:43 | PMunch | newFileStream does well, create a new file stream, which is an interface for reading a file |
20:19:52 | hmmm | ah ok it's like argparse from python |
20:19:55 | FromDiscord | <nikki> the example in the docs is taking a name of a file as a command line argument and reading that, so it uses those |
20:20:02 | hmmm | I always need stram to open from a file? |
20:20:21 | FromDiscord | <nikki> nah you can just do `open(...)` and use that |
20:20:28 | hmmm | ah ok |
20:20:37 | hmmm | that makes sense |
20:20:39 | FromGitter | <sealmove> here you go https://play.nim-lang.org/#ix=2Ep9. Now... the problem is the type signatures of `parseConditionalU8` and `encodeConditionalU8`. the more complex parser `inner` gets, the more complex these signatures will get. Can easily imagine having 3 levels of nested tuples with 8 fields each. |
20:21:44 | FromGitter | <sealmove> i think it would be nice if binaryparse produced aliases for those |
20:23:25 | PMunch | Well you can do this: https://play.nim-lang.org/#ix=2Epa |
20:23:50 | PMunch | `typeGetter` is super poorly named, and should be renamed though.. |
20:23:54 | FromGitter | <sealmove> oh ok i was looking exactly for something like this |
20:24:24 | PMunch | And probably documented.. It was initially only used internally, but I found it useful so I exported it without telling anyone :P |
20:25:39 | FromGitter | <sealmove> Yeah this will do ;D |
20:26:07 | PMunch | You could of course do this as well: https://play.nim-lang.org/#ix=2Epc |
20:26:11 | PMunch | If you want an alias |
20:29:10 | FromGitter | <sealmove> sure, just needed a way to generate the type, and you've already exposed it |
20:29:35 | * | vicfred joined #nim |
20:30:27 | * | apahl quit (Ping timeout: 260 seconds) |
20:30:34 | PMunch | But yeah, feel free to come up with a better name and add a `deprecated` tag to it |
20:30:51 | * | apahl joined #nim |
20:31:32 | FromGitter | <sealmove> oook |
20:32:16 | hmmm | hey PMunch what is the official doc on opening files and readlines |
20:34:05 | PMunch | Huh? |
20:34:35 | PMunch | Not the official, but may I recommend: https://peterme.net/handling-files-in-nim.html |
20:34:40 | planetis[m] | good question |
20:34:52 | hmmm | that's perfect |
20:34:58 | hmmm | thanks munchie |
20:35:08 | PMunch | Haha, no problem :) |
20:35:29 | PMunch | This is the official docs by the way: https://nim-lang.org/docs/io.html#readLine%2CFile |
20:35:45 | PMunch | `io` is automatically imported by system |
20:36:02 | hmmm | yea I can't read that unfortunately, will stick with the first link |
20:36:16 | hmmm | wtf is a tainted string |
20:36:30 | planetis[m] | nothing ignore it |
20:36:43 | hmmm | lol :D |
20:36:47 | hmmm | I'm sorry I'm just a noob |
20:37:23 | PMunch | Haha |
20:37:28 | * | vicfred quit (Quit: Leaving) |
20:37:31 | PMunch | TaintedString is just a distinct string |
20:37:49 | PMunch | It's just to make sure that you think about where the string came from and that you handle it properly |
20:38:14 | hmmm | hmmm |
20:38:18 | Zevv | which in practice is converting it to .string right away |
20:38:27 | Zevv | because you can't do anything else with it |
20:39:11 | PMunch | Well you should implement your own stringification that does escaping and such |
20:39:49 | Zevv | and you should floss twice a day |
20:39:51 | PMunch | But yeah, some of the `escape` procedures should probably take a TaintedString and return a string |
20:39:55 | PMunch | Haha :P |
20:44:43 | Zoom[m] | "Since this is a rather simple topic..." famous last words |
20:45:27 | disruptek | just delete whatever you don't recognize. |
20:45:29 | PMunch | Haha :P |
20:45:46 | PMunch | Well it's comparatively simple to my other articles on macros and such |
20:46:07 | PMunch | Oh, I've still got some half-finished articles on async and threads.. |
20:46:12 | PMunch | I should get those out the way |
20:46:23 | disruptek | just in time to deprecate async. |
20:46:29 | PMunch | Haha :P |
20:46:37 | PMunch | Yeah they have been a bit of a moving target.. |
20:46:48 | PMunch | Which is part of why they have taken so long |
20:49:12 | hmmm | .lines is an iterator right? |
20:49:35 | PMunch | Yup |
20:49:54 | hmmm | ok I will need that |
20:50:01 | hmmm | to save I just close() right? |
20:51:29 | PMunch | Yup |
20:51:36 | PMunch | `close` calls flush |
20:54:29 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:55:26 | * | Jesin quit (Quit: Leaving) |
20:56:04 | * | natrys quit (Ping timeout: 246 seconds) |
20:56:38 | * | opal quit (Remote host closed the connection) |
20:58:02 | * | opal joined #nim |
21:03:13 | * | neceve quit (Ping timeout: 264 seconds) |
21:05:57 | PMunch | Hmm, I'm considering to split the `monitor` parameter for notifishower.. |
21:08:42 | * | natrys joined #nim |
21:13:18 | FromDiscord | <alehander42> woww |
21:13:22 | FromDiscord | <alehander42> what happened to async 😦 |
21:13:40 | PMunch | Something happened to async? |
21:15:38 | FromDiscord | <alehander42> disruptek doesn't love it |
21:17:34 | * | bung quit (Quit: Lost terminal) |
21:17:40 | PMunch | Is there anyone who loves it? |
21:18:50 | * | Jesin joined #nim |
21:18:54 | * | Jesin quit (Remote host closed the connection) |
21:22:28 | FromDiscord | <ElegantBeef> Is there anything disruptek loves? |
21:22:34 | FromDiscord | <kodkuce> @dom96 am i tarded or what, i wanted to install nim in documents/apps/nim |
21:22:57 | FromDiscord | <kodkuce> choosenim --choosenimDir:/home/me/Documents/Apps/nim/choosenim --nimbleDir:/home/me/Documents/Apps/nim/nimble stable |
21:23:33 | FromDiscord | <kodkuce> when i run nim i get Error: getAppFilename failed. (Error was: Unable to read /home/me/.choosenim/current. (Error was: No installation has been chosen. (File missing: /home/me/.choosenim/current))) |
21:23:59 | FromDiscord | <kodkuce> do i need to exporth choosenim path too? |
21:24:17 | disruptek | i love replacing dom's tooling. |
21:25:20 | FromDiscord | <kodkuce> exporting choosenim part dident help |
21:25:29 | FromDiscord | <kodkuce> any good replace xD |
21:25:38 | disruptek | ~gitnim |
21:25:38 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
21:26:14 | * | Jesin joined #nim |
21:26:38 | PMunch | Ohohoh, do nimsugges next disruptek :P |
21:27:12 | disruptek | it works okay for me. |
21:28:01 | disruptek | probably because dom didn't write it. |
21:28:54 | FromDiscord | <kodkuce> xD |
21:29:12 | FromDiscord | <kodkuce> only thing that sux there is no gitnim in repo |
21:29:24 | disruptek | what? |
21:29:47 | FromDiscord | <kodkuce> i cant just xbps-install gitnim not in repo |
21:30:01 | disruptek | wtf is xbps-install? |
21:30:18 | FromDiscord | <kodkuce> shhh |
21:30:18 | disruptek | it's choosenim for choosey nimions, not nimskulls. |
21:31:25 | FromDiscord | <kodkuce> hmm i have to have nim installed to build gitnim? |
21:32:00 | disruptek | did you go to the web-site? it explains the three trivial steps to setup. |
21:32:39 | * | vicfred joined #nim |
21:33:10 | FromDiscord | <kodkuce> i dident got why you exporting path then i saw you have nim bins there too |
21:33:26 | FromDiscord | <kodkuce> only thing that is issue now is why name it git nim |
21:33:35 | FromDiscord | <kodkuce> wont it conflick with git ? |
21:33:35 | disruptek | keep reading, chucklhead. |
21:34:29 | FromDiscord | <kodkuce> hmm i did i did |
21:35:06 | FromDiscord | <kodkuce> "git nim" = dont like it, why dident make it togheter or _ connected |
21:35:28 | disruptek | ...only because then it wouldn't work. 🙄 |
21:35:38 | disruptek | i swear, i don't know why i try with you guys. |
21:37:58 | FromDiscord | <exelotl> is there a way to turn an ident in to a template into a string? |
21:38:23 | disruptek | what? |
21:38:38 | hmmm | hmmmm |
21:38:41 | FromDiscord | <exelotl> wait sorry I mistyped that |
21:38:55 | hmmm | I get IOError when reading from a text file :| |
21:39:06 | FromDiscord | <kodkuce> hmm sorry i dont like that git nim :(, i rm it and sybolic link choosenim to home like tard |
21:39:21 | PMunch | hmmm, sure you have the right path and such? |
21:39:27 | disruptek | cool. one less user to worry about. |
21:39:33 | FromDiscord | <kodkuce> :( |
21:39:34 | hmmm | path is the same of the script |
21:40:42 | FromDiscord | <exelotl> What I mean is, I want something like `template greet(a: untyped)`↵I call it like `greet(Foo)` and it expands to `echo "Hello Foo"` |
21:41:15 | disruptek | you can take the strVal of the ident or just repr it. people like to astAsStr but i'm not a fan. |
21:42:09 | FromDiscord | <nikki> yeah `$ident` wfm |
21:42:16 | FromDiscord | <kodkuce> from where does nim know to look for choosenim anywya is that hardcoded? |
21:42:20 | FromDiscord | <kodkuce> (edit) "hardcoded?" => "hardcoded when build?" |
21:42:40 | FromDiscord | <nikki> @kodkuce nim isnt' looking for choosenim. choosenim installs nim somewhere. the place the binaries are need to be put on your path. |
21:43:00 | disruptek | actually, there's some kinda stupid-ass fucking shim shit going on. |
21:43:06 | FromDiscord | <exelotl> ah I was looking for a solution that can work in a template instead of a macro - I guess astToStr does the trick |
21:43:42 | FromDiscord | <kodkuce> @nikki you sure cuz running nim whitout choosnim in home . gives me Error: getAppFilename failed. (Error was: Unable to read /home/me/.choosenim/current. |
21:44:22 | FromDiscord | <kodkuce> disruptek is right there is some wirdo magic goin on |
21:44:56 | FromDiscord | <nikki> have u gotten nim to work ever yet? |
21:44:58 | FromDiscord | <nikki> or is this your first time? |
21:45:36 | hmmm | I think he is looking in the wrong folder |
21:45:42 | hmmm | is there some kind of get cwd? |
21:46:09 | disruptek | yes. |
21:46:15 | hmmm | :| |
21:46:17 | PMunch | getCurrentDir in os |
21:46:21 | hmmm | <3 |
21:46:33 | disruptek | thanks, munchie. |
21:46:39 | hmmm | always |
21:47:04 | FromDiscord | <kodkuce> its not my first time tough duno what has to do with anything |
21:47:19 | disruptek | the first time is always pretty messy. |
21:47:43 | FromDiscord | <kodkuce> i know you dident mean that in Nim context xD |
21:48:45 | hmmm | I knew it was totally the wrong this! |
21:48:50 | hmmm | directory I mean |
21:49:54 | hmmm | so I guess I'll use setcurrentdir |
21:50:04 | disruptek | hmmm. |
21:50:05 | hmmm | but why the cwd is not the place where the nim script is |
21:50:30 | PMunch | NimScript? Or Nim? |
21:50:40 | hmmm | nim file |
21:50:44 | hmmm | I think |
21:50:46 | PMunch | getCurrentDir gets the directory executed from |
21:50:50 | PMunch | Or the binary path |
21:52:38 | FromDiscord | <Zachary Carter> you want `currentSourcePath` from the `os` module |
21:52:56 | FromDiscord | <Zachary Carter> I think anyway |
21:53:26 | disruptek | it's because they are using -r and the default outdir is .cache |
21:55:21 | hmmm | yea it works, if I put a.txt into c:/users/hmmm it gets read |
21:55:31 | hmmm | might be some strange vscode settings? |
21:55:48 | hmmm | I want my cwd to be set at my current .nim file location |
21:57:38 | PMunch | Did you try `currentSourcePath` like Zachary suggested? |
21:58:00 | hmmm | I'll try |
21:59:34 | * | jjido joined #nim |
21:59:56 | * | PMunch quit (Quit: leaving) |
22:00:25 | * | narimiran quit (Ping timeout: 240 seconds) |
22:02:29 | FromDiscord | <nikki> so i collect a bunch of idents as a `.compileTime.` `seq[NimNode]` somewhere to register a bunch of types that can be component types for game objects in this game thing i'm working on -- i wanted to make a static construct that lets me loop over the idents and substitute them |
22:02:58 | FromDiscord | <nikki> so like `forEachType: doFoo[T](...)` where `T` would be substituted with each type |
22:03:33 | FromDiscord | <dom96> @kodkuce yeah, that's a bug. we need a way to specify this in a config |
22:03:47 | FromDiscord | <nikki> the main q is -- is there some sensible construct to use for static unrolled loops (kinda) like this? or would i just do a macro that takes the param and repeats it a bunch with eg. the `T` ident substituted with each one |
22:16:55 | * | natrys quit (Ping timeout: 246 seconds) |
22:22:33 | disruptek | make a macro. it's exactly the semantic you want. |
22:27:20 | hmmm | ha |
22:27:27 | hmmm | it was vscode weirdness |
22:28:04 | FromGitter | <ynfle> Where did I go wrong here? https://play.nim-lang.org/#ix=2EpG ⏎ We discussed this in the past week I think |
22:31:44 | FromGitter | <ynfle> NVM got it |
22:33:19 | FromDiscord | <exelotl> is there a word for an individual enum item? |
22:34:43 | FromDiscord | <ElegantBeef> enum value? |
22:34:47 | FromDiscord | <Recruit_main707> ynfle: https://play.nim-lang.org/#ix=2EpK |
22:35:22 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
22:35:37 | * | Onionhammer joined #nim |
22:36:32 | FromGitter | <ynfle> Ya I figured it out |
22:36:35 | FromGitter | <ynfle> Thanks anyways |
22:36:45 | FromDiscord | <Recruit_main707> Great |
22:36:45 | FromDiscord | <exelotl> yeah I guess enum value is right |
22:36:54 | hmmm | how does defer: file.close() know that I'm done with a file |
22:36:55 | * | snowolf quit (Remote host closed the connection) |
22:38:00 | FromDiscord | <ElegantBeef> it is just a fancy `try` `finally` |
22:38:20 | hmmm | hm |
22:38:27 | * | snowolf joined #nim |
22:38:28 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual.html#exception-handling-defer-statement |
22:38:53 | FromDiscord | <ElegantBeef> So basically it inserts the finally after the stmt block |
22:39:36 | hmmm | oh it's clear |
22:39:38 | hmmm | thanks |
22:49:43 | * | opal quit (Ping timeout: 240 seconds) |
22:52:27 | * | opal joined #nim |
22:56:23 | * | Vladar quit (Quit: Leaving) |
23:21:50 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:27:17 | * | hmmm left #nim (#nim) |
23:36:56 | * | tane quit (Quit: Leaving) |
23:38:55 | FromDiscord | <Xydium> Anyone know a fix for missing the handleapi.h header? (nim version 1.4.0) |
23:43:37 | FromDiscord | <Xydium> (and Windows 10 v1909) |
23:48:54 | FromDiscord | <Xydium> It's include in at least nim 1.0.2, do I just need to downgrade? |
23:54:20 | FromGitter | <ynfle> I'm assuming this is a bughttps://play.nim-lang.org/#ix=2EpY |
23:58:09 | FromGitter | <ynfle> Why is the reference to `a[<index>]` changed? |