<< 08-08-2020 >>

00:00:42*Jesin joined #nim
00:01:24disruptekwe should achieve parity with closure iterators before we go into the compiler, to give you some idea of expectation.
00:11:40rockcaverais there any way to compile using -d:gcc8|gcc9|... to switch the compiler folder?
00:13:22rockcaveraforget it, I had already managed to do it, but I didn't realize it.
00:13:34rockcavera=)
00:13:54*oddp quit (Ping timeout: 256 seconds)
00:30:34FromDiscord<MapleSyrup|TagMeIfReply> how's opencv/sdl2 stuff in nim
00:39:03FromDiscord<Elegant Beef> Sdl2 is used a fairbit by many people
00:40:09FromDiscord<Elegant Beef> OpenCV seems to have two wrappers both of which are rather old
00:40:55FromDiscord<Elegant Beef> Nimterop might work with opencv no clue
01:04:11*vicfred quit (Quit: Leaving)
01:06:11*apahl quit (Ping timeout: 246 seconds)
01:08:09*apahl joined #nim
01:26:55*sm2n quit (Remote host closed the connection)
01:35:15*vivus joined #nim
01:44:40shashlickIt's c++, better off with c2nim
01:48:01FromDiscord<Zachary Carter> I'm still debating whether or not to wrap malloc so I can track subsystem memory usage
01:48:45FromDiscord<Zachary Carter> going to be a ton more work though because I won't be able to use a lot of the stdlib
01:48:57FromDiscord<Zachary Carter> I guess it's probably not worth it
02:02:11*apahl quit (Ping timeout: 246 seconds)
02:04:21*apahl joined #nim
02:15:50shashlickWhy not -d:malloc
02:15:56shashlickWith arc though
02:16:00Yardanico-d:useMalloc
02:16:07Yardanicoit works with refc too
02:22:24shashlickwhat do you need to override to get deepCopy to work correctly
02:22:46*audiofile joined #nim
02:22:48*vivus quit (Quit: Leaving)
02:24:26*vicfred joined #nim
02:25:15*enthus1ast quit (Ping timeout: 272 seconds)
02:26:57*surma quit (Ping timeout: 260 seconds)
02:27:35*r4vi quit (Ping timeout: 244 seconds)
02:32:02*surma joined #nim
02:35:17*r4vi joined #nim
02:36:57*enthus1ast joined #nim
02:45:31*gangstacat quit (Ping timeout: 272 seconds)
02:53:45*muffindrake quit (Ping timeout: 244 seconds)
02:55:59*muffindrake joined #nim
03:12:29*audiofile quit (Quit: Default Quit Message)
03:15:46FromDiscord<Zachary Carter> Shashlick: I'm already using -d:malloc but I'd like to be able to tag and keep track of allocations
03:16:37FromDiscord<Zachary Carter> For leak detection and tracking what subsystems of my program allocate what.
03:22:03*gangstacat joined #nim
03:34:09*enthus1ast quit (Ping timeout: 244 seconds)
03:37:06shashlickWhy not valgrind and co
03:46:41*enthus1ast joined #nim
03:49:19FromDiscord<Zachary Carter> What is co? I'm sure I can use instrumentation tools but it'd be nice to be able to show memory statistics in a gui within my app
03:55:45shashlickokay that's a different story
03:55:56shashlicki used qcachegrind recently and it was pretty cool
03:56:02shashlickbut that's not memory
04:00:00*Kaivo quit (Remote host closed the connection)
04:04:38*Romanson joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:38*supakeen joined #nim
04:12:44FromDiscord<mattrb> Best way and data type to load an arbitrary length file as bytes?
04:18:34FromDiscord<Technisha (LGBTQIAP+)> How do i make tasks in the config.nims file? I wanna make it so i can do `nim debug` for compiling with only one option enabled, then nim release to build it with other triggers :P
04:28:57FromDiscord<Technisha (LGBTQIAP+)> Nvm, how do i remove the first 3 characters from a string? I can't find it online searching through the docs ;-;
04:32:32shashlickStr[3 .. ^1]
04:32:49shashlickOr substr
04:35:50FromDiscord<Technisha (LGBTQIAP+)> What does `[3 .. ^1]` do?
04:43:05shashlickGives you a substring starting at position 4 and ending at the last char
04:43:19shashlickSlicing
04:44:24FromDiscord<mattrb> @mattrb Ah, newSeq is my friend
04:45:11FromDiscord<Technisha (LGBTQIAP+)> Oh thanks!
05:40:39*arecacea1 quit (Remote host closed the connection)
05:41:18*arecacea1 joined #nim
05:48:47FromDiscord<Varriount> shashlick: Why does Nimterop use the command prompt to execute programs on Windows?
06:03:31*narimiran joined #nim
06:10:04shashlickGood question, what do you propose
06:10:36shashlickThere's only gorgeEx at compile time
06:13:16*solitudesf joined #nim
06:14:35*Romanson quit (Quit: Connection closed for inactivity)
06:51:34*narimiran quit (Ping timeout: 265 seconds)
07:00:13*NimBot joined #nim
07:09:12FromDiscord<Varriount> shashlick: what about compiling or requiring a bootstrap program, something that would be cross platform
07:12:21FromDiscord<Varriount> Oh wow, staticExec only takes a string. That's limiting.
07:15:40*kenran joined #nim
07:37:44*solitudesf quit (Quit: Leaving)
07:38:12*solitudesf joined #nim
07:57:17*aurelius joined #nim
07:57:20*aurelius quit (Read error: Connection reset by peer)
07:58:36*oddp joined #nim
08:40:31*narimiran joined #nim
08:42:03*narimiran quit (Client Quit)
08:54:56*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:01:47*stisa[m] quit (Quit: Idle for 30+ days)
09:16:45*Vladar joined #nim
09:24:41*xet7 quit (Quit: Leaving)
09:25:59*xet7 joined #nim
09:34:53*xet7 quit (Remote host closed the connection)
09:36:10*xet7 joined #nim
09:36:51*hoijui joined #nim
09:37:08*opi joined #nim
09:43:04*opi quit (Quit: Leaving)
09:43:23*opi joined #nim
09:43:40*opi quit (Client Quit)
10:04:22*endragor quit (Remote host closed the connection)
10:04:29*endragor joined #nim
10:18:28*hoijui quit (Quit: Leaving)
10:29:22Zevv#nim died of a heat wave?
10:36:17*krux02 joined #nim
10:36:57*kenran quit (Quit: leaving)
10:49:07voltistAnybody got any recommendations for how I, someone who mostly writes Python and Nim, could improve my C skills? Most resources seem like introductions to basic programming and CS, so I loose interest quick
10:49:45Zevvlet me ask, why do you *want* to improve your C skills
10:50:14Zevvbecause basically, the way it is with all those skills: you grow'em by using them.
10:50:35Zevvjust write stuff in C, or do some work in existing C projects
10:50:45voltistPartly for getting the most out of Nim (wrapping and stuff), and also because I see myself using it for some projects
10:51:09*clyybber joined #nim
10:51:12voltistYeah of course I'll practice, but I don't really know where to look for info that isn't all tailored for people who have never done any programming before
10:51:38ZevvI'm not expert, but I think I _am_ a bit of a C veteran. IMHO C is actually pretty small and minimal
10:51:49Zevvthe K&R book is thinner then my pinky and has it all
10:52:30clyybberwhat is not small is the parts of the spec that aren't
10:52:33clyybber:p
10:52:44clyybberand those are the parts that come to bite you
10:52:47Zevvwhat's not specced is UB, clear enough
10:52:50Zevvjust don't go there
10:52:59Zevvit has no pretentions of being a safe language at all.
10:53:45clyybberyeah, but like the default int types are not unsafe, but still their size is not strictly defined
10:53:48Zevvbut the good thing is that there barely is hidden complexity. What you see is what you get. For a lot of people pointers need to "click", but after that it's pretty trivial
10:54:01clyybberyeah
10:54:10ZevvI came from the downside up. I did asm before I did C, so then everyting makes perfect sense
10:54:11clyybberI like C but only with stdint.h :p
10:54:48Zevvanyway, voltist: if you like to learn from books, read K&R and "deep C secrets" after that
10:55:20voltistWow going all the way back
10:55:23voltistSounds fun
10:55:36ZevvC basically has not changed a lot
10:55:56supakeenWell, C99 added a bunch of stuff I like.
10:56:05Zevvthe "modern" stuff in C is using bools and friendlier struct initialization syntax
10:56:15supakeenYea that.
10:57:00voltistWell, here I go...
10:57:37Zevvand here I am, getting whacked by the interns for not doing "const std::string &s". "Noo, you need to pass by reference, otherwise you get a copy." "Noo you need const otherwise your reference is mutable"
10:57:51ZevvNo thank you, no C++ for me, I'm good
10:57:57supakeenI never went into C++ either.
10:58:05supakeenIt's C/Python/Nim at the moment mostly.
10:59:10*xet7 quit (Remote host closed the connection)
11:02:18clyybberThe bad parts of C are the typedef scope thing and the number types, but the latter is fixed with stdint
11:02:49Zevvc'mnon. the bad parts
11:02:53ZevvC has *so* many bad parts
11:03:37Zevvwhy are we here then
11:04:20clyybberI mean, C fits its usecase. As you said it doesn't want to be safe or anything. And I like its minimalism
11:04:37clyybberBut the typedef thing is neither minimalist nor does it have much reason to exist
11:04:38Zevvoh, I absolutelely love it, still
11:05:29Zevvbut really, do some serious text processing in C and you know
11:05:53clyybberok, yeah. Thats another part, but arguably its not strictly part of the language
11:08:27clyybberand with -fpascal-strings its actually not too annoying to use pascal strings instead
11:09:02clyybberthough I think only gcc or maybe clang too has that option /shrug
11:19:20*xet7 joined #nim
11:28:19*xet7 quit (Quit: Leaving)
11:33:16*xet7 joined #nim
11:33:59*letto quit (Quit: Konversation terminated!)
11:38:59*letto joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:34FromDiscord<XxDiCaprioxX> How do I parse part of a String?
12:06:37*supakeen joined #nim
12:06:53FromDiscord<exelotl> clybber: Wow I never knew about that... But they're lame old school style pascal strings, where the length is limited to 256 chars :(
12:06:56FromDiscord<XxDiCaprioxX> Actually nevermind
12:40:26*Senketsu joined #nim
12:51:34*rockcavera quit (Remote host closed the connection)
13:05:20*Senketsu quit (Quit: WeeChat 2.8)
13:06:25*Senketsu joined #nim
13:14:00*oddp quit (Quit: quit)
13:14:55*Senketsu quit (Ping timeout: 256 seconds)
13:21:46*Senketsu joined #nim
13:35:33jkenI have an object type, and a couple types that extend it, how in nim do I implement this proc? `newObjectType[ChildType]()`?
13:59:26*Vladar quit (Quit: Leaving)
14:02:55*clyybber quit (Quit: WeeChat 2.9)
14:08:56Zevvwho implemented repr for arc again?
14:35:48*Guest77498 quit (Ping timeout: 256 seconds)
14:37:33*dadada joined #nim
14:37:57*dadada is now known as Guest95571
14:42:27*opi joined #nim
14:47:48FromDiscord<Yardanico> @Clyybber mostly
15:17:02*Senketsu quit (Quit: WeeChat 2.8)
15:18:22FromDiscord<lqdev> @Clyybber what does -fpascal-strings do?
15:18:26*Senketsu joined #nim
15:19:37FromDiscord<Yardanico> @lqdev found http://mirror.informatimago.com/next/developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/Pascal-Strings.html
15:20:15FromDiscord<Yardanico> It's mainly for API compat with some libraries
15:20:32FromDiscord<Yardanico> Pascal string is byte(len)+str itself
15:22:23FromDiscord<Clyybber> basically instead of writing "\x05hello" where 5 is the length of the string you just write "\phello" and its gonnq infer it
15:23:44*Senketsu quit (Quit: WeeChat 2.9)
15:26:26*Senketsu joined #nim
15:31:13*arecacea1 quit (Remote host closed the connection)
15:31:36*arecacea1 joined #nim
15:35:39jkenDoes anyone know what this means? type mismatch: got <>
15:35:39jkenbut expected one of:
15:35:39jkenproc (element: UIELement){.closure.}
15:41:04*PMunch joined #nim
15:42:46PMunchHmm, http://ix.io/2tzP
15:46:32FromDiscord<lqdev> jken: it means you're missing a param of type UIELement.
15:46:37*Zevv quit (Quit: Lost terminal)
15:46:51*Zevv joined #nim
15:46:51*Zevv quit (Changing host)
15:46:51*Zevv joined #nim
15:47:32Zevvclyybber: was it ever considered to make repr "pretty", indeting wise, when displaying objects and arrays and such?
15:47:49ZevvI find myself counting brackets and relayouting its output every now and then
15:55:25disruptekfuckin' third-world internet.
15:55:49Zevvthat's what you get, living n your fuckin' third world country
15:55:59Zevvus internet is the laughing stock of dutchies
15:56:30PMunchYeah, it's so bad and somehow also overpriced :P
15:56:59PMunchTBH though at the moment most of the US is in the laughing stock of the world..
15:58:09Zevvexcept for the Freedom of course.
15:58:18disruptekright?
15:58:49disruptekimf did recently post an article about poor industrial development in netherlands.
15:58:49disruptekthe freedom to kill others.
15:59:44Zevvok, enough politics for #nim for today
16:00:16disruptekthe problem in the states is the monopolistic providers and lack of net-neutrality.
16:00:23PMunchAnyone got an idea for what my nimPDF issue might be caused by?
16:00:24disruptekthere aren't enough internet-is-a-utility precedents.
16:00:55ZevvPMunch: what is your nimPDF issue
16:01:05PMunchhttp://ix.io/2tzP
16:02:16Zevvwell, Id strace that I guess, to see what its trying to open
16:02:55Zevvbut give me a few hoursh for the temperatures to drop so I can thing properlyer
16:02:58Zevvthink
16:03:06PMunchGood idea: http://ix.io/2tzT
16:03:21PMunchI'm going to a birthday party in a couple of hours :P
16:03:33Zevv-f
16:03:39PMunchJust move to Norway Zevv, it's nice and warm here today, but not oppressively so
16:04:03*Zevv quit (Quit: Lost terminal)
16:04:20*Zevv joined #nim
16:04:31Zevvcan I have a share of that national fund then?
16:06:13*Senketsu quit (Ping timeout: 264 seconds)
16:06:22PMunchAha, I had to import it as nimPDF/nimPDF
16:06:34PMunchWell, if you become a citizen you can :)
16:07:12*disruptek sighs.
16:07:56*Senketsu joined #nim
16:10:44disruptekit's a bad sign when the <title> of your ISP's home page mispells "wireless".
16:12:11*Senketsu quit (Ping timeout: 240 seconds)
16:13:51*oddp joined #nim
16:13:52PMunchHaha, ouch
16:15:24opidisruptek: maybe you're getting some TESCO VALUE version of wireless, a store brand, probably IrDA or something ;)
16:17:11disruptekit's adsl, nominally, but sometimes i can't even complete dns queries.
16:18:10PMunchHaha "I can't believe it's not internet!" brand internet
16:18:56disruptekwhat's really sad is, i was living up here for a bit a few years ago and i went through the whole song and dance to dump the monopoly and switch to satellite.
16:19:54disruptekthen i was out west and the tenant here couldn't handle the 1.2s delay during phone calls. so they cancelled the service and went back to the monopoly.
16:20:06disrupteknow i have a dish but no transciever.
16:20:11disruptektransceiver, either.
16:24:59Oddmongeri use a lib which wrap to C and make use of ptr for storing result and passing param
16:25:43Oddmongeri have a null assertion raised on a variable i pass (a tuple) so i'd like to provide my own tuple with values carefully chosen
16:26:03Zevvdisruptek: man that sucks
16:26:05Oddmongerthe variable is a tuple, representing a vector
16:26:21Oddmongerso i thought passing like this:
16:26:40Oddmongervar mine:Vector = (1f,1f,1f)
16:26:59Oddmongerand call the function with : cast[Vector](mine)
16:28:46Oddmongerbut compiler kept saying is my variable is of type «Vector» and not «ptr Vector» … ah uhoh, ok
16:29:03disruptekaddr mine
16:29:06Zevvmine.addr?
16:29:10Zevvor that
16:29:11Oddmongerah addr
16:29:18Oddmongeroki
16:29:22Oddmongerthank you
16:29:46disruptekyou don't need the cast.
16:29:49*lritter joined #nim
16:30:01Oddmongertoo much C
16:30:03Zevvaddr takes the address of whatever you put in, but has nothing to do with refs or GC. It's considered "unsafe" as well
16:30:54disruptekZevv: what do i have to do to redefine these cps procs?
16:31:11Zevvi don't know what you mean
16:31:17disruptektyped branch
16:31:27*Vladar joined #nim
16:31:43Zevvand then what
16:31:51disruptektry to run a test.
16:32:17Zevvwhich one
16:32:26disrupteki'm using the taste test.
16:32:39Zevv"cannot open testes"
16:32:40Zevvstill
16:32:50disruptekinstall nimph.
16:33:12ZevvI have
16:33:29disrupteknimph doctor
16:34:12disruptekyou don't use deps at all, ever, huh?
16:34:25Zevvhate'em
16:34:43ZevvI get these pipenv nightmares
16:35:20disruptekfair enough.
16:35:31disruptekif it helps, this is my nim.cfg:
16:35:34disruptekhttp://ix.io/2tA0/cfg
16:35:36Zevvlike now, I get Error: Cannot satisfy the dependency on cligen 1.0.0 and cligen 0.9.41
16:35:54disruptekwho said that?
16:36:05Zevvnimble when trying to update nimph
16:36:11Zevvbecasue my nimp was ancient
16:36:17disruptekno one told you to use nimble.
16:36:26disrupteknimble is for chumps.
16:37:10Zevvdude this is exactly what I mean
16:37:15ZevvI goto my 'nimp' repo
16:37:19Zevvdo a git pull and nimble install
16:37:20ZevvBOOM
16:37:24Zevvthen I think "oh lets look at the readme"
16:37:32*disruptek 🎶 what color is your ecosystem? 🎶
16:37:36Zevvthe readme tells me to do ' nimble install https://github.com/disruptek/nimph'
16:37:44Zevvand it does *boom*
16:37:49Zevv Error: Cannot satisfy the dependency on cligen 1.0.0 and cligen 0.9.41
16:37:51disruptekkeep reading.
16:38:49ZevvI don't want all that
16:38:59Zevvevery two weeks something is broken and I need to do a rm -rf ~/.nimble
16:39:04disruptekuse one of your own tests, then.
16:39:12Zevvno, I want to do what you do
16:39:14Zevvand see what you see
16:39:21Zevvyou know what bootstrap.sh says?
16:39:23Zevv Error: Cannot satisfy the dependency on cligen 1.1.0 and cligen 0.9.41
16:39:27PMunchdisruptek, have you looked into Starlink and such? I think that might be quite disruptive of the shit internet
16:39:38disruptekit might, but it's not here yet.
16:39:45disruptekexcept in the sky, i mean.
16:39:45FromDiscord<dom96> Zevv: Nimble demands sacrifice
16:40:11disruptekZevv: i think i broke the bootstrap because c-blake actually broke cligen 1.0 for nimph.
16:40:15ZevvI don't want sacrificy. If I depend on another package, I just make a copy and put it in my project
16:40:15disruptekamazing, it truly is.
16:40:31ZevvI have no patience with other people
16:40:58disruptekif you really want my setup, i will walk you through it.
16:41:02Zevvok, nevermind
16:41:04ZevvI do tzevv
16:41:06Zevvand I get '/home/ico/external/Nim/lib/system/fatal.nim(49, 5) Error: unhandled exception: /home/ico/sandbox/prjs/cps/cps/environment.nim(482, 3) `not via.isEmpty` [AssertionDefect]'
16:41:46disruptekgood, i get that too.
16:41:57Zevvok. so what was the question again
16:42:24disruptekchange the test to `proc t(): C` -- you must specify the return type at the moment.
16:42:34disruptekthen rerun.
16:42:45disruptekyou'll see that we're creating a bootstrap now.
16:43:05disruptekit's like 54, btw.
16:43:08disruptek^line
16:43:35Zevvyeah so this is the problem
16:43:40Zevvwhat I tried to mention yesteday
16:43:53Zevvif you pass a typed proc through a macro, you can't redefine it
16:44:04disruptekyes. i think it's because we already have the id cached.
16:44:16disruptekbut i tried creating a new node and i get the same error.
16:44:18Zevvyes. I ran into this before, I'm not sure if this is by design, but it probably is
16:44:30disruptekwell, it sucks.
16:44:33Zevvit does.
16:44:43Zevvi found it surprising
16:45:21disrupteki want a second opinion.
16:45:29Zevvwell you need two people for that
16:45:32Zevvbecause I don't have any
16:45:53Zevv@clyybber sounds like the kind of guy who would have an opinion on this
16:47:18disruptekdo a pull.
16:47:30disruptekhere we're creating new head nodes in the tree.
16:47:34disrupteksame problem.
16:47:50Zevvyeah. I hit this a few times in the past
16:48:02disrupteki never have.
16:49:09ZevvDid you ever put procs into a typed macro yet
16:49:21Zevvit's not something a lot of people do I guess
16:49:32disruptekit should be the default.
16:50:17disruptekahh, lambdaLift is doing a copy.
16:50:43disruptekbut it's a copy of our clone. i just don't get this.
16:53:55Zevvmake a tiny thing from scratch and learn how it works
16:54:06Zevvyou can't modify the passed tree, and if you copy stuff it clashes
16:54:16Zevvso all we can do is create something of a totally different name I guess
16:54:33Zevvbut I think I miss something essential
16:54:36disrupteki think it's more likely that the problem is that the signature is the same.
16:54:42disruptekbecause only the return type changes.
16:54:49disruptekbut i'm not satisfied with this.
16:55:06Zevvwhat do you propose
16:57:03*superbia1 joined #nim
16:58:23disruptekthe bootstrap runs the first leg and returns the result.
16:59:14disruptekthen the procdef doesn't change; only the body changes. and we add another proc with a different signature.
16:59:29Zevvooh that is pretty smart
16:59:44*superbia quit (Ping timeout: 256 seconds)
16:59:57ZevvI'd like to know the underlying "why" tho, but I lack insight into the exact stages of the compiler and when "typed" and "untyped" macros come in
17:00:18ZevvI guess "typed" is late enough for other parts to have picked up some of the stuff, so you can't change that anymore
17:00:28disruptekno, that's silly.
17:00:38Zevvis it
17:00:39disruptekthis all has to get reprocessed.
17:00:51Zevvso is this a bug?
17:00:57disrupteki tried changing the symbols to idents and it didn't help.
17:01:06disrupteki had to throw away extra sons to make it parse.
17:01:34disruptekthe deeper i get into macros, the more disappointed i am. araq's holidays cannot end soon enough.
17:02:17disrupteki ready to abandon all compile-time codegen.
17:02:34Zevvand then what
17:02:55disruptekfuck it, we'll do it live; fuck it.
17:03:21disruptekjust nim all the way down.
17:04:41Zevvhttp://ix.io/2tAh/nim
17:07:06disruptekso i had this situation where it was like the input was copied into the output, or, not removed and the output was merely added.
17:07:14disruptekthis was untyped, though.
17:08:27Zevvright
17:10:43disrupteki'll add the first leg and we'll see what that does for us, i guess.
17:10:46Zevvhttps://github.com/nim-lang/Nim/issues/15170
17:10:48disbot redefinition of 'X'; previous declaration here ; snippet at 12https://play.nim-lang.org/#ix=2tAl
17:11:41disruptekyour error message is c+p from the wrong window.
17:11:50disruptekanyway...
17:12:09disruptekwe have to assume that this is solvable.
17:13:49Zevvok, would your original plan work? Reuse that nimnode for the trampoline?
17:15:07disruptekwe'll find out soon.
17:26:59*kungtotte quit (Remote host closed the connection)
17:27:13*opi quit (Ping timeout: 264 seconds)
17:27:43*kungtotte joined #nim
17:51:39*PMunch quit (Quit: leaving)
18:01:33FromDiscord<mattrb> Might be a silly question, but how do I assign values in an array on an object?
18:02:05FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAy
18:02:12FromDiscord<mattrb> I'm seeing↵> Error: 'cartridge.sram[index]' cannot be assigned to
18:03:07Oddmongerwhen you have several functions with the same name in differents modules,is it possible to force the right module to be used ?
18:03:41Oddmongeri know with function signature resolution it should work, but that's not the case, so i want to force the correct module
18:08:10Oddmongerwell i've rechecked the doc, with the qualifier that should do it
18:08:14*waleee-cl joined #nim
18:09:30Oddmongerahah that's ok, i had forgotten to import the module
18:09:38Oddmongersorry for the noise
18:12:07disruptekmattrb: arrays are immutable; use a seq.
18:12:24disruptekZevv: that didn't help.
18:13:07FromDiscord<lqdev> disruptek no
18:13:09disruptekbut i should have known. we cannot mutate anything.
18:13:44FromDiscord<lqdev> @mattrb arrays are mutable, but you need to pass `var Cartridge` to your proc and not just `Cartridge`
18:14:00FromDiscord<mattrb> Ahh, thank you
18:14:06disruptekyes. you can't grow them.
18:14:14disruptektheir size is immutable.
18:14:48FromDiscord<lqdev> but the data stored inside isn't (as long as they're var)
18:14:54disruptekkinda like herpes.
18:15:06disruptekalways a new growth, but old infection.
18:15:19FromDiscord<mattrb> Alright @lqdev, another question for you then :p
18:15:45FromDiscord<lqdev> sure
18:16:12FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAC
18:16:59FromDiscord<lqdev> yup
18:17:09FromDiscord<lqdev> `memory: var Memory`
18:17:17FromDiscord<lqdev> to be exact
18:17:21*kenran joined #nim
18:17:58FromDiscord<mattrb> Cool, thanks 🙂
18:21:28FromDiscord<mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAD
18:25:19FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2tAE
18:25:25FromDiscord<lqdev> and just import nimboy
18:25:50FromDiscord<lqdev> and everything should bind to the nimboy namespace afaik
18:26:00FromDiscord<lqdev> but i'm not so sure about that
18:26:02*lritter quit (Quit: Leaving)
18:26:51*Kaivo joined #nim
18:26:53FromDiscord<lqdev> you can always do `import nimboy/cartridge as nimboy_cartridge` and `export nimboy_cartridge` instead
18:27:08FromDiscord<lqdev> or `export cartridge as nimboy_cartridge`
18:28:38FromDiscord<lqdev> no nvm
18:28:54FromDiscord<lqdev> `export as` doesn't seem to exist
18:29:00FromDiscord<lqdev> or it's not documented
18:29:02FromDiscord<lqdev> lemme check
18:29:41FromDiscord<lqdev> nope, doesn't work
18:29:51FromDiscord<lqdev> so the idiomatic way is `import a as b`
18:30:36FromDiscord<lqdev> or, put your logic in a block. this way you can shadow symbols from the global namespace
18:31:01FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2tAH
18:31:02FromDiscord<lqdev> is valid
18:31:19FromDiscord<lqdev> cc @mattrb
18:35:45FromDiscord<mattrb> Cool, thank you! I'll give both a shot and see what looks cleaner to me 🙂
18:41:09Zevv~what, didnt hje
18:41:09disbotno footnotes for `what,`. 🙁
18:41:13Zevvdidnt help!
18:41:30Zevvso, now what?!
18:41:44Zevvfile an official complaint at the Nim committee I guess
18:49:34*koltrast_ quit (Quit: ZNC - http://znc.in)
18:55:02*koltrast joined #nim
19:13:47Zevvso, my next cps test project will be a bunch of audio sources, sinks and filters that you can tie together to make a synth
19:14:28ZevvCPSynth woohoo
19:28:33FromDiscord<exelotl> Zevv: sounds dope
19:37:11disruptekwhat else?
19:47:24*NimBot joined #nim
19:52:44*Jesin quit (Quit: Leaving)
19:57:53Zevvi dont know, what else?
19:58:22disruptekmangling.
19:59:51Zevvyeah, but I was just thinking ahead
20:00:01Zevvbecause thinking about all these nasty details make me tired and hot
20:00:21disrupteki just washed my house.
20:00:24disrupteki'm hot and wet.
20:00:32Zevvgood job
20:00:54*kenran quit (Quit: leaving)
20:01:14disruptekyou can't make your MRE work somehow?
20:01:52ZevvMRE question mark
20:02:10disruptekminimal reproducing example
20:02:34Zevvthe macro/proc issue you mean
20:02:39disruptekyeah.
20:02:41Zevvhm lemme see
20:03:04disruptekwe don't really want to rename them, because then, uh, the name will be different.
20:03:24Zevvyeah, that would be kind of silly, wouldn't it
20:07:24Zevvthe docs are truly lacking in this respect
20:07:30Zevvsemantics of typed vs untyped
20:07:48*endragor quit (Ping timeout: 256 seconds)
20:08:08Zevv"For typed arguments, the semantic checker runs on the argument and does transformations on it, before it is passed to the macro. Here identifier nodes are resolved as symbols, implicit type conversions are visible in the tree as calls, templates are expanded and probably most importantly, nodes have type information. Typed arguments can have the type typed in the arguments list. But all other types, such as
20:08:14Zevvint, float or MyObjectType are typed arguments as well, and they are passed to the macro as a syntax tree."
20:08:27disrupteklol
20:11:09disrupteki guess we could use a template to overload the syntax inside the cps proc.
20:11:47*Jesin joined #nim
20:12:02*Vladar quit (Quit: Leaving)
20:12:31ZevvI dont understand what makes a 'sym' vs an 'ident'
20:12:33disruptekmaybe a template bootstrap makes more sense.
20:12:45disrupteka sym is a real symbol. the ident is just a name.
20:13:01Zevvyeah ok, but I can't make a second prog with the same name and a different signature
20:13:09Zevvso is the signature already part of the sym?
20:13:17*Trustable joined #nim
20:13:20Zevvunder-the-hood?
20:13:27disruptekcopying syms is tricky, but you should be able to ident($s)
20:13:47disrupteknot the signature, but syms have unique identities.
20:13:48Zevvnah, tried that. `lacks ident`
20:14:19Zevvoh $
20:14:41disruptekthis is why we have to reconstitute our gensym'd field names and stuff.
20:14:46Zevvok, so that can be done indeed.
20:15:51disruptekmy line #688 p.name = ident(p.name.repr) # doesn't work
20:19:18Zevvpff im going to bed and sleep for a few hours and get up at 4.00 i guess
20:19:27disruptekweirdo.
20:19:31Zevvstill 30 C here
20:19:33Zevvno fun
20:19:51disruptekit's like 22:00?
20:20:02Zevvyeah but its not at all cooling down
20:20:08Zevvso i might as well sleep until it does
20:20:21Zevvi tried to move just now
20:20:24Zevvthat was a mistake
20:20:33disrupteki love this little fan i made.
20:20:41Zevvyeah lets move hot wet air
20:20:44Zevvthatll help
20:21:09*Guest95571 quit (Ping timeout: 265 seconds)
20:23:23disruptekthis'll help: https://www.youtube.com/embed/JO0_VlAMpaw
20:24:30Zevvad rush always helps
20:24:33Zevved
20:25:10disrupteki'm half a mile from the nearest neighbor and they still call the cops when i play this shit.
20:27:58Zevvtry "i broke my robot - tomorrow never sleeps"
20:28:37*Zevv quit (Quit: Lost terminal)
20:28:51disruptektomorrow does not exist?
20:28:51*Zevv joined #nim
20:29:23disruptekdo you listen to girl talk?
20:30:00*abm joined #nim
20:30:02ZevvI got two at home, so, yes
20:31:09disruptekhttps://www.youtube.com/watch?v=vU62x2PnSO4
20:31:23disruptekrobot reminds me of girl talk's early "glitch" sound.
20:31:44Zevvah that girl, yeah, i know it but its not in my playlist
20:32:45Zevvah that girl, yeah, i know it but its not in my playlist
20:32:49Zevvok nap time, ill think about the macro thingy. we can create a second proc with a different sig, so we also can accept faith and put this on the todo for when/if we ever move into the compiler
20:33:03disruptekmmmkay
20:33:07disrupteksleep tight, zevv.
20:34:48*abm quit (Client Quit)
21:17:07*xet7 quit (Quit: Leaving)
21:23:21*hnOsmium0001 joined #nim
21:27:06*solitudesf quit (Ping timeout: 260 seconds)
21:33:48FromDiscord<Clyybber> sup
21:34:13FromDiscord<Clyybber> yeah, the redefinition thing I'm actually working on
21:34:26FromDiscord<Clyybber> I have a PR up but its not correct yet
21:34:51disruptekmangling for js is a pita.
21:35:07disruptekthese BModules are pretty divergent.
21:35:12FromDiscord<Clyybber> ./s/mangling for/
21:36:21disruptekthe other problem is the import graph.
21:36:30disruptekit's hard to tease stuff out.
21:39:24jkenAnyone know how to cast a vec3[float32] to a vec4[float64]?
21:39:39disrupteknot with cast.
21:39:44jkenmap?
21:39:52disrupteksure.
21:40:04disruptekcast means, "pretend this blob of memory is this other type of thing"
21:40:59FromDiscord<Recruit_main707> Id use a template to pass the vec4 constructor the current vec3 data
21:53:26*Trustable quit (Remote host closed the connection)
22:21:26*krux02 quit (Remote host closed the connection)
22:26:45FromDiscord<Doof Doof> lazy question, but is there a build command that doesn't generate `.obj` files?
22:28:57FromDiscord<Elegant Beef> uhh, why would nim make model files?
22:32:58FromDiscord<Doof Doof> I'm running this `nim c --cc:vcc --noMain --noLinking`
22:44:40*vicfred quit (Quit: Leaving)
22:46:05disruptekyou want no objects, no link, and no main?
22:46:52disrupteksee `nim --fullhelp`
22:56:11FromDiscord<Yardanico> @Doof Doof how would that work?
22:56:27FromDiscord<Yardanico> Maybe you want something else in reality? Maybe it's just an X Y problem
22:56:35FromDiscord<Yardanico> Can you tell why do you want to do what?
22:56:58FromDiscord<Doof Doof> I'm not trying to compile, just generate c output
22:57:54disruptek-c
23:05:30Yardanico@Doof as disruptek told you, use -c (short for --compileOnly)
23:05:54Yardanicoand you'll probably also want to specify the --nimcache:folder name so the C files will be written to the "folder" folder
23:05:56Yardanicoalso, why do you want that?
23:06:11Yardanicoif you want to make Nim make C output for compilation on another machine, there's --genScript
23:06:35FromDiscord<Doof Doof> I am using it within a larger project that has its own build system
23:07:21Yardanicohrm
23:09:43FromDiscord<Doof Doof> I was messing with compileOnly earlier but it wasn't really doing what I needed. It's a parameter for c, right?
23:10:04FromDiscord<Doof Doof> Ahh, got it working now
23:10:06disruptekyes.
23:10:07FromDiscord<Doof Doof> Thanks!
23:10:21Yardanico"nim c" stands for "nim compile" but also for "nim cbackend"
23:10:28Yardanicosince we have "nim cpp", "nim js"
23:11:08FromDiscord<Doof Doof> I gotcha, yeah this was really all I needed for now! Thanks!
23:14:12*oddp quit (Quit: quit)
23:43:08*dadada joined #nim
23:43:34*dadada is now known as Guest1516
23:45:29*letto quit (Quit: Konversation terminated!)
23:47:14*letto joined #nim
23:52:44*arecacea1 quit (Remote host closed the connection)
23:53:22*arecacea1 joined #nim
23:57:26FromDiscord<Rika> isnt nim cc for c? nim c just means compile where the default is c but if theres a config somewhere that says not to use c it wont, right?
23:58:10YardanicoI don't think there's a config option to change the default backend
23:58:23Yardanicobut yes, "c" is the "default code generator" which is C by default
23:58:29Yardanicobut it can change of course :P
23:58:33Yardanico"cc" is explicitly for the C backend
23:59:09YardanicoI mean changed as in "a change in the compiler"
23:59:11Yardaniconot a change in the config