00:04:40 | * | jmdaemon joined #nim |
00:26:03 | * | cnx quit (Ping timeout: 260 seconds) |
00:38:59 | * | cnx joined #nim |
00:51:41 | * | rockcavera quit (Ping timeout: 240 seconds) |
00:58:25 | * | rockcavera joined #nim |
00:58:25 | * | rockcavera quit (Changing host) |
00:58:25 | * | rockcavera joined #nim |
01:03:41 | * | Mister_Magister quit (Quit: bye) |
01:04:39 | * | xet7 quit (Ping timeout: 256 seconds) |
01:05:35 | * | Mister_Magister joined #nim |
01:09:24 | * | rockcavera quit (Read error: Connection reset by peer) |
01:10:35 | * | rockcavera joined #nim |
01:14:17 | * | azimut quit (Ping timeout: 255 seconds) |
01:22:25 | * | xet7 joined #nim |
02:22:57 | * | lucasta quit (Quit: Leaving) |
04:14:16 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
04:16:27 | * | pbsds joined #nim |
05:19:17 | * | rockcavera quit (Ping timeout: 240 seconds) |
05:57:07 | FromDiscord | <aryzen> Is there anywhere I can go to see what packages there are for nimble? |
06:06:36 | FromDiscord | <intellij_gamer> https://nimble.directory/ |
06:28:56 | FromDiscord | <zumi.dxy> this one is also pretty good https://nimpkgs.dayl.in/ |
06:33:05 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
07:00:38 | * | SchweinDeBurg joined #nim |
07:02:46 | * | junaid_ joined #nim |
07:31:42 | * | gooba quit (Quit: Leaving) |
07:33:17 | * | gooba joined #nim |
07:38:55 | * | advesperacit joined #nim |
08:24:08 | * | junaid_ quit (Remote host closed the connection) |
08:38:51 | FromDiscord | <aryzen> Thx both of you!! |
08:51:24 | * | PMunch joined #nim |
09:06:29 | * | derpydoo quit (Ping timeout: 240 seconds) |
09:10:22 | * | azimut joined #nim |
09:56:08 | * | azimut quit (Remote host closed the connection) |
09:56:43 | * | azimut joined #nim |
10:18:16 | FromDiscord | <madonuko> <https://github.com/terrapkg/packages/actions/runs/7956652643/job/21717829224#step:7:3720>↵↵cannot build choosenim on arm64? |
10:18:55 | FromDiscord | <madonuko> sent a code paste, see https://play.nim-lang.org/#pasty=gdnOJAuayLJC |
10:48:41 | FromDiscord | <djazz> choosenim doesnt support arm because Nim binaries arent distributed for arm afaik |
10:50:21 | FromDiscord | <djazz> I havent tried compiling it myself on arm tho |
10:52:22 | FromDiscord | <djazz> The error in your link comes from inline assembly in nim module zippy that fails to compile on arm https://github.com/guzba/zippy/blob/9560f3d20479fb390c97f731ef8d100f1ed54e6c/src/zippy/internal.nim#L332 |
10:53:02 | FromDiscord | <djazz> cpuid but it is in a when defined(amd64) block?? |
11:13:57 | FromDiscord | <System64 ~ Flandre Scarlet> Did someone already achieved to compile a Nim program for the SEGA Genesis / MegaDrive? |
11:17:01 | PMunch | Not sure if anyone has tried yet :P |
11:17:31 | Amun-Ra | I can see there's a toolchain to build on gh, I may try it :) |
11:17:40 | PMunch | But I wouldn't be surprised at all |
11:22:23 | * | jmdaemon quit (Ping timeout: 252 seconds) |
11:56:08 | * | azimut quit (Remote host closed the connection) |
11:56:51 | * | azimut joined #nim |
12:02:21 | * | azimut quit (Remote host closed the connection) |
12:02:58 | * | azimut joined #nim |
12:08:59 | FromDiscord | <ayex> I have built nim on aarch64 on raspi and librem5 a couple of times. it works fine, just a little slow on raspi due to its low processing power.↵(@djazz) |
12:10:35 | Zevv | I think that since nim has --os:any a lot of the other -os:* settings could (should?) be scrapped |
12:10:50 | Zevv | the majority of these are not tested in CI and no one knows in what state they are |
12:11:22 | Zevv | Haiki? VxWorks? Genode? DragonFly? CROSSOS? PalOS, really?! |
12:11:40 | PMunch | I guess the better option would be to supply some way to define these in separate repos |
12:11:51 | Zevv | I don't see why the compiler must know about these at all |
12:12:14 | Zevv | we generate C. with --os:any and -d:usemalloc there is no other depdency than a few stdlib calls |
12:12:24 | Zevv | which are available on virtually an C implementation |
12:12:30 | PMunch | IIRC it's mostly to enable/disable various parts of the stdlib |
12:13:15 | PMunch | And of course setting the architecture and other such things. Basically they just bundle a bunch of options into one convenient switch |
12:13:22 | ehmry_ | it's also to generate os-specific entrypoints other than main() |
12:13:34 | PMunch | Oh really? |
12:13:47 | Zevv | yeah but the problem is that the stdlib is now filld with things like `if defined(solaris) or defined(zephyr) or defined(freertos) or defined(nuttx) or defined(haiku)` |
12:14:19 | Zevv | and it's all not tested, right. |
12:14:29 | ehmry_ | nope |
12:14:47 | ehmry_ | some of that stuff is hard to test |
12:14:53 | Zevv | sure. |
12:15:43 | ehmry_ | it would be nice to make this stuff external and pass in a package of os-specific stuff as a compiler option |
12:15:51 | Zevv | feature macros instad |
12:15:55 | Zevv | instead |
12:16:26 | Zevv | with an os -> feature matrix somewhere |
12:17:17 | ehmry_ | with some OSes there isn't enough maintainers to keep support working for every release, which is why it would be nice to externalize it and say FooOS supports compiler version whatever |
12:17:33 | ehmry_ | if this was easy someone would already be doing it :( |
12:17:53 | PMunch | Well it would require the existing ones to be refactored |
12:18:06 | Zevv | prbobaly not even a matter of 'easy'. it's just that alot of these were merged in once, the original author has long left and no one ever cared about it since. |
12:18:09 | ehmry_ | C is like that but C++ is where the dumb platform shit spills out |
12:18:11 | PMunch | And yeah, a feature matrix system is indeed the better way to deal with this |
12:19:41 | ehmry_ | having a decent no-libc base platform would be nice |
12:20:20 | * | azimut quit (Remote host closed the connection) |
12:20:40 | * | azimut joined #nim |
12:21:12 | Zevv | i tried that for --os:any, but it was not worth the effort at that point. my goal was to go to no deps at all |
12:21:36 | Zevv | what's left is basically fwrite(), malloc() and a few others. |
12:21:45 | Zevv | you can stub these in 10 lines of C |
12:22:07 | Zevv | I do run nim on misc no-libc platforms |
12:22:24 | Zevv | I did some nim inside the linux kernel as well |
12:23:54 | Zevv | the orignal name of the flag was --os:none |
12:24:07 | Zevv | but araq requested I change it to --os:any |
12:29:59 | ehmry_ | I like os:any |
12:35:43 | Zevv | everybody likes os:any |
12:36:18 | Zevv | it should have a fluffy and fuzzy mascotte |
12:40:16 | FromDiscord | <zumi.dxy> `os:any` vs `os:standalone` at the moment is like "freedom of OS doesn't mean lack of OS" or something like that |
12:41:03 | Zevv | os:stdalone isn't really |
12:41:56 | ehmry_ | I have a solo5 unikernel port that I've been sitting on that's mostly blocked by networking |
12:42:15 | ehmry_ | networking works but the abstraction doesn't |
12:42:23 | Zevv | how come |
12:43:35 | ehmry_ | the std network stuff is sockets based, so either you emulate sockets to make that work or drop in other networking library |
12:43:41 | * | azimut quit (Ping timeout: 255 seconds) |
12:44:14 | Zevv | right. i must admit I never liked nim's networking layers; I almost always use posix.* instead. |
12:45:06 | * | azimut joined #nim |
12:45:08 | ehmry_ | right. and there is some nim platform that use lwip socket implementation when using the native lwip callback interface would be much better |
12:45:43 | Zevv | sure. but you just use the lwip api directly without bothering going through the nim network layers. |
12:46:09 | PMunch | Well then you lose the ability for library reuse |
12:46:28 | Zevv | the thing is. I want to use some library and it uses dial() |
12:46:34 | Zevv | and goes doing a blocking getaddrinfo() |
12:46:43 | Zevv | that's always the first thing that breaks for me |
12:48:31 | ehmry_ | I don't think there is consensus on what layer dial/connecting by name should be on, which complicates things |
12:48:49 | Zevv | it is just *very* hard to have a single API, widely portable network stack. |
12:49:02 | Zevv | especially when you go down, deep embedded |
12:49:20 | Zevv | where not everything is a fd |
12:49:46 | ehmry_ | if you want a a single API then write a TCP/IP stack in Nim :) |
12:50:08 | Zevv | let's start with the TLS layers shall we |
12:51:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "I can see there's": Where did you find it? |
12:52:45 | Amun-Ra | https://github.com/noname22/megadrive-gcc |
12:53:05 | ehmry_ | I tried to make a portable network library but I don't have time to maintain it https://git.sr.ht/~ehmry/nim_taps |
12:54:45 | ehmry_ | and I think my crappy asyncfuture code isn't compatible with orc |
12:55:14 | Zevv | mumble mumble cps mumble |
12:55:24 | ehmry_ | jaja |
12:57:05 | Zevv | have you always been off-github |
12:57:10 | ehmry_ | if taps is a worthwhile library then it should just be in nim-sys |
12:57:22 | Zevv | i considered a few times, but people stared complaining about not being able to find my stuff |
12:58:46 | ehmry_ | I've been mostly off github for a few years so I try and put everything in the nimble registry |
12:59:15 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "https://github.com/noname22/megadrive-gcc": There is SGDK too |
13:00:31 | ehmry_ | I just write hipster shit anyway |
13:01:19 | Zevv | still, you should consider the other hipsters. |
13:16:03 | * | baalajimaestro quit (Remote host closed the connection) |
13:24:33 | FromDiscord | <summarity> Can Nim produce source maps for the C backend? |
13:25:34 | * | rockcavera joined #nim |
13:36:46 | FromDiscord | <djazz> In reply to @ayex "I have built nim": Choosenim on arm... |
13:43:04 | * | LyndsySimon quit (Ping timeout: 246 seconds) |
13:44:06 | * | oisota quit (Read error: Connection reset by peer) |
13:44:32 | * | oisota joined #nim |
13:44:47 | * | disso-peach quit (Read error: Connection reset by peer) |
13:44:50 | * | disso_pch joined #nim |
13:45:52 | * | robertmeta quit (Ping timeout: 246 seconds) |
13:49:40 | * | cm_ joined #nim |
13:50:04 | * | cm quit (Ping timeout: 246 seconds) |
13:50:04 | * | cm_ is now known as cm |
13:52:49 | * | LyndsySimon joined #nim |
13:54:39 | * | robertmeta joined #nim |
13:57:25 | * | LyndsySimon quit (Ping timeout: 264 seconds) |
13:59:41 | * | rockcavera quit (Remote host closed the connection) |
14:13:54 | * | LyndsySimon joined #nim |
14:14:01 | * | blackbeard420 quit (Ping timeout: 268 seconds) |
14:14:36 | FromDiscord | <djazz> Nim on pi is slow yeah |
14:14:46 | FromDiscord | <djazz> Pi zero |
14:17:59 | * | ntat joined #nim |
14:18:37 | * | blackbeard420 joined #nim |
14:22:29 | PMunch | Really? |
14:24:25 | * | GreaseMonkey quit (Ping timeout: 264 seconds) |
14:27:42 | FromDiscord | <leorize> nim compiler is very memory bandwidth reliant afaict |
14:31:11 | FromDiscord | <nervecenter> Isn't cross-compiling how most mobile frameworks do it anyways? |
14:31:17 | FromDiscord | <nervecenter> I could be completely wrong |
14:32:05 | FromDiscord | <nervecenter> That's probably an advantage for Android JVM applications, they can accept the same JVM bytecode and different architectural implementations of the JVM can just run it |
14:33:36 | FromDiscord | <odexine> it pretty much is the advantage of any VM based language |
14:33:56 | FromDiscord | <odexine> well ig its not inherent to VM based languages, some dont have this benefit, but |
14:34:57 | * | greaser|q joined #nim |
14:35:46 | PMunch | Hmm, working with FreeRTOS I'm running into a memory leak situation |
14:35:56 | PMunch | I think it might be caused by vTaskDelete(nil) |
14:36:11 | PMunch | Basically at the end of the task it must delete itself or it triggers an assertion |
14:36:33 | PMunch | But I guess the ARC cleanup code is injected after the call to vTaskDelete |
14:36:47 | PMunch | Which means that my task never cleans up after itself.. |
14:37:38 | FromDiscord | <leorize> when in doubt, add an another layer of indirection |
14:41:38 | FromDiscord | <jayj2368> https://github.com/romeric/Fastor/blob/master/Fastor/tensor/Tensor.h#L18-L19 Hi, does nim support this kind type? const value as generic parameters, and generic varargs? |
14:42:00 | FromDiscord | <jayj2368> sent a code paste, see https://play.nim-lang.org/#pasty=nywcbDmNaSyj |
14:42:21 | PMunch | @leorize, yeah that's what I*m considering.. |
14:43:41 | FromDiscord | <leorize> nim does not support generic varargs↵(@jayj2368) |
14:43:54 | FromDiscord | <leorize> const value, sure |
14:43:59 | * | derpydoo joined #nim |
14:44:10 | FromDiscord | <leorize> you can checkout arraymancer as a tensor implementation in nim |
14:44:28 | * | rockcavera joined #nim |
14:44:51 | FromDiscord | <jayj2368> @leorize Thanks. |
15:00:03 | * | rockcavera quit (Read error: Connection reset by peer) |
15:00:23 | * | rockcavera joined #nim |
15:07:50 | PMunch | Hmm, looks like maybe I was wrong.. |
15:08:22 | PMunch | I tried to add a level of indirection. Basically my task now calls an "impl" which is a normal Nim proc |
15:08:28 | PMunch | But it's still leaking |
15:08:35 | * | rockcavera quit (Read error: Connection reset by peer) |
15:08:35 | PMunch | Exactly 192 bytes each iteration |
15:09:46 | * | rockcavera joined #nim |
15:09:46 | * | rockcavera quit (Changing host) |
15:09:46 | * | rockcavera joined #nim |
15:11:23 | NimEventer | New thread by Horkarod: Futhark and editor tooling, see https://forum.nim-lang.org/t/11040 |
15:16:41 | * | PMunch quit (Quit: Leaving) |
15:23:32 | * | rockcavera quit (Read error: Connection reset by peer) |
15:23:53 | * | rockcavera joined #nim |
15:23:53 | * | rockcavera quit (Changing host) |
15:23:53 | * | rockcavera joined #nim |
15:25:37 | * | LyndsySimon quit (Ping timeout: 264 seconds) |
15:25:46 | * | LyndsySimon joined #nim |
15:46:57 | * | greaser|q quit (Ping timeout: 256 seconds) |
15:50:07 | * | greaser|q joined #nim |
17:20:54 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
17:21:41 | * | mahlon quit (Ping timeout: 260 seconds) |
17:22:21 | * | xet7 quit (Remote host closed the connection) |
17:31:02 | * | rockcavera quit (Read error: Connection reset by peer) |
17:31:47 | * | rockcavera joined #nim |
17:31:47 | * | rockcavera quit (Changing host) |
17:31:47 | * | rockcavera joined #nim |
17:39:54 | FromDiscord | <grandpa> can i get help here |
17:40:57 | FromDiscord | <grandpa> i'm getting errors when trying to compile something: https://media.discordapp.net/attachments/371759389889003532/1209192916472569856/message.txt?ex=65e607a9&is=65d392a9&hm=af88d499d6059ceac6376867d98e8cf9eb3d13f2be62d8f537ac29518b9a2716& |
17:42:32 | * | pbsds joined #nim |
17:45:07 | FromDiscord | <odexine> compile with --mm:refc |
17:55:14 | * | mahlon joined #nim |
18:08:37 | * | junaid_ joined #nim |
18:18:07 | * | ntat quit (Quit: Leaving) |
18:52:57 | FromDiscord | <griffith1deadly> if i unload nim dll (nim program compiled to dll), should allocated memory by dll get's deallocated?↵↵i mean, i wanna write some plugin system for nim with hotcodereloading, and I'm wondering if there will be a memory leak when the dll is reloaded |
19:08:26 | FromDiscord | <Robyn [She/Her]> Does anyone know if there's a way to create idiomatic C++ bindings to a Nim library? Like, if I want to expose a Nim type as a class, and some functions as methods on that class |
19:11:27 | FromDiscord | <griffith1deadly> In reply to @chronos.vitaqua "Does anyone know if": i know only genny for c, https://github.com/treeform/genny |
19:12:02 | FromDiscord | <Robyn [She/Her]> Fair, thanks anyway |
19:12:14 | FromDiscord | <Robyn [She/Her]> Might need to figure out how to handwrite it in a decent way |
19:29:12 | * | greaser|q quit (Changing host) |
19:29:12 | * | greaser|q joined #nim |
19:29:15 | * | greaser|q is now known as GreaseMonkey |
19:56:32 | * | rockcavera quit (Read error: Connection reset by peer) |
19:57:43 | * | rockcavera joined #nim |
20:13:09 | * | jmdaemon joined #nim |
20:16:12 | * | junaid_ quit (Remote host closed the connection) |
20:16:33 | FromDiscord | <fosster> hii all |
20:16:56 | FromDiscord | <Robyn [She/Her]> Heya |
20:17:04 | FromDiscord | <fosster> can I use Option[var Something] as a function signature? |
20:17:36 | FromDiscord | <fosster> I get `Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]` |
20:17:41 | FromDiscord | <Elegantbeef> No |
20:18:12 | FromDiscord | <fosster> mh, is there an alternative for it? |
20:18:16 | FromDiscord | <Elegantbeef> `var T` is only allowed as a parameter and return type, you need a borrow checker to use it anywhere else safely (there is an experimental feature) |
20:18:27 | FromDiscord | <fosster> I've been bangin my head against this problem all day long |
20:19:13 | FromDiscord | <Elegantbeef> What does the function do? |
20:19:56 | FromDiscord | <Robyn [She/Her]> In reply to @fosster "mh, is there an": Why not a ref? |
20:19:56 | FromDiscord | <Robyn [She/Her]> Or a pointer depending on your needs |
20:20:04 | FromDiscord | <fosster> basically I need to pass an optional variable reference that, when provided, store an hash inside said variable |
20:20:24 | FromDiscord | <Elegantbeef> Use an overload |
20:21:12 | FromDiscord | <fosster> I thought about it but I'd need to rewrite the whole function again |
20:21:32 | FromDiscord | <Elegantbeef> I mean if we're really lazy templates exist |
20:21:35 | FromDiscord | <fosster> like I should have two identical functions for just a few line of code more |
20:23:02 | FromDiscord | <Elegantbeef> You also can just make the internal logic be another proc and forward arguments |
20:23:17 | FromDiscord | <Elegantbeef> Or if ref fits better you can use that |
20:23:20 | FromDiscord | <Elegantbeef> Or ptr |
20:26:57 | FromDiscord | <fosster> you mean with Option? |
20:27:18 | FromDiscord | <fosster> I'm trying to solve it using template |
20:42:46 | FromDiscord | <fakecrafter> is there a easy way to compare two objects for equality in the sense of data |
20:44:23 | FromDiscord | <fakecrafter> basically `equals[T](a: T, b: T): bool` |
20:47:59 | FromDiscord | <fosster> I ended up using macros, however I'm still facing another issue, how can I inherit local variables from within macros? i.e. a variable defined in the function where the macro is invoked, but it seems it doesn't inherit it |
20:51:29 | FromDiscord | <fosster> don't worry, I solved the problem |
20:51:57 | FromDiscord | <fosster> I was looking at the wrong thing |
20:52:29 | FromDiscord | <bosinski2023> In reply to @fakecrafter "basically `equals[T](a: T, b:": i guess u look for smth. like `func `==`[T]( a, b :T ) :bool = # your compare-fn` as done for all build-in types in `system.nim` https://nim-lang.org/docs/system.html#%3D%3D%2Cbool%2Cbool |
20:53:43 | FromDiscord | <fosster> the approach with seems to be working btw |
20:56:48 | FromDiscord | <Elegantbeef> fosster I am interested in this macro you've got 😄 |
21:02:18 | * | def- quit (Quit: -) |
21:02:31 | * | def- joined #nim |
21:02:51 | FromDiscord | <fakecrafter> Thx |
21:05:16 | FromDiscord | <Robyn [She/Her]> Debating on making my NBT impl allow for implementing custom types but is that even worth it? Considering no-one should really be using NBT anywhere except for Minecraft specifically? And it already implements the entire spec so |
21:07:42 | FromDiscord | <Elegantbeef> Why write code that no one needs? |
21:08:06 | FromDiscord | <Robyn [She/Her]> Exactly |
21:08:27 | FromDiscord | <Robyn [She/Her]> I am bored tho and don't know what to do |
21:18:02 | * | rockcavera quit (Read error: Connection reset by peer) |
21:19:13 | * | rockcavera joined #nim |
21:19:13 | * | rockcavera quit (Changing host) |
21:19:13 | * | rockcavera joined #nim |
21:19:42 | * | dukester joined #nim |
21:35:28 | FromDiscord | <asviest> what is nnkVarTuple ? |
21:35:43 | FromDiscord | <Elegantbeef> `var (x, y) = bleh` |
21:39:30 | FromDiscord | <asviest> ok, is the penultimate slot reserved for pragmas or why is it needed ? |
21:41:13 | FromDiscord | <Elegantbeef> Don't ask me I just know how to create AST not why AST |
21:45:02 | * | def- quit (Quit: -) |
21:45:36 | * | def- joined #nim |
21:55:54 | NimEventer | New thread by lou15b: How to detect (and report) reference cycles?, see https://forum.nim-lang.org/t/11045 |
21:58:18 | * | def- quit (Quit: -) |
21:59:00 | * | def- joined #nim |
22:06:13 | * | dukester left #nim (Time to go) |
22:23:56 | * | advesperacit quit () |
22:51:35 | FromDiscord | <grandpa> In reply to @odexine "compile with --mm:refc": tysm |
22:59:57 | * | disso_pch quit (Remote host closed the connection) |
23:43:19 | * | derpydoo quit (Ping timeout: 246 seconds) |