<< 03-04-2014 >>

00:00:21EXetoCzoop
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:31VarriountAraq: Could you give me a good use case for the asFunc macro? I'm trying to write a good docstring.
01:37:28VarriountSkrylar: How are you doing with regards to your dangerous and controversial GUI lib?
01:38:15EXetoCctors?
01:41:07*OrionPK quit (Remote host closed the connection)
02:31:46*Puffin joined #nimrod
02:42:26VarriountEXetoC: What?
02:58:55*Puffin quit (Ping timeout: 240 seconds)
02:59:02fowlcan 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:12NimBotAraq/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:59runvncI don't know if anyone is here but
07:18:16runvncI can't figure out how to convert a sequence into a varargs to make a call
07:18:30runvnclike 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:43Araqrunvnc: varargs is quite the same as 'openarray' and you can simply pass a 'seq' to an openarray
07:20:50Araqyou need to be more specific
07:21:11runvncok maybe I can just pass the seq then wow
07:21:19runvncI am trying to call redis.sInter
07:21:35runvncthe function I am calling it from has a sequence passed in
07:21:56Araqwe're using redit in production fyi, so this is supposed to be stable ;-)
07:21:56runvncwhich I need to pull apart and then somehow call sInter seq[0], seq[1]
07:22:04runvncmaybe it was too obvious
07:22:10Araq*redis lol
07:22:11runvncjust pass the sequence let me try that sorry
07:22:26Araqno 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:53EXetoCwoot
11:48:40AraqEXetoC: fix the test cases you broke please
12:12:54EXetoCAraq: trying to figure out which ones
12:14:16EXetoCAraq: 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:26EXetoCit did fail on linux, and then I modified it but then it failed on windows instead. what are the other tests?
13:22:05AraqEXetoC: 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:28EXetoCAraq: ok
13:24:46EXetoCI'm only slightly less lost compared to when I first hacked the compiler. https://gist.github.com/EXetoC/f4e20d537cec55b84b65
13:25:58EXetoCfailedAssertImpl 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:44EXetoCThis is after I omit "tos.popSafePoint()" from opcFinally, which causes a segfault in system.pop
13:37:52Araqdoes it pop in opcFinallyEnd?
13:40:01*darkf quit (Quit: Leaving)
13:54:52EXetoCAraq: no, and that proc is only invoked when raising directly in that snippet
13:55:50Araqwell somehow you need to push and pop safepoints
13:56:10Araqand you need to pop them in *any* case after the finally
14:15:37*rta quit (Ping timeout: 240 seconds)
14:15:40EXetoCso it fails in ensureKind because regs.len == 3, and regs[ra] tries to access the fourth element
14:16:14EXetoCI'll get back to this later. do I need to do more detailed debugging? if so, how
14:26:22EXetoCI'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:07dom96hi
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:32Skrylarhi dom96
16:47:46dom96hey Skrylar
16:47:55dom96what's new?
16:49:15*ics quit (Ping timeout: 255 seconds)
16:49:18Skrylarsomehow my todo list has gotten filled up with a remarkable amount of non-nimrod entries :|
16:51:22*ics joined #nimrod
16:52:19Skrylardom96: also trying to figure out how to deal with the idea of the scene graph for 2D GUIs
16:52:50Skrylarthe 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:53dom96You should make the nimrod entries your priority :P
16:54:29Skrylardom96: 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:03dom96Did you ask Araq about it?
16:56:10Skrylari haven't yet
16:56:32Skrylarline numbers come out weird when they're statements shoved in to a macro
16:57:02dom96That's likely due to a bug.
16:57:22Skrylarits 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:59Skrylardom96: also, summarizing a 75-page document is no fun
17:18:16dom96what's the document about?
17:20:19*runvnc joined #nimrod
17:20:48VarriountSkrylar: Sounds like you're running into the same problem I am.
17:21:54VarriountUsing 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:17dom96damn, this could be problematic.
17:22:28dom96Just realised that MSG_PEEK is not supported on overlapped sockets.
17:22:48Varriountdom96: Why? How is it problematic?
17:22:58dom96recvLine requires it currently
17:23:04Varriount(And how does python's asyncio module deal with it)
17:23:29dom96good question
17:25:27Skrylardom96: its a 600 page rulebook for a tabletop; most of it is reference material, but 75-200 of it are actually important :/
17:26:03Skrylarcombing 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:04dom96Varriount: Python doesn't allow you to pass any flags to recv.
17:27:27dom96I didn't get any errors when using MSG_PEEK with overlapped sockets though.
17:28:06dom96I can see why they do not support it though.
17:29:53DemosI hate how all the tutorials and tools for OpenGL assume the same conventions as old FixedFunction. Causes some pain
17:32:22VarriountDemos: Huh?
17:32:35VarriountYou mean, the fixed function pipeline?
17:32:47Demosyeah
17:36:25dom96What should I call the recv proc which reads ALL the data that is requested, even if it's not all immediatelly available?
17:36:40dom96recvAll? recvFull?
17:37:29dom96hrm, maybe I shouldn't provide such a proc.
17:38:14dom96There is no way to guarantee that all the data requested is read so you will still need to check the data length.
17:39:49dom96Better 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:46AraqEXetoC: you know about "koch temp", right?
18:00:30EXetoCAraq: yes I have a temp debug build
18:01:47Araqso which instructions accesses a nonexisting register?
18:13:40*BitPuffin joined #nimrod
18:13:48EXetoCAraq: 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:14BitPuffindom96: diddely dudely
18:14:26BitPuffinAraq: I used your trick when recording system shock 2 footage today
18:15:14AraqBitPuffin: well it is cheating. he makes use of a bug that grants him invulnerability
18:15:30Araqdidn't know this when I posted it :P
18:21:42AraqEXetoC: this bug makes no sense ...
18:22:27AraqI think the call already returned and then it is executing the 'except' or something
18:22:46Araqthe original stack frame surely has enough registers allocated?
18:22:46EXetoCoops, messed up my undo stack. well, I'll start over and try to validate what I just said
18:23:18Araqdo you understand the basic ideas behind the exception handling code?
18:26:27BitPuffinAraq: what? I meant pressing U
18:26:29BitPuffinlol
18:26:35EXetoCnot down to the lowest level. I've barely written any asm code
18:26:40AraqBitPuffin: ah I see lol
18:26:49BitPuffinAraq: don't think you've told me about the other thing
18:26:53BitPuffinwon't use that though
18:26:58BitPuffinwould make it a lot moar boring
18:27:08BitPuffinfucking ammo is so scarce :(
18:27:24AraqEXetoC: well a real assembler has no 'try except finally' opcode :P
18:27:50AraqBitPuffin: I usually specialize in melee
18:28:22dom96My god. There are so many edge cases with async sockets.
18:28:23EXetoCI know that, but you need to set up some pointers
18:28:27dom96hey BitPuffin
18:28:49BitPuffindom96: yu hef to liek and subscribe to ma nuu vid
18:28:57dom96BitPuffin: link
18:29:20BitPuffindom96: http://youtu.be/2Lv7ashjkWM
18:29:25BitPuffinwell
18:29:30BitPuffinguess you didn't want any spoilas
18:29:34BitPuffinso you don't have to watch
18:29:38BitPuffinbut like all the videos xD
18:29:48EXetoCAraq: 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:52dom96done
18:30:01*dom96 should do some lets plays
18:30:19AraqEXetoC: I'm fixing other things but I can help you later
18:30:36BitPuffindom96: \o/
18:32:15dom96dem monkeys
18:32:53BitPuffindem gad dämn monkeys
18:35:01Araqlol "I scream, fight donkey kong, and find Jesus!"
18:35:38BitPuffintrue story
18:36:08EXetoCAraq: do you usually dump anything other than the code?
18:38:27BitPuffinAraq: how long is this game btw, feels like it's quite long
18:38:50*runvnc quit (Ping timeout: 268 seconds)
18:39:07dom96I'm pretty sure repr outputs too many newlines
18:40:48Araqdom96: it does but apparently it a feature
18:41:03Araqshould we get rid of the newline?
18:41:27dom96and when I repr a string which is basically \L I get an extra "" in the next line
18:41:30dom96yes
18:42:49EXetoCAraq: 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:16Demoswhy are you using repr if you care about newlines?
18:43:20VarriountAraq: Blackwell Epiphany comes out on the 28th, so expect me to be noneresponsive for like, a week afterward
18:43:45VarriountI'll probably be in an adventure-game induced coma.
18:44:13DemosVarriount: apperently Ether One is pretty good.
18:44:14dom96Demos: I'm debugging and the extra noise doesn't help
18:48:27EXetoCdom96: what are you working on?
18:48:36dom96async
18:48:38*BitPuffin quit (Ping timeout: 240 seconds)
18:48:41EXetoCfun
18:52:09dom96Araq: Guess what.
18:52:47EXetoCYou got a fever? and the only prescription is more cowbell?
18:53:09Araqdom96: you NEED nested closures for it to work
18:53:31dom96Araq: Nope! It works!!!
18:54:25Araq:O :O :DD
18:54:47Araqwell I fixed a lambdalifting bug
18:54:55Araqbut now some tests crash ... :-(
18:55:35dom96Once 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:08EXetoCAraq: 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:26NimBotAraq/Nimrod devel 7bcf30a Dominik Picheta [+0 ±3 -0]: Async httpclient should now work. Changed recv behaviour.... 5 more lines
19:02:54dom96Guys, you should test my new async stuff!
19:04:27EXetoCand 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:42AraqEXetoC: the assertion is correct
19:04:55Araqthere is a bug because it's recursive I think
19:05:09EXetoCshotgun debugging never works :<
19:05:52dom96Have you tried Uzi debugging?
19:05:59dom96:P
19:07:36reactormonkdom96, the only article that shows up when asking wikipedia for 'uzi debugging' is Serious Sam II
19:08:14dom96Yeah, I just coined this term.
19:09:22EXetoCthat game is hard because you can't just hold mouse1; you have to move around as well
19:10:51reactormonkdom96, maybe you weren't the first.
19:16:51*brson quit (Ping timeout: 255 seconds)
19:26:19*foodoo joined #nimrod
19:27:57EXetoCdom96: I might use async, for... something
19:28:59EXetoCdid you update httpclient?
19:29:07Araqyes he did
19:30:01AraqBitPuffin: there are 10 levels iirc and you are still in level 1. average playing time is 12 hours
19:30:25Araqbut since you play on hard, it should take you longer
19:41:55AraqBitPuffin: dude, you don't need to carry 3 monkey brains, 1 is enough
19:45:04dom96EXetoC: test it please
19:47:34dom96There is still no SSL/buffered sockets support
19:54:28AraqVarriount: every proc in strutils should take a 'result: var string' and be 'asFunc'...
20:03:55*brson joined #nimrod
20:04:34reactormonkAraq, asFunc ?
20:04:50reactormonkah, noSideEffect basically
20:04:58Araqno
20:05:05Araqread the history
20:05:06reactormonkok...
20:05:22Araqand come up with a better name if you can :P
20:05:38VarriountAraq: This will mean that some arguments will have to be renamed.
20:07:27reactormonkAraq, I'd just generate an overload, but I assume that's what you're doing anyway
20:07:40Varriountreactormonk: It generates an overload behind the scenes
20:08:29Varriountreactormonk: https://gist.github.com/Varriount/9961883
20:09:35EXetoCAraq: isn't this like your syntactic rewrite? but with overloads, which seems a little more wasteful
20:10:03Varriount"Syntactic rewrite"?
20:10:12Araqwell it means we don't have yet another special rule in overloading resolution
20:10:25Araqso I wanted to implement it as a macro too
20:10:58AraqEXetoC: Varriount implemented it just like I imagined
20:12:44VarriountAraq: Where should I put the asFunc macro's implementation?
20:13:18AraqVarriount: we need stdmacros.nim or something like that
20:13:21EXetoCVarriount: YES, RATHER THAN GENERATING AN OVERLOAD
20:13:26EXetoCoops
20:13:34Varriount._.
20:13:41EXetoCbut if that doesn't matter then nvm
20:15:32*foodoo quit (Remote host closed the connection)
20:15:52VarriountAraq: Do you want me to omit the 's' in stdmacros, to maintain DOS compatibility?
20:16:01AraqXD
20:16:33Araqthat was a good one
20:16:53VarriountI 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:09Varriount*8.3 naming limit
20:17:15Araqthat is ineed the reason lol
20:17:34Araqbut now it's safe to assume nobody is left who cares about DOS support
20:18:19EXetoC:o
20:18:33VarriountFun fact: Windows still has 8.3 compatibility in some of its file system apis
20:19:51Araqhowever it was always done with a wink
20:21:34Araq(people use autoconf that checks for a working memcpy implementation. we take care our filenames are valid DOS filenames.)
20:23:52VarriountAraq: Should anything be changed or added to the asFunc implementation?
20:24:08Araqmost likely
20:24:47fowler
20:25:13Araq"calls the original procedure with a nil variable value."
20:25:32Araqno you need to use default(T) which doesn't exist
20:25:50Araqbut it should produce @[] or "" for seqs/strings
20:26:02VarriountI'll add checks for those then.
20:26:14Araqhmm ok
20:26:18fowl#1063 only happens when the compiler is built with -d:debug
20:26:48Araqfowl: quite likely. release mode overflows instead
20:27:21Araqthat doesn't mean it produces correct code
20:27:47fowli have another weird bug that i cant figure out because of this one
20:28:12*Demos joined #nimrod
20:28:43DemosI think I just spent 4 hours debugging an issue where I misplaced a pair of parens. I should turn on sane spaces
20:29:45AraqDemos: most interesting
20:30:02Araqwhat is the code like?
20:30:13*Mat3 joined #nimrod
20:30:17Mat3hello
20:30:29Araqit might also mean the type system should have caught this somehow
20:30:46Araqhi Mat3. still in china?
20:31:40Demossomething like win.x = (win.x - (view.x / view.w)) should have been win.x = (win.x - view.x)/(view.w)
20:32:04Mat3Araq: No
20:32:11Mat3hi Araq and Demos
20:32:15Demosit was just hard to debug since I had to verify that all the other transforms were working correctly
20:32:19Araqfowl: in other words the bug is blocking you. let me have a look
20:34:42fowlyea
20:34:55fowlcompiler segfault
20:35:12Mat3hi fowl
20:35:17fowlhello
20:39:39Araq\.babel\pkgs\allegro5-1.0\al.nim(512, 44) Error: undeclared identifier: 'HWND'
20:39:41Araqgah
20:41:02Mat3it 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:16Mat3^exist for AMD64
20:42:18Araqdom96: httpclient still works for me :-)
20:42:34*Mat3 found this interesting
20:42:37NimBotAraq/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:37NimBotAraq/Nimrod devel 86e02cc Araq [+0 ±3 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
20:42:50BitPuffinAraq: what do I even need the fucking monkey brains for
20:42:54BitPuffinI don't even know how to research
20:42:59BitPuffinthink I need to level up research
20:43:07Araqyeah you should. it's quite handy
20:43:17BitPuffinwhat I dislike about ss2 is that stealth is not an option
20:43:22Araqand the basic level suffices for a long time
20:45:43dom96Araq: good
20:48:06BitPuffinAraq: well what is it for?
20:48:38AraqBitPuffin: #nimrod-offtopic
20:48:45EXetoCmonkey brains? can't wait to try this game
20:54:08Mat3sounds crazy
21:01:32*Matt_ joined #nimrod
21:01:38fowlAraq, are you on windows?
21:01:56*Matt_ is now known as Guest84497
21:02:32Guest84497Hello everyone. Can anybody please provide some very simple code to draw s shape e.g. a circle using the inbuilt graphics library?
21:02:40Guest84497*a shape
21:04:29fowlGuest84497, drawcircle(screen, (100,100), 10, colred.toSdlColor)
21:06:14Guest84497Thanks very much fowl. But presumably I would need to import the graphics first etc
21:07:26Guest84497I 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:36Demosyeah 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:24fowlmost of the c wrappers arent documented
21:10:41fowlGuest84497, its a convention to have tests or a demo at the bottom of a library
21:11:02Guest84497ok, 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:46Demoswell 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:51Guest84497I 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:58Guest84497Do I need to install sdl first?
21:16:21Guest84497If so, does it matter where I install sdl?
21:18:33dom96hey Guest84497
21:18:41dom96What OS are you on?
21:18:50Guest84497windows 8, 64 bit
21:19:06dom96Do you get any output from the program you're running?
21:19:25Guest84497No, nothing at all. But the compile says successful
21:19:40Guest84497(you can call me Matt)
21:21:06dom96Change your nick to something which isn't taken. So that I can highlight you better :)
21:21:18*BitPuffin joined #nimrod
21:21:40dom96You can do so by typing /nick yourNewNick
21:22:11Guest84497better?
21:22:23dom96Nothing changed heh
21:22:26BitPuffinlol
21:22:31*Guest84497 is now known as Matt808
21:22:35Matt808got it !
21:22:37BitPuffinyatamo
21:22:53dom96Matt808: Great :)
21:23:17dom96That's odd though. Are you running the program inside a command line window?
21:24:44Matt808I compile sdlex.nim to an exe. The exe does nothing when clicked.
21:25:07dom96Open up cmd.exe
21:25:17dom96and execute the exe from there
21:25:36Araqfowl: yeah, I'm on windows
21:26:45Matt808ok, now I get the error could not load sdl.dll.
21:27:04Matt808So I guess I need to install that. Sorry, I got the impression it was all included
21:27:16Matt808Does it matter where I install SDL?
21:27:50dom96no, just make sure it's in your PATH
21:28:11Matt808ok thanks, will try that
21:28:38*Demos quit (Ping timeout: 240 seconds)
21:28:46dom96oh and welcome to #nimrod :)
21:29:34*askatasuna quit (Ping timeout: 240 seconds)
21:31:39Matt808Thanks for the welcome !
21:32:05Mat3ciao
21:32:09*Mat3 quit (Quit: Verlassend)
21:32:10Matt808Now I get the error could not load sdl_image.dll
21:32:33*Demos joined #nimrod
21:32:33Matt808But the download from the sdl website only offers a single file .... sdl.dll
21:33:10dom96it may be a separate download: https://www.libsdl.org/projects/SDL_image/
21:33:56AraqVarriount: please ensure the upcoming windows install includes the SDL and GTK dlls.
21:34:18dom96is sdl still in the stdlib?
21:34:34Araqsince it's bloated already thanks to GCC we might as well go for convenience
21:34:52Araqdom96: I think so, graphics.nim depends on it
21:35:31dom96hrm, ok.
21:38:33VarriountAraq: You'll have to supply them. I can't get 64 bit versions of those DLLs
21:39:03VarriountAt least, I can't get 64 bit versions of the GTK dll, I haven't tried the SDL dll
21:39:38dom96I think 32 bit versions are fine on 64 bit.
21:40:48fowlhttps://www.libsdl.org/projects/SDL_image/release-1.2.html
21:41:33dom96We don't offer a 64bit installer anyway.
21:41:48Araqdom96: but we will do soon
21:42:07Varriountdom96: Tsk tsk. Your narrow-mindedness offends me.
21:43:56Araqwe need a "nimrod overmind" distribution that includes nimrod, babel, aporia plus DLLs, all in one easy to install package
21:44:35Araqif you have ever downloaded mingw you will understand why
21:45:38VarriountMingw isn't that hard to install. They even have a package manage gui
21:45:46Araq("gcc + make + binutils + bash"? and then unzip it all into the same directory? wtf?)
21:46:44AraqVarriount: oh yeah. well I remember the old days :P
21:52:22Matt808I think I will need to give up on running graphics then
21:53:21Matt808I 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:05EXetoCthat's most likely not in PATH
21:54:12EXetoCtry the project directory
21:54:17dom96how are you compiling it?
21:54:53Matt808nimrod c sdlex.nim
21:55:13Matt808I think it is finding it, because previously it complained that it could not find those dlls
21:55:27dom96so there is no sdlex.exe produced?
21:56:05Matt808yes
21:56:09fowldom96, sdl would compile but not run, he needs to put the dll in PATH or .
21:56:41Matt808how do I do that please?
21:56:51AraqMatt808: what happens when you do: nimrod c -r sdlex.nim
21:57:06fowlecho %PATH%
21:57:43dom96fowl: 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:17Matt808could not import SDL_SetVideoMode
21:58:29Matt808Error: execution of an external program failed
22:00:00Matt808there are a few nimrod entries in the %PATH% e.g. dist , bin etc
22:01:43dom96This 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:34Matt808I downloaded the version 1 dlls. It now compiles to give an exe. But I get the previous error about SDL_SetVideoMode
22:04:03EXetoCfowl: importing al is all you did? works for me
22:04:23EXetoCnvm
22:04:28BitPuffinwut
22:04:37dom96Matt808: You sure it's not still using the old DLLs?
22:04:48BitPuffin"To ensure that dynamic memory achieves the same performance as global, iterate through the array immediately after allocating the array"
22:05:03BitPuffinseems unnecessary
22:05:16BitPuffin(not a nimrod thang, but a programming thang"
22:05:49Matt808I only downloaded version 1 dlls. After fowls advice of putting them in the bin folder things started to compile
22:06:29DemosBitPuffin: sounds like a great way to evict stuff from the cache
22:06:34Demoswhere are you reading this?
22:06:42BitPuffinDemos: optimization book
22:07:26Demosmaybe to get systems like linux to actually give you the memory? is it the black book?
22:07:26BitPuffinDemos: reason: heap untouched includes data that is slower due to lazy allocation
22:08:08DemosOK yeah, it is to actually get the memory
22:08:30BitPuffinDemos: yeah
22:09:04DemosI was not aware windows did lazy allocation like that.
22:09:11Demosthought it was a linux thing
22:09:22Demosbut I have never really had to deal with it so...
22:09:23BitPuffinDemos: it's probably most/all operating systems
22:09:29BitPuffinwell
22:09:39BitPuffinI guess it's useful knowledge if that's ever the cause of a bottleneck
22:10:38Demostrue. I wonder how good perf is at highlighting stuff like that
22:10:47BitPuffinDemos: gperf?
22:10:53BitPuffinoh wait
22:10:55Demosno perf. gperf sucks
22:10:59BitPuffinit's called gprof
22:11:12dom96Matt808: Where did you get the DLLs?
22:11:31BitPuffinDemos: ah it's a linux tool
22:12:19Demosyeah. gprof uses instrmentation (which is pretty inaccurate) perf uses kernel magic to access the hardware profileing stuff on a modern CPU
22:12:40Demoskinda like vtune. except it does not crash my kernel
22:13:08BitPuffinlol
22:13:24BitPuffinso I guess what you do is just run your program like perf ./program
22:13:32BitPuffinas if you'd do with time
22:13:34BitPuffinor sudo
22:14:46Demossomething like that. you probably want to tell your compiler to build with optimizations /and/ debug info
22:14:55BitPuffinyup
22:15:10BitPuffinyou should usually profile your optimized builds
22:15:22BitPuffinotherwise you might try to fix something which has already been fixed :P
22:15:37Demosyeah, unless you actually want to fix debug perf, which is reasonable sometimes
22:15:49Matt808originally from the sdl website. Then I tried from here: http://www.dll-files.com/dllindex/dll-files.shtml?sdl
22:15:56BitPuffinsure
22:16:34Matt808Dom, are there other (& simple !) ways that I could draw graphics using nimrod, other than sdl ?
22:17:28dom96Matt808: That website looks a bit sketchy. But you probably downloaded 1.3, I believe that became 2.0. Try getting 1.2.
22:18:51Demosrun your app from the command line and it will tell you what dll it failed to load
22:19:30dom96It's failing to load SDL_SetVideoMode
22:22:28Matt808ok 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:10dom96Matt808: No problem. I'm in the UK too. Let us know how it goes tomorrow.
22:26:27Matt808OK, i couldn't resist.
22:26:45Matt808I tried it and it worked. I think. I get a purple screen - is that meant to happen?
22:27:17dom96I think so.
22:27:39dom96Try compiling the graphics module
22:27:45dom96It's a lot more exciting.
22:29:43Matt808OK, 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:09Araqfowl: it's your TKeyboardState type
23:01:26Araqyou use /32 instead of div 32 and for some reason nimrod doesn't complain
23:02:40Araqoh wait you then convert to int ...
23:03:03Araqso I guess compile time evaluation is still fragile. *sigh*
23:04:30*xenagi joined #nimrod
23:09:10Araqgood night
23:24:11*darkf joined #nimrod
23:34:48*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)