00:16:24 | termer | yeah, your name is The Real Hypno |
00:28:24 | * | def- quit (Quit: -) |
00:28:36 | * | def- joined #nim |
01:05:12 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#pasty=CAPxpkwjhDIz |
01:25:35 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=ZReJZDfpdmTi |
01:26:09 | FromDiscord | <threefour> (edit) "https://play.nim-lang.org/#pasty=MVpExPMGZkjh" => "https://play.nim-lang.org/#pasty=XYBpExhjESOg" |
01:32:24 | FromDiscord | <sOkam! π«> In reply to @threefour "I see this in": that api does not exist anymore |
01:33:46 | FromDiscord | <sOkam! π«> oh wait, or am I blindβ΅it does exist in the new implementation |
01:33:57 | FromDiscord | <sOkam! π«> let me try it again, idk why it didn't work before |
01:37:28 | FromDiscord | <sOkam! π«> well, it did work. idk what the H i did before that didnt work. I swear I tried the same piece of code π I must have been tired or something π€·ββοΈ |
02:40:00 | * | def- quit (Quit: -) |
03:16:15 | * | def- joined #nim |
03:44:36 | FromDiscord | <odexine> In reply to @the_real_hypno "Andreas is not my": Andreas is Araq's name iirc |
03:47:44 | * | nyeaa49284230101 quit (Read error: Connection reset by peer) |
03:48:05 | * | nyeaa49284230101 joined #nim |
04:11:41 | * | rockcavera quit (Read error: Connection reset by peer) |
04:12:51 | * | rockcavera joined #nim |
04:19:47 | * | def- quit (Quit: -) |
04:22:04 | * | def- joined #nim |
05:29:03 | * | GreaseMonkey quit (Read error: Connection reset by peer) |
05:41:45 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
05:43:24 | * | SchweinDeBurg joined #nim |
05:55:58 | * | greaser|q joined #nim |
06:18:57 | * | PMunch joined #nim |
07:01:56 | * | PMunch_ joined #nim |
07:02:50 | * | PMunch quit (Read error: Connection reset by peer) |
07:04:40 | * | def- quit (Quit: -) |
07:05:09 | * | def- joined #nim |
07:10:08 | * | def- quit (Quit: -) |
07:26:32 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
07:27:00 | * | ehmry joined #nim |
07:46:16 | * | PMunch_ is now known as PMunch |
07:48:02 | * | greaser|q quit (Changing host) |
07:48:02 | * | greaser|q joined #nim |
07:48:04 | * | greaser|q is now known as GreaseMonkey |
07:57:35 | FromDiscord | <drunkenalcoholic> Noob question, how would I find the second instants of a character within a string say for example I want to know the second instants of position of "/" char. I had been using something like myString[succ(myString.find("["))..pred(myString("]"))] but not the [ and ] chars are replaced with "/" and "/" |
07:58:33 | FromDiscord | <drunkenalcoholic> (edit) "Noob question, how would I find the second instants of" => "sent" | "character within a string say for example I want to know the second instants of position of "/" char. I had been using something like myString[succ(myString.find("["))..pred(myString("]"))] but not the [ and ] chars are replaced with "/" and "/"" => "code paste, see https://play.nim-lang.org/#pasty=MtyDeNPffyKq" |
07:59:12 | FromDiscord | <drunkenalcoholic> (edit) "https://play.nim-lang.org/#pasty=uEyDMFVOrPkE" => "https://play.nim-lang.org/#pasty=kfeKtESOikGu" |
08:01:37 | FromDiscord | <Elegantbeef> Use the `start` parameter |
08:02:29 | FromDiscord | <drunkenalcoholic> for contence I am trying to extract the volume level |
08:02:32 | FromDiscord | <drunkenalcoholic> https://media.discordapp.net/attachments/371759389889003532/1232240173438205963/image.png?ex=6628bc97&is=66276b17&hm=ab9e7b1d2be854f8e2d3bf2979fc876c575c82247f7a0b87c8946d7992f70948& |
08:02:54 | FromDiscord | <drunkenalcoholic> @ElegantBeef Thanks I will go look that up how to use the start parameter |
08:03:03 | FromDiscord | <Elegantbeef> I'd say stop using string operations and move up to `strscans` |
08:03:46 | FromDiscord | <drunkenalcoholic> hmm I will check that also |
08:04:09 | FromDiscord | <Elegantbeef> It's way better and much less silly than using a bunch of find operations |
08:05:38 | FromDiscord | <nnsee> In reply to @drunkenalcoholic "hmm I will check": I also recommend looking into npeg |
08:05:47 | FromDiscord | <drunkenalcoholic> npeg? |
08:06:25 | * | def- joined #nim |
08:06:37 | FromDiscord | <nnsee> In reply to @drunkenalcoholic "npeg?": https://github.com/zevv/npeg |
08:08:45 | FromDiscord | <drunkenalcoholic> Thanks Ras, I will try with standard library for now with strscan, but if I can't work it out i'll try the npeg |
08:09:59 | FromDiscord | <nnsee> bear in mind that npeg is very powerful and very likely overkill for your specific use case |
08:10:07 | FromDiscord | <nnsee> but it's useful to learn and know imo |
08:20:50 | * | def- quit (Quit: -) |
08:31:51 | FromDiscord | <drunkenalcoholic> Thanks, I will defiantly check it out, as I do want to learn as much as I can |
08:34:20 | FromDiscord | <drunkenalcoholic> sent a code paste, see https://play.nim-lang.org/#pasty=kaDabnNXdYkD |
08:34:24 | FromDiscord | <drunkenalcoholic> seems to work |
08:38:27 | * | def- joined #nim |
08:56:32 | FromDiscord | <pmunch> Could also do `input.split(" / ")[1]` |
08:57:41 | FromDiscord | <pmunch> You're writing a volume block for Nimdow I presume π |
08:58:06 | * | rockcavera quit (Remote host closed the connection) |
08:58:40 | * | def- quit (Quit: -) |
09:05:37 | FromDiscord | <drunkenalcoholic> @pmunch yeap exactly |
09:07:10 | FromDiscord | <drunkenalcoholic> I actually used split in ram memory code |
09:17:24 | FromDiscord | <Elegantbeef> Everytime someone uses split to parse a dog dies |
09:18:57 | * | fallback quit (Read error: Connection reset by peer) |
09:20:21 | NimEventer | New Nimble package! shellcmd - Collection of Terminal commands to be used inside nim, see https://github.com/Alogani/shellcmd |
09:20:21 | NimEventer | New Nimble package! asyncproc - Flexible child process spawner with strong async features, see https://github.com/Alogani/asyncproc |
09:20:25 | NimEventer | New Nimble package! aloganimisc - Dependency for asyncproc and shellcmd package. Small utilities not worthing a package. Not meant to be used in production, see https://github.com/Alogani/aloganimisc |
09:20:29 | NimEventer | New Nimble package! asyncio - Async files and streams tools, see https://github.com/Alogani/asyncio |
09:20:33 | NimEventer | New Nimble package! asyncsync - Async primitives working on std/asyncdispatch, see https://github.com/Alogani/asyncsync |
09:20:37 | NimEventer | New Nimble package! csvdict - Another CsvTable API. Goals are efficient, simple and flexible, see https://github.com/Alogani/csvdict |
09:22:38 | * | fallback joined #nim |
09:37:42 | * | def- joined #nim |
09:58:15 | * | def- quit (Quit: -) |
10:00:53 | * | def- joined #nim |
10:03:55 | * | def- quit (Client Quit) |
10:04:43 | FromDiscord | <odexine> Dang thatβs a lot |
10:04:51 | * | def- joined #nim |
10:08:58 | * | def- quit (Client Quit) |
10:09:45 | * | def- joined #nim |
10:27:07 | * | def- quit (Quit: -) |
10:27:31 | * | def- joined #nim |
10:42:19 | * | Jjp137 quit (Read error: Connection reset by peer) |
11:05:45 | * | def- quit (Quit: -) |
11:09:55 | * | def- joined #nim |
11:23:15 | * | def- quit (Quit: -) |
11:28:07 | * | def- joined #nim |
12:19:13 | * | def- quit (Quit: -) |
12:19:42 | * | def- joined #nim |
12:27:59 | * | def- quit (Quit: -) |
12:29:44 | * | def- joined #nim |
12:34:14 | * | def- quit (Client Quit) |
12:53:56 | * | def- joined #nim |
12:54:51 | * | Jjp137 joined #nim |
12:59:18 | * | def- quit (Quit: -) |
13:16:39 | * | def- joined #nim |
13:55:41 | * | PMunch quit (Quit: Leaving) |
14:06:28 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=ybWdLvcAFbxf |
14:10:22 | FromDiscord | <the_real_hypno> There is none, atleast thats what people told me |
14:15:40 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=sgQtqoncDVvs |
14:17:03 | FromDiscord | <nervecenter> (edit) "https://play.nim-lang.org/#pasty=JTmMGsvgvISU" => "https://play.nim-lang.org/#pasty=BlKCSUiqngkg" |
14:19:30 | * | fallback quit (Ping timeout: 245 seconds) |
14:22:44 | * | def- quit (Quit: -) |
14:23:26 | * | def- joined #nim |
14:28:19 | FromDiscord | <jaar23> i agreed with you, we can just do `var sparky = Dog(name: "Sparky")` .β΅hmm, but i'm going to create a ref object instead, just think if there is a better to write rather everytime `(ref Dog)(name: "Sparky")` |
14:30:43 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=fIlUpXvXpokc |
14:31:42 | FromDiscord | <threefour> (edit) "https://play.nim-lang.org/#pasty=HuEQeeSWljQO" => "https://play.nim-lang.org/#pasty=DJPztklFkfmC" |
14:31:52 | FromDiscord | <threefour> (Sorry to interrupt) |
14:32:08 | FromDiscord | <nervecenter> Basically the only reason to make a `ref` afaik is if you want it to be heap-managed. `var` defaults scoped to its initial stack frame. So `ref` is like C++ `shared_ptr` and `var` is like `unique_ptr`. |
14:32:34 | FromDiscord | <nervecenter> In reply to @jaar23 "i agreed with you,": Basically the only reason to make a `ref` afaik is if you want it to be heap-managed. `var` defaults scoped to its initial stack frame. So `ref` is like C++ `shared_ptr` and `var` is like `unique_ptr`. |
14:34:24 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#pasty=oCUWQdBdlRbf |
14:35:05 | FromDiscord | <exelotl> this is what Nim's standard library style guide recommends: https://nim-lang.org/docs/nep1.html#style-guidelines-naming-conventions |
14:35:36 | FromDiscord | <jaar23> In reply to @nervecenter "Basically the only reason": yea, i wanted it to be `ref` for shared |
14:40:01 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=zwDCahxSoWNX |
14:41:04 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=dystAnFHidTt |
14:41:39 | FromDiscord | <nervecenter> Need to dereference the `Dog` to get the underlying `DogObj` object for stuff like `echo` |
14:41:56 | FromDiscord | <jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=QrKsUIrurAlt |
14:42:55 | FromDiscord | <jaar23> i'm able to initialize the ref object and do `echo sparkly.name` fine. gues dereference might not needed |
14:43:23 | FromDiscord | <nervecenter> The dereference is only if you need the whole object, `.` calls to properties automatically dereference |
14:43:49 | FromDiscord | <jaar23> ah, i see. |
14:44:12 | FromDiscord | <jaar23> yea, i think is a nice example. |
14:45:40 | FromDiscord | <jaar23> this is what i like about nim, where it is flexible enough for dev to do what they want and others (at least the community) will know what it want do.. |
14:48:14 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=mITxIcsislVS |
14:48:51 | FromDiscord | <nervecenter> But that basically gets back to the `(ref Dog)` you were already doing |
14:49:19 | FromDiscord | <nervecenter> A matter of opinion I suppose |
14:49:56 | FromDiscord | <jaar23> In reply to @nervecenter "A matter of opinion": yes |
15:18:56 | * | ntat joined #nim |
15:59:44 | * | def- quit (Quit: -) |
16:00:41 | * | def- joined #nim |
16:22:41 | * | rockcavera joined #nim |
17:07:00 | * | def- quit (Quit: -) |
17:07:46 | * | def- joined #nim |
17:16:01 | * | end quit (Quit: end) |
17:16:01 | * | bcksl quit (Quit: \) |
17:33:11 | * | bcksl joined #nim |
17:39:17 | FromDiscord | <morgan> ok so i might have to use actual OOP in my code |
17:39:35 | * | def- quit (Quit: -) |
17:39:52 | * | def- joined #nim |
17:40:06 | FromDiscord | <morgan> i wanna have a seq of objects, which contain (ptrs to) procs, but i also want each to contain its own state |
17:40:20 | FromDiscord | <morgan> but that's gonna vary between each |
17:40:48 | * | end joined #nim |
17:41:01 | FromDiscord | <morgan> if i could do collections of different generics, that would work |
17:41:17 | FromDiscord | <morgan> but i don't think that will work |
17:41:42 | FromDiscord | <morgan> i could also have untyped pointers |
17:43:34 | FromDiscord | <Robyn [She/Her]> In reply to @morganalyssa "i wanna have a": Couldn't you use an object then? |
17:44:03 | FromDiscord | <the_real_hypno> Wondering aswell, all doable with plain objects |
17:45:09 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=icqsZfoXRhdc |
17:45:33 | FromDiscord | <Robyn [She/Her]> The state is going vary, wait |
17:45:35 | FromDiscord | <Robyn [She/Her]> Hm |
17:45:49 | FromDiscord | <Robyn [She/Her]> Would a case object and an enum be suitable here? @morgan |
17:46:12 | FromDiscord | <the_real_hypno> Composition, no? |
17:47:04 | FromDiscord | <morgan> i could, if they are all of one generic type, where the generic type is the data, and the user sets that up as a variant type with each kind of data. but ideally each could be separate |
17:47:05 | FromDiscord | <the_real_hypno> (edit) "Composition, no?" => "Composition? Should be working aswell" |
17:47:39 | FromDiscord | <the_real_hypno> Composition! |
17:47:58 | FromDiscord | <morgan> the tldr of what i'm doing, is for my audio plugin stuff, i decided it would be neat to have a seq of audio processors, so you could define one thing, and then use 10 instances of it, or use one written by someone else |
17:49:25 | FromDiscord | <morgan> the other wrinkle, which i'll have to ask about somewhere else, is setting up an additional data buffer or two at the beginning of the process call |
17:54:34 | FromDiscord | <morgan> i wonder if it would be easier to have a macro which writes a variant type out of every type in the collection (which could be set ahead of time), and rewrite the constructor to be a seq of that variant type, where each is set to its kind |
18:34:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=OrdfyOqJkCTJ |
18:35:47 | FromDiscord | <Elegantbeef> This also works with nimcall of course. Indeed just sill OOP though |
18:45:57 | * | PMunch joined #nim |
18:48:05 | FromDiscord | <morgan> interesting |
19:02:47 | * | tiorock joined #nim |
19:02:47 | * | rockcavera quit (Killed (tungsten.libera.chat (Nickname regained by services))) |
19:02:48 | * | tiorock is now known as rockcavera |
19:14:10 | * | PMunch quit (Quit: Leaving) |
19:14:27 | * | PMunch joined #nim |
19:19:59 | * | PMunch quit (Quit: Leaving) |
19:20:16 | * | PMunch joined #nim |
19:20:53 | * | ntat quit (Quit: Leaving) |
19:39:34 | FromDiscord | <aqeelyn> Guys, which of these lsp is best to use ? https://media.discordapp.net/attachments/371759389889003532/1232415588203237439/image.png?ex=66295ff5&is=66280e75&hm=9bba8ce22c8f8f5102addb23ef41ae31bc89c1d1508b8afd3e6ec20ef898a60f& |
19:56:04 | * | krux02_ quit (Remote host closed the connection) |
19:56:52 | * | fallback joined #nim |
19:57:11 | * | krux02 joined #nim |
20:03:23 | * | krux02_ joined #nim |
20:05:41 | * | krux02 quit (Ping timeout: 240 seconds) |
20:13:43 | FromDiscord | <Elegantbeef> The lang server is what's generally suggested now |
20:14:56 | FromDiscord | <Phil> ~~Not by me it isn't~~ |
20:16:37 | FromDiscord | <Elegantbeef> Works on my machine |
20:17:32 | FromDiscord | <Phil> ~~Code raw with only syntax highlighting like vscode intended~~ |
20:17:44 | FromDiscord | <Phil> ~~Let the compiler be your guide of where you fucked up~~ |
20:19:48 | FromDiscord | <Elegantbeef> The year is 1902 |
20:20:30 | FromDiscord | <solitudesf> In reply to @isofruit "~~Code raw with only": this is how people cope with their nimsuggest not working |
20:33:49 | FromDiscord | <Elegantbeef> What a weird issue last night Nim's default allocator was causing a memory issue with my QuadTree.... but today it's fine |
20:33:58 | FromDiscord | <Elegantbeef> I did nothing to my system in between this |
20:45:05 | FromDiscord | <typevs> the year is 2853 |
20:45:09 | FromDiscord | <typevs> my nimsuggest keeps crashing |
20:45:38 | FromDiscord | <Elegantbeef> Have you asked it not to? |
20:45:52 | FromDiscord | <typevs> um |
20:45:54 | FromDiscord | <typevs> well |
20:45:56 | * | PMunch quit (Quit: Leaving) |
20:45:58 | FromDiscord | <typevs> good idea |
22:37:25 | FromDiscord | <griffith1deadly> nimsuggest will always be slow & crashing |
22:46:24 | FromDiscord | <Elegantbeef> The oracle demands it |
23:16:44 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "*Works on my machine*": Not on my machine π |
23:17:06 | FromDiscord | <Elegantbeef> Guess we'll have to ship my machine around |
23:18:13 | * | def- quit (Quit: -) |
23:20:24 | * | def- joined #nim |
23:44:19 | FromDiscord | <Robyn [She/Her]> Truly the most portable solution lol |
23:44:55 | FromDiscord | <Robyn [She/Her]> I do genuinely wonder if a rewrite of Nimsuggest from scratch would be useful |
23:45:00 | FromDiscord | <Elegantbeef> No it's my desktop not my laptop |
23:45:06 | FromDiscord | <Elegantbeef> No cause it's the compiler |
23:45:26 | FromDiscord | <Robyn [She/Her]> But the compiler compiles code just fine |
23:45:40 | FromDiscord | <Elegantbeef> Right, but the compiler does not attempt to recover from a failure |
23:45:48 | FromDiscord | <Robyn [She/Her]> The lsp crashes every time an edit is made in my project lol |
23:46:11 | FromDiscord | <Elegantbeef> Tooling built on top of the compiler needs to be able to incrementally compile without hard crashing |
23:46:18 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Right, but the compiler": That's... True |
23:46:39 | FromDiscord | <Elegantbeef> Does your nimsuggest crash on loading of a file or when modifying a file? |
23:46:43 | FromDiscord | <Robyn [She/Her]> Nimsuggest seems to segfault so maybe it's a computer bug |
23:47:21 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Does your nimsuggest crash": Modifying, but this happens on any change, even changing a valid identifier to an invalid one |
23:47:47 | FromDiscord | <Robyn [She/Her]> I talked about the issue in the tooling channel a day or so ago, btw |
23:47:48 | FromDiscord | <Elegantbeef> Even on a new empty Nim file? |
23:48:41 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Even on a new": Haven't tried that, the root file seems fine, iirc my lexer file is fine, but the parser file in my repo has crashes |
23:49:01 | FromDiscord | <Robyn [She/Her]> I can't test anything out right now since I'm heading to sleep in a bit unfortunately |
23:49:02 | FromDiscord | <the_real_hypno> Abuse docgen |
23:49:11 | FromDiscord | <the_real_hypno> docgen > nimsuggest |
23:49:52 | FromDiscord | <Elegantbeef> Right if that's the case then you should build a debug nimsuggest and do `nimsuggest file` then `chk1` until it crashes to get a stack trace then attempt to minimise it π |
23:50:27 | FromDiscord | <Robyn [She/Her]> In reply to @the_real_hypno "docgen > nimsuggest": For autocomplete sure ig, but wouldn't be good for error reporting |
23:50:34 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Right if that's the": Chk1? |
23:50:55 | FromDiscord | <Elegantbeef> It's a nimsuggest command |
23:51:12 | FromDiscord | <the_real_hypno> So, did you compile it again? |
23:51:13 | FromDiscord | <Robyn [She/Her]> Also the laptop is about to take off when compiling the compiler, I can't exactly rapidly test anything |
23:51:15 | FromDiscord | <the_real_hypno> else i can do now |
23:51:20 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1232478947279765544/image.png?ex=66299af7&is=66284977&hm=5cf6c0aa36fe1436ea0e5f4ae83bcb93dd49f8352116d81e0c0565339a4ab795& |
23:51:53 | FromDiscord | <Robyn [She/Her]> I haven't, I didn't have the energy to code today so was taking it slow since my exams are tomorrow and the day after |
23:51:58 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "image.png": Ah |
23:52:00 | FromDiscord | <Robyn [She/Her]> Neat |
23:52:41 | FromDiscord | <the_real_hypno> sexp.nim |
23:52:52 | FromDiscord | <the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=xrOCAgEDdKGO |
23:52:59 | FromDiscord | <the_real_hypno> andreas is a major troll |
23:55:14 | FromDiscord | <Robyn [She/Her]> `my.kind in {sexp...`? |
23:55:21 | FromDiscord | <Robyn [She/Her]> Is that a racist joke lmao |
23:55:29 | FromDiscord | <the_real_hypno> Just look through the code |
23:55:31 | FromDiscord | <Robyn [She/Her]> If it is it'd be a bit funny |
23:55:36 | FromDiscord | <Robyn [She/Her]> I can't right now |
23:55:40 | FromDiscord | <the_real_hypno> its so obvious that someone was trolling |
23:55:42 | * | def- quit (Quit: -) |
23:55:49 | FromDiscord | <Robyn [She/Her]> Damn |
23:56:50 | * | def- joined #nim |
23:57:04 | FromDiscord | <the_real_hypno> Ok so |
23:57:13 | FromDiscord | <the_real_hypno> i recompiled with 8k |
23:57:40 | FromDiscord | <Robyn [She/Her]> It'll likely still crash, the issue seems like a segfault |
23:57:41 | FromDiscord | <the_real_hypno> looking at the actual usage shows that it peaks at only 620 |
23:58:05 | FromDiscord | <the_real_hypno> mh |
23:58:11 | FromDiscord | <the_real_hypno> its actually quite smooth |
23:58:23 | FromDiscord | <the_real_hypno> let me import winim, thats usually a death sentence |
23:58:34 | FromDiscord | <Robyn [She/Her]> Yeah, segfault seems like the likely culprit to me |
23:59:48 | FromDiscord | <Elegantbeef> Well when you get time run with debug nimsuggest and find the culprit line π |