00:00:03 | renesac | can't I index tuples with field numbers? |
00:01:18 | renesac | I'm trying to refactor the ParticleBench code, so unnoficial compiler tweaks are out |
00:01:19 | renesac | :P |
00:01:30 | renesac | but I will take a look |
00:01:51 | Araq | seems like you only need to weaken the check for tyTuple and then it should compile |
00:02:07 | Araq | and yes you can do tup[i] but i has to be a constant and so that doesn't help |
00:02:56 | renesac | I tried with a enum |
00:03:05 | renesac | but not constant enought it seems... |
00:03:06 | renesac | :P |
00:03:33 | Araq | it needs to be an intege |
00:03:36 | Araq | *integer |
00:04:00 | Araq | what should tup[enumValue] mean? tup[enumValue.ord] ? then just say so |
00:04:01 | renesac | it is strange that it prints the field name if you call it with parenthesis |
00:04:11 | renesac | hum |
00:05:03 | renesac | I get a SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
00:05:09 | renesac | with enumvalue.ord |
00:05:17 | renesac | it works with a simple integer |
00:05:36 | Araq | yay |
00:09:06 | renesac | it also gives SIGSEGV when I try an array of ints... |
00:09:15 | renesac | const dim: array[3, int] = [0,1,2] |
00:09:15 | renesac | for c in dim: |
00:09:15 | renesac | echo min[c] |
00:09:45 | renesac | it works with a single const int |
00:09:45 | Araq | on devel? |
00:10:03 | renesac | I tried to compile from git |
00:10:18 | renesac | though it gives the same version number and date of the nimbuild one |
00:10:40 | renesac | or not |
00:10:42 | renesac | Nimrod Compiler Version 0.9.3 (2014-01-21) |
00:15:02 | * | Smaehtin quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
00:20:33 | * | brson joined #nimrod |
00:27:54 | renesac | I was trying to use enum as a nicer array, but it seems that the working solution is to use a simple array + enum |
00:28:31 | Araq | yeah |
00:28:34 | Araq | good night |
00:28:45 | renesac | good night |
00:28:56 | dom96 | yeah, I'm away to sleep too |
00:28:58 | dom96 | bye |
00:30:09 | renesac | *I was trying to use tuple |
00:33:55 | * | nueva quit (Quit: Bye) |
00:47:25 | * | LordAndrew joined #nimrod |
01:07:34 | * | DAddYE quit (Remote host closed the connection) |
01:10:20 | * | Varriount is back |
01:41:53 | * | vbtt_ joined #nimrod |
01:42:05 | vbtt_ | hi |
01:44:01 | Varriount | Hi vbtt_ |
01:45:04 | vbtt_ | what's the primary dev platform for nimrod? |
01:46:36 | vbtt_ | also who runs the nimrod builders? |
01:47:09 | vbtt_ | dom96: u here? |
01:49:32 | LordAndrew | Varriount: Do you think it'd be worth making a pull request for this function I wrote?: https://gist.github.com/Lordovos/8552530 |
01:55:16 | vbtt_ | LordAndrew: why not a generic one that can use float or int? |
01:59:48 | renesac | I was going to write something similar |
02:00:19 | LordAndrew | Ah right, floats. Forgot about that. |
02:00:26 | renesac | but accepting as argument a nimrod type or subrange |
02:00:27 | * | capisce_ quit (Ping timeout: 260 seconds) |
02:00:43 | LordAndrew | I'm also wondering if I would want to just have the procedure be named random() instead of randomRange. |
02:01:23 | renesac | and it would return all types of values, like uint32, floats, strings, etc |
02:01:29 | renesac | well, that was the plan |
02:01:43 | renesac | and subranges, of course |
02:02:21 | LordAndrew | ...oh. random(float) doesn't work on Windows?? |
02:02:35 | renesac | nor in linux I think |
02:02:49 | renesac | the std random is very limited |
02:03:03 | renesac | that is why I wanted to make this super generic templated version |
02:03:21 | vbtt_ | random(float) is documented. doesn't work? |
02:03:30 | LordAndrew | "This is currently not supported for windows." |
02:03:31 | renesac | is it? |
02:03:34 | renesac | hum |
02:03:40 | LordAndrew | Compiler throws error as well, says expected an int. |
02:04:03 | vbtt_ | http://nimrod-lang.org/math.html#135 |
02:04:46 | vbtt_ | yeah you could just overload random(). |
02:05:09 | vbtt_ | random(max) or random(min, max). nimrod can do this type of overloading, right? |
02:05:21 | renesac | right |
02:05:42 | renesac | well, the other thing wrong with random is using global state |
02:06:26 | renesac | I haven't tried, but I suspect a call to randomize in a function will interfere in other unrelated functions called latter |
02:07:06 | vbtt_ | unrelated, but what do you guys think are the top 3 distinctive features of nimrod? |
02:08:20 | vbtt_ | just wondering since the language has grown a lot of features. |
02:09:13 | * | DAddYE joined #nimrod |
02:09:14 | renesac | I was thinking in something like random[range[0 .. 16].uint](seed=x).get() |
02:09:53 | renesac | though that will only work for ranges known at compile time... |
02:10:12 | vbtt_ | renesac: the global state should always be available because some functions may not care. |
02:10:25 | renesac | ? |
02:10:25 | vbtt_ | also why is range better than (min, max) ? |
02:10:54 | vbtt_ | renesac: I mean random(max) should always be allowed (using the global random generator) |
02:11:01 | renesac | not that it is better, but I though it would make min,max unnecessary |
02:11:47 | vbtt_ | renesac: max and min, max are convenient. |
02:11:54 | renesac | vbtt_: I'm talking about the seed used by the random generator, that may be changed by unrelated functions runing at the same time |
02:12:06 | renesac | vbtt_: indeed, now I see it |
02:12:41 | renesac | but even then, I think random should also be capable of returning ranges, even if it has optional max and min arguments |
02:13:33 | vbtt_ | renesac: why return a range? randomSample(sampleSize, min, max) is more useful imo. |
02:13:53 | * | DAddYE quit (Ping timeout: 272 seconds) |
02:14:26 | renesac | what is sampleSize? |
02:14:52 | vbtt_ | actually randomSample(sampleSize, array or seq) |
02:15:00 | renesac | and my question would be, why not return a range, if you want to return int, uint64, float, etc? |
02:15:03 | vbtt_ | select random sampleSize elements from list. |
02:15:30 | renesac | oh, that would be a different function |
02:15:31 | vbtt_ | renesac: let me rephrase, what does it mean to return a random 'range'? |
02:16:09 | renesac | return a value of type subrange that is inside that defined subrange |
02:16:50 | renesac | http://build.nimrod-lang.org/docs/manual.html#subrange-types |
02:16:57 | renesac | <-- I'm talking about those |
02:17:17 | vbtt_ | ah i see. |
02:17:27 | vbtt_ | yup sure - that should work too. |
02:17:44 | renesac | but the limitation is that they should be known at compile time |
02:17:49 | vbtt_ | type Color = range[0..0xFFFFF];.... random(Color) |
02:17:57 | renesac | so the parameters max and min have their value |
02:18:06 | vbtt_ | it's still useful. |
02:18:37 | renesac | I was thinking more in random[color]() |
02:18:39 | * | DAddYE joined #nimrod |
02:18:41 | * | DAddYE quit (Client Quit) |
02:19:13 | renesac | but I guess overloading/implicit generics works too |
02:19:26 | renesac | I'm not sure you can use "when" inside the function then |
02:19:41 | vbtt_ | either will work but random(Color) is more readable imo. |
02:19:46 | renesac | rigth |
02:19:47 | vbtt_ | renesac: why cant you use when? |
02:19:58 | renesac | I don't know |
02:20:17 | renesac | probably you can indeed, I'm still starting with nimrod |
02:20:51 | renesac | anyway, I wanted a 64bit random value, so I was going to write my own random funcion from scratch |
02:21:25 | renesac | as the stdlib only provides positive integers as random values |
02:21:35 | renesac | (and floats, I missed that) |
02:23:13 | vbtt_ | renesac: what's sizeof(int) in nimrod? |
02:23:27 | renesac | I think it is plataform dependent |
02:23:33 | renesac | either 32 or 64bits |
02:23:43 | renesac | int32 is aways 4 bytes |
02:23:54 | renesac | int64 aways 8bytes |
02:24:14 | renesac | vbtt_: about the global state again, you might have some test that depends on certain random pattern, and another function is called, that calls randomize, and your totally unrelated function fails. |
02:24:50 | renesac | you should be able to seed your own random number generator |
02:25:11 | vbtt_ | renesac: code shouldn't depend on random 'patterns'. it's a bug. random by definition shouldn't have patterns (but pseudo-random happens to cos it's machine generated) |
02:25:21 | vbtt_ | renesac: agree on 2nd point. |
02:25:25 | renesac | to reproduce a bug |
02:25:26 | renesac | for example |
02:25:44 | renesac | well, global state is bad |
02:25:50 | vbtt_ | renesac: the api could be. randomizer = initRandom(seed); var x = random(randomizer, min, max); |
02:28:01 | renesac | I think simply 'let random1 = Random(seed); var x = random.get(max, min=2) |
02:28:11 | renesac | *random1.get |
02:28:33 | renesac | the case insensitivity of nimrod makes worse to work with classes |
02:28:47 | renesac | well, maybe 'let random = TRandom(seed) |
02:28:54 | renesac | yep |
02:29:26 | EXetoC | yes that's the convention |
02:30:10 | renesac | if you just need one random value now, you could use 'TRandom(seed).get(max)' |
02:30:47 | renesac | though you have to initialize separately to use in a loop |
02:32:16 | renesac | but if TRandom itself supported arrays, sets, strings, etc as output, it wouldn't be as necessary |
02:32:55 | LordAndrew | Hmm. |
02:33:22 | LordAndrew | For a .gitignore file in a NImrod project, what would I want to exclude? Just /nimcache? |
02:34:21 | renesac | I'm going to post a rant in the forums soon about how I hate some C style stdlib APIs that don't use or let you use nimrods features and nicities that C don't have |
02:34:52 | renesac | I'm still preparing it, and feeling the language |
02:36:08 | renesac | random is among them, as is Open() and Alloc() |
02:36:15 | renesac | /spoiler |
02:39:49 | EXetoC | wrapping alloc shouldn't be difficult |
02:39:58 | renesac | yep, it is trivial |
02:40:16 | EXetoC | and what about open? |
02:41:30 | renesac | you need to declare a variable of type TFile to feed to the function |
02:41:38 | renesac | you loss nimrod type inference |
02:42:15 | EXetoC | that has to do with how var works, no? also, check the other overloads |
02:42:21 | renesac | you should be able to just 'var file = Open(filename)' |
02:42:44 | EXetoC | you can |
02:43:03 | renesac | ohh |
02:43:16 | renesac | I didn't saw the other definitions |
02:43:41 | renesac | ok, that is outside my rant now |
02:44:59 | renesac | about alloc, you see all over the place: 'cast[ptr T](alloc0(sizeof(T)))' where it would be shorter to write alloc0[ptr T](sizeof(T)) |
02:45:11 | renesac | yep, that is trivial, but still a C wart in nimrod |
02:45:21 | EXetoC | easy to fix like I say, but I'll do it tomorrow or something if you don't want to |
02:45:36 | renesac | yeah |
02:45:37 | EXetoC | assuming that sizeof works and all that |
02:46:12 | renesac | I'm just removing the cast, not changing the alloc0 arguments |
02:46:28 | vbtt_ | renesac: can a template fix that? |
02:46:37 | Varriount | Hey guys. What's going on? |
02:46:41 | renesac | a simple wrapper function would fix that |
02:46:41 | vbtt_ | why not just allocPtr(T) |
02:47:36 | renesac | well, most of the time is the size of the elements pointed by the pointer times the number of elements |
02:47:45 | EXetoC | or just overload it. alloc(T, n: int) or something? |
02:48:02 | renesac | yep |
02:48:17 | renesac | but my point is that it should be like that in the stdlib the first place |
02:48:49 | vbtt_ | renesac: agree. |
02:49:10 | vbtt_ | the stdlib should be convenient and consistent. |
02:49:34 | renesac | I also like the jemalloc experimental API style: http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html |
02:49:38 | EXetoC | there has always been a lack of man power, but ask if you want |
02:49:43 | renesac | instead of binary flags, optional arguments, of course |
02:50:06 | renesac | but that would be a more radical change |
02:50:39 | renesac | and even jemalloc people aren't certain that their experimental API should be keept |
02:51:27 | renesac | of course, instead of returning int, throw an exception and return a pointer |
02:51:42 | xtagon | How do you trap signals like SIGTERM in nimrod? |
02:52:02 | Varriount | There's a handler setting procedure in system.nim |
02:52:33 | xtagon | Varriount, what's the proc name? |
02:52:52 | renesac | actually, that experimental api is totally compatible with current nimrod, just adding optional arguments |
02:53:00 | xtagon | Varriount, searching for "signal" or "trap" didn't bring anything up |
02:53:16 | EXetoC | hook? |
02:53:39 | EXetoC | so, only for ctrl-c I guess |
02:53:48 | Varriount | Set control hook should get sigterm |
02:54:20 | Varriount | setControlCHook |
02:54:29 | Varriount | *Looks at implementation* |
02:54:46 | xtagon | Thanks. Is there no way to hook other signals? I don't need to, but now I'm curious :) |
02:55:01 | Varriount | Why do you think I'm looking at the source? |
02:55:36 | Varriount | Anyway, the two things I think the stdlib could use the most improvement in is unicode string handling, and asyncio |
02:55:40 | EXetoC | because you've watched all the cat videos |
02:56:12 | EXetoC | what about unicode? |
02:57:12 | Varriount | EXetoC: Most of the string related procedures in nimrod are untested with unicode strings |
02:57:59 | Varriount | Also, the manual/tutorial needs a big warning saying that the subscript operator for strings works on the width of a char type |
02:57:59 | renesac | well, if they affect only ASCII, they are utf-8 agnostic |
02:58:21 | EXetoC | got an example? many procs don't care what the string is |
02:58:23 | renesac | Varriount, there is a warning |
02:58:58 | Varriount | EXetoC: That's why I said "untested" |
02:59:54 | Varriount | xtagon: See this -> https://gist.github.com/Varriount/8572100 |
03:00:20 | Varriount | That's what excpt.nim (included in system.nim) does |
03:01:38 | Varriount | There's also some private signal handlers procs in excpt.nim, so I would make sure you're not overriding anything if you want to play around with such things |
03:03:19 | xtagon | Varriount, awesome, thanks |
03:03:57 | xtagon | Varriount, do you know if nimrod traps INT or KILL on it's own for any reason, such as for the GC? |
03:04:15 | Varriount | I'm looking |
03:04:26 | Varriount | Yeah, it captures both. |
03:05:16 | Varriount | Doesn't do much with them. Just prints out stack traces (if available) and handles exiting the integrated debugger if you're debuggin |
03:05:19 | Varriount | *debugging |
03:06:07 | Varriount | xtagon: Go to ./lib/system/excpt.nim, down near the bottom |
03:08:02 | Varriount | I imagine that Araq doesn't have handler registering procedures for the other signals, because after getting most of those, a program has to tread very carefully to avoid termination by the OS |
03:09:55 | xtagon | Yes, but I can see why someone would want to catch KILL in order to free up resources or something |
03:10:15 | Varriount | *shrug* |
03:12:00 | Varriount | The code doesn't look too complicated. If you want, you could probably use sigaction to retrieve nimrod's handlers, and wrap them in your own handler. Or you could modify the handling code to allow user-set hooks. |
03:12:24 | Varriount | Looks like a good mini-project to me. |
03:12:41 | Varriount | Although, I'm focusing on strutils and unicode.nim right now. |
03:13:33 | xtagon | Have fun with that :) |
03:14:03 | Varriount | I'm just comparing what python has built-in to strings that nimrod lacks. |
03:14:03 | xtagon | I'm fighting a virus and not in much of a coding mood |
03:14:28 | Varriount | Aw. Sorry about that. |
03:15:16 | xtagon | Oh, one other thing I couldn't find in the docs: How do you return an exit status code? |
03:15:32 | xtagon | I get an error if I use return in the main code |
03:19:16 | Varriount | quit() |
03:20:11 | Varriount | xtagon: http://nimrod-lang.org/system.html#407 |
03:20:36 | xtagon | Heh, I was searching for "exit" when I should have searched "quit" :) |
03:21:09 | Varriount | I really do wish that chrome had a regex or peg ctrl+find feature |
03:22:00 | * | vbtt_ quit (Ping timeout: 272 seconds) |
03:23:40 | xtagon | There's one in the Chrome web store but it has 2/5 stars... |
03:24:31 | xtagon | Varriount, ah, here is one that looks promising https://chrome.google.com/webstore/detail/regex-search/bcdabfmndggphffkchfdcekcokmbnkjl?hl=en |
03:25:22 | Varriount | Ooh, thanks! |
03:25:39 | * | vbtt_ joined #nimrod |
03:25:48 | Varriount | Regex may suck for any complicated parsing, but it does get the job done for little things. |
03:26:32 | xtagon | The main benefit of regex is that it's everywhere |
03:27:27 | Varriount | xtagon: Did you know that sublime text (and many other IDE's) user regex for highlighting and parsing languages? |
03:27:32 | Varriount | *use |
03:28:22 | xtagon | Varriount, that sounds like it would be hard for recursive grammars |
03:28:22 | Varriount | I help develop one of the two sublime text nimrod plugins. It's very.. uncomfortable. |
03:29:24 | Varriount | xtagon: It's a mixture of json and regex. You define "match rules" in regex, and then specify other things about the rules in json. |
03:29:39 | xtagon | The other thing about regex is that it CAN be fast, but usually isn't. Have you seen this? http://swtch.com/~rsc/regexp/regexp1.html |
03:31:13 | Varriount | xtagon: Do you happen to know which algorithm PCRE uses? |
03:31:53 | xtagon | I'm not sure |
03:32:39 | vbtt_ | xtagon: in practice you dont really hit the pathological case. |
03:33:40 | xtagon | Not for small scripts, but I can see why programs like grep would get a performance boost |
03:33:49 | Varriount | xtagon: Does this article link to a usefull implementation? |
03:34:28 | LordAndrew | I really need to learn how to use regular expressions. |
03:34:58 | Varriount | LordAndrew: The first thing about learning to use regular expressions is when to not use regular expressions. |
03:35:37 | renesac | grep compiles not very complex queries to be VERY fast |
03:35:45 | LordAndrew | Would using a regular expression to validate, say, a dice roll notation be an appropriate use? |
03:36:13 | Varriount | Yes. Using it, however, to parse HTML, is not. |
03:36:35 | xtagon | Varriount, I don't remember the article mentioning any specific implementation |
03:37:07 | xtagon | Varriount, check the "History/Refernces" section, there might be something there |
03:37:21 | renesac | yep, up to two regular expressions, grep uses the Boyer-Moore algorithm |
03:37:55 | xtagon | Varriount, PCRE has two different algorithms, one is Perl-compatible and one is not (for performance) but I don't know any details on the algorithms |
03:38:21 | vbtt_ | how do i look at the generated c code again? |
03:38:38 | Varriount | vbtt: Look at the nimcache directory |
03:38:49 | renesac | I'm starting to read a book about string matching, but haven't got very far |
03:38:58 | Varriount | renesac: What is it? |
03:39:10 | LordAndrew | What exactly is the C code in the nimcache for? Does Nimrod itself just transcompile to C? |
03:39:17 | Varriount | LordAndrew: Yes. |
03:39:33 | vbtt_ | vbtt_: can't find it. i just did 'nimrod c hallo.c' and it compiled but no nimcache direction |
03:39:39 | vbtt_ | s/direction/directory |
03:39:43 | vbtt_ | Varriount: ^ |
03:39:46 | renesac | "algorithms on strings, trees, and sequences" by Dan gusfield |
03:39:52 | Varriount | vbtt: Are you using linux or nimrod? |
03:39:55 | Varriount | *windows |
03:40:06 | xtagon | Nimrod is an OS now? nice :) |
03:40:08 | renesac | Varriount. |
03:40:26 | Varriount | renesac: Yes? |
03:40:32 | renesac | the name of the book |
03:40:36 | Varriount | I see it. |
03:40:37 | vbtt_ | Varriount: linux x64. just bootstrapped nimrod as per the github readme. |
03:41:20 | vbtt_ | there is a nimcache in Nimrod (doesn't contain hallo) and there's no nimcache in Nimrod/examples |
03:41:39 | Varriount | vbtt: Did hallo compile successfully? |
03:41:46 | vbtt_ | Varriount: yes |
03:41:57 | Varriount | Where did you compile it? |
03:42:40 | vbtt_ | cd Nimrod/examples ~/src/Nimrod/bin/nimrod c hallo.c |
03:43:26 | Varriount | You tried using nimrod to compile a c file? |
03:43:34 | vbtt_ | sorry. typo. |
03:43:38 | vbtt_ | nimrod c hallo.nim |
03:43:48 | vbtt_ | then i have the hallo executable and it works. |
03:44:24 | Varriount | Well, the C code should be somewhere in the examples/nimcache directory. |
03:44:32 | vbtt_ | there is no examples/nimcache :( |
03:44:44 | vbtt_ | "no such file or directory" |
03:44:50 | xtagon | vbtt, sudo updatedb && locate nimcache |
03:45:06 | Varriount | vbtt: You're starting to scare me. |
03:46:01 | vbtt_ | hmm something weird going on. locate finds it but I can't cd to it. |
03:46:17 | vbtt_ | ah wait |
03:46:20 | xtagon | Varriount, I looked into a bit more just now. Thompson's algorithm was patented (which explains why it's hard to find an implementation) |
03:46:21 | vbtt_ | examples/examples/nimcache :) |
03:46:32 | * | Lordovos joined #nimrod |
03:46:48 | Varriount | xtagon: I will never understand why people are allowed to patent an *algorithm* |
03:47:02 | xtagon | Varriount, or a UI pattern. Good grief. |
03:47:06 | Varriount | That's like patenting a recipe |
03:47:18 | vbtt_ | yo dawg - there's an examples directory inside the examples directory |
03:47:38 | Varriount | :3 |
03:47:55 | Varriount | xtagon: Any idea when the patent expires? |
03:48:42 | Varriount | Or who has to die to get the patent into public domain? |
03:48:53 | * | LordAndrew quit (Ping timeout: 272 seconds) |
03:49:10 | xtagon | Varriount, http://www.freepatentsonline.com/3568156.pdf |
03:49:25 | Lordovos | damnit |
03:49:27 | * | Lordovos is now known as LordAndrew |
03:50:06 | Varriount | Good grief, it was patented about 47 years ago. |
03:50:36 | Varriount | Or rather, filed 47 years ago, patented 44 years ago. |
03:52:13 | Varriount | Is it still valid? |
03:52:55 | xtagon | Varriount, IIRC design patents only last 14 years |
03:53:33 | renesac | "only |
03:53:34 | renesac | " |
03:53:36 | xtagon | Varriount, I just found this library which was made by the article author https://code.google.com/p/re2/ |
03:53:36 | Varriount | xtagon: Maybe we could use this algorithm to implement a native nimrod regex engine. |
03:54:14 | Varriount | Ooh, and it has a BSD license. |
03:54:56 | xtagon | I don't see anywhere saying it's the same algorithm, just that it's written by the same author |
03:55:55 | xtagon | Varriount, ah, here we go: http://swtch.com/~rsc/regexp/regexp3.html |
03:58:21 | xtagon | It's still only shaving a few microseconds of PCRE, probably not worth implementing in nimrod |
04:00:53 | Varriount | Yeah. Best to follow the principle of NIH |
04:02:16 | Varriount | It's a shame that google discontinued code search, it was a helpful service. |
04:02:46 | xtagon | Yeah it was |
04:03:05 | xtagon | I wouldn't reimplement re2, but a wrapper might be cool |
04:03:21 | * | Varriount holds out c2nim |
04:04:33 | xtagon | Does c2nim work on C++? |
04:04:46 | Varriount | I think it has limited support. |
04:05:05 | Varriount | Only one way to find out! |
04:09:36 | renesac | bummer, if I have a function 'proc func(x: array[2, int]) = foo' I can't call it like 'func([1,2])' |
04:11:23 | Varriount | renesac: Really? what error do you get? |
04:11:44 | renesac | ok, maybe it is because it isn't doing implicit type conversion |
04:11:53 | renesac | I'm trying to fix here |
04:13:17 | xtagon | renesac, it works for me if I specify the proc's return type |
04:14:17 | renesac | ok, it was my fault |
04:14:53 | renesac | wasn't supplying the right number type inside the array |
04:15:17 | LordAndrew | Bleh, I am way too paranoid about software licenses. |
04:15:50 | renesac | the first thing I saw in the error message was 'got (Array constructor[' instead of 'array[' |
04:16:20 | renesac | so I wrongly assumed a nimrod limitation :/ |
04:18:20 | Varriount | renesac: How do you mean? What was the correct code? |
04:18:51 | renesac | the function was asking a array of floats, and I gave it an array of ints |
04:19:06 | renesac | just putting .0 on the numbers solved the issue |
04:19:17 | vbtt_ | is there a quick way to call new(TMyObject) and initialize it with values at the same time? |
04:19:35 | * | ddl_smurf joined #nimrod |
04:19:41 | Varriount | vbtt: define 'quick' |
04:20:11 | Varriount | I'm assuming that TMyObject is a ref |
04:20:31 | vbtt_ | Varriount: easy. instaead of var x = new(TMyObject); x.foo = 1; x.bar=2;.. |
04:20:40 | renesac | var obj = TMyObject(x: bla) ? |
04:20:50 | vbtt_ | if I don't use new, I can do var x = TMyObject(foo: 1, bar: 2) |
04:21:05 | Varriount | vbtt: Then don't use new. |
04:21:48 | vbtt_ | Varriount: but then I make a TMyObject instead of a ref TMyObject, no? |
04:21:56 | vbtt_ | is it still created on the heap? |
04:22:22 | renesac | type RTmyobject = ref Tmyobject |
04:22:36 | renesac | var obj = RTMyObject(x: bla) |
04:22:50 | renesac | I haven't tried, but I guess it works |
04:23:22 | renesac | (I think the standard is to use a P instead of a R) |
04:23:39 | renesac | (not sure) |
04:23:51 | Varriount | Actually, the standard is to not use type prefixes, although personally, I like them. |
04:24:20 | renesac | well, w/o case sensitivity, type prefixes help separate types from values |
04:24:47 | Varriount | Which is what I said to Araq, and he just grumbled that too many people complained about the prefixes. |
04:25:06 | Varriount | It also helps to seperate types and values from procedures. |
04:25:08 | renesac | the first time I saw the language I thought they were very ugly, but I'm growing to like them |
04:25:16 | vbtt_ | yeah I dont like type prefixes. did you say the nimrod standar is to *not* use them? |
04:25:21 | renesac | given the style insensitivity |
04:25:29 | Varriount | vbtt: Yes.. sorta |
04:26:53 | xtagon | But all the standard libraries use them |
04:27:30 | Varriount | xtagon: Araq means to change the names in the future |
04:27:52 | vbtt_ | interesting. |
04:27:58 | xtagon | Good to know |
04:28:03 | Varriount | It's too bad we don't have a larger community to draw upon, to get a general consensus. |
04:28:30 | renesac | the forum don't have pooling functionality right? |
04:28:36 | xtagon | If the prefix isn't going to be standard, then I say there should be at least first-character case sensitivity |
04:28:50 | xtagon | so that "version" can be a variable and "Version" can be a type |
04:29:22 | renesac | my vote would be: either keep the style insensitivity AND type prefixes or have full/partial style sensitiviy by default and remove the prefixes |
04:29:38 | xtagon | renesac, I agree |
04:30:51 | LordAndrew | Style insensitivity? |
04:31:07 | xtagon | s/style/case |
04:31:13 | renesac | DS_f_D == dffd |
04:31:17 | renesac | *dsfd |
04:31:38 | renesac | englobing case and _ insensitivity |
04:31:48 | renesac | but the main issue here is indeed the case of the first letter |
04:32:02 | LordAndrew | err |
04:32:13 | renesac | that is useful for OO style programing |
04:32:15 | Varriount | I bequeth to you all these three links: https://github.com/Araq/Nimrod/blob/devel/doc/apis.txt , http://forum.nimrod-lang.org/t/191/3 , |
04:32:26 | Varriount | Third one coming up as soon as I can find it |
04:33:17 | LordAndrew | var my_var == myVar? |
04:33:27 | Varriount | LordAndrew: Yes |
04:33:38 | Varriount | Currently, though possibly not in the future |
04:33:41 | LordAndrew | why would that be a thing |
04:34:22 | Varriount | LordAndrew: So that everyone can have their own style for their own projects |
04:34:33 | LordAndrew | Does this extend to say: |
04:34:36 | LordAndrew | var t = "whatever" |
04:34:37 | LordAndrew | echo(T) |
04:35:16 | Varriount | Yes. |
04:35:39 | Varriount | Again, there are currently options for nimrod's compiler regarding case-sensitivity |
04:35:40 | renesac | but consistency is encouraged |
04:35:46 | Varriount | renesac: Yes |
04:36:02 | xtagon | Varriount, I just found another implementation: https://github.com/laurikari/tre/ |
04:36:11 | xtagon | Varriount, this one is in C |
04:36:31 | Varriount | Ooh, much easier to wrap than C++ |
04:37:26 | Varriount | DId I tell you guys about a mailing post on the cairo (2d graphics library) mailing list involving someone working for one of the standards groups? |
04:37:57 | xtagon | Varriount, do tell |
04:38:03 | LordAndrew | How does Nimrod's compiler create executables based on the code we compile? |
04:38:24 | Varriount | He said that cairo would be a perfect model for the standard.. except that the standard should have a C++ object oriented interface |
04:39:31 | Varriount | LordAndrew: The "Nimrod Compiler" is actually a transpiler. It translates nimrod code into C (or C++, or objective C, or javascript) and then tells the local compiler to compile those generated files into a binary. |
04:40:27 | xtagon | Whoa, I did not know C++ and Objective C were supported too |
04:40:49 | xtagon | Are you saying we could compile native apps for iOS/Android? |
04:40:52 | Varriount | Well, those backends are not quite as stable as the C backend, or so I've been lead to believe. |
04:41:13 | vbtt_ | there's also js :) |
04:41:25 | LordAndrew | I see. But since the default local compiler is GCC, wouldn't the binaries depend on libgcc and glibc? |
04:41:54 | Varriount | LordAndrew: Yes, if the compiler is configured that way. |
04:42:08 | Varriount | You can pass arguments to the backend compiler if need be. |
04:42:30 | Varriount | xtagon: Yes, theoretically. |
04:44:01 | xtagon | That's awesome |
04:44:43 | Varriount | I think there's an example that's supposed to work on android. I don't know if it's still functional though. |
04:46:21 | xtagon | I'm guessing it has to be wrapped in something Java-like anyway, though |
04:46:27 | Varriount | xtagon: Look at the cross_calculator example. |
04:47:50 | xtagon | Varriount, cool |
04:48:03 | LordAndrew | Varriount: I see. I ask because I try to avoid accidentally using GPL licensed stuff that would in turn make my code and/or executables GPL. I'm probably worrying far too much about it though. |
04:48:25 | Varriount | LordAndrew: You're worrying far too much about such things. |
04:50:43 | xtagon | LordAndrew, libc is LGPL which lets you link it in proprietary code (in contrast to GPL) |
04:52:09 | Varriount | Heh, your worrying reminds me of the time I called atlassian ( the company behind bitbucket) in order to get my code removed from a repository. |
04:52:52 | LordAndrew | I'm totally fine with open sourcing my stuff but I prefer the MIT/BSD licenses (and not having the GPL forced upon me over hidden goblins I didn't see coming). |
04:52:52 | xtagon | Varriount, from your repository or someone elses? |
04:53:07 | Varriount | I had written a modification tracker for a minecraft server written in python, and I had placed a very specific license in it that specified that I was to be given credit |
04:53:17 | Varriount | (minecraft classic) |
04:53:52 | Varriount | The head of the dev team for that particular piece of server software took my code and incorperated it into his server, and called it his own. |
04:54:05 | vbtt_ | can nimrod pragmas be used to tag the license onto modules and then programmers can compile with 'no-gpl' if they want? |
04:54:06 | Varriount | Since I was also on the dev team, I saw this. |
04:54:15 | Varriount | vbtt: Theoretically. |
04:54:31 | vbtt_ | that would be nice |
04:55:19 | Varriount | When the lead dev wouldn't confess to what he had done, I found atlassian's phone number, and called them up one day. The person who answered the phone must have been surprised to hear a 15 year asking that a repository owner be given a warning |
04:55:38 | Varriount | for violating a software license. |
04:56:17 | Varriount | Although he took me seriously, he explained that I had to have proof, and that without proof, they couldn't / wouldn't do much |
04:56:37 | xtagon | What constitute's proof? Git logs? |
04:57:09 | Varriount | And/or an email sent with an attachment to yourself. That way you have time logs stored by a third party |
04:57:16 | Varriount | *That, and/or |
04:57:31 | Varriount | And we were using svn at the time. |
04:57:58 | xtagon | I wonder if that would be a useful software-as-a-service. |
04:58:09 | Varriount | In the end, I actually got my code removed without resorting to such drastic action. |
04:58:38 | Varriount | By getting the rest of the team to gang up on the leader (He was younger than I, and a lot more pig-headed) |
05:00:51 | Varriount | It's kinda laughable when I think about it. The modification tracker I wrote wasn't very well written, not always tracking modifications in the correct order, causing the server to freeze when loading from the sqlite database... |
05:01:31 | Varriount | But I was quite proud of it at the time. It was one of my first pieces of somewhat complex code. |
05:01:37 | LordAndrew | Hmm. Dependency Walker only show that my executables link Kernel32.dll and MSVRCT.dll. |
05:02:21 | Varriount | LordAndrew: Well yeah. Those are both essential libraries. |
05:09:49 | Varriount | xtagon: Are you able to compile that tre regex lib you linked? |
05:10:08 | xtagon | Varriount, I didn't try |
05:10:17 | xtagon | Varriount, it's on my todo list (which is long...) |
05:10:45 | Varriount | Odd. the configure command isn't showing in my mingw shell |
05:11:54 | * | filwit quit (Quit: Leaving) |
05:12:12 | xtagon | Varriount, you have to use autoconf on configure.ac to produce a configure script (although I'm not familiar with how) |
05:12:40 | Varriount | There's a configure.ac file, I don't know how to process it though. |
05:12:45 | xtagon | Varriount, I just say https://github.com/laurikari/tre/blob/master/configure.ac#L1 |
05:12:48 | xtagon | saw* |
05:13:12 | Varriount | I'm not terribly experience on the intricacies of linux build systems. |
05:13:27 | xtagon | Varriount, try just running "autoconf" in that directory with no arguments |
05:13:57 | Varriount | Apparently I don't have autoconf |
05:14:04 | xtagon | Varriount, what distro? |
05:14:09 | Varriount | Windows. |
05:14:24 | xtagon | Oh right, you mentioned Mingw |
05:14:30 | Varriount | I have msys installed. I could have sworn that I installed autotools as well. |
05:15:55 | * | brson quit (Ping timeout: 272 seconds) |
05:21:24 | Varriount | xtagon: I've tried linux, I just can't kick the habit of using windows. I'm used to it. |
05:22:59 | xtagon | Varriount, nothing wrong with that. I use both regularly. |
05:23:44 | Varriount | Although, I do seem to find a constant between the two : No matter what OS I use, building things with autotools and the like will always be a pain for me. |
05:24:01 | xtagon | I hear you on that one |
05:24:29 | Varriount | Which is why I like nimrod. No more do I have to endure the masochistic build systems! |
05:25:32 | Varriount | xtagon: Have you ever managed to get GTK compiled as a 64 bit library/dll on windows? |
05:25:41 | xtagon | I use Windows for two reasons: 1. my job involves Windows-specific software, 2. there is better audio production software on Windows |
05:25:51 | xtagon | Varriount, no, that sounds like "fun" |
05:26:30 | Varriount | xtagon: Did you know, not only are the instructions on the GTK website nicely non-specific, GTK has circular dependancies. |
05:26:50 | xtagon | Varriount, my most recent "adventure" was getting LLVM compiled on 64-bit windows. It was fairly easy (in comparison to other things) and still drove me mad |
05:27:10 | Varriount | xtagon: I tried that. Never managed to be successful though. |
05:27:29 | Varriount | I can get 32 bit things compiled, 64 bit is another matter. |
05:27:39 | xtagon | Varriount, I was trying to get Crystal (another in-development lang) to compile on Windows. I didn't get far. |
05:28:00 | Varriount | Hopefully nimrod is far superior. |
05:28:05 | xtagon | It is |
05:30:17 | renesac | question: can I define a new implicit conversion? |
05:30:29 | Varriount | renesac: Yes. See: Converters |
05:30:49 | renesac | oh, cool |
05:31:09 | Varriount | They're a bit limited, in the fact that they operate on a global level. |
05:31:34 | Varriount | It would be nice to be able to apply them to only certain procedure scopes, but w/e |
05:32:09 | renesac | right, but they will only change the output where the compiler would give an type mismatch error anyway, right? |
05:32:17 | Varriount | Yeah |
05:32:29 | renesac | then it is ok for my usage now |
05:35:41 | LordAndrew | Huh, so it does look like the executables staticly link libgcc_s_dw2-1.dll internally. |
05:37:21 | * | brson joined #nimrod |
05:39:22 | Varriount | Rats. The tre regex library has only been built under windows using visual studio |
05:41:23 | xtagon | Bummer. |
05:41:50 | Varriount | It's not too bad. I have the SDK downloaded. I just need to remember how to invoke MSBuild correctly. |
05:43:07 | Varriount | Few people realize that you can download the compiler behind visual studio, without Visual Studio itself (and all the crud that comes with it) |
05:43:34 | LordAndrew | You can? |
05:43:39 | Varriount | Yep |
05:43:54 | Varriount | You just install the windows sdk downloads. |
05:46:13 | * | delian66 quit (Ping timeout: 248 seconds) |
05:48:13 | * | brson quit (Ping timeout: 272 seconds) |
05:54:44 | * | brson joined #nimrod |
05:56:02 | Varriount | xtagon: If you manage to build that library as a 64 bit, please tell me. MSBuild complains that I don't have the right Toolset, and after that, complains that I'm trying to build a 32 bit library on a 64 bit platform. |
05:56:10 | Varriount | I have to get to bed. |
05:56:58 | xtagon | Varriount, I'll let you know. I was only planning on building on Linux though |
06:02:27 | * | LordAndrew quit (Quit: Out.) |
06:05:13 | * | xtagon quit (Ping timeout: 252 seconds) |
06:38:09 | vbtt_ | having both variants and inheritance is a bit confusing imo. |
06:40:32 | vbtt_ | really variants can be modelled by abstract base types so not sure what the two ways of expression get us. |
06:40:39 | vbtt_ | this should be in the faq. |
07:05:17 | * | aruniiird joined #nimrod |
07:32:20 | * | bbodi joined #nimrod |
07:34:54 | vbtt_ | hm, how do i search github issues? |
07:36:23 | vbtt_ | so I can't use typeclasses to parameterize other types? e.g. seq[MyTypeClass] |
07:36:30 | vbtt_ | zahary^ |
07:47:56 | bbodi | I think it siuld work. what is the full code and the error? |
07:55:57 | vbtt_ | bbodi: Error: internal error: GetUniqueType |
08:00:44 | bbodi | https://github.com/Araq/Nimrod/search?q=GetUniqueType&ref=cmdform&type=Issues there are some issues about it |
08:06:18 | vbtt_ | bbodi: thanks. |
08:06:25 | vbtt_ | none of them are related to typeclasses though. |
08:13:25 | * | bbodi quit (Ping timeout: 248 seconds) |
08:14:41 | * | bbodi joined #nimrod |
08:31:15 | * | aruniiird quit (Ping timeout: 272 seconds) |
08:32:33 | * | odc joined #nimrod |
08:34:02 | * | odc left #nimrod (#nimrod) |
08:57:08 | * | brson quit (Quit: leaving) |
08:57:55 | * | betawaffle quit (Ping timeout: 245 seconds) |
09:05:10 | * | olahol_ left #nimrod (#nimrod) |
09:16:37 | * | darkf_ joined #nimrod |
09:19:33 | * | darkf quit (Disconnected by services) |
09:19:34 | * | darkf_ is now known as darkf |
09:22:54 | * | aruniiird joined #nimrod |
09:37:01 | * | CarpNet joined #nimrod |
09:54:56 | vbtt_ | a bunch of basic type class functionaly seems broken. e.g. 'is' doesn't really test anything. |
10:11:00 | * | nueva joined #nimrod |
10:18:02 | bbodi | I got compilation errors related to C sources. But yesterday everything worked fine, and didn't occur any modifications since it. I think the problem is that nimrod doesn't use the gcc that was packaged with it. |
10:26:10 | * | bbodi quit () |
10:32:18 | * | bbodi joined #nimrod |
10:42:19 | vbtt_ | hello |
10:43:06 | bbodi | hi |
10:43:21 | vbtt_ | http://vocalbit.com/posts/exploring-type-classes-in-nimrod.html |
10:46:29 | bbodi | it seems cool! |
10:56:18 | * | vbtt_ quit (Quit: Page closed) |
11:27:08 | NimBot | Araq/Nimrod devel cfa31d1 Araq [+16 ±12 -15]: next steps for closure iterators |
11:27:08 | NimBot | Araq/Nimrod devel 25f1426 Araq [+0 ±2 -0]: closure iterators almost work |
11:27:08 | NimBot | Araq/Nimrod devel 513f5ed Araq [+0 ±4 -0]: closure iterators work |
11:27:08 | NimBot | Araq/Nimrod devel fc8fa0d Araq [+0 ±3 -0]: small code cleanups |
11:27:08 | NimBot | 1 more commits. |
11:27:43 | Araq | Varriount: closure iterators are now complete afaict |
11:28:06 | Araq | and with that I'm entering bugfixing mode ;-) |
11:28:14 | bbodi | Hi Araq! |
11:28:21 | Araq | hi bbodi |
11:29:32 | Araq | bbl |
11:37:28 | bbodi | I can't compile my sources since yesterday |
11:37:51 | bbodi | I get error from the GCC |
11:37:53 | bbodi | like |
11:37:54 | bbodi | c:\projects2\whitestageditor\nimcache\nimrod_system.c:11597:25: error: dereferencing pointer to incomplete |
11:37:54 | bbodi | type |
11:37:54 | bbodi | for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) { |
12:01:15 | bbodi | I think I found some huge bug |
12:01:50 | Araq | bbodi: will look at it tonirght |
12:01:53 | Araq | *tonight |
12:02:34 | bbodi | ok, I try to reproduce it in a simple way, then I will create an isse for that |
12:05:31 | * | easy_muffin joined #nimrod |
12:09:16 | nueva | looks like type classes syntax could be used also as some kind of unit tests for type |
12:10:01 | nueva | i mean, it's already working in this role |
12:11:49 | bbodi | https://github.com/Araq/Nimrod/issues/836 |
12:29:51 | Araq | bbodi: that is not supposed to work, @[] has a gerneric seq type |
12:30:14 | Araq | it doesn't perform that form of type inference that you're after there |
12:30:31 | Araq | type the @[] and it should work |
12:30:39 | Araq | and yes, the compiler should complain about it |
12:34:43 | * | aruniiird quit (Ping timeout: 260 seconds) |
12:41:48 | bbodi | Yes, some compiling error messages could save a lot of time for the developers, thanks |
12:43:58 | * | Mordecai joined #nimrod |
12:45:25 | * | psquid quit (Ping timeout: 248 seconds) |
12:48:55 | EXetoC | sure. if the error comes from a C compiler then it's a bug |
13:13:29 | * | easy_muffin quit (Ping timeout: 252 seconds) |
13:18:58 | * | BitPuffin joined #nimrod |
13:19:14 | BitPuffin | ping Araq |
13:36:13 | EXetoC | lots of issues resolved |
13:36:48 | * | darkf quit (Quit: Leaving) |
13:36:49 | EXetoC | BitPuffin: including this https://github.com/Araq/Nimrod/issues/517 |
13:37:58 | EXetoC | did you work around it? |
13:48:57 | renesac | the math.mean function requires an openarray, so that means I can't call it with slices? |
13:49:50 | renesac | nevermind |
13:49:54 | BitPuffin | EXetoC: don't remember lol |
13:50:10 | BitPuffin | My mind is not very organized atm |
14:33:09 | Varriount | vbtt: Just saw you blog post. Nice! |
14:36:03 | bbodi | can I invoke a method of the super type? |
14:36:19 | * | Mordecai is now known as psquid |
14:38:10 | Araq | bbodi: no, you have to make the method a proc of some unique name to invoke it, there is a feature request for foo(Base(x)) to resolve 'foo' statically but I don't think that's a good idea |
14:38:50 | bbodi | Araq: ok, thanks |
14:39:12 | Araq | hi BitPuffin |
14:39:28 | BitPuffin | hey Araq. Sorry I got home a bit too late yesterday in order to deal with it |
14:39:32 | Araq | bbodi: if you have a good idea how to do this, I'm all ears |
14:39:48 | BitPuffin | I'll be home much earlier today though so I'll give it a shot then :) will you be in here later? |
14:40:11 | * | faassen joined #nimrod |
14:40:18 | * | dirkk0 joined #nimrod |
14:41:00 | Araq | BitPuffin: what shot? |
14:41:20 | BitPuffin | Araq: the error I came across yesterday |
14:41:26 | BitPuffin | you told me to fix something in ropes |
14:42:22 | Araq | meh, I can do it later too |
14:42:40 | Araq | I'm doing a feature freeze for 0.9.4 now anyway |
14:42:43 | * | dirkk_ joined #nimrod |
14:42:55 | Araq | so, I have some time to fix bugs |
14:45:33 | * | dirkk0 quit (Ping timeout: 245 seconds) |
14:49:00 | * | dirkk__ joined #nimrod |
14:50:20 | BitPuffin | Araq: ah neat! |
14:50:43 | Araq | BitPuffin: means no improvements to the concurrency model though :P |
14:50:47 | BitPuffin | Araq: guess updated concurrency and vm is the main things on the roadmap for 0.9.6 ? |
14:51:04 | Araq | vm is in 0.9.4 |
14:51:10 | BitPuffin | oh? |
14:51:13 | BitPuffin | completely done? |
14:51:15 | * | dirkk_ quit (Ping timeout: 245 seconds) |
14:51:18 | BitPuffin | well you know what I mean |
14:51:23 | Araq | well "completely" |
14:51:25 | Araq | yes |
14:51:32 | BitPuffin | software is never completely done |
14:51:47 | BitPuffin | well that's nice |
14:52:05 | BitPuffin | We desperately need 0.9.4 to release so no complaints here honestly :) |
14:53:06 | Araq | well fixing the most important bugs will take 2 weeks |
14:53:14 | Araq | that's my estimate |
14:53:57 | Araq | based on my feelings :P |
14:54:43 | BitPuffin | #emonimrod |
14:54:51 | BitPuffin | coding with feelings |
14:58:58 | Araq | bbl |
14:59:19 | nueva | #entomonimrod: dissecting bugs with feelings |
14:59:42 | * | AndChat|206976 joined #nimrod |
15:03:43 | AndChat|206976 | Varriount: thanks. Any feedback on the blog post? |
15:04:06 | BitPuffin | what blog post |
15:04:17 | * | AndChat|206976 is now known as vbtt_ |
15:05:54 | vbtt_ | http://vocalbit.com/posts/exploring-type-classes-in-nimrod.html |
15:06:01 | vbtt_ | Bbl |
15:07:21 | BitPuffin | vbtt_: cool! will definitely read it later! |
15:11:45 | * | dirkk0 joined #nimrod |
15:12:55 | * | dirkk__ quit (Ping timeout: 252 seconds) |
15:14:11 | renesac | https://gist.github.com/ReneSac/95c224ab5aab29529315 <-- how do I properly initialize a TRunningStat? |
15:14:36 | renesac | I must explicitly zero all fields |
15:14:39 | renesac | ? |
15:20:26 | BitPuffin | lol |
15:23:03 | BitPuffin | that doesn't look right |
15:23:34 | BitPuffin | renesac: is the result the same each time? |
15:24:22 | renesac | actually yes |
15:24:32 | renesac | but it is probably because unitialized memory |
15:24:46 | renesac | oh, it is not |
15:25:00 | renesac | (big numbers all look the same) |
15:25:09 | BitPuffin | renesac: yeah floats seem too have issues initializing to 0 |
15:25:14 | BitPuffin | at least completely 0 |
15:25:20 | BitPuffin | it's usually something very close to 0 |
15:25:21 | renesac | acc.n is an int |
15:25:47 | BitPuffin | yup |
15:26:03 | BitPuffin | oh right yeah wtf |
15:29:37 | vbtt_ | Can anyone give feedback on correctness of the blog post? |
15:29:40 | vbtt_ | http://vocalbit.com/posts/exploring-type-classes-in-nimrod.html |
15:30:01 | discoloda | type classes look usefull |
15:31:12 | discoloda | i cant tell you how accurate the post is, but i think its written well |
15:33:16 | vbtt_ | Thanks discoloda |
15:35:51 | * | [1]Endy joined #nimrod |
15:38:55 | * | dirkk_ joined #nimrod |
15:39:13 | EXetoC | BitPuffin: that bug wasn't reported? |
15:39:47 | * | dirkk0 quit (Read error: Connection reset by peer) |
15:42:53 | BitPuffin | EXetoC: which bug |
15:44:20 | * | Varriount|Mobile joined #nimrod |
15:45:20 | Varriount|Mobile | So, my email got assaulted this morning by quite a few GitHub notifications |
15:45:46 | BitPuffin | lol |
15:45:48 | BitPuffin | :D |
15:47:05 | EXetoC | BitPuffin: the float init bug |
16:07:37 | * | Varriount|Mobile quit (Remote host closed the connection) |
16:11:47 | * | bbodi_ joined #nimrod |
16:15:23 | * | [2]Endy joined #nimrod |
16:18:23 | * | [1]Endy quit (Ping timeout: 272 seconds) |
16:22:27 | BitPuffin | EXetoC: The way I worked around it was to just loop through my vector or matrix or wtf it was and initialize it to 0 |
16:22:30 | BitPuffin | wasted cpu cycles ftw |
16:22:33 | BitPuffin | but it's ze workaround |
16:26:15 | vbtt_ | System.reset |
16:26:35 | EXetoC | so no |
16:27:07 | EXetoC | vbtt_: yes? |
16:27:39 | renesac | should I open a bug on my issue with TRunningStat? |
16:29:44 | EXetoC | BitPuffin: noInit first then? |
16:29:44 | * | wan quit (Quit: leaving) |
16:32:11 | EXetoC | vbtt_: nvm |
16:32:36 | EXetoC | I accidentaly called system.reset instead of the proc I had define. it's very hard to figure out what's going on in that case |
16:36:56 | * | LordAndrew joined #nimrod |
16:37:15 | * | BitPuffin quit (Ping timeout: 252 seconds) |
16:39:57 | * | XAMPP quit (Ping timeout: 265 seconds) |
16:41:12 | * | ddl_smurf quit (Quit: ddl_smurf) |
16:42:40 | * | ddl_smurf joined #nimrod |
16:43:10 | * | ddl_smurf quit (Client Quit) |
17:08:43 | * | dirkk_ quit (Quit: This computer has gone to sleep) |
17:17:01 | * | BitPuffin joined #nimrod |
17:36:50 | * | io2 joined #nimrod |
17:48:45 | * | vbtt_ quit (Ping timeout: 252 seconds) |
17:48:46 | Araq | renesac: the compiler intializes everything to binary 0 for you ... |
17:49:39 | renesac | then "n" should have been initialized too... |
17:50:01 | Varriount | Araq, zahary, dom96 : I'm going through issues older than one month, and testing any examples I find to see if they still exist. I've commented on the ones that I think should be closed. |
17:52:39 | Araq | Varriount: excellent, but do you test with devel or master? |
17:52:51 | Varriount | devel |
17:52:57 | Araq | ok |
17:53:45 | Araq | not sure if thats correct but merge with master is not far away anyway *cough* |
17:58:53 | * | xtagon joined #nimrod |
17:59:20 | nueva | Araq: 'nimrod --path:/tmp/example c a' doesn't found given module, though '/tmp/example/a.nim' certainly exists. bug? |
18:01:23 | * | BitPuffin quit (Ping timeout: 245 seconds) |
18:01:26 | Araq | --path is for imports |
18:01:43 | Araq | not if you're too lazy to give your main file properly |
18:07:50 | * | CarpNet quit (Quit: Leaving) |
18:11:38 | * | brson joined #nimrod |
18:13:34 | renesac | Araq: using values passed as parameters is faster than using module-global values? When used in a tight loop, for example. |
18:15:16 | Araq | renesac: usually, yes |
18:15:41 | renesac | what I do if this value is a state that the caller should not care about? |
18:15:56 | renesac | make a block inside the module to declare it and the function? |
18:16:34 | Araq | then the function is in the block too and can't be exported |
18:16:45 | renesac | oh |
18:16:49 | Araq | use a .global variable instead, which is quite like C's static |
18:16:59 | renesac | humm |
18:17:07 | renesac | I forgot this pragma |
18:17:31 | renesac | thanks |
18:18:42 | renesac | why did you name it "global" and not "static"? (I know, "global like lifetime", but it is a bit confusing ^^') |
18:19:40 | * | vbtt_ joined #nimrod |
18:24:03 | NimBot | Araq/Nimrod devel 179bfad Araq [+0 ±2 -0]: typeClasses now documented in grammar.txt |
18:24:03 | NimBot | Araq/Nimrod devel 581d138 Araq [+0 ±1 -0]: renderer knows about nkStaticTy and nkTypeClassTy |
18:24:53 | Araq | vbtt_: many thanks for your blog post, will read it tonight |
18:25:24 | NimBot | Araq/Nimrod master b4645a0 Araq [+0 ±1 -0]: master compiler compiles with devel |
18:26:15 | vbtt_ | Araq: sure thing. |
18:26:45 | vbtt_ | I'll probably continue doing minor tweaks to the post. |
18:27:10 | vbtt_ | I've wanted something like nimrod's type classes and haven't seen it in another language. I wrote about it because I like the overall design. |
18:27:15 | Araq | renesac: "static" now means "at compile time" |
18:27:21 | * | io2 quit (Remote host closed the connection) |
18:27:22 | vbtt_ | I'll try to do more posts over time. |
18:27:27 | * | DAddYE joined #nimrod |
18:27:31 | Araq | hi DAddYE |
18:27:44 | DAddYE | Hi Araq!!!!!! How are you!? |
18:28:15 | renesac | Araq: right, I thought it was "const" for compile time stuff |
18:28:16 | Araq | dunno, I never sleep more than 5 hours |
18:28:33 | DAddYE | Araq: kids or work? |
18:28:36 | Araq | renesac: we have "const", "static" and ".compileTime", ... it's a bit of a mess |
18:28:46 | Araq | DAddYE: kids... |
18:29:07 | DAddYE | heheheh |
18:29:16 | vbtt_ | Araq: plural? I thought your only kid was nimrod? |
18:29:50 | Araq | vbtt_: no I have also a real life |
18:30:17 | vbtt_ | Araq: excellent! |
18:30:37 | Araq | I guess ... |
18:31:11 | * | aftershave quit (Quit: Textual IRC Client: www.textualapp.com) |
18:31:39 | vbtt_ | I'm always amazed by how much nimrod has, in terms of features *and* stdlib (very important) given that it's a hobby project. |
18:31:40 | Araq | renesac: in fact, I don't think .global has been designed. It grew into existance |
18:31:46 | * | aftershave joined #nimrod |
18:32:55 | Araq | renesac: 'sfGlobal' was a flag to mark global variables in the compiler, the step to .global was obvious then for a compiler writer |
18:33:08 | renesac | hum |
18:33:32 | Araq | later we discovered it's incredibly useful for metaprogramming |
18:33:51 | vbtt_ | hmm I think I used master ti test type class features. perhaps thats why they didn't all work complete. |
18:35:00 | * | vbtt_ quit (Quit: Page closed) |
18:35:07 | nueva | wtf? 'nimrod c random/a.nim' puts cached file as 'nimcache/random_a.cpp', but 'nimrod c src/a.nim' puts cached file as 'nimcache/parent_a.cpp', where 'parent' is a name of parent dir of 'src' |
18:35:19 | * | vbtt_ joined #nimrod |
18:35:28 | Araq | nueva: that's the feature I was talking about |
18:35:39 | Araq | the compiler guesses the package name |
18:35:52 | Araq | as we have no notion of a package in the language |
18:36:45 | Araq | IMHO it should be documented how the algorithm works and then it's perfectly fine, in your opinion it's a feature from hell, I guess |
18:37:38 | * | io2 joined #nimrod |
18:40:44 | reactormonk | Araq, could we change that name generation? Or somehow control it? |
18:41:23 | Araq | why? |
18:41:30 | nueva | but why to do it for main module? so if i have my example project in '/home/user/Projects/ExampleProject/src/main.nim', but then move it to 'home/user/Projects/CoolProject/src/main.nim'. it will regenrerate *_main.cpp? |
18:42:04 | nueva | "Main module" is what I pass to compiler to build whole project |
18:43:13 | Araq | nueva: the use case was that every babel package has such nice module names as "utils" or "types" and so we need a way to distinguish modules of the same name |
18:44:54 | Araq | so yeah, it recompiles when you rename your project dir. wooohoo big deal |
18:45:26 | Araq | happens like once in a year so I already spent more time talking about it |
18:48:43 | reactormonk | Araq, does the compiler do that for everything or just the included libs? |
18:49:14 | Araq | for every module you use |
18:49:18 | nueva | are there so many babel packages with different intenral hierarchy? |
18:49:47 | nueva | i've found list of ecxceptions. "lib", "src", "source", "package", "pckg", "library", "private" |
18:49:56 | Araq | yup |
18:50:39 | nueva | so, if package writer will use something different for his internal directory name it will be his fault? |
18:51:13 | Araq | I can't follow you, sorry |
18:51:37 | Araq | packageA/src/utils.nim is common and should become packageA_utils |
18:51:53 | Araq | not src_utils as that wouldn't avoid collisions |
18:52:26 | nueva | Araq: it will not only recompile, it will leave unexpected garbage. it also makes reasoning about generator a bit harder. |
18:53:04 | vbtt_ | really the top level package direcotry should be tagged. e.g. package.nimpkg/srcl/blah/whatever |
18:53:22 | nueva | packageA/myprivatedir/utils.nim and packageB/myprivatedir/utils.nim |
18:53:34 | vbtt_ | then it's unabiguous what the package name is. |
18:54:21 | nueva | who should then change his 'privatedir' packager A or packager B? |
18:54:59 | reactormonk | nueva, so you want the compiler to be aware of packages? |
18:55:04 | vbtt_ | and yeah, special directories should not be ignore (if you want you can create src/mypackage.nimpkg/x.nim) |
18:55:09 | nueva | ok, it's not my question really. my question was: should packagers just use 'src' by convention as a name of private package dir? |
18:55:09 | zahary | vbtt: there is a minor error in one of your examples |
18:55:22 | zahary | for item in f: |
18:55:22 | zahary | line is String |
18:55:22 | zahary | you meant to say "for line in f" |
18:55:29 | vbtt_ | zahary: thanks for reviewing! |
18:55:34 | vbtt_ | ah right - that's the one I didn't compile :) |
18:55:59 | vbtt_ | zahary: feedback on accuracy also appreciated. also, did I miss anything important? |
18:56:09 | zahary | you may also mention that you could even write param types such as seq[FileLike] and Nimrod will just do the right thing |
18:56:25 | * | vbtt quit (Quit: Page closed) |
18:57:18 | vbtt_ | zahary: yeah I tried that and didn't get it work. perhaps I should use devel and not master? I also found minor issues with 'is' testing in type classes. |
18:57:55 | zahary | hmm, I think this one should work already, but I might be wrong |
18:57:55 | nueva | reactormonk: I'd like to shorten this list of exceptions to just '__some_ugly_rare_name_rer34234d' and make a rule for packages to use this name only (not 'src' or something). because this list couldn't be infinite |
18:58:23 | Araq | nueva: well the convention is indeed a "private" directory |
18:59:21 | vbtt_ | zahary: the compiler reported Error: internal error: GetUniqueType. when I used it as a parameter to seq[MyTypeClass]. trivial example reproduces it. |
19:00:45 | zahary | alright, I'll work on that soon |
19:01:12 | reactormonk | nueva, I suggest make a forum post and/or a github issue for that and state your point in full |
19:01:16 | nueva | Araq: still there is a list of conventions used by compiler. I suppose it's for legacy packages? |
19:03:19 | Araq | nueva: actually it's to allow for more flexibility but legacy is a reason too of course |
19:03:30 | Araq | as I said, I think we should document this list and then it's fine |
19:03:38 | * | Mordecai joined #nimrod |
19:04:02 | Araq | but I'm open for suggestions |
19:04:14 | Araq | it's not too late to change it again |
19:04:33 | vbtt_ | zahary: also a simple 'is' test didn't work. i.e. `f(x) is Int` in the typeclass. and then define f(x:MyType): Bool. but `MyType is MyTypeClass` still returns true. |
19:04:43 | * | psquid quit (Ping timeout: 245 seconds) |
19:04:58 | Araq | I guess I'm too blame for the 'is' bugs |
19:05:12 | vbtt_ | Araq: what do you think of my suggestion? only .nim files and sub-folders in a top level package directory that has an .npk extension. |
19:05:21 | vbtt_ | every folder is part of the package. |
19:05:37 | vbtt_ | i.e. no specially ignored cases (src or whatver). |
19:05:48 | Araq | vbtt_: so essentially we go up the tree until we find a .babel file? |
19:06:11 | vbtt_ | that might work too. |
19:06:29 | vbtt_ | Araq: I was suggestion you call the folder mysqllib.npk |
19:06:37 | vbtt_ | or collections.npk |
19:06:45 | vbtt_ | within that the folders dont have extensions. |
19:07:00 | vbtt_ | yes you go up till you know you've found the top level folder for that package. |
19:07:06 | nueva | Araq: shorten list to just "private". and maybe to not so obvious name ("__private__"?) |
19:07:11 | Araq | folders shouldn't have extensions, that's uncommon |
19:07:19 | vbtt_ | easy to find from the outside too (unike python where I have to see if it contains __init__ |
19:07:30 | vbtt_ | Araq: ok then just a special file in the top level folder is fine. |
19:08:02 | vbtt_ | Araq: btw, it may be uncommon but i think it's a great idea :) and cross platform too. |
19:08:51 | vbtt_ | my basic proposal is get rid of ignored special cases. and have an easy way to locate a source file, given an import statement. |
19:08:53 | reactormonk | vbtt_, .app ? |
19:09:15 | vbtt_ | reactormonk: true! not that uncommon, haha. |
19:10:20 | vbtt_ | i think organizational only directories like 'src' should be outside your package source top level folder, not inside. |
19:12:37 | Araq | vbtt_: just to be clear packageA/src/packA/module.nim produces packA_module, no need to adhere to any convention, it simply works unless you dream up unrealistic example names like "foo" |
19:13:58 | Araq | and what do we do with the stdlib? that has no .babel file, though perhaps it could fake one |
19:14:16 | nueva | btw, babel path outside of project directory by default isn't nice. it's better to follow Node.js (npm), Python (virtualenv, pip), Haskell (cabal sandbox). but I guess, it was already discussed before making a desicion... |
19:14:21 | vbtt_ | Araq: yeah, .babel or whatever special file should be in *every* top level pkg. including stdlib. |
19:14:27 | reactormonk | Araq, just hardcode it to `stdlib` |
19:15:10 | vbtt_ | Araq: how does nimrod know where to search for nim files? |
19:15:24 | reactormonk | vbtt_, config/nimrod.cfg |
19:15:26 | Araq | vbtt_: via --path and --babelPath |
19:16:36 | Araq | nueva: again, what do you mean? "outside of project dir"? |
19:17:54 | vbtt_ | Araq: i'm proposing that given '--path A,B,C' is given, nimrod do only a one-level DFS for folders under A or B or C that contain the special .babel file. |
19:18:18 | vbtt_ | no complicated search for nim files and magic package names. |
19:19:03 | vbtt_ | s/is given// |
19:19:57 | Araq | nah, I leave everything as it is |
19:20:20 | Araq | it works quite well afaict |
19:20:32 | Araq | and it's telling I got not a single bug report about it |
19:20:41 | nueva | Araq: I mean, "config/nimrod.cfg(37, 2) Hint: added path: '/home/user/.babel/pkgs/'" by default, while it could be '/home/Projects/CoolProject/.babel/pkgs' |
19:20:45 | reactormonk | Araq, maybe no one is using it ^^ |
19:21:06 | Araq | reactormonk: why do we get so many other bug reports then? :P |
19:21:49 | * | Mordecai is now known as psquid |
19:21:51 | reactormonk | right, I still need to create something like repr in JS |
19:21:58 | vbtt_ | Araq: you'll get more colissions as the community grows. |
19:22:07 | * | EXetoC quit (Ping timeout: 260 seconds) |
19:22:47 | reactormonk | Araq, does the compiler recognize collisions? |
19:22:55 | vbtt_ | does nimrod have a locate command? `nimrod locate foopkg` |
19:23:04 | nueva | Araq: bug report about what? about directory exceptions used for generated file naming? about flat scheme of naming of generated files? |
19:23:10 | vbtt_ | in the current state of affairs, the locate command would be much appreciated. |
19:23:26 | reactormonk | vbtt_, I think idetools --def might help a bit |
19:25:14 | Varriount | Araq: For testing purposes, either we should close issues that are fixed on devel, or at least make a note that the issues are fixed on devel, and close them when devel next merges into master |
19:25:16 | vbtt_ | fwiw, this could be fixed down the line too. |
19:25:20 | Kooda | Is the devel branch expected to build right now? |
19:25:33 | Varriount | Kooda: Yes. |
19:25:36 | vbtt_ | ppl will just have to move their files around to match their exported hierarchy. |
19:25:44 | Varriount | Also, nice to see you again kooda |
19:26:01 | Kooda | I saw your comment on my PR, I want to test it :) |
19:26:16 | Kooda | Do I need to use koch to build devel too? |
19:27:22 | Varriount | Kooda: Of course. |
19:27:43 | Kooda | Hm, so I might have a problem. |
19:27:53 | Kooda | lib/pure/os.nim(1589, 22) Error: undeclared identifier: 'ParamStr' |
19:28:15 | Varriount | Kooda: Your not mergin devel into master on your local repo, are you? |
19:28:31 | Varriount | *merging |
19:28:34 | nueva | I guess, no one is using Nimrod with an external build system. but if Nimrod declares interoperability with C/C++/JS on source level, somebody will use it with external build system (like Grunt for JS or Cmake for C++) |
19:28:59 | Kooda | Varriount: hm… not if I didn’t mess up with my repo |
19:29:26 | Varriount | Kooda: It should build. I built nimrod using the devel repo this morning. |
19:29:38 | nueva | as all (except me) are using Nimrad as a build system, there are no bug reports about file names and stuff |
19:29:45 | nueva | *Nimrod, sorry |
19:29:56 | vbtt_ | btw, where does the build farm run? what tool does it use? and can I add a builder? |
19:30:14 | vbtt_ | iow, I didn't find an about page on build.nimrod... |
19:30:20 | Varriount | vbtt_: The build farm is run by different people, using nimbuild (search on github) |
19:30:31 | Varriount | I run the Win32 and Win64 builders |
19:30:43 | Kooda | Oh |
19:30:51 | Varriount | dom96 runs the 32 and 64 bit linux builders. |
19:30:51 | Kooda | Could I add NetBSD i386 and amd64? |
19:31:01 | Araq | vbtt_: nimbuild is currently broken and I'm having fun to get it back to work ... it's a nice multithreading issue |
19:31:34 | Varriount | Kooda: Yeah. You just have to get dom96 to accept the new OS config and have him set it in the hub |
19:32:02 | Kooda | I have a machine for it if needed |
19:32:04 | Varriount | Araq, vbtt_ : Well, nimbuild isn't entirely broken. It's just that it crashes when it tries to bootstrap nimrod the second time in a row. |
19:32:20 | Araq | nueva: ok, fair enough, but the .babel thing is an algorithm just like it currently implements an algorithm. so how exactly does it change anything? |
19:32:31 | Varriount | Which I bypass by running the builder in a shell loop. |
19:34:16 | vbtt_ | some algorithms have fewer surprises. |
19:34:34 | vbtt_ | the current violates the principle of least surprise, perhaps. |
19:35:08 | nueva | Araq: .babel wasn't my suggestion (though I'm not objecting it). I was suggessting shorten list of exceptions to one non-obvious, rare name and make it conventional. |
19:35:08 | vbtt_ | anyway, i'm going to stop arguing about it cos it still sort of works. |
19:35:49 | Araq | Kooda: which OS are you on? |
19:35:54 | Kooda | NetBSD |
19:36:26 | * | EXetoC joined #nimrod |
19:40:12 | EXetoC | nueva: lib/src is common in quite a few languages aren't they? which is why I adhere to those. lib would be for libs and src for apps |
19:40:20 | EXetoC | I guess we just need some conventions |
19:44:24 | NimBot | Araq/Nimrod devel c9cdbbe Araq [+0 ±3 -0]: should compile on netbsd |
19:44:29 | Araq | Kooda: try again |
19:44:42 | nueva | EXetoC: I was speaking about predictability of generated files' names. yeah, 'src' name for source directory is common, so I'm using it in project (not in package). and I'm using external build system. so I want to know what files will be generated by Nimrod. i was suprised. |
19:47:04 | Araq | nueva: I'm looking at my .babel directory now |
19:47:34 | Araq | the opencv.babel file is in opencv-0.1.0/ |
19:47:36 | Kooda | Araq: fixed the issue :) |
19:48:13 | nueva | so it's a clash between my expectations and allowing to use 'src'/'lib' in packages. right now, I'm the only who is using external build system, so I think I will not win :) |
19:48:37 | Araq | no on the contrary |
19:48:45 | Araq | you fought long enough with me |
19:48:46 | vbtt_ | nueva: for what you're doing, nimrod should just emit the list of generated files. you shouldn't have to reproduce it's algorithm. |
19:49:01 | Araq | vbtt_: that's what nimrod already supports |
19:49:11 | vbtt_ | nueva: why not use that? |
19:49:27 | vbtt_ | nueva: that isolates you from nimrod internals and possible changes. |
19:49:56 | vbtt_ | hmm, maybe the build system doesn't support it. |
19:50:05 | vbtt_ | so you have to recode the logic in the other build systems |
19:50:14 | Araq | nueva: we also have plans to split the larger generated .c file into mutliple files |
19:50:28 | Araq | then there is no 1-1 mapping between modules and .c files |
19:51:42 | nueva | vbtt_: yeah, bu Nimrod now can output this list only when it compiles files and only to fixed file path. I need to know about generated files' paths without compilation (i.e. without producing any files). |
19:52:07 | * | aftersha_ joined #nimrod |
19:52:41 | vbtt_ | that's a feature request then! bbl. |
19:52:42 | nueva | it was discussed earlier, PR is awaited from my side, but I want to avoid it :) |
19:52:54 | * | aftersha_ quit (Client Quit) |
19:53:10 | * | aftersha_ joined #nimrod |
19:53:39 | Varriount | Anyone know if the semantics for 'creating' a new closure iterator variable changed? |
19:54:38 | * | aftersha_ quit (Client Quit) |
19:54:51 | Araq | Varriount: I hope not |
19:54:59 | Araq | all the tests I have for them are green |
19:55:13 | Varriount | Araq: I'm running a test from an old issue |
19:55:34 | Varriount | Or rather, a code snippet provided in the issue. It concerns recursive iterators. |
19:55:49 | Varriount | Araq: https://github.com/Araq/Nimrod/issues/555 |
19:55:54 | Araq | recursive iterators are not supported |
19:56:33 | Varriount | Araq: Are they supposed to throw an error? |
19:57:18 | * | aftersha_ joined #nimrod |
19:57:31 | Araq | yes |
19:57:56 | Araq | it's a nice tricky test case |
19:58:05 | Araq | added it to the suite, no idea why it was missing |
19:58:39 | Varriount | Araq: Well in the code snippet in that issue, they don't. |
19:58:50 | Araq | I know |
19:59:00 | Araq | it's an indirect recursion, I didn't check against that |
19:59:55 | Varriount | Although, at least it doesn't crash the compiler. ;P |
20:00:00 | EXetoC | what about sets in strutils for control chars, lowercase etc? |
20:00:39 | Araq | EXetoC: constants are usually in Uppercase except when they are not |
20:01:45 | nueva | Araq: splitting of .c isn't really interferes with my current approach. naming of splitted files will still be deterministic. but of course I always will be relying on unstable/fragile compiler internals in this case. |
20:02:08 | EXetoC | Araq: no I mean character sets for those, because I have a hard time remembering ASCII ranges such as 0-0x1F for example |
20:02:40 | * | vbtt_ quit (Ping timeout: 272 seconds) |
20:03:14 | Araq | EXetoC: we'll only get bug reports that those are not unicode aware, so please don't add it |
20:03:37 | EXetoC | -.- |
20:03:55 | nueva | and it's better to use specialized public interface |
20:03:59 | renesac | https://gist.github.com/ReneSac/3b56d3b3836761093436 <-- how I can get this object working like a sequence? |
20:04:51 | Araq | in fact ... I don't think I'll write another stdlib module anytime soon for reasons like this |
20:05:29 | Araq | when you do nothing you can't do anything wrong |
20:06:12 | dom96 | When you do things right, people won't be sure you've done anything at all. |
20:06:30 | * | dom96 wonders who gets the reference |
20:06:34 | dom96 | Hi btw |
20:07:57 | EXetoC | I haven't heard of any alternatives. I'll keep referring to asciitable.com then |
20:08:44 | Araq | renesac: I think you need a single `[]` that returns a 'var TPt' for this to work |
20:09:41 | Araq | hi dom96, there were discussions about babel and how the compiler generates C filenames |
20:09:48 | dom96 | Holy wow at the amount of notifications on Github. |
20:09:55 | dom96 | I'm glad I disabled the emails. |
20:10:00 | Araq | I would like to know your opinion |
20:10:11 | Araq | what? the emails can be disabled? lol |
20:10:20 | Varriount | I like the emails. |
20:10:22 | dom96 | Yep. In the settings. |
20:10:38 | Varriount | dom96: I think I've commented on one or two issues posted by you. |
20:10:41 | dom96 | Although you still get some. Like ones which you created or were a part of I think. |
20:10:56 | dom96 | Yeah, that's probably why I got those emails heh. |
20:11:57 | dom96 | Araq: Yeah, I read everything. The idea to use the .babel file to determine the top-level directory isn't a bad one. |
20:12:10 | * | bbodi_ quit (Ping timeout: 272 seconds) |
20:12:22 | Araq | the top-level directory has that annoying version number though, dom96 |
20:12:37 | EXetoC | Araq: do you know what these people want then? only unicode-aware functions perhaps |
20:13:02 | Varriount | ^ |
20:13:06 | Araq | EXetoC: they want C# |
20:13:19 | Araq | they might pretend that they don't but they do |
20:13:32 | dom96 | Araq: Yeah... well it's hard to keep a balance between "Nice filenames" and "unambiguous filenames" |
20:13:53 | dom96 | It may be a good idea to lean towards "Unambiguous filenames" completely. |
20:13:57 | Varriount | EXetoC: Give up. Your never going to be able to convince Araq to change his mind about unicode. |
20:14:06 | Varriount | *unicode related stuff |
20:14:44 | dom96 | Araq: If you're desperate you could use the .babel filename. :P |
20:14:58 | EXetoC | Varriount: I disagreed? |
20:15:53 | Varriount | It sounded like you were trying to convince Araq of something unicode-related. |
20:15:54 | EXetoC | it sounded to me like he wouldn't mind, but other people would coplain |
20:17:08 | EXetoC | nevermind that |
20:18:38 | dom96 | Kooda: I appreciate you wanting to contribute a machine but I would prefer to get these nimbuild issues fixed first. I still think that the builders need some adjustments to be more friendly to machines which are not under my control. |
20:18:39 | EXetoC | I wonder what would be more acceptable. overloads for both char and TRune? |
20:19:17 | Araq | ah yeah, back to nimbuild debugging |
20:20:04 | Varriount | EXetoC: Yes. |
20:20:06 | Araq | Varriount: btw it took me 3 evenings to get the closure iterators to work, so don't worry. I had to change a lot |
20:20:29 | Varriount | Araq: I know. Believe me, your hard work is not going unappreciated. |
20:21:12 | Varriount | I've *seen* the lambda lifting code. |
20:21:38 | Araq | the lambda lifting code is actually quite clean |
20:21:57 | Araq | the algorithm itself drives one crazy though |
20:22:13 | Araq | and there are so many special cases to consider |
20:23:00 | Varriount | Like the one I mentioned above. |
20:23:14 | Araq | that returns 0 now |
20:23:28 | Varriount | Which is counted as "None" I assume? |
20:24:02 | Varriount | Anyway, I hope you don't mind me going through the issues. It's something useful that I enjoy doing. |
20:24:28 | Araq | are you crazy? I appreciate you going through the list of bugs! |
20:25:29 | Kooda | dom96: please tell me when you are ready :) |
20:25:49 | dom96 | Kooda: I certainly will, thanks :) |
20:26:13 | Varriount | dom96: Thank you for putting easily testable snippets in your issues. :D |
20:27:22 | EXetoC | Araq: so the biggest issue is the lack of isControlChar for TRune for example? would that *and* sets be fine then? Sets are neat |
20:27:36 | dom96 | Varriount: Thank you for appreciating them! You just put a smile on my face :) |
20:27:56 | Araq | EXetoC: just add the set with a comment it's not unicode aware |
20:28:00 | reactormonk | https://github.com/Araq/Nimrod/issues/347 gist timed out :-/ |
20:28:40 | Araq | reactormonk: I can close it as "won't fix" if that helps you |
20:29:01 | reactormonk | Araq, let's see if it's still buggy |
20:29:07 | renesac | Araq: indeed it was just the lack of 'var' on the return variable, thanks ^^" |
20:30:10 | renesac | it seems I don't even need to define `[]=` |
20:30:18 | EXetoC | Araq: well that was simple. maybe for Whitespace/NewLines as well then, because unicode has more of both I think |
20:30:23 | reactormonk | Araq, yup, it is. |
20:31:07 | Araq | reactormonk: can you pass a function(a,b,c) to a function(a,b) in JS? |
20:31:43 | * | mietek quit (Ping timeout: 272 seconds) |
20:31:45 | reactormonk | Araq, you can pass functions all the way you want |
20:31:56 | * | mietek joined #nimrod |
20:33:02 | Araq | hmm |
20:33:16 | Varriount | What does "object contstructor needs an object type" mean? |
20:33:22 | Varriount | *constructor |
20:33:29 | reactormonk | Varriount, code? |
20:33:44 | Araq | Foo(a: 1, b: 2) # Foo should be an object? |
20:34:28 | Varriount | Araq, reactormonk : https://gist.github.com/Varriount/8586245 |
20:34:36 | Varriount | The error is caused by the bottom file |
20:34:56 | dom96 | hello mietek |
20:35:05 | Varriount | (I can't get the top file to compile, it seems that the kind of tuple conversion expected on line 4 is no longer supported) |
20:35:07 | Araq | Varriount: yes, because it's a tuple, not an object |
20:35:13 | dom96 | oh, mietek is not new. Hello anyway. |
20:35:29 | Araq | and yes I know about the range in tuples problem |
20:35:52 | Araq | first example should compile, 2nd not |
20:35:57 | Varriount | Which would explain why natural() fails. |
20:36:56 | Araq | it's really quite simple; if A <: B then C[A] <: C[B] doesn't hold in general |
20:37:07 | Araq | so the compiler refuses the code |
20:39:11 | reactormonk | Araq, in case of a tuple it doesn't? That's a good old product type. |
20:40:11 | Araq | if A and B are objects they could have different sizes and then the tuple can't possible adhere to a subtype relation |
20:40:28 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
20:40:57 | reactormonk | ah sap |
20:41:21 | reactormonk | can't you check for sizes? |
20:42:24 | Araq | that's planned, yeah but it means we have 2 different subtype relations |
20:42:39 | Araq | to support and so it's a bit of work |
20:42:56 | reactormonk | and not overly urgent? |
20:43:42 | Araq | yeah |
20:45:39 | nueva | I built compiler from devel branch 6 days ago. I've just pulled new commits and 'koch boot' now fails with "lib/system/excpt.nim(83, 17) Error: undeclared identifier: 'CString'". will cleaning help? |
20:46:47 | * | vbtt joined #nimrod |
20:47:20 | Varriount | nueva: It should |
20:47:49 | Varriount | nueva: Also make sure that all nimcache directories are deleted. |
20:47:53 | Araq | nueva: something is still not case consistent ,but I wonder why "nativeStackTraces" are enabled for you |
20:48:15 | vbtt | btw if I declare `var x = MyObject(..)` it's goes on the stack, correct? |
20:49:03 | Araq | yes |
20:49:04 | * | [2]Endy quit (Ping timeout: 252 seconds) |
20:49:10 | * | Varriount will never understand why people are worrying about stack/heap allocation in a gc'ed language |
20:49:15 | dom96 | vbtt: I'm reading your article and found some spelling mistakes: "defintion", "arbirary". Other than that so far very nice article :) |
20:49:25 | Varriount | *stack-vs-heap |
20:50:24 | nueva | Araq: because I explicitly enabled it. |
20:50:26 | dom96 | vbtt: Another one: "evalutate" |
20:50:26 | Araq | Varriount: because stack allocation is 0 instructions and heap allocation is 100? |
20:50:41 | vbtt | dom96:thanks for the feedback! I'll spellcheck it. |
20:51:00 | vbtt | hah wow I was tired at night. |
20:51:22 | dom96 | vbtt: Thank you for writing the article! |
20:52:00 | vbtt | Varriount:I need to know the semantics. it's not just about the gc. it's copying, lifetime, etc. |
20:52:01 | dom96 | Araq: "var written: Int = write(f, String)". See? People already want it to be 'Int' not 'int' :P |
20:52:25 | vbtt | heh - not sure what it's originally, or string. |
20:53:23 | dom96 | Araq wants the convention to be that for types (and some consts) the first letter is uppercase, except for built-in types like int, string etc. |
20:53:32 | nueva | 'koch clean' didn't help (btw, it deleted .gitignore). there are no nimcache directory left, but it still fails with the same error. so I should just disable nativeStackTrace? |
20:53:45 | Varriount | nueva: Yes. |
20:53:45 | vbtt | I like type names capitalized. And I'm used to snake_case but I tried using camelCase in the examples. if there's a style guide i'll follow it. |
20:53:52 | dom96 | I'd rather just make it clear that *every* type starts with a capital letter. |
20:54:00 | dom96 | everything else does not. |
20:54:02 | dom96 | Like in Haskell. |
20:54:04 | Araq | nueva: sorry I didn't catch this but "koch clean" never helps with anything |
20:54:10 | Araq | I never run it fwiw |
20:54:31 | vbtt | dom96: Python does what Araq wants. I lean towards every type being capitalized. but either is fine really. |
20:54:35 | Araq | you simply need to do /CString/cstring/ and then it should compile |
20:55:15 | Araq | dom96: uppercase Int is too annoying, I tried it |
20:55:52 | vbtt | will `type lowercasename` be a syntax error? |
20:56:09 | dom96 | Araq: Ok. I can live with it. |
20:56:17 | vbtt | Hm, I'll change the example to lowercase Int and String, then. |
20:56:19 | Araq | vbtt: I wanted to do that but people dislike the idea |
20:56:41 | Araq | apparently consistency works best when it's not enforced .... |
20:56:44 | vbtt | Araq: I like the idea. |
20:57:07 | vbtt | Araq: that's a constraint that can always be relaxed later with no breakage. Unlike the other way.. |
20:57:24 | Araq | vbtt: doesn't help |
20:57:34 | Araq | for instance we're still quite strict when it comes to comments |
20:57:54 | Araq | I can only guess how many people never considered nimrod because of that feature |
20:57:54 | vbtt | hmm ok. |
20:58:38 | Varriount | vbtt: Or simply write in the style you prefer, and run `nimrod pretty` over everything. |
20:58:43 | Varriount | :3 |
20:58:50 | nueva | ## \ and then doc comments on new line is weird, IMHO |
20:58:50 | vbtt | actually i originally passed on nimrod because of case/underscore insensitivity, $ and command style calls. |
20:59:10 | vbtt | possibly others, but now I realize I cant get everything I want (without doing any work ;) |
20:59:12 | Varriount | nueva: That isn't actually done anymore. |
20:59:22 | Araq | vbtt: there you go then |
20:59:27 | EXetoC | such minor reasons |
20:59:40 | vbtt | Varriount:ah ok. i didn't know 'pretty' works. |
20:59:51 | dom96 | vbtt: Perhaps in the "Using Type Classes [sic]" section you could add another example where you actually define a type which satisfies the type classes you defined and shows that they can be passed to those functions you defined (``doubleBend`` and ``copyFileData``)? |
20:59:56 | Varriount | nueva: If you look in the libs, documentation tends to be done python style, with doc-comments underneath things |
21:00:21 | dom96 | er, nvm my [sic] misread heh |
21:00:28 | vbtt | dom96:good idea. i was going to write more in there and also show a complie time error on mismatch. |
21:00:39 | dom96 | vbtt: Yeah, great :) |
21:01:11 | vbtt | EXetoC:not really minor. readability counts. specially when you have to read other developer's code. |
21:01:38 | Varriount | Araq, dom96: Well, I've gone through about 75% of all the issues (I ignored the one's that weren't clear, lacked a test, or were feature requests) |
21:01:50 | vbtt | i was more happy with clay, but that language died. |
21:01:59 | Varriount | I've commented on the one's whose results have changed. |
21:02:06 | dom96 | Varriount: Now fix 20% and i'll give you a hug. |
21:03:05 | vbtt | there's also other weird looking stuff like dangling '=' in proc. yes these things matter and ppl will pass on languages because of this. however, you can still have a compelling language if your ecosystem is solid. i.e. good, complete stdlib, nice community etc. |
21:03:36 | vbtt | i can't use most new languages because they dont even try to implement a stdlib or common libraries. i want to build real products. |
21:04:00 | vbtt | nimrod has a very good ecosystem but not compelling enough yet. |
21:04:17 | reactormonk | vbtt, what lib are you missing? |
21:04:29 | dom96 | I think the reason that they don't is because the language changes too much. We try to keep backwards compatibility even though we're pre-1.0. |
21:05:10 | EXetoC | vbtt: right, subjectivism and all that :> |
21:05:41 | dom96 | vbtt: Any ideas what happened to Clay? Did the author just give up/lose interest? |
21:06:11 | EXetoC | dom96: yeah, people should know what <1.0 implies |
21:06:21 | vbtt | reactormonk:just compare with pytho stdlib. not that python apis are great, but there's really a lot more than nimrod. |
21:07:11 | Araq | no there isn't |
21:07:14 | vbtt | dom96: the original author left it for another project. then 'joe' worked on it for a while and then got busy. |
21:07:53 | Araq | python's internet modules are extensive and battle-tested but that's about it |
21:08:08 | reactormonk | vbtt, make a list and post it in the wiki. And those will not go to stdlib, more likely as a babel package |
21:08:22 | Araq | of course if you count stuff like Python's "enum" module as lacking for nimrod, you'll get a different picture |
21:08:31 | nueva | Varriount: http://pastebin.com/WtDX16kE is there any other way understandabe by 'nimrod doc'? |
21:09:27 | Araq | also python has really good 3rd party stuff like numpy |
21:10:02 | Araq | but the stdlib is not that bigger |
21:10:54 | vbtt | forget enum. it's little things like datetime and random.sample |
21:11:03 | reactormonk | I mean you could port numpy to nimrod. Just rip out the python API and make a nimrod API |
21:11:28 | reactormonk | vbtt, time is nasty. |
21:11:42 | Varriount | nueva: http://pastebin.com/9U0SLngN |
21:11:53 | Araq | vbtt: hmm ok, I miss these details as I only go over the list of modules |
21:12:39 | reactormonk | Araq, what about time? Its own babel package and kick it out of the stdlib mostly? |
21:12:55 | Varriount | vbtt: I've heard that arrow is much better than datetime |
21:13:09 | Araq | reactormonk: doesn't work, but we can trim it down |
21:13:29 | Araq | and have a "timex" module in babel |
21:13:32 | vbtt | Varriount: I dont like python's datetime api, (dont know about arrow) but it's still convenient vs. nimrod where i'd have to implement it. |
21:13:33 | nueva | Varriount: I've tried it before asking, but it didn't work. because of outdated compiler (mine was built 6 days ago)? |
21:13:52 | Varriount | nueva: Huh. Odd |
21:14:19 | dom96 | no, times should be in the stdlib |
21:15:19 | Varriount | nueva: Add two spaces before the doc-comment |
21:15:43 | vbtt | Araq:from a high level the list of stdlib in nimrod is impressive. however the impression i have is 1) somewhat lacking apis (however better functions can be added as they are used) and 2) not coherent or consistent (e.g. does the http lib use the parser lib? does it emit the standard datetime for dates, etc. |
21:16:01 | vbtt | Araq:still for pre 1.0, there's no other language that's close. |
21:16:25 | * | zahary quit (Quit: Leaving.) |
21:16:33 | Araq | it is quite consistent and coherent afaict |
21:16:48 | Varriount | ^ If a bit biased toward the compiler's needs. |
21:16:51 | reactormonk | vbtt, write up any inconsistencies you find. |
21:17:10 | vbtt | ok, i'll spend more time with it. perhaps i'm missing the details. |
21:17:16 | dom96 | I agree that the stdlib still needs some things and that there is a lot packages which could be on babel which we do not have but python and ruby do |
21:17:38 | dom96 | This sadly means that deciding to take up some project could mean that you have to recreate some library that you need. |
21:17:55 | dom96 | For example, for nimbuild I had to create a CIDR module (or whatever it's called) |
21:18:26 | Araq | Varriount: the compiler tries to avoid the stdlib |
21:18:46 | Araq | mostly for historical reasons though |
21:19:04 | Varriount | Araq: Ok then, biased towards other parts of nimrod's codebase. |
21:19:05 | Araq | there was no stdlib when I wrote the compiler ... |
21:19:16 | dom96 | Anyone on Ubuntu or any other linux for that matter here have a minute to test something? |
21:20:48 | nueva | Varriount: pretty unintuitive. but it works now, thanks. |
21:22:18 | nueva | dom96: I'm on Debian. what exactly do you need to test? |
21:23:01 | Varriount | Hm. Which is preferable: Implementing reversed string operations from strutils as separate procs, or as a flag that can be passed to each proc? |
21:23:15 | vbtt | eg. theres asyncio *and* libuv. |
21:23:29 | Varriount | vbtt: Asyncio is a pure lib, libuv is a wrapper. |
21:23:38 | Araq | vbtt: if anything the stdlib is too consistent for its own good. people stumble upon TTable being value based types |
21:23:59 | vbtt | Varriount:my point is that perhaps one of those does not belong in the stdlib. |
21:24:00 | Varriount | Also, iirc, wrappers are being moved out of the stdlib (with some exceptions) |
21:24:16 | Araq | vbtt: libuv will become a babel package |
21:24:19 | vbtt | either pick libuv and then use it as the one and only event loop. |
21:24:24 | vbtt | Araq: ah ok. |
21:24:37 | vbtt | Araq:too consistent is a good thing imo. |
21:24:45 | Araq | quite a lot things already moved to babel |
21:25:00 | Araq | so now the tester needs to learn about babel ... |
21:25:18 | Varriount | Why? |
21:25:34 | Araq | so that we can test that babel packages still compile? |
21:26:05 | Varriount | Ah. So that was why you needed a new dir name? |
21:26:35 | Araq | no, I just like "testament" as a pun |
21:26:39 | vbtt | the parsers are all called 'parseXXX' *except* json which is just json. |
21:27:51 | Araq | json it not only a parser ... |
21:29:54 | Varriount | By the way, how much of the xml and json specs do the xml and json parsers implement? Is it enough that users should be concerned about xml and json exploits? |
21:30:41 | Araq | not sure what exploits you mean, but no |
21:30:56 | Araq | the xml parser ignores xml as much as it parses it |
21:31:31 | vbtt | heh |
21:31:41 | Araq | it's a braindead standard and when it dies I'll rejoice |
21:32:40 | vbtt | braindead perhaps but very commonplace. |
21:33:00 | vbtt | you want at least one strict xml parser. |
21:33:11 | Araq | we have some wrapper for that |
21:33:13 | vbtt | (for other people, not for me) |
21:33:32 | Araq | usually we have wrappers for the "proper" way and a cool module for my way |
21:33:46 | Araq | my way always wins in practice |
21:33:51 | dom96 | nueva: https://github.com/dom96/ParticleBench |
21:34:26 | Araq | turns out nobody gives a shit about xml's namespacing feature etc. nobody uses it, nobody knows it exists |
21:34:48 | Araq | you should read these standards one day, it's crazy |
21:35:27 | dom96 | oh yeah, the xmldom module seems like a waste of my time nowadays heh |
21:36:22 | Araq | btw nobody actually produces valid xml either, so a "strict" module doesn't help |
21:36:55 | vbtt | Araq:not true, there's a lot of valid xml out there. specially in-house. |
21:37:11 | Araq | there is more invalid xml though |
21:37:17 | vbtt | on the web json is fast replacing xml. |
21:37:27 | Araq | and it helps when you can parse that too |
21:37:28 | dom96 | nueva: Run 'babel build' if you can with Nimrod @ master. |
21:37:29 | vbtt | take atom feeds e.g. or google apis |
21:38:02 | vbtt | Araq:sure but a switch (strict/lenient) would be nice. |
21:39:08 | Araq | *shrug* |
21:39:36 | vbtt | the peg module looks pretty slick. |
21:41:17 | nueva | dom96: strictly @ master? would @ devel be ok? |
21:41:53 | dom96 | nueva: Would prefer @ master. But sure go ahead. |
21:42:09 | Araq | oh btw |
21:42:30 | * | dirkk0 joined #nimrod |
21:42:38 | Araq | I am *very* open for suggestions of how we should do the TParser -> Parser transition |
21:42:39 | * | dirkk0 quit (Client Quit) |
21:43:50 | vbtt | are you talking about renaming all types to remove the 'T' prefix? |
21:44:04 | Araq | yes |
21:45:08 | Araq | technically it's easy, "nimrod pretty --noTP myproject.nim" will do the job |
21:45:25 | nueva | babel failed to find libssl.so. library is installed. does nimrod program use predefined paths for searching libraries to use for FFI? |
21:45:53 | dom96 | nueva: Maybe the .so has a different name |
21:46:18 | nueva | /usr/lib/i386-linux-gnu/libssl.so |
21:46:35 | nueva | ah. ok, it's my fault |
21:46:51 | nueva | sorry |
21:47:03 | vbtt | I have an elaborate idea. |
21:47:51 | dom96 | well that suggests that something is wrong with 'devel' |
21:48:00 | nueva | I compiled Nimrod as an amd64 program but didn't install libssl:amd64 |
21:48:13 | nueva | *compiled babel |
21:48:16 | vbtt | nimrod rename module1.TMyType MyType -o fixups.log |
21:48:31 | dom96 | because xtagon cannot build ParticleBench on devel |
21:48:34 | vbtt | nimrod fixup module2,module3,module4 -i fixups.log |
21:48:50 | dom96 | Guess I should test devel then |
21:48:51 | vbtt | -o is output, -i is input file |
21:49:17 | Araq | vbtt: no need, "nimrod pretty" can do that |
21:49:18 | xtagon | dom96, actually what I meant was I cannot build nimrod on devel |
21:49:23 | nueva | dom96: wait, I didn't proceed to testing ParticleBench yet |
21:49:28 | xtagon | dom96, on master I mean |
21:49:34 | xtagon | dom96, sorry, misread what you said. |
21:49:49 | Araq | master can build devel, devel can build master |
21:49:59 | Araq | but only since today |
21:50:13 | dom96 | nueva: Yeah, sorry. xtagon tested it for me too. |
21:50:17 | dom96 | I was referring to that. |
21:50:57 | vbtt | oh, pretty can save explicit renames specified by the user? |
21:51:16 | vbtt | and then apply those renames to other dependent modules later? |
21:51:58 | nueva | 'babel install' failed with "command line(1, 1) Error: invalid command line option: '--noBabelPath'" |
21:51:59 | Araq | nah it works differently, you pass --pretty.overwrite and then pretty modifies the files directly |
21:52:27 | nueva | I mean, I'm installing the babel itself |
21:52:37 | Araq | welcome in the year 2014 where git tells you about the changes it made |
21:52:51 | EXetoC | the one and only babel |
21:53:11 | Araq | no need for a rename/fixup sing and dance |
21:53:28 | vbtt | Araq: what i'm suggesting allows piecemeal renames and also arbitrary renames ('Foo' -> 'Bar') |
21:53:34 | vbtt | but yeah, i said 'elaborate' :) |
21:53:54 | vbtt | it will be useful for software refactoring in general. not just for stdlib and not just for a one time conversion. |
21:54:09 | Araq | it will allow for arbitrary rename yes |
21:54:24 | Araq | but can we focus on the social aspect instead? |
21:54:38 | vbtt | what social aspect? |
21:54:46 | dom96 | nueva: Sounds like you're running 0.9.2 |
21:54:47 | Araq | do we release 0.9.4 and then say, for 0.9.6 run "nimrod pretty" over your entire code base? |
21:55:12 | dom96 | Well in any case it's pretty much confirmed now that devel is faulty. |
21:55:22 | dom96 | Araq: Your VM crashes on ParticleBench |
21:55:25 | vbtt | Araq: that's why i proposed fixup.log file. you just distribute this file with each release and when people upgrade they run 'nimrod fixup mymodules -i fixup.log' |
21:56:04 | Araq | vbtt: that's disgusting |
21:56:36 | nueva | dom96: Nimrod Compiler Version 0.9.3 (2014-01-17) [Linux: amd64] |
21:56:44 | Araq | a deprecation path is much more polite |
21:57:00 | dom96 | nueva: babel uses the nimrod that's in your PATH. Is 0.9.2 in your PATH? |
21:57:17 | dom96 | oh wait |
21:57:22 | nueva | dom96: output is from 'nimrod -v' |
21:57:35 | dom96 | I guess Araq never merged master into devel? |
21:57:43 | Araq | I did |
21:58:18 | dom96 | nueva: Git pull then |
21:58:37 | vbtt | why? it'll work when you make other changes to the stdlib as well. it doesn't preclude a deprecation path. it's just that you use a generic tool rather than manual or specific one. |
21:58:54 | vbtt | but i understand it needs extra effort cos the tool doesn't exist. |
21:59:09 | Araq | the tool does exist |
21:59:21 | Araq | I made 100K LOC case consistent with it |
21:59:40 | nueva | dom96: ok, but I'm right now fixing case sensitivity problems on current devel head to boot with rare options |
21:59:56 | vbtt | pretty is different tool from what I'm describing. lets say you decide to go through the stdlib and rename a few functions for consistency. now what? how do you get everybody to fix that up? pretty? |
22:00:07 | dom96 | nueva: No worries. xtagon already tested it for me so it's fine. |
22:00:37 | Araq | vbtt: ah I see |
22:01:05 | xtagon | vbtt, I like your fixup idea |
22:01:12 | Araq | but yes, pretty will learn how to do it |
22:01:51 | * | brson quit (Ping timeout: 252 seconds) |
22:01:53 | vbtt | Araq:pretty will learn specail renames? such as 'pipe' -> 'socket' ? |
22:02:05 | vbtt | or 'parsecsv' -> 'csv' ? |
22:02:07 | Araq | that's easy to do |
22:02:32 | Araq | the problem is that it needs to be done in a batch |
22:02:52 | Araq | you can't rename it in the stdlib and then later in your project |
22:03:19 | vbtt | of course you can. i only need to rename it in my project when i upgrade to the new version of the stdlib. |
22:03:40 | * | brson joined #nimrod |
22:03:46 | Araq | because it's not clear if foo in your project refers to stdlib.foo |
22:04:16 | vbtt | what? it can be statically resolved. i'm not talking about textual replace. |
22:04:17 | nueva | should I rename globalError to GlobalError or vice versa? |
22:04:37 | Araq | but you can compile against the old stdlib and then it's obvious |
22:04:40 | vbtt | i'm talking about parsing the files, resolving symbols and semantic rename. |
22:04:49 | Araq | I know |
22:05:38 | Araq | you can't do a semantic rename when your code doesn't compile anymore |
22:05:49 | Araq | that's the problem |
22:06:08 | Araq | so you need to compile against the old stdlib so all names can be resolved |
22:06:12 | Araq | and then you can rename |
22:06:49 | vbtt | can you instead lookup the 'fixups.log' file to find the old symbols? |
22:07:03 | Araq | nueva: globalError but where do you see GlobalError? |
22:07:14 | nueva | Go has a similar tool http://golang.org/cmd/fix/ |
22:08:11 | Araq | oh really? how come you think I don't know? |
22:08:23 | nueva | Araq: http://pastebin.com/VshmpEcV |
22:08:33 | vbtt | Araq:another idea. a deprecated statement. you rename TType to Type and then write depreated TType = Type. so the compiler can resolve it to the new symbol and emit a warning. |
22:09:08 | Araq | nueva: almost all of that is dead code |
22:09:32 | Araq | vbtt: we have a deprecated pragma and it also works for types |
22:09:56 | nueva | Araq: I don't promote Go or my extensive knowledge. just making a sidenote. |
22:10:33 | vbtt | actually deprecated is the wrong word. i'm suggesting obsolete but auto linked to the new version. |
22:10:46 | vbtt | obsolete TType = Type |
22:11:01 | Araq | what's the difference between obsolete and deprecated? |
22:11:05 | vbtt | now when you compile a dependent module, it looks up TType, find it, emits a warning, but links to Type instead. |
22:11:22 | vbtt | Araq:minor difference, deprecated still work. |
22:11:27 | Araq | I mean in english |
22:11:32 | nueva | Araq: not so dead. it prevents 'koch boot -d:release -d:tinyc -d:useGnuReadline -d:useFFI -d:nativeStacktrace' |
22:11:57 | vbtt | deprecated = going away soon. obsolete = gone already. |
22:12:11 | Araq | ah |
22:12:25 | vbtt | i think. english is not my absolute 1st language. more like 1.5th. |
22:13:18 | EXetoC | yes |
22:13:21 | vbtt | in english, actually, deprecated means discouraged. |
22:13:25 | Araq | nueva: are you on devel? |
22:13:37 | vbtt | but in programming it means what i said. |
22:13:46 | EXetoC | well that too, and some things stay deprecated forever |
22:15:10 | nueva | Araq: yes |
22:16:39 | Araq | nueva: you can also simply get rid of --cs:partial in nimrod.nimrod.cfg |
22:20:00 | nueva | internalAssert or InternalAssert? I think I got pattern and it should be internalAssert (because it's a proc) |
22:20:48 | nueva | or it's not a proc? |
22:21:37 | Araq | it's internalAssert |
22:21:52 | nueva | it's template. so it's still internalAssert |
22:21:57 | Araq | just run nimrod pretty over it with all your -d stuff |
22:22:19 | Araq | and use --pretty.overwrite |
22:25:16 | Araq | btw does -d:tinyc still work? |
22:25:28 | Araq | worked for me years ago |
22:26:09 | Araq | and then the gnu headers kept getting stranger |
22:27:07 | nueva | I don't use it, just compilng with it enabled :) |
22:27:37 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
22:27:45 | Araq | btw the idea to *share* builtin header files between compilers is ... bizzare |
22:29:10 | nueva | oh, well... error: no such file or directory: 'compiler/nimcache/libtcc.o'. is it tinyc related? |
22:32:48 | nueva | yeah, it's tinyc-related |
22:52:07 | * | BitPuffin joined #nimrod |
23:04:16 | Araq | good night |
23:12:25 | * | darkf joined #nimrod |
23:17:12 | nueva | dom96: ParicleBench building on devel: "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" |
23:17:24 | dom96 | nueva: Yeah, same results here. |
23:17:30 | dom96 | Appreciate you testing though |
23:19:42 | nueva | dom96: full log http://pastebin.com/YYHykB17 (ust for the record) |
23:22:13 | * | vbtt joined #nimrod |
23:30:57 | * | ddl_smurf joined #nimrod |
23:30:59 | dom96 | Good night |
23:35:01 | * | io2 quit (Ping timeout: 272 seconds) |
23:43:22 | Varriount | Meep |
23:44:26 | vbtt | beep |
23:44:41 | renesac | Error: execution of an external program failed; rerun with --parallelBuild:1 to see the error message |
23:44:42 | renesac | FAILURE: Execution failed with exit code 256 |
23:44:56 | renesac | <-- this is running with --parallelBuild:1 |
23:46:01 | vbtt | try parallelBuild:0 |
23:46:17 | renesac | same failure |
23:48:37 | renesac | I'm trying to compile ParticleBench with the latest nimrod master |
23:51:57 | renesac | ok, changed a var to a const and now it compiles |
23:51:58 | renesac | \o/ |
23:52:26 | renesac | (well, uncomented a line too |