<< 23-12-2023 >>

00:08:31*azimut quit (Ping timeout: 240 seconds)
02:05:17FromDiscord<albassort> @Phil if i go to germany can i be invited to the Nim convention
02:05:36FromDiscord<albassort> i guess i should ask Araq
02:06:09FromDiscord<albassort> Araq would absolutely hate me as a person lol
02:21:52FromDiscord<inventormatt> There are no in person nim conventions at this point in time. Only virtual conferences
02:26:36NimEventerNew Nimble package! sudoku - sudoku generator in nim., see https://github.com/roberto170/sudoku
02:37:32FromDiscord<albassort> In reply to @inventormatt "There are no in": that would be fun tho
02:51:44NimEventerNew thread by Nlits: Ptr byte to cstring?, see https://forum.nim-lang.org/t/10799
02:55:42*rockcavera quit (Remote host closed the connection)
03:23:32*zgasma quit (Quit: Lost terminal)
03:26:19FromDiscord<MDuardo> Anyone using Neovim TreeSitter for Neovim?↡It refuses to work
03:26:33FromDiscord<Elegantbeef> Whose?
03:32:36FromDiscord<MDuardo> I don't know exactly what TreeSitter is used with `:TSInstall nim`in AstronvimBut fails to compile
03:33:12FromDiscord<MDuardo> Screenshot from 2023-12-22 22-12-08.png https://media.discordapp.net/attachments/371759389889003532/1187961076336304229/Screenshot_from_2023-12-22_22-12-08.png?ex=6598c9f7&is=658654f7&hm=1de54280a8040b0cbc0df155d94ad82e65510ba0bd8361f6857b7742eb13ea8a&
03:33:20FromDiscord<Elegantbeef> It should use leorize's iirc
03:33:51FromDiscord<Elegantbeef> I just reinstalled it fine
03:34:48FromDiscord<MDuardo> I want to ask on the repo but I'm not sure if it's a Astronvim problem or it's a problem with TreeSitter
03:35:24FromDiscord<MDuardo> And what is most strange is that fails compiling but sometimes TS somehow runs and shows highlighted text, sometimes not
03:42:28FromDiscord<Elegantbeef> I'd say make an issue on leo's https://github.com/alaviss/tree-sitter-nim
04:02:09FromDiscord<MDuardo> Yeah, it is!
04:02:11FromDiscord<leorize> looks like a nvim-treesitter bug to me
04:03:50FromDiscord<leorize> it's working fine on my side so it could be something with your setup, you can try creating an issue at nvim-treesitter/nvim-treesitter, the nim maintainer there is very responsive
04:04:14FromDiscord<MDuardo> Thanks, I'll make a report then
04:09:17FromDiscord<MDuardo> I can use Nim in Helix for now
04:16:31FromDiscord<leorize> yep, I can't reproduce that bug, what version of neovim were you running?
04:17:36FromDiscord<leorize> looks like helix is still using the old parser
04:18:12FromDiscord<leorize> there are talks in upstream tree-sitter about standardizing queries between editors, hopefully that will let helix support be brought up-to-date as well
04:56:24FromDiscord<zectbumo> it seems to me that the EVFILT_ constants are missing↡https://nim-lang.org/docs/kqueue.html#10
05:12:37FromDiscord<leorize> same as mine, I guess it boils down to the configuration
05:12:39FromDiscord<MDuardo> You can check the report here
05:12:41FromDiscord<MDuardo> https://github.com/nvim-treesitter/nvim-treesitter/issues/5824
05:12:43FromDiscord<MDuardo> 0.9.4
05:12:45FromDiscord<leorize> if you don't mind something out-of-tree\: https://github.com/alaviss/nim-sys/blob/master/src/sys/private/syscall/bsd/kqueue.nim↡(@zectbumo)
05:24:06*xet7 quit (Remote host closed the connection)
05:40:49FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
05:41:15FromDiscord<Elegantbeef> Using a template
05:41:23FromDiscord<Elegantbeef> Parameters are replace verbatim then the code is expanded
05:41:37FromDiscord<Elegantbeef> there is no `file` injected into scope
05:41:46FromDiscord<Elegantbeef> Use `strutils.%`
05:41:47FromDiscord<sOkam! 🫐> oh true, i remember that happening before
05:45:32FromDiscord<MDuardo> "Those who cannot remember the past are condemned to repeat it"
05:46:01FromDiscord<MDuardo> I had to said it, sorry
05:58:08FromDiscord<sOkam! 🫐> yup, that's me 🐠
06:11:09*rockcavera joined #nim
06:33:08*azimut joined #nim
07:57:06FromDiscord<zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html>
07:57:43*derpydoo joined #nim
08:09:49FromDiscord<demotomohiro> How about to use let instead of var?
08:10:38FromDiscord<demotomohiro> It seems they are already in Nim's stdlib https://github.com/nim-lang/Nim/blob/devel/lib/posix/kqueue.nim
08:28:40FromDiscord<zectbumo> oh, thank you for pointing that out and for the let suggestion. I was going off of the docs, which does not mention EVFILT_ constants. Maybe the source is the way to go. Any reason why the docs wouldn't mention these?
08:36:28FromDiscord<Phil> In reply to @albassort "<@180601887916163073> if i go": Best I can do is invite you to Berlin without a convention attached
08:36:45FromDiscord<Phil> Can't promise invites to things that don't exist πŸ˜…
08:54:59FromDiscord<zectbumo> thanks all for your help. I got my nim program working. nim is really great. I'm really excited about it
08:55:45*jmdaemon joined #nim
08:58:38FromDiscord<Elegantbeef> This message was written by an AI
09:34:52FromDiscord<Phil> We all know you're an instance of grok running on a toaster beef, no need to hide
09:35:05FromDiscord<Elegantbeef> What's a 'grok'
09:37:42FromDiscord<Phil> Musk's LLM, for the extra smidge of humiliation
09:48:51FromDiscord<.destynova> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:52:23FromDiscord<sOkam! 🫐> is there no `contains` for enum values?↡I thought it was in `std/enumutils` but can't seem to find it πŸ€”
09:55:08FromDiscord<Elegantbeef> Why do you need `contains` for enums
09:55:36FromDiscord<demotomohiro> In reply to @.destynova "I'm encountering this behaviour": You probably need to implement hash function for `PackedSet[int]`.
09:55:37FromDiscord<sOkam! 🫐> to check if I added a new enum entry but forgot to check the code that calls it correctly
09:56:01FromDiscord<Elegantbeef> I do not follow
09:56:22FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:56:54FromDiscord<Elegantbeef> but `lang` would be a `LangId` no?
09:57:28FromDiscord<sOkam! 🫐> I think I see what you mean
09:57:37FromDiscord<sOkam! 🫐> in that it is redundant πŸ€”
09:57:45FromDiscord<Elegantbeef> The question is what are you needing to check
09:58:56FromDiscord<Elegantbeef> Do you want to check if an integer matches an enum value, a string matches a enum name, ....
09:59:53FromDiscord<sOkam! 🫐> I'm revamping the examples of confy, and they all will have the exact same folder structure, but small command and folder changes↡So I want to give the function a langID and let the function solve the rest↡But I shouldn't allow that to happen for new langs that have not been implemented yet↡I think I'm approaching it incorrectly, though, so pointing that enum ids are always part of their enum is already helpful enough
10:00:15FromDiscord<Elegantbeef> `parseEnum[T]` should suffice
10:01:25FromDiscord<sOkam! 🫐> i didn't know about that one
10:01:33FromDiscord<sOkam! 🫐> how would you use it, though? not sure I follow your thinking
10:02:14FromDiscord<selfref> is there an async sqlite interface?
10:02:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
10:02:58FromDiscord<sOkam! 🫐> In reply to @selfref "is there an async": i don't know if `db_connector/sqlite` can be made async, but that's what I've used for sqlite so far
10:03:57FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
10:04:54FromDiscord<Elegantbeef> Sadly there is no option variant of `parseEnum`
10:04:56FromDiscord<selfref> thread safety is key requirement
10:04:56FromDiscord<selfref> need that for web server backend
10:04:58FromDiscord<Elegantbeef> I swear if you do not use `array[LangId, ...]` for the handlers.... πŸ˜›
10:05:46FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "*I swear if you": handlers?
10:06:30FromDiscord<Elegantbeef> I don't know I suspected you'd just dispatch procs inside of an array
10:06:32FromDiscord<Elegantbeef> I don't know what you're doing
10:06:54FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
10:07:50FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "I don't know I": ah no, they are the exact same proc, they just call `withDir someDir: exec someCmd`
10:12:20FromDiscord<selfref> https://github.com/nim-lang/db_connector/blob/devel/src/db_connector/sqlite3.nim#L29 where is sqlite.c ?
10:13:50FromDiscord<sOkam! 🫐> In reply to @selfref "https://github.com/nim-lang/db_connector/blob/devel": nowhere. its not static linking, its dynamic linking to these files https://media.discordapp.net/attachments/371759389889003532/1188061901658263562/image.png?ex=659927de&is=6586b2de&hm=63da1b5dd095b0958bc114a0b36dc98e7b084de860c1e7945877a68d4fd1b216&
10:14:17FromDiscord<sOkam! 🫐> oh wait ignore me
10:14:17FromDiscord<selfref> but when defined(staticSqlite)
10:14:27FromDiscord<sOkam! 🫐> yeah totally misread
10:15:00FromDiscord<selfref> it seems like that module has no control over sqlite, it uses dynamic one or builds with default flags
10:15:10FromDiscord<selfref> i want thread safety flags, FTS5
10:15:18FromDiscord<selfref> is there a package with that?
10:15:35FromDiscord<sOkam! 🫐> it must be expecting it to be somewhere in the target system? πŸ€”
10:16:03FromDiscord<selfref> it can't, systems dont give you way to search for .c files
10:16:56FromDiscord<selfref> i'm not sure but it could be bug
10:17:09FromDiscord<sOkam! 🫐> In reply to @selfref "it can't, systems dont": you could wrap the amalgamated version with futhark and change whatever you need in your setup
10:17:50FromDiscord<sOkam! 🫐> In reply to @selfref "i'm not sure but": does it error if you define that flag?
10:18:11FromDiscord<selfref> i dont' have proper system setup at the moment to test
10:19:03FromDiscord<selfref> https://github.com/codehz/easy_sqlite3/blob/develop/src/easy_sqlite3/bindings.nim#L25
10:19:13FromDiscord<selfref> fortunately someone did it for me
10:19:20FromDiscord<selfref> not .c file existance in the directory
10:20:52FromDiscord<selfref> https://www.sqlite.org/threadsafe.html ok it's amazing
10:21:07FromDiscord<selfref> you can call sqlite using single connection from multiple threads
10:23:00FromDiscord<selfref> So i want to import easy\_sqlite3 and add define bundled\_sqlite3
10:23:08FromDiscord<selfref> how do you add those defines?
10:24:04FromDiscord<selfref> some kind of config.nims?
10:24:16FromDiscord<sOkam! 🫐> wdym? new ones?
10:24:50FromDiscord<selfref> I just want imported package to see that definition
10:25:07FromDiscord<selfref> had trouble searching docs for that
10:27:53FromDiscord<sOkam! 🫐> `--passC:"-DSOMETHING"`
10:28:34FromDiscord<sOkam! 🫐> it will be applied to all of your project, though. so if you want to add them only for the sqlite files, you need to fork easy_sqlite3 and modify the list
10:28:58FromDiscord<sOkam! 🫐> should be fine, unless that define clashes with something else
10:29:26FromDiscord<selfref> just --define\:bundled\_sqlite3
10:32:03FromDiscord<sOkam! 🫐> In reply to @selfref "just --define\:bundled\_sqlite3": that will define it for nim, im not convinced if that is passed to the C compiler
10:32:49FromDiscord<selfref> it needs to be passed to num for `if defined()` nim code
10:34:42FromDiscord<sOkam! 🫐> ah that's from easy_sqlite3... ok, then its just `-d:bundled_sqlite3` yeah
10:39:19*azimut quit (Ping timeout: 240 seconds)
10:39:58*azimut joined #nim
10:49:51FromDiscord<selfref> is there production-ready http server for nim?
10:50:27FromDiscord<intellij_gamer> [mummy](https://github.com/guzba/mummy) might fit the bill. Guzba has made a few posts on the forum about using it in production
10:53:14FromDiscord<selfref> it doesn't have a way to send part of response like streaming video
10:53:15FromDiscord<selfref> ok i'll probably write my own one
10:53:35FromDiscord<selfref> what about async io? if I echo abcdef from 1000 threads, will it always print abcdef or sometimes it can print abcdabcdefef?
11:15:21FromDiscord<intellij_gamer> There's also [httpx](https://github.com/ringabout/httpx) which you can do streaming via `unsafeSend` but I don't know any site that uses it in production
11:22:44FromDiscord<Phil> I mean, I use it via prologue, works decently fine for me.↡However, my site runs on a 1-thread server with 1 gb of RAM and is mostly private, so take that as you will
12:31:04*jmdaemon quit (Ping timeout: 256 seconds)
12:35:41*om3ga quit (Ping timeout: 256 seconds)
13:39:31FromDiscord<Phil> Hmmm I have a typescetion node containing 1 nnkTypeDef.↡I want a symnode from that nnkTypeDef Node, how do I do that?
13:40:01FromDiscord<Phil> I see bindSym but I don't quite grok that one
13:43:58FromDiscord<Phil> Particularly since bindSym complains (when calling it from a macro) about the variables I'm calling it with not being compiletime
13:56:58FromDiscord<Phil> Argh, no I was being silly, I didn't need it.↡I just forget an assignment elsewhere and that was hidden to me
14:12:51FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
14:13:58FromDiscord<Phil> @michaelb.eth in case you have an opinion
14:15:17FromDiscord<michaelb.eth> coming along nicely!
14:18:05FromDiscord<Phil> The amount of code I'm generating as starting to go beyond worrying me slightly, but I feel like given the fairly thorough docs on both doc comments and the nimibook docs that it should be manageable
14:19:37FromDiscord<michaelb.eth> are the `properties:` threadvar?
14:21:15FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
14:21:50FromDiscord<Phil> So not really a threadvar, but a set of variables available throughout the thread (if you want it and write a custom `runServerLoop` proc)
14:23:41FromDiscord<Phil> In reply to @michaelb.eth "are the `properties:` threadvar?": Was the above understandable? I'm never too certain if my mental model is easy to understand ^^'
14:32:56FromDiscord<michaelb.eth> I get the idea, for sure
14:33:48FromDiscord<michaelb.eth> it's nice that the setup/teardown logic has a declarative shape to it
14:50:06FromDiscord<Phil> Now I just need to rewrite all my examples to use this new logic and update the docs and add a page that explains the entire "threadServer" bit
15:15:59FromDiscord<pmunch> In reply to @inventormatt "There are no in": We usually meet up during FOSDEM though πŸ™‚
15:30:07*azimut quit (Ping timeout: 240 seconds)
16:20:28FromDiscord<Prestige> I'm trying to use a local version of one of my libraries inside another project, how do I use that version instead? I tried to `nimble develop` in the library's repo, but the other project still just downloads the latest version
16:20:46FromDiscord<Phil> In reply to @avahe "I'm trying to use": Honestly I just use `--path`
16:20:46FromDiscord<Prestige> It's not published via nimble so it's just a github link
16:21:17FromDiscord<Phil> It's what I use for compiling e.g. examples with my libraries that are inside the repo and use said library
16:22:46FromDiscord<Prestige> `Specifies the path whether the packages should be cloned.` does this mean I should point to somewhere in my `~/.nimble/pkgs2` dir and my other project should just pick it up?
16:23:25FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
16:23:28FromDiscord<Prestige> I could've sworn `nimble develop` was how I did it previously but it's not working, now
16:24:07FromDiscord<Phil> In reply to @avahe "I could've sworn `nimble": It is, the new nimble version that comes with nim 2.0. changed how nimble develop works.↡I couldn't tell you in detail why it was changed, I never used it
16:24:22FromDiscord<Phil> It was always just `--path:` for me which I found more reliable
16:24:32FromDiscord<Phil> And easier to reason about
16:24:33FromDiscord<nnsee> In reply to @avahe "I could've sworn `nimble": it was a very unpopular change
16:25:12FromDiscord<nnsee> you're not alone in this, there's (multiple) issues raised about this on the nimble github
16:25:28FromDiscord<Prestige> dang I hope they at least add a new feature so we can do something similar, easily
16:26:02FromDiscord<Prestige> I assume I can just use `--path:/path/to/my/lib` with the nim command then eh
16:26:19FromDiscord<Phil> In reply to @avahe "dang I hope they": It's more that the recommendation is moving from nimble to atlas which works more with the mental model of "workspaces"
16:26:35FromDiscord<Prestige> oh I hadn't heard of atlas
16:26:41FromDiscord<Phil> ~~Which is too much effort for me and I don't have issues with nimble so I just keep using it, just leave me with my nimble tasks and I'm happy~~
16:27:24FromDiscord<Phil> Nimble tasks have proven to be for me the single most resilient thing in my build process.↡Easy to troubleshoot, ease to reason about, easy to write and tend to be supported by everything
16:27:35FromDiscord<Phil> (edit) "ease" => "easy"
16:28:39FromDiscord<nnsee> In reply to @avahe "dang I hope they": iirc it should still work if you use `nimble build`, but not when you use just `nim` to compile
16:29:40FromDiscord<Prestige> I'm not even clear on what `nimble build` does
16:29:51FromDiscord<Prestige> it always seems like the build tools are trying to do some magic
16:29:59FromDiscord<Phil> ~~Me neither, which is why I have a separate nimble task for that~~
16:30:46FromDiscord<Phil> Join me at the dark side of the force! We have cookies and explicitness!
16:31:16FromDiscord<Prestige> Contemplating writing my own tool for this now, lol
16:31:23FromDiscord<Prestige> for my own sake
16:31:37FromDiscord<Phil> I mean you could see if you want to contribute to atlas if its missing features you want
16:32:01FromDiscord<Phil> Always more ideal if effort consolidates in a few projects that are used by everyone, assuming the projects goals align with yours
16:32:46FromDiscord<Prestige> That's my worry
16:33:05FromDiscord<Phil> I'd say give atlas a try πŸ˜…
16:33:44FromDiscord<Phil> I think other than that there's also still nimph which is used by some
16:34:05FromDiscord<Phil> No idea who but I've been told back when I was starting out that it was an option πŸ˜…
16:34:26FromDiscord<Phil> Which has been 24 months by now so no idea if that even works with nim 2.0
16:35:54FromDiscord<Prestige> Well...I'm going to need to think about my next move
16:36:06FromDiscord<Prestige> not liking what I'm seeing about atlas tbh
16:37:06FromDiscord<Phil> TBF it has a lot more functionality than the docs let on
16:37:13FromDiscord<Phil> Because the docs are incomplete as all hell
16:37:45FromDiscord<Phil> Which I know because I originally made claims about the features I see based on the docs and promptly got corrected by Beef
16:38:48FromDiscord<nasuray> Atlas does a lot less magic it just clones them and writes the --path lines into a `nim.cfg` it's infinitely easier to reason about what it's doing than nimble
16:39:28FromDiscord<Prestige> Does it support tasks like nimble tasks? or is that just not there anymore
16:40:26FromDiscord<Phil> Yes
16:40:32FromDiscord<Phil> As in, it supports that
16:40:33FromDiscord<nasuray> Tasks are a feature of nimscript so you can write tasks in a local config.nims
16:40:55FromDiscord<Phil> I mean you can also still write them in the nimble file afaik
16:41:05FromDiscord<Phil> At least that's what I recall from my chats with beef and others about atlas
16:41:52FromDiscord<nasuray> In reply to @isofruit "I mean you can": It's atlas task taskname? Right? I just use config.nims for tasks anyways.
16:42:02FromDiscord<sOkam! 🫐> can you guys think of a way to check if `system.packageName` from nimscript exists, and ignore this set of calls on the right and use the left set of variables instead? https://media.discordapp.net/attachments/371759389889003532/1188159591746388049/image.png?ex=659982d9&is=65870dd9&hm=fb3179744e8f6b96e84819f7640a0638af932aed0b80de2be7ce9c73ca8bfef1&
16:42:19FromDiscord<Phil> In reply to @nasuray "It's atlas task taskname?": I wouldn't know, since like 100% of everything I do is nimble tasks I still haven't switched
16:42:35FromDiscord<Prestige> How do you invoke tasks in your config.nims file?
16:42:37FromDiscord<Phil> Because thanks to everything being nimble tasks and none of it being actual deeper nimble features its rocksolid and easy to understand
16:42:59FromDiscord<sOkam! 🫐> In reply to @avahe "Does it support tasks": nope, it just configures your project with the right paths
16:43:20FromDiscord<sOkam! 🫐> tasks are a nimble/nims thing, you need to create them with nimscript in some way
16:43:37FromDiscord<Phil> In reply to @heysokam "nope, it just configures": I mean "Support" is more in the sense of "can you still use the mechanism", and that's a yes
16:43:43FromDiscord<nasuray> In reply to @avahe "How do you invoke": Nim sources a config.nims. so you write tasks the same way and then just uses do example `nim build`
16:43:44FromDiscord<Phil> Mainly because nimble has not that much to do with it
16:43:50FromDiscord<Phil> afaik at least
16:44:04FromDiscord<sOkam! 🫐> In reply to @isofruit "I mean "Support" is": whats the point of atlas if you still use nimble?
16:44:08FromDiscord<sOkam! 🫐> (edit) "nimble?" => "nimble for tasks?"
16:44:34FromDiscord<nasuray> https://nim-lang.org/docs/nimscript.html
16:44:35FromDiscord<Prestige> so just `nim myTaskName`?
16:44:50FromDiscord<sOkam! 🫐> that works? πŸ€”
16:44:55FromDiscord<sOkam! 🫐> never heard of that
16:45:39FromDiscord<Phil> In reply to @heysokam "whats the point of": Very little I assume, which is why one of the reasons I don't switch because Atlas currently doesn't solve anything I'm actually annoyed by... since I'm not really annoyed by anything while using nimble tasks
16:45:40FromDiscord<Prestige> Cool, well I'm probably going to end up writing my own simple tool for this...
16:45:47FromDiscord<Prestige> package management I mean
16:45:54FromDiscord<selfref> atlas is package cloner, you'll like it if you want to mirror all your dependencies into workspace
16:46:05FromDiscord<sOkam! 🫐> In reply to @heysokam "can you guys think": @ElegantBeef can i has ur πŸͺ„ powers for this?↡is there a way to check if a variable is already defined? πŸ€”
16:46:14FromDiscord<selfref> contrary to just naming packages to download in nimble file
16:46:16FromDiscord<Phil> defined
16:46:59FromDiscord<sOkam! 🫐> In reply to @isofruit "defined": but im overriding them with my file
16:47:14FromDiscord<sOkam! 🫐> the problem is im using the same `system.THING` variables
16:47:24FromDiscord<Phil> Then this would likely need more research than I currently have the time to spare since I'm rewriting my threadButler examples πŸ˜…
16:47:59FromDiscord<sOkam! 🫐> i will trial/error it for a bit, maybe something comes up out of randomness
17:24:01FromDiscord<Phil> Okay, phew, all my examples compile now, so proof it all works in the end
17:30:15FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:30:39FromDiscord<Phil> huh... hmmm
17:31:47FromDiscord<sOkam! 🫐> discord search be like....... https://media.discordapp.net/attachments/371759389889003532/1188172110842052658/image.png?ex=65998e82&is=65871982&hm=938789e1a53ec674cc2f3e9a55c97c492b11d6202253142b208314050140b555&
17:32:09FromDiscord<sOkam! 🫐> not even a single correct hit πŸ˜„
17:33:20FromDiscord<Phil> Huh, it may be using a semi advanced tokensearch that already matches on similar words whose "distance-score" is not tooooobad
17:33:26FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:33:35FromDiscord<sOkam! 🫐> massive @hack alert, but it does work
17:33:36*azimut joined #nim
17:33:47FromDiscord<albassort> In reply to @isofruit "Huh, it may be": yoour mom uses an advanced token search
17:33:59FromDiscord<sOkam! 🫐> ?
17:34:18FromDiscord<Phil> In reply to @albassort "yoour mom uses an": God I have so many avenues to shut this one down it's hard to choose.
17:34:42FromDiscord<albassort> i bet hers wouldn
17:34:49FromDiscord<albassort> (edit) "wouldn" => "wouldnt fail likes yours just did"
17:35:02FromDiscord<griffith1deadly> In reply to @isofruit "God I have so": give this brother a banana
17:35:15FromDiscord<Phil> In reply to @heysokam "massive @hack alert, but": Honestly, while "compiles" is a massive hack it's proven... rather reliable
17:35:22FromDiscord<sOkam! 🫐> oh hey griffith, did you see the github pings?
17:35:32FromDiscord<sOkam! 🫐> In reply to @isofruit "Honestly, while "compiles" is": true that
17:35:34FromDiscord<Phil> In reply to @griffith1deadly "give this brother a": I mean be unfamiliar with the reference
17:35:38FromDiscord<Phil> may
17:35:59FromDiscord<albassort> you can write anything and write a macro which sends it to >/dev/null
17:36:09FromDiscord<griffith1deadly> In reply to @heysokam "oh hey griffith, did": you mean this? https://github.com/heysokam/confy/issues/4#issuecomment-1868223088
17:36:26FromDiscord<albassort> In reply to @albassort "you can write anything": if you just delete the tree then it compiles
17:36:38FromDiscord<albassort> (edit) "In reply to @albassort "you can write anything": if you just delete the tree ... then" added "or node"
17:36:59FromDiscord<Phil> ... are you just on a "let me try and troll everbody" trip today πŸ˜› ?
17:37:27FromDiscord<albassort> i just woke up its only beggining
17:37:34FromDiscord<sOkam! 🫐> In reply to @griffith1deadly "you mean this? https://github.com/heysokam/confy/is": yep! currently working on a refactor, hoping it doesn't go over the christmas break πŸ™ˆ
17:37:45FromDiscord<sOkam! 🫐> that refactor should take care of some of it, probably
17:38:01FromDiscord<Phil> I mean sure, but given the channel has currently a more active discussion going on I'd request during those times you keep it to #offtopic πŸ˜‰
17:38:17FromDiscord<albassort> no i have work to do, gm everyone <3
17:38:25FromDiscord<griffith1deadly> In reply to @heysokam "yep! currently working on": thank you for your hard work!
17:38:43FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
17:38:54FromDiscord<sOkam! 🫐> i thought the variable wouldn't be declared for some reason
19:03:55*jmdaemon joined #nim
19:10:48FromDiscord<s3cur3th1ssh1t> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:19:03FromDiscord<Phil> In reply to @s3cur3th1ssh1t "Question. How to handle": You can define them in the same typesection
19:20:25FromDiscord<s3cur3th1ssh1t> In reply to @isofruit "You can define them": Worked, perfect thanks! πŸ™‚
19:20:31FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
19:20:50FromDiscord<Phil> Note that you'll run into issues if you try that with object as that'll lead to a type-recursion that the compiler will stop you from doing
19:21:12FromDiscord<Phil> by objects I mean value objects like `type A = object`
19:21:25FromDiscord<Phil> In reply to @s3cur3th1ssh1t "Worked, perfect thanks! πŸ™‚": Dang, you were faster than I was with writing the example πŸ˜„
19:21:30FromDiscord<s3cur3th1ssh1t> In reply to @isofruit "by objects I mean": Thats what I'm using and the compiler accepted it ^^
19:21:40FromDiscord<sOkam! 🫐> In reply to @PMunch "Would be easy to": Hey, you said this the other day, about implementing javadoc-like doc-comment tags, but I didn't understand what you meant by that↡Can you elaborate?
19:21:43FromDiscord<Phil> In reply to @s3cur3th1ssh1t "Thats what I'm using": Not quite, one of your types is a ptr
19:21:47FromDiscord<Phil> That means it can be nil, which stops the recursion
19:21:58FromDiscord<Phil> Or rather it is default initialized as nil which stops the recursion
19:22:22FromDiscord<s3cur3th1ssh1t> Good to know, thanks again πŸ™‚
19:40:30FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1188204504315871322/image.png?ex=6599acad&is=658737ad&hm=fda66378dfa2d4869590f4b6ea21f5a601c642663e17a59ebda59a6e24f93534&
19:40:45FromDiscord<albassort> i found a familar face somewhere foreign
19:41:42FromDiscord<albassort> @shalokshalom why hasn't made ephtracy made magicavoxel opensource do you know
19:42:12FromDiscord<albassort> i would like for it to run on linux and if it isn't using directx im sure it would be... doable
19:42:38FromDiscord<albassort> (edit) removed "if it isn't using directx" | "it would be..." => "its" | "im sureitsdoable ... " added "if its on macos"
19:42:43FromDiscord<albassort> (edit) "i would like for it to run on linux and im sure its doable if its on macos ... " added "(sometimes)"
19:43:10FromDiscord<albassort> uhh this is supposed to be #offtopic so if you respond, @ me there or dm me
19:43:36FromDiscord<albassort> (edit) "uhh this is supposed to be #offtopic so if you respond, @ me there or dm me ... " added "❀️"
20:15:35FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=html>
20:15:45FromDiscord<sOkam! 🫐> does someone have any remote clue what causes it?
20:16:02FromDiscord<sOkam! 🫐> key is at `std/paths.nim(251, 26) Error: undeclared identifier: 'getCurrentDir'`
20:17:31FromDiscord<sOkam! 🫐> the culprit line: `result = Path(ospaths2.getCurrentDir())`
20:28:12FromDiscord<systemonia> How do you manipulate an untyped body in a macro? I wanna make a macro that inserts an argument automatically into every single call inside of it.
20:38:31FromDiscord<Elegantbeef> @sOkam! 🫐 `declared(x))`
20:44:05FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "<@186489007247589376> `declared(x))`": whats that for?
20:50:11FromDiscord<Elegantbeef> Oh wait you said `defined`
20:50:22FromDiscord<Elegantbeef> Was in response to↡> can i has ur πŸͺ„ powers for this?↡> is there a way to check if a variable is already defined?
21:00:07FromDiscord<sOkam! 🫐> oh, by trial and error I realized that I was just being dummie and assumed I needed to check if the variable was defined... but.... its already defined πŸ€·β€β™‚οΈ
21:00:46FromDiscord<sOkam! 🫐> nimscript has those variables by default, even if `defined(nimble)` is false
21:09:12*jkl quit (Quit: Gone.)
21:11:10*jkl joined #nim
21:37:57FromDiscord<9ih> this is gonna be a really sussy question, but is there anyway to have variables act as like a context for macros? like using variables for context at compile time
21:38:20FromDiscord<9ih> because currently I'm just getting `cannot evaluate at compile time: X` where X is the variable name
21:40:52FromDiscord<Elegantbeef> What are you trying to do?
21:41:02FromDiscord<Elegantbeef> `var x {.compileTime.}: Y` will work
21:41:03FromDiscord<9ih> don't worry elegant beef
21:41:06FromDiscord<9ih> yep I just found that
21:41:08FromDiscord<9ih> ty
21:41:24FromDiscord<Elegantbeef> Though depending what you're doing `std/macrocaches` makes more sense
21:44:51FromDiscord<9ih> ya that's actually beter
21:44:52FromDiscord<9ih> (edit) "beter" => "better"
21:44:53FromDiscord<9ih> thanks
21:47:24FromDiscord<9ih> second question, only hypothetically linked to the first, does Nim ship in its stdlib a way to parse the AST of just arbitrary Nim source code? like I guess just a way to parse Nim without compiling
21:47:30FromDiscord<9ih> (edit) "second question, only hypothetically linked to the first, does Nim ship in its stdlib a way to parse the AST of just arbitrary Nim source code? like I guess just a way to parse Nim ... without" added "code"
21:47:41FromDiscord<Elegantbeef> Nope that's apart of the compiler
21:47:53FromDiscord<Elegantbeef> Unless you mean at compile time
21:48:04FromDiscord<Elegantbeef> At compile time you can just do `macro doThing(t: untyped)`
21:48:11FromDiscord<9ih> I did mean at runtime
21:48:12FromDiscord<Elegantbeef> At runtime you need to use the compiler api to parse files
21:48:31FromDiscord<Elegantbeef> `nimpretty` and `nph` would be references on how to parse AST at runtime
21:48:38FromDiscord<9ih> third question, only hypothetically linked to the first and second, is the compiler API easy enough to use?
21:48:54Amun-RaI thought I had a bug in my macro and it turned out you can't have deprecated in var declaration of proc type
21:49:46FromDiscord<Elegantbeef> Refer to nimpretty or nph to answer that question
21:49:54FromDiscord<9ih> alright
21:49:57FromDiscord<9ih> thanks
21:50:47Amun-Ras/deprecated/discardable/
21:51:21FromDiscord<Elegantbeef> You mean you cannot have a proc type annotated discardable?
21:52:07Amun-Ravar foo: proc (): cint {.cdecl, discardable.}
21:52:22FromDiscord<Elegantbeef> That's what I said πŸ˜„
21:52:30Amun-Raright ;)
21:53:05FromDiscord<Elegantbeef> Interesting even `var a = someDiscardable` loses the `discardable` information
21:53:39Amun-Rahmm
22:28:50FromDiscord<BarrOff> The release announcement for 2.0.2 contains the advice to use \`-d\:useMalloc\` when using \`threads\:on\`. This will be fixed in 2.0.4. I am looking for a snippet to put in my projects cfg (preferred) or nimble file to set the option only for Nim \< 2.0.4. Can someone please help me? Thank you
22:29:29FromDiscord<Elegantbeef> `when (NimMajor, NimMinor, NimPatch) < (2, 0, 4)`
22:32:11FromDiscord<BarrOff> Where do I have to put this? The nimble or the cfg file?
22:32:18FromDiscord<Elegantbeef> your `config.nims`
22:37:15FromDiscord<BarrOff> OK, will try this. Thank you!
23:20:54*derpydoo quit (Ping timeout: 268 seconds)
23:27:49FromDiscord<nomad> Anyone have a riseup account? Looking for a invite code
23:39:19*azimut quit (Ping timeout: 240 seconds)
23:44:47*jmdaemon quit (Ping timeout: 256 seconds)
23:47:06FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "`nimpretty` and `nph` would": So would MinC, to be fair