<< 27-03-2025 >>

01:35:00FromDiscord<.tokyovigilante> I've created a minimal example for my issue with cyclic dependencies which is causing invalid C to be emitted from the compiler - https://github.com/nim-lang/Nim/issues/24819. Is it worth also posting in #internals?
01:35:34FromDiscord<leorize> if you already got an issue, then there isn't much to do other than wait
01:35:44FromDiscord<leorize> alternatively you can try to fix it yourself
01:36:11FromDiscord<leorize> but know that cyclic imports official state is quite literally\: it kinda works
01:36:32FromDiscord<leorize> but in this one specific case that'd break if you just import the modules in the wrong order
01:46:40FromDiscord<.tokyovigilante> Thanks. Was hoping to just wait for Nim v3 😉 The root cause is that a C forward definition isn't being emitted, which is why I was thinking it is a compiler bug. Will go wild and see if I can fix it, but there for visibility anyway.
01:46:50FromDiscord<Elegantbeef> This cyclical graph cannot work
01:46:50FromDiscord<Elegantbeef> I ran into this same problem, one solution is to make it a `var procName` instead
01:47:46*tiorock joined #nim
01:47:46*rockcavera is now known as Guest6447
01:47:46*Guest6447 quit (Killed (zinc.libera.chat (Nickname regained by services)))
01:47:46*tiorock is now known as rockcavera
01:49:52*tiorock joined #nim
01:49:52*rockcavera quit (Killed (platinum.libera.chat (Nickname regained by services)))
01:49:52*tiorock is now known as rockcavera
01:51:54FromDiscord<Elegantbeef> i say it cannot work, but I really think forward declares don't work with delayed imports due to C gen issues
01:58:08FromDiscord<.tokyovigilante> In reply to @Elegantbeef "I ran into this": Vexing. Could I be presumptuous and ask you to rephrase that in terms of a diff in the test case for that issue?
01:58:31FromDiscord<.tokyovigilante> In reply to @Elegantbeef "i say it cannot": And could they work if the compiler did emit the correct C forward dec?
02:05:34FromDiscord<Elegantbeef> It's purely a C gen issue and I have a more minimal reproduction responded to your code
02:05:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=CnJlGIhN
02:06:04FromDiscord<.tokyovigilante> Cool, thanks
02:06:26FromDiscord<.tokyovigilante> Also I am absolutely putting my fingers in my ears and using `-Wno-implicit-function-declaration`
02:07:29FromDiscord<.tokyovigilante> More seriously, is there anything useful a clown-level C developer such as myself could do to fix this? I assume not since your issue has been open since August...
02:09:34FromDiscord<Elegantbeef> It's a Nim C gen bug
02:09:43FromDiscord<Elegantbeef> So go look at Nim C gen and fix forward declares 😄
02:10:28FromDiscord<.tokyovigilante> I feel like that is not as easy for me as you are making it sound, but will give it a red hot go. Also, passing the flag fixes my app so can make some progress debugging
02:10:54FromDiscord<.tokyovigilante> Or should I just start using `nlvm`?
02:11:18FromDiscord<Elegantbeef> Well Nim's C gen is a bit much but it's mostly just making sure you gen the proc when the forward declare is hit I imagaine
02:12:19FromDiscord<.tokyovigilante> Thanks, I will in all honesty take a look and see if I can
02:12:26FromDiscord<Elegantbeef> I wouldn't use nlvm myself
02:12:50FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/compiler/ccgexprs.nim is the file you likely get to search
02:12:56FromDiscord<Elegantbeef> One of the cgens
02:13:11FromDiscord<Elegantbeef> Mostly just a case of finding why it's not generating a forward declared type
02:13:16FromDiscord<Elegantbeef> Yes a programmer using the term "just"
02:32:06*derpydoo joined #nim
02:37:47*Artea quit (Killed (ozone (No Spam)))
02:40:58*derpydoo quit (Read error: Connection reset by peer)
02:47:30*Guest46 joined #nim
02:49:28*Guest46 quit (Client Quit)
03:14:49*alexdaguy joined #nim
03:46:31*derpydoo joined #nim
03:48:46FromDiscord<Robyn [She/Her]> i kinda wanna make a simple TUI library and gradually add ways to export it to apks and websites
03:48:55FromDiscord<Robyn [She/Her]> mostly for funnies
03:49:49FromDiscord<Elegantbeef> https://github.com/ansiwave/nimwave time to add an android backend
03:51:36FromDiscord<Robyn [She/Her]> this is cool but i wanna make my own lib sooo I'll do that
03:52:02FromDiscord<Elegantbeef> yet another unfinished project was started 😄
03:52:06FromDiscord<Robyn [She/Her]> I'll try working on a thing tomorrow
03:52:42FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "*yet another unfinished project": yep but at least I'd finally have some time to enjoy programming
03:53:03FromDiscord<Robyn [She/Her]> since i haven't done any personal projects for a bit
04:18:33*Artea joined #nim
04:52:51*derpydoo quit (Ping timeout: 244 seconds)
05:47:16*derpydoo joined #nim
06:00:50*ntat joined #nim
06:11:22*ensyde joined #nim
08:20:39*ensyde quit (Ping timeout: 252 seconds)
09:19:56*ntat quit (Quit: leaving)
09:57:05*ntat joined #nim
10:04:29*rockcavera quit (Remote host closed the connection)
10:26:27*ntat quit (Quit: leaving)
10:49:15*ntat joined #nim
10:57:43FromDiscord<exelotl> In reply to @.tokyovigilante "Also I am absolutely": noooo don't do it!!! :P
11:16:20*ntat quit (Quit: leaving)
11:17:36*Amun-Ra quit (Ping timeout: 246 seconds)
11:31:15*derpydoo quit (Ping timeout: 272 seconds)
11:35:14*ntat joined #nim
11:50:41*Amun-Ra joined #nim
12:01:35*ntat quit (Quit: leaving)
12:26:55*ntat joined #nim
13:36:33*ntat quit (Quit: leaving)
13:39:25*alexdaguy quit (Quit: w)
14:19:57FromDiscord<Robyn [She/Her]> is there any non-blocking way of consuming user input in the terminal without printing it?
14:21:21FromDiscord<Robyn [She/Her]> Looks like threading is the only way oof
14:22:17Amun-Ratcflush from termios
14:22:54Amun-Ratcflush sys.stdin.fileno, TCIFLUSH
14:28:10FromDiscord<Robyn [She/Her]> In reply to @Amun-Ra "tcflush sys.stdin.fileno, TCIFLUSH": oooh epic, thanks Amun!
14:28:26FromDiscord<Robyn [She/Her]> tho does this work on windows too? i do need something else for that?
14:28:33*ntat joined #nim
14:30:30FromDiscord<Robyn [She/Her]> hm is there a way for me to also read the content?
14:32:15Amun-Radunno about windows
14:32:22Amun-Rayou can read the contents using ie. select
14:33:02Amun-Rasee answer 1: https://stackoverflow.com/questions/64168662/how-clear-stdin-in-python but instead of flushing read char by char
14:33:21Amun-Raselect works on windows
14:33:33Amun-Rabut not on all types of handles
15:00:00FromDiscord<fabric.input_output> termios is what linux has
15:00:29FromDiscord<fabric.input_output> isn't select an async io thing
15:00:34FromDiscord<fabric.input_output> what does it gotta do with this
15:10:34FromDiscord<Robyn [She/Her]> In reply to @fabric.input_output "isn't select an async": std/selectors
15:11:04FromDiscord<Robyn [She/Her]> In reply to @fabric.input_output "isn't select an async": https://nim-lang.org/docs/selectors.html
15:11:32FromDiscord<fabric.input_output> no io_uring 😢
15:12:56FromDiscord<Robyn [She/Her]> In reply to @fabric.input_output "no io_uring 😢": what's iouring?
15:13:11FromDiscord<fabric.input_output> linux async io thing
15:13:31FromDiscord<Robyn [She/Her]> https://github.com/blackmius/nimuring there is this?
15:13:33FromDiscord<fabric.input_output> batched io ops and stuff like that
15:14:04FromDiscord<Robyn [She/Her]> Could likely add some support for it
15:14:17FromDiscord<Robyn [She/Her]> well prolly not in the stdlib since that's a separate lib
15:15:39FromDiscord<fabric.input_output> yeah
16:03:46FromDiscord<threefour> Does TCO work if recursion can also happen at any point before the tail call?
16:32:42FromDiscord<threefour> I thought I saw that Nim did TCO, but now I'm seeing otherwise. What's the current on that?
16:34:41FromDiscord<Robyn [She/Her]> In reply to @threefour "I thought I saw": Nim doesn't do that, no
16:39:30FromDiscord<Robyn [She/Her]> https://github.com/nim-lang/RFCs/issues/226 this as a macro could be fun
17:07:07FromDiscord<leorize> nim just piggy back off C for TCO
17:07:07FromDiscord<leorize> but the language does not have any mechanism to guarantee it
17:07:08FromDiscord<leorize> skull is getting guaranteed TCO if you're interested
17:15:31FromDiscord<mr.hemlock> I'm messing with the `nimlang/nim` docker container. Do we only have them for `arm64`?
17:17:59FromDiscord<blackmius> In reply to @fabric.input_output "no io_uring 😢": its incompatible with selectors
17:20:31FromDiscord<mr.hemlock> In reply to @mr.hemlock "I'm messing with the": Or is the recommended way of using an `amd64` build just using a base image like Ubuntu and installing/building it in there?
17:31:09FromDiscord<nnsee> In reply to @mr.hemlock "Or is the recommended": do we really not have amd64 builds?
17:31:59FromDiscord<mr.hemlock> https://hub.docker.com/r/nimlang/nim/tags
17:32:03FromDiscord<mr.hemlock> Not unless I'm missing something
17:32:30FromDiscord<nnsee> does seem like
17:32:40FromDiscord<nnsee> @moigagoo
17:32:46FromDiscord<nnsee> (edit) "does seem like ... " added "it"
17:32:56FromDiscord<nnsee> pulls also fail
17:33:16FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=NcgMfzyF
17:33:37FromDiscord<nnsee> as an alternative I think akito13/nim should work
17:34:03FromDiscord<mr.hemlock> Noted. Just seemed weird that amd64 wasn't available. I'm glad I'm not missing something
17:34:11FromDiscord<mr.hemlock> (edit) "Noted. Just seemed weird that amd64 wasn't available. I'm glad I'm not ... missing" added "just"
17:34:19FromDiscord<nnsee> also... hi Hemlock!
17:34:23FromDiscord<nnsee> it's been way too long
17:34:38FromDiscord<nnsee> from pydis way back in the day :p
17:34:48FromDiscord<mr.hemlock> Ohhhhhhh right right. How've you been?
17:35:22FromDiscord<nnsee> pretty good!
17:35:41FromDiscord<nnsee> you?
17:35:48FromDiscord<nnsee> (should probably move to #offtopic)
17:58:09FromDiscord<fabric.input_output> In reply to @blackmius "its incompatible with selectors": rip 😔
18:52:22FromDiscord<spotlightkid> @nnsee\: @mr.hemlock see also https://forum.nim-lang.org/t/12741
18:54:26FromDiscord<nnsee> hmm... went to ping Akito but I can't see them on the server anymore
19:03:23FromDiscord<mr.hemlock> Minor point on that, it seems that the latest build is for Nim 2.0.8
19:03:37FromDiscord<mr.hemlock> Not the biggest issue mind you
19:03:48FromDiscord<mr.hemlock> But the last push was 7 months ago. They alright?
19:04:16FromDiscord<mr.hemlock> .... he says realizing that the forum post was 2 days ago
19:04:58FromDiscord<mr.hemlock> Could be that they're more of a regular on Libera or Gitter
21:01:55*gshumway quit (Ping timeout: 260 seconds)
21:19:43*gshumway joined #nim
21:25:27*ntat quit (Quit: leaving)
21:38:29*rockcavera joined #nim
22:59:00*rockcavera quit (Remote host closed the connection)