00:05:09 | * | def- quit (Quit: -) |
00:26:19 | * | def- joined #nim |
00:30:42 | * | def- quit (Client Quit) |
00:31:59 | * | def- joined #nim |
00:35:39 | * | def- quit (Client Quit) |
00:36:28 | * | def- joined #nim |
00:44:45 | * | krux02_ quit (Remote host closed the connection) |
00:45:25 | * | def- quit (Quit: -) |
01:03:40 | * | def- joined #nim |
01:10:30 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=hsAOwkAZwQqe |
01:11:20 | FromDiscord | <the_real_hypno> The goal is more or less to get rid of the "unnecessary" arguments and to return objects instead of bools |
01:12:44 | FromDiscord | <Elegantbeef> pass in the `result` as the `arg: pointer` then just do `cast[ptr seq[Process]](arg).add c[]` would work proper |
01:13:16 | FromDiscord | <the_real_hypno> eh |
01:13:29 | FromDiscord | <the_real_hypno> first i need to rebuild my brain after reading that |
01:13:46 | FromDiscord | <Elegantbeef> Your proc takes in a `pointer` which is type erased data |
01:13:56 | FromDiscord | <Elegantbeef> you can do `enumProcessImpl(ccb, result.addr)` |
01:14:05 | FromDiscord | <Elegantbeef> Then your internal proc adds to the result and you can call it a day |
01:14:13 | FromDiscord | <the_real_hypno> no way |
01:14:13 | FromDiscord | <the_real_hypno> sec |
01:17:29 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=XtnUznCYOxEX |
01:17:49 | FromDiscord | <Elegantbeef> Remove `result = s` |
01:17:55 | FromDiscord | <Elegantbeef> I don't even know where you're getting `s` |
01:18:24 | FromDiscord | <the_real_hypno> Ye well, thats the other issue, i couldnt properly allocate a internal seq[Process] |
01:18:30 | FromDiscord | <the_real_hypno> so its preallocated |
01:18:54 | FromDiscord | <Elegantbeef> Well now it'll work and be totally self contained |
01:19:57 | FromDiscord | <the_real_hypno> not yet it seems, |
01:20:19 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=RUrXMHfcrhXv |
01:21:27 | FromDiscord | <Elegantbeef> You need to dereference the pointer before add |
01:22:55 | FromDiscord | <the_real_hypno> Wow |
01:23:12 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=EwzalrDIQRgV |
01:23:21 | FromDiscord | <the_real_hypno> Cant admit that it can follow this but it works |
01:23:26 | FromDiscord | <sOkam! 🫐> beef, is it possible to pass keywords into `untyped` parameters and interpret them as strings into the template in someway? |
01:23:35 | FromDiscord | <the_real_hypno> Thank you! |
01:23:41 | FromDiscord | <Elegantbeef> `astToStr` |
01:23:47 | FromDiscord | <Elegantbeef> If you don't understand it read it until you do |
01:24:14 | FromDiscord | <sOkam! 🫐> ? |
01:24:26 | * | def- quit (Quit: -) |
01:24:27 | FromDiscord | <Elegantbeef> The `astToStr` was for you |
01:24:33 | FromDiscord | <Elegantbeef> The other comment was for hypnotoad here |
01:24:45 | FromDiscord | <sOkam! 🫐> kk, i was confused by the second. makes sense |
01:24:57 | FromDiscord | <the_real_hypno> Will do, i have 5 other Enums that need to be made more "nimmonisch" (yes that will be a thing) |
01:25:59 | FromDiscord | <Elegantbeef> You also probably can just use Nim's `bool` and disregard `boolt` |
01:26:29 | FromDiscord | <the_real_hypno> Its the same anyway. Apart from boolt being "True" instead of "True" |
01:26:51 | FromDiscord | <the_real_hypno> I need to remove most of the t's still |
01:27:21 | FromDiscord | <the_real_hypno> before it was lm_bool_t, which was a uint8 typedef |
01:27:30 | FromDiscord | <the_real_hypno> so its evolving |
01:29:07 | FromDiscord | <sOkam! 🫐> crap, `::` is reserved 😔 |
01:30:45 | FromDiscord | <Elegantbeef> If by reserved you mean not an operator yes 😄 |
01:31:16 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=pogsgINAQuBy |
01:31:30 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=nnyAyUCaqIEG |
01:32:16 | FromDiscord | <the_real_hypno> (edit) "https://play.nim-lang.org/#pasty=fuCHADOjPaqC" => "https://play.nim-lang.org/#pasty=jrQUANUPANEy" |
01:32:32 | FromDiscord | <the_real_hypno> (edit) "https://play.nim-lang.org/#pasty=XjvTwunJZTky" => "https://play.nim-lang.org/#pasty=yUzJpFGgLRlp" |
01:33:01 | FromDiscord | <the_real_hypno> (edit) "https://play.nim-lang.org/#pasty=WxvJdIzWANpV" => "https://play.nim-lang.org/#pasty=OjoirQNegmio" |
01:34:41 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "If by reserved you": well, whatever it is... it doesn't let me use it as `template :: (arg1 :T1)` 😦 |
01:35:13 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=loYWMuwuvbUo |
01:36:33 | FromDiscord | <Elegantbeef> Oh I didn't think `:` was allowed in operators but it is |
01:40:03 | FromDiscord | <the_real_hypno> Oh i have anothe question. Could someone tell me what the usecase of procedure types are? I dont really understand what they would do. Considering my code from above i thought about doing the callback as a type but i couldnt figure out how to use it. |
01:40:39 | FromDiscord | <Elegantbeef> Procedure types are pointer procedures, this allows you to call specific behaviour at runtime |
01:41:22 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=vtgKZBSylcgO |
01:41:34 | FromDiscord | <the_real_hypno> how would i "use" (call) it? |
01:41:41 | FromDiscord | <Elegantbeef> You don't call it |
01:41:44 | FromDiscord | <Elegantbeef> It's a type not a value |
01:41:59 | FromDiscord | <Elegantbeef> You give the type to a parameter or variable and then you can call that |
01:42:02 | FromDiscord | <the_real_hypno> but what do a0 and a1 are then? |
01:42:08 | FromDiscord | <the_real_hypno> ah |
01:42:12 | FromDiscord | <Elegantbeef> They do nothing |
01:42:25 | FromDiscord | <Elegantbeef> you can do `_: A, _: B` if you wish |
01:42:31 | FromDiscord | <Elegantbeef> But it does document the type |
01:44:02 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=AaaMMAZCGvZN |
01:44:11 | FromDiscord | <Elegantbeef> yes |
01:45:09 | * | def- joined #nim |
01:45:33 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=aLyspUdnysCF |
01:46:58 | FromDiscord | <the_real_hypno> Makes sense i guess. I still cant really see a benefit here but thats probably because of limited imagination at this time of the day |
01:47:17 | FromDiscord | <the_real_hypno> Thanks anyway, REALLY helpful |
01:48:05 | * | def- quit (Client Quit) |
01:49:43 | * | def- joined #nim |
02:05:17 | FromDiscord | <Elegantbeef> The benefit is that it gives the programmer the ability to specify what happens inside code↵(@the_real_hypno) |
02:05:30 | FromDiscord | <Elegantbeef> you can have events and call the user provided callbacks |
02:19:59 | * | def- quit (Quit: -) |
02:20:25 | * | def- joined #nim |
02:27:56 | * | def- quit (Quit: -) |
02:28:25 | * | def- joined #nim |
02:48:19 | * | def- quit (Quit: -) |
02:49:49 | FromDiscord | <Robyn [She/Her]> Is the streams module a poor example of this? |
02:50:13 | FromDiscord | <Robyn [She/Her]> Or is it a fine example? Just wondering |
02:51:03 | * | def- joined #nim |
02:57:12 | FromDiscord | <Elegantbeef> Given that it uses pointer procs as interfaces I'd say it's meh, but ok |
03:00:13 | * | def- quit (Quit: -) |
03:01:30 | * | def- joined #nim |
03:10:24 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
03:12:33 | * | pbsds joined #nim |
03:18:31 | * | def- quit (Quit: -) |
03:21:26 | * | def- joined #nim |
03:51:48 | FromDiscord | <Robyn [She/Her]> Hey can anyone spot why this code isn't actually adding tokens to the tokens variable? https://play.nim-lang.org/#pasty=CkEMJEQiTtVL↵It's a basic lexer for testing, but for some reason after trying to view the output of the tokens in the list, seems to have nothing inputted despite the codepaths seeming to run |
03:58:51 | FromDiscord | <odexine> “While position is greater or equal to code length” |
03:59:02 | FromDiscord | <odexine> Never true |
03:59:07 | FromDiscord | <odexine> Lex never runs anything |
03:59:50 | FromDiscord | <odexine> @Robyn [She/Her] |
04:05:15 | FromDiscord | <Robyn [She/Her]> Aah okay, thank you! |
04:06:00 | FromDiscord | <Robyn [She/Her]> I forgot a 'not' :p |
04:07:01 | FromDiscord | <Robyn [She/Her]> Wait no I didn't |
04:07:02 | FromDiscord | <Robyn [She/Her]> What |
04:07:41 | FromDiscord | <Robyn [She/Her]> Why is `pos != code.len - 1` working but not `pos >= code.len` |
04:07:59 | FromDiscord | <Robyn [She/Her]> Wait no |
04:08:02 | FromDiscord | <Robyn [She/Her]> I did forget a not |
04:08:07 | FromDiscord | <Robyn [She/Her]> I have no reading comprehension rn |
04:10:02 | * | def- quit (Quit: -) |
04:11:35 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=gRfzHYskgPsp |
04:12:06 | FromDiscord | <Robyn [She/Her]> Forgot a break |
04:12:16 | FromDiscord | <Robyn [She/Her]> It works now, yay |
04:16:58 | * | disso-peach quit (Quit: Leaving) |
04:45:06 | * | def- joined #nim |
04:51:00 | * | tiorock joined #nim |
04:51:00 | * | tiorock quit (Changing host) |
04:51:00 | * | tiorock joined #nim |
04:51:00 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
04:51:00 | * | tiorock is now known as rockcavera |
04:54:38 | * | tiorock joined #nim |
04:54:38 | * | rockcavera is now known as Guest2128 |
04:54:38 | * | Guest2128 quit (Killed (copper.libera.chat (Nickname regained by services))) |
04:54:38 | * | tiorock is now known as rockcavera |
04:54:51 | * | def- quit (Quit: -) |
04:55:34 | * | def- joined #nim |
04:58:53 | * | def- quit (Client Quit) |
05:03:18 | * | def- joined #nim |
05:07:47 | * | rockcavera quit (Ping timeout: 264 seconds) |
05:10:27 | * | def- quit (Quit: -) |
05:11:57 | * | def- joined #nim |
05:14:58 | * | def- quit (Client Quit) |
05:15:44 | * | nazgulsenpai quit (Quit: ZNC 1.8.2 - https://znc.in) |
05:16:17 | * | def- joined #nim |
05:18:05 | * | rockcavera joined #nim |
05:18:05 | * | rockcavera quit (Changing host) |
05:18:05 | * | rockcavera joined #nim |
05:18:35 | * | nazgulsenpai joined #nim |
05:19:33 | * | def- quit (Client Quit) |
05:20:02 | * | tiorock joined #nim |
05:20:02 | * | rockcavera is now known as Guest3901 |
05:20:02 | * | Guest3901 quit (Killed (osmium.libera.chat (Nickname regained by services))) |
05:20:02 | * | tiorock is now known as rockcavera |
05:20:19 | * | rockcavera quit (Read error: Connection reset by peer) |
05:21:29 | * | rockcavera joined #nim |
05:21:29 | * | rockcavera quit (Changing host) |
05:21:29 | * | rockcavera joined #nim |
05:21:38 | * | def- joined #nim |
05:27:07 | * | rockcavera quit (Read error: Connection reset by peer) |
05:28:57 | * | rockcavera joined #nim |
05:36:36 | * | tiorock joined #nim |
05:36:36 | * | rockcavera is now known as Guest8119 |
05:36:36 | * | Guest8119 quit (Killed (osmium.libera.chat (Nickname regained by services))) |
05:36:36 | * | tiorock is now known as rockcavera |
05:41:39 | * | def- quit (Quit: -) |
05:42:40 | anddam | what is https://dpaste.com/5QWGLTJH9 supposted to do? Second python example at https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers |
05:42:54 | anddam | x/posted/ c/posed/ |
06:05:37 | * | def- joined #nim |
06:17:27 | * | PMunch joined #nim |
06:38:35 | * | def- quit (Quit: -) |
06:39:03 | * | def- joined #nim |
07:05:30 | * | def- quit (Quit: -) |
07:42:02 | FromDiscord | <janakali> In reply to @anddam "what is https://dpaste.com/5QWGLTJH9 supposted": I believe it demonstrates that you need unintuitive workarounds (`nonlocal`) in python to use locally scoped variables |
07:42:44 | FromDiscord | <janakali> (edit) "In reply to @anddam "what is https://dpaste.com/5QWGLTJH9 supposted": I believe it demonstrates that you need unintuitive workarounds (`nonlocal`) in python to use locally scoped variables ... " added "(with same name as global variables)" |
07:46:02 | * | def- joined #nim |
08:05:45 | * | def- quit (Quit: -) |
08:07:01 | * | def- joined #nim |
08:25:22 | FromDiscord | <janakali> probably related to this issue: https://stackoverflow.com/questions/8447947/is-it-possible-to-modify-a-variable-in-python-that-is-in-an-outer-enclosing-b |
08:32:27 | * | def- quit (Quit: -) |
08:34:32 | * | def- joined #nim |
08:46:39 | * | def- quit (Quit: -) |
08:47:15 | * | def- joined #nim |
08:52:31 | anddam | hrmm will test it later, but I cannot see how that would even compile in python, my guess is the assert should go into a method not in the class attributes |
08:59:30 | * | def- quit (Quit: -) |
08:59:59 | * | def- joined #nim |
09:04:39 | FromDiscord | <ghostbuy_> TEEN/ONLYFANS PORN HERE JOIN NOW! :pizza::peach: https://discord.gg/pornox @everyone |
09:05:08 | Amun-Ra | PMunch ^ |
09:06:15 | PMunch | I was already on it :) |
09:06:19 | Amun-Ra | :) |
09:07:16 | PMunch | Can't remove the message on IRC though |
09:07:54 | Amun-Ra | :pizza::peach: these emoji choices are always interesting |
09:34:09 | * | def- quit (Quit: -) |
09:34:58 | * | def- joined #nim |
09:45:08 | anddam | PMunch: well you shouldn't do onlyfans during office hours… |
09:45:29 | anddam | Amun-Ra: eh, they had my attention at pizza |
09:45:48 | Amun-Ra | anddam: same here, not gonna lie |
10:01:01 | * | def- quit (Quit: -) |
10:03:03 | * | def- joined #nim |
10:09:02 | * | def- quit (Quit: -) |
10:11:43 | * | def- joined #nim |
10:14:46 | * | def- quit (Client Quit) |
10:14:58 | * | def- joined #nim |
10:53:07 | * | def- quit (Quit: -) |
10:53:29 | * | def- joined #nim |
11:23:46 | * | xet7 quit (Remote host closed the connection) |
11:26:30 | * | def- quit (Quit: -) |
11:27:20 | * | def- joined #nim |
11:44:09 | FromDiscord | <ayex> for writing a nim-js browser plugin that fills tedious forms,↵↵is there something similar/equivalent to python selenium's `driver.send_keys` ? 🤔 |
11:47:10 | * | def- quit (Quit: -) |
11:52:13 | * | beholders_eye joined #nim |
12:00:50 | FromDiscord | <ayex> ok nvm, seems like I do not need to go via send\_keys equivalent. 🙂 |
12:07:08 | * | def- joined #nim |
12:10:08 | * | def- quit (Client Quit) |
12:13:45 | FromDiscord | <ayex> but in the same context how would I translate this js line\:↵`inputElement.dispatchEvent(new Event("input"));`↵↵specifically the Event.Input to nim? |
12:15:26 | FromDiscord | <ayex> for `inputElement.dispatchEvent(Event(DomEvent.Input))` I get type mismatch error\:↵`Error: type mismatch: got 'DomEvent' for 'Input' but expected 'Event = ref Event:ObjectType'` |
12:15:46 | * | def- joined #nim |
12:24:23 | FromDiscord | <solitudesf> sent a code paste, see https://play.nim-lang.org/#pasty=YWIgKEdLJKkH |
12:25:26 | FromDiscord | <ayex> ah? [solitudesf](https://matrix.to/#/%40_discord_104136074569211904%3At2bot.io) thank! you let me try |
12:26:46 | FromDiscord | <dolfy0191> Hi there |
12:26:57 | FromDiscord | <ayex> yay compiles 🎉 |
12:27:06 | FromDiscord | <dolfy0191> In nim is it possible to use name aliases for long names? |
12:28:06 | FromDiscord | <dolfy0191> something like↵let slp=myobject.somelongparam↵without copying? |
12:29:02 | FromDiscord | <grumblygibson> sent a code paste, see https://play.nim-lang.org/#pasty=FlKjasIyIScl |
12:30:16 | FromDiscord | <grumblygibson> That's often my favorite trick to make readable code until views becomes stable/better. |
12:31:11 | FromDiscord | <dolfy0191> perfect! thank you! |
12:31:48 | FromDiscord | <sOkam! 🫐> is there an inverse to `astToStr`, to get the ast from a string? 🤔 |
12:32:09 | FromDiscord | <solitudesf> In reply to @heysokam "is there an inverse": https://nim-lang.org/docs/macros.html#parseStmt%2Cstring%2Cstring |
12:32:27 | FromDiscord | <sOkam! 🫐> oh... parse! wasn't finding it, tyty ✍️ |
12:32:42 | * | nazgulsenpai quit (Quit: ZNC 1.8.2 - https://znc.in) |
12:33:31 | FromDiscord | <pmunch> sent a code paste, see https://play.nim-lang.org/#pasty=hafynFjVknik |
12:33:33 | * | nazgulsenpai joined #nim |
12:34:05 | * | beholders_eye quit (Ping timeout: 256 seconds) |
12:36:05 | FromDiscord | <dolfy0191> sent a code paste, see https://play.nim-lang.org/#pasty=pGzmZRVnJiqV |
12:58:56 | FromDiscord | <Robyn [She/Her]> In reply to @dolfy0191 "something like let slp=myobject.somelongparam": Have you looked at templates? |
13:01:31 | FromDiscord | <minamorl> Hi, i am very new to nim lang and wanna learn about how pragma works. is there any good reference? |
13:08:09 | FromDiscord | <windowssmece> i have 1 question, if i build a library in nim using noMemoryManagment, and import it in another project that uses ORC will that work and vice versa |
13:11:32 | * | beholders_eye joined #nim |
13:16:28 | * | def- quit (Quit: -) |
13:32:44 | FromDiscord | <sOkam! 🫐> In reply to @windowssmece "i have 1 ": you can do it, but you need to teach orc how to do the management with `destroy=` hooks and friends |
13:33:09 | FromDiscord | <ringabout> In reply to @minamorl "Hi, i am very": You can read the Nim manual => https://nim-lang.org/docs/manual.html or read the source code of the Nim compiler |
13:33:59 | FromDiscord | <ringabout> (edit) "https://nim-lang.org/docs/manual.html" => "https://nim-lang.org/docs/manual.html#pragmas" |
13:34:06 | PMunch | Well, if you have written a library which doesn't need automatic memory management then you can use it with automatic memory management turned on |
13:34:11 | PMunch | It just won't do anything |
13:34:20 | FromDiscord | <sOkam! 🫐> (edit) "In reply to @windowssmece "i have 1 ": you can do it, but you need to teach orc how to do the management with `destroy=` hooks and friends" => "sent a long message, see https://pasty.ee/AjncrywDStQA" |
13:34:39 | PMunch | The other way around of course is not as trivial |
13:34:47 | FromDiscord | <ringabout> (edit) "compiler" => "compiler; here is where pragmas are implemented https://github.com/nim-lang/Nim/blob/devel/compiler/pragmas.nim" |
13:35:17 | * | def- joined #nim |
13:36:26 | FromDiscord | <sOkam! 🫐> In reply to @minamorl "Hi, i am very": the just of it is that pragmas mark the identifier with specific functionality↵so "how pragmas work" is like asking "how multiple features work"↵they "tag" the identifier to be used in a certain way, so you need to reference each of the pragma's manual to understand what each of them do ✍️ |
13:38:10 | * | def- quit (Client Quit) |
13:41:09 | FromDiscord | <minamorl> In reply to @heysokam "the just of it": ty for the clarification! ya i thought it was like so |
13:41:30 | FromDiscord | <minamorl> In reply to @ringabout "You can read the": thanks for sharing links ! |
13:43:04 | FromDiscord | <minamorl> i didn’t recognize that nim itself is self-hosted |
13:43:16 | FromDiscord | <minamorl> (edit) "i didn’t recognize that nim itself is self-hosted ... " added "till now" |
13:43:26 | FromDiscord | <minamorl> cool |
13:51:57 | FromDiscord | <windowssmece> hm oke, 1 question are sets in nim determistic i know in c# default implmentaiton is not determistic |
13:56:41 | * | def- joined #nim |
14:02:16 | FromDiscord | <windowssmece> in nim we do not have any private public accessors right |
14:13:37 | FromDiscord | <odexine> In reply to @windowssmece "in nim we do": we can emulate them in nim |
14:13:52 | FromDiscord | <odexine> In reply to @windowssmece "hm oke, 1 question": not sure what you mean by this exactly, deterministic in what way? |
14:22:32 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=lHsvVUjYirsO |
14:22:41 | * | def- quit (Quit: -) |
14:23:25 | FromDiscord | <jaar23> i tried it, didn't expect it would works, but it do works, i can do `obj.t.add()` and `obj.t.getOrDefault()` without error. |
14:25:42 | * | def- joined #nim |
14:32:50 | * | PMunch quit (Quit: Leaving) |
14:35:17 | FromDiscord | <solitudesf> In reply to @jaar23 "i have this object.": no, tables just have checks in their procedures to initialize them if they arent. |
14:37:14 | FromDiscord | <jaar23> In reply to @solitudesf "no, tables just have": so you mean, it is initialize when i call `add` instead? |
14:38:01 | FromDiscord | <ringabout> You example doesn't compile for me |
14:38:09 | FromDiscord | <solitudesf> In reply to @jaar23 "so you mean, it": yes |
14:38:36 | FromDiscord | <jaar23> In reply to @ringabout "You example doesn't compile": haha, i just type of psuedo-ly. |
14:42:33 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=fIPiEdVtfwWb |
14:44:16 | FromDiscord | <ringabout> In reply to @jaar23 "haha, i just type": I thought you were talking about the type inference for generic object constructor |
14:44:38 | FromDiscord | <ringabout> Yeah, they are initialized since https://github.com/nim-lang/Nim/pull/11094 |
14:47:23 | FromDiscord | <jaar23> ah, no. the generic object constructor will come later until i fix other issue 😅 ↵appreciate the table is initialize for me |
14:57:15 | * | def- quit (Quit: -) |
15:02:30 | * | xet7 joined #nim |
15:09:28 | NimEventer | New thread by impras: How to migrate from Discourse to Nim Forum?, see https://forum.nim-lang.org/t/11423 |
15:15:00 | * | def- joined #nim |
15:43:48 | FromDiscord | <windowssmece> In reply to @odexine "not sure what you": 2 pc runing same code different result, from what i know in c# hashing is using some float magic or something so it can break determistc |
15:45:05 | * | coldfeet joined #nim |
15:49:49 | FromDiscord | <odexine> for system-sets `{}` they use bitsets instead so no problem there, for `sets` module `HashSet` nims hashing is iirc deterministic so it is deterministic |
15:56:50 | FromDiscord | <wannabelokesh> In reply to @pmunch "You'd have to be": Yes, I can provide information related to the context in order for others to help me. ↵Please ask. |
15:58:17 | FromDiscord | <pmunch> You just said you needed help. You didn't even specify what your problem actually was |
15:58:38 | FromDiscord | <pmunch> If you have a question just ask it here and if someone can help they will |
16:22:50 | * | coldfeet quit (Remote host closed the connection) |
16:29:05 | * | def- quit (Quit: -) |
16:29:30 | * | def- joined #nim |
16:45:18 | * | def- quit (Quit: -) |
16:46:06 | * | def- joined #nim |
17:06:28 | * | ixmpp quit (Ping timeout: 255 seconds) |
17:06:31 | FromDiscord | <0b110111101> does the system module re-exports libraries ? |
17:09:36 | FromDiscord | <zz9za> Dumb newbie question that I couldn't find in the tutorial... how do I iterate over an arbitrary range (specifically, from 1 to n). The naive for x in range[1..n] doesn't work because n isn't known at compile time, at least that's what the error says |
17:09:46 | FromDiscord | <zz9za> and there doesn't seem to be a range proc to just make one at runtime |
17:10:23 | FromDiscord | <zz9za> I mean, I could do it with a manual loop and state vars obviously, but I'd rather...not |
17:13:50 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#pasty=CDFyOEqSQwMY |
17:14:08 | Amun-Ra | for i in 1 .. n: … |
17:16:28 | FromDiscord | <odexine> In reply to @0b110111101 "does the system module": it does |
17:25:32 | FromDiscord | <jakub19245sdf> hi |
17:25:41 | FromDiscord | <jakub19245sdf> does anyone do scripts outside of roblox? |
17:25:56 | FromDiscord | <the_real_hypno> Is the void type from experimental considered a nil or is it just nothing?↵If i would have a nilable value from an imported C-Function, could i use void there when wrapping? |
17:26:31 | FromDiscord | <the_real_hypno> In reply to @jakub19245sdf "does anyone do scripts": Weird question, are you sure you are on the correct Discord? |
17:26:55 | FromDiscord | <jakub19245sdf> In reply to @the_real_hypno "Weird question, are you": correct Discord what? |
17:28:03 | FromDiscord | <the_real_hypno> Where does the roblox reference come from? In what context? Scripts are not bound to Video games |
17:28:05 | FromDiscord | <0b110111101> In reply to @odexine "it does": which library defines int8 and in32 and so on ? |
17:28:14 | FromDiscord | <the_real_hypno> Ctypes afaik |
17:28:30 | FromDiscord | <0b110111101> no |
17:28:36 | FromDiscord | <0b110111101> that is for c types |
17:28:45 | FromDiscord | <0b110111101> what about the nim types ? |
17:28:50 | FromDiscord | <the_real_hypno> Ctypes.. |
17:28:58 | FromDiscord | <the_real_hypno> ctypes nim |
17:29:06 | FromDiscord | <jakub19245sdf> Basically I have codes that are leaning to the dark side of discord.. |
17:29:19 | FromDiscord | <jakub19245sdf> I just need help |
17:29:48 | FromDiscord | <.lisuwu_> In reply to @0b110111101 "what about the nim": what are you asking exactly? if you are asking where aee they defined for nim, it's system.nim |
17:29:59 | FromDiscord | <.lisuwu_> (edit) "aee" => "are" |
17:30:15 | FromDiscord | <.lisuwu_> (edit) "system.nim" => "system.nim, which is implicitly imported" |
17:30:17 | FromDiscord | <the_real_hypno> https://nim-lang.org/docs/ctypes.html |
17:30:22 | FromDiscord | <0b110111101> In reply to @.lisuwu_ "what are you asking": something made me asking this question some c types are defined in system which is weird |
17:30:40 | FromDiscord | <0b110111101> the rest of the types defined in ctypes |
17:30:51 | FromDiscord | <0b110111101> wtf |
17:31:22 | FromDiscord | <.lisuwu_> In reply to @0b110111101 "something made me asking": for stuff like uint16, int32 etc... they are defined in system |
17:33:13 | FromDiscord | <.lisuwu_> it's not really weird, and looking over ctypes it does say "for compatibility between providers and backend" |
17:33:21 | FromDiscord | <the_real_hypno> Ah you are right, i confused it with them being imported from x haha |
17:33:27 | FromDiscord | <the_real_hypno> (edit) "x" => "c" |
17:33:38 | FromDiscord | <.lisuwu_> (edit) "providers" => "platforms" |
17:34:30 | FromDiscord | <.lisuwu_> (edit) "backend"" => "backend", so ctypes is not C types, it is COMPATIBLE types" |
17:46:14 | * | def- quit (Quit: -) |
17:48:38 | * | def- joined #nim |
17:49:14 | FromDiscord | <@@prestosilver> Ive been meaning to ask, did nimble remove the develop feature, or is it just used differently now, took a break from nim for the latter half of last year and havent messed around enough to figure out which is the case. |
17:50:09 | FromDiscord | <@@prestosilver> actually it could also just be an issue with my install if neither of those are the case |
18:02:26 | FromDiscord | <the_real_hypno> What did you expect it to do? |
18:03:06 | FromDiscord | <the_real_hypno> I used it on 2.0.0 and it did what the doc said |
18:03:49 | FromDiscord | <@@prestosilver> If i remember right when I used it before it would symlink a package so i dont need to run `nimble remove <package> && nimble install`, is that no longer what it does |
18:05:09 | FromDiscord | <@@prestosilver> This was a while ago so it would make sense if thats changed |
18:05:12 | FromDiscord | <the_real_hypno> I dont want to confuse it with local packages but as far as I remembered it makes dependencies locally available in your project |
18:05:43 | FromDiscord | <the_real_hypno> (edit) "remembered" => "remember" |
18:06:06 | FromDiscord | <the_real_hypno> and ignores externals |
18:06:27 | FromDiscord | <@@prestosilver> yea sounds like they changed it then, tbh its not too much of a issue for me bc I dont have too many self managed packages I depend on |
18:07:17 | FromDiscord | <@@prestosilver> I think this was like 1.6 behavior so not surprised it changed in 2.0, the new nimble system is way cleaner |
18:07:39 | FromDiscord | <the_real_hypno> I would still test it because my brain tells me there is something wrong with what i said |
18:07:45 | FromDiscord | <the_real_hypno> I just cant grasp it |
18:09:11 | FromDiscord | <@@prestosilver> omg, im dumb, forgot you can do -h for subcommands in nimble, looks like the old behavoiur was either moved to `nimble develop --global` or im just forgetting that i needed that flag |
18:09:59 | FromDiscord | <the_real_hypno> I knew there was something with local and global involved |
18:10:18 | FromDiscord | <the_real_hypno> Good that you got it working |
18:10:27 | FromDiscord | <@@prestosilver> yea lol |
18:24:04 | FromDiscord | <the_real_hypno> Does anyone know if there is something like a "Best practice for .... " source for Nim and if not, would there be people willing to collab on such a project? |
18:25:18 | FromDiscord | <bosinski2023> In reply to @the_real_hypno "Does anyone know if": is it about code-style - there is a document avail. and smbd. did a opinionated formatter `nph` AFAIK. |
18:26:14 | FromDiscord | <Phil> In reply to @the_real_hypno "Does anyone know if": There's isn't beyond the zen of Nim and I think Nim is too flexible to have an explicit one |
18:28:20 | FromDiscord | <the_real_hypno> Mh, but there is a general tendency working on specific things, right? ↵I was having a "type" best practice in mind showing how you enhance your type to be usable with the stdlib |
18:28:22 | FromDiscord | <odexine> Status has a style guide |
18:28:31 | FromDiscord | <the_real_hypno> Just one example obviously |
18:28:39 | FromDiscord | <odexine> In reply to @the_real_hypno "Mh, but there is": Not really I’d say |
18:29:09 | FromDiscord | <Phil> I think there are some things |
18:30:39 | NimEventer | New thread by beckx: Iup gui: Load jpeg, see https://forum.nim-lang.org/t/11424 |
18:30:57 | FromDiscord | <Phil> Avoid pointers, only use ref types when necessary, go proc >> generics >> templates >>macros in your usage, compile the linking flag whose name I forgot just off the cuff |
18:31:18 | FromDiscord | <bosinski2023> In reply to @the_real_hypno "Mh, but there is": there is a style-guide for core-devs/contributors - a good read.. |
18:31:28 | FromDiscord | <the_real_hypno> When i click through popular projects they tend to have similar preparation things happening before the actual code like converters and or procs for general math stuff |
18:31:36 | FromDiscord | <Phil> Prefer optionals over empty objects or the like if sth. Might not exist, but that's a personal preference |
18:31:46 | FromDiscord | <the_real_hypno> In reply to @bosinski2023 "there is a style-guide": Thanks, I'll check it out |
18:31:55 | FromDiscord | <odexine> Converters are not recommended |
18:32:12 | FromDiscord | <the_real_hypno> Thats what the doc says yes |
18:32:24 | FromDiscord | <Phil> Aye, converters generally are an anti pattern outside of specific circumstances |
18:32:45 | FromDiscord | <the_real_hypno> That would be something i would consider a best practice aswell |
18:32:53 | FromDiscord | <odexine> In reply to @isofruit "Prefer optionals over empty": Monad detected |
18:33:21 | FromDiscord | <Phil> I swear I've been told like 3 times what a monad is and I still don't get it |
18:33:23 | FromDiscord | <the_real_hypno> (edit) "That" => "Thats " |
18:33:44 | FromDiscord | <odexine> It’s a monoid in the category of endofunctors, duh |
18:34:19 | FromDiscord | <Phil> Ah yes |
18:34:23 | FromDiscord | <Phil> Words |
18:34:38 | FromDiscord | <Phil> I too use words occasionally |
18:34:42 | FromDiscord | <odexine> In reply to @isofruit "I swear I've been": It’s almost just a container type where you can manipulate the contents without removing it from the container |
18:34:45 | FromDiscord | <the_real_hypno> Words never change |
18:35:25 | FromDiscord | <Phil> In reply to @odexine "It’s almost just a": So a stateful box into which you banish your side effects? |
18:35:40 | FromDiscord | <odexine> That works, sure |
18:36:21 | FromDiscord | <Phil> Kinda like a termination point in a process diagram |
18:36:37 | FromDiscord | <odexine> Okay now you’re doing the words thing |
18:37:01 | FromDiscord | <Phil> Okay so you know workflow/process diagrams? |
18:37:35 | FromDiscord | <odexine> Not well enough I guess |
18:41:22 | FromDiscord | <Phil> Like somebody drawing down the process of somebody uploading an image. ↵Going from image selection -->upload image --> check with content filter in backend -->, if valid store image --> store identifier of image in dB -->return URL to image --> reroute client to image URL --> process done |
18:42:09 | FromDiscord | <Phil> That process also May end at various other points |
18:42:14 | FromDiscord | <odexine> Ah those diagrams |
18:42:27 | FromDiscord | <odexine> I don’t see the connection |
18:43:05 | FromDiscord | <Phil> Like failing the content filter --> return http400 --> process ends |
18:45:05 | FromDiscord | <Phil> Maybe I'm just off-base but I've been getting the impression recently that in FP everything sooner or later ends in a side-effect.↵Which is either drawing something on a screen, or writing something to disk or sending something to somewhere else etc. |
18:45:30 | FromDiscord | <Phil> And in that way Monads (if they are the black-box containing side-effects) feel like termination points of a chain of executing functions |
18:45:38 | FromDiscord | <Phil> A process if you will |
19:26:38 | * | jkl quit (Quit: Gone.) |
19:31:06 | * | jkl joined #nim |
20:11:44 | * | lucasta joined #nim |
21:11:30 | FromDiscord | <zz9za> anyone know of a good/easy-to-use undirected graph library? I.e. create a cloud of nodes, and find the shortest path between them? |
21:12:14 | FromDiscord | <zz9za> for my use case I don't need to weight the edges, if that matters |
21:28:42 | FromDiscord | <Elegantbeef> https://nimble.directory/search?query=undirected+graph |
21:33:36 | * | rockcavera quit (Remote host closed the connection) |
22:18:05 | * | beholders_eye quit (Read error: Connection reset by peer) |
22:24:12 | * | beholders_eye joined #nim |
22:43:49 | * | beholders_eye quit (Read error: Connection reset by peer) |
22:49:53 | * | beholders_eye joined #nim |
23:47:51 | FromDiscord | <vagous> How good is nim's generation? Can it offer better performance than handwritten C? |
23:47:57 | FromDiscord | <vagous> (edit) "C?" => "C/c++?" |
23:48:02 | FromDiscord | <vagous> (edit) "C/c++?" => "C/C++?" |
23:49:38 | FromDiscord | <vagous> Or is that too vague of a question? |
23:50:09 | FromDiscord | <Elegantbeef> Obviously Nim cannot be faster than C if the C is hand written to do the same as the Nim |
23:50:43 | FromDiscord | <Elegantbeef> But Nim can be as fast as C, since you can disable checks, use macros to generate more efficient code from higher level abstractions, and other fun things |
23:51:03 | * | def- quit (Quit: -) |
23:51:28 | * | def- joined #nim |
23:51:59 | FromDiscord | <vagous> In reply to @Elegantbeef "But Nim can be": wdym by macros to generate more efficient code from higher level abstractions? |
23:53:28 | FromDiscord | <Elegantbeef> You can write macros to abstract away low level logic and make the code more digestible than the C counterpart |
23:53:28 | FromDiscord | <Elegantbeef> https://nim-lang.org/blog/2021/07/28/Nim-Efficient-Expressive-Elegant-Benchmarking.html |
23:57:46 | FromDiscord | <Mike> So I just did `nimble install -d:explicitSourcePath=/home/mikenew/Downloads/Nim nimlsp` to install nimlsp, but there's nothing in .nimble/bin. If fact there's no bin directory at all in .nimble, even though it acts like it installed it just fine |
23:57:54 | FromDiscord | <Mike> Am I missing something obvious? |
23:58:44 | FromDiscord | <vagous> In reply to @Elegantbeef "You can write macros": I see. How do you call a thread in nim? |
23:59:05 | FromDiscord | <Elegantbeef> You call them threads? 😄 |
23:59:12 | FromDiscord | <vagous> ? |
23:59:14 | FromDiscord | <vagous> no |
23:59:19 | FromDiscord | <vagous> I'm just asking how do you do it |
23:59:36 | FromDiscord | <Elegantbeef> `createThread`? |
23:59:45 | FromDiscord | <vagous> That's windows only isn't |
23:59:51 | FromDiscord | <Elegantbeef> No |
23:59:56 | FromDiscord | <vagous> ok |