00:01:28 | BitPuffin | EXetoC: please also add a comment to the pull request containing the text from http://unlicense.org/ under "unlicensing contributions" :) |
00:03:06 | BitPuffin | or to a commit message or something |
00:05:07 | * | rubino123 quit (Quit: Leaving) |
00:06:18 | EXetoC | it's a range, either implicitly or explicitly. anyway, I'll use the previous convention |
00:06:21 | BitPuffin | EXetoC: actually what does ~= do? |
00:06:42 | BitPuffin | EXetoC: well T is still something like int, float or whatever |
00:06:54 | BitPuffin | but it works when I is not constrained I guess |
00:09:03 | EXetoC | that's usually just the letter they start at, and then they continue with U etc, unless given a proper name, but yeah sure. ~= is for approximate equality, but I should modify that function a little |
00:12:09 | BitPuffin | approximate equality you say |
00:12:14 | BitPuffin | well |
00:12:18 | BitPuffin | maybe that's useful |
00:13:09 | EXetoC | should T not be constrained to TNumber? |
00:13:41 | BitPuffin | EXetoC: I was planning to change that a bit later |
00:13:43 | BitPuffin | but yeah |
00:13:47 | BitPuffin | definitely |
00:15:37 | BitPuffin | EXetoC: I see a problem in your implementation of swizzle |
00:15:57 | BitPuffin | ch in SwizzleArray blabla is not the best idea |
00:16:11 | BitPuffin | it should be adapted after the dimension of the vector |
00:16:17 | BitPuffin | not the chars of the string |
00:17:17 | EXetoC | yes, I hit that len bug and then I forgot about it |
00:17:48 | BitPuffin | btw thanks for putting in the work to do this :) |
00:20:08 | dom96 | good night |
00:20:14 | BitPuffin | shouldn't swizzleimpl be an iterator really? |
00:20:17 | BitPuffin | night dom96! |
00:20:28 | BitPuffin | or I guess maybe not |
00:21:42 | BitPuffin | for i, component in swizzleImpl[range[0.. <str.len], vec[0].type](str):, type and range should be reversed |
00:22:15 | BitPuffin | and it seems like range[0..<str.len] might benefit from being computed only once? |
00:22:34 | BitPuffin | well str.len at least |
00:22:54 | BitPuffin | it is computed 3 times |
00:23:47 | BitPuffin | and there is minor stuff that you didn't know that I'll refactor later :) |
00:24:07 | EXetoC | ok, but it's probably inlined an everything |
00:25:27 | EXetoC | and only of them at run-time |
00:26:32 | EXetoC | I'm so used to the order of the array type params |
00:26:37 | BitPuffin | EXetoC: which is? |
00:26:58 | BitPuffin | ah yeah I can see why |
00:29:44 | BitPuffin | EXetoC: why the #Ditto over ~=? |
00:30:28 | BitPuffin | come to think about it a[i] + b[i] > 0.000001 doesn't work at all |
00:30:43 | EXetoC | there was a comment above it before |
00:31:15 | BitPuffin | what if a[i] = 4.00000000007, and b = 4.00000000008 |
00:31:24 | BitPuffin | then it will definitely be > 0.0000001 |
00:31:43 | BitPuffin | so it should really be a[i] - b[i] < 0.0000001 |
00:31:50 | BitPuffin | or wait |
00:31:55 | BitPuffin | within some range |
00:32:08 | BitPuffin | less than whatever and greater than whatever |
00:33:19 | EXetoC | it was supposed to be abs(a[i] - b[i]) |
00:37:10 | BitPuffin | EXetoC: adding some notes so it's an easy list to go through |
00:38:14 | EXetoC | it is, but my brain power is low |
00:38:19 | EXetoC | too late for coffee? :> |
00:39:26 | BitPuffin | maybe a little! |
00:39:31 | BitPuffin | doesn't have to be done tonight :) |
00:39:39 | BitPuffin | but I guess it's nice when it's fresh |
00:42:28 | BitPuffin | EXetoC: there we go, think that was all the things I mentioned |
00:44:11 | EXetoC | alright |
00:44:49 | * | DAddYE quit (Remote host closed the connection) |
00:51:54 | BitPuffin | well I'm going to bed, cheers everybody! |
00:52:05 | EXetoC | bye |
00:52:05 | BitPuffin | and thanks EXetoC again for your work :) |
00:52:18 | EXetoC | when .. for ch in str: when... doesn't work |
00:52:22 | EXetoC | np c(:) |
00:52:43 | EXetoC | "Error: constant expression expected" oh well. some other time then |
00:54:22 | BitPuffin | EXetoC: oh right, but yeah check dom96's comment, should pretty much solve it |
00:54:50 | BitPuffin | night! |
00:56:12 | EXetoC | good luck |
00:59:58 | * | BitPuffin quit (Ping timeout: 276 seconds) |
01:46:02 | * | DAddYE joined #nimrod |
01:50:30 | * | DAddYE quit (Ping timeout: 264 seconds) |
02:03:54 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
02:03:55 | * | rubino123 joined #nimrod |
02:04:10 | rubino123 | does nimrod allow for manual memory mangement? |
02:40:50 | * | q66 quit (Quit: Leaving) |
02:51:48 | * | Associat0r joined #nimrod |
02:51:48 | * | Associat0r quit (Changing host) |
02:51:48 | * | Associat0r joined #nimrod |
02:58:42 | OrionPK | rubino123 see: http://nimrod-code.org/gc.html |
02:58:53 | OrionPK | you can turn GC off with a compiler switch, gc:none |
03:01:17 | OrionPK | and this: http://nimrod-code.org/system.html#606 |
03:09:44 | * | DAddYE joined #nimrod |
04:08:43 | * | Endy joined #nimrod |
04:17:50 | rubino123 | thansk |
04:17:55 | rubino123 | thanks |
04:35:09 | * | OrionPK quit (Quit: Leaving) |
05:39:31 | * | DAddYE quit (Remote host closed the connection) |
05:40:03 | * | DAddYE joined #nimrod |
05:44:30 | * | DAddYE quit (Ping timeout: 264 seconds) |
05:52:11 | * | rubino123 quit (Quit: Leaving) |
05:53:18 | * | [1]Endy joined #nimrod |
05:57:06 | * | Endy quit (Ping timeout: 264 seconds) |
05:57:06 | * | [1]Endy is now known as Endy |
06:40:52 | * | DAddYE joined #nimrod |
06:48:06 | * | DAddYE quit (Ping timeout: 264 seconds) |
07:21:36 | * | zahary quit (Quit: Leaving.) |
07:48:00 | * | DAddYE joined #nimrod |
08:41:41 | * | Associat0r quit (Quit: Associat0r) |
09:23:39 | dom96 | 'morning |
09:29:25 | Araq | hi dom96 |
09:31:32 | dom96 | sup? |
09:32:03 | Araq | not much |
09:32:11 | Araq | filling all the missing stuff for vm |
09:38:52 | dom96 | cool cool |
09:52:16 | * | BitPuffin joined #nimrod |
09:56:03 | dom96 | BitPuffin: o/ |
09:56:11 | BitPuffin | dom96: \o |
09:58:10 | dom96 | hrm, seems graphics.drawEllipse is broken. |
09:59:15 | Araq | lol |
09:59:27 | Araq | you worked on it for hours :P |
10:03:33 | Araq | yay lunch, bbl |
10:04:02 | BitPuffin | haha |
10:04:15 | BitPuffin | is the VM thing in master yet? |
10:04:28 | Araq | sure but it can only run small things |
10:04:35 | Araq | import compiler/nimeval |
10:04:56 | Araq | execute("""my nimrod code here""") |
10:06:14 | dom96 | hrm, so you changed what Natural means. |
10:07:02 | * | DAddYE quit (Remote host closed the connection) |
10:07:34 | * | DAddYE joined #nimrod |
10:07:46 | BitPuffin | that's awesome |
10:09:12 | BitPuffin | hmm |
10:09:15 | BitPuffin | ah |
10:09:17 | BitPuffin | compiler/nimeval |
10:10:01 | BitPuffin | Error: cannot open 'compiler/nimeval' |
10:12:06 | * | DAddYE quit (Ping timeout: 264 seconds) |
10:13:14 | BitPuffin | oh we'' |
10:14:47 | BitPuffin | How does one do to kind of emulate interfaces in nimrod |
10:15:28 | dom96 | a list of closures. |
10:15:30 | BitPuffin | I want the user to be able to pass whatever, a tuple of proc pointers or whatever to customize the behaviour of the api |
10:16:27 | BitPuffin | dom96: I guess that should be fair enough |
10:16:57 | BitPuffin | but does this give me polymorphism? |
10:20:14 | dom96 | Dunno. Maybe. |
10:21:18 | BitPuffin | well |
10:21:40 | NimBot | Araq/Nimrod master 8ece3f5 Dominik Picheta [+0 ±1 -0]: Fixes #543.... 2 more lines |
10:21:40 | NimBot | Araq/Nimrod master dd2263b Dominik Picheta [+0 ±1 -0]: Fixes graphics.drawEllipse.... 4 more lines |
10:22:03 | BitPuffin | a tuple of the same dimensions and types are considered equal |
10:28:49 | Araq | dom96: I don't think so but the compiler emits more range checks, that was a bug |
10:29:02 | * | EXetoC joined #nimrod |
10:29:18 | dom96 | Araq: ahh, well I changed it to an Int and all is fine. |
10:32:57 | EXetoC | hi |
10:33:06 | dom96 | hey EXetoC |
10:41:26 | EXetoC | BitPuffin: static doesn't help |
10:48:15 | EXetoC | dom96: yep, 'error' does work |
10:48:25 | dom96 | good :) |
10:49:23 | BitPuffin | hey EXetoC |
10:49:33 | BitPuffin | hmm okay |
10:51:28 | BitPuffin | Araq: hey! Funny thing, Apple doesn't even allow you to download scripts ._. |
10:52:03 | EXetoC | surprising |
10:52:48 | BitPuffin | so basically, I'm gonna have to put the full game in the apple store then and then log in to unlock |
10:53:03 | BitPuffin | making updates huge but yeah |
10:56:42 | * | q66 joined #nimrod |
10:57:18 | EXetoC | what about cross product for 7D vectors? :> |
11:10:04 | Araq | BitPuffin: lets hope apple is dead when your game is ready |
11:10:22 | EXetoC | yeah!!! |
11:11:59 | BitPuffin | EXetoC: fuckit :) |
11:12:11 | BitPuffin | EXetoC: meh I might add it later on. Just a PITA :) |
11:12:16 | BitPuffin | Araq: yeah seriously |
11:12:41 | BitPuffin | Araq: the funny thing is that the guys on mac will have a wonderful experience, but iOS? noooo |
11:43:52 | BitPuffin | but yeah |
11:44:08 | BitPuffin | will probably not do iOS version until it's finished for all platforms |
11:45:33 | BitPuffin | EXetoC: did macros.error fix the runtime thing? |
11:48:12 | EXetoC | BitPuffin: nah, the check was basically the same as the one in the exported function |
11:48:38 | BitPuffin | EXetoC: so there's no solution? |
11:48:45 | BitPuffin | where is the error exactly |
11:51:11 | EXetoC | it was an error check. something like this: "when vec.len <= 3: for ch in str: when ch...", and yes I tried with static as well, which should be the correct way of doing it, but 'ch' is not being recognized as a constant expression |
11:52:42 | BitPuffin | Hmm |
11:52:45 | BitPuffin | file a bug report? |
11:53:02 | BitPuffin | after all we're taking a string literal so it should be a constant expression |
11:55:21 | BitPuffin | EXetoC: the problem is that swizzleimpl is a proc |
11:55:41 | dom96 | hrm, where is this? |
11:56:00 | BitPuffin | https://gist.github.com/BitPuffin/6094661 |
11:56:27 | BitPuffin | dom96: in swizzleImpl |
11:57:09 | BitPuffin | or wait |
11:57:12 | BitPuffin | isn't it this line? |
11:57:20 | BitPuffin | https://github.com/BitPuffin/linagl/pull/1/files#L0R129 |
11:58:29 | EXetoC | it compiles as it is |
11:58:37 | BitPuffin | Also isn't it more efficient to make swizzleimpl an iterator? now we are creating an array (thus iterating through it) and then we are iterating through it once again in {} |
11:58:43 | dom96 | have you tried using string{lit} in the proc? |
11:58:55 | BitPuffin | that works? |
11:59:00 | dom96 | no idea |
11:59:17 | EXetoC | dom96: no, but it runs at compile-time already |
11:59:26 | EXetoC | so I don't know what it's supposed to solve |
11:59:38 | dom96 | well then what's the problem? |
11:59:49 | EXetoC | making it a lit anyway |
11:59:54 | EXetoC | dom96: I'll gist it |
12:01:04 | BitPuffin | well |
12:01:19 | BitPuffin | I guess the problem is that it stops working gwith d:release too doesn't it? |
12:01:32 | BitPuffin | maybe that's fine |
12:05:21 | EXetoC | yes it's a pretty minor issue |
12:05:48 | dom96 | that doesn't seem like a minor issue |
12:06:06 | BitPuffin | if you've tested it in debug mode and it works then you don't want unecessary checks in the release version |
12:06:20 | EXetoC | but it's an assert |
12:06:20 | BitPuffin | dom96: well asserts are removed in d:release |
12:06:38 | EXetoC | yeah but what are you getting at then? |
12:06:47 | EXetoC | maybe I misread |
12:06:49 | dom96 | why is it a problem then? |
12:06:56 | dom96 | if that is in fact what you want? |
12:07:19 | EXetoC | dom96: it's possible to catch this at compile-time |
12:07:25 | BitPuffin | yeah |
12:07:32 | dom96 | FYI You can use doAssert which will stay in release mode. |
12:07:36 | BitPuffin | that's the problem it should always be cought at compile time |
12:07:39 | EXetoC | it should be, but the impl doesn't allow it. like I said, minor issue, but I'll add it some day |
12:07:42 | BitPuffin | dom96: isn't that runtime? |
12:07:56 | dom96 | yes. |
12:08:30 | dom96 | So the problem is that swizzleImpl doesn't work at compile-time? |
12:08:31 | BitPuffin | well then there is no point |
12:08:50 | BitPuffin | it doesn't catch invalid characters at compile time when doing d:release |
12:09:44 | EXetoC | I still consider it a minor issue. how often would that be caught in a release build but not otherwise? |
12:10:30 | BitPuffin | you mean the other way around? |
12:11:37 | dom96 | oh i see, you guys are referring to this: https://github.com/EXetoC/linagl/blob/swizzle/src/linagl/vector.nim#L129 |
12:12:08 | dom96 | I should have clicked BitPuffin's earlier link heh |
12:12:46 | BitPuffin | dom96: yes you should have! >:) |
12:13:15 | dom96 | I guess the compiler doesn't allow: when component < vec.len: {.fatal: ....} |
12:14:13 | EXetoC | dom96: no it's not that |
12:14:15 | BitPuffin | no I think the problem is that you can't do when inside a loop |
12:14:39 | dom96 | yes, i see. |
12:15:09 | BitPuffin | which I don't really get why |
12:15:19 | BitPuffin | you should be able to do when inside of a case statement even :P |
12:15:25 | dom96 | The for loop is the same as an 'if' i.e. it's not happening at compile-time. |
12:15:28 | BitPuffin | that's how I was gonna do it initially |
12:15:50 | BitPuffin | when the length is greater than bla, add this of branch |
12:16:03 | dom96 | would be nice if we could just prepend some symbol to force it to happen at compile-time |
12:16:12 | EXetoC | dom96: static? |
12:16:23 | EXetoC | no good? |
12:16:24 | dom96 | yes, but we're not C. |
12:16:41 | EXetoC | but it's used in this way already |
12:16:58 | BitPuffin | I really would like a way to do what I just said |
12:16:58 | dom96 | You would have to use a {.static.} pragma. |
12:17:16 | BitPuffin | conditional compilation to add extra of branches etc or elif or whatever |
12:17:19 | EXetoC | BitPuffin: that's what I was trying to do |
12:17:25 | dom96 | BitPuffin: I think you would need to use macros for that. |
12:18:02 | BitPuffin | hmm |
12:18:03 | dom96 | EXetoC: where? |
12:18:06 | BitPuffin | write my own macro? |
12:18:13 | dom96 | yes |
12:18:13 | BitPuffin | or an existing one |
12:18:13 | EXetoC | seems like the wrong way to go, when these compile-time checks are supposed to work |
12:18:43 | dom96 | indeed, I think we should have a compile-time equivalent to for, while, case, etc. |
12:18:51 | dom96 | just like we have when as a compile-time equivalent to 'if' |
12:18:58 | BitPuffin | yeah |
12:19:43 | BitPuffin | but also add a line inside a runtime loop based on conditional compilation |
12:19:52 | dom96 | but actually |
12:20:00 | dom96 | It would be pretty simple to just replace the for loop with a macro |
12:20:08 | BitPuffin | (and add branches to conditions based on conditional compilation) |
12:20:22 | dom96 | the macro could do all the checking and generate the result[i] |
12:21:09 | dom96 | I would almost argue that templates can only get you this far and that you should use macros for stuff like this. |
12:21:11 | EXetoC | but the only thing missing is these checks |
12:22:49 | dom96 | let me try to write a macro which does this |
12:22:54 | * | BitPuffin needs to finish reading the manual, haven't gotten to macros yet :P |
12:23:20 | dom96 | btw I don't think you need that 'result' at the end. |
12:23:28 | dom96 | Result is returned implicitly. |
12:23:56 | BitPuffin | dom96: ah, I wasn't sure if templates had a result variable like procs |
12:24:08 | EXetoC | dom96: no, that doesn't work. the result is the whole expression inside the template |
12:24:17 | EXetoC | I've tried it |
12:24:38 | dom96 | oh |
12:24:41 | dom96 | I see. |
12:25:12 | dom96 | I'm still not used to the stmt/expr unification |
12:25:27 | dom96 | Pretty cool that so much code can be considered a single expr nowadays |
12:25:28 | BitPuffin | unification? |
12:25:45 | EXetoC | dom96: I might've been thinking of AST's when you said macro |
12:25:55 | EXetoC | I tried to use a macro, but got "out of memory", which isn't very helpful |
12:26:15 | dom96 | that is what you should have thought of |
12:26:25 | dom96 | BitPuffin: yeah, that only happened recently. |
12:26:28 | EXetoC | what is? |
12:26:39 | dom96 | AST's when I said macro |
12:26:43 | BitPuffin | well what do you mean? |
12:27:03 | EXetoC | ok it's still unnecessary then, but go ahead |
12:27:35 | EXetoC | BitPuffin: "var w = if x: y: else: z" |
12:27:46 | EXetoC | you wouldn't be able to do that had 'if' not been an expression |
12:28:03 | EXetoC | oops, too many colons |
12:28:22 | BitPuffin | EXetoC: ah yeah I saw that in the docs, made me happy |
12:28:23 | EXetoC | but now almost everything is, so that's why the template can generate an expression |
12:28:27 | EXetoC | ya |
12:28:36 | dom96 | yes and also: if (var x = blah.foo; x == 5): "hello" |
12:28:38 | dom96 | works I think. |
12:28:52 | dom96 | I didn't even have a chance to try this stuff properly. |
12:29:02 | EXetoC | oh, that's useful |
12:29:34 | EXetoC | BitPuffin: there are a couple of limitations though. that example won't work if there's another branch that unwinds the stack |
12:30:10 | dom96 | Although I would still in most cases prefer to take the var definition out of the if condition. |
12:31:34 | EXetoC | so then you must do "if x: w = y elif a: w = p else: raise EOhai". but it's mostly an issue when the branch count is high |
12:36:08 | BitPuffin | ah |
12:36:10 | BitPuffin | oh well |
12:44:50 | dom96 | why is swizzleImpl's array's type a generic? |
12:45:01 | dom96 | It's always set to an int? |
12:47:08 | EXetoC | good question |
12:51:52 | dom96 | well, I crashed the compiler... |
12:52:18 | dom96 | Generics don't go well with macros I guess heh |
12:53:13 | dom96 | on the bright side I got a nice example to reproduce it |
12:56:02 | EXetoC | adding compile-time variations of every block type would add nothing since we have static. |
12:56:05 | * | jbe_ joined #nimrod |
12:57:08 | dom96 | https://github.com/Araq/Nimrod/issues/552 |
12:57:13 | dom96 | If you're interested in seeing what I tried. |
12:59:22 | dom96 | If I get rid of the generics I get 'constant expression expected', which is what you got EXetoC isn't it? |
13:10:26 | EXetoC | dom96: yes |
14:05:46 | EXetoC | My issue hasn't been reported before, right? Nothing of relevance is open |
14:07:19 | dom96 | Not that I can recall |
14:10:39 | BitPuffin | dom96: sure you have the latest version of the compiler? |
14:10:58 | dom96 | possibly a couple commits old why? |
14:11:12 | dom96 | oh did Araq fix the .len stuff |
14:13:06 | BitPuffin | dom96: yeah he fixed the constant expression required |
14:13:16 | BitPuffin | expected |
14:13:16 | BitPuffin | * |
14:23:22 | * | BitPuffin quit (Ping timeout: 276 seconds) |
14:25:10 | * | BitPuffin joined #nimrod |
14:29:27 | * | OrionPK joined #nimrod |
14:31:18 | * | BitPuffin quit (Ping timeout: 264 seconds) |
14:37:06 | * | [1]Endy joined #nimrod |
14:39:06 | * | Endy quit (Ping timeout: 264 seconds) |
14:39:06 | * | [1]Endy is now known as Endy |
14:48:49 | EXetoC | beepbeep |
14:51:43 | dom96 | boop boop |
15:08:31 | dom96 | Araq: Looks like your C code gen for gensym is a bit broken. When I use gensym my object doesn't get initialised properly. |
15:08:44 | dom96 | (When initialising with a contructor) |
15:08:47 | dom96 | *constructor |
15:13:03 | * | Araq0 joined #nimrod |
15:14:03 | Araq0 | Dom96 you still need to put the gensym in a var/let block |
15:14:30 | dom96 | I did |
15:14:48 | Araq0 | Hmm |
15:15:32 | Araq0 | Oh well i will fix it |
15:18:53 | Araq0 | La la la bugs everywwhere |
15:20:34 | * | Araq0 quit (Quit: Bye) |
15:55:35 | * | jbe_ quit (Remote host closed the connection) |
16:01:40 | * | Endy quit (Ping timeout: 264 seconds) |
16:16:27 | EXetoC | bugs, still? oh man :p |
16:43:03 | * | DAddYE joined #nimrod |
16:49:43 | EXetoC | DAddYE: lo |
16:49:56 | DAddYE | EXetoC: moooooooorning |
16:50:09 | dom96 | afternoooon |
16:54:09 | EXetoC | we don't have something like "iterator stride[T](a: openarray[T], step: int): seq[T]", right? |
16:54:44 | EXetoC | or openarray[T] -> set[T] |
16:54:45 | dom96 | countdown/countup has a step param |
17:04:11 | DAddYE | do you know if there is some thing better than boehmgc? |
17:04:25 | DAddYE | as a C library |
17:10:07 | EXetoC | dom96: it's different, but not too far off |
17:16:10 | * | Endy joined #nimrod |
17:37:36 | * | DAddYE quit (Remote host closed the connection) |
17:38:03 | * | DAddYE joined #nimrod |
17:42:28 | * | DAddYE quit (Ping timeout: 264 seconds) |
18:03:07 | * | Mat2 joined #nimrod |
18:03:12 | Mat2 | hi @ all |
18:08:46 | * | DAddYE joined #nimrod |
18:12:37 | EXetoC | lo |
18:30:43 | * | DAddYE quit (Remote host closed the connection) |
18:30:55 | * | DAddYE joined #nimrod |
18:34:36 | * | Endy quit (Quit: HydraIRC -> http://www.hydrairc.com <- The alternative IRC client) |
19:11:12 | EXetoC | teach me how to not suck at bit-fiddling plz |
19:12:06 | Araq | (x and 0b11) == 0b11 # last 2 bits are 1 |
19:12:40 | Araq | x = x or 0b010 # set bit number 1, other bits are left as they are |
19:12:47 | Mat2 | EXetoC: you don't want to suck what ??? |
19:13:15 | Araq | x = x and not 0b10 # clear 1st bit (bits start at 0 of course) |
19:13:29 | Araq | EXetoC: that's pretty much it |
19:13:43 | Araq | you can convert the 0b to 0x number to feel like a C programmer |
19:16:00 | EXetoC | j/k. it just takes ages because of lack of imagination |
19:24:54 | EXetoC | there's no 'high' for uint? |
19:25:56 | Araq | no the compiler uses int64 internally and high(Uint) can be high(uint64) which the compiler can't handle :P |
19:32:10 | EXetoC | I don't get it. it's just 0xffffffffffffffff'u64 |
19:32:59 | * | gradha joined #nimrod |
19:35:35 | EXetoC | is returning a different type no good? |
19:38:23 | Araq | EXetoC: meh I don't feel like explaining it |
19:42:54 | EXetoC | ok. I'll just disallow uint64. not worth the hassle |
19:43:57 | Araq | disallow unsigned numbers altogether. they have very bad properties anyway |
19:44:51 | Araq | the extra half dimension (aka negative numbers) really helps avoiding bugs |
19:45:57 | * | Araq uses unsigned mostly for bit vectors, not for arithmetic |
19:46:48 | gradha | Araq: the idetools interface accepting column numbers doesn't handle unicode, meaning that the input is not a column number but rather byte offset |
19:47:05 | Araq | gradha: that's a feature |
19:48:40 | gradha | does the compiler support non ascii/utf8 file encodings? |
19:48:48 | Araq | nope |
19:50:51 | EXetoC | same here. still, it's just "proc high*(t: typedesc[uint64]): uint64 = 0xffff_ffff_ffff_ffff'u64". and "uint is uint64" is false. I can just use sizeof though |
19:52:03 | Araq | EXetoC: ever occured to you that 0xffff_ffff_ffff_ffff is -1? |
19:53:45 | Mat2 | EXetoC: https://en.wikipedia.org/wiki/Two%27s_complement |
20:02:59 | EXetoC | Araq: I don't know. it's not like it's easy to validate |
20:06:08 | EXetoC | doesn't it mean that it first treats that part of the literal as int or int64 or whatever, and then converts it to uint64? which would be confusing since it's a single literal |
20:14:44 | gradha | if you want to use nimrod's forum, you will now have to accept the new license http://forum.nimrod-code.org/t/186 |
20:15:07 | gradha | to accept the license, you can send me all your monies and click with your head on the screen |
20:15:14 | EXetoC | in other words, isn't the suffix relevant? |
20:15:38 | EXetoC | it doesn't overflow or anything |
20:28:57 | * | Associat0r joined #nimrod |
20:28:57 | * | Associat0r quit (Changing host) |
20:28:57 | * | Associat0r joined #nimrod |
20:29:20 | Araq | EXetoC: dunno, I'm busy |
20:30:08 | * | rubino123 joined #nimrod |
20:43:26 | * | DAddYE quit (Remote host closed the connection) |
20:44:24 | EXetoC | so it's never converted to -1 or anything. it is if I get rid of the suffix, but then it's unsigned, so yeah |
20:45:29 | EXetoC | yeah that's fine. this is a minor issue like you said. almost no one needs to manipulate very large values arithmetically |
20:46:16 | Araq | EXetoC: lots of people need to do that but then the 1 additional bit for "unsigned" doesn't cut it |
20:49:21 | EXetoC | right |
20:50:09 | EXetoC | initColor(0xrrrr_gggg_bbbb_aaaa'u64). reeeally useful :p |
20:51:36 | gradha | wouldn't you need to unpack the values first anyway to operate on them? |
20:55:59 | EXetoC | gradha: what do you mean? the components are converted to floats and then normalized. the color type is just a tuple of floats |
20:57:45 | gradha | in that call you are using an u64, it wouldn't make much difference if it was a signed integer, right? as you say, you need to convert them first to normalized floats |
20:58:09 | * | DAddYE joined #nimrod |
20:58:44 | * | Endy joined #nimrod |
20:59:48 | dom96 | never fear I is here. |
21:00:51 | EXetoC | gradha: it accepts any unsigned type, so it'd be a little weird |
21:00:59 | EXetoC | anyway, it's not supposed to be particularly useful :p |
21:01:07 | EXetoC | I have an overload that takes a string anyway |
21:03:41 | dom96 | What's up guys? |
21:04:04 | EXetoC | dom96: 101011010101 |
21:04:46 | gradha | don't be so negative |
21:05:09 | gradha | unless you are being unsigned |
21:05:26 | EXetoC | lol |
21:07:20 | gradha | dom96: have you decided already what will you waste your month of freedom on? |
21:08:17 | Mat2 | ehm, converting from unsigned integers to floats without precision loss ? Yeah, how ?? |
21:08:26 | EXetoC | ? |
21:08:40 | dom96 | gradha: All sorts of Nimrod projects |
21:08:46 | EXetoC | I don't know what precision has to do with it |
21:08:55 | EXetoC | it's just another way of specifying color components |
21:09:00 | gradha | dom96: that's not really a decission, just a rough idea |
21:10:14 | gradha | to be more specific you could improve the "Could not bind socket, retrying in 30 seconds" jester thingy |
21:11:19 | EXetoC | I managed to avoid that before. that is, having to wait for some time after exiting the program, if that's even the same issue |
21:11:38 | dom96 | gradha: yes, my priority is currently to finish the new async stuff. |
21:12:43 | Mat2 | EXetoC: Since a float has a larger range, it necessarily sacrifices some precision. This means that there are some unsigned int values that cannot be accurately represented in a float |
21:12:56 | dom96 | gradha: I will fix it eventually though. |
21:13:07 | EXetoC | Mat2: yeah, but it doesn't matter in this case |
21:14:05 | Mat2 | ok, then feel free to go on |
21:14:39 | dom96 | Araq: Fixed the gensym bug yet? |
21:18:39 | Araq | dom96: no, is there a bug report for it? |
21:19:11 | dom96 | not really |
21:19:11 | EXetoC | Mat2: I'm just implementing this: let red = initColor("f00f"), and some other overloads |
21:19:15 | * | DAddYE quit (Remote host closed the connection) |
21:19:19 | EXetoC | == (1.0, 0.0, 0.0, 1.0) |
21:21:02 | Araq | 4 floats for a single color value? that's madness |
21:22:00 | gradha | especially if you deal with hdr/raw pictures |
21:22:28 | dom96 | Araq: I don't feel like reproducing it :P Mind just building tasyncitermacro? |
21:22:57 | Mat2 | well, that would probably make sense as alpha vector for some kind of sophisticated filter ? |
21:22:57 | Araq | is that a test you added? |
21:23:01 | dom96 | yes |
21:23:12 | dom96 | It's in the asyncmacro branch |
21:23:43 | Araq | how nice of you |
21:23:55 | Araq | now I need to switch branches, gah :P |
21:25:07 | EXetoC | Mat2: I'm writing OpenGL code |
21:28:18 | Mat2 | why don't you just create a texture map, spanned to a solid with screen depth and use it as bitmap ? |
21:29:09 | Mat2 | or use a library like Allegro, which does this for you |
21:30:07 | EXetoC | it's just one color per primitive, which is passed to the shader |
21:37:49 | EXetoC | allegro, and not have to write stuff myself? never :p |
21:37:54 | * | gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again) |
21:39:11 | Mat2 | have you ever programmed in Basic ? |
21:39:39 | EXetoC | no |
21:40:34 | Mat2 | C++ ? |
21:40:45 | EXetoC | yeah |
21:41:00 | Mat2 | ah .. ok |
21:41:05 | EXetoC | stopped using it maybe 3 years ago |
21:49:57 | * | DAddYE joined #nimrod |
21:57:40 | * | DAddYE quit (Read error: No route to host) |
21:57:53 | * | DAddYE joined #nimrod |
22:01:21 | Mat2 | get some sleep, ciao |
22:01:27 | EXetoC | already? :/ |
22:01:28 | EXetoC | cya |
22:01:43 | * | Mat2 quit (Quit: Verlassend) |
22:02:13 | * | Endy quit (Ping timeout: 248 seconds) |
22:06:39 | * | DAddYE quit (Remote host closed the connection) |
22:19:04 | dom96 | Someone should recreate this in Nimrod: https://www.bloc.io/ruby-warrior |
22:21:06 | EXetoC | yeah, I don't know Ruby :/ |
22:21:47 | dom96 | huh, that's not open source :\ |
22:22:15 | EXetoC | pfft, lame |
22:32:02 | apotheon | Someone should make a version for Nimrod that's better. |
22:32:13 | apotheon | . . . and use a copyfree license for it. |
22:32:36 | apotheon | . . . 'cause "not open source" is lame. |
22:33:07 | apotheon | Now, I'm off to a wing grilling party. I must deliver a case of beer and consume wings. |
22:35:55 | dom96 | have fun :) |
22:37:47 | * | DAddYE joined #nimrod |
22:54:38 | * | rubino123 quit (Ping timeout: 240 seconds) |
23:07:46 | * | rubino123 joined #nimrod |
23:11:33 | * | DAddYE quit (Ping timeout: 248 seconds) |
23:29:17 | * | Associat0r quit (Read error: Connection reset by peer) |
23:30:27 | * | Associat0r joined #nimrod |
23:50:52 | dom96 | oh cool, tangentstorm's repo is on top of HN |
23:56:27 | EXetoC | of wut |
23:56:41 | dom96 | oh look someone is advertising Free Pascal |
23:56:44 | dom96 | Time to mention Nimrod |
23:58:49 | EXetoC | tell them about my pretty single-colored widgets |
23:59:24 | dom96 | your what? |
23:59:34 | EXetoC | nm |