<< 23-02-2024 >>

00:01:50FromDiscord<Robyn [She/Her]> Reading through all of it, very informative!
00:01:55FromDiscord<Robyn [She/Her]> Also that makes sense now
00:04:47FromDiscord<Robyn [She/Her]> Beef, the home button redirects to `/writeups` instead of `/writeups.html` which raises an error-
00:07:28FromDiscord<Elegantbeef> Cool
00:07:32FromDiscord<Elegantbeef> I cannot fix that
00:08:44FromDiscord<Elegantbeef> I mean I can modify the generate html, but nimib has no way to override that
00:16:04FromDiscord<Robyn [She/Her]> Ah, that's irritating
00:16:15FromDiscord<Elegantbeef> Not for e
00:16:17FromDiscord<Elegantbeef> me\
00:16:28FromDiscord<Robyn [She/Her]> It is for me, as someone trying to browse the site :p
00:16:44FromDiscord<Elegantbeef> Yea don't do that
00:17:42FromDiscord<Robyn [She/Her]> Why tho-
00:18:09FromDiscord<Elegantbeef> There's nothing important there but docs, the writeups and uhh nothing else
00:20:03FromDiscord<Robyn [She/Her]> Fair enough
01:39:40FromDiscord<mratsim> In reply to @chronos.vitaqua "Hm... Should I use": If I can I use concepts, it's like a contract.↡Sometimes I need both to solve some early resolution of generic symbols
01:41:21FromDiscord<Robyn [She/Her]> Fair! Seem useful to use concepts where possible
01:41:43FromDiscord<bosinski2023> In reply to @mratsim "If I can I": yes, and if they would work in all aspects, then one could define 'interfaces' which is not yet possible, but would be really nice πŸ™‚
01:42:19FromDiscord<zumi.dxy> Still somehow can't understand concepts fully, though that might be on me for comparing it to `interface` so often
01:42:31FromDiscord<zumi.dxy> "How do I do <java pattern> in Nim"
01:43:03FromDiscord<zumi.dxy> `method` still exists at least
01:44:30FromDiscord<jakraes> Is there a way to use case of for checking object types?
01:45:44FromDiscord<jakraes> sent a code paste, see https://play.nim-lang.org/#pasty=GCxYtYTwjOKG
01:45:51FromDiscord<jakraes> (edit) "https://play.nim-lang.org/#pasty=zurzBWibziHi" => "https://play.nim-lang.org/#pasty=MHVSelJKiOVH"
01:47:30FromDiscord<Elegantbeef> https://github.com/beef331/traitor πŸ˜›β†΅(@zumi.dxy)
01:48:02FromDiscord<Elegantbeef> @jakraes nope `of` only works for ordinals(and floats I think) and strings
01:48:06FromDiscord<Elegantbeef> Well `case`
01:48:18FromDiscord<jakraes> Gotcha
01:48:32FromDiscord<jakraes> Thank you :) I guess I'll be using ifs then
01:48:39FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim you can of course use `CaseStmt` macros or something like this
01:48:42FromDiscord<Elegantbeef> Ideally you do not use OOP though πŸ˜›
01:49:26FromDiscord<jakraes> It's hard to not use OOP stuff when you have the possibility ;p
01:49:35FromDiscord<Elegantbeef> It really isn't
01:50:29FromDiscord<jakraes> Well, at least for me, after programming in Java for so long, it's hard to break some habits
01:52:54FromDiscord<Elegantbeef> You also could use traitor πŸ˜›
01:53:32FromDiscord<Elegantbeef> Though likely best to just use object variants or https://github.com/alaviss/union
01:54:00FromDiscord<Robyn [She/Her]> In reply to @zumi.dxy "Still somehow can't understand": I think of them as generic constraints
01:54:39FromDiscord<Elegantbeef> Where's are very own @JJ to say "New style concepts are just interfaces, OOP languages cannot name sit"
01:54:41FromDiscord<Elegantbeef> our very own\
01:56:25FromDiscord<zumi.dxy> if traitor lets me make FactoryFactoryFactory types in Nim I can finally call Nim Enterprise Readyℒ️ πŸ˜›
01:56:39FromDiscord<Elegantbeef> It probably does
01:56:59FromDiscord<Elegantbeef> But yea concepts are just "user defined duck types"
01:57:10FromDiscord<Elegantbeef> You say how a type must quack
01:57:46FromDiscord<Elegantbeef> does it have a `quack` proc, does it have a `wings` field, does it have a `beakLength`....
02:01:25FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=QfMIkuZsDcBC
02:01:29FromDiscord<zumi.dxy> `Atom` is roughly the equivalent of `self` right?
02:01:29FromDiscord<Elegantbeef> Duck example πŸ˜›
02:01:36FromDiscord<Elegantbeef> Yes
02:02:50FromDiscord<Elegantbeef> But I'll knife you if you name a parameter self
02:04:10FromDiscord<zumi.dxy> `mixin` is new to me πŸ‘€β†΅is this like "declaring `thing` exists before it's defined" or something
02:04:33FromDiscord<im__cynical> moving off discord to revoult
02:04:57FromDiscord<zumi.dxy> open and closed symbols... may need to read up on it
02:12:28FromDiscord<Elegantbeef> Scroll up πŸ˜›
02:12:39FromDiscord<Elegantbeef> I linked my codereuse article that mentions what mixin does
02:12:57FromDiscord<Elegantbeef> Ideally when you use concepts though no procedures are required before the concepts
02:15:28FromDiscord<Elegantbeef> Though some are scared of concepts in that they can explode in your face
02:15:58*derpydoo joined #nim
02:17:25FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> sent a code paste, see https://play.nim-lang.org/#pasty=oWnHoKEOaTdz
02:17:57FromDiscord<Elegantbeef> `/INCLUDESECTION/` at the start of your emit string
02:18:13FromDiscord<Elegantbeef> Though really you should just do `importc, header: "header.h"`
02:19:16FromDiscord<Elegantbeef> You also can do `passC"-include ..."`
02:19:27FromDiscord<Elegantbeef> Though that's ugly and against people's sensibillities
02:19:54FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> so best option is to use `importc, header:..`?
02:20:08FromDiscord<Elegantbeef> Yes
02:20:24FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> alright, thanks!
02:30:50FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> I've tried this `proc WHBProcInit: void {.importc: "WHBProcInit", header: "<whb/proc.h>".}` however it is still undefined.
02:32:11FromDiscord<Elegantbeef> is `whb` in your `-I` path?
02:32:53FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> i guess not? i am still compiling with the `--cincludes` flag
02:33:39FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> how do I set that?
02:33:53FromDiscord<Elegantbeef> `--passC:"-Iyour/path/to/whb`
02:35:54FromDiscord<Elegantbeef> No clue what whb is though
02:36:17FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> whb is one of the libraries for the wiiu homebrew stuff
02:36:43FromDiscord<Elegantbeef> Does it have a `pkg-config` file?
02:37:14FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> no
02:38:24FromDiscord<Elegantbeef> Would be a lot cooler if it id
02:38:24FromDiscord<Elegantbeef> did\
02:41:04FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> it is still undefined, same error. ↡`nim c --cincludes:/opt/devkitpro/wut/include --passC:"-I/opt/devkitpro/wut/include" main.nim`
02:42:25FromDiscord<Elegantbeef> Are you sure that's the proc name?
02:43:01FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> yes, im actually trying to rewrite my c code which does us the same function
02:44:24FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> sent a code paste, see https://play.nim-lang.org/#pasty=ngYBQLgVXyRf
02:46:16FromDiscord<Elegantbeef> What's your entire Nim procdef?
02:48:17FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> sent a code paste, see https://play.nim-lang.org/#pasty=wLkiwtFSCedq
02:48:32FromDiscord<Elegantbeef> `proc WHBProcInit: void {.importc: "WHBProcInit", header: "<whb/proc.h>".}` is a proc def
02:48:51FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> got it
02:49:54FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> ive replaced the WHBProcInit profdef with printf substituting the correct values and that worked
02:49:54FromDiscord<Elegantbeef> Did you link anything when using this in C?
02:50:45FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> oh ive forgotten about the cmake file
02:50:59FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> i am not sure if it links against anything
02:51:20FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> sent a code paste, see https://play.nim-lang.org/#pasty=jWZgaKaNfZkU
02:51:30FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> not sure if this helps
02:51:32FromDiscord<Elegantbeef> It also seems it does have a pkg-config
02:51:35FromDiscord<Elegantbeef> I could be wrong
02:52:29FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> ive found a file called `powerpc-eabi-pkg-config`
02:52:45FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> /opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-pkg-config
02:53:08FromDiscord<Elegantbeef> does `pkg-config --cflags libwhb` work?
02:53:16FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> sent a code paste, see https://play.nim-lang.org/#pasty=AznfZIrIIeZt
02:53:58FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> pkg-config --static "$@"
02:54:29FromDiscord<␀ Array πŸ‡΅πŸ‡Έ πŸ‰> says package not found
03:04:58FromDiscord<Elegantbeef> Hmmph it does not have a pkg-config file sadly
03:05:40FromDiscord<JJ> In reply to @zumi.dxy "Still somehow can't understand": new-style concepts are just interfaces!
03:05:49FromDiscord<JJ> (hi beef)
03:05:56FromDiscord<Elegantbeef> Hello
03:06:09FromDiscord<Elegantbeef> You might find my traitor rewrite nifty
03:06:09FromDiscord<Elegantbeef> Or hellish
03:06:16FromDiscord<JJ> old-style concepts are like, arbitrary compile-time duck-typing
03:06:17FromDiscord<JJ> ooh
03:06:31FromDiscord<JJ> i will take a look at it. been swamped these past few months with school
03:06:42FromDiscord<Elegantbeef> https://github.com/beef331/traitor to save you searching
03:09:15*disso-peach quit (Quit: Leaving)
04:23:44*azimut quit (Ping timeout: 255 seconds)
06:34:01FromDiscord<hydrogen45> nimble.directory down ?
06:34:11FromDiscord<hydrogen45> I am getting 502 Bad gateway
07:00:46*advesperacit joined #nim
07:13:25*jkl quit (Quit: Gone.)
08:13:04*rockcavera quit (Remote host closed the connection)
08:35:49FromDiscord<xsty_> yeah I had the same issue like 12 hours ago
08:35:54*casaca quit (Remote host closed the connection)
08:35:54*ursa-major quit (Remote host closed the connection)
08:35:54*adigitoleo quit (Remote host closed the connection)
08:35:55*mronetwo quit (Remote host closed the connection)
08:35:56*noeontheend quit (Remote host closed the connection)
08:36:07*adigitoleo joined #nim
08:36:09*mronetwo joined #nim
08:36:29*casaca joined #nim
08:36:31*ursa-major joined #nim
08:36:38*noeontheend joined #nim
10:12:50NimEventerNew thread by enaaab460: Static checking of strings, see https://forum.nim-lang.org/t/11067
11:15:14NimEventerNew thread by hamidrb80: Leave parenthesis for procedures that take 0 parameters like Ruby, see https://forum.nim-lang.org/t/11069
11:28:19*azimut joined #nim
12:22:39NimEventerNew thread by uzo2005: How to define a range type with holes, see https://forum.nim-lang.org/t/11070
12:37:00FromDiscord<bung8954> is there a way extend nimble support like `product_name = "xx"` just like `name = "xx"`?
12:42:54*ntat joined #nim
12:46:23FromDiscord<Robyn [She/Her]> In reply to @hydrogen45 "nimble.directory down ?": https://nimpkgs.dayl.in/ this is an alternative if you want it
13:36:14*krux02 joined #nim
13:42:07*rockcavera joined #nim
14:21:22*ntat quit (Quit: Leaving)
14:54:19*tauruuuuus joined #nim
14:58:21*tauruuuuus quit (Client Quit)
15:04:48*dtomato1 is now known as dtomato
15:23:14FromDiscord<grumblygibson> Tips for tracking down what is implicitly importing `memfiles.nim`?
15:24:10*xet7 quit (Ping timeout: 246 seconds)
15:26:46FromDiscord<grumblygibson> πŸ˜“ found it - buried deep in one of my own secondary files. Still, would be nice to know if there are ways to detect modules that are importing specific other modules. But it's a minor curiosity at the moment.
15:28:06*lucasta joined #nim
15:52:42FromDiscord<kiloneie> How do you shut off the warning of `proc is declared but not used` for a specific proc, when the proc is in fact being used ?
15:54:41FromDiscord<odexine> doesnt the {.used.} pragma do that
15:55:24FromDiscord<kiloneie> yes, that's it, i glossed over it today, but forgot the name
16:00:11FromDiscord<Robyn [She/Her]> Nim has gotten me so used to static typing that it's weird to not use type hints in Python
16:00:18*lucasta quit (Remote host closed the connection)
16:00:51FromDiscord<kiloneie> In reply to @chronos.vitaqua "Nim has gotten me": Had the same reaction yesterday when writting some python code for comparison for a video
16:01:46FromDiscord<kiloneie> Dynamic typing is great for when you first start programming. A month or so into that, you are gonna hate your life.
16:04:17FromDiscord<Robyn [She/Her]> How would I check if I can set an attribute in a concept? `h.currentHealth = string`?
16:04:33FromDiscord<Robyn [She/Her]> In reply to @kiloneie "Dynamic typing is great": Yeaaaah, also it forces you to be less lazy which is useful
16:31:56FromDiscord<Robyn [She/Her]> Assuming it's not possible to set an immutable field :p
16:39:28FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "How would I check": Seems correct
16:40:01FromDiscord<Robyn [She/Her]> Also, is there something like `ConceptOne and ConceptTwo` but with `and` as a symbol instead?
16:40:31*junaid_ joined #nim
16:40:38FromDiscord<Robyn [She/Her]> I prefer `A | B` more than `A or B`, so `A & B` would be nicer than `A and B` imo
16:41:03FromDiscord<Robyn [She/Her]> I could probably make that easily tbf
16:41:57FromDiscord<Robyn [She/Her]> Done
16:45:53FromDiscord<maker_of_mischief> is it possible to fiddle with global variables in a gcsafe proc?
16:46:26*junaid_ quit (Remote host closed the connection)
16:51:38FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "Seems correct": It is not
16:51:57FromDiscord<Robyn [She/Her]> In reply to @maker_of_mischief "is it possible to": Well, you could use a gcsafe block
16:52:02FromDiscord<Robyn [She/Her]> It's not safe but
17:19:27FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "How would I check": Hey Beef, you know if it's possible for me to check if a field is mutable in a concept?
17:59:35*krux02 quit (Remote host closed the connection)
17:59:53*junaid_ joined #nim
18:38:33*jmdaemon joined #nim
19:25:37*pbsds quit (Ping timeout: 264 seconds)
19:28:27*jkl joined #nim
19:31:41*pbsds joined #nim
19:35:17*xutaxkamay quit (Ping timeout: 240 seconds)
19:39:12*xutaxkamay joined #nim
20:39:43FromDiscord<Elegantbeef> `theVal.field = default(theVal.field)`↡(@Robyn [She/Her])
20:40:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=htZTmBsIpnUF
20:44:04FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "`theVal.field = default(theVal.field)` (<@524288464": Seems reasonable to me
20:44:27FromDiscord<Robyn [She/Her]> Though maybe it's a bad idea to check mutability everywhere, because some things you probably don't need to or want to mutate
20:45:09FromDiscord<Elegantbeef> I mean if a field is required to be mutable for an API...
20:47:42*xet7 joined #nim
20:52:15FromDiscord<Robyn [She/Her]> It's not required to be mutable everywhere though, only in some situations
21:02:24FromDiscord<Elegantbeef> What?
21:13:24FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=YMujdfUbHbMt
21:13:31FromDiscord<Robyn [She/Her]> I think that conveys what I'm trying to say better?
21:14:41*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
21:14:49FromDiscord<Elegantbeef> If your proc that operates on `HealthConcept` does not need to have mutable fields why would you check they're mutable?
21:15:37*xutaxkamay joined #nim
21:16:19FromDiscord<Robyn [She/Her]> I think I'm just over complicating stuff
21:16:41FromDiscord<Robyn [She/Her]> Ignore me, I'm not using my brain
21:22:53*junaid_ quit (Remote host closed the connection)
21:40:11*robertmeta quit (Ping timeout: 252 seconds)
21:43:01NimEventerNew thread by giuliano: Funny sink behavior with refc, see https://forum.nim-lang.org/t/11072
21:45:23*robertmeta joined #nim
21:45:51*fallback quit (Read error: Connection reset by peer)
21:47:03NimEventerNew thread by giuliano: Sink parameters not being copied even when there are later reads (refc), see https://forum.nim-lang.org/t/11073
22:12:26*fallback joined #nim
22:16:29*def- quit (Quit: -)
22:17:16*krux02 joined #nim
22:20:43*xet7 quit (Remote host closed the connection)
22:22:46*def- joined #nim
22:49:49*arkanoid joined #nim
22:52:24arkanoidthree years into following nim/vscode interaction, three years of bugs. The most stable solution is still pmunch nimlsp + bung87 vscode extension. Nimlangserver is not handling signals correctly, vscode official extension fails to understand it's own configuration
22:56:26FromDiscord<Robyn [She/Her]> Is there any features that nimlsp lacks that nimlangserver has? How about the other way around?
22:59:07arkanoidboth nimlsp and nimlangserver rely on nimsuggest for the logic, but while the first imports nimsuggest src code on compilation, the seconds uses ipc/signals to spawn child nimsuggest processes (and fails to manage them in my experience)
22:59:49arkanoidso both "use" the same nimsuggest output. I don't know the exact comparison
23:00:15arkanoidbut there's more. Nimlangserver fails to do basic things, like honor user configuration
23:01:12arkanoidin particular "getProjectFileAutoGuess" is overwriting what you declare as nim.project or nim.projectMapping in favor of nimble file https://github.com/nim-lang/langserver/blob/3eb83dabfba18f079fca72f1b72199f01beb13b5/nimlangserver.nim#L139
23:01:16FromDiscord<Robyn [She/Her]> Fair enough
23:01:41FromDiscord<Robyn [She/Her]> In reply to @arkanoid "in particular "getProjectFileAutoGuess" is": Ah
23:04:03arkanoidfor example I now have "src/foo.nim" in nim.project + "bin = @["foo"]" in bar.nimble, yet on vscode launch nimsuggest is executed on a file named "src/bar.nim"
23:04:42FromDiscord<Robyn [She/Her]> Aah, yeah I can see why that's annoying
23:04:42arkanoidbasically the setup is not compatible when you have two artifacts
23:05:43arkanoidalso when I close vscode I have to manually call "kill nimlangserver" manually
23:16:39FromDiscord<Robyn [She/Her]> That's irritating I can imagine
23:23:55arkanoidit is. I have filed detailed bugs, but it seems like I am the only one fighting these
23:26:22FromDiscord<JJ> nimlangserver development appears to be back on. somebody fixed several long-time bugs, apparently at least: https://github.com/nim-lang/RFCs/issues/544
23:26:45FromDiscord<JJ> (i've yet to actually see if they're fixed. the "spawns stuck processes" bug has been "fixed" before iirc)
23:27:33FromDiscord<JJ> oh, rip, i see your issue
23:49:49FromDiscord<jmgomez> In reply to @arkanoid "for example I now": that's probably a legacy issue an must fixed. Please, report it if it isnt reported already
23:49:57FromDiscord<jmgomez> (edit) "an" => "and"
23:51:20FromDiscord<jmgomez> In reply to @arkanoid "so both "use" the": both use NimSuggest but in different ways. AFAIK only nimlangserver uses the latest version of the nimsuggest protocol which has some speed ups (although still slow in big projects)