<< 28-11-2025 >>

00:00:08*rockcavera joined #nim
00:35:41FromDiscord<Elegantbeef> @bubblie it's single pass and it forces the code to be forward declared which is nicer to read
00:35:41FromDiscord<Elegantbeef> YMMV
01:14:45*xet7 quit (Remote host closed the connection)
02:39:10*beholders_eye quit (Ping timeout: 260 seconds)
03:23:07*rockcavera quit (Remote host closed the connection)
03:44:37FromDiscord<bubblie> Thank you!
04:23:35FromDiscord<lainlaylie> In reply to @alexander888alexander "having a strange issue": if you mean you want to define a new infix operator `collideswith`, you cant. but i think `self.hitbox.collidesWith cursor` is good enough
05:02:23*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
05:02:58*SchweinDeBurg joined #nim
05:03:23FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=Eklmvblp
05:07:27FromDiscord<mr_rowboto> Are the maintainers of [`inim`](https://github.com/inim-repl/INim) around here?↵I have made a [PR](https://github.com/inim-repl/INim/pull/144) adding `--useNims` as an option to use [`nimscripter`](https://github.com/beef331/nimscripter) as backend instead of `nim c` 😄
05:08:03FromDiscord<Elegantbeef> Row did you know about `nim secret`?
05:09:06FromDiscord<Buckwheat> woah
05:09:12FromDiscord<Buckwheat> it's a Nimscript REPL
05:10:10FromDiscord<mr_rowboto> In reply to @Elegantbeef "Row did you know": no, what is it?
05:10:20FromDiscord<Elegantbeef> A nimscript repl
05:10:24FromDiscord<mr_rowboto> fuck my life
05:11:22FromDiscord<Buckwheat> looooooooool
05:11:26FromDiscord<mr_rowboto> jhahaha
05:12:40FromDiscord<nervecenter> `nim secret` is not as...robust as `inim`
05:12:51FromDiscord<mr_rowboto> unfuck my life 😄
05:13:42FromDiscord<nervecenter> adding nims as an `inim` backend would really be a big improvement over `nim secret` assuming `inim` doesn't already support it
05:14:02FromDiscord<mr_rowboto> Well it now does.
05:14:17FromDiscord<mr_rowboto> However the activity on `inim` seems a bit stagnant
05:14:27FromDiscord<mr_rowboto> I'm afraid it's abandoned, the state of the code is... erhh...
05:14:41FromDiscord<mr_rowboto> _suspicious_... like, there are hundreds of duplicated lines
05:14:48FromDiscord<mr_rowboto> as if it was left in the middle of a refactor
05:14:57FromDiscord<nervecenter> an automated refactor likely
05:15:20FromDiscord<Buckwheat> you could fork it and rework it yourself
05:15:24FromDiscord<mr_rowboto> If the maintainers accept my PR, I'm cleaning it up for sure.
05:15:28FromDiscord<nervecenter> With Nim 3 coming down the pipe, a total rework of REPL stuff could be in order anyways
05:15:40FromDiscord<mr_rowboto> In reply to @Buckwheat "you could fork it": _of course that is the second alternative if they don't accept my PR_
05:16:12FromDiscord<nervecenter> Nim 3's new compiler backend will have better support for incremental compilation, so a REPL should be able to come naturally, probably even as a built in compiler option
05:16:29FromDiscord<mr_rowboto> that would be amazing
05:16:42FromDiscord<mr_rowboto> but I need my REPL now haha
05:17:16FromDiscord<mr_rowboto> and I'm both anxious and capable of coding, so... yeah... I went into the rabbit hole 😂
05:17:48FromDiscord<mr_rowboto> In reply to @Buckwheat "you could fork it": already have a name: reploid
05:17:55FromDiscord<nervecenter> try contacting the inim devs, and if you can't search and find them here, maaaybe as a last resort consider forking and then asking the nimble package repo devs to point to your maintained version
05:18:02FromDiscord<nervecenter> ah you'd have a name, neat
05:18:17FromDiscord<Buckwheat> I can test across the multiple OSes I have access to
05:18:17FromDiscord<mr_rowboto> yeah, but, only if they don't respond
05:18:27FromDiscord<Buckwheat> ...and MAYBE help maintain it
05:18:31FromDiscord<Buckwheat> (if help is needed)
05:19:11FromDiscord<mr_rowboto> nim is so fun
05:19:18FromDiscord<mr_rowboto> never felt this "at home" with a lang
05:19:47FromDiscord<Buckwheat> honestly I'm tempted to go find another Nim project I could go help with
05:19:57FromDiscord<Buckwheat> even just the 2 small contributions I made to Futhark were fun
05:20:05FromDiscord<Buckwheat> felt like I was actually apart of something
05:20:35FromDiscord<mr_rowboto> yeah, lang aside, idk why or how, but the community is healthy
05:20:58FromDiscord<Buckwheat> tight knit I've noticed too... realized some of the actives here got a lot of projects
05:21:21FromDiscord<Buckwheat> meanwhile all I have to show besides my Futhark patches is a Nim/x86 Assembly proof-of-concept
05:21:23FromDiscord<mr_rowboto> It's something that calls for my attention because I've been on smaller communities that are actually super harsh
05:21:27FromDiscord<Elegantbeef> It's only cause there are like 10 people in it and just by simple statistics you're either dead or healthy
05:21:39FromDiscord<mr_rowboto> In reply to @Elegantbeef "It's only cause there": No, I can assure you Beef
05:21:50FromDiscord<mr_rowboto> I've seen smaller communities made of a core of assholes
05:22:08FromDiscord<Elegantbeef> You haven't seen the core devs of Nim
05:22:20FromDiscord<mr_rowboto> I mean this is true to an extent, ofc
05:22:33FromDiscord<mr_rowboto> Yeah, but the core devs of nim don't come here being assholes
05:22:46FromDiscord<Elegantbeef> No they do it on the forums
05:22:49FromDiscord<mr_rowboto> maybe they actually _are_, but not regularly here
05:22:51FromDiscord<mr_rowboto> yep
05:23:19FromDiscord<mr_rowboto> well these guys were like, if you, sokam, and say, planetis would be treating everyone like they're idiots
05:23:43FromDiscord<Buckwheat> idiot? that's me!
05:23:45FromDiscord<mr_rowboto> ...for a community of <20 ppl... the hubris
05:24:20FromDiscord<Elegantbeef> I only treat people like idiots when they earn it
05:25:44FromDiscord<Buckwheat> I'd like to think I'm the same way but I also mostly just keep to myself...
05:25:52FromDiscord<Buckwheat> don't have to run into too many people I'd consider an idiot
05:26:12FromDiscord<Buckwheat> except when I look in the mirror, that guy in the mirror is pretty dumb
05:26:31FromDiscord<Elegantbeef> He's especially dumb, cause he always is just standing in the mirror waiting to mirror you
05:26:49FromDiscord<Buckwheat> right? he needs to be more original
05:26:53FromDiscord<Elegantbeef> Like get a fucking job or something
05:27:12FromDiscord<Buckwheat> yeah MIRROR LOSER
05:27:24FromDiscord<Buckwheat> stop wasting your life being a literal reflection of me
05:27:34FromDiscord<Buckwheat> (not you, the guy in the mirror)
05:30:13FromDiscord<mr_rowboto> In reply to @Elegantbeef "I only treat people": Welp, I'm... _I have my moments_.
05:30:43FromDiscord<Elegantbeef> Hey I don't think that I'm not an idiot
05:31:10FromDiscord<Elegantbeef> I think I'm a bumbling moron!
05:31:25FromDiscord<Buckwheat> I'm have stupid
05:31:33FromDiscord<Buckwheat> durrrrr
05:31:39FromDiscord<mr_rowboto> I meant that I have my moments where I treat people like idiots.
05:31:53FromDiscord<mr_rowboto> I've been much more regulated now that I'm old.
05:33:24FromDiscord<mr_rowboto> (edit) "where" => "when"
05:34:01FromDiscord<mr_rowboto> Boost of patience and hindsight I guess.
05:55:17FromDiscord<bubblie> In reply to @mr_rowboto "never felt this "at": I think it's incredibly unfortunate that nim isn't as popular as it is considering how powerful it is, I mean the speed and the fact that ive messed around with it in some bioinformatics stuff thanks to some libraries showcases that it's pretty damn good
05:55:50FromDiscord<bubblie> it feels like python but actually good to me, but to be honest nothing about this language feels like python except for the whitespacing
05:56:32FromDiscord<bubblie> working with machine learning so much nowadays has driven me nuts because python is the standard for it, and people are like "it's so simple so it is so accessible" but half the time working in python feels like you're not actually coding
05:57:29FromDiscord<bubblie> (edit) "so" => "supposed to be"
06:01:07FromDiscord<bubblie> In reply to @bubblie "it feels like python": I think I like it because it doesn't feel like python, feels like a breath of fresh air when I was use anything other than python at this point
06:01:28FromDiscord<bubblie> (edit) removed "was"
06:38:53FromDiscord<nervecenter> In reply to @bubblie "I think it's incredibly": It's pretty fantastic for data work, Datamancer and Arraymancer are quite good. I made a gnuplot interface library if you ever need it, `nimgnuplot`
06:53:25*redj_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
07:02:28*redj joined #nim
07:08:25*redj quit (Read error: Connection reset by peer)
07:09:23*redj joined #nim
08:19:02FromDiscord<TӨMΛ ☠> Is there a way to compile app so that it holds icon (.ico/.png) file embed in its .exe file?
08:25:49FromDiscord<litlighilit> what CC a u using
08:26:11FromDiscord<litlighilit> mingw or cl
08:29:00FromDiscord<litlighilit> https://forum.nim-lang.org/t/5680
08:30:39FromDiscord<TӨMΛ ☠> I'm not exactly sure which one is default, is it GCC?
08:31:20FromDiscord<litlighilit> just ref this (in fact which cc doesn't matter)
08:31:45FromDiscord<TӨMΛ ☠> Also thank you for this link, somehow search haven't got me there
09:20:02FromDiscord<janakali> In reply to @toma400 "Is there a way": I remember seeing something related to this in Nim repo
09:20:31FromDiscord<janakali> I think koch links icons in here:↵https://github.com/nim-lang/Nim/blob/66560840043d2ea8a96b4ce46ab55f0faed37349/koch.nim#L31C1-L35C34
09:23:22FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=mDIXolit
09:23:38FromDiscord<nnsee> and you can link against it as you would with anything else, you can also just `--passL` it directly
09:35:19*beholders_eye joined #nim
09:47:45*xtr00 quit (Read error: Connection reset by peer)
09:48:15*beholders_eye quit (Ping timeout: 240 seconds)
09:50:12*thunder joined #nim
09:51:32*xtr00 joined #nim
10:08:09*cws8 joined #nim
10:09:46*cws quit (Ping timeout: 256 seconds)
10:09:47*cws8 is now known as cws
10:19:25FromDiscord<0xfab_10> In reply to @mr_rowboto "I've been much more": unc
10:22:33*beholders_eye joined #nim
10:59:15*xtr00 quit (Ping timeout: 240 seconds)
11:38:38*xtr00 joined #nim
11:49:14FromDiscord<nocturn9x> what's the easiest way to guard a bit of code behind the C equivalent of an ifdef?
11:49:25FromDiscord<nocturn9x> Need to check if `MADV_HUGEPAGES` is defined
11:49:41FromDiscord<nocturn9x> (edit) "`MADV_HUGEPAGES`" => "`MADV_HUGEPAGE`"
11:49:53FromDiscord<nocturn9x> also does anyone know if there's a wrapper for `madvise` or do I need to `cimport` it?
11:54:13FromDiscord<nnsee> In reply to @nocturn9x "what's the easiest way": `when defined`?
11:54:25FromDiscord<nocturn9x> well ok but I need to import a C macro
11:54:32FromDiscord<nocturn9x> specifically `MADV_HUGEPAGE`
11:56:23FromDiscord<nnsee> In reply to @nocturn9x "specifically `MADV_HUGEPAGE`": isn't that an argument/flag not a define?
11:56:32FromDiscord<nnsee> or what would the equivalent C code look like
11:56:38FromDiscord<litlighilit> `importc` for `let`, and `emit` to redefine a c macro like `_defined_MADV_HUGEPAGE`
11:56:40FromDiscord<nocturn9x> `#ifdef MADV_HUGEPAGE`
11:56:59FromDiscord<nocturn9x> ideally this would be a `when` statement, though if is fine too
11:59:23FromDiscord<nocturn9x> In reply to @litlighilit "`importc` for `let`, and": could this be `const` perhaps?
11:59:46FromDiscord<litlighilit> I used to want this too↵(@nocturn9x)
12:00:16FromDiscord<litlighilit> And my solution is... far away from 'easy'
12:00:35FromDiscord<litlighilit> i implement a series of macros
12:00:35FromDiscord<nocturn9x> wouldn't this work? `const MADV_HUGEPAGE {.importc: "MADV_HUGEPAGE", header: "sys/mman.h".} = cint(0)` or something
12:01:42FromDiscord<litlighilit> https://github.com/nimpylib/nimpylib/blob/master/src%2Fpylib%2Fpyconfig%2Futil.nim
12:03:02FromDiscord<litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=xbQSxAZW
12:03:12FromDiscord<nocturn9x> fancy
12:03:13FromDiscord<nocturn9x> thx!
12:04:21FromDiscord<litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=xCnRbZQR
12:05:01FromDiscord<litlighilit> You may pick some of these code...↵as I also implement a lot of other feature like cache.
12:06:26FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=GDgIxsVG
12:06:36FromDiscord<nocturn9x> what happens if it's not defined? just zero?
12:06:39FromDiscord<nocturn9x> or will compilation fail?
12:07:58FromDiscord<litlighilit> 2nd param is `defval`
12:08:16FromDiscord<litlighilit> 0
12:09:00FromDiscord<nocturn9x> hmm it looks like I need quite a bit of code
12:09:05FromDiscord<nocturn9x> need to untangle the nimpy bits
12:09:59FromDiscord<nocturn9x> like there's a lot of stuff I don't need nor want
12:10:02FromDiscord<nocturn9x> the caching especially
12:10:36FromDiscord<nocturn9x> I think I'll just deal with the `let` :p
12:10:53FromDiscord<litlighilit> basically this
12:11:00FromDiscord<litlighilit> fine↵(@nocturn9x)
12:14:05FromDiscord<nocturn9x> `let MADV_HUGEPAGE {.importc: "MADV_HUGEPAGE", header: "sys/mman.h", nodecl.}: cint` works fine
12:14:22FromDiscord<nocturn9x> the question is what happens when this doesn't work because the header/constant don't exist
12:14:30FromDiscord<nocturn9x> ig I check with `when compiles()`?
12:14:54FromDiscord<litlighilit> It has been a long time since I firstly planed to split the mono-repo into several...😅↵(and btw this repo, (nim)pylib does nothing with nimpy)↵(@nocturn9x)
12:14:55FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=olBvhMab
12:15:13FromDiscord<litlighilit> It has been a long time since I firstly planed to split the mono-repo into several...😅(and btw this repo, (nim)pylib, does nothing with nimpy. They're independent)
12:15:18FromDiscord<nocturn9x> yes sorry I worded my initial question poorly
12:15:26FromDiscord<nocturn9x> In reply to @ieltan "Here is how c2nim": I need to `importc` the constant :)
12:16:18Amun-Rahardcode value for most popular systems
12:16:45FromDiscord<nocturn9x> on linux it seems to be 14
12:17:02FromDiscord<nocturn9x> I'm fine with a let, I just want to know how to check if this statement compiles
12:17:12FromDiscord<nocturn9x> `compiles()` seems to only take expressions?
12:17:17FromDiscord<ieltan> hmmm
12:17:44FromDiscord<litlighilit> and not for c, but for nim↵(@nocturn9x)
12:17:49Amun-Radoes compiles do linking? if not, that might not work
12:17:57FromDiscord<nocturn9x> In reply to @litlighilit "and not for c,": yes ik
12:18:04FromDiscord<nocturn9x> In reply to @Amun-Ra "does compiles do linking?": rip
12:18:12FromDiscord<litlighilit> and of course no↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
12:18:40Amun-Ranocturn9x: hmm, I think that may work
12:18:54FromDiscord<nocturn9x> I can't find the docs for `compiles()
12:18:57FromDiscord<nocturn9x> (edit) "`compiles()" => "`compiles()`"
12:19:07Amun-Rathat should work
12:19:22FromDiscord<litlighilit> it just checks syntax, basically
12:19:37FromDiscord<nocturn9x> rip
12:19:54FromDiscord<ieltan> the nim vm (compiles) runs before linking no ? how would that work then
12:21:44Amun-Ranocturn9x: https://play.nim-lang.org/#pasty=uUMyOIcT
12:22:35Amun-Ralooks like it's performing syntax checking only
12:22:41FromDiscord<nnsee> mfw my code doesn't enter the blimey path
12:22:57Amun-Raand that's why you can't use that method
12:23:20FromDiscord<nocturn9x> rip
12:23:22Amun-Ratrue
12:23:29FromDiscord<nocturn9x> linux only it is then
12:24:09Amun-Raor get the values in the most popular OS-es and do when/if/if
12:24:54FromDiscord<nocturn9x> the problem now is different
12:24:56FromDiscord<ieltan> why not use staticExec instead then have nim modules that importc the symbols that get compiled
12:25:09FromDiscord<nocturn9x> staticExec??
12:25:22FromDiscord<nocturn9x> In reply to @nocturn9x "the problem now is": how do I handle MADV_HUGEPAGE not being defined?
12:25:26FromDiscord<ieltan> it's a new thing
12:25:34FromDiscord<nocturn9x> no yes I know what it does
12:25:36FromDiscord<ieltan> wait no actually not
12:25:42FromDiscord<nocturn9x> I'm asking how it fits the problem
12:25:45FromDiscord<litlighilit> sure that's what i did🫠
12:25:52FromDiscord<nocturn9x> In reply to @nocturn9x "how do I handle": I could make a small C function ig
12:26:17Amun-Rabut… C does not have optional include imports
12:26:22FromDiscord<nnsee> my cursed solution: read `sys/mman.h` in as a file and search for `#define MADV_HUGEPAGE`
12:26:30FromDiscord<nocturn9x> 💀
12:26:50FromDiscord<litlighilit> then just alter to clang
12:26:53FromDiscord<nocturn9x> nah you need to mess with include paths then
12:26:59FromDiscord<nnsee> true
12:27:17Amun-Rabut you could compile program that tries to compile a program… "yo dawg […]" ;)
12:28:53FromDiscord<nocturn9x> I think the best option is:↵- everything under `when defined(linux)` to make things simpler (I only care about Linux systems anyway)↵- I `cimport` a small C function in a file that includes `sys/mman.h` and returns 1 `#ifdef MADVISE_HUGEPAGE` and 0 otherwise↵- I call that from Nim
12:29:21FromDiscord<nocturn9x> (edit) "`cimport`" => "`importc`"
12:29:22FromDiscord<nnsee> instead of a separate file you can probably just .emit it?
12:29:31FromDiscord<nocturn9x> I don't really like emit tbh
12:29:38FromDiscord<nocturn9x> Just aesthetically
12:29:51FromDiscord<litlighilit> and no need to define as function, just variable is enough
12:29:55FromDiscord<nocturn9x> I already did this for similar issues with AVX512 stuff
12:30:03FromDiscord<nocturn9x> separate file is better imo
12:30:08FromDiscord<ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=LlGCgmjf
12:30:10FromDiscord<nocturn9x> In reply to @litlighilit "and no need to": True
12:30:11Amun-Raor just require libc6-dev for build process
12:30:29FromDiscord<nocturn9x> In reply to @ieltan "you replace compiles by": hmm
12:30:36FromDiscord<nnsee> In reply to @ieltan "you replace compiles by": this is fairly cursed
12:30:38FromDiscord<nocturn9x> that would work
12:30:40FromDiscord<nocturn9x> but it's quite insane
12:30:41FromDiscord<nocturn9x> xD
12:30:52FromDiscord<ieltan> the less insane option is use a c shim
12:30:53FromDiscord<nnsee> the compiler doesn't necessarly have to be called from path as `nim` when the main program is being installed
12:30:55FromDiscord<nnsee> (edit) "installed" => "compiled"
12:31:06FromDiscord<nnsee> ie
12:31:06FromDiscord<ieltan> you can improve it :p
12:31:12FromDiscord<nocturn9x> we have ways to get the current compiler executable
12:31:15FromDiscord<nnsee> i don't have nim in path, i just do ~/.nimble/bin/nim usually
12:31:16FromDiscord<nocturn9x> that isn't the issue
12:31:28FromDiscord<nocturn9x> In reply to @nnsee "i don't have nim": now _that_ is cursed 😂
12:31:36FromDiscord<nnsee> 🤷‍♀️
12:31:43FromDiscord<nocturn9x> In reply to @nocturn9x "that isn't the issue": spawning a whole compilation pipeline to get a constant is kinda crazy
12:31:44FromDiscord<litlighilit> currentCompilerExe
12:31:59FromDiscord<litlighilit> getCurrentCompilerExe
12:32:05FromDiscord<litlighilit> getCurrentCompilerExe()
12:32:46FromDiscord<nocturn9x> I might actually go with this ngl, it's the most portable option
12:32:48FromDiscord<litlighilit> for this↵(@nnsee)
12:32:58FromDiscord<nocturn9x> it's a small price to pay
12:33:19FromDiscord<nocturn9x> though atp I think my solution isn't much worse
12:33:22FromDiscord<nocturn9x> it works on POSIX
12:33:25FromDiscord<ieltan> In reply to @nocturn9x "spawning a whole compilation": thats basically what you do when you do compiles anyways
12:33:57FromDiscord<nocturn9x> the allocation path isn't hot so when vs if doesn't matter much
12:34:04FromDiscord<ieltan> it just has a more or less natural api
12:34:49FromDiscord<ieltan> you have the proper solution imo just write sum more c
12:35:46FromDiscord<litlighilit> i use `r --eval:...` to avoid temp C file↵(@ieltan)
12:38:02*xtr00 quit (Read error: Connection reset by peer)
12:39:56FromDiscord<litlighilit> and of course become more complicated.before you're just struggling on the same way I've just struggled, download https://raw.githubusercontent.com/nimpylib/nimpylib/master/src/pylib/pyconfig/util.nim and copy into your program (MIT license, free to use)
12:40:46FromDiscord<litlighilit> and of course become more complicated.↵before you're just struggling on the same way I've just struggled, download https://raw.githubusercontent.com/nimpylib/nimpylib/master/src/pylib/pyconfig/util.nim (a dependence-free single module) and copy into your program (MIT license, free to use)
12:41:33FromDiscord<litlighilit> just modify this line as you like `const cacheDir = currentSourcePath()/../".cfgcache"`
12:41:53FromDiscord<ieltan> sorry but this module is gonna take me a while to understand
12:42:41FromDiscord<litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1443944708115140758): and of course become more complicated.before you're just struggling on the same way I've just struggled, download https://raw.githubusercontent.com/nimpylib/nimpylib/a3d8eb3d41f89ae41309b50fcc4446ad68c1d794/src/pylib/pyconfig/util.nim (a dependence-free single module) and copy into your program (MIT license, free to use)
12:43:08FromDiscord<litlighilit> right, complicated, as I mentioned above
12:43:33FromDiscord<ieltan> the actual solution doesnt need all that because he can just write a c file and importc that one instead
12:44:28FromDiscord<litlighilit> that only allows `importc` for `let`
12:46:28*xtr00 joined #nim
12:47:15FromDiscord<litlighilit> the only thing that may be not necessary in this module is cache,but to be honest without cache, compilation would be a bit slow as long as many C symbols are imported
12:49:22FromDiscord<bubblie> In reply to @nervecenter "It's pretty fantastic for": I think it’d be really nice if I could get a resnet model working in arraymancer, I don’t know if arraymancer can read h5 or keras files
12:56:53FromDiscord<aethrvmn> @mratsim\: does it?↵(@bubblie)
13:00:27FromDiscord<vindaar> In reply to @aethrvmn "<@570268431522201601>\: does it? (<@415227941408997": kind of, but not HDF5 files for other models. The reason is mostly the compile time / runtime barrier. You'd need to define the model at compile time in Nim, which means manually looking at the H5 file, reading the meta data, writing Nim code for the layers etc and then you could load the file. This kind of stuff is just much easier in a language that is not st
13:03:28FromDiscord<aethrvmn> Could you not add that into the macro definition or smth? Like a loadFrom in the `network` macro that takes a type Path or a string↵(@vindaar)
13:03:50FromDiscord<aethrvmn> Iirc saving/loading is still a PITA in arraymancer
13:04:35*beholders_eye quit (Ping timeout: 240 seconds)
13:06:53*beholders_eye joined #nim
13:35:47FromDiscord<vindaar> In reply to @aethrvmn "Could you not add": I mean yeah you'd have to use the `network` macro to describe everything that is stored in the file, because reading the H5 file can only happen at runtime, but the network layout has to be known at compile time
13:48:35FromDiscord<bubblie> Arraymancer is so brilliantly simple but unfortunately it’d be hard for me to fully migrate everything im doing to arraymancer atm
13:48:43FromDiscord<bubblie> In reply to @vindaar "I mean yeah you'd": Hmmmmmm
13:51:38FromDiscord<bubblie> I should read arraymancer’s code to understand what’s going on in the background
13:59:06FromDiscord<vindaar> well, as I said, it's a fundamental mismatch between compile time and runtime
13:59:15FromDiscord<vindaar> you need to know the network layout at compile time
13:59:21FromDiscord<vindaar> but HDF5 files can only be read at runtime
14:06:01FromDiscord<bubblie> Right
14:11:44FromDiscord<nocturn9x> question
14:11:48FromDiscord<nocturn9x> I wrote this
14:12:04FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=DzrgmZqx
14:12:11FromDiscord<nocturn9x> can I use `cint` for bool
14:12:13FromDiscord<nocturn9x> and just convert
14:18:40FromDiscord<machoxv> Hi everyone, new to Nim↵↵Just curious to understand (as I use LLMs heavily in my coding) that Nim is strong with the main coding LLMs (Claude, GPT, Grok etc.)?
14:34:29FromDiscord<nocturn9x> @ieltan I did a mix of your solution and mine
14:35:41FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=vMcuQovt
14:35:45FromDiscord<nocturn9x> this works
14:42:24FromDiscord<nnsee> In reply to @machoxv "Hi everyone, new to": define "strong"
14:42:39FromDiscord<nnsee> most LLMs understand the general syntax
14:43:14FromDiscord<nnsee> but hallucinated packages (mostly trying to import python packages in Nim) are not uncommon
14:46:59FromDiscord<nocturn9x> I'm trying to replicate what I just did
14:47:00FromDiscord<nocturn9x> but with emit
14:47:03FromDiscord<nocturn9x> and it's not working?
14:47:27FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=GRpTZfEf
14:48:05FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=SvIpDrEy
14:48:24FromDiscord<nocturn9x> am I forgetting to export something
14:51:07FromDiscord<nocturn9x> ok, it works if I use `include`
14:51:17FromDiscord<nocturn9x> I suppose it's some sort of namespace issue
15:08:20FromDiscord<litlighilit> Though it's not direct answer, As as long as you have used `emit`↵You could just use that in the function body.
15:11:01FromDiscord<litlighilit> Your `NIM_EXTERNC` not placed rightly?↵(@nocturn9x)
15:11:09FromDiscord<nocturn9x> it's not?
15:11:30FromDiscord<litlighilit> let me try...
15:16:08FromDiscord<litlighilit> it turns out
15:16:20FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=jEqIEgXZ
15:16:26FromDiscord<nocturn9x> this seems like it should work
15:16:41FromDiscord<litlighilit> Just replace the --eval\:... with that file itself.↵(@nocturn9x)
15:17:04FromDiscord<nocturn9x> I mean, does it matter?
15:17:41FromDiscord<litlighilit> It seems such a method of defining a function doesn't work iff being imported
15:18:43FromDiscord<litlighilit> so which is easier is↵use `r heimdall/util/memory/thp/thp`instead of r --eval\:'include ...'
15:18:53FromDiscord<litlighilit> so which is easier is↵use r heimdall/util/memory/thp/thp↵instead of `r --eval:'include ...'`
15:19:03FromDiscord<litlighilit> so which is easier isuse `r heimdall/util/memory/thp/thp`↵instead of r --eval\:'include ...'
15:19:55FromDiscord<nocturn9x> fair
15:20:19FromDiscord<litlighilit> so which is easier is↵use r ... heimdall/util/memory/thp/thp↵instead of r ... --eval\:'include ...'
15:20:36FromDiscord<litlighilit> so which is easier isuse "r ... heimdall/util/memory/thp/thp"↵instead of "r ... --eval\:'include ...'"
15:21:27FromDiscord<nocturn9x> yup, works
15:26:07FromDiscord<litlighilit> after several edit, I've made it work when being used via `import`\:TL;NR↵1. change from nodecl to cdecl↵2. change nim restype from cint to bool↵3. change c arglist from () to (void)
15:26:18FromDiscord<litlighilit> after several edit, I've made it work when being used via import\:↵TL;NRchange from nodecl to cdecl↵change nim restype from cint to bool↵change c arglist from () to (void)
15:26:52FromDiscord<litlighilit> after several edit, I've made it work when being used via import\:TL;NR↵1. change from nodecl to cdecl↵2. change nim restype from cint to bool↵3. change c arglist from () to (void)
15:27:33FromDiscord<litlighilit> So just use this instead, for simplification
15:30:10*beholders_eye quit (Ping timeout: 246 seconds)
15:32:15*beholders_eye joined #nim
17:07:36FromDiscord<bubblie> In reply to @vindaar "but HDF5 files can": The more I think about it preprocessing seems like the best approach but that also sorta ruins the point of the h5 file itself, it being ran at runtime makes the most sense so im kind of stumpted on how this could be approached in nim at all.
17:10:18FromDiscord<vindaar> sent a long message, see https://pasty.ee/SUtuNPwS
17:11:23FromDiscord<bubblie> I see, so I guess it’ll be a while then
17:11:31FromDiscord<bubblie> I heard about nimony it looks promising
17:12:30FromDiscord<vindaar> yeah, I agree. the new compiler architecture should make a lot of stuff much cleaner to integrate (and hopefully will also make the compiler faster even before taking incremental compilation into account, but I guess we'll have to see on that)
17:13:31FromDiscord<bubblie> I think once nimony is released if I can help in any way as well I would
17:16:13FromDiscord<bubblie> Is there any computer vision tools for nim actually?
17:16:16FromDiscord<bubblie> Now that I think about it
17:17:30FromDiscord<vindaar> In reply to @bubblie "Is there any computer": not beyond opencv bindings, as far as I know. there was a package using/ extending arraymancer for vision tasks years and years ago, but it hasn't seen any updates: https://github.com/edubart/arraymancer-vision
17:17:40FromDiscord<vindaar> In reply to @bubblie "I think once nimony": well, your help would also be appreciated before that of course 🙂
18:00:39FromDiscord<bubblie> In reply to @vindaar "well, your help would": Is there anything in specific that needs volunteers?
21:02:51*_th3r00t joined #nim
21:03:23*th3r00t quit (Ping timeout: 244 seconds)
21:03:34*beholders_eye quit (Quit: WeeChat 4.6.3)
21:03:47*beholders_eye joined #nim
21:11:16*beholders_eye quit (Quit: WeeChat 4.6.3)
21:11:29*beholders_eye joined #nim
22:41:07*beholders_eye quit (Ping timeout: 264 seconds)
23:00:15*switchy quit (Ping timeout: 240 seconds)
23:03:34*switchy joined #nim
23:08:33*beholders_eye joined #nim