00:00:20 | * | neceve quit (Ping timeout: 255 seconds) |
00:53:29 | * | arkurious quit (Quit: Leaving) |
01:00:52 | * | MightyJoe joined #nim |
01:02:11 | * | cyraxjoe quit (Ping timeout: 252 seconds) |
01:04:01 | * | beshr quit (Ping timeout: 246 seconds) |
01:04:02 | * | bkay joined #nim |
01:30:51 | * | stkrdknmibalz joined #nim |
01:32:06 | * | vicfred joined #nim |
01:57:59 | FromDiscord | <Rika> In reply to @glasso "I don't like this": Oh man then you’re not gonna like Nim |
02:00:06 | * | MightyJoe quit (Ping timeout: 252 seconds) |
02:33:52 | FromDiscord | <hamidb80> In reply to @Rika "Oh man then you’re": +1 |
02:36:27 | FromDiscord | <hamidb80> https://nimble.directory/docs/optionsutils//optionsutils.html↵@ElegantBeef what's this? 😆 |
02:36:43 | FromDiscord | <ElegantBeef> What's what? |
02:36:52 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/863609756085387314/unknown.png |
02:36:56 | FromDiscord | <hamidb80> optionutils documentations |
02:37:15 | FromDiscord | <ElegantBeef> Why would i know why they arent showing |
02:37:47 | FromDiscord | <hamidb80> In reply to @ElegantBeef "Why would i know": https://media.discordapp.net/attachments/371759389889003532/863609985463222302/unknown.png |
02:38:11 | FromDiscord | <ElegantBeef> I'm not a maintainer, i made a single PR |
02:55:39 | FromDiscord | <Bung> @haxscramper how I contruct jsonnode from pnode ? |
03:01:39 | FromDiscord | <ElegantBeef> From looking at what was shared you iterate the node based off the expected type and just convert that to the coresponding type |
03:04:43 | FromDiscord | <ElegantBeef> I will eventually get to doing what hax suggested, just requires supporting case objects, tuples, objects, and primitives 😄 |
03:04:50 | FromDiscord | <ElegantBeef> Actually primitives are simple |
03:04:59 | FromDiscord | <ElegantBeef> The objects/tuples are the complex stuff |
03:21:55 | * | joshbaptiste quit (Ping timeout: 256 seconds) |
03:51:48 | FromDiscord | <Bung> `proc fromVm(t: typedesc[JsonNode], node: PNode): string =↵ discard` this is what I have.. |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:37 | * | supakeen joined #nim |
05:59:11 | * | max22- joined #nim |
05:59:29 | * | max22- quit (Remote host closed the connection) |
05:59:51 | * | max22- joined #nim |
06:08:54 | * | [R] quit (Quit: No Ping reply in 180 seconds.) |
06:09:02 | * | [R] joined #nim |
06:26:22 | * | max22- quit (Ping timeout: 246 seconds) |
06:32:26 | * | max22- joined #nim |
06:40:56 | FromDiscord | <haxscramper> In reply to @Bung "<@!608382355454951435> how I contruct": You write a code that converts PNode to JsonNode, there is no built-in support for that. Might want to use treefrom/jsony |
06:41:19 | FromDiscord | <haxscramper> If you need to work with a VM json node is not different from any other type |
06:42:25 | FromDiscord | <haxscramper> In reply to @ElegantBeef "The objects/tuples are the": If you don't want to implement object declaration unparsing for a millionth time you can use hnimast - it has all the necessary primitives for serialization implementation |
06:43:48 | FromDiscord | <haxscramper> https://github.com/haxscramper/nimtraits/blob/867e173e9ff8ff58e6fe1eacfa539b59823a3c0f/src/nimtraits/trait_xml.nim#L81 for XML serialization example |
06:44:25 | FromDiscord | <haxscramper> Pnode represents all things as a flat list of ExprEqExpr |
06:44:36 | FromDiscord | <haxscramper> ColonExpr |
06:44:41 | FromDiscord | <ElegantBeef> Well there is no point for serialization when given the known type and Pnode |
06:44:55 | FromDiscord | <ElegantBeef> go from a Pnode to a given generic |
06:45:02 | FromDiscord | <ElegantBeef> (edit) "generic" => "type" |
06:45:07 | FromDiscord | <haxscramper> Type -> PNode isn't a serialization? |
06:45:51 | FromDiscord | <ElegantBeef> Misunderstood the implication |
06:46:10 | FromDiscord | <haxscramper> I think it can be called that, the only difference that I generate PNode and not json. Anyway, it's just a matter of terminology |
06:48:13 | FromDiscord | <ElegantBeef> But yea i'll see what i can do with it, since i know the type i want/know what it needs to be i can probably just go straight to/from |
06:49:46 | FromDiscord | <whyy cant i install choosenim> why does nim have all da libx dependencies |
06:58:11 | FromDiscord | <Bung> It looks like need implement every types are not primitive ? |
07:07:27 | FromDiscord | <ElegantBeef> Yep, you need to convert the list of `a: b` to objects |
07:07:37 | FromDiscord | <ElegantBeef> I will get to it eventually |
07:30:42 | * | Vladar joined #nim |
07:34:10 | * | max22- quit (Remote host closed the connection) |
07:39:06 | * | max22- joined #nim |
07:41:28 | * | maxime_ joined #nim |
07:43:58 | * | max22- quit (Ping timeout: 246 seconds) |
08:12:41 | FromDiscord | <hamidb80> i wish i could change evaluation priority in macros |
08:16:30 | * | vicfred quit (Quit: Leaving) |
08:19:34 | FromDiscord | <ElegantBeef> Why? |
08:25:10 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3sD0 |
08:25:26 | FromDiscord | <hamidb80> (edit) "https://play.nim-lang.org/#ix=3sD0" => "https://paste.rs/Cf9" |
08:25:42 | * | nixfreak_nim[m] quit (Quit: Bridge terminating on SIGTERM) |
08:25:42 | * | Helios quit (Quit: Bridge terminating on SIGTERM) |
08:25:42 | * | happycorsair[m] quit (Quit: Bridge terminating on SIGTERM) |
08:25:57 | FromDiscord | <hamidb80> (edit) "https://play.nim-lang.org/#ix=3sD2" => "https://play.nim-lang.org/#ix=3sD1" |
08:26:02 | FromDiscord | <hamidb80> (edit) "https://play.nim-lang.org/#ix=3sD1" => "https://paste.rs/dnP" |
08:26:42 | FromDiscord | <hamidb80> i notices this problem also in https://github.com/disruptek/cps |
08:26:44 | fn | <R2D299> itHub: 7"Continuation-Passing Style for Nim 🔗" |
08:28:03 | FromDiscord | <hamidb80> when the `cps` macro collects all of the enviroment vars into an object |
08:29:01 | FromDiscord | <hamidb80> it cant detect other format of variable declaration |
08:29:03 | FromDiscord | <hamidb80> like in https://github.com/technicallyagd/unpack |
08:29:03 | * | nixfreak_nim[m] joined #nim |
08:29:05 | fn | <R2D299> itHub: 7"sequence/object unpacking/destructuring for nim" |
08:29:05 | * | Helios joined #nim |
08:29:19 | * | happycorsair[m] joined #nim |
08:29:27 | FromDiscord | <hamidb80> does it make sense? |
08:29:48 | FromDiscord | <hamidb80> (edit) "does it ... make" added "[my opinion]" |
08:44:48 | FromDiscord | <Rika> What would the solution be though? |
08:48:36 | * | bkay quit (Quit: Leaving) |
08:48:52 | * | beshr joined #nim |
08:48:52 | * | beshr quit (Changing host) |
08:48:52 | * | beshr joined #nim |
08:50:19 | FromDiscord | <haxscramper> Accept typed AST, it will expand before being passed to macro |
08:50:35 | FromDiscord | <haxscramper> In reply to @hamidb80 "sometimes i need to": It would solve this problem |
08:56:54 | FromDiscord | <Bung> Can i get current `ConfigRef` ? |
08:59:48 | FromDiscord | <haxscramper> From module graph? |
09:00:49 | FromDiscord | <Bung> in template , I want call compiler/options.nim findModule |
09:01:49 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3sDh |
09:01:59 | FromDiscord | <Bung> this is what am trying to do |
09:02:11 | FromDiscord | <haxscramper> Pnode is untyped? |
09:02:36 | FromDiscord | <Bung> h is a module name , sym in ast |
09:03:53 | FromDiscord | <haxscramper> You can't conflate symbols from compilation time (what you import) and runtime (processed by compiler package) |
09:09:40 | FromDiscord | <Bung> so that would be not possible, if I manual handle path it'll only works user not have extro --path specified. |
09:10:46 | FromDiscord | <haxscramper> You can, in theory, get instantiation info from module symbol at compile-time |
09:11:02 | FromDiscord | <haxscramper> And get source code path |
09:11:41 | FromDiscord | <Bung> hmm , thought I just need files from source dir and nimble that will be fine, just need manually handle imports pnode to path. |
09:35:36 | FromDiscord | <PressF> sent a code paste, see https://play.nim-lang.org/#ix=3sDt |
09:36:39 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=3sDw |
09:37:31 | FromDiscord | <vindaar> (often it's clearer to define the procs you want to hand as their own type, e.g. `type FooProcs = proc(x: int)` and then just write `p: FooProcs` in the signature) |
09:39:17 | FromDiscord | <PressF> could I use generics for that? |
09:39:35 | FromDiscord | <vindaar> sure you can |
09:40:18 | FromDiscord | <Rika> you have to be mindful to pass the right arg types in that case |
09:41:12 | FromDiscord | <vindaar> ^ yup |
09:48:28 | * | neceve joined #nim |
09:54:32 | FromDiscord | <PressF> I guess it's time to learn nim generics hahah. Thx |
10:01:41 | FromDiscord | <InventorMatt> @PressF you could also do it kind of like this https://play.nim-lang.org/#ix=3sDG |
10:02:51 | FromDiscord | <sealmove> Damn I can't get this right. I want to brute force binary data until I find a match. How do I check length-by-length (first '0' then, '1' then '00', then '01') instead of going '0' -> '00' -> '000' -> ... infinity)? |
10:04:24 | FromDiscord | <Rika> on NPEG? |
10:04:44 | FromDiscord | <sealmove> no, just regular code. let's say the digits are in a string. |
10:05:38 | FromDiscord | <Rika> i dont see the issue with just iterating through the string and seeing what the value of the char is |
10:05:58 | FromDiscord | <Rika> its not like theres an instance where you backtrack, its only two choices |
10:07:42 | FromDiscord | <sealmove> I know, that's why I am surprised I can't get it right. Well, I don't have fixed strings to check. I want to gradually generate all possible combinations and pass each combination to a proc which checks if the sequence is matched based on some criteria. |
10:09:08 | FromDiscord | <Rika> "all possible combinations" can only be done if you can constrain the length... |
10:09:14 | FromDiscord | <sealmove> really? |
10:09:31 | FromDiscord | <sealmove> why can't I check length-by-length? |
10:09:32 | FromDiscord | <Rika> i mean wait |
10:09:33 | FromDiscord | <Rika> rather |
10:09:43 | FromDiscord | <Rika> yes i know |
10:09:53 | FromDiscord | <Rika> its possible to "collapse it" |
10:10:01 | FromDiscord | <Rika> but as it is its impossible, i was just unclear |
10:10:22 | FromDiscord | <Rika> so how would you pass "all combinations" to a proc? |
10:11:26 | FromDiscord | <sealmove> my thinking is to check combinations 1-by-1 until a match is found. First check all 1-digit seqs, then all 2-digit seqs, then all 3-digit seqs etc. |
10:12:01 | FromDiscord | <Rika> is this criteria basing against the whole data or just each digit? |
10:12:08 | FromDiscord | <sealmove> whole data |
10:12:47 | FromDiscord | <Rika> ok sorry im trying to understand why you're getting 0 -> 00 -> 000... |
10:13:11 | FromDiscord | <sealmove> because I don't know how to generate the combinations in the correct order >_< |
10:13:25 | FromDiscord | <Rika> if the data is rejected, remove the last digit and get the next possible digit↵if the data is not rejected, continue |
10:13:52 | FromDiscord | <sealmove> but for example 010 might be invalid but 0101 valid |
10:13:56 | FromDiscord | <Rika> (edit) "continue" => "add the next digit (initial)" |
10:14:00 | FromDiscord | <Rika> hm |
10:14:16 | FromDiscord | <Rika> okay let me think more then |
10:14:38 | FromDiscord | <sealmove> thanks, surprisingly it's non-trivial... |
10:14:55 | FromDiscord | <Rika> i dont think thats possible then, what if 0(a billion 0s later)1 is the only valid value? |
10:15:33 | FromDiscord | <Rika> what if a massive amount of 0s is the only valid value? |
10:15:39 | FromDiscord | <sealmove> i don't care, I assume a correct value will be of a reasonable length |
10:15:57 | FromDiscord | <sealmove> that being said I can't constrain it to a specific length |
10:15:58 | FromDiscord | <Rika> okay, so what is the reasonable length? |
10:16:59 | FromDiscord | <sealmove> well, I don't want to set a magic value if I don't have to. I assume there is a way to search length-by-length. I don't care if there is chance the program won't stop running. |
10:17:28 | FromDiscord | <sealmove> since it's brute-force, it will run until it finds a match |
10:18:37 | FromDiscord | <enthus1ast> the issue is that you do not now the "0" padding |
10:19:14 | FromDiscord | <enthus1ast> so either\: 00001 or 1 is the valid value |
10:19:42 | FromDiscord | <sealmove> no that's not an issue, let's say we work with strings |
10:19:50 | FromDiscord | <Rika> ? |
10:19:52 | FromDiscord | <sealmove> 00001 is different from 1 |
10:19:54 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3sDO |
10:21:01 | FromDiscord | <sealmove> hmm ok Rika, I'll look into it. Although I am curious of how to generate the permutations myself. |
10:21:11 | FromDiscord | <Rika> its also in narimiran's itertools |
10:21:19 | FromDiscord | <Rika> actually |
10:21:23 | FromDiscord | <Rika> no i dont think itrs permutations you want |
10:21:33 | FromDiscord | <Rika> i forgot what exactly the thing is you want |
10:21:56 | FromDiscord | <Rika> but its somewhat related but not very similar to permutations |
10:22:01 | FromDiscord | <enthus1ast> @sealmove\: yes but when you do not know the zero padding you cannot really bruteforce since it could be any amounth of zeros |
10:22:34 | FromDiscord | <sealmove> In reply to @enthus1ast "<@173424250319929344>\: yes but": how is padding relevant? |
10:22:49 | FromDiscord | <enthus1ast> "00001" != "01" |
10:22:57 | FromDiscord | <sealmove> yes? |
10:23:35 | FromDiscord | <Rika> but as said above before, "i don't care, I assume a correct value will be of a reasonable length" |
10:25:06 | FromDiscord | <enthus1ast> if you do not know the length then you must also bruteforce the length |
10:25:29 | FromDiscord | <sealmove> In reply to @enthus1ast "if you do not": sure |
10:25:32 | FromDiscord | <Rika> https://stackoverflow.com/questions/29718294/how-to-get-nth-permutation-when-repetition-is-allowed might help (yes its java but i think this is what you want exactly regarding the permutation part i mentioned in the almost pseudocode) |
10:25:48 | FromDiscord | <sealmove> In reply to @enthus1ast "if you do not": hmm, oh, obvious but actually usefull insight maybe |
10:26:11 | FromDiscord | <Rika> yeah that's what i did in the code |
10:26:14 | FromDiscord | <Rika> `i` is the length |
10:26:34 | FromDiscord | <sealmove> i see, ok I think it's more clear now. |
10:26:38 | FromDiscord | <Rika> then you get permutations w/ repetition of `0, 1` |
10:27:08 | FromDiscord | <Rika> there might be a more smart idea of course |
10:31:39 | FromDiscord | <Bung> how I convert string to symbol in template ? |
10:32:02 | FromDiscord | <sealmove> what do you mean by 'symbol'? |
10:32:31 | FromDiscord | <Bung> like module name I just imported |
10:33:42 | FromDiscord | <Rika> strtoast or something i forget the names of procs easily |
10:33:51 | FromDiscord | <Rika> might be in the std/macros module |
10:33:55 | FromDiscord | <sealmove> there is ident() |
10:34:05 | FromDiscord | <sealmove> not sure if this is what you want |
10:34:58 | FromDiscord | <Bung> it will throw `Error: undeclared identifier: 'newIdentNode` |
10:36:04 | FromDiscord | <Bung> oh , macros need visible in call side.. |
10:38:01 | FromDiscord | <sealmove> you need to import the macros module |
10:38:24 | * | arkurious joined #nim |
10:40:07 | FromDiscord | <sealmove> enthus1ast thanks, thanks to your insight I solved the issue. |
10:43:09 | FromDiscord | <Bung> well, it convert to NimNode, how to convert it to resolved type ? |
10:45:11 | FromDiscord | <sealmove> there are two kinds of macros, typed and untyped. if you are using untyped, then you lose type info and can't resolve it. You are just generating AST and the identifier must be valid after the macro expansion. |
10:45:49 | FromDiscord | <sealmove> if you can provide more info about what you are doing so we can helop |
10:46:33 | FromDiscord | <Bung> https://play.nim-lang.org/#ix=3sDZ |
10:46:40 | FromDiscord | <Bung> see here is what am trying to do |
10:47:06 | FromDiscord | <Bung> I tried to change template to macro but I will not get instantiationInfo |
10:48:21 | FromDiscord | <Bung> I can push to github if you need full code |
10:49:23 | FromDiscord | <haxscramper> Generate a call to macro that accepts `typed` argument |
10:49:23 | FromDiscord | <haxscramper> And semcheck will resolve identifiers to types, but as sealmove just said the code must be fully valid |
10:49:23 | FromDiscord | <haxscramper> You need to implement it as multistage macro↵(@Bung) |
10:51:39 | FromDiscord | <haxscramper> It just hurts to see three intermediate variables for that |
10:51:40 | FromDiscord | <haxscramper> For macros you use https://nim-lang.org/docs/macros.html#lineInfoObj%2CNimNode for arguments |
10:51:40 | FromDiscord | <haxscramper> Can use \<\> to get location of the arguments\ |
10:51:52 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3sE0 |
10:53:03 | FromDiscord | <PsychoClay> how to echo a pointer? |
10:53:56 | FromDiscord | <haxscramper> `echo cast[int](<pointer>)` or `echo <pointer>.repr` |
10:56:30 | FromDiscord | <Bung> lineInfoObj solve the problem. |
10:58:19 | FromDiscord | <Bung> `Error: cannot 'importc' variable at compile time; stderr` compiler.options has `if terminal.isatty(stderr)` |
11:03:12 | FromDiscord | <Bung> hmm, so much proc cant call in compile time. |
11:04:26 | FromDiscord | <haxscramper> Well, of course you can't use compiler API at compile-time |
11:04:32 | FromDiscord | <haxscramper> It is only for C backend |
11:09:10 | * | maxime_ quit (Remote host closed the connection) |
11:09:27 | * | maxime_ joined #nim |
11:09:41 | FromDiscord | <PressF> sent a long message, see http://ix.io/3sEa |
11:09:49 | FromDiscord | <Rika> wait wait wait i dont remember what i said |
11:09:50 | FromDiscord | <Rika> lmao |
11:09:57 | FromDiscord | <Rika> nim doesnt have eval yes |
11:10:22 | FromDiscord | <Rika> actually theres prolly a 3rd party lib that can run nimscript on runtime |
11:12:05 | FromDiscord | <haxscramper> https://github.com/beef331/nimscripter |
11:12:07 | fn | <R2D299> itHub: 7"Quick and easy Nim <-> Nimscript interop" |
11:13:43 | FromDiscord | <haxscramper> https://github.com/dsrw/enu |
11:13:44 | FromDiscord | <haxscramper> I think enu uses similar approach to what you are trying to do @PressF |
11:13:44 | FromDiscord | <haxscramper> https://www.youtube.com/watch?v=AW0PT9j976s |
11:13:45 | fn | <R2D299> itHub: 7"A Logo-like DSL for Godot, implemented in Nim" |
11:13:47 | fn | <R2D299> outube: 7"Early Enu Demo" |
11:15:32 | * | supakeen quit (Remote host closed the connection) |
11:15:56 | * | supakeen joined #nim |
11:19:04 | FromDiscord | <PressF> In reply to @haxscramper "https://github.com/beef331/nimscripter": Thx. I'll try it |
11:52:58 | FromDiscord | <whyy cant i install choosenim> ēnū |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:37 | * | supakeen joined #nim |
12:09:38 | * | aeverr quit (Remote host closed the connection) |
12:10:06 | * | aeverr joined #nim |
12:42:35 | * | maxime_ quit (Ping timeout: 268 seconds) |
12:56:27 | * | maxime_ joined #nim |
13:14:21 | FromDiscord | <haxscramper> IRC logs is now missing all anchors for message timestamps, or I'm missing something? |
13:14:37 | FromDiscord | <haxscramper> For example `https://irclogs.nim-lang.org/18-08-2012.html#21:14:15` does't link to a message |
13:15:07 | FromDiscord | <haxscramper> Tried chrome and firefox |
13:16:57 | FromDiscord | <haxscramper> Actually no, it only applies to logs from 2021 |
13:16:57 | FromDiscord | <haxscramper> Actually no, it only applies to logs from 2012 |
13:17:19 | FromDiscord | <Rika> so is it 2021 or 2012 |
13:17:29 | FromDiscord | <haxscramper> 12 |
13:32:15 | FromDiscord | <dom96> yes, old logs are static html |
13:32:20 | FromDiscord | <dom96> so timestamps don't work |
13:54:39 | * | maxime_ quit (Remote host closed the connection) |
14:01:24 | * | maxime_ joined #nim |
14:20:21 | FromDiscord | <shadow.> has anyone gotten the nim.nvim plugin working with coc.nvim? |
14:20:38 | FromDiscord | <shadow.> i'm currently using coc.nvim with nimlsp as a custom language server but i'm kind of underwhelmed by the performance so i want to try out nim.nvim |
14:20:48 | FromDiscord | <shadow.> but i don't wanna install another completion engine just for one plugin |
14:23:00 | * | cyraxjoe joined #nim |
14:25:47 | FromDiscord | <Bung> I dont unserstand , they both support lsp, then you only need is lsp server |
14:26:41 | FromDiscord | <shadow.> In reply to @Bung "I dont unserstand ,": is it the lsp server that's limited then? it just seems like i was able to get a little more functionality on vscode |
14:28:02 | FromDiscord | <Bung> I cant say more , I use my fork version nimlsp |
14:28:06 | FromDiscord | <shadow.> hmmm it actually seems to be working better now |
14:28:12 | FromDiscord | <shadow.> idk then lol |
14:28:17 | FromDiscord | <shadow.> thanks anyways |
14:30:35 | FromDiscord | <Bung> I know the server implementation, the server will crash when you use nimble package havn't installed, crash when syntax error, it's synchronous server |
14:30:47 | * | cyraxjoe quit (Quit: I'm out!) |
14:38:10 | * | cyraxjoe joined #nim |
14:44:38 | fn | <ForumUpdaterBot99> New thread by Schneiderfelipe: Inlining macro and (probable) problems with HiddenStdConv/HiddenCallConv, see https://forum.nim-lang.org/t/8220 |
15:09:19 | * | pro joined #nim |
15:16:33 | * | supakeen quit (Remote host closed the connection) |
15:16:57 | * | supakeen joined #nim |
15:33:38 | * | neceve quit (Ping timeout: 255 seconds) |
15:57:05 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
16:02:41 | * | cyraxjoe quit (Quit: I'm out!) |
16:12:19 | * | cyraxjoe joined #nim |
16:13:14 | FromDiscord | <carpal> does nim have an ir? |
16:15:59 | FromDiscord | <hugogranstrom> In reply to @carpal "does nim have an": Nim's AST is what's used in the compiler and then it converts it into C/C++/JS |
16:16:26 | FromDiscord | <Quibono> There been any talk of a native backend? |
16:17:28 | FromDiscord | <hugogranstrom> There's quite a bit of resistance I feel for that |
16:17:45 | FromDiscord | <hugogranstrom> There is a separate project that has it though |
16:18:08 | FromDiscord | <Quibono> What's that? I've always thought a native backend was a noble (if maybe foolhardy) goal |
16:19:04 | FromDiscord | <hugogranstrom> https://github.com/arnetheduck/nlvm |
16:19:06 | fn | <R2D299> itHub: 7"LLVM-based compiler for the Nim language" |
16:19:45 | FromDiscord | <Quibono> Oh cool. |
16:21:01 | FromDiscord | <haxscramper> Especially considering interop with these languages |
16:21:01 | FromDiscord | <haxscramper> On the contrary, it is inferior to generating C/C++/Js |
16:21:02 | FromDiscord | <haxscramper> It doesn't add any immediate value↵(@Quibono) |
16:21:04 | FromDiscord | <hugogranstrom> I think that would be loooong in the future if it happens. There is very much work for not that many advantages. GCC is so optimized and you'd basically have to generate better code than it |
16:21:38 | FromDiscord | <Quibono> I mean I think the primary initial benefit is the potential of extremely fast compile times. |
16:21:47 | FromDiscord | <Quibono> But again, I said it was potentially foolhardy for a reason. |
16:22:14 | FromDiscord | <Quibono> I know V is slowly working on it for that reason, not to compete with optimizing compilers (yet) |
16:22:44 | FromDiscord | <haxscramper> Main slowdown for nim compiler is the nim part itself, not a C compilation |
16:22:52 | FromDiscord | <haxscramper> That's why we have IC |
16:23:00 | FromDiscord | <haxscramper> Going to have IC |
16:23:15 | FromDiscord | <Quibono> Gotcha |
16:23:30 | FromDiscord | <haxscramper> You can compare time for `nim check` and `nim c` |
16:23:45 | FromDiscord | <haxscramper> For a rough estimate |
16:26:12 | * | stkrdknmibalz joined #nim |
16:30:21 | FromDiscord | <whyy cant i install choosenim> only thing is that it doesnt compile ir link probably |
16:30:29 | FromDiscord | <whyy cant i install choosenim> atleast it doesnt seem to call cc |
16:30:54 | FromDiscord | <whyy cant i install choosenim> and it also doesnt write anything out |
16:31:38 | FromDiscord | <whyy cant i install choosenim> https://media.discordapp.net/attachments/371759389889003532/863819835619934218/Screenshot_2021-07-11-22-01-29.jpeg |
16:31:47 | FromDiscord | <whyy cant i install choosenim> smol diff |
16:33:44 | FromDiscord | <haxscramper> Yes, that's exactly the point |
16:34:00 | FromDiscord | <haxscramper> `nim c` does full compilation, `nim check` only runs nim side of things |
16:34:24 | FromDiscord | <whyy cant i install choosenim> and also it gives all da errors🤪 |
16:48:25 | FromDiscord | <Quibono> Lol so Choosenim doesn't support MacOSX_Arm? |
16:54:31 | * | Vladar quit (Remote host closed the connection) |
16:59:23 | FromDiscord | <Ayy Lmao> How do I do something like `#define REAPERAPI_IMPLEMENT`? It needs to be before a specific header and when I use the emit pragma it ends up after the header. |
17:00:32 | * | neceve joined #nim |
17:02:02 | * | cyraxjoe quit (Ping timeout: 258 seconds) |
17:06:26 | FromDiscord | <haxscramper> You can control location of the `{.emit` code using `/INCLUDESECTION/`, `/TYPESECTION/` etc. (more in the manual) |
17:06:29 | * | cyraxjoe joined #nim |
17:07:09 | FromDiscord | <haxscramper> You can also do `header: "#define REAPERAPI_IMPLEMENT\n#include <specific-header>".` |
17:07:57 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3sGi |
17:08:33 | FromDiscord | <Ayy Lmao> What would be the most idiomatic way to do it? I'm guessing in the header pragma? |
17:09:22 | FromDiscord | <haxscramper> Most "idiomatic way" is the one that works |
17:10:14 | FromDiscord | <haxscramper> At least when interfacing with C libraries you can expect any sort of hacks to pop up, so there is no "go-to" way |
17:10:19 | FromDiscord | <Ayy Lmao> Well the emit pragma seems to be working for me using `/INCLUDESECTION/` and that seems pretty clean to me |
17:11:53 | FromDiscord | <Ayy Lmao> I'm trying to make an extension for the audio software Reaper, and in the sdk they say: `Extensions for REAPER/win32 should be written in C++ and compiled using MSVC (pure virtual interface classes are used and as such the C++ ABI must be compatible -- sorry, mingw users).` I'm not that experienced with C++ or C, so can someone help me understand what kind of implications that might have for writing an extension in Nim? |
17:12:28 | FromDiscord | <haxscramper> I think you would only need to do `--cc:msvc` or something like that |
17:12:34 | FromDiscord | <haxscramper> `nim cpp --cc:msvc` |
17:13:07 | FromDiscord | <haxscramper> I don't use windows, so someone who has to deal with it should clarify things |
17:13:09 | FromDiscord | <Ayy Lmao> It tells me `unknown C compiler: 'msvc'. Available options are: gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc, clang_cl` |
17:13:51 | FromDiscord | <hugogranstrom> vcc |
17:14:47 | FromDiscord | <Ayy Lmao> That seems to compile, I'll have to see if I can load the extension when I get to that point. Thank you! |
17:15:09 | FromDiscord | <Ayy Lmao> So why exactly does the use of pure virtual interface classes invalidate the use of mingw? |
17:17:06 | FromDiscord | <haxscramper> some microsoft/migw/reaper implementation detail |
17:20:33 | FromDiscord | <Ayy Lmao> Ah so it's a reaper specific thing |
17:22:22 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=3sGn |
17:27:40 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-codegendecl-pragma |
17:29:02 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3sGo |
17:29:33 | FromDiscord | <haxscramper> To inspect generated code you can set `--nimcache:cache` and look in the generated files |
17:29:48 | FromDiscord | <haxscramper> It would create a directory where you ran compiler |
17:33:04 | FromDiscord | <Ayy Lmao> Awesome, thanks! That seems to make the generated cpp code look how it's supposed to |
17:51:16 | FromDiscord | <shadow.> are there functions for all of the operators? |
17:53:10 | FromDiscord | <Quibono> Also it's proc for non mutation and func for mutation? |
17:54:25 | FromDiscord | <shadow.> In reply to @Quibono "Also it's proc for": func is pure, proc is not necessarily |
17:54:33 | FromDiscord | <Quibono> Ahh |
17:54:36 | FromDiscord | <shadow.> so in func no globals, io, etc is allowed |
17:54:40 | FromDiscord | <shadow.> (edit) "is" => "are" |
17:54:53 | FromDiscord | <Quibono> So do func until the compiler yells at me. |
17:58:35 | FromDiscord | <saem> Yeah, keeping it func-y fresh as much as possible is an admirable goal and tends to help the design. |
18:03:43 | FromDiscord | <ElegantBeef> Just like const -> let -> var, you should func -> proc -> template -> macro -> throw the program out 😛 |
18:04:26 | FromDiscord | <Quibono> Hopefully I'll never get to template lol |
18:04:35 | FromDiscord | <Quibono> I like simplicity to an extreme. |
18:05:14 | FromDiscord | <ElegantBeef> One could argue since templates paste code they're more simple than procedures 😛 |
18:06:27 | FromDiscord | <haxscramper> Macro can greatly simplify code |
18:06:57 | FromDiscord | <haxscramper> Also @ElegantBeef you forgot about TRM |
18:07:02 | FromDiscord | <ElegantBeef> Shit |
18:07:07 | FromDiscord | <haxscramper> Last step before nuking the PC |
18:08:37 | FromDiscord | <Quibono> sent a code paste, see https://play.nim-lang.org/#ix=3sGH |
18:08:59 | FromDiscord | <haxscramper> Exported fields |
18:09:24 | FromDiscord | <Quibono> So those are externally accessible while the unexported fields are not? |
18:09:44 | FromDiscord | <haxscramper> Correct |
18:10:24 | FromDiscord | <Quibono> But methods of the function can still access the private fields? |
18:10:32 | FromDiscord | <Quibono> (edit) "function" => "object" |
18:13:17 | FromDiscord | <haxscramper> These are not private fields, they are exported - the difference is visible only outside the module |
18:13:47 | FromDiscord | <haxscramper> So `method` can access unexported fields if it is defined in the same module |
18:14:10 | FromDiscord | <haxscramper> Also `method` is not bound to any object specifically, it just dispatches at runtime based on the first argument |
18:14:28 | FromDiscord | <haxscramper> There was (is?) `--multimethods:on` that provided dispatching on all arguments |
18:15:23 | FromDiscord | <Quibono> Ahh gotcha. |
18:41:47 | * | cyraxjoe quit (Quit: I'm out!) |
18:45:33 | * | cyraxjoe joined #nim |
20:24:46 | fn | <ForumUpdaterBot99> New thread by Gadersd: Can't create sequence with newSeq, see https://forum.nim-lang.org/t/8221 |
20:49:37 | FromDiscord | <theangryepicbanana> I'm aware that procs and stuff can be overloaded, but can types be overloaded in any way (without macros)? |
20:50:07 | FromDiscord | <theangryepicbanana> like `type Thing[T] = ..., Thing[T, U] = ...` |
20:50:38 | FromDiscord | <ElegantBeef> Well they're two separate generic instantiations, so they should be, make the most specific then the least specific |
20:51:07 | FromDiscord | <theangryepicbanana> In reply to @ElegantBeef "Well they're two separate": wdym by that last part? |
20:51:34 | FromDiscord | <ElegantBeef> Ah nvm i'm wrong 😄 |
20:51:53 | FromDiscord | <Bung> that's not called overload |
20:52:12 | FromDiscord | <ElegantBeef> You'll basically need to use procedures to do this |
20:52:37 | FromDiscord | <theangryepicbanana> In reply to @Bung "that's not called overload": I'm also hoping that `type Thing[T: A] = ..., Thing[T: B] = ...` would be possible, but it's less likely |
20:53:20 | FromDiscord | <ElegantBeef> Best i can think of |
20:53:25 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3sHp |
20:53:30 | FromDiscord | <theangryepicbanana> nope, need an actual type |
20:54:05 | FromDiscord | <theangryepicbanana> it's worth noting that even pascal supports multiple arities for types, so I'm not sure why nim can't have it |
20:54:21 | FromDiscord | <Bung> you'd probaly type A[T] type B[T,P] = , then you use Type C = B[T,P], A[C] |
20:54:32 | FromDiscord | <theangryepicbanana> I'd prefer for them to have the same name |
20:54:56 | FromDiscord | <Bung> guess not possible |
20:55:04 | FromDiscord | <theangryepicbanana> dang |
20:55:49 | FromDiscord | <theangryepicbanana> completely unrelated question (that I can provide context for if needed), but is it possible to have an object inherit from multiple types? |
20:56:14 | FromDiscord | <ElegantBeef> There is no MI |
20:56:23 | FromDiscord | <theangryepicbanana> would like to at least have some way of emulating interfaces/protocols/traits/etc seen in some other langs |
20:56:26 | FromDiscord | <ElegantBeef> But if you just want to copy fields it's rather simple |
20:56:40 | FromDiscord | <theangryepicbanana> well I still need the "is-a" type relationships |
20:56:43 | FromDiscord | <ElegantBeef> https://github.com/yglukhov/iface |
20:56:44 | fn | <R2D299> itHub: 7"<No Description>" |
20:57:05 | FromDiscord | <Bung> ooputils lib |
20:57:14 | FromDiscord | <theangryepicbanana> In reply to @ElegantBeef "https://github.com/yglukhov/iface": no like explicit interfaces, not golang interfaces lol |
20:57:58 | FromDiscord | <Bung> that acutall create all single type not like other language |
20:58:26 | FromDiscord | <theangryepicbanana> In reply to @Bung "ooputils lib": is this in the stdlib or a nimble package? |
20:58:56 | FromDiscord | <Bung> !package ooputils |
20:59:15 | FromDiscord | <Bung> hmm what's the bot command? |
21:00:18 | FromDiscord | <theangryepicbanana> In reply to @Bung "hmm what's the bot": dunno but I found it |
21:00:24 | FromDiscord | <theangryepicbanana> does it support interfaces? |
21:00:39 | FromDiscord | <theangryepicbanana> I'm basically looking for something like a concept but as a runtime thing |
21:00:58 | FromDiscord | <theangryepicbanana> (which is kinda what an interface/protocol is) |
21:01:45 | FromDiscord | <Bung> does not like , use that you'll only care about final object |
21:01:59 | FromDiscord | <theangryepicbanana> ? |
21:02:23 | FromDiscord | <Bung> some like typescript -> js |
21:02:53 | FromDiscord | <Bung> type info are striped out |
21:02:56 | FromDiscord | <theangryepicbanana> basically I want to be able to support something like `type Thing = a, b: Comparable` |
21:03:26 | FromDiscord | <theangryepicbanana> like I'm aware nim isn't exactly oop, but I'm sure it can be emulated somehow |
21:05:02 | FromDiscord | <leorize> there are a few attempts at emulating those |
21:05:19 | FromDiscord | <theangryepicbanana> I'm looking to bootstrap a language I'm working on by compiling to nim (since nim is the only language with features from my language like distinct types, generic multimethods, and an overall awesome type system), however this is like the one thing I'm stuck on |
21:05:19 | FromDiscord | <leorize> an in-language feature was concepts but it's under developed |
21:06:17 | FromDiscord | <theangryepicbanana> yeah I love concepts, but they are typeclasses and as a result, aren't runtime types |
21:06:31 | FromDiscord | <theangryepicbanana> available at runtime |
21:06:50 | FromDiscord | <ElegantBeef> Well the new concepts might help in this regard, but still uncertain what you're after |
21:07:23 | FromDiscord | <theangryepicbanana> c++ is the only other language I could use, however it doesn't have distinct types, (virtual) generic multimethods, or recursive concepts |
21:08:08 | FromDiscord | <ElegantBeef> https://github.com/beef331/constructor/blob/master/tests/timplements.nim this uses new concepts |
21:08:18 | FromDiscord | <ElegantBeef> And gives interface like logic |
21:08:46 | FromDiscord | <theangryepicbanana> ok so like for reference, this is the language this is for <https://github.com/ALANVF/star> |
21:09:05 | FromDiscord | <theangryepicbanana> `star` and `stdlib` have some example code |
21:09:24 | FromDiscord | <theangryepicbanana> you can think of it has a nim + scala hybrid |
21:09:31 | FromDiscord | <theangryepicbanana> (edit) "has" => "as" |
21:10:02 | FromDiscord | <theangryepicbanana> if you've ever seen nim's compiler, you'll know that typechecking is very complicated |
21:10:20 | FromDiscord | <theangryepicbanana> same deal here, which is why I want to use nim's typesystem |
21:11:30 | FromDiscord | <theangryepicbanana> In reply to @ElegantBeef "And gives interface like": yeah but it's still a compile time thing (and they're always generic from what I can tell), so I can't use the type at runtime |
21:11:42 | FromDiscord | <Bung> oh, cool, write in haxe |
21:11:46 | FromDiscord | <theangryepicbanana> (edit) "same deal here, which is why I want to use nim's typesystem ... " added "to bootstrap" |
21:12:01 | FromDiscord | <theangryepicbanana> yeah almost chose nim, but haxe allows recursive modules ;) |
21:12:15 | FromDiscord | <theangryepicbanana> (edit) "recursive" => "circular" |
21:13:24 | FromDiscord | <theangryepicbanana> but yea I basically don't want to write any of the typechecker in haxe (because it's not a very good lang otherwise lol), so I can theoretically compile to nim by only typechecking a little bit on my own |
21:13:51 | FromDiscord | <theangryepicbanana> (then ya know, actually rewrite the whole thing in my lang) |
21:14:22 | FromDiscord | <theangryepicbanana> it's a weird idea, but I think it'll work. at least easier than c++ lol |
21:14:35 | FromDiscord | <Bung> hmm, haxe is also awesome language |
21:14:49 | FromDiscord | <theangryepicbanana> yeah but it goes downhill really quickly |
21:14:52 | FromDiscord | <Bung> dont know why you choose one then come to another |
21:15:03 | FromDiscord | <theangryepicbanana> primarily because macros can't call other macros |
21:15:13 | FromDiscord | <theangryepicbanana> oh I'm not writing the lang in nim |
21:15:19 | FromDiscord | <theangryepicbanana> I want the lang to compile to nim initially |
21:17:06 | FromDiscord | <Bung> oh, so you can just generate code to nim |
21:17:46 | FromDiscord | <theangryepicbanana> yeah basically |
21:18:00 | FromDiscord | <Bung> you can striped out interface info |
21:18:11 | FromDiscord | <Bung> like ts compiler |
21:18:15 | FromDiscord | <theangryepicbanana> for some stuff I can |
21:18:25 | FromDiscord | <theangryepicbanana> but I still need to allow runtime checks for interfaces |
21:18:47 | FromDiscord | <theangryepicbanana> (also uh, star supports multiple inheritance, so that's a bit of an issue but eh) |
21:20:06 | FromDiscord | <Bung> you'll map them like dart does I think |
21:20:29 | FromDiscord | <Bung> as code I shown |
21:20:42 | FromDiscord | <theangryepicbanana> I don't recall what dart does. are they stored as instance fields or something? |
21:21:44 | FromDiscord | <Bung> Type A extends B,C,D will be extends b(c,d) |
21:22:21 | FromDiscord | <Bung> create some middle types there |
21:22:58 | FromDiscord | <theangryepicbanana> huh, I'm not entirely sure how that would work given that you can only inherit from a single type |
21:23:43 | FromDiscord | <shadow.> is there a way to make nimlsp lint all the time, not just after saving? |
21:24:06 | FromDiscord | <Rika> In reply to @theangryepicbanana "huh, I'm not entirely": A inherits (B inherits (C inherits D)) ? |
21:24:16 | FromDiscord | <Bung> In reply to @theangryepicbanana "huh, I'm not entirely": copy their implementations |
21:24:27 | FromDiscord | <Rika> but C != C inherits D, B != B i C i D, etc |
21:24:30 | * | stkrdknmibalz quit (Ping timeout: 265 seconds) |
21:25:01 | FromDiscord | <theangryepicbanana> In reply to @Bung "copy their implementations": I'd still like to have the subtype relationships if possible |
21:25:07 | FromDiscord | <Rika> basically "inherits" is an operator on types that returns a new type |
21:25:08 | FromDiscord | <Bung> sure, runtime check lie this will not work in this this way |
21:25:26 | FromDiscord | <theangryepicbanana> hmm |
21:25:51 | FromDiscord | <theangryepicbanana> well I suppose I'll find a workaround for that eventually |
21:25:56 | FromDiscord | <theangryepicbanana> is the type overloading thing is still a no? |
21:26:00 | FromDiscord | <theangryepicbanana> (edit) removed "is" |
21:26:12 | FromDiscord | <Rika> nim? no |
21:26:18 | FromDiscord | <theangryepicbanana> dang |
21:26:28 | FromDiscord | <theangryepicbanana> that'll probably make HKTs a pain to implement |
21:27:37 | FromDiscord | <theangryepicbanana> (higher-kinded types, basically stripGenericParams or genericHead) |
21:29:00 | FromDiscord | <Bung> if you can overload `is` or implement your own type check operator ,guess you'll need a BasicType has extro info about its parents. |
21:29:59 | FromDiscord | <theangryepicbanana> I guess |
21:30:41 | FromDiscord | <theangryepicbanana> thanks for the help though |
21:32:01 | FromDiscord | <theangryepicbanana> (still though, types should at least be able to be overloaded by arity) |
21:32:04 | FromDiscord | <theangryepicbanana> (edit) "arity)" => "arity at some pointy)" |
21:32:05 | FromDiscord | <theangryepicbanana> (edit) "pointy)" => "point)" |
21:32:16 | FromDiscord | <Rika> please start working on it then |
21:32:43 | FromDiscord | <theangryepicbanana> well I'm not demanding it, I'm just saying it's something that should be considered (because I haven't seen any RFCs for it) |
21:33:03 | FromDiscord | <Rika> perhaps you should write it because ive never heard anyone else talk about it |
21:33:14 | FromDiscord | <theangryepicbanana> really? |
21:33:19 | FromDiscord | <Rika> yeah not that i recall |
21:33:22 | FromDiscord | <Rika> (edit) "not" => "none" |
21:33:32 | FromDiscord | <theangryepicbanana> huh |
21:34:11 | FromDiscord | <theangryepicbanana> it's a thing in like every lang that supports function overloading |
21:34:34 | FromDiscord | <theangryepicbanana> well anyways yeah I might |
21:36:09 | FromDiscord | <ElegantBeef> What's the line "Features start in the unimplemented state" |
21:37:45 | FromDiscord | <Bung> interface mapping to nim backend |
21:50:21 | FromDiscord | <vishnumad> sent a code paste, see https://paste.rs/hK4 |
21:51:21 | FromDiscord | <theangryepicbanana> no, but there's an RFC open for it rn iirc |
21:54:28 | FromDiscord | <theangryepicbanana> relevant pr <https://github.com/nim-lang/Nim/pull/18470> |
22:05:47 | FromDiscord | <ElegantBeef> Well it is |
22:06:13 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3sHQ |
22:06:37 | FromDiscord | <ElegantBeef> Pure makes it so if there are any overlaps you have to specify the "namespace" IE `FooEnum.A` |
22:06:56 | FromDiscord | <ElegantBeef> That PR just removes the latter need |
22:07:08 | FromDiscord | <ElegantBeef> Since if it can be resolved it removes redundant work |
22:10:30 | * | maxime_ quit (Quit: Leaving) |
22:11:06 | FromDiscord | <theangryepicbanana> oh lol |
22:16:50 | * | neceve quit (Ping timeout: 255 seconds) |
22:29:05 | FromDiscord | <codic> can i use a http server like httpbeast and use treeform/ws to upgrade the connection to ws on a certain path? |
22:34:06 | * | pro quit (Ping timeout: 265 seconds) |
22:39:23 | * | vsantana joined #nim |
22:46:03 | * | vsantana quit (Quit: vsantana) |
22:47:02 | * | vsantana joined #nim |
22:48:06 | FromDiscord | <Bung> @ElegantBeef any news to nimscripter/ |
22:51:07 | * | vsantana quit (Client Quit) |
22:53:25 | * | vsantana joined #nim |
22:55:10 | * | vsantana quit (Client Quit) |
22:59:06 | FromDiscord | <shadow.> In reply to @shadow. "is there a way": bump if anyone knows |
23:00:54 | FromDiscord | <dom96> In reply to @codic "can i use a": yep |
23:01:24 | FromDiscord | <Bung> In reply to @shadow. "bump if anyone knows": why is that if your code doesn't change |
23:01:35 | FromDiscord | <shadow.> well im not autosaving |
23:01:39 | FromDiscord | <shadow.> i just want it to update while im typing |
23:01:52 | FromDiscord | <shadow.> but i have to resave every time to get linting which is annoying |
23:02:29 | FromDiscord | <dom96> In reply to @codic "can i use a": although not sure ws supports this actually, you can definitely do it with https://github.com/niv/websocket.nim |
23:02:30 | fn | <R2D299> itHub: 7"websockets for nim" |
23:02:36 | FromDiscord | <dom96> (I use it for one of my projects with httpbeast) |
23:02:40 | FromDiscord | <ElegantBeef> @Bung i've started on it |
23:02:42 | FromDiscord | <Bung> when you say "linting" it shows what ? |
23:03:05 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/863918342103236628/unknown.png |
23:03:09 | FromDiscord | <shadow.> the blue and red messages dont update until i save |
23:03:13 | FromDiscord | <shadow.> they do update on every other language server ive used |
23:03:17 | FromDiscord | <Bung> @ElegantBeef how is it going / |
23:03:18 | FromDiscord | <shadow.> im guessing it's a setting, i just don't know which one |
23:04:15 | FromDiscord | <Bung> em, I'll need check the code |
23:04:56 | * | stkrdknmibalz joined #nim |
23:05:09 | FromDiscord | <shadow.> alrighty |
23:05:28 | FromDiscord | <dom96> @codic part of the code from my project showing how to do it with httpbeast: https://gist.github.com/dom96/26c574ec1491ba98181de6c532fa52fc |
23:05:35 | FromDiscord | <dom96> I should add this as an example in httpbeast's repo really |
23:06:05 | FromDiscord | <Bung> yeah, nimlsp only sync content when it get document changed notification. |
23:08:44 | FromDiscord | <codic> if websocket.nim does it ws should too |
23:08:47 | FromDiscord | <codic> thanks for the example! |
23:10:12 | FromDiscord | <codic> hmm the magical method there seems to be `addPlayer` doing the websocket part |
23:10:13 | FromDiscord | <Bung> if you find "Upgrade" in ws repo guess it will work too. |
23:12:32 | FromDiscord | <codic> and verifyWebsocketRequest |
23:18:21 | FromDiscord | <Bung> @shadow. you need syntax check while you typing ? nimlsp basicly do whole thing , you check your syntax and code error, so while you typing you write uncomplete variable name , it will be report as error. |
23:18:37 | FromDiscord | <Bung> (edit) "you" => "" |
23:18:39 | FromDiscord | <shadow.> yeah id like linting while im typing |
23:18:43 | FromDiscord | <shadow.> im aware of the ramifications |
23:19:31 | FromDiscord | <Bung> I can add support to that. |
23:20:27 | FromDiscord | <Bung> but that kind of anyoing when message pop up while typing |
23:24:37 | FromDiscord | <theangryepicbanana> hmm, apparently "vtable types" were a thing at one point. would've solved my issue from earlier, but they seem to have been removed from the docs since then <https://web.archive.org/web/20171104234508/https://nim-lang.org/docs/manual.html#generics-vtable-types> |
23:29:23 | FromDiscord | <cynahc> Might anyone have a suggestion as to how to properly free a `seq` passed to SDL2 with `addr`? |
23:29:38 | FromDiscord | <cynahc> This is the offending code with the leak\: https://gist.github.com/chancyk/f8fc70ea55ab61ac25db2df2f1a03c86#file-sdl_texture-nim-L12 |