00:03:45 | runvnc | I 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:24 | Varriount | runvnc: Use a 'when' statement? |
00:05:01 | Varriount | runvnc: Also, it would help to see the code, if possible. |
00:06:35 | runvnc | https://gist.github.com/ithkuil/9985486 |
00:06:44 | runvnc | not sure how to apply the when statement to my situation |
00:07:07 | runvnc | I am having the trouble with the pushExpect/ multiExpected thing |
00:07:12 | Varriount | Where's the error? |
00:07:39 | runvnc | pushExpect, parseBulk, parseMultiBulk |
00:07:58 | runvnc | Error: for a 'var' type a variable needs to be passed |
00:08:02 | runvnc | and I don't want it to be a var really |
00:08:12 | EXetoC | you do if you want mutability |
00:08:13 | runvnc | but it won't let me modify r.multiExpected |
00:08:31 | runvnc | well, the socket state gets modified, without having the var :P |
00:08:43 | Varriount | Well.. you could copy the parameter and store it in a variable. |
00:09:08 | Varriount | How did it work in the previous version? |
00:09:21 | runvnc | so the previous version doesnt really handle transactions |
00:09:40 | runvnc | it has multi and exec but gives errors when you try to use them |
00:09:53 | runvnc | doesnt have any code for handling the replies that you get in transactions |
00:09:58 | runvnc | which is not actually a lot of more code |
00:10:01 | runvnc | and I mostly added it |
00:10:05 | runvnc | but |
00:10:26 | runvnc | when you get an exec reply, you can have some bulk replies, and some multibulk replies |
00:10:33 | runvnc | and in order to know what to expect in the exec reply |
00:10:37 | runvnc | I am trying to use a stack |
00:10:49 | runvnc | so for example |
00:11:00 | Varriount | Personally, 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:07 | runvnc | if you run red.multi and then two hGetAll commands and then exec |
00:11:30 | runvnc | then it needs to look for two multibulk replies |
00:11:52 | runvnc | or well really a multibulk reply _containing_ two multibulk replies I think |
00:11:57 | runvnc | ok varriount thanks |
00:12:18 | runvnc | how would I use when though |
00:12:59 | Varriount | when defined (MaintainRedisCompatibility): ... |
00:13:26 | runvnc | ok I don't really believe I need to break compatibility |
00:13:55 | Varriount | Use the 'copy' suggestion only if you're really desperate - I don't know how well it will work. |
00:13:58 | runvnc | if 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:40 | Varriount | runvnc: 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:37 | runvnc | why is it ok to modify the socket state |
00:15:41 | runvnc | without the var |
00:15:49 | runvnc | but not the state of my sequence field |
00:15:52 | Varriount | Hm? Where? |
00:16:00 | EXetoC | is it a handle? |
00:16:14 | Skrylar | back |
00:16:16 | runvnc | on many functions in this redis think it does a socket readline |
00:16:23 | runvnc | so that changes the state of the socket input |
00:16:24 | EXetoC | it's probably not an object that is modified directly |
00:16:42 | runvnc | can I just do that then |
00:16:49 | runvnc | make an object that is not modified directly |
00:17:19 | EXetoC | what I mean is |
00:18:03 | EXetoC | A 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:16 | runvnc | no connection even though it is the same object |
00:18:27 | runvnc | I mean same socket |
00:19:10 | EXetoC | "proc doSomethingWithSocket(handle: int) ... let x = initObject(); doSomethingWithSocket(x.handle) |
00:19:23 | runvnc | right |
00:20:02 | EXetoC | handle isn't modified; it's just being copied, so no 'var' is needed for the actual high level type |
00:21:08 | runvnc | but 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:34 | runvnc | it just so happens that the implementation uses a socket which happens to use a handle so that constraint isnt applied |
00:21:52 | runvnc | what would happen if I changed all of these redis * functions to be r: var TRedis |
00:23:03 | EXetoC | those procs would now be able to either mutate that object or take the address of it |
00:30:58 | runvnc | ok for a minute I thought that I would not be able to use the object dot calling style anymore, like myredis.get() |
00:30:59 | EXetoC | so 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:36 | runvnc | you can still use myredis.get() when you are calling get with myredis as a reference (var) right? |
00:31:43 | EXetoC | yeah it's still possible. it's not a very restrictive feature |
00:32:02 | runvnc | ok for some reason I thought I couldnt call it that way anymore with vars |
00:32:05 | runvnc | great |
00:32:12 | runvnc | no problem then |
00:34:12 | runvnc | lib/pure/redis.nim(191, 9) Error: for a 'var' type a variable needs to be passed |
00:34:34 | runvnc | hm wait I see sorry |
00:35:01 | runvnc | hm wait I see sorry |
00:35:21 | * | BitPuffin quit (Ping timeout: 252 seconds) |
00:44:18 | runvnc | the problem is that this may break applications and modules that use redis. it breaks mine |
00:44:36 | runvnc | now I just have a huge chain of adding 'var' all over the place |
00:46:44 | EXetoC | you can make local var copies if you want, as Varriount, but it might get ugly in some cases |
00:47:40 | runvnc | I will try that |
00:49:05 | EXetoC | but then the values must be actual pointers in order for the original objects to get modified |
00:53:21 | EXetoC | the users will simply have to adapt, unless you somehow realize that there's no need to write to anything |
00:54:29 | runvnc | I 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:49 | runvnc | sorry, having a multibulk where I expect a bulk I meant |
01:00:12 | dom96 | I guess TRedis should really be PRedis. |
01:00:18 | dom96 | But it's a bit too late to change now. |
01:00:41 | runvnc | Yeah I dont want to make any major changes like that |
01:00:49 | runvnc | pretty sure I can just add a few extra lines to parsebulk |
01:01:10 | runvnc | I 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:48 | dom96 | We can change that during the big prefix removal. |
01:02:08 | runvnc | oh so the prefix removal is actually happening |
01:02:26 | Skrylar | prefix removal yes, case nazism no |
01:02:44 | dom96 | huh |
01:02:44 | * | Demos quit (Quit: leaving) |
01:03:05 | dom96 | pushExpect wants a var TRedis but it's used in line 101 |
01:03:15 | dom96 | and a non-var TRedis is passed to it |
01:03:40 | runvnc | I added a ton of vars after I posted that gist |
01:03:45 | runvnc | I was getting an error obviously |
01:03:53 | dom96 | oh. |
01:03:55 | runvnc | then I realized how much stuff it would make me add var to |
01:04:03 | runvnc | like a LOT of places in redis.nim and my modules |
01:04:07 | runvnc | then I took them all out |
01:04:08 | dom96 | Thought I was looking at the actual code in the std lib heh |
01:04:24 | runvnc | I dont think I need that var or multiexpected sequence at all |
01:04:36 | runvnc | not worth it |
01:05:20 | dom96 | Yeah. |
01:08:43 | dom96 | good night |
01:09:46 | runvnc | good night |
01:14:59 | EXetoC | dom96: but, <1.0 :> |
01:15:33 | * | DAddYE quit (Remote host closed the connection) |
01:22:55 | EXetoC | Araq: How can I invoke makeRangeWithStaticExpr? I'm experimenting with float ranges |
01:26:19 | Skrylar | okay, accumulated a bunch of whitepapers for string searching |
01:27:14 | EXetoC | it 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:08 | flaviu | Wow, nimrod has a virtual machine to do compile-time code execution |
02:16:07 | Demos | yup |
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:21 | Varriount | For 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:23 | Demos | Varriount: 2 working (more or less) vms! |
02:51:31 | Varriount | Hey 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:58 | Demos | Varriount: Not sure. Windows has something that kinda smells like a hard link |
02:52:26 | Demos | also afaik files and directories are more seperate in windows than they are in linux |
02:52:29 | Varriount | Well, it has hard links, however on any file system, hard links are hard to detext. |
02:52:44 | Demos | I guess that is kinda the point :D |
02:55:38 | * | BitPuffin quit (Ping timeout: 240 seconds) |
02:56:46 | Varriount | Why does Window's C run-time contain "Bessel" Procedures? http://msdn.microsoft.com/en-us/library/h7zkk1bz.aspx |
02:59:38 | Demos | maybe it was common in older programs, maybe they wanted to use it as a debugging thing. Who knows |
03:01:06 | Varriount | Demos: Do you know of any reason why Nimrod can't use Window's _stat routines? |
03:02:55 | Demos | no, the MSDN page does not mention anything that would make it "bad" |
03:03:34 | Varriount | Hm. Would it cause nimrod to require microsofts sdk, instead of, say, MingW? |
03:07:05 | Varriount | Gah. It comes to somethings when you can't find a routine's implementation in an open source project. |
03:07:53 | Demos | well the whole point of mingw is to link aganst microsofts system libs |
03:08:09 | Demos | and we will treat cygwin as a *NIX (although cygwin is kinda broken) |
03:08:30 | Varriount | Oh. Hm. |
03:10:30 | Varriount | Demos: 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:49 | Varriount | And if I do those things, how I should go about implementing them. |
03:11:22 | Demos | well 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:58 | Varriount | Aha, bingo! http://msdn.microsoft.com/en-us/library/windows/desktop/aa446654(v=vs.85).aspx |
03:41:15 | Varriount | Demos: The windows implementation of getFileInfo() is finished. Now I just need to test it. :D |
03:41:35 | Demos | yay! |
03:42:57 | * | Varriount wishes someone else would do the Linux/Posix implementation |
03:49:10 | * | brson joined #nimrod |
03:49:40 | Varriount | Demos: It's aliiiiiive!! Muahahahaha!!!! |
03:52:20 | * | shodan45 quit (Quit: Konversation terminated!) |
04:24:07 | * | DAddYE joined #nimrod |
04:43:06 | Skrylar | Varriount: my boring wrapper senses are tingling |
04:43:10 | Skrylar | lol |
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:55 | Demos | is 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:42 | Araq | Demos: no; you're supposed to put it in a project specific config file |
07:07:28 | Demos | but I want to have like when defined(allStatic): do all the linker stuff |
07:11:15 | Araq | I 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:20 | Araq | hi zezba9000 welcome (back) |
07:30:42 | zezba9000 | Araq: Hey whats up! |
07:31:14 | zezba9000 | So Roslyn just came out, which I still may look into converting C# to Nimrod :) |
07:32:04 | zezba9000 | Ive been doing a bunch of tests with C# Mono vs C++ on iOS desktop ect and its just a lot slower |
07:33:05 | zezba9000 | Also .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:32 | zezba9000 | So Nimrod still looks like the best option for performance! |
07:42:26 | zezba9000 | The one thing I want to try and do with Nimrod at some point is get it to compile for Windows8 and WP8 |
07:43:22 | Araq | hmm I think Varriount runs it on windows 8, not sure what you mean |
07:43:33 | zezba9000 | I 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:51 | Araq | unlikely though |
07:44:00 | Araq | btw I've skimmed Roslyn as well :-) |
07:44:01 | zezba9000 | Araq: Win8 (METRO) I mean |
07:44:14 | zezba9000 | What did you think of Roslyn? |
07:44:43 | zezba9000 | Looks like it was organised well at least |
07:45:05 | Araq | parts of it are very well written ... other parts not so much, just like in our compiler |
07:45:17 | zezba9000 | haha i'm sure |
07:45:41 | Araq | I wonder if they submitted the whole test suite though |
07:45:57 | zezba9000 | Mono'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:05 | Araq | or if I miss something, I only counted ~ 350 tests for the C# compiler |
07:46:32 | zezba9000 | They may still have stuff to add like that not sure |
07:47:20 | Araq | I bet F#'s compiler implementation is much cleaner though |
07:48:11 | Araq | Roslyn still uses that archaic mixture of pattern matching (switch) and the visitor pattern |
07:48:18 | zezba9000 | Ya 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:34 | Araq | F# is superb |
07:50:11 | zezba9000 | for .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:25 | Araq | I'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:29 | Araq | declaration order wrong, {} annoying to type, if requires (), it's almost like Lisp but without Lisp's benefits |
07:53:21 | zezba9000 | I heard your keyboard is not a English layout and brackets are hard to type? |
07:53:53 | Araq | yeah |
07:54:15 | zezba9000 | I 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:14 | Araq | that's actually my major gripe with them |
07:55:52 | Araq | I can't see how } } } split out over 3 lines improves anything for "grouping" stuff |
07:55:58 | * | konversya joined #nimrod |
07:56:05 | zezba9000 | I'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:45 | Araq | I like to have lots of code on the screen at once, } take up valuable screen space |
07:57:09 | zezba9000 | Do you not put returns in your code to seperate ideas though? |
07:57:47 | zezba9000 | Brackets are just the same thing, but give clear indication of an idea (to me at least) |
07:58:00 | Araq | a 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:19 | zezba9000 | Do you like Visual Basic style? |
07:58:41 | zezba9000 | But a return is not a flow control on a "if" block? |
07:58:50 | zezba9000 | not in C++ |
07:59:11 | zezba9000 | If you have a huge if statment how do you multi-line it? |
07:59:57 | Araq | sometimes I use an empty line to end the 'if' |
08:00:06 | Araq | most of the time I don't |
08:01:10 | Araq | visual 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:41 | zezba9000 | But 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:48 | Araq | hey don't argue with me over syntax |
08:03:07 | zezba9000 | lol |
08:03:48 | zezba9000 | How would find the best way to write the creation of a Matrix4x4 identity matrix? |
08:06:01 | zezba9000 | In 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:42 | Araq | er math uses one pair of () and indentation to denote the dimensions ... |
08:08:13 | Araq | math certainly doesn't use 'new Vector4(1, 0, 0, 0)' lol |
08:08:15 | zezba9000 | I'm saying the numbers are layed out in the way I presented |
08:08:32 | zezba9000 | brackets just allow for the returns, no? |
08:08:57 | zezba9000 | http://en.wikipedia.org/wiki/Identity_matrix |
08:09:45 | Araq | ah you mean 'return' for 'newline'? |
08:09:47 | zezba9000 | Araq: 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:03 | zezba9000 | yes |
08:11:13 | zezba9000 | Is 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:34 | Araq | of course it is wrong lol |
08:11:46 | Araq | nimrod and F# are all about *layout* |
08:12:02 | Araq | layout is important, { ; } are not |
08:12:07 | * | papilio joined #nimrod |
08:12:12 | Araq | hi papilio |
08:12:15 | Araq | welcome |
08:12:54 | * | vendethiel quit (Quit: q+) |
08:13:11 | Araq | and of course you can layout a matrix nicely in nimrod/F#/python |
08:13:32 | * | brson quit (Quit: leaving) |
08:14:31 | Skrylar | dom96: the answer to moving local branches is rebase |
08:14:36 | zezba9000 | Is there an example of a multi-line constructor being called in Nimrod I can look at? |
08:15:44 | Skrylar | rebase 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:21 | zezba9000 | In 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:35 | Mat3 | hi all |
08:18:37 | Araq | zezba9000: this is it in nimrod: https://gist.github.com/Araq/9988909 |
08:19:14 | Araq | but it contradicts my argument as array constructors still use [ , ] and not really rely on whitespace :-) |
08:19:31 | zezba9000 | What about Vector based one not full array version? |
08:19:49 | zezba9000 | Just replace [...] with Vector4(...) ? |
08:19:52 | Araq | then you have Vector(1, 0, 0) as a line |
08:19:56 | Araq | yeah |
08:20:35 | zezba9000 | Araq: 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:56 | zezba9000 | Also 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:56 | zezba9000 | Well are you only talking about the {..} brackets you don't like then? |
08:22:07 | zezba9000 | and ';' marks |
08:22:48 | Araq | it'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:34 | Mat3 | ah, syntax related discussions going on here again |
08:24:10 | Araq | constructors and function application still use (, ) as it leads to excessive indentation otherwise |
08:24:39 | Araq | that doesn't mean I wouldn't like to write: |
08:24:47 | Araq | const Identity = |
08:24:50 | Araq | 0 1 0 |
08:24:55 | Araq | etc. |
08:24:58 | * | papilio quit (Ping timeout: 240 seconds) |
08:25:06 | zezba9000 | I understand getting rid of the ';' mark as it logically doesn't do anything. But '{}' marks I don't understand how that helps |
08:26:22 | zezba9000 | So you would like to write "array = 0 1 2" vs "array = [0, 1, 2]" ? |
08:26:38 | Araq | that depends on the context :P |
08:26:53 | zezba9000 | But [,,,] gives context |
08:26:58 | zezba9000 | Thats there point |
08:27:07 | * | DAddYE quit (Remote host closed the connection) |
08:28:00 | Araq | sure but that context might be entirely redundant |
08:28:09 | Mat3 | Araq: const Identity : vector = 0x000100 <- how about that ? |
08:28:20 | Araq | which it is if you use indentation ... |
08:29:09 | zezba9000 | But something that helps you understand the context when looking at others code is not redundant |
08:29:27 | Araq | what'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:38 | zezba9000 | So you can do "echo 1,2,3" or "echo [1,2,3]" |
08:30:47 | Araq | and 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:44 | Araq | and no, you can't do that because echo 1,2,3 already means echo 1; echo 2; echo 3 |
08:31:46 | zezba9000 | Not to the person looking at the other persons code? |
08:32:20 | Araq | I look at other person's code all day long. usually it's shit but I am able to understand it just fine... |
08:34:49 | Araq | no 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:52 | zezba9000 | I 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:36 | zezba9000 | lol i'm pissing you off arn't I :p |
08:35:36 | Araq | there are 2 ways to design a programming language: |
08:35:49 | Araq | a) assume programmers are smart |
08:35:59 | Araq | b) assume programmers are idiots |
08:36:27 | Araq | (b) is obviously true but leads to languages that I don't want to touch. |
08:36:34 | * | Trimsty joined #nimrod |
08:36:52 | zezba9000 | But thats a false dichotomy as there are both at the same time :) |
08:38:26 | Araq | Mat3: that's mildly disgusting as it only makes sense in base 16 |
08:41:25 | zezba9000 | Anyway sry for being irritating, just trying to relay a perspective. |
08:41:30 | Araq | zezba9000: 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:06 | Araq | it is not "easier to parse" for humans that way because humans look at the layout |
08:42:16 | Mat3 | Araq: I suppose every programmer can handle it |
08:42:20 | * | [1]Endy quit (Ping timeout: 268 seconds) |
08:42:47 | Skrylar | Araq: but.. but java is the bestest |
08:42:54 | Araq | and 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:35 | zezba9000 | Araq: If that was to me, I would just say an argument from authority is irrelevant... |
08:48:17 | zezba9000 | But 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:21 | Mat3 | zezba9000: http://www.ioccc.org/ |
09:03:50 | Araq | argument from authority sucks indeed but it helps to shut down meaningless discussions |
09:04:59 | * | gabber_ joined #nimrod |
09:05:06 | Araq | hi gabber_ welcome |
09:05:28 | gabber_ | Hello. Does anybody know if it is possible to draw to the screen with cairo, instad of to a file? |
09:05:32 | gabber_ | Hi araq |
09:05:56 | Araq | yeah but you likely need to setup an OS dependent drawing context |
09:06:05 | zezba9000 | Mat3: Is this something you participated in? |
09:06:33 | gabber_ | I can't get the sdl example to work, so that is why I wanted to try cairo |
09:08:22 | Araq | what's wrong? DLL hell again? |
09:08:35 | Mat3 | zezba9000: no, but quite impressing and shows most problems of these quick and dirty portability hack named 'C' |
09:09:56 | gabber_ | 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:12 | Mat3 | gabber_: I assume you work on Windows and get no visible window aftter compilation ? |
09:11:35 | gabber_ | I am teacher, and I want to write simple visual physics programs with a graphical output |
09:12:03 | gabber_ | I got as far as a purple screen |
09:12:27 | gabber_ | I am windows 8 64 bit. So presumably I should install the 64 bit sdl? |
09:12:52 | Araq | that depends. but usually on windows nimrod is in 32bit mode |
09:12:58 | Araq | so you need 32 bit DLLs |
09:13:00 | gabber_ | (although, would that then mean that the program would only run on other 64 bit machines?) |
09:13:09 | zezba9000 | Mat3: 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:37 | zezba9000 | **Compute Shaders |
09:13:38 | gabber_ | ok, I will try again with 32 bit |
09:13:48 | Araq | (yes about the 64bit question) |
09:14:13 | gabber_ | and sdl1.2, not version 2? |
09:14:20 | Araq | exactly |
09:14:39 | gabber_ | and the runtime libraries or the development libraries? |
09:14:42 | gabber_ | (sorry !) |
09:16:39 | Araq | runtime libraries |
09:16:51 | Araq | development libraries are generally not necessary for nimrod |
09:17:21 | Araq | let me know if found these please so I can include them in the next release |
09:17:32 | Mat3 | zezba9000: Just see C as some kind of obfuscated portable assembler language (personally I still prefer a good macro assembler) |
09:17:35 | gabber_ | 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:43 | Araq | the one where your built .exe resides in |
09:19:04 | gabber_ | ok, thanks |
09:20:35 | zezba9000 | Mat3: 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:18 | Araq | zezba9000: when will your brother deliver the changes to the docgen? |
09:21:46 | zezba9000 | I saw him working on it a little today |
09:22:19 | zezba9000 | He is making sure its full of back doors and Ads before release ;) |
09:22:54 | gabber_ | 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:02 | Araq | hmm that should work then. how do you start the exe? |
09:24:16 | Araq | make sure you 'cd' to the directory properly |
09:24:45 | Araq | > bin\myproject.exe # won't work |
09:24:47 | Araq | cd bin |
09:24:55 | gabber_ | I have tried clicking the exe, and typing sdlex.exe in the console |
09:24:59 | Araq | myproject.exe # exe finds the image then |
09:25:55 | gabber_ | 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:09 | gabber_ | (but nimrod is in my global environment) |
09:26:27 | Araq | no it's just the .exe looks in the current working directory for the image |
09:26:40 | Araq | so you need to ensure the current working directory has the image |
09:27:04 | Araq | but clicking on the exe and having the imagine in the same folder should work |
09:27:11 | Araq | so I'm a bit lost |
09:27:11 | gabber_ | but I have sdlex.exe and tux.png in the same folder, is that not the same? |
09:29:38 | Araq | gabber_: try to give it a full path name like: IMG_load(r"C:\files\tux.png") |
09:30:47 | Araq | (note the leading r in the string literal to suppress \ escape sequences) |
09:31:06 | gabber_ | Compiled successfully, but again a purple screen and the same error in the console ! |
09:37:28 | Araq | use a real .png then :P |
09:37:51 | Araq | maybe the png's version is wrong or something |
09:38:30 | Araq | quit($sdl_image.getError()) # try that instead of the 'echo "Failed ..." ' |
09:38:57 | Mat3 | zezba9000: 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:08 | Araq | he, I'm not sure about the *high level*. one of my goals was to make "level agnostic" |
09:41:30 | Mat3 | sure, but the possibility to AST modification is quite common for so called 'high level languages' |
09:44:26 | zezba9000 | Mat3: ok... not sure what I thought I need to "rethink". |
09:45:09 | gabber_ | I get: error: undeclared identifier: 'getError' |
09:48:13 | Araq | quit($sdl.getError()) # try that instead of the 'echo "Failed ..." ' |
09:50:05 | gabber_ | It flashes a purple screen, and the console says failed loading libpng15-15.dll: The specified module could not be found. |
09:56:09 | Araq | well that is your problem then |
10:00:02 | gabber_ | 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:31 | Araq | well you got SDL working so you should use the graphics module |
10:05:11 | Araq | nimrod c -r lib\impure\graphics.nim |
10:05:47 | Araq | press ESC to quit this program |
10:08:52 | foodoo | I just tried that for fun and I get: /usr/bin/ld: cannot open output file /usr/lib/nimrod/impure/graphics: Permission denied |
10:09:39 | foodoo | Does 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:45 | gabber_ | 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:17 | gabber_ | Foodoo, yes, I had to move the graphics.nim file out onto my dekstop first |
10:11:39 | gabber_ | foodoo, may I asked how you installed sdl ? |
10:11:44 | gabber_ | *ask |
10:12:14 | foodoo | gabber_: 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:35 | gabber_ | Ah , ok, thanks. I am on windows, it is driving me insane |
10:13:06 | gabber_ | Do you know how to draw a simple shape using graphics/sdl ? |
10:14:31 | EXetoC | gabber_: 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:55 | EXetoC | you should find it if you do a search for sdl_ttf |
10:15:03 | gabber_ | OK, will do, thanks |
10:15:12 | * | [1]Endy joined #nimrod |
10:15:34 | foodoo | gabber_: This might help you: http://lazyfoo.net/SDL_tutorials/lesson09/index.php |
10:17:01 | Mat3 | Araq: 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:20 | Mat3 | ^for direct memory storage |
10:17:36 | foodoo | Mat3: "word" as in CPU register size? |
10:17:51 | Mat3 | yes |
10:22:31 | gabber_ | 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:43 | Araq | Mat3: we now have "unchecked" arrays, but you can also do: (cast[ptr int](p))[] |
10:22:48 | Araq | gabber_: no wait a sec please |
10:23:36 | gabber_ | ok, i'm still here |
10:25:39 | Araq | damn there used to be a nice download package that just has every sdl.dll there is :-) |
10:26:01 | gabber_ | that sounds like what I need ! |
10:26:15 | EXetoC | zezba9000: anything other than whitespace to specify blocks is redundant |
10:26:57 | Mat3 | Araq: thanks |
10:27:14 | zezba9000 | EXetoC: not if you write code in windows notepad |
10:27:47 | EXetoC | you might still not like it, but many people do |
10:28:04 | EXetoC | zezba9000: you shouldn't. what difference does that make though? |
10:28:28 | Araq | gabber_: just a few more minutes, need to switch computers and upload things to our server |
10:28:46 | EXetoC | hey, wait a second, "echo 1, 2, 3" != "echo [1, 2, 3]" :p |
10:29:04 | gabber_ | ok, no probs. I also want to have a play around with some gui libraries. can't be any worse than sdl ! |
10:29:26 | zezba9000 | EXetoC: I think there is a balance. Finding it requires research. |
10:30:16 | EXetoC | tell me if you find research that concludes that redundancy is good |
10:30:38 | zezba9000 | EXetoC: 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:06 | zezba9000 | **custom operators |
10:31:33 | zezba9000 | redundancy depends on the context and how people use something |
10:32:08 | zezba9000 | I only have my own uses I can speak too. |
10:36:05 | EXetoC | you 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:49 | EXetoC | and so we only support limited cases of that, such as "if x: return" |
10:40:03 | zezba9000 | If 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:26 | zezba9000 | Depends, sometimes giving things a little more context is not bad |
10:42:12 | EXetoC | context is relevant here, but not when it comes to brackets |
10:43:54 | zezba9000 | maybe the option for both makes most sense idk |
10:43:57 | Mat3 | zezba9000: 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:07 | EXetoC | you 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:52 | EXetoC | zezba9000: alternative syntaxes was considered, but then scrapped at one point. |
10:44:52 | zezba9000 | int 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:03 | EXetoC | that's a different point, which I agree with nevertheless |
10:50:31 | zezba9000 | IF the IDE/text editor gave a washed out color boardered backdrop for each method block, I would say brackets are redundent |
10:51:50 | zezba9000 | Just 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:05 | zezba9000 | Scratch on Raspberry Pi might be a similar idea of what i'm getting at |
10:55:41 | Araq | gabber_: http://nimrod-code.org/download/dlls.zip |
10:55:42 | Araq | unfortunately without SDL_ttf.dll ... -.- |
10:56:23 | Araq | the internet seems to lack a copy of SDL_ttf for SDL version 1.2 ... |
10:56:34 | Araq | we really need to switch to SDL 2.0 |
10:56:45 | * | gXen joined #nimrod |
10:57:09 | Mat3 | zezba9000: 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:23 | EXetoC | zezba9000: alternative representations provided by an IDE? that is indeed very difficult, but anyone is free to do it |
10:58:29 | gabber_ | Thanks Araq, I will have a go with that |
10:59:26 | EXetoC | that was also discussed, and I think it's a lot less bad for various reasons |
11:00:31 | EXetoC | but 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:30 | Araq | gabber_: as I said, it's unlikely to work |
11:02:45 | Araq | will compile SDL_ttf.dll on my own I guess |
11:02:50 | Araq | but need to go now, see you later |
11:04:41 | zezba9000 | EXetoC: 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:15 | zezba9000 | would be a cool IDE feature for any lang |
11:05:26 | gabber_ | thanks for your help araq. I'll come back another time. |
11:06:50 | zezba9000 | anyway i'm going to bed |
11:07:04 | * | zezba9000 left #nimrod (#nimrod) |
11:07:06 | dom96 | hello everyone |
11:07:10 | dom96 | hey gabber_, wait! |
11:07:35 | gabber_ | Hi Dom. This is matt from the other night - as you can see I am still struggling with sdl ! |
11:08:06 | dom96 | Glad you came back. Dependencies suck eh? |
11:08:43 | gabber_ | They certainly do. It seems near impossible to get sdl working on windows, or at least on MY windows |
11:09:31 | dom96 | Don't worry, it's certainly possible. Let me try to find the DLLs too. |
11:09:55 | gabber_ | Thanks very much. Did araq explain the issue to you? |
11:10:12 | dom96 | I read your discussion. |
11:10:19 | gabber_ | ok, thanks |
11:11:38 | EXetoC | SDL 1.2 you mean? surely it's easy to get it working in general |
11:11:52 | EXetoC | but you need to know where to put stuff if you don't have a package manager |
11:12:37 | gabber_ | I haven't the foggiest about these sdl files ! |
11:17:54 | Mat3 | hi dom96 |
11:19:51 | Mat3 | and EXetoC |
11:21:24 | dom96 | gabber_: try these: http://picheta.me/private/sdl.zip |
11:21:32 | dom96 | hey Mat3 |
11:21:43 | gabber_ | thanks, will do |
11:21:57 | dom96 | weird that the sdl website doesn't have sdl_ttf 1.2 DLLs anymore. |
11:22:09 | dom96 | I still had one lying around though |
11:23:17 | Mat3 | there concentrate on SDL 2 |
11:23:47 | dom96 | Yeah, I think we should just update the sdl wrapper to sdl 2 |
11:24:27 | Mat3 | good idea |
11:25:18 | gabber_ | 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:20 | dom96 | which version of Nimrod are you using? |
11:27:01 | gabber_ | 0.9.2.exe , from the nimrod homepage |
11:27:11 | dom96 | try grabbing the latest from github |
11:27:25 | dom96 | https://github.com/Araq/Nimrod#compiling |
11:27:38 | Mat3 | dom96: 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:27 | gabber_ | Not sure if I have those dependencies to build from source |
11:34:29 | dom96 | gabber_: 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:44 | gabber_ | Thanks, downloading now |
11:38:25 | gabber_ | As before it compiles ok and says success. But I get the same error in the console when I run graphics.exe |
11:39:05 | dom96 | damn, maybe it's a Windows 64-bit issue. |
11:39:15 | EXetoC | did you compile it with the new build? |
11:39:26 | EXetoC | nimrod -v |
11:39:34 | gabber_ | yes, I compiled it again |
11:41:38 | gabber_ | 0.9.3 |
11:41:50 | gabber_ | windows i386 |
11:43:25 | gabber_ | 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:13 | dom96 | gabber_: Try commenting out line 516 and 517 in graphics.nim |
11:45:58 | gabber_ | Comment is #? |
11:46:03 | EXetoC | yes |
11:49:00 | gabber_ | Hurrah, I have some shapes drawn ! I had to comment out some other instances of ellipse too, then it worked |
11:49:23 | gabber_ | I didn't realise graphics.nim was an example program, I thought it was a library |
11:49:59 | dom96 | it is, the stuff under when isMainModule is the example |
11:50:04 | * | [2]Endy joined #nimrod |
11:50:06 | dom96 | it happens to be in the same file |
11:50:08 | Mat3 | ciao |
11:50:14 | * | Mat3 quit (Quit: Verlassend) |
11:50:42 | gabber_ | Oh ok, You have all been really supportive, so thank you |
11:52:25 | dom96 | no worries |
11:53:31 | EXetoC | people on reddit hating on the name 'echo'. amazing |
11:53:36 | * | [1]Endy quit (Ping timeout: 255 seconds) |
11:53:50 | dom96 | where? |
11:54:15 | EXetoC | http://www.reddit.com/r/programming/comments/1x8chx/dr_dobbs_nimrod_a_new_systems_programming_language/ |
11:54:28 | EXetoC | they're not recent comments |
12:05:40 | dom96 | ahh |
12:38:09 | * | q66 joined #nimrod |
12:38:35 | * | lanior quit (Quit: Page closed) |
12:40:58 | foodoo | is echo from pascal? |
12:48:43 | EXetoC | couldn't find anything about that when googling |
12:49:12 | EXetoC | bash? |
12:49:24 | EXetoC | cmd? |
12:51:27 | foodoo | PHP has it |
12:51:50 | EXetoC | I bet that's the inspiration |
12:53:49 | foodoo | Araq seems to be someone who has a good taste regarding programming languages. bash,cmd and PHP are bad canidates ;) |
12:54:44 | dom96 | I 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:42 | EXetoC | makes sense. print-debugging in java for example must be a real pain |
12:58:06 | EXetoC | or maybe not, cus, well-developed IDEs |
12:58:09 | foodoo | *gg* |
12:59:25 | * | q66 joined #nimrod |
13:06:41 | * | io2 joined #nimrod |
13:08:41 | NimBot | Araq/Nimrod devel 91b710a Jason Livesay [+0 ±1 -0]: Allow multi/exec replies so transactions work. |
13:08:41 | NimBot | Araq/Nimrod devel 8804c01 Jason Livesay [+0 ±1 -0]: Support transactions |
13:08:41 | NimBot | Araq/Nimrod devel bb39e2c Dominik Picheta [+0 ±1 -0]: Merge pull request #1066 from ithkuil/devel... 2 more lines |
13:11:30 | EXetoC | Araq: 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:13 | EXetoC | through 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:58 | dom96 | Awesome. Github webhooks support other events now. |
13:23:15 | dom96 | !addrepo nimrod-code gtk2 |
13:23:15 | NimBot | Done. |
13:23:15 | dom96 | !add nimrod-code gtk2 |
13:24:15 | dom96 | Got line from github: { "payload": { "zen": "Keep it logically awesome.", "hoo |
13:24:15 | dom96 | k_id": 2054792 }} |
13:24:15 | dom96 | Thanks for that github... |
13:31:05 | * | Mat3 joined #nimrod |
13:34:53 | Mat3 | I need to do some pointer arithmetic, any way ? |
13:40:16 | EXetoC | Mat3: yes, by either treating it as 'array ptr...' (cast), or by using that module created by fowl |
13:41:01 | Mat3 | module, which module ? |
13:41:15 | EXetoC | I think that's fine, partially because you enable bounds-checking, but others think it's too inconvenient apparently |
13:41:40 | EXetoC | Mat3: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/pointer_arithm.nim |
13:42:12 | EXetoC | found this too https://github.com/fowlmouth/nimlibs/blob/master/fowltek/genericpointer.nim |
13:44:14 | Mat3 | thanks |
13:47:17 | NimBot | nimrod-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:31 | Mat3 | ciao |
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:31 | Araq | EXetoC: I've never seen makeRangeWithStaticExpr. :-) |
15:47:51 | foodoo | Is there already a known attempt to do a Gtk3 wrapper for Nimrod? |
15:47:52 | Araq | dom96: capturing of a tuple unpack has already been reported. it's easy to fix now with lowerings.nim |
15:48:20 | Araq | foodoo: I don't think so but gtk2 is close to gtk3 |
15:48:26 | * | foodoo quit (Remote host closed the connection) |
15:48:42 | EXetoC | uh ok |
15:48:53 | dom96 | Araq: Alright. Close my issue then and reference the other issue which reports it. |
15:49:03 | Araq | dom96: not my point. |
15:49:14 | Araq | my point is: high prio? |
15:49:18 | dom96 | Nope. |
15:49:23 | Araq | ok |
15:49:29 | * | foodoo joined #nimrod |
15:49:40 | foodoo | (wrong key combination) |
15:49:52 | Araq | foodoo: I don't think so but gtk2 is close to gtk3 |
15:51:33 | foodoo | I just noticed: c2nim has a year 2013 copyright notice |
15:53:48 | dom96 | foodoo: If you are thinking of wrapping gtk3 then by all means do it. |
15:53:58 | * | rleisti joined #nimrod |
15:55:24 | foodoo | Seems 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:59 | fowl | what is this new error client.nim(93, 21) Error: field not initialized: parent |
16:02:04 | dom96 | Araq: I could have sworn that enums could take tuples as values. |
16:02:52 | dom96 | oh, the tuple must be of a certain type. |
16:03:04 | fowl | dom96, its a tuple of (string rep, value) |
16:03:38 | EXetoC | (T, string)? |
16:04:25 | dom96 | yeah, it seems to be the other way around. |
16:04:33 | dom96 | T needs to be ordinal though |
16:04:53 | Araq | fowl: ranges that don't include 0 need to be initialized, same for not nil pointers |
16:07:49 | dom96 | Error: 'yield' cannot be used within 'try' in a non-inlined iterator :( |
16:08:13 | fowl | Araq, i dont use those things :? |
16:09:19 | dom96 | That'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:02 | foodoo | What 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:29 | dom96 | dynlib 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:58 | dom96 | You should only use either dynlib or header, not both. For gtk you probably want dynlib everywhere. |
16:15:48 | Araq | fowl: report it then |
16:16:19 | Araq | dom96: C# has the same limitation or at least used to have |
16:16:59 | Araq | the problem is that 'yield' comes back and then the exception handling frame disappeared |
16:17:00 | dom96 | What is the reason for this limitation? |
16:17:14 | fowl | Araq, lol, i put parent:nil in the constructor |
16:17:24 | fowl | and it works |
16:17:43 | foodoo | Any general advice on how to approach wrapping gtk3? |
16:18:04 | foodoo | Like, which header files should I start with? |
16:18:07 | Araq | foodoo: use c2nim on the GTK headers or find out the diff between gtk2 and gtk3 |
16:18:37 | Araq | most likely you start with glib and despair already :P GTK is HUGE |
16:19:06 | foodoo | Is glib.nim also outdated? |
16:19:53 | dom96 | Araq: How about return? |
16:20:11 | Araq | dom96: return doesn't come back so doesn't have this problem |
16:20:12 | dom96 | In this case I want to finish the iterator. |
16:20:20 | dom96 | So return will work? |
16:20:25 | Araq | it should, yes |
16:20:36 | dom96 | I should be able to change my macro to generate that instead then |
16:21:05 | Araq | thinking about it, I think we can support 'yield' in 'try' but only for the C backend... *sigh* |
16:21:43 | dom96 | But someone will at some point try the following: try: call() except EOS: await socket.send("ERROR OCCURED") |
16:21:54 | dom96 | that has to generate a yield |
16:22:58 | Araq | hmm we can support it in 'except' I think |
16:23:37 | dom96 | Alright. It's not high priority though. |
16:25:02 | dom96 | oh dear. |
16:25:47 | dom96 | Changed it to generate a return stmt and the compiler crashes when it's printing the macro stack trace |
16:27:04 | foodoo | Araq: "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:27 | Araq | foodoo: so you're lucky |
16:27:44 | foodoo | Glib is not Gtk-specific after all |
16:28:04 | foodoo | You probably had to port it in order to get Gtk working, right? |
16:28:20 | Araq | right |
16:28:43 | foodoo | How long did wrapping Gtk2 take for you? |
16:28:59 | Araq | dom96: I reverted to the old select but irc still crashes |
16:29:26 | dom96 | with the same error? |
16:29:37 | Araq | can't remember, I used pas2nim. maybe a week, foodoo |
16:29:50 | Araq | dom96: yes |
16:29:52 | foodoo | I would have guessed at least a month |
16:30:00 | dom96 | that's weird. |
16:30:30 | dom96 | Araq: Take a look at the compiler crash instead please. |
16:30:36 | dom96 | Edit line 774 in asyncdispatch.nim |
16:30:43 | dom96 | nnkYieldStmt -> nnkReturnStt |
16:30:44 | dom96 | *stmt |
16:30:54 | dom96 | and compile tests/async/tasynawait |
16:35:19 | Araq | gah I dont even get a stack trace |
16:35:31 | dom96 | yep it crashes. |
16:35:34 | Araq | stack overflow I guess |
16:39:22 | dom96 | wow, amazing how much lag echo can add. |
16:49:59 | dom96 | Araq: Looks like the GC gave up on me again :( |
16:50:40 | * | mwpher joined #nimrod |
16:50:55 | dom96 | brb |
16:54:34 | EXetoC | Araq: why do hex float literals require 'f32/'f64? |
16:55:32 | EXetoC | 0x0.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:31 | Araq | dom96: with your change processBody calls itself recursiveky |
17:10:45 | Araq | endlessly |
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:05 | dom96 | Araq: Why does it do that? |
17:48:15 | Araq | because you wrote it that way |
17:48:48 | dom96 | oh 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:19 | dom96 | Araq: Doesn't look good does it? https://gist.github.com/dom96/2dc313817c551be579a3 :( |
18:00:02 | * | horrid joined #nimrod |
18:00:20 | Araq | hi horrid welcome |
18:00:39 | Araq | dom96: tried with -d:useSysAssert -d:useGcAssert ? |
18:00:55 | dom96 | Nope. I'll try that now. |
18:01:12 | dom96 | It seems that at first I get a couple of incorrect strings. |
18:04:27 | dom96 | Araq: Can't reproduce with those defines |
18:05:46 | dom96 | This crash seems to depend on the speed of the requests. |
18:06:06 | Araq | ok ... |
18:20:21 | Araq | try it with --gc:markAndSweep and with disabling the cycle collector then please |
18:20:30 | foodoo | c2nim can't handle multiline macro definitions with backslashes at the end of lines. Correct? |
18:23:12 | dom96 | Araq: How do I disable the cycle collector? |
18:23:13 | EXetoC | something along those lines. neither does it handle contatenation (##) IIRC |
18:24:11 | dom96 | Araq: Mark and sweep crashes almost immediately. |
18:24:48 | Araq | foodoo: I think it can handle that |
18:30:49 | dom96 | Is that good or bad? |
18:31:29 | Araq | immediate crashes are usually easier to debug |
18:35:17 | foodoo | Araq: Can I also write Nimrod code into a header file and telll c2nim to take it the way it is? |
18:38:26 | Araq | hmmm I don't think ss |
18:38:27 | Araq | *so |
18:40:59 | foodoo | How should I handle something like this? http://pastebin.com/9K7siTHB |
18:41:15 | foodoo | This adds are modifier to a function prototype on Windows |
18:42:21 | foodoo | And I don't have Windows available |
18:43:04 | Araq | use #def instead of #define |
18:43:22 | * | horrid quit (Remote host closed the connection) |
18:48:34 | foodoo | http://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:28 | Araq | hi jbe wb |
18:54:54 | jbe | hi Araq thanks |
18:55:44 | Araq | foodoo: #ifndef cairo_public means c2nim doesn't see your #def |
18:56:23 | * | Demos joined #nimrod |
18:57:47 | jbe | i'm messing around with deeply nested templates to try and understand how they affect compiler performance.. |
19:00:00 | foodoo | Araq: 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:23 | Araq | foodoo: just use #def cairo_public |
19:01:33 | Araq | and get rid of the other # lines |
19:01:50 | foodoo | okay. And what about the Windows users? |
19:03:40 | Araq | you need to provide #dynlib anyway |
19:03:59 | Araq | and this will take care of the windows users |
19:05:35 | NimBot | Araq/Nimrod devel cd6953d Araq [+0 ±1 -0]: new VM: proper shield against endless recursions |
19:05:35 | NimBot | Araq/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:22 | jbe | i just noticed that nesting templates that are not immediate cause an exponential increase in compile time.. is that a bug? |
19:15:59 | jbe | btw i'm not using latest devel |
19:17:59 | Araq | jbe: yeah I think so. but it is not related to templates but to nested calls |
19:18:20 | Araq | it's on my todo ... |
19:18:29 | * | foodoo quit (Remote host closed the connection) |
19:20:55 | jbe | ah 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:13 | NimBot | nimrod-code/gtk2 master 10f3f01 simargl [+0 ±1 -0]: Update gtk2.nim... 3 more lines |
19:21:13 | NimBot | nimrod-code/gtk2 master 6031a9a Dominik Picheta [+0 ±1 -0]: Merge pull request #3 from simargl/master... 2 more lines |
19:21:54 | Araq | jbe: do you have a small example showing the problem? |
19:26:01 | jbe | Araq: well this is a contrived basic example https://gist.github.com/jbe/9996803 |
19:28:27 | NimBot | Araq/Nimrod devel 9b6b867 Dominik Picheta [+0 ±1 -0]: Proper handling of disconnections during reading in httpclient. |
19:28:27 | NimBot | Araq/Nimrod devel 895191e Dominik Picheta [+0 ±6 -0]: Merge branch 'devel' of github.com:Araq/Nimrod into devel |
19:28:27 | NimBot | Araq/Nimrod devel 404a579 Dominik Picheta [+0 ±2 -0]: Asyncdispatch fixes.... 4 more lines |
19:28:27 | NimBot | Araq/Nimrod devel df2e4d7 Dominik Picheta [+1 ±0 -0]: Added asynchttpserver module. |
19:33:39 | Araq | er wait a sec |
19:33:54 | Araq | dom96: does that mean async *client* is stable? |
19:35:42 | dom96 | I wouldn't call it stable yet. |
19:35:52 | dom96 | But it works. |
19:44:09 | Varriount | Araq: I got the Windows implementation of GetFileInfo working. Now for the Posix version. |
19:44:49 | Varriount | Are we aiming to support the Linux/Mac OSX birthTime extension for file creation time? |
19:45:57 | Araq | I think so, Varriount |
19:47:09 | jbe | it's not possible to have a template both take varargs and at the same time use ":" to pass a stmt right? |
19:48:43 | dom96 | Of course it would be great if someone tested it... |
19:48:56 | dom96 | You'd think people would be more excited about async await. |
19:50:37 | runvnc | dom96 I think that sounds exciting but I haven't been following closely. can you link me to something that explains it |
19:52:10 | dom96 | I 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:35 | dom96 | Goroutines are also similar. |
19:52:48 | Varriount | Araq: 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:51 | EXetoC | I also think it's exciting, but I can't think of much to do with it like I said |
19:53:33 | runvnc | I can think of a million things to do with it |
19:54:08 | runvnc | where is the code or an example. do you have a Task generic or something |
19:54:47 | EXetoC | go ahead then :p |
19:55:14 | runvnc | so if you have multiple types of i/o taking advantage of this |
19:55:24 | dom96 | https://github.com/Araq/Nimrod/blob/devel/lib/pure/asyncnet.nim#L155 |
19:55:33 | Araq | Varriount: just do nothing for now. which system doesn't track file creation anyway |
19:55:35 | runvnc | you can use this async await stuff instead of using multiple threads or processes |
19:55:49 | dom96 | Yes, precisely. |
19:56:20 | runvnc | which is a cleaner and easier programming model once you get used to it |
19:56:30 | dom96 | Nimrod's Task<T> equivalent is PFuture[T] |
19:56:34 | runvnc | if you have been doing a lot of threading for many years maybe you dont see the point right off the bat |
19:56:59 | Varriount | Araq: Hm. I don't know if BSD does. |
19:57:58 | dom96 | With 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:31 | dom96 | SOAP would be useful for example |
19:58:35 | runvnc | you can wrap them, and it won't block other parts of the program from running |
19:58:50 | runvnc | you could wrap them now but it would stop everything else while the request completed |
19:59:04 | runvnc | or I mean you could wrap them before without the async await stuff, just they would block |
19:59:25 | EXetoC | isn't that up to the implementer? |
19:59:53 | runvnc | yes, 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:56 | runvnc | its an awesome feature |
20:02:04 | runvnc | Can Rust do that? I doubt it |
20:02:06 | runvnc | lol |
20:03:15 | dom96 | Araq: It seems retFuture in the closure env becomes corrupted. |
20:04:22 | * | Demos quit (Ping timeout: 268 seconds) |
20:05:04 | dom96 | runvnc: The truly cool part is that it's implemented 100% with macros. |
20:13:24 | runvnc | this takes advantage of the existing iterator/yield stuff? |
20:15:10 | dom96 | yeah |
20:20:47 | Skrylar | wat. CMake now makes sublime text project files |
20:22:26 | Skrylar | I'm not sure how I feel about ST these days.. its been ~4 months since they've said anything :\ |
20:28:09 | EXetoC | good old DSLs |
20:30:21 | Skrylar | . . . someone has screwed up SDL2 |
20:30:45 | EXetoC | how? |
20:30:57 | Skrylar | the 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:44 | EXetoC | in the latest stable? |
20:31:47 | Skrylar | yerp |
20:31:51 | Skrylar | SDL-2.0.3 |
20:31:59 | EXetoC | >.< |
20:34:14 | Skrylar | looks 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:37 | Skrylar | i forgot about this part |
20:38:41 | Skrylar | watching C slowly compile things |
20:42:08 | EXetoC | nowhere near as slowly as C++ though, right? |
20:42:24 | dom96 | hey zezba9000, is your bro around? |
20:42:28 | EXetoC | I guess I haven't compiled particularly big C sources though, but still |
20:43:29 | * | foodoo joined #nimrod |
20:43:40 | Skrylar | EXetoC: nah; not that slow. I was building SDL2 on release mode |
20:43:44 | Matthias247 | compilation times in c++ depend heavily on which libraries you use |
20:43:52 | Skrylar | aaand c2nim chokes on those headers. yay |
20:44:31 | Matthias247 | Qt stuff compiles reasonably fast. boost stuff is a nightmare |
20:44:49 | Skrylar | yeaah thats one reason i never did much with OGRE |
20:45:00 | foodoo | Is boost mostly template based? |
20:45:05 | Skrylar | Ogre+Cegui do a lot for you, but Ogre has a lot of template hell and they both use boost |
20:45:10 | Skrylar | foodoo: yeah, template abuse |
20:45:18 | EXetoC | Skrylar: what does it choke on? |
20:45:30 | Skrylar | EXetoC: expecting semicolons in strange parts of SDL headers |
20:46:17 | Matthias247 | I guess boost has some coding guideline that says: You HAVE to wrap everything in templates so that nobody can understand it |
20:46:41 | Skrylar | Matthias247: they really really want to have LISP's nice things, but with the horrifying C++ syntax |
20:46:59 | EXetoC | Skrylar: that almost always happens. I suppose it could detect some common identifiers and then ignore them |
20:47:17 | EXetoC | but in the meantime, all you have to do is define said symbol to nothing |
20:47:37 | Skrylar | EXetoC: no, it just says "Error: ';' expected" |
20:47:45 | Skrylar | and when going there, its like.. a blank line, or an #endif |
20:48:01 | foodoo | Skrylar: It's probably a problem with the previous line before the blank line |
20:48:57 | Matthias247 | Skrylar: 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:27 | filwit | hey dom96, what's up? |
20:49:35 | dom96 | hey filwit, how are those docs coming? |
20:49:49 | filwit | fine |
20:49:57 | filwit | just working on some javascript things |
20:50:04 | filwit | about sorting the procs |
20:50:06 | dom96 | Do you have an ETA? |
20:50:16 | filwit | not exactly, why? |
20:50:17 | Skrylar | Matthias247: some of it is just because C++ has no sane way of doing them; like boost::bind and boost::connect |
20:50:27 | Skrylar | they have to go through a massive amount of template hoops to emulate basic closures |
20:50:28 | filwit | just asking, or do you want to wait for the docs to release something? |
20:50:42 | filwit | my ETA is like sometime in the next week |
20:51:39 | dom96 | filwit: 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:51 | dom96 | But if he sees that you're working in them he will hopefully wait. |
20:51:56 | dom96 | *on |
20:53:09 | Araq | no he won't :P |
20:53:11 | dom96 | Anyway, sorry i'm pestering you so much. Don't worry about it if you're too busy. |
20:53:23 | filwit | dom96: 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:59 | filwit | i'm happy with what i have so far, but it'll be too long if y'all are wanting to release |
20:54:33 | filwit | if we want to make it a big announcement, we should wait till the release after this |
20:54:38 | * | Demos joined #nimrod |
20:55:10 | filwit | besides, 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:31 | dom96 | Yeah, probably best not to rush this. |
20:55:51 | filwit | so it's probably going to be another month before we're really ready to switch over the docs |
20:56:06 | filwit | originally, i was just designing a new look |
20:57:00 | filwit | but 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:05 | dom96 | How about we just introduce the new look in this release? |
20:58:07 | filwit | i'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:55 | filwit | dom96: i'll see what i can do about just the graphics for the existing docs |
21:00:44 | filwit | dom96: 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:43 | filwit | dom96: 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:18 | filwit | dom96: once that's done, i'll post the designs online and y'all can review and give me feedback |
21:03:37 | Araq | filwit: excellent |
21:04:35 | dom96 | filwit: great |
21:05:10 | filwit | pffttt.. damn web IRC |
21:07:05 | filwit | how to /join someone? |
21:07:35 | Varriount | filwit: Try /msg |
21:07:43 | filwit | ah, right, thanks |
21:08:14 | filwit | that doesn't seem to work... |
21:08:43 | Varriount | filwit: What webirc client are you using? |
21:08:54 | dom96 | it does |
21:09:00 | filwit | the one from the nimrod-lang |
21:09:44 | * | Demos quit (Ping timeout: 268 seconds) |
21:10:39 | Varriount | Well, that says that /msg should work. |
21:10:53 | Varriount | "/msg (name) (msg) |
21:15:12 | Varriount | filwit: Could we have a screenshot of the new style? |
21:15:26 | * | Varriount is cheering filwit on |
21:16:19 | filwit | Varriount: sure, but not just yet as i've kinda pulled things apart in the design over the last week |
21:17:12 | filwit | Varriount: i'll fix things up over the weekend and post a pic on monday |
21:18:57 | filwit | Varriount: possibly sunday, i would fix it today, but i've got to work on something else |
21:23:54 | OrionPK | you guys see .NET native? |
21:24:05 | Varriount | No... |
21:24:10 | zezba9000 | Yes |
21:24:17 | dom96 | maybe |
21:24:26 | zezba9000 | Did tests, and its slower then normal .NET on x64 |
21:24:33 | zezba9000 | don't know about ARM |
21:24:47 | dom96 | zezba9000: how much slower? |
21:25:16 | zezba9000 | Someone get .4 sec vs .5 or .6 can't remember |
21:25:24 | zezba9000 | on the Raytracebenchmark |
21:25:31 | zezba9000 | C++ gets .1 |
21:26:03 | zezba9000 | So C++ .1, .NET .4, .NET native .5 or .6 |
21:27:47 | zezba9000 | but 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:07 | OrionPK | interesting |
21:29:10 | OrionPK | it's still in preview though |
21:29:20 | OrionPK | I havent tried it yet - on my mac |
21:29:37 | OrionPK | i want to try some of my other benches |
21:30:15 | zezba9000 | OrionPK: Its not for Mac... |
21:30:19 | zezba9000 | Its WinRT ONLY |
21:30:27 | zezba9000 | not even for Win32 yet |
21:31:15 | zezba9000 | o err I read your message wrong sry |
21:31:35 | zezba9000 | You cant try cuz your on a Mac :p |
21:32:15 | * | nande joined #nimrod |
21:32:33 | zezba9000 | OrionPK: If you do try, I would be very interested to know what your results are with this: https://github.com/zezba9000/RayTraceBenchmark |
21:34:46 | dom96 | Araq: You are correct. C# 5 doesn't support Await in catch and finally blocks. C# 6 will though :P |
21:35:49 | zezba9000 | dom96: Or you can just invoke a async method instead in the finally block |
21:36:36 | dom96 | but then your code will continue before the method finishes |
21:37:04 | zezba9000 | true, but normally you finish up stuff in the finally block |
21:37:09 | Varriount | dom96: Are you on linux at the moment? |
21:37:13 | zezba9000 | So ya guess it would not work in all cases |
21:37:17 | dom96 | Varriount: no, sorry. |
21:37:49 | OrionPK | zezba9000 I know |
21:37:54 | OrionPK | zezba9000 thats why I cant test it right now :p |
21:38:06 | OrionPK | heh oh u realize :0 |
21:38:18 | zezba9000 | ya, my mistake :) |
21:38:32 | Varriount | Hrm. 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:12 | zezba9000 | OrionPK: I also did tests with Mono LLVM SGEN on iOS vs C++ |
21:39:24 | OrionPK | cool |
21:39:27 | zezba9000 | C++ is 8 times as fast as Mono + LLVM + SGEN |
21:39:47 | OrionPK | ow |
21:39:59 | OrionPK | I have more confidence in MS than xamarin though |
21:40:05 | OrionPK | or at least the .NET team |
21:40:08 | zezba9000 | I'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:20 | OrionPK | ahh yeah |
21:40:29 | OrionPK | you could try using SlimMath or w/e |
21:40:32 | zezba9000 | Ya .NET is about 2x as fast as Mono is many cases |
21:41:00 | OrionPK | https://code.google.com/p/slimmath/ |
21:41:25 | * | [2]Endy quit (Ping timeout: 252 seconds) |
21:41:39 | zezba9000 | OrionPK: Ya but that doesn't fix the issue of "Math.Sqrl" requiring a double return ect |
21:41:42 | dom96 | Varriount: Do you have an example of how it's done in C? |
21:42:04 | OrionPK | you dont use Math.Sqrt |
21:42:20 | zezba9000 | in C++ I think you can chain the use of floats being 80bit right, where .NET can't do it |
21:42:27 | zezba9000 | What I use that all the time? |
21:43:10 | OrionPK | I mean if you used another math lib, you wouldnt use math.sqrt |
21:43:29 | zezba9000 | then it would be even slower no? |
21:43:52 | OrionPK | idk, not if it's managed C++ maybe |
21:44:28 | zezba9000 | Well 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:24 | Varriount | dom96: #ifdef _DARWIN_USE_64_BIT_INODE ... #lif |
22:00:39 | Varriount | *#endif |
22:01:23 | dom96 | Varriount: Just ignore that. |
22:02:31 | Varriount | dom96: You mean, don't include file creation time? |
22:03:08 | dom96 | What's inside that ifdef? |
22:04:01 | Varriount | The wrapped struct that is returned by the stat procedure wrapped by nimrod. |
22:04:49 | Varriount | On 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:04 | dom96 | Maybe 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:37 | NimBot | Araq/Nimrod devel 88f6e26 Dominik Picheta [+0 ±2 -0]: Modified behaviour of checkBuffer to match new select behaviour. Refs #822. |
22:11:54 | dom96 | EXetoC: irc.nim should be fixed now |
22:13:18 | * | wc423u98c32 joined #nimrod |
22:13:23 | EXetoC | wc423u98c32: hi |
22:13:29 | * | wc423u98c32 quit (Remote host closed the connection) |
22:13:41 | EXetoC | seems like it |
22:13:47 | dom96 | good |
22:14:47 | * | brson quit (Ping timeout: 252 seconds) |
22:15:38 | * | Araq is checking out dom96's patch. |
22:16:27 | dom96 | I change the prunesocketset proc because it's complexity has been annoying me for years now :P |
22:16:30 | dom96 | *changed |
22:17:23 | * | q66 quit (Ping timeout: 252 seconds) |
22:19:35 | * | q66 joined #nimrod |
22:20:08 | * | wc423u98c32 joined #nimrod |
22:20:14 | EXetoC | wc423u98c32: bacon |
22:20:15 | wc423u98c32 | Tasty |
22:20:24 | EXetoC | wc423u98c32: test |
22:21:13 | Araq | dom96: pruneSocketSet is now more inefficient :-/ |
22:21:17 | EXetoC | I just wanted to help someone, but it's good to see that it works |
22:21:25 | Araq | is that really necessary to use a new seq? |
22:21:43 | dom96 | Araq: select is already inefficient anyway |
22:21:59 | dom96 | it's not necessary |
22:22:04 | dom96 | you can change it back if you want |
22:23:08 | Araq | yeah let's do it then |
22:23:17 | Araq | select is called by poll |
22:23:27 | Araq | poll is called thousands of times per second |
22:23:34 | Araq | depending on what one does |
22:23:55 | * | wc423u98c32 quit (Remote host closed the connection) |
22:25:08 | dom96 | fine change it back then |
22:26:01 | dom96 | actually i'll do it |
22:27:50 | * | q66 quit (Ping timeout: 252 seconds) |
22:28:10 | NimBot | Araq/Nimrod devel b3865ef Dominik Picheta [+0 ±1 -0]: Revent pruneSocketSet to efficient version. |
22:28:42 | dom96 | damn, I spelled revert wrong |
22:28:59 | EXetoC | oh no |
22:29:29 | dom96 | EXetoC: Now you better enjoy those precious nanoseconds! |
22:29:29 | * | q66 joined #nimrod |
22:31:17 | dom96 | EXetoC: if you're bored and want to play with IRC please add user list tracking. |
22:33:58 | dom96 | Araq: While writing the httpserver I was thinking that it would be nice to be able to somehow log messages from it |
22:34:38 | dom96 | Perhaps 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:45 | dom96 | ? |
22:37:17 | EXetoC | dom96: elaborate. list? |
22:37:44 | * | q66 quit (Ping timeout: 252 seconds) |
22:37:45 | Trixar_za | This may be the alcohol speaking, but I Love dom96's implementations of stuff |
22:37:54 | Demos | dom96: 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:14 | dom96 | ircclient.getUserList -> @["Araq", "EXetoC", "Demos", "dom96" ...] |
22:38:28 | dom96 | or maybe you could create a TUser object which includes more info |
22:38:44 | dom96 | Trixar_za: <3 |
22:39:06 | Trixar_za | <3 |
22:39:14 | EXetoC | I thought you meant a bot |
22:39:31 | * | q66 joined #nimrod |
22:39:54 | * | foodoo quit (Remote host closed the connection) |
22:39:55 | dom96 | EXetoC: Then you could implement pretty user count graphs in NimBot :) |
22:40:16 | Araq | dom96: the logging module needs to get "benign" effects |
22:40:25 | dom96 | Demos: ahh, interesting. So you control it with defines. |
22:40:29 | Araq | so that it doesn't count as side effect |
22:40:51 | dom96 | Araq: Ok, but what do you think of this idea? |
22:41:18 | dom96 | In the case of a http server I would like to report things like "Got bad request. Rejected from 127.0.0.1" |
22:41:32 | dom96 | But only if the programmer wants that info. |
22:42:11 | dom96 | Perhaps my http server instance should have an overridable callback for this stuff. |
22:46:12 | Demos | yeah 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:29 | Demos | how 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:12 | Demos | and 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:35 | Araq | Demos: mark the variable as .compileTime |
22:52:16 | Demos | OK and is that accessable at runtime? (not nessassarly mutable) |
22:52:18 | Araq | dom96: I rejected pull requests with something similar |
22:52:43 | dom96 | Araq: why? |
22:52:46 | Demos | I think the complexity of logging can grow without bound |
22:54:01 | flaviu | Is the Embedded Nimrod Debugger functional? |
22:54:02 | dom96 | true |
22:54:47 | flaviu | The C codegen seems to be bugged, it emitted an else without a corresponding if |
22:59:41 | * | Demos quit (Quit: leaving) |
23:00:28 | dom96 | with what nimrod code? |
23:01:03 | flaviu | I'm not really sure, I'm trying to get a test case |
23:02:21 | Araq | dom96: because it logging injection should be done completely differently |
23:02:53 | Araq | well 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:09 | flaviu | dom96: 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:34 | Araq | flaviu: that comes from a 'try' statement |
23:09:56 | Araq | no idea why the 'if' is missing. very strange |
23:11:12 | flaviu | Wait a second, it isn't complete, sorry. I can't figure out how copy from vim to the clipboard |
23:11:46 | flaviu | Check again |
23:12:18 | flaviu | The if statement appears to be generated, but then something comes in and generates the F.len-=4 in the wrong place |
23:13:33 | EXetoC | flaviu: by using the * register |
23:13:41 | EXetoC | "*{motion} |
23:14:17 | flaviu | I figured that out, but for some reason the } command didn't really work |
23:14:34 | Araq | flaviu: 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:28 | EXetoC | flaviu: no brackets. "*yy for example, to copy a single line |
23:16:08 | EXetoC | you can also do shift-v, and then do "*y after selecting the text |
23:16:12 | flaviu | I ended up using V and selecting what I wanted |
23:19:13 | flaviu | Actually, it seems like the * buffer doesn't work on my setup, no idea why. |
23:21:07 | EXetoC | sometimes that's compiled out I think |
23:21:49 | EXetoC | which is really stupid. it's such an ancient way of keeping resources to a minimum |
23:21:53 | * | darkf joined #nimrod |
23:23:25 | EXetoC | and annoy people who are writing bindings |
23:23:33 | flaviu | Have 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:17 | EXetoC | yeah |
23:30:19 | * | Guest78262 joined #nimrod |
23:48:26 | * | Matthias247 quit (Read error: Connection reset by peer) |