00:01:50 | FromDiscord | <Robyn [She/Her]> Reading through all of it, very informative! |
00:01:55 | FromDiscord | <Robyn [She/Her]> Also that makes sense now |
00:04:47 | FromDiscord | <Robyn [She/Her]> Beef, the home button redirects to `/writeups` instead of `/writeups.html` which raises an error- |
00:07:28 | FromDiscord | <Elegantbeef> Cool |
00:07:32 | FromDiscord | <Elegantbeef> I cannot fix that |
00:08:44 | FromDiscord | <Elegantbeef> I mean I can modify the generate html, but nimib has no way to override that |
00:16:04 | FromDiscord | <Robyn [She/Her]> Ah, that's irritating |
00:16:15 | FromDiscord | <Elegantbeef> Not for e |
00:16:17 | FromDiscord | <Elegantbeef> me\ |
00:16:28 | FromDiscord | <Robyn [She/Her]> It is for me, as someone trying to browse the site :p |
00:16:44 | FromDiscord | <Elegantbeef> Yea don't do that |
00:17:42 | FromDiscord | <Robyn [She/Her]> Why tho- |
00:18:09 | FromDiscord | <Elegantbeef> There's nothing important there but docs, the writeups and uhh nothing else |
00:20:03 | FromDiscord | <Robyn [She/Her]> Fair enough |
01:39:40 | FromDiscord | <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:21 | FromDiscord | <Robyn [She/Her]> Fair! Seem useful to use concepts where possible |
01:41:43 | FromDiscord | <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:19 | FromDiscord | <zumi.dxy> Still somehow can't understand concepts fully, though that might be on me for comparing it to `interface` so often |
01:42:31 | FromDiscord | <zumi.dxy> "How do I do <java pattern> in Nim" |
01:43:03 | FromDiscord | <zumi.dxy> `method` still exists at least |
01:44:30 | FromDiscord | <jakraes> Is there a way to use case of for checking object types? |
01:45:44 | FromDiscord | <jakraes> sent a code paste, see https://play.nim-lang.org/#pasty=GCxYtYTwjOKG |
01:45:51 | FromDiscord | <jakraes> (edit) "https://play.nim-lang.org/#pasty=zurzBWibziHi" => "https://play.nim-lang.org/#pasty=MHVSelJKiOVH" |
01:47:30 | FromDiscord | <Elegantbeef> https://github.com/beef331/traitor πβ΅(@zumi.dxy) |
01:48:02 | FromDiscord | <Elegantbeef> @jakraes nope `of` only works for ordinals(and floats I think) and strings |
01:48:06 | FromDiscord | <Elegantbeef> Well `case` |
01:48:18 | FromDiscord | <jakraes> Gotcha |
01:48:32 | FromDiscord | <jakraes> Thank you :) I guess I'll be using ifs then |
01:48:39 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim you can of course use `CaseStmt` macros or something like this |
01:48:42 | FromDiscord | <Elegantbeef> Ideally you do not use OOP though π |
01:49:26 | FromDiscord | <jakraes> It's hard to not use OOP stuff when you have the possibility ;p |
01:49:35 | FromDiscord | <Elegantbeef> It really isn't |
01:50:29 | FromDiscord | <jakraes> Well, at least for me, after programming in Java for so long, it's hard to break some habits |
01:52:54 | FromDiscord | <Elegantbeef> You also could use traitor π |
01:53:32 | FromDiscord | <Elegantbeef> Though likely best to just use object variants or https://github.com/alaviss/union |
01:54:00 | FromDiscord | <Robyn [She/Her]> In reply to @zumi.dxy "Still somehow can't understand": I think of them as generic constraints |
01:54:39 | FromDiscord | <Elegantbeef> Where's are very own @JJ to say "New style concepts are just interfaces, OOP languages cannot name sit" |
01:54:41 | FromDiscord | <Elegantbeef> our very own\ |
01:56:25 | FromDiscord | <zumi.dxy> if traitor lets me make FactoryFactoryFactory types in Nim I can finally call Nim Enterprise Readyβ’οΈ π |
01:56:39 | FromDiscord | <Elegantbeef> It probably does |
01:56:59 | FromDiscord | <Elegantbeef> But yea concepts are just "user defined duck types" |
01:57:10 | FromDiscord | <Elegantbeef> You say how a type must quack |
01:57:46 | FromDiscord | <Elegantbeef> does it have a `quack` proc, does it have a `wings` field, does it have a `beakLength`.... |
02:01:25 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=QfMIkuZsDcBC |
02:01:29 | FromDiscord | <zumi.dxy> `Atom` is roughly the equivalent of `self` right? |
02:01:29 | FromDiscord | <Elegantbeef> Duck example π |
02:01:36 | FromDiscord | <Elegantbeef> Yes |
02:02:50 | FromDiscord | <Elegantbeef> But I'll knife you if you name a parameter self |
02:04:10 | FromDiscord | <zumi.dxy> `mixin` is new to me πβ΅is this like "declaring `thing` exists before it's defined" or something |
02:04:33 | FromDiscord | <im__cynical> moving off discord to revoult |
02:04:57 | FromDiscord | <zumi.dxy> open and closed symbols... may need to read up on it |
02:12:28 | FromDiscord | <Elegantbeef> Scroll up π |
02:12:39 | FromDiscord | <Elegantbeef> I linked my codereuse article that mentions what mixin does |
02:12:57 | FromDiscord | <Elegantbeef> Ideally when you use concepts though no procedures are required before the concepts |
02:15:28 | FromDiscord | <Elegantbeef> Though some are scared of concepts in that they can explode in your face |
02:15:58 | * | derpydoo joined #nim |
02:17:25 | FromDiscord | <β Array π΅πΈ π> sent a code paste, see https://play.nim-lang.org/#pasty=oWnHoKEOaTdz |
02:17:57 | FromDiscord | <Elegantbeef> `/INCLUDESECTION/` at the start of your emit string |
02:18:13 | FromDiscord | <Elegantbeef> Though really you should just do `importc, header: "header.h"` |
02:19:16 | FromDiscord | <Elegantbeef> You also can do `passC"-include ..."` |
02:19:27 | FromDiscord | <Elegantbeef> Though that's ugly and against people's sensibillities |
02:19:54 | FromDiscord | <β Array π΅πΈ π> so best option is to use `importc, header:..`? |
02:20:08 | FromDiscord | <Elegantbeef> Yes |
02:20:24 | FromDiscord | <β Array π΅πΈ π> alright, thanks! |
02:30:50 | FromDiscord | <β Array π΅πΈ π> I've tried this `proc WHBProcInit: void {.importc: "WHBProcInit", header: "<whb/proc.h>".}` however it is still undefined. |
02:32:11 | FromDiscord | <Elegantbeef> is `whb` in your `-I` path? |
02:32:53 | FromDiscord | <β Array π΅πΈ π> i guess not? i am still compiling with the `--cincludes` flag |
02:33:39 | FromDiscord | <β Array π΅πΈ π> how do I set that? |
02:33:53 | FromDiscord | <Elegantbeef> `--passC:"-Iyour/path/to/whb` |
02:35:54 | FromDiscord | <Elegantbeef> No clue what whb is though |
02:36:17 | FromDiscord | <β Array π΅πΈ π> whb is one of the libraries for the wiiu homebrew stuff |
02:36:43 | FromDiscord | <Elegantbeef> Does it have a `pkg-config` file? |
02:37:14 | FromDiscord | <β Array π΅πΈ π> no |
02:38:24 | FromDiscord | <Elegantbeef> Would be a lot cooler if it id |
02:38:24 | FromDiscord | <Elegantbeef> did\ |
02:41:04 | FromDiscord | <β Array π΅πΈ π> it is still undefined, same error. β΅`nim c --cincludes:/opt/devkitpro/wut/include --passC:"-I/opt/devkitpro/wut/include" main.nim` |
02:42:25 | FromDiscord | <Elegantbeef> Are you sure that's the proc name? |
02:43:01 | FromDiscord | <β Array π΅πΈ π> yes, im actually trying to rewrite my c code which does us the same function |
02:44:24 | FromDiscord | <β Array π΅πΈ π> sent a code paste, see https://play.nim-lang.org/#pasty=ngYBQLgVXyRf |
02:46:16 | FromDiscord | <Elegantbeef> What's your entire Nim procdef? |
02:48:17 | FromDiscord | <β Array π΅πΈ π> sent a code paste, see https://play.nim-lang.org/#pasty=wLkiwtFSCedq |
02:48:32 | FromDiscord | <Elegantbeef> `proc WHBProcInit: void {.importc: "WHBProcInit", header: "<whb/proc.h>".}` is a proc def |
02:48:51 | FromDiscord | <β Array π΅πΈ π> got it |
02:49:54 | FromDiscord | <β Array π΅πΈ π> ive replaced the WHBProcInit profdef with printf substituting the correct values and that worked |
02:49:54 | FromDiscord | <Elegantbeef> Did you link anything when using this in C? |
02:50:45 | FromDiscord | <β Array π΅πΈ π> oh ive forgotten about the cmake file |
02:50:59 | FromDiscord | <β Array π΅πΈ π> i am not sure if it links against anything |
02:51:20 | FromDiscord | <β Array π΅πΈ π> sent a code paste, see https://play.nim-lang.org/#pasty=jWZgaKaNfZkU |
02:51:30 | FromDiscord | <β Array π΅πΈ π> not sure if this helps |
02:51:32 | FromDiscord | <Elegantbeef> It also seems it does have a pkg-config |
02:51:35 | FromDiscord | <Elegantbeef> I could be wrong |
02:52:29 | FromDiscord | <β Array π΅πΈ π> ive found a file called `powerpc-eabi-pkg-config` |
02:52:45 | FromDiscord | <β Array π΅πΈ π> /opt/devkitpro/portlibs/wiiu/bin/powerpc-eabi-pkg-config |
02:53:08 | FromDiscord | <Elegantbeef> does `pkg-config --cflags libwhb` work? |
02:53:16 | FromDiscord | <β Array π΅πΈ π> sent a code paste, see https://play.nim-lang.org/#pasty=AznfZIrIIeZt |
02:53:58 | FromDiscord | <β Array π΅πΈ π> pkg-config --static "$@" |
02:54:29 | FromDiscord | <β Array π΅πΈ π> says package not found |
03:04:58 | FromDiscord | <Elegantbeef> Hmmph it does not have a pkg-config file sadly |
03:05:40 | FromDiscord | <JJ> In reply to @zumi.dxy "Still somehow can't understand": new-style concepts are just interfaces! |
03:05:49 | FromDiscord | <JJ> (hi beef) |
03:05:56 | FromDiscord | <Elegantbeef> Hello |
03:06:09 | FromDiscord | <Elegantbeef> You might find my traitor rewrite nifty |
03:06:09 | FromDiscord | <Elegantbeef> Or hellish |
03:06:16 | FromDiscord | <JJ> old-style concepts are like, arbitrary compile-time duck-typing |
03:06:17 | FromDiscord | <JJ> ooh |
03:06:31 | FromDiscord | <JJ> i will take a look at it. been swamped these past few months with school |
03:06:42 | FromDiscord | <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:01 | FromDiscord | <hydrogen45> nimble.directory down ? |
06:34:11 | FromDiscord | <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:49 | FromDiscord | <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:50 | NimEventer | New thread by enaaab460: Static checking of strings, see https://forum.nim-lang.org/t/11067 |
11:15:14 | NimEventer | New 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:39 | NimEventer | New thread by uzo2005: How to define a range type with holes, see https://forum.nim-lang.org/t/11070 |
12:37:00 | FromDiscord | <bung8954> is there a way extend nimble support like `product_name = "xx"` just like `name = "xx"`? |
12:42:54 | * | ntat joined #nim |
12:46:23 | FromDiscord | <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:14 | FromDiscord | <grumblygibson> Tips for tracking down what is implicitly importing `memfiles.nim`? |
15:24:10 | * | xet7 quit (Ping timeout: 246 seconds) |
15:26:46 | FromDiscord | <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:42 | FromDiscord | <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:41 | FromDiscord | <odexine> doesnt the {.used.} pragma do that |
15:55:24 | FromDiscord | <kiloneie> yes, that's it, i glossed over it today, but forgot the name |
16:00:11 | FromDiscord | <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:51 | FromDiscord | <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:46 | FromDiscord | <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:17 | FromDiscord | <Robyn [She/Her]> How would I check if I can set an attribute in a concept? `h.currentHealth = string`? |
16:04:33 | FromDiscord | <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:56 | FromDiscord | <Robyn [She/Her]> Assuming it's not possible to set an immutable field :p |
16:39:28 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "How would I check": Seems correct |
16:40:01 | FromDiscord | <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:38 | FromDiscord | <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:03 | FromDiscord | <Robyn [She/Her]> I could probably make that easily tbf |
16:41:57 | FromDiscord | <Robyn [She/Her]> Done |
16:45:53 | FromDiscord | <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:38 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "Seems correct": It is not |
16:51:57 | FromDiscord | <Robyn [She/Her]> In reply to @maker_of_mischief "is it possible to": Well, you could use a gcsafe block |
16:52:02 | FromDiscord | <Robyn [She/Her]> It's not safe but |
17:19:27 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> `theVal.field = default(theVal.field)`β΅(@Robyn [She/Her]) |
20:40:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=htZTmBsIpnUF |
20:44:04 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "`theVal.field = default(theVal.field)` (<@524288464": Seems reasonable to me |
20:44:27 | FromDiscord | <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:09 | FromDiscord | <Elegantbeef> I mean if a field is required to be mutable for an API... |
20:47:42 | * | xet7 joined #nim |
20:52:15 | FromDiscord | <Robyn [She/Her]> It's not required to be mutable everywhere though, only in some situations |
21:02:24 | FromDiscord | <Elegantbeef> What? |
21:13:24 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=YMujdfUbHbMt |
21:13:31 | FromDiscord | <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:49 | FromDiscord | <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:19 | FromDiscord | <Robyn [She/Her]> I think I'm just over complicating stuff |
21:16:41 | FromDiscord | <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:01 | NimEventer | New 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:03 | NimEventer | New 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:24 | arkanoid | three 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:26 | FromDiscord | <Robyn [She/Her]> Is there any features that nimlsp lacks that nimlangserver has? How about the other way around? |
22:59:07 | arkanoid | both 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:49 | arkanoid | so both "use" the same nimsuggest output. I don't know the exact comparison |
23:00:15 | arkanoid | but there's more. Nimlangserver fails to do basic things, like honor user configuration |
23:01:12 | arkanoid | in 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:16 | FromDiscord | <Robyn [She/Her]> Fair enough |
23:01:41 | FromDiscord | <Robyn [She/Her]> In reply to @arkanoid "in particular "getProjectFileAutoGuess" is": Ah |
23:04:03 | arkanoid | for 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:42 | FromDiscord | <Robyn [She/Her]> Aah, yeah I can see why that's annoying |
23:04:42 | arkanoid | basically the setup is not compatible when you have two artifacts |
23:05:43 | arkanoid | also when I close vscode I have to manually call "kill nimlangserver" manually |
23:16:39 | FromDiscord | <Robyn [She/Her]> That's irritating I can imagine |
23:23:55 | arkanoid | it is. I have filed detailed bugs, but it seems like I am the only one fighting these |
23:26:22 | FromDiscord | <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:45 | FromDiscord | <JJ> (i've yet to actually see if they're fixed. the "spawns stuck processes" bug has been "fixed" before iirc) |
23:27:33 | FromDiscord | <JJ> oh, rip, i see your issue |
23:49:49 | FromDiscord | <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:57 | FromDiscord | <jmgomez> (edit) "an" => "and" |
23:51:20 | FromDiscord | <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) |