<< 23-04-2024 >>

00:16:24termeryeah, your name is The Real Hypno
00:28:24*def- quit (Quit: -)
00:28:36*def- joined #nim
01:05:12FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=CAPxpkwjhDIz
01:25:35FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=ZReJZDfpdmTi
01:26:09FromDiscord<threefour> (edit) "https://play.nim-lang.org/#pasty=MVpExPMGZkjh" => "https://play.nim-lang.org/#pasty=XYBpExhjESOg"
01:32:24FromDiscord<sOkam! 🫐> In reply to @threefour "I see this in": that api does not exist anymore
01:33:46FromDiscord<sOkam! 🫐> oh wait, or am I blind↡it does exist in the new implementation
01:33:57FromDiscord<sOkam! 🫐> let me try it again, idk why it didn't work before
01:37:28FromDiscord<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:36FromDiscord<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:35FromDiscord<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:33FromDiscord<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:12FromDiscord<drunkenalcoholic> (edit) "https://play.nim-lang.org/#pasty=uEyDMFVOrPkE" => "https://play.nim-lang.org/#pasty=kfeKtESOikGu"
08:01:37FromDiscord<Elegantbeef> Use the `start` parameter
08:02:29FromDiscord<drunkenalcoholic> for contence I am trying to extract the volume level
08:02:32FromDiscord<drunkenalcoholic> https://media.discordapp.net/attachments/371759389889003532/1232240173438205963/image.png?ex=6628bc97&is=66276b17&hm=ab9e7b1d2be854f8e2d3bf2979fc876c575c82247f7a0b87c8946d7992f70948&
08:02:54FromDiscord<drunkenalcoholic> @ElegantBeef Thanks I will go look that up how to use the start parameter
08:03:03FromDiscord<Elegantbeef> I'd say stop using string operations and move up to `strscans`
08:03:46FromDiscord<drunkenalcoholic> hmm I will check that also
08:04:09FromDiscord<Elegantbeef> It's way better and much less silly than using a bunch of find operations
08:05:38FromDiscord<nnsee> In reply to @drunkenalcoholic "hmm I will check": I also recommend looking into npeg
08:05:47FromDiscord<drunkenalcoholic> npeg?
08:06:25*def- joined #nim
08:06:37FromDiscord<nnsee> In reply to @drunkenalcoholic "npeg?": https://github.com/zevv/npeg
08:08:45FromDiscord<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:59FromDiscord<nnsee> bear in mind that npeg is very powerful and very likely overkill for your specific use case
08:10:07FromDiscord<nnsee> but it's useful to learn and know imo
08:20:50*def- quit (Quit: -)
08:31:51FromDiscord<drunkenalcoholic> Thanks, I will defiantly check it out, as I do want to learn as much as I can
08:34:20FromDiscord<drunkenalcoholic> sent a code paste, see https://play.nim-lang.org/#pasty=kaDabnNXdYkD
08:34:24FromDiscord<drunkenalcoholic> seems to work
08:38:27*def- joined #nim
08:56:32FromDiscord<pmunch> Could also do `input.split(" / ")[1]`
08:57:41FromDiscord<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:37FromDiscord<drunkenalcoholic> @pmunch yeap exactly
09:07:10FromDiscord<drunkenalcoholic> I actually used split in ram memory code
09:17:24FromDiscord<Elegantbeef> Everytime someone uses split to parse a dog dies
09:18:57*fallback quit (Read error: Connection reset by peer)
09:20:21NimEventerNew Nimble package! shellcmd - Collection of Terminal commands to be used inside nim, see https://github.com/Alogani/shellcmd
09:20:21NimEventerNew Nimble package! asyncproc - Flexible child process spawner with strong async features, see https://github.com/Alogani/asyncproc
09:20:25NimEventerNew 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:29NimEventerNew Nimble package! asyncio - Async files and streams tools, see https://github.com/Alogani/asyncio
09:20:33NimEventerNew Nimble package! asyncsync - Async primitives working on std/asyncdispatch, see https://github.com/Alogani/asyncsync
09:20:37NimEventerNew 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:43FromDiscord<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:28FromDiscord<jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=ybWdLvcAFbxf
14:10:22FromDiscord<the_real_hypno> There is none, atleast thats what people told me
14:15:40FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=sgQtqoncDVvs
14:17:03FromDiscord<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:19FromDiscord<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:43FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=fIlUpXvXpokc
14:31:42FromDiscord<threefour> (edit) "https://play.nim-lang.org/#pasty=HuEQeeSWljQO" => "https://play.nim-lang.org/#pasty=DJPztklFkfmC"
14:31:52FromDiscord<threefour> (Sorry to interrupt)
14:32:08FromDiscord<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:34FromDiscord<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:24FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#pasty=oCUWQdBdlRbf
14:35:05FromDiscord<exelotl> this is what Nim's standard library style guide recommends: https://nim-lang.org/docs/nep1.html#style-guidelines-naming-conventions
14:35:36FromDiscord<jaar23> In reply to @nervecenter "Basically the only reason": yea, i wanted it to be `ref` for shared
14:40:01FromDiscord<jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=zwDCahxSoWNX
14:41:04FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=dystAnFHidTt
14:41:39FromDiscord<nervecenter> Need to dereference the `Dog` to get the underlying `DogObj` object for stuff like `echo`
14:41:56FromDiscord<jaar23> sent a code paste, see https://play.nim-lang.org/#pasty=QrKsUIrurAlt
14:42:55FromDiscord<jaar23> i'm able to initialize the ref object and do `echo sparkly.name` fine. gues dereference might not needed
14:43:23FromDiscord<nervecenter> The dereference is only if you need the whole object, `.` calls to properties automatically dereference
14:43:49FromDiscord<jaar23> ah, i see.
14:44:12FromDiscord<jaar23> yea, i think is a nice example.
14:45:40FromDiscord<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:14FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=mITxIcsislVS
14:48:51FromDiscord<nervecenter> But that basically gets back to the `(ref Dog)` you were already doing
14:49:19FromDiscord<nervecenter> A matter of opinion I suppose
14:49:56FromDiscord<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:17FromDiscord<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:06FromDiscord<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:20FromDiscord<morgan> but that's gonna vary between each
17:40:48*end joined #nim
17:41:01FromDiscord<morgan> if i could do collections of different generics, that would work
17:41:17FromDiscord<morgan> but i don't think that will work
17:41:42FromDiscord<morgan> i could also have untyped pointers
17:43:34FromDiscord<Robyn [She/Her]> In reply to @morganalyssa "i wanna have a": Couldn't you use an object then?
17:44:03FromDiscord<the_real_hypno> Wondering aswell, all doable with plain objects
17:45:09FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=icqsZfoXRhdc
17:45:33FromDiscord<Robyn [She/Her]> The state is going vary, wait
17:45:35FromDiscord<Robyn [She/Her]> Hm
17:45:49FromDiscord<Robyn [She/Her]> Would a case object and an enum be suitable here? @morgan
17:46:12FromDiscord<the_real_hypno> Composition, no?
17:47:04FromDiscord<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:05FromDiscord<the_real_hypno> (edit) "Composition, no?" => "Composition? Should be working aswell"
17:47:39FromDiscord<the_real_hypno> Composition!
17:47:58FromDiscord<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:25FromDiscord<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:34FromDiscord<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:44FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=OrdfyOqJkCTJ
18:35:47FromDiscord<Elegantbeef> This also works with nimcall of course. Indeed just sill OOP though
18:45:57*PMunch joined #nim
18:48:05FromDiscord<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:34FromDiscord<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:43FromDiscord<Elegantbeef> The lang server is what's generally suggested now
20:14:56FromDiscord<Phil> ~~Not by me it isn't~~
20:16:37FromDiscord<Elegantbeef> Works on my machine
20:17:32FromDiscord<Phil> ~~Code raw with only syntax highlighting like vscode intended~~
20:17:44FromDiscord<Phil> ~~Let the compiler be your guide of where you fucked up~~
20:19:48FromDiscord<Elegantbeef> The year is 1902
20:20:30FromDiscord<solitudesf> In reply to @isofruit "~~Code raw with only": this is how people cope with their nimsuggest not working
20:33:49FromDiscord<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:58FromDiscord<Elegantbeef> I did nothing to my system in between this
20:45:05FromDiscord<typevs> the year is 2853
20:45:09FromDiscord<typevs> my nimsuggest keeps crashing
20:45:38FromDiscord<Elegantbeef> Have you asked it not to?
20:45:52FromDiscord<typevs> um
20:45:54FromDiscord<typevs> well
20:45:56*PMunch quit (Quit: Leaving)
20:45:58FromDiscord<typevs> good idea
22:37:25FromDiscord<griffith1deadly> nimsuggest will always be slow & crashing
22:46:24FromDiscord<Elegantbeef> The oracle demands it
23:16:44FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "*Works on my machine*": Not on my machine πŸ™ƒ
23:17:06FromDiscord<Elegantbeef> Guess we'll have to ship my machine around
23:18:13*def- quit (Quit: -)
23:20:24*def- joined #nim
23:44:19FromDiscord<Robyn [She/Her]> Truly the most portable solution lol
23:44:55FromDiscord<Robyn [She/Her]> I do genuinely wonder if a rewrite of Nimsuggest from scratch would be useful
23:45:00FromDiscord<Elegantbeef> No it's my desktop not my laptop
23:45:06FromDiscord<Elegantbeef> No cause it's the compiler
23:45:26FromDiscord<Robyn [She/Her]> But the compiler compiles code just fine
23:45:40FromDiscord<Elegantbeef> Right, but the compiler does not attempt to recover from a failure
23:45:48FromDiscord<Robyn [She/Her]> The lsp crashes every time an edit is made in my project lol
23:46:11FromDiscord<Elegantbeef> Tooling built on top of the compiler needs to be able to incrementally compile without hard crashing
23:46:18FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Right, but the compiler": That's... True
23:46:39FromDiscord<Elegantbeef> Does your nimsuggest crash on loading of a file or when modifying a file?
23:46:43FromDiscord<Robyn [She/Her]> Nimsuggest seems to segfault so maybe it's a computer bug
23:47:21FromDiscord<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:47FromDiscord<Robyn [She/Her]> I talked about the issue in the tooling channel a day or so ago, btw
23:47:48FromDiscord<Elegantbeef> Even on a new empty Nim file?
23:48:41FromDiscord<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:01FromDiscord<Robyn [She/Her]> I can't test anything out right now since I'm heading to sleep in a bit unfortunately
23:49:02FromDiscord<the_real_hypno> Abuse docgen
23:49:11FromDiscord<the_real_hypno> docgen > nimsuggest
23:49:52FromDiscord<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:27FromDiscord<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:34FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Right if that's the": Chk1?
23:50:55FromDiscord<Elegantbeef> It's a nimsuggest command
23:51:12FromDiscord<the_real_hypno> So, did you compile it again?
23:51:13FromDiscord<Robyn [She/Her]> Also the laptop is about to take off when compiling the compiler, I can't exactly rapidly test anything
23:51:15FromDiscord<the_real_hypno> else i can do now
23:51:20FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1232478947279765544/image.png?ex=66299af7&is=66284977&hm=5cf6c0aa36fe1436ea0e5f4ae83bcb93dd49f8352116d81e0c0565339a4ab795&
23:51:53FromDiscord<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:58FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "image.png": Ah
23:52:00FromDiscord<Robyn [She/Her]> Neat
23:52:41FromDiscord<the_real_hypno> sexp.nim
23:52:52FromDiscord<the_real_hypno> sent a code paste, see https://play.nim-lang.org/#pasty=xrOCAgEDdKGO
23:52:59FromDiscord<the_real_hypno> andreas is a major troll
23:55:14FromDiscord<Robyn [She/Her]> `my.kind in {sexp...`?
23:55:21FromDiscord<Robyn [She/Her]> Is that a racist joke lmao
23:55:29FromDiscord<the_real_hypno> Just look through the code
23:55:31FromDiscord<Robyn [She/Her]> If it is it'd be a bit funny
23:55:36FromDiscord<Robyn [She/Her]> I can't right now
23:55:40FromDiscord<the_real_hypno> its so obvious that someone was trolling
23:55:42*def- quit (Quit: -)
23:55:49FromDiscord<Robyn [She/Her]> Damn
23:56:50*def- joined #nim
23:57:04FromDiscord<the_real_hypno> Ok so
23:57:13FromDiscord<the_real_hypno> i recompiled with 8k
23:57:40FromDiscord<Robyn [She/Her]> It'll likely still crash, the issue seems like a segfault
23:57:41FromDiscord<the_real_hypno> looking at the actual usage shows that it peaks at only 620
23:58:05FromDiscord<the_real_hypno> mh
23:58:11FromDiscord<the_real_hypno> its actually quite smooth
23:58:23FromDiscord<the_real_hypno> let me import winim, thats usually a death sentence
23:58:34FromDiscord<Robyn [She/Her]> Yeah, segfault seems like the likely culprit to me
23:59:48FromDiscord<Elegantbeef> Well when you get time run with debug nimsuggest and find the culprit line πŸ˜„