<< 30-01-2022 >>

00:00:48FromDiscord<evoalg> Beefy when will I be able to compile in nimskull?
00:01:06FromDiscord<Elegantbeef> You can now
00:01:38FromDiscord<evoalg> with libs like strutils and slicerator?
00:03:14FromDiscord<tandy> `Error: expression 'await validateToken(lb, token)' has no type (or is ambiguous)`
00:03:14FromDiscord<tandy> oh im a dumb dumb
00:03:17FromDiscord<tandy> redefined the proc didnt i
00:03:17FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3NX3
00:03:33FromDiscord<Elegantbeef> Yes Nimskull is mostly compatible with Nim since it's a fork
00:03:47FromDiscord<evoalg> is there a nimskull channel?
00:04:16FromDiscord<tandy> https://matrix.to/#/!alsWvZtOfWkQlHwcHC:envs.net?via=libera.chat&via=matrix.org&via=envs.net
00:14:41*jmdaemon joined #nim
00:16:47*l1x quit (Quit: Connection closed for inactivity)
00:20:01*lumo_e quit (Quit: Quit)
01:11:28FromDiscord<ynfle> How can I get where paramTypesMatch is trying to match in the source file? I don't mind random `warning` hacks or whatever
01:41:01FromDiscord<ynfle> In reply to @ynfle "How can I get": `echo $lineInfoToStr(config(m.c), arg.info)` kinda works
01:41:08FromDiscord<ynfle> (edit) "$lineInfoToStr(config(m.c)," => "lineInfoToStr(config(m.c),"
01:49:32termer_Is there a way to create a Table that can contain any key type?
01:49:37FromDiscord<ynfle> In reply to @ynfle "`echo lineInfoToStr(config(m.c), arg.info)` kinda": Doesn't get the first frame in the stack.
01:49:49termer_I need some way to store mixed data in a table, and not JSON
01:49:54termer_or something similar to a table
01:50:02FromDiscord<Elegantbeef> Make a `Table[Hash, T]`↵(<@709044657232936960_termer_=5b=49=52=43=5d>)
01:50:11FromDiscord<ynfle> In reply to @termer_ "Is there a way": Not one table instance. Unless you use variant object
01:50:12termer_That would be a single type though
01:50:28FromDiscord<Elegantbeef> No it'd work with any key type
01:50:34FromDiscord<ynfle> In reply to @termer_ "I need some way": Why would JSON not work?
01:50:52termer_JSON can hold types that my design is not supposed to
01:51:03termer_specifically, it can hold nested arrays which would be a problem
01:51:15FromDiscord<ynfle> In reply to @termer_ "JSON can hold types": So build on the design
01:51:58termer_Maybe I should look how the JSON implementation holds it
01:52:40termer_JsonNode is just an object that holds every possible type for a node, right?
01:52:49FromDiscord<ynfle> In reply to @termer_ "JsonNode is just an": Yup
01:52:59termer_well that's pretty inefficient
01:53:22FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3NXo
01:53:29FromDiscord<Elegantbeef> Can use multiple Key types fine
01:53:55termer_@Elegantbeef I'm not looking to hold multiple key types
01:54:01termer_I'm looking to hold multiple value types
01:54:09FromDiscord<Elegantbeef> Well you should've said that
01:54:16termer_I thought I did, my bad
01:54:21termer_Interesting, JsonNode has a switch-case in the object definition
01:54:23termer_didn't know you could do that
01:54:30FromDiscord<Elegantbeef> Object variants are the best way
01:55:06FromDiscord<Elegantbeef> Yes that's an object variant it's the most memory efficient method of doing this as the type size is the largest branch
01:55:06termer_All right, thanks
01:55:25FromDiscord<Elegantbeef> You can also look at https://github.com/alaviss/union
01:55:40FromDiscord<Elegantbeef> Manual for object variants https://nim-lang.org/docs/manual.html#types-object-variants
02:13:03FromDiscord<kevin> Anyone know how callback functions work for async code?
02:14:12FromDiscord<kevin> sent a code paste, see https://play.nim-lang.org/#ix=3NXs
02:17:33*rienske quit (Quit: WeeChat 3.4)
02:17:52*rienske joined #nim
02:17:54FromDiscord<Elegantbeef> https://nim-lang.org/docs/asyncdispatch.html#Callback
02:20:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NXu
02:21:01FromDiscord<Elegantbeef> One could make a template to convert `proc()` into a closure
02:23:39FromDiscord<Elegantbeef> for instance
02:23:41FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/M2U
02:56:27*rienske quit (Quit: WeeChat 3.4)
02:56:48*rienske joined #nim
02:57:37*rienske quit (Client Quit)
02:57:56*rienske joined #nim
03:03:19FromDiscord<Bung> @ElegantBeef hey , get news to me ?
03:05:02FromDiscord<Elegantbeef> I cannot fix the packages
03:05:24FromDiscord<Elegantbeef> if you want to use a package make an issue on the package's repo about not being usable in VM
03:06:00FromDiscord<Elegantbeef> If you cannot import it using `nim e ./my.nims` i cannot do anything
03:06:40FromDiscord<Bung> how to do that , it seems it's a error during parsing
03:06:53FromDiscord<Elegantbeef> What do you mean
03:07:01FromDiscord<Elegantbeef> The issue was with stacktrace
03:07:05FromDiscord<Bung> I tried use when nimvm but it will throw before that
03:07:06FromDiscord<Elegantbeef> nimscript doesnt have stacktrace
03:08:49FromDiscord<Elegantbeef> I'd like a solution but Nimscripter isnt the problem afaik
03:12:18FromDiscord<Bung> I tried `when not defined(release) and not nimvm:` not work.
03:12:37FromDiscord<Elegantbeef> nimvm is special
03:12:45FromDiscord<Elegantbeef> do `and not defined(nimscript)`
03:16:10*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
03:16:53*noeontheend joined #nim
03:17:14FromDiscord<Bung> oh, that's work
03:20:35FromDiscord<Bung> `Script Error: /users/bung/.choosenim/toolchains/nim-1.6.2/lib/system/sets.nim:21:19 undeclared identifier: 'countBits64'` finally I get this
03:22:10FromDiscord<Elegantbeef> I assume same thing is the issue
03:22:26FromDiscord<Elegantbeef> They use `countBits64` which is a exported procedure only in Nim
03:24:07FromDiscord<Elegantbeef> Nimscript is a subset of Nim so not everything will work
03:29:46*arkurious quit (Quit: Leaving)
03:33:27FromDiscord<Bung> what I can do for support it
03:33:58FromDiscord<Elegantbeef> Use libraries that support compile time code is generally it really
03:34:08FromDiscord<Elegantbeef> I imagine a lot of treeform's libraries will work
03:35:14FromDiscord<Elegantbeef> Anything that relies on lower level logic that doesnt handle nimscript will require changes
03:39:24FromDiscord<Rika> treeform makes networking and other libraries too, i imagine its not "a lot"
03:39:57FromDiscord<Elegantbeef> I suppose
03:40:32FromDiscord<Bung> found it occurs in set in operator
03:47:42FromDiscord<BhamidipatiNikhil> I have no idea Why is this error occuring? https://media.discordapp.net/attachments/371759389889003532/937192323404681216/unknown.png
03:48:24FromDiscord<Rika> stdin is a File
03:48:24FromDiscord<Elegantbeef> `readLine` also has a file impl
03:48:26FromDiscord<Rika> not a Stream
03:49:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NXG
03:49:58FromDiscord<Elegantbeef> https://nim-lang.org/docs/io.html#readLine%2CFile is what you were calling prior
03:51:49FromDiscord<Elegantbeef> Overloads are magic
03:56:24*Onionhammer quit (Quit: The Lounge - https://thelounge.chat)
03:57:19FromDiscord<BhamidipatiNikhil> sent a code paste, see https://play.nim-lang.org/#ix=3NXI
03:57:36FromDiscord<Elegantbeef> Id did indeed!
03:57:38FromDiscord<Elegantbeef> it\
03:57:53FromDiscord<Elegantbeef> `readUint8` reads the next character as a byte
03:58:25FromDiscord<Elegantbeef> You want to read until you hit a space then parse that as an int
03:58:40FromDiscord<BhamidipatiNikhil> In reply to @Elegantbeef "You want to read": Yes, exactly!
03:58:57FromDiscord<Elegantbeef> So then do that 😀
04:00:36FromDiscord<BhamidipatiNikhil> In reply to @Rika "stdin is a File": readLine(stdin) is valid, while readUint8(stdin) is invalid although in the manual both take (s: stream) as input in their definitions and i was thinking that stdin is a stream so it should work for both
04:00:54*Onionhammer joined #nim
04:01:40*xiamx quit (K-Lined)
04:01:41*cheer[m] quit (K-Lined)
04:01:44*happycorsair[m] quit (K-Lined)
04:01:44*zgasma[m]1 quit (K-Lined)
04:01:44*nixfreaknim[m] quit (K-Lined)
04:02:53FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NXL
04:03:59FromDiscord<Elegantbeef> That'll allow inputing values on new lines, altogether, character seperated, whatever
04:08:41FromDiscord<Rika> In reply to @BhamidipatiNikhil "readLine(stdin) is valid, while": again, as beef said, there is also a readLine(f: File) proc
04:08:46FromDiscord<Rika> nim has overloading
04:08:56FromDiscord<Elegantbeef> I am bot what i say is wrong!
04:14:07termer_How can I store a type in an object property?
04:14:09termer_is it possible?
04:14:21FromDiscord<Elegantbeef> You cannot types are compile time only
04:14:29termer_All right, that's what I figured
04:14:54FromDiscord<BhamidipatiNikhil> In reply to @Rika "again, as beef said,": Oh yeah! you are right!!
04:14:57*noeontheend quit (Ping timeout: 240 seconds)
04:23:07FromDiscord<evoalg> I'm trying to figure out this code ... it seems to run without end?
04:23:27FromDiscord<Elegantbeef> `mySeq.add` adds a value
04:23:43FromDiscord<Rika> ? yes it does, what does that have to do with
04:23:57FromDiscord<Elegantbeef> `while mySeq.len < N:` is the condition
04:24:02FromDiscord<Rika> yes indeed
04:24:09FromDiscord<Rika> add value, wait for len to exceed N, end
04:24:19FromDiscord<Rika> so now why does it run forever?
04:24:26FromDiscord<evoalg> sent a code paste, see https://play.nim-lang.org/#ix=3NXS
04:24:50FromDiscord<Rika> do you hit the invalid input?
04:24:51FromDiscord<Rika> or what
04:25:32FromDiscord<evoalg> I'm just so confused
04:25:38*cheer[m] joined #nim
04:26:11FromDiscord<Elegantbeef> I have seemed to mess something up
04:26:11*happycorsair[m] joined #nim
04:26:23*zgasma[m] joined #nim
04:26:35*xiamx joined #nim
04:26:35*nixfreaknim[m] joined #nim
04:26:51FromDiscord<Elegantbeef> `buff.add stdin.readChar` is the issue
04:27:21FromDiscord<Elegantbeef> that should be `ch` but I was being silly and missed it
04:27:44FromDiscord<Rika> oh yeah true it does a double-ask
04:27:58FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/937202454351712317/image.png
04:28:00FromDiscord<Elegantbeef> Works properly with that
04:28:19FromDiscord<Rika> nvim test.nim
04:28:34FromDiscord<Elegantbeef> Yea was in my history hit up too many times 😛
04:30:11FromDiscord<Elegantbeef> Anyway it was just an example it's not production code!
04:30:23*fowl joined #nim
04:31:11FromDiscord<evoalg> works ... I was just trying to understand it ... I don't even know why they wanted a seq of uint8's?
04:31:11FromDiscord<Elegantbeef> There should be a check on the result of `parseInt` to ensure it's in 0..255
04:31:30FromDiscord<Elegantbeef> I'm not a guessologist i dont know
04:33:59FromDiscord<Elegantbeef> Also evo did you ever go to the dev docs to stare at your added docs 😛
04:34:36FromDiscord<evoalg> my added docs?
04:34:40*fowl quit (Quit: cya pals)
04:34:49FromDiscord<Elegantbeef> The example to the ctrl C hook 😀
04:35:04FromDiscord<evoalg> oooo let me look
04:36:51*fowl joined #nim
04:36:59FromDiscord<evoalg> it has the example, nice!
04:47:30*nixfreaknim[m] quit (Quit: Client limit exceeded: 20000)
04:47:38FromDiscord<BhamidipatiNikhil> IT worked like magic... Thanks a ton @ElegantBeef .... You are a genius!! https://media.discordapp.net/attachments/371759389889003532/937207405522083860/unknown.png
04:47:53*nixfreaknim[m] joined #nim
04:48:43*cheer[m] quit (Quit: Client limit exceeded: 20000)
04:48:49*happycorsair[m] quit (Quit: Client limit exceeded: 20000)
04:49:51*zgasma[m] quit (Quit: Client limit exceeded: 20000)
04:50:32*xiamx quit (Quit: Client limit exceeded: 20000)
04:52:02*dtomato quit (Ping timeout: 252 seconds)
04:52:29FromDiscord<evoalg> why does BhamidipatiNikhil's message appear on discord but not matrix?
04:52:42FromDiscord<evoalg> (their latest msg)
04:52:50*cheer[m] joined #nim
04:53:04*happycorsair[m] joined #nim
04:53:18*zgasma[m] joined #nim
04:53:30*xiamx joined #nim
04:55:03FromDiscord<Elegantbeef> Bridge issue perhaps
04:57:11FromDiscord<evoalg> It may filter out compliments to you beefy, as you've been getting so many of them that they're now flagged as spam
04:57:32FromDiscord<Elegantbeef> Probably
04:57:35*fowl quit (Quit: cya pals)
04:57:50FromDiscord<Elegantbeef> Most sensible solutiion
04:58:10*fowl joined #nim
05:05:44FromDiscord<evoalg> In reply to @BhamidipatiNikhil "IT worked like magic...": beefy said "There should be a check on the result of parseInt to ensure it's in 0..255" ... if it's above that I think it will wrap, and you might not want that?
05:07:42FromDiscord<BhamidipatiNikhil> In reply to @evoalg "beefy said "There should": Yes sure!
05:32:27termer_How would I go about converting a uint64 containing its max value to an int64?
05:32:47termer_or vise-versa
05:32:59FromDiscord<Elegantbeef> You want the bit signature?
05:32:59FromDiscord<evoalg> How would one go about reading input from the keyboard without it being entered with the return key?
05:33:04FromDiscord<Elegantbeef> `cast[int](yourUint)`
05:33:24FromDiscord<Elegantbeef> `getCh` or using a library that automates it
05:33:35FromDiscord<Elegantbeef> `getCh` is blocking
05:34:04termer_Thanks
05:34:26termer_cast does it properly
05:34:42termer_I forgot about that, I was just doing a literal cast with (uint64)
05:34:46FromDiscord<evoalg> gotcha ok thx I can work with that I think ... if I want to create a game then I'll think about a using a lib
05:35:02FromDiscord<evoalg> would it be some sort of async lib?
05:35:15FromDiscord<Elegantbeef> cast is a bit siganture cast, the other is a type conversion
05:35:42FromDiscord<Elegantbeef> Depends on the library and what you're doing
05:37:24FromDiscord<Elegantbeef> illwill/ncurses for instance let your read keys like a game engine
05:37:28FromDiscord<evoalg> I guess I was pretending that I was able to create a space invaders game where left & right & fire would be acted upon, but in the mean time I still want the baddies to march down
05:37:40FromDiscord<evoalg> nice thx
05:37:58FromDiscord<Elegantbeef> You could use Nico for space incaders
05:38:16FromDiscord<Elegantbeef> It's easy to work with and allows you to draw proper graphics
05:38:21FromDiscord<Elegantbeef> Plus you can annoy impbox
05:38:57FromDiscord<evoalg> I was just curious but I'll store this in my notes - thanks!
05:39:26FromDiscord<Elegantbeef> Ncurses is how you'd probably want to do it otherwise
05:39:36FromDiscord<Elegantbeef> or illwill(pure Nim so clearly better)
05:39:49FromDiscord<evoalg> ahh nice
05:44:05FromDiscord<Rika> i would not say that
05:44:31FromDiscord<Rika> it is less robust and less battle tested. if a wrapper is made well it would be better than a pure nim solution
05:44:40FromDiscord<Elegantbeef> Not say what?
05:44:48FromDiscord<Elegantbeef> I was joking
05:45:00FromDiscord<Rika> evo may not have understood that
05:45:28FromDiscord<evoalg> ahhh I didn't understand - thanks Rika!
05:47:49FromDiscord<evoalg> I think beefy has faith that I'm smarter than I am sometimes
05:49:28FromDiscord<Elegantbeef> There is a benefit of pure nim though in that it doesnt require an other dependencies, minor benefit but alas
05:49:55FromDiscord<evoalg> and it might be easier for the community to maintain
05:50:07FromDiscord<evoalg> or adjust
05:50:21FromDiscord<Elegantbeef> With external libraries you either use dynamic libraries(shipped aside the binary or on the system) or static linked (compiled into the binary)
05:50:33FromDiscord<Elegantbeef> Yea it's nicer to have pure libraries due to being written in the language you're using but the question was of quality
05:51:35FromDiscord<evoalg> dynamic libs, eg written in c, and nim can import those fine (I think I read that on here)
05:51:49FromDiscord<Bung> anyone could give me some idea to improve my parser https://github.com/bung87/scorper/blob/8e22995ac2bb9a6f489bbc742a5b03d22631a0a2/src/scorper/http/multipartparser.nim#L266
05:51:52FromDiscord<Elegantbeef> Nim can use both dynamic and static
05:52:08FromDiscord<evoalg> nice!
05:52:16FromDiscord<Bung> I do some search on Boyer–Moore but am using buffered string
05:57:24FromDiscord<Elegantbeef> I'd give advice but i dont know the domain 😀
06:10:43FromDiscord<Bung> it's about find http multipart form boundary , you see now I search boundary by loop every char
06:17:00FromDiscord<Bung> when found boundary the content part is finished so I can save it to disk , the hard part is I use buffered string so I may read part of boundary, current implementation works but code looks very dumb
06:37:36*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
06:37:54*jmdaemon joined #nim
06:44:23*jmdaemon quit (Read error: Connection reset by peer)
06:48:30*jmdaemon joined #nim
06:55:13*kobi7 joined #nim
06:56:07kobi7hi
06:56:20FromDiscord<Rika> hello
07:01:10kobi7Has anyone tried the classes package?
07:02:11FromDiscord<Elegantbeef> I know impbox has used https://github.com/Glasses-Neo/OOlib
07:03:43FromDiscord<Rika> thats a dope graphic wow
07:03:58FromDiscord<Elegantbeef> lol
07:15:53*Gustavo6046 joined #nim
07:41:49kobi7I am trying to use translate_v2 of the gcplat package. It is a generated openapi, but it has compile errors.
07:44:44kobi7do I have to use disruptek's openapi generator? I assumed the generated part is self contained
07:51:27kobi7I think I see now..
08:45:21FromDiscord<Tetralux> In reply to @Elegantbeef "Nim can use both": That also true with libc?
08:46:04FromDiscord<Elegantbeef> Shit venturing into territory I'm 99.9% ignorant in
08:46:15FromDiscord<Elegantbeef> I mean i imagine so given musl stuff
08:50:31FromDiscord<Rika> Pretty much
08:50:41FromDiscord<Rika> You need to configure Nim to use musl
08:57:42*pro joined #nim
09:00:21FromDiscord<Tetralux> In reply to @Rika "You need to configure": How does one do that though?
09:00:46FromDiscord<Rika> https://github.com/kaushalmodi/hello_musl https://scripter.co/nim-deploying-static-binaries/
09:03:15kobi7btw, if you use musl for static libs, well, some things like regular expressions based on PCRE, won't work. other dlopen libs that are dynamically linked won't work as well, as far as i understand
09:05:25madpropsseems there's no python's mutagen nim alternative
09:05:33madpropsfor read/writing audio file tags
09:05:55FromDiscord<Tetralux> Hmm. I think that using Zig as the C compiler would actually be all that's needed - at least in a basic sense.↵Unfortunately, I cannot ask Nim to do that, seemingly.
09:06:12FromDiscord<Tetralux> In reply to @Tetralux "How does one do": Hmm. I think that using Zig as the C compiler would actually be all that's needed - at least in a basic sense.↵Unfortunately, I cannot ask Nim to do that, seemingly.
09:07:07FromDiscord<Elegantbeef> To use Zig you'd need to use a shell file due to `zig cc` being how you call it
09:07:13FromDiscord<Elegantbeef> It's documented in places
09:09:15FromDiscord<Tetralux> Yeah - I saw that, but I couldn't figure out what command I needed to make it use it. `--cc` wasn't it.
09:09:28FromDiscord<Tetralux> (edit) "wasn't" => "didn't want to accept"
09:09:32*MrSyabro joined #nim
09:10:07FromDiscord<Tetralux> It seems like I can trick it with `--gcc.exe:zigcc.bat --gcc.linkerexe:zigcc.bat`. 🤔
09:10:15FromDiscord<Rika> Make a shell file “zcc” and put “zig cc $1” in it
09:10:18FromDiscord<Rika> Yes
09:10:21FromDiscord<Rika> Pretty much that
09:10:40FromDiscord<Tetralux> In reply to @Tetralux "It seems like I": Mentioning `gcc` in this seems... backwards, to say the least. 😄
09:10:48FromDiscord<Tetralux> Nothing I want involves GCC. 🤔
09:10:58FromDiscord<Tetralux> But it seems to work, at least.
09:13:14kobi7here's a new nim file i just finished, sort of finished u know: suncalc
09:13:27kobi7https://github.com/kobi2187/suncalc-nim
09:14:23kobi7by the way I want to recommend the commandant package. it's an argument parser for command line usage. It works really great. supports subcommands as well
09:14:40FromDiscord<Elegantbeef> Should `DEFAULT_TIMES` be a `const`?
09:14:59kobi7yeah, this is just a remnant of the python codee
09:15:14FromDiscord<Elegantbeef> Ah
09:15:16kobi7they are sun angles and their description
09:15:25FromDiscord<Elegantbeef> Didnt know if `DateTIme` could be a `const`
09:15:39kobi7i want to separate it better, build from below instead of above
09:15:53FromDiscord<Elegantbeef> To reeeee at you like rika used to you dont do `a: type` consistently
09:16:03FromDiscord<Elegantbeef> used to me, you\
09:16:11kobi7i mean, handle one, than do many, instead of how it's written in python, but for now it works and i am already time limited anyway
09:16:19FromDiscord<Elegantbeef> Also put your example inside a `when isMainModule:` 😀
09:16:28kobi7thanks
09:16:40FromDiscord<Elegantbeef> No problem
09:18:14*jjido joined #nim
09:19:12kobi7porting from python is almost straight forward. I am an advocator for transpilers and automated porting. I think pylib is really cool and should be contributed to.
09:19:31*jmdaemon quit (Ping timeout: 245 seconds)
09:20:05kobi7since devs are invested in their languages, the best way is to have a porting effort. since projects change and improve so fast these days, it's better to have automated tools for porting.
09:20:52kobi7for example, see nuget.org (dot net's package manager)
09:21:00kobi7it has 292,169 unique packages...
09:21:20FromDiscord<Elegantbeef> Yea automated porting is harder from languages without similar conventions though
09:21:56FromDiscord<Elegantbeef> C to Nim could be done for the most part automatically but it's not a fun thing
09:22:20kobi7python has a lot, and other trending languages as well. I am currently interested in dart, and there are other clean languages, rust etc. to port a high level language is safer, and with nim its performance will be better.
09:23:46kobi7I wrote a tool to do cs to nim, but even there, the languages are different. The proper way is to have an intermediate language, that has all the constructs imaginable, and knows how to translate them to a "lesser" language (lesser meaning a simpler one)
09:24:08kobi7but it's a lot of effort. much more complicated than it seems at first
09:25:03kobi7even with the tool i wrote, i do not handle c# annotations, reflection, and any other code generation or macro-like
09:25:38kobi7if porting from python, you cannot use any runtime eval etc. unless you use python in runtime like nimpy.
09:25:45FromDiscord<Elegantbeef> Yea languages with vastly different conventions is just going to be hell to machine transpile
09:26:05kobi7and there is the problem of Dynamic type, and Array of Object - stuff like that, which Nim doesn't directly support
09:26:40FromDiscord<Elegantbeef> I mean it kinda does but yea
09:27:36kobi7Nim can be regarded a superset sometimes, so it's possible. and with macros, we have things like the classes package and other things that can enable the use case.
09:27:54kobi7Right, nim does have variant kinds, which can mimic Object
09:28:03FromDiscord<Elegantbeef> I mean without any magic
09:28:04FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3NYC
09:28:19kobi7https://github.com/Carpall/nobject
09:28:52kobi7yes, but add an int, or string to that list...
09:28:57FromDiscord<Elegantbeef> It doesnt work on all types only `ref RootObj` but it's atleast there
09:29:07FromDiscord<Elegantbeef> That was the "kinda"
09:29:18kobi7:) actually i almost forgot that it can.
09:44:08FromDiscord<Evrensel Kişilik> i hate all of damn things
09:44:12FromDiscord<Evrensel Kişilik> damn framework hells
09:53:53*pro quit (Quit: pro)
09:54:22*kobi7 quit (Ping timeout: 260 seconds)
09:55:44*pro joined #nim
10:07:20*MrSyabro quit (Quit: Quit)
10:08:15*Gustavo6046 quit (Quit: Leaving)
10:10:06*vicecea quit (Remote host closed the connection)
10:10:36*vicecea joined #nim
10:15:40FromDiscord<Goel> I'm looking at the System module, but i can't find the proc to get the max value that can be stored by an int (corrisponding by its Type, in my case int32)
10:17:48FromDiscord<BhamidipatiNikhil> In reply to @Goel "I'm looking at the": https://media.discordapp.net/attachments/371759389889003532/937290490708127774/unknown.png
10:18:15FromDiscord<Elegantbeef> `high(int)`↵(@Goel)
10:18:27FromDiscord<Elegantbeef> `high(int32)`
10:33:04*pro quit (Ping timeout: 256 seconds)
10:36:39FromDiscord<BhamidipatiNikhil> @ElegantBeef I applied similar strategy to what you suggested to input an integer too... I am struggling to understand why it failed? https://media.discordapp.net/attachments/371759389889003532/937295234415607838/unknown.png
10:37:35FromDiscord<Elegantbeef> If you're reading a single int why not just `parseInt(stdin.readLine)`?
10:40:48FromDiscord<Elegantbeef> It looks like you're on windows so change `ch != '\n'` to `ch notin Whitespace`
10:41:02FromDiscord<Elegantbeef> iirc Windows uses two characters for a newline
10:43:21FromDiscord<BhamidipatiNikhil> In reply to @Elegantbeef "It looks like you're": Genius!! I forgot, i read about this in the official tutorials... Thx @ElegantBeef !
10:57:21FromDiscord<Rika> Beware windows uses \r\n lol
10:57:56*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:26:09FromDiscord<xx_ns> aye, window uses CRLF and most other systems just LF if you want to google it\
11:26:11FromDiscord<xx_ns> (edit) "it\" => "it"
11:32:24*jjido joined #nim
11:43:54FromDiscord<tandy> how do i make my computer use my nim fork?
11:44:16FromDiscord<tandy> i made a pr but i dont want to wait till its merged and released to use it
11:49:44FromDiscord<xx_ns> what OS?
11:50:54FromDiscord<tandy> linux
11:51:38FromDiscord<tandy> oh i just did choosenim .
11:51:45FromDiscord<tandy> nice
11:55:52FromDiscord<BhamidipatiNikhil> How do i create a matrix of sequence? I tried to do it through arrays as shown in official tutorial 1, but the problem is that the size of the matrix is not known at compile time.... https://media.discordapp.net/attachments/371759389889003532/937315174040358952/unknown.png
11:58:13FromDiscord<BhamidipatiNikhil> How to create a matrix whose size is not known at compile time??
11:58:54FromDiscord<tandy> nvm, lots of broken shit here..
11:59:31FromDiscord<Bung> seq[seq[int]]
12:00:17FromDiscord<Bung> newSeq is constructor
12:03:27FromDiscord<Waldecir Santos> In reply to @BhamidipatiNikhil "<@!145405730571288577> I applied similar": May I ask what the theme do you use ?
12:04:25FromDiscord<BhamidipatiNikhil> In reply to @Bung "seq[seq[int]]": Yes, but wouldn't it allocate too much space to it.... I wanted to conserve space.... https://media.discordapp.net/attachments/371759389889003532/937317321083584512/unknown.png
12:05:24FromDiscord<BhamidipatiNikhil> In reply to @Waldecir Santos "May I ask what": This Theme is called CyberPunk... I am using it in VSCode editor https://media.discordapp.net/attachments/371759389889003532/937317571382882304/unknown.png
12:07:38FromDiscord<BhamidipatiNikhil> In reply to @Waldecir Santos "May I ask what": https://marketplace.visualstudio.com/items?itemName=max-SS.cyberpunk
12:08:52FromDiscord<Waldecir Santos> In reply to @BhamidipatiNikhil "https://marketplace.visualstudio.com/items?itemName": Perfect, thank you/
12:09:18FromDiscord<Waldecir Santos> Does nim have any vscode extension that integrates with the testing features ? like Testing Explorer ?
12:18:31FromDiscord<Rika> In reply to @BhamidipatiNikhil "Yes, but wouldn't it": seq can be allocated w/ specific space with `newSeqOfCap` but you do not put that in the type definition
12:22:19FromDiscord<demotomohiro> @BhamidipatiNikhil Define matrix type `type Matrix[T] = object x: seq[T]` and define proc `[]`[T](m: Matrix[T]; row, column: int): T =
13:03:26*PMunch joined #nim
13:11:02FromDiscord<coldfussion> sent a code paste, see https://paste.rs/oah
13:35:22PMunchHmm, I'm guessing Nim doesn't involve the shell with `gorge`
13:35:28PMunchSo it tries to run that as a single command
13:35:53PMunchTry to replace it with `nimble dump --json ..`
13:37:45*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
14:02:11PMunch@coldfussion ^
14:02:32FromDiscord<pmunch> [coldfussion](https://matrix.to/#/@coldfussion:ru-matrix.org)\: ^
14:02:52PMunchHuh, I thought tagging people worked..
14:03:02PMunchOh wait, do I not add the @?
14:03:05PMunchcoldfusion ^
14:03:09PMunchHmm, nope
14:11:38FromDiscord<Rika> they are a matrix user
14:12:53PMunchAha, and tagging only works for Discord?
14:13:16FromDiscord<Rika> not sure
14:13:18FromDiscord<Rika> prolly
14:13:23PMunch@Rika
14:13:38FromDiscord<Rika> or the matrix bridge doesnt work when the irc bridge posts a ping
14:13:39PMunchSeems like it
14:13:55PMunchIt even added a @ to the nick even though I didn't put it there
14:16:38FromDiscord<ynfle> Is this a bug, or "just add it to the pile of generics bugs"?
14:16:54FromDiscord<ynfle> https://play.nim-lang.org/#ix=3O0U
14:17:26FromDiscord<coldfussion> Oh, this worked! Thank you. Though it's strange ; worked on Linux...↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:22:39FromDiscord<ynfle> In reply to @ynfle "https://play.nim-lang.org/#ix=3O0U": Never mind. Don't think it's a bug
14:26:44FromDiscord<BhamidipatiNikhil> In reply to @demotomohiro "<@764483963422375946> Define matrix type": What should i do next? https://media.discordapp.net/attachments/371759389889003532/937353140334899200/unknown.png
14:30:04FromDiscord<BhamidipatiNikhil> I am facing a lot of problems creating a matrix of sequence... https://media.discordapp.net/attachments/371759389889003532/937353980902801468/unknown.png
14:31:21FromDiscord<Rika> you cannot index an empty seq, instead you use `add`
14:40:40PMunch@coldfussion, probably just a difference in how `staticExec`/`gorge` is implemented between the two platforms
14:41:31*carce joined #nim
14:41:34PMunchOr you can do `var am = newSeq[seq[int]](3)` to create a sequence of length three, and then you can assign the three entries like you do in your code
14:56:28*arkurious joined #nim
15:02:44FromDiscord<auxym> Is there a way to declare a `const` array that uses an enum index?
15:03:48FromDiscord<auxym> nvm I just rtfm'd
15:04:41FromDiscord<Rika> lol
15:05:32*pro joined #nim
15:05:48FromDiscord<auxym> just had to use the correct enum order in the literal with colon syntax
15:06:52FromDiscord<Rika> yeah would be weird to be able to define index 1 before index 0
15:12:11*pro quit (Quit: pro)
15:12:30*pro joined #nim
15:28:45PMunchColon syntax?
15:31:10*NimEventer quit (Ping timeout: 268 seconds)
15:38:43*carce quit (Remote host closed the connection)
15:41:37FromDiscord<Rika> [0: val, 1: val2 ...]
15:44:10PMunchWait what?
15:49:04*NimEventer joined #nim
15:52:28*dv^_^ quit (Read error: Connection reset by peer)
15:54:21*dv^_^ joined #nim
15:58:10FromDiscord<BhamidipatiNikhil> In reply to @PMunch "Or you can do": Yes, this worked... Thx @pmun
15:58:20FromDiscord<BhamidipatiNikhil> (edit) "@pmun" => "@PMunch"
15:59:08FromDiscord<BhamidipatiNikhil> https://media.discordapp.net/attachments/371759389889003532/937376390376992818/unknown.png
16:00:19FromDiscord<Szahid> Fastests grx car in GT Sport?
16:00:29FromDiscord<Szahid> Not here
16:00:30FromDiscord<Szahid> Sorry
16:09:11FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=3O1L
16:09:13FromDiscord<auxym> https://nim-lang.org/docs/manual.html#types-array-and-sequence-types
16:09:42*jjido joined #nim
16:19:18PMunchHuh, I didn't know that was a thing
16:23:01PMunchHmm, that appears to create a weird type out of it
16:23:46PMunchhttps://play.nim-lang.org/#ix=3O1T
16:24:32PMunchThere is another way of doing it, which means that it is an error to not declare all the types, and that you can only use a `Values` enum value to get data from the array
16:24:40PMunchBut that kinda seems to be the case for you as well
16:25:51PMunchIt says that it is `array[0..1, string]`, but I believe it is actually `array[valA..valC, string]` or put a different way `array[Values(0..1), string]`
16:26:14PMunchBut the error message you get when you do `lookupTable[0]` is super confusing
16:36:17anddamPMunch: hi there
16:36:51anddamI watched the presentation about the keyboard firmware in nim, pretty cool
16:37:57PMunchHi anddam, glad you liked it
16:38:30PMunchI'm actually holding a presentation during FOSDEM which is about making a framework out of the stuff I wrote for that
16:41:11prowhenn is fosdem ?
16:46:44*carce joined #nim
16:47:03anddamPMunch: will look forward to it
16:47:42anddambtw is FOSDEM still held in physical presence?
16:48:03anddam(not that I am going to attend, but still)
16:50:03PMunchpro, FOSDEM is the 5th and 6th of February
16:50:32anddamPMunch: IIRC when Yardanico helped me out with nimgl/imgui you also suggested a C library "autowrapper" that you wrote
16:50:33PMunchanddam, FOSDEM last year and this year where both virtual conferences. Hopefully we'll be back to physical ones next year (but who knows, we said that last year as well)
16:50:43PMunchanddam, ah yes, Futhark
16:50:57anddamPMunch: yep, COVID was kinda the black swan event of gatherings
16:59:42anddamI'll reask my question: why do examples at https://github.com/marcomq/nimview/tree/main/examples import ../src/webgui rather than just webgui?
17:00:02anddamI mean once the package is installed with nimble the latter should be an available package, shouldn't it?
17:04:58*stkrdknmibalz joined #nim
17:07:17PMunchIt's common practice, that way you can clone the repository and run the examples without installing it
17:07:43PMunchAnd if you have installed an older version and clone the repository the examples are guaranteed to run with the version they actually belong to
17:16:37*rp1 quit (Ping timeout: 240 seconds)
17:18:41*rp1 joined #nim
17:30:08*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
17:41:31*noeontheend joined #nim
18:07:08*PMunch quit (Quit: leaving)
18:07:33FromDiscord<yumi> hello, can i ask for some help?
18:09:40FromDiscord<yumi> im a nim beginner (wrote two utilities at https://github.com/egor4ka), and im trying to rewrite my mpv server folder utility that parses an html to get the file paths and tries to play all the files with mpv, but i cant figure out how to parse html (i've tried parsexml and parsehtml but i couldnt figure out how to do it)
18:12:35FromDiscord<PMunch> This example from the html parser module should be quite easy to adapt to what you want to do: https://nim-lang.org/docs/htmlparser.html#examplecolon-transforming-hyperlinks
18:13:13FromDiscord<yumi> it started spitting errors about findAll for some reason
18:13:15FromDiscord<yumi> tried that
18:13:56FromDiscord<yumi> let me try to do it real quick...
18:14:05FromDiscord<yumi> and show you the code
18:14:48*jjido joined #nim
18:15:04*jmdaemon joined #nim
18:19:42FromDiscord<yumi> https://media.discordapp.net/attachments/371759389889003532/937411770476273674/mpv-url-folder.nim
18:19:44FromDiscord<yumi> here
18:20:02FromDiscord<yumi> yeah ik about the no hyphens stuff
18:20:35FromDiscord<yumi> i usually change the name when i copy it over
18:21:41FromDiscord<yumi> wait i forgot a discard
18:21:45FromDiscord<yumi> brb
18:22:26FromDiscord<huantian> what I immediately see is that you're trying to `add` to an immutable variable `files` too
18:22:36FromDiscord<yumi> oh wait yeah
18:22:40FromDiscord<yumi> forgot bout that
18:23:17*noeontheend quit (Ping timeout: 240 seconds)
18:23:59FromDiscord<yumi> here https://media.discordapp.net/attachments/371759389889003532/937412845447028746/mpvurlfolder.nim
18:24:43FromDiscord<yumi> i get a bunch of errors about undeclared stuff
18:25:48FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=3O2x
18:27:02*termer_ is now known as termer
18:32:43*jmd_ joined #nim
18:33:27*jmdaemon quit (Ping timeout: 250 seconds)
18:34:00FromDiscord<yumi> In reply to @yumi "i get a bunch": i seriously have no idea what the fuck does it mean
18:36:03FromDiscord<dom96> In reply to @TurtleP "Hey, I keep getting": how did lovebrew-0.5.4 get installed?
18:36:19FromDiscord<TurtleP> locally
18:36:20FromDiscord<dom96> if nimblemeta.json doesn't exist in it then it sounds like some other tool put it there improperly
18:36:44FromDiscord<TurtleP> I ran `nimble install` on my project
18:36:52FromDiscord<TurtleP> which is lovebrew
18:37:19*carce quit (Remote host closed the connection)
18:37:30FromDiscord<dom96> is there a nimblemeta.json file in `C:\Users\jpost\.nimble\pkgs\lovebrew-0.5.4\` if you `nimble install` it?
18:38:00FromDiscord<TurtleP> yes
18:38:54*jmd_ quit (Ping timeout: 250 seconds)
18:38:55FromDiscord<dom96> hm, then that's odd. I guess it's complaining about \dist\lovebrew.exe being missing
18:39:08FromDiscord<dom96> maybe the error is poor and it expects that file to have been installed, but it wasn't
18:39:56NimEventerNew thread by Cybersecdo: Cryptography , see https://forum.nim-lang.org/t/8854
18:40:44FromDiscord<TurtleP> which it does exist
18:40:49FromDiscord<TurtleP> but that's in the project directory
18:43:09FromDiscord<yumi> hmm
18:45:12*jmdaemon joined #nim
18:46:44FromDiscord<TurtleP> and if I got to the filesystem directory and delete the folder it complains about, the error goes away
18:46:48FromDiscord<TurtleP> @dom96
18:47:55FromDiscord<dom96> hard to say what the problem is, could be a Nimble bug
18:48:01FromDiscord<dom96> depends what this `dist` directory is
18:48:11*nixfreaknim[m] quit (Quit: Bridge terminating on SIGTERM)
18:48:11*cheer[m] quit (Quit: Bridge terminating on SIGTERM)
18:48:11*happycorsair[m] quit (Quit: Bridge terminating on SIGTERM)
18:48:12*zgasma[m] quit (Quit: Bridge terminating on SIGTERM)
18:48:12*xiamx quit (Quit: Bridge terminating on SIGTERM)
18:48:17FromDiscord<dom96> and whether you do some fancy stuff with it during Nimble install 🙂
18:48:43FromDiscord<TurtleP> it's just a directory where the resulting binary goes
18:49:04FromDiscord<TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=3O3V
18:51:15FromDiscord<yumi> trying to nim check the mpvurlfolder.nim file, i get the output in the nimcheckoutput.txt file https://media.discordapp.net/attachments/371759389889003532/937419705113788496/mpvurlfolder.nim https://media.discordapp.net/attachments/371759389889003532/937419705310912532/nimcheckoutput.txt
18:51:25FromDiscord<yumi> any ideas?
18:52:33*cheer[m] joined #nim
18:59:09FromDiscord<yumi> okay nvm i screwed something up in my fs
18:59:10*happycorsair[m] joined #nim
18:59:10FromDiscord<yumi> brb
18:59:22*zgasma[m] joined #nim
18:59:37*xiamx joined #nim
18:59:37*nixfreaknim[m] joined #nim
18:59:43FromDiscord<yumi> hmm
18:59:45FromDiscord<auxym> `import xmltree` maybe? findAll on XmlNode is defined in xmltree
18:59:50FromDiscord<yumi> oh
18:59:51FromDiscord<yumi> okay
18:59:57FromDiscord<yumi> ill try that
19:00:03FromDiscord<yumi> but termux is kinda screwed
19:00:04FromDiscord<yumi> brb
19:00:22FromDiscord<yumi> (yeah im coding on a phone)
19:00:36FromDiscord<rishavs (Rishav Sharan)> Need some advice. I am trying to create a parser combinator in nim, and will need to mutate a source string "in-situ" a lot for this. Would something like strutils/ continuesWith or delete procs be good for this. I really don't want to create a new string everytime but just truncate a few characters from the start of the string.
19:04:53FromDiscord<yumi> sent a code paste, see https://play.nim-lang.org/#ix=3O42
19:05:53FromDiscord<huantian> `files.add(splitFile(a.attrs["href"]))`, `splitFile(a.attrs["href"])` returns a `tuple[dir: string, name: string, ext: string]`, nto a string
19:05:59FromDiscord<huantian> (edit) "`files.add(splitFile(a.attrs["href"]))`, `splitFile(a.attrs["href"])`" => "`files.add(splitFile(a.attrs["href"]))`↵`splitFile(a.attrs["href"])`"
19:06:06FromDiscord<huantian> (edit) "`files.add(splitFile(a.attrs["href"]))`↵`splitFile(a.attrs["href"])`" => "`files.add(splitFile(a.attrs["href"]))`↵`splitFile()`"
19:06:09FromDiscord<huantian> (edit) "nto" => "not"
19:13:19FromDiscord<yumi> uh
19:13:25FromDiscord<yumi> so what do i change it to?
19:14:35FromDiscord<huantian> if you only want the filename use `extractFilename()`
19:14:42FromDiscord<huantian> not sure why you're splitFile-ing
19:14:54FromDiscord<yumi> uh
19:14:55FromDiscord<yumi> what
19:15:02FromDiscord<yumi> i just want to get the value of the href
19:15:13FromDiscord<huantian> then I don't think you need splitFile at all
19:15:21FromDiscord<yumi> what do i use then?
19:15:36FromDiscord<huantian> `files.add((a.attrs["href"])`
19:15:39FromDiscord<huantian> (edit) "`files.add((a.attrs["href"])`" => "`files.add(a.attrs["href"])`"
19:15:44FromDiscord<yumi> oh okay thanks
19:16:31*cyraxjoe quit (Quit: I'm out!)
19:16:32FromDiscord<yumi> wooo it works
19:16:33FromDiscord<yumi> thanks
19:16:53FromDiscord<Rika> Where did the split file thing come from? Why did you use it I mean
19:18:19*cyraxjoe joined #nim
19:19:33FromDiscord<yumi> i copied it from the docs
19:19:56*nixfreaknim[m] quit (Quit: Client limit exceeded: 20000)
19:23:20*cheer[m] quit (Quit: Client limit exceeded: 20000)
19:23:35*happycorsair[m] quit (Quit: Client limit exceeded: 20000)
19:25:01FromDiscord<yumi> hmmm
19:25:02*cheer[m] joined #nim
19:25:09FromDiscord<yumi> now getting runtime errors
19:25:17*happycorsair[m] joined #nim
19:25:30*nixfreaknim[m] joined #nim
19:26:49FromDiscord<yumi> ./mpvurlfolder https://duckykutya.cf/kat/↵/data/data/com.termux/files/home/mpvurlfolder.nim(3) mpvurlfolder↵/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(53) sysFatal↵Error: unhandled exception: index 1 not in 0 .. 0 [IndexDefect] https://media.discordapp.net/attachments/371759389889003532/937428659667611668/mpvurlfolder.nim
19:27:04FromDiscord<yumi> uh
19:27:05FromDiscord<yumi> wait
19:27:47FromDiscord<yumi> (edit) "./mpvurlfolder https://duckykutya.cf/kat/↵/data/data/com.termux/files/home/mpvurlfolder.nim(3) mpvurlfolder↵/data/data/com.termux/files/usr/lib/nim/lib/system/fatal.nim(53) sysFatal↵Error: unhandled exception: index 1 not in 0 .. 0 [IndexDefect] https://media.discordapp.net/attachments/371759389889003532/937428659667611668/mpvurlfolder.nim" => "sent a long message, see http://ix.io/3O47"
19:27:54FromDiscord<yumi> i dont understand
19:28:25FromDiscord<dom96> sent a code paste, see https://paste.rs/SND
19:31:19FromDiscord<yumi> In reply to @yumi "~ $ ./mpvurlfolder https://duckykutya.cf/kat/": i run curl from the script but nothing
19:32:45FromDiscord<yumi> hmm
19:34:58FromDiscord<yumi> fixed the issue L
19:35:02FromDiscord<yumi> (edit) "L" => "LOL"
19:35:17FromDiscord<yumi> i shouldve declared the html variable AFTER the curl
19:35:21FromDiscord<yumi> i am an idiot
19:39:40FromDiscord<yumi> thanks for the help guys!
19:53:09FromDiscord<yumi> by the way, how can i silence the output of a proc in nim?
19:53:30FromDiscord<yumi> sent a code paste, see https://paste.rs/Mqk
19:57:44FromDiscord<ajusa> In reply to @yumi "i need to silence": what's the full command? did you try `curl -s`?
19:58:06FromDiscord<yumi> i tried curl -LO {file} {url}
19:58:12FromDiscord<yumi> there is an -s param?
19:59:18FromDiscord<ajusa> I see the code you posted earlier, if you are on a UNIXy system `curl -LO {file} {url} > /dev/null` should work.
20:00:00FromDiscord<ajusa> alternatively you could do `curl -L {url} > {file}`, that might work as well.
20:00:26FromDiscord<yumi> but > doesnt work with execShellCmd
20:00:32FromDiscord<yumi> lemme try -s
20:00:39*zgasma[m] left #nim (#nim)
20:01:01FromDiscord<ajusa> In reply to @yumi "but > doesnt work": oh really? my bad, thought it just used the normal system shell
20:01:09FromDiscord<yumi> i dont think so
20:01:41FromDiscord<yumi> https://github.com/egor4ka/mpvurlfolder here is the repo btw
20:15:25*jmdaemon quit (Read error: Connection reset by peer)
20:15:48*jmdaemon joined #nim
20:25:39FromDiscord<hethir> how can I deep copy a `ref object`?
20:27:28FromDiscord<konsumlamm> using `deepCopy`
20:28:59FromDiscord<rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3O4n
20:33:23FromDiscord<Markz> Hello, I see two Nim extensions for VSCode. Which one should I use?
20:33:56FromDiscord<Arizu> How can I have file Inter Process Communication?
20:36:40*neurocyte0917090 joined #nim
20:38:52FromDiscord<Elegantbeef> @Markz\: nimsaem's is the best
20:39:03FromDiscord<Markz> In reply to @Elegantbeef "<@264065313316798474>\: nimsaem's is the": Thank you.
20:39:11FromDiscord<Elegantbeef> [rishavs (Rishav Sharan)](https://matrix.to/#/@rishavs-58046952d73408ce4f2ebf0c:gitter.im)\: do `chr("hello", 'h')`
20:39:14*cyraxjoe quit (Quit: No Ping reply in 180 seconds.)
20:39:23FromDiscord<Elegantbeef> [Arizu](https://matrix.to/#/@nizoneko:snug.moe)\: memfiles, sockets both exist
20:40:29*cyraxjoe joined #nim
20:41:51FromDiscord<rishavs (Rishav Sharan)> Still getting the error↵https://play.nim-lang.org/#ix=3O4s
20:41:52FromDiscord<Elegantbeef> Oh i'm blind
20:41:52FromDiscord<Elegantbeef> It's `Option[string]` not `Option(string)`
20:44:28*pro quit (Quit: pro)
20:47:32FromDiscord<rishavs (Rishav Sharan)> damn it! me and my stupid mistakes \>.\>↵Thanks @elegantbeef\:matrix.org for catching that
20:48:12FromDiscord<Elegantbeef> No problem
21:31:37*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:46:42FromDiscord<Waldecir Santos> is there a way to run unitests with a "failfast" option so the test stops on the first error ?
21:57:18FromDiscord<Elegantbeef> Pmunch you about?
22:00:02FromDiscord<Elegantbeef> Or i suppose if anyone is around that knows how to get kate to do error reporting
22:03:46*jjido joined #nim
22:25:25FromDiscord<ynfle> In reply to @Waldecir Santos "is there a way": https://nim-lang.org/docs/unittest.html#abortOnError See docs on this `var`
22:27:02FromDiscord<Waldecir Santos> Awesome thank you
22:30:37FromDiscord<treeform> In reply to @creikey "does anybody happen to": It does not flip images, 0,0 is top left. Its very easy to flip though just call flip: https://nimdocs.com/treeform/pixie/pixie/images.html#flipVertical%2CImage
22:30:59FromDiscord<treeform> In reply to @Isofruit "The tooling obviously isn't": thank you for using jsony!
22:31:44FromDiscord<Phil> In reply to @treeform "thank you for using": You're welcome, but how come the message?
22:32:37FromDiscord<Phil> (edit) "welcome," => "welcome (or rather: Thank you for making the lib!),"
22:33:12FromDiscord<Phil> Oh! As a sidenote though, a question! I stumbled into a scenario where I wasn't sure how to solve it with jsony
22:33:33FromDiscord<treeform> do you have a small test case for that?
22:34:04FromDiscord<Phil> Not quite, I'm not sure how to make that understandable without providing context of the usecase
22:35:28FromDiscord<treeform> I messaged you because I did search for my lib names and your msg came up, so I replied.
22:36:04FromDiscord<treeform> In reply to @creikey "why are the functions": What functions name you don't like?
22:37:24FromDiscord<treeform> In reply to @Isofruit "Oh! As a sidenote": All most all jsony solution require a parseHook of some sort.
22:37:44FromDiscord<Waldecir Santos> How in nim can I override the object constructor when using OOP ?
22:39:05FromDiscord<Elegantbeef> You dont override the object constructor you make your own constructor
22:39:10FromDiscord<Phil> sent a long message, see http://ix.io/3O4O
22:39:45FromDiscord<ynfle> In reply to @Waldecir Santos "How in nim can": There are no constructors. You can define an `init` or `new` proc (depeneding on ref vs. regular object) or `initMyTypeName` or `newMyTypeName`. depending on your fancy
22:39:45FromDiscord<Phil> (edit) "http://ix.io/3O4O" => "http://ix.io/3O4P"
22:40:04FromDiscord<Elegantbeef> I mean there is `Type()` that's a constructor
22:40:09FromDiscord<Phil> Wait, as I typed it out the answer hit me in the face
22:41:41FromDiscord<Phil> I keep forgetting nim has type aliasing
22:41:47FromDiscord<Waldecir Santos> In reply to @ynfle "There are no constructors.": Got it thank you.
22:42:17FromDiscord<ynfle> In reply to @Elegantbeef "I mean there is": You're right. No overridable constructors. I don't get to define them
22:42:53FromDiscord<Elegantbeef> If you're a lazy sod like me you may enjoy https://github.com/beef331/constructor
22:43:08FromDiscord<Phil> +1 for constructor
22:43:23FromDiscord<Phil> I'm using it myself in nimstoryfont, saves me so many lines of code
22:43:45FromDiscord<Phil> Every time I thought I found a bug it turns out I only found my own lies
22:44:17FromDiscord<Phil> ~~Meaning I had no proper understanding on when it generates initObject proc and when newObject proc~~
22:47:26FromDiscord<Phil> It became pretty much one of those things I auto-include nowadays the second I smell an object becoming part of my project
22:58:04FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3O4U
22:58:35FromDiscord<ynfle> (edit) "https://play.nim-lang.org/#ix=3O4U" => "https://play.nim-lang.org/#ix=3O4V"
22:58:41FromDiscord<ynfle> (edit) "https://play.nim-lang.org/#ix=3O4V" => "https://play.nim-lang.org/#ix=3O4W"
23:02:26*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
23:13:27FromDiscord<keks> sent a code paste, see https://play.nim-lang.org/#ix=3O53
23:13:39FromDiscord<keks> (edit)
23:13:39FromDiscord<creikey> In reply to @treeform "It does not flip": I thought they were being flipped because I had accidentally swapped the `top` and `bottom` parameters of the ortho projection, so everything was being flipped
23:14:58FromDiscord<Elegantbeef> you need `proc initVec[N: static int, T](a: array[N, T]): Vector[N, T] =`↵(@keks)
23:15:38FromDiscord<creikey> In reply to @treeform "What functions name you": I just have never heard the term reactor before, apparently it's standard though
23:15:49FromDiscord<creikey> (edit) "In reply to @treeform "What functions name you": I just have never heard the term reactor before, ... apparently" added "like in `newReactor`,"
23:16:58FromDiscord<keks> In reply to @Elegantbeef "you need `proc initVec[N:": Ohhh! Thank you, I wouldn't have guessed it myself for sure.
23:19:29FromDiscord<Elegantbeef> That's why they keep me around, i have a good understanding of what causes issues 😛
23:19:54FromDiscord<treeform> In reply to @Isofruit "A lot of it": you can put json nodes into your objects see docs: https://github.com/treeform/jsony#full-support-for-json-in-json
23:20:07FromDiscord<treeform> "Sometimes your json objects could contain arbitrary json structures, maybe event user defined."
23:21:10FromDiscord<treeform> In reply to @creikey "I just have never": Yeah its pretty common even has its own Wikipedia page: https://en.wikipedia.org/wiki/Reactor_pattern
23:22:57FromDiscord<creikey> In reply to @treeform "Yeah its pretty common": yeah makes sense as a term then
23:31:07NimEventerNew thread by Xigoi: Nim's autoformatter situation, see https://forum.nim-lang.org/t/8855
23:44:19FromDiscord<keks> In reply to @Elegantbeef "That's why they keep": I'm feeling slightly scared of "those" who are keeping you here 😄
23:52:11FromDiscord<Elegantbeef> Lol