<< 27-03-2023 >>

00:48:31FromDiscord<Nilts> while i am waiting on the nix error, are there any wasm compatible game engines?
00:49:02FromDiscord<Nilts> 2d, with a sprite system and svg support
01:01:48*nanxiao joined #nim
01:23:28FromDiscord<simulatddev> In reply to @not logged in "while i am waiting": that use nim or in general
01:24:44*derpydoo joined #nim
02:01:59*azimut_ quit (Ping timeout: 255 seconds)
02:34:28*nanxiao quit (Quit: Client closed)
02:39:09FromDiscord<emmikat> why can't send on an async socket while im waiting to recv?
02:40:19*nanxiao joined #nim
02:46:34NimEventerNew thread by Naterlarsen: Using Socket for File Transfer, see https://forum.nim-lang.org/t/10039
03:08:58FromDiscord<emmikat> In reply to @emmikat "why can't i send": nvm- this isnt the case
03:09:02FromDiscord<emmikat> tbh i have no idea what's going on
03:09:14FromDiscord<emmikat> wait
03:09:15FromDiscord<emmikat> no
03:09:17FromDiscord<emmikat> i figured it out
03:09:23FromDiscord<Diamond Mansouri Fanboy> Has anyone wrote a shell in Nim before?
03:09:52FromDiscord<Rika> Yeah a good amount have asked about shell creation related stuff
03:10:07FromDiscord<Rika> I don’t know if any of their shells are on GitHub though
03:10:23FromDiscord<Diamond Mansouri Fanboy> interesting. I am looking to create my own extensive shell in Nim. I have been learning it for a while, just joined the server tho
03:10:26FromDiscord<emmikat> rika, your name isnt related to MM is it?
03:10:44FromDiscord<Rika> No, why
03:10:47FromDiscord<emmikat> was curious
03:11:00FromDiscord<emmikat> your profile looked similar to the character
03:11:05FromDiscord<Rika> In reply to @Diamond Mansouri Fanboy "interesting. I am looking": Well if you have any questions then there’s always here
03:11:13FromDiscord<Diamond Mansouri Fanboy> Ty
03:11:16FromDiscord<Rika> In reply to @emmikat "your profile looked similar": ? MM means what?
03:11:22FromDiscord<Rika> I thought you meant memory management at first
03:11:26FromDiscord<Rika> Now I am not sure
03:11:40FromDiscord<emmikat> mystic messengers lol
03:12:17FromDiscord<Rika> Then no, it is not
03:17:00FromDiscord<Diamond Mansouri Fanboy> it's shibuya right?
03:17:48FromDiscord<Diamond Mansouri Fanboy> kanon?
03:24:25FromDiscord<Rika> Yes
03:24:29FromDiscord<Diamond Mansouri Fanboy> Dope
03:55:28FromDiscord<vmawz> Error: unhandled exception: No SSL/TLS CA certificates found. [IOError]↵↵How to fix? My users don't have Nim installed, I've put all the dlls it says in the same directory and the .pem, it just doesn't work
04:10:25FromDiscord<AmjadHD> @Varriount please review these PRs https://github.com/nim-lang/NimLime/pulls.
04:22:43*nanxiao quit (Quit: Client closed)
04:25:26*arkurious quit (Quit: Leaving)
04:30:54FromDiscord<user2m> hey guys while searching for a nim repl I heard about nim secret but can't seem to find anything on it? what is it and how do I use it?
04:33:52FromDiscord<huantian> Type `nim secret` and run it in your terminal
04:34:25FromDiscord<user2m> wow thank you lol!
04:34:53FromDiscord<user2m> where can I find more info about nim secret?
04:38:24FromDiscord<huantian> Not sure tbh
04:38:31FromDiscord<huantian> No idea if there’s official docs
04:38:41FromDiscord<Elegantbeef> Hence secret
04:39:52FromDiscord<user2m> In reply to @Elegantbeef "Hence secret": lol that's...annoying
04:40:27FromDiscord<Rika> It’s not meant to be used
04:40:36FromDiscord<user2m> looks like nim secret runs on nimscript https://nim-lang.org/docs/nims.html
04:40:52FromDiscord<Rika> Yes it does
04:41:17FromDiscord<user2m> In reply to @Rika "It’s not meant to": ?? so its just there as a nim-like playground?
04:41:41FromDiscord<Rika> It’s just there for internal use
04:41:50FromDiscord<Rika> At least that’s my assumption
04:41:54FromDiscord<user2m> ahh
04:58:20*nanxiao joined #nim
06:00:12*Mister_Magister quit (*.net *.split)
06:00:12*redj quit (*.net *.split)
06:00:56*redj joined #nim
06:01:40FromDiscord<firasuke> what is the default hashing algorithm that nim uses? is it still wyhash? and how could I use it to hash files?
06:02:25*advesperacit joined #nim
06:02:25*nanxiao quit (Quit: Client closed)
06:03:30*Mister_Magister joined #nim
06:04:24*kenran joined #nim
06:12:23FromDiscord<Rika> wyhash yes for the "hashes" module or so
06:13:14FromDiscord<Rika> You can just read the whole file and pass the contents to the hash procedure in the module
06:25:14*nanxiao joined #nim
06:37:00*derpydoo quit (Quit: derpydoo)
06:39:54*PMunch joined #nim
06:40:05FromDiscord<firasuke> Can you please guide me through that, as I am getting wrong hashes
06:41:04FromDiscord<firasuke> Should I load the entire file into memory? Using "readAll"? Or should I rely on streams "openFileStream"? And how could I use it to veeify the integrity of files?
06:42:44FromDiscord<Rika> Can’t help now since I’m not free for most of the day
06:44:03FromDiscord<firasuke> No worries
06:46:35*ltriant quit (Ping timeout: 260 seconds)
07:10:01PMunchHmm, apparently the code highlighter GitHub uses is broken for Nim pragmas..
07:10:13PMunchhttps://github.com/PMunch/futhark/issues/65 just look at the code blocks here
07:10:21PMunchI believe they use pygments?
07:11:27FromDiscord<Elegantbeef> https://github.com/nim-lang/NimLime/pull/166
07:12:52PMunchDoes GitHub use NimLime?
07:13:19FromDiscord<Elegantbeef> From my understanding, yes
07:16:17*tiorock joined #nim
07:16:17*tiorock quit (Changing host)
07:16:18*tiorock joined #nim
07:16:18*rockcavera is now known as Guest2434
07:16:18*tiorock is now known as rockcavera
07:16:22*Guest2434 quit (Read error: Connection reset by peer)
07:34:54FromDiscord<kubo39> In reply to @PMunch "Does GitHub use NimLime?": https://github.com/github/linguist/blob/master/vendor/README.md
07:35:37*nanxiao quit (Quit: Client closed)
07:36:24PMunchnice
07:36:34PMunchShould be fixed once linguist updates then
07:45:39*nanxiao joined #nim
07:53:32*Guest2 joined #nim
07:55:42*Guest2 quit (Client Quit)
08:19:04*rockcavera quit (Remote host closed the connection)
08:33:10FromDiscord<SpiderDave> how do i read from a file and get it into a sequence?
08:34:16Amun-Raseq of what?
08:34:36FromDiscord<SpiderDave> bytes, or whatever the best way to represent that is
08:37:05Amun-Rasec
08:39:41*Notxor joined #nim
08:39:52Amun-Raplay.nim is down, something like this: https://dpaste.com/FWFK9YWZQ
08:40:12FromDiscord<SpiderDave> ok i'll check it out, thanks
08:40:42Amun-Ra(I haven't check that for errors)
08:43:25Amun-RaSpiderDave: https://dpaste.com/4EK8RZ9PL
08:43:31Amun-Rawrong read
08:47:04PMunchAmun-Ra, playground is back up
08:49:20Amun-Rathanks
08:58:42FromDiscord<SpiderDave> sent a code paste, see https://play.nim-lang.org/#ix=4rWH
09:18:55Amun-RaSpiderDave: https://play.nim-lang.org/#ix=4rWL
09:19:15Amun-Rayou should check the result instead of the discard in real code
09:20:27FromDiscord<SpiderDave> i dont understand
09:20:48FromDiscord<SpiderDave> can someone give an example that prints a byte from the file?
09:20:52Amun-RaI mean I discard the result of readData in that example
09:21:08FromDiscord<SpiderDave> i
09:21:10FromDiscord<SpiderDave> dont
09:21:11FromDiscord<SpiderDave> understand
09:21:17Amun-Raunderstand what?
09:21:46FromDiscord<SpiderDave> "you should check the result instead of the discard in real code"
09:21:51FromDiscord<SpiderDave> "can someone give an example that prints a byte from the file?"
09:21:55FromDiscord<SpiderDave> i'm trying to learn by example
09:21:56Amun-Raline 10
09:22:17Amun-Ralet s = openFileStream "foo.bar"; echo repr s.readUint8
09:22:37Amun-Rathat prints a byte from a file
09:23:51FromDiscord<faldor20> Is there much active working being done to improve nimsuggest? ↵I've just started using nim and the ide experience is pretty off-putting↵I have some experience working on IDE tooling and language server stuff in F# and was wondering who i should talk to about potentially lending a hand?
09:24:06FromDiscord<SpiderDave> sent a code paste, see https://play.nim-lang.org/#ix=4rWO
09:26:02FromDiscord<Rika> It’s new file stream isn’t it
09:26:05FromDiscord<Rika> Not open
09:26:24FromDiscord<SpiderDave> just looking for a working example, so i can learn by example
09:26:26FromDiscord<Rika> Oh wait there’s also an open huh
09:29:49Amun-RaSpiderDave: show full example
09:30:18FromDiscord<SpiderDave> i'm asking you to show full example
09:30:26FromDiscord<SpiderDave> or anyone
09:31:16Amun-RaI give you
09:31:48*nanxiao quit (Ping timeout: 260 seconds)
09:35:34Amun-RaSpiderDave: https://play.nim-lang.org/#ix=4rWR
09:36:37FromDiscord<SpiderDave> it works, thanks!
09:36:49FromDiscord<SpiderDave> i can't believe it's so much more complex than reading text in nim
09:36:54FromDiscord<SpiderDave> or doing this in python
09:38:03Amun-RaSpiderDave: nim by default returns data as string, so it may be as simple as python one: let data = s.readAll
09:38:33Amun-Raand than if you need a byte you just convert the value, as in: let b = data[0].byte
09:38:47FromDiscord<SpiderDave> i see
09:39:49Amun-Rait only gets complicate…ish when you need a specific type
09:42:29Amun-Rayou can transform a string to seq[char] with .toSeq (from std/sequtils)
09:42:40Amun-Ralet data = s.readAll.toSeq
10:12:51*ltriant joined #nim
11:00:39*tanami quit (Ping timeout: 255 seconds)
11:00:47*tanami joined #nim
11:04:03*azimut joined #nim
12:10:59FromDiscord<ieltan> What's the most efficient way to convert this `"<@547689543264576879>"` to `"547689543264576879"` ?
12:11:11FromDiscord<ieltan> there is no int conversion
12:13:20FromDiscord<ieltan> should i use regex ?
12:14:35FromDiscord<Rika> Use https://nim-lang.org/docs/strutils.html#delete%2Cstring%2CSlice%5Bint%5D for the first two characters
12:15:15FromDiscord<Rika> Maybe for the last character too
12:15:30FromDiscord<Rika> Regex is likely to be slower or less efficient
12:42:22FromDiscord<firasuke> How to use the hashes library to calculate the hash of a file? Also is the using hashing algorithm wyhash? Also what should I use to put the file in memory, readAll or the streams library openFileStream?
12:49:34FromDiscord<demotomohiro> I don't think you need to put all content of the file in memory if you just want to calculate the hash.
12:51:52FromDiscord<demotomohiro> Using `readFile` proc is an easiest way to read all content of file in memory:↵https://nim-lang.org/docs/io.html#readFile,string
12:57:25FromDiscord<demotomohiro> https://nim-lang.org/docs/hashes.html
12:57:30FromDiscord<Nilts> In reply to @simulatddev "that use nim or": nim
12:57:38FromDiscord<Nilts> and simple
12:57:57FromDiscord<Nilts> Actually, game lib is more accurate wording.
13:10:56FromDiscord<auxym> In reply to @Elegantbeef "I know <@882793909246369864> loves": since you insist: justine.lol/endian.html
13:11:56FromDiscord<auxym> i should probably publish an endians3 lib or something
13:43:47*attah quit (Ping timeout: 265 seconds)
13:45:35*attah joined #nim
14:09:47*PMunch quit (Quit: Leaving)
14:14:34FromDiscord<Andreas> sent a code paste, see https://play.nim-lang.org/#ix=4rY5
14:20:09FromDiscord<Rika> that looks converted using some tool, i
14:20:24FromDiscord<Rika> (edit) "i" => "i'd say c2nim but it would prolly convert that unsigned to smth proper"
14:20:52FromDiscord<kcvinker> sent a code paste, see https://play.nim-lang.org/#ix=4rY7
14:21:33FromDiscord<Andreas> In reply to @Rika "that looks converted using": hm,, ic, thx i'll try `abs`
14:24:49FromDiscord<kcvinker> sent a code paste, see https://play.nim-lang.org/#ix=4rYa
14:26:08FromDiscord<dlesnoff> `choosenim install stable` downloads `1.6.8`. Is it normal that it does not download `1.6.12` ?
14:26:47FromDiscord<ringabout> In reply to @Jiezron "`choosenim install stable` downloads": probably it is a bug of choosenim.
14:27:01FromDiscord<ringabout> It failed me as well.
14:30:14FromDiscord<dlesnoff> `nimble install choosenim` fails too due to `webby` not being in packages.json anymore.
14:30:18FromDiscord<firasuke> In reply to @demotomohiro "Using `readFile` proc is": I did use readFile but I am getting wrong hashes with hashlib
14:30:32FromDiscord<firasuke> Can you please elaborate more with std/hashes
14:30:56FromDiscord<dlesnoff> In reply to @ringabout "probably it is a": I will open an issue but @dom96 is not very active anymore, isn't it ?
14:31:10FromDiscord<ringabout> seems so.
14:31:41FromDiscord<demotomohiro> In reply to @firasuke "I did use readFile": There is example: https://nim-lang.org/docs/hashes.html
14:36:52FromDiscord<Rika> In reply to @firasuke "I did use readFile": what do you use to verify your hashes
14:36:53FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4rYe
14:37:49FromDiscord<kcvinker> @demotomohiro Thanks a lot. 🙂
14:40:13FromDiscord<demotomohiro> In reply to @kcvinker "<@288750616510201856> Thanks a lot.": But that code is not tested.
14:40:32FromDiscord<kcvinker> @demotomohiro Is it possible to index a `WideCStringObj` ?
14:40:49FromDiscord<kcvinker> Like the `src[i]` in your sample ?
14:44:55FromDiscord<demotomohiro> You can index `UncheckedArray[T]` types.
14:46:34FromDiscord<kcvinker> @demotomohiro That's great. Thanks. 🙂
14:49:20FromDiscord<firasuke> In reply to @demotomohiro "There is example: https://nim-lang.org/docs/hashes.": Thanks for the example but it doesn't show how to hash a file and what hashing algorithm it uses
14:49:28FromDiscord<firasuke> I read that wyhash was used before
14:49:34FromDiscord<firasuke> Don't know what version tho
14:54:54FromDiscord<firasuke> So I should just call↵`hash(readFile(someStringPathToFile))`?
14:55:33FromDiscord<demotomohiro> In reply to @firasuke "Thanks for the example": It should work.
14:55:45FromDiscord<firasuke> Ok thanks
14:55:56FromDiscord<demotomohiro> If you need cryptographic hash: https://cheatfate.github.io/nimcrypto/
14:56:11FromDiscord<demotomohiro> https://github.com/cheatfate/nimcrypto
14:56:14FromDiscord<firasuke> Nope, I need a fast noncryptographic hashing algorithm
14:56:19FromDiscord<firasuke> Something like xxhash,
14:56:29FromDiscord<firasuke> I was using hashlib/misc/xxhash
14:56:35FromDiscord<firasuke> But it produced wrong hashes
14:56:38FromDiscord<firasuke> Dunno why tho
14:56:47FromDiscord<firasuke> Read it could be because of uneven chunks
14:57:18FromDiscord<firasuke> So I was looking for something else, like wyhash or meowhash or t1ha
14:57:40FromDiscord<firasuke> Wyhash is used for hash tables in Nim, don't know which version though
14:57:46FromDiscord<firasuke> So I figured I'd use that
14:59:23FromDiscord<firasuke> @demotomohiro thanks for your help though, much appreciated
15:00:42*rockcavera joined #nim
15:02:55*arkurious joined #nim
15:02:56*arkurious quit (Remote host closed the connection)
15:09:47*jmdaemon quit (Ping timeout: 264 seconds)
15:16:40*kenran quit (Remote host closed the connection)
15:26:27NimEventerNew thread by ringabout: My Nim Development Weekly Report (3/26), see https://forum.nim-lang.org/t/10040
16:32:32*junaid_ joined #nim
16:53:50*junaid_ quit (Remote host closed the connection)
16:55:32*tiorock joined #nim
16:55:32*tiorock quit (Changing host)
16:55:32*tiorock joined #nim
16:55:32*rockcavera is now known as Guest5976
16:55:32*Guest5976 quit (Killed (molybdenum.libera.chat (Nickname regained by services)))
16:55:32*tiorock is now known as rockcavera
16:57:50*derpydoo joined #nim
17:18:51*zgasma joined #nim
17:42:35FromDiscord<kcvinker> sent a code paste, see https://play.nim-lang.org/#ix=4rZa
18:44:14*jmdaemon joined #nim
19:27:04*arkurious joined #nim
19:50:21*advesperacit quit ()
19:57:21FromDiscord<planetis> obvious bug with your range 0..fname.len
19:58:10*derpydoo quit (Ping timeout: 252 seconds)
19:58:42FromDiscord<planetis> @kcvinker ^
19:59:32FromDiscord<kcvinker> In reply to @planetis "<@633714482572689449> ^": Please explain a little bit more
20:00:06FromDiscord<planetis> you pbl meant to write 0..<fname.len
20:00:08Amun-Raeither 0 .. fname.high or 0 ..< fname.len
20:06:50FromDiscord<kcvinker> My font name consists 6 letteres - "Tahoma". And my loop runs 7 times including the null character.
20:07:37FromDiscord<Nerve> `..<` is the exclusive upper bound range
20:07:45FromDiscord<Nerve> `..` is inclusive upper bound
20:08:11FromDiscord<kcvinker> Got it, but now there is no error with the inclusive syntax
20:08:30FromDiscord<Dudugz> So 0..10 would include 10, 0..<10 would not, that's it?
20:08:44FromDiscord<Nerve> Yes
20:25:43FromDiscord<0ffh> I think WideCString includes the zero terminator, so you actually can index it at wcs[wcs.len] without getting an error.
20:29:07FromDiscord<0ffh> It's only what's there is just that terminator, not actually a part of the string itself.
21:44:50FromDiscord<Nilts> As i have asked, is there any basic 2d game libs in nim that can be easily modified to support wasm?
21:48:27FromDiscord<Elegantbeef> Nico
21:51:23*Notxor quit (Quit: Leaving)
22:21:56FromDiscord<Nilts> In reply to @Elegantbeef "Nico": I see alot of emscripten, which is good.
22:23:20FromDiscord<Nilts> is there a "hello world" example?
22:24:09FromDiscord<Elegantbeef> Yes use the nicoboot tool to generate iit
22:25:00FromDiscord<Nilts> ok
22:25:32FromDiscord<Nilts> 1 thing, does nico support svg's?
22:25:47FromDiscord<Nilts> if not i will have to do some preprocessing
22:26:25FromDiscord<Elegantbeef> No it's practically a non limited fantasy console
22:26:31FromDiscord<Elegantbeef> It only does indexed PNGs
22:32:56FromDiscord<Nilts> are all sprites limited to one size?
22:33:44FromDiscord<Nilts> It fits all the wasm needs, but it a little overwhelming, and is for games like pico8, which is not my goal here
22:34:42FromDiscord<Elegantbeef> So then make your framework from scratch using it as reference
22:38:04FromDiscord<Nilts> Sdl is 10x confusing. I do not even know where to start
22:38:41FromDiscord<Elegantbeef> https://www.parallelrealities.co.uk/tutorials/
22:39:40FromDiscord<Elegantbeef> There are so many tutorials for SDL2 which eiither means you do not care enough or do not want to put any effort in
22:39:50FromDiscord<Nilts> In reply to @Elegantbeef "https://www.parallelrealities.co.uk/tutorials/": seems to be in c
22:40:03FromDiscord<Elegantbeef> It's literally the same thing as in Nim
22:40:07FromDiscord<Nilts> and i am kind of lazy
22:40:33FromDiscord<Nilts> I had a grand idea but no way to impliment it
22:40:39FromDiscord<Nilts> (edit) "impliment" => "implement"
22:41:41FromDiscord<Nilts> i guess i will pay someone XD
22:44:38FromDiscord<SpiderDave> try out nico, the examples are pretty good to get an idea
22:44:56FromDiscord<Andreas> In reply to @not logged in "i guess i will": ba a Zuck - let your friends do the coding and improve yourself on others talent - then create the next metaverse
22:45:15FromDiscord<Nilts> In reply to @Andreas "ba a Zuck -": is that good or bad
22:45:22FromDiscord<SpiderDave> nobody wants to be a zuck!
22:45:58FromDiscord<Andreas> In reply to @SpiderDave "nobody wants to be": 🙂
22:46:28FromDiscord<Andreas> (edit) "In reply to @SpiderDave "nobody wants to be": 🙂 ... " added "this is a zuuuuucks-world.."
22:47:19FromDiscord<Nilts> In reply to @SpiderDave "try out nico, the": First of all, I am assuming it is meant like 8bit or smth. Most of the things cannot be that small. Also, I am trying to compile to nim code, so the nico code would be compiler generated.
22:50:38FromDiscord<SpiderDave> it's geared towards making small stuff but you dont really have to. there are things that are faster, but if you look at the benchmark example on nico you can decide if it's fast enough for what you want to do
22:51:15FromDiscord<SpiderDave> i'm new to nim and had the same concern with nico but it looks like it's fine for what i want
23:46:58FromDiscord<Nilts> In reply to @SpiderDave "it's geared towards making": I mean, as long as it runs smoothly i do not care about preformance