00:00:42 | * | Jesin joined #nim |
00:01:24 | disruptek | we should achieve parity with closure iterators before we go into the compiler, to give you some idea of expectation. |
00:11:40 | rockcavera | is there any way to compile using -d:gcc8|gcc9|... to switch the compiler folder? |
00:13:22 | rockcavera | forget it, I had already managed to do it, but I didn't realize it. |
00:13:34 | rockcavera | =) |
00:13:54 | * | oddp quit (Ping timeout: 256 seconds) |
00:30:34 | FromDiscord | <MapleSyrup|TagMeIfReply> how's opencv/sdl2 stuff in nim |
00:39:03 | FromDiscord | <Elegant Beef> Sdl2 is used a fairbit by many people |
00:40:09 | FromDiscord | <Elegant Beef> OpenCV seems to have two wrappers both of which are rather old |
00:40:55 | FromDiscord | <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:40 | shashlick | It's c++, better off with c2nim |
01:48:01 | FromDiscord | <Zachary Carter> I'm still debating whether or not to wrap malloc so I can track subsystem memory usage |
01:48:45 | FromDiscord | <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:57 | FromDiscord | <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:50 | shashlick | Why not -d:malloc |
02:15:56 | shashlick | With arc though |
02:16:00 | Yardanico | -d:useMalloc |
02:16:07 | Yardanico | it works with refc too |
02:22:24 | shashlick | what 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:46 | FromDiscord | <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:37 | FromDiscord | <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:06 | shashlick | Why not valgrind and co |
03:46:41 | * | enthus1ast joined #nim |
03:49:19 | FromDiscord | <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:45 | shashlick | okay that's a different story |
03:55:56 | shashlick | i used qcachegrind recently and it was pretty cool |
03:56:02 | shashlick | but 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:44 | FromDiscord | <mattrb> Best way and data type to load an arbitrary length file as bytes? |
04:18:34 | FromDiscord | <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:57 | FromDiscord | <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:32 | shashlick | Str[3 .. ^1] |
04:32:49 | shashlick | Or substr |
04:35:50 | FromDiscord | <Technisha (LGBTQIAP+)> What does `[3 .. ^1]` do? |
04:43:05 | shashlick | Gives you a substring starting at position 4 and ending at the last char |
04:43:19 | shashlick | Slicing |
04:44:24 | FromDiscord | <mattrb> @mattrb Ah, newSeq is my friend |
04:45:11 | FromDiscord | <Technisha (LGBTQIAP+)> Oh thanks! |
05:40:39 | * | arecacea1 quit (Remote host closed the connection) |
05:41:18 | * | arecacea1 joined #nim |
05:48:47 | FromDiscord | <Varriount> shashlick: Why does Nimterop use the command prompt to execute programs on Windows? |
06:03:31 | * | narimiran joined #nim |
06:10:04 | shashlick | Good question, what do you propose |
06:10:36 | shashlick | There'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:12 | FromDiscord | <Varriount> shashlick: what about compiling or requiring a bootstrap program, something that would be cross platform |
07:12:21 | FromDiscord | <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:22 | Zevv | #nim died of a heat wave? |
10:36:17 | * | krux02 joined #nim |
10:36:57 | * | kenran quit (Quit: leaving) |
10:49:07 | voltist | Anybody 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:45 | Zevv | let me ask, why do you *want* to improve your C skills |
10:50:14 | Zevv | because basically, the way it is with all those skills: you grow'em by using them. |
10:50:35 | Zevv | just write stuff in C, or do some work in existing C projects |
10:50:45 | voltist | Partly 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:12 | voltist | Yeah 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:38 | Zevv | I'm not expert, but I think I _am_ a bit of a C veteran. IMHO C is actually pretty small and minimal |
10:51:49 | Zevv | the K&R book is thinner then my pinky and has it all |
10:52:30 | clyybber | what is not small is the parts of the spec that aren't |
10:52:33 | clyybber | :p |
10:52:44 | clyybber | and those are the parts that come to bite you |
10:52:47 | Zevv | what's not specced is UB, clear enough |
10:52:50 | Zevv | just don't go there |
10:52:59 | Zevv | it has no pretentions of being a safe language at all. |
10:53:45 | clyybber | yeah, but like the default int types are not unsafe, but still their size is not strictly defined |
10:53:48 | Zevv | but 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:01 | clyybber | yeah |
10:54:10 | Zevv | I came from the downside up. I did asm before I did C, so then everyting makes perfect sense |
10:54:11 | clyybber | I like C but only with stdint.h :p |
10:54:48 | Zevv | anyway, voltist: if you like to learn from books, read K&R and "deep C secrets" after that |
10:55:20 | voltist | Wow going all the way back |
10:55:23 | voltist | Sounds fun |
10:55:36 | Zevv | C basically has not changed a lot |
10:55:56 | supakeen | Well, C99 added a bunch of stuff I like. |
10:56:05 | Zevv | the "modern" stuff in C is using bools and friendlier struct initialization syntax |
10:56:15 | supakeen | Yea that. |
10:57:00 | voltist | Well, here I go... |
10:57:37 | Zevv | and 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:51 | Zevv | No thank you, no C++ for me, I'm good |
10:57:57 | supakeen | I never went into C++ either. |
10:58:05 | supakeen | It's C/Python/Nim at the moment mostly. |
10:59:10 | * | xet7 quit (Remote host closed the connection) |
11:02:18 | clyybber | The bad parts of C are the typedef scope thing and the number types, but the latter is fixed with stdint |
11:02:49 | Zevv | c'mnon. the bad parts |
11:02:53 | Zevv | C has *so* many bad parts |
11:03:37 | Zevv | why are we here then |
11:04:20 | clyybber | I mean, C fits its usecase. As you said it doesn't want to be safe or anything. And I like its minimalism |
11:04:37 | clyybber | But the typedef thing is neither minimalist nor does it have much reason to exist |
11:04:38 | Zevv | oh, I absolutelely love it, still |
11:05:29 | Zevv | but really, do some serious text processing in C and you know |
11:05:53 | clyybber | ok, yeah. Thats another part, but arguably its not strictly part of the language |
11:08:27 | clyybber | and with -fpascal-strings its actually not too annoying to use pascal strings instead |
11:09:02 | clyybber | though 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:34 | FromDiscord | <XxDiCaprioxX> How do I parse part of a String? |
12:06:37 | * | supakeen joined #nim |
12:06:53 | FromDiscord | <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:56 | FromDiscord | <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:33 | jken | I 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:56 | Zevv | who 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:48 | FromDiscord | <Yardanico> @Clyybber mostly |
15:17:02 | * | Senketsu quit (Quit: WeeChat 2.8) |
15:18:22 | FromDiscord | <lqdev> @Clyybber what does -fpascal-strings do? |
15:18:26 | * | Senketsu joined #nim |
15:19:37 | FromDiscord | <Yardanico> @lqdev found http://mirror.informatimago.com/next/developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/Pascal-Strings.html |
15:20:15 | FromDiscord | <Yardanico> It's mainly for API compat with some libraries |
15:20:32 | FromDiscord | <Yardanico> Pascal string is byte(len)+str itself |
15:22:23 | FromDiscord | <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:39 | jken | Does anyone know what this means? type mismatch: got <> |
15:35:39 | jken | but expected one of: |
15:35:39 | jken | proc (element: UIELement){.closure.} |
15:41:04 | * | PMunch joined #nim |
15:42:46 | PMunch | Hmm, http://ix.io/2tzP |
15:46:32 | FromDiscord | <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:32 | Zevv | clyybber: was it ever considered to make repr "pretty", indeting wise, when displaying objects and arrays and such? |
15:47:49 | Zevv | I find myself counting brackets and relayouting its output every now and then |
15:55:25 | disruptek | fuckin' third-world internet. |
15:55:49 | Zevv | that's what you get, living n your fuckin' third world country |
15:55:59 | Zevv | us internet is the laughing stock of dutchies |
15:56:30 | PMunch | Yeah, it's so bad and somehow also overpriced :P |
15:56:59 | PMunch | TBH though at the moment most of the US is in the laughing stock of the world.. |
15:58:09 | Zevv | except for the Freedom of course. |
15:58:18 | disruptek | right? |
15:58:49 | disruptek | imf did recently post an article about poor industrial development in netherlands. |
15:58:49 | disruptek | the freedom to kill others. |
15:59:44 | Zevv | ok, enough politics for #nim for today |
16:00:16 | disruptek | the problem in the states is the monopolistic providers and lack of net-neutrality. |
16:00:23 | PMunch | Anyone got an idea for what my nimPDF issue might be caused by? |
16:00:24 | disruptek | there aren't enough internet-is-a-utility precedents. |
16:00:55 | Zevv | PMunch: what is your nimPDF issue |
16:01:05 | PMunch | http://ix.io/2tzP |
16:02:16 | Zevv | well, Id strace that I guess, to see what its trying to open |
16:02:55 | Zevv | but give me a few hoursh for the temperatures to drop so I can thing properlyer |
16:02:58 | Zevv | think |
16:03:06 | PMunch | Good idea: http://ix.io/2tzT |
16:03:21 | PMunch | I'm going to a birthday party in a couple of hours :P |
16:03:33 | Zevv | -f |
16:03:39 | PMunch | Just 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:31 | Zevv | can I have a share of that national fund then? |
16:06:13 | * | Senketsu quit (Ping timeout: 264 seconds) |
16:06:22 | PMunch | Aha, I had to import it as nimPDF/nimPDF |
16:06:34 | PMunch | Well, if you become a citizen you can :) |
16:07:12 | * | disruptek sighs. |
16:07:56 | * | Senketsu joined #nim |
16:10:44 | disruptek | it'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:52 | PMunch | Haha, ouch |
16:15:24 | opi | disruptek: maybe you're getting some TESCO VALUE version of wireless, a store brand, probably IrDA or something ;) |
16:17:11 | disruptek | it's adsl, nominally, but sometimes i can't even complete dns queries. |
16:18:10 | PMunch | Haha "I can't believe it's not internet!" brand internet |
16:18:56 | disruptek | what'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:54 | disruptek | then 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:06 | disruptek | now i have a dish but no transciever. |
16:20:11 | disruptek | transceiver, either. |
16:24:59 | Oddmonger | i use a lib which wrap to C and make use of ptr for storing result and passing param |
16:25:43 | Oddmonger | i 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:03 | Zevv | disruptek: man that sucks |
16:26:05 | Oddmonger | the variable is a tuple, representing a vector |
16:26:21 | Oddmonger | so i thought passing like this: |
16:26:40 | Oddmonger | var mine:Vector = (1f,1f,1f) |
16:26:59 | Oddmonger | and call the function with : cast[Vector](mine) |
16:28:46 | Oddmonger | but compiler kept saying is my variable is of type «Vector» and not «ptr Vector» … ah uhoh, ok |
16:29:03 | disruptek | addr mine |
16:29:06 | Zevv | mine.addr? |
16:29:10 | Zevv | or that |
16:29:11 | Oddmonger | ah addr |
16:29:18 | Oddmonger | oki |
16:29:22 | Oddmonger | thank you |
16:29:46 | disruptek | you don't need the cast. |
16:29:49 | * | lritter joined #nim |
16:30:01 | Oddmonger | too much C |
16:30:03 | Zevv | addr 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:54 | disruptek | Zevv: what do i have to do to redefine these cps procs? |
16:31:11 | Zevv | i don't know what you mean |
16:31:17 | disruptek | typed branch |
16:31:27 | * | Vladar joined #nim |
16:31:43 | Zevv | and then what |
16:31:51 | disruptek | try to run a test. |
16:32:17 | Zevv | which one |
16:32:26 | disruptek | i'm using the taste test. |
16:32:39 | Zevv | "cannot open testes" |
16:32:40 | Zevv | still |
16:32:50 | disruptek | install nimph. |
16:33:12 | Zevv | I have |
16:33:29 | disruptek | nimph doctor |
16:34:12 | disruptek | you don't use deps at all, ever, huh? |
16:34:25 | Zevv | hate'em |
16:34:43 | Zevv | I get these pipenv nightmares |
16:35:20 | disruptek | fair enough. |
16:35:31 | disruptek | if it helps, this is my nim.cfg: |
16:35:34 | disruptek | http://ix.io/2tA0/cfg |
16:35:36 | Zevv | like now, I get Error: Cannot satisfy the dependency on cligen 1.0.0 and cligen 0.9.41 |
16:35:54 | disruptek | who said that? |
16:36:05 | Zevv | nimble when trying to update nimph |
16:36:11 | Zevv | becasue my nimp was ancient |
16:36:17 | disruptek | no one told you to use nimble. |
16:36:26 | disruptek | nimble is for chumps. |
16:37:10 | Zevv | dude this is exactly what I mean |
16:37:15 | Zevv | I goto my 'nimp' repo |
16:37:19 | Zevv | do a git pull and nimble install |
16:37:20 | Zevv | BOOM |
16:37:24 | Zevv | then I think "oh lets look at the readme" |
16:37:32 | * | disruptek 🎶 what color is your ecosystem? 🎶 |
16:37:36 | Zevv | the readme tells me to do ' nimble install https://github.com/disruptek/nimph' |
16:37:44 | Zevv | and it does *boom* |
16:37:49 | Zevv | Error: Cannot satisfy the dependency on cligen 1.0.0 and cligen 0.9.41 |
16:37:51 | disruptek | keep reading. |
16:38:49 | Zevv | I don't want all that |
16:38:59 | Zevv | every two weeks something is broken and I need to do a rm -rf ~/.nimble |
16:39:04 | disruptek | use one of your own tests, then. |
16:39:12 | Zevv | no, I want to do what you do |
16:39:14 | Zevv | and see what you see |
16:39:21 | Zevv | you know what bootstrap.sh says? |
16:39:23 | Zevv | Error: Cannot satisfy the dependency on cligen 1.1.0 and cligen 0.9.41 |
16:39:27 | PMunch | disruptek, have you looked into Starlink and such? I think that might be quite disruptive of the shit internet |
16:39:38 | disruptek | it might, but it's not here yet. |
16:39:45 | disruptek | except in the sky, i mean. |
16:39:45 | FromDiscord | <dom96> Zevv: Nimble demands sacrifice |
16:40:11 | disruptek | Zevv: i think i broke the bootstrap because c-blake actually broke cligen 1.0 for nimph. |
16:40:15 | Zevv | I don't want sacrificy. If I depend on another package, I just make a copy and put it in my project |
16:40:15 | disruptek | amazing, it truly is. |
16:40:31 | Zevv | I have no patience with other people |
16:40:58 | disruptek | if you really want my setup, i will walk you through it. |
16:41:02 | Zevv | ok, nevermind |
16:41:04 | Zevv | I do tzevv |
16:41:06 | Zevv | and 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:46 | disruptek | good, i get that too. |
16:41:57 | Zevv | ok. so what was the question again |
16:42:24 | disruptek | change the test to `proc t(): C` -- you must specify the return type at the moment. |
16:42:34 | disruptek | then rerun. |
16:42:45 | disruptek | you'll see that we're creating a bootstrap now. |
16:43:05 | disruptek | it's like 54, btw. |
16:43:08 | disruptek | ^line |
16:43:35 | Zevv | yeah so this is the problem |
16:43:40 | Zevv | what I tried to mention yesteday |
16:43:53 | Zevv | if you pass a typed proc through a macro, you can't redefine it |
16:44:04 | disruptek | yes. i think it's because we already have the id cached. |
16:44:16 | disruptek | but i tried creating a new node and i get the same error. |
16:44:18 | Zevv | yes. I ran into this before, I'm not sure if this is by design, but it probably is |
16:44:30 | disruptek | well, it sucks. |
16:44:33 | Zevv | it does. |
16:44:43 | Zevv | i found it surprising |
16:45:21 | disruptek | i want a second opinion. |
16:45:29 | Zevv | well you need two people for that |
16:45:32 | Zevv | because I don't have any |
16:45:53 | Zevv | @clyybber sounds like the kind of guy who would have an opinion on this |
16:47:18 | disruptek | do a pull. |
16:47:30 | disruptek | here we're creating new head nodes in the tree. |
16:47:34 | disruptek | same problem. |
16:47:50 | Zevv | yeah. I hit this a few times in the past |
16:48:02 | disruptek | i never have. |
16:49:09 | Zevv | Did you ever put procs into a typed macro yet |
16:49:21 | Zevv | it's not something a lot of people do I guess |
16:49:32 | disruptek | it should be the default. |
16:50:17 | disruptek | ahh, lambdaLift is doing a copy. |
16:50:43 | disruptek | but it's a copy of our clone. i just don't get this. |
16:53:55 | Zevv | make a tiny thing from scratch and learn how it works |
16:54:06 | Zevv | you can't modify the passed tree, and if you copy stuff it clashes |
16:54:16 | Zevv | so all we can do is create something of a totally different name I guess |
16:54:33 | Zevv | but I think I miss something essential |
16:54:36 | disruptek | i think it's more likely that the problem is that the signature is the same. |
16:54:42 | disruptek | because only the return type changes. |
16:54:49 | disruptek | but i'm not satisfied with this. |
16:55:06 | Zevv | what do you propose |
16:57:03 | * | superbia1 joined #nim |
16:58:23 | disruptek | the bootstrap runs the first leg and returns the result. |
16:59:14 | disruptek | then the procdef doesn't change; only the body changes. and we add another proc with a different signature. |
16:59:29 | Zevv | ooh that is pretty smart |
16:59:44 | * | superbia quit (Ping timeout: 256 seconds) |
16:59:57 | Zevv | I'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:18 | Zevv | I 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:28 | disruptek | no, that's silly. |
17:00:38 | Zevv | is it |
17:00:39 | disruptek | this all has to get reprocessed. |
17:00:51 | Zevv | so is this a bug? |
17:00:57 | disruptek | i tried changing the symbols to idents and it didn't help. |
17:01:06 | disruptek | i had to throw away extra sons to make it parse. |
17:01:34 | disruptek | the deeper i get into macros, the more disappointed i am. araq's holidays cannot end soon enough. |
17:02:17 | disruptek | i ready to abandon all compile-time codegen. |
17:02:34 | Zevv | and then what |
17:02:55 | disruptek | fuck it, we'll do it live; fuck it. |
17:03:21 | disruptek | just nim all the way down. |
17:04:41 | Zevv | http://ix.io/2tAh/nim |
17:07:06 | disruptek | so 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:14 | disruptek | this was untyped, though. |
17:08:27 | Zevv | right |
17:10:43 | disruptek | i'll add the first leg and we'll see what that does for us, i guess. |
17:10:46 | Zevv | https://github.com/nim-lang/Nim/issues/15170 |
17:10:48 | disbot | ➥ redefinition of 'X'; previous declaration here ; snippet at 12https://play.nim-lang.org/#ix=2tAl |
17:11:41 | disruptek | your error message is c+p from the wrong window. |
17:11:50 | disruptek | anyway... |
17:12:09 | disruptek | we have to assume that this is solvable. |
17:13:49 | Zevv | ok, would your original plan work? Reuse that nimnode for the trampoline? |
17:15:07 | disruptek | we'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:33 | FromDiscord | <mattrb> Might be a silly question, but how do I assign values in an array on an object? |
18:02:05 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAy |
18:02:12 | FromDiscord | <mattrb> I'm seeing↵> Error: 'cartridge.sram[index]' cannot be assigned to |
18:03:07 | Oddmonger | when you have several functions with the same name in differents modules,is it possible to force the right module to be used ? |
18:03:41 | Oddmonger | i know with function signature resolution it should work, but that's not the case, so i want to force the correct module |
18:08:10 | Oddmonger | well i've rechecked the doc, with the qualifier that should do it |
18:08:14 | * | waleee-cl joined #nim |
18:09:30 | Oddmonger | ahah that's ok, i had forgotten to import the module |
18:09:38 | Oddmonger | sorry for the noise |
18:12:07 | disruptek | mattrb: arrays are immutable; use a seq. |
18:12:24 | disruptek | Zevv: that didn't help. |
18:13:07 | FromDiscord | <lqdev> disruptek no |
18:13:09 | disruptek | but i should have known. we cannot mutate anything. |
18:13:44 | FromDiscord | <lqdev> @mattrb arrays are mutable, but you need to pass `var Cartridge` to your proc and not just `Cartridge` |
18:14:00 | FromDiscord | <mattrb> Ahh, thank you |
18:14:06 | disruptek | yes. you can't grow them. |
18:14:14 | disruptek | their size is immutable. |
18:14:48 | FromDiscord | <lqdev> but the data stored inside isn't (as long as they're var) |
18:14:54 | disruptek | kinda like herpes. |
18:15:06 | disruptek | always a new growth, but old infection. |
18:15:19 | FromDiscord | <mattrb> Alright @lqdev, another question for you then :p |
18:15:45 | FromDiscord | <lqdev> sure |
18:16:12 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAC |
18:16:59 | FromDiscord | <lqdev> yup |
18:17:09 | FromDiscord | <lqdev> `memory: var Memory` |
18:17:17 | FromDiscord | <lqdev> to be exact |
18:17:21 | * | kenran joined #nim |
18:17:58 | FromDiscord | <mattrb> Cool, thanks 🙂 |
18:21:28 | FromDiscord | <mattrb> sent a code paste, see https://play.nim-lang.org/#ix=2tAD |
18:25:19 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2tAE |
18:25:25 | FromDiscord | <lqdev> and just import nimboy |
18:25:50 | FromDiscord | <lqdev> and everything should bind to the nimboy namespace afaik |
18:26:00 | FromDiscord | <lqdev> but i'm not so sure about that |
18:26:02 | * | lritter quit (Quit: Leaving) |
18:26:51 | * | Kaivo joined #nim |
18:26:53 | FromDiscord | <lqdev> you can always do `import nimboy/cartridge as nimboy_cartridge` and `export nimboy_cartridge` instead |
18:27:08 | FromDiscord | <lqdev> or `export cartridge as nimboy_cartridge` |
18:28:38 | FromDiscord | <lqdev> no nvm |
18:28:54 | FromDiscord | <lqdev> `export as` doesn't seem to exist |
18:29:00 | FromDiscord | <lqdev> or it's not documented |
18:29:02 | FromDiscord | <lqdev> lemme check |
18:29:41 | FromDiscord | <lqdev> nope, doesn't work |
18:29:51 | FromDiscord | <lqdev> so the idiomatic way is `import a as b` |
18:30:36 | FromDiscord | <lqdev> or, put your logic in a block. this way you can shadow symbols from the global namespace |
18:31:01 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2tAH |
18:31:02 | FromDiscord | <lqdev> is valid |
18:31:19 | FromDiscord | <lqdev> cc @mattrb |
18:35:45 | FromDiscord | <mattrb> Cool, thank you! I'll give both a shot and see what looks cleaner to me 🙂 |
18:41:09 | Zevv | ~what, didnt hje |
18:41:09 | disbot | no footnotes for `what,`. 🙁 |
18:41:13 | Zevv | didnt help! |
18:41:30 | Zevv | so, now what?! |
18:41:44 | Zevv | file 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:47 | Zevv | so, 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:28 | Zevv | CPSynth woohoo |
19:28:33 | FromDiscord | <exelotl> Zevv: sounds dope |
19:37:11 | disruptek | what else? |
19:47:24 | * | NimBot joined #nim |
19:52:44 | * | Jesin quit (Quit: Leaving) |
19:57:53 | Zevv | i dont know, what else? |
19:58:22 | disruptek | mangling. |
19:59:51 | Zevv | yeah, but I was just thinking ahead |
20:00:01 | Zevv | because thinking about all these nasty details make me tired and hot |
20:00:21 | disruptek | i just washed my house. |
20:00:24 | disruptek | i'm hot and wet. |
20:00:32 | Zevv | good job |
20:00:54 | * | kenran quit (Quit: leaving) |
20:01:14 | disruptek | you can't make your MRE work somehow? |
20:01:52 | Zevv | MRE question mark |
20:02:10 | disruptek | minimal reproducing example |
20:02:34 | Zevv | the macro/proc issue you mean |
20:02:39 | disruptek | yeah. |
20:02:41 | Zevv | hm lemme see |
20:03:04 | disruptek | we don't really want to rename them, because then, uh, the name will be different. |
20:03:24 | Zevv | yeah, that would be kind of silly, wouldn't it |
20:07:24 | Zevv | the docs are truly lacking in this respect |
20:07:30 | Zevv | semantics of typed vs untyped |
20:07:48 | * | endragor quit (Ping timeout: 256 seconds) |
20:08:08 | Zevv | "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:14 | Zevv | int, float or MyObjectType are typed arguments as well, and they are passed to the macro as a syntax tree." |
20:08:27 | disruptek | lol |
20:11:09 | disruptek | i 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:31 | Zevv | I dont understand what makes a 'sym' vs an 'ident' |
20:12:33 | disruptek | maybe a template bootstrap makes more sense. |
20:12:45 | disruptek | a sym is a real symbol. the ident is just a name. |
20:13:01 | Zevv | yeah ok, but I can't make a second prog with the same name and a different signature |
20:13:09 | Zevv | so is the signature already part of the sym? |
20:13:17 | * | Trustable joined #nim |
20:13:20 | Zevv | under-the-hood? |
20:13:27 | disruptek | copying syms is tricky, but you should be able to ident($s) |
20:13:47 | disruptek | not the signature, but syms have unique identities. |
20:13:48 | Zevv | nah, tried that. `lacks ident` |
20:14:19 | Zevv | oh $ |
20:14:41 | disruptek | this is why we have to reconstitute our gensym'd field names and stuff. |
20:14:46 | Zevv | ok, so that can be done indeed. |
20:15:51 | disruptek | my line #688 p.name = ident(p.name.repr) # doesn't work |
20:19:18 | Zevv | pff im going to bed and sleep for a few hours and get up at 4.00 i guess |
20:19:27 | disruptek | weirdo. |
20:19:31 | Zevv | still 30 C here |
20:19:33 | Zevv | no fun |
20:19:51 | disruptek | it's like 22:00? |
20:20:02 | Zevv | yeah but its not at all cooling down |
20:20:08 | Zevv | so i might as well sleep until it does |
20:20:21 | Zevv | i tried to move just now |
20:20:24 | Zevv | that was a mistake |
20:20:33 | disruptek | i love this little fan i made. |
20:20:41 | Zevv | yeah lets move hot wet air |
20:20:44 | Zevv | thatll help |
20:21:09 | * | Guest95571 quit (Ping timeout: 265 seconds) |
20:23:23 | disruptek | this'll help: https://www.youtube.com/embed/JO0_VlAMpaw |
20:24:30 | Zevv | ad rush always helps |
20:24:33 | Zevv | ed |
20:25:10 | disruptek | i'm half a mile from the nearest neighbor and they still call the cops when i play this shit. |
20:27:58 | Zevv | try "i broke my robot - tomorrow never sleeps" |
20:28:37 | * | Zevv quit (Quit: Lost terminal) |
20:28:51 | disruptek | tomorrow does not exist? |
20:28:51 | * | Zevv joined #nim |
20:29:23 | disruptek | do you listen to girl talk? |
20:30:00 | * | abm joined #nim |
20:30:02 | Zevv | I got two at home, so, yes |
20:31:09 | disruptek | https://www.youtube.com/watch?v=vU62x2PnSO4 |
20:31:23 | disruptek | robot reminds me of girl talk's early "glitch" sound. |
20:31:44 | Zevv | ah that girl, yeah, i know it but its not in my playlist |
20:32:45 | Zevv | ah that girl, yeah, i know it but its not in my playlist |
20:32:49 | Zevv | ok 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:03 | disruptek | mmmkay |
20:33:07 | disruptek | sleep 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:48 | FromDiscord | <Clyybber> sup |
21:34:13 | FromDiscord | <Clyybber> yeah, the redefinition thing I'm actually working on |
21:34:26 | FromDiscord | <Clyybber> I have a PR up but its not correct yet |
21:34:51 | disruptek | mangling for js is a pita. |
21:35:07 | disruptek | these BModules are pretty divergent. |
21:35:12 | FromDiscord | <Clyybber> ./s/mangling for/ |
21:36:21 | disruptek | the other problem is the import graph. |
21:36:30 | disruptek | it's hard to tease stuff out. |
21:39:24 | jken | Anyone know how to cast a vec3[float32] to a vec4[float64]? |
21:39:39 | disruptek | not with cast. |
21:39:44 | jken | map? |
21:39:52 | disruptek | sure. |
21:40:04 | disruptek | cast means, "pretend this blob of memory is this other type of thing" |
21:40:59 | FromDiscord | <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:45 | FromDiscord | <Doof Doof> lazy question, but is there a build command that doesn't generate `.obj` files? |
22:28:57 | FromDiscord | <Elegant Beef> uhh, why would nim make model files? |
22:32:58 | FromDiscord | <Doof Doof> I'm running this `nim c --cc:vcc --noMain --noLinking` |
22:44:40 | * | vicfred quit (Quit: Leaving) |
22:46:05 | disruptek | you want no objects, no link, and no main? |
22:46:52 | disruptek | see `nim --fullhelp` |
22:56:11 | FromDiscord | <Yardanico> @Doof Doof how would that work? |
22:56:27 | FromDiscord | <Yardanico> Maybe you want something else in reality? Maybe it's just an X Y problem |
22:56:35 | FromDiscord | <Yardanico> Can you tell why do you want to do what? |
22:56:58 | FromDiscord | <Doof Doof> I'm not trying to compile, just generate c output |
22:57:54 | disruptek | -c |
23:05:30 | Yardanico | @Doof as disruptek told you, use -c (short for --compileOnly) |
23:05:54 | Yardanico | and you'll probably also want to specify the --nimcache:folder name so the C files will be written to the "folder" folder |
23:05:56 | Yardanico | also, why do you want that? |
23:06:11 | Yardanico | if you want to make Nim make C output for compilation on another machine, there's --genScript |
23:06:35 | FromDiscord | <Doof Doof> I am using it within a larger project that has its own build system |
23:07:21 | Yardanico | hrm |
23:09:43 | FromDiscord | <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:04 | FromDiscord | <Doof Doof> Ahh, got it working now |
23:10:06 | disruptek | yes. |
23:10:07 | FromDiscord | <Doof Doof> Thanks! |
23:10:21 | Yardanico | "nim c" stands for "nim compile" but also for "nim cbackend" |
23:10:28 | Yardanico | since we have "nim cpp", "nim js" |
23:11:08 | FromDiscord | <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:26 | FromDiscord | <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:10 | Yardanico | I don't think there's a config option to change the default backend |
23:58:23 | Yardanico | but yes, "c" is the "default code generator" which is C by default |
23:58:29 | Yardanico | but it can change of course :P |
23:58:33 | Yardanico | "cc" is explicitly for the C backend |
23:59:09 | Yardanico | I mean changed as in "a change in the compiler" |
23:59:11 | Yardanico | not a change in the config |