<< 10-10-2024 >>

00:46:07FromDiscord<nervecenter> In reply to @majortrips1763 "Hmm .. anyone know": also https://nim-lang.org/docs/unittest.html
00:47:30FromDiscord<eightbit_dboy> Is it possible to use macros to create the futhark `importc` statements?
00:48:13FromDiscord<eightbit_dboy> Because that's what I'm trying to do here, but getting this error: https://media.discordapp.net/attachments/371759389889003532/1293736809909588061/create_wrapper.nim?ex=670875cb&is=6707244b&hm=dfbd88e81d8dbc132fe7b2d016307716cd22537af7a3e5f356835f094a9c307d& https://media.discordapp.net/attachments/371759389889003532/1293736810295590953/image.png?ex=670875cc&is=6707244c&hm=c04117734d932e286fd98edf3e8e515b593e5544ca05099f893ff9046a2e
00:58:13*tiorock joined #nim
00:58:13*tiorock quit (Changing host)
00:58:13*tiorock joined #nim
00:58:13*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
00:58:13*tiorock is now known as rockcavera
01:54:42*ryuukk quit (Ping timeout: 265 seconds)
01:54:49*ryuukk_ joined #nim
02:55:03FromDiscord<ardisan_> What is the benefits of using Zig compiler with Nim? I tried it and noticed my program performed faster and was reduced in size but as a newb I'd like to learn anything more.
02:56:31FromDiscord<leorize> it's easier to cross-compile
02:57:13FromDiscord<leorize> you can get the same benefits by using clang directly if you don't care about the cross-compilation part, since zig just employ libclang to perform compilation for Nim use case
03:02:45FromDiscord<ardisan_> Oh alright I'll just use it then since I will probably cross compile someday.
03:04:44FromDiscord<determiedmech1> is there an easy way to update all my nimble packages
03:05:10FromDiscord<determiedmech1> currently im just using a little ruby script
03:05:32FromDiscord<determiedmech1> sent a code paste, see https://play.nim-lang.org/#pasty=QNQKciDp
03:05:47FromDiscord<determiedmech1> (edit) "https://play.nim-lang.org/#pasty=hnOqAyOf" => "https://play.nim-lang.org/#pasty=iWbpdMJs"
03:06:25FromDiscord<determiedmech1> (edit) "https://play.nim-lang.org/#pasty=cNMVsuDu" => "https://play.nim-lang.org/#pasty=cYAelfxJ"
03:07:22FromDiscord<leorize> don't↵(@determiedmech1)
03:07:32FromDiscord<determiedmech1> oh
03:07:44FromDiscord<determiedmech1> i see
03:07:48FromDiscord<determiedmech1> why
03:08:09FromDiscord<leorize> the packages you have should be selected to have the "right" version for the project you build
03:08:17FromDiscord<determiedmech1> ah
03:08:28FromDiscord<leorize> because packages can have breaking changes between releases, which make your software stops compiling
03:09:13FromDiscord<leorize> `nimble --localdeps` is useful for having package storage scoped for a particular project
03:09:31FromDiscord<determiedmech1> oh i actually didnt know about localdeps lol
03:09:33FromDiscord<determiedmech1> thx
03:10:08FromDiscord<leorize> I'm not sure if it's still the case now, but it used to be that you can have package version conflicts in the global store that'd break all of your projects
03:11:37FromDiscord<leorize> or your project would compile today, build another project which changes the global package store and suddenly your project wouldn't compile anymore
03:11:55FromDiscord<leorize> I heard that new nimble is a lot better now, but some scars doesn't fade
03:25:55*rockcavera quit (Remote host closed the connection)
04:08:25*SchweinDeBurg joined #nim
04:19:27FromDiscord<eightbit_dboy> Is it possible to use macro expansion to generate `futhark` `importc` statements?
04:19:33FromDiscord<eightbit_dboy> I'm trying to do that, but it's not working.
04:20:11FromDiscord<eightbit_dboy> https://media.discordapp.net/attachments/371759389889003532/1293790155588505700/image.png?ex=6708a77a&is=670755fa&hm=24b9abe68b819c4a0322af8dfb2e2756e2ba47c461821ca69ca5a82fe811daf9&
04:20:45FromDiscord<Elegantbeef> use a template
04:20:58FromDiscord<eightbit_dboy> Ah, so the `[T]` stuff?
04:21:04FromDiscord<Elegantbeef> No
04:21:08FromDiscord<Elegantbeef> Use a template
04:21:52FromDiscord<eightbit_dboy> I thought the `[T]` stuff in Nim was templates, lemme look into it.
04:22:16FromDiscord<eightbit_dboy> aH
04:22:20FromDiscord<eightbit_dboy> (edit) "aH" => "Ah."
04:22:51FromDiscord<eightbit_dboy> So templates expand to whatever's inside them?
04:25:48FromDiscord<eightbit_dboy> So I changed it to this, but that gives me the following output: https://media.discordapp.net/attachments/371759389889003532/1293791566972059658/image.png?ex=6708a8cb&is=6707574b&hm=e8c599a57bfabaaec9e9bc876bd8f6dc1738caef211dcfe0a118b0ff2a61ca12& https://media.discordapp.net/attachments/371759389889003532/1293791567215202304/image.png?ex=6708a8cb&is=6707574b&hm=01fe100a52cb682edacb3fabadcaeda5c99c8f5064093d20ac19a29c3a3a809f&
04:26:23FromDiscord<Elegantbeef> The issue is inside futhark
04:26:29FromDiscord<eightbit_dboy> Dang.
04:26:37FromDiscord<Elegantbeef> Futhark is likely doing `.strval` and expects a strlit there
04:27:08FromDiscord<eightbit_dboy> So I'll have to do the template expansion all myself in the text file?
04:28:18FromDiscord<Elegantbeef> Well you could make an issue on futhark
04:28:25FromDiscord<eightbit_dboy> Can do
04:46:35FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=yERNZUnJ
04:46:44FromDiscord<TFed> how can i make that work
04:46:55FromDiscord<eightbit_dboy> Tables
04:46:59FromDiscord<Elegantbeef> `std/tables`
04:47:03FromDiscord<Elegantbeef> Or use an enum indexed array
04:47:14FromDiscord<eightbit_dboy> try `.toTable()`
04:47:25FromDiscord<Elegantbeef> Though look at `std/colors` and `std/terminal`
04:49:17FromDiscord<TFed> yup it works somehow
04:50:09FromDiscord<TFed> there is a problem, i need exactly to index by string
04:50:42FromDiscord<Elegantbeef> If you only need those colours do you really need to ? 😄
04:51:48FromDiscord<TFed> i need to take input from terminal in text form
04:51:58FromDiscord<Elegantbeef> But you can just do `import std/[color, terminal]; echo parseColor("blue").ansiForegroundColorCode(), "hello")`
04:52:51FromDiscord<Elegantbeef> `std/color` and `std/terminal` handle this all
04:53:18FromDiscord<TFed> I'll give it try, if i can use colors from std library this way, that would be nice
04:54:09FromDiscord<TFed> anyway, also nice to know how build dict as well😏
05:14:10FromDiscord<basilajith> Is there a Nim alternative for https://github.com/thoughtworks/pii-anonymizer?
05:15:44*disso-peach quit (Quit: Leaving)
05:23:19FromDiscord<odexine> No
05:23:23FromDiscord<odexine> Not as of now
05:23:27FromDiscord<odexine> Sounds like a good project though
05:28:18FromDiscord<basilajith> Oh, okay.
06:27:30*PMunch joined #nim
06:43:30FromDiscord<TFed> once again a forgot to mention, what app I'm working on.... It's a tiny highlight command
06:44:12FromDiscord<TFed> so i need to store colors inside of the string as well
06:46:47FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=orDDZiUx
06:46:56FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=IruxBOJf
06:47:37FromDiscord<TFed> i can't concatenate colors this way...
06:47:55FromDiscord<Elegantbeef> `ansiResetCode()`
06:48:01FromDiscord<Elegantbeef> There is also `styledWrite`
06:48:32FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=dTNOWDTl
06:48:41FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=JQzGhAJG
06:49:25FromDiscord<TFed> sent a code paste, see https://play.nim-lang.org/#pasty=RHujeFor
06:53:38FromDiscord<TFed> as i said it's not for output, my code works, anyway
06:54:00FromDiscord<TFed> as i said it's not for output, does not matter, my code works anyway
06:54:09FromDiscord<Elegantbeef> You never said it was for output, but yes you can concatenate colours using `parseColor`
06:54:22FromDiscord<Elegantbeef> not for output\ 😄
06:55:17FromDiscord<TFed> yup, i did not, sorry😅
06:55:42FromDiscord<TFed> yup, i did not, sorry😅, i thought i did
06:56:50FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=czEKkFOM
06:58:47FromDiscord<TFed> it was my mistake, i never said that it's not for output, i should provide more info about what i'm trying todo 🙂
07:01:41FromDiscord<Elegantbeef> I have to applaud the introspection in your process, even though there is no need to admit to anything 😄
07:02:45Amun-Rahmm, I've done something bad in CT, I have "Error: unhandled exception: cannot extract number from invalid AST node [ERecoverableError]" on nim pre 2.2.0
07:03:30FromDiscord<Elegantbeef> This is why we need a debug compiler
07:05:22FromDiscord<Elegantbeef> Well that error message only appears in 3 procedures so it's likely related to where you're attempting to get an ordinal or a float
07:05:30FromDiscord<Elegantbeef> So ensure you do not do anything funky
07:06:41Amun-RaI've found the culprit: let colors = palette.splitWhitespace.mapIt it.parseHexInt
07:07:11FromDiscord<Elegantbeef> That does not seem like it'd cause an issue
07:07:36Amun-RaI commented it out and it compiles fine
07:08:20Amun-Raat least that file ;)
07:09:10Amun-Rano, you're right, I'm blind
07:09:34FromDiscord<Elegantbeef> I always am, when I am
07:10:00Amun-Ra;)
07:24:44Amun-RaI have a function that reads a string of "rrggbb rrggbb" data and creates an array of RColor objects
07:25:08Amun-Rait was declared as: proc parse_color_palette*[N: static[uint]](palette: string): array[N, RColor] {.compiletime, raises: ValueError.}
07:25:29Amun-Raa few days ago (I git blamed myself), I changed it to:
07:25:35Amun-Rait was declared as: proc parse_color_palette*[N: static[uint]](palette: static string): array[N, RColor] {.compiletime, raises: ValueError.}
07:27:31Amun-Raeven func with empty body gives that error
07:30:21Amun-Raplay.nim shows different, more clear error: "Error: cannot generate code for: N", hmm…
07:37:12Amun-Ragit clone to a fresh directory; git checkout v2.0.8; ./build_all and now I can see that error too
07:38:23Amun-Raprevious installation was built after checking v2.0.8 from v2.0.6
08:44:48Amun-RaI rebuilt all nim 2 version from scratch and now everything's hunky dory
08:48:52FromDiscord<Elegantbeef> Must've been a cosmic ray corrupting your install
08:49:58Amun-Ramhm
08:50:31Amun-Raor, what's more probable, pebkac
08:50:53FromDiscord<Elegantbeef> Blame the first, then if that fails the second
08:51:00Amun-Ra;)
08:57:57FromDiscord<spotlightkid> I have a custom task in the nimble file of my library wrapper project, which compiles some examples. These examples should not be installed with `nimble install`. How can I define a `require` just for this task? The dependency is not needed for the normal install of the wrapper.
08:58:34*Artea joined #nim
08:59:06FromDiscord<spotlightkid> Do I need to create a separate nimble file in my `examples` folder?
09:05:51PMunchHmm, I guess you could throw in a `when not defined(examples)` or something like that
09:05:59PMunchNimble files are NimScript after all
09:06:44PMunchNot sure how subcommands are done in NimScript, but you might be able to just do a static check on whether the task runs or not
09:08:13Amun-Rais 'requires' required to be on top level?
09:09:26Amun-Rais not I wonder whether requires inside a task would work
09:10:29FromDiscord<spotlightkid> Nope. tried that. Doesn't work. Required dependency not found.↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
09:12:04FromDiscord<Elegantbeef> There is a new `taskrequires` iirc
09:19:08FromDiscord<spotlightkid> that's it! `taskrequires("examples", "sdl2")`
09:19:13FromDiscord<spotlightkid> thanks, beef!
09:20:05FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=KFCHsnSM
09:20:18FromDiscord<albassort> error at [1] DbConn != DbConn
10:05:25FromDiscord<eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=cQJbmaIf
11:18:03*cnx quit (Ping timeout: 252 seconds)
11:25:57*ryuukk_ quit (Remote host closed the connection)
11:26:14*cnx joined #nim
11:33:49*ryuukk joined #nim
11:35:50FromDiscord<majortrips1763> Soo, any advice on writing an iterator that will not need `malloc()`, uses no new memory structures, and doesn't use yield? Thinking of doing `Type.next()` as that fits the bill, and is what I am used to.
11:41:11FromDiscord<odexine> What do you exactly mean by “use no new memory structures”?
11:41:24FromDiscord<odexine> Iterators require a state somewhere
11:42:32FromDiscord<demotomohiro> In reply to @majortrips1763 "Soo, any advice on": Default non-closure iterator is inlined and shoudn't allocate memory.
11:42:48FromDiscord<majortrips1763> The memory in question was already setup by the bootloader, so each member, even though they can all be different sizes, has the same leading structure, allowing me to cast the 1st entry to a structure which contains `{type, flags, size}`. So given the address of any of the members I can `obj.next()` to find the following entry.
11:44:05*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
11:45:14FromDiscord<demotomohiro> Do you need to use closure iterator and inline iterator doesn't work?
11:46:28FromDiscord<majortrips1763> I have yet to write any iterators. Picked the project to learn Nim .. I know what the memory looks like at the lowest level .. trying to understand the bestest Nim'ish solution that works when there is no allocator available .. and a temporary stack at that.
11:47:37FromDiscord<majortrips1763> The data structures I am iterating over describe the hardware, memory, devices, etc.. so I need to be able to process it all in order to initialize memory and get `malloc()` working.
11:50:06FromDiscord<majortrips1763> and .. realistically .. setup a long-term stack
11:51:20FromDiscord<majortrips1763> calling symantics are really no different than a singly linked list. Given any node, just return the next node in the list.
11:52:08FromDiscord<majortrips1763> Ahh, std/list does use `list.next()`
11:52:17FromDiscord<majortrips1763> (edit) "std/list" => "std/lists"
11:54:12FromDiscord<majortrips1763> I will just go that route as it is the closest analog. Each node doesn't actually have a pointer to the next node .. have to compute it, but the end result is the same.
12:06:51FromDiscord<demotomohiro> `list.next` is just a ref type field points to next node. Probably `iterator items` is what you want to read to learn about an iterator.
12:09:34FromDiscord<majortrips1763> Hmm
12:11:01FromDiscord<majortrips1763> Doesn't that expect each item to be the same size?
12:13:45FromDiscord<demotomohiro> inline iterator doesn't expect each item to be the same size.
12:13:48FromDiscord<majortrips1763> Oh, I see how it is implemented for characters in a string.. interesting
12:14:15FromDiscord<majortrips1763> What is `yield` doing in Nim?
12:16:05FromDiscord<demotomohiro> inline iterator just transform AST. Data structor you iterate doesn't matter.
12:17:37FromDiscord<majortrips1763> Was curious about the the stack behavior honestly. Trying to understand as much as I can about all of it.
12:18:35FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=bnBaYmNs
12:19:53FromDiscord<demotomohiro> Inline iterator works like template, but `yield x` is replaced with for loop body.
12:20:36FromDiscord<majortrips1763> Interesting. Thanks!
12:21:01FromDiscord<majortrips1763> Okay .. so .. next up .. the structure param I am passing to this proc needs to be a ptr ...
12:21:13FromDiscord<majortrips1763> No copies, no refs, no GC
12:30:57FromDiscord<majortrips1763> Okay, so .. now .. do I re-cast the result from the iterator into the proper structure type, or let the caller do that...
12:38:32FromDiscord<demotomohiro> Type of the iterator yields cannot be changed at runtime.
12:39:27FromDiscord<majortrips1763> Good to know. That fits my decision to make the caller cast things as they see fit.
12:54:45FromDiscord<tauruuuuuus> Think I've encountered a gencode bug https://media.discordapp.net/attachments/371759389889003532/1293919650652094546/image.png?ex=67092014&is=6707ce94&hm=924d5131fd5003ff2b0a64f4dc098f02ef35b227fc026248d39fc521d3e9e99a&
12:54:50FromDiscord<tauruuuuuus> on v2.2.0
12:55:53FromDiscord<einjonas> what is gencode?
13:01:14FromDiscord<tauruuuuuus> lol meant to say codegen
13:18:41FromDiscord<olfactoryhallucinations> sent a code paste, see https://play.nim-lang.org/#pasty=HVTYElxS
13:27:49FromDiscord<majortrips1763> So, I have this memory packed list of structures, where each structure can be of a different type. I can identify and itterate them fine, but I am sort of trying to figure out some way to write the iterator such that I can do something like `for entry in header of type <type>`
13:31:32FromDiscord<majortrips1763> I suppose the larger issue is that I am trying to avoid touching memory too much, so I could likely setup a ptr to the first entry of a given type in a list and then have an itterator that can leverage that data to act as an iterator... 🤔
13:42:39FromDiscord<majortrips1763> Oh .. subtypes might help...
13:56:06*ntat joined #nim
13:57:20FromDiscord<majortrips1763> Hmm .. doesn't look like I can use subtypes ..
14:00:50*ryuukk quit (Remote host closed the connection)
14:02:22*ryuukk joined #nim
14:17:25*SchweinDeBurg joined #nim
14:45:29FromDiscord<majortrips1763> Can enums be given a type such as uint32?
14:53:52FromDiscord<fabric.input_output> uh `type Enum {.size: sizeof(uint32).}` = enum ...` something like that
15:59:26FromDiscord<majortrips1763> is there a bitfield type?
16:01:24FromDiscord<majortrips1763> Basically something like an enum, but understands that it is dealing with bit flags.. would kinda of be nice to support checks that validate an undefined bit isn't being set.
16:08:20FromDiscord<tauruuuuuus> In reply to @majortrips1763 "is there a bitfield": https://nim-lang.org/docs/tut1.html#sets-bit-fields
16:14:04*xet7 quit (Remote host closed the connection)
16:16:17FromDiscord<majortrips1763> In reply to @tauruuuuuus "https://nim-lang.org/docs/tut1.html#sets-bit-fields": Perfect
16:25:40FromDiscord<tauruuuuuus> This is one of my favorite things about Nim actually
16:30:16FromDiscord<tauruuuuuus> You can use set semantics and notation for tests and initialisation with that
16:34:03FromDiscord<kryp7on> In reply to @m4ul3r "Nim is absolutely a": sry for replying to months old msg haha, but, my question is: how Nim is interoperable with C? Can you just import C library like you can in Zig?
16:35:50FromDiscord<m4ul3r> In reply to @kryp7on "sry for replying to": https://nim-lang.org/docs/manual.html#foreign-function-interface
16:35:51FromDiscord<kryp7on> zig
16:35:56FromDiscord<tauruuuuuus> FFI is really easy, you just annotate a procedure definition and it brings in the c symbol
16:36:42FromDiscord<m4ul3r> Not sure how easy it is with zig, but with nim it’s pretty easy. Furthark is a goatd library to wrap so files with ease. I use it quite often for stuff like capstone and unicorn
16:37:03Amun-Rakryp7on: there's no 1:1 equivalent of zig's cInclude
16:38:59FromDiscord<kryp7on> okay, I tried reading this docs u sent but I cant see how I can import C source code that someone already made, called `example.c` for example
16:41:59FromDiscord<kryp7on> also, I see that you can manually manage program's memory but you can also use GC. Is it possible that in your program, you manually manipulate memory then switch to GC. Bcs I am sometimes doing low level memory management but sometimes in the code I dont need manually management and just want to use GC. Is that possible?
16:48:52Amun-Rayou can turn gc on or off during compilation, basic types etc are not gc collected
16:49:40*om3ga joined #nim
16:49:45Amun-Rarefs, strings, seqs use gc
16:51:42FromDiscord<kryp7on> In reply to @Amun-Ra "you can turn gc": I meant like, can I switch to memory management in SOURCE CODE? Not when I need to compile program?
16:51:57FromDiscord<kryp7on> like, in one part of my software, i manually map memory, then I dont and just use GC?
16:51:59Amun-RaIIRC not in runtime
16:53:27FromDiscord<majortrips1763> Like defining structures/data that you want the GC to ignore?
16:54:25Amun-Rayou can't write code without using the gc, I don't know how strings behave without one (no free?), probably you'll have to roll your own string type in that case
16:55:36FromDiscord<majortrips1763> I am honestly not really following the use case, though from my experience so far, you can certainly grab memory that isn't under the GC's control.
16:56:05Amun-RaI wrote low level code in nim, but I haven't used stdlib ad all
16:56:07Amun-Raat*
16:57:43Amun-Rathere is create, resize and dealloc - low level functions that work on pointers
16:58:36FromDiscord<majortrips1763> I am currently working on a module to "hopefully" handle multiboot1/multiboot2... it is my first real project in Nim so I am certainly fumbling through a few things, but at the end of the day I am finding it quite a bit more powerful as a low level language than I expected... I have been interfacing to both C and ASM directly.
16:59:11Amun-Ranice
16:59:44FromDiscord<majortrips1763> holy crud I have too many tabs open .. in too many windows..
17:02:01Amun-Rathat's what memory is for ;)
17:02:37FromDiscord<classid> Could y'all give me a cool project idea, rather something new without reinventing the wheel, or perhaps even perfecting something
17:03:04FromDiscord<classid> Doesn't matter if it's a fun and bullshittery idea
17:03:08Amun-Rais there something you wanted to write since eons?
17:03:10FromDiscord<classid> cool
17:03:34FromDiscord<majortrips1763> Yah .. just no good way to find the tab I was looking for. @demotomohiro has some very low-level code that has examples of compiling/linking .S files and interacting with low-level memory and cstrings and such.↵↵https://github.com/demotomohiro/MinimumNimPico/blob/main/src/startup.nim
17:04:12FromDiscord<majortrips1763> Also, https://github.com/demotomohiro/MinimumNimPico/blob/main/src/uartReg.nim#L7
17:16:35*disso-peach joined #nim
17:35:47FromDiscord<double_spiral> does `readFile` understand relative paths? ie `../assets/example.txt`
17:38:29Amun-Rayes
18:16:58*coldfeet joined #nim
18:43:19*disso-peach quit (Ping timeout: 252 seconds)
18:47:20FromDiscord<double_spiral> So is `glGetUniformLocation` just not wrapped in the offical nim openGL bindings? I cant seem to find it
18:48:07FromDiscord<double_spiral> Or is that more of a glfw thing? Still considerably new to this
18:48:45FromDiscord<double_spiral> Not in there either
18:50:00FromDiscord<double_spiral> Nvm found it, the lsp was being weird and grep is case sensitive :)
19:05:01*beholders_eye joined #nim
19:22:40*PMunch_ joined #nim
19:27:09PMunch_Hmm, thinking of doing an example for my NimConf talk, anyone got a library with which I could create a short sample?
19:28:17*beholders_eye quit (Ping timeout: 252 seconds)
19:29:27*Batzy_ joined #nim
19:29:45FromDiscord<jmgomez> In reply to @PMunch_ "Hmm, thinking of doing": A driver for something like mongo, redis or a db can be a great showcase. Not sure if the scope is too big though
19:30:57PMunch_I mean the scope of the project doesn't really matter
19:31:06PMunch_I just need the example snippet to be short
19:31:56*Batzy quit (Ping timeout: 255 seconds)
19:53:17*ntat quit (Quit: Leaving)
20:22:22*lain left #nim (kthxbai)
20:34:24*PMunch_ quit (Quit: leaving)
20:48:24FromDiscord<kiloneie> The flashier the better
20:59:41*coldfeet quit (Remote host closed the connection)
21:29:12FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=XRVGSJqG
21:34:17FromDiscord<Elegantbeef> @albassort are you `include`ing?
21:34:22FromDiscord<Elegantbeef> Do you have multiple modules with dbconn?
21:39:57FromDiscord<albassort> i have multiple modules with db_sqlite
21:40:04FromDiscord<albassort> im not using include
21:43:49strogon14_PMunch: something like https://www.nayuki.io/page/qr-code-generator-library maybe?
21:54:22FromDiscord<Robyn [She/Her]> Can I force Nimble to install a package even with incompatible versions?
22:01:23FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=lSiTQotX
22:01:41FromDiscord<majortrips1763> (edit) "https://play.nim-lang.org/#pasty=uhDHoUkR" => "https://play.nim-lang.org/#pasty=uUgLYIsP"
22:05:02FromDiscord<Elegantbeef> Yes if you use inhertiance it implicitly dispatches
22:09:34*krux02 joined #nim
22:10:49*krux02 quit (Client Quit)
22:14:46*rockcavera joined #nim
22:49:20FromDiscord<eightbit_dboy> What do I put in a `config.nims` in order to get it to build for the SH-4 cpu?
22:49:57FromDiscord<eightbit_dboy> Because apparently `sh4` isn't one of the options, and I didn't see anything SuperH-related there.
22:51:15FromDiscord<Elegantbeef> > The SH-4 is a RISC CPU
22:52:05FromDiscord<eightbit_dboy> Yes
22:52:24FromDiscord<eightbit_dboy> Is there a generic RISC option that could work?
22:53:49FromDiscord<eightbit_dboy> > m68k↵Well, at least I could target the Sega Genesis.
23:07:01FromDiscord<muddmaker> Looks like a PR would be required to add SuperH to the TSystemCPU enum
23:07:41FromDiscord<eightbit_dboy> Is it possible to bypass this?
23:08:26FromDiscord<Elegantbeef> Target a similar CPU and hope that the compiler for your target is compatible with that generated code
23:08:32FromDiscord<Elegantbeef> Though it's more sensible to make a PR
23:09:06FromDiscord<muddmaker> Different RISCs are not compatible with each other. SuperH is a bit unique
23:09:40FromDiscord<Elegantbeef> Well there is not much raw asm in Nim, so it's mostly hoping that things are compatible, but yea add the target
23:10:44FromDiscord<Elegantbeef> Since Nim emits C and does not really use much ASM you might be able to just grab a target that has the same specs as your desired and hope that it works
23:11:52FromDiscord<eightbit_dboy> I omitted the `cpu` flag and at least the output was different: https://media.discordapp.net/attachments/371759389889003532/1294074953230192660/message.txt?ex=6709b0b7&is=67085f37&hm=93b630a7a060eac83436bb35666849350e701bfcb5e5800090b926be14e5fe05&
23:12:18FromDiscord<muddmaker> The PR to add loongarch64 was just +13,-4
23:12:45FromDiscord<Elegantbeef> Omitting the cpu flag will target your CPU which likely is amd64... which is a whole lot of wrong I imagine
23:14:42FromDiscord<eightbit_dboy> Hmm
23:50:47FromDiscord<eightbit_dboy> Is there a CPU flag to have it not spit out any ASM?
23:52:22FromDiscord<muddmaker> You can dump the C source, but that's not guaranteed to be portable because of pointer sizes and the like