<< 05-04-2014 >>

00:03:45runvncI need to modify a field of an object to add something on to the end of a sequence. Compiler keeps telling me to change everything to a var, I don't think I can do that because it will make the module incompatible with code that used the previous version
00:04:24Varriountrunvnc: Use a 'when' statement?
00:05:01Varriountrunvnc: Also, it would help to see the code, if possible.
00:06:35runvnchttps://gist.github.com/ithkuil/9985486
00:06:44runvncnot sure how to apply the when statement to my situation
00:07:07runvncI am having the trouble with the pushExpect/ multiExpected thing
00:07:12VarriountWhere's the error?
00:07:39runvncpushExpect, parseBulk, parseMultiBulk
00:07:58runvncError: for a 'var' type a variable needs to be passed
00:08:02runvncand I don't want it to be a var really
00:08:12EXetoCyou do if you want mutability
00:08:13runvncbut it won't let me modify r.multiExpected
00:08:31runvncwell, the socket state gets modified, without having the var :P
00:08:43VarriountWell.. you could copy the parameter and store it in a variable.
00:09:08VarriountHow did it work in the previous version?
00:09:21runvncso the previous version doesnt really handle transactions
00:09:40runvncit has multi and exec but gives errors when you try to use them
00:09:53runvncdoesnt have any code for handling the replies that you get in transactions
00:09:58runvncwhich is not actually a lot of more code
00:10:01runvncand I mostly added it
00:10:05runvncbut
00:10:26runvncwhen you get an exec reply, you can have some bulk replies, and some multibulk replies
00:10:33runvncand in order to know what to expect in the exec reply
00:10:37runvncI am trying to use a stack
00:10:49runvncso for example
00:11:00VarriountPersonally, I would just make the break with the old version. If you're really concerned about compatibility, copy the parameter into another variable and see if that works, or use a 'when' statement.
00:11:07runvncif you run red.multi and then two hGetAll commands and then exec
00:11:30runvncthen it needs to look for two multibulk replies
00:11:52runvncor well really a multibulk reply _containing_ two multibulk replies I think
00:11:57runvncok varriount thanks
00:12:18runvnchow would I use when though
00:12:59Varriountwhen defined (MaintainRedisCompatibility): ...
00:13:26runvncok I don't really believe I need to break compatibility
00:13:55VarriountUse the 'copy' suggestion only if you're really desperate - I don't know how well it will work.
00:13:58runvncif this stack thing has an issue then I can probably do it without it by changing parsebulk/parsemultibulk to just look to see if its a bulk or a multi and accept either way
00:14:40Varriountrunvnc: Just in case you didn't already know, passing a 'var' parameter is essentially passing an implicit reference.
00:14:54*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
00:15:37runvncwhy is it ok to modify the socket state
00:15:41runvncwithout the var
00:15:49runvncbut not the state of my sequence field
00:15:52VarriountHm? Where?
00:16:00EXetoCis it a handle?
00:16:14Skrylarback
00:16:16runvncon many functions in this redis think it does a socket readline
00:16:23runvncso that changes the state of the socket input
00:16:24EXetoCit's probably not an object that is modified directly
00:16:42runvnccan I just do that then
00:16:49runvncmake an object that is not modified directly
00:17:19EXetoCwhat I mean is
00:18:03EXetoCA handle might get copied, and then passed to some socket proc, but now there's no connection to the object managing that handle
00:18:16runvncno connection even though it is the same object
00:18:27runvncI mean same socket
00:19:10EXetoC"proc doSomethingWithSocket(handle: int) ... let x = initObject(); doSomethingWithSocket(x.handle)
00:19:23runvncright
00:20:02EXetoChandle isn't modified; it's just being copied, so no 'var' is needed for the actual high level type
00:21:08runvncbut generally the intent of the var checking is so that you can enforce whether the state of the object has been modified or not
00:21:34runvncit just so happens that the implementation uses a socket which happens to use a handle so that constraint isnt applied
00:21:52runvncwhat would happen if I changed all of these redis * functions to be r: var TRedis
00:23:03EXetoCthose procs would now be able to either mutate that object or take the address of it
00:30:58runvncok for a minute I thought that I would not be able to use the object dot calling style anymore, like myredis.get()
00:30:59EXetoCso you'll then be passing a reference. omit 'var' and the compiler might still do that for efficiency reasons, but that's just an implementation detail
00:31:36runvncyou can still use myredis.get() when you are calling get with myredis as a reference (var) right?
00:31:43EXetoCyeah it's still possible. it's not a very restrictive feature
00:32:02runvncok for some reason I thought I couldnt call it that way anymore with vars
00:32:05runvncgreat
00:32:12runvncno problem then
00:34:12runvnclib/pure/redis.nim(191, 9) Error: for a 'var' type a variable needs to be passed
00:34:34runvnchm wait I see sorry
00:35:01runvnchm wait I see sorry
00:35:21*BitPuffin quit (Ping timeout: 252 seconds)
00:44:18runvncthe problem is that this may break applications and modules that use redis. it breaks mine
00:44:36runvncnow I just have a huge chain of adding 'var' all over the place
00:46:44EXetoCyou can make local var copies if you want, as Varriount, but it might get ugly in some cases
00:47:40runvncI will try that
00:49:05EXetoCbut then the values must be actual pointers in order for the original objects to get modified
00:53:21EXetoCthe users will simply have to adapt, unless you somehow realize that there's no need to write to anything
00:54:29runvncI think it might be simpler to just change parseBulk and parseMulti so that having a multibulk where I expect a multibulk is ok. I can just assume its a transaction in that case
00:54:49runvncsorry, having a multibulk where I expect a bulk I meant
01:00:12dom96I guess TRedis should really be PRedis.
01:00:18dom96But it's a bit too late to change now.
01:00:41runvncYeah I dont want to make any major changes like that
01:00:49runvncpretty sure I can just add a few extra lines to parsebulk
01:01:10runvncI was trying to be clever with a stack that knew everything that was expected to come back after exec. dont think I need to do that
01:01:48dom96We can change that during the big prefix removal.
01:02:08runvncoh so the prefix removal is actually happening
01:02:26Skrylarprefix removal yes, case nazism no
01:02:44dom96huh
01:02:44*Demos quit (Quit: leaving)
01:03:05dom96pushExpect wants a var TRedis but it's used in line 101
01:03:15dom96and a non-var TRedis is passed to it
01:03:40runvncI added a ton of vars after I posted that gist
01:03:45runvncI was getting an error obviously
01:03:53dom96oh.
01:03:55runvncthen I realized how much stuff it would make me add var to
01:04:03runvnclike a LOT of places in redis.nim and my modules
01:04:07runvncthen I took them all out
01:04:08dom96Thought I was looking at the actual code in the std lib heh
01:04:24runvncI dont think I need that var or multiexpected sequence at all
01:04:36runvncnot worth it
01:05:20dom96Yeah.
01:08:43dom96good night
01:09:46runvncgood night
01:14:59EXetoCdom96: but, <1.0 :>
01:15:33*DAddYE quit (Remote host closed the connection)
01:22:55EXetoCAraq: How can I invoke makeRangeWithStaticExpr? I'm experimenting with float ranges
01:26:19Skrylarokay, accumulated a bunch of whitepapers for string searching
01:27:14EXetoCit was easy to get it to work, and it errors properly when passing such a range to 'array' for example. I don't know if there are other cases that might break
01:38:55*OrionPK quit (Remote host closed the connection)
01:46:37*BitPuffin joined #nimrod
02:10:06*Demos joined #nimrod
02:15:08flaviuWow, nimrod has a virtual machine to do compile-time code execution
02:16:07Demosyup
02:24:41*flaviu quit (Remote host closed the connection)
02:35:17*q66 quit (Quit: Leaving)
02:39:38*BitPuffin quit (Ping timeout: 240 seconds)
02:43:21VarriountFor all that Araq may grumble, it's quite impressive that he's written a working VM in such a short time.
02:50:19*BitPuffin joined #nimrod
02:50:23DemosVarriount: 2 working (more or less) vms!
02:51:31VarriountHey Demos, besides being a "file", "directory" and/or a "symlink", are there any other file system object attributes that Windows and linux share with each other?
02:51:58DemosVarriount: Not sure. Windows has something that kinda smells like a hard link
02:52:26Demosalso afaik files and directories are more seperate in windows than they are in linux
02:52:29VarriountWell, it has hard links, however on any file system, hard links are hard to detext.
02:52:44DemosI guess that is kinda the point :D
02:55:38*BitPuffin quit (Ping timeout: 240 seconds)
02:56:46VarriountWhy does Window's C run-time contain "Bessel" Procedures? http://msdn.microsoft.com/en-us/library/h7zkk1bz.aspx
02:59:38Demosmaybe it was common in older programs, maybe they wanted to use it as a debugging thing. Who knows
03:01:06VarriountDemos: Do you know of any reason why Nimrod can't use Window's _stat routines?
03:02:55Demosno, the MSDN page does not mention anything that would make it "bad"
03:03:34VarriountHm. Would it cause nimrod to require microsofts sdk, instead of, say, MingW?
03:07:05VarriountGah. It comes to somethings when you can't find a routine's implementation in an open source project.
03:07:53Demoswell the whole point of mingw is to link aganst microsofts system libs
03:08:09Demosand we will treat cygwin as a *NIX (although cygwin is kinda broken)
03:08:30VarriountOh. Hm.
03:10:30VarriountDemos: I'm trying to piece together whether I should A: Try to get more precise permissions for getFileInfo, and B: Support more "kinds" for a file.
03:10:49VarriountAnd if I do those things, how I should go about implementing them.
03:11:22Demoswell windows and nix differ on how they do permissions. What about having a different style of API, I would ask like "can I do X" and the API could reply
03:14:58VarriountAha, bingo! http://msdn.microsoft.com/en-us/library/windows/desktop/aa446654(v=vs.85).aspx
03:41:15VarriountDemos: The windows implementation of getFileInfo() is finished. Now I just need to test it. :D
03:41:35Demosyay!
03:42:57*Varriount wishes someone else would do the Linux/Posix implementation
03:49:10*brson joined #nimrod
03:49:40VarriountDemos: It's aliiiiiive!! Muahahahaha!!!!
03:52:20*shodan45 quit (Quit: Konversation terminated!)
04:24:07*DAddYE joined #nimrod
04:43:06SkrylarVarriount: my boring wrapper senses are tingling
04:43:10Skrylarlol
04:56:57*DAddYE quit (Remote host closed the connection)
04:57:04*BitPuffin joined #nimrod
05:03:23*BitPuffin quit (Ping timeout: 252 seconds)
05:12:49*nande quit (Remote host closed the connection)
05:25:42*BitPuffin joined #nimrod
05:32:49*BitPuffin quit (Ping timeout: 240 seconds)
05:34:55Demosis there a way to specify dynlibOverride as a pragma?
05:37:40*[1]Endy joined #nimrod
06:09:34*brson quit (Ping timeout: 240 seconds)
06:28:22*brson joined #nimrod
06:49:38*foodoo joined #nimrod
06:50:15*DAddYE joined #nimrod
07:06:42AraqDemos: no; you're supposed to put it in a project specific config file
07:07:28Demosbut I want to have like when defined(allStatic): do all the linker stuff
07:11:15AraqI can't follow. for everything you override you can add --passL crap
07:12:07*Demos quit (Read error: Connection reset by peer)
07:28:37*zezba9000 joined #nimrod
07:30:20Araqhi zezba9000 welcome (back)
07:30:42zezba9000Araq: Hey whats up!
07:31:14zezba9000So Roslyn just came out, which I still may look into converting C# to Nimrod :)
07:32:04zezba9000Ive been doing a bunch of tests with C# Mono vs C++ on iOS desktop ect and its just a lot slower
07:33:05zezba9000Also .NET native came out that claims to compiles C# to fast native code, but just had some people run the RayTraceBenchmark on it and its actually slower
07:33:32zezba9000So Nimrod still looks like the best option for performance!
07:42:26zezba9000The one thing I want to try and do with Nimrod at some point is get it to compile for Windows8 and WP8
07:43:22Araqhmm I think Varriount runs it on windows 8, not sure what you mean
07:43:33zezba9000I know Nimrod already compiles with the VC++ compiler correct? But the VC++ compiler with the WinRT frameworks may be missing some things from Win32 Nimrod may use
07:43:51Araqunlikely though
07:44:00Araqbtw I've skimmed Roslyn as well :-)
07:44:01zezba9000Araq: Win8 (METRO) I mean
07:44:14zezba9000What did you think of Roslyn?
07:44:43zezba9000Looks like it was organised well at least
07:45:05Araqparts of it are very well written ... other parts not so much, just like in our compiler
07:45:17zezba9000haha i'm sure
07:45:41AraqI wonder if they submitted the whole test suite though
07:45:57zezba9000Mono's compiler was already written in C# but I don't think there stuff is documented at all, so would never be able to use it for code translation
07:46:05Araqor if I miss something, I only counted ~ 350 tests for the C# compiler
07:46:32zezba9000They may still have stuff to add like that not sure
07:47:20AraqI bet F#'s compiler implementation is much cleaner though
07:48:11AraqRoslyn still uses that archaic mixture of pattern matching (switch) and the visitor pattern
07:48:18zezba9000Ya but I don't rly like F# to much. But can't speak to much about it as I don't use it
07:48:34AraqF# is superb
07:50:11zezba9000for .NET C# is the most protable and is why I use it. If F# was the main .NET lang I would maybe use it. But I like C style syntax normally as HLSL, GLSL, CG and all graphics programing is C style
07:51:25AraqI've been programming in C-style languages for 10 years now and it never stops feeling weird syntactically
07:51:28*Matthias247 joined #nimrod
07:52:29Araqdeclaration order wrong, {} annoying to type, if requires (), it's almost like Lisp but without Lisp's benefits
07:53:21zezba9000I heard your keyboard is not a English layout and brackets are hard to type?
07:53:53Araqyeah
07:54:15zezba9000I don't find brackets bad when it makes it easer to parse whats going on. I find it helps group toghether ideas in the code better
07:55:14Araqthat's actually my major gripe with them
07:55:52AraqI can't see how } } } split out over 3 lines improves anything for "grouping" stuff
07:55:58*konversya joined #nimrod
07:56:05zezba9000I'm not saying if (...) required, but ((1+2) * 3) is something you put in an if block a lot and thus its normal to look at I guess
07:56:45AraqI like to have lots of code on the screen at once, } take up valuable screen space
07:57:09zezba9000Do you not put returns in your code to seperate ideas though?
07:57:47zezba9000Brackets are just the same thing, but give clear indication of an idea (to me at least)
07:58:00Araqa return is a control flow statement. I don't use control flow to seperate ideas but I think I know what you mean
07:58:19zezba9000Do you like Visual Basic style?
07:58:41zezba9000But a return is not a flow control on a "if" block?
07:58:50zezba9000not in C++
07:59:11zezba9000If you have a huge if statment how do you multi-line it?
07:59:57Araqsometimes I use an empty line to end the 'if'
08:00:06Araqmost of the time I don't
08:01:10Araqvisual basic style is objectively slightly better than C style as you always a have block and not the single statement vs block distinction that has been proven to be error prone for newbies at least
08:01:41zezba9000But in a lot of cases it makes reading easier I think. Let me find an example: https://github.com/reignstudios/ReignSDK/blob/master/Platforms/Common/Reign.Core/Math/Matrix4.cs#L272
08:02:36*konversya quit (Remote host closed the connection)
08:02:48Araqhey don't argue with me over syntax
08:03:07zezba9000lol
08:03:48zezba9000How would find the best way to write the creation of a Matrix4x4 identity matrix?
08:06:01zezba9000In math it is represented like the example I gave. Thats why I like brackets as they allow for that situation. Or am I wrong.
08:07:42Araqer math uses one pair of () and indentation to denote the dimensions ...
08:08:13Araqmath certainly doesn't use 'new Vector4(1, 0, 0, 0)' lol
08:08:15zezba9000I'm saying the numbers are layed out in the way I presented
08:08:32zezba9000brackets just allow for the returns, no?
08:08:57zezba9000http://en.wikipedia.org/wiki/Identity_matrix
08:09:45Araqah you mean 'return' for 'newline'?
08:09:47zezba9000Araq: I agree creating a "stuct" type in C# should not use the new keyword or there is something to be said about that
08:10:03zezba9000yes
08:11:13zezba9000Is my impression wrong that you would not be able to "visually" layout the numbers of a matrix4x4 in Nimrod or F# ect the way it is done in math or C#?
08:11:34Araqof course it is wrong lol
08:11:46Araqnimrod and F# are all about *layout*
08:12:02Araqlayout is important, { ; } are not
08:12:07*papilio joined #nimrod
08:12:12Araqhi papilio
08:12:15Araqwelcome
08:12:54*vendethiel quit (Quit: q+)
08:13:11Araqand of course you can layout a matrix nicely in nimrod/F#/python
08:13:32*brson quit (Quit: leaving)
08:14:31Skrylardom96: the answer to moving local branches is rebase
08:14:36zezba9000Is there an example of a multi-line constructor being called in Nimrod I can look at?
08:15:44Skrylarrebase tells git to take a set of commits and apply them on top of a new base, which is useful if you say.. have a set of changes in a branch and then suddenly master explodes and needs replacing
08:16:21zezba9000In Python it looks like brackets are used: http://stackoverflow.com/questions/6388187/what-is-the-proper-way-to-format-a-multi-line-dict-in-python
08:18:32*Mat3 joined #nimrod
08:18:35Mat3hi all
08:18:37Araqzezba9000: this is it in nimrod: https://gist.github.com/Araq/9988909
08:19:14Araqbut it contradicts my argument as array constructors still use [ , ] and not really rely on whitespace :-)
08:19:31zezba9000What about Vector based one not full array version?
08:19:49zezba9000Just replace [...] with Vector4(...) ?
08:19:52Araqthen you have Vector(1, 0, 0) as a line
08:19:56Araqyeah
08:20:35zezba9000Araq: Also , { ; } define layout, just as a return or tab would in Python. But its about how easy it is to parse that "layout" I would argue maybe.
08:20:56zezba9000Also because of your example, i'm confused as to why you don't like brackets as they are used in our example?
08:21:09*Araq sighs
08:21:56zezba9000Well are you only talking about the {..} brackets you don't like then?
08:22:07zezba9000and ';' marks
08:22:48Araqit's all about trade-offs, make the syntax get rid of more delimiters and you get more problems too. I got rid of {;} for control flow and that's already a very useful thing
08:23:34Mat3ah, syntax related discussions going on here again
08:24:10Araqconstructors and function application still use (, ) as it leads to excessive indentation otherwise
08:24:39Araqthat doesn't mean I wouldn't like to write:
08:24:47Araqconst Identity =
08:24:50Araq 0 1 0
08:24:55Araqetc.
08:24:58*papilio quit (Ping timeout: 240 seconds)
08:25:06zezba9000I understand getting rid of the ';' mark as it logically doesn't do anything. But '{}' marks I don't understand how that helps
08:26:22zezba9000So you would like to write "array = 0 1 2" vs "array = [0, 1, 2]" ?
08:26:38Araqthat depends on the context :P
08:26:53zezba9000But [,,,] gives context
08:26:58zezba9000Thats there point
08:27:07*DAddYE quit (Remote host closed the connection)
08:28:00Araqsure but that context might be entirely redundant
08:28:09Mat3Araq: const Identity : vector = 0x000100 <- how about that ?
08:28:20Araqwhich it is if you use indentation ...
08:29:09zezba9000But something that helps you understand the context when looking at others code is not redundant
08:29:27Araqwhat's so hard to understand here? in a 'const' section I use indentation and so don't need the [] but when I'm in an expression context I write: echo [1,2,3] + [3,4,5]
08:30:38zezba9000So you can do "echo 1,2,3" or "echo [1,2,3]"
08:30:47Araqand whether the code was originally written by me or the hypothetical script kiddie idiot that you like to bring up here is meaningless
08:31:44Araqand no, you can't do that because echo 1,2,3 already means echo 1; echo 2; echo 3
08:31:46zezba9000Not to the person looking at the other persons code?
08:32:20AraqI look at other person's code all day long. usually it's shit but I am able to understand it just fine...
08:34:49Araqno offense but I'm so tired of that argument that "co-workers" might misuse something or have trouble to learn something or might eat their keyboard instead of the cake they bought...
08:34:52zezba9000I know, I just think having brackets are easier to parse for humans and having those brackets be required by the standard helps others looking at 3rd party code helps the process by simplifying the rules allowed within a given system.
08:35:36zezba9000lol i'm pissing you off arn't I :p
08:35:36Araqthere are 2 ways to design a programming language:
08:35:49Araqa) assume programmers are smart
08:35:59Araqb) assume programmers are idiots
08:36:27Araq(b) is obviously true but leads to languages that I don't want to touch.
08:36:34*Trimsty joined #nimrod
08:36:52zezba9000But thats a false dichotomy as there are both at the same time :)
08:38:26AraqMat3: that's mildly disgusting as it only makes sense in base 16
08:41:25zezba9000Anyway sry for being irritating, just trying to relay a perspective.
08:41:30Araqzezba9000: your example is about a 2 dimensional data structure and as such requires 2 dimensional layout. as such the {} are only there to please the compiler
08:42:06Araqit is not "easier to parse" for humans that way because humans look at the layout
08:42:16Mat3Araq: I suppose every programmer can handle it
08:42:20*[1]Endy quit (Ping timeout: 268 seconds)
08:42:47SkrylarAraq: but.. but java is the bestest
08:42:54Araqand just fyi I studied psychology and you did not and at the point I am ending this discussion. ;-)
08:44:38*ehaliewicz quit (Ping timeout: 240 seconds)
08:45:35zezba9000Araq: If that was to me, I would just say an argument from authority is irrelevant...
08:48:17zezba9000But hey Nimrod is an awesomely fast lang. Don't get me wrong. I just like C style, maybe i'm wrong for liking it, but I don't see any reason I shouldn't like it.
09:00:21Mat3zezba9000: http://www.ioccc.org/
09:03:50Araqargument from authority sucks indeed but it helps to shut down meaningless discussions
09:04:59*gabber_ joined #nimrod
09:05:06Araqhi gabber_ welcome
09:05:28gabber_Hello. Does anybody know if it is possible to draw to the screen with cairo, instad of to a file?
09:05:32gabber_Hi araq
09:05:56Araqyeah but you likely need to setup an OS dependent drawing context
09:06:05zezba9000Mat3: Is this something you participated in?
09:06:33gabber_I can't get the sdl example to work, so that is why I wanted to try cairo
09:08:22Araqwhat's wrong? DLL hell again?
09:08:35Mat3zezba9000: no, but quite impressing and shows most problems of these quick and dirty portability hack named 'C'
09:09:56gabber_Yes, I was here talking to yourself and dom the other night ! I just have no idea where to begin setting up sdl correctly
09:11:12Mat3gabber_: I assume you work on Windows and get no visible window aftter compilation ?
09:11:35gabber_I am teacher, and I want to write simple visual physics programs with a graphical output
09:12:03gabber_I got as far as a purple screen
09:12:27gabber_I am windows 8 64 bit. So presumably I should install the 64 bit sdl?
09:12:52Araqthat depends. but usually on windows nimrod is in 32bit mode
09:12:58Araqso you need 32 bit DLLs
09:13:00gabber_(although, would that then mean that the program would only run on other 64 bit machines?)
09:13:09zezba9000Mat3: C is not C#. I would never write a large app in C today, C++ maybe. But C I would only "personaly" only use for things like Computer Shaders
09:13:37zezba9000**Compute Shaders
09:13:38gabber_ok, I will try again with 32 bit
09:13:48Araq(yes about the 64bit question)
09:14:13gabber_and sdl1.2, not version 2?
09:14:20Araqexactly
09:14:39gabber_and the runtime libraries or the development libraries?
09:14:42gabber_(sorry !)
09:16:39Araqruntime libraries
09:16:51Araqdevelopment libraries are generally not necessary for nimrod
09:17:21Araqlet me know if found these please so I can include them in the next release
09:17:32Mat3zezba9000: Just see C as some kind of obfuscated portable assembler language (personally I still prefer a good macro assembler)
09:17:35gabber_Thanks. So the only file that this site (http://www.libsdl.org/download-1.2.php) offers is sdl.dll. Which folder should I place it in?
09:18:43Araqthe one where your built .exe resides in
09:19:04gabber_ok, thanks
09:20:35zezba9000Mat3: Yes exactly thats why C is used in Shader langs that replaced ASM in the GPUs. As its just good for simple things that don't need much.
09:21:18Araqzezba9000: when will your brother deliver the changes to the docgen?
09:21:46zezba9000I saw him working on it a little today
09:22:19zezba9000He is making sure its full of back doors and Ads before release ;)
09:22:54gabber_Araq, are you familiar with the sdl example? I get a purple screen, so it semi works. I also get an error: "failed to load tux.png". I have saved a small png image by the same name in the same folder as the exe, but it doesnt seem to find it
09:24:02Araqhmm that should work then. how do you start the exe?
09:24:16Araqmake sure you 'cd' to the directory properly
09:24:45Araq> bin\myproject.exe # won't work
09:24:47Araqcd bin
09:24:55gabber_I have tried clicking the exe, and typing sdlex.exe in the console
09:24:59Araqmyproject.exe # exe finds the image then
09:25:55gabber_Do I always need to work in the bin folder then? At the moment I am just working from a folder on my desktop which I called Nimrod
09:26:09gabber_(but nimrod is in my global environment)
09:26:27Araqno it's just the .exe looks in the current working directory for the image
09:26:40Araqso you need to ensure the current working directory has the image
09:27:04Araqbut clicking on the exe and having the imagine in the same folder should work
09:27:11Araqso I'm a bit lost
09:27:11gabber_but I have sdlex.exe and tux.png in the same folder, is that not the same?
09:29:38Araqgabber_: try to give it a full path name like: IMG_load(r"C:\files\tux.png")
09:30:47Araq(note the leading r in the string literal to suppress \ escape sequences)
09:31:06gabber_Compiled successfully, but again a purple screen and the same error in the console !
09:37:28Araquse a real .png then :P
09:37:51Araqmaybe the png's version is wrong or something
09:38:30Araq quit($sdl_image.getError()) # try that instead of the 'echo "Failed ..." '
09:38:57Mat3zezba9000: So rethink again: Nimrod is a general-purpose *high level* language which would be quite limited by the syntax and *semantic* choices made for implementing a broken assembler
09:40:08Araqhe, I'm not sure about the *high level*. one of my goals was to make "level agnostic"
09:41:30Mat3sure, but the possibility to AST modification is quite common for so called 'high level languages'
09:44:26zezba9000Mat3: ok... not sure what I thought I need to "rethink".
09:45:09gabber_I get: error: undeclared identifier: 'getError'
09:48:13Araq quit($sdl.getError()) # try that instead of the 'echo "Failed ..." '
09:50:05gabber_It flashes a purple screen, and the console says failed loading libpng15-15.dll: The specified module could not be found.
09:56:09Araqwell that is your problem then
10:00:02gabber_Could you suggest how to draw a simple shape instead please? This might be better for me than trying to load images. I cannot figure out from the documentation how to do it
10:01:47*Matthias247 quit (Read error: Connection reset by peer)
10:04:31Araqwell you got SDL working so you should use the graphics module
10:05:11Araqnimrod c -r lib\impure\graphics.nim
10:05:47Araqpress ESC to quit this program
10:08:52foodooI just tried that for fun and I get: /usr/bin/ld: cannot open output file /usr/lib/nimrod/impure/graphics: Permission denied
10:09:39foodooDoes the nimrod compiler try to put the compiling outputs into the same directory as the source files even if I start the compiler at a different location?
10:10:45gabber_It compiles ok, but when I try to run graphics.exe it says it cannot load SDL_ttf.dll. I don't understand how on the SDL website there is only ONE sdl file (sdl.dll) , but then I keep getting errors referring to lots of other sdl files
10:11:17gabber_Foodoo, yes, I had to move the graphics.nim file out onto my dekstop first
10:11:39gabber_foodoo, may I asked how you installed sdl ?
10:11:44gabber_*ask
10:12:14foodoogabber_: I didn't install SDL directly. It's just there because my linux package manager installed it as a dependency for some program
10:12:35gabber_Ah , ok, thanks. I am on windows, it is driving me insane
10:13:06gabber_Do you know how to draw a simple shape using graphics/sdl ?
10:14:31EXetoCgabber_: there's the main lib, and then there's SDL_ttf, SDL_image etc; all of which have their own websites dedicated to them
10:14:55EXetoCyou should find it if you do a search for sdl_ttf
10:15:03gabber_OK, will do, thanks
10:15:12*[1]Endy joined #nimrod
10:15:34foodoogabber_: This might help you: http://lazyfoo.net/SDL_tutorials/lesson09/index.php
10:17:01Mat3Araq: Is there an alternative to direct memory storage other than casting to an array of specific size ? I just want to store a single word
10:17:20Mat3^for direct memory storage
10:17:36foodooMat3: "word" as in CPU register size?
10:17:51Mat3yes
10:22:31gabber_Thanks the help everybody, araq in particular. But I am going to give up. I have no idea how many more files it will say I am missing. I am hoping one day there will be a simpler way for Windows users to draw in Nimrod
10:22:43AraqMat3: we now have "unchecked" arrays, but you can also do: (cast[ptr int](p))[]
10:22:48Araqgabber_: no wait a sec please
10:23:36gabber_ok, i'm still here
10:25:39Araqdamn there used to be a nice download package that just has every sdl.dll there is :-)
10:26:01gabber_that sounds like what I need !
10:26:15EXetoCzezba9000: anything other than whitespace to specify blocks is redundant
10:26:57Mat3Araq: thanks
10:27:14zezba9000EXetoC: not if you write code in windows notepad
10:27:47EXetoCyou might still not like it, but many people do
10:28:04EXetoCzezba9000: you shouldn't. what difference does that make though?
10:28:28Araqgabber_: just a few more minutes, need to switch computers and upload things to our server
10:28:46EXetoChey, wait a second, "echo 1, 2, 3" != "echo [1, 2, 3]" :p
10:29:04gabber_ok, no probs. I also want to have a play around with some gui libraries. can't be any worse than sdl !
10:29:26zezba9000EXetoC: I think there is a balance. Finding it requires research.
10:30:16EXetoCtell me if you find research that concludes that redundancy is good
10:30:38zezba9000EXetoC: Just like when the developers of Go decided custom opersators were not useful, they were not taking into account the people that found them to be.
10:31:06zezba9000**custom operators
10:31:33zezba9000redundancy depends on the context and how people use something
10:32:08zezba9000I only have my own uses I can speak too.
10:36:05EXetoCyou can't make it less redundant, unless you do indeed allow multiple blocks/statement on a single line, but that's rarely needed
10:36:49EXetoCand so we only support limited cases of that, such as "if x: return"
10:40:03zezba9000If I declare "int birdCount" vs "int bc" does the full desc and use of the word "birdCount" become redundant simply because I know what "bc" is doing?
10:40:26zezba9000Depends, sometimes giving things a little more context is not bad
10:42:12EXetoCcontext is relevant here, but not when it comes to brackets
10:43:54zezba9000maybe the option for both makes most sense idk
10:43:57Mat3zezba9000: just test it out: Read and try to understand recent sources of the Linux kernel. This gives you hints about wheter it is of advantage to be sensible for naming conventions
10:44:07EXetoCyou might know what "bc" stands for, while others might not. however, you only need little experience with the language so as to be able to quickly parse blocks when you see one
10:44:52EXetoCzezba9000: alternative syntaxes was considered, but then scrapped at one point.
10:44:52zezba9000int i; used as an iterator is a good example of where you don't want to give more context as it would be redundent
10:47:03EXetoCthat's a different point, which I agree with nevertheless
10:50:31zezba9000IF the IDE/text editor gave a washed out color boardered backdrop for each method block, I would say brackets are redundent
10:51:50zezba9000Just as a text editor that handles the 4-while spaces needed to define a method block now, I think the IDE can be resposible for negating things
10:54:05zezba9000Scratch on Raspberry Pi might be a similar idea of what i'm getting at
10:55:41Araqgabber_: http://nimrod-code.org/download/dlls.zip
10:55:42Araqunfortunately without SDL_ttf.dll ... -.-
10:56:23Araqthe internet seems to lack a copy of SDL_ttf for SDL version 1.2 ...
10:56:34Araqwe really need to switch to SDL 2.0
10:56:45*gXen joined #nimrod
10:57:09Mat3zezba9000: you can take a look at Colorforth where the colour symbolizes functionality (for example green definations are compiled, cyan ones executed at runtime)
10:57:20*gXen left #nimrod (#nimrod)
10:57:23EXetoCzezba9000: alternative representations provided by an IDE? that is indeed very difficult, but anyone is free to do it
10:58:29gabber_Thanks Araq, I will have a go with that
10:59:26EXetoCthat was also discussed, and I think it's a lot less bad for various reasons
11:00:31EXetoCbut how often has this been done? I don't know of any IDEs that support this, so you gotta ask yourself just how much people care in general
11:02:30Araqgabber_: as I said, it's unlikely to work
11:02:45Araqwill compile SDL_ttf.dll on my own I guess
11:02:50Araqbut need to go now, see you later
11:04:41zezba9000EXetoC: I care about if else blocks that pop out at me. I use brackets to do this now. But would be happy to get rid of them if an IDE boardered things in nested space instead. You could even have drag and drop if you held down say Cnrt-Shift-Click or something on a block. Probably sounds silly to you but I would find it very useful and kinda cool.
11:04:52*lanior joined #nimrod
11:05:15zezba9000would be a cool IDE feature for any lang
11:05:26gabber_thanks for your help araq. I'll come back another time.
11:06:50zezba9000anyway i'm going to bed
11:07:04*zezba9000 left #nimrod (#nimrod)
11:07:06dom96hello everyone
11:07:10dom96hey gabber_, wait!
11:07:35gabber_Hi Dom. This is matt from the other night - as you can see I am still struggling with sdl !
11:08:06dom96Glad you came back. Dependencies suck eh?
11:08:43gabber_They certainly do. It seems near impossible to get sdl working on windows, or at least on MY windows
11:09:31dom96Don't worry, it's certainly possible. Let me try to find the DLLs too.
11:09:55gabber_Thanks very much. Did araq explain the issue to you?
11:10:12dom96I read your discussion.
11:10:19gabber_ok, thanks
11:11:38EXetoCSDL 1.2 you mean? surely it's easy to get it working in general
11:11:52EXetoCbut you need to know where to put stuff if you don't have a package manager
11:12:37gabber_I haven't the foggiest about these sdl files !
11:17:54Mat3hi dom96
11:19:51Mat3and EXetoC
11:21:24dom96gabber_: try these: http://picheta.me/private/sdl.zip
11:21:32dom96hey Mat3
11:21:43gabber_thanks, will do
11:21:57dom96weird that the sdl website doesn't have sdl_ttf 1.2 DLLs anymore.
11:22:09dom96I still had one lying around though
11:23:17Mat3there concentrate on SDL 2
11:23:47dom96Yeah, I think we should just update the sdl wrapper to sdl 2
11:24:27Mat3good idea
11:25:18gabber_Cool, you're the man. You have solved my original problem, and I can now compile the sdl example file (sdlex.nim). I get the image on a purple background, which I believe is meant to happen. Still can't compile graphics.nim though. I get errors at graphics.nim(51)(graphics) and graphics.nim (372) (draw ellipse). Value -359100 out of range
11:26:20dom96which version of Nimrod are you using?
11:27:01gabber_0.9.2.exe , from the nimrod homepage
11:27:11dom96try grabbing the latest from github
11:27:25dom96https://github.com/Araq/Nimrod#compiling
11:27:38Mat3dom96: But be aware that the examples need to be updated also because SDL 2 features a somewhat different interface compared to version 1.2
11:29:27gabber_Not sure if I have those dependencies to build from source
11:34:29dom96gabber_: In that case you can grab the pre-built version from nimbuild: http://build.nimrod-lang.org/commits/windows-x86/nimrod_545875a64e5d.zip
11:34:44gabber_Thanks, downloading now
11:38:25gabber_As before it compiles ok and says success. But I get the same error in the console when I run graphics.exe
11:39:05dom96damn, maybe it's a Windows 64-bit issue.
11:39:15EXetoCdid you compile it with the new build?
11:39:26EXetoCnimrod -v
11:39:34gabber_yes, I compiled it again
11:41:38gabber_0.9.3
11:41:50gabber_windows i386
11:43:25gabber_At least I have the sdl example working now though. Please could one of you suggest how to draw a shape, rather than loading an image. . I am struggling to put it all together.
11:45:13dom96gabber_: Try commenting out line 516 and 517 in graphics.nim
11:45:58gabber_Comment is #?
11:46:03EXetoCyes
11:49:00gabber_Hurrah, I have some shapes drawn ! I had to comment out some other instances of ellipse too, then it worked
11:49:23gabber_I didn't realise graphics.nim was an example program, I thought it was a library
11:49:59dom96it is, the stuff under when isMainModule is the example
11:50:04*[2]Endy joined #nimrod
11:50:06dom96it happens to be in the same file
11:50:08Mat3ciao
11:50:14*Mat3 quit (Quit: Verlassend)
11:50:42gabber_Oh ok, You have all been really supportive, so thank you
11:52:25dom96no worries
11:53:31EXetoCpeople on reddit hating on the name 'echo'. amazing
11:53:36*[1]Endy quit (Ping timeout: 255 seconds)
11:53:50dom96where?
11:54:15EXetoChttp://www.reddit.com/r/programming/comments/1x8chx/dr_dobbs_nimrod_a_new_systems_programming_language/
11:54:28EXetoCthey're not recent comments
12:05:40dom96ahh
12:38:09*q66 joined #nimrod
12:38:35*lanior quit (Quit: Page closed)
12:40:58foodoois echo from pascal?
12:48:43EXetoCcouldn't find anything about that when googling
12:49:12EXetoCbash?
12:49:24EXetoCcmd?
12:51:27foodooPHP has it
12:51:50EXetoCI bet that's the inspiration
12:53:49foodooAraq seems to be someone who has a good taste regarding programming languages. bash,cmd and PHP are bad canidates ;)
12:54:44dom96I wouldn't be surprised if he decided on 'echo' simply because it's one character less to type than 'print' :P
12:55:17*q66 quit (Ping timeout: 252 seconds)
12:57:42EXetoCmakes sense. print-debugging in java for example must be a real pain
12:58:06EXetoCor maybe not, cus, well-developed IDEs
12:58:09foodoo*gg*
12:59:25*q66 joined #nimrod
13:06:41*io2 joined #nimrod
13:08:41NimBotAraq/Nimrod devel 91b710a Jason Livesay [+0 ±1 -0]: Allow multi/exec replies so transactions work.
13:08:41NimBotAraq/Nimrod devel 8804c01 Jason Livesay [+0 ±1 -0]: Support transactions
13:08:41NimBotAraq/Nimrod devel bb39e2c Dominik Picheta [+0 ±1 -0]: Merge pull request #1066 from ithkuil/devel... 2 more lines
13:11:30EXetoCAraq: so do you know how to invoke this path: semArray -> makeRangeWithStaticExpr? I'm messing about with float ranges in case you missed that
13:14:13EXetoCthrough user code that is. I tried a couple of approaches based on what seemed relevant for tyFromExpr, nkSym, nkCallKinds and so on
13:16:19*BitPuffin joined #nimrod
13:21:58dom96Awesome. Github webhooks support other events now.
13:23:15dom96!addrepo nimrod-code gtk2
13:23:15NimBotDone.
13:23:15dom96!add nimrod-code gtk2
13:24:15dom96Got line from github: { "payload": { "zen": "Keep it logically awesome.", "hoo
13:24:15dom96k_id": 2054792 }}
13:24:15dom96Thanks for that github...
13:31:05*Mat3 joined #nimrod
13:34:53Mat3I need to do some pointer arithmetic, any way ?
13:40:16EXetoCMat3: yes, by either treating it as 'array ptr...' (cast), or by using that module created by fowl
13:41:01Mat3module, which module ?
13:41:15EXetoCI think that's fine, partially because you enable bounds-checking, but others think it's too inconvenient apparently
13:41:40EXetoCMat3: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/pointer_arithm.nim
13:42:12EXetoCfound this too https://github.com/fowlmouth/nimlibs/blob/master/fowltek/genericpointer.nim
13:44:14Mat3thanks
13:47:17NimBotnimrod-code/nimbuild master 42b4b03 Dominik Picheta [+0 ±1 -0]: Github: PING payload filtration.
13:49:18*nande joined #nimrod
13:50:38*Matthias247 joined #nimrod
14:13:31Mat3ciao
14:13:36*Mat3 quit (Quit: Verlassend)
14:19:41*darkf quit (Quit: Leaving)
14:25:14*flaviu joined #nimrod
14:25:31*vendethiel joined #nimrod
14:30:56*OrionPK joined #nimrod
14:36:47*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:39:25*foodoo quit (Remote host closed the connection)
14:49:33*BitPuffin quit (Ping timeout: 255 seconds)
15:43:39*foodoo joined #nimrod
15:46:31AraqEXetoC: I've never seen makeRangeWithStaticExpr. :-)
15:47:51foodooIs there already a known attempt to do a Gtk3 wrapper for Nimrod?
15:47:52Araqdom96: capturing of a tuple unpack has already been reported. it's easy to fix now with lowerings.nim
15:48:20Araqfoodoo: I don't think so but gtk2 is close to gtk3
15:48:26*foodoo quit (Remote host closed the connection)
15:48:42EXetoCuh ok
15:48:53dom96Araq: Alright. Close my issue then and reference the other issue which reports it.
15:49:03Araqdom96: not my point.
15:49:14Araqmy point is: high prio?
15:49:18dom96Nope.
15:49:23Araqok
15:49:29*foodoo joined #nimrod
15:49:40foodoo(wrong key combination)
15:49:52Araqfoodoo: I don't think so but gtk2 is close to gtk3
15:51:33foodooI just noticed: c2nim has a year 2013 copyright notice
15:53:48dom96foodoo: If you are thinking of wrapping gtk3 then by all means do it.
15:53:58*rleisti joined #nimrod
15:55:24foodooSeems like a lot of work. But maybe I can just port the most important things first and then other people can add the stuff that's missing
15:55:58*Matthias247 quit (Quit: Matthias247)
15:55:59fowlwhat is this new error client.nim(93, 21) Error: field not initialized: parent
16:02:04dom96Araq: I could have sworn that enums could take tuples as values.
16:02:52dom96oh, the tuple must be of a certain type.
16:03:04fowldom96, its a tuple of (string rep, value)
16:03:38EXetoC(T, string)?
16:04:25dom96yeah, it seems to be the other way around.
16:04:33dom96T needs to be ordinal though
16:04:53Araqfowl: ranges that don't include 0 need to be initialized, same for not nil pointers
16:07:49dom96Error: 'yield' cannot be used within 'try' in a non-inlined iterator :(
16:08:13fowlAraq, i dont use those things :?
16:09:19dom96That's a bit of a limitation because I can't simply stop the execution of my async proc when an exception is caught
16:11:02foodooWhat do the dynlib and header pragmas do? Do they help to determine which libs and headers should be linked/included to the C code?
16:12:29dom96dynlib specified the dynamic library to dynamically load which includes the symbol you're trying to import, header specifies the .h file to include which includes the symbol you're trying to import.
16:12:58dom96You should only use either dynlib or header, not both. For gtk you probably want dynlib everywhere.
16:15:48Araqfowl: report it then
16:16:19Araqdom96: C# has the same limitation or at least used to have
16:16:59Araqthe problem is that 'yield' comes back and then the exception handling frame disappeared
16:17:00dom96What is the reason for this limitation?
16:17:14fowlAraq, lol, i put parent:nil in the constructor
16:17:24fowland it works
16:17:43foodooAny general advice on how to approach wrapping gtk3?
16:18:04foodooLike, which header files should I start with?
16:18:07Araqfoodoo: use c2nim on the GTK headers or find out the diff between gtk2 and gtk3
16:18:37Araqmost likely you start with glib and despair already :P GTK is HUGE
16:19:06foodooIs glib.nim also outdated?
16:19:53dom96Araq: How about return?
16:20:11Araqdom96: return doesn't come back so doesn't have this problem
16:20:12dom96In this case I want to finish the iterator.
16:20:20dom96So return will work?
16:20:25Araqit should, yes
16:20:36dom96I should be able to change my macro to generate that instead then
16:21:05Araqthinking about it, I think we can support 'yield' in 'try' but only for the C backend... *sigh*
16:21:43dom96But someone will at some point try the following: try: call() except EOS: await socket.send("ERROR OCCURED")
16:21:54dom96that has to generate a yield
16:22:58Araqhmm we can support it in 'except' I think
16:23:37dom96Alright. It's not high priority though.
16:25:02dom96oh dear.
16:25:47dom96Changed it to generate a return stmt and the compiler crashes when it's printing the macro stack trace
16:27:04foodooAraq: "most likely you start with glib and despair already" It seems to me that I can still use the current GLib wrapper, because GLib is still at version 2.40.
16:27:27Araqfoodoo: so you're lucky
16:27:44foodooGlib is not Gtk-specific after all
16:28:04foodooYou probably had to port it in order to get Gtk working, right?
16:28:20Araqright
16:28:43foodooHow long did wrapping Gtk2 take for you?
16:28:59Araqdom96: I reverted to the old select but irc still crashes
16:29:26dom96with the same error?
16:29:37Araqcan't remember, I used pas2nim. maybe a week, foodoo
16:29:50Araqdom96: yes
16:29:52foodooI would have guessed at least a month
16:30:00dom96that's weird.
16:30:30dom96Araq: Take a look at the compiler crash instead please.
16:30:36dom96Edit line 774 in asyncdispatch.nim
16:30:43dom96nnkYieldStmt -> nnkReturnStt
16:30:44dom96*stmt
16:30:54dom96and compile tests/async/tasynawait
16:35:19Araqgah I dont even get a stack trace
16:35:31dom96yep it crashes.
16:35:34Araqstack overflow I guess
16:39:22dom96wow, amazing how much lag echo can add.
16:49:59dom96Araq: Looks like the GC gave up on me again :(
16:50:40*mwpher joined #nimrod
16:50:55dom96brb
16:54:34EXetoCAraq: why do hex float literals require 'f32/'f64?
16:55:32EXetoC0x0.0 is apparently an int literal
16:57:06*gabber_ quit (Quit: Page closed)
16:57:15*noam_ joined #nimrod
16:58:20*noam quit (Ping timeout: 255 seconds)
17:07:23*Matthias247 joined #nimrod
17:10:31Araqdom96: with your change processBody calls itself recursiveky
17:10:45Araqendlessly
17:23:07*mwpher quit (Quit: mwpher)
17:28:55*ics joined #nimrod
17:39:39*noam_ quit (Ping timeout: 255 seconds)
17:40:56*noam joined #nimrod
17:46:24*noam quit (Ping timeout: 252 seconds)
17:48:05dom96Araq: Why does it do that?
17:48:15Araqbecause you wrote it that way
17:48:48dom96oh wait I see.
17:49:25*noam joined #nimrod
17:52:55*Demos joined #nimrod
17:57:08*Demos quit (Ping timeout: 240 seconds)
17:57:19dom96Araq: Doesn't look good does it? https://gist.github.com/dom96/2dc313817c551be579a3 :(
18:00:02*horrid joined #nimrod
18:00:20Araqhi horrid welcome
18:00:39Araqdom96: tried with -d:useSysAssert -d:useGcAssert ?
18:00:55dom96Nope. I'll try that now.
18:01:12dom96It seems that at first I get a couple of incorrect strings.
18:04:27dom96Araq: Can't reproduce with those defines
18:05:46dom96This crash seems to depend on the speed of the requests.
18:06:06Araqok ...
18:20:21Araqtry it with --gc:markAndSweep and with disabling the cycle collector then please
18:20:30foodooc2nim can't handle multiline macro definitions with backslashes at the end of lines. Correct?
18:23:12dom96Araq: How do I disable the cycle collector?
18:23:13EXetoCsomething along those lines. neither does it handle contatenation (##) IIRC
18:24:11dom96Araq: Mark and sweep crashes almost immediately.
18:24:48Araqfoodoo: I think it can handle that
18:30:49dom96Is that good or bad?
18:31:29Araqimmediate crashes are usually easier to debug
18:35:17foodooAraq: Can I also write Nimrod code into a header file and telll c2nim to take it the way it is?
18:38:26Araqhmmm I don't think ss
18:38:27Araq*so
18:40:59foodooHow should I handle something like this? http://pastebin.com/9K7siTHB
18:41:15foodooThis adds are modifier to a function prototype on Windows
18:42:21foodooAnd I don't have Windows available
18:43:04Araquse #def instead of #define
18:43:22*horrid quit (Remote host closed the connection)
18:48:34foodoohttp://pastebin.com/0PeAr9AU I get an error for line 9 position 16 in the paste: Error: ';' expected
18:54:01*jbe joined #nimrod
18:54:28Araqhi jbe wb
18:54:54jbehi Araq thanks
18:55:44Araqfoodoo: #ifndef cairo_public means c2nim doesn't see your #def
18:56:23*Demos joined #nimrod
18:57:47jbei'm messing around with deeply nested templates to try and understand how they affect compiler performance..
19:00:00foodooAraq: Removing the #ifndef cairo_public and the corresponding #endif doesn't change the error. I'm stuck on this and need further advice :(
19:01:23Araqfoodoo: just use #def cairo_public
19:01:33Araqand get rid of the other # lines
19:01:50foodoookay. And what about the Windows users?
19:03:40Araqyou need to provide #dynlib anyway
19:03:59Araqand this will take care of the windows users
19:05:35NimBotAraq/Nimrod devel cd6953d Araq [+0 ±1 -0]: new VM: proper shield against endless recursions
19:05:35NimBotAraq/Nimrod devel 5aeff33 Araq [+0 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
19:08:06*nande quit (Read error: Connection reset by peer)
19:15:22jbei just noticed that nesting templates that are not immediate cause an exponential increase in compile time.. is that a bug?
19:15:59jbebtw i'm not using latest devel
19:17:59Araqjbe: yeah I think so. but it is not related to templates but to nested calls
19:18:20Araqit's on my todo ...
19:18:29*foodoo quit (Remote host closed the connection)
19:20:55jbeah ok i see. i just ran into it because i've been playing with nested templates to generate html, and to wrap opengl, i'll just see if i can work around it for now
19:21:13NimBotnimrod-code/gtk2 master 10f3f01 simargl [+0 ±1 -0]: Update gtk2.nim... 3 more lines
19:21:13NimBotnimrod-code/gtk2 master 6031a9a Dominik Picheta [+0 ±1 -0]: Merge pull request #3 from simargl/master... 2 more lines
19:21:54Araqjbe: do you have a small example showing the problem?
19:26:01jbeAraq: well this is a contrived basic example https://gist.github.com/jbe/9996803
19:28:27NimBotAraq/Nimrod devel 9b6b867 Dominik Picheta [+0 ±1 -0]: Proper handling of disconnections during reading in httpclient.
19:28:27NimBotAraq/Nimrod devel 895191e Dominik Picheta [+0 ±6 -0]: Merge branch 'devel' of github.com:Araq/Nimrod into devel
19:28:27NimBotAraq/Nimrod devel 404a579 Dominik Picheta [+0 ±2 -0]: Asyncdispatch fixes.... 4 more lines
19:28:27NimBotAraq/Nimrod devel df2e4d7 Dominik Picheta [+1 ±0 -0]: Added asynchttpserver module.
19:33:39Araqer wait a sec
19:33:54Araqdom96: does that mean async *client* is stable?
19:35:42dom96I wouldn't call it stable yet.
19:35:52dom96But it works.
19:44:09VarriountAraq: I got the Windows implementation of GetFileInfo working. Now for the Posix version.
19:44:49VarriountAre we aiming to support the Linux/Mac OSX birthTime extension for file creation time?
19:45:57AraqI think so, Varriount
19:47:09jbeit's not possible to have a template both take varargs and at the same time use ":" to pass a stmt right?
19:48:43dom96Of course it would be great if someone tested it...
19:48:56dom96You'd think people would be more excited about async await.
19:50:37runvncdom96 I think that sounds exciting but I haven't been following closely. can you link me to something that explains it
19:52:10dom96I don't have anything which talks about the Nimrod implementation yet but you can read about C#'s await ( http://msdn.microsoft.com/en-us/library/hh156528.aspx ) as it's similar to Nimrod's implementation.
19:52:35dom96Goroutines are also similar.
19:52:48VarriountAraq: If we are aiming to support file creation time, what should the default value be on systems that don't support tracking of file creation time?
19:52:51EXetoCI also think it's exciting, but I can't think of much to do with it like I said
19:53:33runvncI can think of a million things to do with it
19:54:08runvncwhere is the code or an example. do you have a Task generic or something
19:54:47EXetoCgo ahead then :p
19:55:14runvncso if you have multiple types of i/o taking advantage of this
19:55:24dom96https://github.com/Araq/Nimrod/blob/devel/lib/pure/asyncnet.nim#L155
19:55:33AraqVarriount: just do nothing for now. which system doesn't track file creation anyway
19:55:35runvncyou can use this async await stuff instead of using multiple threads or processes
19:55:49dom96Yes, precisely.
19:56:20runvncwhich is a cleaner and easier programming model once you get used to it
19:56:30dom96Nimrod's Task<T> equivalent is PFuture[T]
19:56:34runvncif you have been doing a lot of threading for many years maybe you dont see the point right off the bat
19:56:59VarriountAraq: Hm. I don't know if BSD does.
19:57:58dom96With the HTTP client you have A LOT of web APIs you could wrap.
19:58:00*zezba9000 joined #nimrod
19:58:15*ics quit (Ping timeout: 255 seconds)
19:58:31dom96SOAP would be useful for example
19:58:35runvncyou can wrap them, and it won't block other parts of the program from running
19:58:50runvncyou could wrap them now but it would stop everything else while the request completed
19:59:04runvncor I mean you could wrap them before without the async await stuff, just they would block
19:59:25EXetoCisn't that up to the implementer?
19:59:53runvncyes, now the implementer has the option to not block, just by using async and await, rather than having to implement a new thread etc.
20:00:45*ics joined #nimrod
20:01:56runvncits an awesome feature
20:02:04runvncCan Rust do that? I doubt it
20:02:06runvnclol
20:03:15dom96Araq: It seems retFuture in the closure env becomes corrupted.
20:04:22*Demos quit (Ping timeout: 268 seconds)
20:05:04dom96runvnc: The truly cool part is that it's implemented 100% with macros.
20:13:24runvncthis takes advantage of the existing iterator/yield stuff?
20:15:10dom96yeah
20:20:47Skrylarwat. CMake now makes sublime text project files
20:22:26SkrylarI'm not sure how I feel about ST these days.. its been ~4 months since they've said anything :\
20:28:09EXetoCgood old DSLs
20:30:21Skrylar. . . someone has screwed up SDL2
20:30:45EXetoChow?
20:30:57Skrylarthe latest release depends on headers in the latest VC++ (even on gcc ...) and refers to direct-x headers even when direct-x is turned off in build
20:31:44EXetoCin the latest stable?
20:31:47Skrylaryerp
20:31:51SkrylarSDL-2.0.3
20:31:59EXetoC>.<
20:34:14Skrylarlooks like its localized derp because using vim to tear out The Unclean One from two files makes it build
20:38:03*brson joined #nimrod
20:38:37Skrylari forgot about this part
20:38:41Skrylarwatching C slowly compile things
20:42:08EXetoCnowhere near as slowly as C++ though, right?
20:42:24dom96hey zezba9000, is your bro around?
20:42:28EXetoCI guess I haven't compiled particularly big C sources though, but still
20:43:29*foodoo joined #nimrod
20:43:40SkrylarEXetoC: nah; not that slow. I was building SDL2 on release mode
20:43:44Matthias247compilation times in c++ depend heavily on which libraries you use
20:43:52Skrylaraaand c2nim chokes on those headers. yay
20:44:31Matthias247Qt stuff compiles reasonably fast. boost stuff is a nightmare
20:44:49Skrylaryeaah thats one reason i never did much with OGRE
20:45:00foodooIs boost mostly template based?
20:45:05SkrylarOgre+Cegui do a lot for you, but Ogre has a lot of template hell and they both use boost
20:45:10Skrylarfoodoo: yeah, template abuse
20:45:18EXetoCSkrylar: what does it choke on?
20:45:30SkrylarEXetoC: expecting semicolons in strange parts of SDL headers
20:46:17Matthias247I guess boost has some coding guideline that says: You HAVE to wrap everything in templates so that nobody can understand it
20:46:41SkrylarMatthias247: they really really want to have LISP's nice things, but with the horrifying C++ syntax
20:46:59EXetoCSkrylar: that almost always happens. I suppose it could detect some common identifiers and then ignore them
20:47:17EXetoCbut in the meantime, all you have to do is define said symbol to nothing
20:47:37SkrylarEXetoC: no, it just says "Error: ';' expected"
20:47:45Skrylarand when going there, its like.. a blank line, or an #endif
20:48:01foodooSkrylar: It's probably a problem with the previous line before the blank line
20:48:57Matthias247Skrylar: i guessed it was for generating the most optimized code, because all the template stuff will then be inlined
20:49:17*filwit joined #nimrod
20:49:27filwithey dom96, what's up?
20:49:35dom96hey filwit, how are those docs coming?
20:49:49filwitfine
20:49:57filwitjust working on some javascript things
20:50:04filwitabout sorting the procs
20:50:06dom96Do you have an ETA?
20:50:16filwitnot exactly, why?
20:50:17SkrylarMatthias247: some of it is just because C++ has no sane way of doing them; like boost::bind and boost::connect
20:50:27Skrylarthey have to go through a massive amount of template hoops to emulate basic closures
20:50:28filwitjust asking, or do you want to wait for the docs to release something?
20:50:42filwitmy ETA is like sometime in the next week
20:51:39dom96filwit: I'm hoping we can get it into the next release, from what I can tell Araq wants to release it soon though.
20:51:51dom96But if he sees that you're working in them he will hopefully wait.
20:51:56dom96*on
20:53:09Araqno he won't :P
20:53:11dom96Anyway, sorry i'm pestering you so much. Don't worry about it if you're too busy.
20:53:23filwitdom96: nah, the thing is I've changed the layout to the point i'm going to need to modify the docgen a little, and i haven't even gotten into that yet. I'm just working off test data and creating a layout & visuals that I want to use
20:53:59filwiti'm happy with what i have so far, but it'll be too long if y'all are wanting to release
20:54:33filwitif we want to make it a big announcement, we should wait till the release after this
20:54:38*Demos joined #nimrod
20:55:10filwitbesides, i'm sure you folks will have lots of comments and suggestions we'll want to do after I show you the designs
20:55:31dom96Yeah, probably best not to rush this.
20:55:51filwitso it's probably going to be another month before we're really ready to switch over the docs
20:56:06filwitoriginally, i was just designing a new look
20:57:00filwitbut part of my updates now have a lot to do with catagorization, and scripts which rearrange the procs according to params/return-type/etc
20:58:05dom96How about we just introduce the new look in this release?
20:58:07filwiti've been kicking around a sort of "universal" graphics design for the docs and forums, and some touchups to the website itself as well (i've already shown you and Araq the logo changes)
20:59:55filwitdom96: i'll see what i can do about just the graphics for the existing docs
21:00:44filwitdom96: might be just a waist of time though. I'll have a more complete version of things soon, and we should probably just go from there
21:02:43filwitdom96: i don't want to get too far into the Javascript and stuff without discussing designs with you folks, but i'm pretty happy with my direction now, and I just need to touch up a few things and fix the basic Abc/Type sorting
21:03:18filwitdom96: once that's done, i'll post the designs online and y'all can review and give me feedback
21:03:37Araqfilwit: excellent
21:04:35dom96filwit: great
21:05:10filwitpffttt.. damn web IRC
21:07:05filwithow to /join someone?
21:07:35Varriountfilwit: Try /msg
21:07:43filwitah, right, thanks
21:08:14filwitthat doesn't seem to work...
21:08:43Varriountfilwit: What webirc client are you using?
21:08:54dom96it does
21:09:00filwitthe one from the nimrod-lang
21:09:44*Demos quit (Ping timeout: 268 seconds)
21:10:39VarriountWell, that says that /msg should work.
21:10:53Varriount"/msg (name) (msg)
21:15:12Varriountfilwit: Could we have a screenshot of the new style?
21:15:26*Varriount is cheering filwit on
21:16:19filwitVarriount: sure, but not just yet as i've kinda pulled things apart in the design over the last week
21:17:12filwitVarriount: i'll fix things up over the weekend and post a pic on monday
21:18:57filwitVarriount: possibly sunday, i would fix it today, but i've got to work on something else
21:23:54OrionPKyou guys see .NET native?
21:24:05VarriountNo...
21:24:10zezba9000Yes
21:24:17dom96maybe
21:24:26zezba9000Did tests, and its slower then normal .NET on x64
21:24:33zezba9000don't know about ARM
21:24:47dom96zezba9000: how much slower?
21:25:16zezba9000Someone get .4 sec vs .5 or .6 can't remember
21:25:24zezba9000on the Raytracebenchmark
21:25:31zezba9000C++ gets .1
21:26:03zezba9000So C++ .1, .NET .4, .NET native .5 or .6
21:27:47zezba9000but it could be that its just a alpha bug idk whats up with it rly. So far it looks to be over selling something on MS's part
21:29:07OrionPKinteresting
21:29:10OrionPKit's still in preview though
21:29:20OrionPKI havent tried it yet - on my mac
21:29:37OrionPKi want to try some of my other benches
21:30:15zezba9000OrionPK: Its not for Mac...
21:30:19zezba9000Its WinRT ONLY
21:30:27zezba9000not even for Win32 yet
21:31:15zezba9000o err I read your message wrong sry
21:31:35zezba9000You cant try cuz your on a Mac :p
21:32:15*nande joined #nimrod
21:32:33zezba9000OrionPK: If you do try, I would be very interested to know what your results are with this: https://github.com/zezba9000/RayTraceBenchmark
21:34:46dom96Araq: You are correct. C# 5 doesn't support Await in catch and finally blocks. C# 6 will though :P
21:35:49zezba9000dom96: Or you can just invoke a async method instead in the finally block
21:36:36dom96but then your code will continue before the method finishes
21:37:04zezba9000true, but normally you finish up stuff in the finally block
21:37:09Varriountdom96: Are you on linux at the moment?
21:37:13zezba9000So ya guess it would not work in all cases
21:37:17dom96Varriount: no, sorry.
21:37:49OrionPKzezba9000 I know
21:37:54OrionPKzezba9000 thats why I cant test it right now :p
21:38:06OrionPKheh oh u realize :0
21:38:18zezba9000ya, my mistake :)
21:38:32VarriountHrm. I'm wondering how to add file creation time - I would need to inspect the system's stat.h (or use some particular ifdefs) . Maybe I can just use {.emit.}?
21:39:12zezba9000OrionPK: I also did tests with Mono LLVM SGEN on iOS vs C++
21:39:24OrionPKcool
21:39:27zezba9000C++ is 8 times as fast as Mono + LLVM + SGEN
21:39:47OrionPKow
21:39:59OrionPKI have more confidence in MS than xamarin though
21:40:05OrionPKor at least the .NET team
21:40:08zezba9000I'm thinking either the .NET math lib sucks as it must cast things to doubles or method invokes have to much overhead I rly with I knew
21:40:20OrionPKahh yeah
21:40:29OrionPKyou could try using SlimMath or w/e
21:40:32zezba9000Ya .NET is about 2x as fast as Mono is many cases
21:41:00OrionPKhttps://code.google.com/p/slimmath/
21:41:25*[2]Endy quit (Ping timeout: 252 seconds)
21:41:39zezba9000OrionPK: Ya but that doesn't fix the issue of "Math.Sqrl" requiring a double return ect
21:41:42dom96Varriount: Do you have an example of how it's done in C?
21:42:04OrionPKyou dont use Math.Sqrt
21:42:20zezba9000in C++ I think you can chain the use of floats being 80bit right, where .NET can't do it
21:42:27zezba9000What I use that all the time?
21:43:10OrionPKI mean if you used another math lib, you wouldnt use math.sqrt
21:43:29zezba9000then it would be even slower no?
21:43:52OrionPKidk, not if it's managed C++ maybe
21:44:28zezba9000Well thats Windows only, so I don't care about that. But yes C++/CLR is much faster but not suported on anything but Win32
21:45:17*Demos joined #nimrod
22:00:24Varriountdom96: #ifdef _DARWIN_USE_64_BIT_INODE ... #lif
22:00:39Varriount*#endif
22:01:23dom96Varriount: Just ignore that.
22:02:31Varriountdom96: You mean, don't include file creation time?
22:03:08dom96What's inside that ifdef?
22:04:01VarriountThe wrapped struct that is returned by the stat procedure wrapped by nimrod.
22:04:49VarriountOn some systems the stat struct contains st_birthtime, and there's ussually a preprocessor symbol defined to test whether a system supports it.
22:05:49*q66_ joined #nimrod
22:06:04dom96Maybe check under what circumstances _DARWIN_USE_64_BIT_INODE is defined.
22:06:07*q66_ quit (Changing host)
22:06:07*q66_ joined #nimrod
22:06:11*q66 quit (Disconnected by services)
22:06:13*q66_ is now known as q66
22:11:37NimBotAraq/Nimrod devel 88f6e26 Dominik Picheta [+0 ±2 -0]: Modified behaviour of checkBuffer to match new select behaviour. Refs #822.
22:11:54dom96EXetoC: irc.nim should be fixed now
22:13:18*wc423u98c32 joined #nimrod
22:13:23EXetoCwc423u98c32: hi
22:13:29*wc423u98c32 quit (Remote host closed the connection)
22:13:41EXetoCseems like it
22:13:47dom96good
22:14:47*brson quit (Ping timeout: 252 seconds)
22:15:38*Araq is checking out dom96's patch.
22:16:27dom96I change the prunesocketset proc because it's complexity has been annoying me for years now :P
22:16:30dom96*changed
22:17:23*q66 quit (Ping timeout: 252 seconds)
22:19:35*q66 joined #nimrod
22:20:08*wc423u98c32 joined #nimrod
22:20:14EXetoCwc423u98c32: bacon
22:20:15wc423u98c32Tasty
22:20:24EXetoCwc423u98c32: test
22:21:13Araqdom96: pruneSocketSet is now more inefficient :-/
22:21:17EXetoCI just wanted to help someone, but it's good to see that it works
22:21:25Araqis that really necessary to use a new seq?
22:21:43dom96Araq: select is already inefficient anyway
22:21:59dom96it's not necessary
22:22:04dom96you can change it back if you want
22:23:08Araqyeah let's do it then
22:23:17Araqselect is called by poll
22:23:27Araqpoll is called thousands of times per second
22:23:34Araqdepending on what one does
22:23:55*wc423u98c32 quit (Remote host closed the connection)
22:25:08dom96fine change it back then
22:26:01dom96actually i'll do it
22:27:50*q66 quit (Ping timeout: 252 seconds)
22:28:10NimBotAraq/Nimrod devel b3865ef Dominik Picheta [+0 ±1 -0]: Revent pruneSocketSet to efficient version.
22:28:42dom96damn, I spelled revert wrong
22:28:59EXetoCoh no
22:29:29dom96EXetoC: Now you better enjoy those precious nanoseconds!
22:29:29*q66 joined #nimrod
22:31:17dom96EXetoC: if you're bored and want to play with IRC please add user list tracking.
22:33:58dom96Araq: While writing the httpserver I was thinking that it would be nice to be able to somehow log messages from it
22:34:38dom96Perhaps the logging module should have some sort of way for modules to log things and for the user to say "I want messages from this module"
22:34:45dom96?
22:37:17EXetoCdom96: elaborate. list?
22:37:44*q66 quit (Ping timeout: 252 seconds)
22:37:45Trixar_zaThis may be the alcohol speaking, but I Love dom96's implementations of stuff
22:37:54Demosdom96: I wrote that myself just a few days ago, only for debug. I just had a module that had a template initLoggingWrapper(def: expr) = when defined(def) ....
22:38:14dom96ircclient.getUserList -> @["Araq", "EXetoC", "Demos", "dom96" ...]
22:38:28dom96or maybe you could create a TUser object which includes more info
22:38:44dom96Trixar_za: <3
22:39:06Trixar_za<3
22:39:14EXetoCI thought you meant a bot
22:39:31*q66 joined #nimrod
22:39:54*foodoo quit (Remote host closed the connection)
22:39:55dom96EXetoC: Then you could implement pretty user count graphs in NimBot :)
22:40:16Araqdom96: the logging module needs to get "benign" effects
22:40:25dom96Demos: ahh, interesting. So you control it with defines.
22:40:29Araqso that it doesn't count as side effect
22:40:51dom96Araq: Ok, but what do you think of this idea?
22:41:18dom96In the case of a http server I would like to report things like "Got bad request. Rejected from 127.0.0.1"
22:41:32dom96But only if the programmer wants that info.
22:42:11dom96Perhaps my http server instance should have an overridable callback for this stuff.
22:46:12Demosyeah my motivation was just for debugging, so that when i am done troubleshooting I can just turn them off. If a bug crops up in that module I just turn on the logging again
22:47:38*q66 quit (Ping timeout: 252 seconds)
22:48:29Demoshow insane it it to use a big old hashtable of type name (string) to proc that I can use to do a cast and add to a specific array. Are there typical things people do when they need to "unerase" a type?
22:49:36*q66 joined #nimrod
22:51:12Demosand how do I get a compile time mutable table? just static:?
22:51:33*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:51:35AraqDemos: mark the variable as .compileTime
22:52:16DemosOK and is that accessable at runtime? (not nessassarly mutable)
22:52:18Araqdom96: I rejected pull requests with something similar
22:52:43dom96Araq: why?
22:52:46DemosI think the complexity of logging can grow without bound
22:54:01flaviuIs the Embedded Nimrod Debugger functional?
22:54:02dom96true
22:54:47flaviuThe C codegen seems to be bugged, it emitted an else without a corresponding if
22:59:41*Demos quit (Quit: leaving)
23:00:28dom96with what nimrod code?
23:01:03flaviuI'm not really sure, I'm trying to get a test case
23:02:21Araqdom96: because it logging injection should be done completely differently
23:02:53Araqwell that's what I argued for when I rejected the PR that added logging to the database modules
23:03:35*q66 quit (Ping timeout: 252 seconds)
23:05:34*ehaliewicz joined #nimrod
23:07:09flaviudom96: The generated C is at https://gist.github.com/flaviut/7c93e80361cbedd125a4 , and the code seems to be around lib/system.nim:2315
23:07:59*Varriount quit (Read error: Connection reset by peer)
23:09:34Araqflaviu: that comes from a 'try' statement
23:09:56Araqno idea why the 'if' is missing. very strange
23:11:12flaviuWait a second, it isn't complete, sorry. I can't figure out how copy from vim to the clipboard
23:11:46flaviuCheck again
23:12:18flaviuThe if statement appears to be generated, but then something comes in and generates the F.len-=4 in the wrong place
23:13:33EXetoCflaviu: by using the * register
23:13:41EXetoC"*{motion}
23:14:17flaviuI figured that out, but for some reason the } command didn't really work
23:14:34Araqflaviu: ah that makes much more sense
23:14:56*q66 joined #nimrod
23:14:58*q66 quit (Changing host)
23:14:58*q66 joined #nimrod
23:15:28EXetoCflaviu: no brackets. "*yy for example, to copy a single line
23:16:08EXetoCyou can also do shift-v, and then do "*y after selecting the text
23:16:12flaviuI ended up using V and selecting what I wanted
23:19:13flaviuActually, it seems like the * buffer doesn't work on my setup, no idea why.
23:21:07EXetoCsometimes that's compiled out I think
23:21:49EXetoCwhich is really stupid. it's such an ancient way of keeping resources to a minimum
23:21:53*darkf joined #nimrod
23:23:25EXetoCand annoy people who are writing bindings
23:23:33flaviuHave you seen neovim? He's cleaning up vim and has had a ton of support
23:24:08*Guest78262 quit (Ping timeout: 240 seconds)
23:28:17EXetoCyeah
23:30:19*Guest78262 joined #nimrod
23:48:26*Matthias247 quit (Read error: Connection reset by peer)