01:37:50 | * | Jjp137 quit (Quit: Leaving) |
01:42:37 | * | Jjp137 joined #nim |
02:08:26 | FromDiscord | <!&luke> what is the nim equivalent to the python urllib.urlopen |
02:12:27 | FromDiscord | <Patitotective> In reply to @ripluke "what is the nim": maybe openurl library |
02:18:46 | FromDiscord | <!&luke> In reply to @Patitotective "maybe openurl library": can u send a url |
02:20:27 | FromDiscord | <!&luke> thats for something different |
02:20:41 | FromDiscord | <!&luke> maybe i should rephrase this |
02:21:03 | FromDiscord | <!&luke> i want something to like get me the html css and js of a website |
02:21:16 | FromDiscord | <!&luke> i want to make a proxy server |
02:55:05 | * | arkurious quit (Quit: Leaving) |
03:08:25 | FromDiscord | <huantian> Uh just httpclient? |
03:08:30 | FromDiscord | <huantian> And do a get request |
03:09:02 | FromDiscord | <huantian> It’s like called getContent is probably what you want |
03:14:41 | FromDiscord | <!&luke> i dont think that allows interactive components like button sand stuff to work |
03:14:59 | FromDiscord | <!&luke> (edit) "button sand" => "buttons and" |
03:17:36 | FromDiscord | <Rika> https://github.com/halonium/halonium |
03:17:37 | FromDiscord | <Rika> ? |
03:27:42 | NimEventer | New thread by sls1005: Shared libraries complie-time, see https://forum.nim-lang.org/t/9512 |
03:29:31 | FromDiscord | <!&luke> In reply to @Rika "https://github.com/halonium/halonium": no, thats more of an automation library |
03:35:59 | FromDiscord | <Rika> You need a browser or an interpreter to have your buttons able to work within your program |
03:37:03 | FromDiscord | <ChocolettePalette> Uhh nim std is so poor it doesn't even have a browser in std/ 😮💨🙄😔😫😩 |
03:37:22 | FromDiscord | <Elegantbeef> Literally unusable |
03:40:56 | FromDiscord | <Rika> In reply to @ripluke "i dont think that": Your mentioned library does not feature interactivity either. |
04:13:44 | FromDiscord | <RattleyCooper> Hmmm, the documentation here at https://nim-lang.org/docs/threads.html is kind of confusing to me. If I'm not supposed to import `system/threads` how am I supposed to use the `Thread` object? I keep getting an error saying the object doesn't exist. |
04:14:06 | FromDiscord | <RattleyCooper> an undeclared identifier error |
04:14:25 | FromDiscord | <Elegantbeef> `compile with the --threads:on command line switch` |
04:14:46 | FromDiscord | <RattleyCooper> It says invalid type for var |
04:15:23 | FromDiscord | <Elegantbeef> Are you doing `var a: Thread` and not instantiating a generic thread? |
04:15:26 | FromDiscord | <Elegantbeef> Thread is a generic that takes the argument of the procedure you're calling |
04:15:35 | FromDiscord | <RattleyCooper> Ah yep |
04:15:36 | FromDiscord | <Elegantbeef> So if you dont have any parameters it's `Thread[void]` |
04:15:52 | FromDiscord | <Elegantbeef> Otherwise it's `Thread[MyType]` |
04:16:09 | FromDiscord | <Elegantbeef> Yes you can only pass a single parameter, if you want more you must use a tuple or object |
04:17:03 | FromDiscord | <RattleyCooper> I see, thank you! |
05:16:00 | FromDiscord | <RattleyCooper> Any simple way to populate a seq in a main thread and process it in a different thread? |
05:17:34 | FromDiscord | <ChocolettePalette> Allocate seq on heap using UNSAFE pointers |
05:17:57 | FromDiscord | <Elegantbeef> With orc/arc you can technically do it without unsafe pointers |
05:18:26 | FromDiscord | <RattleyCooper> I really just need to figure out how to do interprocess communication while using wNim |
05:18:29 | FromDiscord | <ChocolettePalette> It will annoy you with "GC Unsafe" warning then |
05:18:38 | FromDiscord | <RattleyCooper> or figure out how to use wNim/wAuto together without breaking it |
05:18:48 | FromDiscord | <Elegantbeef> `{.cast(gcsafe.}:` is so hard 😄 |
05:20:31 | FromDiscord | <ChocolettePalette> You should use channels IMO, they're very cool↵(@RattleyCooper) |
05:20:37 | FromDiscord | <ChocolettePalette> And safe |
05:22:00 | FromDiscord | <ChocolettePalette> You can for example open 8 channels and implement inter process communication as if it were an ethernet cable |
05:22:12 | FromDiscord | <RattleyCooper> Ah, I will give that a shot thank you! |
05:23:32 | FromDiscord | <ChocolettePalette> Here is a nice example\:https://nim-lang.org/docs/channels_builtin.html↵(@RattleyCooper) |
06:26:42 | * | derpydoo joined #nim |
06:27:28 | * | rockcavera quit (Remote host closed the connection) |
06:56:05 | FromDiscord | <JustADigimon (she/her)> sent a code paste, see https://paste.rs/6H8 |
06:56:28 | FromDiscord | <Elegantbeef> `.pretty`? |
06:57:49 | FromDiscord | <JustADigimon (she/her)> like thats not even what i want as json, i just have one field, and somehow it gives me this |
07:02:51 | FromDiscord | <JustADigimon (she/her)> oh wait |
08:23:07 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cz3 |
08:23:20 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/os.html#walkPattern.i%2Cstring |
08:24:06 | FromDiscord | <Goel> And in my case the pattern would be? |
08:25:12 | Amun-Ra | I don't think you can have the last case with glob pattern |
08:25:51 | FromDiscord | <Goel> (edit) "be?" => "be?↵I'm already using that, i just don't know how to (if thats possible) target the files that doesn't have an extension. For exampe my Dir contain 10 files .txt and 20 files named like "5", 29" "ab" without extenions" |
08:25:54 | Amun-Ra | you have to iterate over all the files and check |
08:26:29 | FromDiscord | <Goel> Uhm ok |
08:26:31 | Amun-Ra | so '?' and '??' |
08:27:25 | FromDiscord | <Goel> In reply to @Amun-Ra "so '?' and '??'": No that '??' is not an extensions, i just added it because i don't know what would it fit, but after the '.' it needs the extension and my file doesn't have any extension so i don't know |
08:28:02 | FromDiscord | <Elegantbeef> Lol good job me |
08:28:03 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cz4 |
08:28:34 | Amun-Ra | Goel: '?' matches any file with a one character long name |
08:28:38 | FromDiscord | <Elegantbeef> Otherwise you can make a glob library if one doesnt exist and be cool |
08:29:10 | Amun-Ra | * looks different on play.nim |
08:29:48 | FromDiscord | <Elegantbeef> nah it looks different discord -\> irc |
08:29:54 | FromDiscord | <Elegantbeef> ● ○ ■ cannot hurt you! |
08:30:03 | FromDiscord | <Elegantbeef> Jesus element is too nice |
08:30:08 | FromDiscord | <Elegantbeef> \ \ \ cannot hurt you |
08:30:08 | FromDiscord | <Goel> Nah i was already filtering that in that way, first pass for collect every file with just every `""` ext and then removing what i don't need i just keep the remaining one (that doesn't have any ext) I just though there was some trick that allow the to directly select a "no ext file" like `"/."` But i understand that doesn't make sense 😄 |
08:31:21 | FromDiscord | <JustADigimon (she/her)> sent a code paste, see https://play.nim-lang.org/#ix=4cz5 |
08:33:11 | FromDiscord | <Elegantbeef> https://github.com/JustFoxx/AmbrosiaFile/blob/main/src/commands.nim#L38-L43 if this fails to find a command it returns a command with a proc that is nil |
08:33:28 | FromDiscord | <JustADigimon (she/her)> yeah but it shouldn't tho |
08:33:33 | FromDiscord | <Elegantbeef> It should though |
08:33:52 | FromDiscord | <JustADigimon (she/her)> look at commands.nim |
08:33:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cz6 |
08:33:57 | FromDiscord | <JustADigimon (she/her)> oh |
08:38:28 | FromDiscord | <JustADigimon (she/her)> sent a code paste, see https://play.nim-lang.org/#ix=4cz8 |
08:52:18 | * | kenran joined #nim |
09:20:22 | * | kenran quit (Remote host closed the connection) |
09:22:05 | * | kenran joined #nim |
09:42:59 | * | kenran quit (Remote host closed the connection) |
09:43:45 | * | kenran joined #nim |
09:49:59 | * | kenran quit (Remote host closed the connection) |
10:07:24 | FromDiscord | <qb> Are there performance tests somewhere between refc, arc, orc? |
10:33:02 | NimEventer | New thread by ASVI: It is possible to use object field in proc pragma?, see https://forum.nim-lang.org/t/9513 |
11:01:25 | * | sagax quit (Remote host closed the connection) |
12:27:08 | * | arkurious joined #nim |
13:18:59 | * | jmdaemon quit (Ping timeout: 248 seconds) |
13:42:00 | FromDiscord | <JustADigimon (she/her)> can someone tell me better extension for nim on vscode |
13:42:06 | FromDiscord | <JustADigimon (she/her)> the one that i have is broken |
13:47:47 | FromDiscord | <auxym> the nimsaem one |
13:48:19 | FromDiscord | <JustADigimon (she/her)> In reply to @auxym "the nimsaem one": well that one is the one that i already have |
13:48:22 | FromDiscord | <JustADigimon (she/her)> and i hate it |
13:48:55 | FromDiscord | <JustADigimon (she/her)> it doesnt even give proper suggestions |
13:49:16 | FromDiscord | <JustADigimon (she/her)> and randomly it hides errors for no reason |
13:52:08 | FromDiscord | <Rika> then there is no fix until nimsuggest is improved |
13:52:25 | FromDiscord | <auxym> unfortunately it's the best we have. and yeah and good part of the blame is on nimsuggest |
13:52:29 | FromDiscord | <Rika> because ultimately all suggestion depends on nimsuggest or uses its own engine (which is likely less developed) so |
13:52:46 | FromDiscord | <Rika> i'd say use statistical suggestion (buffer suggest) |
13:53:07 | FromDiscord | <Rika> errors can be seen when you compile |
14:06:46 | FromDiscord | <Generic> as for errors, it uses nim check so if everything is properly set up it should give the exact same errors as the compiler |
14:07:03 | FromDiscord | <JustADigimon (she/her)> yeah but when there is one error then nothing else can work |
14:07:22 | FromDiscord | <JustADigimon (she/her)> (edit) removed "can" |
14:07:54 | FromDiscord | <Generic> you're talking about suggestions/hover/etc.? |
14:08:23 | FromDiscord | <!&luke> In reply to @ChocolettePalette "Uhh nim std is": Never said that it had to be in std lmao |
14:11:00 | FromDiscord | <JustADigimon (she/her)> In reply to @Generic "you're talking about suggestions/hover/etc.?": YES |
14:11:37 | FromDiscord | <Generic> well that's just nimsuggest |
14:11:41 | FromDiscord | <Generic> it's not that robust |
14:12:11 | FromDiscord | <Generic> but like I said, just error display works well, because it doesn't use nimsuggest |
14:12:18 | FromDiscord | <Generic> there's one quirk |
14:13:02 | FromDiscord | <Generic> the Nim compiler by default has --errormax:1 while nim check doesn't |
14:13:55 | FromDiscord | <Generic> this means that sometimes you get those cascading errors, where one error causes a bunch of other errors to be flagged |
14:14:29 | FromDiscord | <Generic> you can pass --errormax:1 to nim check as well, but then the diagnostics will only contain a single error |
14:36:26 | FromDiscord | <Phil> In reply to @JustADigimon (she/her) "can someone tell me": Best I can do is that the intellij plugin is pretty good |
14:36:46 | FromDiscord | <Phil> But that's not vscode anymore |
14:37:33 | FromDiscord | <Phil> However, intellij is somewhat annoying in its own ways |
14:38:00 | FromDiscord | <Phil> But for large projects (e.g. my wiki backend) that's worth it to me |
14:52:19 | * | estiquelapice joined #nim |
15:17:50 | * | blackpill0w joined #nim |
15:24:54 | * | blackpill0w left #nim (WeeChat 3.6) |
15:52:04 | FromDiscord | <Horizon [She/Her]> In reply to @JustADigimon (she/her) "and i hate it": Changing it to use nimlsp may help? It's not perfect but it's been a lot more reliable than just nimsuggest in my experience |
16:34:27 | FromDiscord | <Horizon [She/Her]> Hey @planetis, latest build of Naylib is giving an error in `raylib.nim` line 1591, `Error: Expression has no address; maybe use 'unsafe Addr'` |
16:40:35 | FromDiscord | <untoreh> is there a way to get better async stacktraces or do I just give up ? |
16:55:59 | FromDiscord | <Phil> Tell me if you find a reply |
16:56:20 | FromDiscord | <Phil> Errrrr answer |
16:59:46 | FromDiscord | <planetis> In reply to @Event Horizon "Hey <@915614219364368394>, latest build": Please use Nim devel |
17:00:26 | FromDiscord | <planetis> or replace addr with unsafeAddr, whatever is easirt |
17:00:33 | FromDiscord | <planetis> (edit) "easirt" => "easier" |
17:06:48 | FromDiscord | <Horizon [She/Her]> In reply to @planetis "Please use Nim devel": I'd imagine supporting Nim stable would be more sensible though? |
17:06:58 | FromDiscord | <Horizon [She/Her]> Considering it is the stable Nim release |
17:16:33 | FromDiscord | <Horizon [She/Her]> Does a defer block run at method termination? |
17:18:41 | * | MightyJoe quit (Ping timeout: 252 seconds) |
17:19:07 | * | cyraxjoe joined #nim |
17:25:34 | FromDiscord | <planetis> In reply to @Event Horizon "I'd imagine supporting Nim": sure and it's an easy first issue, especially for those taking part in hacktoberfest |
17:28:15 | FromDiscord | <Horizon [She/Her]> Fair, i'll look into it later on |
17:35:42 | FromDiscord | <Phil> In reply to @planetis "Please use Nim devel": Nim devel is a drug, I maintain that stance |
17:35:55 | FromDiscord | <Phil> It lures you with nice features that you'd want in stable and keeps you there because there's nice features |
17:41:36 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cBK |
17:45:00 | FromDiscord | <Phil> In reply to @Goel "What's the most clean": You're returning a bool, so you're asking a question. Thus the proc is a question:↵hasConfigFile for example |
17:45:14 | FromDiscord | <Phil> (edit) "In reply to @Goel "What's the most clean": You're returning a bool, so you're asking a question. Thus the proc is ... a" added "the answer to" |
17:45:25 | FromDiscord | <Phil> (edit) "question:↵hasConfigFile" => "question that is either true or false:↵hasConfigFile" |
17:46:19 | * | xet7 joined #nim |
17:59:18 | FromDiscord | <exelotl> Yeah I'd go for hasConfigFile or configFileExists |
18:55:50 | FromDiscord | <JustADigimon (she/her)> does anyone know how i can make threads? |
19:02:44 | * | kenran joined #nim |
19:20:41 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/threads.html |
19:21:49 | FromDiscord | <JustADigimon (she/her)> when gc safety |
19:22:07 | FromDiscord | <JustADigimon (she/her)> 😔 |
19:22:13 | FromDiscord | <Elegantbeef> What? |
19:23:34 | FromDiscord | <Phil> In reply to @JustADigimon (she/her) "when gc safety": When gc safety then copious amounts of cast gcsafe assuming you can be certain that your stuff is gcsafe |
19:23:42 | FromDiscord | <FireLite> Is there any libraries for pattern scanning? |
19:23:50 | FromDiscord | <Elegantbeef> Oh you just do `--threadAnalysis:off` phil |
19:23:51 | FromDiscord | <Elegantbeef> or\ |
19:24:21 | FromDiscord | <Phil> How dare you suggest an easy fix to my overly involved answer? |
19:24:33 | FromDiscord | <JustADigimon (she/her)> lmao |
19:24:35 | FromDiscord | <Elegantbeef> I mean it disables thread analysis for the entire program which isnt ideal |
19:24:40 | FromDiscord | <Elegantbeef> But it does make it work |
19:25:07 | FromDiscord | <Elegantbeef> The casts to gcsafe is the correct way with arc/orc afaik |
19:25:15 | FromDiscord | <JustADigimon (she/her)> well, would be cool if there was way to modify data across threads |
19:25:21 | FromDiscord | <JustADigimon (she/her)> (edit) "well, would be cool if there was way to modify data across threads ... " added "(safe)" |
19:25:26 | FromDiscord | <Elegantbeef> There is |
19:25:56 | FromDiscord | <Phil> That's what channels are for no? |
19:26:07 | FromDiscord | <Phil> Or whatever the concept was called |
19:26:12 | FromDiscord | <Elegantbeef> Channels are generally preferable yea |
19:27:38 | FromDiscord | <Elegantbeef> When Nim gets isolated working properly it'll be nice |
19:27:55 | FromDiscord | <Phil> "isolated"? |
19:28:05 | FromDiscord | <Elegantbeef> Move memory across threads |
19:28:47 | FromDiscord | <Elegantbeef> `sink` for threads basically |
19:29:14 | FromDiscord | <Elegantbeef> So instead of deepcopying heap memory like channels do you can just move the data |
19:29:57 | FromDiscord | <JustADigimon (she/her)> my question is, is there any type of example of using it? |
19:30:07 | FromDiscord | <Elegantbeef> Using what? |
19:30:26 | FromDiscord | <JustADigimon (she/her)> of↵multi threading with channels |
19:30:30 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/channels_builtin.html |
19:33:21 | FromDiscord | <Phil> So is a channel kinda like a queue?↵That kinda sounds like it could be structure like general messaging that I've seen so far, aka you can subscribe to the data flow that pushes events through and you fire a list of procs (registered upon subscription) |
19:33:40 | FromDiscord | <Phil> (edit) "So is a channel kinda like a queue?↵That kinda sounds like it could be structure like general messaging that I've seen so far, aka you can subscribe to the data flow that pushes events through and you fire a list of procs (registered upon subscription) ... " added "when an event is registered" |
19:33:56 | FromDiscord | <Phil> (edit) "is registered" => "comes through the data flow" |
19:34:51 | FromDiscord | <Elegantbeef> A channel is just a threadsafe queue yes |
19:34:54 | FromDiscord | <Phil> (edit) "structure" => "structured" |
19:38:40 | FromDiscord | <Phil> Yeh but if I basically want to setup a proc that always fires when anything comes through the channel, I'd need to build that myself, right?↵At least, looking through the docs that seems to be the case |
19:39:01 | FromDiscord | <Elegantbeef> Of course |
19:41:22 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "Yeh but if I": So a listener, in a way? |
19:41:42 | FromDiscord | <Elegantbeef> You could make that relatively easily wrapping a thread and a channel |
19:46:26 | * | jmdaemon joined #nim |
19:53:44 | FromDiscord | <Phil> In reply to @Event Horizon "So a listener, in": Pretty much, what I see in my head is pretty much just an Observable aka the Observer pattern (think rxjs if you had to deal with in-depth JS before) |
19:55:08 | FromDiscord | <Phil> Not sure how correct and/or useful that way of looking at channels is though, I'm just very pre-damaged from async coding |
19:55:22 | FromDiscord | <Phil> (edit) "Not sure how correct and/or useful that way of looking at channels is though, I'm just very pre-damaged from ... asyncin" added "tons of" | "tons ofasync coding ... " added "in JS" |
19:55:46 | FromDiscord | <Phil> I see queue, I think data stream |
19:59:39 | FromDiscord | <Elegantbeef> Channels are literally just a way to pass data in a threadsafe way |
20:01:28 | FromDiscord | <Phil> While that's true, the entire word-group of "pipe", "stream", "queue", "channel", "passway" etc. just immediately trigger my rxjs associations and all the mental images that come with that |
20:01:42 | FromDiscord | <Phil> As stated, damaged from in-depth async JS coding |
20:02:00 | FromDiscord | <JustADigimon (she/her)> couldnt u just put ur (unsafe) data to memory and just use it from here 😗 |
20:02:24 | FromDiscord | <Elegantbeef> You could but thats not fun |
20:03:08 | FromDiscord | <JustADigimon (she/her)> but do it using assembly inside nim |
20:03:29 | FromDiscord | <Phil> that was a sentence you wrote |
20:03:42 | FromDiscord | <Phil> It may elicit feelings of illness within me |
20:03:47 | FromDiscord | <Phil> But it is still a sentence |
20:03:55 | FromDiscord | <JustADigimon (she/her)> lmao |
20:31:41 | NimEventer | New thread by chancyk: Macros Masking Common Errors, see https://forum.nim-lang.org/t/9514 |
20:39:15 | * | kenran quit (Remote host closed the connection) |
20:53:53 | FromDiscord | <Horizon [She/Her]> What would be the ideal way to register custom text replacement info at runtime? |
20:54:04 | FromDiscord | <Horizon [She/Her]> Nvm |
21:01:05 | * | arkurious quit (Remote host closed the connection) |
21:02:49 | * | arkurious joined #nim |
21:10:23 | FromDiscord | <Horizon [She/Her]> How would i ignore ascii colour codes when using my `slowType` method? I currently use the ascii colour codes |
21:21:58 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cCC |
21:22:31 | FromDiscord | <Elegantbeef> `T: typedesc[Model]` as the first parameter |
21:22:43 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4cCC" => "https://play.nim-lang.org/#ix=4cCD" |
21:22:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCE |
21:23:22 | FromDiscord | <Horizon [She/Her]> Anyone know a way i could tell my code to stop slow typing? (printing a character at a delay) |
21:23:37 | FromDiscord | <Horizon [She/Her]> I tried unicode characters but obviously, they're more than one character |
21:23:47 | FromDiscord | <Elegantbeef> You also can drop the type annotation and just do `beforeCreateEvent = none(EventProc[T])` |
21:25:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCG |
21:25:51 | FromDiscord | <Elegantbeef> What do you mean "printing a character at a delay" |
21:26:15 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cCH |
21:26:28 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cCI |
21:26:58 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4cCI" => "https://play.nim-lang.org/#ix=4cCJ" |
21:27:12 | FromDiscord | <Elegantbeef> What type is `DbConn`? |
21:27:33 | FromDiscord | <Phil> DbConn is from norm/sqlite, one sec |
21:27:41 | FromDiscord | <Elegantbeef> Ok so it's not generic |
21:28:00 | FromDiscord | <Phil> Aye, should be just an alias over db_sqlite.DbConn |
21:29:22 | FromDiscord | <Elegantbeef> I dont even get why you pass T there |
21:31:16 | FromDiscord | <Elegantbeef> Works for instance |
21:31:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCK |
21:32:05 | FromDiscord | <Phil> This is a smaller made example.↵The proc that is behind this adds 12 or so routes to a prologue app to administrate that particular model in your database (create/delete/update).↵It also generates the corresponding controller-procs that handle an HTTP request to the given route in a generic way.↵These routes are per model, so I want the user to specify for which model they want these CRUD routes added |
21:32:30 | FromDiscord | <Elegantbeef> Well can you make it something reproducible? |
21:32:31 | FromDiscord | <Phil> In a sense, that thing is generating you the equivalent of a small application just with a crapton of generics |
21:33:26 | FromDiscord | <Elegantbeef> Doesnt the user specify by passing in procs of a specific type? |
21:33:55 | FromDiscord | <Phil> Those are optional.↵The user can specify whether a specific action should occur before/after a create/update/delete action |
21:33:57 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cCL |
21:34:27 | FromDiscord | <Horizon [She/Her]> Wait control characters exist |
21:34:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCM |
21:34:54 | FromDiscord | <Elegantbeef> Anyway phil if you can get a reproduction that i can actually run and i'll see if i can suggest a real solution |
21:35:19 | FromDiscord | <Phil> In reply to @Elegantbeef "I dont know i'm": I'd prefer it if I can distinguish which proc is for which point in time. The order / names of the parameters tells me which proc is supposed to fire when |
21:35:38 | FromDiscord | <Elegantbeef> `EventProcs[beforeUpdate]` isnt clear?↵(@Phil) |
21:37:03 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cCN |
21:37:08 | FromDiscord | <Phil> That can be compiled to throw the error |
21:38:39 | FromDiscord | <Phil> In reply to @Elegantbeef "`EventProcs[beforeUpdate]` isnt clear? (<@180601887": Oh, ahh I missed that you threw in an array there.↵Hmm that's workable / should be equivalent |
21:43:12 | FromDiscord | <Elegantbeef> So there is an issue with the generic |
21:43:14 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCP |
21:44:16 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cCQ |
21:45:22 | FromDiscord | <Phil> Wait a sec, how can you assign a proc to a var variable= |
21:45:23 | FromDiscord | <Phil> (edit) "variable=" => "variable?" |
21:45:38 | FromDiscord | <Elegantbeef> Pointer procs exist |
21:46:23 | FromDiscord | <Phil> Doesn't there need to be a "ptr" before it or sth? |
21:46:29 | FromDiscord | <Elegantbeef> No |
21:46:53 | FromDiscord | <Elegantbeef> Nim procs are first class |
21:48:02 | FromDiscord | <Phil> Right, forgot about that for a sec |
21:50:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCR |
21:50:22 | FromDiscord | <Elegantbeef> Yes we're using a concept due to Nim being mean |
21:50:57 | FromDiscord | <Horizon [She/Her]> I figured out a way to do it, probs not the best but eh |
21:51:08 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4cCS |
21:52:43 | FromDiscord | <Elegantbeef> Phil the issue seems to be the `=` |
21:52:58 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cCT |
21:53:08 | FromDiscord | <Elegantbeef> `proc doThing[Y: MyBase](T: typedesc[Y], evt: EventProc[T]) = discard` does not |
22:04:41 | FromDiscord | <Phil> I think it's the optional proc |
22:04:46 | FromDiscord | <Phil> It doesn't seem to like that at all |
22:05:09 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cCW |
22:05:24 | FromDiscord | <Elegantbeef> Yea it's the typedesc for `none` |
22:05:39 | FromDiscord | <Elegantbeef> I think what likely happens is that expression is bound and `T` is never replaced |
22:05:54 | FromDiscord | <Phil> Really not a fan to have to resort to nil over the more expressive "Option" but if I can't use it I can't use it |
22:33:06 | FromDiscord | <albassort> does anyone here know a good openmp library |
22:33:11 | FromDiscord | <albassort> is https://github.com/numforge/laser#openmp-templates ready to be used |
22:36:56 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1028435857016885338/unknown.png |
22:37:11 | FromDiscord | <albassort> hmm can i get this to run on the gpu like openmp |
22:40:15 | FromDiscord | <Patitotective> is there a way to rename a key in an ordered table and maintain the order? (since "remaning" means create new key with old key value and delete old key) |
22:54:25 | FromDiscord | <Patitotective> i think id better be using a seq instead of a table :p |
23:14:43 | * | wallabra quit (Ping timeout: 246 seconds) |
23:20:33 | * | wallabra joined #nim |
23:25:55 | * | fallback quit (Ping timeout: 248 seconds) |