00:01:44 | FromDiscord | <voidwalker> Can I cast a `seq[char]` (a slice from an `array[char]`) back to `array[char]` ? |
00:02:36 | FromDiscord | <Elegantbeef> You can technically do like `cast[ptr array[size, char]](mySeq[0].addr)` but generally illadvised |
00:03:20 | FromDiscord | <Elegantbeef> Just use `toOpenArray` and `myArr[0..^1] = openArray` |
00:06:47 | FromDiscord | <voidwalker> explain more the last line please ? |
00:07:16 | FromDiscord | <Elegantbeef> You can use `arr[a..b] = slice` to assign an array |
00:07:47 | FromDiscord | <voidwalker> I need to pass `id[4..7]` (id is `array[char]`), which gets converted to `seq[char]` |
00:08:36 | FromDiscord | <Elegantbeef> right you want `myArr = id.toOpenArray(4, 7)` |
00:08:51 | FromDiscord | <Elegantbeef> or `myArr[0..^1] = id.toOpenArray(4, 7)` rather |
00:09:09 | FromDiscord | <voidwalker> oh you mean I should preallocate it with var first |
00:09:22 | FromDiscord | <Elegantbeef> Sure |
00:10:50 | FromDiscord | <voidwalker> this looks a bit clunky |
00:10:50 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4zMb |
00:19:55 | FromDiscord | <voidwalker> nice : ) |
00:19:58 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4zMd |
00:21:26 | FromDiscord | <Chronos [She/Her]> Is it bad to do `cast[array[2, uint]](12.uint16)`? |
00:21:50 | FromDiscord | <Elegantbeef> Not in devel anymore but yes generally |
00:22:24 | FromDiscord | <Elegantbeef> In devel the semantics have changed to practically copyMem to a zero'd version when dest size is greater than source |
00:22:32 | FromDiscord | <Elegantbeef> On the plus side that's generally what one wants |
00:28:46 | * | lucasta joined #nim |
00:30:27 | FromDiscord | <Chronos [She/Her]> So casting is now copyMem? |
00:30:41 | FromDiscord | <Elegantbeef> Not technically but practically |
00:30:47 | FromDiscord | <Chronos [She/Her]> Hm |
00:31:00 | FromDiscord | <Elegantbeef> only in the case dest.size \< source.size |
00:31:09 | FromDiscord | <Elegantbeef> It actually creates a union and access that field |
00:31:14 | FromDiscord | <Chronos [She/Her]> Hm |
00:31:34 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/pull/22185 |
00:31:47 | FromDiscord | <Chronos [She/Her]> So stuff like casting a string to a char seq has no differences in original functionality? |
00:32:15 | FromDiscord | <Chronos [She/Her]> In reply to @yu.vitaqua.fer.chronos "Is it bad to": Also why would this be bad if it's two bytes? |
00:32:18 | FromDiscord | <Elegantbeef> is `sizeof seq[char]` \> `sizeof string`? |
00:34:20 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "is `sizeof seq[char]` \>": Oh wait |
00:34:27 | FromDiscord | <Chronos [She/Her]> So then it'd be copied? |
00:34:30 | FromDiscord | <Chronos [She/Her]> Hm |
00:35:06 | FromDiscord | <Elegantbeef> No it's a fine bit cast |
00:35:19 | FromDiscord | <Elegantbeef> the only time the new logic kicks in is the source size is smaller than the dest size to remove garbage information after the size of source |
00:36:00 | FromDiscord | <Elegantbeef> In a bitcast you get any information after the data aswell so you often get garbage |
00:40:12 | FromDiscord | <Chronos [She/Her]> Ah |
00:40:34 | FromDiscord | <Chronos [She/Her]> Thanks for explaining :) |
00:47:08 | * | ovenpasta quit (Ping timeout: 240 seconds) |
00:59:10 | * | jmdaemon quit (Ping timeout: 260 seconds) |
00:59:42 | FromDiscord | <_alkamist_> Can you make a ref for a basic type like float? What's the syntax to do so? |
01:01:28 | FromDiscord | <_alkamist_> Or I'm guessing it would have to be wrapped in an object maybe |
01:02:03 | FromDiscord | <Chronos [She/Her]> `ref float` |
01:02:19 | FromDiscord | <Chronos [She/Her]> Not sure how you'd declare a ref tho |
01:02:29 | FromDiscord | <Chronos [She/Her]> As in, init a var with it |
01:03:11 | FromDiscord | <_alkamist_> Yeah `var x: ref float` seems to be valid but I don't know how to assign to it. |
01:03:34 | FromDiscord | <Elegantbeef> `new x` `x[] = 3.141592653589793238` |
01:03:42 | FromDiscord | <Elegantbeef> or `var x = new float` |
01:04:29 | FromDiscord | <_alkamist_> Oh yeah I forgot about the new keyword haha. I always just do Foo() with ref objects. |
01:13:52 | FromDiscord | <_alkamist_> Are there any weird implications to garbage collection when defining a type as `distinct ref T`? |
01:14:03 | FromDiscord | <Elegantbeef> Nope |
01:14:11 | FromDiscord | <_alkamist_> Cool |
01:50:16 | FromDiscord | <_alkamist_> Is there a way to store a base version of `ref T` inside something? Like `Table[string, ref]`. Like how a void pointer is for pointers, if that's possible. |
01:50:33 | * | lucasta quit (Remote host closed the connection) |
01:52:36 | FromDiscord | <_alkamist_> I guess maybe I could GcRef it and store the pointer or something, but I'm wondering if there's a nicer way. |
01:54:58 | FromDiscord | <demotomohiro> How about to use inheritance and use `ref BaseType` or `ref RootObj`. |
01:55:01 | FromDiscord | <Elegantbeef> `RootRef` |
01:55:54 | FromDiscord | <Elegantbeef> Actually `RootRef` only works for objects |
01:56:06 | FromDiscord | <Elegantbeef> So boxing them is the only option |
01:57:17 | FromDiscord | <_alkamist_> Yeah it seems like wrapping in a ref object will be the only way. |
02:01:33 | FromDiscord | <_alkamist_> sent a code paste, see https://play.nim-lang.org/#ix=4zMq |
02:02:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zMr |
02:02:53 | FromDiscord | <Elegantbeef> Unless you want to accept all types |
02:03:09 | FromDiscord | <_alkamist_> I do want to accept all types I think |
02:03:28 | FromDiscord | <_alkamist_> My cursed idea is like react hooks but you pull out refs from hash tables. |
03:17:01 | FromDiscord | <.bobbbob> why do iterators have to be used in a for loop? I know there's closure iterators but why have this weird seperate thing when normal iterators could have next(), finished(), essentially like a coroutine |
03:17:25 | FromDiscord | <Elegantbeef> Cause inline iterators are practically templates |
03:19:48 | FromDiscord | <huantian> Closure iterators have more overhead when used in a for loop |
03:20:30 | FromDiscord | <Elegantbeef> To be fair you can convert some usages of 'closure' into inline |
03:20:56 | FromDiscord | <Elegantbeef> Nim doesnt, but one could |
03:21:31 | FromDiscord | <.bobbbob> yeah I was thinking the compiler could be smart about it but thats easier said than done |
03:22:12 | FromDiscord | <huantian> More accessible opt in closure iterators might be the answer |
03:22:58 | FromDiscord | <Elegantbeef> Nah just my fancy itermacros stuff 😄 |
03:23:14 | FromDiscord | <Elegantbeef> https://github.com/beef331/slicerator/blob/e5db60df80df380072050a2fd4062e1c728bcf6d/tests/titermacros.nim for context |
03:35:02 | FromDiscord | <JeysonFlores> What's the difference between `object of RootObj` and the `inheritable` pragma? |
03:35:17 | FromDiscord | <Elegantbeef> You should use the former |
03:35:25 | FromDiscord | <Elegantbeef> The latter is only for C interop |
03:35:37 | FromDiscord | <JeysonFlores> oh I see, thanks |
03:36:20 | FromDiscord | <Elegantbeef> Don't even know if that's true now that I say it |
03:36:24 | FromDiscord | <Elegantbeef> Regardless use the former 😄 |
03:40:31 | FromDiscord | <demotomohiro> In reply to @JeysonFlores "What's the difference between": You can use `inheriable` pragma when you want inheritance without runtime type info: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-how-pure-pragma-dotpuredot-work-to-object-typeqmark |
03:40:55 | FromDiscord | <Elegantbeef> But you can just do `type MyObject {.pure.} = object of Parent` |
04:45:16 | FromDiscord | <JeysonFlores> sent a long message, see http://ix.io/4zMP |
04:45:33 | FromDiscord | <JeysonFlores> (edit) "http://ix.io/4zMP" => "http://ix.io/4zMQ" |
04:45:39 | FromDiscord | <Elegantbeef> `echo body.treeRepr` |
04:46:12 | FromDiscord | <JeysonFlores> thx |
05:34:35 | FromDiscord | <ringabout> https://github.com/nim-lang/Nim/issues/16933#issuecomment-1620902831↵The Nim repo now supports a neat feature that bisects the bugs for simple examples online. |
05:50:00 | FromDiscord | <demotomohiro> In reply to @ringabout "https://github.com/nim-lang/Nim/issues/16933#issuec": You can use that by just commenting "!nim c" and test code? |
05:50:42 | FromDiscord | <ringabout> Yep, but it's a bit slow for that purpose. |
05:51:21 | FromDiscord | <demotomohiro> Nice! |
05:52:14 | FromDiscord | <ringabout> Here is the action https://github.com/juancarlospaco/nimrun-action |
05:55:35 | FromDiscord | <demotomohiro> So I can do that in my repo. |
06:02:19 | FromDiscord | <gogolxdong666> sent a code paste, see https://play.nim-lang.org/#ix=4zMY |
06:02:42 | FromDiscord | <gogolxdong666> system.pointer vs pointer |
06:05:00 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zMZ |
06:05:47 | FromDiscord | <demotomohiro> `nim_host_create_context(addr vmstate, message)` doesn't compile? |
06:06:58 | FromDiscord | <gogolxdong666> sent a long message, see http://ix.io/4zN0 |
06:14:25 | FromDiscord | <demotomohiro> sent a code paste, see https://paste.rs/f0Qnn |
06:18:23 | FromDiscord | <gogolxdong666> BaseVMState = ref object of RootObj |
06:19:04 | FromDiscord | <gogolxdong666> `proc nim_host_create_context(vmstate: pointer, msg: ptr evmc_message): evmc_host_context {.importc, cdecl.}` |
06:29:03 | FromDiscord | <gogolxdong666> have no idea what happened |
06:30:01 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zN4 |
06:31:23 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zN5 |
06:31:28 | * | ntat joined #nim |
06:32:03 | * | PMunch joined #nim |
07:07:10 | * | wgetch joined #nim |
07:55:41 | * | ovenpasta joined #nim |
08:19:22 | * | noeontheend quit (Ping timeout: 245 seconds) |
08:31:27 | * | henrytill quit (Ping timeout: 245 seconds) |
08:34:18 | * | henrytill joined #nim |
08:41:18 | * | noeontheend joined #nim |
08:59:08 | * | ovenpasta quit (Ping timeout: 240 seconds) |
08:59:53 | * | ovenpasta joined #nim |
09:16:50 | PMunch | Hmm, is there some weird interaction going on between generics and templates? |
09:18:42 | PMunch | I'm working with coordinates, but because I had a lot of code copied for X/Y/W/H I created procedures like `mySquare.topEdge` and `mySquare.leftEdge` and a template which takes a direction enum and spits out a bunch of other templates so that `mySquare.startEdge` maps to either of those two, depending on direction. |
09:19:02 | PMunch | But when adding a generic argument to the function where I try to use this they stop working.. |
09:26:16 | PMunch | Hmm, turns out to not be related to the geometry logic at all: https://play.nim-lang.org/#ix=4zNL |
09:26:20 | PMunch | That's a minimal repro |
09:26:55 | PMunch | If T is changed to Direction and the generic argument removed then it works fine |
09:27:32 | PMunch | And it doesn't have to be the direction which is generic either, in fact just adding [T] while keeping `dir: Direction` results in the error |
09:52:57 | NimEventer | New thread by takekikuchi: Asyncdispatch debugging, see https://forum.nim-lang.org/t/10324 |
10:06:18 | * | azimut quit (Ping timeout: 240 seconds) |
10:26:47 | * | flouer quit (Remote host closed the connection) |
11:38:43 | FromDiscord | <basilajith> <@&371760044473319454> Why don't we have a blockchain dev channel? Or is it hidden? |
11:39:24 | PMunch | Please don't ping moderators about things like this. Just ask normally |
11:40:06 | PMunch | The reason we don't have a blockchain dev channel is because you're the first (to my knowledge) who has asked for one |
11:44:03 | FromDiscord | <basilajith> Oh, okay. I thought Nim was used quite well for Ethereum. |
11:44:53 | PMunch | It is, Status.im uses it for this exact purpose |
11:50:40 | FromDiscord | <raynei486> Is there a `INT_MAX` somewhere? |
11:50:51 | PMunch | int.high? |
11:50:58 | PMunch | !eval echo int.high |
11:51:05 | NimBot | 9223372036854775807 |
11:51:10 | FromDiscord | <basilajith> In reply to @PMunch "It is, Status.im uses": So, I thought there would be (or should be) a blockchaindev channel. |
11:52:03 | PMunch | Well, either they just keep their chats internal, or they aren't very talkative. Either way we've never had the request for one before |
11:52:13 | FromDiscord | <raynei486> In reply to @PMunch "int.high?": yep thanks |
11:53:15 | FromDiscord | <basilajith> In reply to @PMunch "Well, either they just": Internal? Their is already a channel? Or are you talking about the Eth-Nim folks own server? |
11:53:42 | PMunch | raynei486, the high/low stuff works for a lot of types. You can e.g. use high on a sequence to get the highest valid index, same goes for arrays. And of course floats, uint16, etc. |
11:54:07 | PMunch | basilajith, I was talking about Status.im, I assume they have some internal communication |
11:54:15 | FromDiscord | <basilajith> Oh... |
11:54:19 | FromDiscord | <basilajith> Got it. Thanks! |
11:54:35 | FromDiscord | <basilajith> So, shouldn't we start one? 🙂 |
11:55:09 | PMunch | If more people are into the idea we could create a channel for blockchain discussions. Usually though we create new channels because the topic is frequently discussed in this channel |
11:58:27 | FromDiscord | <basilajith> Fair. |
11:58:36 | FromDiscord | <basilajith> Would running a poll help? |
11:59:51 | PMunch | Depends on who you want to poll I guess, but any way of showing interest would help in figuring out if such a channel is wanted or not |
12:00:47 | * | ntat quit (Quit: Leaving) |
12:04:58 | FromDiscord | <mratsim> In reply to @PMunch "Well, either they just": There is a nimbus discord for Eth/Nim related inquiries |
12:41:37 | FromDiscord | <basilajith> 👍🏼 |
12:43:39 | FromDiscord | <juan_carlos> In reply to @ringabout "Yep, but it's a": If you have any cli flag for nim/choosenim that can speed up things let me know.↵is there a way to pass flags to choosenim?, like -d:leancompiler etc |
12:44:46 | FromDiscord | <ringabout> Nope, I didn't mean it's slow for bisecting. |
13:24:06 | FromDiscord | <dissolved.girl> Finally, I've found it. The handle that can be. https://media.discordapp.net/attachments/371759389889003532/1126141458253099018/image.png |
13:29:18 | FromDiscord | <gogolxdong666> https://media.discordapp.net/attachments/371759389889003532/1126142763734405252/image.png |
13:30:25 | FromDiscord | <gogolxdong666> this might have been introduced compile issues with `undeclared identifier: 'ContentTypeData'` |
13:46:36 | FromDiscord | <juan_carlos> In reply to @dissolved.girl "Finally, I've found it.": Let it be... |
13:48:40 | FromDiscord | <gogolxdong666> sorry |
14:00:49 | * | PMunch quit (Quit: Leaving) |
14:38:23 | * | nils` joined #nim |
14:42:53 | FromDiscord | <odexine> now we need a handle that can see |
14:46:21 | * | sagax joined #nim |
14:54:53 | FromDiscord | <jmgomez> @arnetheduck / @mratsim seems like `chronos` is superior than `asyncdispatch` and it's able to do everything it can and more. Is there a specific reason of why `chronos` is not the one in the `std`? |
15:27:25 | * | ntat joined #nim |
15:29:06 | * | azimut joined #nim |
16:29:44 | FromDiscord | <voidwalker> nim std libs need to be suboptimal, everyone knows that |
16:30:51 | FromDiscord | <djazz> yesterday I tried to do some process piping using `std/osproc` I got defeated, and went back to bash ☠️ |
16:35:55 | * | junaid_ joined #nim |
17:01:49 | FromDiscord | <arnetheduck> sent a long message, see http://ix.io/4zPE |
17:07:13 | FromDiscord | <arnetheduck> In reply to @basilajith "Oh, okay. I thought": not hidden, but we have our own discord: https://discord.com/invite/9dWwPnG - feel free to join us there though if there was a #blockchain-dev channel, we'd be happy to join any relevant discussions there as well if wanted |
17:16:48 | FromDiscord | <jmgomez> In reply to @arnetheduck "https://github.com/nim-lang/RFCs/issues/158 sums up": I see, thanks for the reference and the detailed explanation. I lean more towards having the best critical packages in the std but I do understand the decision. I think I will switch NUE's implementation to use `chronos` instead of `asyncdispatch` more down the road |
17:17:01 | FromDiscord | <basilajith> In reply to @arnetheduck "not hidden, but we": Thanks! I've joined. I just wish newbies are welcome and encouraged there (of course no one would say that their not... 😆). I'm completely new to blockchain and I have a large stock of very obvious novice questions. 😬 |
17:17:12 | FromDiscord | <basilajith> (edit) "their" => "they're" |
18:12:34 | FromDiscord | <arnetheduck> sent a long message, see http://ix.io/4zPT |
18:15:21 | * | adigitoleo quit (Read error: Connection reset by peer) |
18:15:37 | * | adigitoleo joined #nim |
18:48:59 | FromDiscord | <requiresupport> sent a long message, see http://ix.io/4zQ0 |
18:54:26 | FromDiscord | <Phil> In reply to @requiresupport "I guess this is": My question is, can you just use http requests? Like, you receive request from the user, make an http request of your own to the second server and then just send their response as your response to the user |
18:56:07 | FromDiscord | <Phil> Or is the second server sending data as a stream step by step?↵In that case my next trail of thought would be to look into either websocket connections between the client and server A + server A with server B, OR looking into http streaming (never used that one so no clue) |
18:56:43 | FromDiscord | <Phil> You could also contemplate if you can just redirect the http request of the user from server A to server B |
18:57:18 | FromDiscord | <Phil> (edit) "You could also contemplate if you can just redirect the http request of the user from server A to server B ... " added "and then the user gets the response from server B directly without A being involved other than the initial target" |
18:58:37 | FromDiscord | <requiresupport> ex: server a makes request to hxxps://foo.bar , the packets of this request is forward to server B, server B makes the request and responds. My question is mainly about how pass on the request to the program on server B and let it request it from its socket. Other parts I get. |
18:59:04 | FromDiscord | <requiresupport> (edit) "ex: server a makes request to hxxps://foo.bar , the packets of this request is forward to server B, server B makes the request ... and" added "to hxxps://foo.bar" |
19:00:19 | FromDiscord | <isaacpaul> https specifically makes this difficult unless you can sign the requests with the correct cert. |
19:00:43 | FromDiscord | <Phil> In reply to @requiresupport "ex: server a makes": First a wording question. You speak of packets, do you speak of individual packets that arrive one after the other that you individually want to forward to the other server or is this just another way of speaking about the full data of a request for you? |
19:01:35 | FromDiscord | <requiresupport> my bad, I mean the full data of the request. |
19:06:13 | * | ntat quit (Quit: Leaving) |
19:07:34 | FromDiscord | <Phil> Okay so no streaming necessary.↵So you want to forward the request data that server a sends to foo.bar to server B? |
19:08:07 | FromDiscord | <requiresupport> correct |
19:08:35 | FromDiscord | <Phil> Do you actually need the entire request or only specific parts of it, because I'm not aware of an http client that has "request" objects, you set headers, cookies, method and body individually |
19:09:29 | FromDiscord | <Phil> You can construct your own custom request type that you fill with everything that you pass to the client to make the request, but the http client itself won't provide you one |
19:09:44 | FromDiscord | <Phil> (edit) "request" => "requestData" |
19:10:14 | FromDiscord | <Phil> (edit) "Do you actually need the entire request or only specific parts of it, because I'm not aware of an http client ... that" added "in Nim" |
19:12:01 | FromDiscord | <michaelb.eth> In reply to @requiresupport "correct": not to discourage exploration of how that kind of thing can be done in Nim, but could you use HAProxy for that purpose?↵https://en.wikipedia.org/wiki/HAProxy |
19:12:20 | FromDiscord | <Phil> And if you have your custom requestData type you can just turn that into JSON and serve it via POST to your second server |
19:12:43 | FromDiscord | <Phil> (edit) "serve" => "send" | "sendit ... via" added "as body" |
19:14:58 | FromDiscord | <Phil> I would shy away from that unless you have that cemented in your overall system because now the logic of a feature of yours(I assume this is for a user facing feature) depends on a config of a reverse proxy/load balancer.↵That would be the last place I'd look for that stuff in if it's user facing stuff |
19:16:06 | FromDiscord | <Phil> (edit) "I would shy away from that unless you have that cemented in your overall system because ... nowyours" added "if you but some sort of outgoing request duplication configuration in there (if that's possible)," | "yours(I" => "yours (I" |
19:17:10 | FromDiscord | <isaacpaul> sent a long message, see http://ix.io/4zQ7 |
19:19:42 | FromDiscord | <Phil> Oh wait, right, this is about raw packages, gna |
19:21:05 | FromDiscord | <isaacpaul> Honestly, the question is just too broad. |
19:35:01 | FromDiscord | <Phil> I guess regarding binary packets just have 2 websocket connections going? |
19:35:13 | FromDiscord | <Phil> That setup seems extremely fragile though |
19:35:55 | FromDiscord | <Phil> I dunno, just a gut feeling, I don't have a ton of experience with websocket yet, so far they just "feel"somewhat fragile |
19:43:45 | * | user__ joined #nim |
19:45:11 | FromDiscord | <isaacpaul> I wasn't talking about web sockets. I was just trying to answer the question as directly as possible without making assumptions. |
19:46:25 | * | ovenpasta quit (Ping timeout: 250 seconds) |
20:05:09 | FromDiscord | <smug0949> sent a code paste, see https://play.nim-lang.org/#ix=4zQj |
20:05:52 | * | ovenpasta joined #nim |
20:06:26 | FromDiscord | <nervecenter> If there was a mismatch, please post the type signature it was expecting, it'll be there in the error message |
20:06:45 | * | junaid_ quit (Remote host closed the connection) |
20:06:49 | FromDiscord | <smug0949> sent a long message, see http://ix.io/4zQk |
20:07:14 | FromDiscord | <smug0949> how am i supposed to upload a json if it wants a string |
20:07:25 | * | FromDiscord quit (Remote host closed the connection) |
20:07:38 | * | FromDiscord joined #nim |
20:08:04 | FromDiscord | <nervecenter> Looks like `body` is expected to be a string, try `$data` |
20:08:59 | * | user__ quit (Ping timeout: 264 seconds) |
20:09:13 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#ix=4zQl |
20:09:51 | FromDiscord | <nervecenter> `$` is universally used for string conversion, for JSON it creates the non-prettified string representation of the `JsonNode` object |
20:10:25 | FromDiscord | <nervecenter> `%` is the `JsonNode` creation macro, it'll try to make a `JsonNode` out of whatever you give it, you only need it for the outermost structure and it'll do it recursively |
20:10:47 | FromDiscord | <smug0949> sent a long message, see http://ix.io/4zQm |
20:11:07 | FromDiscord | <nervecenter> use spaces then |
20:11:12 | FromDiscord | <nervecenter> `bdoy = $data` |
20:11:18 | FromDiscord | <smug0949> oh lmao |
20:11:20 | FromDiscord | <nervecenter> (edit) "`bdoy" => "`body" |
20:11:22 | FromDiscord | <smug0949> didnt know it was that picky |
20:11:37 | FromDiscord | <smug0949> so what are those called |
20:11:45 | FromDiscord | <smug0949> $ % etc |
20:12:15 | FromDiscord | <nervecenter> `$` if I'm remembering correctly is just a proc with a symbolic name, but `%` is a macro, which does some AST magic |
20:12:37 | FromDiscord | <nervecenter> Procs can be made as prefix or infix operators |
20:12:48 | FromDiscord | <smug0949> is there a list of these somewhere |
20:13:16 | FromDiscord | <nervecenter> `$` is defined for types that use it and you'll see it early in the docs because symbols come before letters↵`%` is defined in the `json` module |
20:13:30 | FromDiscord | <nervecenter> (edit) "letters↵`%`" => "letters, but it'll be all around the docs wherever it's defined↵`%`" |
20:13:45 | FromDiscord | <smug0949> thanks |
20:13:59 | FromDiscord | <smug0949> also rq im not sure if u use vsc but what is the best extension for nim |
20:14:39 | FromDiscord | <nervecenter> Been using Sublime for a while now, but I think the best VSC addon is supposed to be the one with the second-highest starts, not sure, maybe others can speak on that |
20:14:48 | FromDiscord | <nervecenter> (edit) "starts," => "stars," |
20:15:30 | FromDiscord | <smug0949> ill try it thanks |
20:19:27 | FromDiscord | <huantian> Yeah it’s the one by saem |
20:27:37 | FromDiscord | <Phil> In reply to @smug0949 "is there a list": Overall there aren't too many that I'd claim have universal use.↵In webdev I only really encounter `$` and `&`, the latter is string-concatenation/string-formatting, the former is basically nim's `toString` proc |
20:28:00 | FromDiscord | <Phil> However I also use the jsony package instead of std/json to not dela with `%` among other things |
20:28:08 | FromDiscord | <Phil> (edit) "dela" => "deal" |
20:50:38 | * | ovenpasta quit (Quit: Leaving) |
20:50:54 | * | ovenpasta joined #nim |
21:20:17 | FromDiscord | <smug0949> good to know |
21:20:35 | * | user__ joined #nim |
21:24:35 | * | ovenpasta quit (Ping timeout: 264 seconds) |
21:41:11 | NimEventer | New Nimble package! nimpath - Interface to libxml2's XPath parser, see https://github.com/weskerfoot/NimPath |
21:53:09 | FromDiscord | <that_dude.> In reply to @smug0949 "is there a list": I don't recommend looking through this because it has pretty much everything from the std in it, but you can check out https://nim-lang.org/docs/theindex.html |
21:54:12 | FromDiscord | <that_dude.> It's a better bet just to look at the documentation in the module for what you're looking for. If it's not in there it may reside in the system module which is imported by default |
22:01:11 | FromDiscord | <Elegantbeef> This reminds me that I tried to write some odin for fun last night and it was quite a pain to grok anything |
23:26:02 | * | user__ quit (Ping timeout: 252 seconds) |