<< 10-07-2020 >>

00:02:44*hyiltiz quit (Ping timeout: 244 seconds)
00:03:04*hyiltiz joined #nim
00:03:04*hyiltiz quit (Changing host)
00:03:04*hyiltiz joined #nim
00:06:51shashlickWhat's not working
00:18:22*laqq3 joined #nim
00:27:10*oddp quit (Ping timeout: 256 seconds)
00:30:13*lritter quit (Ping timeout: 264 seconds)
00:30:40*endragor joined #nim
00:50:30*laqq3 quit (Ping timeout: 258 seconds)
00:52:46*Tlongir joined #nim
01:06:29FromDiscord<Zachary Carter> @shashlick - well when compiling the rizz bindings with the cpp backend, the C enum definitions don't wory
01:06:32FromDiscord<Zachary Carter> (edit) 'wory' => 'work'
01:06:37FromDiscord<Zachary Carter> apprently the cpp backend wants actual enums
01:11:24*endragor quit (Ping timeout: 272 seconds)
01:22:36shashlickcan you share some sample code
01:23:03FromDiscord<Zachary Carter> I'll have to put a sample together
01:23:22FromDiscord<Zachary Carter> but is there a way with nimterop to generate enums instead of using the defineEnum macro?
01:26:59shashlicknot anymore
01:27:30FromDiscord<Zachary Carter> poop
01:27:44FromDiscord<Zachary Carter> well - it's okay I can just use cOverride
01:27:49shashlickthere's an open issue to do it where possible - https://github.com/nimterop/nimterop/issues/99
01:27:50disbota better proposal for mapping C enums ; snippet at 12https://play.nim-lang.org/#ix=2eq4
01:28:06shashlickwhat's the code look like - will help to see what's the problem with it
01:28:29*muffindrake quit (Quit: muffindrake)
01:28:59shashlickokay saw you need to put a sample together
01:29:12*muffindrake joined #nim
01:38:17*chemist69 quit (Ping timeout: 272 seconds)
01:39:45*chemist69 joined #nim
01:58:22*hyiltiz quit (Ping timeout: 244 seconds)
01:59:43*hyiltiz joined #nim
02:03:04*dadada quit (Ping timeout: 246 seconds)
02:21:48*hyiltiz quit (Ping timeout: 244 seconds)
02:26:21FromDiscord<treeform> I would like to add profile tracing to every nim function, some that that would record enter and exist time for every function. How would I go about it? A macro? A patch to the compiler? Any other ideas?
02:26:55shashlickmaybe a pragma?
02:27:17shashlickbut you'll have to add it to every proc
02:27:41*muffindrake quit (Ping timeout: 272 seconds)
02:28:54FromDiscord<treeform> Ideally I would like to control which proc has an does not have it. Could I push and pop a custom proc?
02:29:13FromDiscord<treeform> custom pragma* ?
02:29:47*muffindrake joined #nim
02:31:14shashlicki've not had luck with that recently
02:41:29*endragor joined #nim
02:43:24*endragor quit (Remote host closed the connection)
02:43:31*endragor joined #nim
02:45:18FromDiscord<impbox> @treeform isn't that included?
02:45:28FromDiscord<impbox> https://nim-lang.org/docs/estp.html
02:47:14FromDiscord<flywind> Also https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-with-valgrind
02:48:26FromDiscord<Zachary Carter> valgrind doesn't work on all operating systems
02:48:57FromDiscord<Zachary Carter> but nimprof exists
02:49:11FromDiscord<impbox> nimprof sounds exactly like what treeform is asking about
02:49:12FromDiscord<Zachary Carter> or you could probably use a C profiling library
02:49:22FromDiscord<impbox> though i'm not sure if you can selectively disable it for procs
02:49:41*smitop quit (Quit: Connection closed for inactivity)
02:49:58FromDiscord<treeform> @impbox [ftsf] I did not know that was there thanks!
02:54:28*laqq3 joined #nim
03:03:55*Tongir joined #nim
03:06:24*Tlongir quit (Ping timeout: 256 seconds)
03:12:09shashlickll
03:20:45FromDiscord<Technisha Circuit (LGBTQIAP+)> In the ws lib by treeform, how do i loop through all of the connected clients?
03:23:59FromDiscord<Elegant Beef> Any ideas why the float doesnt work?↵https://play.nim-lang.org/#ix=2rjs
03:25:10*NimBot joined #nim
03:27:14*endragor quit (Remote host closed the connection)
03:27:30*endragor joined #nim
03:28:41FromDiscord<Elegant Beef> Since that doesnt work on objects either, i'm going to assume this is a naive solution 😄
03:34:41*krux02_ quit (Remote host closed the connection)
03:39:31*endragor quit (Remote host closed the connection)
03:40:00*endragor joined #nim
03:40:52*laqq3 quit (Ping timeout: 272 seconds)
03:44:31*endragor quit (Ping timeout: 265 seconds)
03:46:32*endragor joined #nim
04:08:38*skrylar[m] quit (*.net *.split)
04:08:39*GitterIntegratio quit (*.net *.split)
04:08:39*matlock quit (*.net *.split)
04:08:40*Cadey quit (*.net *.split)
04:08:40*qwertfisch quit (*.net *.split)
04:08:40*ldlework quit (*.net *.split)
04:08:40*Tongir quit (*.net *.split)
04:08:40*chemist69 quit (*.net *.split)
04:08:40*revere quit (*.net *.split)
04:08:44*sagax quit (*.net *.split)
04:08:44*idxu quit (*.net *.split)
04:08:44*zielmicha__ quit (*.net *.split)
04:08:44*arecaceae quit (*.net *.split)
04:08:44*cyraxjoe quit (*.net *.split)
04:08:44*lbart quit (*.net *.split)
04:08:44*gsingh93 quit (*.net *.split)
04:08:44*synthmeat quit (*.net *.split)
04:08:44*andinus quit (*.net *.split)
04:08:44*shodan45 quit (*.net *.split)
04:08:44*nickster quit (*.net *.split)
04:08:44*acidx quit (*.net *.split)
04:08:44*neceve quit (*.net *.split)
04:08:44*tyler569 quit (*.net *.split)
04:08:44*bozaloshtsh_ quit (*.net *.split)
04:08:44*ChanServ quit (*.net *.split)
04:08:44*endragor quit (*.net *.split)
04:08:44*supakeen quit (*.net *.split)
04:08:44*opDispatch quit (*.net *.split)
04:08:44*xet7 quit (*.net *.split)
04:08:44*FromDiscord quit (*.net *.split)
04:08:44*FromGitter quit (*.net *.split)
04:08:44*def- quit (*.net *.split)
04:08:45*ormiret quit (*.net *.split)
04:08:45*hoek quit (*.net *.split)
04:08:45*fowl quit (*.net *.split)
04:08:46*jholland__ quit (*.net *.split)
04:08:46*stever quit (*.net *.split)
04:08:46*euantor quit (*.net *.split)
04:08:46*gangstacat quit (*.net *.split)
04:08:46*njoseph quit (*.net *.split)
04:08:46*blackbeard420 quit (*.net *.split)
04:08:46*pbb quit (*.net *.split)
04:08:46*nerthus quit (*.net *.split)
04:08:46*Yardanico quit (*.net *.split)
04:08:46*ehmry quit (*.net *.split)
04:08:46*sepplesWoona quit (*.net *.split)
04:08:47*JStoker quit (*.net *.split)
04:08:47*go|dfish quit (*.net *.split)
04:08:47*rayman22201 quit (*.net *.split)
04:08:48*yumaikas quit (*.net *.split)
04:08:48*deepend quit (*.net *.split)
04:08:48*mutantturkey quit (*.net *.split)
04:08:50*tribly quit (*.net *.split)
04:08:50*beatmox- quit (*.net *.split)
04:08:50*leorize[m] quit (*.net *.split)
04:08:50*suchasurge quit (*.net *.split)
04:08:51*oculux quit (*.net *.split)
04:08:51*Oddmonger quit (*.net *.split)
04:08:51*literal quit (*.net *.split)
04:08:52*iwq quit (*.net *.split)
04:08:52*cornfeedhobo quit (*.net *.split)
04:08:52*Araq quit (*.net *.split)
04:08:52*Lord_Nightmare quit (*.net *.split)
04:08:52*l1x quit (*.net *.split)
04:08:52*ForumUpdaterBot quit (*.net *.split)
04:08:53*bacterio quit (*.net *.split)
04:08:53*letto quit (*.net *.split)
04:08:53*so quit (*.net *.split)
04:08:54*sknebel quit (*.net *.split)
04:08:54*screens__ quit (*.net *.split)
04:08:54*vqrs quit (*.net *.split)
04:08:54*lain quit (*.net *.split)
04:08:55*onionhammer quit (*.net *.split)
04:08:55*GaveUp quit (*.net *.split)
04:08:56*disbot quit (*.net *.split)
04:08:56*federico3 quit (*.net *.split)
04:08:56*vegai quit (*.net *.split)
04:08:56*shashlick quit (*.net *.split)
04:08:56*slackytude[m] quit (*.net *.split)
04:08:57*Zambyte[m] quit (*.net *.split)
04:08:57*unclechu quit (*.net *.split)
04:08:57*lnxw37d4 quit (*.net *.split)
04:08:57*k0mpjut0r quit (*.net *.split)
04:08:57*skrzyp1 quit (*.net *.split)
04:08:57*vesper11 quit (*.net *.split)
04:08:58*Northstrider[m] quit (*.net *.split)
04:08:58*oz quit (*.net *.split)
04:08:58*EastByte quit (*.net *.split)
04:08:58*ee7[m] quit (*.net *.split)
04:08:58*xicheng[m] quit (*.net *.split)
04:08:59*BitPuffin quit (*.net *.split)
04:08:59*matti quit (*.net *.split)
04:08:59*dom96 quit (*.net *.split)
04:08:59*wowi42 quit (*.net *.split)
04:09:00*dgb quit (*.net *.split)
04:09:00*Prestige quit (*.net *.split)
04:09:00*muffindrake quit (*.net *.split)
04:09:00*tinga_ quit (*.net *.split)
04:09:00*LyndsySimon quit (*.net *.split)
04:09:00*npgm quit (*.net *.split)
04:09:00*msmorgan quit (*.net *.split)
04:09:01*surma quit (*.net *.split)
04:09:01*D_ quit (*.net *.split)
04:09:01*xace quit (*.net *.split)
04:09:02*Avatarfighter quit (*.net *.split)
04:09:02*golechwi1 quit (*.net *.split)
04:09:03*alehander92_ quit (*.net *.split)
04:09:03*Cthalupa quit (*.net *.split)
04:09:03*dddddd quit (*.net *.split)
04:09:03*sentreen quit (*.net *.split)
04:09:03*nisstyre quit (*.net *.split)
04:09:03*junland quit (*.net *.split)
04:09:03*Mister_Magister quit (*.net *.split)
04:09:03*zedeus quit (*.net *.split)
04:09:03*Zevv quit (*.net *.split)
04:09:03*kungtotte quit (*.net *.split)
04:09:03*clemens3 quit (*.net *.split)
04:09:04*zama quit (*.net *.split)
04:09:04*Jesin quit (*.net *.split)
04:09:04*bung quit (*.net *.split)
04:09:04*Kaivo quit (*.net *.split)
04:09:04*CcxWrk quit (*.net *.split)
04:09:05*wontruefree[m] quit (*.net *.split)
04:09:05*Zoom[m] quit (*.net *.split)
04:09:06*reversem3 quit (*.net *.split)
04:09:06*codic quit (*.net *.split)
04:09:06*watzon quit (*.net *.split)
04:09:06*sirn quit (*.net *.split)
04:09:06*enthus1ast quit (*.net *.split)
04:09:06*casaca quit (*.net *.split)
04:09:06*lmariscal0 quit (*.net *.split)
04:09:06*Amun_Ra quit (*.net *.split)
04:09:07*skelett quit (*.net *.split)
04:09:07*dzamo[m] quit (*.net *.split)
04:09:07*nerdrat[m] quit (*.net *.split)
04:09:07*planetis[m] quit (*.net *.split)
04:09:07*Hotbees quit (*.net *.split)
04:09:07*waleee-cl quit (*.net *.split)
04:09:07*r4vi quit (*.net *.split)
04:09:07*hpyc9 quit (*.net *.split)
04:09:07*crem quit (*.net *.split)
04:09:07*Ekho quit (*.net *.split)
04:09:08*stefantalpalaru quit (*.net *.split)
04:09:08*mwbrown quit (*.net *.split)
04:09:08*Jjp137 quit (*.net *.split)
04:09:08*WilhelmVonWeiner quit (*.net *.split)
04:09:08*opal quit (*.net *.split)
04:09:08*stisa[m] quit (*.net *.split)
04:09:08*MTRNord[m] quit (*.net *.split)
04:09:08*oneark quit (*.net *.split)
04:09:08*sendell quit (*.net *.split)
04:09:08*d10n-work quit (*.net *.split)
04:09:09*drewr quit (*.net *.split)
04:09:09*koltrast_ quit (*.net *.split)
04:13:09*Vladar joined #nim
04:14:40*so joined #nim
04:14:40*letto joined #nim
04:14:40*ForumUpdaterBot joined #nim
04:14:40*Lord_Nightmare joined #nim
04:14:40*supakeen_ joined #nim
04:14:40*vqrs joined #nim
04:14:40*screens__ joined #nim
04:14:40*sknebel joined #nim
04:14:40*def- joined #nim
04:14:40*FromGitter joined #nim
04:14:40*FromDiscord joined #nim
04:14:40*xet7 joined #nim
04:14:40*opDispatch joined #nim
04:14:40*endragor joined #nim
04:14:40*JStoker joined #nim
04:14:40*sepplesWoona joined #nim
04:14:40*ehmry joined #nim
04:14:40*Yardanico joined #nim
04:14:40*nerthus joined #nim
04:14:40*pbb joined #nim
04:14:40*blackbeard420 joined #nim
04:14:40*njoseph joined #nim
04:14:40*gangstacat joined #nim
04:14:40*euantor joined #nim
04:14:40*stever joined #nim
04:14:40*jholland__ joined #nim
04:14:40*fowl joined #nim
04:14:40*hoek joined #nim
04:14:40*ormiret joined #nim
04:14:40*acidx joined #nim
04:14:40*nickster joined #nim
04:14:40*shodan45 joined #nim
04:14:40*andinus joined #nim
04:14:40*synthmeat joined #nim
04:14:40*gsingh93 joined #nim
04:14:40*lbart joined #nim
04:14:40*cyraxjoe joined #nim
04:14:40*arecaceae joined #nim
04:14:40*zielmicha__ joined #nim
04:14:40*idxu joined #nim
04:14:40*sagax joined #nim
04:14:40*revere joined #nim
04:14:40*chemist69 joined #nim
04:14:40*ldlework joined #nim
04:14:40*qwertfisch joined #nim
04:14:40*Cadey joined #nim
04:14:40*matlock joined #nim
04:14:40*GitterIntegratio joined #nim
04:14:40*skrylar[m] joined #nim
04:14:40*shashlick joined #nim
04:14:40*federico3 joined #nim
04:14:40*vegai joined #nim
04:14:40*disbot joined #nim
04:14:40*GaveUp joined #nim
04:14:40*onionhammer joined #nim
04:14:40*l1x joined #nim
04:14:40*golechwi1 joined #nim
04:14:40*Avatarfighter joined #nim
04:14:40*xace joined #nim
04:14:40*D_ joined #nim
04:14:40*surma joined #nim
04:14:40*msmorgan joined #nim
04:14:40*tinga_ joined #nim
04:14:40*muffindrake joined #nim
04:14:40*EastByte joined #nim
04:14:40*oz joined #nim
04:14:40*Northstrider[m] joined #nim
04:14:40*vesper11 joined #nim
04:14:40*skrzyp1 joined #nim
04:14:40*Zambyte[m] joined #nim
04:14:40*slackytude[m] joined #nim
04:14:40*mutantturkey joined #nim
04:14:40*deepend joined #nim
04:14:40*yumaikas joined #nim
04:14:40*rayman22201 joined #nim
04:14:40*go|dfish joined #nim
04:14:40*LyndsySimon joined #nim
04:14:40*leorize[m] joined #nim
04:14:40*beatmox- joined #nim
04:14:40*tribly joined #nim
04:14:40*Araq joined #nim
04:14:40*cornfeedhobo joined #nim
04:14:40*literal joined #nim
04:14:40*iwq joined #nim
04:14:40*Oddmonger joined #nim
04:14:40*oculux joined #nim
04:14:40*suchasurge joined #nim
04:14:40*bacterio joined #nim
04:14:40*Tlongir joined #nim
04:14:40*lain joined #nim
04:14:40*zama joined #nim
04:14:40*clemens3 joined #nim
04:14:40*kungtotte joined #nim
04:14:40*Zevv joined #nim
04:14:40*zedeus joined #nim
04:14:40*Mister_Magister joined #nim
04:14:40*junland joined #nim
04:14:40*nisstyre joined #nim
04:14:40*sentreen joined #nim
04:14:40*dddddd joined #nim
04:14:40*Cthalupa joined #nim
04:14:40*alehander92_ joined #nim
04:14:40*hyiltiz joined #nim
04:14:40*Jesin joined #nim
04:14:40*skelett joined #nim
04:14:40*wontruefree[m] joined #nim
04:14:40*Hotbees joined #nim
04:14:40*waleee-cl joined #nim
04:14:40*bung joined #nim
04:14:40*r4vi joined #nim
04:14:40*sirn joined #nim
04:14:40*opal joined #nim
04:14:40*enthus1ast joined #nim
04:14:40*hpyc9 joined #nim
04:14:40*drewr joined #nim
04:14:40*Kaivo joined #nim
04:14:40*crem joined #nim
04:14:40*bozaloshtsh_ joined #nim
04:14:40*tyler569 joined #nim
04:14:40*CcxWrk joined #nim
04:14:40*Ekho joined #nim
04:14:40*dom96 joined #nim
04:14:40*Prestige joined #nim
04:14:40*dgb joined #nim
04:14:40*wowi42 joined #nim
04:14:40*casaca joined #nim
04:14:40*lmariscal0 joined #nim
04:14:40*stefantalpalaru joined #nim
04:14:40*Amun_Ra joined #nim
04:14:40*mwbrown joined #nim
04:14:40*Jjp137 joined #nim
04:14:40*WilhelmVonWeiner joined #nim
04:14:40*koltrast_ joined #nim
04:15:12*wontruefree[m] quit (Ping timeout: 257 seconds)
04:15:13*hoek quit (Ping timeout: 299 seconds)
04:15:14*skrylar[m] quit (Ping timeout: 246 seconds)
04:15:15*vicfred quit (Max SendQ exceeded)
04:15:18*GitterIntegratio quit (Ping timeout: 246 seconds)
04:15:24*oprypin quit (Max SendQ exceeded)
04:15:44*vicfred joined #nim
04:15:44*matti joined #nim
04:15:59*matlock quit (Ping timeout: 246 seconds)
04:16:09*npgm joined #nim
04:16:12*LyndsySimon quit (Ping timeout: 256 seconds)
04:17:01*slackytude[m] quit (Remote host closed the connection)
04:17:01*Zambyte[m] quit (Remote host closed the connection)
04:18:10*so quit (Ping timeout: 246 seconds)
04:19:07*matlock joined #nim
04:19:34*oprypin joined #nim
04:19:45*LyndsySimon joined #nim
04:21:37*d10n-work joined #nim
04:23:46*xicheng[m] joined #nim
04:23:52*so joined #nim
04:24:08*hoek joined #nim
04:26:57FromDiscord<impbox> sent a code paste, see https://play.nim-lang.org/#ix=2rjy
04:27:54FromDiscord<impbox> deleting the dlls.zip doesn't help because it keeps trying to download it and extract it again
04:30:00*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:30:06*njoseph joined #nim
04:51:43*unclechu joined #nim
04:51:44*k0mpjut0r joined #nim
04:51:44*MTRNord[m] joined #nim
04:51:44*BitPuffin joined #nim
04:51:44*lnxw37d4 joined #nim
04:51:44*planetis[m] joined #nim
04:51:44*sendell joined #nim
04:51:44*GitterIntegratio joined #nim
04:51:44*codic joined #nim
04:51:44*watzon joined #nim
04:51:44*reversem3 joined #nim
04:51:44*dzamo[m] joined #nim
04:51:44*Zambyte[m] joined #nim
04:51:44*oneark joined #nim
04:51:44*nerdrat[m] joined #nim
04:51:44*neceve joined #nim
04:51:50*Zoom[m] joined #nim
04:51:50*ee7[m] joined #nim
04:51:50*skrylar[m] joined #nim
04:51:51*stisa[m] joined #nim
04:51:51*slackytude[m] joined #nim
04:51:51*wontruefree[m] joined #nim
05:00:41*vicfred quit (Quit: Leaving)
05:19:36*audiophile joined #nim
05:41:34*hoijui joined #nim
05:47:36*arecaceae quit (Remote host closed the connection)
05:47:59*arecaceae joined #nim
05:48:37*narimiran joined #nim
05:52:09*solitudesf joined #nim
05:52:30audiophilehullo, I am back for someone to explain to me what llvm is? I already asked this before but I didn't quite understand it. Is it basically a way to avoid writing machine specific code if you're writing an interpreter/compiler
05:52:45audiophileI'm probably not doing it full justice with that short explanation but is that somewhat correct
05:56:04FromDiscord<impbox> https://llvm.org/ the LLVM project?
05:57:08FromDiscord<impbox> I'm not aware of anything in nim called llvm
05:58:27FromDiscord<impbox> although I see there's this project https://github.com/arnetheduck/nlvm which target LLVM-IR
05:58:30FromDiscord<impbox> (edit) 'target' => 'targets'
06:06:55*maier joined #nim
06:19:18audiophilethe llvm project impbox
06:42:53FromGitter<awr1> @audiophile LLVM is a framework for writing optimizing compilers that target native code
06:44:03*letto quit (Quit: Konversation terminated!)
06:44:56FromGitter<awr1> the idea is that a given compiler generates LLVM IR (intermediate representation) code, which is sent through to the LLVM framework to produce a native binary (either statically, or just-in-time)
06:45:08*letto joined #nim
06:47:21audiophileso... the advantage is you dont have to target those architectures manually?
06:51:49FromGitter<awr1> in spite of its name it is not a virtual machine in the traditional sense. it is not quite like the JVM, which aims to be generally platform neutral by designed. its advantages include that LLVM enables a certain degree of architectural independence (not totally however - LLVM is not WASM, for instance) and that you get the advantage of leveraging LLVM's rather intense optimization suite
06:54:36FromGitter<awr1> the idea of writing a compiler with LLVM is that you don't have to write an optimizer (ideally) and do native codegen.
06:55:12FromDiscord<impbox> hmm is it possible to create a proc that is both compileTime and runTime? so if you call it with compile time static data it'll use the compileTime version and give you errors at compileTime, but still allow you to use it at runtime?
06:55:19FromGitter<awr1> (in practice however there are notably LLVM-based compilers that perform language-specific optimizations. the rust reference compiler does this, for instance)
06:56:09audiophileoh this is very interesting to me. So if llvm in the future makes any further optimizations, any compiler that leverages llvm will also reap the benefits?
06:56:14FromGitter<awr1> yes
06:56:45FromGitter<awr1> @impbox an arbitrary proc in general is both compiletime and runtime usable (save for stuff that requires FFI)
06:57:11FromGitter<awr1> if you want seperate branches for compiletime vs runtime look up `when nimvm`
06:57:29FromGitter<awr1> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-nimvm-statement
06:58:00FromDiscord<impbox> my use case is for string parsing into an object, it works fine at either runtime or compile time, but i want to throw errors at compile time if there's a problem with the input string
06:58:05FromDiscord<impbox> thanks!
06:59:08*supakeen_ is now known as supakeen
06:59:25*supakeen quit (Changing host)
06:59:25*supakeen joined #nim
07:04:01FromDiscord<impbox> nice it works =)
07:04:17*vicfred joined #nim
07:04:42FromDiscord<impbox> if i do it as a `const foo = toBar("myString")`
07:05:57FromDiscord<impbox> I guess i'd also want it to check "myString" if doing `var foo = toBar("myString")`
07:06:02FromDiscord<impbox> maybe I need a macro for that
07:10:27*ftsf quit (Quit: Leaving)
07:13:06FromDiscord<demotomohiro> Why this library list doesn't contain std/compilesettings and std/with module? They are not ready to use?↵https://github.com/nim-lang/Nim/blob/devel/doc/lib.rst
07:18:17*opDispatch quit (Quit: Konversation terminated!)
07:24:15FromGitter<awr1> may have forgotten to be updated
07:24:47FromGitter<awr1> IMO that should be fixed
07:57:14FromDiscord<impbox> during nimble build is it possible to build a binary that requires the current library?
07:57:51FromDiscord<impbox> eg I want to include a nicoEditor binary that comes with the nico package, but nicoEditor uses the nico module
07:58:33FromDiscord<impbox> aha, figured it out i think, added a nim.cfg with `path = "."`
08:05:57*dadada joined #nim
08:06:03*Trustable joined #nim
08:06:17Oddmongerok i saw there a .noinit. pragma for arrays, to prevent init at 0. But is there a .init. counterpat, for initialize at a given value ?
08:06:22*dadada is now known as Guest84250
08:06:45Oddmongerlike the C : char space[128]={32};
08:07:20Oddmongermay be a good use for a macro ?
08:12:03FromDiscord<Clyybber> just do `let a = [1,2,3,4]`
08:13:29*Tongir joined #nim
08:15:43*Tlongir quit (Ping timeout: 244 seconds)
08:16:00Oddmongeryes i know a can do this, but for longer array, it's a pain
08:16:28FromDiscord<impbox> `for i in 0..<space.len: space[i] = 32`
08:17:33Oddmongeryes, so no other way than «live» init ?
08:18:12FromDiscord<impbox> you could make a template to do the above I guess
08:18:27FromDiscord<Elegant Beef> or if you dont care just use a sequence
08:18:28FromDiscord<impbox> but no, i don't think there's a builtin to do it
08:18:44Oddmongerah i had understood template like functions types overrinding
08:19:10FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2rjX
08:19:20FromDiscord<Elegant Beef> Sequtil method, although i think there is a built in one
08:20:12Oddmongerah interesting, and must be generated at compile time
08:20:25Oddmongerthanks for all the answers
08:20:46FromDiscord<impbox> sent a code paste, see https://play.nim-lang.org/#ix=2rjY
08:20:58FromDiscord<impbox> could be prettier
08:21:24FromDiscord<Elegant Beef> yes like usinng `for i in a:` 😛
08:21:28FromDiscord<Elegant Beef> (edit) 'usinng' => 'using'
08:21:44FromDiscord<impbox> @Elegant Beef but is that the index or value?
08:21:50FromDiscord<impbox> depends on the container
08:21:50FromDiscord<Elegant Beef> that'd be value
08:21:59Oddmongeraren't templates just code substitution, and then executed at runtime ?
08:22:11FromDiscord<Elegant Beef> it's always callse the `.items` iterator impbox afaik
08:22:21FromDiscord<Elegant Beef> (edit) 'callse' => 'calls'
08:22:40FromDiscord<impbox> yeah, not great for setting the value
08:23:14FromDiscord<Elegant Beef> i meant instead of the `for i in 0..<32:`
08:23:23FromDiscord<impbox> oh right
08:25:40FromDiscord<Elegant Beef> 😄
08:25:41FromDiscord<Elegant Beef> sent a code paste, see https://play.nim-lang.org/#ix=2rk0
08:26:36FromDiscord<Elegant Beef> Yard you need to select only between the backticks for the "send a code paste"
08:27:03FromDiscord<Elegant Beef> Was curious how it looked on IRC and yea you remove any text in the message
08:27:26FromDiscord<lqdev> cc Yardanico
08:30:01Oddmongerthat's funny, even with {.noinit.}, the array is still zeroed
08:30:21FromDiscord<Elegant Beef> Memory it was created in might have been 0'd?
08:30:23FromDiscord<impbox> certain it wasn't already zero?
08:31:24*nikita` joined #nim
08:32:00FromDiscord<Elegant Beef> I know how computers work... totally not a facade
08:32:28Oddmongermaybe memory taken from the stack, for array ?
08:32:44Oddmongeri try with a very big array, for forcing heap alloc
08:33:05FromDiscord<lqdev> arrays are always allocated on the stack though
08:33:06FromDiscord<impbox> are you on a dangerous release build?
08:33:31FromDiscord<lqdev> and i know that all too well after my endeavours with real-time audio
08:33:38FromDiscord<impbox> =)
08:34:12FromDiscord<lqdev> >big brain me trying to allocate an array of 65536 float64s to debug a weird audio corruption glitch
08:35:13Oddmongerimpbox: i'm trying all this in inim
08:37:00Oddmongereven with 100Mb allocated (array[100_000_000,int] ), all is zeroed
08:37:46*Trustable quit (Remote host closed the connection)
08:38:17Oddmongerhum even more than 100mb indeed (size(int) : 4 ?)
08:38:50FromDiscord<impbox> try with a dangerous release build?
08:39:04FromDiscord<lqdev> that's not 100Mb, that's 6400Mb
08:39:24FromDiscord<lqdev> or 800MB
08:39:31FromDiscord<impbox> does the C compiler initialise it for you?
08:39:39FromDiscord<impbox> even if nim doesn't do it explicitly
08:40:36FromDiscord<impbox> https://media.discordapp.net/attachments/371759389889003532/731067332306403338/unknown.png
08:41:14FromDiscord<impbox> I guess you can't see that on IRC... https://stackoverflow.com/questions/2589749/how-to-initialize-array-to-0-in-c
08:41:46FromDiscord<impbox> according to this in C static and global vars are initialized to zero, so even though nim isn't initializing them they'd still be 0
08:41:52FromDiscord<impbox> unless these are locals
08:42:41FromDiscord<Elegant Beef> No he can see that on IRC
08:42:46FromDiscord<Elegant Beef> it sends the discord link
08:42:59FromDiscord<impbox> ehh I wouldn't click on that ;)
08:44:09Oddmongerhmm as a true nim newb, i cannot find the unequality in tests
08:44:26Oddmongerin manual i see == for equality, but for testing not ?
08:44:32FromDiscord<impbox> !=
08:44:34Oddmongertried != , of course
08:45:11FromDiscord<impbox> ```template `!=` (a, b: untyped): untyped =↵ # this definition exists in the System module↵ not (a == b)```
08:45:18Oddmongerhttp://ix.io/2rk5
08:45:49FromDiscord<impbox> yep, so that's a global
08:45:52FromDiscord<impbox> so it's gonna be 0
08:45:56Oddmongerah , need import System then (wasn't it implicit ?)
08:46:07FromDiscord<impbox> system is implicit
08:46:24FromDiscord<impbox> do you get an error?
08:46:51FromDiscord<Elegant Beef> Can confirm impbox is right↵https://play.nim-lang.org/#ix=2rk8
08:47:02FromDiscord<Elegant Beef> Ah shit thta doesnt compile on here
08:47:11FromDiscord<Elegant Beef> (edit) 'Ah shit thta doesnt ... compile' => 'Ah shit thta doesntquickly'
08:47:22FromDiscord<impbox> `var a{.noInit.}: array[100_000_000, int]`
08:47:42FromDiscord<Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/731069123311698020/unknown.png
08:47:57FromDiscord<Elegant Beef> some values are non-zero, even though most are
08:48:16Oddmongerok this was an error in my array declaration
08:48:45Oddmongerstrutils import seems implicit too
08:49:01FromDiscord<impbox> it's not, but you're not using anything from strutils
08:49:28Oddmongeri'm using string concat and tostring conversion, in the echo
08:49:35FromDiscord<impbox> yep, they're part of system
08:49:39FromDiscord<Elegant Beef> stringify is core
08:49:45FromDiscord<Elegant Beef> https://nim-lang.org/docs/lib.html#pure-libraries
08:49:46Oddmongerwas reading that: https://nim-lang.org/docs/strutils.html
08:50:04Oddmongerah ok, it's in system
08:50:07FromDiscord<impbox> read the first line carefully =)
08:50:10FromDiscord<impbox> it's a bit confusing
08:50:12Oddmongeryes /o\
08:50:40FromDiscord<Elegant Beef> less confusing and more misleading if you dont read 😄
08:50:50FromDiscord<impbox> but yeah, noInit does give you random data if you use it on a local array
08:51:06FromDiscord<Elegant Beef> We cant magically make C not C sadly
08:51:29FromDiscord<impbox> you can compile to js though
08:51:38FromDiscord<impbox> which i'm sure you'll get all zeroed regardless
08:52:01FromDiscord<Varriount> What's the problem?
08:52:10FromDiscord<Elegant Beef> Noinit doesnt work when it's a global variable
08:52:54FromDiscord<impbox> well it doesn't init anything
08:52:57FromDiscord<impbox> so it does work =)
08:53:00FromDiscord<Elegant Beef> lol
08:53:25FromDiscord<Varriount> Wait, so is the variable zero'd out, or not?
08:54:32FromDiscord<impbox> it's just 0, not zeroed out
08:56:27FromDiscord<Varriount> I think I recall this issue coming up before. There might be a reason for that behavior.
08:56:46FromDiscord<Varriount> Why is the variable supposed to be uninitialized?
08:57:07FromDiscord<Elegant Beef> Well the reason is C as i undestand it
08:57:12FromDiscord<Elegant Beef> (edit) 'undestand' => 'understand'
08:57:22FromDiscord<Elegant Beef> It's a large array of Ints
08:57:36FromDiscord<Varriount> So?
08:58:15FromDiscord<impbox> either C or the OS or the executable format
08:58:20FromDiscord<impbox> doesn't seem like a problem
08:58:26FromDiscord<Elegant Beef> It's really not 😄
08:58:34FromDiscord<Elegant Beef> I dont know what they were so concerned
08:58:58FromDiscord<Varriount> memset is very, very fast
09:04:05Oddmongerwell even with -d:useMalloc i have same result on globals
09:04:27FromDiscord<impbox> is it a problem?
09:05:07Oddmongerno, just curiosity as i'm learning the language
09:05:34FromDiscord<Elegant Beef> Curiosity in the weirdest shit 😄
09:05:42FromDiscord<Yardanico> What exactly are you people talking about?
09:05:45FromDiscord<Yardanico> Big arrays?
09:05:54FromDiscord<Elegant Beef> non initiallizing big global arrays
09:06:35FromDiscord<Yardanico> Well they're still big
09:06:52Oddmongerbut initialized :)
09:07:03FromDiscord<Yardanico> Well arrays are on stack
09:10:40FromDiscord<Elegant Beef> Well im outta here, no more big arrays!
09:10:45FromDiscord<impbox> o/
09:11:09FromDiscord<impbox> ~10 hours until the GMTK game jam starts, any other nim gamedevs gonna join? =)
09:11:09disbotno footnotes for `10`. 🙁
09:11:52Oddmongersorry, too newb for that
09:11:57Oddmongeri'm still counting my arrays
09:13:09FromDiscord<impbox> next up seqs!
09:19:48*audiophile quit (Quit: Default Quit Message)
09:22:19*oddp joined #nim
09:23:13*fredrikhr joined #nim
09:32:38FromDiscord<ayetwoo> Question: is Nim a scripting lang?
09:33:16Zevvit can be
09:33:20Zevvbut typically, now
09:33:22Zevvnow
09:33:23Zevvno
09:33:25Zevvdang
09:33:31FromGitter<awr1> RE big arrays: be wary of large non-zero arrays that are initialized as such and not filled in some programmatic way after declaration
09:35:21FromDiscord<ayetwoo> Can it be concurrent like clojure?
09:35:26FromGitter<awr1> arrays initialized to a list of nonzero values will not be on the BSS segment and will thus increase binary size
09:35:50FromGitter<awr1> which is fine if the array is not very large, but can be concerning if the array is very large
09:36:26FromGitter<awr1> @ayetwoo Nim has multithreading capabilities
09:39:04FromGitter<awr1> really Nim should be understood as a multidomain language trending toward an intent of trying to disprove the common assertion that "you need X language for high-performance native programming, you need Y language for scripting, you need Z language for web development etc. etc."
09:44:05*opal quit (Remote host closed the connection)
09:46:06FromGitter<awr1> nim is quite usable for scripting
09:46:13*opal joined #nim
09:46:25FromGitter<awr1> (maybe some work needs to be done on making *embedded* scripting easier than it currently is)
09:48:10FromGitter<awr1> if you want to do very bash/awk/etc-ish things nim can do the job pretty well IMO
09:55:04Oddmongerif nim implements system (for calling system commands) and popen, that's ok for scripting… i think
09:56:32FromDiscord<lqdev> we have execShellCmd
09:56:43FromDiscord<lqdev> and the osproc module
09:59:25Oddmongerand a very nice curses like for text interfaces
09:59:56Oddmongeri wonder if a can do true color with it (examples are for 16 colors term)
10:00:09FromDiscord<lqdev> there's the terminal module
10:00:21FromDiscord<lqdev> and the illwill nimble package
10:01:46Oddmongeri guess i can pass whatever value for foreground / background, not only the enums provided
10:03:43FromDiscord<lqdev> yup
10:03:54FromDiscord<lqdev> you just need to `enableTrueColors()`
10:04:19FromDiscord<lqdev> and you can use `set{Fore,Back}groundColor()` with a `Color`
10:04:28FromDiscord<lqdev> which is a 24-bit RGB color (from the colors module)
10:09:32Oddmongernice, thank you
10:13:34*D_ quit (Quit: No Ping reply in 180 seconds.)
10:14:31*D_ joined #nim
10:34:36*krux02 joined #nim
11:01:12*hoijui quit (Ping timeout: 260 seconds)
11:08:26*maier quit (Ping timeout: 258 seconds)
11:13:15*maier joined #nim
11:23:02*abm joined #nim
11:23:52*letto quit (*.net *.split)
11:23:52*endragor quit (*.net *.split)
11:23:53*xet7 quit (*.net *.split)
11:23:53*FromDiscord quit (*.net *.split)
11:24:04*FromGitter quit (*.net *.split)
11:24:04*def- quit (*.net *.split)
11:27:32*letto joined #nim
11:27:32*endragor joined #nim
11:27:32*xet7 joined #nim
11:27:32*FromDiscord joined #nim
11:27:32*FromGitter joined #nim
11:27:32*def- joined #nim
11:49:17Yardanicostill can't figure out why after a while my forum updater bot just *dies*
11:49:27YardanicoI mean it is "checking" but doesn't print anything
11:49:28*ForumUpdaterBot quit (Remote host closed the connection)
11:49:30Yardaniconeed restarting
11:49:35*ForumUpdaterBot joined #nim
11:49:43*xet7 quit (Quit: Leaving)
11:50:31*xet7 joined #nim
12:05:07*Guest84250 quit (Remote host closed the connection)
12:05:32*waleee-cl quit (Quit: Connection closed for inactivity)
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:39*supakeen joined #nim
12:11:46*hoijui joined #nim
12:13:45Oddmonger*sigh* … saying i was happy of my pangram on exercism…
12:21:44FromDiscord<demotomohiro> This pull request I sent to nimgl/imgui is not merged to nimgl/nimgl.↵https://github.com/nimgl/imgui/pull/2
12:21:45disbotFix compile error from nim cpp tests/test.nim
12:27:59YardanicoAraq: found a regression after last arc/orc PR (again from non-idiomatic havlak, but it should still *work* I guess :P), for me it SIGSEGVs with "address boundary error" with both arc/orc, probably something simple - https://gist.github.com/Yardanico/d654e8be96ade03ce2fcc18c56ea0108
12:28:47Yardanicoah apparently if you remove the line under "# cycle" it will show a nim stacktrace with SIGSEGV in dealloc
12:29:09Yardanicobut in that case it will only sigsegv with arc, not orc
12:36:00FromDiscord<Clyybber> Yardanico: The latest PR you mean the =destroy hook change?
12:36:06Yardanicoyeah
12:36:15Yardanico4raq took over your PR and merged it with some changes
12:44:22FromDiscord<KingDarBoja> @Clyybber thanks for fixing the tests of the colour theme switch, didnt know it had tests too
12:45:22Yardanicowell, a lot of stuff has tests :)
12:45:25Yardanicoeven nimsuggest does
12:52:35FromDiscord<Zed> umm why is the `New Packages` section on the nimble directory trying to open up apple news for me??
12:52:45Yardanicobecause RSS
12:53:06Yardanico"new packages" link is an RSS one
12:53:10Yardaniconot sure if apple news can handle RSS news or not
12:53:59FromDiscord<Zed> ah, probably not, why doesn't it open up a page with recently submitted packages?
12:54:03FromDiscord<Zed> why RSS?
12:54:24FromDiscord<Clyybber> @KingDarBoja np, thx for fixing the issue :D
13:00:39FromDiscord<dom96> > deleting the dlls.zip doesn't help because it keeps trying to download it and extract it again↵@impbox this is fixed in choosenim HEAD IIRC. The problem is that you've got some of the DLLs in ~/.nimble/bin already. Workaround is to get rid of them. Please report these issues on GitHub btw, it's very easy to miss messages here.
13:19:11*hoijui quit (Ping timeout: 246 seconds)
13:24:42*hoijui joined #nim
13:26:03*matlock_ joined #nim
13:27:24*matlock quit (Ping timeout: 256 seconds)
13:27:25FromDiscord<lqdev> is there a way of debugging compile times?
13:27:25*matlock_ is now known as matlock
13:27:39FromDiscord<lqdev> there are some modules that take way longer than I expect them to
13:27:40*sirn quit (Ping timeout: 256 seconds)
13:28:57*sirn joined #nim
13:29:18*npgm quit (Ping timeout: 256 seconds)
13:29:38*npgm_ joined #nim
13:30:28*casaca quit (Ping timeout: 256 seconds)
13:31:56FromGitter<gogolxdong> Any excel proccessing library?
13:33:44FromDiscord<Vindaar> @gogolxdong: https://github.com/xflywind/xlsx like this?
13:34:12FromDiscord<Clyybber> @lqdev Theres a VM profiler
13:34:22Yardanicowhich got merged in devel :P
13:36:01Yardanico1.4 will for sure be a big release :P
13:40:06*drewr quit (Ping timeout: 244 seconds)
13:54:33bungwhat cause nimble install old version package? I check jester repo, installed code older than git repo
13:55:21solitudesfnimble installs latest tag by default
13:55:59bungthere's `@narimiran`
13:56:00bungnarimiran fix deprecated stuff
13:56:00bungLatest commit 405be2e on 9 Apr
13:56:23narimiranbung: run `nimble install jester@#head` to get the latest version
13:58:21bungnarimiran thanks ! solved.
13:59:01bungit install by repo's release ?
13:59:54FromDiscord<Zachary Carter> I have an object that has a bunch of function pointers as its fields - one of these function pointers eventually ends up calling a template function in C++ - which I've wrapped using generics
14:00:23FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2rld
14:00:28FromDiscord<Zachary Carter> `destroyVector` is the function pointer in question
14:01:04FromDiscord<Rika> huh, is that possible?
14:01:06FromDiscord<Zachary Carter> and then in `destroyVector` I would just cast the `vector` parameter using something like - `cast[OzzVector[T]](vector)`
14:01:07FromDiscord<Zachary Carter> no
14:01:15FromDiscord<Zachary Carter> I get an error that typedesc is not a concrete type
14:01:23FromDiscord<Rika> well since its compile time
14:01:24FromDiscord<Zachary Carter> but I need to figure out a way to do this...
14:01:33FromDiscord<Zachary Carter> yeah :/
14:03:26FromDiscord<Zachary Carter> I guess for now I just won't write this as a plugin - I don't intend for the end user to have to work with some of these functions anyway - they'll be abstracted away by the API
14:04:20FromDiscord<Zachary Carter> but I was trying to figure out how to design the API by writing it as a plugin, since I started writing a plugin to begin with
14:04:36FromDiscord<Zachary Carter> kind of approaching the problem backwards I guess but oh well - just need to move some code around and it should be fine
14:05:08FromDiscord<Rika> why does destroy vector need a typedesc in the first place? maybe you can work around that with a non-proc-pointer
14:05:10FromDiscord<Vindaar> if you only end up calling that function and won't return `T` in any way, why not use some `enum` as an arg to that proc, which you use to decide what to cast to? since you use `cast` that should work I guess? only works of course if it's a few known types
14:05:26FromDiscord<Rika> ^ thats a good point
14:05:32FromDiscord<Zachary Carter> that's a good idea @Vindaar
14:05:48FromDiscord<Zachary Carter> damn you good
14:06:07FromDiscord<Vindaar> 🙂 hope it actually works
14:06:11FromDiscord<Zachary Carter> I think it will!
14:09:11*NimBot joined #nim
14:18:35FromDiscord<Shucks> > @Shucks ohhh nice you got your asm stuff working? :D↵@exelotl Yea finally
14:25:17*mikebela_ joined #nim
14:25:39*lritter joined #nim
14:33:27FromDiscord<Shucks> @mratsim thanks for your post on the board btw
14:34:53*vsantana joined #nim
14:37:58FromDiscord<Recruit_main707> nim specifies an std version, how can i avoid it: `...-mno-ms-bitfields -std=c++17 -std=gnu++14 ...`
14:38:16FromDiscord<Recruit_main707> ^ mine ^ compiler's
14:41:29FromDiscord<Shucks> is there a pass Nim Compiler pragma? Instead of having that in nim.cfg
14:44:38*bung quit (Ping timeout: 258 seconds)
14:51:13*maier_ joined #nim
14:52:30FromDiscord<XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2rlm
14:54:13*maier quit (Ping timeout: 264 seconds)
14:55:06FromDiscord<Vindaar> you're confused by python. You need a `=` instead of `:` at the end of the signature
14:55:18FromDiscord<XxDiCaprioxX> I did never do python, only Java
14:55:24FromDiscord<Vindaar> haha, ok
14:55:38FromDiscord<XxDiCaprioxX> But I thought : was also for procs
14:55:46FromDiscord<XxDiCaprioxX> Thank you, it works now
14:56:02*bung joined #nim
14:56:27FromDiscord<Vindaar> nah, it's `:` if it returns something (`proc foo(): float =`)
14:56:52FromDiscord<XxDiCaprioxX> Oh okay, got it now
14:57:06FromDiscord<Vindaar> the actual body is always after a `=`
14:57:27FromDiscord<XxDiCaprioxX> I overread that at the tutorial page haha thanks
14:57:35FromDiscord<Vindaar> no worries!
15:02:33*vikfret joined #nim
15:02:39*maier_ quit (Ping timeout: 256 seconds)
15:03:58*maier joined #nim
15:05:28*tane joined #nim
15:08:30*maier quit (Ping timeout: 260 seconds)
15:13:22*vsantana quit (Ping timeout: 246 seconds)
15:23:06*hyiltiz_ joined #nim
15:24:24*hyiltiz_ quit (Client Quit)
15:25:48*evilkhaoskat joined #nim
15:27:26*hyiltiz_ joined #nim
15:28:38*hyiltiz quit (Quit: hyiltiz)
15:29:59*hyiltiz_ quit (Client Quit)
15:30:15*evilkhaoskat quit (Ping timeout: 258 seconds)
15:31:17FromDiscord<mratsim> @Shucks you're welcome
15:32:23*hyiltiz joined #nim
15:32:24*hyiltiz quit (Changing host)
15:32:24*hyiltiz joined #nim
15:32:48*hyiltiz quit (Client Quit)
15:32:57FromDiscord<XxDiCaprioxX> If I want to add something to a string how I do it because += only works for ints and doubles
15:33:06FromDiscord<mratsim> &=
15:33:18FromDiscord<mratsim> or .add
15:33:21FromDiscord<XxDiCaprioxX> Thanks
15:34:14FromDiscord<XxDiCaprioxX> And If I have 2 conditions in an If statement how do I write it?
15:35:56FromDiscord<juan_carlos> condition and condition
15:36:34FromDiscord<XxDiCaprioxX> Okay thanks
15:37:43FromDiscord<Shucks> Facing new asm issues again. My functions get truly naked with optimizations but once I use a constant variable in the asm instruction I got a `sub esp, 0C` on top of that function >.<
15:38:32*hyiltiz joined #nim
15:39:45*hyiltiz quit (Client Quit)
15:41:37FromDiscord<XxDiCaprioxX> One more question: I have a proc that returns a boolean. How can I say "If it returns false"? Because↵```↵if !procname↵```is incorrect
15:42:49FromDiscord<Shucks> if not
15:43:07FromDiscord<XxDiCaprioxX> Thanks
15:49:29FromDiscord<mratsim> @Shucks that's allocating 12 bytes on the stack
15:50:22FromDiscord<Shucks> Yea, but why. So is there any reason why we can't use nim identifiers with the intel syntax?
15:51:04FromDiscord<mratsim> no idea, I don't use the Intel syntax in the low-level
15:51:46FromDiscord<mratsim> and for the allocation, are you using "let" or "var" temporaries somewhere?
15:52:05FromDiscord<Shucks> Played with your example but gcc complains with `operand type mismatch for jno`: https://play.nim-lang.org/#ix=2rlw
15:53:24*hyiltiz joined #nim
15:53:25*hyiltiz quit (Changing host)
15:53:25*hyiltiz joined #nim
15:54:03FromDiscord<mratsim> you are echoing, this requires allocating space for a string on the stack
15:54:05*hyiltiz quit (Client Quit)
15:55:07FromDiscord<mratsim> jno is only valid for 8, 16 or 32-bit displacement
15:55:24FromDiscord<mratsim> force uint32 not int
15:55:34FromDiscord<mratsim> int32*
15:56:05FromDiscord<mratsim> all there: https://www.felixcloutier.com/x86/jcc
16:00:33FromDiscord<Shucks> Yea. Im injecting code into a function. All I care about is that the original code (`add eax, 1`) gets executed before anything else happens and jmp back. Since I'm pushing/popping registers it shouldn't (?) really matter what I do between.
16:00:46FromDiscord<Shucks> uint32 seems not to be valid aswell
16:01:33*hyiltiz joined #nim
16:01:33*hyiltiz quit (Client Quit)
16:02:01*hyiltiz joined #nim
16:02:01*hyiltiz quit (Changing host)
16:02:01*hyiltiz joined #nim
16:02:40*hyiltiz quit (Client Quit)
16:02:54*hyiltiz joined #nim
16:02:54*hyiltiz quit (Changing host)
16:02:54*hyiltiz joined #nim
16:05:52FromDiscord<Shucks> at&t is horrible.
16:05:55FromDiscord<Recruit_main707> are there any examples of inheriting from a c++ class in nim? (if thats even possible)
16:06:24FromDiscord<mratsim> @Recruit_main707 maybe if you hack: https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
16:06:40*audiophile joined #nim
16:06:50*Trustable joined #nim
16:07:23FromDiscord<mratsim> @Shucks you can't allocate in that case, every local variable will reserve some memory by substracting from the stack pointer on function entry
16:08:45FromDiscord<Shucks> huh, JmpBack should be global right
16:09:46FromDiscord<Shucks> I mean what actually works is: `const JmpBack = $0x12345; asm """jmp JmpBack"""`
16:09:51*vsantana joined #nim
16:12:46FromDiscord<Shucks> but once I use `const JmpBack = $ (0x12345 + 5)` its allocating bytes on the stack on top in my function. Even when JmpBack is global
16:22:20FromDiscord<Recruit_main707> > maybe if you hack: https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim↵@mratsim does that mean there is no actual way to do it?
16:22:58FromDiscord<mratsim> you can emit C++ that you importcpp
16:23:49FromDiscord<Recruit_main707> i guess i could use some templates to make it look not like shit...
16:26:15*Zevv quit (Quit: Lost terminal)
16:26:41*Zevv joined #nim
16:27:48bungis there any open api of video site, I want build a video site frontend
16:29:31*waleee-cl joined #nim
16:29:57*alehander92_ is now known as alehander92
16:30:17*alehander92 is now known as alexander92
16:30:27*alexander92 is now known as alehander92_
16:30:40*mikebela_ quit (Remote host closed the connection)
16:31:30FromGitter<awr1> @Shucks you can use nim idents with asm
16:31:36FromGitter<awr1> just tag them as `exportc`
16:32:54*abm quit (Ping timeout: 240 seconds)
16:38:38*Trustable quit (Remote host closed the connection)
16:44:54FromGitter<awr1> @bung maybe vidlii?
16:45:58*hyiltiz quit (Quit: hyiltiz)
16:45:58FromDiscord<Zachary Carter> If I have a global variable of a type that has fields for objects which I've importcpp'd - I have to explicitly call the destructors on those fields, correct?
16:46:27FromDiscord<Zachary Carter> in other words Nim won't implicitly call destructors for importcpp'd objects that are in global scope
16:46:39FromDiscord<Zachary Carter> (edit) 'scope' => 'scope?'
16:46:45bungvidlii.com ? havn't seen before, let me check
16:48:55FromGitter<awr1> @Zachary Carter i believe so. dtors on global vars should only get autocalled on program exit
16:49:06FromDiscord<Zachary Carter> well they're not
16:49:11FromDiscord<Zachary Carter> at least the C++ destructor is not getting called
16:49:58FromDiscord<Zachary Carter> which is annoying - because the C++ library I'm using is doing some leak detection - and I *think* I'm calling all the destructors explicitly for objects I've allocated on the heap - but apparently I'm not because the leak detection assert is failing
16:50:08FromDiscord<Zachary Carter> so I'm missing something - but what I'm not sure
16:50:48FromDiscord<Zachary Carter> it has something to do with the vector that's been allocated though
16:51:10*hyiltiz joined #nim
16:51:10*hyiltiz quit (Changing host)
16:51:10*hyiltiz joined #nim
16:51:22*lbart_ joined #nim
16:51:23FromGitter<awr1> why are you calling it on the fields though? why not on the whole object?
16:51:51FromDiscord<Zachary Carter> well the object is a Nim object
16:52:01*lbart quit (Ping timeout: 256 seconds)
16:52:06FromDiscord<Zachary Carter> I think maybe I just need to wrap this Delete method in the allocator class for ozz-animation
16:52:12FromDiscord<Zachary Carter> and call that on the vector - that will probably free it up
16:52:28FromGitter<awr1> oh i thought you mean the object itself was a `importcpp`'d class or w/e
16:53:06FromDiscord<Zachary Carter> ah no - sorry for the confusion
16:53:57*hyiltiz quit (Client Quit)
16:54:04FromGitter<awr1> do things get dtor'd if, say, this wasn't a global var?
16:54:43FromDiscord<Zachary Carter> yes apparently
16:54:52FromDiscord<Zachary Carter> because then the leak detector doesn't whine
16:55:17FromGitter<awr1> is the variable tagged as `{.global.}`
16:55:55FromDiscord<Zachary Carter> nope
16:56:10FromDiscord<Zachary Carter> but I think that only has an effect if it's inside a proc and it basically makes it a static
16:57:44FromGitter<awr1> well
16:58:26FromGitter<awr1> `global` IIRC makes sure that it is statically allocated
16:59:00FromGitter<awr1> i believe there are cases where a nim module global can technically be a implicit local (don't quote me on this)
16:59:54FromDiscord<Zachary Carter> hmm
17:00:03*Vladar quit (Remote host closed the connection)
17:00:17bungfound one https://www.themoviedb.org/documentation/api seems good to me
17:01:07*Vladar joined #nim
17:02:26FromDiscord<Recruit_main707> i was wondering... if an object inherits from a c++ wrapped class, wouldnt it be better that the generated code was also an actual c++ class?↵this is all hypothetical, but lets say someone made a pr that added this feature, would it be welcomed?
17:05:45FromGitter<awr1> i dont understand what you mean. if an object has c++ inheritance it should be a c++ class
17:06:47FromGitter<awr1> unless you mean nim inheritance (i.e. `object of Ancestor`) of an object that was `importcpp`'d
17:07:13FromDiscord<Recruit_main707> sent a code paste, see https://play.nim-lang.org/#ix=2rlJ
17:07:27FromDiscord<Recruit_main707> thats what i mean ye
17:08:03FromGitter<awr1> in that case i worry that this will not be a good idea
17:08:40FromDiscord<Recruit_main707> why do you think so?
17:08:52FromGitter<awr1> it will get weird if you involve dynamic dispatch
17:09:12*audiophile_ joined #nim
17:09:13FromDiscord<Recruit_main707> isnt that the main point of inheritance?
17:09:21FromGitter<awr1> because
17:09:23FromGitter<awr1> > Nim does not produce a virtual method table, but generates dispatch trees. This avoids the expensive indirect branch for method calls and enables inlining. However, other optimizations like compile time evaluation or dead code elimination do not work with methods.
17:09:40*audiophile_ quit (Client Quit)
17:10:07FromDiscord<Recruit_main707> nim does not produce virtual method tables bc it does not produce *real* c++ classes
17:11:24*hyiltiz joined #nim
17:11:24*hyiltiz quit (Changing host)
17:11:24*hyiltiz joined #nim
17:11:31FromGitter<awr1> well yes and no. nim could have implemented vtables if it wanted to without C++ classes. my problem is you are approaching a problem of incompatibility with respect to the generated code
17:12:48*audiophile quit (Ping timeout: 272 seconds)
17:12:54FromDiscord<Recruit_main707> in what way would it be incompatible?
17:14:36FromGitter<awr1> if you create a `method` on an inherited C++ class you have to produce a C++ method instead of a free function which is what nim normally does
17:17:57FromGitter<awr1> i worry that you will run into something that will not mesh correctly
17:22:21FromDiscord<Recruit_main707> maybe but i guess it wouldnt be too hard to make distinctions between methods in each situation
17:43:03bungam wondering can js backend can have `multisync` pragma ?
17:52:59*hoijui quit (Ping timeout: 272 seconds)
17:58:08*vsantana quit (Quit: leaving)
18:01:22*lritter quit (Ping timeout: 246 seconds)
18:05:33Yardanicobung: well yes
18:05:45Yardanicobut it's not needed for JS
18:05:50Yardanicosince asyncdispatch doesn't work on JS backend anyway
18:05:55Yardanicoyou'd need to use something like https://nim-lang.org/docs/asyncjs.html
18:06:13*lritter joined #nim
18:06:46*nikita` quit (Quit: leaving)
18:16:33bungYardanico it provider promise , so I need wrap two version of same api
18:19:53Yardanicoyes
18:20:57bungit would be better just mapping to one proc, avoiding js has sync,async,callback patterns.
18:24:17*maier joined #nim
18:28:52*casaca joined #nim
18:38:16*solitudesf quit (Remote host closed the connection)
18:43:20*solitudesf joined #nim
18:44:01*evilkhaoskat joined #nim
18:46:20*hoijui joined #nim
18:48:45planetis[m]this error happens when compiling nico with arc: https://pastebin.com/K29Gfe4t
18:49:23planetis[m]should i use {.nosink.} in loadSurfaceIndexed or is it because sdl2.Surface has no destructors?
18:53:01FromDiscord<Clyybber> yeah, just {.nosink.{
18:53:32FromDiscord<Clyybber> you can also compile with --sinkInference:off to get rid of these errors
18:53:36*charmander joined #nim
18:57:27charmanderHi! I’m trying to open a file and handle the file-not-found error separately from others. Is there a better way to do that than checking if os.osLastError() == OSErrorCode(posix.ENOENT)?
18:59:40planetis[m]thanks clybber!
19:05:42*msmorgan quit ()
19:07:59planetis[m]so do all closures need .nosink?
19:22:31*msmorgan joined #nim
19:23:23FromDiscord<Clyybber> pretty much yeah
19:23:41FromDiscord<Clyybber> not when sinkInference would not infer a sink param anyways
19:29:26planetis[m]it doesnt work actually at proc definition ``proc loadSurfaceIndexed*(filename: sink string, callback: proc(surface: common.Surface)) {.nosinks.} =...`` but only .sinkinference: off at call site
19:29:52planetis[m]...and test fail so needs needs more investigation
19:32:05charmander(also, if that is the best way to do it, is defined(posix) the best way to check whether it’ll work?)
19:33:25FromDiscord<Clyybber> planetis: Yeah, you need to put the {.nosinks.} at the definition of whatever you are passing to callback
19:33:51FromDiscord<Clyybber> But not at loadSurfaceIndexed
19:34:16FromDiscord<Clyybber> You could also try this: `proc loadSurfaceIndexed*(filename: sink string, callback: proc(surface: sink common.Surface)) = ...`
19:34:57*PMunch joined #nim
19:35:18FromDiscord<Clyybber> nosinks disables the sinkInference. The sink inference looks at the procs body and figures out if its params would benefit from being sink params
19:35:50PMunchHi everyone! Anyone participating in the GMTK game jam with Nim this year?
19:36:09FromDiscord<Clyybber> PMunch: WB, I think @impbox will be participating
19:36:33PMunchWould assume as much :)
19:36:50PMunchNot really back by the way, I've just got an hour to kill on a ferry..
19:39:18*PMunch quit (Read error: Connection reset by peer)
19:40:24*PMunch joined #nim
19:40:41FromDiscord<Clyybber> ah nice
19:41:39PMunchApparently the internet out here is a bit flaky though..
19:42:00PMunchShould've probably connected through Discord or something
19:44:09FromDiscord<lqdev> is irc that heavy tho
19:44:09*PMunch quit (Read error: Connection reset by peer)
19:44:16FromDiscord<lqdev> discord is a goddamn website
19:44:21FromDiscord<lqdev> unless you use a custom client
19:45:38charmanderbut IRC loses messages while disconnected. which just happened to them
19:46:12FromDiscord<lqdev> well yeah there's that
19:46:32Prestigenoooo I missed him
19:53:25planetis[m]clyybber: using ``sink Surface`` didn't fix it, also this project uses the do notation and doesn't work with pragmas...
19:53:46*synshroud joined #nim
20:02:41planetis[m]it would be nice if someone documented the reason for disabling sink inference a bit better, but thank you for your help!
20:07:49FromDiscord<Clyybber> np
20:08:03FromDiscord<Clyybber> but yeah, documentation is still lacking as arc is still WIP :)
20:09:29*evilkhaoskat quit (Remote host closed the connection)
20:13:04*madprops joined #nim
20:13:21madpropstrying to think of something to make with nim
20:13:35madpropshaven't used it in a while
20:13:52*evilkhaoskat joined #nim
20:14:28FromDiscord<Rika> long time no see i think
20:14:36madpropsyep
20:16:43FromDiscord<lqdev> @planetis you can use do notation with pragmas tho
20:17:02FromDiscord<lqdev> `someProc(123) do (aa: int) {.cdecl.}: echo "a"` works just fine
20:17:27planetis[m]you're right thanks
20:17:38FromDiscord<Clyybber> oh right!
20:18:31*evilkhaoskat quit (Ping timeout: 258 seconds)
20:20:33FromDiscord<brainproxy> Anyone using WiX Toolset to create Windows installer for their app/tool built with Nim?↵↵I'm completely new to building an installer for Windows. Google search turns up a ton of stuff re: wix, but a lot of it's old or assumes you're using Visual Studio, etc. I was wondering if anyone knows of a good example or tutorial that's fairly up-to-date and that's from the perspective of using the wix cli tools (e.g. heat) to build and maint
20:26:17*vsantana joined #nim
20:30:52*hoijui quit (Ping timeout: 256 seconds)
20:32:16*tinga_ is now known as tinga
20:34:26FromDiscord<--HA--> Is there a proc (or something) to get an element at an index from a sequence or a default (instead of exception) if that index is out of range?
20:35:49FromDiscord<Rika> not for arrays
20:35:51FromDiscord<Rika> or seq
20:36:02FromDiscord<Rika> which is weird since tables have them
20:36:09FromDiscord<Rika> (getOrDefault)
20:37:11FromDiscord<--HA--> Ah yes, tables, that must have been where I saw it then. Thanks.
20:39:59*narimiran quit (Ping timeout: 258 seconds)
20:42:09*lbart_ is now known as lbart
20:42:14*lbart quit (Changing host)
20:42:14*lbart joined #nim
20:44:04madpropsoh nice the docs have a dark mode now heh
20:44:18madpropslooks pretty slick
20:46:26*audiophile_ joined #nim
20:58:48madpropswhat am I doing obviously wrong here? https://play.nim-lang.org/#ix=2rml
21:00:13FromDiscord<Rika> bg/fgColor isnt a `Color`
21:00:19FromDiscord<Rika> its a Background/ForegroundColor
21:00:25FromDiscord<Varriount> @brainproxy I recall experimenting with WiX a bit. If I recall correctly, it doesn't come bundled with a front-end
21:00:39FromDiscord<Varriount> (edit) 'recall' => 'remember'
21:00:48FromDiscord<Rika> wait huh
21:00:51FromDiscord<Varriount> That is, the generated installers don't have a GUI
21:00:52FromDiscord<Rika> one moment checking docs
21:01:22FromDiscord<brainproxy> @Varriount it's able to generate an `.msi`, I assume that has a gui, but... maybe not
21:01:26FromDiscord<Rika> ok madprops, i see the issue
21:01:50FromDiscord<Rika> theres no ansiBackgroundColorCode that takes in a BackgroundColor
21:01:52FromDiscord<Varriount> @brainproxy Bundling a Nim-generated executable should be fairly straightforward, as its just the executable and anything DLLs needed.
21:02:51FromDiscord<brainproxy> this one has a lot of Qt stuff, and needs Visual C++ runtime installed (depending on version of Windows)
21:03:27FromDiscord<Varriount> I would bundle the Qt DLLs with the executable, and place them in Program Files
21:03:57*laqq3 joined #nim
21:04:25FromDiscord<brainproxy> so I like the idea of an installer to handle that automagically, but I'm thinking an install-less bundle may be the easiest way to start, and `windeployqt` puts the Visual C++ redistributable installer `.exe` in the folder so could just explain in instructions you may need to install it if you see an error message re: msvcrt
21:05:08FromDiscord<brainproxy> Cmder mini, for example, doesn't have an installer; you just unzip the download and put it wherever you want
21:05:45FromDiscord<brainproxy> (edit) 'it' => 'the folder'
21:07:06madpropsRika got it. I just use 'colGreen' etc by importing 'colors'
21:07:09madpropsthanks
21:08:05FromDiscord<Varriount> @brainproxy My impression of WiX (and this might be flawed) was that it was the kind of tool that you write generators for.
21:08:28FromDiscord<Varriount> I believe that there was some helper tool that would generate an initial XML file for you though.
21:08:58*laqq3 quit (Ping timeout: 246 seconds)
21:09:11FromDiscord<brainproxy> yes, `heat.exe`
21:09:48FromDiscord<brainproxy> but... there's so much stuff that can go in the `.wxs` xml file, which is used to build the `.msi`
21:09:53FromDiscord<brainproxy> it's quite overwhelming
21:10:36FromDiscord<brainproxy> I can probably cobble something together, but this isn't for a hobby project, so makes me nervous to think I'll screw it up
21:11:56FromDiscord<Varriount> brainproxy: Hm. Well if you don't need a super-professional installer, a self-extracting archive (or just an archive) is perfectly serviceable.
21:12:46FromDiscord<Varriount> Some other installer programs I recall are ClickTeam, NSIS, and Inno
21:14:21FromDiscord<Varriount> NSIS is probably the easiest, although I wouldn't call the scripting language "intuitive"
21:15:54FromDiscord<Varriount> brainproxy: What is your audience (that is, who do you expect to be using your program?)
21:17:59FromDiscord<Varriount> @brainproxy ^
21:19:10FromDiscord<brainproxy> the world
21:19:25FromDiscord<Varriount> Hm. Is this a commercial program?
21:19:27FromDiscord<brainproxy> https://github.com/status-im/nim-status-client
21:19:35FromDiscord<Varriount> Ah, ok.
21:20:09FromDiscord<brainproxy> yeah, I think I'm going to go the Cmder mini route for now
21:20:10FromDiscord<Varriount> Hm. I'd probably recommend NSIS then. Although, I wonder what Python uses.
21:20:49FromDiscord<brainproxy> (edit) 'yeah,' => '> a self-extracting archive (or just an archive) is perfectly serviceable↵yeah,'
21:22:01*Vladar quit (Quit: Leaving)
21:24:35FromDiscord<Varriount> @brainproxy As nice as it would be to have a drag&drop client for creating installers... I'm guessing software that does that is commercial.
21:25:45FromDiscord<brainproxy> the company behind WiX has a commercial offering and paid consulting for installer code review, so definitely
21:26:07FromDiscord<Varriount> "paid consulting" == "$$$$"
21:26:15FromDiscord<brainproxy> indeed
21:26:29FromDiscord<Varriount> At least, that's my experience with consulting that goes along with already commercial projects.
21:27:00FromDiscord<Varriount> It generally seems targeted at companies/projects that have more money than sense.
21:27:28FromDiscord<Varriount> Or, at least, enough money that they don't have to be too careful about spending it.
21:31:28charmander> trying to open a file and handle the file-not-found error separately from others. Is there a better way to do that than checking if os.osLastError() == OSErrorCode(posix.ENOENT)?
21:31:33FromGitter<awr1> You can probably code a self-extracting archive system in Nim itself using `slurp()`
21:31:56charmanderthis was handling IOError, but maybe it’d be better to open the file using a function that would raise an OSError directly instead?
21:32:52FromDiscord<Varriount> @awr1 @brainproxy Yeah, and even program a text-based installer. 🤔
21:33:16FromDiscord<Varriount> (that's actually not a bad idea for a package)
21:33:48FromDiscord<Varriount> Although, coordinating with Windows that you need admin access is a bit of a dance, if you intend to install to Program Files
21:34:17FromDiscord<Varriount> (and I don't approve of the practice of installing to AppData. It's not secure)
21:34:22*maier quit (Ping timeout: 272 seconds)
21:34:27FromDiscord<Varriount> *only installing to
21:38:19FromGitter<awr1> Would be a neat project, yeah
21:40:00*maier joined #nim
21:42:54FromDiscord<Zachary Carter> okay so I needed to resize the C++ wrapped vector to 0 to avoid the memory leak
21:43:04FromDiscord<Zachary Carter> but yay - progress
21:45:08*maier quit (Ping timeout: 272 seconds)
21:45:20*solitudesf quit (Ping timeout: 256 seconds)
21:51:03FromDiscord<Varriount> @Zachary Carter How are things going?
21:52:10FromDiscord<Rika> doesnt niminst exist already
21:52:28FromDiscord<Rika> https://github.com/nim-lang/niminst
21:52:38FromDiscord<Rika> ah, unix only
21:53:10FromDiscord<Zachary Carter> @Varriount - good thanks! Working on ozz-animation bindings and porting a sample to my project
21:53:14FromDiscord<Zachary Carter> how are things going with you?
21:55:03*vsantana quit (Quit: leaving)
22:00:10FromDiscord<Varriount> Working on expanding Winim
22:03:35*NimBot joined #nim
22:03:55FromDiscord<Varriount> @Zachary Carter I'm also attempting to parse C# assemblies
22:12:59ForumUpdaterBotNew thread by Tim_H: Karax not redrawing when adding elements to seq?, see https://forum.nim-lang.org/t/6531
22:17:50FromDiscord<--HA--> I have an object type declared in a file I import and when I want to access a field on a variable of that type I get an undeclared field error.↵The field is there though, it is spelled correctly and when I echo the variable I see the field. What am I doing wrong?
22:18:31FromDiscord<Recruit_main707> Not sure, but maybe your field is “private”
22:20:52FromDiscord<--HA--> the type has the `*`
22:21:08FromDiscord<Recruit_main707> And the field?
22:27:07FromDiscord<--HA--> The field didn't. When I put a * there it works. Thanks I missed that that can (and has to) be done for fields as well. With fieldPairs I could access them anyway, just not directly.
22:27:40FromDiscord<Recruit_main707> No problem
22:30:18FromDiscord<--HA--> Do you know the reason why it is done like this? I'm wondering why would I want to export a type but none of its fields? And why does fieldPairs work on non exported fields?
22:30:46FromDiscord<Rika> sometimes you want to export only *some* of its fields
22:30:58FromDiscord<Rika> what if you wanted a field that was getter only?
22:31:11FromDiscord<Rika> if so, hide the field and make a getter proc
22:31:48leorize[m]usually it's to hide the implementation from being tampered by accident
22:32:02FromDiscord<Zachary Carter> @Varriount interesting...
22:32:28leorize[m]a hash table for example, requires it's field to be modified with a precise procedure or else the table corrupts
22:32:32FromDiscord<--HA--> So I can mark all my fields with the asterisk since I want them to be available I guess. Is there a shortcut for that?
22:32:55disrupteknot yet.
22:33:05leorize[m]nope, unfortunately
22:35:00FromDiscord<Elegant Beef> A macro could do it, but you'd have to write the macro 😄
22:35:36FromDiscord<--HA--> Ok. And sorry to repeat my question, just trying to understand how it works. Why does fieldPairs list all the fields anyway, exported or not?
22:35:45FromDiscord<Recruit_main707> That’s a nice little project to start getting to know macros actually
22:35:57FromDiscord<Elegant Beef> Which reminds me pragma macros, can they change the body of the proc?
22:36:06FromDiscord<Recruit_main707> Yes
22:36:35FromDiscord<Recruit_main707> fielsPairs maybe acts at at level and can see the fields
22:36:40FromDiscord<Zachary Carter> Ugh so confused - it seems like sometimes the destructor for my wrapped C++ object is getting called, and other times it isn't :/
22:36:42FromDiscord<Zachary Carter> this is annoying
22:36:47FromDiscord<Recruit_main707> at AST*
22:36:58FromDiscord<Elegant Beef> sent a code paste, see https://play.nim-lang.org/#ix=2rmE
22:37:42FromDiscord<Recruit_main707> Zachary I read something about finalizers and they sound like they might be what you need, not sure at all though
22:37:45FromDiscord<Elegant Beef> Now back to this issue :D↵https://play.nim-lang.org/#ix=2rjs
22:38:04FromDiscord<Rika> beef what issue
22:38:10FromDiscord<Elegant Beef> Float doesnt work
22:38:14FromDiscord<Elegant Beef> but ints do
22:38:20FromDiscord<Elegant Beef> and objects dont work
22:38:25FromDiscord<Elegant Beef> atleast after the first param
22:38:45FromDiscord<Elegant Beef> Converting to a byteStream and back doesnt work i should say
22:38:51FromDiscord<Rika> give me a moment to try understanding this...
22:39:19FromDiscord<Elegant Beef> In theory it just converts to a byte stream, the it casts back
22:39:28FromDiscord<Elegant Beef> But iirc the float endianess is wrong
22:40:49FromDiscord<Elegant Beef> Nah not endianess, just the converter i used uses a different default endianess
22:41:12FromDiscord<Elegant Beef> the hex of the string is write, but the casting isnt
22:41:17FromDiscord<Elegant Beef> (edit) 'write,' => 'right,'
22:41:41FromDiscord<Recruit_main707> If you get this to work with complex objects ping me pls
22:41:47FromDiscord<Elegant Beef> lol, will do
22:41:58FromDiscord<Elegant Beef> If we solve the float issue i imagine the objects will work too
22:42:42FromDiscord<Elegant Beef> Im currently trying to use netty to make a RPC system, but.. we'll see how this goes 😄
22:43:10FromDiscord<Elegant Beef> Objects work for the first variable, and then the next run into a wall
22:43:21FromDiscord<Rika> the funky thing is that the float changes every run
22:43:45FromDiscord<Elegant Beef> Not here
22:43:50FromDiscord<Elegant Beef> 1.26e-43
22:44:16FromDiscord<Elegant Beef> the output string is right though
22:44:19FromDiscord<Elegant Beef> so idk
22:44:30FromDiscord<Elegant Beef> `5AA4C842`
22:44:38FromDiscord<Elegant Beef> that's 101.321
22:44:58FromDiscord<Elegant Beef> but... it doesnt cast properly, which is weird
22:45:16FromDiscord<Elegant Beef> cant tell if this is a bug or me missing something
22:48:09*hyiltiz_ joined #nim
22:48:28*hyiltiz quit (Quit: hyiltiz)
22:48:29FromDiscord<Elegant Beef> Rearranging it i now get 3.06e-41
22:50:25FromDiscord<Rika> truly interesting
22:52:31FromDiscord<Rika> ah this will not work with strings at all ever lol
22:52:37FromDiscord<Rika> at least w/o some large changes
22:52:44FromDiscord<Rika> i mean strings in objects
22:53:22*sagax quit (Remote host closed the connection)
22:53:37FromDiscord<Elegant Beef> Why not?
22:54:11FromDiscord<Elegant Beef> If you get a byteStream that matches 1:1 of a non ref object casting from string should work fine, no?
22:54:15FromDiscord<Rika> strings are refs tho
22:54:43FromDiscord<Elegant Beef> yea but you're casting just the data in the string not the 4 bits left of it
22:54:55FromDiscord<Rika> so the current code would cast the pointer stored in the object no?
22:55:13FromDiscord<Elegant Beef> I mean like i said the first field was copied fine
22:55:42FromDiscord<Elegant Beef> I dont know if it'd impossible, and am dubious to make any claims considering i cant get a float
22:55:48FromDiscord<Elegant Beef> (edit) 'it'd' => 'it's'
22:58:22FromDiscord<Recruit_main707> Id rather return the ptr UncheckedArray and cast to a ptr T instead
22:58:53FromDiscord<Elegant Beef> I mean netty uses a string for messages, so i sorta need the byte signature
22:59:04FromDiscord<Rika> ok i have a feeling we're casting the wrong things
22:59:15FromDiscord<Elegant Beef> But it works for ints
23:01:25FromDiscord<impbox> PMunch sure am! Trying to solidify my idea for the theme
23:01:30FromDiscord<Rika> ill stop working on it btw, i have other things to do
23:02:10FromDiscord<impbox> (GMTK game jam)
23:02:31FromDiscord<--HA--> How can I assign an empty seq to an Option[seq]? How would I make this work for example `let foo: Option[seq[int]] = some @[]`?
23:03:06FromDiscord<Elegant Beef> `option(@[dataHere])`
23:03:29FromDiscord<Elegant Beef> https://nim-lang.org/docs/options.html#option%2CT
23:04:08FromDiscord<--HA--> yes, but without the dataHere. I want an empty seq in there.
23:04:39FromDiscord<Elegant Beef> But that's a let
23:04:40FromDiscord<Rika> some(newSeq[type]())?
23:04:43FromDiscord<Elegant Beef> so that's literally useless
23:04:49FromDiscord<Rika> that too
23:05:02FromDiscord<Elegant Beef> Let is immutable
23:05:06FromDiscord<Elegant Beef> you couldnt append data to it
23:05:16*tane quit (Quit: Leaving)
23:05:25FromDiscord<Rika> seqs may be refs under the hood but they act like regular primitives externally
23:05:39FromDiscord<Rika> aka a let'd seq cant change, etc
23:05:44FromDiscord<Recruit_main707> If we are gonna talk about useless things watch out, don’t mess with the professional
23:05:55FromDiscord<Rika> good point, ill let them talk 😛
23:06:35FromDiscord<Elegant Beef> Also rika i tested a single string input and both of the int types still work
23:06:50FromDiscord<--HA--> Nice, some(newSeq[type]()) was what I was looking for. @Rika
23:06:50FromDiscord<Rika> i mean within an object
23:06:54FromDiscord<Elegant Beef> Yea i know
23:07:27FromDiscord<Elegant Beef> Where are all the super smart people at
23:07:35FromDiscord<Elegant Beef> the ones that push glasses sincerely
23:07:39*msmorgan left #nim ("User left")
23:07:46FromDiscord<Rika> i have glasses but i dont wear them because me dumb
23:07:58FromDiscord<Technisha Circuit (LGBTQIAP+)> ~~Am i smart if i code on mobile?~~
23:08:01FromDiscord<Rika> (in reality, i dont need to, i just get a headache if i dont)
23:08:09FromDiscord<Rika> no you're a masochist
23:08:18FromDiscord<Recruit_main707> ^
23:08:19FromDiscord<Technisha Circuit (LGBTQIAP+)> :owoMiunaCry:
23:08:30FromDiscord<Technisha Circuit (LGBTQIAP+)> :owoMochaCry:
23:08:36FromDiscord<Rika> :MikoXD:
23:09:05FromDiscord<Technisha Circuit (LGBTQIAP+)> :02Calc:
23:09:10FromDiscord<Technisha Circuit (LGBTQIAP+)> ZeroTwo is smart
23:09:15FromDiscord<Technisha Circuit (LGBTQIAP+)> See she has glasses
23:09:26FromDiscord<Technisha Circuit (LGBTQIAP+)> So she is very smart
23:09:32FromDiscord<Rika> now that youve mentioned glasses, i dont actually know where mine are
23:09:38FromDiscord<Technisha Circuit (LGBTQIAP+)> Oof
23:09:42FromDiscord<Rika> (its been months since i last wore them)
23:11:19FromDiscord<Rika> @Elegant Beef more info: if i additionally do the bit thing and cast w/ an object, the float changes value
23:11:36FromDiscord<Rika> which is why i'm thinking you're casting the wrong thing
23:12:13FromDiscord<Elegant Beef> Hmmmmmm
23:12:35FromDiscord<Elegant Beef> I just dont see whatelse i cant cast
23:13:26FromDiscord<XxDiCaprioxX> How the fuck did the topuc go to Zero freaking Two
23:13:33FromDiscord<XxDiCaprioxX> (edit) 'topuc' => 'topic'
23:13:42FromDiscord<Elegant Beef> huh?
23:13:47FromDiscord<Rika> does it matter? no one was asking anything anyway
23:13:57FromDiscord<Rika> it's also already ended anyway so
23:14:14FromDiscord<Elegant Beef> See rika you say that but bits 5..8 give me the bit signature i expect
23:14:25FromDiscord<Elegant Beef> So if i cast 5..8 it should give the result
23:14:43FromDiscord<Elegant Beef> bytes 5..8*
23:15:13FromDiscord<Elegant Beef> Like if i use a hex to float conveter i get https://media.discordapp.net/attachments/371759389889003532/731287436977504306/unknown.png
23:15:18FromDiscord<Elegant Beef> Which is the input float
23:15:18FromDiscord<Rika> same site nice
23:15:20FromDiscord<Technisha Circuit (LGBTQIAP+)> > How the fuck did the topic go to Zero freaking Two↵Magic and :02Wave:
23:15:25FromDiscord<XxDiCaprioxX> @Rika I dont mind just wondering xD
23:15:28FromDiscord<Rika> also yeah i know
23:15:44FromDiscord<Rika> im just saying i suspect that the cast is casting the wrong thing
23:16:04FromDiscord<Rika> i dont know why or how the code is doing this
23:25:19*krux02_ joined #nim
23:27:01FromGitter<gogolxdong> @Vindaar thanks. It's out of maintenance. Someone said libxlsxwirter works and I will try.
23:27:14FromDiscord<Recruit_main707> Does this work? cast[ptr float32](addr [i don’t remember the function name][0])
23:27:44*hyiltiz_ quit (Ping timeout: 272 seconds)
23:27:52*krux02 quit (Ping timeout: 260 seconds)
23:28:33FromDiscord<Rika> lmao `i don’t remember the function name`
23:29:45*hyiltiz joined #nim
23:29:46*hyiltiz quit (Changing host)
23:29:46*hyiltiz joined #nim
23:41:10*maier joined #nim
23:45:34*maier quit (Ping timeout: 240 seconds)
23:55:38*maier joined #nim
23:58:13FromDiscord<Elegant Beef> @Recruit_main707 expression has no address