<< 17-06-2025 >>

01:35:28*rockcavera quit (Read error: Connection reset by peer)
01:35:49*rockcavera joined #nim
02:26:54*alexdaguy joined #nim
03:07:32*alexdaguy quit (Quit: w)
03:12:16*rockcavera quit (Remote host closed the connection)
03:40:57*skippy8 joined #nim
03:43:27FromDiscord<zjfc> How to build a Nimble package on Nix? Should I use SBOM or tools like? https://github.com/bandithedoge/nimble2nix/blob/main/buildNimblePackage.nix
04:20:11FromDiscord<pkgmgr> sent a long message, see https://pasty.ee/fBABKmYF
04:56:47FromDiscord<intellij_gamer> Wonder if it could be updated to use the nimble.lock file instead of its own lock file 🤔↵Not an expert in nix so maybe there's a reason for it?
06:37:43FromDiscord<bandithedoge> oh hey that's me, i wrote this hacky solution before nimble lockfiles were a thing and haven't updated it in 3 years↵(@zjfc)
06:38:30FromDiscord<zjfc> Oh, thank you for the information.
06:38:58FromDiscord<bandithedoge> it's pretty much obsolete since buildNimPackage in nixpkgs started supporting nim\_lk
06:41:26FromDiscord<bandithedoge> i might look into using nimble's lockfiles directly though
06:57:58*skippy8 quit (Quit: WeeChat 4.6.3)
07:20:09FromDiscord<new_librarian> how do i read one char at a time from a text file and put that char in to a var to manipulate. been searching for that the whole day. self help are limited for nim.
07:34:12*pbsds35 quit (Ping timeout: 276 seconds)
07:34:36*pbsds35 joined #nim
07:56:56FromDiscord<nnsee> In reply to @new_librarian "how do i read": which part exactly are you having trouble with?
08:00:20FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=GAoWBgPH
08:01:01FromDiscord<heysokam> If you want to modify the character, then add a `var thing = character` inside the for loop body
08:01:42FromDiscord<heysokam> another option is to use `for character in text.mitems:`, and that will let you modify the original string directly _(as long as the string is mutable too)_
08:08:22FromDiscord<new_librarian> how can i read a 2d array? 0, 0, 0, 0, 0,↵1, 1, 1, 1, 1,
08:12:18FromDiscord<new_librarian> in c, pascal, python. you can load it in a 2d array a[][], how would i do that in nim reading it from a text file of arrays?
08:13:49FromDiscord<Phil> In reply to @new_librarian "in c, pascal, python.": as in, you have rows of comma separated values in a txt file and read those in as a 2D array?
08:20:13FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=ZJtjiqFJ
08:38:45FromDiscord<lainlaylie> there are a ton of procs for reading from files/streams in syncio and streams
09:06:04*jjido joined #nim
09:46:56*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
10:03:37*nils` quit (Ping timeout: 276 seconds)
10:09:58*ntat joined #nim
10:27:34*beholders_eye joined #nim
10:30:13*ntat quit (Read error: Connection reset by peer)
10:43:03*jjido joined #nim
10:46:58FromDiscord<nasuray> In reply to @intellij_gamer "Wonder if it could": You can use https://GitHub.com/daylinmorgan/nnl to make a buildNimPackage compatible lock file
11:01:19*nils` joined #nim
11:19:46FromDiscord<eugaming> would you guys say NIm is a good jump from py to something more lowlevel?
11:20:25*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
11:21:14FromDiscord<nnsee> yes
11:21:17FromDiscord<janakali> Certainly
11:46:03FromDiscord<litlighilit> If you find Nim's lack of many Python functions & std libraries inconvenient, try [pylib](https://github.com/nimpylib/pylib)↵(@eugaming)
11:46:52madpropsso implementing a lot of what makes python great?
11:47:13FromDiscord<litlighilit> yeah. In pure Nim
11:47:28madpropsthat's great
11:51:13FromDiscord<random_user1999> hi
11:51:50FromDiscord<random_user1999> is there a way to import raylib headers directly from C without bindings?
11:53:25FromDiscord<litlighilit> You mean no need to manually write binding?
11:53:44FromDiscord<random_user1999> pretty much
11:53:51FromDiscord<random_user1999> just use it like we're using it in C
11:54:08FromDiscord<random_user1999> or are there any mature raylib bindings for nim?
11:54:57FromDiscord<litlighilit> `futhark`↵(@random_user1999)
11:55:11FromDiscord<rakgew> is that not the usecase for futhark?
11:55:26FromDiscord<litlighilit> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1384501569902346413): `futhark`https://github.com/PMunch/futhark
11:55:36FromDiscord<random_user1999> let me look into it
11:56:29FromDiscord<random_user1999> looks good, thanks!
11:57:17FromDiscord<litlighilit> I remember there're some.But I haven't tried if they're mature↵(@random_user1999)
11:57:32FromDiscord<random_user1999> yeah nothing in nim is mature
11:57:43FromDiscord<random_user1999> at this point its cost of business
12:00:05FromDiscord<eugaming> In reply to @litlighilit "If you find Nim's": thanks but i like that it lacks those in the end i want to get kinda away from it done rust for a while self tought but i think Nims Nature does a great job as an more simple and fast alternative
12:07:21FromDiscord<litlighilit> [NimPyLib](https://nimpylib.org) is just a pure Nim library anyway. Nim's stdlib&builtins are not as ample as Python's anyway. You are writing actual Nim when using it but just like Python.
12:08:02FromDiscord<litlighilit> [NimPyLib](https://nimpylib.org) is just a pure Nim library anyway. Nim's stdlib&builtins(a.k.a. system) are not as ample as Python's anyway. You are writing actual Nim when using it but just like Python.
12:09:13FromDiscord<heysokam> In reply to @random_user1999 "or are there any": naylib is the best by far
12:09:32FromDiscord<random_user1999> is naylib mature
12:09:37FromDiscord<heysokam> 100%
12:09:43FromDiscord<random_user1999> as in i wont wake up to it being broken for no reason
12:09:48FromDiscord<random_user1999> or suddenly being unmaintained
12:10:13FromDiscord<heysokam> check #gamedev, the creator hangs around there a lot
12:10:25FromDiscord<random_user1999> who
12:10:26FromDiscord<random_user1999> row?
12:10:34FromDiscord<heysokam> no, higher in the chat
12:10:47FromDiscord<heysokam> planetis
12:10:53FromDiscord<random_user1999> fair enough
12:10:56FromDiscord<random_user1999> might give it a shot
12:11:20FromDiscord<heysokam> if not, futhark is an alternative. but I'd go with naylib first
12:12:48FromDiscord<heysokam> In reply to @eugaming "thanks but i like": I honestly find Python stdlib way more lacking than nim's stdlib. Nim has so many more options
12:13:08FromDiscord<heysokam> I had to write my own simple api a LOT in python. in nim I just use the stdlib as is
12:13:20FromDiscord<heysokam> (edit) "python." => "python for interfacing with the stdlib."
12:15:39FromDiscord<litlighilit> anyway with pylib you can use both of them
13:07:51*beholders_eye quit (Ping timeout: 244 seconds)
13:08:56FromDiscord<mr_rowboto> sent a code paste, see https://play.nim-lang.org/#pasty=XKsksvqu
13:09:05FromDiscord<mr_rowboto> (edit) "https://play.nim-lang.org/#pasty=DoXLbXUq" => "https://play.nim-lang.org/#pasty=RAuTPKNW"
13:09:11FromDiscord<mr_rowboto> (edit) "https://play.nim-lang.org/#pasty=eIvdbcWy" => "https://play.nim-lang.org/#pasty=oSRrOCSV"
13:31:48FromDiscord<mr_rowboto> Nevermind... compiler was just not finding `proc hash(x: SomeInterface): Hash`, I messed up my imports.
13:36:07FromDiscord<mr_rowboto> Hmm, the file containing the `hash` proc was properly imported, however the compiler fails to find it... it works when I copy `hash` to the file doing the `incl`.
13:36:14FromDiscord<mr_rowboto> I'm confus
13:36:20FromDiscord<mr_rowboto> (edit) "I'm confus ... " added ":confusedparrot:"
14:32:29*Guest97 joined #nim
14:47:21*Guest97 quit (Quit: Client closed)
15:11:04FromDiscord<amjadhd> Why do iterators not accept a parameter of type `iterable`?
15:41:03*beholders_eye joined #nim
17:12:51FromDiscord<DetermiedNim1> sent a code paste, see https://play.nim-lang.org/#pasty=cddDTlJl
17:13:03FromDiscord<DetermiedNim1> (edit) "https://play.nim-lang.org/#pasty=cnPzAmiZ" => "https://play.nim-lang.org/#pasty=DMOrbuoW"
18:20:47FromDiscord<Elegantbeef> @amjadhd Cause iterable is a hack
18:45:10FromDiscord<starkiller1493> is utf-16 in std/encodings with or without BOM?
18:53:15*jjido joined #nim
18:54:47*przmk quit (Remote host closed the connection)
18:57:15*przmk joined #nim
19:01:53*przmk quit (Remote host closed the connection)
19:02:08*przmk joined #nim
19:04:32*przmk quit (Remote host closed the connection)
19:04:46*przmk joined #nim
19:09:11*przmk quit (Remote host closed the connection)
19:10:15*przmk joined #nim
19:12:09FromDiscord<amjadhd> In reply to @Elegantbeef "<@629598664452734989> Cause iterable is": How's that? And what's a better way?
19:27:47FromDiscord<grumblygibson> In reply to @amjadhd "Why do iterators not": Not a helpful answer, but this will be resolved when concepts are fully implemented, and the stdlib rewritten to support concepts.
19:45:36FromDiscord<Elegantbeef> @amjadhd they non existent types and just template parameters. The compiler even has a hack to make them work in typerel
19:48:22FromDiscord<Elegantbeef> @grumblygibson well youd als have to rewrite how iterators work, there is no way to have a proc support two completely dispatched iterators. Consider `items(seq)` vs `someIter()` both may yield in but one has an arity of 1 whilst the other 0
19:48:37FromDiscord<Elegantbeef> yield int\
19:49:17FromDiscord<Elegantbeef> To expand that it means procs need to take a fully evaluated iterator hence Iterable being a hack
20:36:24*skippy8 joined #nim
21:00:00*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
21:06:43*jjido joined #nim
21:14:25*beholders_eye quit (Ping timeout: 248 seconds)
21:21:40FromDiscord<amjadhd> In reply to @Elegantbeef "<@629598664452734989> they non existent": So `iterable` needs to be a real type and `typeof myIter()` returns `iterable[T]`?
21:48:38FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=RUbKsqAn
21:50:26*rockcavera joined #nim
21:54:44*skippy8 quit (Quit: WeeChat 4.6.3)
21:55:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ARJHgwpc
23:51:10*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)