00:00:21 | EXetoC | zoop |
00:11:08 | * | brson quit (Ping timeout: 240 seconds) |
00:18:45 | * | Puffin quit (Ping timeout: 252 seconds) |
00:21:55 | * | Demos joined #nimrod |
00:59:02 | * | q66 quit (Quit: Leaving) |
01:00:41 | * | psquid quit (Remote host closed the connection) |
01:01:24 | * | psquid joined #nimrod |
01:32:24 | * | DAddYE quit (Remote host closed the connection) |
01:36:31 | Varriount | Araq: Could you give me a good use case for the asFunc macro? I'm trying to write a good docstring. |
01:37:28 | Varriount | Skrylar: How are you doing with regards to your dangerous and controversial GUI lib? |
01:38:15 | EXetoC | ctors? |
01:41:07 | * | OrionPK quit (Remote host closed the connection) |
02:31:46 | * | Puffin joined #nimrod |
02:42:26 | Varriount | EXetoC: What? |
02:58:55 | * | Puffin quit (Ping timeout: 240 seconds) |
02:59:02 | fowl | can someone confirm this: https://gist.github.com/fowlmouth/9947534 |
03:05:56 | * | Puffin joined #nimrod |
03:12:36 | * | Puffin quit (Ping timeout: 268 seconds) |
03:16:15 | * | DAddYE joined #nimrod |
03:32:27 | * | OrionPK joined #nimrod |
04:01:30 | * | DAddYE quit (Remote host closed the connection) |
04:02:04 | * | DAddYE joined #nimrod |
04:06:30 | * | DAddYE quit (Ping timeout: 255 seconds) |
04:24:47 | * | Puffin joined #nimrod |
04:39:54 | * | Puffin quit (Ping timeout: 240 seconds) |
04:52:41 | * | Puffin joined #nimrod |
05:18:08 | * | Puffin quit (Ping timeout: 240 seconds) |
05:45:24 | * | Puffin joined #nimrod |
05:49:25 | * | DAddYE joined #nimrod |
05:54:38 | * | Puffin quit (Ping timeout: 240 seconds) |
06:04:15 | * | Demos quit (Read error: Connection reset by peer) |
06:30:50 | * | Puffin joined #nimrod |
06:36:08 | * | Puffin quit (Ping timeout: 240 seconds) |
06:58:38 | * | DAddYE quit (Ping timeout: 240 seconds) |
07:03:54 | * | Araq quit (Ping timeout: 255 seconds) |
07:03:54 | * | Amrykid quit (Ping timeout: 255 seconds) |
07:04:12 | NimBot | Araq/Nimrod devel cc37fbd Araq [+1 ±2 -0]: fixes yet another option type |
07:04:24 | * | Araq_bnc joined #nimrod |
07:05:22 | * | Araq_bnc is now known as Araq |
07:06:24 | * | Amrykid joined #nimrod |
07:17:03 | * | runvnc joined #nimrod |
07:17:59 | runvnc | I don't know if anyone is here but |
07:18:16 | runvnc | I can't figure out how to convert a sequence into a varargs to make a call |
07:18:30 | runvnc | like I am passing in a sequence, but this function takes a varargs |
07:19:27 | * | IrvMG joined #nimrod |
07:19:59 | * | isenmann quit (Ping timeout: 252 seconds) |
07:20:43 | Araq | runvnc: varargs is quite the same as 'openarray' and you can simply pass a 'seq' to an openarray |
07:20:50 | Araq | you need to be more specific |
07:21:11 | runvnc | ok maybe I can just pass the seq then wow |
07:21:19 | runvnc | I am trying to call redis.sInter |
07:21:35 | runvnc | the function I am calling it from has a sequence passed in |
07:21:56 | Araq | we're using redit in production fyi, so this is supposed to be stable ;-) |
07:21:56 | runvnc | which I need to pull apart and then somehow call sInter seq[0], seq[1] |
07:22:04 | runvnc | maybe it was too obvious |
07:22:10 | Araq | *redis lol |
07:22:11 | runvnc | just pass the sequence let me try that sorry |
07:22:26 | Araq | no worries |
07:31:29 | * | Puffin joined #nimrod |
07:36:25 | * | Puffin quit (Ping timeout: 240 seconds) |
08:08:17 | * | IrvMG left #nimrod (#nimrod) |
08:09:52 | * | nande quit (Remote host closed the connection) |
08:43:52 | * | isenmann joined #nimrod |
08:57:55 | * | gXen joined #nimrod |
08:58:17 | * | gXen left #nimrod (#nimrod) |
09:00:26 | * | renesac quit (Ping timeout: 255 seconds) |
09:13:11 | * | renesac joined #nimrod |
09:25:08 | * | Puffin joined #nimrod |
09:33:14 | * | Puffin quit (Ping timeout: 240 seconds) |
09:44:48 | * | Kooda quit (Quit: leaving) |
09:52:11 | * | io2 joined #nimrod |
10:01:50 | * | Trimsty joined #nimrod |
10:07:38 | * | runvnc quit (Ping timeout: 240 seconds) |
10:08:03 | * | Trimsty quit (Quit: Trimsty) |
10:09:25 | * | runvnc joined #nimrod |
10:18:34 | * | runvnc quit (Ping timeout: 240 seconds) |
10:50:36 | * | eigenlicht quit (Write error: Broken pipe) |
10:52:19 | * | eigenlicht joined #nimrod |
11:17:25 | * | faassen joined #nimrod |
11:29:53 | EXetoC | woot |
11:48:40 | Araq | EXetoC: fix the test cases you broke please |
12:12:54 | EXetoC | Araq: trying to figure out which ones |
12:14:16 | EXetoC | Araq: this is the only one I'm aware of tdrdobbs_examples.nim |
12:25:26 | * | CarpNet quit (Quit: Leaving) |
12:43:38 | * | askatasuna joined #nimrod |
13:12:26 | EXetoC | it did fail on linux, and then I modified it but then it failed on windows instead. what are the other tests? |
13:22:05 | Araq | EXetoC: I looked at it again, and I think I misread. so it's only the drdobbs test that is weird |
13:23:08 | * | Puffin joined #nimrod |
13:24:28 | EXetoC | Araq: ok |
13:24:46 | EXetoC | I'm only slightly less lost compared to when I first hacked the compiler. https://gist.github.com/EXetoC/f4e20d537cec55b84b65 |
13:25:58 | EXetoC | failedAssertImpl triggers this. replacing assert with an explicit throw works |
13:26:02 | * | [1]Endy joined #nimrod |
13:32:53 | * | Puffin quit (Quit: WeeChat 0.4.3) |
13:34:44 | EXetoC | This is after I omit "tos.popSafePoint()" from opcFinally, which causes a segfault in system.pop |
13:37:52 | Araq | does it pop in opcFinallyEnd? |
13:40:01 | * | darkf quit (Quit: Leaving) |
13:54:52 | EXetoC | Araq: no, and that proc is only invoked when raising directly in that snippet |
13:55:50 | Araq | well somehow you need to push and pop safepoints |
13:56:10 | Araq | and you need to pop them in *any* case after the finally |
14:15:37 | * | rta quit (Ping timeout: 240 seconds) |
14:15:40 | EXetoC | so it fails in ensureKind because regs.len == 3, and regs[ra] tries to access the fourth element |
14:16:14 | EXetoC | I'll get back to this later. do I need to do more detailed debugging? if so, how |
14:26:22 | EXetoC | I'll have to try that debugger. hopefully it works |
14:31:54 | * | rta joined #nimrod |
14:47:19 | * | rta quit (Ping timeout: 264 seconds) |
15:08:14 | * | rta joined #nimrod |
15:09:55 | * | Demos joined #nimrod |
15:33:19 | * | faassen quit (Quit: Leaving.) |
15:33:42 | * | [2]Endy joined #nimrod |
15:37:15 | * | [1]Endy quit (Ping timeout: 255 seconds) |
16:22:43 | * | ics quit (Ping timeout: 264 seconds) |
16:24:55 | * | ics joined #nimrod |
16:38:07 | dom96 | hi |
16:40:38 | * | ics quit (Ping timeout: 240 seconds) |
16:41:38 | * | fowl quit (Ping timeout: 240 seconds) |
16:43:24 | * | ics joined #nimrod |
16:45:41 | * | irvmg joined #nimrod |
16:47:23 | * | irvmg quit (Remote host closed the connection) |
16:47:32 | Skrylar | hi dom96 |
16:47:46 | dom96 | hey Skrylar |
16:47:55 | dom96 | what's new? |
16:49:15 | * | ics quit (Ping timeout: 255 seconds) |
16:49:18 | Skrylar | somehow my todo list has gotten filled up with a remarkable amount of non-nimrod entries :| |
16:51:22 | * | ics joined #nimrod |
16:52:19 | Skrylar | dom96: also trying to figure out how to deal with the idea of the scene graph for 2D GUIs |
16:52:50 | Skrylar | the normaly way is to just use backrefs (route the child->parent through a weak pointer); might be able to wrangle it so there isn't a backref, but that gets finangly |
16:52:53 | dom96 | You should make the nimrod entries your priority :P |
16:54:29 | Skrylar | dom96: I had a todo entry for making a state machine generator out of macros, but i'm not sure how to make sure errors are propagated correctly :P |
16:56:03 | dom96 | Did you ask Araq about it? |
16:56:10 | Skrylar | i haven't yet |
16:56:32 | Skrylar | line numbers come out weird when they're statements shoved in to a macro |
16:57:02 | dom96 | That's likely due to a bug. |
16:57:22 | Skrylar | its caused by the compiler reporting error locations in the AST produced by the macro and not the original statement |
16:57:29 | * | q66 joined #nimrod |
16:59:12 | * | fowl joined #nimrod |
17:00:31 | * | DAddYE joined #nimrod |
17:05:11 | * | q66 quit (Ping timeout: 252 seconds) |
17:07:04 | * | q66 joined #nimrod |
17:07:04 | * | q66 quit (Changing host) |
17:07:04 | * | q66 joined #nimrod |
17:17:59 | Skrylar | dom96: also, summarizing a 75-page document is no fun |
17:18:16 | dom96 | what's the document about? |
17:20:19 | * | runvnc joined #nimrod |
17:20:48 | Varriount | Skrylar: Sounds like you're running into the same problem I am. |
17:21:54 | Varriount | Using macros.error (or throwing an error in a macro) leads to a stack trace to the macro, not to the node that is erroneus |
17:22:17 | dom96 | damn, this could be problematic. |
17:22:28 | dom96 | Just realised that MSG_PEEK is not supported on overlapped sockets. |
17:22:48 | Varriount | dom96: Why? How is it problematic? |
17:22:58 | dom96 | recvLine requires it currently |
17:23:04 | Varriount | (And how does python's asyncio module deal with it) |
17:23:29 | dom96 | good question |
17:25:27 | Skrylar | dom96: its a 600 page rulebook for a tabletop; most of it is reference material, but 75-200 of it are actually important :/ |
17:26:03 | Skrylar | combing through the starter section and re-outlining it so the players can actually read it without dying took up a good amount of time. lol |
17:26:04 | dom96 | Varriount: Python doesn't allow you to pass any flags to recv. |
17:27:27 | dom96 | I didn't get any errors when using MSG_PEEK with overlapped sockets though. |
17:28:06 | dom96 | I can see why they do not support it though. |
17:29:53 | Demos | I hate how all the tutorials and tools for OpenGL assume the same conventions as old FixedFunction. Causes some pain |
17:32:22 | Varriount | Demos: Huh? |
17:32:35 | Varriount | You mean, the fixed function pipeline? |
17:32:47 | Demos | yeah |
17:36:25 | dom96 | What should I call the recv proc which reads ALL the data that is requested, even if it's not all immediatelly available? |
17:36:40 | dom96 | recvAll? recvFull? |
17:37:29 | dom96 | hrm, maybe I shouldn't provide such a proc. |
17:38:14 | dom96 | There is no way to guarantee that all the data requested is read so you will still need to check the data length. |
17:39:49 | dom96 | Better to delegate it to the protocol code. |
17:47:10 | * | nande joined #nimrod |
17:48:56 | * | oal joined #nimrod |
17:55:34 | * | brson joined #nimrod |
17:59:46 | Araq | EXetoC: you know about "koch temp", right? |
18:00:30 | EXetoC | Araq: yes I have a temp debug build |
18:01:47 | Araq | so which instructions accesses a nonexisting register? |
18:13:40 | * | BitPuffin joined #nimrod |
18:13:48 | EXetoC | Araq: opcLdImmInt; the assignment in that snippet. ensureKind gets called through decodeBx. regs.len is 3 and 'ra' is 4 here: "if regs[ra].kind != k:" |
18:14:14 | BitPuffin | dom96: diddely dudely |
18:14:26 | BitPuffin | Araq: I used your trick when recording system shock 2 footage today |
18:15:14 | Araq | BitPuffin: well it is cheating. he makes use of a bug that grants him invulnerability |
18:15:30 | Araq | didn't know this when I posted it :P |
18:21:42 | Araq | EXetoC: this bug makes no sense ... |
18:22:27 | Araq | I think the call already returned and then it is executing the 'except' or something |
18:22:46 | Araq | the original stack frame surely has enough registers allocated? |
18:22:46 | EXetoC | oops, messed up my undo stack. well, I'll start over and try to validate what I just said |
18:23:18 | Araq | do you understand the basic ideas behind the exception handling code? |
18:26:27 | BitPuffin | Araq: what? I meant pressing U |
18:26:29 | BitPuffin | lol |
18:26:35 | EXetoC | not down to the lowest level. I've barely written any asm code |
18:26:40 | Araq | BitPuffin: ah I see lol |
18:26:49 | BitPuffin | Araq: don't think you've told me about the other thing |
18:26:53 | BitPuffin | won't use that though |
18:26:58 | BitPuffin | would make it a lot moar boring |
18:27:08 | BitPuffin | fucking ammo is so scarce :( |
18:27:24 | Araq | EXetoC: well a real assembler has no 'try except finally' opcode :P |
18:27:50 | Araq | BitPuffin: I usually specialize in melee |
18:28:22 | dom96 | My god. There are so many edge cases with async sockets. |
18:28:23 | EXetoC | I know that, but you need to set up some pointers |
18:28:27 | dom96 | hey BitPuffin |
18:28:49 | BitPuffin | dom96: yu hef to liek and subscribe to ma nuu vid |
18:28:57 | dom96 | BitPuffin: link |
18:29:20 | BitPuffin | dom96: http://youtu.be/2Lv7ashjkWM |
18:29:25 | BitPuffin | well |
18:29:30 | BitPuffin | guess you didn't want any spoilas |
18:29:34 | BitPuffin | so you don't have to watch |
18:29:38 | BitPuffin | but like all the videos xD |
18:29:48 | EXetoC | Araq: I might have to start with the very basics and then inspect the state in order to have a clue what's going on |
18:29:52 | dom96 | done |
18:30:01 | * | dom96 should do some lets plays |
18:30:19 | Araq | EXetoC: I'm fixing other things but I can help you later |
18:30:36 | BitPuffin | dom96: \o/ |
18:32:15 | dom96 | dem monkeys |
18:32:53 | BitPuffin | dem gad dämn monkeys |
18:35:01 | Araq | lol "I scream, fight donkey kong, and find Jesus!" |
18:35:38 | BitPuffin | true story |
18:36:08 | EXetoC | Araq: do you usually dump anything other than the code? |
18:38:27 | BitPuffin | Araq: how long is this game btw, feels like it's quite long |
18:38:50 | * | runvnc quit (Ping timeout: 268 seconds) |
18:39:07 | dom96 | I'm pretty sure repr outputs too many newlines |
18:40:48 | Araq | dom96: it does but apparently it a feature |
18:41:03 | Araq | should we get rid of the newline? |
18:41:27 | dom96 | and when I repr a string which is basically \L I get an extra "" in the next line |
18:41:30 | dom96 | yes |
18:42:49 | EXetoC | Araq: Might be simpler to start with something like: "static: block: proc p: int = 1; var x = p(); x = p()" -> Error: internal error: (filename: compiler/vmgen.nim, line: 1101) |
18:43:16 | Demos | why are you using repr if you care about newlines? |
18:43:20 | Varriount | Araq: Blackwell Epiphany comes out on the 28th, so expect me to be noneresponsive for like, a week afterward |
18:43:45 | Varriount | I'll probably be in an adventure-game induced coma. |
18:44:13 | Demos | Varriount: apperently Ether One is pretty good. |
18:44:14 | dom96 | Demos: I'm debugging and the extra noise doesn't help |
18:48:27 | EXetoC | dom96: what are you working on? |
18:48:36 | dom96 | async |
18:48:38 | * | BitPuffin quit (Ping timeout: 240 seconds) |
18:48:41 | EXetoC | fun |
18:52:09 | dom96 | Araq: Guess what. |
18:52:47 | EXetoC | You got a fever? and the only prescription is more cowbell? |
18:53:09 | Araq | dom96: you NEED nested closures for it to work |
18:53:31 | dom96 | Araq: Nope! It works!!! |
18:54:25 | Araq | :O :O :DD |
18:54:47 | Araq | well I fixed a lambdalifting bug |
18:54:55 | Araq | but now some tests crash ... :-( |
18:55:35 | dom96 | Once you're done with that please look into the irc.nim problems. |
18:57:12 | * | Demos quit (Read error: Connection reset by peer) |
19:02:08 | EXetoC | Araq: I made a change to that assertion that might or might not be wrong. anyway, I cannot validate the value at compile-time since it's a var, so I need to figure that out next |
19:02:25 | * | BitPuffin joined #nimrod |
19:02:26 | NimBot | Araq/Nimrod devel 7bcf30a Dominik Picheta [+0 ±3 -0]: Async httpclient should now work. Changed recv behaviour.... 5 more lines |
19:02:54 | dom96 | Guys, you should test my new async stuff! |
19:04:27 | EXetoC | and I don't know yet if this is correct: "internalAssert s.position > 0 or (s.position == 0 and s.kind in {skParam,skResult})" -> "... s.kind in skLocalVars" |
19:04:42 | Araq | EXetoC: the assertion is correct |
19:04:55 | Araq | there is a bug because it's recursive I think |
19:05:09 | EXetoC | shotgun debugging never works :< |
19:05:52 | dom96 | Have you tried Uzi debugging? |
19:05:59 | dom96 | :P |
19:07:36 | reactormonk | dom96, the only article that shows up when asking wikipedia for 'uzi debugging' is Serious Sam II |
19:08:14 | dom96 | Yeah, I just coined this term. |
19:09:22 | EXetoC | that game is hard because you can't just hold mouse1; you have to move around as well |
19:10:51 | reactormonk | dom96, maybe you weren't the first. |
19:16:51 | * | brson quit (Ping timeout: 255 seconds) |
19:26:19 | * | foodoo joined #nimrod |
19:27:57 | EXetoC | dom96: I might use async, for... something |
19:28:59 | EXetoC | did you update httpclient? |
19:29:07 | Araq | yes he did |
19:30:01 | Araq | BitPuffin: there are 10 levels iirc and you are still in level 1. average playing time is 12 hours |
19:30:25 | Araq | but since you play on hard, it should take you longer |
19:41:55 | Araq | BitPuffin: dude, you don't need to carry 3 monkey brains, 1 is enough |
19:45:04 | dom96 | EXetoC: test it please |
19:47:34 | dom96 | There is still no SSL/buffered sockets support |
19:54:28 | Araq | Varriount: every proc in strutils should take a 'result: var string' and be 'asFunc'... |
20:03:55 | * | brson joined #nimrod |
20:04:34 | reactormonk | Araq, asFunc ? |
20:04:50 | reactormonk | ah, noSideEffect basically |
20:04:58 | Araq | no |
20:05:05 | Araq | read the history |
20:05:06 | reactormonk | ok... |
20:05:22 | Araq | and come up with a better name if you can :P |
20:05:38 | Varriount | Araq: This will mean that some arguments will have to be renamed. |
20:07:27 | reactormonk | Araq, I'd just generate an overload, but I assume that's what you're doing anyway |
20:07:40 | Varriount | reactormonk: It generates an overload behind the scenes |
20:08:29 | Varriount | reactormonk: https://gist.github.com/Varriount/9961883 |
20:09:35 | EXetoC | Araq: isn't this like your syntactic rewrite? but with overloads, which seems a little more wasteful |
20:10:03 | Varriount | "Syntactic rewrite"? |
20:10:12 | Araq | well it means we don't have yet another special rule in overloading resolution |
20:10:25 | Araq | so I wanted to implement it as a macro too |
20:10:58 | Araq | EXetoC: Varriount implemented it just like I imagined |
20:12:44 | Varriount | Araq: Where should I put the asFunc macro's implementation? |
20:13:18 | Araq | Varriount: we need stdmacros.nim or something like that |
20:13:21 | EXetoC | Varriount: YES, RATHER THAN GENERATING AN OVERLOAD |
20:13:26 | EXetoC | oops |
20:13:34 | Varriount | ._. |
20:13:41 | EXetoC | but if that doesn't matter then nvm |
20:15:32 | * | foodoo quit (Remote host closed the connection) |
20:15:52 | Varriount | Araq: Do you want me to omit the 's' in stdmacros, to maintain DOS compatibility? |
20:16:01 | Araq | XD |
20:16:33 | Araq | that was a good one |
20:16:53 | Varriount | I was under the presumption that the reason many of the modules in the stdlib were named so oddly was to be compliant with the 8.3 names. |
20:17:09 | Varriount | *8.3 naming limit |
20:17:15 | Araq | that is ineed the reason lol |
20:17:34 | Araq | but now it's safe to assume nobody is left who cares about DOS support |
20:18:19 | EXetoC | :o |
20:18:33 | Varriount | Fun fact: Windows still has 8.3 compatibility in some of its file system apis |
20:19:51 | Araq | however it was always done with a wink |
20:21:34 | Araq | (people use autoconf that checks for a working memcpy implementation. we take care our filenames are valid DOS filenames.) |
20:23:52 | Varriount | Araq: Should anything be changed or added to the asFunc implementation? |
20:24:08 | Araq | most likely |
20:24:47 | fowl | er |
20:25:13 | Araq | "calls the original procedure with a nil variable value." |
20:25:32 | Araq | no you need to use default(T) which doesn't exist |
20:25:50 | Araq | but it should produce @[] or "" for seqs/strings |
20:26:02 | Varriount | I'll add checks for those then. |
20:26:14 | Araq | hmm ok |
20:26:18 | fowl | #1063 only happens when the compiler is built with -d:debug |
20:26:48 | Araq | fowl: quite likely. release mode overflows instead |
20:27:21 | Araq | that doesn't mean it produces correct code |
20:27:47 | fowl | i have another weird bug that i cant figure out because of this one |
20:28:12 | * | Demos joined #nimrod |
20:28:43 | Demos | I think I just spent 4 hours debugging an issue where I misplaced a pair of parens. I should turn on sane spaces |
20:29:45 | Araq | Demos: most interesting |
20:30:02 | Araq | what is the code like? |
20:30:13 | * | Mat3 joined #nimrod |
20:30:17 | Mat3 | hello |
20:30:29 | Araq | it might also mean the type system should have caught this somehow |
20:30:46 | Araq | hi Mat3. still in china? |
20:31:40 | Demos | something like win.x = (win.x - (view.x / view.w)) should have been win.x = (win.x - view.x)/(view.w) |
20:32:04 | Mat3 | Araq: No |
20:32:11 | Mat3 | hi Araq and Demos |
20:32:15 | Demos | it was just hard to debug since I had to verify that all the other transforms were working correctly |
20:32:19 | Araq | fowl: in other words the bug is blocking you. let me have a look |
20:34:42 | fowl | yea |
20:34:55 | fowl | compiler segfault |
20:35:12 | Mat3 | hi fowl |
20:35:17 | fowl | hello |
20:39:39 | Araq | \.babel\pkgs\allegro5-1.0\al.nim(512, 44) Error: undeclared identifier: 'HWND' |
20:39:41 | Araq | gah |
20:41:02 | Mat3 | it seems, a hidden 64 bit mode exis (like real mode, only with register extensions and non paged, flat address space and no protection checks) |
20:41:16 | Mat3 | ^exist for AMD64 |
20:42:18 | Araq | dom96: httpclient still works for me :-) |
20:42:34 | * | Mat3 found this interesting |
20:42:37 | NimBot | Araq/Nimrod devel 214020a Araq [+0 ±2 -0]: gensym'ed symbols work with lambda-lifting; closures produce objects instead of tuples for easier debugging |
20:42:37 | NimBot | Araq/Nimrod devel 86e02cc Araq [+0 ±3 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
20:42:50 | BitPuffin | Araq: what do I even need the fucking monkey brains for |
20:42:54 | BitPuffin | I don't even know how to research |
20:42:59 | BitPuffin | think I need to level up research |
20:43:07 | Araq | yeah you should. it's quite handy |
20:43:17 | BitPuffin | what I dislike about ss2 is that stealth is not an option |
20:43:22 | Araq | and the basic level suffices for a long time |
20:45:43 | dom96 | Araq: good |
20:48:06 | BitPuffin | Araq: well what is it for? |
20:48:38 | Araq | BitPuffin: #nimrod-offtopic |
20:48:45 | EXetoC | monkey brains? can't wait to try this game |
20:54:08 | Mat3 | sounds crazy |
21:01:32 | * | Matt_ joined #nimrod |
21:01:38 | fowl | Araq, are you on windows? |
21:01:56 | * | Matt_ is now known as Guest84497 |
21:02:32 | Guest84497 | Hello everyone. Can anybody please provide some very simple code to draw s shape e.g. a circle using the inbuilt graphics library? |
21:02:40 | Guest84497 | *a shape |
21:04:29 | fowl | Guest84497, drawcircle(screen, (100,100), 10, colred.toSdlColor) |
21:06:14 | Guest84497 | Thanks very much fowl. But presumably I would need to import the graphics first etc |
21:07:26 | Guest84497 | I am very new to Nimrod and I am struggling to produce anything for myself from the documentation. The list of standard libraries is really impressive, but I am struggling with the basics |
21:07:37 | * | vendethiel quit (Ping timeout: 240 seconds) |
21:07:50 | * | vendethiel joined #nimrod |
21:08:33 | * | Matthias247 joined #nimrod |
21:08:36 | Demos | yeah documentation is not the greatest. There are some tests and examples at the bottom of graphics.nim (that should probably be changed to show up in the docs |
21:09:24 | fowl | most of the c wrappers arent documented |
21:10:41 | fowl | Guest84497, its a convention to have tests or a demo at the bottom of a library |
21:11:02 | Guest84497 | ok, thanks folks, I will take a look there |
21:11:34 | * | BitPuffin quit (Ping timeout: 240 seconds) |
21:12:30 | * | vendethiel quit (Ping timeout: 255 seconds) |
21:12:38 | * | [2]Endy quit (Ping timeout: 240 seconds) |
21:12:46 | Demos | well for a C wrapper you should use the C documentation. Although some of the wrappers are annoying and change the names of things |
21:13:19 | * | vendethiel joined #nimrod |
21:15:51 | Guest84497 | I am trying the sdl example found in the examples folder of the nimrod folder. (sdlex.nim). It compiles ok, but I get nothing, not even a window |
21:15:58 | Guest84497 | Do I need to install sdl first? |
21:16:21 | Guest84497 | If so, does it matter where I install sdl? |
21:18:33 | dom96 | hey Guest84497 |
21:18:41 | dom96 | What OS are you on? |
21:18:50 | Guest84497 | windows 8, 64 bit |
21:19:06 | dom96 | Do you get any output from the program you're running? |
21:19:25 | Guest84497 | No, nothing at all. But the compile says successful |
21:19:40 | Guest84497 | (you can call me Matt) |
21:21:06 | dom96 | Change your nick to something which isn't taken. So that I can highlight you better :) |
21:21:18 | * | BitPuffin joined #nimrod |
21:21:40 | dom96 | You can do so by typing /nick yourNewNick |
21:22:11 | Guest84497 | better? |
21:22:23 | dom96 | Nothing changed heh |
21:22:26 | BitPuffin | lol |
21:22:31 | * | Guest84497 is now known as Matt808 |
21:22:35 | Matt808 | got it ! |
21:22:37 | BitPuffin | yatamo |
21:22:53 | dom96 | Matt808: Great :) |
21:23:17 | dom96 | That's odd though. Are you running the program inside a command line window? |
21:24:44 | Matt808 | I compile sdlex.nim to an exe. The exe does nothing when clicked. |
21:25:07 | dom96 | Open up cmd.exe |
21:25:17 | dom96 | and execute the exe from there |
21:25:36 | Araq | fowl: yeah, I'm on windows |
21:26:45 | Matt808 | ok, now I get the error could not load sdl.dll. |
21:27:04 | Matt808 | So I guess I need to install that. Sorry, I got the impression it was all included |
21:27:16 | Matt808 | Does it matter where I install SDL? |
21:27:50 | dom96 | no, just make sure it's in your PATH |
21:28:11 | Matt808 | ok thanks, will try that |
21:28:38 | * | Demos quit (Ping timeout: 240 seconds) |
21:28:46 | dom96 | oh and welcome to #nimrod :) |
21:29:34 | * | askatasuna quit (Ping timeout: 240 seconds) |
21:31:39 | Matt808 | Thanks for the welcome ! |
21:32:05 | Mat3 | ciao |
21:32:09 | * | Mat3 quit (Quit: Verlassend) |
21:32:10 | Matt808 | Now I get the error could not load sdl_image.dll |
21:32:33 | * | Demos joined #nimrod |
21:32:33 | Matt808 | But the download from the sdl website only offers a single file .... sdl.dll |
21:33:10 | dom96 | it may be a separate download: https://www.libsdl.org/projects/SDL_image/ |
21:33:56 | Araq | Varriount: please ensure the upcoming windows install includes the SDL and GTK dlls. |
21:34:18 | dom96 | is sdl still in the stdlib? |
21:34:34 | Araq | since it's bloated already thanks to GCC we might as well go for convenience |
21:34:52 | Araq | dom96: I think so, graphics.nim depends on it |
21:35:31 | dom96 | hrm, ok. |
21:38:33 | Varriount | Araq: You'll have to supply them. I can't get 64 bit versions of those DLLs |
21:39:03 | Varriount | At least, I can't get 64 bit versions of the GTK dll, I haven't tried the SDL dll |
21:39:38 | dom96 | I think 32 bit versions are fine on 64 bit. |
21:40:48 | fowl | https://www.libsdl.org/projects/SDL_image/release-1.2.html |
21:41:33 | dom96 | We don't offer a 64bit installer anyway. |
21:41:48 | Araq | dom96: but we will do soon |
21:42:07 | Varriount | dom96: Tsk tsk. Your narrow-mindedness offends me. |
21:43:56 | Araq | we need a "nimrod overmind" distribution that includes nimrod, babel, aporia plus DLLs, all in one easy to install package |
21:44:35 | Araq | if you have ever downloaded mingw you will understand why |
21:45:38 | Varriount | Mingw isn't that hard to install. They even have a package manage gui |
21:45:46 | Araq | ("gcc + make + binutils + bash"? and then unzip it all into the same directory? wtf?) |
21:46:44 | Araq | Varriount: oh yeah. well I remember the old days :P |
21:52:22 | Matt808 | I think I will need to give up on running graphics then |
21:53:21 | Matt808 | I copied sdl.dll and sdl_image.dll into the same folder as graphics.nim , bit it won't compile. Says successful, but no .exe produced |
21:54:05 | EXetoC | that's most likely not in PATH |
21:54:12 | EXetoC | try the project directory |
21:54:17 | dom96 | how are you compiling it? |
21:54:53 | Matt808 | nimrod c sdlex.nim |
21:55:13 | Matt808 | I think it is finding it, because previously it complained that it could not find those dlls |
21:55:27 | dom96 | so there is no sdlex.exe produced? |
21:56:05 | Matt808 | yes |
21:56:09 | fowl | dom96, sdl would compile but not run, he needs to put the dll in PATH or . |
21:56:41 | Matt808 | how do I do that please? |
21:56:51 | Araq | Matt808: what happens when you do: nimrod c -r sdlex.nim |
21:57:06 | fowl | echo %PATH% |
21:57:43 | dom96 | fowl: he's saying it's not producing an exe, so it doesn't seem to be compiling successfully. However you are correct, he needs to put the dlls in his PATH or where the .exe he's executing is. |
21:58:17 | Matt808 | could not import SDL_SetVideoMode |
21:58:29 | Matt808 | Error: execution of an external program failed |
22:00:00 | Matt808 | there are a few nimrod entries in the %PATH% e.g. dist , bin etc |
22:01:43 | dom96 | This is a guess but I think you have SDL 2.0 DLLs, the wrapper wraps 1.2 so you should get that version. |
22:03:34 | Matt808 | I downloaded the version 1 dlls. It now compiles to give an exe. But I get the previous error about SDL_SetVideoMode |
22:04:03 | EXetoC | fowl: importing al is all you did? works for me |
22:04:23 | EXetoC | nvm |
22:04:28 | BitPuffin | wut |
22:04:37 | dom96 | Matt808: You sure it's not still using the old DLLs? |
22:04:48 | BitPuffin | "To ensure that dynamic memory achieves the same performance as global, iterate through the array immediately after allocating the array" |
22:05:03 | BitPuffin | seems unnecessary |
22:05:16 | BitPuffin | (not a nimrod thang, but a programming thang" |
22:05:49 | Matt808 | I only downloaded version 1 dlls. After fowls advice of putting them in the bin folder things started to compile |
22:06:29 | Demos | BitPuffin: sounds like a great way to evict stuff from the cache |
22:06:34 | Demos | where are you reading this? |
22:06:42 | BitPuffin | Demos: optimization book |
22:07:26 | Demos | maybe to get systems like linux to actually give you the memory? is it the black book? |
22:07:26 | BitPuffin | Demos: reason: heap untouched includes data that is slower due to lazy allocation |
22:08:08 | Demos | OK yeah, it is to actually get the memory |
22:08:30 | BitPuffin | Demos: yeah |
22:09:04 | Demos | I was not aware windows did lazy allocation like that. |
22:09:11 | Demos | thought it was a linux thing |
22:09:22 | Demos | but I have never really had to deal with it so... |
22:09:23 | BitPuffin | Demos: it's probably most/all operating systems |
22:09:29 | BitPuffin | well |
22:09:39 | BitPuffin | I guess it's useful knowledge if that's ever the cause of a bottleneck |
22:10:38 | Demos | true. I wonder how good perf is at highlighting stuff like that |
22:10:47 | BitPuffin | Demos: gperf? |
22:10:53 | BitPuffin | oh wait |
22:10:55 | Demos | no perf. gperf sucks |
22:10:59 | BitPuffin | it's called gprof |
22:11:12 | dom96 | Matt808: Where did you get the DLLs? |
22:11:31 | BitPuffin | Demos: ah it's a linux tool |
22:12:19 | Demos | yeah. gprof uses instrmentation (which is pretty inaccurate) perf uses kernel magic to access the hardware profileing stuff on a modern CPU |
22:12:40 | Demos | kinda like vtune. except it does not crash my kernel |
22:13:08 | BitPuffin | lol |
22:13:24 | BitPuffin | so I guess what you do is just run your program like perf ./program |
22:13:32 | BitPuffin | as if you'd do with time |
22:13:34 | BitPuffin | or sudo |
22:14:46 | Demos | something like that. you probably want to tell your compiler to build with optimizations /and/ debug info |
22:14:55 | BitPuffin | yup |
22:15:10 | BitPuffin | you should usually profile your optimized builds |
22:15:22 | BitPuffin | otherwise you might try to fix something which has already been fixed :P |
22:15:37 | Demos | yeah, unless you actually want to fix debug perf, which is reasonable sometimes |
22:15:49 | Matt808 | originally from the sdl website. Then I tried from here: http://www.dll-files.com/dllindex/dll-files.shtml?sdl |
22:15:56 | BitPuffin | sure |
22:16:34 | Matt808 | Dom, are there other (& simple !) ways that I could draw graphics using nimrod, other than sdl ? |
22:17:28 | dom96 | Matt808: That website looks a bit sketchy. But you probably downloaded 1.3, I believe that became 2.0. Try getting 1.2. |
22:18:51 | Demos | run your app from the command line and it will tell you what dll it failed to load |
22:19:30 | dom96 | It's failing to load SDL_SetVideoMode |
22:22:28 | Matt808 | ok Dom, thanks for all your help tonight. It is late here in uk, so I am going to finish for tonight. Will try version 1.2 dlls tomorrow. Again, I appreciate you trying to help me. |
22:25:16 | * | Demos wants to hack something together with staticExec and cmake to deal with this stuff automaticly |
22:26:10 | dom96 | Matt808: No problem. I'm in the UK too. Let us know how it goes tomorrow. |
22:26:27 | Matt808 | OK, i couldn't resist. |
22:26:45 | Matt808 | I tried it and it worked. I think. I get a purple screen - is that meant to happen? |
22:27:17 | dom96 | I think so. |
22:27:39 | dom96 | Try compiling the graphics module |
22:27:45 | dom96 | It's a lot more exciting. |
22:29:43 | Matt808 | OK, will defintely save that one for another night. Thanks again, laters. |
22:32:38 | * | Demos quit (Ping timeout: 240 seconds) |
22:35:15 | * | Matt808 quit (Quit: Page closed) |
22:43:02 | * | BitPuffin quit (Ping timeout: 268 seconds) |
22:46:48 | * | Demos joined #nimrod |
22:48:52 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:52:42 | * | BitPuffin joined #nimrod |
23:01:09 | Araq | fowl: it's your TKeyboardState type |
23:01:26 | Araq | you use /32 instead of div 32 and for some reason nimrod doesn't complain |
23:02:40 | Araq | oh wait you then convert to int ... |
23:03:03 | Araq | so I guess compile time evaluation is still fragile. *sigh* |
23:04:30 | * | xenagi joined #nimrod |
23:09:10 | Araq | good night |
23:24:11 | * | darkf joined #nimrod |
23:34:48 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |