00:05:36 | FromDiscord | <ahungry> Does nim have anything like https://pylint.pycqa.org/en/latest/pyreverse.html ? (a source code analysis tool that'd produce graphviz dot files of class/import relationships?) |
00:10:29 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "Yea i mean i": Fair |
00:10:42 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "It needs to support": Generic interfaces being structures? |
00:27:14 | FromDiscord | <auxym> In reply to @ahungry "Does nim have anything": have you tried `nim genDepend yourfile.nim`? |
00:28:57 | NimEventer | New thread by Hlaaftana: Upcoming standard library changes, see https://forum.nim-lang.org/t/9680 |
00:29:22 | FromDiscord | <ahungry> Wow, not only does it exist, but it's built in? Nim never stops amazing me, and I just started looking at it less than a week ago 😂 |
01:41:23 | FromDiscord | <Rika> I’m surprised too and I’ve been here for how many years already what |
01:41:25 | FromDiscord | <Rika> When was this made |
01:45:21 | FromDiscord | <ChocolettePalette> Zamn das crazy |
01:46:41 | * | forest joined #nim |
03:17:56 | * | cm joined #nim |
03:52:10 | * | forest quit (Quit: Gone for now) |
04:16:33 | * | derpydoo quit (Quit: derpydoo) |
05:56:36 | * | genpaku quit (Remote host closed the connection) |
06:00:43 | * | genpaku joined #nim |
06:01:16 | * | mal`` joined #nim |
06:01:22 | * | arkurious quit (Quit: Leaving) |
06:02:42 | * | emery joined #nim |
06:05:53 | * | ehmry quit (*.net *.split) |
06:05:53 | * | Jjp137 quit (*.net *.split) |
06:05:53 | * | crem quit (*.net *.split) |
06:05:53 | * | mal``` quit (*.net *.split) |
06:11:09 | * | rockcavera quit (Remote host closed the connection) |
07:24:13 | * | kenran joined #nim |
07:34:52 | * | Jjp137 joined #nim |
07:34:52 | * | crem joined #nim |
07:38:28 | FromDiscord | <albassort> In reply to @auxym "have you tried `nim": tily |
07:38:32 | FromDiscord | <albassort> (edit) "tily" => "til" |
07:39:34 | FromDiscord | <sOkam!> If you were to implement a variable type that can be modified from within the application itself, and could contain different sets of data, how would you do it with Nim?↵_(I know of a solution in pure C, but asking in case Nim has something that could make this nicer, as its usual in this lang)_ |
07:39:49 | FromDiscord | <sOkam!> (edit) "sets" => "types" |
07:40:34 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1047779219956060230/webscrapeCollege.png |
07:40:55 | FromDiscord | <albassort> In reply to @sOkam! "If you were to": Well... you can kinda |
07:41:17 | FromDiscord | <albassort> but keep in mind, nim is static, and all types must be known and accounted for by compile time |
07:42:01 | FromDiscord | <albassort> you can really only do it for parameters in functions, I dont think you can declare variables like that |
07:42:42 | FromDiscord | <Elegantbeef> Object variants exist |
07:42:51 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#ix=4hly |
07:43:02 | FromDiscord | <albassort> In reply to @Elegantbeef "Object variants exist": how do you declare variables with it |
07:43:32 | FromDiscord | <sOkam!> the C solution is using strings, and coding a system for parsing their contents when used. but i figured there could be something better than that |
07:43:37 | FromDiscord | <amadan> In reply to @sOkam! "If you were to": Could use `JsonNode` and just convert to/from↵But its pretty inefficient |
07:43:50 | FromDiscord | <albassort> listen to beef |
07:43:51 | FromDiscord | <Elegantbeef> Tagged unions exist so does inheritance |
07:43:52 | FromDiscord | <Elegantbeef> use one of those |
07:44:08 | FromDiscord | <albassort> give an example of tagged unions |
07:44:15 | FromDiscord | <albassort> pls |
07:44:16 | FromDiscord | <sOkam!> was gonna ask for that |
07:44:36 | FromDiscord | <sOkam!> i've never heard of those two options, so an example for them would be nice |
07:45:03 | FromDiscord | <albassort> i dont know how'd you use inheritance here but c'est la vie |
07:45:20 | FromDiscord | <sOkam!> In reply to @amadan "Could use `JsonNode` and": parsing a config file from yaml/json into the initialization of the app, sure. but using its data all around it doesn't look good for a game engine 🤷♂️ |
07:46:10 | FromDiscord | <amadan> If you're parsing a config file then making an object that represents it would make sense instead |
07:46:23 | FromDiscord | <albassort> In reply to @amadan "If you're parsing a": +1 |
07:46:34 | FromDiscord | <albassort> you don't need type nonsense |
07:46:40 | FromDiscord | <albassort> you can make it make sense using objects |
07:46:46 | FromDiscord | <sOkam!> In reply to @amadan "If you're parsing a": how do you represent an arbitrary object with that? |
07:47:55 | FromDiscord | <sOkam!> the goal is that the engine has the system for the data, and the game declares what data it wants to use↵hardcoding an object with X fields makes that functionality impossible, unless im missing something↵that's why this variable type im mentioning uses C strings, and then handles the storing/getting the data with a parser |
07:47:56 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#types-object-variants |
07:47:57 | FromDiscord | <Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#coding-how-to-store-different-types-in-seqqmark look at the example here that uses oop |
07:48:29 | FromDiscord | <Require Support> how do i get the address of a `const`? I'm using `slurp` so I can't use `let` or `var` |
07:49:10 | FromDiscord | <Elegantbeef> You cannot |
07:49:50 | FromDiscord | <Elegantbeef> `let myConst = slurp("bleh")` |
07:50:09 | FromDiscord | <Elegantbeef> if that doesnt work do `let myConst = static(slurp"bleh")` |
07:50:42 | FromDiscord | <Require Support> static worked, thanks |
07:51:05 | NimEventer | New Nimble package! apt_brain - apt for SHARP Brain, see https://github.com/genkaisoft/apt-brain |
07:55:56 | * | kenran quit (Remote host closed the connection) |
07:59:36 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hlB |
08:02:15 | FromDiscord | <sOkam!> I guess it wouldn't be a variant if done this way, since they would be considered different types due to the lack of a common root? 🤔 |
08:02:36 | FromDiscord | <Elegantbeef> Correct you cannot upcast them to the same container |
08:02:45 | FromDiscord | <Elegantbeef> Since `Boxed` is a generic |
08:04:43 | FromDiscord | <sOkam!> could there be a way to use this and be able to say `thing = 10`, instead of having to say `thing.data = 10`? |
08:04:55 | FromDiscord | <Elegantbeef> `thing = boxed(10)` |
08:05:16 | FromDiscord | <Elegantbeef> you could make your own operator |
08:05:34 | FromDiscord | <sOkam!> like `:=` in go i guess |
08:05:55 | FromDiscord | <Elegantbeef> Yea |
08:05:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4hlC |
08:06:22 | FromDiscord | <Elegantbeef> Due to how this works it might not be the best solution |
08:06:27 | FromDiscord | <Elegantbeef> Object variants are faster and less awkward |
08:10:57 | FromDiscord | <sOkam!> isn't this functionality object variants? |
08:11:07 | FromDiscord | <sOkam!> i thought your code was an example of them |
08:21:13 | FromDiscord | <sOkam!> Docs breaking my brain, as per usual. I don't think I'm following this object variants description 😔↵How can a language make SO much sense, and the explanations of that language given by its own creators make literally no sense at all? Such polar opposites, damn↵I will die happy if I ever understand why that happens 🤷♂️ |
08:22:00 | FromDiscord | <sOkam!> Is this functionality similar to macros, but for variables instead? |
08:37:45 | FromDiscord | <sOkam!> How do you create and use a very very minimal and simple object variant type that can only contain `int, float or string`? |
08:38:24 | FromDiscord | <sOkam!> Maybe that can clarify the functionality a little bit. The docs explain the full feature set, but I'm not understanding the essence I believe |
08:41:59 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4hlG |
08:48:21 | FromDiscord | <sOkam!> how do you use the object after? 🤔 |
08:50:10 | FromDiscord | <Rika> `var variant = Variant(kind: yourKind); # you can set the specific fields after, or inside the construction too` |
08:52:32 | FromDiscord | <sOkam!> would you need a custom operator for assigning new data to the variable, without having to do `variant[] = Variant(...)`? |
08:54:09 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hlH |
08:59:53 | FromDiscord | <amadan> sent a code paste, see https://paste.rs/PFd |
09:01:58 | FromDiscord | <sOkam!> right, so the values are actually just like normal fields, but the language knows they are types? |
09:02:13 | FromDiscord | <sOkam!> aka you need to access the field itself by name? |
09:02:23 | FromDiscord | <sOkam!> (edit) "name?" => "name mandatory, as usual?" |
09:02:54 | * | PMunch joined #nim |
09:07:36 | FromDiscord | <amadan> Yeah just normal fields↵The benefit is that its a tagged union so `intVal`, `floatVal`, `stringVal` take the same place in memory e.g. the size of the object is `sizeof(Discrimant) + max(sizeof(int), sizeof(float), sizeof(string))` instead of `sizeof(Discrimant) + sizeof(int) + sizeof(float) + sizeof(string)` |
09:07:52 | FromDiscord | <amadan> (Least for the C/C++ backends) |
09:09:36 | FromDiscord | <sOkam!> gotchu |
09:22:34 | FromDiscord | <guttural666> anyway to get the type of the elements of a sequence the nice way? https://media.discordapp.net/attachments/371759389889003532/1047804889574686720/image.png |
09:23:43 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4hlR |
09:24:06 | FromDiscord | <amadan> (Doesn't evaluate inside the typeof so works on empty seqs) |
09:24:08 | FromDiscord | <guttural666> just works if its not empty right |
09:24:15 | FromDiscord | <guttural666> oh! |
09:24:29 | FromDiscord | <guttural666> well what a happy coincidence 😄 perfect, thanks! |
09:31:58 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hlU |
09:32:31 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4hlU" => "https://play.nim-lang.org/#ix=4hlV" |
09:33:50 | FromDiscord | <sOkam!> The idea would be to have the syntax for reassigning the memory of the object variant, hidden between a simpler `:=` that checks for the type given |
09:34:00 | FromDiscord | <sOkam!> (edit) "between" => "behind" |
09:34:38 | FromDiscord | <sOkam!> also, does `[T]` go before or after ``? im always confused by the order |
09:40:11 | FromDiscord | <amadan> `[T]` goes after ``↵`` goes directly after symbols (i.e. names of stuff like procs and variables) |
09:40:24 | FromDiscord | <Rika> In reply to @guttural666 "well what a happy": There is also https://nim-lang.org/docs/typetraits.html#elementType.t%2Cuntyped |
09:41:31 | FromDiscord | <srozb> hey, does anybody knows why nimib `nbCode` block outputs `"` instead of `"` when rendering as markdown? is there any trick for that or is it my mistake? |
09:42:25 | FromDiscord | <guttural666> In reply to @Rika "There is also https://nim-lang.org/docs/typetraits.": thanks for the info, but the index accessor variant is perfect 🙂 |
09:42:44 | FromDiscord | <Rika> Just saying there is one more way |
09:42:59 | FromDiscord | <Rika> You can’t index an iterator |
09:43:06 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4hlW |
09:46:08 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hlX |
09:48:19 | FromDiscord | <sOkam!> side note, how would you store a bunch of boolean flags as part of one object with Nim?↵I know of `and or` to extract booleans out of integers, but wondering if there is something cleaner in the lang already |
09:49:19 | FromDiscord | <amadan> Oh whoops just saw that in manual, never knew.↵Since you parameter is var you could replace each branch with `v = Variant(kind: aSomething, thField: val)` |
09:49:35 | FromDiscord | <sOkam!> kk ✍️ |
09:49:55 | FromDiscord | <amadan> In reply to @sOkam! "side note, how would": Use a set which is basically sugar around extracting bools from an integer |
09:51:01 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4hm0 |
09:51:18 | FromDiscord | <sOkam!> damn thats so much better to read, wtf |
09:51:26 | FromDiscord | <sOkam!> man i love this lang |
09:52:22 | FromDiscord | <sOkam!> how do you declare the set? |
09:52:29 | FromDiscord | <sOkam!> the type of the set, sry |
09:52:51 | FromDiscord | <sOkam!> `let x: set[Foo]`? |
09:53:01 | FromDiscord | <amadan> Yup |
09:59:50 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hm6 |
10:01:10 | FromDiscord | <amadan> Ye, you'd just need to add an else branch that has like `{.error: $typeof(val) & " is not supported".}` |
10:01:28 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hm9 |
10:06:08 | FromDiscord | <albassort> so |
10:06:14 | FromDiscord | <albassort> im 99% sure threads kinda just die |
10:07:00 | FromDiscord | <sOkam!> would this also work for regular assignment during value initialization on `let var const` like `=` would? 🤔 |
10:07:01 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4hma |
10:07:31 | FromDiscord | <amadan> What like `let x := "string"`? |
10:07:38 | FromDiscord | <sOkam!> yep |
10:08:52 | FromDiscord | <amadan> Don't think so. iirc you can't overload the assignment operator to have a different right hand type |
10:08:55 | FromDiscord | <sOkam!> In reply to @amadan "Seems like you could": don't believe json nodes are fit for game engine code, unless im completely mislead on how they operate |
10:09:37 | FromDiscord | <sOkam!> In reply to @amadan "Don't think so. iirc": kk. could always do `let x = variant("string")`, but was just wondering |
10:12:02 | FromDiscord | <amadan> They mightn't be, but if not getting accessed too often in a hot loop then should be fineish↵More just thinking about developer time since it saves you needing to implement variant fields for every type you want |
10:13:05 | FromDiscord | <sOkam!> it would probably just be `int, float, string, color`, parsed from a string. shouldn't be too bad? 🤔 |
10:13:20 | FromDiscord | <amadan> ah ok, not many then |
10:13:30 | FromDiscord | <sOkam!> the idea is not to use them for everything, just for configurable parts of the engine from the ingame-console |
10:21:45 | NimEventer | New thread by drkameleon: Parsing Unicode and lexbase, see https://forum.nim-lang.org/t/9681 |
10:23:41 | FromDiscord | <sOkam!> is `nil` a type? |
10:25:42 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hmb |
10:25:59 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4hmb" => "https://play.nim-lang.org/#ix=4hmc" |
10:32:24 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4hme |
10:33:40 | FromDiscord | <sOkam!> that also works, yep! tyty |
10:43:11 | FromDiscord | <hugogranstrom> sent a code paste, see https://play.nim-lang.org/#ix=4hmf |
10:45:32 | FromDiscord | <srozb> thats correct |
10:45:53 | FromDiscord | <srozb> sent a code paste, see https://play.nim-lang.org/#ix=4hmg |
10:46:04 | FromDiscord | <hugogranstrom> In reply to @srozb "thats correct": Will investigate it, I have reproduced it |
10:47:01 | FromDiscord | <srozb> thanks!! |
10:50:28 | FromDiscord | <srozb> as I use nimib for aoc this year I would like to track this. Should I create an issue on GH or should I stick to html ? |
10:51:03 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hmh |
10:53:45 | FromDiscord | <hugogranstrom> In reply to @srozb "as I use nimib": I think I know the reason now, we escape everything by default. So special symbols like `&` and `"` get escaped to `&` and `"`. This is needed for the HTML backend but perhaps not for the markdown one. I think it's worth opening an issue for so we can discuss and see if we can drop the escaping for markdown or if it's needed somewhere. |
10:54:32 | FromDiscord | <hugogranstrom> Do you need markdown for any specific reason? Otherwise I would recommend the HTML backend, it's what we are using most of the time. |
10:54:56 | FromDiscord | <srozb> no, I just wanted GH to render it in browser and html will require me to set up github pages, right? |
10:55:40 | FromDiscord | <srozb> have no preference beside that |
10:55:52 | FromDiscord | <hugogranstrom> In reply to @srozb "no, I just wanted": Ahh ok 👍 Yes indeed, GH pages is needed then |
10:56:16 | FromDiscord | <srozb> cool, I'll fallback to html then |
10:56:22 | FromDiscord | <hugogranstrom> It's not too hard to set up (just point it to your folder) but it becomes harder to find the pages as you don't have an index page |
10:56:37 | FromDiscord | <hugogranstrom> You can of course create an index page |
10:56:50 | FromDiscord | <srozb> yea, I've spent more time on creating index in nim that on first day task 😄 |
10:57:05 | FromDiscord | <hugogranstrom> Haha 😄 |
10:57:27 | FromDiscord | <srozb> thank you anyway, will create an issue and use html & gh pages |
10:57:46 | FromDiscord | <srozb> I just was sure that I did something wrong as this bug seemed too obvious |
10:57:53 | FromDiscord | <srozb> to be missed |
10:58:33 | FromDiscord | <hugogranstrom> In reply to @srozb "thank you anyway, will": You're welcome 🙂 You can always look at @pietroppeter's adventofcode source if you want inspiration for how you can lay it out: https://github.com/pietroppeter/adventofnim |
10:59:18 | FromDiscord | <srozb> In reply to @hugogranstrom.nim "You're welcome 🙂 You": sure, I've already seen that, thanks |
11:06:08 | FromDiscord | <pietroppeter> sent a long message, see http://ix.io/4hmn |
11:08:23 | FromDiscord | <pietroppeter> fix should be easy: put change this line to {{&code}} (adding &) and same for subsequent {{&output}} https://github.com/pietroppeter/nimib/blob/ad0e44beb926f8b1348ad3146dd1ec491e1da436/src/nimib/renders.nim#L70 |
11:08:35 | FromDiscord | <pietroppeter> (edit) removed "put" |
11:09:40 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "agree, it's a bug": Not yet, will see if I write some later on when the tasks get harder and require a bit more explaination. |
11:09:52 | FromDiscord | <pietroppeter> (we probably should add & also in partial for caption and url) |
11:10:48 | FromDiscord | <hugogranstrom> Would like to try out p5nim someday though so might steal your "thing" if I get a good enough idea 😜 |
11:11:08 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "(we probably should add": Yes that sounds reasonable 👍 |
11:12:02 | FromDiscord | <pietroppeter> In reply to @hugogranstrom.nim "Would like to try": not my thing ;), DO steal it please 😄 |
11:17:27 | * | attah_ joined #nim |
11:18:06 | * | attah quit (Ping timeout: 268 seconds) |
11:18:07 | * | attah_ is now known as attah |
11:26:10 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "not my thing ;),": It definitely is B) I'll try and at least not copy exactly what you are doing 😛 |
12:12:26 | FromDiscord | <srozb> https://github.com/pietroppeter/nimib/issues/159 @pietroppeter @hugogranstrom |
12:18:00 | FromDiscord | <sOkam!> Is there any debugger/tool that can create a list of symbols/functions/variables accessed from the start of an app, until a breakpoint or some other condition _(eg. like a list of symbols called from the start until the end of a game engine frame)_?↵Doesn't even need to be a graph, just a list of things that are called from point A to point B in text form |
12:35:44 | FromDiscord | <Clonkk> You can inspect symbol in memory using gdb stacktrace |
12:36:11 | * | jmdaemon quit (Ping timeout: 264 seconds) |
12:42:11 | * | attah quit (Ping timeout: 252 seconds) |
12:45:29 | * | attah joined #nim |
12:53:12 | FromDiscord | <sOkam!> In reply to @Clonkk "You can inspect symbol": the point is to get the whole entire engine in text form. that's not feasible manually, and not sure if the stacktrace even reaches that far back into the past |
12:54:21 | FromDiscord | <sOkam!> After some searching, and help in a C discord, I found this, which answers the question and gives an implementation✍️↵https://balau82.wordpress.com/2010/10/06/trace-and-profile-function-calls-with-gcc/ |
12:59:32 | FromDiscord | <aolko (aolko)> fixed your terrible awesome list, https://github.com/aolko/rebel-nim |
13:00:15 | FromDiscord | <Yepoleb> In reply to @sOkam! "Is there any debugger/tool": callgrind might also be an option in some cases |
13:00:41 | FromDiscord | <Yepoleb> it creates a call graph, not a list |
13:29:13 | * | derpydoo joined #nim |
13:44:34 | FromDiscord | <Rika> In reply to @aolko (aolko) "fixed your terrible awesome": Congratulations, good luck getting people on board |
13:45:11 | FromDiscord | <Require Support> is it possible to use chronos just for the httpclient 🤔 I want to disable all the async stuff. Doing this only to not have to deal with the openssl dll on stdlib |
13:46:36 | FromDiscord | <aolko (aolko)> > Congratulations, good luck getting people on board↵yup, screw you too |
13:47:38 | FromDiscord | <Rika> In reply to @aolko (aolko) "> Congratulations, good luck": Who’s the sensitive one now? |
13:47:43 | FromDiscord | <Rika> 🙂 |
13:49:00 | FromDiscord | <AlexandrosKap> In reply to @aolko (aolko) "fixed your terrible awesome": touch grass |
13:49:25 | FromDiscord | <aolko (aolko)> the one who uses good luck ironically of course↵(@Rika) |
13:49:53 | FromDiscord | <Rika> Haha, sure bud, not the one who’s fuming |
13:49:58 | FromDiscord | <Rika> Have a good one |
13:53:38 | FromDiscord | <aolko (aolko)> > touch grass↵eat some yellow snow |
13:54:09 | FromDiscord | <aolko (aolko)> > Haha, sure bud, not the one who’s fuming↵i have a good reason for that |
14:00:24 | FromDiscord | <synthels> hello fellow nim programmers |
14:00:42 | FromDiscord | <synthels> guys |
14:00:44 | FromDiscord | <synthels> please |
14:00:50 | FromDiscord | <synthels> i thought nim was cool |
14:01:22 | FromDiscord | <huantian> Nims cool but there’s always a few people who aren’t unfortunately |
14:01:33 | FromDiscord | <synthels> elaborate |
14:02:28 | FromDiscord | <huantian> Actually hold on what are you saying “I thought Nim was cool” in response to? |
14:02:41 | FromDiscord | <synthels> @AlexandrosKap told me that nim is cool |
14:02:58 | FromDiscord | <huantian> If you mean Nim is cool as a language I’d say it is cool |
14:03:16 | FromDiscord | <AlexandrosKap> He is a troll |
14:03:22 | FromDiscord | <synthels> ?? |
14:03:41 | FromDiscord | <huantian> If you mean Nim is cool as in its community, it is cool, but aolko is trolling |
14:04:24 | FromDiscord | <synthels> thank you mr huantian |
14:24:27 | FromDiscord | <ShalokShalom> In reply to @AlexandrosKap "touch grass": Good advise, actually 😄 |
14:27:18 | FromDiscord | <ShalokShalom> I mean, his Rebel Nim logo looks not that bad 😄 |
14:27:25 | FromDiscord | <auxym> In reply to @Rika "Who’s the sensitive one": lol, the guy was butthurt enough to fork awesome nim with the only changes being an insult to the nim community, an offensive comment on trans people and a link to some shitty telegram 🙄 ↵↵that'll show em! |
14:27:33 | FromDiscord | <ShalokShalom> Maybe he could do more of that stuff 🥳 |
14:28:30 | FromDiscord | <ShalokShalom> In reply to @auxym "lol, the guy was": Yeah, I mean it was not even a transperson involved in the discussion with him, as far as I can tell. |
14:28:47 | FromDiscord | <ShalokShalom> Idk, why he would come up with this |
14:31:57 | FromDiscord | <Dr. Theo> >.> |
14:47:11 | FromDiscord | <ringabout> In reply to @auxym "lol, the guy was": Yeah, I agree. <@&371760044473319454> |
14:56:07 | FromDiscord | <ShalokShalom> Oh, that's nice |
14:56:10 | FromDiscord | <ShalokShalom> https://pmetras.gitlab.io/nim0/ |
14:56:26 | FromDiscord | <ShalokShalom> So, Nim is fundamentally really so close to Oberon? |
14:56:32 | FromDiscord | <ShalokShalom> That's crazy. |
14:58:26 | FromDiscord | <ringabout> In reply to @ShalokShalom "So, Nim is fundamentally": Yeah, because Niklaus Wirth has written a nice compiler construction book => https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction1.pdf |
14:58:36 | FromDiscord | <ShalokShalom> Nice nice |
14:59:50 | FromDiscord | <ShalokShalom> I thought Nim has some extras from Oberon, not that it is actually a superset |
14:59:56 | FromDiscord | <ShalokShalom> That's awesome! 🥳 |
15:00:10 | FromDiscord | <ShalokShalom> Did Wirth at any point say anything about Nim? |
15:00:25 | FromDiscord | <ShalokShalom> Do we know, that he cares and even knows about it? |
15:00:50 | FromDiscord | <auxym> In reply to @ShalokShalom "https://pmetras.gitlab.io/nim0/": That's cool. I had read before that Oberon/Modula were large sources of inspiration for Araq. |
15:10:07 | PMunch | Okay, this kind of behaviour is obviously not allowed. Have to wait for a Gitter moderator though to get rid of them, so please just ignore them until that happens. I do agree that the logo looks cool though.. |
15:18:47 | PMunch | Apparently Gitter uses Matrix now, so I was able to ban them from there. Please carry on, nothing to see here |
15:19:28 | NimEventer | New Nimble package! pipexp - Expression-based pipe operators with placeholder argument, see https://codeberg.org/emanresu3/nim-pipexp |
15:20:09 | * | PMunch quit (Quit: Leaving) |
15:27:29 | FromDiscord | <ShalokShalom> @PMunch the person had been on the server already years ago, with similar outcome |
15:27:37 | FromDiscord | <jmgomez> In reply to @ringabout "Yeah, because Niklaus Wirth": wow, this is great. Thanks for sharing it! |
15:27:45 | FromDiscord | <ShalokShalom> It was also banned from the Telegram and the Nimskull channel |
15:30:11 | FromDiscord | <ShalokShalom> sent a long message, see http://ix.io/4hnu |
15:30:28 | FromDiscord | <ShalokShalom> Its very inspirational. |
15:34:03 | FromDiscord | <pmunch> Oh really? I wasn't aware. Got the feeling they had been in (and possibly banned from) our other channels |
15:35:04 | FromDiscord | <jmgomez> In reply to @ShalokShalom "Wirth had an interview": Ouch, will save it though. I think we are not far away from an AI that gets a video as input and outputs a translated version |
15:42:21 | * | Phytolizer joined #nim |
15:44:47 | FromDiscord | <ShalokShalom> Youtube has this since years |
15:44:59 | FromDiscord | <ShalokShalom> You could actually upload and see 🙂 |
15:46:03 | FromDiscord | <jmgomez> I meant including audio 🙂 |
15:46:05 | FromDiscord | <ShalokShalom> https://vocalmatic.com/blog/how-to-automatically-generate-subtitles-for-youtube/ |
15:46:13 | FromDiscord | <ShalokShalom> Ah, yeah that |
15:46:42 | FromDiscord | <ShalokShalom> I also have to admit, his German has a strong accent, so idk how easy it is to pick it up for YouTube |
15:47:04 | FromDiscord | <ShalokShalom> But it seems doable, when somebody does correct the failing parts. |
15:50:50 | FromDiscord | <undel> What are the best practices when (re)using `AsyncHttpClient`? I've noticed that (assuming due to HTTP `keep-alive`) that it hangs on to long-dead connections, and then when you make a request later, you get an exception because the socket was already closed. |
16:16:07 | FromDiscord | <ShalokShalom> https://youtu.be/-J3wNP6u5YU |
16:23:03 | FromDiscord | <ali> Can't check the socket?↵(@undel) |
16:24:42 | FromDiscord | <auxym> In reply to @ShalokShalom "https://youtu.be/-J3wNP6u5YU": I hate hungarian notation, but am really torn when implementing something like the USB spec for example (https://www.beyondlogic.org/usbnutshell/usb5.shtml). Should the struct member be named `bcdUSB` to conform to the spec (bcd as in binary coded decimal), or use a nice distinct type in nim and name the member `usbVersion` (which is what it actually is) |
16:25:33 | FromDiscord | <undel> sent a code paste, see https://play.nim-lang.org/#ix=4hnH |
16:57:05 | FromDiscord | <Phil> In reply to @synthels "??": To provide a reference point:↵This is, within an entire year of this discord server, I believe the first true troll I've seen in this chat.↵There have been crypto spammers, but their lifetime on this servers is typically measured in seconds or minutes before they get got.↵So he is pretty much an exception from what I've seen |
17:06:31 | FromDiscord | <ali> Looks like asynchttpcliemt doesn't support timeout either that's annoying↵(@undel) |
17:07:33 | NimEventer | New Nimble package! db_connector - Unified database connector., see https://github.com/nim-lang/db_connector |
17:28:07 | * | PMunch joined #nim |
17:29:33 | PMunch | So, anyone up for a Nim Advent of Code stream? |
17:30:03 | FromDiscord | <rakgew> yay!! I was about to ask! \:-D |
17:30:25 | PMunch | Just getting the stream set up now :) |
17:31:04 | FromDiscord | <rakgew> over on twitch right? |
17:31:37 | PMunch | Yup, Twitch and YouTube, as usual |
17:32:16 | FromDiscord | <rakgew> looking forward! |
17:36:26 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4hnX |
17:40:24 | FromDiscord | <Elegantbeef> use `switch` instead |
17:40:34 | FromDiscord | <Elegantbeef> `switch("define", $bleh)` should work |
17:40:58 | FromDiscord | <Elegantbeef> or `switch("pluginDir", $bleh)` in this case, always forget |
17:43:04 | FromDiscord | <jmgomez> tried it but it doesnt work neither with switch, on the later it tries to convert it to --pluginDir |
17:43:13 | FromDiscord | <jmgomez> the first one is missing the value |
17:44:54 | FromDiscord | <jmgomez> in the sources is just a builtin so not sure where the impl is |
17:45:05 | * | pro joined #nim |
17:45:47 | FromDiscord | <ringabout> > `defined` now accepts identifiers separated by dots, i.e. `defined(a.b.c)`.↵> In the command line, this is defined as `-d:a.b.c`.↵I'm not sure. |
17:46:50 | FromDiscord | <Elegantbeef> I dont really see the benefit |
17:47:07 | FromDiscord | <Elegantbeef> It's the same as "Please prefix all module defines with a unique name" |
17:49:11 | FromDiscord | <jmgomez> so there is no other way to pass the value right? I guess I will change the approach then |
17:49:36 | PMunch | Hmm, YouTube seems to be giving me some trouble |
17:49:43 | PMunch | But I'm live on Twitch at least: https://www.twitch.tv/pmunche |
17:49:49 | FromDiscord | <Elegantbeef> Switch should work jmgomez iirc |
17:51:04 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4ho8 |
17:51:28 | pro | we are here PMunch |
17:51:54 | pro | you look good :) |
17:52:05 | FromDiscord | <Elegantbeef> try `define:pluginDir` dont recall |
17:52:17 | FromDiscord | <Elegantbeef> Jeez guy's just fishing for compliments i see! 😛 |
17:53:48 | FromDiscord | <jmgomez> Same deal, I will switch the approach. Not a big deal in my case. Thanks anyways! |
18:04:22 | * | Phytolizer quit (Remote host closed the connection) |
18:04:42 | * | Phytolizer joined #nim |
18:05:35 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4hoe |
18:06:12 | * | rockcavera joined #nim |
18:07:53 | FromDiscord | <ShalokShalom> In reply to @auxym "I hate hungarian notation,": Maybe abstracting it in a way, so that both is done 😛 |
18:09:20 | FromDiscord | <Phil> In reply to @auxym "I hate hungarian notation,": The hell does "bcdUsb" even mean |
18:09:36 | FromDiscord | <ShalokShalom> USB 3 spec is pretty crazy |
18:09:44 | FromDiscord | <Phil> Oh I have seen how absolutely insane it is |
18:09:51 | FromDiscord | <Phil> There is multiple LTT rants of it out there |
18:09:57 | FromDiscord | <ShalokShalom> I followed a pretty tech savy programmer on Twitter implementing it |
18:10:00 | FromDiscord | <Phil> And USB 4 is gearing up to be even more insane |
18:10:10 | FromDiscord | <ShalokShalom> And seeing its sanity coming down |
18:16:25 | NimEventer | New thread by TKD: Built-in (whole) array programming in Nim v2 or even sooner for scientific computing, see https://forum.nim-lang.org/t/9682 |
18:17:22 | pro | we are still live |
18:17:26 | pro | :) |
18:21:48 | FromDiscord | <hotdog> In reply to @PMunch "But I'm live on": Oh no the comments 😂 |
18:22:02 | FromDiscord | <hotdog> PMunch are you being cyberbullied https://media.discordapp.net/attachments/371759389889003532/1047940654132637806/image.png |
18:23:19 | FromDiscord | <auxym> checks out for twitch commenters |
18:24:31 | FromDiscord | <Require Support> so if i build a binary with nim, even i supply `--stackTraceMsgs:off ` I still manage to get message pop ups / error info if the app crashes. How do i make it so it "silently" crashes |
18:30:40 | FromDiscord | <hotdog> In reply to @Require Support "so if i build": What OS and what does the popup look like? |
18:30:49 | FromDiscord | <Require Support> windows, messagebox |
18:31:15 | FromDiscord | <Require Support> popup contains the line number + file of the error |
18:31:29 | FromDiscord | <Require Support> built with `--app:gui` |
18:34:37 | FromDiscord | <hotdog> I'm not as familiar with Windows. Does this still happen with -d:release? |
18:35:00 | FromDiscord | <Require Support> yes |
18:35:23 | FromDiscord | <Require Support> actually I was doing `-d:danger` not sure if that's different but ill keep testing |
18:38:44 | FromDiscord | <hotdog> In reply to @Require Support "actually I was doing": Can you try `--stackTrace:off` ? |
18:47:54 | PMunch | @hotdog, weird to be sexualised on a programming stream. But to each their own.. Maybe if I get a thousand viewers I'll take my shirt off :P |
18:48:12 | FromDiscord | <Yepoleb> In reply to @hotdog "PMunch are you being": How's this bullying? |
18:49:25 | PMunch | Well it could be considered harassment, which could be considered a form of bullying |
18:49:28 | pro | is the stream done? |
18:49:33 | PMunch | Yup |
18:49:38 | pro | I was watching the first half |
18:49:45 | pro | when you were technical :P |
18:49:57 | PMunch | Technical? |
18:50:17 | FromDiscord | <Phil> I'm fairly sure this was just meant in jest |
18:50:32 | FromDiscord | <Phil> One could say that hotdog can be quite a |
18:50:33 | FromDiscord | <Phil> jester |
18:50:45 | pro | yeah it was perfect first half |
18:50:50 | pro | before spammer |
18:50:55 | pro | you lost your focus when spammer hit |
18:51:00 | PMunch | Oh :P |
18:51:13 | pro | and then misscoded the 2nd part, I saw it, and was like mmmmmmmm |
18:51:14 | PMunch | Ah right, I went off trying to remove the message.. |
18:51:14 | FromDiscord | <Phil> Did PMunch get stunlocked by twitch chat? |
18:51:18 | FromDiscord | <Phil> Happens more often than you think |
18:51:49 | PMunch | It's surprisingly hard to think of a solution while trying to say something useful |
18:51:57 | pro | I have to do some work, will tune in tomorrow :D |
18:52:14 | pro | also if you didn't already hear, you look handsome :) |
18:53:33 | PMunch | Haha, thank you |
18:54:01 | pro | night guys |
18:54:02 | * | pro quit (Quit: pro) |
18:55:00 | FromDiscord | <hotdog> In reply to @PMunch "<@472459996068839424>, weird to be": Perhaps there is an untapped niche for nude programming streams |
18:55:19 | PMunch | Haha, I imagine there might be |
18:55:26 | PMunch | But it's probably untapped for a reason |
18:55:40 | FromDiscord | <Phil> In reply to @hotdog "Perhaps there is an": One that lets you participate in a "get banned"-speedrun |
18:55:44 | FromDiscord | <Yepoleb> I have thought he's hot before lewd twitch comments |
18:55:58 | FromDiscord | <Phil> In reply to @Yepoleb "I have thought he's": Oh no, a hipster! |
18:56:08 | FromDiscord | <hotdog> I wonder if that person goes on hot tub streams and says "you look smart, can you solve a leetcode problem on stream pls <3" |
18:56:13 | FromDiscord | <Yepoleb> No i don't mean it that way |
18:56:31 | FromDiscord | <hotdog> In reply to @Yepoleb "How's this bullying?": Yeah I'm just messing around |
18:57:41 | FromDiscord | <Yepoleb> I wonder if there are femboy programming streams |
18:57:53 | FromDiscord | <Phil> 1000% |
18:58:05 | FromDiscord | <Phil> I don't know of them yet, but I am sure they exist |
18:58:11 | FromDiscord | <Phil> There is this programming socks meme for a reasonn |
18:58:13 | FromDiscord | <Phil> (edit) "reasonn" => "reason" |
18:58:21 | FromDiscord | <hotdog> In reply to @Isofruit "I don't know of": Good cover 😉 |
18:58:31 | PMunch | I don't know what programming socks means, and I'm too afraid to ask.. |
18:59:22 | FromDiscord | <Phil> In reply to @PMunch "I don't know what": Its actually nothing bad, one sec |
18:59:38 | FromDiscord | <Phil> https://knowyourmeme.com/memes/programming-socks |
19:00:50 | FromDiscord | <hotdog> You could get some black and yellow ones for your nim streams PMunch |
19:01:13 | PMunch | Haha, I'd have to seriously fiddle with my camera angles to get socks on camera.. |
19:02:11 | FromDiscord | <Yepoleb> In reply to @Isofruit "I don't know of": i couldn't find any |
19:03:48 | FromDiscord | <Phil> In reply to @Yepoleb "i couldn't find any": I would try to find any, but I legitimately find twitch's search UI repulsive |
19:04:02 | FromDiscord | <Yepoleb> oh, i used google |
19:06:02 | FromDiscord | <Phil> https://www.scmp.com/news/china/society/article/3007807/meet-chinas-fabulous-cross-dressing-computer-coders |
19:07:02 | FromDiscord | <Phil> No streamers to find anywhere, huh |
19:07:12 | FromDiscord | <Phil> Eh, not willing to invest more than 5 minutes into this |
19:32:49 | FromDiscord | <kaddkaka> https://discord.com/channels/371759389889003530/913821909836255263/1047956739749838888 |
19:38:23 | FromDiscord | <guttural666> SOA abstraction layers should be relatively easy to do in Nim, anybody got experience with stuff like that? |
19:39:47 | FromDiscord | <guttural666> I fear lookup by a string name field for my string riddled sequence of objects will perform like dog poop |
19:45:14 | * | arkurious joined #nim |
19:45:16 | FromDiscord | <hotdog> In reply to @guttural666 "SOA abstraction layers should": https://nimble.directory/pkg/aossoa |
19:45:27 | FromDiscord | <hotdog> Haven't used it, but maybe something to check out |
19:46:19 | FromDiscord | <guttural666> In reply to @hotdog "https://nimble.directory/pkg/aossoa": amazing, that's what I've hoped for, thanks!! |
19:52:20 | FromDiscord | <zingstrok> Hi, how i can echo the First Character of a String ?? |
19:52:32 | FromDiscord | <guttural666> echo str[0] |
19:52:37 | FromDiscord | <zingstrok> thx |
20:01:18 | FromDiscord | <guttural666> are declared booleans default initialized to false? or any other types such as int for that matter? |
20:01:46 | FromDiscord | <Elegantbeef> All types are 0 initialised so bools are false yes |
20:01:53 | FromDiscord | <guttural666> brilliant |
20:08:44 | * | jmdaemon joined #nim |
20:08:47 | * | krux02 joined #nim |
20:25:44 | NimEventer | New Nimble package! rwlocks - Readers-writer (MRSW) lock, see https://github.com/tdely/nim-rwlocks |
20:25:44 | NimEventer | New Nimble package! punycode - Implements a representation of Unicode with the limited ASCII character subset in Nim., see https://github.com/nim-lang/punycode |
20:27:12 | FromDiscord | <guttural666> stupid how powerful templates alone are, can't get over the fact that a three line template is just able to make 50 lines of c++ obsolete, absolute clown world |
20:27:20 | FromDiscord | <guttural666> I'm mad actually |
20:27:59 | FromDiscord | <voidwalker> we should open a nim porn channel on porntube |
20:28:06 | FromDiscord | <guttural666> hahaha |
20:30:05 | FromDiscord | <guttural666> writing this blew my mind couple days ago https://media.discordapp.net/attachments/371759389889003532/1047972877623902208/image.png |
20:30:42 | * | krux02 quit (Remote host closed the connection) |
20:31:41 | FromDiscord | <guttural666> populate object fields with comma seperated values of a user input |
20:34:28 | FromDiscord | <guttural666> may be buggy haha |
20:43:57 | FromDiscord | <voidwalker> So I need to send over a socket various uint16, 32, 64, in big endian order, + some byte sequence. Is there some socket library that allows sending other types than string maybe ? I didn't find much in alternative sockets libs for nim. Or how else would I write this cleanly. Currently I have this mess: |
20:44:40 | FromDiscord | <hmmm> boiz how do I check if a string has at least 2 lines? |
20:44:57 | FromDiscord | <hmmm> if s.splitlines.len >1 failed me |
20:44:58 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4hp0 |
20:45:12 | FromDiscord | <voidwalker> (edit) "https://play.nim-lang.org/#ix=4hp0" => "https://play.nim-lang.org/#ix=4hp1" |
20:46:30 | FromDiscord | <hmmm> oh I'm a bozo, it works now 😃 |
20:57:13 | FromDiscord | <voidwalker> hmm seems sendto has a variant which takes a pointer to the data, maybe that is more suitable |
21:31:56 | * | pbotfullerton joined #nim |
21:32:46 | pbotfullerton | Quick question, if I want to be able to modify the elements in a table after insertion, I need to use a TableRef? |
21:33:08 | pbotfullerton | I'm inserting objects into this table if it changes anything |
21:33:52 | FromDiscord | <Elegantbeef> No you can use `Table` |
21:34:07 | FromDiscord | <Elegantbeef> Just make sure you declare it as a `var` and if it's a procedure pass it as `var` |
21:35:20 | pbotfullerton | Thank you |
21:35:45 | pbotfullerton | Also applies to tables of tables? |
21:35:58 | FromDiscord | <Elegantbeef> Of course |
21:36:43 | FromDiscord | <Elegantbeef> You only should use ref types if you want the semantics of a reference(heap allocated pointer managed by GC), not for mutability reasons |
21:37:49 | pbotfullerton | OK, thank you. Does that mean that unless specifically created as a ref, objects will be created on the stack and so will tables, seqs, etc? |
21:38:30 | FromDiscord | <Elegantbeef> The data will be heap allocated since they're dynamic and have to be heap allocated, but yes the object portion will be stack allocated |
21:38:56 | FromDiscord | <Elegantbeef> Sequences and strings have value semantics so copy on assignment instead of point to the same collection |
21:40:04 | FromDiscord | <Elegantbeef> \copy on assignment depends on whether you're using Arc/Orc and if a move can be made but that's a detail for now |
21:42:20 | pbotfullerton | So for example seq.add(whatever) will copy the temporary stack-allocated object (I'm assuming I'm doing this in a loop) into the heap into the seq's internal storage and so will the table |
21:42:48 | FromDiscord | <Elegantbeef> Yep |
21:43:19 | FromDiscord | <Elegantbeef> Due to the dynamic nature of them they have to be heap allocated but still have value semantics |
21:43:38 | FromDiscord | <Elegantbeef> Unlike C# or other languages with classes for Dictionary or List you get a copy on assignment though |
21:48:12 | * | PMunch quit (Quit: leaving) |
21:51:15 | FromDiscord | <pietroppeter> In reply to @hugogranstrom.nim "It definitely is B)": you can try and replicate with p5nim this other nice visualization: https://www.reddit.com/r/adventofcode/comments/z9kk1m/2022_day_1_adding_up_the_calories/ |
21:54:15 | FromDiscord | <voidwalker> In reply to @voidwalker "So I need to": @ElegantBeef Mind taking a look at this ? How would you do it. I am currently trying to rewrite it as a seq of bytes (array would be better, but how do you concatenate array of bytes without writing your own proc?). like ` let anMsgB = cast[seq[uint8]](repConId) & ...` what do you think ? |
21:54:41 | FromDiscord | <Elegantbeef> I'd make my own proc |
21:55:35 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "you can try and": Wow, took a moment before I realized what even is happening there 😮 |
21:55:55 | FromDiscord | <voidwalker> uint64 can be cast to seq[uint8] ? |
21:57:19 | FromDiscord | <Elegantbeef> No |
21:58:01 | FromDiscord | <Yepoleb> no, only array[8, uint8] |
21:58:29 | FromDiscord | <hugogranstrom> In reply to @pietroppeter "you can try and": I will give it a try tomorrow though 👍 |
22:01:43 | * | LuxuryMode joined #nim |
22:01:45 | pbotfullerton | Thanks for the explanation |
22:02:09 | FromDiscord | <Yepoleb> @voidwalker use a StringStream and write[T] to serialize arbitrary types |
22:02:27 | FromDiscord | <Yepoleb> i think that's what you want |
22:02:35 | FromDiscord | <voidwalker> Write[T] ? |
22:02:46 | FromDiscord | <Yepoleb> https://nim-lang.org/docs/streams.html#write%2CStream%2CT |
22:04:16 | FromDiscord | <voidwalker> Hmm this looks promising indeed. I have no ideea what I want, but the code to be simple, elegant, and as efficient as possible : P |
22:06:18 | FromDiscord | <Yepoleb> i just noticed you wrote a more detailed description of what you want to do earlier |
22:07:21 | FromDiscord | <voidwalker> Yeah, reached the UDP tracker implementation in my toy bittorrent project, and realized the way I set up data to send over socket is not elegant at all : ( |
22:10:10 | FromDiscord | <Yepoleb> for each message create a StringStream and at the end get the final message string from the stream and send it using the socket functions |
22:10:37 | FromDiscord | <voidwalker> yep, that part was obvious |
22:11:02 | FromDiscord | <voidwalker> I wonder why write[T] is not available for normal strings ? |
22:12:04 | FromDiscord | <Yepoleb> if you need to do endian conversion you can either make a generic write wrapper that uses sizeof to determine the right swapping offsets or just implement it for all int types you use |
22:13:23 | FromDiscord | <voidwalker> I found another useful unit in the "stew" module, from the status people, that has endian conversion as a function |
22:13:37 | FromDiscord | <Yepoleb> In reply to @voidwalker "I wonder why write[T]": probably to prevent accidentally writing binary data to text strings |
22:14:03 | FromDiscord | <Require Support> anyone try weave on windows ? |
22:20:50 | FromDiscord | <Gumbercules> not anytime recently |
22:22:01 | FromDiscord | <Gumbercules> I never was able to successfully get weave integrated in any of my projects - I ended up writing my own fiber based job system |
22:22:16 | FromDiscord | <Gumbercules> although you could probably accomplish something similar with closure iterators / continuations (using cps) |
22:22:40 | FromDiscord | <Gumbercules> although I lack the nice abstractions of `parallel for` etc... that weave provides |
22:23:35 | FromDiscord | <Gumbercules> I will probably eventually write a C API for - https://github.com/GameTechDev/GTS-GamesTaskScheduler - and wrap that |
22:36:37 | FromDiscord | <hmmm> hey what was the trick to make " " work inside fmt"blabla {a.proc("x")} " |
22:37:12 | FromDiscord | <Elegantbeef> three quotes |
22:37:14 | FromDiscord | <hmmm> triple quotes doesn't seem to do it |
22:37:15 | FromDiscord | <hmmm> nunu |
22:37:27 | FromDiscord | <Elegantbeef> Probably cannot then |
22:37:49 | FromDiscord | <hmmm> fmt always find a way to not work for me and I need to resort to the & |
22:39:28 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4hpy |
22:39:58 | FromDiscord | <voidwalker> looks reasonably clean @Yepoleb . You think a template can be written to take various data types and pass them to hello.write as arg ? |
22:40:11 | FromDiscord | <voidwalker> Or maybe something like that already exists |
22:42:17 | FromDiscord | <Yepoleb> In reply to @voidwalker "looks reasonably clean <@144300201857777664>": i don't understand what you want that write does not already do |
22:42:36 | FromDiscord | <voidwalker> I want to turn the 3 calls to hello.write() to a single line |
22:43:11 | FromDiscord | <Elegantbeef> void walker hates multi line code cause they're deranged |
22:43:17 | FromDiscord | <Elegantbeef> Or atleast the latter part is what i tell myself |
22:44:04 | FromDiscord | <Yepoleb> honestly i wouldn't 😕 |
22:44:06 | FromDiscord | <voidwalker> well, in this case, the 3 data ints are all part of the same message, so logically they belong together |
22:46:30 | FromDiscord | <Yepoleb> and i am not good with templates, i'm actually still just a python, c++ programmer in disguise |
22:57:23 | FromDiscord | <voidwalker> but beef is .. ? aren't you beef |
22:57:54 | FromDiscord | <Elegantbeef> Sure but i try not to encourage inanity |
22:58:27 | FromDiscord | <Elegantbeef> Like you could do `hello.write (swapBytes ..., 0u32, trid)` but meh that's noisey |
22:59:00 | * | emery quit (Ping timeout: 248 seconds) |
23:04:39 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4hpD |
23:06:50 | FromDiscord | <Yepoleb> besides the inconsistent usage of swapbytes that's fine |
23:07:09 | FromDiscord | <voidwalker> well, no reason to swap bytes of a random number, or of a null value |
23:07:54 | FromDiscord | <Yepoleb> it shouldn't have to be called explicitly |
23:08:15 | FromDiscord | <Yepoleb> because you will forget about it and search forever |
23:08:45 | FromDiscord | <voidwalker> not sure what you mean ? |
23:09:47 | FromDiscord | <Yepoleb> swapBytes should automatically called for any integer, so you can't forget about it and you do that by wrapping it in a proc |
23:09:56 | FromDiscord | <Yepoleb> (edit) "it" => "it," |
23:10:10 | FromDiscord | <Yepoleb> (edit) "swapBytes should automatically called for any integer, so you can't forget about it, and you do that by wrapping it ... in" added "and the write call" |
23:12:19 | FromDiscord | <voidwalker> waste of picojoules : p |
23:13:22 | * | Phytolizer quit (Remote host closed the connection) |
23:14:49 | FromDiscord | <Rika> What about the joules you spend thinking |
23:15:53 | FromDiscord | <voidwalker> I don't think that much |
23:16:14 | FromDiscord | <auxym> eat moar junk food, at east thats what i do |
23:17:59 | FromDiscord | <guttural666> roast my WIP noob nim code: https://gitlab.com/hansdampfinger666/medl |
23:18:00 | FromDiscord | <Yepoleb> In reply to @voidwalker "waste of picojoules :": it will get compile time optimized anyway when it's unnecessary |
23:18:27 | FromDiscord | <guttural666> main + api is the meat of it |
23:20:12 | FromDiscord | <auxym> also swapbytes is not portable, if you're on a BE machine then you dont want to swap |
23:20:22 | FromDiscord | <Yepoleb> In reply to @guttural666 "roast my WIP noob": what a goofy name lol |
23:20:44 | FromDiscord | <auxym> of course, BE is so rare as to be almost irrelevant these days |
23:20:53 | FromDiscord | <guttural666> In reply to @Yepoleb "what a goofy name": i dunno, I think the stupider the better haha |
23:21:03 | * | rockcavera quit (Remote host closed the connection) |
23:21:07 | FromDiscord | <guttural666> In reply to @Yepoleb "what a goofy name": first brain fart that enters my mind, that's my working title haha |
23:22:53 | FromDiscord | <Yepoleb> In reply to @auxym "of course, BE is": my parents 10 year old modem runs big endian mips |
23:23:36 | FromDiscord | <Yepoleb> that's the first and only time i saw it in the wild |
23:23:54 | FromDiscord | <auxym> there. want to run @voidwalker 's torrent lib on it? 😉 |
23:24:06 | FromDiscord | <guttural666> In reply to @Yepoleb "what a goofy name": and it's kind of a meme in German, so I like it ^^ |
23:25:02 | FromDiscord | <Yepoleb> i know the meme, meddl leude |
23:26:23 | FromDiscord | <guttural666> In reply to @Yepoleb "i know the meme,": that's it hahaha |
23:26:48 | FromDiscord | <Yepoleb> In reply to @auxym "there. want to run": definitely |
23:28:03 | FromDiscord | <voidwalker> hm indeed, technically I am not doing the right portable thing there : ( |
23:29:49 | FromDiscord | <Yepoleb> https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/endians.nim |
23:30:08 | FromDiscord | <Yepoleb> here's how to do it properly |
23:30:42 | FromDiscord | <Yepoleb> you could also use that directly, it's in the stdlib |
23:33:15 | noeontheend | I'm trying to add a nimble task, but would like to call some functions from the standard library/my own modules. Is it possible to import those to use in the task? |
23:34:03 | FromDiscord | <Yepoleb> have you tried if it just works? |
23:35:00 | * | derpydoo quit (Ping timeout: 260 seconds) |
23:40:54 | FromDiscord | <auxym> In reply to @voidwalker "hm indeed, technically I": https://justine.lol/endian.html |
23:42:14 | FromDiscord | <auxym> In reply to @noeontheend "I'm trying to add": most things should work, except anything that uses C FFI (eg re, sqlite, ssl stuff) because nimble tasks are executed in the nim vm |
23:42:39 | FromDiscord | <auxym> see docs here: https://nim-lang.org/docs/nims.html |
23:56:20 | FromDiscord | <Tuatarian> can someone explain what's happening here? |
23:56:28 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4hpL |
23:56:36 | FromDiscord | <Tuatarian> outputs `Sym "s"` |
23:58:05 | FromDiscord | <Rika> You’re passing s, yes |
23:58:30 | FromDiscord | <Rika> The value isn’t transmitted since it’s a macro, runtime vs compile time |
23:58:38 | FromDiscord | <Tuatarian> oh I see |
23:59:18 | FromDiscord | <Tuatarian> so how would I try to do the thing that I'm trying to do? |
23:59:27 | FromDiscord | <Tuatarian> is it possible if s is not known at comptime? |
23:59:33 | FromDiscord | <Rika> Do what? |
23:59:42 | FromDiscord | <Tuatarian> pass the value of s instead of just the symbol s |
23:59:52 | FromDiscord | <Rika> Required to be known on compile time |