00:22:03 | * | beholders_eye quit (Ping timeout: 252 seconds) |
00:36:54 | * | krux02 quit (Remote host closed the connection) |
00:46:46 | * | dukester joined #nim |
00:50:09 | dukester | Nim noob here. Trying to sign up to the Nim forum, but it wont let me. Is the forum down? |
01:00:35 | dukester | never mind! i see that the forum's mail-sender is (still) facing some issues |
01:00:38 | FromDiscord | <bostonboston> Inheritance bad always, simple as |
01:00:56 | FromDiscord | <Elegantbeef> As you actively use C# |
01:01:04 | FromDiscord | <bostonboston> Unfortunately |
01:01:18 | FromDiscord | <bostonboston> Interfaces okay sometimes |
01:02:53 | FromDiscord | <bostonboston> C# happens to be the lingua franca of my work place, because I'm not a senior developer (or developer at all) they semi require I write in a language someone else can review |
01:03:18 | FromDiscord | <Elegantbeef> I do have to say though in the case of UI OOP is hard to beat |
01:03:38 | FromDiscord | <bostonboston> I concede that |
01:04:11 | FromDiscord | <Elegantbeef> I tried statically typed UI with no runtime dispatch and it was hell 😛 |
01:04:32 | FromDiscord | <Elegantbeef> Moreso due to Nim than just the idea |
01:04:39 | * | rockcavera joined #nim |
01:04:47 | FromDiscord | <.throwstar> Thats what im saying |
01:05:04 | * | dukester left #nim (Time to go) |
01:05:28 | FromDiscord | <Elegantbeef> My latest UI uses inheritance, runtime dispatch, and hides it in a semi usable builder pattern |
01:05:47 | FromDiscord | <bostonboston> We have a custom UI lib for one of our embedded environments, single threaded, no async, but luckily it's all just colored boxes and text |
01:06:00 | FromDiscord | <bostonboston> C++ |
01:06:21 | FromDiscord | <Elegantbeef> I was tempted to use an object variant instead of inheritance for my ui library, but felt that was a bit too tedious to setup |
01:07:19 | FromDiscord | <.throwstar> In reply to @bostonboston "We have a custom": Workplace development moment |
01:11:25 | FromDiscord | <ambient3332> I'm tempted to try ECS for UI |
01:11:44 | FromDiscord | <bostonboston> They made a lot of silly decisions before I got there |
01:11:46 | FromDiscord | <.throwstar> Whats ECS |
01:11:50 | FromDiscord | <ambient3332> entity component system |
01:12:02 | FromDiscord | <ambient3332> https://en.wikipedia.org/wiki/Entity_component_system |
01:13:20 | FromDiscord | <.throwstar> In reply to @bostonboston "They made a lot": Id try to not express myself creatively with workplace code. Its a whole different beast than just development for fun |
01:13:49 | FromDiscord | <Elegantbeef> Eh ECS is a bit hard to do declaratively |
01:13:51 | FromDiscord | <bostonboston> Good thing we're not allowed to fix our code |
01:13:56 | FromDiscord | <Elegantbeef> I wanted declarative stateful UI |
01:14:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=YhfbgkXO |
01:15:32 | FromDiscord | <.throwstar> In reply to @ambient3332 "https://en.wikipedia.org/wiki/Entity_component_syst": UI is a complicated thing so it requires a complicated solution. I dont think it needs to be as complicated as that though |
01:16:51 | FromDiscord | <Elegantbeef> Well you can make a ECS specifically for UI or use an existent ECS, either way it seems a bit awful imo |
01:17:36 | FromDiscord | <Elegantbeef> I'm one of those weirdos that wants to define UI in code |
01:18:10 | FromDiscord | <.throwstar> If its a small project its not a big deal |
01:18:45 | FromDiscord | <bostonboston> I have unfortunately grown in fondness to xaml |
01:19:30 | FromDiscord | <bostonboston> More so I'm probably fond of the big bloated machine that is .net that makes it easy to do whatever I want even if it's wrong |
01:21:20 | FromDiscord | <ambient3332> Can't you use declarative style that build the underlying data structure, but the actual data structure is independent from the code? and you can run that data structure as the basis for the UI? |
01:22:06 | FromDiscord | <Elegantbeef> You could, but that sounds like work |
01:22:20 | FromDiscord | <.throwstar> Thats what im saying |
01:22:54 | FromDiscord | <.throwstar> Complexity killed the tech start-up |
01:23:32 | FromDiscord | <ambient3332> It's quite astonishing how little code the consumer is happy to pay for |
01:23:51 | FromDiscord | <whorf> is there no built-in for flattening a sequence? |
01:23:57 | FromDiscord | <ambient3332> and when you make super complex stuff that requires ton of work and innovation you actually make 100x less money |
01:24:06 | FromDiscord | <Elegantbeef> `sequtils.flatten`? |
01:24:17 | FromDiscord | <Elegantbeef> Wait that's not a thing |
01:25:21 | FromDiscord | <.throwstar> In reply to @ambient3332 "and when you make": Youre mixing up work development and for fun development |
01:25:46 | FromDiscord | <ambient3332> In reply to @.throwstar "Youre mixing up work": I'm just actually talking two of my different products that I sold/am selling |
01:25:46 | FromDiscord | <Elegantbeef> Yea ambient I'm a for fun programmer |
01:25:55 | FromDiscord | <Elegantbeef> No one in their right mind would pay me! |
01:26:31 | FromDiscord | <Elegantbeef> @whorf choose one https://github.com/beef331/nimtrest/wiki/Code-snippets#procedure-based-introspection 😄 |
01:27:11 | FromDiscord | <Elegantbeef> the one with `rootType` is more sensible |
01:28:22 | FromDiscord | <.throwstar> In reply to @Elegantbeef "Yea ambient I'm a": Im just trying to say that expressing yourself for money is risky |
01:30:51 | FromDiscord | <whorf> In reply to @Elegantbeef "<@426851559952089088> choose one https://github.com": I already had an urge to use zero-functional so I'm just gonna start converting things to it: <https://github.com/zero-functional/zero-functional> |
01:33:43 | FromDiscord | <ambient3332> I dread to use zero-functional and sugar, as they feel more like language features instead of libraries and then I would be using them all the time |
01:34:34 | * | disso-peach quit (Quit: Leaving) |
01:35:56 | FromDiscord | <Elegantbeef> Oh noes a small dependency |
01:36:23 | FromDiscord | <ambient3332> I mean having highly customizable language is both a pro and con. Pro as in you can express yourself freely. Con as there's no stable baseline |
01:38:13 | FromDiscord | <kreed1415> I noticed that futhark prepends "struct_" to the name of every struct it wraps. Is there an alternative to this behavior that is others could recommend or a way to turn it off? I assume it's done to prevent possible name collisions |
01:39:13 | FromDiscord | <Elegantbeef> You can turn it off if you want |
01:39:19 | FromDiscord | <Elegantbeef> Pmunch shudders at that idea though |
01:39:40 | FromDiscord | <bostonboston> There is still such a thing as idiomatic nim, but I do recall when some new comer on the four was like "why can't we just make (nim implementation) more like python?" And everyone was like "well Nim is not python, anyways here's a set of macros that allow you to write Nim like python" |
01:40:01 | FromDiscord | <bostonboston> Forum not four |
01:40:11 | FromDiscord | <ambient3332> Is there a document or something on what idiomatic Nim looks like? |
01:40:18 | FromDiscord | <Elegantbeef> Actually you might have to use the rename callback |
01:40:29 | FromDiscord | <kreed1415> yeah i figured it would require the callback |
01:40:31 | FromDiscord | <Elegantbeef> https://github.com/PMunch/futhark?tab=readme-ov-file#compatibility-features-and-readability mentioned in here |
01:40:33 | FromDiscord | <kreed1415> im already using that |
01:40:44 | FromDiscord | <kreed1415> I just wasn't sure if this is an incredibly stupid idea lol |
01:41:23 | FromDiscord | <kreed1415> it seems like at the very least I could change it to something not as gross. For something like SDL where the types are everywhere it does get incredibly wordy |
01:42:10 | FromDiscord | <Elegantbeef> Removing the manual overloading and prefixing is ideal |
01:42:31 | FromDiscord | <Elegantbeef> Nothing like `renderer.rendererSetColor(...)` |
01:44:22 | FromDiscord | <kreed1415> hmm I did notice that SDL2 wrapper was done differently |
01:45:24 | FromDiscord | <kreed1415> instead of just providing the struct, SDL2 wrapper provides a WindowPtr which hides the ptr struct_Window |
01:45:43 | FromDiscord | <Elegantbeef> Opaque types are common place |
01:46:04 | FromDiscord | <kreed1415> any idea if you can tell futhark to generate those? |
01:46:48 | FromDiscord | <Elegantbeef> It does already for "Unknown Objects" |
01:47:04 | FromDiscord | <Elegantbeef> Otherwise you'll likely have to declare the types beforehand |
02:07:21 | * | coldfeet quit (Quit: Lost terminal) |
02:25:15 | FromDiscord | <whorf> How do I pass a seq into a proc which takes vararg? I want to pass a sequence of arguments to db.bindParams: <https://nim-lang.org/docs/db_sqlite.html#basic-usage-storing-binary-data-example>↵Manual shows that this should work fine with an array but is it not possible with seq? |
02:26:27 | FromDiscord | <Elegantbeef> You just pass it |
02:26:51 | FromDiscord | <Elegantbeef> `seq` and `array` implicitly convert to `openArray` |
02:31:16 | FromDiscord | <whorf> sent a code paste, see https://play.nim-lang.org/#pasty=TDVvENoD |
02:31:48 | FromDiscord | <Elegantbeef> `@[1u8, 2, 3]` |
02:32:43 | FromDiscord | <whorf> huh |
02:32:45 | FromDiscord | <whorf> interesting |
02:33:09 | FromDiscord | <whorf> well now i gotta figure out why my seq[string] isn't converting |
02:33:22 | FromDiscord | <Elegantbeef> There is no overload there for it to match to |
02:33:55 | FromDiscord | <whorf> it doesn't match to string? |
02:34:15 | FromDiscord | <Elegantbeef> `val: string` is not a collection |
02:34:16 | FromDiscord | <Elegantbeef> It's a single string |
02:35:20 | FromDiscord | <whorf> if it accepts string and int, then @["a","b"] should work if @[1,2] works? |
02:35:40 | FromDiscord | <Elegantbeef> None of those overloads match for `seq[int]` or `seq[string]` |
02:36:07 | FromDiscord | <whorf> ohhhh sorry i get what you did with the u8 thing now↵I want this to be treated as a vararg |
02:37:27 | FromDiscord | <Elegantbeef> Vararg overloads are a bit squirrely |
02:37:40 | FromDiscord | <Elegantbeef> So depends what your signature is, generally you want one vararg and have it last parameter |
02:39:22 | * | rockcavera quit (Remote host closed the connection) |
02:42:01 | FromDiscord | <whorf> The signature for bindParams does have it as the last parameter. Does it matter that it's a macro? |
02:42:36 | FromDiscord | <whorf> https://media.discordapp.net/attachments/371759389889003532/1319132750548045854/image.png?ex=6764d99c&is=6763881c&hm=fbc4254f1f23caf6e807aa48cc8e663fe9f31f8e6a0966bd01a68c0d8d7c1b6d& https://media.discordapp.net/attachments/371759389889003532/1319132750904688753/image.png?ex=6764d99c&is=6763881c&hm=046b55a24c0a6ef0ce3503882614bf971e96ad73fdc06fc7bf8d680bb9dacca4& |
02:43:00 | FromDiscord | <Elegantbeef> What's the overload error? |
02:43:56 | FromDiscord | <whorf> sent a code paste, see https://play.nim-lang.org/#pasty=aVtVNFDR |
02:44:14 | FromDiscord | <Elegantbeef> Oh yea you're overloading untyped |
02:44:21 | FromDiscord | <Elegantbeef> Overloaded untyped can never be called |
02:45:02 | FromDiscord | <whorf> me just want pass list to function accepting multiple values why no possible |
02:45:32 | FromDiscord | <Elegantbeef> Overloading untyped means that the last parameter is always semantically checked to see if it matches, so it'll never fallback to `untyped` |
02:47:11 | FromDiscord | <Elegantbeef> Change that to `varargs[typed]` |
02:54:16 | * | dukester joined #nim |
03:05:22 | FromDiscord | <kreed1415> sent a code paste, see https://play.nim-lang.org/#pasty=kGrLRqkd |
03:06:13 | FromDiscord | <kreed1415> however, Futhark seems to have separated the Event itself from the Enum of events. |
03:08:44 | FromDiscord | <kreed1415> This seems to be the enum of actual Event types: https://media.discordapp.net/attachments/371759389889003532/1319139326356881442/image.png?ex=6764dfbb&is=67638e3b&hm=065bb8b235c147b344123149edb05c8c6ffc08893bab1c00e24589f3151bda4d& |
03:09:37 | FromDiscord | <kreed1415> but the actual type that pollEvent() expects is: https://media.discordapp.net/attachments/371759389889003532/1319139546734002196/image.png?ex=6764dff0&is=67638e70&hm=fab6ef3cd242eebbce8265cc3b6c2352766e52e76332d13282e6c404733eeeb9& |
03:10:58 | FromDiscord | <kreed1415> sent a code paste, see https://play.nim-lang.org/#pasty=xOdxLtqE |
03:11:47 | FromDiscord | <kreed1415> (edit) "https://play.nim-lang.org/#pasty=RixUiMKl" => "https://play.nim-lang.org/#pasty=BrwVQcPO" |
03:12:00 | FromDiscord | <kreed1415> (edit) "https://play.nim-lang.org/#pasty=mMcDpYTC" => "https://play.nim-lang.org/#pasty=cKtpchLu" |
03:12:46 | * | dukester left #nim (Time to go) |
03:13:19 | FromDiscord | <Elegantbeef> It should generate nice names |
03:13:53 | FromDiscord | <kreed1415> In reply to @Elegantbeef "It should generate nice": the problem is that the names don't match |
03:14:41 | FromDiscord | <kreed1415> in this canse event.type_field is a Uint32 and Event_Quit is an enum_EventType |
03:16:02 | FromDiscord | <Elegantbeef> Ah the field is not an enum |
03:16:12 | FromDiscord | <Elegantbeef> Odd might need to explicitly define the types |
03:16:48 | FromDiscord | <kreed1415> the problem is that SDL is basically a giant mass of enums, so the wrapper quickly becomes useless if it can't generate thm |
03:16:50 | FromDiscord | <kreed1415> (edit) "thm" => "them" |
03:16:51 | FromDiscord | <Elegantbeef> Pmunch can give better advice so impatiently wait for him I guess |
03:17:04 | FromDiscord | <kreed1415> yeah I suppose that's the best course of action |
03:19:18 | FromDiscord | <Elegantbeef> Until then you can of course do `Event_Quit.uint32` if you really want to make it work |
03:21:53 | FromDiscord | <kreed1415> In reply to @Elegantbeef "Until then you can": ah yeah that does work |
03:23:13 | FromDiscord | <kreed1415> I shouldn't have to do this lol |
03:23:14 | FromDiscord | <kreed1415> https://media.discordapp.net/attachments/371759389889003532/1319142974998974484/image.png?ex=6764e321&is=676391a1&hm=fbca22424a9fddac0502b459ec36d8a86c500b2e15a26e2b66590c6cb74e7226& |
03:23:31 | FromDiscord | <kreed1415> it definitely feels like there has to be a better way |
04:37:31 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
06:10:27 | * | SchweinDeBurg joined #nim |
06:13:59 | * | alexdaguy joined #nim |
06:44:03 | * | nils` joined #nim |
07:53:02 | * | beholders_eye joined #nim |
09:19:24 | * | beholders_eye quit (Ping timeout: 244 seconds) |
09:40:10 | FromDiscord | <arm_3_d> does GC_ref/unref work with --mm:refc? |
10:03:33 | FromDiscord | <Elegantbeef> It works with Refc and the Rcs |
10:06:18 | FromDiscord | <pmunch> In reply to @kreed1415 "it definitely feels like": That's just the way of C unfortunately. If SDL was written in Nim this would've been a typesafe thing, but alas. |
10:07:02 | FromDiscord | <pmunch> That being said you could create a converter from whatever `EventQuit` is to a uint32. That way you could compare them directly |
10:19:30 | * | beholders_eye joined #nim |
10:24:05 | FromDiscord | <kapendev> hot take: type safety is not that important sometimes. |
10:24:25 | FromDiscord | <Elegantbeef> Hotter take, type safety is the be all end all |
10:26:09 | * | alexdaguy quit (Quit: w) |
10:26:48 | * | beholders_eye quit (Quit: WeeChat 4.1.2) |
10:43:53 | * | beholders_eye joined #nim |
10:47:23 | * | ntat joined #nim |
10:52:55 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
10:53:04 | * | Jhonny2x4 joined #nim |
11:07:44 | FromDiscord | <fabric.input_output> hottest take: depends |
11:16:04 | FromDiscord | <odexine> In reply to @fabric.input_output "hottest take: depends": hottest make: clean |
11:29:39 | FromDiscord | <nnsee> bravo |
11:29:49 | FromDiscord | <nnsee> i ghasped at that joke |
11:31:07 | * | ntat quit (Quit: Leaving) |
11:38:02 | * | ntat joined #nim |
11:44:58 | FromDiscord | <heysokam> In reply to @kreed1415 "": you could wrap that uint as an enum of cuint32 size |
11:45:12 | FromDiscord | <heysokam> they map seamlessly to C, just like enum sets |
11:45:38 | FromDiscord | <heysokam> (edit) "size" => "size, in both the function and the usage of the enum" |
11:46:33 | FromDiscord | <heysokam> (edit) "function" => "struct field" | "usage" => "definition" |
12:04:34 | FromDiscord | <albassort> there are two potential evils |
12:05:10 | FromDiscord | <albassort> would you rather:↵1. I use exec() on a binary file to call an api through a tool↵2. i wrap a python function to use grpc |
12:05:21 | FromDiscord | <albassort> there is a nim grpc but it wont parse the files for whatever reason |
12:09:07 | * | ntat quit (Remote host closed the connection) |
12:16:13 | FromDiscord | <fabric.input_output> In reply to @albassort "would you rather: 1.": 3. xmlrpc 🙏 |
12:17:05 | FromDiscord | <albassort> In reply to @fabric.input_output "3. xmlrpc 🙏": ...? |
12:38:19 | * | beholders_eye quit (Ping timeout: 252 seconds) |
13:19:05 | FromDiscord | <xtrayambak> How can I tell Nim to emit `struct XYZ final : public Thing::Class` instead of `struct XYZ : public Thing::Class` in the C++ backend? |
13:19:37 | FromDiscord | <xtrayambak> I tried the `{.final.}` pragma but it tells me that I can't make the object inheritable in that case |
13:22:12 | * | ntat joined #nim |
13:22:45 | FromDiscord | <xtrayambak> Nevermind, I had tagged the parent class as final as well |
13:51:38 | * | ntat quit (Quit: Leaving) |
14:06:04 | * | krux02 joined #nim |
14:34:25 | * | nils` quit (Ping timeout: 248 seconds) |
14:40:22 | FromDiscord | <fabric.input_output> In reply to @albassort "...?": python has xmlrpc in the std |
14:51:59 | * | ntat joined #nim |
14:54:17 | FromDiscord | <xtrayambak> In reply to @xtrayambak "Nevermind, I had tagged": Nevermind, it still does that.. |
14:54:30 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=bjiuDXrQ |
14:54:59 | FromDiscord | <xtrayambak> sent a code paste, see https://play.nim-lang.org/#pasty=jPskYkOG |
14:55:05 | FromDiscord | <xtrayambak> I tried `{.final.}`, didn't work |
14:55:29 | FromDiscord | <xtrayambak> here's the declaration in Nim by the way (`Seat` is the wrapped version of `LSeat`) https://media.discordapp.net/attachments/371759389889003532/1319317185969258526/uOmKTn5.png?ex=67658560&is=676433e0&hm=a60c68f28578dda95076db864c412f6dade86d16a7414a68970371bac02e3538& |
14:55:44 | FromDiscord | <xtrayambak> (edit) "`LSeat`)" => "`LSeat` with the `{.inheritable.}` pragma)" |
15:05:48 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=OZGABpYB |
15:06:10 | FromDiscord | <xtrayambak> Never heard of that pragma, got the docs for it? |
15:06:39 | FromDiscord | <griffith1deadly> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma |
15:07:01 | FromDiscord | <griffith1deadly> nimforue works by that as i know in some cases |
15:21:13 | * | nils` joined #nim |
16:07:09 | FromDiscord | <xtrayambak> In reply to @griffith1deadly "https://nim-lang.org/docs/manual.html#implementatio": By the way, is there a good Nim-ic way to generate code for `return new Class(param1, param2)`? |
16:07:23 | FromDiscord | <xtrayambak> I tried wrapping it via importcpp but it kept acting weirdly |
16:07:55 | FromDiscord | <xtrayambak> (i. e, the compiler would throw an internal error) |
16:11:00 | * | beholders_eye joined #nim |
16:15:46 | FromDiscord | <bostonboston> You can emit |
16:29:47 | FromDiscord | <xtrayambak> In reply to @bostonboston "You can emit": It gives me a very weird error in that case, wait |
16:43:59 | FromDiscord | <bostonboston> Did you also read all of this https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs |
16:44:05 | FromDiscord | <bostonboston> It knows a little more than me |
16:46:09 | FromDiscord | <griffith1deadly> In reply to @xtrayambak "By the way, is": do you mean import/export cpp constructors? if yes, mark proc as constructor pragma |
16:47:06 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=eHXCvGdr |
16:47:09 | FromDiscord | <griffith1deadly> from docs |
16:48:16 | * | valms19901 quit (Quit: Leaving.) |
16:48:33 | * | valms19901 joined #nim |
16:48:58 | FromDiscord | <bostonboston> Using the importcpp pragma is there a way to get inner types from generics? |
16:50:28 | FromDiscord | <griffith1deadly> In reply to @bostonboston "Using the importcpp pragma": https://github.com/jmgomez/NimForUE/blob/devel/src/nimforue/unreal/core/containers/map.nim#L14 |
16:50:33 | FromDiscord | <griffith1deadly> you mean that? |
16:54:58 | FromDiscord | <bostonboston> sent a code paste, see https://play.nim-lang.org/#pasty=OufcnYQH |
16:56:17 | FromDiscord | <bostonboston> Is that was '0 is for |
16:58:40 | * | valms19901 quit (Quit: Leaving.) |
16:58:59 | * | valms19901 joined #nim |
17:00:57 | * | valms19901 quit (Client Quit) |
17:01:14 | * | valms19901 joined #nim |
17:17:18 | FromDiscord | <nixfreak> I know this script is wrong but why doesn't filename work ? https://paste.debian.net/1340557/, Trying to read domains in a file and printout results , In bash this is easy for me but I would like to figure this out. |
17:31:52 | FromDiscord | <demotomohiro> In reply to @nixfreak "I know this script": `loadDomainFile` looks fine to me. Do you get any error message? |
17:32:53 | FromDiscord | <nixfreak> sent a code paste, see https://play.nim-lang.org/#pasty=VxgCFUDy |
17:39:46 | * | beholders_eye quit (Ping timeout: 265 seconds) |
17:45:55 | FromDiscord | <demotomohiro> In reply to @nixfreak "Hey thanks for looking": In line 20 in `checkDomain` proc, variable `filename` is used but it is not declared. You probably need to add `filename` parameter to `checkDomain` and pass filename to `checkDomain`. |
18:00:01 | FromDiscord | <nixfreak> ok so add filename to the proc ? |
18:11:13 | FromDiscord | <amarevite> sent a code paste, see https://play.nim-lang.org/#pasty=uXfeiOKK |
18:12:08 | FromDiscord | <nixfreak> @demotomohiro I don't think I'm following you , could you perhaps supply an example? |
18:13:53 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
18:14:30 | * | ehmry joined #nim |
18:16:21 | * | coldfeet joined #nim |
18:16:58 | FromDiscord | <michaelb.eth> In reply to @amarevite "i have the following": there's `typedesc`, but in general you can't put `typedesc` on the RHS of `=` or `:`, they're only for compile-time |
18:17:54 | FromDiscord | <amarevite> yeah i tried messing around with typedesc and wasnt getting anywhere |
18:19:12 | FromDiscord | <michaelb.eth> sent a long message, see https://pasty.ee/rHWfbxwI |
18:19:40 | * | valms19901 quit (Ping timeout: 244 seconds) |
18:22:37 | FromDiscord | <amarevite> sent a code paste, see https://play.nim-lang.org/#pasty=PZtwqXlC |
18:24:28 | FromDiscord | <nixfreak> @amarevite Ok thats makes sense thanks |
18:28:30 | FromDiscord | <amarevite> sent a code paste, see https://play.nim-lang.org/#pasty=CsewOIiK |
18:33:00 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=bopEuJWs |
18:34:01 | * | valms19901 joined #nim |
18:39:25 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=GogxRqYf |
18:41:18 | * | valms19901 quit (Remote host closed the connection) |
18:42:52 | FromDiscord | <amarevite> thats interesting i havent seen code like that before↵let me try that out |
18:45:42 | FromDiscord | <amarevite> oh wow yeah thats exactly what i need thank you so much |
18:47:22 | FromDiscord | <amarevite> and fwiw i went with the first example code block since i find it easier to read and understand, thank you |
18:54:10 | * | valms19901 joined #nim |
19:01:01 | FromDiscord | <nixfreak> Ok so I added the logic for checkDomain because of rmsg object, but why is proc main() , filename undeclared ? https://paste.debian.net/1340563/ |
19:01:59 | Amun-Ra | nixfreak: where is it declared? |
19:02:39 | FromDiscord | <nixfreak> in checkDomain proc |
19:02:55 | Amun-Ra | yes, that's variable local to check_domain |
19:03:08 | Amun-Ra | it's not available outside the proc |
19:03:34 | Amun-Ra | there is no "filename" variable neither in main() nor in global context |
19:05:18 | FromDiscord | <nixfreak> do I need global pragma ? |
19:06:08 | Amun-Ra | what is that filename variable for? |
19:06:41 | Amun-Ra | you don't need global pragma, you need to declare that variable |
19:07:45 | Amun-Ra | what's the relation between filename and domain? |
19:08:24 | Amun-Ra | let's say we have "foobar.com" domain, what filename stores the domain contents? |
19:08:35 | FromDiscord | <demotomohiro> In reply to @nixfreak "do I need global": In Nim, all variables need to be declared before using it. And each variables has its scope.↵When you declare a variable inside a procedure, it become a local variable and you can use it only inside that procedure. |
19:09:46 | FromDiscord | <nixfreak> filename is the variable that hold the txt file |
19:09:52 | FromDiscord | <nixfreak> (edit) "hold" => "holds" |
19:10:45 | Amun-Ra | so if the domain is "foobar.com" what file specifically contains the data? |
19:11:14 | FromDiscord | <nixfreak> domains.txt |
19:12:01 | Amun-Ra | nixfreak: https://paste.debian.net/1340565/ |
19:12:25 | Amun-Ra | btw. you don't have to annotate main() with '*' |
19:13:44 | FromDiscord | <nixfreak> ohh ok duh declare filename then load filename as a parameter |
19:13:52 | Amun-Ra | yes |
19:13:58 | FromDiscord | <nixfreak> I don't know why I didn't see that .. sorry thanks |
19:14:13 | Amun-Ra | in this case "const filename = …" is even better |
19:14:42 | FromDiscord | <nixfreak> yeah I agree |
20:48:33 | * | valms19901 quit (Ping timeout: 252 seconds) |
21:02:16 | * | valms19901 joined #nim |
21:14:12 | FromDiscord | <nixfreak> sent a code paste, see https://play.nim-lang.org/#pasty=fMMyvzyb |
21:14:46 | FromDiscord | <nixfreak> (edit) "https://play.nim-lang.org/#pasty=lRpJvwoB" => "https://play.nim-lang.org/#pasty=aVlBtera" |
21:15:27 | FromDiscord | <lozercaustic> go to nimble/pkg folder, modify the source, then echo that 🙂 |
21:15:55 | FromDiscord | <nixfreak> ? |
21:20:40 | FromDiscord | <albassort> In reply to @fabric.input_output "python has xmlrpc in": but does it grpc? |
21:20:45 | FromDiscord | <albassort> (edit) "grpc?" => "grpc into a protobuf?" |
21:27:44 | FromDiscord | <fabric.input_output> In reply to @albassort "but does it grpc": it becomes an xml string |
21:28:02 | FromDiscord | <fabric.input_output> which you can put in a grpc string ig ;) |
21:28:12 | FromDiscord | <albassort> hmmm |
21:28:20 | FromDiscord | <albassort> something tells me this isn't relevant lol |
21:30:51 | * | coldfeet quit (Quit: Lost terminal) |
21:56:54 | * | valms19901 quit (Ping timeout: 265 seconds) |
21:58:33 | * | ntat quit (Quit: Leaving) |
22:10:30 | * | valms19901 joined #nim |
23:16:18 | * | beholders_eye joined #nim |