00:12:21 | FromDiscord | <evoalg> In reply to @hmmm "I have the photo": Does your lover know about this? |
00:15:37 | * | noeontheend quit (Ping timeout: 240 seconds) |
00:17:00 | FromDiscord | <hmmm> In reply to @evoalg "Does your lover know": of course! I'll show you her in #offtopic |
00:21:32 | FromDiscord | <evoalg> In reply to @IsaacPaul "use a consistent naming": I use that `return` for early exit in proc's all the time (if I'm understanding what you're saying correctly) as I don't like lots of nesting, but I've been told by some of the guru's that it's not recommended, and that I should use the built in result, and also only have one exit point so that the compiler can optimize it more easily ... or something like that ... but I still like to be |
00:23:51 | FromDiscord | <IsaacPaul> I always prioritize readability over optimization |
00:24:40 | FromDiscord | <IsaacPaul> Also that information could easily be outdated or become outdated |
00:25:21 | FromDiscord | <congusbongus> I have not heard of single exit point being more optimal before; sounds like out-of-date info from when compilers/processors were much less smart |
00:26:30 | FromDiscord | <congusbongus> it is less readable however if you have random exits scattered throughout the function, but you can avoid that by placing early exits at the start, or having sensible helper functions |
00:29:16 | FromDiscord | <Elegantbeef> Shun evo shun evo!↵(@evoalg) |
00:30:10 | FromDiscord | <evoalg> I know, I'm naughty and I have no guilt 😉 |
00:31:59 | FromDiscord | <Elegantbeef> Uhhh do i start calling you an aussie until you change your ways? |
00:32:22 | FromDiscord | <evoalg> I repent, I repent |
00:33:33 | FromDiscord | <hmmm> Beefy~sama, I found one of your creations in the forum with a handy arrow to expand a seq in a proc call |
00:34:13 | FromDiscord | <evoalg> it's as bad as me asking you where abouts in the US you are, as you all sound the same to me 😉 ... except when you say "out" |
00:34:27 | FromDiscord | <Elegantbeef> Or when i say sorry |
00:34:32 | FromDiscord | <evoalg> LOL |
00:34:44 | FromDiscord | <hmmm> it worked in a test example but it died in the place where I wanted to use it 😦 |
00:34:49 | FromDiscord | <Elegantbeef> Those dumb yanks tend to say sau-ri instead of sore-y |
00:34:57 | FromDiscord | <hmmm> such is life 🤔 |
00:35:17 | FromDiscord | <Elegantbeef> Eh it was probably an example not a proper use case |
00:35:41 | FromDiscord | <hmmm> yea it I used like a blackbox, no idea on how it worked |
00:39:10 | FromDiscord | <Elegantbeef> Macros arent overly complicated so i beliieve in you |
00:39:14 | FromDiscord | <Elegantbeef> What're you trying to do anyway? |
00:41:01 | * | lumo_e quit (Read error: Connection reset by peer) |
00:41:11 | * | lumo_e joined #nim |
00:45:25 | FromDiscord | <hmmm> hmmm feeding a variable number of question marks to a prepared sql statement proc was my latest understanding of what I was doing lol |
00:46:25 | FromDiscord | <hmmm> I think I was doing it because normal exec inserts were too slow but I'm now not so sure |
00:47:19 | FromDiscord | <Elegantbeef> If only one could profile code! |
00:47:33 | FromDiscord | <hmmm> haha but that would be cheating 😃 |
00:48:02 | FromDiscord | <Elegantbeef> Yea it'd show you where the slowdown was |
00:48:41 | FromDiscord | <hmmm> ok next time 4 sure, I'm going to sleep now, happy coding beefy |
00:54:03 | * | dtomato quit (Ping timeout: 256 seconds) |
00:55:07 | FromDiscord | <evoalg> I want to know how much mem some vars are taking, but when I do, eg, `sizeof("f")` it saying it's 16, and when I do `sizeof("foo")` it still says 16, so I guess sizeof isn't what I'm after? |
00:57:42 | FromDiscord | <Elegantbeef> I mean it is it's telling you the `sizeof(string)` which is `16` |
00:58:06 | FromDiscord | <evoalg> but wouldn't longer strings take more? |
00:58:34 | FromDiscord | <evoalg> oh I think I see what you mean |
00:58:47 | FromDiscord | <Elegantbeef> The type `string` is 16 bytes large |
00:59:02 | FromDiscord | <evoalg> then for "foo" do I times by 3? |
00:59:03 | FromDiscord | <Elegantbeef> If you want to see the size the string takes overall you use \`len |
01:00:07 | FromDiscord | <evoalg> `sizeof(string) "foo".len` ? |
01:00:30 | FromDiscord | <Elegantbeef> No |
01:00:53 | FromDiscord | <Elegantbeef> `"foo".len` tells you the amount of data, so it'd be `"foo".len + sizeof(string)` for the total memory usage |
01:01:07 | FromDiscord | <Elegantbeef> and it'd actually be different since `len` isnt the capacity |
01:01:07 | FromDiscord | <evoalg> ohhhhhh! |
01:02:07 | FromDiscord | <Elegantbeef> You cannot get how much a variable occupies unless the type exposes it/you know how it works |
01:04:19 | FromDiscord | <evoalg> ok ... so if I write a small program using bitty and another one that uses bool's, I could do some calculations to see how much I'm saving ... but how would I see how much mem each executable is using? Is it easy? |
01:04:45 | FromDiscord | <evoalg> I don't need this, just being curious |
01:05:14 | FromDiscord | <Elegantbeef> `/usr/bin/time -v youProgram` iirc does show memory usage |
01:15:11 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
01:18:10 | FromDiscord | <creikey> sent a code paste, see https://play.nim-lang.org/#ix=3KVf |
01:18:15 | FromDiscord | <creikey> (edit) "https://play.nim-lang.org/#ix=3KVf" => "https://paste.rs/Dy7" |
01:19:48 | * | Gustavo6046 joined #nim |
01:19:55 | FromDiscord | <exelotl> It should be allowed |
01:20:35 | FromDiscord | <exelotl> Oh, maybe because staticRead has to occur in a static context? |
01:21:16 | FromDiscord | <creikey> In reply to @exelotl "Oh, maybe because staticRead": this is the error yeah |
01:22:30 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3KVh |
01:23:27 | FromDiscord | <Elegantbeef> Does `echotest( (const s = staticRead(); s))` work? |
01:23:49 | FromDiscord | <exelotl> It should do |
01:23:53 | * | krux02 quit (Remote host closed the connection) |
01:23:53 | FromDiscord | <creikey> In reply to @exelotl "So you'd have to": is there like a static string I can specify as the parameter for overloading |
01:23:57 | * | lumo_e quit (Quit: Quit) |
01:24:13 | FromDiscord | <Elegantbeef> yes |
01:24:15 | FromDiscord | <creikey> lol yeah what |
01:24:19 | FromDiscord | <Elegantbeef> `text: static string` |
01:24:25 | FromDiscord | <creikey> sent a code paste, see https://play.nim-lang.org/#ix=3KVi |
01:24:25 | FromDiscord | <Elegantbeef> It's legitmately what you asked 😀 |
01:24:49 | FromDiscord | <Elegantbeef> no real point making a template imo, but you do you |
01:25:24 | FromDiscord | <exelotl> If you wanted to allow both static and non-static, maybe `proc echoText(text: string|static[string])` would work? |
01:25:38 | FromDiscord | <Elegantbeef> It would |
01:26:10 | FromDiscord | <creikey> In reply to @Elegantbeef "no real point making": I have no idea what's going on here |
01:26:12 | FromDiscord | <Elegantbeef> Worth noting that `static T` turns it into a generic procedure |
01:26:23 | FromDiscord | <creikey> In reply to @exelotl "If you wanted to": you can or types like that?? so cool |
01:26:40 | FromDiscord | <Elegantbeef> Dont join the `|` club |
01:26:44 | FromDiscord | <Elegantbeef> 😛 |
01:26:51 | FromDiscord | <creikey> does static[string] like upgrade to string |
01:27:21 | FromDiscord | <Elegantbeef> `static T` is an implicit generic and all uses of that parameter are replaced with the constant |
01:27:24 | FromDiscord | <creikey> so like if just static[string] is taken as a parameter can it also take string |
01:27:50 | FromDiscord | <Elegantbeef> No `static string` is forced at compile time to be from static |
01:27:59 | FromDiscord | <exelotl> Static means the value is known at compile time |
01:28:16 | FromDiscord | <creikey> I see |
01:28:26 | FromDiscord | <creikey> and strings are like dynamically resizable and mutable in nim right |
01:28:38 | FromDiscord | <Elegantbeef> Yes |
01:28:43 | FromDiscord | <creikey> so that's why |
01:29:02 | FromDiscord | <Elegantbeef> `static string` are constants at runtime |
01:30:26 | FromDiscord | <exelotl> In reply to @creikey "and strings are like": Yes but only if its a `var` variable or `var` parameter |
01:35:28 | FromDiscord | <creikey> In reply to @exelotl "Yes but only if": so if it's not a var string parameter can't it be assumed that static strings be safely passed to a function? |
01:35:37 | FromDiscord | <creikey> what can a `string` parameter do that a `static[string]` parameter can't |
01:36:18 | FromDiscord | <Elegantbeef> I mean static string can be passed to string |
01:36:20 | FromDiscord | <Elegantbeef> That's not the issue |
01:37:28 | FromDiscord | <Elegantbeef> The issue is that `staticRead` needs a compile time environment to run and it doesnt have that when you call it inside a call |
01:38:09 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KVn |
01:40:02 | FromDiscord | <exelotl> I find the error surprising tbh. Like why can't it just be equivalent to your `(const c = staticRead(...); c)` |
01:41:21 | FromDiscord | <evoalg> don't confuse me ... yesterday I was told that `let` is evaluated at runtime not compiletime |
01:41:33 | FromDiscord | <Elegantbeef> It is |
01:41:59 | FromDiscord | <Elegantbeef> Well i mean exelotl the proc is annotated `{.compiletime.}` so implicit usage of it is bad im |
01:42:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KVo |
01:42:39 | FromDiscord | <Elegantbeef> Since it's not forced to run at CT |
01:44:17 | FromDiscord | <Elegantbeef> The benefit of using a proc over a template here is if you read the file multiple times only a single constant is in the program |
01:46:29 | FromDiscord | <creikey> Is there a way to construct explicitly typed array literals, like `array[int64]([1, 2, 3, 4])` or something |
01:47:05 | FromDiscord | <Elegantbeef> `[1i64, 2, 3, 4]` |
01:49:39 | FromDiscord | <creikey> In reply to @Elegantbeef "`[1i64, 2, 3, 4]`": thanks that's cool that that works |
01:56:07 | FromDiscord | <evoalg> In reply to @Elegantbeef "Dont join the `|`": why isn't this such a good idea? |
01:56:22 | FromDiscord | <Elegantbeef> It's fine it's up to what you prefer |
01:56:24 | FromDiscord | <Elegantbeef> I prefer `x or y` |
01:56:48 | FromDiscord | <evoalg> oh yea ... that's nicer imo |
02:03:41 | * | Lord_Nightmare quit (Ping timeout: 245 seconds) |
02:24:25 | FromDiscord | <Gorylek😚> Hello |
02:24:28 | FromDiscord | <Gorylek😚> Im new |
02:26:57 | FromDiscord | <Elegantbeef> Hello |
02:33:58 | * | neurocyte0 joined #nim |
02:35:57 | * | neurocyte quit (Ping timeout: 240 seconds) |
02:35:57 | * | neurocyte0 is now known as neurocyte |
02:37:24 | FromDiscord | <huantian> hello o/ |
02:47:44 | FromDiscord | <Rika> hello new |
03:13:38 | * | arkurious quit (Quit: Leaving) |
03:21:42 | FromDiscord | <sOkam!> In reply to @Elegantbeef "I prefer `x or": or prefer `x | y` |
03:22:04 | FromDiscord | <sOkam!> hope you get the silly joke, otherwise its gonna look confusing 🙈 |
03:41:31 | FromDiscord | <huantian> is there something similar to python's asyncio gather for running a bunch of async functions concurrently?↵Ideally with a max currenency |
03:45:40 | FromDiscord | <Rika> In reply to @huantian "is there something similar": “all”? In asyncdispatch I think |
03:47:17 | FromDiscord | <huantian> I see all in asyncfutures |
03:47:31 | FromDiscord | <huantian> but not sure if that's concurrent? |
03:48:32 | FromDiscord | <huantian> I think it is? |
03:49:04 | FromDiscord | <huantian> wait futures "start" happening as soon as they're made not when they're awaited so ig it is |
03:53:00 | FromDiscord | <Rika> as soon as theyre made until the first yield |
04:10:25 | * | noeontheend joined #nim |
04:29:59 | * | rockcavera quit (Remote host closed the connection) |
04:47:40 | FromDiscord | <creikey> is nim js gonna be abandoned for its C backend -> webassembly? |
04:59:51 | FromDiscord | <Rika> Probably not? |
05:45:12 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3KWp |
05:45:29 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix= |
05:47:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KWr |
05:47:47 | FromDiscord | <Hamid_Bluri> thanks beef |
05:47:54 | FromDiscord | <Hamid_Bluri> you're my hero : D |
05:48:05 | FromDiscord | <Elegantbeef> Worth noting though that'll work on all arrays 😀 |
05:48:14 | FromDiscord | <Elegantbeef> since arrays implicitly get a range as their first generic parameter |
05:48:17 | FromDiscord | <Hamid_Bluri> good |
05:48:35 | FromDiscord | <Elegantbeef> You dont really need a constraint |
05:48:40 | FromDiscord | <Hamid_Bluri> why |
05:48:50 | FromDiscord | <Elegantbeef> `[idx, T]` would work just fine |
05:48:55 | FromDiscord | <Elegantbeef> Cause array already is constrained |
05:49:07 | FromDiscord | <Hamid_Bluri> you're right |
06:05:43 | * | perro_ quit (Ping timeout: 256 seconds) |
06:29:48 | * | perro_ joined #nim |
06:47:57 | * | noeontheend quit (Ping timeout: 240 seconds) |
07:04:37 | NimEventer | New thread by Oyster: 2 questions on json mudule, see https://forum.nim-lang.org/t/8768 |
07:05:35 | PMunch | Hmm, it would be nice to have a block pragma. It would be able to attach to tings that already create a scope, like if, when, for, etc. and name the block so it could be broken out of |
07:07:48 | FromDiscord | <Elegantbeef> I feel like there isnt an ergonomic way of doing that |
07:09:10 | PMunch | I was thinking something like this: https://play.nim-lang.org/#ix=3KWN |
07:09:38 | FromDiscord | <Elegantbeef> I rest my case 😛 |
07:11:02 | FromDiscord | <Elegantbeef> I'd say since they already create scope perhaps `break if` that goes up to the first `if` it encounters |
07:11:43 | PMunch | Well sure, but I'm basically trying to early-return from something that isn't a proc |
07:12:03 | PMunch | And I don't want to indent my code an extra level to have a block there |
07:12:41 | FromDiscord | <Elegantbeef> Hmmm can i see code? |
07:13:35 | FromDiscord | <Elegantbeef> Clearly it should be `if(scopeLabel) condition` |
07:14:24 | PMunch | I was able to do something similar with a template `blockIf` |
07:14:47 | PMunch | Which looks like this: http://ix.io/3KWP |
07:15:30 | PMunch | And the code then looks like this: http://ix.io/3KWQ |
07:16:20 | PMunch | I agree that `if(scopeLabel) condition` would look better though |
07:16:40 | PMunch | But I don't think that could be done with a macro.. |
07:17:31 | FromDiscord | <Elegantbeef> No it cannot |
07:18:04 | PMunch | And my template solution will only work for the things I would write a block-variant of |
07:18:12 | PMunch | And it can't work for e.g. else |
07:19:24 | PMunch | Unfortunately I can't simply add a `block X:` on the same line because it complains about requiring indentation |
07:19:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KWS |
07:19:39 | FromDiscord | <Elegantbeef> I mean you could if you abused stmtlists |
07:19:52 | PMunch | Could you though? |
07:20:10 | PMunch | How would you be able to grab the following scope? |
07:20:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KWU |
07:20:45 | FromDiscord | <Elegantbeef> That works |
07:23:11 | PMunch | Hmm, that's true.. |
07:24:02 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3KWV |
07:24:14 | PMunch | Maybe what we need is a "treat this as indented one level further" operator |
07:24:16 | FromDiscord | <geekrelief> I think the issue is the double for block and body for if |
07:24:32 | FromDiscord | <geekrelief> you need the parens to separate them |
07:24:33 | PMunch | e.g. https://play.nim-lang.org/#ix=3KWW |
07:25:19 | FromDiscord | <Elegantbeef> Well geek yours doesnt work for `if elif` |
07:27:41 | FromDiscord | <geekrelief> In reply to @Elegantbeef "Well geek yours doesnt": What do you mean? |
07:27:42 | FromDiscord | <geekrelief> https://play.nim-lang.org/#ix=3KWX |
07:28:13 | FromDiscord | <Elegantbeef> I meant if you wanted a named branch for each `if`/`elif` |
07:30:29 | FromDiscord | <geekrelief> do you have an example? |
07:30:41 | NimEventer | New thread by GordonBGood: Anyone written an Android app using Nim-generated Native code lately?, see https://forum.nim-lang.org/t/8769 |
07:30:58 | FromDiscord | <yallxe> how can i pass `size` as a mutable var into buffer.read()? https://media.discordapp.net/attachments/371759389889003532/927826424881090610/unknown.png |
07:31:27 | FromDiscord | <yallxe> the issue is that buffer.read() accepts `var T` only |
07:31:49 | FromDiscord | <yallxe> but mine isn't var and how do i just create a copy of size and make it var? |
07:34:34 | PMunch | var varSize = size; buffer.read(varSize) |
07:49:19 | PMunch | Hmm, anyone know how to cross compile to rasperry pi? |
07:49:47 | FromDiscord | <Elegantbeef> If it's a pico yes 😛 |
07:51:09 | PMunch | It can't be easier to cross-compile for a Pico :P |
07:51:19 | PMunch | I know I've done this before, I just don't remember how |
07:52:32 | * | jjido joined #nim |
07:58:16 | FromDiscord | <impbox [ftsf]> PMunch, I think i had most luck just doing it on device |
07:58:32 | FromDiscord | <impbox [ftsf]> what are you cross compiling from? |
07:59:41 | PMunch | A normal Linux machine |
08:00:01 | PMunch | Arch based if it matters |
08:00:25 | FromDiscord | <impbox [ftsf]> encountering issues? |
08:01:30 | PMunch | Haven't tried anything yet |
08:16:09 | * | dtomato joined #nim |
08:17:41 | * | Gustavo6046 quit (Quit: Leaving) |
08:21:57 | * | vicecea quit (Remote host closed the connection) |
08:22:27 | * | vicecea joined #nim |
08:42:00 | * | dtomato quit (Read error: Connection reset by peer) |
08:42:14 | * | dtomato joined #nim |
08:46:45 | FromDiscord | <Isofruit> I kinda wish nim had interfaces right now |
08:47:03 | PMunch | What problem are you trying to solve? |
08:47:36 | FromDiscord | <Isofruit> This is more a design question than anything.↵I'm currently having a small discussion with the beautiful person that maintains norm (which I'm really liking so far) |
08:47:40 | PMunch | Hmm, for some reason pakku isn't able to find an AUR library.. |
08:48:11 | FromDiscord | <Isofruit> They have an object "Model" and something like "ReadOnlyModel" is about to be added (And chances are in the future something like "View" will also be added) |
08:48:49 | FromDiscord | <Isofruit> (edit) ""View"" => ""ViewModels"" |
08:48:52 | FromDiscord | <Isofruit> Models are supposed to have full CRUD functionality on the database, ReadOnlyModel should, well, only Read.↵ViewModels should also have full CRUD functionality |
08:49:52 | FromDiscord | <Isofruit> You could inherit `Model = ref type of ReadOnlyModel`, but the naming doesn't suit that since ReadOnlyModel, by its name, would make more intuitive sense that it inherits from Model |
08:50:40 | FromDiscord | <Isofruit> When all you'd really want is for the select/update/delete/insert methods to check at compile time "Does this object have the ability to select/update/delete/insert" |
08:50:59 | FromDiscord | <Elegantbeef> So concepts |
08:53:38 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:54:30 | PMunch | Is it just me, or are descriptions on YouTube videos in the browser broken? |
08:54:44 | PMunch | They seem to only have a small part of them shown, with no expand button.. |
09:04:03 | FromDiscord | <Clonkk> Can a macro argument be used in a const expression ? |
09:04:37 | FromDiscord | <Elegantbeef> I dont think so, but i think it should |
09:04:55 | FromDiscord | <Clonkk> That'd be useful |
09:05:41 | FromDiscord | <Elegantbeef> Indeed |
09:06:38 | PMunch | What do you mean @Clonkk? |
09:07:17 | FromDiscord | <Elegantbeef> Doing something like `macro doThing(a: static int) = var a: array[a, int]` i think |
09:12:12 | FromDiscord | <Clonkk> For example↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
09:12:44 | FromDiscord | <Clonkk> `macro loadRessources(dirname: static string) = const res = staticExec("ls " & " dirname)` |
09:12:55 | FromDiscord | <Clonkk> To embed ressources in a binary at compile time |
09:13:17 | FromDiscord | <Clonkk> For a single file it's easy enough, but recursing through a directory at compile times proves annoying |
09:16:17 | FromDiscord | <Clonkk> Ultimately I want to call `staticRead` on the result |
09:16:53 | FromDiscord | <Elegantbeef> You can make a proc that does as such |
09:17:44 | FromDiscord | <Clonkk> A proc that iterate through directory at compile-time from a static string ? |
09:18:02 | FromDiscord | <Clonkk> The ressources are needed during run time |
09:18:59 | FromDiscord | <Elegantbeef> Ah nvm you have to do it with the macro output |
09:24:45 | PMunch | I do something similar in my autotemplates thingy: https://github.com/PMunch/autotemplate/blob/master/src/autotemplates.nim#L10 |
09:25:45 | PMunch | There you can see the `const rawIdent = content` thing which is the raw content of the file |
09:25:52 | FromDiscord | <Solitude> In reply to @PMunch "Hmm, for some reason": pakku is abandoned and broken, is it not? |
09:26:05 | PMunch | Has been working fine up until now |
09:53:32 | FromDiscord | <SirOlaf> Has the net module broken on latest devel? |
09:53:59 | FromDiscord | <Elegantbeef> More information is needed |
09:55:05 | FromDiscord | <SirOlaf> sent a code paste, see https://paste.rs/82d |
09:59:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3KXy |
09:59:40 | FromDiscord | <Elegantbeef> Oh latest devel |
09:59:49 | FromDiscord | <Elegantbeef> I'm blind |
10:00:23 | FromDiscord | <Elegantbeef> Yep you're right |
10:00:40 | FromDiscord | <SirOlaf> That's not great to say the least |
10:03:46 | FromDiscord | <Elegantbeef> Indeed |
10:03:52 | FromDiscord | <Elegantbeef> Atleast it hasnt been changed much so shouldnt be hard to find what caused it |
10:04:00 | FromDiscord | <Rika> It’s devel, I wouldn’t rely on it |
10:04:16 | FromDiscord | <Elegantbeef> Yea devel isnt supposed to be stable 😛 |
10:05:24 | FromDiscord | <SirOlaf> Of course not, I just like switching things around for more excitement sometimes |
10:05:50 | FromDiscord | <Rika> Well congrats on getting that excitement |
10:23:33 | FromDiscord | <Isofruit> Are gifs allowed to be posted in this channel? |
10:24:52 | PMunch | As long as they're on topic, sure |
10:25:08 | FromDiscord | <Isofruit> In reply to @SirOlaf "Of course not, I": https://tenor.com/view/austin-powers-dangerously-gif-20939086 |
10:25:35 | FromDiscord | <Isofruit> ... The fact this isn't resolving into the gif properly makes me sad, but the URL name at least tells what it is |
10:25:40 | FromDiscord | <Solitude> dont click, its a virus |
10:26:42 | FromDiscord | <Isofruit> I'm not sure if this is a joke or if tenor is known for spreading virusses and I'm not aware |
10:27:40 | FromDiscord | <Isofruit> Changed the URL to the proper URL to the gif... which also doesn't resolve+ |
10:27:48 | FromDiscord | <Isofruit> (edit) "resolve+" => "resolve. Oh well" |
10:28:03 | PMunch | Ironically the gif works on IRC :P |
10:28:22 | FromDiscord | <Isofruit> IRC > Discord ! I knew it! |
10:28:36 | PMunch | Huh? |
10:29:41 | FromDiscord | <SirOlaf> https://github.com/nim-lang/Nim/commit/4b5cecd902cc4126ff9d6cda9edb78a13a421239 This commit killed me |
10:29:45 | FromDiscord | <Isofruit> Ah, I was just trying to be funny, stating IRC is superior to discord solely because of the gif thing. |
10:29:56 | FromDiscord | <SirOlaf> In reply to @SirOlaf "https://github.com/nim-lang/Nim/commit/4b5cecd902cc": Compiled the compiler with the commit right before and then this one |
10:30:46 | PMunch | Ah, you actually used > as greater than and not an arrow :P |
10:43:17 | FromDiscord | <hmmm> apparently if you wrap your sqlite calls in transactions you go from 85 insertions per second to 23000 ips |
10:43:30 | FromDiscord | <hmmm> software is mysterious 🤔 |
10:44:55 | FromDiscord | <Isofruit> Makes sense to me |
10:51:20 | FromDiscord | <SirOlaf> sent a code paste, see https://paste.rs/mfQ |
10:51:25 | FromDiscord | <SirOlaf> Was there a change with how . casts are handled or something |
10:51:51 | FromDiscord | <SirOlaf> Or is this related to the fact that it is untyped |
10:54:09 | FromDiscord | <Yardanico> In reply to @SirOlaf "So, on my devel": It's better if you open an issue anyway, as it might be a real problem with that PR |
10:54:26 | FromDiscord | <Elegantbeef> Probably untyped issue `SockLen(sizeof(sockaddress))` is proper |
10:54:54 | FromDiscord | <Elegantbeef> Needs `bind SockLen` before i think |
10:55:21 | FromDiscord | <SirOlaf> You're right, `SockLen(sizeof(sockaddress))` works too |
10:56:42 | FromDiscord | <SirOlaf> In reply to @Yardanico "It's better if you": Would the issue just be incorrect cast syntax in net.nim? |
11:11:14 | * | tinytoas1 joined #nim |
11:12:21 | FromDiscord | <SirOlaf> Opened one. At least this finally gave me an excuse to play with the compiler for a bit |
11:12:56 | * | tinytoast quit (Read error: Connection reset by peer) |
11:45:20 | * | tinytoas1 is now known as tinystoat |
12:37:06 | FromDiscord | <Smarc> In reply to @IsaacPaul "use a consistent naming": I appreciate your insights, but I dont really understand the `if paramCount() > 0:` part .. What exactly is incorrect or bad practice there? |
12:38:48 | * | badsektor joined #nim |
12:38:48 | * | badsektor quit (Client Quit) |
12:42:42 | FromDiscord | <Rika> Having it there |
12:43:57 | FromDiscord | <Smarc> Could you elaborate? |
12:44:20 | FromDiscord | <Rika> I just read your code, I don’t know what he means either |
12:44:54 | FromDiscord | <Rika> Maybe put the when check around the if statement instead of inside the else |
12:49:08 | FromDiscord | <Smarc> hm, guess that makes sense. Thank you |
12:58:11 | FromDiscord | <yallxe> how do I define that field can be `nil` in object? https://media.discordapp.net/attachments/371759389889003532/927908771882233896/unknown.png |
12:58:37 | FromDiscord | <Solitude> do you really need to? `ref whatever` |
12:59:16 | FromDiscord | <yallxe> In reply to @Solitude "do you really need": well yes i do |
13:01:53 | FromDiscord | <hmmm> hey if I have a proc that returns a string and I use a branch to return "false" and check for it in another proc am I committing a grave sin against the gods? Should I use options? 🤔 |
13:03:21 | FromDiscord | <hmmm> options are ugly but checking for false in a string seems ugly too so I am in an ugly / ugly situation |
13:04:18 | FromDiscord | <Yardanico> In reply to @yallxe "well yes i do": if you to check if that type exists or not you can use Option |
13:07:03 | FromDiscord | <planetis> Hmmm either return a tuple string, bool or an empty string if you can |
13:07:53 | FromDiscord | <planetis> Or return a bool and use a var string parameter |
13:09:16 | FromDiscord | <enthus1ast> there was a "better options" or "safer options" in nimble but i cannot find it. |
13:10:41 | FromDiscord | <enthus1ast> ah no, it was PMunch'/nim-optionsutils |
13:11:00 | FromDiscord | <enthus1ast> https://github.com/PMunch/nim-optionsutils |
13:12:25 | FromDiscord | <hmmm> documentation for optionsutils seems broken |
13:12:46 | PMunch | Broken how? |
13:12:59 | FromDiscord | <hmmm> I click the link and there is an empty page |
13:13:15 | PMunch | And @hmmm, any checking against the values of strings for anything but parsing is a sin in my book :P |
13:13:34 | FromDiscord | <Rosen> also dead page for me I think |
13:13:53 | FromDiscord | <hmmm> In reply to @PMunch "And <@887269570765791243>, any checking": haha deep down I thought it was something a good principled boi wouldn't do |
13:14:09 | FromDiscord | <hmmm> so we must find a way that is less painful than options |
13:14:57 | FromDiscord | <enthus1ast> another option is to have a proc like this\: |
13:15:07 | FromDiscord | <hmmm> the tuple idea of planetis is kinda nice, can I do something like return (result : string, check : bool) packed into a tuple? |
13:15:29 | FromDiscord | <enthus1ast> `proc doStuff(myStr: var string): bool =` |
13:15:40 | FromDiscord | <enthus1ast> then if doStuff is true, use the myStr |
13:15:47 | * | rockcavera joined #nim |
13:15:47 | * | rockcavera quit (Changing host) |
13:15:47 | * | rockcavera joined #nim |
13:15:55 | FromDiscord | <enthus1ast> much c like |
13:16:06 | FromDiscord | <hmmm> nu myStr gets calculated inside the proc |
13:16:14 | PMunch | Hmm, seems to be a problem with the nimble directory.. |
13:16:22 | PMunch | You can always generate the docs yourself |
13:16:30 | PMunch | Or just read them as doc-comments on GitHub |
13:16:34 | FromDiscord | <planetis> Just (string, bool) otherwise you're reinventing options |
13:17:10 | PMunch | Isn't (string, bool) already reinventing options? |
13:17:59 | FromDiscord | <hmmm> so the checker proc takes the tuple, checks for the bool and if it's good uses the string? Seems kinda nice, why am I feeling most of the people don't do it this way? |
13:19:59 | PMunch | Because most people uses options, which provides the exact same thing |
13:20:04 | FromDiscord | <enthus1ast> imho the reason is to keep track which proc actually changes the input string |
13:21:12 | FromDiscord | <enthus1ast> this sometimes gets very hairy in a c program |
13:23:17 | FromDiscord | <hmmm> hmm ok it's decided I will use options, I'd like to check if optionsutils shaves off some hassle, how do I check the docs pmunchie? |
13:23:53 | * | jjido joined #nim |
13:24:25 | PMunch | You know that every time you add an e to the end of my nickname I don't get pinged right? If you type it out like it is it's easier for me to notice your message :) |
13:24:43 | PMunch | You can either just read the doc comment here: https://github.com/PMunch/nim-optionsutils/blob/master/src/optionsutils.nim |
13:25:01 | PMunch | Or you can run `nim doc` on that file and open the html output |
13:25:09 | FromDiscord | <hmmm> but I don't want to disturb your big brain 😃 , anyway yea I'm inside the nim file now ty! |
13:35:18 | FromDiscord | <hmmm> 👀 |
13:35:48 | FromDiscord | <hmmm> with optionutlis i can do something like found?.doStuff() and it will do stuff only if it's some? |
13:36:05 | PMunch | Yup, that's the idea |
13:36:13 | FromDiscord | <hmmm> 👀 |
13:36:28 | FromDiscord | <hmmm> this might be the confiest thing ever |
13:36:35 | FromDiscord | <hmmm> brb installing |
13:39:05 | FromDiscord | <hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3KZk |
13:39:16 | FromDiscord | <Yardanico> these warnings have been around since forever |
13:39:29 | FromDiscord | <Yardanico> and not everyone agrees with the directory structure nimble wants your project to have |
13:40:30 | PMunch | I mean this library literally exposes two modules, both which are fine to import separately |
13:40:38 | PMunch | So any other structure wouldn't make sense |
13:49:49 | PMunch | @Solitude, do you know of an AUR wrapper that is actually up to date and working? |
13:54:35 | PMunch | Hmm, apparently I was using pakku-git from AUR, which is a maintained fork |
13:55:02 | PMunch | But for some reason it's not able to find this package https://aur.archlinux.org/packages/arm-linux-gnueabihf-gcc-stage2 |
13:56:29 | * | badsektor joined #nim |
14:05:20 | * | badsektor quit (Quit: Leaving) |
14:18:13 | FromDiscord | <Michal Maršálek> Is it possible to have different definitions for a type based on a generics parameter? I can achieve something similar with a template that returns `typedesc` but is it possible to achieve with the standard type system and the standard `[]`? |
14:20:22 | FromDiscord | <konsumlamm> you can use `when` in your type definition |
14:20:36 | FromDiscord | <Michal Maršálek> How? I tried it |
14:21:03 | FromDiscord | <Michal Maršálek> (edit) "it" => "`type MyType[T:static int] = (when T == 1: int else: array[T,int])`" |
14:21:50 | FromDiscord | <konsumlamm> ah, so you just want a type alias rather than a new type? |
14:21:58 | FromDiscord | <Michal Maršálek> (edit) "How? I tried `type MyType[T:static int] = (when T == 1: int else: array[T,int])`" => "sent a code paste, see https://play.nim-lang.org/#ix=3KZO" |
14:22:21 | FromDiscord | <Michal Maršálek> (edit) "https://play.nim-lang.org/#ix=3KZO" => "https://play.nim-lang.org/#ix=3KZP" |
14:23:39 | FromDiscord | <konsumlamm> not sure what the error for your code means or wether it's intended |
14:23:56 | FromDiscord | <Michal Maršálek> I don't know what the real difference is but semantically it should be a new type... but `distinct` would suffice but it doesn't owkr either |
14:24:09 | FromDiscord | <Michal Maršálek> (edit) removed "but" |
14:24:46 | FromDiscord | <Michal Maršálek> (edit) "owkr" => "work" |
14:25:13 | FromDiscord | <haxscramper> you can't put `when` in the type alias definition, you can only do it using `object` |
14:25:45 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3KZQ |
14:26:25 | FromDiscord | <Michal Maršálek> Is object with a single field more expensive than a type alias? |
14:27:16 | FromDiscord | <haxscramper> define "expensive". Purely from performance reasons it should not affect anything |
14:27:29 | FromDiscord | <Michal Maršálek> memory? |
14:27:52 | FromDiscord | <Michal Maršálek> I mean does it lead to the same (similar) binary? |
14:28:17 | FromDiscord | <haxscramper> if you get too fancy with `when` sections field padding might work out differently, but ultimately this should not be a problem with a single field |
14:28:25 | FromDiscord | <haxscramper> the question is whether you really need this |
14:28:54 | FromDiscord | <Michal Maršálek> In reply to @haxscramper "the question is whether": Yeah it this is always the question |
14:28:55 | FromDiscord | <haxscramper> `array[1, int]` takes the same amount of space as `int` |
14:29:15 | FromDiscord | <haxscramper> or similar amount of space |
14:29:15 | FromDiscord | <Michal Maršálek> In reply to @haxscramper "`array[1, int]` takes the": that was just a simple example this is not what I want to use it for |
14:30:09 | FromDiscord | <el__maco> an int doesn't have to allocate memory at all however. Its a good question if the compiler can reason about array[1,int] in a similar way |
14:30:34 | FromDiscord | <haxscramper> `array` is on-stack, by-value type |
14:31:12 | FromDiscord | <haxscramper> `seq` might've been done differently, with things live short vector optimization, but in case of array there are no hidden semantics |
14:31:13 | FromDiscord | <Michal Maršálek> Thank you everyone, I will use òbject`. 🙂 |
14:31:35 | FromDiscord | <el__maco> a local variable can be on stack or it can exist in machine registers |
14:37:02 | * | arkurious joined #nim |
14:48:52 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
15:38:17 | * | drewr joined #nim |
15:44:44 | * | Lord_Nightmare joined #nim |
15:50:06 | FromDiscord | <Smarc> What would be the best practice approach to delete a single line from a txt file? |
15:53:39 | FromDiscord | <Rika> where is the line located |
15:54:07 | FromDiscord | <Smarc> It is a txt file with several lines |
15:54:36 | FromDiscord | <Rika> if its in the start or middle it's bound to be slow i believe |
15:54:42 | FromDiscord | <Rika> at the end is idea' |
15:54:43 | FromDiscord | <Rika> (edit) "idea'" => "ideal" |
15:55:16 | FromDiscord | <Smarc> In most cases it would be in the middle I guess. But I think speed does not play that big a role, since the file won't be that huge |
15:56:49 | * | rockcavera quit (Read error: Connection reset by peer) |
15:57:39 | * | rockcavera joined #nim |
15:57:39 | * | rockcavera quit (Changing host) |
15:57:39 | * | rockcavera joined #nim |
15:57:54 | FromDiscord | <Rika> the "basic algo" is prolly this↵find the \n before the line you want to delete↵find \n after that↵replace the whole range with one \n |
15:59:27 | FromDiscord | <Smarc> Is there a built-in proc to replace in a file? |
15:59:53 | FromDiscord | <Rika> not that i know of |
16:00:02 | FromDiscord | <Smarc> Alright, thank you |
16:01:33 | FromDiscord | <el__maco> can't you just open the file, read lines except the one you wanted to delete, and then write back |
16:02:25 | * | Lord_Nightmare quit (Ping timeout: 256 seconds) |
16:03:18 | * | Vladar joined #nim |
16:03:43 | FromDiscord | <Yardanico> that's not really efficient |
16:03:47 | FromDiscord | <Yardanico> imagine a file with 150 million lines |
16:04:40 | FromDiscord | <el__maco> in which way its not efficient I wonder |
16:04:52 | FromDiscord | <el__maco> either you read the entire file to memory, or you don't |
16:05:03 | FromDiscord | <Yardanico> you don't have to read the entire file to delete a line |
16:05:07 | FromDiscord | <el__maco> if you don't, you probably write the lines as you read them to another file |
16:05:09 | FromDiscord | <demotomohiro> Open the file for reading, open temporary file for writing, read each lines and only write a line you want to temporary file. If write to temp file success, delete source file and rename temp file to souece file. |
16:05:13 | FromDiscord | <Yardanico> i mean read as in read the lines into memory |
16:05:37 | FromDiscord | <Yardanico> i think there was an example of this |
16:06:46 | FromDiscord | <Yardanico> oh guess there's no other way, i'm wrong then |
16:08:43 | FromDiscord | <el__maco> what isn't efficient is reading the whole file in memory as a continuous block and then removing something at the middle. That's why I suggested reading one line at a time. Of course you can write to another file as you go or alternatively replace the original file after you read all lines to memory |
16:09:36 | FromDiscord | <Rika> dont you have to shift everything else after "deleting" |
16:10:09 | FromDiscord | <Rika> oh |
16:10:12 | FromDiscord | <Rika> i misunderstood |
16:10:20 | FromDiscord | <Rika> yeah i dont think im reading correctly today |
16:15:26 | * | bkay quit (Ping timeout: 260 seconds) |
16:17:17 | * | beshr joined #nim |
16:24:31 | FromDiscord | <IsaacPaul> In reply to @Smarc "Is there a built-in": https://nim-lang.org/docs/memfiles.html has a `lines` iterator. You're going to want to stream a copy to another file, skip the line you don't want, then delete / rename when you're done. |
16:26:55 | FromDiscord | <IsaacPaul> There's a more efficient way that doesn't create a string for each line unless you need to analyze the lines to determine which to remove. |
16:27:47 | FromDiscord | <IsaacPaul> Or does it create a string 🤔 if it already exists in memory... not sure how nim string works |
16:33:51 | * | neurocyte quit (Read error: Connection reset by peer) |
16:35:06 | * | neurocyte0 joined #nim |
16:35:55 | FromDiscord | <Smarc> Thank all of you guy for your help, I'll try to accomplish what I wanted to and report back if I get stuck again :) |
16:46:28 | * | jjido joined #nim |
16:50:57 | * | drewr quit (Ping timeout: 240 seconds) |
17:01:48 | * | drewr joined #nim |
17:04:28 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
17:05:04 | * | Vladar quit (Quit: Leaving) |
17:05:05 | * | dtomato joined #nim |
17:07:53 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
17:15:57 | * | drewr quit (Ping timeout: 240 seconds) |
17:26:34 | FromDiscord | <Shiba> Is it possible to make a nim to computer language Compiler?, i mean if someone is gonna try that |
17:27:48 | FromDiscord | <Shiba> (edit) "Compiler?," => "Compiler? Just for fun," |
17:30:21 | PMunch | What do you mean? |
17:30:24 | FromDiscord | <auxym> In reply to @Shiba "Is it possible to": Sure, I mean, in an "everything is possible" way |
17:30:59 | FromDiscord | <auxym> In reply to @PMunch "What do you mean?": I assume they mean writing a new backend for nim that emits native machine code instead of C? |
17:32:04 | FromDiscord | <konsumlamm> if you mean assembly by "computer language", it already is that, it just compiles to C inbetween |
17:32:49 | FromDiscord | <konsumlamm> there's not really any advantage of emitting machine code directly and it isn't a goal (though ofc you're free to write your own Nim backend) |
17:34:54 | FromDiscord | <Shiba> Iam already learning nim so iam still too far away from doing expirements such as this one |
17:37:39 | NimEventer | New Nimble package! nimtesseract - A wrapper to Tesseract OCR library for Nim, see https://github.com/DavideGalilei/nimtesseract |
17:37:55 | * | neurocyte0 quit (Quit: The Lounge - https://thelounge.chat) |
17:38:18 | FromDiscord | <auxym> In reply to @Shiba "Iam already learning nim": That sort of project would be less about "Nim" and more about assembly and compiler theory. |
17:39:14 | FromDiscord | <Shiba> "Nim compiler Implemanted in Nim" |
17:39:29 | FromDiscord | <Clonkk> A classic exercise is to implement a brainfuck interpretrer↵(@Shiba) |
17:39:34 | FromDiscord | <auxym> the current nim compiler is already implemented in nim |
17:39:54 | * | neurocyte0 joined #nim |
17:40:02 | FromDiscord | <Clonkk> The language is simple enough that it doesn't become a huge project, but it stills shows you the different problematic of it |
17:40:03 | FromDiscord | <Shiba> In reply to @Clonkk "A classic exercise is": Oh yeah i made one in lua, now in Nim |
17:47:40 | FromDiscord | <0000> In reply to @NimEventer "New Nimble package! nimtesseract": cool |
18:29:35 | FromDiscord | <hmmm> In reply to @kaletaa "cool": yea I got it working on linux and it was spotless on my first example |
18:30:00 | FromDiscord | <hmmm> windows hates this stuff apparently so it didn't work |
18:30:37 | FromDiscord | <hmmm> I guess it doesn't work on pdfs tho |
18:33:04 | * | drewr joined #nim |
18:42:03 | * | drewr is now known as drewr-test |
18:44:07 | * | drewr-test is now known as drewr |
18:45:02 | * | fvs joined #nim |
18:58:56 | * | drewr quit (Quit: ERC (IRC client for Emacs 27.2)) |
19:10:41 | FromDiscord | <ajusa> man I really wish Nim supported duplicated field names across object variants, I think folks have been asking for 7 years now? It always trips me up |
19:31:20 | * | vicfred joined #nim |
19:32:17 | * | drewr joined #nim |
19:39:54 | * | jjido joined #nim |
19:52:29 | * | rb quit (Ping timeout: 256 seconds) |
19:52:32 | * | rwb joined #nim |
19:52:57 | * | def- quit (Quit: -) |
19:53:16 | * | def- joined #nim |
19:53:54 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3L1P |
19:54:03 | FromDiscord | <Smarc> Why is this deleting all lines in the given file?! |
19:54:09 | * | rwb is now known as rb |
19:55:11 | FromDiscord | <Smarc> It is supposed to just skip the entered filename and write every other line that is already in the file in the file again |
20:04:25 | * | rb quit (Remote host closed the connection) |
20:05:53 | * | rwb joined #nim |
20:14:52 | FromDiscord | <haxscramper> I"m not exactly sure if you can read and write to a file at the same time |
20:15:28 | FromDiscord | <Smarc> I figured that, so I adjusted it like that |
20:15:38 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3L1T |
20:16:32 | * | Lord_Nightmare joined #nim |
20:18:16 | FromDiscord | <Smarc> with `f = open(StorageFile, fmRead)` |
20:18:40 | FromDiscord | <Smarc> At least it is not erasing the file anymore, but still not writing the lines I want to the temp file |
20:37:02 | * | Onionhammer quit (Quit: The Lounge - https://thelounge.chat) |
20:37:10 | Amun-Ra | I'd go with openFileStream |
20:37:49 | * | Onionhammer joined #nim |
20:43:39 | * | rwb is now known as rb |
20:51:19 | * | noeontheend joined #nim |
20:56:49 | nixfreaknim[m] | is is possible to step though a nim program while compiling ? |
21:00:17 | nixfreaknim[m] | s/is/it/ |
21:04:14 | FromDiscord | <kaddkaka> Right, I was meaning to ask, is it very annoying for people in bridged chats when I edit my messages in discord? |
21:05:23 | FromDiscord | <hmmm> they hate you silently 😃 |
21:05:26 | FromDiscord | <leorize> yea, it doesn't translate well to irc |
21:05:46 | FromDiscord | <leorize> one or two edits right after posting should be fine |
21:06:57 | FromDiscord | <kaddkaka> I will try to minimize it, I'm VERY good at typos 😵💫 |
21:08:25 | FromDiscord | <hmmm> tbh I was in the irc camp but I had to swallow the sour pill: discord makes easier to follow conversations. So since they are on the wrong side of history they shouldnt't mind the edits imo 😏 |
21:09:18 | FromDiscord | <haxscramper> you can see how your edits look on the IRC side in https://irclogs.nim-lang.org/ |
21:22:55 | FromDiscord | <auxym> In reply to @nixfreaknim "is is possible to": do you mean debugging? why "when compiling"? https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html |
21:26:07 | FromDiscord | <kaddkaka> In reply to @auxym "do you mean debugging?": Since so much can happen at compile time in Nim, I would suspect it makes sense to not just debug exec_runtime but also compile_time |
21:43:25 | FromDiscord | <krisppurg> sent a long message, see http://ix.io/3L2d |
21:49:20 | FromDiscord | <Solitude> In reply to @krisppurg "Hi, I have a": why not make it a single `changes` table that stores tuple or something? |
21:50:24 | FromDiscord | <krisppurg> it's much easier with `before` and `after`. |
21:52:30 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3L2f |
21:52:33 | * | PMunch quit (Quit: leaving) |
21:53:54 | FromDiscord | <Solitude> sent a code paste, see https://paste.rs/msf |
21:55:02 | FromDiscord | <krisppurg> well kind of, but it's a bit more shorter with my way |
21:55:25 | FromDiscord | <Solitude> yeah, but its more memory efficient my way |
21:55:52 | FromDiscord | <krisppurg> Benchmark? |
21:56:06 | FromDiscord | <Solitude> ... |
21:56:20 | FromDiscord | <Solitude> and its much easier to get a parseHook going that way |
21:58:36 | FromDiscord | <krisppurg> either ways |
22:02:09 | * | krux02 joined #nim |
22:21:35 | NimEventer | New thread by Nycto: Look up proc signature from an ident, see https://forum.nim-lang.org/t/8772 |
22:26:52 | * | Lord_Nightmare quit (Read error: Connection reset by peer) |
22:27:09 | * | Lord_Nightmare joined #nim |
22:28:25 | FromDiscord | <gandalfs_socks> Error: ambiguous call; both system.and(x: bool, y: bool) [proc declared in C:\Users\...\Downloads\nim-1.6.2_x64\nim-1.6.2\lib\system\basic_types.nim(48, 6)] and system.and(x: int32, y: int32) [proc declared in C:\Users\...\Downloads\nim-1.6.2_x64\nim-1.6.2\lib\system\arithmetics.nim(299, 6)] match for: (WINBOOL, bool) |
22:28:39 | FromDiscord | <gandalfs_socks> how can i specify which function to use |
22:29:44 | FromDiscord | <Elegantbeef> convert one to bool or int |
22:54:51 | * | noeontheend quit (Remote host closed the connection) |
22:56:33 | * | noeontheend joined #nim |
23:30:30 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:30:37 | FromDiscord | <Schelz> Any idea how would be done an web application with buttons, etc. That will be able to communicate with the program ( use the webpage as a control panel ) |
23:31:52 | FromDiscord | <Elegantbeef> Wouldnt it just be http requests to your server from your webpage |
23:31:59 | FromDiscord | <Elegantbeef> Alternatively use a webview library |
23:33:46 | FromDiscord | <Schelz> Example of libraries ? |
23:34:14 | FromDiscord | <Elegantbeef> https://nimble.directory/search?query=webview |
23:34:42 | FromDiscord | <Schelz> In reply to @Elegantbeef "Wouldnt it just be": Thats the idea the webpage has to change the program, as a gui. |
23:36:00 | FromDiscord | <Elegantbeef> If it has to be in the browser the webview doesnt work, but the benefit of them would be using web techs to make UI then you can just use whatever IPC you want to communicate between the two programs |
23:37:02 | FromDiscord | <Elegantbeef> Or you could even build the UI with the server, dont know what the program is so dont know the requirements |
23:42:43 | FromDiscord | <Schelz> I went with webgui cause its the closest that works with the needs |
23:42:55 | FromDiscord | <Schelz> Thx for help |
23:52:27 | * | krux02 quit (Remote host closed the connection) |