00:02:00 | dom96 | Unfortunately, I must sleep now. Good night. |
00:02:26 | NimBot | Araq/Nimrod devel e66d5c1 Araq [+0 ±1 -0]: updated news.txt |
00:02:26 | NimBot | Araq/Nimrod devel b41e3b0 Araq [+0 ±5 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
00:02:54 | Araq | dom96, Varriount ok so lets release tomorrow |
00:03:04 | Araq | but really! then |
00:03:23 | dom96 | lol |
00:03:25 | Varriount | Ok. If that's the case, then I need to reboot my computer now. |
00:03:26 | dom96 | ok |
00:03:38 | * | Varriount quit (Read error: Connection reset by peer) |
00:03:45 | dom96 | bye |
00:03:48 | renesac | Araq, my pull request with the compressed images for the website was merged on master |
00:03:53 | renesac | don't forget to pull it to devel |
00:04:14 | dom96 | he'll be merging devel to master |
00:04:20 | dom96 | so it'll be fine |
00:04:22 | dom96 | bye |
00:04:23 | renesac | right |
00:04:32 | renesac | good night |
00:04:39 | Araq | good night |
00:05:07 | Demos | I am getting strange lookup behavior in a template |
00:05:46 | Demos | the template calls a generic proc and the generic proc is not able to find definitions that are in the definition scope but not in the scope of the template instantiation |
00:13:02 | * | ics quit (Ping timeout: 246 seconds) |
00:21:47 | * | rta quit (Ping timeout: 246 seconds) |
00:22:37 | * | BitPuffin joined #nimrod |
00:29:57 | * | Varriount joined #nimrod |
00:34:36 | * | brson joined #nimrod |
00:35:49 | * | rta joined #nimrod |
00:36:56 | * | Varriount quit (Quit: Leaving) |
00:39:03 | * | brson quit (Ping timeout: 255 seconds) |
00:40:56 | * | brson joined #nimrod |
01:01:45 | * | seagoj joined #nimrod |
01:05:42 | * | q66 quit (Quit: Leaving) |
01:06:02 | EXetoC | so does loadExtensions only load referenced extensions? |
01:06:56 | EXetoC | it tries to load some unneeded symbol but fails. I generated a module called gltest.nim and now I'm trying to use it |
01:12:02 | * | seagoj quit (Quit: Textual IRC Client: www.textualapp.com) |
01:17:09 | * | rta quit (Ping timeout: 245 seconds) |
01:22:38 | Demos | so command syntax/properties + getStackTrace() is pretty amazing |
01:29:56 | * | rta joined #nimrod |
01:34:08 | NimBot | Varriount/NimLime master fb6da3a Erik O'Leary [+0 ±2 -0]: Added match support for _ in tmpl's |
01:42:30 | * | Guest78262 quit (Ping timeout: 255 seconds) |
01:43:07 | * | Guest78262 joined #nimrod |
02:08:07 | * | Demos quit (Quit: Lost terminal) |
02:18:09 | * | BitPuffin quit (Ping timeout: 255 seconds) |
02:24:13 | * | Varriount joined #nimrod |
02:28:38 | Skrylar | lol the reference implementation of porter's stemmer is silly |
02:28:42 | Skrylar | global statics everywhere |
02:29:17 | Varriount | I finally got raid 1 working on my computer! :D |
02:39:08 | * | brson quit (Quit: leaving) |
02:43:08 | * | Demos joined #nimrod |
02:50:10 | * | zezba9000 joined #nimrod |
02:51:32 | zezba9000 | Hey was just wondering if there was any idea of when multiple interfaces might be added into nimrod? |
02:52:50 | Varriount | zezba9000: What do you mean? |
02:53:33 | Varriount | A type can already fulfill multiple user defined type classes. |
02:53:49 | zezba9000 | Like right now you can derive from a base class in nimrod, but not interfaces after that like so: "A : B, IC, ID, ect.." |
02:54:03 | Varriount | You mean, multiple inheritance? |
02:54:19 | zezba9000 | yes, but only with interfaces support like C#, not C++ |
02:54:55 | Varriount | I'm not quite sure I understand - I don't have much experience with C# |
02:55:28 | Demos | zezba9000: apperently it is possible (as in humanity knows how to do it in the context of multiple dispatch) but it is low priority |
02:55:46 | Demos | you can cook up some macros to make and fill vtables and whatnot if you like |
02:55:55 | zezba9000 | Ok, well in C# I can do "class A : B, IC, ID {...}" C++ can do the same and more, but its not needed |
02:56:09 | Demos | but often typeclasses are a better solution |
02:56:11 | Varriount | I think filwit has some things for OO programming. |
02:56:45 | Demos | since with typeclasses the module with types "implementing" the typeclass need not depend on the typeclass |
02:56:49 | zezba9000 | Demos: Well I may make a C# to Nimrod converter... and it would be so much better with multiple interfaces for translation |
02:56:58 | zezba9000 | Varriount: Ya he is my brother |
02:57:12 | Demos | zezba9000: that would be neat. Perobably very hard |
02:57:31 | zezba9000 | But it might make more sense to use standard nimrod, not his off-shoot |
02:57:34 | Demos | one idea is to use the new `.` overloading to access function in the vtable |
02:58:09 | * | darkf_ joined #nimrod |
02:58:20 | zezba9000 | Demos: Iv'e seen how it can be done, but its so dirty |
02:58:41 | Demos | zezba9000: how do you mean? v-tables are how c#/java/c++ style OOP works |
02:58:45 | zezba9000 | I would like it to be human readable. So it maps over well from C# to Nimrod visually |
02:59:04 | zezba9000 | Demos: But not visually |
02:59:35 | zezba9000 | It would make the translator cleaner if it didn't need to convert in that way is all. |
02:59:37 | Demos | well sure, you can write macros to make objects with vtables, you could even have the macro go through the type decl and change foo: proc(...) to a vtable entry |
02:59:38 | Demos | maybe |
03:00:53 | Demos | zezba9000: well nimrod is not going to copy c#'s object model, and if you are reimplementing all of c#'s syntax and semantics than I am not sure what you are getting |
03:01:25 | zezba9000 | well, not sure. I don't want to make my life hard. I know C# very well, but changing how Nimrod works is just going to complicate my life lol |
03:01:48 | Skrylar | interfaces... hrmm. i don't think nimrod favors them to be honest |
03:01:57 | * | darkf quit (Ping timeout: 265 seconds) |
03:02:04 | Skrylar | you have generics code, and composition of smaller objects |
03:02:52 | * | Varriount doesn't get what the difference is between interfaces and typeclasses |
03:03:34 | Skrylar | Varriount: interfaces are dynamic |
03:03:52 | zezba9000 | I code in a OO fashian and am not going to write large code bases outside that model. I don't care if Nimrod does or not, I care about its speed, but it would be nice to have some standard features in a way other langs have then like C#, C++ or D |
03:03:55 | Skrylar | IIRC the way go does it, when you say "x as IFoo" it actually makes a struct full of function pointers |
03:05:05 | Demos | well nimrod is not really all about OOP, I really like that nimrod does not bundle functions and data |
03:06:04 | zezba9000 | Varriount: Example: http://pastebin.com/WBdcNgZh |
03:06:31 | zezba9000 | Demos: Why not both... |
03:06:34 | Skrylar | i haven't actually come to a point where i needed interfaces oddly. subclassing yes, but i handled that by just shoving in a "super: Foo" field like go does it |
03:06:48 | Skrylar | i don't see why it couldn't be done with macros |
03:06:51 | zezba9000 | C++ has both? |
03:07:43 | zezba9000 | Varriount: Fixed typo: http://pastebin.com/tzQxVBqu |
03:08:10 | Demos | c++ lacks typeclasses. and having method calls be sugar for normal functions makes some kinds of code eaiser to write. Also if you really need dynamic binding you can use nimrod's first class functions |
03:08:43 | Demos | another problem with bundleing data and behavior together is that it means you almost always are thinking of your data one element at a time, which may not be ideal |
03:09:21 | zezba9000 | But humans thing in terms of objects and data groups? |
03:10:04 | zezba9000 | Even if the code doesn't have the concept, you apply it yourself. Makes it easier to visually see how you put it together in your head |
03:10:31 | Varriount | Yes, but not to the extreme. Unless you recieve prolonged exposure to Java. |
03:10:35 | zezba9000 | Anyway how would I go about duplicating the example in C# to Nimrod? |
03:11:08 | zezba9000 | Varriount: Both worlds have very good uses. To say ones doesn't is silly |
03:11:35 | Varriount | (I maintain the assertion that uncautious use of Java and it's restrictive OO paradigm damages the brain) |
03:11:36 | xenagi | is that even advisable? I may be wrong, but, being that C#/Java and Nimrod, are two different languages, they probably have different programming styles |
03:12:12 | xenagi | Why would you want to "duplicate" C# to Nimrod when you should probably write the Nimrod-idiomatic version. |
03:12:26 | zezba9000 | Varriount: I disagree. I think your just not seeing how it makes life easier in large apps. |
03:12:59 | * | rta quit (Ping timeout: 245 seconds) |
03:13:03 | zezba9000 | xenagi: Because I like C# over any lang in many areas. But I do game dev. And Nimrod is super F'in fast. |
03:13:25 | zezba9000 | They both have a GC and thus its logical to want C# with the power of nimrod for me |
03:13:43 | zezba9000 | I target .NET only things like Xbox 360 ect. |
03:14:00 | xenagi | ah I see |
03:14:10 | zezba9000 | Indie SDKs in short. Like Vita PSM as well wich is .NET only |
03:14:43 | xenagi | Nevertheless, I'm not sure I'm qualified to offer Nimrod advice |
03:14:47 | zezba9000 | But I would love to have that portibility with power on other platforms like PCs ect |
03:15:03 | Demos | zezba9000: you realize that idomatic c# is going to be pretty much just as fast in .net as it is in nimrod |
03:15:26 | Demos | also microsoft just announced a compiler that compiles c# to native code |
03:15:41 | Varriount | However it's not as fast as you might think Demos. |
03:15:43 | zezba9000 | did tests with that |
03:15:45 | zezba9000 | Its slow |
03:15:51 | Varriount | I've heard that it's slo- |
03:15:56 | Demos | Varriount: is it slower than .net? |
03:16:04 | zezba9000 | Demos: Yes is slower which is funny |
03:16:10 | zezba9000 | At least right now on x64 |
03:16:16 | Skrylar | microsoft doing a bad job of something? |
03:16:21 | Skrylar | hold on, i have to write the media |
03:16:28 | Skrylar | :P |
03:16:33 | Demos | I mean nimrod is not fast just because it generates native code. Nimrod is fast because it has value types and a thread local gc |
03:16:35 | zezba9000 | Hell if I know. I think something is just stupid with .NETs math libs |
03:16:46 | zezba9000 | And they are casting to double when they should not be |
03:17:09 | Demos | on that note you will be unable to translate a lot of c# code since c#'s GC is not thread local, nimrod's is |
03:17:10 | Skrylar | well property getters are wildly prevalent and involve a function call |
03:17:16 | Skrylar | probably v-calls too |
03:17:20 | zezba9000 | Demos: This is the test I use: https://github.com/zezba9000/RayTraceBenchmark |
03:17:28 | Skrylar | there's a whitepaper that talks about how 20% of a C++ program's time is spent in the vtable |
03:17:54 | zezba9000 | Maybe C# suffers from the same? |
03:18:05 | zezba9000 | On iOS C++ is 8 times as fast as Mono with LLVM |
03:18:07 | Demos | it really depends on what you are doing |
03:18:25 | zezba9000 | Something about .NET is slow and I wish I knew what the hell it was. |
03:19:04 | zezba9000 | In that benchmark Nimrod is almost as fast as C++ |
03:19:14 | zezba9000 | Thats what I would like to get out of C#. |
03:19:17 | Skrylar | Demos: they did the test by writing code that should be inlinable, then used a GCC flag to force all class calls to be virtual |
03:19:18 | Demos | one problem is that classes tend to grow without bound, and if your vtable has like 35 pointers in it that over 4 cache lines |
03:19:25 | Skrylar | thats how they determined the overhead of vtabling |
03:19:54 | Demos | Skrylar: well if you are using -fgenerate-shitty-code.... |
03:20:15 | Demos | oh wait they just turned off devirtualization |
03:20:32 | Skrylar | yeah, they wanted to see what the overhead was |
03:20:47 | Skrylar | it was pretty significant |
03:20:50 | Demos | if you actually need dynamic dispatch vtables are pretty fast, sometimes eaiser to optimize if you can make modifying them UB |
03:20:57 | Skrylar | couple that with bad code gen -- no surprise that C# code compiles to slow |
03:21:22 | Demos | like GHC generates native code as well, but they need a slow GC because they are lazy |
03:21:45 | zezba9000 | Skrylar: I don't know if its code-gen, or something to do with secerity in .NET method calls ect |
03:22:00 | zezba9000 | There may be more overhead. |
03:22:15 | Demos | in cpp people think that "program to an interface" means use pure virtual functions, in reality it means to use a spec, dynamic dispatch is orthogonal |
03:22:21 | Skrylar | why would a native compiler care about managed security stacks |
03:22:43 | Demos | Skrylar: they do checking of various things |
03:23:03 | Demos | zezba9000: you could just use c#'s structs and unsafe blocks to write quick code in c# |
03:23:04 | zezba9000 | Skrylar: You can set the securtiy of the method in C#, so the runtime will not let you dynamicly invoke it ect |
03:23:26 | Skrylar | zezba9000: my point is that if you're compiling C# to native code, that doesn't matter |
03:23:30 | Demos | zezba9000: also reflection carries a huge hit with it wrt code size |
03:23:35 | zezba9000 | Demos: LOL I thought of that onces. I could litterally right C code in C# yes |
03:23:40 | Skrylar | whether or not something is dynamically invokable only means it goes in a table or not, thats not a runtime thing :\ |
03:23:52 | zezba9000 | But there is still the Math libs converting everything to doulbes when it should not |
03:24:21 | Demos | zezba9000: I would think with math libs the big speed difference would come from heap allocation |
03:24:29 | Demos | doubles are just fine |
03:24:40 | Demos | in fact nimrod's float type is in fact a double percision float |
03:24:52 | zezba9000 | Either way its stupid to have to worrry about those things. |
03:25:05 | * | rta joined #nimrod |
03:25:08 | zezba9000 | The point it to have something easy to use and is fast at the same time. |
03:25:26 | zezba9000 | Demos: Does not the hardware use 80bit? |
03:25:26 | Demos | well that is why people use dynamic languages. Having everything be the same size is nice. although c# is mostally like that as well |
03:25:47 | Varriount | C# is a dynamic language. |
03:26:16 | zezba9000 | When you chain sin(cos(...)) ect it should do everything in 80bit then it converts to 64bi at the end |
03:26:45 | zezba9000 | Varriount: No its a strong typed lang |
03:27:04 | zezba9000 | it does have the dynamic keyword an abylity to be though |
03:27:08 | Varriount | However it's dynamic in the sense that it is run in an interpreter. |
03:27:18 | zezba9000 | No its not |
03:27:26 | zezba9000 | only .NET Micro uses an interpreter |
03:27:38 | zezba9000 | normal .NET JIT compiles to native instructions |
03:27:39 | Skrylar | i think everyone is talking in circles now |
03:28:11 | xenagi | Is anyone blogging about Nimrod? I'd love a tutorial blog on Nimrod :D |
03:28:13 | Varriount | zezba9000: Jit compilation means that parts of an interpreted language are compiled to native code at runtime. |
03:29:02 | Varriount | zezba9000: http://en.wikipedia.org/wiki/Common_Intermediate_Language |
03:29:10 | Skrylar | Varriount: c# isn't inherently dynamic |
03:29:24 | Skrylar | its built on a jvm-clone, but most of the language is pretty tightly bound and typed |
03:29:29 | zezba9000 | Idk if thats the right way to say it? Its not staticlly compiled like Nimrod, but that doesn't mean its counted as an interpreted lang |
03:30:34 | Varriount | zezba9000: C# is interpreted by the CLR (common language runtime), and part's of it are JIT'd, just like Java and the JVM, and Pypy and it's JIT |
03:30:35 | zezba9000 | The CLR determins how the IL code gets ran. |
03:31:19 | zezba9000 | No all of it gets JIT compiled. Only .NET micro uses an interpreter |
03:31:46 | zezba9000 | what part would not be JIT to native instructions? |
03:31:46 | Varriount | *shrug* if you say so. Anyway, back to finding out why starbound is reporting error. |
03:32:20 | Varriount | zezba9000: Then why isn't a Java program entirely compiled to native code? |
03:33:36 | zezba9000 | You are not being clear. C# gets compiled to IL. Then the JIT compiles it to native instructions that in turn the work with the CLR. |
03:33:56 | zezba9000 | C# is not interpeted by the CLR |
03:34:18 | zezba9000 | Nor is Java |
03:34:52 | zezba9000 | The reason for IL is hardware agnastic code as you and I both know. |
03:37:42 | * | ruzu left #nimrod ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
03:37:48 | zezba9000 | anyway my whole point here was just wondering about interface support in Nimrod... |
03:38:02 | zezba9000 | ...an ETA I mean. |
03:38:46 | zezba9000 | but guess there is none as no one here uses OO design practices to that level. |
03:40:38 | Demos | damn fire alarm |
03:41:01 | * | xenagi quit (Quit: Page closed) |
03:41:08 | zezba9000 | lol |
03:42:14 | Varriount | "Intel RapidStorage: Data 52% Complete" |
03:42:31 | Demos | zezba9000: if you just want compile time checking that you conform to an interface a proc like proc implements(typ: typedesc) = when not(typ is Interface): {.fatal: "does not implement".} could work |
03:42:46 | Demos | where Interface is a typeclass |
03:44:10 | zezba9000 | But it would only support one interface no? |
03:44:31 | Varriount | use an "and" |
03:45:10 | Varriount | when not((typ is interfaceOne) and (typ is interface2) and...): |
03:45:20 | Varriount | Or a template |
03:47:03 | Demos | zezba9000: nope as many as you like |
03:47:12 | zezba9000 | k well I need to learn more about Nimrod. First i'm using/learing Roslyn to convert C# to HLSL, GLSL ect. |
03:47:14 | Demos | the difference is that things are bound at compile time |
03:47:26 | Demos | so for example a seq[interface] would not work |
03:47:42 | Demos | although I bet there is a way to get around that |
03:47:45 | zezba9000 | Then after I know more about Roslyn i'll do some other experements |
03:48:50 | zezba9000 | But dudes, Nimrod should have interface support built in like C#, C++ and D yo! |
03:49:01 | zezba9000 | Would attract more ppls to the lang |
03:49:25 | zezba9000 | Make it easier to port exister code they may have ect |
03:49:34 | Skrylar | seems like something a macro could do |
03:49:48 | zezba9000 | But not someone is going to take the time to write |
03:49:55 | Demos | I disagree, in fact I think zach and araq would like to remove inheratance totally and implement it as a library feature |
03:50:10 | zezba9000 | 90% of people are not going to do that who would like the feature to be there I think, just a guess |
03:50:22 | Skrylar | Demos: he wants to remove the dispatch trees, not inheritance IIRC |
03:50:32 | zezba9000 | Demos: Thats build in to me :) |
03:50:35 | Demos | yeah true |
03:50:36 | zezba9000 | **built |
03:50:47 | zezba9000 | Even in .NET things are done that way |
03:50:58 | zezba9000 | But people consider it part of the lang |
03:51:11 | Demos | zezba9000: my first language was java. But I have come to realize that OOP offers almost /nothing/ in terms of code re-use or modularity |
03:51:25 | zezba9000 | I'm telling your it would be good thing to advertise on... |
03:52:02 | zezba9000 | Then I would disagree. |
03:52:42 | zezba9000 | Would you right a billing app in a non OO lang? |
03:52:53 | zezba9000 | I don't think anyone would today. |
03:53:27 | zezba9000 | **write |
03:54:23 | Demos | well you probably do not need fast native code for a billing app |
03:54:31 | zezba9000 | The worst code I have ever seen was 'C' code ported to C# that kept everything non OO in it about C |
03:54:41 | zezba9000 | But you do for games |
03:54:46 | zezba9000 | and games should use OO |
03:55:08 | zezba9000 | the only thing I can think of that does not need it (maybe) is writing service code |
03:55:13 | Demos | not really. OOP for games causes some problems, esp if you model each "thing" in the gameworld as one object |
03:55:27 | Skrylar | now we're arguing about buzzwords... |
03:56:01 | Demos | things tend to get lifted up through your inheratance tree and you get a really super big "player" or "ai" class (just some examples) |
03:56:21 | zezba9000 | Demos: Thats not true |
03:56:25 | Varriount | Demos: Not to mention that it's bad for cpu caches |
03:56:56 | Demos | Varriount: that it is, but if you are in C# you are already screwed in that area |
03:57:50 | zezba9000 | You also know C# has partial classes right? |
03:58:00 | Varriount | Demos: Why? |
03:58:12 | Demos | zezba9000: partial classes are not the same thing |
03:58:21 | Demos | Varriount: because people tend to heap allocate everything |
03:58:43 | zezba9000 | You are going to have big player classes in Nimrod as well as C# |
03:58:47 | Demos | so I guess you still get pwned by all the extra data in each class, and you can fix that. But you can not really exploat prefetch |
03:58:50 | zezba9000 | How does that make a diff? |
03:58:59 | Demos | zezba9000: you dont have a player class |
03:59:17 | Demos | you have a position class, and a health class (or just a distinct int) and so on |
03:59:26 | zezba9000 | Then your code is not organized... |
03:59:31 | zezba9000 | lol you have the same in C# |
03:59:46 | zezba9000 | but you also have a player class that just contains them |
03:59:49 | Demos | no it is, the API is very similar to something you might do in ruby (with mixins and so on) |
03:59:52 | zezba9000 | Or derives from them |
04:00:19 | zezba9000 | You should have a player class... |
04:00:44 | * | Guest78262 quit (Ping timeout: 255 seconds) |
04:00:55 | zezba9000 | You don't free float objects around. You end up duplicating arrays that don't need to exist and cause bugs |
04:01:31 | Demos | yeah, I organise my objects in arrays, one for each type of object |
04:01:33 | zezba9000 | That reminds me of when I was in Middle school and used C |
04:01:39 | zezba9000 | horible code |
04:02:33 | zezba9000 | Demos: So for a player you have a class health array and class position array ect? |
04:02:41 | * | Guest78262 joined #nimrod |
04:02:55 | zezba9000 | That are not contained/grouped in a player class? |
04:03:09 | zezba9000 | You have now fragmented all your logic |
04:03:24 | Demos | well I have arrays of (EntId, type) |
04:03:32 | zezba9000 | When you could have a single array or players that you can quickly add and remove logic from |
04:03:33 | Demos | so they are linked in "entities" by a simple ID |
04:03:49 | Demos | zezba9000: actually logic is really easy to add how I have it set up |
04:03:51 | zezba9000 | ok dude, you are doing this all wrong |
04:03:56 | Demos | my data has no logic |
04:04:00 | Demos | these are just arrays of data |
04:04:09 | zezba9000 | You in your mind have the concept of a player no? |
04:04:33 | zezba9000 | So why not visualise that day in the code how you project the abstract concept |
04:04:43 | Demos | I mean sure, but when I am writing code to render the player I do not give a crap about her health |
04:04:56 | zezba9000 | So... |
04:05:07 | zezba9000 | You have added on a huge layer of complexity |
04:05:18 | zezba9000 | As a game dev I used to try thing like you suggest |
04:05:33 | zezba9000 | bad idea as it makes far more bugs and you end up with more code |
04:05:52 | zezba9000 | Instead of one Count variable, you now have 5 or more |
04:06:09 | Demos | why would I have a count variable, what am I trying to count? |
04:06:26 | Demos | I don't store any more data than I would if I were doing OOP |
04:06:28 | zezba9000 | When you add a feature to the player you now have to updated every peace of logic that handles array counts instead of just changing one |
04:06:39 | Skrylar | i'm bored now... i'll be back later. |
04:06:46 | * | Skrylar quit () |
04:06:50 | zezba9000 | count vars are built in the array types |
04:07:02 | zezba9000 | You should use them |
04:07:06 | Demos | zezba9000: I do not follow... there are lengths, I do use them |
04:07:14 | Demos | actually I use iterators, which is nice |
04:07:29 | zezba9000 | Let me guess you have one global Length var? |
04:07:34 | Demos | what? |
04:07:36 | Demos | no |
04:07:48 | Demos | length of what? |
04:08:13 | zezba9000 | For everything that represents the aspstract obj array of player? |
04:08:55 | zezba9000 | Look i'm telling you, don't do what you are doing. Make a player class. When code starts to get complex it will save your life |
04:10:01 | zezba9000 | No game dev job would ever let you do what you are doing |
04:11:02 | Demos | OK lets get concrete. Lets say my player has 5 "fields". Health, Texture, Mesh, and Position. I then have 5 arrays and when I make a new player I add an item to each array. I have 5 lengths, but tons of other stuff has meshes and positions and whatnot |
04:11:31 | Demos | besides of all the things in your game storeing array length is never going to cause memory problems |
04:11:43 | zezba9000 | They would never allow that in game dev |
04:11:52 | zezba9000 | very bad thing to do |
04:12:19 | Demos | http://macton.smugmug.com/gallery/8936708_T6zQX#!i=593426709&k=BrHWXdJ ? |
04:12:29 | Demos | mike acton is a game developer, he ships lots of games |
04:12:33 | zezba9000 | I would would have my boss looking for someone else if I started doing that |
04:12:43 | Demos | warning: some of those slides are pretty gnarly PS3 perf stuff |
04:13:46 | zezba9000 | I see some messed up code, but not what we are talking about |
04:14:58 | zezba9000 | What you are doing should not even be done in C code. |
04:15:42 | Demos | what specific reason is "what I am doing" wrong. Why will it be harder to maintain/slower/worse/sad etc |
04:16:56 | zezba9000 | http://pastebin.com/v9Hqeaij |
04:18:12 | Demos | nononononononononono why would i have a playerSize array, that is just bad |
04:18:19 | Demos | I have a size array and a health array |
04:18:43 | zezba9000 | Show me how you would make the player in pastebin? |
04:18:51 | Demos | and storeing like your mesh and material with health is just bad |
04:19:00 | Demos | https://gist.github.com/barcharcraz/f7ed665fa352fa7917cf |
04:19:18 | Demos | that is a static mesh, not a plater |
04:19:21 | Demos | but you get the point |
04:19:38 | zezba9000 | can you give an example with player? |
04:19:46 | zezba9000 | I don't know how those objects are used in the system |
04:21:30 | renesac | zezba9000, I'm writing this whitespace FAQ clearing up misconceptions about it: https://github.com/Araq/Nimrod/wiki/Whitespace-FAQ |
04:21:38 | Demos | https://gist.github.com/barcharcraz/89949faacc8d88ba884d |
04:21:59 | Demos | and so on |
04:22:37 | renesac | Demos, the 'EntityID' would be the player class/struct? |
04:22:53 | Demos | EntityId is literally type EntityId = distinct int |
04:22:58 | Demos | but yeah |
04:23:11 | renesac | how you call 'add' on that? |
04:23:19 | Demos | I have some stuff that can pack up an entity into one block of data if you need to like transmit it over the wire |
04:23:42 | Demos | add is just proc add*[T](ent: EntityId, item: T) |
04:24:58 | renesac | hum, that proc adds the item on it's own array, but refering to the EntityId? |
04:25:22 | * | darkf_ is now known as darkf |
04:25:24 | Demos | I map the name of each componet type (the T type param) to an identifier |
04:26:03 | Demos | the arrays are private arrays in the module with add |
04:26:16 | Demos | so their storage is global, but their scope is not |
04:26:19 | * | OrionPK joined #nimrod |
04:27:02 | zezba9000 | This is just silly. Why? Just contain it in a Player object and call genEntity(Types.PlayerType); |
04:27:41 | zezba9000 | No you have to search an array object just to get a reference to a obj property? |
04:27:46 | zezba9000 | **now you... |
04:29:35 | zezba9000 | genEntity is your obj pool correct? |
04:29:51 | zezba9000 | ...is pulling from a pool? |
04:30:19 | Demos | yeah you do. But usually you care about all the components of a given type, and I sort by entity id so you can go though all the entities that share a common set of components in linear time. Note that this is /not/ true of the OOP approach, If I want everything that has a position and a mesh I can do that eaisly |
04:30:31 | Demos | well it is pulling from the pool of 64-bit integers |
04:30:44 | Demos | remember EntityId is literally an integer |
04:31:48 | zezba9000 | This seems slow... |
04:32:00 | zezba9000 | You have to search the array to find properties... |
04:32:16 | Demos | right, but you access them all in order |
04:32:19 | zezba9000 | When you could directly access them |
04:32:20 | Demos | that is the entire point |
04:33:05 | zezba9000 | what you still need a player class, even with this |
04:33:26 | zezba9000 | So when you access transform its no entity[0].positon |
04:33:35 | zezba9000 | its player.transform.position |
04:33:47 | Demos | no |
04:34:09 | Demos | it is transforms[some index].position |
04:34:24 | Demos | you can have the entity id be the index into that array, but I do not |
04:34:58 | renesac | Demos, things can get deleted from that array, right?/ |
04:35:39 | renesac | then a index you had would not be valid anymore, opposed to a pointer to a player struct that would still be valid |
04:35:40 | zezba9000 | renesac: yes what happens when you delete things? |
04:35:40 | Demos | for me yes, but often it is better to just "disable" it |
04:36:00 | zezba9000 | But then the index EntityID is wrong |
04:36:11 | Demos | yeah, I said you can do that, I do not |
04:36:22 | Demos | I store stuff densely |
04:36:30 | renesac | so you binary search in this case? |
04:37:02 | Demos | yeah, although if you have an index you can search for like 4-5 items around that index to see if you find your item |
04:38:00 | Demos | to make this faster you can store another array of EntitiyIds, each index is the entity id of the component in that index of the component array |
04:38:08 | OrionPK | lib/core/macros.nim(208, 21) Error: for a 'var' type a variable needs to be passed |
04:38:15 | zezba9000 | To make this faster you could just have a Player obj... |
04:38:36 | zezba9000 | and it would be more human readable |
04:38:45 | renesac | Demos, but then on each deletion you would have an O(n) operation updating the array of EntityIds |
04:38:51 | Demos | another nice thing there is that the stuff in your component array is just plain data, you can actually copy that whole array right into a memory on your graphics card |
04:39:20 | Demos | renesac: right, but deletions are rarely fast, even with OOP, you need to rebuild all kinds of structures |
04:39:20 | zezba9000 | Demos: But you can't just do that |
04:39:24 | zezba9000 | You must batch it |
04:39:42 | zezba9000 | So only the obj transforms in order get passed and drawn |
04:40:25 | Demos | that is not batching zezba9000, that is ordering by depth, which is not a great thing to order on unless you need transparancy |
04:40:58 | zezba9000 | No, I mean occlusion culling |
04:41:07 | renesac | sure is nice to have homogeneous arrays, if you usually access one element type at time, it is more cache efficient |
04:41:14 | zezba9000 | You must order an array of ONLY what needs to be drawn |
04:41:24 | zezba9000 | and pass it to the GPU |
04:41:47 | Demos | and you do that with no perf loss. The code to figure out what needs to be culled needs to go though ALL the meshes/renderables anyways, and so you get a cache win from not pulling in stupid data. Then the renderer can look at that data and fetch the right thigns to draw |
04:42:16 | renesac | but the code does seems more complex than if you did group things in a player object/struct |
04:42:41 | Demos | it is simpler code! it does not depend on anything aside from just what it needs |
04:43:02 | zezba9000 | yes, you could do the same thing with a player obj. But when the time comes to draw, you run through the objects and batch them into array pools then.. |
04:43:24 | Demos | right, but what if players are not the only thing in your scene |
04:43:29 | zezba9000 | It is more complex code to read when you start doing a lot all over the place with 100s of files |
04:43:58 | zezba9000 | Demos: The player is derived from the Entity obj |
04:44:11 | Demos | and the entitiy object grows without bound |
04:44:17 | zezba9000 | sure why not |
04:44:37 | zezba9000 | But the player obj just references the entity array with real names |
04:44:46 | zezba9000 | So I can do Player.Transform |
04:45:05 | zezba9000 | but I can only create a Enemy derived from Entity |
04:45:13 | zezba9000 | and both have the dynamic array you want |
04:45:15 | Demos | zezba9000: why not is because if you have a huge entity object you will DESTROY your cache |
04:45:51 | Demos | and having an hierarchy does not work great, actually the thing I do is kinda an implicit hierarchy that is better than one I could design myself |
04:46:35 | zezba9000 | Ok then have a single cache/pool, but you still should have a player obj |
04:47:00 | zezba9000 | that derives from an entity that handles where it is in your global cache/pools |
04:47:17 | Demos | a cache/pool is not going to help you |
04:47:39 | Demos | because you still need to actually load all that data, which bings it into your CPU cache |
04:48:45 | Demos | http://www.gdcvault.com/play/1911/Theory-and-Practice-of-the is a persentation on how this kind of thing was actually used |
04:48:53 | zezba9000 | anyway you look at it, you can have a player obj reference the data rather then index it |
04:49:33 | zezba9000 | Yes you are making pools. |
04:49:43 | zezba9000 | But you should still reference those pools by objs |
04:50:35 | renesac | zezba9000, but then the data will not be contiguous in memory, and it would have one or two extra indirections to iterate over all instances of the same type of data |
04:50:40 | zezba9000 | That optamisation layer should exist. But should expose itself via objs |
04:50:50 | Demos | I have an exam tomorrow and need to sleep. I dont think OOP is a good way to design software. In particular I do not think modeling objects after the real world is a good idea in almost any situation |
04:50:57 | * | Demos quit (Remote host closed the connection) |
04:52:12 | renesac | if you do the same optimization than Demos, then your Player object would be the array index, and you would need to update all them in case of a deletion |
04:52:38 | renesac | well, deletions seems costly on demos model, as you have a O(n) array reordering anyway |
04:53:32 | renesac | unless you use some rope/btree based array, but he did mentioned other costs |
04:54:12 | zezba9000 | Yes you would have to have an entity pool I guess |
04:54:40 | zezba9000 | But when you get back your player from the pool it link up to the transform array ect |
04:55:19 | zezba9000 | There is also going to need to be a key. |
04:55:44 | zezba9000 | Its going to need to be a dictionary, but one thats made of two arrays for each entity type |
04:56:27 | zezba9000 | anyway i'm getting tierd too |
04:59:30 | renesac | did you get a look at my whitespace faq? |
05:00:11 | zezba9000 | what about it |
05:00:50 | renesac | you were talking about the lack of braces in nimrod another day |
05:01:17 | renesac | is there some worry that you have that isn't covered in the faq? |
05:02:36 | zezba9000 | On the line "const DeBruijnNumbersTable: array[32, int8]" is it required to tab/space out the lines below? |
05:03:01 | renesac | "After a continuation, the code can be positioned quite freely. The only rule is that the continuing line must be indented at least one level above the first line." |
05:03:22 | renesac | so you can't have them be on the same level as the first line |
05:03:25 | renesac | you need some spaces |
05:03:28 | zezba9000 | Can I do this: http://pastebin.com/DgeMAxp5 |
05:03:55 | renesac | no, you need one level of indentation |
05:03:58 | zezba9000 | So the answer is no then |
05:04:07 | zezba9000 | Well thats why I don't like whitespace then |
05:04:19 | zezba9000 | Its why I gave the example I did the other day too |
05:04:37 | renesac | is two spaces that troublesome? |
05:04:55 | zezba9000 | If the IDE could handle white space then I would not care about brackets |
05:04:57 | renesac | select a block and key 'tab' |
05:05:12 | zezba9000 | yes it makes the code no longer a block |
05:05:23 | renesac | ? |
05:06:00 | zezba9000 | https://github.com/reignstudios/ReignSDK/blob/master/Platforms/Common/Reign.Core/Math/Matrix4.cs#L57 |
05:06:05 | zezba9000 | Thats the example I gave before |
05:06:23 | zezba9000 | I like it when I can make a block with the brackets |
05:07:27 | zezba9000 | I just find it easier to read when its on the same line |
05:07:35 | renesac | I don't understand, if you take the brackets out (and of course changed function declaration, etc), this would be valid nimrod |
05:07:59 | renesac | ah |
05:08:05 | renesac | the ( );? |
05:08:27 | zezba9000 | so the 'return' can be on the same line as '(' ? |
05:08:47 | zezba9000 | you said it must has at least one tab |
05:08:52 | renesac | yeah |
05:09:00 | zezba9000 | well why though |
05:09:21 | zezba9000 | the parser should be able to tell that '(' means what comes next |
05:09:24 | zezba9000 | not a white space |
05:09:48 | zezba9000 | Brackets define what white space fails to do |
05:10:14 | zezba9000 | Or you could have an IDE define it, but then it would relay on the IDE |
05:10:46 | zezba9000 | I simply have more control over how I layout any given block |
05:10:51 | renesac | and actually, you would need a parenthesis on the first line |
05:11:23 | renesac | as the function name alone is already a complete statement (for first class functions) |
05:11:33 | zezba9000 | I just don't see anything wrong with brackets. I do see something wrong with ';' though |
05:13:06 | zezba9000 | Brackets define lines. Thus you have the power to layout something is it bests sutes you. Ending marks serve no purpose for the human involved as a human understands the end bracket is the end of the line |
05:13:39 | zezba9000 | A human can't understand if there is a tab vs 4 white spaces |
05:13:44 | Varriount | Forgive me if I'm wrong, but in your example, it's the semicolon that allows you to do that. |
05:13:45 | renesac | brackets are redundant, add more lines of code and, as I said on the faq, can get out of sync with the indentation |
05:14:00 | Varriount | Not the brackets. |
05:14:09 | renesac | zezba9000, you don't have to worry about tab vs space on nimrod |
05:14:20 | renesac | it will only accept spaces as indentation |
05:14:23 | zezba9000 | Varriount: Yes in C#, but I don't like the ';' as I stated its not needed |
05:14:36 | renesac | and Varriount has a point |
05:14:58 | renesac | it is the ; not the brackets that let you put the parenthesis there |
05:15:09 | zezba9000 | renesac: But it should not be is the point. |
05:15:18 | zezba9000 | Don't take C# as my perfect example |
05:15:24 | Varriount | zezba9000: There are plans for a nimrod varient with brackets (look in the compiler directory at pbraces.nim) |
05:15:27 | zezba9000 | Its just the C style brackets I find usful |
05:17:04 | zezba9000 | Varriount: https://github.com/zah/grip-lang/blob/master/compiler/pbraces.nim |
05:17:05 | zezba9000 | That? |
05:17:32 | Varriount | Yes. It will be where the braces parser code is located. |
05:17:49 | Varriount | Operational word being the future tense "will" |
05:18:04 | renesac | Varriount, why again nimrod needs an extra level of indentation for a line continuation? |
05:18:08 | zezba9000 | I don't see any '{..}' brackets? |
05:18:14 | renesac | given an unfinished statement in the previous line? |
05:18:18 | Varriount | renesac: Where? |
05:18:26 | renesac | as redundancy to be able to give better error messages? |
05:18:52 | zezba9000 | Redundent means it no longer has a use |
05:18:55 | Varriount | renesac: It helps reduce ambiguity when parsing. |
05:19:11 | zezba9000 | Brackets allow me to line up constructor blocks how I like them |
05:19:15 | zezba9000 | thus its not redundend |
05:19:42 | renesac | zezba9000, it is not the brackets, it is the ; |
05:19:49 | renesac | unless you are adding brackets to every line |
05:19:52 | Varriount | zezba9000: Yet, as I pointed out in your example, it is not the braces that allow you to put those in a block, it's the semicolon |
05:19:55 | zezba9000 | yes ';' is rudundent |
05:20:16 | renesac | no, they are not redundant in your example |
05:20:31 | renesac | they are what makes possible to put the open parenthesis in it's own line |
05:20:36 | Varriount | The C# parser knows that the 'return' statement continues until the semicolon. |
05:20:38 | * | nequitans quit (Ping timeout: 240 seconds) |
05:21:17 | zezba9000 | But the C# should just look for '{' or '}' instead |
05:22:17 | Varriount | That's not how it works though. |
05:22:22 | zezba9000 | I know |
05:22:22 | renesac | not for deciding the end of a line |
05:22:27 | renesac | {} delimit blocks, not lines |
05:22:42 | zezba9000 | yes but block are what matters, not lines |
05:22:58 | renesac | but your return is a line |
05:23:30 | zezba9000 | what do you mean? |
05:24:01 | renesac | the return, open parenthesis, elements, and close parentesis are a single line |
05:24:06 | renesac | for the compiler |
05:24:10 | Varriount | ^ |
05:24:18 | zezba9000 | or ic what you mean |
05:24:33 | zezba9000 | ok well yes |
05:24:35 | renesac | and coincidently the block is a single line too |
05:24:47 | zezba9000 | not a method block |
05:24:53 | zezba9000 | its has more then one line |
05:25:13 | zezba9000 | it states here are lines for a given context |
05:25:38 | renesac | the 'FromMatrix3' has a single line for the compiler |
05:25:46 | zezba9000 | A would say a line should break "IF" there is no '(...)' brackets |
05:25:50 | renesac | unless you are counting the } after the ; as another line |
05:27:36 | renesac | zezba9000, a better way to say it would be: you should have a line break when you reach the end of a line with a complete statement. |
05:27:45 | zezba9000 | http://pastebin.com/J75QsrME |
05:28:06 | renesac | if it is not complete (an '(' w/o the corresponding ')' for example) you look at the next line |
05:28:08 | zezba9000 | oops http://pastebin.com/c31wZ3q2 |
05:28:15 | zezba9000 | has ; marks in there |
05:28:25 | renesac | nimrod does essentially this, but adds the additional constraint of one extra indentation level |
05:28:28 | zezba9000 | renesac: yes correct |
05:28:49 | zezba9000 | What do you think of my example? |
05:29:05 | renesac | the second one would also be valid in nimrod |
05:29:13 | zezba9000 | Line break with a RETURN ONLY happens if there was no '(..)' brackets |
05:29:16 | renesac | as you can't end a statement with a = |
05:29:36 | zezba9000 | I think it should not as thats what the ';' mark was for |
05:29:38 | renesac | yes, you rule is more restrictive in that sense |
05:30:20 | renesac | why it should not be allowed? |
05:30:47 | zezba9000 | Because you normally don't think that way. Keep in mind I have the use of {..} |
05:30:57 | renesac | the fact is that nimrod would treat those 3 as valid |
05:30:58 | zezba9000 | Its not white space driven in my example |
05:31:17 | zezba9000 | That example does not depend on white space |
05:31:32 | zezba9000 | it depends on how the human thinks about a line |
05:31:40 | zezba9000 | At least how I think people do |
05:31:55 | renesac | it depends on line breaks (whitespace) |
05:31:57 | renesac | right? |
05:32:12 | zezba9000 | No it does no depend on whitespace in: http://pastebin.com/c31wZ3q2 |
05:32:26 | zezba9000 | It depends on brackets |
05:32:53 | renesac | how the compiler knows that the statement 'int i = 0' has ended? |
05:32:56 | zezba9000 | a new line is value 'IF' there was no '(' bracket before it |
05:33:06 | zezba9000 | it the '(' was not closed I mean |
05:33:19 | zezba9000 | Because there was a return |
05:33:20 | renesac | because it has a *new line( after it, and no open parenthesis |
05:33:25 | zezba9000 | yes |
05:33:37 | zezba9000 | so if it has (int i = 0 |
05:33:42 | renesac | so it depends on line breaks (whitespace) |
05:33:43 | zezba9000 | the line would still be open |
05:33:48 | renesac | right |
05:34:15 | zezba9000 | yes and normally when you hit return on the line "int i = 0" it would make sense to a human |
05:34:30 | renesac | you can allow for the dangling '=' in the same way |
05:34:37 | zezba9000 | and so would "(int i = 0... not being the end of the line |
05:35:01 | renesac | if a line has a operator lacking it's right operator, then the line is still open |
05:35:02 | zezba9000 | ya |
05:35:09 | renesac | *operand |
05:35:24 | renesac | then example two would be valid |
05:35:25 | zezba9000 | ya operators don't effect lines |
05:35:30 | zezba9000 | only brackets |
05:35:47 | zezba9000 | no it would not |
05:36:06 | renesac | http://pastebin.com/DgeMAxp5 <-- so this would be invalid under your rule? |
05:36:10 | renesac | no brackets on the first line |
05:36:15 | renesac | so it has ended on the line break |
05:36:18 | zezba9000 | because there was a return without there being an open bracket of {... |
05:36:44 | zezba9000 | or (... |
05:36:57 | zezba9000 | yes it ends on the line break without ( or { |
05:37:26 | renesac | your FromMatrix3 would also be invalid |
05:37:48 | zezba9000 | no it would be valid |
05:38:05 | renesac | 'return new Matrix4' <-- no ( { in this line |
05:38:11 | renesac | so it has ended |
05:38:24 | zezba9000 | http://pastebin.com/yLULzSUq |
05:38:27 | zezba9000 | thats valid |
05:38:47 | zezba9000 | ignore the ';' I left in there |
05:38:51 | zezba9000 | forgot to take that out |
05:38:59 | renesac | 'return new Matrix4' <-- no ( { in this line |
05:39:07 | renesac | so it has ended |
05:39:14 | zezba9000 | its an OR and AND |
05:39:17 | zezba9000 | ( OR { |
05:39:19 | renesac | the ( would be another statement |
05:39:22 | renesac | yes |
05:39:30 | renesac | no ( OR { in that line |
05:39:34 | zezba9000 | but ( is required for method and if starts |
05:39:45 | renesac | ? |
05:39:56 | renesac | so another rule? |
05:40:04 | zezba9000 | there is a ( or { on every line. |
05:40:11 | zezba9000 | No there is no other rule |
05:40:15 | renesac | I don't see any on line 3 |
05:40:33 | * | isenmann joined #nimrod |
05:40:39 | Varriount | Hi isenmann |
05:40:39 | zezba9000 | ya why would that need one? |
05:41:00 | zezba9000 | renesac: { came before line 3 |
05:41:02 | renesac | a line break w/o an opening ( or { means that the line has ended, righ? |
05:41:07 | zezba9000 | so its still a line |
05:41:26 | renesac | the { is a block delimiter |
05:41:38 | zezba9000 | no ) OR } OR 'Return' means the line ends |
05:42:14 | zezba9000 | but 'Return' ONLY ends a line if ( OR { was not closed with ) OR } |
05:42:32 | renesac | hum, so you could not do 'var res = new Matrix 4 \n ( ... ) \n return res' |
05:42:52 | renesac | it would be special case for blocks consisting of a single return line |
05:43:19 | zezba9000 | yes I guess that would have to be a special case |
05:43:48 | zezba9000 | So if you are declairing something it expects ( OR { before the line ends |
05:44:12 | renesac | ok |
05:44:24 | renesac | I don't see that much gained from this special case |
05:44:35 | renesac | that justify {} around every block |
05:44:50 | zezba9000 | you can the aility to make blocks as the Matrix example |
05:44:57 | zezba9000 | **you gain the... |
05:45:22 | renesac | I don't remember needing to do something like that |
05:45:53 | zezba9000 | Well I use it in my Matrix example |
05:45:55 | renesac | and I woudn't mind having to indent a bit more the parenthesis (and put the first one in the first line, actually) |
05:46:12 | zezba9000 | most people don't |
05:46:19 | renesac | nimrod could implement this special case, but special cases are ugly |
05:46:45 | Araq | er I think we indeed special cased the closing ] |
05:46:56 | Araq | did you try? |
05:47:11 | Araq | but I only skimmed this conversation... |
05:47:36 | zezba9000 | Araq: http://pastebin.com/c31wZ3q2 |
05:48:04 | renesac | Araq, indeed the closing ] can be at the same indentation level as the firs line |
05:48:07 | zezba9000 | I was saying how that example is valid and no white spaces needed |
05:48:11 | renesac | but the opening one cannot |
05:48:32 | renesac | zezba9000, you need new lines, that are whitespace |
05:48:46 | zezba9000 | Better: http://pastebin.com/FZwH78LY |
05:48:47 | renesac | you only don't enforce indentation |
05:49:13 | zezba9000 | yes no indentation is needed, as in it doesn't matter in that example |
05:50:11 | renesac | all those are valid in nimrod, as you give the needed two spaces from the first line |
05:50:35 | renesac | oh, in the last you need a ':' after the if |
05:50:37 | zezba9000 | Araq: Most clear example: https://gist.github.com/zezba9000/10015396 |
05:51:11 | zezba9000 | renesac: The last example in the gist I posted is not valid in nimrod |
05:51:27 | Araq | zezba9000: nor should it be valid |
05:51:34 | Araq | as it makes no sense |
05:51:36 | Araq | so yes |
05:51:39 | zezba9000 | Yes it does |
05:51:42 | zezba9000 | You missed how so |
05:51:52 | Araq | we restrict your freedom to write crap |
05:52:07 | Araq | big deal... |
05:52:35 | zezba9000 | Araq: No as you can do: https://gist.github.com/zezba9000/10015411 |
05:52:38 | zezba9000 | ...with it |
05:52:41 | Varriount | Ohi Araq |
05:52:47 | zezba9000 | Its crap |
05:52:53 | zezba9000 | I just gave an extreme example |
05:53:01 | zezba9000 | ** Its NOT crap lol |
05:53:12 | Varriount | Note to self: Do not employ Araq as a diplomat |
05:54:17 | renesac | that last example is only possible after the last return keyword in a funcion in your hypothetical language, or in a language that needs ; to delimit line ends |
05:54:53 | zezba9000 | No or a closeing bracket } |
05:55:05 | zezba9000 | Either closes the line |
05:55:06 | renesac | ok, after any return keyword |
05:55:49 | renesac | but you theoretically don't need the } |
05:55:54 | zezba9000 | yes you do |
05:55:55 | renesac | the indentation of the block could suffice |
05:56:18 | renesac | unless you want to go lower than the indentation of the first line |
05:56:18 | zezba9000 | as it closes { that is required by the method. |
05:56:29 | zezba9000 | Or yes you could make it so {..} is not required as well |
05:56:33 | zezba9000 | if you wanted both I guess |
05:56:38 | renesac | yes |
05:57:06 | renesac | that being possible is not a virtue of {}, but of the special case around the return |
05:57:16 | zezba9000 | so you can still do you white space stuff, but its just for feel and nothing more |
05:57:59 | zezba9000 | ya guess so |
05:59:21 | zezba9000 | So in that theoretical model, you can use white space like Nimrod is now, but you don't have to. You can only use the C way |
06:00:15 | zezba9000 | So it a block formats better with things lined up on the X axis you can do so with the use of brackets (..) |
06:00:21 | renesac | the requeriment for an extra indentation makes it easier to spot continuation lines, and makes possible for the compiler to give better error messages |
06:00:37 | zezba9000 | renesac: Same with ';' |
06:00:45 | renesac | it is not a bad trade of to get rid of ; |
06:00:47 | zezba9000 | But humans don't need it |
06:00:47 | renesac | yeah |
06:00:55 | renesac | I agree |
06:01:01 | renesac | and I argue the same about {} |
06:01:12 | renesac | humans need the indentation, not the {} |
06:01:29 | zezba9000 | I think both can be useful |
06:01:48 | zezba9000 | I find it easier to find a block or give scope with {} |
06:01:49 | renesac | {} lets you go whack on indentation |
06:02:17 | zezba9000 | Yes but no one does that, or should not.. you can write shit code in anything. |
06:02:26 | renesac | zezba9000, editor highlighting of indentation levels makes easy to spot a block |
06:02:53 | renesac | I have it enabled even when coding in C |
06:03:17 | zezba9000 | but in this model you would be able to give a internal method scope too "scope {} |
06:03:34 | zezba9000 | I mean with {} if you wanted them |
06:03:36 | renesac | ? |
06:03:44 | renesac | nimrod have 'block:' |
06:03:49 | renesac | I'm not sure if that is what you mean |
06:03:49 | zezba9000 | yes I know |
06:04:03 | zezba9000 | scope block whatever :) |
06:05:07 | zezba9000 | Problem is {} is required for a sub block in a method |
06:05:25 | renesac | in C#, not in nimrod |
06:05:27 | zezba9000 | if white space is not to be considered {} is required |
06:05:44 | zezba9000 | I mean in the hypothetical lang |
06:05:47 | renesac | indentation you mean |
06:05:52 | zezba9000 | yes |
06:05:54 | renesac | whitespace is too general |
06:06:25 | zezba9000 | k so yes with no indentation taken into account {} is needed for sub method blocks |
06:06:35 | renesac | yes |
06:06:44 | renesac | for any type of block actually |
06:07:05 | renesac | well, nimrod has (;) , but that is equivalent to {;} in C# |
06:07:10 | zezba9000 | Well it would make it consistent to keep them reqardless |
06:07:46 | zezba9000 | So you can use ; in Nimrod, but you don't need to? |
06:07:53 | renesac | basically, you can chose if you want your language to delimit blocks with indentation or {} |
06:07:57 | renesac | zezba9000, yes |
06:08:14 | renesac | you can end any line with it |
06:08:17 | zezba9000 | What I thought Nimrod could not use {} |
06:08:19 | Varriount | Araq: I'm about to go to bed - Is there anything you want me to do? |
06:08:29 | renesac | yes, {} are for sets in nimrod |
06:08:50 | zezba9000 | but if Nimrod does use {} it still required the line indent for the first { |
06:09:01 | renesac | but you have: http://build.nimrod-lang.org/docs/manual.html#statement-list-expression |
06:09:10 | renesac | but not everything can be written inside it |
06:09:26 | renesac | not sure whether it is a bug or a planned limitation |
06:09:45 | zezba9000 | So you can't do: https://gist.github.com/zezba9000/10015517 |
06:09:55 | renesac | yeah, I think indentation is still required |
06:10:09 | renesac | they are used most for stuffing things in a single line |
06:10:21 | zezba9000 | Hmm well if Nimrod supports {} that should negate indentation |
06:10:28 | zezba9000 | then you could do both |
06:10:38 | renesac | I don't think code should behave diferently from what it looks |
06:10:57 | zezba9000 | Not sure what that means |
06:11:07 | renesac | humans look first at the indentation to see block boundaries |
06:11:08 | Varriount | Anyway, I'm off. Good luck renesac |
06:11:10 | zezba9000 | How code looks mades it means differnet things |
06:11:17 | zezba9000 | **makes it mean |
06:12:04 | zezba9000 | renesac: Yes I agree, but they also look at brackets to give context |
06:12:21 | zezba9000 | Like on a single line for ((1+2) * 3) |
06:12:33 | renesac | I've already got C code to read with mixed spaces and tabs.. |
06:12:49 | renesac | banged my head for a while trying to understand it till I noticed the mixing |
06:13:14 | zezba9000 | Visual Studios will fix this for you |
06:13:20 | renesac | then I needed to make a search and replace to get rid of tabs |
06:13:24 | renesac | so I could read the code |
06:13:28 | zezba9000 | You should set your IDE to use TABS |
06:13:30 | renesac | {} alone don't cut it |
06:13:35 | zezba9000 | then you don't have the issue |
06:13:50 | renesac | it was code I downloaded |
06:13:56 | renesac | with mixed tabs and spaces |
06:13:57 | zezba9000 | In VS you can just have it auto do it for you |
06:14:15 | zezba9000 | Well you just use auto formatters |
06:14:21 | renesac | VS discovers what tab stop the original coder used? |
06:14:29 | renesac | ah, right |
06:14:38 | zezba9000 | no it formats to your style settings |
06:14:46 | renesac | yes, I use it too |
06:14:53 | renesac | on code blocks though |
06:15:02 | zezba9000 | Its Edit->Advanced->Format Document |
06:15:27 | renesac | useful especially when getting a code improperly pasted in a forum or blog comment |
06:15:37 | renesac | that is also unreadable w/o indentation |
06:16:18 | zezba9000 | lol what the code you downloaded? |
06:16:49 | renesac | an disk bwt implementation |
06:17:49 | renesac | anyway, in python3 and nimrod you don't have those problems |
06:18:38 | renesac | no mixing of tabs and spaces, and the code you see on internet will aways be readable (otherwise it would be useless, and the person posting would have fixed it) |
06:18:40 | zezba9000 | I hate Phyton lol |
06:19:00 | zezba9000 | You don't have that problem in C++ either if you set your IDE to use Tabs |
06:19:13 | zezba9000 | I don't know why the hell its not set that way by default |
06:19:30 | renesac | I aways set my IDEs to convert tabs to spaces |
06:19:39 | zezba9000 | Well thats your problem |
06:19:47 | renesac | why? |
06:19:58 | zezba9000 | Its way easier to backspace C#/C++ code with tabs |
06:20:01 | renesac | when set to use tabs, it is more likely a space get added by accident |
06:20:03 | zezba9000 | in VS anyway |
06:20:24 | zezba9000 | Set it to block mode |
06:20:29 | renesac | well, most editors have the option to go one indentation level down when backspacing on the start of the line |
06:20:40 | renesac | even when using spaces |
06:21:05 | renesac | and when working with blocks of code, you can aways 'shift' + 'tab' or equivalent |
06:21:19 | zezba9000 | Still its bad, because it confuses the IDE is its mixed |
06:21:24 | zezba9000 | THus keeping tabs is best |
06:21:30 | renesac | I don't mix |
06:21:32 | renesac | I use only spaces |
06:21:38 | renesac | in python that is PEP8 |
06:21:54 | renesac | in nimrod is enforced by the compiler |
06:22:15 | renesac | and in C is the coding guideline in many places, the kernel for example (8 spaces) |
06:22:21 | zezba9000 | Python pisses me off. How you access base classes ect |
06:22:26 | zezba9000 | so ugly |
06:22:35 | renesac | super? |
06:22:49 | zezba9000 | no its like __class__ or something right? |
06:23:37 | zezba9000 | renesac: Well I disagree with the C standard for C and the kernel then :) |
06:23:43 | renesac | maybe, I've never used it though |
06:24:13 | zezba9000 | O well I used it for making a Blender plugin... god I knew I didn't like it before, but after that I was like gag |
06:24:29 | renesac | zezba9000, the problem of using tabs is that you then want to align something |
06:24:47 | renesac | like my first example: |
06:24:47 | renesac | someReallyLongProc(withMany, commands, |
06:24:48 | renesac | that, may, be, broken, |
06:24:48 | renesac | in many, lines) |
06:24:48 | zezba9000 | It makes it easier |
06:24:58 | renesac | it will look aligned to you |
06:25:01 | zezba9000 | I don't align things like that |
06:25:15 | zezba9000 | I disagree with how a lot of C++/C# devs algin things |
06:25:27 | renesac | but anyone with a different tab stop than you will see this wrong |
06:26:11 | renesac | well, I often do align things like that, when it don't mean many more lines of code |
06:26:26 | renesac | so I use space instead of tabs |
06:26:34 | renesac | so I have the tab key as an quick way to add spaces |
06:26:37 | zezba9000 | sure but unless i'm working on someone elses code base with there standard, they can suck it. I would do that like: https://gist.github.com/zezba9000/10015607 |
06:27:07 | zezba9000 | I like making it fit into a block. Easy to see |
06:27:11 | renesac | you forgot the ';' |
06:27:13 | renesac | :P |
06:27:21 | zezba9000 | Well I don't like that stupid thing lol |
06:27:30 | renesac | it isn't return for that special case to work |
06:27:34 | zezba9000 | Do you know how many times in C++ that stupid thing has fucked me up |
06:27:45 | zezba9000 | Fuck the ';' mark lol |
06:27:58 | renesac | I also hate ';' |
06:28:02 | zezba9000 | When you do intaliser lists, the ';' mark makes no sense |
06:28:13 | renesac | but w/o it you can't write function calls this way |
06:28:20 | renesac | that you like |
06:29:06 | zezba9000 | well yes but {..} is more important to me then having to do ';' |
06:29:26 | zezba9000 | In C# the ';' doesn mess you up |
06:29:39 | zezba9000 | Because the real time parser tells you its an error |
06:29:53 | zezba9000 | but in C++ holly god dam it will go off in no-mans land |
06:30:37 | renesac | well, if you had to work with a language w/o ';', how you would do that function call? |
06:31:07 | zezba9000 | I would do it like I posted: https://gist.github.com/zezba9000/10015607 |
06:31:20 | renesac | it would not work |
06:31:23 | zezba9000 | I would group each line in context of what those vars being passed in mean |
06:31:34 | renesac | how it will know to continue the first line/ |
06:31:34 | renesac | ? |
06:31:39 | zezba9000 | In the hypithetic lang it would I gave you |
06:31:48 | zezba9000 | **hypothetical |
06:32:07 | renesac | I don't follow |
06:32:16 | renesac | I would group each line in context of what those vars being passed in mean <-- ? |
06:32:28 | zezba9000 | Because the syntax tree contains "someReallyLongProc" |
06:32:34 | renesac | you have a function name in the first line |
06:32:34 | zezba9000 | So it knows its a method |
06:32:42 | zezba9000 | C# gets around confix using this all the time |
06:32:54 | renesac | your language don't have first class functions/methods? |
06:33:06 | renesac | C# gets around because it has ';' |
06:33:56 | zezba9000 | But mine gets around it with {} OR () |
06:34:46 | renesac | in nimrod 'var x = someReallyLongProc', x() would now be an alias for someReallyLongProc() |
06:34:52 | zezba9000 | "someReallyLongProc" is a method defines in the class your typing in. So when "someReallyLongProc" gets hit it requires '(' before the line fully starts |
06:35:00 | renesac | you would need 'var x = someReallyLongProc(' |
06:35:12 | zezba9000 | No |
06:35:13 | renesac | for nimrod know that it needs to look at the parameters in the next line |
06:35:31 | zezba9000 | Becuase "someReallyLongProc" is a method the compile now requires '(' to be next |
06:36:08 | renesac | how would you pass methods as callbacks in your language? |
06:36:09 | zezba9000 | any whitespace before '(' mark doesn't matter if a method came before it |
06:36:49 | renesac | or alias an method name |
06:36:50 | renesac | ?: |
06:37:09 | zezba9000 | If you are already in a method block (...) then its uses differently |
06:37:25 | renesac | like 'var p = some.long.namespace.printingfunction' |
06:37:32 | zezba9000 | You mean like "Foo (someReallyLongProc) {...}" ?? |
06:37:50 | zezba9000 | someReallyLongProc is passed to a function pointion |
06:37:53 | zezba9000 | **pointer |
06:38:04 | renesac | yes |
06:38:09 | renesac | p would be a function pointer |
06:38:19 | renesac | but nimrod has type inference |
06:38:27 | zezba9000 | o ic your point |
06:38:29 | renesac | so you can type just what I did |
06:39:11 | zezba9000 | Well I would require a sybole for that then maybe "var p = &some.long.namespace.printingfunction" |
06:39:13 | zezba9000 | Or something |
06:39:30 | zezba9000 | **symbol |
06:40:21 | zezba9000 | Or you could do "var p = delegate(some.long.namespace.printingfunction)" |
06:40:35 | zezba9000 | or "var p = delegate some.long.namespace.printingfunction" |
06:41:06 | zezba9000 | so "delegate" would define that a method name without (..) is required |
06:41:33 | renesac | right |
06:41:51 | renesac | yeah, that would be a design choice |
06:42:12 | zezba9000 | I think it would give context to what is going on |
06:43:10 | Araq | so ... your problem is {}is already taken in the default syntax, zezba9000 ? |
06:43:18 | renesac | but I guess it is too late to change it in nimrod, even if it indeed does not have any other downside |
06:43:32 | renesac | Araq, he wants to call a function like this: |
06:43:32 | renesac | https://gist.github.com/zezba9000/10015607 |
06:43:56 | renesac | with the ( ) in the same column as the first line, in separated lines |
06:44:42 | zezba9000 | Araq: not sure I follow what you mean by {} being already taken? {} would be used in my idea |
06:45:21 | Araq | never mind. I keep thinking you're trying to be helpful. |
06:45:45 | zezba9000 | renesac: Or: https://gist.github.com/zezba9000/10015517 |
06:46:23 | Araq | we could allow that but I don't see the point |
06:46:24 | zezba9000 | lol I'm getting hammered with difficult question from renesac |
06:46:38 | zezba9000 | To see if there are any flaws in my idea |
06:47:25 | renesac | Araq, the point is that it is his style preference, and in some cases it indeed does look nice |
06:47:44 | renesac | I personally don't really care though |
06:47:45 | zezba9000 | Araq: The point being, you have the option to layout a block of code how you feel it bests fits and is most human readable. No indentation required |
06:48:06 | renesac | oh, and I'm agains the 'no indentation required' part |
06:48:30 | zezba9000 | Well Don't get me wrong, you should indent a method and many thing |
06:48:59 | zezba9000 | I think there is something to be said for this layout in some cases though: https://gist.github.com/zezba9000/10015517 |
06:49:04 | Araq | zezba9000: and yet the cost is a redundancy which leads to questions like "what if the compiler and the layout disagree" |
06:49:27 | Araq | and also it leads to cascading }}}} which take up valuable screen space |
06:49:32 | zezba9000 | Its not redundent if I have use for it. It helps me parse whats going on faster |
06:49:39 | zezba9000 | To me its not redundent |
06:49:40 | Araq | welcome to world of trade-offs |
06:50:08 | Araq | it's obvjectively redundant, there is no "to me" here |
06:50:09 | zezba9000 | No cascading happens with or without }}} |
06:50:25 | zezba9000 | You simple don't use the } symbol and have a return whitespace instead |
06:50:46 | zezba9000 | To you there is a "to me"... |
06:51:04 | Araq | "return whitespace" doesn't cascade |
06:51:14 | zezba9000 | The same amount of space is the same in both |
06:51:36 | zezba9000 | Do you litterally mean people put }}}} in a row? |
06:51:39 | zezba9000 | No one does that |
06:51:47 | Araq | no that would be great |
06:51:54 | zezba9000 | aww sry but I see your point |
06:52:02 | Araq | but indeed nobody does that so it takes up pages of space |
06:52:03 | renesac | https://gist.github.com/ReneSac/f3afa585841d72df2d02 |
06:52:08 | zezba9000 | no that would be so hard to parse |
06:52:19 | renesac | <-- you can't have this density with } in their own lines |
06:52:58 | Araq | zezba9000: the Lisp people do use ))))) without the newlines and it's easy to read, for me |
06:53:00 | zezba9000 | Having a little extra space is blown way out of perpotion here. Its not a bad thing when it makes it easier to sperate whats going on |
06:53:40 | zezba9000 | I'm going to convert renesac code rly quick to compare |
06:54:00 | Araq | it's not "little" extra space, it makes a factor of 1,5 to 2 for many things |
06:54:38 | zezba9000 | I don't know what code your looking at. When you have huge blocks like that its best to give them space requardless of {} |
06:55:34 | zezba9000 | renesac: is [A] a template method? |
06:55:57 | renesac | A is a generic type |
06:56:06 | zezba9000 | k cool thought so |
06:56:09 | renesac | yes, the proc is generic |
06:56:26 | renesac | this is from tables.nim in the std library |
06:56:44 | zezba9000 | well let me see if I understnad enough to convert it |
06:57:14 | renesac | it was the first relatively deep nested thing I found |
06:58:16 | Araq | zezba9000: this number comes from converting thousands of lines of Pascal to Nimrod where Pascal takes up the same amount of screen space as a C-like language |
06:59:04 | zezba9000 | I'm sure its small, I'm just saying that super compressed code doesn't mean its a good thing in some cases. |
06:59:18 | zezba9000 | It can be so compressed its hard to parse whats going on |
07:00:57 | zezba9000 | let me finish the conversion so we have something better to compare |
07:01:50 | zezba9000 | Is the "div" = "/" ?? |
07:02:06 | renesac | integer division |
07:02:06 | renesac | yes |
07:02:10 | zezba9000 | k |
07:02:15 | renesac | '/' is aways float division |
07:02:24 | zezba9000 | what?! |
07:02:43 | zezba9000 | Why is it not the one that doesn't loose resolution? |
07:03:04 | zezba9000 | **lose |
07:03:39 | zezba9000 | "var 1.0f / 1.0d" should return a double in my mind |
07:03:42 | renesac | you do have to convert explicitly the operands to float (by float I mean 32 or 64bit float) |
07:03:47 | zezba9000 | That sounds like what VB .NET does |
07:04:02 | zezba9000 | You end up getting bad performance |
07:04:07 | renesac | 'float' in nimrod is usually a 64bit float |
07:04:19 | renesac | or a double as called in many languages |
07:04:31 | zezba9000 | ok ic |
07:04:34 | renesac | you have float32 and float64 to specify |
07:04:38 | renesac | the exact size |
07:04:54 | renesac | float is the 'fastest float', and is float64 in x86 |
07:04:59 | zezba9000 | but if I do "var i = (float32)1 / (float64)1" is it 64 or 32 bit |
07:05:10 | zezba9000 | what bit is 'i' |
07:05:20 | renesac | I think 64bit |
07:05:24 | Araq | float64 but it helps to learn the syntax first |
07:05:41 | zezba9000 | ok cool |
07:06:02 | Araq | but I know, there is no need to learn when you can argue about minor asthetic details instead |
07:06:30 | Araq | renesac: actually the spec changed and 'float' is always 'float64' now |
07:06:33 | zezba9000 | I understnad what is going on. This is all about the details |
07:06:43 | renesac | oh, that change got throught? |
07:06:51 | zezba9000 | Araq: How come |
07:06:52 | Araq | yeah |
07:06:57 | renesac | I remember seeing the issue on github |
07:07:04 | zezba9000 | I like the sound of float being the bit of the build? |
07:08:00 | renesac | zezba9000, you can aways alias your own float type, I guess... |
07:08:01 | zezba9000 | if float was changed to 64bit all the time, it might be useful to have a 'Num' keyword or something idk |
07:08:10 | Araq | there were issues with operator overloading and the fact that math uses 'float' everywhere but wraps C's double functions |
07:08:24 | zezba9000 | float being CPU agnositc makes so much sense though :) |
07:08:26 | Araq | *with overloading |
07:08:41 | Araq | yeah we need floatx for performance |
07:09:00 | zezba9000 | aaa yes floatx is the best name for it |
07:09:08 | zezba9000 | but then why not keep float at 32bit? |
07:09:16 | zezba9000 | would make porting so much easier |
07:09:35 | renesac | by 'floatx' he meant 'float32' or 'float64' |
07:09:48 | Araq | renesac: no I did not |
07:09:53 | renesac | oh |
07:09:56 | zezba9000 | what rly? |
07:10:00 | zezba9000 | what did you mean |
07:10:03 | renesac | ok, I missunderstood |
07:10:27 | Araq | type floatx = when defined(x86): float64 else: float32 |
07:10:56 | Araq | zezba9000: I wanted to improve the naming of things and "double" is a horrible name |
07:11:00 | zezba9000 | then how is that not what renesac said? |
07:11:14 | Araq | argh |
07:11:18 | Araq | communication is hard |
07:11:20 | zezba9000 | 32bit for x86 and 64bit for x64 |
07:11:23 | renesac | zezba9000, I though 'x' was placeholder for a number |
07:11:24 | zezba9000 | yes I know lol |
07:11:45 | renesac | I'm going sleep |
07:11:51 | renesac | too late already |
07:11:54 | Araq | nowadays I would have picked double and float and half |
07:12:03 | Araq | since that's what IEEE uses |
07:12:14 | * | nande quit (Read error: Connection reset by peer) |
07:12:14 | zezba9000 | o well whether or not you ment it. floatx is a great name for a compile determined type like IntPtr in C# or soemthing |
07:12:31 | Araq | I meant it. and thanks. lol |
07:12:44 | zezba9000 | ya thats whats shader langs use to. |
07:13:10 | renesac | Araq, and 'byte, short, int, long'? |
07:13:12 | renesac | :P |
07:13:14 | zezba9000 | or err HLSL uses float16 instead of half |
07:13:30 | renesac | (that is D's naming convention, which I like too) |
07:13:33 | zezba9000 | renesac: I'll post the converted file so you can see it later |
07:13:34 | Araq | renesac: perhaps |
07:14:07 | renesac | I would be pro it, if it wasn't already that late |
07:14:14 | zezba9000 | I like float = dynamic at compile-time. float32, float64, float16, float10 ect |
07:14:17 | Araq | what we have now is nice, but confusing for beginners |
07:14:22 | renesac | well, now really going |
07:14:37 | Araq | bye |
07:24:00 | zezba9000 | renesac: This is how I would right it if I got everything right: https://gist.github.com/zezba9000/10016041 |
07:26:33 | zezba9000 | anyway i'm getting off here too |
07:31:33 | * | BitPuffin joined #nimrod |
07:32:58 | * | zezba9000 left #nimrod (#nimrod) |
08:08:06 | * | faassen joined #nimrod |
08:29:07 | * | io2 joined #nimrod |
08:39:37 | * | silven_ is now known as silven |
09:30:20 | * | shodan45 quit (Quit: Konversation terminated!) |
10:03:53 | * | supporters quit (Remote host closed the connection) |
11:02:35 | BitPuffin | ping fowl |
11:03:56 | Araq | pong BitPuffin |
11:13:00 | BitPuffin | Araq: hey fowl |
11:19:10 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
11:29:02 | BitPuffin | was fowl KIA? |
11:40:17 | * | delian66 quit (Read error: Operation timed out) |
12:11:58 | * | io2 joined #nimrod |
12:22:14 | NimBot | Araq/Nimrod devel be48988 Araq [+1 ±2 -0]: fixes #1063 |
12:25:44 | * | ics joined #nimrod |
12:34:38 | EXetoC | ok so I forgot to enable dead code elimination and that's why it tried to load every OpenGL proc |
12:45:59 | BitPuffin | EXetoC: stOPID |
13:05:15 | * | BitPuffin quit (Ping timeout: 255 seconds) |
13:14:58 | * | BitPuffin joined #nimrod |
13:18:31 | * | darkf quit (Quit: Leaving) |
13:46:03 | EXetoC | BitPuffin: yeah maybe, but you are fat and stuff |
13:46:12 | NimBot | Araq/Nimrod devel 45817bc Araq [+0 ±1 -0]: make tests green again |
13:46:29 | * | faassen quit (Remote host closed the connection) |
13:53:45 | * | vendethiel quit (Ping timeout: 255 seconds) |
13:54:07 | * | Mat3 joined #nimrod |
13:54:21 | Mat3 | hi all |
13:54:30 | * | vendethiel joined #nimrod |
13:57:00 | * | vendethiel quit (Read error: Connection reset by peer) |
13:57:13 | * | Guest78262 quit (Ping timeout: 240 seconds) |
13:59:01 | * | gabber808 joined #nimrod |
13:59:10 | * | Guest78262 joined #nimrod |
14:00:35 | gabber808 | Hi everyone. I am finding the indentation rule a little stifling. Lets suppose I have a with events loop (sdl), and within that a while loop. Therefore I have two indentations. How should I be managing the indentation? Four single spaces? I have set the tab on my editor to represent two spaces, yet the compiler doesn't seem to like this. |
14:01:28 | Araq | yeah use four single spaces |
14:01:39 | Araq | make your editor emit spaces when you press tab |
14:01:56 | Araq | if your editor can't do this, get a real one |
14:02:55 | gabber808 | OK, thanks Araq. BTW, with help from Dom (& your earlier help) I eventually got the SDL working. DOM managed to find all of the 1.2 sdl dll files |
14:03:11 | Araq | yeah I know, I read the logs |
14:03:42 | gabber808 | error: tabulators not allowed. |
14:04:01 | * | vendethiel joined #nimrod |
14:04:03 | gabber808 | Does this mean there is something wrong with my use of tabs |
14:04:08 | Araq | yes |
14:04:18 | Araq | make your editor emit spaces when you press tab |
14:04:38 | gabber808 | do you mean omit? |
14:04:59 | Araq | emit as in "emit" |
14:05:17 | Araq | in fact, juse use Aporia |
14:05:19 | Araq | *just |
14:05:43 | gabber808 | I am using Jedit. I couldn't seem to compile Aporia |
14:06:41 | Araq | http://nimrod-code.org/download/gtk.zip |
14:06:49 | Araq | http://nimrod-code.org/download/aporia.zip |
14:06:59 | Araq | old but working build of Aporia |
14:07:33 | gabber808 | Thanks |
14:07:41 | * | vendethiel quit (Remote host closed the connection) |
14:08:58 | gabber808 | Where should I place the gtk files? |
14:09:21 | Araq | unzip both into a common directory |
14:10:00 | Araq | bbl |
14:10:24 | gabber808 | There are 165 files with the same name (when I unzip both into a common directory). Is it ok to overwrite? |
14:12:40 | * | vendethiel joined #nimrod |
14:15:00 | renesac | gabber808, I think you need to enable 'Soft (emulated with spaces) tabs' in jEdit editing options |
14:16:08 | renesac | and go in 'Edit -> Indent -> Tabs to Spaces' to fix what you did so far |
14:18:24 | gabber808 | Hi renesac. I tried that. Let me try again |
14:22:04 | gabber808 | I am still getting invalid indendation error. I have "automatic indentation: full" , "tab width: 2" and "indent width: 2" + soft |
14:22:08 | renesac | don't forget to convert the tabs you already typed |
14:23:19 | gabber808 | yes, I deleted them and retabbed |
14:23:33 | renesac | paste your code somewhere for we to see |
14:23:38 | renesac | like a gist |
14:24:24 | EXetoC | are you able to select individual spaces? |
14:24:44 | gabber808 | Thanks. It is complaining about line 10: |
14:24:46 | gabber808 | http://pastebin.com/4c1EhqjQ |
14:25:16 | EXetoC | complaining about what? |
14:25:34 | gabber808 | invalid indentation |
14:26:29 | EXetoC | hm, x++? |
14:27:28 | renesac | yeah, that is the problem |
14:27:38 | renesac | nirmod don't have postfix operators |
14:27:44 | renesac | (except []) |
14:28:03 | gabber808 | I see, thanks both. So it wasn't actually an indentation error, despite it reporting that ! |
14:28:03 | renesac | you want x.inc |
14:28:08 | EXetoC | yeah, deal with the errors in series |
14:28:27 | renesac | or inc(x) |
14:28:37 | renesac | or x += 1 |
14:29:01 | renesac | I made a `++` prefix operator in my bithacks module though |
14:29:04 | EXetoC | inc is the most common for ints. "inc x" works too. I prefer that one |
14:29:33 | gabber808 | or x=x+1 |
14:29:51 | renesac | yes |
14:30:30 | gabber808 | well, my animation is nearly working. Just need to find how to clear the sdl surface |
14:31:49 | EXetoC | 'graphics' can't be used alone? |
14:32:08 | EXetoC | I haven't used it so I wouldn't know |
14:33:14 | BitPuffin | EXetoC: :'( |
14:33:28 | BitPuffin | EXetoC: now that's not very nice ;_; |
14:33:39 | * | Demos joined #nimrod |
14:34:00 | gabber808 | What is graphics exactly? Doesn't it use SDL anyway? Is it a different set of commands? |
14:34:23 | BitPuffin | gabber808: believe it's a higher level api that uses sdl in the background |
14:35:05 | gabber808 | We could really do with a bit more documentation on how to use these things |
14:36:14 | BitPuffin | it's there somewhere |
14:36:26 | * | severholding joined #nimrod |
14:40:35 | gabber808 | Found it under "other". I'd have thought it would be under graphics ! |
14:43:44 | Demos | yeah the graphics package could use more docs. There are some tests and examples at the end of graphics.nim though |
14:44:03 | Demos | I know directing you to look at the source of the module is not ideal, but that is how it is |
14:45:10 | EXetoC | BitPuffin: :p |
14:45:44 | gabber808 | And here is my first animation if anybody is interested ! ,.. |
14:45:45 | gabber808 | http://pastebin.com/4ny1aLFM |
14:46:40 | Demos | gabber808: protip: I bet you can render a cairo memory buffer with the graphics module, that could be good if graphics lacks something you need |
14:48:16 | * | severholding quit (K-Lined) |
14:48:17 | gabber808 | I think graphics/sdl will be fine. The only thing that is holding me back a little is having to compile/debug through the console everytime to find errors. |
14:50:53 | EXetoC | that's a given ;) |
14:51:12 | Demos | gabber808: I think nim-lime and zach's vim plugin let you compile |
14:51:30 | Demos | I do know that syntastic works if I have nim-lime (not that well, but it catches some errors) |
14:51:37 | Demos | nimrod's compile times are wonderful as always |
14:51:52 | EXetoC | nim-line? |
14:51:55 | EXetoC | it works pretty well imo |
14:51:58 | Demos | sorry, nim-lime |
14:52:18 | Demos | oh no, syntastic |
14:52:18 | EXetoC | you sure? :p |
14:52:45 | Demos | and I have not noticed nim-lime's idetools driven completion, but my project has subfolders and that could confuse it |
14:53:36 | EXetoC | where do I find this ungoogleable thing that is nim-line? |
14:53:40 | EXetoC | lime |
14:56:18 | gabber808 | i couldn't get nimlime to work |
14:56:32 | EXetoC | nevermind |
14:57:48 | EXetoC | I don't know why I quoted "nim-lime", but apparently it matters in this case |
15:00:28 | Demos | I usually just seach on github |
15:03:33 | * | Guest78262 quit (Ping timeout: 240 seconds) |
15:04:14 | * | Guest78262 joined #nimrod |
15:12:53 | * | rta quit (Ping timeout: 246 seconds) |
15:13:45 | * | Demos quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
15:13:47 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:13:55 | * | Demos joined #nimrod |
15:17:01 | Mat3 | is the new version out now ? |
15:17:48 | * | Guest78262 is now known as psquid |
15:19:18 | EXetoC | Mat3: no. it might get released today |
15:20:32 | OrionPK | https://github.com/Varriount/NimLime |
15:25:10 | dom96 | hello |
15:25:40 | Demos | so last night I was debugging and I un-exported an object field and made two "property" functions that used the getStackTrace() proc. It was epic |
15:26:00 | EXetoC | dom96: morning |
15:26:21 | * | rta joined #nimrod |
15:26:40 | EXetoC | Demos: indeed. I forgot all about it |
15:26:44 | dom96 | EXetoC: afternoon |
15:26:48 | dom96 | hello rta |
15:26:57 | Demos | EXetoC: about getStackTrace()? |
15:27:06 | EXetoC | yeah |
15:27:55 | dom96 | I really would love to see a version of getStackTrace which doesn't return a string. |
15:29:17 | Mat3 | EXetoC: Sublime is one of these newer online editors ? |
15:30:11 | EXetoC | nope |
15:30:26 | * | ics joined #nimrod |
15:32:05 | * | Demos quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
15:32:09 | EXetoC | it's a native app, first released about 6 years ago apparently |
15:32:15 | * | Demos joined #nimrod |
15:32:47 | Mat3 | hmm, looks like a nice editor, however not open-sourced |
15:33:06 | Demos | I use it on windows, although I may switch to vim |
15:33:55 | dom96 | Mat3: Have you tried Aporia? |
15:35:18 | Mat3 | no, I can not compile it (and if so, I would miss a language translation) |
15:35:49 | dom96 | what's the error? |
15:36:26 | dom96 | oh, you would like the menus etc to be in your native language? |
15:37:17 | Demos | wow all the khronos group websites are down |
15:39:31 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
15:39:56 | EXetoC | it was not down yesterday but no requests could be completed |
15:40:28 | Mat3 | dom96: Yes. If I remember correctly, the error was related to the GTK development packages in Ubuntu |
15:41:16 | Mat3 | have you ported Aporia to GTK 3 ? |
15:43:02 | dom96 | no, it's still gtk2. |
15:43:21 | * | Mat3 is using gEdit for Nimrod related development |
15:44:19 | dom96 | You should really try to get Aporia working then. |
15:44:37 | dom96 | Aporia is similar to gedit, but has nicer Nimrod support IMO |
15:46:03 | Mat3 | hmm, ok - I try to compile it next week (hope to find some free time) |
15:46:37 | Mat3 | probably I can add some translations |
15:48:16 | Demos | hm reading a bit about scala, it seems insane. I hope nimrod never grows that complex |
15:48:37 | dom96 | what in particular seems insane about it? |
15:49:55 | Demos | there are like 15 different kinds of types (like T, T+, T- T#i (I think that is like nimrod's T.i or type(thing).i not sure), and so on) what looks like two different ways to define functions. The whole path dependent type thing seems un-nessassary |
15:58:06 | * | gabber808 quit (Quit: Page closed) |
16:00:16 | Mat3 | Demos: Reads like a HindleyMilner like type system |
16:01:08 | * | Mat3 founds the implicit logic of type systems general questionable |
16:02:14 | * | Demos quit (Ping timeout: 246 seconds) |
16:03:50 | EXetoC | too many hidden aspects? |
16:07:49 | Mat3 | who knows |
16:14:31 | * | Demos joined #nimrod |
16:24:34 | Demos | Mat3: but I was under the impression that mixing subtypes into a HindleyMiller causes problems |
16:34:07 | * | psquid quit (Ping timeout: 252 seconds) |
16:34:14 | * | Mordecai joined #nimrod |
16:34:33 | * | Mordecai is now known as Guest27830 |
16:38:13 | renesac | http://build.nimrod-lang.org/docs/tut1.html#result-variable <-- this is a bad example |
16:38:31 | renesac | nobody writes result = 42 |
16:38:31 | renesac | return |
16:38:54 | renesac | that return is redundant in this case |
16:39:26 | renesac | in old versions of nimrod it was needed? |
16:41:08 | renesac | that bad tutorial was the reason I didn't understood 'result' at first, and even though it was useless. |
16:41:09 | EXetoC | either that or someone just forgot to include that variation |
16:41:34 | renesac | it also isn't clear that you can't do 'var result = x' |
16:42:17 | renesac | I think it is better to include a full function as example |
16:43:38 | * | shodan45 joined #nimrod |
16:43:45 | EXetoC | we simply need more volunteers |
16:44:37 | renesac | I think the factorial function is a good example |
16:45:38 | renesac | I'm editing it |
16:46:00 | renesac | I will also add the 'var parameter = parameter' idiom in the next topic |
16:46:13 | dom96 | I think a string builder is a good example for result. |
16:46:34 | Demos | I was all confused because I thought the primary motivation of result was to ensure return values need-not be copied |
16:46:47 | renesac | that I didn't know it was possible until I heard in irc |
16:46:53 | renesac | dom96, do you have it written? |
16:47:02 | renesac | that string builder function? |
16:47:25 | dom96 | No. |
16:47:31 | dom96 | Should be pretty trivial though. |
16:47:45 | renesac | so write it, otherwise I will put the factorial function |
16:48:08 | dom96 | result = ""; result.add("Foobar"); result.add(myVariable) |
16:48:23 | dom96 | vs. return "Foobar" & myVariable |
16:48:29 | dom96 | meh. that's a crappy example |
16:48:33 | dom96 | nvm |
16:48:33 | renesac | yeah.. |
16:48:46 | renesac | the cool thing about factorial is that it ends in a for loop |
16:48:54 | * | Varriount is awake |
16:49:03 | renesac | so you save a line |
16:49:39 | dom96 | where is Araq? It's release day! |
16:49:52 | Varriount | Have the branches been merged yet? |
16:50:49 | dom96 | No. |
16:51:04 | dom96 | Varriount: Can you try to figure out why the tester reports 12 more tests in win-x86? |
16:53:36 | Mat3 | Demos: indeed |
16:59:11 | Varriount | dom96: Babel packages |
16:59:25 | dom96 | ahh |
17:00:12 | * | DAddYE joined #nimrod |
17:00:14 | Varriount | I don't know why they aren't showing up in the 64 bit version though. |
17:02:43 | * | Demos quit (Ping timeout: 252 seconds) |
17:07:38 | Araq | dom96: I'm here now |
17:10:22 | * | q66 joined #nimrod |
17:15:31 | Araq | so Varriount are you ready? |
17:15:44 | Varriount | Yes. |
17:15:47 | Araq | :O |
17:15:53 | Araq | what's your local time? |
17:15:59 | Varriount | 1:15 pm |
17:16:29 | Araq | ok good, well I'm trying to make async IO stable but even if I fail, we'll release tonight |
17:20:17 | * | BitPuffin quit (Ping timeout: 246 seconds) |
17:27:31 | * | nequitans joined #nimrod |
17:27:52 | * | askatasuna joined #nimrod |
17:35:10 | * | zezba9000 joined #nimrod |
17:37:37 | * | nande joined #nimrod |
17:39:24 | reactormonk | Araq, decided on git purge? |
17:40:02 | Araq | did you make an announcement on the forum? sent emails warning the people who have forks? |
17:40:06 | Varriount | ^ I can send bug reports to all fork owners |
17:40:40 | Varriount | But first, a shower. |
17:41:37 | reactormonk | good, I'll write the announcement. |
17:41:46 | reactormonk | but first, I have to figure out how to deal with patches. |
17:42:00 | Araq | alright thanks |
17:42:13 | * | bitcrusher joined #nimrod |
17:42:26 | EXetoC | how significant is the hasKey+mget overhead on large tables compared to just querying the table once and getting a pointer? |
17:42:38 | EXetoC | not that it'll matter often |
17:42:44 | Araq | hi bitcrusher |
17:42:56 | EXetoC | I guess it's obvious, assuming that there's no caching going on |
17:43:07 | bitcrusher | hello Araq, just checking out the language |
17:43:09 | Araq | ;-) |
17:43:43 | Araq | I still wonder if we should do 0.9.4.0 ... |
17:44:02 | Araq | 4th version number would simply be honest, I think |
17:44:33 | dom96 | What software do you know of that uses 4 version numbers? |
17:45:00 | Araq | microsoft often uses 4 numbers |
17:45:34 | Araq | if 0.9.6 breaks some code in comparison to 0.9.4, and it WILL do that |
17:45:43 | Araq | then we have no patch number left |
17:46:04 | EXetoC | major.minor.revision.cosmetics |
17:48:12 | Araq | we could also drop the leading 0 ... |
17:50:17 | Araq | oh well patches go to master, new development to devel |
17:50:21 | reactormonk | Araq, pushed a branch purged_master |
17:50:34 | Araq | once 0.9.4 is out, that is |
17:50:38 | EXetoC | should "" != nil work? |
17:51:53 | Araq | EXetoC: I think so |
17:52:23 | reactormonk | Araq, I suppose devel and master should have the same ancestry? |
17:52:44 | reactormonk | or will you discard master and use devel from now on? |
17:53:02 | Araq | we can do that |
17:53:16 | Araq | discard master, introduce 'stable' |
17:53:28 | Araq | er ugh, no |
17:53:35 | EXetoC | Araq: ok, will report it. I get "gen.nim(11, 14) Error: internal error: getStr" |
17:53:42 | reactormonk | the question is - will you discard the current data of master? |
17:53:52 | reactormonk | or do I have to make sure that devel and master share a common ancestry |
17:53:52 | Araq | "git origin master" is an idiom... I think |
17:54:05 | reactormonk | it's not about the naming, but the data here |
17:54:24 | Araq | the data of master is irrelevant by now |
17:54:36 | Araq | unless I missed some commit that's not in devel |
17:54:53 | reactormonk | ok |
17:55:19 | reactormonk | there's your purged_devel |
17:55:36 | reactormonk | now to find out how to rebase |
17:55:40 | NimBot | Araq/Nimrod purged_devel 5a448cd Araq [+0 ±5 -0]: 'bind' default for clean templates |
17:55:40 | NimBot | Araq/Nimrod purged_devel c773d60 Araq [+0 ±3 -0]: made some tests green |
17:55:40 | NimBot | Araq/Nimrod purged_devel cdcbfa0 Araq [+0 ±1 -0]: attempt to improve line information for '!=' etc. templates |
17:55:40 | NimBot | Araq/Nimrod purged_devel cc4b951 Araq [+0 ±11 -0]: compiler bootstraps with new VM |
17:55:40 | NimBot | 662 more commits. |
17:56:00 | reactormonk | .... go figure. |
17:56:37 | dom96 | could we maybe worry about purging after release? |
17:56:59 | reactormonk | dom96, sure, but it makes it easier doing it at the split - at least to my understanding |
17:58:51 | * | brson joined #nimrod |
18:07:50 | reactormonk | a bit more messy than I expected :-/ |
18:15:04 | fowl | 662 commits :D |
18:15:16 | Varriount | Araq: Do you want me to start sending out the notifications? |
18:15:23 | fowl | hello whoever pinged me |
18:15:45 | Araq | Varriount: wait for reactormonk please. he said it's "messy" |
18:35:58 | * | BitPuffin joined #nimrod |
18:42:26 | * | Varriount_ joined #nimrod |
18:42:55 | Varriount_ | Ok, I'm currently writing a generic issue message for the rewrite - besides deleting and re-forking the main nimrod repository, what other methods are available to recover from the re-written git history? |
18:43:23 | * | Varriount quit (Disconnected by services) |
18:43:30 | * | Varriount_ is now known as Varriount |
18:43:44 | reactormonk | Varriount, git rebase |
18:43:55 | Varriount | Any specific commands? |
18:46:22 | * | io2 joined #nimrod |
18:51:33 | Varriount | Wait, was the purge done while I was disconnected? |
18:51:53 | Varriount | Also, I never noticed that forks lacked issue areas before. :/ |
18:55:13 | * | BitPuffin quit (Ping timeout: 240 seconds) |
18:57:32 | * | q66 quit (Ping timeout: 252 seconds) |
19:00:56 | Varriount | Araq: With the absense of an issues page on forks, and emails on only about a quarter of the users who have forked nimrod, I don't think I'll be able to notify them all. |
19:06:37 | EXetoC | hopefully you can at least enable it explicitly.. |
19:07:21 | * | Mat3 is now known as Mat3-work |
19:07:27 | EXetoC | yeah, you can |
19:09:13 | Varriount | Does nimrod have an official email address or something? |
19:09:35 | dom96 | Just announce it on the forum. |
19:09:50 | * | Matthias247 joined #nimrod |
19:09:50 | * | q66 joined #nimrod |
19:09:54 | Varriount | -_-' |
19:09:59 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
19:13:38 | Varriount | Araq: Is this message ok? -> https://gist.github.com/Varriount/51165a76caa69415cb22 |
19:24:33 | renesac | what about asking github help for this? |
19:24:46 | Varriount | Huh? |
19:24:58 | renesac | they have a contact form |
19:25:17 | renesac | maybe they can help rebasing nimrod |
19:25:19 | Varriount | This isn't really help.. it's more like.. communication. |
19:25:28 | renesac | like, how to send a notification to all forks |
19:25:47 | renesac | what is the perfect git command line for forkers to use after this |
19:25:48 | renesac | etc |
19:26:14 | renesac | it is their interest also new forks not having to download 300mb of data |
19:26:23 | Varriount | Well, at the moment, I'm gathering email addresses and contacts. Feel free to modify that message. |
19:26:50 | Matthias247 | if you do a git fetch you would get informed anyway that it was a forced update |
19:27:04 | Araq | Varriount: I think the text is just fine |
19:28:57 | Matthias247 | my normal update process is git fetch and then git merge origin/master --ff-only. This would at least give me an error that something happened |
19:31:32 | * | Demos joined #nimrod |
19:31:40 | renesac | Araq, 0.10 ? |
19:32:12 | Varriount | I'm almost done with contact gathering. |
19:32:28 | Araq | renesac: hmm good idea but also ... meh |
19:32:39 | Araq | this way people never know when it ends |
19:32:53 | Varriount | 0.0000001 |
19:34:17 | EXetoC | yeah it's inconsistent |
19:34:56 | * | q66 quit (Ping timeout: 252 seconds) |
19:35:20 | renesac | 2.6.32-431.3.1.el6 ? |
19:35:28 | renesac | (a linux version) |
19:35:57 | renesac | a - instead of a third dot |
19:36:37 | dom96 | 0.9.5-2014.04.07 |
19:36:54 | * | q66 joined #nimrod |
19:36:54 | dom96 | I still think the idea of a date is nice. |
19:37:07 | renesac | or just release the 1.0 for no reason other than getting out of this . hell, like linux did |
19:37:08 | renesac | XD |
19:37:17 | dom96 | Won't be compatible with babel versions though. |
19:37:36 | renesac | dom96, it isn't clear if the date is something additional, or if it is also specifying a more specific version |
19:37:55 | Araq | we'll have master aggregate the bugfixes and devel will be cutting edge |
19:38:01 | renesac | *linus |
19:38:38 | renesac | Araq, nice |
19:38:47 | dom96 | nimbuild already provides latest builds |
19:39:06 | Araq | and the versioning can stay as it is |
19:39:08 | renesac | should the download page redirect to nimbuild? |
19:40:16 | Demos | wow that debate last night went on for another /two hours/ |
19:40:19 | dom96 | The download page will contain a table with a button for each cpu/os combo and it will point to nimbuild. I have some things in NimBuild that I need to modify before that is possible though. |
19:40:31 | Demos | wadler's law in action |
19:40:51 | EXetoC | Demos: about the syntax? |
19:41:07 | Demos | http://www.haskell.org/haskellwiki/Wadler%27s_Law |
19:41:29 | dom96 | We'll probably spend another couple of hours arguing with redditors about syntax once we release. |
19:42:14 | EXetoC | /ignore :> |
19:42:57 | Demos | we will also get c++ "programmers" (I suspect these people do little actual programming) bitching about how we rely on a GC and you should NEVER EVER EVER use manual management |
19:43:10 | EXetoC | so do you know when the optimal time to announce is? |
19:44:51 | NimBot | Araq/Nimrod devel 7780d81 Dominik Picheta [+0 ±1 -0]: Change the expected path in tfailedassert.... 4 more lines |
19:44:51 | NimBot | Araq/Nimrod devel f0ea793 Dominik Picheta [+1 ±3 -0]: Merge branch 'devel' of github.com:Araq/Nimrod into devel |
19:44:51 | NimBot | Araq/Nimrod devel 0ccea55 Dominik Picheta [+0 ±2 -0]: Disable async macro code output. Added some WSA error codes to winlean. |
19:44:59 | EXetoC | I just took that at face value before. It is of course a nonsensical argument |
19:45:36 | Demos | EXetoC: took what at face value, the GC hate or the wierd "pointers are bad but wrapping them in a class makes them OK" thing |
19:46:22 | * | BitPuffin joined #nimrod |
19:46:31 | EXetoC | the former |
19:47:16 | EXetoC | I guess many people use java as a reference |
19:47:34 | Demos | yeah same. Apperently I had a prolonged argument with my lisper friend over this... although neither of us remember that argument |
19:47:38 | fowl | i am shooting myself in the foot: https://gist.github.com/fowlmouth/10002354 |
19:47:43 | Demos | but it is a right tool for the right job thing |
19:49:03 | Demos | can you actually draw those JSON trees now? |
19:49:12 | reactormonk | Varriount, figuring them out |
19:49:31 | fowl | Demos, they get parsed into widgets, but yes |
19:49:42 | Demos | gtk widgets? |
19:49:52 | fowl | no |
19:50:42 | fowl | https://gist.github.com/fowlmouth/ff6b7698b76a8cc408ae |
19:51:17 | Varriount | reactormonk: Figuring what out? |
19:51:57 | * | BitPuffin quit (Ping timeout: 255 seconds) |
19:52:04 | reactormonk | Varriount, the correct commands for everyting |
19:52:10 | reactormonk | git clone [email protected]:Araq/Nimrod.git --single-branch -b purged_devel # <- this gives you the new repo |
19:52:19 | Demos | I do something similar, except I only have buttons and my storage format is binary (which I think it "A Very Bad Idea") |
19:52:35 | Varriount | Araq: As a last resort, do you want me to contact users through the issues pages of any of their own repositories which use nimrod as a langauge? |
19:52:47 | Demos | esp since any pointers in your data will cause lots and lots of pain |
19:53:35 | Demos | fowl: I think you could set all the procs in your vtbl to {.nimcall.} to save 8bytes per proc (big whoop I know) |
19:54:08 | Varriount | dom96: You sure that you don't have any email software setup on on the server? It might look a bit odd for a student to be emailing all these people. |
19:54:18 | Demos | and yes I am that nitpicking arsehole |
19:55:20 | dom96 | Varriount: No, sorry I don't. |
19:55:29 | Varriount | Then again, I could always forgo using my personal email, and use the email my college gave me... |
19:55:32 | fowl | Demos, thanks |
19:55:41 | Varriount | That might look even more odd though. |
19:56:13 | fowl | Demos, im going to open a new repos for this, i write a middle-man connection manager for enet that i like a lot |
19:56:42 | Demos | yeah, another idea is to have a `.` that can call methods and do all the relevant casting |
19:59:27 | Araq | Varriount: the "official" email address is my personal email address lol |
19:59:59 | Araq | but just use your own, it's fine, you are part of the core team |
19:59:59 | Varriount | :/ |
21:08:30 | * | NimBot joined #nimrod |
21:09:20 | * | Varriount|Mobile joined #nimrod |
21:09:20 | * | nequitans joined #nimrod |
21:09:20 | * | Skrylar joined #nimrod |
21:09:20 | * | ics joined #nimrod |
21:09:20 | * | bstrie_ joined #nimrod |
21:09:20 | * | q66 joined #nimrod |
21:09:20 | * | Demos joined #nimrod |
21:09:20 | * | Matthias247 joined #nimrod |
21:09:20 | * | io2 joined #nimrod |
21:09:20 | * | Varriount joined #nimrod |
21:09:20 | * | brson joined #nimrod |
21:09:20 | * | bitcrusher joined #nimrod |
21:09:20 | * | askatasuna joined #nimrod |
21:09:20 | * | DAddYE joined #nimrod |
21:09:20 | * | shodan45 joined #nimrod |
21:09:20 | * | rta joined #nimrod |
21:09:20 | * | vendethiel joined #nimrod |
21:09:20 | * | isenmann joined #nimrod |
21:09:20 | * | OrionPK joined #nimrod |
21:09:20 | * | fowl joined #nimrod |
21:09:20 | * | comex joined #nimrod |
21:09:20 | * | Raynes joined #nimrod |
21:09:20 | * | silven joined #nimrod |
21:09:20 | * | noam joined #nimrod |
21:09:20 | * | zahary1 joined #nimrod |
21:09:20 | * | eigenlicht joined #nimrod |
21:09:20 | * | runvnc joined #nimrod |
21:09:20 | * | renesac joined #nimrod |
21:09:20 | * | Amrykid joined #nimrod |
21:09:20 | * | Araq joined #nimrod |
21:09:20 | * | tumak joined #nimrod |
21:09:20 | * | cark joined #nimrod |
21:09:20 | * | Zuchto_ joined #nimrod |
21:09:20 | * | flyx joined #nimrod |
21:09:20 | * | EXetoC joined #nimrod |
21:09:20 | * | reloc0 joined #nimrod |
21:09:20 | * | rixx joined #nimrod |
21:09:20 | * | eximiuswastaken joined #nimrod |
21:09:20 | * | oxful joined #nimrod |
21:09:20 | * | Trixar_za joined #nimrod |
21:09:20 | * | krusipo_ joined #nimrod |
21:09:20 | * | Ycros joined #nimrod |
21:09:20 | * | musicalchair joined #nimrod |
21:09:20 | * | zielmicha_beta joined #nimrod |
21:09:20 | * | phI||Ip joined #nimrod |
21:09:20 | * | seubert joined #nimrod |
21:09:20 | * | mal`` joined #nimrod |
21:09:20 | * | dom96 joined #nimrod |
21:09:20 | * | Boscop joined #nimrod |
21:09:20 | * | reactormonk joined #nimrod |
21:09:20 | * | betawaffle joined #nimrod |
21:09:20 | * | iNode001 joined #nimrod |
21:09:20 | * | JStoker joined #nimrod |
21:09:20 | * | Roin_ joined #nimrod |
21:09:20 | * | epsylon joined #nimrod |
21:23:38 | Araq | so ... what's left to do? |
21:25:08 | * | Guest27830 joined #nimrod |
21:25:50 | * | BitPuffin joined #nimrod |
21:31:40 | dom96 | let's release already |
21:38:57 | OrionPK | fix osx? |
21:39:15 | Araq | OrionPK: what's wrong with osx? |
21:39:33 | OrionPK | as of last night my proj wasnt building |
21:39:50 | OrionPK | i pasted the error up in here |
21:39:57 | OrionPK | log doesnt go that far back though |
21:40:18 | Araq | well repeat the error message please |
21:40:21 | OrionPK | saw someone fixed selectors, but then another compiletime error happened |
21:40:31 | OrionPK | k, when I get home. Im at work and dont have access to my mac atm |
21:41:25 | Demos | I would test but I have a chemestry exam... |
21:41:29 | Demos | speaking of which, I gotta go |
21:41:31 | * | Demos quit (Remote host closed the connection) |
21:44:24 | OrionPK | if someone scrolls up, it's probably one of the last things i said |
21:44:55 | Araq | well async IO is not ready at all in this release |
21:45:08 | Araq | we have lovely random crashes when stress testing things |
21:45:55 | OrionPK | ah |
21:46:28 | OrionPK | idk if im even using asyncio, just using another module that uses asyncio, and not using its asyncio functionality |
21:46:41 | OrionPK | a stdlib module |
21:46:44 | Araq | oh |
21:51:50 | * | shodan45 quit (Quit: Konversation terminated!) |
21:52:33 | * | Guest27830 quit (Ping timeout: 255 seconds) |
21:53:08 | * | nequitans quit (Ping timeout: 245 seconds) |
21:53:19 | * | Guest27830 joined #nimrod |
21:57:36 | Araq | ping Varriount, Varriount|Mobile |
22:00:31 | Varriount|Mobile | Hm? |
22:01:12 | Varriount|Mobile | Araq: Yes? |
22:02:10 | Araq | I think we should purge the repo today, now but do the release somewhat later |
22:02:28 | Araq | it annoys me too much asyncio is *almost* ready |
22:02:45 | Varriount|Mobile | Ok then, purge away |
22:03:04 | Araq | also we didn't test on macosx enough, I think |
22:03:08 | dom96 | asyncdispatch not asyncio |
22:03:33 | Araq | though zahary1 likely tested everything on mac |
22:03:57 | Araq | well reactormonk didn't write the forum message |
22:04:13 | Araq | did you send the messages around, Varriount|Mobile ? |
22:04:52 | Varriount|Mobile | I wasn't going to send them till the purge actually occurred |
22:05:42 | Varriount|Mobile | The composed email is open on my desktop, unsent. |
22:08:54 | dom96 | I don't think we can do the purge as long as there are PRs open |
22:09:38 | NimBot | Araq/Nimrod devel fcb472d flaviut [+0 ±1 -0]: Add renderRstToJson in docutils |
22:09:38 | NimBot | Araq/Nimrod devel 2dd98ee flaviut [+0 ±1 -0]: Modify renderRstToJson to use the json library |
22:09:38 | NimBot | Araq/Nimrod devel c473ede Andreas Rumpf [+0 ±1 -0]: Merge pull request #1069 from flaviut/devel... 2 more lines |
22:13:18 | fowl | hrm |
22:14:19 | fowl | is this normal: https://gist.github.com/fowlmouth/d54a36d05fb1878083fe |
22:14:31 | fowl | /tmp/aporia/a26.nim(2, 5) Error: undeclared identifier: 'a28' |
22:16:26 | dom96 | nope, that's a bug. |
22:17:12 | Araq | no it's a feature but the compiler should tell you |
22:17:23 | Araq | you can't forward module names |
22:18:06 | dom96 | oh, I was thinking of this bug: https://github.com/Araq/Nimrod/issues/1029 |
22:19:18 | fowl | thats whack >_> |
22:27:32 | Skrylar | Araq: if you think my coding style is erratic, look at the ansi c version of the porter stemmer o_o |
22:27:38 | Skrylar | crazy brace soup |
22:27:53 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
22:31:07 | Araq | Varriount|Mobile: save your email, dom96 is right I need to merge PRs ... |
22:31:13 | OrionPK | araq here's the error: lib/core/macros.nim(208, 21) Error: for a 'var' type a variable needs to be passed |
22:31:31 | dom96 | OrionPK: What's your code? |
22:31:53 | dom96 | or is that just compiling macros.nim? |
22:31:56 | OrionPK | sec, im determining the piece thats causing it |
22:34:13 | BitPuffin | Araq: tell me something nimrod can do that C++ can't :D |
22:34:25 | BitPuffin | I'm trying to win people over to nimrod \o/ |
22:34:49 | NimBot | Araq/Nimrod devel 7fc5ae9 Araq [+0 ±5 -0]: preparations for easier debugging |
22:34:49 | NimBot | Araq/Nimrod devel 231a096 Araq [+0 ±4 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
22:35:17 | BitPuffin | so far I've said term rewriting macros |
22:35:26 | Araq | BitPuffin: my usual answer: Everything that I do in my emerging langs talk is either very hard or downright impossible in C++ |
22:36:00 | dom96 | BitPuffin: Who are you trying to convince? |
22:36:05 | OrionPK | hmm |
22:36:08 | OrionPK | I guess it's the template stuff |
22:36:29 | OrionPK | i.e. https://github.com/onionhammer/onion-nimrod/tree/master/templates |
22:36:47 | BitPuffin | Araq: you mean strangeloop? |
22:36:54 | BitPuffin | dom96: an old irc buddy |
22:36:59 | fowl | src/gamestates.nim(136, 29) Warning: Cannot prove that 'evt' is initialized. This will become a compile time error in the future. [ProveInit] |
22:37:05 | fowl | how do you get past this |
22:38:06 | Araq | fowl: relax. the future is still away. report a bug if you think it is one. |
22:38:26 | * | bitcrusher quit (Write error: Connection reset by peer) |
22:38:28 | Araq | BitPuffin: yes |
22:38:44 | * | bitcrusher joined #nimrod |
22:42:02 | * | mal`` quit (Quit: ERC Version 5.3 (IRC client for Emacs)) |
22:43:33 | BitPuffin | Araq: hehe, when I explained term rewriting macros with the simple example of rewriting x * 2 to x + x, he said that compilers usually catch that. But then I was like sin(x) + cos(x) = 1, let's see your compiler catch that :D |
22:45:51 | Araq | BitPuffin: no no no you're doing it wrong |
22:46:16 | BitPuffin | Araq: waii kawai |
22:46:19 | Araq | x * 2 -> x+x # does C++ for built-in types but not for your bignum library. That is the difference. |
22:46:34 | BitPuffin | ah true |
22:46:38 | BitPuffin | I should mention that |
22:47:42 | EXetoC | optimizers have a hard time with sin(x) + cos(x)? |
22:48:08 | BitPuffin | EXetoC: they probably do |
22:48:14 | EXetoC | sin(x) + cos(x) -> fsincos? |
22:48:24 | BitPuffin | EXetoC: sin(x) + cos(x) = 1 |
22:48:43 | * | mal`` joined #nimrod |
22:49:34 | BitPuffin | Araq: btw we should add the term rewriting macro for sin(x) + cos(x) in math.nim I think |
22:49:39 | BitPuffin | it would gief penis |
22:49:47 | EXetoC | no that's not what fsincos does |
22:50:36 | Araq | BitPuffin: optimizations are useful when they transform real world code |
22:50:52 | BitPuffin | Araq: well it can happen in real code |
22:51:05 | Araq | sin(x) + cos(x) is unlikely to occur in real code |
22:51:13 | BitPuffin | Araq: btw his answer to the 2*x thing was that you write code so that it is inlined, and therefor it does |
22:51:19 | EXetoC | {.error: "silly operation".} |
22:51:26 | BitPuffin | Araq: in scientific computing it might |
22:52:48 | BitPuffin | and probably more efficiently, hmm probably not |
22:55:15 | Araq | inlining doesn't perform x*2 -> x+x, that's just bullshit |
22:56:45 | BitPuffin | Araq: well I think he meant that inlining would perform x*2 |
22:57:11 | BitPuffin | at compile time or something |
22:57:12 | fowl | Araq, proveinit always comes up when declaring a TEvent |
22:57:23 | BitPuffin | fowl: is the allegro wrapper done? I wanna code some nimrod |
22:57:54 | BitPuffin | I have a game that is perfectly sized project that would be awesome in nimrod :) |
22:57:58 | fowl | BitPuffin, aside from some audio functions, yes |
22:58:11 | BitPuffin | fowl: ah, well then I should at least eb able to start using it |
22:59:31 | fowl | BitPuffin, please fix it for windows |
23:00:06 | * | Matthias247 quit (Quit: Matthias247) |
23:00:46 | OrionPK | ok |
23:00:50 | OrionPK | node.add newCall("add", ident("result"), newCall("$", ident(identifier))) |
23:01:23 | OrionPK | lib/core/macros.nim(335, 21) Error: type mismatch: got (int literal(5), string) |
23:01:55 | OrionPK | ident in this case is const x = 5 |
23:02:27 | OrionPK | it expected: system.add(x: var string, y: string) |
23:02:39 | fowl | did you import macros |
23:02:57 | OrionPK | yes, this code works on main but not devel |
23:03:17 | OrionPK | newCall("$", ident(identifier)) should be translated to $x where x = 5 |
23:03:43 | OrionPK | code is up on this repo: https://github.com/onionhammer/onion-nimrod/tree/master/templates |
23:04:05 | Araq | OrionPK: please make a proper bug report |
23:04:31 | BitPuffin | fowl: but I barely use winblows |
23:05:29 | OrionPK | araq I want to narrow it down further than "this huge codefile doesnt work anymore" |
23:05:35 | OrionPK | just seeing if anyone else had any insight |
23:05:46 | * | CARAM joined #nimrod |
23:06:06 | BitPuffin | fowl: other than for playing games for let's plays |
23:10:51 | * | Guest27830 quit (Ping timeout: 255 seconds) |
23:12:39 | fowl | OrionPK, last time i wrote a macro the error line was off by one |
23:13:57 | fowl | OrionPK, where is the macro |
23:14:05 | OrionPK | in templates.nim |
23:14:17 | * | Varriount|Mobile quit (Remote host closed the connection) |
23:14:22 | OrionPK | line 251 is pretty much the heart |
23:14:25 | OrionPK | compile time proc |
23:16:34 | * | darkf joined #nimrod |
23:17:26 | OrionPK | I think it has to do w/ the insertionPoint |
23:19:26 | dom96 | good night |
23:21:09 | BitPuffin | dom96: or is it!?!?!?! |
23:21:10 | * | Demos joined #nimrod |
23:21:11 | BitPuffin | NUNUNUNUUU |
23:22:27 | * | Guest27830 joined #nimrod |
23:22:31 | * | Guest27830 is now known as psquid |
23:22:38 | * | CARAM quit (Remote host closed the connection) |
23:22:44 | Demos | we released yet? |
23:23:04 | * | psquid quit (Client Quit) |
23:23:25 | * | psquid joined #nimrod |
23:24:22 | EXetoC | in a couple of days I think |
23:24:25 | Demos | Araq: is x+x even faster than 2*x I can recall benchmarks where they are within the margin of error of each other |
23:24:29 | * | nequitans joined #nimrod |
23:24:37 | NimBot | Araq/Nimrod devel 7dc8ab8 Araq [+1 ±12 -0]: merged better html links #850 |
23:24:50 | Araq | Demos: it's only an example |
23:25:08 | BitPuffin | Demos: they are pretty much the same on modern CPUs |
23:25:17 | Araq | yeah |
23:25:33 | * | CARAM joined #nimrod |
23:27:47 | Araq | good night |
23:28:15 | BitPuffin | OR IS IT!!==!=!!?!!??!"?!#?"!=)# |
23:28:18 | BitPuffin | DUN DUN DUUUUUUUUUN! |
23:49:52 | * | CARAM quit (Remote host closed the connection) |
23:54:26 | Skrylar | BitPuffin: i thought the trick with twos was to bit shift |
23:54:52 | Skrylar | i remember at least on the JVM they said that using << instead of multiplying by a power of two was faster, and some of the peephole optimizers do this to jar files |
23:55:53 | * | BitPuffin quit (Ping timeout: 240 seconds) |
23:57:25 | Varriount | fowl: I'm available to try out the allegro wrapper on windows. |
23:58:14 | * | CARAM joined #nimrod |