| 00:00:08 | * | rockcavera joined #nim |
| 00:35:41 | FromDiscord | <Elegantbeef> @bubblie it's single pass and it forces the code to be forward declared which is nicer to read |
| 00:35:41 | FromDiscord | <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:37 | FromDiscord | <bubblie> Thank you! |
| 04:23:35 | FromDiscord | <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:23 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=Eklmvblp |
| 05:07:27 | FromDiscord | <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:03 | FromDiscord | <Elegantbeef> Row did you know about `nim secret`? |
| 05:09:06 | FromDiscord | <Buckwheat> woah |
| 05:09:12 | FromDiscord | <Buckwheat> it's a Nimscript REPL |
| 05:10:10 | FromDiscord | <mr_rowboto> In reply to @Elegantbeef "Row did you know": no, what is it? |
| 05:10:20 | FromDiscord | <Elegantbeef> A nimscript repl |
| 05:10:24 | FromDiscord | <mr_rowboto> fuck my life |
| 05:11:22 | FromDiscord | <Buckwheat> looooooooool |
| 05:11:26 | FromDiscord | <mr_rowboto> jhahaha |
| 05:12:40 | FromDiscord | <nervecenter> `nim secret` is not as...robust as `inim` |
| 05:12:51 | FromDiscord | <mr_rowboto> unfuck my life 😄 |
| 05:13:42 | FromDiscord | <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:02 | FromDiscord | <mr_rowboto> Well it now does. |
| 05:14:17 | FromDiscord | <mr_rowboto> However the activity on `inim` seems a bit stagnant |
| 05:14:27 | FromDiscord | <mr_rowboto> I'm afraid it's abandoned, the state of the code is... erhh... |
| 05:14:41 | FromDiscord | <mr_rowboto> _suspicious_... like, there are hundreds of duplicated lines |
| 05:14:48 | FromDiscord | <mr_rowboto> as if it was left in the middle of a refactor |
| 05:14:57 | FromDiscord | <nervecenter> an automated refactor likely |
| 05:15:20 | FromDiscord | <Buckwheat> you could fork it and rework it yourself |
| 05:15:24 | FromDiscord | <mr_rowboto> If the maintainers accept my PR, I'm cleaning it up for sure. |
| 05:15:28 | FromDiscord | <nervecenter> With Nim 3 coming down the pipe, a total rework of REPL stuff could be in order anyways |
| 05:15:40 | FromDiscord | <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:12 | FromDiscord | <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:29 | FromDiscord | <mr_rowboto> that would be amazing |
| 05:16:42 | FromDiscord | <mr_rowboto> but I need my REPL now haha |
| 05:17:16 | FromDiscord | <mr_rowboto> and I'm both anxious and capable of coding, so... yeah... I went into the rabbit hole 😂 |
| 05:17:48 | FromDiscord | <mr_rowboto> In reply to @Buckwheat "you could fork it": already have a name: reploid |
| 05:17:55 | FromDiscord | <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:02 | FromDiscord | <nervecenter> ah you'd have a name, neat |
| 05:18:17 | FromDiscord | <Buckwheat> I can test across the multiple OSes I have access to |
| 05:18:17 | FromDiscord | <mr_rowboto> yeah, but, only if they don't respond |
| 05:18:27 | FromDiscord | <Buckwheat> ...and MAYBE help maintain it |
| 05:18:31 | FromDiscord | <Buckwheat> (if help is needed) |
| 05:19:11 | FromDiscord | <mr_rowboto> nim is so fun |
| 05:19:18 | FromDiscord | <mr_rowboto> never felt this "at home" with a lang |
| 05:19:47 | FromDiscord | <Buckwheat> honestly I'm tempted to go find another Nim project I could go help with |
| 05:19:57 | FromDiscord | <Buckwheat> even just the 2 small contributions I made to Futhark were fun |
| 05:20:05 | FromDiscord | <Buckwheat> felt like I was actually apart of something |
| 05:20:35 | FromDiscord | <mr_rowboto> yeah, lang aside, idk why or how, but the community is healthy |
| 05:20:58 | FromDiscord | <Buckwheat> tight knit I've noticed too... realized some of the actives here got a lot of projects |
| 05:21:21 | FromDiscord | <Buckwheat> meanwhile all I have to show besides my Futhark patches is a Nim/x86 Assembly proof-of-concept |
| 05:21:23 | FromDiscord | <mr_rowboto> It's something that calls for my attention because I've been on smaller communities that are actually super harsh |
| 05:21:27 | FromDiscord | <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:39 | FromDiscord | <mr_rowboto> In reply to @Elegantbeef "It's only cause there": No, I can assure you Beef |
| 05:21:50 | FromDiscord | <mr_rowboto> I've seen smaller communities made of a core of assholes |
| 05:22:08 | FromDiscord | <Elegantbeef> You haven't seen the core devs of Nim |
| 05:22:20 | FromDiscord | <mr_rowboto> I mean this is true to an extent, ofc |
| 05:22:33 | FromDiscord | <mr_rowboto> Yeah, but the core devs of nim don't come here being assholes |
| 05:22:46 | FromDiscord | <Elegantbeef> No they do it on the forums |
| 05:22:49 | FromDiscord | <mr_rowboto> maybe they actually _are_, but not regularly here |
| 05:22:51 | FromDiscord | <mr_rowboto> yep |
| 05:23:19 | FromDiscord | <mr_rowboto> well these guys were like, if you, sokam, and say, planetis would be treating everyone like they're idiots |
| 05:23:43 | FromDiscord | <Buckwheat> idiot? that's me! |
| 05:23:45 | FromDiscord | <mr_rowboto> ...for a community of <20 ppl... the hubris |
| 05:24:20 | FromDiscord | <Elegantbeef> I only treat people like idiots when they earn it |
| 05:25:44 | FromDiscord | <Buckwheat> I'd like to think I'm the same way but I also mostly just keep to myself... |
| 05:25:52 | FromDiscord | <Buckwheat> don't have to run into too many people I'd consider an idiot |
| 05:26:12 | FromDiscord | <Buckwheat> except when I look in the mirror, that guy in the mirror is pretty dumb |
| 05:26:31 | FromDiscord | <Elegantbeef> He's especially dumb, cause he always is just standing in the mirror waiting to mirror you |
| 05:26:49 | FromDiscord | <Buckwheat> right? he needs to be more original |
| 05:26:53 | FromDiscord | <Elegantbeef> Like get a fucking job or something |
| 05:27:12 | FromDiscord | <Buckwheat> yeah MIRROR LOSER |
| 05:27:24 | FromDiscord | <Buckwheat> stop wasting your life being a literal reflection of me |
| 05:27:34 | FromDiscord | <Buckwheat> (not you, the guy in the mirror) |
| 05:30:13 | FromDiscord | <mr_rowboto> In reply to @Elegantbeef "I only treat people": Welp, I'm... _I have my moments_. |
| 05:30:43 | FromDiscord | <Elegantbeef> Hey I don't think that I'm not an idiot |
| 05:31:10 | FromDiscord | <Elegantbeef> I think I'm a bumbling moron! |
| 05:31:25 | FromDiscord | <Buckwheat> I'm have stupid |
| 05:31:33 | FromDiscord | <Buckwheat> durrrrr |
| 05:31:39 | FromDiscord | <mr_rowboto> I meant that I have my moments where I treat people like idiots. |
| 05:31:53 | FromDiscord | <mr_rowboto> I've been much more regulated now that I'm old. |
| 05:33:24 | FromDiscord | <mr_rowboto> (edit) "where" => "when" |
| 05:34:01 | FromDiscord | <mr_rowboto> Boost of patience and hindsight I guess. |
| 05:55:17 | FromDiscord | <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:50 | FromDiscord | <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:32 | FromDiscord | <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:29 | FromDiscord | <bubblie> (edit) "so" => "supposed to be" |
| 06:01:07 | FromDiscord | <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:28 | FromDiscord | <bubblie> (edit) removed "was" |
| 06:38:53 | FromDiscord | <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:02 | FromDiscord | <TӨMΛ ☠> Is there a way to compile app so that it holds icon (.ico/.png) file embed in its .exe file? |
| 08:25:49 | FromDiscord | <litlighilit> what CC a u using |
| 08:26:11 | FromDiscord | <litlighilit> mingw or cl |
| 08:29:00 | FromDiscord | <litlighilit> https://forum.nim-lang.org/t/5680 |
| 08:30:39 | FromDiscord | <TӨMΛ ☠> I'm not exactly sure which one is default, is it GCC? |
| 08:31:20 | FromDiscord | <litlighilit> just ref this (in fact which cc doesn't matter) |
| 08:31:45 | FromDiscord | <TӨMΛ ☠> Also thank you for this link, somehow search haven't got me there |
| 09:20:02 | FromDiscord | <janakali> In reply to @toma400 "Is there a way": I remember seeing something related to this in Nim repo |
| 09:20:31 | FromDiscord | <janakali> I think koch links icons in here:↵https://github.com/nim-lang/Nim/blob/66560840043d2ea8a96b4ce46ab55f0faed37349/koch.nim#L31C1-L35C34 |
| 09:23:22 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=mDIXolit |
| 09:23:38 | FromDiscord | <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:25 | FromDiscord | <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:14 | FromDiscord | <nocturn9x> what's the easiest way to guard a bit of code behind the C equivalent of an ifdef? |
| 11:49:25 | FromDiscord | <nocturn9x> Need to check if `MADV_HUGEPAGES` is defined |
| 11:49:41 | FromDiscord | <nocturn9x> (edit) "`MADV_HUGEPAGES`" => "`MADV_HUGEPAGE`" |
| 11:49:53 | FromDiscord | <nocturn9x> also does anyone know if there's a wrapper for `madvise` or do I need to `cimport` it? |
| 11:54:13 | FromDiscord | <nnsee> In reply to @nocturn9x "what's the easiest way": `when defined`? |
| 11:54:25 | FromDiscord | <nocturn9x> well ok but I need to import a C macro |
| 11:54:32 | FromDiscord | <nocturn9x> specifically `MADV_HUGEPAGE` |
| 11:56:23 | FromDiscord | <nnsee> In reply to @nocturn9x "specifically `MADV_HUGEPAGE`": isn't that an argument/flag not a define? |
| 11:56:32 | FromDiscord | <nnsee> or what would the equivalent C code look like |
| 11:56:38 | FromDiscord | <litlighilit> `importc` for `let`, and `emit` to redefine a c macro like `_defined_MADV_HUGEPAGE` |
| 11:56:40 | FromDiscord | <nocturn9x> `#ifdef MADV_HUGEPAGE` |
| 11:56:59 | FromDiscord | <nocturn9x> ideally this would be a `when` statement, though if is fine too |
| 11:59:23 | FromDiscord | <nocturn9x> In reply to @litlighilit "`importc` for `let`, and": could this be `const` perhaps? |
| 11:59:46 | FromDiscord | <litlighilit> I used to want this too↵(@nocturn9x) |
| 12:00:16 | FromDiscord | <litlighilit> And my solution is... far away from 'easy' |
| 12:00:35 | FromDiscord | <litlighilit> i implement a series of macros |
| 12:00:35 | FromDiscord | <nocturn9x> wouldn't this work? `const MADV_HUGEPAGE {.importc: "MADV_HUGEPAGE", header: "sys/mman.h".} = cint(0)` or something |
| 12:01:42 | FromDiscord | <litlighilit> https://github.com/nimpylib/nimpylib/blob/master/src%2Fpylib%2Fpyconfig%2Futil.nim |
| 12:03:02 | FromDiscord | <litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=xbQSxAZW |
| 12:03:12 | FromDiscord | <nocturn9x> fancy |
| 12:03:13 | FromDiscord | <nocturn9x> thx! |
| 12:04:21 | FromDiscord | <litlighilit> sent a code paste, see https://play.nim-lang.org/#pasty=xCnRbZQR |
| 12:05:01 | FromDiscord | <litlighilit> You may pick some of these code...↵as I also implement a lot of other feature like cache. |
| 12:06:26 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=GDgIxsVG |
| 12:06:36 | FromDiscord | <nocturn9x> what happens if it's not defined? just zero? |
| 12:06:39 | FromDiscord | <nocturn9x> or will compilation fail? |
| 12:07:58 | FromDiscord | <litlighilit> 2nd param is `defval` |
| 12:08:16 | FromDiscord | <litlighilit> 0 |
| 12:09:00 | FromDiscord | <nocturn9x> hmm it looks like I need quite a bit of code |
| 12:09:05 | FromDiscord | <nocturn9x> need to untangle the nimpy bits |
| 12:09:59 | FromDiscord | <nocturn9x> like there's a lot of stuff I don't need nor want |
| 12:10:02 | FromDiscord | <nocturn9x> the caching especially |
| 12:10:36 | FromDiscord | <nocturn9x> I think I'll just deal with the `let` :p |
| 12:10:53 | FromDiscord | <litlighilit> basically this |
| 12:11:00 | FromDiscord | <litlighilit> fine↵(@nocturn9x) |
| 12:14:05 | FromDiscord | <nocturn9x> `let MADV_HUGEPAGE {.importc: "MADV_HUGEPAGE", header: "sys/mman.h", nodecl.}: cint` works fine |
| 12:14:22 | FromDiscord | <nocturn9x> the question is what happens when this doesn't work because the header/constant don't exist |
| 12:14:30 | FromDiscord | <nocturn9x> ig I check with `when compiles()`? |
| 12:14:54 | FromDiscord | <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:55 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=olBvhMab |
| 12:15:13 | FromDiscord | <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:18 | FromDiscord | <nocturn9x> yes sorry I worded my initial question poorly |
| 12:15:26 | FromDiscord | <nocturn9x> In reply to @ieltan "Here is how c2nim": I need to `importc` the constant :) |
| 12:16:18 | Amun-Ra | hardcode value for most popular systems |
| 12:16:45 | FromDiscord | <nocturn9x> on linux it seems to be 14 |
| 12:17:02 | FromDiscord | <nocturn9x> I'm fine with a let, I just want to know how to check if this statement compiles |
| 12:17:12 | FromDiscord | <nocturn9x> `compiles()` seems to only take expressions? |
| 12:17:17 | FromDiscord | <ieltan> hmmm |
| 12:17:44 | FromDiscord | <litlighilit> and not for c, but for nim↵(@nocturn9x) |
| 12:17:49 | Amun-Ra | does compiles do linking? if not, that might not work |
| 12:17:57 | FromDiscord | <nocturn9x> In reply to @litlighilit "and not for c,": yes ik |
| 12:18:04 | FromDiscord | <nocturn9x> In reply to @Amun-Ra "does compiles do linking?": rip |
| 12:18:12 | FromDiscord | <litlighilit> and of course no↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>) |
| 12:18:40 | Amun-Ra | nocturn9x: hmm, I think that may work |
| 12:18:54 | FromDiscord | <nocturn9x> I can't find the docs for `compiles() |
| 12:18:57 | FromDiscord | <nocturn9x> (edit) "`compiles()" => "`compiles()`" |
| 12:19:07 | Amun-Ra | that should work |
| 12:19:22 | FromDiscord | <litlighilit> it just checks syntax, basically |
| 12:19:37 | FromDiscord | <nocturn9x> rip |
| 12:19:54 | FromDiscord | <ieltan> the nim vm (compiles) runs before linking no ? how would that work then |
| 12:21:44 | Amun-Ra | nocturn9x: https://play.nim-lang.org/#pasty=uUMyOIcT |
| 12:22:35 | Amun-Ra | looks like it's performing syntax checking only |
| 12:22:41 | FromDiscord | <nnsee> mfw my code doesn't enter the blimey path |
| 12:22:57 | Amun-Ra | and that's why you can't use that method |
| 12:23:20 | FromDiscord | <nocturn9x> rip |
| 12:23:22 | Amun-Ra | true |
| 12:23:29 | FromDiscord | <nocturn9x> linux only it is then |
| 12:24:09 | Amun-Ra | or get the values in the most popular OS-es and do when/if/if |
| 12:24:54 | FromDiscord | <nocturn9x> the problem now is different |
| 12:24:56 | FromDiscord | <ieltan> why not use staticExec instead then have nim modules that importc the symbols that get compiled |
| 12:25:09 | FromDiscord | <nocturn9x> staticExec?? |
| 12:25:22 | FromDiscord | <nocturn9x> In reply to @nocturn9x "the problem now is": how do I handle MADV_HUGEPAGE not being defined? |
| 12:25:26 | FromDiscord | <ieltan> it's a new thing |
| 12:25:34 | FromDiscord | <nocturn9x> no yes I know what it does |
| 12:25:36 | FromDiscord | <ieltan> wait no actually not |
| 12:25:42 | FromDiscord | <nocturn9x> I'm asking how it fits the problem |
| 12:25:45 | FromDiscord | <litlighilit> sure that's what i did🫠 |
| 12:25:52 | FromDiscord | <nocturn9x> In reply to @nocturn9x "how do I handle": I could make a small C function ig |
| 12:26:17 | Amun-Ra | but… C does not have optional include imports |
| 12:26:22 | FromDiscord | <nnsee> my cursed solution: read `sys/mman.h` in as a file and search for `#define MADV_HUGEPAGE` |
| 12:26:30 | FromDiscord | <nocturn9x> 💀 |
| 12:26:50 | FromDiscord | <litlighilit> then just alter to clang |
| 12:26:53 | FromDiscord | <nocturn9x> nah you need to mess with include paths then |
| 12:26:59 | FromDiscord | <nnsee> true |
| 12:27:17 | Amun-Ra | but you could compile program that tries to compile a program… "yo dawg […]" ;) |
| 12:28:53 | FromDiscord | <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:21 | FromDiscord | <nocturn9x> (edit) "`cimport`" => "`importc`" |
| 12:29:22 | FromDiscord | <nnsee> instead of a separate file you can probably just .emit it? |
| 12:29:31 | FromDiscord | <nocturn9x> I don't really like emit tbh |
| 12:29:38 | FromDiscord | <nocturn9x> Just aesthetically |
| 12:29:51 | FromDiscord | <litlighilit> and no need to define as function, just variable is enough |
| 12:29:55 | FromDiscord | <nocturn9x> I already did this for similar issues with AVX512 stuff |
| 12:30:03 | FromDiscord | <nocturn9x> separate file is better imo |
| 12:30:08 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#pasty=LlGCgmjf |
| 12:30:10 | FromDiscord | <nocturn9x> In reply to @litlighilit "and no need to": True |
| 12:30:11 | Amun-Ra | or just require libc6-dev for build process |
| 12:30:29 | FromDiscord | <nocturn9x> In reply to @ieltan "you replace compiles by": hmm |
| 12:30:36 | FromDiscord | <nnsee> In reply to @ieltan "you replace compiles by": this is fairly cursed |
| 12:30:38 | FromDiscord | <nocturn9x> that would work |
| 12:30:40 | FromDiscord | <nocturn9x> but it's quite insane |
| 12:30:41 | FromDiscord | <nocturn9x> xD |
| 12:30:52 | FromDiscord | <ieltan> the less insane option is use a c shim |
| 12:30:53 | FromDiscord | <nnsee> the compiler doesn't necessarly have to be called from path as `nim` when the main program is being installed |
| 12:30:55 | FromDiscord | <nnsee> (edit) "installed" => "compiled" |
| 12:31:06 | FromDiscord | <nnsee> ie |
| 12:31:06 | FromDiscord | <ieltan> you can improve it :p |
| 12:31:12 | FromDiscord | <nocturn9x> we have ways to get the current compiler executable |
| 12:31:15 | FromDiscord | <nnsee> i don't have nim in path, i just do ~/.nimble/bin/nim usually |
| 12:31:16 | FromDiscord | <nocturn9x> that isn't the issue |
| 12:31:28 | FromDiscord | <nocturn9x> In reply to @nnsee "i don't have nim": now _that_ is cursed 😂 |
| 12:31:36 | FromDiscord | <nnsee> 🤷♀️ |
| 12:31:43 | FromDiscord | <nocturn9x> In reply to @nocturn9x "that isn't the issue": spawning a whole compilation pipeline to get a constant is kinda crazy |
| 12:31:44 | FromDiscord | <litlighilit> currentCompilerExe |
| 12:31:59 | FromDiscord | <litlighilit> getCurrentCompilerExe |
| 12:32:05 | FromDiscord | <litlighilit> getCurrentCompilerExe() |
| 12:32:46 | FromDiscord | <nocturn9x> I might actually go with this ngl, it's the most portable option |
| 12:32:48 | FromDiscord | <litlighilit> for this↵(@nnsee) |
| 12:32:58 | FromDiscord | <nocturn9x> it's a small price to pay |
| 12:33:19 | FromDiscord | <nocturn9x> though atp I think my solution isn't much worse |
| 12:33:22 | FromDiscord | <nocturn9x> it works on POSIX |
| 12:33:25 | FromDiscord | <ieltan> In reply to @nocturn9x "spawning a whole compilation": thats basically what you do when you do compiles anyways |
| 12:33:57 | FromDiscord | <nocturn9x> the allocation path isn't hot so when vs if doesn't matter much |
| 12:34:04 | FromDiscord | <ieltan> it just has a more or less natural api |
| 12:34:49 | FromDiscord | <ieltan> you have the proper solution imo just write sum more c |
| 12:35:46 | FromDiscord | <litlighilit> i use `r --eval:...` to avoid temp C file↵(@ieltan) |
| 12:38:02 | * | xtr00 quit (Read error: Connection reset by peer) |
| 12:39:56 | FromDiscord | <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:46 | FromDiscord | <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:33 | FromDiscord | <litlighilit> just modify this line as you like `const cacheDir = currentSourcePath()/../".cfgcache"` |
| 12:41:53 | FromDiscord | <ieltan> sorry but this module is gonna take me a while to understand |
| 12:42:41 | FromDiscord | <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:08 | FromDiscord | <litlighilit> right, complicated, as I mentioned above |
| 12:43:33 | FromDiscord | <ieltan> the actual solution doesnt need all that because he can just write a c file and importc that one instead |
| 12:44:28 | FromDiscord | <litlighilit> that only allows `importc` for `let` |
| 12:46:28 | * | xtr00 joined #nim |
| 12:47:15 | FromDiscord | <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:22 | FromDiscord | <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:53 | FromDiscord | <aethrvmn> @mratsim\: does it?↵(@bubblie) |
| 13:00:27 | FromDiscord | <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:28 | FromDiscord | <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:50 | FromDiscord | <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:47 | FromDiscord | <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:35 | FromDiscord | <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:43 | FromDiscord | <bubblie> In reply to @vindaar "I mean yeah you'd": Hmmmmmm |
| 13:51:38 | FromDiscord | <bubblie> I should read arraymancer’s code to understand what’s going on in the background |
| 13:59:06 | FromDiscord | <vindaar> well, as I said, it's a fundamental mismatch between compile time and runtime |
| 13:59:15 | FromDiscord | <vindaar> you need to know the network layout at compile time |
| 13:59:21 | FromDiscord | <vindaar> but HDF5 files can only be read at runtime |
| 14:06:01 | FromDiscord | <bubblie> Right |
| 14:11:44 | FromDiscord | <nocturn9x> question |
| 14:11:48 | FromDiscord | <nocturn9x> I wrote this |
| 14:12:04 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=DzrgmZqx |
| 14:12:11 | FromDiscord | <nocturn9x> can I use `cint` for bool |
| 14:12:13 | FromDiscord | <nocturn9x> and just convert |
| 14:18:40 | FromDiscord | <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:29 | FromDiscord | <nocturn9x> @ieltan I did a mix of your solution and mine |
| 14:35:41 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=vMcuQovt |
| 14:35:45 | FromDiscord | <nocturn9x> this works |
| 14:42:24 | FromDiscord | <nnsee> In reply to @machoxv "Hi everyone, new to": define "strong" |
| 14:42:39 | FromDiscord | <nnsee> most LLMs understand the general syntax |
| 14:43:14 | FromDiscord | <nnsee> but hallucinated packages (mostly trying to import python packages in Nim) are not uncommon |
| 14:46:59 | FromDiscord | <nocturn9x> I'm trying to replicate what I just did |
| 14:47:00 | FromDiscord | <nocturn9x> but with emit |
| 14:47:03 | FromDiscord | <nocturn9x> and it's not working? |
| 14:47:27 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=GRpTZfEf |
| 14:48:05 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=SvIpDrEy |
| 14:48:24 | FromDiscord | <nocturn9x> am I forgetting to export something |
| 14:51:07 | FromDiscord | <nocturn9x> ok, it works if I use `include` |
| 14:51:17 | FromDiscord | <nocturn9x> I suppose it's some sort of namespace issue |
| 15:08:20 | FromDiscord | <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:01 | FromDiscord | <litlighilit> Your `NIM_EXTERNC` not placed rightly?↵(@nocturn9x) |
| 15:11:09 | FromDiscord | <nocturn9x> it's not? |
| 15:11:30 | FromDiscord | <litlighilit> let me try... |
| 15:16:08 | FromDiscord | <litlighilit> it turns out |
| 15:16:20 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=jEqIEgXZ |
| 15:16:26 | FromDiscord | <nocturn9x> this seems like it should work |
| 15:16:41 | FromDiscord | <litlighilit> Just replace the --eval\:... with that file itself.↵(@nocturn9x) |
| 15:17:04 | FromDiscord | <nocturn9x> I mean, does it matter? |
| 15:17:41 | FromDiscord | <litlighilit> It seems such a method of defining a function doesn't work iff being imported |
| 15:18:43 | FromDiscord | <litlighilit> so which is easier is↵use `r heimdall/util/memory/thp/thp`instead of r --eval\:'include ...' |
| 15:18:53 | FromDiscord | <litlighilit> so which is easier is↵use r heimdall/util/memory/thp/thp↵instead of `r --eval:'include ...'` |
| 15:19:03 | FromDiscord | <litlighilit> so which is easier isuse `r heimdall/util/memory/thp/thp`↵instead of r --eval\:'include ...' |
| 15:19:55 | FromDiscord | <nocturn9x> fair |
| 15:20:19 | FromDiscord | <litlighilit> so which is easier is↵use r ... heimdall/util/memory/thp/thp↵instead of r ... --eval\:'include ...' |
| 15:20:36 | FromDiscord | <litlighilit> so which is easier isuse "r ... heimdall/util/memory/thp/thp"↵instead of "r ... --eval\:'include ...'" |
| 15:21:27 | FromDiscord | <nocturn9x> yup, works |
| 15:26:07 | FromDiscord | <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:18 | FromDiscord | <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:52 | FromDiscord | <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:33 | FromDiscord | <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:36 | FromDiscord | <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:18 | FromDiscord | <vindaar> sent a long message, see https://pasty.ee/SUtuNPwS |
| 17:11:23 | FromDiscord | <bubblie> I see, so I guess it’ll be a while then |
| 17:11:31 | FromDiscord | <bubblie> I heard about nimony it looks promising |
| 17:12:30 | FromDiscord | <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:31 | FromDiscord | <bubblie> I think once nimony is released if I can help in any way as well I would |
| 17:16:13 | FromDiscord | <bubblie> Is there any computer vision tools for nim actually? |
| 17:16:16 | FromDiscord | <bubblie> Now that I think about it |
| 17:17:30 | FromDiscord | <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:40 | FromDiscord | <vindaar> In reply to @bubblie "I think once nimony": well, your help would also be appreciated before that of course 🙂 |
| 18:00:39 | FromDiscord | <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 |