00:08:31 | * | azimut quit (Ping timeout: 240 seconds) |
02:05:17 | FromDiscord | <albassort> @Phil if i go to germany can i be invited to the Nim convention |
02:05:36 | FromDiscord | <albassort> i guess i should ask Araq |
02:06:09 | FromDiscord | <albassort> Araq would absolutely hate me as a person lol |
02:21:52 | FromDiscord | <inventormatt> There are no in person nim conventions at this point in time. Only virtual conferences |
02:26:36 | NimEventer | New Nimble package! sudoku - sudoku generator in nim., see https://github.com/roberto170/sudoku |
02:37:32 | FromDiscord | <albassort> In reply to @inventormatt "There are no in": that would be fun tho |
02:51:44 | NimEventer | New 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:19 | FromDiscord | <MDuardo> Anyone using Neovim TreeSitter for Neovim?β΅It refuses to work |
03:26:33 | FromDiscord | <Elegantbeef> Whose? |
03:32:36 | FromDiscord | <MDuardo> I don't know exactly what TreeSitter is used with `:TSInstall nim`in AstronvimBut fails to compile |
03:33:12 | FromDiscord | <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:20 | FromDiscord | <Elegantbeef> It should use leorize's iirc |
03:33:51 | FromDiscord | <Elegantbeef> I just reinstalled it fine |
03:34:48 | FromDiscord | <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:24 | FromDiscord | <MDuardo> And what is most strange is that fails compiling but sometimes TS somehow runs and shows highlighted text, sometimes not |
03:42:28 | FromDiscord | <Elegantbeef> I'd say make an issue on leo's https://github.com/alaviss/tree-sitter-nim |
04:02:09 | FromDiscord | <MDuardo> Yeah, it is! |
04:02:11 | FromDiscord | <leorize> looks like a nvim-treesitter bug to me |
04:03:50 | FromDiscord | <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:14 | FromDiscord | <MDuardo> Thanks, I'll make a report then |
04:09:17 | FromDiscord | <MDuardo> I can use Nim in Helix for now |
04:16:31 | FromDiscord | <leorize> yep, I can't reproduce that bug, what version of neovim were you running? |
04:17:36 | FromDiscord | <leorize> looks like helix is still using the old parser |
04:18:12 | FromDiscord | <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:24 | FromDiscord | <zectbumo> it seems to me that the EVFILT_ constants are missingβ΅https://nim-lang.org/docs/kqueue.html#10 |
05:12:37 | FromDiscord | <leorize> same as mine, I guess it boils down to the configuration |
05:12:39 | FromDiscord | <MDuardo> You can check the report here |
05:12:41 | FromDiscord | <MDuardo> https://github.com/nvim-treesitter/nvim-treesitter/issues/5824 |
05:12:43 | FromDiscord | <MDuardo> 0.9.4 |
05:12:45 | FromDiscord | <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:49 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
05:41:15 | FromDiscord | <Elegantbeef> Using a template |
05:41:23 | FromDiscord | <Elegantbeef> Parameters are replace verbatim then the code is expanded |
05:41:37 | FromDiscord | <Elegantbeef> there is no `file` injected into scope |
05:41:46 | FromDiscord | <Elegantbeef> Use `strutils.%` |
05:41:47 | FromDiscord | <sOkam! π«> oh true, i remember that happening before |
05:45:32 | FromDiscord | <MDuardo> "Those who cannot remember the past are condemned to repeat it" |
05:46:01 | FromDiscord | <MDuardo> I had to said it, sorry |
05:58:08 | FromDiscord | <sOkam! π«> yup, that's me π |
06:11:09 | * | rockcavera joined #nim |
06:33:08 | * | azimut joined #nim |
07:57:06 | FromDiscord | <zectbumo> sent a code paste, see https://play.nim-lang.org/#ix=html> |
07:57:43 | * | derpydoo joined #nim |
08:09:49 | FromDiscord | <demotomohiro> How about to use let instead of var? |
08:10:38 | FromDiscord | <demotomohiro> It seems they are already in Nim's stdlib https://github.com/nim-lang/Nim/blob/devel/lib/posix/kqueue.nim |
08:28:40 | FromDiscord | <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:28 | FromDiscord | <Phil> In reply to @albassort "<@180601887916163073> if i go": Best I can do is invite you to Berlin without a convention attached |
08:36:45 | FromDiscord | <Phil> Can't promise invites to things that don't exist π
|
08:54:59 | FromDiscord | <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:38 | FromDiscord | <Elegantbeef> This message was written by an AI |
09:34:52 | FromDiscord | <Phil> We all know you're an instance of grok running on a toaster beef, no need to hide |
09:35:05 | FromDiscord | <Elegantbeef> What's a 'grok' |
09:37:42 | FromDiscord | <Phil> Musk's LLM, for the extra smidge of humiliation |
09:48:51 | FromDiscord | <.destynova> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:52:23 | FromDiscord | <sOkam! π«> is there no `contains` for enum values?β΅I thought it was in `std/enumutils` but can't seem to find it π€ |
09:55:08 | FromDiscord | <Elegantbeef> Why do you need `contains` for enums |
09:55:36 | FromDiscord | <demotomohiro> In reply to @.destynova "I'm encountering this behaviour": You probably need to implement hash function for `PackedSet[int]`. |
09:55:37 | FromDiscord | <sOkam! π«> to check if I added a new enum entry but forgot to check the code that calls it correctly |
09:56:01 | FromDiscord | <Elegantbeef> I do not follow |
09:56:22 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
09:56:54 | FromDiscord | <Elegantbeef> but `lang` would be a `LangId` no? |
09:57:28 | FromDiscord | <sOkam! π«> I think I see what you mean |
09:57:37 | FromDiscord | <sOkam! π«> in that it is redundant π€ |
09:57:45 | FromDiscord | <Elegantbeef> The question is what are you needing to check |
09:58:56 | FromDiscord | <Elegantbeef> Do you want to check if an integer matches an enum value, a string matches a enum name, .... |
09:59:53 | FromDiscord | <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:15 | FromDiscord | <Elegantbeef> `parseEnum[T]` should suffice |
10:01:25 | FromDiscord | <sOkam! π«> i didn't know about that one |
10:01:33 | FromDiscord | <sOkam! π«> how would you use it, though? not sure I follow your thinking |
10:02:14 | FromDiscord | <selfref> is there an async sqlite interface? |
10:02:32 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:02:58 | FromDiscord | <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:57 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:04:54 | FromDiscord | <Elegantbeef> Sadly there is no option variant of `parseEnum` |
10:04:56 | FromDiscord | <selfref> thread safety is key requirement |
10:04:56 | FromDiscord | <selfref> need that for web server backend |
10:04:58 | FromDiscord | <Elegantbeef> I swear if you do not use `array[LangId, ...]` for the handlers.... π |
10:05:46 | FromDiscord | <sOkam! π«> In reply to @Elegantbeef "*I swear if you": handlers? |
10:06:30 | FromDiscord | <Elegantbeef> I don't know I suspected you'd just dispatch procs inside of an array |
10:06:32 | FromDiscord | <Elegantbeef> I don't know what you're doing |
10:06:54 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
10:07:50 | FromDiscord | <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:20 | FromDiscord | <selfref> https://github.com/nim-lang/db_connector/blob/devel/src/db_connector/sqlite3.nim#L29 where is sqlite.c ? |
10:13:50 | FromDiscord | <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:17 | FromDiscord | <sOkam! π«> oh wait ignore me |
10:14:17 | FromDiscord | <selfref> but when defined(staticSqlite) |
10:14:27 | FromDiscord | <sOkam! π«> yeah totally misread |
10:15:00 | FromDiscord | <selfref> it seems like that module has no control over sqlite, it uses dynamic one or builds with default flags |
10:15:10 | FromDiscord | <selfref> i want thread safety flags, FTS5 |
10:15:18 | FromDiscord | <selfref> is there a package with that? |
10:15:35 | FromDiscord | <sOkam! π«> it must be expecting it to be somewhere in the target system? π€ |
10:16:03 | FromDiscord | <selfref> it can't, systems dont give you way to search for .c files |
10:16:56 | FromDiscord | <selfref> i'm not sure but it could be bug |
10:17:09 | FromDiscord | <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:50 | FromDiscord | <sOkam! π«> In reply to @selfref "i'm not sure but": does it error if you define that flag? |
10:18:11 | FromDiscord | <selfref> i dont' have proper system setup at the moment to test |
10:19:03 | FromDiscord | <selfref> https://github.com/codehz/easy_sqlite3/blob/develop/src/easy_sqlite3/bindings.nim#L25 |
10:19:13 | FromDiscord | <selfref> fortunately someone did it for me |
10:19:20 | FromDiscord | <selfref> not .c file existance in the directory |
10:20:52 | FromDiscord | <selfref> https://www.sqlite.org/threadsafe.html ok it's amazing |
10:21:07 | FromDiscord | <selfref> you can call sqlite using single connection from multiple threads |
10:23:00 | FromDiscord | <selfref> So i want to import easy\_sqlite3 and add define bundled\_sqlite3 |
10:23:08 | FromDiscord | <selfref> how do you add those defines? |
10:24:04 | FromDiscord | <selfref> some kind of config.nims? |
10:24:16 | FromDiscord | <sOkam! π«> wdym? new ones? |
10:24:50 | FromDiscord | <selfref> I just want imported package to see that definition |
10:25:07 | FromDiscord | <selfref> had trouble searching docs for that |
10:27:53 | FromDiscord | <sOkam! π«> `--passC:"-DSOMETHING"` |
10:28:34 | FromDiscord | <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:58 | FromDiscord | <sOkam! π«> should be fine, unless that define clashes with something else |
10:29:26 | FromDiscord | <selfref> just --define\:bundled\_sqlite3 |
10:32:03 | FromDiscord | <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:49 | FromDiscord | <selfref> it needs to be passed to num for `if defined()` nim code |
10:34:42 | FromDiscord | <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:51 | FromDiscord | <selfref> is there production-ready http server for nim? |
10:50:27 | FromDiscord | <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:14 | FromDiscord | <selfref> it doesn't have a way to send part of response like streaming video |
10:53:15 | FromDiscord | <selfref> ok i'll probably write my own one |
10:53:35 | FromDiscord | <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:21 | FromDiscord | <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:44 | FromDiscord | <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:31 | FromDiscord | <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:01 | FromDiscord | <Phil> I see bindSym but I don't quite grok that one |
13:43:58 | FromDiscord | <Phil> Particularly since bindSym complains (when calling it from a macro) about the variables I'm calling it with not being compiletime |
13:56:58 | FromDiscord | <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:51 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
14:13:58 | FromDiscord | <Phil> @michaelb.eth in case you have an opinion |
14:15:17 | FromDiscord | <michaelb.eth> coming along nicely! |
14:18:05 | FromDiscord | <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:37 | FromDiscord | <michaelb.eth> are the `properties:` threadvar? |
14:21:15 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
14:21:50 | FromDiscord | <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:41 | FromDiscord | <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:56 | FromDiscord | <michaelb.eth> I get the idea, for sure |
14:33:48 | FromDiscord | <michaelb.eth> it's nice that the setup/teardown logic has a declarative shape to it |
14:50:06 | FromDiscord | <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:59 | FromDiscord | <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:28 | FromDiscord | <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:46 | FromDiscord | <Phil> In reply to @avahe "I'm trying to use": Honestly I just use `--path` |
16:20:46 | FromDiscord | <Prestige> It's not published via nimble so it's just a github link |
16:21:17 | FromDiscord | <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:46 | FromDiscord | <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:25 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
16:23:28 | FromDiscord | <Prestige> I could've sworn `nimble develop` was how I did it previously but it's not working, now |
16:24:07 | FromDiscord | <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:22 | FromDiscord | <Phil> It was always just `--path:` for me which I found more reliable |
16:24:32 | FromDiscord | <Phil> And easier to reason about |
16:24:33 | FromDiscord | <nnsee> In reply to @avahe "I could've sworn `nimble": it was a very unpopular change |
16:25:12 | FromDiscord | <nnsee> you're not alone in this, there's (multiple) issues raised about this on the nimble github |
16:25:28 | FromDiscord | <Prestige> dang I hope they at least add a new feature so we can do something similar, easily |
16:26:02 | FromDiscord | <Prestige> I assume I can just use `--path:/path/to/my/lib` with the nim command then eh |
16:26:19 | FromDiscord | <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:35 | FromDiscord | <Prestige> oh I hadn't heard of atlas |
16:26:41 | FromDiscord | <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:24 | FromDiscord | <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:35 | FromDiscord | <Phil> (edit) "ease" => "easy" |
16:28:39 | FromDiscord | <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:40 | FromDiscord | <Prestige> I'm not even clear on what `nimble build` does |
16:29:51 | FromDiscord | <Prestige> it always seems like the build tools are trying to do some magic |
16:29:59 | FromDiscord | <Phil> ~~Me neither, which is why I have a separate nimble task for that~~ |
16:30:46 | FromDiscord | <Phil> Join me at the dark side of the force! We have cookies and explicitness! |
16:31:16 | FromDiscord | <Prestige> Contemplating writing my own tool for this now, lol |
16:31:23 | FromDiscord | <Prestige> for my own sake |
16:31:37 | FromDiscord | <Phil> I mean you could see if you want to contribute to atlas if its missing features you want |
16:32:01 | FromDiscord | <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:46 | FromDiscord | <Prestige> That's my worry |
16:33:05 | FromDiscord | <Phil> I'd say give atlas a try π
|
16:33:44 | FromDiscord | <Phil> I think other than that there's also still nimph which is used by some |
16:34:05 | FromDiscord | <Phil> No idea who but I've been told back when I was starting out that it was an option π
|
16:34:26 | FromDiscord | <Phil> Which has been 24 months by now so no idea if that even works with nim 2.0 |
16:35:54 | FromDiscord | <Prestige> Well...I'm going to need to think about my next move |
16:36:06 | FromDiscord | <Prestige> not liking what I'm seeing about atlas tbh |
16:37:06 | FromDiscord | <Phil> TBF it has a lot more functionality than the docs let on |
16:37:13 | FromDiscord | <Phil> Because the docs are incomplete as all hell |
16:37:45 | FromDiscord | <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:48 | FromDiscord | <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:28 | FromDiscord | <Prestige> Does it support tasks like nimble tasks? or is that just not there anymore |
16:40:26 | FromDiscord | <Phil> Yes |
16:40:32 | FromDiscord | <Phil> As in, it supports that |
16:40:33 | FromDiscord | <nasuray> Tasks are a feature of nimscript so you can write tasks in a local config.nims |
16:40:55 | FromDiscord | <Phil> I mean you can also still write them in the nimble file afaik |
16:41:05 | FromDiscord | <Phil> At least that's what I recall from my chats with beef and others about atlas |
16:41:52 | FromDiscord | <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:02 | FromDiscord | <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:19 | FromDiscord | <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:35 | FromDiscord | <Prestige> How do you invoke tasks in your config.nims file? |
16:42:37 | FromDiscord | <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:59 | FromDiscord | <sOkam! π«> In reply to @avahe "Does it support tasks": nope, it just configures your project with the right paths |
16:43:20 | FromDiscord | <sOkam! π«> tasks are a nimble/nims thing, you need to create them with nimscript in some way |
16:43:37 | FromDiscord | <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:43 | FromDiscord | <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:44 | FromDiscord | <Phil> Mainly because nimble has not that much to do with it |
16:43:50 | FromDiscord | <Phil> afaik at least |
16:44:04 | FromDiscord | <sOkam! π«> In reply to @isofruit "I mean "Support" is": whats the point of atlas if you still use nimble? |
16:44:08 | FromDiscord | <sOkam! π«> (edit) "nimble?" => "nimble for tasks?" |
16:44:34 | FromDiscord | <nasuray> https://nim-lang.org/docs/nimscript.html |
16:44:35 | FromDiscord | <Prestige> so just `nim myTaskName`? |
16:44:50 | FromDiscord | <sOkam! π«> that works? π€ |
16:44:55 | FromDiscord | <sOkam! π«> never heard of that |
16:45:39 | FromDiscord | <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:40 | FromDiscord | <Prestige> Cool, well I'm probably going to end up writing my own simple tool for this... |
16:45:47 | FromDiscord | <Prestige> package management I mean |
16:45:54 | FromDiscord | <selfref> atlas is package cloner, you'll like it if you want to mirror all your dependencies into workspace |
16:46:05 | FromDiscord | <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:14 | FromDiscord | <selfref> contrary to just naming packages to download in nimble file |
16:46:16 | FromDiscord | <Phil> defined |
16:46:59 | FromDiscord | <sOkam! π«> In reply to @isofruit "defined": but im overriding them with my file |
16:47:14 | FromDiscord | <sOkam! π«> the problem is im using the same `system.THING` variables |
16:47:24 | FromDiscord | <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:59 | FromDiscord | <sOkam! π«> i will trial/error it for a bit, maybe something comes up out of randomness |
17:24:01 | FromDiscord | <Phil> Okay, phew, all my examples compile now, so proof it all works in the end |
17:30:15 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
17:30:39 | FromDiscord | <Phil> huh... hmmm |
17:31:47 | FromDiscord | <sOkam! π«> discord search be like....... https://media.discordapp.net/attachments/371759389889003532/1188172110842052658/image.png?ex=65998e82&is=65871982&hm=938789e1a53ec674cc2f3e9a55c97c492b11d6202253142b208314050140b555& |
17:32:09 | FromDiscord | <sOkam! π«> not even a single correct hit π |
17:33:20 | FromDiscord | <Phil> Huh, it may be using a semi advanced tokensearch that already matches on similar words whose "distance-score" is not tooooobad |
17:33:26 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
17:33:35 | FromDiscord | <sOkam! π«> massive @hack alert, but it does work |
17:33:36 | * | azimut joined #nim |
17:33:47 | FromDiscord | <albassort> In reply to @isofruit "Huh, it may be": yoour mom uses an advanced token search |
17:33:59 | FromDiscord | <sOkam! π«> ? |
17:34:18 | FromDiscord | <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:42 | FromDiscord | <albassort> i bet hers wouldn |
17:34:49 | FromDiscord | <albassort> (edit) "wouldn" => "wouldnt fail likes yours just did" |
17:35:02 | FromDiscord | <griffith1deadly> In reply to @isofruit "God I have so": give this brother a banana |
17:35:15 | FromDiscord | <Phil> In reply to @heysokam "massive @hack alert, but": Honestly, while "compiles" is a massive hack it's proven... rather reliable |
17:35:22 | FromDiscord | <sOkam! π«> oh hey griffith, did you see the github pings? |
17:35:32 | FromDiscord | <sOkam! π«> In reply to @isofruit "Honestly, while "compiles" is": true that |
17:35:34 | FromDiscord | <Phil> In reply to @griffith1deadly "give this brother a": I mean be unfamiliar with the reference |
17:35:38 | FromDiscord | <Phil> may |
17:35:59 | FromDiscord | <albassort> you can write anything and write a macro which sends it to >/dev/null |
17:36:09 | FromDiscord | <griffith1deadly> In reply to @heysokam "oh hey griffith, did": you mean this? https://github.com/heysokam/confy/issues/4#issuecomment-1868223088 |
17:36:26 | FromDiscord | <albassort> In reply to @albassort "you can write anything": if you just delete the tree then it compiles |
17:36:38 | FromDiscord | <albassort> (edit) "In reply to @albassort "you can write anything": if you just delete the tree ... then" added "or node" |
17:36:59 | FromDiscord | <Phil> ... are you just on a "let me try and troll everbody" trip today π ? |
17:37:27 | FromDiscord | <albassort> i just woke up its only beggining |
17:37:34 | FromDiscord | <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:45 | FromDiscord | <sOkam! π«> that refactor should take care of some of it, probably |
17:38:01 | FromDiscord | <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:17 | FromDiscord | <albassort> no i have work to do, gm everyone <3 |
17:38:25 | FromDiscord | <griffith1deadly> In reply to @heysokam "yep! currently working on": thank you for your hard work! |
17:38:43 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
17:38:54 | FromDiscord | <sOkam! π«> i thought the variable wouldn't be declared for some reason |
19:03:55 | * | jmdaemon joined #nim |
19:10:48 | FromDiscord | <s3cur3th1ssh1t> sent a code paste, see https://play.nim-lang.org/#ix=html> |
19:19:03 | FromDiscord | <Phil> In reply to @s3cur3th1ssh1t "Question. How to handle": You can define them in the same typesection |
19:20:25 | FromDiscord | <s3cur3th1ssh1t> In reply to @isofruit "You can define them": Worked, perfect thanks! π |
19:20:31 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=html> |
19:20:50 | FromDiscord | <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:12 | FromDiscord | <Phil> by objects I mean value objects like `type A = object` |
19:21:25 | FromDiscord | <Phil> In reply to @s3cur3th1ssh1t "Worked, perfect thanks! π": Dang, you were faster than I was with writing the example π |
19:21:30 | FromDiscord | <s3cur3th1ssh1t> In reply to @isofruit "by objects I mean": Thats what I'm using and the compiler accepted it ^^ |
19:21:40 | FromDiscord | <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:43 | FromDiscord | <Phil> In reply to @s3cur3th1ssh1t "Thats what I'm using": Not quite, one of your types is a ptr |
19:21:47 | FromDiscord | <Phil> That means it can be nil, which stops the recursion |
19:21:58 | FromDiscord | <Phil> Or rather it is default initialized as nil which stops the recursion |
19:22:22 | FromDiscord | <s3cur3th1ssh1t> Good to know, thanks again π |
19:40:30 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1188204504315871322/image.png?ex=6599acad&is=658737ad&hm=fda66378dfa2d4869590f4b6ea21f5a601c642663e17a59ebda59a6e24f93534& |
19:40:45 | FromDiscord | <albassort> i found a familar face somewhere foreign |
19:41:42 | FromDiscord | <albassort> @shalokshalom why hasn't made ephtracy made magicavoxel opensource do you know |
19:42:12 | FromDiscord | <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:38 | FromDiscord | <albassort> (edit) removed "if it isn't using directx" | "it would be..." => "its" | "im sureitsdoable ... " added "if its on macos" |
19:42:43 | FromDiscord | <albassort> (edit) "i would like for it to run on linux and im sure its doable if its on macos ... " added "(sometimes)" |
19:43:10 | FromDiscord | <albassort> uhh this is supposed to be #offtopic so if you respond, @ me there or dm me |
19:43:36 | FromDiscord | <albassort> (edit) "uhh this is supposed to be #offtopic so if you respond, @ me there or dm me ... " added "β€οΈ" |
20:15:35 | FromDiscord | <sOkam! π«> sent a code paste, see https://play.nim-lang.org/#ix=html> |
20:15:45 | FromDiscord | <sOkam! π«> does someone have any remote clue what causes it? |
20:16:02 | FromDiscord | <sOkam! π«> key is at `std/paths.nim(251, 26) Error: undeclared identifier: 'getCurrentDir'` |
20:17:31 | FromDiscord | <sOkam! π«> the culprit line: `result = Path(ospaths2.getCurrentDir())` |
20:28:12 | FromDiscord | <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:31 | FromDiscord | <Elegantbeef> @sOkam! π« `declared(x))` |
20:44:05 | FromDiscord | <sOkam! π«> In reply to @Elegantbeef "<@186489007247589376> `declared(x))`": whats that for? |
20:50:11 | FromDiscord | <Elegantbeef> Oh wait you said `defined` |
20:50:22 | FromDiscord | <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:07 | FromDiscord | <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:46 | FromDiscord | <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:57 | FromDiscord | <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:20 | FromDiscord | <9ih> because currently I'm just getting `cannot evaluate at compile time: X` where X is the variable name |
21:40:52 | FromDiscord | <Elegantbeef> What are you trying to do? |
21:41:02 | FromDiscord | <Elegantbeef> `var x {.compileTime.}: Y` will work |
21:41:03 | FromDiscord | <9ih> don't worry elegant beef |
21:41:06 | FromDiscord | <9ih> yep I just found that |
21:41:08 | FromDiscord | <9ih> ty |
21:41:24 | FromDiscord | <Elegantbeef> Though depending what you're doing `std/macrocaches` makes more sense |
21:44:51 | FromDiscord | <9ih> ya that's actually beter |
21:44:52 | FromDiscord | <9ih> (edit) "beter" => "better" |
21:44:53 | FromDiscord | <9ih> thanks |
21:47:24 | FromDiscord | <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:30 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> Nope that's apart of the compiler |
21:47:53 | FromDiscord | <Elegantbeef> Unless you mean at compile time |
21:48:04 | FromDiscord | <Elegantbeef> At compile time you can just do `macro doThing(t: untyped)` |
21:48:11 | FromDiscord | <9ih> I did mean at runtime |
21:48:12 | FromDiscord | <Elegantbeef> At runtime you need to use the compiler api to parse files |
21:48:31 | FromDiscord | <Elegantbeef> `nimpretty` and `nph` would be references on how to parse AST at runtime |
21:48:38 | FromDiscord | <9ih> third question, only hypothetically linked to the first and second, is the compiler API easy enough to use? |
21:48:54 | Amun-Ra | I 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:46 | FromDiscord | <Elegantbeef> Refer to nimpretty or nph to answer that question |
21:49:54 | FromDiscord | <9ih> alright |
21:49:57 | FromDiscord | <9ih> thanks |
21:50:47 | Amun-Ra | s/deprecated/discardable/ |
21:51:21 | FromDiscord | <Elegantbeef> You mean you cannot have a proc type annotated discardable? |
21:52:07 | Amun-Ra | var foo: proc (): cint {.cdecl, discardable.} |
21:52:22 | FromDiscord | <Elegantbeef> That's what I said π |
21:52:30 | Amun-Ra | right ;) |
21:53:05 | FromDiscord | <Elegantbeef> Interesting even `var a = someDiscardable` loses the `discardable` information |
21:53:39 | Amun-Ra | hmm |
22:28:50 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> `when (NimMajor, NimMinor, NimPatch) < (2, 0, 4)` |
22:32:11 | FromDiscord | <BarrOff> Where do I have to put this? The nimble or the cfg file? |
22:32:18 | FromDiscord | <Elegantbeef> your `config.nims` |
22:37:15 | FromDiscord | <BarrOff> OK, will try this. Thank you! |
23:20:54 | * | derpydoo quit (Ping timeout: 268 seconds) |
23:27:49 | FromDiscord | <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:06 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "`nimpretty` and `nph` would": So would MinC, to be fair |