00:11:13 | FromDiscord | <treeform> I don't think so, open an issue with small repro case and I'll fix it. |
00:12:40 | FromDiscord | <sealmove> when you compile with the `outDir` switch, are relative paths in imports resolved based on that dir, or are they resolved based on `$PWD`? |
00:13:50 | FromDiscord | <Elegantbeef> outDir should be based off your current work directory |
00:14:12 | FromDiscord | <sealmove> ? if it's the same then what's the point of the switch alltogether? |
00:14:31 | FromDiscord | <Elegantbeef> to change the output directory? |
00:14:37 | FromDiscord | <sealmove> oh |
00:14:49 | FromDiscord | <sealmove> change _to_ the output dir? |
00:14:55 | FromDiscord | <Elegantbeef> you can have a `configs.nim` with `--outputdir:"bin/"` |
00:15:04 | FromDiscord | <Elegantbeef> `outDir`\ |
00:15:29 | FromDiscord | <Elegantbeef> `--outdir:DIRset the path where the output file will be written` |
00:16:14 | FromDiscord | <sealmove> i know that the executable is placed in `outdir`, but if you have an import with a relative path, will it be relative to `outdir`? |
00:16:27 | FromDiscord | <Elegantbeef> No |
00:16:55 | FromDiscord | <sealmove> are you 100% sure? :) |
00:16:59 | FromDiscord | <Elegantbeef> having imports depend on outDir would wreak havoc on reproducable builds |
00:17:17 | FromDiscord | <Elegantbeef> Why would outDir change the imports, that's just hell |
00:19:19 | FromDiscord | <sealmove> I didn't say it should. Just trying to understand my program |
00:21:31 | FromDiscord | <sealmove> Thanks Elegantbeef |
01:13:10 | * | krux02 quit (Remote host closed the connection) |
01:15:42 | * | Colt quit (Quit: Leaving) |
01:15:57 | * | Colt joined #nim |
01:32:38 | * | vicfred quit (Quit: Leaving) |
02:05:44 | FromDiscord | <Jakraes> Hey guys, quick question, how do I open txt files with nim? |
02:06:53 | rockcavera | jakraes see std/streams |
02:07:58 | FromDiscord | <Jakraes> Thanks! |
02:08:04 | rockcavera | =) |
02:21:57 | FromDiscord | <deech> sent a code paste, see https://play.nim-lang.org/#ix=3FjB |
02:22:16 | FromDiscord | <Elegantbeef> Cause it's a constant |
02:23:34 | FromDiscord | <deech> Is there any documentation on `lent` outside of `destructors.rst`? |
02:24:07 | FromDiscord | <Elegantbeef> It's just a mutable reference so everything that applies to `var` applies to it |
02:24:17 | FromDiscord | <Elegantbeef> immutable\ |
02:24:52 | FromDiscord | <Elegantbeef> Just like `var T` presently it does copy on assignment and all that jazz, but if you dont store it will not copy |
02:28:50 | FromDiscord | <Elegantbeef> I know not overly helpful, but i dont think there are any other docs on the matter |
02:34:40 | FromDiscord | <deech> Then what's the advantage to returning a `lent T` instead of `T` since neither can be passed to a `var T` argument. |
02:35:16 | FromDiscord | <Elegantbeef> `lent` is borrowed always |
02:35:39 | FromDiscord | <deech> So it just avoids a copy? |
02:36:01 | FromDiscord | <Elegantbeef> Yes, plus when views become standard you'll be able to get save views |
02:36:06 | FromDiscord | <Elegantbeef> safe views\ |
02:36:39 | FromDiscord | <deech> Why are they unsafe now? |
02:36:47 | FromDiscord | <deech> BTW thanks for answering my questions. |
02:37:44 | FromDiscord | <Elegantbeef> Well views are experimental is what i mean, presently without them you have to use pointers to get views and manually ensure they dont outlive the place of borrowing |
02:38:14 | FromDiscord | <deech> Ah, ok, so if you enable `{experimental: views.}` you do get safe views? |
02:38:25 | FromDiscord | <Elegantbeef> the thing is with lent annotations copies wont be made unless it's needed with viewtypes when they become standard |
02:38:32 | FromDiscord | <Elegantbeef> Yea they should be safe |
02:38:37 | FromDiscord | <impbox [ftsf]> experimentally safe |
02:38:58 | FromDiscord | <deech> I caught that nuance thanks. π |
02:40:23 | FromDiscord | <Elegantbeef> lent is much like openarray, in that smart usage can make code faster π |
02:41:18 | FromDiscord | <impbox [ftsf]> can idiotic usage code make slower? |
02:41:36 | FromDiscord | <Elegantbeef> Not really since Nim knows to copy when it needs to |
02:41:41 | FromDiscord | <impbox [ftsf]> win |
02:42:16 | FromDiscord | <Elegantbeef> Like `proc doThing(s: SomeObj): lent SomeOtherObj = s.field` will only copy when you do `var a = someObj.doThing()` and things like it |
02:42:33 | FromDiscord | <Elegantbeef> but if you do `echo someObj.doThing()` it'll be borrowed |
02:43:22 | FromDiscord | <Elegantbeef> Nim's move semantics and borrowing is quite nice, but the caveat is that there is no way of barring copies in a limited capacity, say you have a hotpath you never want to copy and want `sink` to actually sink, you're up shit creek |
02:43:56 | FromDiscord | <Elegantbeef> You either make everything under a specific scope incapable of copying on sink, or you manually ensure copies dont happen |
02:44:45 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/RFCs/issues/432 RFC that talks about that |
02:45:02 | FromDiscord | <deech> How does copy do the right thing when `SomeOtherObj` is an object with a `ptr` field? |
02:46:14 | FromDiscord | <Elegantbeef> so you're saying like `lent ptr int`? |
02:47:00 | FromDiscord | <deech> Like `type O = object; p: ptr int; proc f():lent O = ...` |
02:47:49 | FromDiscord | <Elegantbeef> Well it'd copy the ptr in that case, which is of course dangerous, but in the future with view types it'd be a borrowed immutable view |
02:48:26 | FromDiscord | <Elegantbeef> Cause `lent T` will have the same semantics as `strictFuncs` in that any mutation to the object would be a compile time error afaik |
02:49:09 | FromDiscord | <Elegantbeef> I suppose i could be wrong about this stuff, i'm a lowly numpty afterall π |
02:54:24 | * | redj quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
02:55:02 | * | neurocyte0132889 quit (Ping timeout: 268 seconds) |
02:55:16 | * | redj joined #nim |
02:59:03 | * | redj quit (Client Quit) |
03:00:15 | * | redj joined #nim |
03:43:20 | FromDiscord | <Jakraes> Another question, is there a library that allows nim to create image files? |
03:46:21 | FromDiscord | <impbox [ftsf]> I use nimPNG for loading and saving PNGs |
03:46:46 | FromDiscord | <impbox [ftsf]> stb_image is pretty easy to use |
03:47:35 | FromDiscord | <Jakraes> Sounds great, I'll try it out, thanks! |
03:48:12 | FromDiscord | <impbox [ftsf]> stb_image is a wrapped c header library, can do a bunch of formats, nimPNG just does PNG but is pure nim |
03:49:31 | FromDiscord | <Jakraes> I think nimPNG is probably the best for what I'm trying to make, just wanna keep it really simple |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:11:45 | * | arkurious quit (Quit: Leaving) |
04:18:26 | * | rockcavera quit (Remote host closed the connection) |
05:40:12 | FromDiscord | <Yardanico> In reply to @Jakraes "I think nimPNG is": For more complex stuff there's pixie |
05:40:22 | FromDiscord | <Yardanico> It has a lot of features |
06:27:18 | * | mst quit (Ping timeout: 260 seconds) |
06:54:16 | FromDiscord | <treeform> Yes pixie can also read and write png files. |
06:54:54 | FromDiscord | <treeform> Here are some speed numbers: https://discord.com/channels/371759389889003530/706542664643772436/794660369741905930 |
06:55:38 | FromDiscord | <treeform> Like nimPNG pixie has a pure nim png reader/writer. |
07:20:24 | * | krux02 joined #nim |
07:37:49 | NimEventer | New thread by Kobi: MetaCall, see https://forum.nim-lang.org/t/8635 |
07:43:26 | * | neurocyte0132889 joined #nim |
07:43:26 | * | neurocyte0132889 quit (Changing host) |
07:43:26 | * | neurocyte0132889 joined #nim |
08:11:51 | * | advesperacit joined #nim |
08:20:14 | * | krux02 quit (Remote host closed the connection) |
08:39:05 | * | Vladar joined #nim |
08:56:57 | FromDiscord | <ynfle (ynfle)> Why are object fields in a TypeDef Ident not Sym? |
08:57:45 | * | PMunch joined #nim |
08:58:36 | FromDiscord | <Elegantbeef> What's the macro? |
08:58:41 | FromDiscord | <Elegantbeef> Is it a typed or untyped macro? |
09:01:01 | PMunch | @Elegantbeef, tried to tell him yesterday :P https://irclogs.nim-lang.org/17-11-2021.html#20:34:06 |
09:01:28 | FromDiscord | <Elegantbeef> It could be typed data, but if it's a typedef the syms arent bound since they'd point to nothing |
09:03:28 | FromDiscord | <Elegantbeef> For instance https://play.nim-lang.org/#ix=3FkE |
09:13:13 | FromDiscord | <ynfle (ynfle)> @Pmunch The gitter bridge was broken so I didn't see the reply. Either way it was typed |
09:13:29 | PMunch | Ah, that's a bummer |
09:13:44 | PMunch | Hmm, then I guess ElegantBeef has the correct answer |
09:13:59 | FromDiscord | <ynfle (ynfle)> @beef what do you mean by point to nothing? |
09:14:33 | FromDiscord | <Elegantbeef> Well what'd the symbols access when you wrote them |
09:14:40 | FromDiscord | <Elegantbeef> There isnt anything instantiated to reference |
09:15:00 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3FkH for the better comparison of AST |
09:17:28 | FromDiscord | <ynfle (ynfle)> Makes sense |
09:17:31 | FromDiscord | <ynfle (ynfle)> I think |
09:18:39 | FromDiscord | <Elegantbeef> What are you trying to do? |
09:28:07 | NimEventer | New thread by Planetis: Always confused with float conversions, see https://forum.nim-lang.org/t/8636 |
09:30:03 | FromDiscord | <ynfle (ynfle)> Lots of stuff, but I was just curious. I wast using a modified version of `macrotuils.forNode` that doesn't modify the value so it can work on typed ASTs to gather all the types that are use in the code that are defined in the current module. For some reason it didn't visit the field of an object or tuple |
09:31:01 | FromDiscord | <Elegantbeef> Ah i was more asking the overall goal if that is a blocker π |
09:31:30 | FromDiscord | <ynfle (ynfle)> Just trying to figure out why they weren't visited |
09:32:27 | FromDiscord | <Elegantbeef> Ah then i guess you have the answer π |
09:41:11 | PMunch | ynfle_(ynfle), if you make modifications to macroutils please share them :) |
09:41:49 | FromDiscord | <ynfle (ynfle)> With pleasure. |
09:41:50 | FromDiscord | <Rika> Is it bound by license |
09:42:32 | FromDiscord | <ynfle (ynfle)> There isn't any license |
09:42:55 | FromDiscord | <Elegantbeef> Well shit |
09:43:03 | PMunch | There is |
09:43:05 | PMunch | It's MIT |
09:43:35 | PMunch | https://github.com/PMunch/macroutils/blob/master/macroutils.nimble#L6 |
09:43:41 | FromDiscord | <ynfle (ynfle)> @Pmunch what should I call it? It is a modified version of forNode that doesn't modified the AST |
09:44:03 | FromDiscord | <ynfle (ynfle)> Sneaky for not putting it in the repo |
09:44:17 | PMunch | I just keep forgetting.. |
09:44:34 | PMunch | I give them MIT when Nimble asks me and I don't think about it again |
09:45:02 | FromDiscord | <ynfle (ynfle)> All good |
09:45:59 | PMunch | Hmm, what to call it is tricky |
09:46:23 | FromDiscord | <ynfle (ynfle)> I called it forNodeImut |
09:46:24 | PMunch | Can you inspect the action argument and just not modify the tree if it doesn't return anything? |
09:46:33 | PMunch | That way they can both be called forNode |
09:46:54 | FromDiscord | <ynfle (ynfle)> Let me see |
09:47:01 | FromDiscord | <ynfle (ynfle)> I can just over load I think |
09:47:16 | PMunch | Oh yeah, it takes a proc as an argument. So you should be able to just add an overload |
09:47:58 | PMunch | Please make forNodePos also work like this if you don't mind :) |
09:47:59 | * | xet7 quit (Quit: Leaving) |
09:48:31 | FromDiscord | <Elegantbeef> Wow pmunch getting free labour and will make millions off of it! |
09:49:11 | PMunch | Haha, millions with my MIT licensed work :P |
09:49:57 | PMunch | I mean I do make a couple bucks a year off-of GitHub sponsorships. I think it's like $40 or something |
09:50:17 | FromDiscord | <Elegantbeef> Damn disruptek paying those bills π |
09:55:10 | PMunch | Huh, apparently I've calculated all wrong, I actually get a nice little sum. About a beer a month |
10:14:18 | NimEventer | New thread by Wiltzutm: Energy efficiency, see https://forum.nim-lang.org/t/8637 |
10:21:19 | FromDiscord | <Stuffe> How do you check if an integer has an enum value associated with it? Like `if 5 in my_directions: ...` |
10:21:37 | FromDiscord | <Stuffe> That one doesn't work of course. Do I have to use try/catch? |
10:21:44 | FromDiscord | <Elegantbeef> Are the enums sequentially stored? |
10:21:55 | FromDiscord | <Stuffe> right now yes |
10:22:14 | FromDiscord | <Stuffe> ah you are thinking of using my_directions.high? |
10:22:26 | FromDiscord | <Elegantbeef> `if x in MyEnum.low.ord .. MyEnum.high.ord` |
10:23:14 | FromDiscord | <Stuffe> ok thank you, I was hoping to use this enum as IDs, so would rather not commit to no holes |
10:23:52 | FromDiscord | <Stuffe> I mean I don't want to be able to store these enum integers and never rearrange even if one of the enum fields are deleted |
10:24:01 | FromDiscord | <Stuffe> (edit) removed "don't" |
10:24:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3FkX |
10:24:34 | FromDiscord | <Elegantbeef> I personally despise holey enums |
10:24:43 | FromDiscord | <Stuffe> I see |
10:25:40 | FromDiscord | <Stuffe> well in general I would rather keep things simple as well, but sometimes reality complicates things |
10:27:01 | FromDiscord | <Elegantbeef> Well it's less about simple imo, just that they suckkkkkkk π |
10:28:06 | FromDiscord | <Stuffe> well explicitly keeping track of key value pars has other downsides |
10:28:29 | FromDiscord | <Stuffe> I could see myself doing that sometimes |
10:28:48 | FromDiscord | <Stuffe> but I think its less readable |
10:29:37 | FromDiscord | <Elegantbeef> Anyway for holey read this forum post and choose your favourite https://forum.nim-lang.org/t/8188 |
10:31:11 | FromDiscord | <Stuffe> oh god. Why isn't there an easy check like `if x in my_enum:` |
10:31:30 | FromDiscord | <Elegantbeef> Cause holey enums suck π |
10:32:02 | FromDiscord | <Elegantbeef> Joke aside, https://forum.nim-lang.org/t/8188#52705 has the basis for that |
10:32:27 | FromDiscord | <Elegantbeef> and now `enumAsSet` isnt needed since `setUtils` now exists |
10:33:21 | FromDiscord | <Elegantbeef> It's still pretty bad so i guess time for a PR to enum utils π |
11:10:50 | * | fputs quit (Remote host closed the connection) |
11:11:42 | * | fputs joined #nim |
11:19:15 | FromDiscord | <haxscramper> You can overload 'contains' for enum typedescβ΅(@Stuffe) |
11:20:02 | FromDiscord | <haxscramper> `proc [E: enum](Enum type: typedesc[E], value: int): bool` |
11:21:57 | FromDiscord | <Stuffe> I see |
11:23:53 | FromDiscord | <Stuffe> Really contiguous enums and non contiguous enums should be 2 different things completely in my opinion and simple things like this should be in the standard lib |
11:52:13 | PMunch | Hmm, is there a way to use Nim types in GDB? |
11:52:52 | PMunch | I need to cast a generic pointer to a Nim type, and currently I use the obfuscated name, but it would be nice to not have to check the C file to find those names every time |
11:55:24 | FromDiscord | <Yardanico> In reply to @PMunch "Hmm, is there a": https://github.com/nim-lang/Nim/blob/devel/tools/nim-gdb.py should work |
11:55:50 | FromDiscord | <Yardanico> but it's not perfect |
11:58:20 | PMunch | Hmm, nim-gdb is installed in .nimble. But it doesn't work because it requires /home/peter/.nimble/tools/nim-gdb.py which isn't installed :P |
11:59:11 | * | neurocyte0132889 quit (Ping timeout: 250 seconds) |
12:05:41 | PMunch | Hmm, it wasn't able to do casting to types though.. |
12:05:57 | PMunch | `print *(tyObject_ModuleQueryData__mgCg2qkWiF7TTb2pRsGCMQ*)qstate.minfo[1]` |
12:06:01 | PMunch | This is what I'm doing now |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:25 | PMunch | To print the `qstate.minfo[1]` field as a `ptr ModuleQueryData` |
12:06:32 | * | supakeen joined #nim |
12:19:27 | FromDiscord | <gingerBill> sent a code paste, see https://play.nim-lang.org/#ix=3Fln |
12:19:47 | * | rockcavera joined #nim |
12:19:47 | * | rockcavera quit (Changing host) |
12:19:47 | * | rockcavera joined #nim |
12:19:58 | FromDiscord | <haxscramper> no, there is no flag toggle function |
12:20:04 | FromDiscord | <Yardanico> there is in stdlib |
12:20:12 | FromDiscord | <haxscramper> oh, there is now |
12:20:12 | FromDiscord | <Yardanico> https://nim-lang.github.io/Nim/setutils.html#%5B%5D%3D%2Cset%5BT%5D%2CT%2Cbool |
12:20:28 | FromDiscord | <Yardanico> In reply to @gingerBill "For bitsets in Nim,": hi, are you improving a wasm4 nim version or something? :P |
12:20:31 | FromDiscord | <gingerBill> Okay, so bit sets allow for indexing with that overload. |
12:20:35 | FromDiscord | <gingerBill> In reply to @Yardanico "hi, are you improving": No. |
12:20:35 | * | Vladar quit (Quit: Leaving) |
12:20:51 | FromDiscord | <Yardanico> just generally interested in Nim? it's nice to see creators of other languages here though :) |
12:21:17 | FromDiscord | <gingerBill> I used to be on this Discord and for some reason I wasn't any more. I also make sure to research as many languages as I can. |
12:21:22 | FromDiscord | <Yardanico> oh, okay |
12:22:08 | FromDiscord | <gingerBill> So does Nim not also overload `[]`? |
12:22:31 | FromDiscord | <Rika> You can make it overload that |
12:22:37 | FromDiscord | <gingerBill> So the answer is no |
12:22:54 | FromDiscord | <Rika> I mean if thatβs what you interpret it as then sure |
12:23:04 | FromDiscord | <gingerBill> Seems really bizarre that std/setutils only overloads `[]=` and not `[]` |
12:23:15 | FromDiscord | <Rika> Huh |
12:23:24 | FromDiscord | <Rika> Iβll look wait |
12:23:35 | FromDiscord | <Rika> Huh |
12:23:44 | FromDiscord | <Yardanico> In reply to @gingerBill "Seems really bizarre that": yeah it's a bit weird |
12:23:47 | FromDiscord | <Rika> Itβs a pretty new module so |
12:23:48 | FromDiscord | <Rika> I donβt know |
12:23:54 | FromDiscord | <Yardanico> yeah, it's fair to make a feature request |
12:25:30 | FromDiscord | <Yardanico> In reply to @gingerBill "Seems really bizarre that": ahh right i understand what you're asking for |
12:25:41 | FromDiscord | <Yardanico> nim has a `contains` defined for sets |
12:25:43 | FromDiscord | <Yardanico> so you can do |
12:25:51 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Flo |
12:25:57 | FromDiscord | <gingerBill> The other reason I find it a little weird is that it seems to be treating a set as if its an array of packed booleans _semantically_ whilst its normal behaviour is to use `x in y` rather than `y[x]` |
12:26:42 | FromDiscord | <Rika> So what should it be instead of []=? |
12:26:44 | FromDiscord | <Yardanico> In reply to @gingerBill "The other reason I": well I can't think of a simpler syntax for conditional inclusion |
12:26:47 | FromDiscord | <gingerBill> (edit) "rather than" => "and now the new " |
12:26:52 | FromDiscord | <Rika> .toggle()? |
12:27:00 | FromDiscord | <Rika> Or I donβt know Iβm just asking |
12:27:02 | FromDiscord | <gingerBill> There is a reason I'm asking this question π |
12:27:36 | FromDiscord | <gingerBill> Because in the past, if you wanted to do this in Pascal variants, you had to make wrapper procedures for each of them |
12:27:39 | FromDiscord | <Rika> Well I feel like []= was just chosen because of lack of better syntax |
12:27:45 | FromDiscord | <Yardanico> In reply to @gingerBill "Because in the past,": interesting |
12:27:55 | FromDiscord | <Yardanico> Nim is pascal-influenced quite a lot, but it's better to treat it as a separate language |
12:27:59 | FromDiscord | <gingerBill> And it was a procedure call rather than an operator |
12:28:10 | FromDiscord | <gingerBill> In reply to @Yardanico "Nim is pascal-influenced quite": I understand that very well |
12:28:25 | FromDiscord | <Yardanico> default set operations are described here https://nim-lang.org/docs/manual.html#types-set-type |
12:28:31 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/910869072231686184/unknown.png |
12:28:51 | FromDiscord | <gingerBill> I should be clear, I'm looking to see if Nim has solved this problem before and how because both Nim and Odin have bit set types which we both nicked from Pascal. |
12:29:22 | FromDiscord | <gingerBill> And it looks like Nim's current approach is just hacking it in, for the lack of a better word. |
12:31:42 | FromDiscord | <Rika> Hacking how |
12:31:47 | FromDiscord | <Rika> Whatβs the hack in this case |
12:32:07 | FromDiscord | <gingerBill> Only overloading `[]=` is a hack/bodge |
12:32:30 | FromDiscord | <Yardanico> In reply to @Rika "Hacking how": How []= for toggling a set is overloaded but to check the presence of an element in a set you use `contains` |
12:32:39 | FromDiscord | <Rika> I see |
12:32:44 | FromDiscord | <Rika> Itβs half assed I guess yeah |
12:32:47 | FromDiscord | <Yardanico> well, i don't know if adding `[]` which aliases to `contains` to setutils would be a good idea or not |
12:33:20 | FromDiscord | <Rika> My messages are sending late because I live in the middle of fucking nowhere so just a disclaimer |
12:33:51 | FromDiscord | <Rika> In reply to @Yardanico "well, i don't know": The better idea IMO is to rename []= I guess |
12:33:59 | FromDiscord | <gingerBill> Well this is a design problem. I'm not a huge fan of the idea of allowing `[]` on bit sets because they are not arrays. If it was than `[]=` is a logical conclusion of that logic. But it is the `[]` that is question. |
12:34:33 | FromDiscord | <gingerBill> So it does look like the solution to the problem is to just make a helper procedure to do the same thing similar to `incl` and `excl` |
12:34:39 | FromDiscord | <Yardanico> In reply to @Rika "The better idea IMO": the PR was in https://github.com/nim-lang/Nim/pull/17272 |
12:34:56 | FromDiscord | <Rika> In reply to @gingerBill "So it does look": Wonder what it should be named though |
12:35:14 | FromDiscord | <Yardanico> apparently it was []= because D, swift and C++ have the same way |
12:35:25 | FromDiscord | <Yardanico> but yes there were arguments against that syntax |
12:35:33 | FromDiscord | <Rika> Mask? |
12:35:33 | FromDiscord | <Rika> Actually doesnβt sound too bad, I believe that bitops module uses the same name |
12:35:33 | FromDiscord | <gingerBill> `std::bitset` in C++ allows `[]` access and thus makes sense |
12:35:48 | FromDiscord | <Rika> Again my messages are sending way late |
12:35:50 | FromDiscord | <Rika> Goodness |
12:35:51 | FromDiscord | <gingerBill> It's more of a "put bit" like operation but that is a poor name |
12:35:54 | FromDiscord | <Yardanico> In reply to @gingerBill "`std::bitset` in C++ allows": yeah, you're right, it's weird that []= was added but not [] :) |
12:39:45 | FromDiscord | <eyecon> I think I'm having a brain/reading comprehension fart: how do I specify that a .nim file is always to be compiled with `-d:ssl`? There was a pragma for that, I thought, but I can't find it atm |
12:41:08 | FromDiscord | <Yardanico> In reply to @eyecon "I think I'm having": just add -d:ssl to yourfile.nim.cfg |
12:41:10 | FromDiscord | <Rika> No pragma here, please use the Nim config file |
12:41:17 | FromDiscord | <Yardanico> or switch("define", "ssl") if you prefer to use .nims |
12:41:39 | FromDiscord | <Rika> In reply to @Yardanico "just add -d:ssl to": Needs to be --define:ssl I believe |
12:41:43 | FromDiscord | <Rika> Unless that has changed |
12:41:47 | FromDiscord | <eyecon> Ah, thanks |
12:42:00 | FromDiscord | <Yardanico> @gingerBill feel free to comment on https://github.com/nim-lang/Nim/issues/19163, i just quickly made it |
12:42:05 | FromDiscord | <eyecon> In reply to @Rika "Needs to be --define:ssl": `-d:ssl` seems to work for me |
12:42:12 | FromDiscord | <Yardanico> In reply to @Rika "Needs to be --define:ssl": no |
12:42:22 | FromDiscord | <Yardanico> .cfg files have the same argument format as the nim compiler |
12:42:29 | FromDiscord | <Yardanico> so both -d and --define work |
12:42:38 | FromDiscord | <Rika> Huh okay |
12:44:12 | arkanoid | is there a table that keeps columns of different types? I need to operate on data like pandas. I could surely add a layer over arraymancer dataframes, but seems an overkill |
12:45:02 | FromDiscord | <Yardanico> @arkanoid I think it'd be better if you ask in #nim-science as well |
12:45:10 | FromDiscord | <Yardanico> that channel is focused on stuff like this |
12:46:08 | arkanoid | too many people there! :P |
12:46:19 | FromDiscord | <Yardanico> π€ |
12:55:07 | FromDiscord | <vindaar> Just because there isn't a lot of active discussion going on there lately, doesn't mean we aren't there to answer questions πβ΅(<@709044657232936960_arkanoid=5b=49=52=43=5d>) |
13:06:13 | FromDiscord | <Fish-Face> I am going to give a short (15m) talk to some co-workers about Nim, just to introduce it. The main point will be "it has nice syntax but it's faster than python". Anyone got some ideas of good - and simple - things to cover or use as examples will making that point? I was wondering about a simple example that makes use of macros. |
13:07:41 | FromDiscord | <Rika> Personally would recommend not going too hard on macros, people tend to dislike it even if irrationally |
13:08:17 | FromDiscord | <Fish-Face> hmm interesting |
13:09:55 | FromDiscord | <xflywind> https://github.com/nim-lang/website/blob/master/jekyll/_posts/2021-10-19-version-160-released.md#why-use-nim |
13:27:56 | FromDiscord | <Yardanico> In reply to @Fish-Face "I am going to": See https://forum.nim-lang.org/t/8503 for example too |
13:28:28 | FromDiscord | <Yardanico> Also don't forget to mention https://github.com/yglukhov/nimpy as a point about smaller ecosystem |
13:28:37 | FromDiscord | <Yardanico> Tell them that they can reuse Python modules :) |
13:28:56 | FromDiscord | <Yardanico> But of course no performance benefit if heavy calculations are done in this module |
13:29:06 | FromDiscord | <Yardanico> (edit) "this module" => "Python modules" |
13:30:12 | arkanoid | I think I've just found a single project where I will use all nim backends at the same time |
13:30:19 | FromDiscord | <Yardanico> All? |
13:30:34 | FromDiscord | <Yardanico> C, C++, Objective C, JS? |
13:30:48 | arkanoid | damn, I forgot about ObjectiveC |
13:30:51 | arkanoid | so not all |
13:30:54 | * | neurocyte0132889 joined #nim |
13:30:54 | * | neurocyte0132889 quit (Changing host) |
13:30:54 | * | neurocyte0132889 joined #nim |
13:30:56 | FromDiscord | <Yardanico> :) |
13:31:01 | arkanoid | :) |
13:32:09 | FromDiscord | <Rika> Objective C is the most neglected backend (though itβs not the least polished) ngl |
13:39:12 | arkanoid | I've was an ObjectiveC programmer during the iPhone 1,2 era |
13:39:39 | arkanoid | language was ok, but xcode and apple docs were incredible |
13:39:42 | FromDiscord | <Rika> Wow thatβs a while back |
13:39:55 | FromDiscord | <Rika> Apple docs are no longer incredible xd |
13:40:14 | arkanoid | well yeah everything was simple there |
13:40:26 | arkanoid | now it's same hell as android, but I thing android aged better |
13:40:30 | arkanoid | *think |
13:40:47 | FromDiscord | <Rika> Yeah afaik Apple really neglected documentation |
13:41:40 | arkanoid | I've stopped using Apple stuff when I realized it shifted from professional tools for developers to stuff for hipsters |
13:43:08 | * | Colt quit (Quit: Leaving) |
13:44:14 | arkanoid | I have to setup the environment for a frontend/backend app made in nim. I'm not sure what's the best way to split the two. Two independent nimble projects, or a larger one with custom nimble tasks? I prefer the second one, as here what shines is the shared logic, but I'm not sure |
13:44:49 | FromDiscord | <Rika> Ah this problem again haha |
13:44:55 | FromDiscord | <Rika> I remember someone asking this before |
13:45:32 | FromDiscord | <Rika> I believe if youβre gonna publish this later you should do two packages |
13:45:40 | FromDiscord | <Rika> If not then I guess whichever you think is best |
13:52:24 | * | advesperacit quit (Ping timeout: 268 seconds) |
13:52:32 | * | advesperacit_ joined #nim |
13:56:41 | * | arkurious joined #nim |
14:22:11 | FromDiscord | <hmmm> rika it's time for you to get to Tokyo. Incredibly speedy internet there I hear π |
14:24:28 | FromDiscord | <tandy> is the objective c backend even documented?β΅(@Yardanico) |
14:45:42 | FromDiscord | <Rika> In reply to @hmmm "rika it's time for": Haha I canβt |
14:45:50 | FromDiscord | <Rika> Expensive to live there |
14:46:17 | FromDiscord | <Rika> Iβd prolly have rent thatβs 4x my current rent if I did |
15:12:04 | * | neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat) |
15:13:45 | arkanoid | and now let's see if antivirus will trigger rust toolchain too https://kerkour.com/rust-crate-backdoor/ |
15:14:12 | arkanoid | I guess not, thanks to https://www.rust-lang.org/sponsors |
15:15:15 | * | neurocyte0132889 joined #nim |
15:15:15 | * | neurocyte0132889 quit (Changing host) |
15:15:15 | * | neurocyte0132889 joined #nim |
15:17:56 | * | lumo_e joined #nim |
15:42:34 | * | vicecea quit (Remote host closed the connection) |
15:43:05 | * | vicecea joined #nim |
15:53:15 | PMunch | arkanoid, I guess a three way split might be a good solution |
15:53:36 | arkanoid | yes |
15:53:38 | PMunch | Common logic in one module, server logic in another, and client logic in a third |
16:04:09 | * | pch quit (Read error: Connection reset by peer) |
16:04:15 | * | pch joined #nim |
16:09:19 | FromDiscord | <retkid> what does <type> |
16:09:20 | FromDiscord | <retkid> (edit) "what does <type> ... " added "mean" |
16:16:48 | PMunch | What a type means? |
16:20:58 | FromDiscord | <retkid> <> signifies the type is immutable |
16:24:08 | * | nixfreaknim[m] quit (K-Lined) |
16:24:15 | * | happycorsair[m] quit (K-Lined) |
16:26:04 | NimEventer | New post on r/nim by GeroSchorsch: How to enforce functional programming in nim?, see https://reddit.com/r/nim/comments/qwtff3/how_to_enforce_functional_programming_in_nim/ |
16:35:29 | * | ormiret quit (Ping timeout: 264 seconds) |
16:36:41 | * | euantorano quit (Ping timeout: 264 seconds) |
16:36:42 | * | happycorsair[m] joined #nim |
16:37:44 | * | cornfeedhobo quit (Ping timeout: 246 seconds) |
16:38:35 | * | krux02 joined #nim |
16:39:33 | * | robertmeta quit (Ping timeout: 250 seconds) |
16:40:02 | * | LyndsySimon quit (Read error: Connection reset by peer) |
16:41:34 | * | ormiret joined #nim |
16:41:56 | * | krux02 quit (Remote host closed the connection) |
16:42:30 | * | krux02 joined #nim |
16:42:51 | * | LyndsySimon joined #nim |
16:43:19 | * | robertmeta joined #nim |
16:51:01 | * | euantorano joined #nim |
16:55:42 | * | cornfeedhobo joined #nim |
17:01:26 | * | nixfreaknim[m] joined #nim |
17:01:33 | * | nixfreaknim[m] quit (Quit: Client limit exceeded: 20000) |
17:05:37 | NimEventer | New thread by Serge: Nim stopped working on my Mac M1 : string.h missing (problem with homebrew or Xtools)?, see https://forum.nim-lang.org/t/8638 |
17:06:17 | * | nixfreaknim[m] joined #nim |
17:12:19 | FromDiscord | <π§ππ’> could anyone help me w/ an issue im having while trying to write a x11 wm |
17:12:56 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FmL |
17:13:00 | * | lumo_e quit (Ping timeout: 265 seconds) |
17:13:12 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FmM |
17:13:19 | FromDiscord | <π§ππ’> saying im getting a type mismatch? |
17:14:59 | FromDiscord | <π§ππ’> https://pastebin.com/zbNbqBgCβ΅this is my nim code i put it here bc it was kinda spammy |
17:15:46 | FromDiscord | <π§ππ’> i just wanna check if the table contains a `KeyMapping` object |
17:29:16 | FromDiscord | <π§ππ’> can anyone help me w/ why this isnt working? |
17:34:31 | FromDiscord | <konsumlamm> In reply to @π§ππ’ "https://pastebin.com/zbNbqBgC this is my": that doesn't seem to be your `whim.nim`, there is no `in` in line 60 |
17:35:12 | FromDiscord | <noow> it's on line 55 |
17:35:12 | FromDiscord | <π§ππ’> that is it |
17:35:19 | FromDiscord | <π§ππ’> sent a code paste, see https://play.nim-lang.org/#ix=3FmT |
17:35:27 | FromDiscord | <π§ππ’> so it works if i make the key of the map a tuple, but not an object |
17:35:41 | FromDiscord | <π§ππ’> any idea how to fix that |
17:35:56 | PMunch | Use `hasKey` from the tables module? |
17:36:08 | PMunch | Not sure if `in` is supported on a Table |
17:36:27 | PMunch | Aah, apparently it's supposed to |
17:36:28 | PMunch | Hmm |
17:36:33 | FromDiscord | <noow> In reply to @PMunch "Not sure if `in`": doesn't the compiler resolve it to HasKey correctly, according to the error log |
17:36:35 | FromDiscord | <π§ππ’> In reply to @PMunch "Use `hasKey` from the": tried that |
17:36:37 | FromDiscord | <π§ππ’> it doesnt work |
17:36:41 | FromDiscord | <π§ππ’> same error |
17:37:07 | FromDiscord | <π§ππ’> yet as soon as i change it from key of KeyMapping to key of (char, cuint) |
17:37:09 | FromDiscord | <π§ππ’> it works? |
17:37:10 | FromDiscord | <noow> by the way, your KeyMapping is a ref object, and you're calling an initializer every time you get a key object, I doubt you will ever do a correct lookup if my understanding of nim semantics is correct |
17:37:32 | FromDiscord | <noow> I would not use "ref" for KeyMapping |
17:37:39 | PMunch | Ditto |
17:37:48 | PMunch | I would use a normal object for KeyMapping |
17:38:06 | FromDiscord | <π§ππ’> hm ok |
17:38:19 | PMunch | I think the problem is that you don't have a `hash` proc for `KeyMapping`, Nim seems to try and create one for you but fails |
17:38:26 | PMunch | A normal object should work |
17:38:44 | FromDiscord | <noow> since calling the initializer on a ref object will create a new instance, and when you create a table with ref object as the key, you will be actually indexing by the specific instance, not the contents |
17:39:00 | FromDiscord | <noow> since it will use its pointer as a key by default |
17:39:01 | PMunch | Cool that more people are doing Window managers in Nim :) |
17:39:12 | FromDiscord | <noow> (edit) "since it will use its pointer as a key by default ... " added "(unless im wrong)" |
17:39:37 | FromDiscord | <noow> In reply to @PMunch "I think the problem": oh wait maybe that's what is causing the compiler error |
17:39:45 | FromDiscord | <noow> if yes ignore my last sentence |
17:39:50 | FromDiscord | <π§ππ’> i removed the ref and i think it works but lemem try and compile |
17:39:57 | FromDiscord | <π§ππ’> yeah that fixed it |
17:40:12 | FromDiscord | <π§ππ’> any reason why>? |
17:40:13 | FromDiscord | <noow> oh then PMunch is right and ignore me |
17:42:29 | PMunch | @noow, that is what's causing the error. But I think the reason why Nim won't create a hash proc for you is because of the ref/instance issue you mentioned |
17:42:30 | FromDiscord | <π§ππ’> nim reminds me of ada or haskell tbh |
17:42:45 | PMunch | This is a minimal example with the full error message by the way: http://ix.io/3FmU |
17:43:02 | PMunch | A bit more obvious that you need a `hash` procedure |
17:43:18 | FromDiscord | <π§ππ’> ah |
17:43:25 | FromDiscord | <π§ππ’> and i assume bc its a reference type it panics? |
17:43:28 | FromDiscord | <noow> so, defining the hash procedure makes the error disappear? |
17:44:06 | PMunch | Yup |
17:44:24 | PMunch | Yes it's because it's a reference type |
17:44:44 | FromDiscord | <noow> In reply to @π§ππ’ "and i assume bc": yes, it's ambiguous whether you want to index by the contents or the specific instance of the object |
17:44:52 | PMunch | The thing is that when you have a reference type, its ambiguous if the key is the data in the object, or the reference itself |
17:44:59 | PMunch | Haha, exactly |
17:45:19 | FromDiscord | <noow> i think most languages would just assume you want to reference by the pointer value of the reference |
17:45:32 | FromDiscord | <noow> unless the hash is defined |
17:47:05 | PMunch | It's easy enough to write a hash procedure which does that |
17:49:08 | PMunch | You also need to supply a `==` procedure though |
17:49:15 | PMunch | Because of how tables work |
17:51:55 | PMunch | If you run this example and look at the output it might be a bit more clear what's going on: https://play.nim-lang.org/#ix=3FmV |
17:52:53 | PMunch | There you can see that I still use a ref object as a key, but I implement `hash` and `==` to work on the underlying objects |
17:53:20 | PMunch | And running them you can see when they are called |
17:53:49 | PMunch | A Table in Nim is what's called a hash table |
17:54:18 | PMunch | It is essentially backed by a seq[seq[tuple(key, value)]] |
17:54:59 | PMunch | Oh wait, it's actually just a seq[tuple(key, value)] |
17:55:20 | FromDiscord | <noow> by the way what's the fastest way of initializing objects that are ref, but the type is not ref |
17:55:35 | PMunch | What do you mean? |
17:56:36 | FromDiscord | <noow> sent a code paste, see https://play.nim-lang.org/#ix=3FmX |
17:56:42 | PMunch | Anyways, imagine the underlying sequence is 10 elements long. We insert one element by hashing the key (turning it into a number by some clever algorithm) and then putting it in position `hash(key) mod 10` in our sequence |
17:56:43 | FromDiscord | <noow> (yes this also needs a hash function defined btw) |
17:57:34 | PMunch | But since this will cause collisions if two hashes mod 10 yields the same number it needs to actually store and compare the keys as well. |
17:58:01 | PMunch | Well, technically it only needs to compare the hashes to be reasonably sure |
17:58:26 | FromDiscord | <noow> i wonder how often do hash collisions occur and break critical systems |
17:58:45 | PMunch | Hmm, I'd say it's pretty rare |
18:00:00 | FromDiscord | <noow> is it too expensive to also compare the values |
18:00:22 | PMunch | I think you can do: var a = new(MyObject) |
18:00:30 | PMunch | Well, depends on your key |
18:00:38 | PMunch | Nim seems to compare the actual keys |
18:00:55 | FromDiscord | <noow> oh wait i meant the keys |
18:01:00 | FromDiscord | <noow> compare the actual keys |
18:01:24 | PMunch | Yeah, that's what I read it as :P |
18:01:33 | PMunch | Obviously you wouldn't know the value already |
18:02:15 | FromDiscord | <noow> about the shorthand, so no short hand for the whole thing, including the code and modifiers? π¦ |
18:02:41 | FromDiscord | <noow> i guess i can always define a template |
18:03:18 | PMunch | Yeah.. |
18:03:37 | PMunch | Or just define a type `MyObjectRef = ref MyObject` |
18:04:32 | PMunch | Like so: https://play.nim-lang.org/#ix=3Fn4 |
18:07:25 | FromDiscord | <haxscramper> TIL i learned we have a proper logs of all nim rooms after bridging to matrix https://view.matrix.org/?query=%23nim |
18:16:13 | * | elph joined #nim |
18:18:29 | * | lumo_e joined #nim |
18:29:00 | * | vicecea quit (Remote host closed the connection) |
18:29:35 | * | vicecea joined #nim |
18:53:44 | * | terminalpusher joined #nim |
19:00:11 | * | lumo_e quit (Remote host closed the connection) |
19:00:24 | NimEventer | New thread by Serge: What is the directory assumed for C include files and C libraries location for Him?, see https://forum.nim-lang.org/t/8639 |
19:02:30 | FromDiscord | <dom96> In reply to @haxscramper "TIL i learned we": cool, too bad there is no trivial way to go back to a certain date |
19:08:06 | * | xet7 joined #nim |
20:08:51 | * | src joined #nim |
20:21:05 | FromDiscord | <hmmm> what's our brypt like reference lib? |
20:21:13 | FromDiscord | <hmmm> bcrypt |
20:21:54 | FromDiscord | <hmmm> I found easybcrypt from a dude with a spiffy anime avatar so I'm strongly considering it π€ |
20:23:15 | FromDiscord | <hmmm> it is known that people that favor anime avatars are supreme coders π |
20:32:16 | * | terminalpusher quit (Remote host closed the connection) |
20:32:38 | * | terminalpusher joined #nim |
20:48:22 | * | terminalpusher quit (Remote host closed the connection) |
20:49:23 | FromDiscord | <NullCode1337> yes |
20:49:35 | FromDiscord | <NullCode1337> except i don't have an anime avatar |
20:49:39 | FromDiscord | <NullCode1337> so I'm not supreme :( |
21:00:38 | FromDiscord | <hmmm> reporting back from the trenches: 1) "easybcrypt" doesn't run the first line given in the tutorial, it was made 8 years ago and the spiffy anime author doesn't list it anymore on his github b) "bcrypt" crash and burns at the tutorial stage too. 8year old too. c) nimcrypt, fresh as a flower, 20 day old lib, works as advertised no fuss |
21:01:21 | FromDiscord | <hmmm> we should clean some result from nimble.directory, or just order them by date |
21:02:22 | * | vicfred joined #nim |
21:05:30 | PMunch | @hmmm, aaw I'm not a supreme coder :( |
21:19:11 | FromDiscord | <NullCode1337> In reply to @hmmm "we should clean some": order from date good ide |
21:19:13 | FromDiscord | <NullCode1337> (edit) "ide" => "ideq" |
21:19:17 | FromDiscord | <NullCode1337> (edit) "ideq" => "idea" |
21:19:27 | FromDiscord | <NullCode1337> In reply to @PMunch "<@887269570765791243>, aaw I'm not": ikr :( |
21:19:44 | FromDiscord | <ynfle (ynfle)> Date of what? |
21:20:12 | FromDiscord | <NullCode1337> when the nimble package was last updated |
21:20:30 | FromDiscord | <NullCode1337> https://github.com/nim-lang/nimble/issues/944 |
21:20:38 | FromDiscord | <NullCode1337> nobody cared about this issue |
21:20:39 | FromDiscord | <NullCode1337> bruh |
21:20:56 | NimEventer | New thread by Matkuki: Pygments Nim lexer update?, see https://forum.nim-lang.org/t/8640 |
21:28:23 | * | src_ joined #nim |
21:31:18 | * | src_ quit (Client Quit) |
21:31:31 | * | src_ joined #nim |
21:31:48 | * | src quit (Ping timeout: 256 seconds) |
21:54:45 | FromDiscord | <hmmm> Error: unhandled exception: Unsupported algorithm [Defect] |
21:54:48 | FromDiscord | <hmmm> hmm? |
21:54:54 | FromDiscord | <hmmm> what is this π€ |
21:55:23 | PMunch | You're trying to do something unsupported |
21:55:39 | FromDiscord | <hmmm> hmmmmmmmmm |
21:56:02 | FromDiscord | <Elegantbeef> I've never seen a plain defect raised before π |
21:59:15 | PMunch | Lazy person not creating a custom exception :P |
21:59:21 | PMunch | Well, maybe they didn't need one |
22:01:57 | FromDiscord | <hmmm> found the Defect |
22:02:14 | FromDiscord | <hmmm> why these kind of errors aren't even remotely close to the issue at hand? |
22:03:37 | FromDiscord | <hmmm> if I had SpaceX money I would fund someone to fix type errors too. Like a) do not spam me 200 lines of garbage and b) tell me exactly what is happening |
22:03:49 | FromDiscord | <Elegantbeef> Well that's what i try to fix |
22:03:53 | FromDiscord | <hmmm> DUDE |
22:03:58 | FromDiscord | <hmmm> :nim1: |
22:04:02 | FromDiscord | <hmmm> good luck my man |
22:04:15 | FromDiscord | <Elegantbeef> But what's the issue here? |
22:04:32 | FromDiscord | <hmmm> the issue was the author forgot to add a $ in his tutorial examples lol |
22:07:02 | * | src_ quit (Quit: Leaving) |
22:11:20 | FromDiscord | <machineko> Hey guys can someone share working debbuger config files for vscode (preferable using CodeLLDB)? |
22:15:40 | FromDiscord | <Elegantbeef> https://github.com/saem/vscode-nim#debugging |
22:21:23 | * | src joined #nim |
22:33:38 | * | advesperacit_ quit (Quit: advesperacit_) |
22:33:43 | * | PMunch quit (Quit: leaving) |
22:52:50 | FromDiscord | <wizardlink> Good evening! What constant should I be looking for to check on compile time whether it's a debug or release build? |
22:53:27 | FromDiscord | <wizardlink> Looked around in the docs but couldn't easily find it, nor found it here so I'm starting to doubt there is. |
22:53:28 | FromDiscord | <wizardlink> :NPCSteampunkerSweat: |
22:53:30 | FromDiscord | <Elegantbeef> `when defined(debug)` or `when defined(release)` |
22:53:47 | FromDiscord | <wizardlink> I see, is that documented by the way? |
22:53:51 | FromDiscord | <wizardlink> So I know where to look for next time. |
22:53:53 | FromDiscord | <Elegantbeef> you can also just do `const isRelease = defined(release)` then do `when isRelease` |
22:54:40 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimc.html#compiler-usage-compileminustime-symbols |
22:55:31 | FromDiscord | <wizardlink> ~~Alright, the `-d` flag makes more sense now.~~ |
22:55:39 | FromDiscord | <wizardlink> Quite new to the language, so this was confusing. |
22:55:46 | FromDiscord | <wizardlink> Thank you for the help! Cheers. |
22:55:54 | FromDiscord | <wizardlink> <a:a_karenWave:550042627878289423> |
22:56:06 | FromDiscord | <Elegantbeef> No problem |
23:04:10 | * | stkrdknmibalz quit (Ping timeout: 256 seconds) |
23:37:42 | FromDiscord | <sharpcdf> sent a code paste, see https://play.nim-lang.org/#ix=3FoV |
23:37:55 | FromDiscord | <sharpcdf> also just tried discarding it instead of sending it to a var |
23:39:24 | FromDiscord | <sharpcdf> (edit) "https://play.nim-lang.org/#ix=3FoV" => "https://play.nim-lang.org/#ix=3FoW" |
23:39:30 | FromDiscord | <sealmove> I think you need to configure buffering or something |
23:40:15 | FromDiscord | <sharpcdf> In reply to @ΰΈ£ΡΰΈΙΰΉΰΉΧ©Ρ "I think you need": how would i do that |
23:40:53 | FromDiscord | <sharpcdf> wait nevermind, it was just an error lol |
23:40:59 | FromDiscord | <sharpcdf> forgot to compile with ssl |
23:41:18 | * | qwr joined #nim |
23:41:49 | FromDiscord | <sealmove> setStdIoUnbuffered() |
23:41:53 | NimEventer | New thread by Icedquinn: TLS protocol negociation (TLS-ALPN), see https://forum.nim-lang.org/t/8641 |
23:42:56 | FromDiscord | <sealmove> Is there a hack for having a variable that can hold any type at runtime? |
23:46:01 | FromDiscord | <Elegantbeef> You can look at union for a subset, but nim is not dynamically typed so `pointer` is probably the only way |
23:54:52 | FromDiscord | <sharpcdf> how can i find html through its id? (like `findAll` but id instead of element) |
23:55:46 | FromDiscord | <Elegantbeef> Iterate over all nodes checking if `yourNode.attr("id") != ""` |
23:56:08 | FromDiscord | <sharpcdf> alright, thanks |
23:56:20 | FromDiscord | <Elegantbeef> I think there is a better query library |