00:06:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:07:46 | Araq | Varriount|Mobile: "static is better than dynamic" |
00:17:12 | Araq | "it's the produced result that matters" |
00:24:03 | Araq | "statistics matter" |
00:33:07 | Araq | "programmers are smart" |
00:58:12 | Araq | "if meta programming does not solve your problem, you're not trying hard enough" |
00:58:26 | Varriount | :3 |
00:59:07 | Varriount | I'll see if I can type up a "Zen of Nimrod" page based on those quotes. |
00:59:28 | Varriount | Araq: Any idea why this issue happens: https://github.com/Araq/Nimrod/issues/1442 |
01:05:27 | Araq | haven't looked at it yet |
01:05:49 | Araq | but it surely looks strange |
01:07:40 | Varriount | Araq: Also, heads up - there's another issue concerning someone who wants uint32's to be implicitly convertible to ints |
01:16:46 | flaviu | I don't think thats a good idea |
01:17:10 | flaviu | Code will break if moved to a 32 bit machine |
01:17:37 | Varriount | flaviu: He says that it would be fine, because compile-time errors would be produced. :/ |
01:18:08 | flaviu | Sure, but one of Nimrod's things is cross platformness |
01:18:22 | Varriount | Yeah. I'm editing my reply to point this out. |
01:32:58 | Araq | I said it'll convert to *int64* |
01:33:01 | Araq | not to *int* |
01:33:22 | Varriount | Does this reply look alright? -> https://github.com/Araq/Nimrod/issues/1441 |
01:34:01 | Araq | sure |
01:34:56 | Varriount | It's kinda hard to reply with anything more eloquent than "because it breaks cross-platform compatibility that much more" |
01:44:42 | * | brson joined #nimrod |
01:58:51 | flaviu | Araq: Where do symbol binding happen? |
01:59:35 | Araq | flaviu: lot's of places, but lookups.nim is a starting point |
01:59:38 | * | Fx00F quit (Quit: leaving) |
01:59:50 | Araq | that's what everything uses that does a symbol binding |
02:00:35 | flaviu | thanks |
02:15:32 | Araq | good night |
02:29:45 | * | xenagi joined #nimrod |
02:32:14 | * | Joe_knock quit (Quit: Leaving) |
02:37:02 | * | Varriount|Mobile quit (Ping timeout: 255 seconds) |
02:37:55 | * | Fr4n quit (Quit: Leaving) |
02:53:04 | * | q66 joined #nimrod |
03:11:36 | * | q66 quit (Quit: Leaving) |
03:39:54 | * | Demos quit (Read error: Connection reset by peer) |
04:11:13 | * | flaviu quit (Ping timeout: 255 seconds) |
04:16:40 | * | Fr4n joined #nimrod |
04:30:14 | * | BlameStross quit (Remote host closed the connection) |
04:30:29 | * | xenagi quit (Read error: Connection reset by peer) |
05:25:11 | * | BlameStross joined #nimrod |
05:59:04 | * | Trustable joined #nimrod |
06:11:35 | * | Trustable quit (Quit: Leaving) |
06:28:42 | * | io2 joined #nimrod |
06:56:11 | * | nande quit (Read error: Connection reset by peer) |
07:15:47 | * | zahary quit (Quit: Leaving.) |
07:16:07 | * | zahary joined #nimrod |
08:10:47 | * | brson quit (Ping timeout: 264 seconds) |
08:12:21 | * | brson joined #nimrod |
08:21:13 | * | brson quit (Quit: leaving) |
08:29:37 | * | Boscop joined #nimrod |
08:29:37 | * | Boscop quit (Changing host) |
08:29:37 | * | Boscop joined #nimrod |
08:42:56 | * | ARCADIVS joined #nimrod |
08:59:55 | * | ARCADIVS quit (Quit: WeeChat 0.4.3) |
09:19:08 | * | Matthias247 joined #nimrod |
09:46:01 | * | kunev joined #nimrod |
10:47:57 | * | ome joined #nimrod |
10:54:35 | * | Joe_knock joined #nimrod |
10:54:58 | * | Joe_knock quit (Max SendQ exceeded) |
10:55:25 | * | Joe_knock joined #nimrod |
11:40:27 | def- | Making a list comprehensions macro was easier than I expected |
11:41:13 | def- | https://github.com/def-/nimrod-unsorted/blob/master/listcomprehensions.nim |
11:58:12 | dom96 | def-: awesome, put it in future.nim and make a PR |
12:01:28 | def- | dom96: I have the hope that it can still be improved. I would like to get rid of the "lc", and the type of the resulting seq should be inferable |
12:03:47 | dom96 | you may need something to disambiguate it from `[]`(a, x) |
12:04:48 | dom96 | not sure if you can do anything about that |
12:15:13 | * | Matthias247 quit (Read error: Connection reset by peer) |
12:24:05 | dom96 | def-: actually, you may be able to make it an immediate macro. Detect if it's a list comprehension, output the original node if it's not |
12:24:49 | def- | dom96: nice idea, but i think [foo, bar] is invalid syntax anyway |
12:25:28 | dom96 | I don't think so |
12:25:48 | def- | there always needs to be something before the [ |
12:34:11 | * | tumak_ quit (Ping timeout: 255 seconds) |
12:35:38 | * | untitaker quit (Ping timeout: 250 seconds) |
12:37:23 | dom96 | Hrm. indeed. |
12:41:28 | * | untitaker joined #nimrod |
12:46:09 | * | darkf quit (Quit: Leaving) |
13:28:32 | * | kunev quit (Ping timeout: 245 seconds) |
13:45:20 | * | Trustable joined #nimrod |
13:47:22 | * | q66 joined #nimrod |
13:48:06 | * | flaviu joined #nimrod |
14:00:09 | * | Matthias247 joined #nimrod |
14:08:27 | * | zahary quit (Quit: Leaving.) |
14:31:23 | OrionPK | wish we could just reimplement the entire compiler with macros :p |
14:31:39 | OrionPK | then strip the core compile down to just if/else/while lol |
14:55:16 | * | Fx00F joined #nimrod |
15:38:20 | flaviu | OrionPK: Wouldn't work, there needs to be a way to introduce new top-level nodes with macros |
15:44:22 | dom96 | http://www.codeproject.com/Articles/787668/Why-We-Should-Love-null |
15:54:28 | Matthias247 | all the hipsters on reddit are already hatin it :) |
15:56:55 | dom96 | yep lol |
15:57:29 | Matthias247 | I actually like null ;) |
16:15:26 | * | nande joined #nimrod |
16:18:50 | * | Demos joined #nimrod |
16:19:10 | flaviu | The problem with null is that its meaningless. Using Option or Maybe forces you to document *where* there can be a null, and *why* there is a null |
16:21:04 | flaviu | Like in his database example, I'd say that null is perfectly valid because its meaning is documented and storing 0 to represent unknown is ridiculous |
16:23:39 | Demos | the thing is. Null literally /is/ zero |
16:23:59 | Demos | the equivalent to null for something returning a number is something like returning -1 |
16:24:27 | flaviu | Demos: -1 isn't a good idea either. Its too easy to ignore |
16:24:46 | Demos | yeah, I like null better since it crashes your program if you try and use it |
16:25:10 | Demos | but for something like "search this array" returning -1 is better than using an optional type imo |
16:25:54 | flaviu | What about python-style array indexing? |
16:26:03 | flaviu | That would mean the last element in the array |
16:26:16 | Demos | well in python you would need soemthing different |
16:26:25 | Demos | I mean c++ returns an element off the end in that case |
16:26:37 | Matthias247 | -1 is not good because it could be a valid number |
16:27:22 | Matthias247 | but the Option stuff doesn't buy you much. Either you have lot's of overhead through pattern matching or you force-unwrap it which is the same as dereferencing null |
16:27:32 | dom96 | Nimrod's 'not nil' will solve all our problems. |
16:27:34 | Demos | if I have something where it /could/ return a nullpointer I usually have one function that throws an exception instead and another called like wahteverOptional that can return nills |
16:27:44 | * | dom96 bows down to Araq |
16:27:56 | flaviu | Matthias247: Or you apply a function the the option and don't care whether it get executed |
16:27:59 | Demos | yeah not nil is a good idea |
16:28:35 | flaviu | -128 is a pretty good "not found" value |
16:29:01 | flaviu | since `-(-128)==0` |
16:29:01 | Matthias247 | null pointer errors are also typically the most unproblematic errors that I encounter |
16:31:08 | flaviu | Well, the guy advocates nullable types |
16:31:24 | flaviu | Which is essentially Option, but less powerful |
16:32:59 | Matthias247 | I think the annotated nullable types from swift might be a nice middle way |
16:35:00 | flaviu | I don't see anything special with swift, except some syntax sugar that I'd say is of limited usefulness |
16:38:39 | NimBot | nimrod-code/packages master 0be1cb6 achesak [+0 ±1 -0]: Added imghdr and csv2json. |
16:38:39 | NimBot | nimrod-code/packages master f91e5ca Dominik Picheta [+0 ±1 -0]: Merge pull request #77 from achesak/master... 2 more lines |
16:49:09 | Demos | so len does not work on an openarray typeclass |
16:54:01 | dom96 | Demos: What license is your vecmath module under? |
16:55:44 | Demos | I can release it under BSD, right now it is just sitting in another project. |
16:57:08 | dom96 | Might be worth putting it in a separate repo. I might make some PRs then. |
16:57:17 | Demos | hm good idea |
16:57:28 | Demos | it would motivate me to split it up into multiple files as well |
16:58:26 | Demos | right now it has tons of stuff in that one file, vectors, matrices, AABB, ray intersection tests, Quaternions, and so on |
16:58:43 | dom96 | do it |
16:59:20 | dom96 | are you using any existing libraries as inpiration for the API of that module? |
16:59:55 | Demos | sort of |
17:00:12 | Demos | I mean Eigen, but in general a lot of the stuff Eigen does can not work in nimrod |
17:00:35 | Demos | Actually a few functions are straight up translated from Eigen or GLM |
17:01:12 | dom96 | I'm going through a tutorial which uses GLM so I might translate some functions from there |
17:01:26 | Demos | most should already be there |
17:01:47 | Demos | we like the MIT license right? |
17:02:11 | flaviu | Demos: Sure, same as BSD but with less ambiguous naming |
17:04:05 | dom96 | yeah |
17:04:08 | dom96 | MIT might be better |
17:05:19 | Demos | can you make a file in a babel package that is just a utility module, and is not avalible when the package is installed? |
17:06:03 | flaviu | include maybe? |
17:06:32 | io2 | mpl2 is my favorite because it is the best mix of everything :) |
17:07:31 | flaviu | io2: Its copyleft though... |
17:07:51 | io2 | flaviu: incorrect; you can use it in your commercial projects without an issue |
17:08:03 | Demos | dom96, you wrote babel right? so can you make a "private" module? |
17:08:20 | io2 | "Eigen is Free Software. Starting from the 3.1.1 version, it is licensed under the MPL2, which is a simple weak copyleft license. Common questions about the MPL2 are answered in the official MPL2 FAQ. " |
17:08:42 | dom96 | Demos: yes. And yes, but only by convention. |
17:08:45 | dom96 | Put it in a private dir |
17:08:54 | flaviu | io2: Oh, I see. If you modify the software, you have to disclose the source, but you don't have to share anything else |
17:09:00 | dom96 | as in a dir literally named 'private' :P |
17:09:19 | flaviu | ie, submit your bugfixes upstream |
17:09:29 | io2 | flaviu: pretty much, but way less ambiguous than lgpl stuff |
17:09:32 | flaviu | That does seem pretty cool, I might move to that |
17:09:48 | io2 | flaviu: i could not find another language that was compatible to metaprogramming |
17:09:50 | io2 | license* |
17:10:21 | flaviu | I'm not sure I understand, now is metaprogramming special? |
17:10:23 | io2 | since I do a lot of it, I prefer using mpl2 because it simply makes sense; the Eigen developers choose wisely. |
17:10:45 | io2 | flaviu: imagine code generating code and mixing with your "proprietary" code |
17:10:59 | io2 | in a non-linking fashion; it simply generates things that go in |
17:11:08 | flaviu | Oh, I see |
17:11:19 | io2 | that's one little detail that is very evil |
17:12:05 | io2 | you currently don't have something better than mpl2 imvho for these cases, so I switched to that instead of making GPL exceptions etc. |
17:12:40 | io2 | BSD/MIT are kind of confusing as to intent and derivative works as I see it. The tl;dr is: mpl2 is metaprogramming-compatible. |
17:16:35 | Demos | I had it all set up and then I git reset --hard :D |
17:23:22 | dom96 | Isn't MIT basically "do whatever you want, and don't hold me responsible"? |
17:23:29 | dom96 | "(if something breaks)" |
17:23:29 | * | flaviu quit (Read error: Connection reset by peer) |
17:24:05 | Demos | OK PR on packages is up |
17:25:19 | Demos | please note that private/intrinsic contains a function that is needed for using the ray intersection code, you can provide a GCC version of the intrinsic or just comment that ray intersection code out on your computer (I am not even sure it works as is, I just wrote it recently) |
17:25:34 | * | flaviu joined #nimrod |
17:31:25 | dom96 | Demos: you should update your git email |
17:31:38 | dom96 | it doesn't match your github email |
17:32:10 | dom96 | Thanks for separating it out! |
17:36:42 | NimBot | nimrod-code/packages master 50efb41 Charlie Barto [+0 ±1 -0]: added vecmath |
17:36:42 | NimBot | nimrod-code/packages master 0292ee1 Dominik Picheta [+0 ±1 -0]: Merge pull request #78 from barcharcraz/master... 2 more lines |
17:38:17 | Demos | no problem, I have been meaning to split out a lot of code from this graphics stuff |
17:55:18 | Demos | dom96, watch out with vecmath that you are calling the correct functions, there are seperate multiply functions for vec3s and vec4s and whatnot but the compiler WILL NOT emit an error if you use the wrong one |
17:55:38 | Demos | the C compiler sometimes will though |
17:59:54 | dom96 | hrm, ok. Why is that? |
18:03:30 | Demos | compiler bugs |
18:03:40 | Demos | they are reported |
18:06:41 | * | bogen joined #nimrod |
18:07:32 | * | ome quit (Quit: Connection closed for inactivity) |
18:07:52 | bogen | does nimrod have user defined attributes for procedures? (accessible by ctfe) |
18:08:36 | dom96 | hello bogen, welcome to #nimrod |
18:08:50 | dom96 | Perhaps pragmas are what you have in mind? |
18:09:00 | bogen | hi dom96 |
18:09:22 | dom96 | dumpTree: proc x: int {.myPragma.} = 5 |
18:09:57 | dom96 | You'll see that the AST contains 'Pragma Ident !"myPragma"' or something like that. |
18:10:07 | dom96 | (dumpTree is defined in the macros module) |
18:11:21 | bogen | possibly. I'm exploring the possibily of using nimrod, there are some things I wan to know if it can do first. At compile time could I traverse a module and make a string map of all procedures that match my critera. so, a pragma might work for identifying which procedures I want to put into the map. |
18:12:53 | bogen | it does not have to be a compile time (building the map), it can be at run time if the type of reflection is possible. I'll look at dumpTree |
18:13:32 | * | flaviu quit (Read error: Connection reset by peer) |
18:15:42 | * | flaviu joined #nimrod |
18:17:31 | dom96 | What you will need to do is wrap the whole module in a macro call. |
18:18:19 | * | nande quit (Remote host closed the connection) |
18:19:22 | Demos | dom96, he could use a macro pragma right? |
18:19:29 | Demos | and a compile time map of some kind |
18:19:49 | dom96 | yeah, that too. |
18:19:59 | dom96 | I wonder if you can 'push' a macro pragma. |
18:20:33 | Demos | that would be ideal when I write my direct3D de-uglification macro |
18:20:57 | Demos | thing.method(parms) instead of thing.lpvtbl.method(thing, params) |
18:21:08 | Demos | but I only want to to happen to my d3d procs |
18:22:04 | bogen | wrapping the whole module in a macro call... I don't know if like how that sounds, unless you mean referencing the source of the module or something in the macro call |
18:22:49 | Demos | just putting macro: at the top, the pragma idea would work as well |
18:23:13 | Demos | but instead of going through the module in the macro you just add the proc that has the pragma to your tracking structure |
18:23:38 | Demos | you could probably also use the #! thing somehow |
18:24:00 | dom96 | You might be able to just write {.push myMacroName.} |
18:24:03 | dom96 | at the top of the module |
18:24:10 | dom96 | bogen: what is your use case? |
18:27:00 | bogen | one use case, without going into all the details, is that I need to be able to accept proc names from outside my application (at runtime) and run procedure of the same name. I'd like an automatic mapping (via a hint, a pragma should work as you have mentioned), without having to have a seperate table in the code. |
18:28:11 | bogen | can macros retain state? |
18:28:58 | bogen | could I have a collecting macro in each function that records the function name, then later on dump the collection to a map via another macro? |
18:29:08 | bogen | eh, procedure... |
18:29:28 | bogen | (like I said, I'm exploring the possibilities of nimrod) |
18:30:17 | * | vendethiel joined #nimrod |
18:30:18 | Demos | you should be able to generate some kind of mapping from string to procedural type |
18:30:32 | Demos | you gotta be careful with the params though |
18:30:58 | dom96 | You can get the macro to generate the table for you. |
18:31:11 | Demos | alternitively you can use your platform's shared library tools to do this |
18:31:16 | bogen | yeah, I know that, the call gate would take care of that (the params) |
18:31:18 | Demos | that is pretty much what a shared lib is |
18:31:50 | dom96 | I don't think macros can retain state at compile-time. |
18:33:14 | * | silven quit (Ping timeout: 250 seconds) |
18:33:14 | bogen | so compile time code execution is limited to "pure functions" (no side effects) I take it? |
18:35:24 | dom96 | there are some exceptions, you can for example execute a process and get its output |
18:35:29 | dom96 | at compile-time |
18:35:35 | Demos | bogen, not quite. What you can do is have a structure that is accessable to the code that calls the macro (so like a module global map) and then the macro can emit calls to add stuff to the map |
18:35:37 | Varriount | dom96: What about global variables? |
18:36:19 | dom96 | Varriount: at compile-time? |
18:36:29 | Varriount | Yeah |
18:37:39 | dom96 | I don't think so. |
18:38:56 | Demos | I don't think macros have a very well defined sense of ordering, so allowing state changes from inside macros would be hard to control |
18:39:19 | Demos | or reduce the optimization possibilities in the compiler |
18:43:12 | bogen | Looking at the objdump -t output of a nimrod program, one "could" parse that output one oneself at runtime and generate the map. In that case my custom id would be in the function names. I was hoping to avoid that, as that does not make nimrod stand out over other languages that can do that. :) |
18:43:19 | * | io2 quit (Ping timeout: 255 seconds) |
18:43:46 | bogen | that can resort to doing it that way... |
18:44:13 | Varriount | bogen: You could also write/read to an output file |
18:44:27 | bogen | at compile time? that would work. :) |
18:46:03 | Demos | I have a library that lets you use openGL by loading a program and then doing like program.uniform1 = obj1 program.uniform2 = obj2 program.vertices = somearray draw(program) |
18:46:07 | Demos | what should I call it? |
18:46:48 | dom96 | Varriount: Are you sure there is a way to write files at compile-time? |
18:47:12 | flaviu | Demos: BWFOGL :P |
18:47:28 | Araq | hi bogen welcome |
18:47:38 | bogen | Hello Araq |
18:47:43 | Demos | flaviu, erm where did that come from? |
18:47:45 | Araq | you can do this with macros, but it's horrible ;-) |
18:47:52 | flaviu | Demos: Better Wrapper For OpenGL |
18:48:08 | Demos | it is not a wrapper though, it does not let you use a lot of features |
18:48:21 | Demos | for example I require that ALL non-sampler uniforms be UBOs |
18:48:30 | flaviu | Better Almost Wrapper For OpenGL |
18:48:38 | Demos | heck if my graphics card had bindless textures I would requite all uniforms to be UBOs |
18:49:05 | Demos | also, I do not support getting vertex data from more than one array unless you want to take ownership of the VAO and VBO |
18:49:11 | Araq | bogen: IMO you're much better off with an .exposed pragma macro that you add to the procs that are to be exposed |
18:49:17 | dom96 | Demos: EasyGL? |
18:49:24 | Demos | that is good |
18:49:37 | Demos | FastGL |
18:49:41 | Demos | yeah I like FastGL |
18:50:05 | Araq | bogen: that said, you can do parseStmt(staticRead("module.nim")) to get the AST of a complete module |
18:50:30 | Demos | because they way I model the API can be substantially faster than regular GL once I implement the "bleeding edge extensions" version |
18:50:38 | flaviu | Demos: What about "Phosphor"? |
18:50:58 | flaviu | sounds nice and sort of describes it. |
18:51:02 | bogen | Arap: ok, and then from that AST filter out what I want and build the map |
18:51:12 | Demos | apperently Phosphor is the name of an FPS game |
18:51:29 | flaviu | You'll never find a name if you don't reuse names |
18:51:50 | Varriount | Araq: Is there a current way for macros to store global state without resorting to output files and such? |
18:52:12 | Araq | Varriount: what do you think .compileTime global vars do? |
18:52:19 | flaviu | What about a dummy `discard "serialized data"`? |
18:52:25 | Varriount | Oh, I forgot about those. |
18:52:29 | Demos | I like Phosphor |
18:52:37 | Varriount | bogen ^^^ |
18:53:20 | dom96 | flaviu: how does Phosphor describe it lol? |
18:53:38 | bogen | Varriount: yeah, so a .compileTime global var could be a map I'm building at compile time? |
18:53:46 | Varriount | Yes. |
18:54:00 | flaviu | dom96: It describes how computer monitors work, and GL is displayed on computer monitors |
18:54:30 | Varriount | bogen: Just be careful/avoid using the variable at runtime. I just did a runtime repr() on a compileTime seq[string] and got C errors. |
18:54:44 | flaviu | http://stuff.h-i-r.net/blogstuff/wx1.jpg |
18:55:45 | * | kunev joined #nimrod |
18:56:05 | bogen | Varriount: well, I assume I'd need followup code (after all the collections) to create the data structure that the runtime would use. |
18:56:37 | Varriount | bogen: Yeah, as long as you programmatically create that data structure as an AST somewhere. |
18:58:09 | bogen | Varriount and Araq: ok, so I have two options to explore 1) tag with a pragma then do a parseStmt on the module 2) collect with macro then generate the data structure |
18:59:37 | Varriount | I'd try doing #2 first. |
18:59:49 | Varriount | bogen: What exactly is your larger goal? |
19:04:33 | bogen | in simplest terms the app is a slave to another app. the procedures take no input arguments and don't return anything. state is maintained elsewhere. since there will be a lot of these procedures I don't want to have to maintain a seperate table. (Added it here, forgot to to add it here). |
19:04:44 | * | silven joined #nimrod |
19:05:50 | * | Trustable quit (Quit: Leaving) |
19:10:21 | bogen | is system.c generated uniquely for my app? or can I link against that dynamically? |
19:12:03 | Araq | you can link against the runtime library dynamically, but system.c is unique |
19:12:15 | Araq | it's all documented |
19:13:23 | Araq | unfortunately you still have to read it and I'm serious here. I often wonder if excessive documentation puts people off moreso than no documentation. |
19:17:05 | * | io2 joined #nimrod |
19:18:41 | Varriount | Araq: It's better when one can search for something easily. |
19:22:01 | * | io2 quit (Ping timeout: 255 seconds) |
19:23:53 | bogen | Araq: Thanks. I understand (about needing to read it). I was just curious and as Varriount said, if would be easier for newcomers if one could search the main documentation site. |
19:29:01 | Araq | google site search? |
19:29:19 | Araq | I guess we simply need a button for that |
19:35:58 | Demos | hm I have a generic proc that ends up calling contains via in on a TSet |
19:36:07 | Demos | this fails to work unelss I import sets at the callsite of the proc |
19:36:20 | Demos | even though I import sets in the module where this proc is defined |
19:36:26 | Varriount | Known issue, I think |
19:36:33 | bogen | yeah. however, docs are under the top level of nimrod-lang.org, so searching again nimrod-lang.org gets a lot of noise from build.nimrod-lang.org (if one is only looking for something in the documentions). Just like the forum and build are at their own top level, a docs.nimrod-lang.org would help in searching the documentation. |
19:36:44 | Demos | Varriount, it is kinda a large issue |
19:39:06 | Demos | looks liek there are some similar problems with the method call syntax |
19:42:07 | Demos | this must be a new regression |
19:43:56 | Araq | hmm I fixed that recently, are you on devel? |
19:44:19 | Demos | yeah, but I have not updated in a few days |
19:44:39 | Demos | come to think of it I should probably update /before/ bitching on IRC |
19:46:28 | * | io2 joined #nimrod |
19:48:56 | Demos | OK it still happens on the latest devel... |
19:49:09 | Demos | git hash 915d329 |
19:53:10 | Demos | doing contains(set, item) works |
19:53:15 | Demos | but set.contains(item) does not |
19:53:30 | Demos | and item in set also does not work |
19:55:20 | Araq | report it asap |
19:58:50 | dom96 | Demos: The indexing starts at 1?! |
19:59:00 | Demos | dom96, yes |
19:59:03 | dom96 | why? |
19:59:21 | Demos | because that is common in math |
19:59:34 | Araq | don't do that |
19:59:50 | dom96 | ugh |
20:00:28 | Demos | Araq, why not? |
20:01:33 | Araq | Demos: programmers really do not like that |
20:02:47 | Demos | Araq, well too bad for them. The data array does start from zero I think |
20:02:47 | dom96 | Yep. This just completely turned me off your module. |
20:03:41 | * | Varriount|Mobile joined #nimrod |
20:05:49 | Demos | honestly I do not see how it is such a big deal, like for arrays there is no standard so you often start at 0 but matrices are almost always 1 based in maths |
20:06:46 | Araq | Demos: I can sympathize but this means people will roll their own module instead |
20:06:50 | Demos | OK that issue is up |
20:07:40 | dom96 | One disadvantage is that copying code from GLM is more difficult. |
20:09:04 | Demos | dom96, well starting from zero makes copying code from maths texts, or from the notepad you just did some math on harder |
20:09:57 | dom96 | You would be manually copying the code from maths texts and notepads anyway. |
20:10:06 | Demos | I guess I can consider changing it, but I did not expect anyone would care. In fact I figured people would like that it lines up with what you see in math |
20:10:20 | Demos | well you are not going to just copy C++ code and expect it to work |
20:10:56 | dom96 | Yes, but I can copy the boring stuff. |
20:10:56 | Demos | and if you are following a tutorial using GLM you should not be copying the code anyways |
20:11:31 | dom96 | But now I must manually add 1 to each index. |
20:13:00 | dom96 | and that's not even trivial: I have to start from the highest index and work my way down replacing the digits. |
20:13:22 | Demos | %s/\[(\d)\]/\=submatch(0)+1/g? |
20:13:48 | Demos | or something along those lines |
20:14:44 | Demos | or use <C-A> |
20:15:01 | Demos | which will increment the value under the cursor |
20:15:29 | dom96 | I'm using Aporia. |
20:16:20 | Demos | I usually use Visual Studio, but when I need to translate code like this or write a wrapper I always use vim, for this reason |
20:16:37 | dom96 | meh. I'll just write a quick vector module of my own I think. |
20:18:17 | * | milosn_ quit (Remote host closed the connection) |
20:19:40 | Demos | ugh |
20:20:06 | * | milosn joined #nimrod |
20:23:04 | * | def- quit (Ping timeout: 240 seconds) |
20:28:59 | Araq | dom96: it really is trivial but the result is often too ugly and then some error prone rewriting happens |
20:30:53 | * | kunev quit (Ping timeout: 240 seconds) |
20:36:08 | * | jbe joined #nimrod |
20:36:58 | jbe | hi nimrods :) |
20:37:07 | Araq | hi jbe |
20:37:27 | jbe | thanks again for a sweet language |
20:37:28 | dom96 | Araq: sure, replacing is trivial but cumbersome. The problem is indeed the possibility of introducing errors. |
20:37:35 | dom96 | hey jbe |
20:38:06 | jbe | are there shared memory seqs yet? |
20:38:07 | Araq | Demos: it's math textbooks vs "code in other programming languages out there" |
20:38:08 | * | tinAndi joined #nimrod |
20:39:11 | Demos | Araq, you are right. I should probably switch to zero based indexing. |
20:39:55 | Araq | jbe: you can use allocShared and roll your own and I know several people do that, but nothing was added to the stdlib |
20:41:06 | jbe | ah ok.. yeah that's what i do now. i saw the old post about the new (now old?) concurrency model that got bumped and became curious |
20:42:02 | flaviu | Araq: How about another feature request? :P |
20:42:34 | Araq | flaviu: how about you fix some bugs? |
20:42:40 | flaviu | array[0..100, T] should be equivalent to array[1..101, T] |
20:44:31 | Araq | jbe: the new concurrency model makes shared memory easier in general |
20:44:59 | Araq | and its implemenation is ~70% finished |
20:45:35 | * | tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]) |
20:45:43 | Araq | flaviu: which definition of "equialent" do you use? |
20:46:15 | flaviu | Their types are equvilent |
20:46:17 | jbe | very nice.. |
20:46:41 | flaviu | eg, I can pass an array[0..100, T] to something that expects an array[1.101, T] |
20:46:50 | flaviu | Like tuple field names |
20:49:07 | flaviu | Wait, that works |
20:49:20 | flaviu | Well, just ignore me then lol |
20:50:28 | * | def- joined #nimrod |
21:12:12 | * | jbe quit (Quit: Page closed) |
21:23:32 | Demos | I would just like to point out that fortran defaults to 1 based matrices |
21:23:52 | Araq | I know and so does Lua |
21:30:16 | * | Demos quit (Ping timeout: 255 seconds) |
21:32:11 | * | Demos joined #nimrod |
21:38:25 | * | q66_ joined #nimrod |
21:40:54 | * | q66 quit (Ping timeout: 260 seconds) |
21:43:45 | Varriount|Mobile | We should bypass the 0-based-indexing vs 1-based-indexing entirely, and use an alphabetical mapping >:) . |
21:45:18 | Varriount|Mobile | Indexes will go foo["a"] to foo["z"] , to foo["aa"] etc. |
21:50:08 | * | q66_ is now known as q66 |
21:59:07 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
22:22:11 | * | noam quit (Ping timeout: 264 seconds) |
22:27:06 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:27:07 | * | dom96 quit (Excess Flood) |
22:28:28 | * | JStoker quit (Ping timeout: 244 seconds) |
22:29:09 | * | Roin quit (Ping timeout: 240 seconds) |
22:29:51 | * | Zuchto quit (Ping timeout: 250 seconds) |
22:29:56 | * | JStoker joined #nimrod |
22:29:57 | * | JStoker quit (Changing host) |
22:29:57 | * | JStoker joined #nimrod |
22:31:09 | * | dom96 joined #nimrod |
22:31:28 | * | oddmunds quit (Ping timeout: 250 seconds) |
22:38:49 | * | Zuchto joined #nimrod |
22:40:07 | * | oddmunds joined #nimrod |
22:42:28 | * | jez0990 quit (Quit: No Ping reply in 180 seconds.) |
22:42:35 | * | jez0990 joined #nimrod |
22:56:35 | * | Roin joined #nimrod |
23:02:52 | * | darkf joined #nimrod |
23:24:42 | * | Varriount-Mobile joined #nimrod |
23:24:54 | * | Varriount|Mobile quit (Read error: No route to host) |
23:26:33 | * | q66_ joined #nimrod |
23:28:42 | * | q66 quit (Ping timeout: 260 seconds) |
23:28:54 | * | Varriount-Mobile quit (Ping timeout: 244 seconds) |
23:32:11 | * | dom96 quit (Excess Flood) |
23:33:21 | * | vendethiel quit (Read error: Connection reset by peer) |
23:33:39 | * | dom96 joined #nimrod |
23:34:35 | * | vendethiel joined #nimrod |
23:34:53 | * | vendethiel quit (Read error: Connection reset by peer) |
23:37:55 | * | vendethiel joined #nimrod |
23:45:51 | Demos | Varriount, I like the alphabetical idea :D |
23:46:11 | Demos | also people should realize that THE main linear algebra library is written in FORTRAN |
23:58:36 | * | Joe_knock quit (Quit: Leaving) |