00:29:54 | FromDiscord | <Benjamin> Does the Nim forum support "spoiler tags"? I figure that could be a way to hide off-topic (parts of) posts, either by the users themselves or moderators.β΅β΅I really would have liked to skip huge parts if this thread\: https://forum.nim-lang.org/t/8629" |
00:38:13 | FromDiscord | <Benjamin> Does the Nim forum support "spoiler tags"? I figure that could be a way to hide off-topic (parts of) posts, either by the users themselves or moderators.β΅β΅I really would have liked to skip huge parts of this thread\: https://forum.nim-lang.org/t/8629 |
00:54:29 | * | krux02 quit (Remote host closed the connection) |
01:05:35 | PMunch | That topic took an odd turn for sure |
01:24:06 | FromDiscord | <exelotl> i swear I've seen this exact thread take this exact turn before xD |
01:27:33 | * | PMunch quit (Quit: leaving) |
01:31:53 | FromDiscord | <huantian> huh yeah that is quite an interesting thread |
01:37:48 | FromDiscord | <Tom> In reply to @dom96 "oh hello <@!451370459250950144> ": Thanks much for the reply! |
01:46:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fvc |
01:47:52 | FromDiscord | <that_dude> Does python concept of `with` exist in nim? Or is template/macro magic needed that I implement myself |
01:48:12 | FromDiscord | <Elegantbeef> there is `std/with` but yes template/macros would be needed |
01:48:18 | FromDiscord | <Elegantbeef> Nim implements a small language and expands it using metaprogramming |
01:50:30 | FromDiscord | <that_dude> hmm ok |
02:32:45 | FromDiscord | <ajusa> What's the state of pattern matching now? Coming back to some older code (written earlier this year) and doesn't seem to compile with the current version of fusion/matching. I saw hax's post on the forums as well, so is fusion no longer the source for his pattern matching library? |
02:40:58 | FromDiscord | <ajusa> I answered my own question; it was moved to https://github.com/haxscramper/hmisc |
03:00:50 | FromDiscord | <huantian> In reply to @Elegantbeef "there is `std/with` but": did you know googling "std/with" by itself does not give you what I'm searching for? |
03:01:31 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/with.html#with.m%2Ctyped%2Cvarargs%5Buntyped%5D going to the docs and searching with does though π |
03:01:48 | FromDiscord | <huantian> yeah I should bookmark the docs probably |
03:02:23 | FromDiscord | <Elegantbeef> Yea at one point I abused rofi to give me search of the docs π |
03:12:36 | FromDiscord | <huantian> wonder if it's possible to get vscode to show me errors in a strformat?β΅or is that not possible |
03:12:48 | FromDiscord | <Elegantbeef> What do you mean? |
03:14:33 | FromDiscord | <huantian> like uh this https://media.discordapp.net/attachments/371759389889003532/911454438139519007/unknown.png |
03:15:23 | FromDiscord | <Elegantbeef> It shoudl be technically possible, but the macro would have to do it |
03:15:39 | nrds | <Prestige99> pretty sure it's just an issue with the macro |
03:15:46 | FromDiscord | <Elegantbeef> So the answer is "No, not without changing strformat" |
03:16:15 | FromDiscord | <exelotl> macros can only report errors at a per-node level of granularity right? |
03:16:29 | FromDiscord | <exelotl> so it couldn't possibly tell you "this is the part in the string that's bad" |
03:17:16 | FromDiscord | <exelotl> well I guess I could say so in the error message, but not in a way that would be reported properly to vscode |
03:17:19 | FromDiscord | <Elegantbeef> It might be able to since you can access line info |
03:17:20 | nrds | <Prestige99> I think it'd be able to |
03:17:26 | nrds | <Prestige99> ^ |
03:17:27 | FromDiscord | <exelotl> (edit) "I" => "it" |
03:17:52 | FromDiscord | <exelotl> ah, can you mutate the line info? |
03:18:41 | FromDiscord | <Elegantbeef> possibly, need to check something myself π |
03:21:33 | FromDiscord | <exelotl> also nim's `with` is not the same as python's, and sadly I find it to be so situational that it's never worth importing :( |
03:21:58 | FromDiscord | <Elegantbeef> How do they differ and does the `with` nimble package work better? |
03:23:13 | FromDiscord | <exelotl> python's with is something different - it's a block that obtains a resource, binds it to a variable name, and then closes the resource at the end of the block |
03:23:36 | FromDiscord | <exelotl> here's a similar Nim template that I use for files: https://github.com/exelotl/natu/blob/devel/natu/tools/common.nim#L3 |
03:23:57 | FromDiscord | <Elegantbeef> So pretty much "Destructors are implemented for all types yet" |
03:24:00 | FromDiscord | <Elegantbeef> arent\ |
03:24:09 | FromDiscord | <exelotl> yeah |
03:24:57 | FromDiscord | <exelotl> as for `std/with`, I suspect that the `with` nimble package is better indeed |
03:25:53 | FromDiscord | <exelotl> it's been a while since I've tried either though |
03:26:10 | FromDiscord | <Elegantbeef> So yea seems you cannot easily fudge the line info |
03:26:23 | FromDiscord | <Elegantbeef> Especially since the input is a static string |
03:29:02 | FromDiscord | <Elegantbeef> So i guess sorry there is nothing much the can be resolved |
03:29:24 | FromDiscord | <Elegantbeef> I guess without adding compiler functionality |
03:30:43 | nrds | <Prestige99> In c, when there's a struct declared inside a struct, how should we convert that for a wrapper? E.g. https://i.imgur.com/pkOgSS8.png |
03:30:57 | nrds | <Prestige99> I would assume I could just declare them as their own types |
03:31:12 | FromDiscord | <huantian> In reply to @Elegantbeef "I guess without adding": mm I see, well it's not too big of a deal anyways |
03:33:30 | FromDiscord | <Elegantbeef> I'd assume the same prestige |
03:34:23 | nrds | <Prestige99> c is weird |
03:34:24 | FromDiscord | <Elegantbeef> Though how do you have to reference the struct? i dont recall if it does anything odd |
03:35:26 | FromDiscord | <Elegantbeef> Ya think? |
03:36:02 | nrds | <Prestige99> hence why I use Nim :) |
03:37:47 | FromDiscord | <sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3FvA |
03:38:30 | FromDiscord | <sharpcdf> ive used this same code on different websites and it works fine |
03:38:32 | FromDiscord | <sharpcdf> its just this |
03:38:40 | FromDiscord | <Elegantbeef> Still thinking about alternatives to the static string, presently my dumb idea would be `"Some String " myArgStuff " other sentence stuff"` π |
03:38:46 | FromDiscord | <sharpcdf> (i searched for different tags though) |
03:39:14 | FromDiscord | <Elegantbeef> Well what's the stack trace say |
03:39:36 | FromDiscord | <sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3FvC |
03:40:05 | FromDiscord | <Elegantbeef> What does that site return? |
03:40:35 | FromDiscord | <Elegantbeef> `echo client.getContent(theUrl))` |
03:40:39 | FromDiscord | <sharpcdf> the html |
03:40:43 | FromDiscord | <sharpcdf> alright ill do that |
03:41:03 | FromDiscord | <Elegantbeef> My theory is that it's returning a single entry so it cannot be iterated over |
03:41:10 | FromDiscord | <sharpcdf> oh |
03:41:45 | FromDiscord | <sharpcdf> well i believe thats true but shouldnt it still be able to iterate? |
03:42:14 | FromDiscord | <Elegantbeef> IE `<someDiv> the entire site </div>` or something similar |
03:43:00 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "`echo client.getContent(theUrl))`": oh |
03:43:00 | FromDiscord | <sharpcdf> uh |
03:43:07 | FromDiscord | <sharpcdf> the entire html is encoded |
03:43:09 | FromDiscord | <sharpcdf> thats why |
03:43:23 | FromDiscord | <sharpcdf> https://media.discordapp.net/attachments/371759389889003532/911461696508416040/unknown.png |
03:43:34 | FromDiscord | <sharpcdf> kinda weird |
03:43:43 | * | arkurious quit (Quit: Leaving) |
03:44:01 | FromDiscord | <Elegantbeef> Well that means the xml isnt parsing which is why it cannot iterate π |
03:44:11 | FromDiscord | <sharpcdf> how would i be able to fix it |
03:44:44 | FromDiscord | <Elegantbeef> Try `content-type:"html"` or whatever as a header |
03:44:48 | FromDiscord | <Elegantbeef> I dont know much about web dev |
03:44:55 | FromDiscord | <sharpcdf> again, it worked for every other link ive used |
03:44:57 | FromDiscord | <sharpcdf> alright |
03:45:21 | FromDiscord | <sharpcdf> well a header isnt a param in `getContent()` i believe |
03:45:26 | FromDiscord | <sharpcdf> i think it defaults to html |
03:45:27 | FromDiscord | <sharpcdf> weird |
03:45:32 | FromDiscord | <Elegantbeef> You set it on client |
03:45:40 | FromDiscord | <Elegantbeef> `client.httpHeaders` or w/e |
03:45:43 | FromDiscord | <sharpcdf> oh alright |
03:47:28 | FromDiscord | <Elegantbeef> Seems it's `Content-Type: text/html; charset=UTF-8` |
03:48:05 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "Seems it's `Content-Type: text/html;": yea, looking at the mozilla dev docs for http requests, its either `Content-Type` or `Accept` |
03:48:07 | FromDiscord | <sharpcdf> ill try both |
03:52:37 | FromDiscord | <sharpcdf> also, need some clarification, can you specify a specific object field/process param specifically like `newObject(field="value")`? |
03:53:00 | FromDiscord | <Elegantbeef> Yes named paremeters exist |
03:53:05 | FromDiscord | <sharpcdf> alright nice |
03:53:20 | FromDiscord | <Elegantbeef> for object constructors the syntax is `ObjectType(fieldName: value)` |
03:53:52 | FromDiscord | <sharpcdf> ah alright |
03:56:32 | * | src quit (Quit: Leaving) |
04:03:16 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "Seems it's `Content-Type: text/html;": im trying to make a `HttpHeaders` object, how do I do it? |
04:03:43 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FvJ |
04:03:50 | FromDiscord | <sharpcdf> i imported `std/tables` and tried making a `TableRef["Content-Type": "text/html"]` but it doesnt work |
04:03:51 | FromDiscord | <Elegantbeef> `client.headers = newHttpHeaders({ "Content-Type": "application/json" })` |
04:03:55 | FromDiscord | <Rika> Table isnβt mutable |
04:03:57 | FromDiscord | <sharpcdf> oh bruh lol |
04:04:11 | FromDiscord | <sharpcdf> i didnt see that on the docs |
04:04:21 | FromDiscord | <Rika> In reply to @π§ππ’ "` ": Is wm a var? |
04:04:23 | FromDiscord | <Elegantbeef> It's in the httppost example |
04:04:29 | FromDiscord | <π§ππ’> its a thing passed to the fn |
04:04:34 | FromDiscord | <Rika> Yes I know |
04:04:39 | FromDiscord | <Rika> Does it have var in the type |
04:04:42 | FromDiscord | <π§ππ’> no |
04:04:46 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FvK |
04:04:55 | FromDiscord | <Rika> Then put var in the type, var Whim |
04:05:07 | FromDiscord | <π§ππ’> ohhh |
04:05:09 | FromDiscord | <π§ππ’> ok thanks |
04:05:11 | FromDiscord | <Elegantbeef> Is this the same as yesterday issue lacking `import std/tables`? |
04:05:13 | FromDiscord | <π§ππ’> is it immutable by default |
04:05:14 | FromDiscord | <π§ππ’> no |
04:05:18 | FromDiscord | <Rika> Yes |
04:05:30 | FromDiscord | <Rika> Almost everything is immutable by default |
04:05:36 | FromDiscord | <Rika> Soon to be everything |
04:05:55 | FromDiscord | <π§ππ’> as long as it doesnt become haskell and acutally has fucking variables im fine w/ that lol |
04:05:56 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "for object constructors the": also tried this, it just errors saying it needs an object type |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:13 | FromDiscord | <Elegantbeef> Uhhβ΅(@sharpcdf) |
04:06:32 | * | supakeen joined #nim |
04:06:32 | FromDiscord | <π§ππ’> (edit) removed "fucking" |
04:06:49 | FromDiscord | <Rika> In reply to @π§ππ’ "as long as it": Doubtful that will happen |
04:06:53 | FromDiscord | <π§ππ’> as much as i try to learn haskell that always trips me up lol |
04:06:57 | FromDiscord | <Elegantbeef> are you doing `newClient(headers = newHttpHeaders({"Content-Type": "text/html"}))` |
04:07:02 | FromDiscord | <Rika> Haskell does have βvariablesβ using βlet withβ I believe |
04:07:06 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "are you doing `newClient(headers": yes |
04:07:10 | FromDiscord | <sharpcdf> anddd https://media.discordapp.net/attachments/371759389889003532/911467682048659467/unknown.png |
04:07:28 | FromDiscord | <Elegantbeef> That's not what you said it was doing |
04:07:44 | FromDiscord | <Rika> In reply to @π§ππ’ "as long as it": https://wiki.haskell.org/Let_vs._Where |
04:08:01 | FromDiscord | <Elegantbeef> Yea i dont know about how to make this work, the issue is with the http headers afaict |
04:08:13 | FromDiscord | <Elegantbeef> I'm a big numpty when it comes to this stuff |
04:08:28 | FromDiscord | <sharpcdf> In reply to @Elegantbeef "That's not what you": new error |
04:08:29 | FromDiscord | <sharpcdf> yea |
04:08:33 | FromDiscord | <sharpcdf> hopefully i can resolve it |
04:52:12 | FromDiscord | <evoalg> I don't know why this doesn't work when I thought it would? https://play.nim-lang.org/#ix=3FvV |
04:59:09 | FromDiscord | <Elegantbeef> It doesnt know the type |
04:59:21 | FromDiscord | <evoalg> ahhhh |
05:00:28 | FromDiscord | <evoalg> makes sense now! |
05:01:24 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3Fw0 |
05:01:30 | FromDiscord | <π§ππ’> i tried and but it complained about no boolean |
05:01:38 | FromDiscord | <Elegantbeef> `ev.state and Button1Mask` |
05:01:47 | FromDiscord | <π§ππ’> tried that... |
05:01:48 | FromDiscord | <Elegantbeef> then == `Button1Mask` |
05:01:56 | FromDiscord | <π§ππ’> but its a bit flagh |
05:01:58 | FromDiscord | <π§ππ’> (edit) "flagh" => "flag?" |
05:02:03 | FromDiscord | <Elegantbeef> Nim's ints dont implicitly convert to bools |
05:02:15 | FromDiscord | <Elegantbeef> `ev.state and Button1Mask == Button1Mask` |
05:02:25 | FromDiscord | <π§ππ’> that looks stupid but if it works then it works |
05:02:39 | FromDiscord | <Elegantbeef> Well we have proper bitsets but that requires the C type to be not stupid |
05:02:53 | FromDiscord | <Elegantbeef> Normally you'd do `Button1Mask in ev.state` but thanks C |
05:03:39 | FromDiscord | <π§ππ’> i c |
05:03:56 | FromDiscord | <Elegantbeef> Nim uses wirth style bitsets instead of C style oring of its |
05:03:58 | FromDiscord | <Elegantbeef> of ints\ |
05:04:06 | FromDiscord | <π§ππ’> wirth? |
05:04:11 | FromDiscord | <Elegantbeef> Pascal |
05:04:27 | FromDiscord | <π§ππ’> nim feels like python and pascal had some weird baby' |
05:11:34 | FromDiscord | <π§ππ’> not bad thing btw just its kinda weird |
05:27:27 | FromDiscord | <pyautogui> Wirth also influenced/created many other languages, including Modula, ALGOL, VHDL, Ada, and who knows what else. He was a big proponent of structured programming.Source: https://en.wikipedia.org/wiki/Niklaus_Wirth |
05:47:42 | FromDiscord | <sharpcdf> wheres the documentation on the `when defined(os)` statement |
05:47:48 | FromDiscord | <sharpcdf> i cant find it and it kind of confuses me |
05:48:34 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement |
05:48:45 | FromDiscord | <Elegantbeef> `defined` is just `-d:someName` |
05:53:47 | FromDiscord | <sharpcdf> yea, but when is `windows` or etc. defined |
05:54:05 | FromDiscord | <Elegantbeef> From the Nimcfg i believe |
05:54:11 | FromDiscord | <sharpcdf> alright |
05:54:28 | FromDiscord | <sharpcdf> just dont see anything on those specific variables so i was a bit cnofused |
05:54:28 | FromDiscord | <sharpcdf> just dont see anything on those specific variables so i was a bit confused |
05:59:27 | FromDiscord | <sharpcdf> just realized i could also make a shell/batch file that could just manually define the os for each download |
06:00:51 | FromDiscord | <Elegantbeef> What do you mean? |
06:01:56 | FromDiscord | <sharpcdf> well you could do like `nim c -d:linux` in the shell files and vice versa |
06:02:02 | FromDiscord | <sharpcdf> wouldnt be very efficient but it works |
06:02:07 | FromDiscord | <sharpcdf> or you could just check the extension |
06:02:42 | FromDiscord | <sharpcdf> just my opinion |
06:02:45 | FromDiscord | <sharpcdf> Β―\\\_(γ)\_/Β― |
06:02:47 | FromDiscord | <Elegantbeef> For what though? |
06:03:09 | FromDiscord | <sharpcdf> im just saying as an alternative to the predefined os variables |
06:03:19 | FromDiscord | <sharpcdf> you could use it for making specific processes run or soemthing |
06:03:25 | FromDiscord | <sharpcdf> idk lol |
06:03:26 | FromDiscord | <sharpcdf> hypothetical |
06:03:34 | FromDiscord | <Elegantbeef> They arent variables though |
06:03:47 | FromDiscord | <sharpcdf> compiletime definitions |
06:04:52 | FromDiscord | <Elegantbeef> Yea i dont see what your suggestion is |
06:05:01 | FromDiscord | <sharpcdf> lol nevermind |
06:06:53 | FromDiscord | <sharpcdf> oh wait |
06:06:57 | FromDiscord | <sharpcdf> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: https://github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler |
06:06:59 | FromDiscord | <sharpcdf> found it |
07:04:52 | FromDiscord | <evoalg> In reply to @Elegantbeef "It doesnt know the": So to test to see if a variable contains `@[@[]]` is there a better way then this? https://play.nim-lang.org/#ix=3Fwr |
07:05:52 | FromDiscord | <Rika> Pattern matching? |
07:06:45 | FromDiscord | <evoalg> I don't know what pattern matching is, other than imagining that I could turn it into a string and then use a regex on it? |
07:07:28 | FromDiscord | <Rika> https://nim-lang.org/blog/2021/03/10/fusion-and-pattern-matching.html |
07:10:27 | FromDiscord | <evoalg> Thank you ... before I dive into that, I have another question about what I posted earlier: https://play.nim-lang.org/#ix=3FvV ... I can't do `assert dd == @[@[]]` because it can't infer the type, but why can I do `assert d == @[]` ... shouldn't it be the same problem? |
07:11:49 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3Fwu |
07:12:26 | FromDiscord | <Elegantbeef> The issue is the inner sequence, since an array of an empty array isnt valid |
07:12:41 | FromDiscord | <Rika> Well why isnβt it? |
07:12:51 | FromDiscord | <Rika> Just stoking the fire |
07:13:08 | FromDiscord | <Elegantbeef> No deducable type |
07:13:46 | FromDiscord | <Elegantbeef> The issue is actually probably just an issue with the bracket expression |
07:14:22 | FromDiscord | <evoalg> `assert d == @[]` has no deducible type either? |
07:14:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fwv |
07:14:46 | FromDiscord | <Elegantbeef> Nah it does since there is a single `==` proc for `seq[T]` |
07:15:11 | FromDiscord | <Elegantbeef> If you introduced a proc `==(a: seq[string]. b: seq[int])` it'd not work |
07:15:56 | FromDiscord | <Elegantbeef> Oh nvm i guess i'm wrong π |
07:16:01 | FromDiscord | <Elegantbeef> That's interesting |
07:16:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fww |
07:16:24 | FromDiscord | <Elegantbeef> That works and does indeed call the above `==` |
07:16:40 | FromDiscord | <Elegantbeef> Ah right that's more specific |
07:17:01 | FromDiscord | <Rika> Lol |
07:17:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Fwx |
07:17:27 | FromDiscord | <Elegantbeef> Thats what we want |
07:17:38 | FromDiscord | <Rika> Basically reverse type deduction only goes one level of generics |
07:18:04 | FromDiscord | <Elegantbeef> I dont think that's the issue in the array issue |
07:18:17 | FromDiscord | <Elegantbeef> The issue is that i think the system only looks if the type is `empty` and not if any of the types are empty |
07:18:48 | FromDiscord | <Elegantbeef> if you look at the `var b = [[]]` error it reports `array[0..0,array[-1..0, empty]]` |
07:19:03 | FromDiscord | <Elegantbeef> Which makes me think it doesnt check intelligently to see "hey is this an array literal" |
07:19:40 | FromDiscord | <Elegantbeef> an empty array literal\ |
07:20:03 | FromDiscord | <Rika> In reply to @Elegantbeef "if you look at": Thatβs correct isnβt it? Same issue with a no? |
07:20:28 | FromDiscord | <Elegantbeef> What? |
07:22:01 | FromDiscord | <Rika> I donβt know what you mean, [] is also of type array empty |
07:22:18 | FromDiscord | <Elegantbeef> I'm saying it doesnt check if the child is empty |
07:23:06 | FromDiscord | <Rika> So youβre meaning the same thing as I did? |
07:23:12 | FromDiscord | <Rika> Meant not did |
07:23:23 | FromDiscord | <Elegantbeef> Not a fucking clue |
07:24:34 | FromDiscord | <Rika> Lol I mean whatever lol |
07:25:14 | FromDiscord | <Rika> I assume this limitation is because of performance reasons |
07:25:29 | FromDiscord | <Rika> Or sudden possible generics ambiguity |
07:26:21 | FromDiscord | <Elegantbeef> I assume it's someone forgetting some AST existed |
07:26:36 | FromDiscord | <Elegantbeef> That's the #1 reason for "bugs" around stuff like this |
07:27:47 | FromDiscord | <Rika> No I feel like this limitation is still here for some reason since itβs so obvious |
07:29:26 | FromDiscord | <Elegantbeef> i dont follow |
07:30:13 | FromDiscord | <Elegantbeef> How often are you making 30 nested empty array/seq literals |
07:31:02 | FromDiscord | <Rika> Thatβs not the issue |
07:32:03 | FromDiscord | <Rika> Now T can be inferred as A, or A[B, β¦], or etc? Or am I worrying too much |
07:33:26 | FromDiscord | <Elegantbeef> I might be wrong looking at the error again |
07:51:37 | * | Colt quit (Quit: Leaving) |
08:14:27 | * | Colt joined #nim |
08:28:58 | * | krux02 joined #nim |
08:45:23 | * | krux02 quit (Remote host closed the connection) |
09:37:25 | * | sagax quit (Ping timeout: 250 seconds) |
10:07:49 | FromDiscord | <haxscramper> I will move it to some separate library so you won't have to drag in whole `hmisc` bullshit pile that you most likely don't need in your codeβ΅(@ajusa) |
10:14:06 | FromDiscord | <haxscramper> Funny how fusion was not even mentioned in the roadmap |
10:47:01 | FromDiscord | <dabmlfz> Is there any package that implements ADTs with a macro? I could write my own but would rather reuse one if it exists |
10:49:24 | FromDiscord | <dabmlfz> nvm, there seems to be Patty and others.. google really fails here |
10:55:29 | FromDiscord | <Yardanico> In reply to @dabmlfz "Is there any package": Object variants are already ADTs, perhaps what you want is safe access to object branches? |
10:55:39 | FromDiscord | <Yardanico> Then you can use patty or fusion/matching |
10:56:02 | FromDiscord | <Yardanico> There are more alternatives sure, but those are the ones I can quickly remember :) |
10:57:05 | FromDiscord | <dabmlfz> Yeah I was looking for sugar constructs to help with the boilerplate, thanks! |
10:57:25 | FromDiscord | <enthus1ast> uff zmq is terrible to use... it looks nice at first but it has so many strange quirks... |
10:58:16 | FromDiscord | <dabmlfz> can you mention one? |
10:59:38 | FromDiscord | <enthus1ast> req / rep breaks when one side crashes and can not recover, pub / sub sends queues to many msgs and cannot realy congest control, dealer / router needs dummy msg ? and seems to need to know the partitipants beforehand |
11:00:09 | FromDiscord | <enthus1ast> so yeah i better use something else |
11:01:42 | FromDiscord | <enthus1ast> ah not pub / sub , i meant push / pull sorry |
11:03:44 | FromDiscord | <dabmlfz> oof your first point means you wouldn't want to use it on a public cluster ig |
11:04:14 | FromDiscord | <enthus1ast> i want to be able to spawn and remove producers and consumers at will |
11:04:29 | FromDiscord | <enthus1ast> because i don't know yet how many i need for each task |
11:04:49 | FromDiscord | <enthus1ast> and they will crash and when they do, i do not want to restart the whole system |
11:06:04 | FromDiscord | <enthus1ast> i do not need high throughput, but the messaging / queueing must be reliable |
11:09:27 | * | neurocyte0132889 joined #nim |
11:09:27 | * | neurocyte0132889 quit (Changing host) |
11:09:27 | * | neurocyte0132889 joined #nim |
11:11:36 | FromDiscord | <dabmlfz> in that case zeromq isn't suitable as it's targeted more towards resource constrained systems |
11:12:08 | FromDiscord | <enthus1ast> I'm actually wondering for what task zmq IS actually suitable ;) |
11:12:33 | FromDiscord | <enthus1ast> can not imagine building something with it |
11:15:47 | FromDiscord | <dabmlfz> probably for something where every node agrees on the semantics and where you don't want reliability at the expense of resources I'd say |
11:18:51 | FromDiscord | <Rika> Sounds pretty rare |
11:19:08 | FromDiscord | <Rika> I guess multi computer computing like in research laboratories? |
11:33:35 | * | terminalpusher joined #nim |
11:35:48 | * | elph quit (Quit: Connection closed for inactivity) |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:16:10 | * | elph joined #nim |
12:20:40 | * | Guest41 joined #nim |
12:20:57 | * | Guest41 quit (Client Quit) |
12:40:27 | * | src joined #nim |
13:12:19 | * | sagax joined #nim |
13:42:57 | FromDiscord | <Tom> Is it possible to make exception groups or tag groups for effect annotations, so I can say: `{.tags: [IOEffect].}` rather than `{.tags: [ReadIOEffect, WriteIOEffect].}` for example? Again, same question for `raises` and exception groups. |
13:59:29 | * | arkurious joined #nim |
14:22:11 | FromDiscord | <dabmlfz> \ |
14:27:12 | FromDiscord | <Rika> Christ your avatar is so high res it lags my phone when I open your profile |
14:48:52 | FromDiscord | <ajusa> How do I cross compile a Windows exe with SSL support? I've added all the missing DLLs and cacert.pem but it still complains about certificates not found |
14:49:25 | FromDiscord | <ajusa> Specifically, "No SSL/TLS CA certificates found." |
14:49:39 | FromDiscord | <ajusa> (edit) "How do I cross compile a Windows exe with SSL support? I've added all the missing DLLs and cacert.pem ... but" added "to the same folder as the exe" |
15:52:32 | NimEventer | New thread by 12398890: How to profiling GC in Nim like golang's gctrace=1, see https://forum.nim-lang.org/t/8643 |
15:59:46 | FromDiscord | <deech> Does the `dynlib` pragma work for static archives as well? |
16:05:47 | * | neurocyte0132889 quit (Ping timeout: 264 seconds) |
16:29:00 | * | src_ joined #nim |
16:30:18 | FromDiscord | <leorize> noβ΅(@deech) |
16:32:18 | * | src quit (Ping timeout: 260 seconds) |
17:04:13 | * | lumo_e joined #nim |
18:07:13 | * | terminalpusher quit (Remote host closed the connection) |
18:14:28 | * | terminalpusher joined #nim |
18:54:23 | * | lumo_e quit (Ping timeout: 264 seconds) |
19:15:00 | * | lumo_e joined #nim |
19:33:59 | * | lumo_e quit (Ping timeout: 264 seconds) |
19:40:05 | FromDiscord | <jfmonty2> finally trying my hand at macros for the first time, is there any way to separate a variable declaration from its body? I.e. I want to have `let` or `var` in the main body of my code, but use a macro to generate the rest of the assignment |
19:40:38 | FromDiscord | <jfmonty2> sent a code paste, see https://play.nim-lang.org/#ix=3FAe |
19:41:17 | FromDiscord | <jfmonty2> but it keeps giving me syntax errors saying it expected either `:` or `=`, so I guess `let arbitrary_stmt` isn't valid syntax and therefore it can't be done this way? |
19:42:23 | FromDiscord | <jfmonty2> (edit) "`=`," => "`=` after the `let`," |
19:47:59 | * | lumo_e joined #nim |
19:50:03 | FromDiscord | <Rika> Yes |
20:00:43 | FromDiscord | <michaelb> why isn't there a git tag (on github) for v1.2.14? |
20:09:29 | * | lumo_e quit (Remote host closed the connection) |
20:11:09 | FromDiscord | <π§ππ’> so im writing a shitty wm and i want to know when i run `DISPLAY=:1 xeyes` it works fine from a seperate terminal but spawning it using `discard execCmd(cmd.args.join)` doesnt work? |
20:11:22 | FromDiscord | <π§ππ’> it doesnt show up at all in the Xephyr window |
20:11:59 | FromDiscord | <π§ππ’> its being invoked on a keypress like `shell(@["xeyes"])` |
20:12:47 | FromDiscord | <π§ππ’> any help w this? |
20:14:02 | FromDiscord | <Yardanico> the `DISPLAY=:1 xeyes` is shell syntax, it won't work if you are launching a command |
20:14:14 | FromDiscord | <Yardanico> you need to use something that allows you to pass the environment, for example execCmdEx from osproc |
20:14:17 | FromDiscord | <Yardanico> `env` argument there |
20:14:39 | FromDiscord | <π§ππ’> it shouldnt require it anyways since its launching inside the second x server |
20:14:55 | * | lumo_e joined #nim |
20:14:55 | FromDiscord | <Yardanico> how do you determine that it's launched "inside"? |
20:15:16 | FromDiscord | <π§ππ’> because im running a Xephyr and running that program (the wm) inside a second X server |
20:15:29 | FromDiscord | <π§ππ’> theres no way it wouldnt be running inside it |
20:15:53 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FCb |
20:16:15 | FromDiscord | <π§ππ’> its just that i cant figure out how to spawn the process from inside the wm |
20:17:22 | FromDiscord | <michaelb> sent a code paste, see https://play.nim-lang.org/#ix=3FCg |
20:18:28 | FromDiscord | <π§ππ’> `echo $DISPLAY` gives `:1` |
20:18:31 | FromDiscord | <π§ππ’> from inside the Xephyr |
20:18:42 | FromDiscord | <Yardanico> In reply to @brainproxy "across multiple platforms and": what csources are you using? v1 ones, right? |
20:18:48 | FromDiscord | <π§ππ’> yet it only works if i do `DISPLAY=:1 xeyes` before? |
20:19:30 | FromDiscord | <π§ππ’> nvm |
20:19:37 | FromDiscord | <π§ππ’> it magically fixed after i put `xeyes &` |
20:19:43 | FromDiscord | <π§ππ’> maybe it wasnt forking i guess? |
20:20:05 | FromDiscord | <michaelb> In reply to @Yardanico "what csources are you": not sure, checking now, I didn't write the `ci.yml`, here it is:β΅https://github.com/michaelsbradleyjr/nim-dagger/blob/localstore/.github/workflows/ci.yml |
20:20:19 | FromDiscord | <Yardanico> yes it uses the old csources repo |
20:20:32 | FromDiscord | <Yardanico> it has c sources for nim 0.20 |
20:20:44 | FromDiscord | <Yardanico> csources_v1 has nim 1.0 |
20:20:52 | FromDiscord | <Yardanico> and current nim versions are only tested to bootstrap with nim 1 |
20:21:10 | * | weirdweirdhuh joined #nim |
20:21:10 | FromDiscord | <Yardanico> https://github.com/nim-lang/csources_v1 |
20:23:52 | * | weirdweirdhuh quit (Client Quit) |
20:30:05 | FromDiscord | <michaelb> I see, will make the needed change, thanks for taking a look |
20:35:18 | * | xet7 quit (Remote host closed the connection) |
20:36:26 | * | xet7 joined #nim |
20:44:34 | * | terminalpusher quit (Remote host closed the connection) |
20:57:50 | FromDiscord | <π§ππ’> @ElegantBeef ur writing a wm right? need help w/ reparenting the titlebar (i want to create) so thats its above the frame window w/ the content |
20:58:00 | FromDiscord | <π§ππ’> kinda having trouble figuring out how to do it |
21:01:23 | * | rwb is now known as rb |
21:22:37 | * | clemens3 left #nim (WeeChat 2.7) |
21:36:35 | FromDiscord | <Elegantbeef> I never did the titlebar stuff or framing, but my understanding is you create a new window position it then reparent the child |
21:37:00 | FromDiscord | <Elegantbeef> I believe https://github.com/avahe-kellenberger/nimdow might've done it, but i dont know. |
21:37:03 | FromDiscord | <Elegantbeef> Pinging prestige! |
21:45:31 | FromDiscord | <π§ππ’> could you ping him and ask? |
21:45:42 | FromDiscord | <π§ππ’> if he's in the server |
21:46:04 | FromDiscord | <Elegantbeef> I just did |
21:46:28 | FromDiscord | <π§ππ’> i can successfully frame it but i can't figure out how to parent a titlebar |
21:46:55 | FromDiscord | <Elegantbeef> Is it not just a case of parenting the title bar and parent the child bar? |
21:47:00 | FromDiscord | <Elegantbeef> child window\ |
21:47:09 | FromDiscord | <π§ππ’> tried but it didn't work apparently |
21:47:16 | FromDiscord | <π§ππ’> it doesn't error but it just didn't show up? |
21:47:57 | FromDiscord | <Elegantbeef> Yea i'm not too good with x11 |
21:48:02 | FromDiscord | <π§ππ’> @Prestige could u tell me how u did the titlebars if u did it? |
21:48:14 | FromDiscord | <Elegantbeef> I dont even know if he has title bars |
21:48:18 | FromDiscord | <Elegantbeef> And i already pinged him |
21:48:23 | FromDiscord | <π§ππ’> it doesn't show u pinged him for me on discord |
21:48:30 | FromDiscord | <Elegantbeef> Cause he's an irc user |
21:48:37 | FromDiscord | <π§ππ’> ohhhh |
21:48:37 | FromDiscord | <Elegantbeef> So.... me typing `prestige` did it |
21:48:48 | FromDiscord | <π§ππ’> mb i forgot this was bridged |
21:49:00 | FromDiscord | <Elegantbeef> There is bot next to my name |
21:49:12 | FromDiscord | <π§ππ’> π³ |
21:49:19 | * | sagax quit (Ping timeout: 250 seconds) |
22:00:16 | * | krux02 joined #nim |
22:00:50 | * | PMunch joined #nim |