00:01:48 | fowl | Araq, perhaps it should depend on how you instantiate it |
00:02:20 | vbtt | oh i think i get it. iterator() is just a resumable function. |
00:02:33 | Araq | vbtt: exactly |
00:02:37 | vbtt | and you can pass in a different value each time. |
00:02:43 | Araq | yes lol |
00:02:45 | vbtt | and the iterator can make decisions based on that. |
00:02:51 | Araq | yes |
00:02:55 | vbtt | ok cool. |
00:02:58 | vbtt | so it's by design. |
00:03:04 | vbtt | and it's useful. |
00:03:05 | Araq | yes |
00:03:15 | Varriount | vbtt: Just so you know, in that snippet, 'iterator' is a keyword, not an identifier |
00:03:21 | vbtt | it's just the name iterator threw me off. |
00:03:46 | Araq | well indeed that's now a bad name |
00:03:58 | Araq | happens when languages evolve |
00:04:07 | vbtt | and yeah i understand how you can save the arg values with a closure if you want. |
00:04:24 | vbtt | it's ok. as long as the inline and closure iterators have similiar semantics. |
00:04:34 | Araq | indeed they have |
00:04:45 | fowl | Araq, i dont see why both ways wouldnt work though, the python usage is going to be common |
00:05:02 | vbtt | it's only because i expected python semantics that i was confused. every language has different semantics for iterators. |
00:05:28 | vbtt | fowl: yes, and it's easy to impelemnt the python usage if thats what you want. |
00:05:57 | Araq | fowl: that looks like it would require yet another special case for overloading resolution |
00:06:13 | vbtt | ok g2g |
00:06:15 | vbtt | ttyl. |
00:06:29 | vbtt | nimrod looks better and better each time. |
00:06:40 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
00:06:46 | LordAndrew | To use an entire standard library, do I just do "import strutils"? |
00:07:06 | Varriount | LordAndrew: You mean, a module? Yes. |
00:07:07 | Araq | LordAndrew: yes |
00:07:55 | Varriount | LordAndrew: Some information on importing -> http://nimrod-lang.org/manual.html#import-statement |
00:08:41 | LordAndrew | Aha, I knew I was missing some sort of documentation. Thanks Varriount. :) |
00:09:50 | Varriount | LordAndrew: Keep in mind that the manual, though a trove of information, is a bit outdated, and doesn't reflect fully all the features of nimrod |
00:10:28 | Varriount | LordAndrew: A more up-to-date version of the manual is on the github repo, in the documention directories. |
00:15:33 | Araq | or here: http://build.nimrod-lang.org/docs/index.html |
00:16:06 | Varriount | Araq: Yes, but iirc, not even that is *exactly* up-to-date |
00:16:27 | Araq | true :-/ |
00:17:08 | * | xtagon joined #nimrod |
00:24:15 | Varriount | Hey xtagon |
00:24:59 | xtagon | Hey Varriount |
00:31:07 | * | io2 quit () |
00:31:56 | NimBot | Araq/Nimrod devel a30b428 Billingsly Wetherfordshire [+0 ±1 -0]: Update endians.nim... 2 more lines |
00:31:56 | NimBot | Araq/Nimrod devel b2410ab Josh Girvin [+0 ±1 -0]: Koch now uses PATH/nimrod correctly |
00:31:56 | NimBot | Araq/Nimrod devel 19574a3 Andreas Rumpf [+0 ±1 -0]: Merge pull request #812 from girvo/koch-fix... 2 more lines |
00:31:56 | NimBot | Araq/Nimrod devel 250249c Andreas Rumpf [+0 ±1 -0]: Merge pull request #775 from fowlmouth/patch-3... 2 more lines |
00:31:56 | NimBot | 4 more commits. |
00:32:56 | Araq | dom96: it really sucks to look for the clone command line to clone gtk2 |
00:33:02 | Araq | can't babel do that for me? |
00:33:42 | dom96 | no. |
00:35:24 | dom96 | You can get the url easily using babel though. |
00:35:35 | Araq | how so? |
00:35:41 | dom96 | babel search gtk |
00:36:27 | Varriount | Hey Araq, are WideCStrings garbage collected? |
00:36:36 | Araq | Varriount: yep |
00:37:48 | Varriount | Araq: Ok, so say I make a call to a windows api procedure, defined using the importc pragma, of the form winCall(newWideCString("Hello")) |
00:37:58 | Araq | yes |
00:38:29 | Varriount | Araq: I didn't finish my question..? |
00:38:44 | Araq | yes |
00:38:48 | Varriount | When will the string be garbage collected? |
00:38:56 | Araq | later |
00:39:18 | Varriount | After the actual api call has completed? |
00:39:46 | Araq | if the API call is blocking, yeah |
00:39:52 | Araq | usually it is |
00:40:14 | Araq | otherwise you have a problem |
00:40:55 | Varriount | Ok, thanks for the info. |
00:41:39 | Araq | is there a "git unstash" ? |
00:41:49 | dom96 | git stash apply |
00:45:15 | Araq | projects\gtk2>git push origin master |
00:45:16 | Araq | fatal: remote error: |
00:45:18 | Araq | You can't push to git://github.com/nimrod-code/gtk2.git |
00:45:19 | Araq | Use https://github.com/nimrod-code/gtk2.git |
00:45:25 | Araq | gah, I never get this |
00:45:48 | Varriount | Araq: I feel your pain. However, it could be worse. |
00:46:24 | Varriount | You could be teaching 10 non-computer-science-interested high school students how to use git. |
00:47:55 | Araq | non-computer-science-interested high school students sounds like girls |
00:48:06 | Araq | so that might even be fun :P |
00:48:22 | Varriount | Nope. A mixture |
00:48:41 | xtagon | I wish they tought me git in high school |
00:49:23 | dom96 | I wish they taught me anything useful relating to computers in high school... |
00:49:24 | Varriount | I was leader of the programming team for a local robotics team last year. You would think kids into robotics would be receptive to something like git, but you would be wrong. |
00:49:55 | dom96 | Robotics team!? Those kids don't know how lucky they are. |
00:55:12 | * | dmac joined #nimrod |
01:00:11 | xtagon | I took computer programming, game development, and robotics at our homeschool group in elementary school. If I had gone to a brick-and-morter public school instead, I would have missed out on all that fun stuff |
01:00:31 | xtagon | Give a kid a bunch of programmable legos, and he will go far |
01:01:48 | xtagon | The most my high school had though was a basic C++ class, but thanks to the internet, you can learn anything on your own :) |
01:03:05 | xtagon | Varriount, what sort of robots did your team build? Sounds like fun. |
01:04:56 | dom96 | Good night |
01:05:06 | * | dmac quit (Disconnected by services) |
01:05:06 | * | dmac_ joined #nimrod |
01:05:10 | Araq | same here, good night |
01:05:26 | * | dmac joined #nimrod |
01:05:26 | * | dmac quit (Client Quit) |
01:05:41 | * | dmac_ quit (Client Quit) |
01:05:51 | Varriount | xtagon: Varied by year. We were part of a global robotics group, FRC. One year we built a robot meant to play a robot version of basketball, another year, ultimate frisbee |
01:05:59 | * | dmac joined #nimrod |
01:07:31 | Varriount | Huzzah! I now have a pragma cabable of generating helper procedures for all the junk in winlean.nim |
01:11:11 | Araq | congrats and bye |
01:38:31 | * | ddl_smurf_ joined #nimrod |
01:41:19 | * | ddl_smurf quit (Ping timeout: 260 seconds) |
01:41:20 | * | ddl_smurf_ is now known as ddl_smurf |
02:07:19 | LordAndrew | Hrm. The split string functions only seem to work with chars? |
02:08:04 | Varriount | LordAndrew: By chars, you mean, not unicode characters? |
02:10:43 | Varriount | Or do you mean, not whole strings? |
02:10:50 | LordAndrew | Not whole strings. |
02:11:22 | LordAndrew | I wanted to split one large string into multiple strings and store them in a sequence, by splitting them with "<br>". |
02:12:23 | Varriount | Huh, I guess there isn't. |
02:13:28 | Varriount | LordAndrew: Lemme check the most recent documentation. |
02:15:22 | Varriount | LordAndrew: Odd that there isn't an overload of split that accepts strings. |
02:15:36 | Varriount | LordAndrew: It would be nice if you could make a procedure which does do that. We could then put it into strutils |
02:18:30 | LordAndrew | I'll see if I can cobble one together. Still learning how to use Nimrod. |
02:19:40 | Varriount | LordAndrew: Well, I would look at the implementation of split in strutils |
02:34:38 | Varriount | LordAndrew: You still there? |
02:34:44 | LordAndrew | Yes. |
02:35:34 | Varriount | If you aren't super-paranoid about speed, you can use a combination of string slicing and strutils.find/strutils.rfind |
02:36:37 | Varriount | Find the first occurance of your word, split the string at that occurance, then repeat with what is left |
02:36:55 | LordAndrew | I'll give that a try. I was looking at how split is implemented and it looks kind of simple, but I'm not sure what the * in the proc name is. |
02:37:00 | LordAndrew | proc split*(etc) |
02:37:09 | Varriount | LordAndrew: That is a visibility marker |
02:37:23 | * | ddl_smurf quit (Quit: ddl_smurf) |
02:37:25 | Varriount | Any procedure name prefixed by * is public to outside modules |
02:37:34 | LordAndrew | Ah. |
02:37:48 | Varriount | Any other questions? |
02:38:14 | LordAndrew | I think I've got it. I'm glad I didn't assume it was something like a pointer. |
02:41:10 | Varriount | LordAndrew: Also, something to keep in mind, most things in nimrod that deal with 'ranges' of things are inclusive. |
02:44:07 | Varriount | So if you do "hello world"[3..9] you get character's 3-9 |
02:53:39 | LordAndrew | How do you insert something into a sequence? thisSeq += "something" throws an error. |
02:54:11 | Varriount | LordAndrew: Insert, or append? |
02:55:37 | Varriount | To insert something, use the 'insert' procedure. To append something, use the '&' operator or 'add' procedure. |
02:58:44 | * | DAddYE joined #nimrod |
03:01:16 | * | Mordecai joined #nimrod |
03:01:55 | LordAndrew | Hrm. I seem to be doing something wrong. SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
03:02:07 | * | psquid quit (Ping timeout: 272 seconds) |
03:02:36 | Varriount | LordAndrew: Can you give me a gist of the code? |
03:03:27 | Varriount | Btw, the message you got is the nimrod equivalent of accessing a null value in c, a null pointer error in java, etc |
03:05:23 | LordAndrew | https://gist.github.com/Lordovos/4b934a4d1e272b0e6386 |
03:09:05 | Varriount | LordAndrew: You didn't initialize 'lines' |
03:09:25 | * | DAddYE quit () |
03:09:33 | Varriount | To create a new sequence, either assign '@[]' to a previously declared sequence type |
03:10:06 | Varriount | Assign @[item] to a var for type inference |
03:10:21 | Varriount | or use the newSeq proc (it's a generic) |
03:11:32 | Varriount | Personally, I would do 'var lines = newSeq[string]() |
03:12:58 | * | LordAndrew quit (Ping timeout: 272 seconds) |
03:19:47 | * | LordAndrew joined #nimrod |
03:20:16 | Varriount | LordAndrew: DId you get my reply about your error? |
03:20:38 | LordAndrew | I saw the part about not having initialized the array before my Internet connection died. |
03:22:34 | Varriount | To create a new sequence, either assign '@[]' to a var whose type has already been declared, assign '@[item]' to a new var declaration for a sequence of type 'item' |
03:23:01 | Varriount | or, LordAndrew, use the newSeq generic proc |
03:23:20 | Varriount | Personally, I would do 'var lines = newSeq[string]()' |
03:24:44 | Varriount | But you could also do 'var lines: seq[string] = @[]' |
03:25:17 | LordAndrew | Is there any sort of difference between the two? |
03:26:31 | Varriount | Not in any way you or I would notice. Using the newSeq proc allows you to pre-allocate a number of (nil) values to the sequence, but that's about it. |
03:28:02 | Varriount | There also might be some difference on the machine level, but again - not in any way we would notice. |
03:42:45 | * | jcrubino joined #nimrod |
03:43:43 | Varriount | LordAndrew: Made any progress? |
03:58:57 | * | brson quit (Quit: leaving) |
04:00:10 | * | xenagi joined #nimrod |
04:01:37 | LordAndrew | Varriount: Almost. There's a weird blank element at the start of the array though. https://gist.github.com/Lordovos/4b934a4d1e272b0e6386 |
04:03:09 | Varriount | LordAndrew: Is this an attempt for a split proc, or something else? |
04:03:53 | Varriount | Also, you don't have to stringify len(lines), echo will take care of that |
04:05:00 | LordAndrew | Ah, whoops. Didn't realize that. |
04:06:14 | LordAndrew | And yes, it's an attempt at a split proc. |
04:06:53 | Varriount | LordAndrew: You don't have to put the type for every var, just where the compiler isn't smart enough to infer the type (usually for containers or generic types) |
04:07:53 | Varriount | Sorry if I sound like I'm harping, I just can't tell if somethings part of your preferred style, or out of not knowing. |
04:08:33 | LordAndrew | I wasn't sure if it knew or not, haha. Some of the examples have the type specified, and others don't. :S |
04:09:05 | Varriount | Another piece of advice: There is a repr() procedure which acts like the stringify procedures, except that it works for vastly more types (however, it can't be overloaded/overwritten) |
04:09:26 | LordAndrew | ...wait, what the heck? I just noticed it's putting the strings into the array in reverse. |
04:09:30 | Varriount | If you use repr on a string, you can see the pointer to the string, as well as any control characters |
04:09:39 | Varriount | LordAndrew: That is because you are using insert |
04:09:43 | LordAndrew | http://puu.sh/6q0AT.png |
04:10:24 | Varriount | Try '&' or 'append', they're less expensive, as they don't have to shift blocks of memory |
04:10:54 | Varriount | Er, not 'append', 'add' |
04:11:41 | Varriount | LordAndrew: The empty string is the remainder of what is left after you have found all the occurrences of the seperator. |
04:11:57 | LordAndrew | Aha. The blank is at the end now with add. Okay, that makes more sense. |
04:12:25 | * | jcrubino quit (Ping timeout: 272 seconds) |
04:12:31 | Varriount | LordAndrew: I came across a similar problem in my quick implementation of split() |
04:16:16 | * | foxcub joined #nimrod |
04:18:29 | LordAndrew | http://puu.sh/6q12Q.png Strange. |
04:18:43 | xtagon | In Nimrod is there a way to format strings inline, without the % operator? Like in some languages you can do "Hello, #{person.name}!" instead of "Hello, $#" % [person.name] |
04:19:08 | xtagon | Can it be done with macros/templates? |
04:19:27 | Varriount | xtagon: It can be done with macros/templates |
04:19:46 | Varriount | xtagon: It may be done already. I'll look. |
04:19:51 | xtagon | Thanks :) |
04:20:30 | Varriount | LordAndrew: I can't remember if len takes into account the null char at the end or not :/ |
04:21:01 | xtagon | I'm also wondering...is there any way to do namespacing, or are modules always on the top level? How does one separate third-party dependencies from project-specific imports? |
04:21:31 | Varriount | xtagon: You can do namespacing (look at how nimrod's libs are layed out) |
04:22:08 | Varriount | xtagon: I believe some things must be done using a project specific configuration file. Beyond that, I'm not sure. |
04:22:26 | Varriount | I have not had much experience with nimrod projects, outside of nimrod itself. |
04:23:00 | Varriount | I would look on github or bitbucket, or ask again in about 5-6 hours. |
04:23:03 | xtagon | Oh I see, it looks like you're supposed to do import "foo/bar" |
04:23:10 | xtagon | Thanks, sorry for all the dumb questions. |
04:23:19 | Varriount | I don't mind. I enjoy helping |
04:24:05 | LordAndrew | Hmm. Are strings by default terminated with \0? |
04:24:24 | Varriount | LordAndrew: I believe string literals are. |
04:25:14 | Varriount | Again, I don't know if len() takes that into account or not. Chop the end off of a string literal and display it - is it still visibly the same? |
04:25:18 | foxcub | Varriount: got a minute to look at some code and tell me if there is a bug in Nimrod, or if I'm missing something? |
04:25:24 | LordAndrew | var a = "a" |
04:25:29 | LordAndrew | echo(len(a)) # 1 |
04:25:36 | Varriount | foxcub: Yep |
04:25:41 | foxcub | https://bitbucket.org/mrzv/serialization/src |
04:25:47 | foxcub | Look in examples/bintree.nim |
04:26:06 | foxcub | It imports tables, if it doesn't the code gives an error that in archive.nim, hasKey is not found. |
04:26:13 | foxcub | But archive.nim itself imports tables. |
04:26:17 | foxcub | What's going on? |
04:26:17 | * | jcrubino joined #nimrod |
04:27:09 | Varriount | xtagon: The string formatting you're looking for doesn't appear to be in the stdlib. I can say, however, that it should be quite possible with a macro |
04:27:46 | Varriount | Hello jcrubino |
04:27:58 | xtagon | Varriount, I'll let that be an exercise for me then. I need to learn more about macros anyway |
04:27:59 | jcrubino | hi |
04:28:21 | xtagon | LordAndrew, see http://nimrod-lang.org/tut1.html#strings regarding strings and \0 |
04:28:33 | Varriount | xtagon: Get ready to get your hands dirty. AST handling can be very finicky. |
04:29:18 | Varriount | Though, what you're doing sounds simpler than what I just did, which was generating 2 different procs, each slightly different, using a macro pragma |
04:29:35 | * | vbtt joined #nimrod |
04:29:41 | xtagon | Different in what mannor? |
04:30:03 | xtagon | manner* |
04:30:26 | Varriount | xtagon: https://gist.github.com/Varriount/8500498 |
04:30:48 | Varriount | It'll only run on windows (or possibly wine) just so you know. |
04:31:35 | Varriount | Man, you guys are unlucky. All the others live in Europe mainly, and are asleep right now. |
04:31:44 | Varriount | All you have is me. :/ |
04:32:32 | xtagon | Looking at that macro, all I can think is "At least you didn't have to write it in C." |
04:34:30 | Varriount | xtagon: *shudder* |
04:35:09 | Varriount | xtagon: Actually, I like to think that it's fairly straightforward. The complicated parts are when I have to cover all the corner cases in the ast |
04:35:36 | LordAndrew | I wonder if I could get away with just removing the last element if it has a length of zero. |
04:35:49 | Varriount | LordAndrew: Want to see my implementation? |
04:35:56 | LordAndrew | Varriount: Sure. |
04:36:21 | Varriount | foxcub: I think you found a bug in the library. It has to do with template binding and symbols. |
04:36:33 | LordAndrew | also dangit i keep trying to throw in semi-colons and braces into my code |
04:36:40 | foxcub | Varriount: explain |
04:36:54 | foxcub | Also how do I report Nimrod bugs? |
04:36:59 | foxcub | On Github? |
04:37:23 | foxcub | I'd like to boil it down to a smaller example, but so far I haven't succeeded. |
04:39:29 | Varriount | https://gist.github.com/Varriount/8500547 |
04:39:36 | Varriount | LordAndrew: ^ |
04:40:29 | Varriount | foxcub: Lemme track down the precise error. |
04:40:38 | foxcub | Varriount: thanks |
04:41:48 | LordAndrew | Varriount: That looks way different from what I came up with. :P |
04:41:53 | Varriount | xtagon: I like to think that my macro is rather straightforward. The odd parts are where I have to cover the corner cases, such as where a procedures "name" node can either be an identifier node (if it is private) or a postFix node (if it has a '*' after its name) |
04:42:01 | Varriount | LordAndrew: Not totally. |
04:42:34 | Varriount | LordAndrew: I just don't accumulate my result in a sequence, and use more variables. |
04:43:36 | xtagon | Varriount, I see. So macros work directly with the AST? How do templates differ? |
04:45:33 | Varriount | Templates are more like formatting a string with input |
04:45:59 | Varriount | except, you are formatting source code. |
04:46:31 | xtagon | So that's more like C macros? |
04:48:00 | Varriount | Yes. Except that you get automatic hygienic variables and such |
04:51:31 | Varriount | foxcub: I think you might have found a wierd error in nimrod's importing mechanism |
04:52:20 | foxcub | Varriount: I believe you. Perhaps, I ping Araq the next time he's online. |
04:54:17 | Varriount | foxcub: The problem is that you and he seem to have timezones that don't overlap very well |
04:54:37 | Varriount | You could always PM him now, or use memoserv |
04:54:53 | foxcub | I don't know how that works. I'm not so great with IRC. |
04:55:01 | LordAndrew | What does the yield keyword do in your snippet, Varriount? |
04:55:20 | Varriount | foxcub: pm's are private messages, like a private channel between two users. |
04:56:11 | Varriount | foxcub: Memoserv is an irc service (like nickserv and chanserv) which allows you to send and store memos. It's like a really advanced, irc-network-wide bot |
04:56:33 | Varriount | LordAndrew: 'yield' is a keyword used by iterators to yield a result. |
04:56:56 | foxcub | Varriount: I see. Ok, if I can't find him tomorrow, I'll send this PM. |
04:59:17 | Varriount | foxcub: Does test.nim work? |
04:59:26 | foxcub | Everything works. |
04:59:32 | foxcub | But not without import tables |
04:59:52 | Varriount | Well, I salute you nonetheless on some nice code. |
05:00:04 | foxcub | Varriount: thanks |
05:00:23 | Varriount | I see that you emulated python's with open() style. :P |
05:01:09 | foxcub | What do you mean? |
05:01:22 | Varriount | the withOpen() tempalte |
05:01:25 | Varriount | *template |
05:01:25 | foxcub | withFile? |
05:01:32 | Varriount | Er, yes, that |
05:01:32 | foxcub | That's out of Nimrod's doc. |
05:01:34 | foxcub | Not my idea. |
05:01:43 | Varriount | Oh. *shrug* |
05:01:55 | foxcub | But it's a nice style, indeed. |
05:07:28 | Varriount | foxcub: I explicitly changed the erroring line in archive.nim to "tables.hasKey(a.pointers[], ix)" |
05:07:39 | Varriount | and the error shifted to line 43 |
05:07:56 | foxcub | Oh, interesting. |
05:07:58 | foxcub | Let me try that. |
05:08:46 | foxcub | Ah, brilliant. |
05:08:50 | foxcub | That works. I get no errors. |
05:08:56 | Varriount | Oh? |
05:09:04 | foxcub | Ah, spoke too soon. |
05:09:05 | foxcub | Never mind. |
05:09:31 | Varriount | foxcub: I think it also might have something to do with the large number of generic procedures that are being used. They might be confusing the compiler about what procedure to use |
05:10:20 | foxcub | Varriount: but it shouldn't |
05:10:30 | foxcub | The problem in line 43 is the same. |
05:10:38 | foxcub | Instead of hasKey, it's with []= |
05:10:44 | Varriount | I know that, and you know that, but I'm not sure the compiler knows that. |
05:10:50 | foxcub | ;-) |
05:10:56 | foxcub | We'll see what Araq says. |
05:11:56 | * | vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
05:11:58 | Varriount | If I didn't know better, I'd say that whatever structure holds the list of overloads for particular procedures is losing certain ones. |
05:12:15 | Varriount | It's very.. irritating. |
05:12:59 | foxcub | Well, it seems the consensus is that it's a bug, so I just need to report it properly. I wish I had a smaller example that produced it. |
05:13:09 | * | jcrubino quit (Ping timeout: 248 seconds) |
05:13:56 | Varriount | foxcub: Well, how many generics and other procedures can be removed? |
05:15:31 | Varriount | And anyway, your 'test case' isn't all that big. It's about.. 180 lines altogether, and for a bug this obscure, I'm not surprised that it isn't more. |
05:15:36 | LordAndrew | Hhhuh, so yield is like return where it sends info back to something, but it doesn't stop the procedure. |
05:15:39 | foxcub | Hm, I don't know. They are kind of interdependent. I tried to create a simple example from scratch, but it wouldn't fail. |
05:16:21 | Varriount | foxcub: The only advice I can give is to remove things until what you have starts working. |
05:16:30 | foxcub | ;-) |
05:16:35 | foxcub | Ok |
05:16:44 | Varriount | I like to call it "The Jenga Method" |
05:17:24 | foxcub | In any case, thanks for your help. I'll bug Araq with this question. |
05:25:53 | * | jcrubino joined #nimrod |
05:26:12 | Varriount | Alright, I'm about to head to bed. LordAndrew, foxcub, xtagon, any questions? |
05:26:31 | foxcub | Have a good night. |
05:26:36 | xtagon | Varriount, nope. Good night :) |
05:26:47 | LordAndrew | I'm all good. Thanks for the help, Varriount. |
05:39:25 | * | xenagi quit (Quit: Leaving) |
06:14:44 | * | LordAndrew quit (Ping timeout: 272 seconds) |
06:15:39 | * | [1]Endy joined #nimrod |
06:24:26 | * | foxcub quit (Quit: foxcub) |
06:29:50 | * | foxcub joined #nimrod |
06:36:09 | * | xtagon quit (Quit: Leaving) |
06:49:55 | * | Demos joined #nimrod |
07:03:13 | * | foxcub quit (Quit: foxcub) |
07:12:14 | * | jcrubino quit (Ping timeout: 264 seconds) |
07:22:43 | * | delian1 joined #nimrod |
07:24:00 | * | jcrubino joined #nimrod |
07:25:16 | * | capisce_ joined #nimrod |
07:25:54 | * | aftershave quit (Ping timeout: 264 seconds) |
07:26:03 | * | capisce quit (Ping timeout: 264 seconds) |
07:27:55 | * | aftershave joined #nimrod |
08:11:42 | * | Demos quit (Ping timeout: 265 seconds) |
08:29:56 | * | Varriount quit (Read error: Connection reset by peer) |
08:50:23 | * | io2 joined #nimrod |
09:06:29 | * | delian1 quit (Quit: Terminated!) |
09:06:44 | * | delian1 joined #nimrod |
09:07:05 | * | delian1 is now known as delian66 |
09:38:15 | * | dmac quit (Ping timeout: 260 seconds) |
09:44:26 | * | io2 quit () |
09:44:26 | * | zahary quit (Read error: Connection reset by peer) |
09:44:56 | * | zahary joined #nimrod |
09:45:17 | * | io2 joined #nimrod |
09:56:35 | * | jcrubino quit (Ping timeout: 272 seconds) |
10:01:40 | * | [2]Endy joined #nimrod |
10:05:14 | * | [1]Endy quit (Ping timeout: 252 seconds) |
10:15:57 | * | io2 quit (Ping timeout: 272 seconds) |
10:21:25 | Araq | OrionPK: PR against devel? |
10:31:51 | * | zahary quit (Ping timeout: 260 seconds) |
10:40:21 | * | zahary joined #nimrod |
10:51:26 | * | faassen joined #nimrod |
10:54:42 | * | zahary1 joined #nimrod |
10:54:42 | * | zahary quit (Read error: Connection reset by peer) |
10:56:12 | * | odc joined #nimrod |
11:01:10 | * | faassen quit (Quit: Leaving.) |
12:37:31 | * | aftersha_ joined #nimrod |
12:47:02 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
12:47:20 | * | aftersha_ joined #nimrod |
12:49:20 | * | aftersha_ quit (Client Quit) |
12:51:09 | * | aftersha_ joined #nimrod |
12:51:31 | * | aftersha_ quit (Client Quit) |
13:19:48 | * | renesac joined #nimrod |
13:22:56 | renesac | hi, I started toying with nimrod, and the manual says that narrowing type conversions should be explicit (ok), but don't shows how I make explicit conversions |
13:26:19 | * | darkf quit (Quit: Leaving) |
13:27:15 | EXetoC | renesac: targetType(x), or x.targetType (syntactic sugar) |
13:32:25 | EXetoC | it shouldn't be necessary when the original value is a literal, but it needs to fit of course |
13:35:23 | renesac | thanks, I was trying to narrow the output of math.random() |
13:41:00 | renesac | it would be more efficient using casts, but I would have to narrow it down anyway as it seems to provide only 63bits of randomness |
13:41:12 | renesac | (I'm filling an array) |
13:48:54 | renesac | by the way, how I make a vector/dinamic array? |
13:50:16 | EXetoC | http://build.nimrod-lang.org/docs/manual.html#array-and-sequence-types |
13:54:36 | EXetoC | cast away if you really need to |
14:20:49 | * | foxcub joined #nimrod |
14:23:05 | renesac | oh, I missed sequences, thought they were only sequential numbers of a type, and was looking in openarrays |
14:23:36 | renesac | there should be an example using newseq[type](len) |
14:24:15 | renesac | well, the documentation needs much more examples... especially in the modules |
14:25:17 | renesac | and I managed to get an internal error from the compiler w/o stack traceback |
14:25:18 | renesac | \o/ |
14:25:23 | renesac | it was my fault though |
14:28:47 | EXetoC | I don't know about that. It should never happen |
14:28:52 | EXetoC | not passing "-d:release" to koch might help |
14:32:29 | EXetoC | with stack traces of course |
14:37:13 | renesac | right, minimum working example: |
14:38:04 | renesac | let x = seq.high # save it as error.nim |
14:38:16 | renesac | nimrod c -r error.nim |
14:38:47 | renesac | should I file a proper bug report? |
14:39:34 | EXetoC | it compiles on a recent build |
14:40:04 | renesac | oh, I'm on 0.9.2 |
14:56:44 | EXetoC | it's recommended to use HEAD. a lot has happened since 0.9.2, and many libs aren't compatible with it |
14:57:10 | EXetoC | was the executable bit removed from the build scripts? |
15:03:59 | renesac | the documentation on nimrod-lang is syncronized with HEAD or 0.9.2? |
15:04:14 | Araq | 0.9.2 |
15:04:27 | Araq | nimbuild has quite up to date docs |
15:05:45 | renesac | oh, only for the standard library right? |
15:05:57 | renesac | the language itself changed much since 0.9.2? |
15:07:32 | Araq | no, for everything: http://nimbuild.nimrod-lang.org/ |
15:08:29 | Araq | the language itself is changing a bit but we have a clear deprecation path |
15:09:39 | Araq | which most people here disagree with, they think it's better to break things asap |
15:12:02 | renesac | oh, the documentation link in http://build.nimrod-lang.org/ leads directly to http://build.nimrod-lang.org/docs/lib.html |
15:12:11 | Araq | I know |
15:12:21 | renesac | so I wasn't finding the language manual |
15:12:24 | Araq | we'll fix that eventually |
15:12:28 | renesac | right, thanks |
15:26:25 | Araq | oh btw welcome renesac! :-) |
15:26:49 | Araq | where are my manners today |
15:30:40 | * | LordAndrew joined #nimrod |
15:31:18 | OrionPK | araq thanks for reminding me, I should have a bit of time the morning |
15:33:22 | renesac | Araq: thanks, I'm just another programmer in the endless quest to find a better C |
15:33:24 | renesac | ;) |
15:34:45 | Araq | use --os:standalone and you get that better C |
15:35:05 | Araq | I wanted to blog about how to write a python extension in nimrod, but I never find the time |
15:35:27 | LordAndrew | Hi there. |
15:37:28 | Araq | hi LordAndrew |
15:37:29 | renesac | Araq: I'm not aiming that low, XD |
15:38:32 | renesac | and about python, you would have to show where nimrod is better than Cython |
15:41:05 | LordAndrew | I was curious: what are the files in nimcache that seem to be generated? |
15:42:28 | EXetoC | it's everything the C compiler deals with |
15:42:53 | EXetoC | the output should give you that information |
15:43:10 | EXetoC | by default anyway. "gcc -o..." for example |
15:43:48 | EXetoC | well, C by default, but there are several backends |
15:44:26 | renesac | btw, is there a nimrod interactive interpreter? |
15:46:28 | renesac | it would be handy for experimenting and learning like I'm doing now... |
15:47:27 | Araq | why? Cython has exactly the shit of a type system that I would imagine |
15:47:57 | LordAndrew | Ah. What does Nimrod's compiler use GCC for anyways? |
15:47:58 | Araq | plus an ugly syntax |
15:48:16 | EXetoC | LordAndrew: for compiling the generated C code |
15:48:44 | EXetoC | invoke "nimrod" and see the command section |
15:49:25 | renesac | Araq: but it is derived from python, and is becoming standard for python modules that needs more performance |
15:50:21 | renesac | even if technically inferior, it is probably the main alternative |
15:51:07 | EXetoC | LordAndrew: "nimrod --advanced" will show you the other available backends, and an asm backend is being worked on |
15:51:35 | renesac | which asm? |
15:51:56 | Araq | renesac: we have "nimrod i" for an interactive shell but that's quite unusable for anything |
15:54:08 | EXetoC | renesac: for quite a few architectures I think |
15:54:51 | renesac | based on LLVM or something? |
15:55:17 | NimBot | Araq/Nimrod devel 21aa955 Araq [+0 ±54 -0]: 'nil' as a statement is deprecated, use an empty 'discard' instead |
15:55:40 | EXetoC | renesac: made from scratch |
15:55:44 | EXetoC | Araq: right? |
15:55:48 | Araq | right |
15:56:12 | Araq | but the C backend is not going anywhere |
15:56:51 | renesac | hum |
15:57:20 | LordAndrew | Does GCC just compile the code? Or does it link libgcc/glibc to the executables Nimrod generates as well? |
15:58:49 | renesac | "nimrod i" is cool, but I couldn't get a 'for' to work |
16:00:49 | EXetoC | it's pretty unusable atm like he said |
16:01:14 | renesac | yeah.... |
16:01:20 | Araq | LordAndrew: it links with C's stdlib |
16:01:55 | * | io2 joined #nimrod |
16:10:15 | * | [2]Endy quit (Ping timeout: 272 seconds) |
16:18:56 | * | Varriount joined #nimrod |
16:19:08 | EXetoC | is child(PXmlNode) not recursive? I'm trying to scrape the internets, but maybe I should stick to python |
16:19:20 | EXetoC | or I could attempt to wrap lxml or something |
16:19:45 | Araq | PXmlNodes are recursive ... |
16:20:47 | Araq | Varriount: the trailing binary zero is not part of the lenght and an implementation detail. you don't have to care about it, it just works |
16:20:57 | Araq | *length |
16:21:12 | Varriount | Eh... What? |
16:21:20 | Varriount | Oh, about the strings. Yeah |
16:24:18 | Varriount | Araq: Speaking of strings, did you see my implementation of split(s, sep:string) ? |
16:24:31 | Araq | no |
16:24:42 | Araq | didn't gradha already provide this one? |
16:25:03 | Varriount | If he did, it hasn't been merged into any of the branches. |
16:27:24 | Varriount | Araq: There is no split(s, sep:string) implementation in the master or devel branches. |
16:29:12 | Varriount | Araq: There's a re.split, but that requires pcre |
16:29:35 | Varriount | Araq: Here's my implementation. -> https://gist.github.com/Varriount/8500547 |
16:32:20 | Araq | Varriount: substr is slightly more efficient than [..] |
16:32:33 | Araq | don't yield twice |
16:33:05 | Araq | find has a "start" argument so no need to slice |
16:33:15 | Varriount | Ok. |
16:33:43 | Varriount | I'm surprised that you don't want me to inline the entire find() proc :P |
16:49:15 | Araq | no, iterators need to be as small as possible as they already are inlined |
16:49:22 | Araq | but btw |
16:49:33 | Araq | you should use findAux or whatever I called it |
16:49:43 | Araq | so that the temporary data structure is reused |
16:52:11 | OrionPK | araq https://github.com/Araq/Nimrod/pull/822 |
16:53:08 | Araq | OrionPK: irc.nim looks suspicious |
16:53:20 | Araq | why got the 'ret != 0' removed? |
16:53:40 | OrionPK | thats not being checked anywhere else |
16:53:56 | OrionPK | I'll add it back |
16:54:02 | Araq | ok |
16:56:01 | OrionPK | k, updated |
16:57:44 | * | jcrubino joined #nimrod |
17:00:31 | * | aftersha_ joined #nimrod |
17:02:10 | NimBot | Araq/Nimrod devel 9885240 Erik O'Leary [+0 ±5 -0]: Corrected prunesocketset and pruneprocessset... 3 more lines |
17:02:10 | NimBot | Araq/Nimrod devel b0a5bab onionhammer [+0 ±1 -0]: Added ret != 0 back |
17:02:10 | NimBot | Araq/Nimrod devel 568ea12 Andreas Rumpf [+0 ±5 -0]: Merge pull request #822 from onionhammer/devel... 2 more lines |
17:04:19 | Araq | please close https://github.com/Araq/Nimrod/pull/655 then |
17:05:23 | OrionPK | k |
17:10:00 | * | Mordecai quit (Read error: Operation timed out) |
17:10:33 | * | Mordecai joined #nimrod |
17:13:28 | * | ddl_smurf joined #nimrod |
17:15:06 | * | foxcub quit (Quit: foxcub) |
17:17:30 | EXetoC | does findAll(PXmlNode) not recurse further when said tag is found? |
17:20:29 | Varriount | Araq: What exactly is this 'TSkipTable'used in auxFind? |
17:24:29 | Varriount | It's not initialized with a length, yet it's an array type, and it's used. |
17:38:19 | Araq | EXetoC: dunno check the source |
17:39:20 | Araq | Varriount: use it as a black box or check out booyer-moore-algorithm |
17:40:09 | Varriount | Araq: I tried examining it, but nimrod -i's repr returns nothing |
17:40:28 | Varriount | Is that just a side effect of using the vm? |
17:40:59 | Araq | no idea |
17:51:09 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
17:52:13 | * | randallsquared quit (Quit: WeeChat 0.4.0) |
17:55:03 | * | tdc joined #nimrod |
18:06:41 | tdc | http://pastebin.com/56DfEL4H |
18:06:56 | tdc | does anyone have a hint on how I can debug this? |
18:08:30 | Araq | dom96: can you help tdc? |
18:08:55 | renesac | EXetoC: I'm still getting an error compiling my code with the latest build from nimbuild |
18:09:15 | renesac | Nimrod Compiler Version 0.9.3 (2014-01-13) [Linux: i386] |
18:09:22 | renesac | Error: internal error: value expected, but got a type |
18:09:23 | renesac | No stack traceback available |
18:09:53 | tdc | I tried adding a breakpoint to proc recv*() at line 1080. I can see it and enable it in the debugger but the breakpoint isn't hit |
18:09:56 | EXetoC | well, I passed it a seq, not a type |
18:10:26 | dom96 | Araq: Sounds like he needs your help more than mine. |
18:10:38 | renesac | oh, the line that gives that error is exaclty "let x = seq.high" |
18:11:07 | renesac | I know it is an error, but it shouldn't cause the compiler exiting w/o pointing the line |
18:11:13 | dom96 | tdc: The Nimrod debugger may still have some issues I think. We usually debug by using 'echo'. |
18:12:02 | Araq | renesac: the error message could be better, but it's rather hard to do that |
18:12:08 | tdc | okay - np I wasn't whether it was the debugger or if I'm missing something. I am very new to Nimrod |
18:12:57 | dom96 | tdc: Which version of Nimrod are you using? |
18:13:06 | Araq | the debugger works for me but doesn't trace the stdlib |
18:13:07 | tdc | github master |
18:13:18 | dom96 | hrm, good. |
18:13:25 | renesac | right, it was sufficient for me because I just modified that and tried to compile |
18:14:08 | dom96 | sockets.nim(1295) doesn't seem to have a call to OSError, odd. |
18:15:23 | EXetoC | renesac: and seq actually is a sequence? |
18:16:14 | tdc | It would be 1294 for you, because I added a {.breakpoint.} |
18:17:33 | renesac | no, I think it is really the type |
18:17:50 | renesac | in the error.nim file, that is the first and only line |
18:18:04 | dom96 | tdc: I see. Well, it's a strange error. |
18:18:32 | tdc | recv return < 0 but errno appears to be 0 |
18:18:42 | renesac | the problem is only the compiler exiting w/o giving the line where the error happened |
18:18:57 | EXetoC | renesac: ok so you don't have a var with that name. it shouldn't work either way |
18:19:07 | EXetoC | yes there are still plenty of compiler bugs |
18:19:34 | renesac | yes, as I said on the first time, it was my fault |
18:19:47 | dom96 | tdc: The only explanation I can see is that something is resetting errno. That used to be a bug which I thought was fixed, maybe it's back. |
18:20:54 | tdc | the reason it doesn't work is because the site is using ssl. It works fine for a regular get |
18:22:36 | dom96 | oh yes. Change the osError to socketError |
18:23:24 | dom96 | It needs the socket so: socket.socketError() |
18:25:04 | tdc | well - Not enough data on socket makes more sense at least. |
18:26:58 | tdc | although it shouldn't really fail because I don't get the error when using Python |
18:27:19 | dom96 | I thought that that error can only happen with non-blocking sockets |
18:28:51 | EXetoC | Araq: no findAll doesn't, but I suppose it should. I could add a parameter or two to control that |
18:29:39 | Araq | EXetoC: find does i think |
18:30:16 | dom96 | tdc: Yeah, that error doesn't make sense. If there is not enough data then it should wait for more. |
18:31:53 | tdc | it happens when it tries to receive the first byte. I thought it might use the "when ssl" section of the code but it's before that. |
18:32:16 | Varriount | tdc: What version of nimrod are you using? |
18:32:23 | dom96 | tdc: Maybe it didn't handshake. |
18:32:37 | Varriount | The 9.2 release, master branch, or devel branch? |
18:32:42 | dom96 | Varriount: I already asked him: master |
18:32:50 | Varriount | Oh. Sorry |
18:34:07 | EXetoC | Araq: do you mean findAll? because I only see find. |
18:34:16 | EXetoC | I think I had to turn the elif into an if |
18:34:24 | dom96 | tdc: Check the precise error code you get. There are 4 possibilities: SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_READ |
18:35:20 | * | foxcub joined #nimrod |
18:37:12 | tdc | Nimrod Compiler Version 0.9.3 (2014-01-19) [Linux: amd64] |
18:38:54 | tdc | How can I print the error code? Is it on the socketError? |
18:39:51 | dom96 | line 346 |
18:39:54 | dom96 | just echo ret |
18:40:33 | * | [1]Endy joined #nimrod |
18:41:03 | tdc | Return-code 2 |
18:42:15 | renesac | 'shl' don't work with uints?? |
18:46:04 | Araq | import unsigned |
18:47:39 | * | foxcub quit (Read error: Connection reset by peer) |
18:48:11 | * | foxcub joined #nimrod |
18:48:27 | renesac | oh, thanks |
18:49:30 | * | dmac joined #nimrod |
18:50:13 | * | io2 quit (Ping timeout: 272 seconds) |
18:53:15 | tdc | Is the SSL_read expected to occur in blocking or non-blocking mode? |
18:53:57 | dom96 | there is no expectation |
18:55:45 | tdc | Sorry if it's a dumb question but does Nimrod not have a default? |
18:56:45 | dom96 | No. You set whether a socket is blocking or non-blocking with the setBlocking proc |
18:56:55 | dom96 | Well, the default is blocking. |
18:57:18 | tdc | okay, seeing that I am not using setBlocking I will assume it is blocking then |
18:58:04 | dom96 | If you're using httpclient then you wouldn't be using setBlocking manually anyway. Httpclient would do it, but httpclient is certainly doesn't. |
18:58:06 | dom96 | s/is// |
18:58:29 | tdc | maybe renegotiation is taking place. I tried a similar program in golang and that failed because renegotiation is not supported |
18:58:54 | dom96 | Maybe, there is a function which needs to be called to finalise a handshake. |
18:59:01 | dom96 | It it called in connect IIRC |
18:59:07 | dom96 | Might be useful to look into that. |
18:59:18 | tdc | and the Openssl docs mention that SSL_read might return SSL_ERROR_WANT_READ if renegotiation takes place |
18:59:41 | dom96 | and what should be done in that case? |
19:00:15 | tdc | Set SSL_MODE_AUTO_RETRY with SSL_CTX_set_mode |
19:00:32 | dom96 | ahh, do it then. |
19:00:34 | tdc | I need to go away for a bit but might try this in an hour or so |
19:00:43 | dom96 | Alright, if it works please create a PR. |
19:00:51 | tdc | Will do. thanks for your help |
19:05:47 | * | Varriount quit (Ping timeout: 272 seconds) |
19:06:48 | * | foxcub quit (Quit: foxcub) |
19:15:53 | * | Varriount joined #nimrod |
19:16:19 | Araq | what should news.txt contain? |
19:16:35 | Araq | sockets.select now returns * instead of * ? |
19:17:44 | Araq | dom96? |
19:18:04 | dom96 | sockets.select now prunes sockets that are **not** ready from the list of sockets given to it. |
19:22:43 | Araq | excellent, thanks |
19:25:33 | NimBot | Araq/Nimrod devel 96f7fd9 Araq [+0 ±5 -0]: compiler warns when you use GC'ed memory and '--gc:none' |
19:25:33 | NimBot | Araq/Nimrod devel 1c489f0 Araq [+0 ±5 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
19:27:33 | * | aftersha_ joined #nimrod |
19:27:52 | Varriount | Araq: Has foxcub contacted you about the strange import bug he found? |
19:28:13 | Araq | sure and I replied |
19:28:29 | Araq | it's f(a, b) vs a.f(b) in a generic context |
19:28:35 | Araq | a known bug |
19:30:11 | * | io2 joined #nimrod |
19:33:43 | * | Mordecai is now known as psquid |
19:34:49 | * | dmac quit (Ping timeout: 272 seconds) |
19:34:53 | * | Mat3 joined #nimrod |
19:35:47 | Mat3 | hi |
19:36:10 | Varriount | Hey Mat3, how's your secret project? |
19:36:47 | OrionPK | the same is true for osproc select |
19:37:10 | Araq | OrionPK: you didnt fix osproc select, did you? |
19:39:25 | Mat3 | Varriount: fine, it's not secret - I'm working beside on the documentation |
19:40:25 | Varriount | Mat3: It is to me, since I hardly know what you're working on. |
19:40:29 | Varriount | :P |
19:44:13 | Araq | see you later guys |
19:44:45 | Mat3 | a Nimrod subset with stand-alone environment for embedded boards (somethink similar to this: http://www.eluaproject.net/) |
19:44:54 | Mat3 | ^something |
19:45:01 | Varriount | Ooh, interesting. |
19:45:09 | Mat3 | hi Araq |
19:45:26 | Varriount | I wonder if nimrod would be a good replacement as a language for programming FRC robots. |
19:45:47 | Varriount | Currently only C++, Labview, and Java are really used. |
19:49:45 | Mat3 | you forget Forth and Erlang (only to mention a few other alternatives) |
19:50:37 | Mat3 | anyhow why shouldn't Nimrod be suited for this kind of applications ? |
19:50:54 | Varriount | I don't know. |
19:57:23 | * | wat_ joined #nimrod |
19:58:43 | Varriount | Araq: How do I get the tester to output to something other than a database? |
19:58:56 | Varriount | Or take a database and output it to json? |
20:02:34 | Varriount | Nevermind |
20:12:36 | wat_ | hey guys, I've been checking out nimrod and having fun with it, but references confuse me a little bit |
20:12:52 | wat_ | I get that new creates a garbage collected reference, but |
20:13:41 | wat_ | if I make a reference to an integer and pass it to a function expecting an integer I get a type error, how do I dereference the variable to turn the reference into a value? |
20:13:57 | Varriount | wat_: Can I see your code? |
20:14:21 | wat_ | let me do something simple |
20:15:40 | Varriount | wat_: Use gist.github.com, if what your are doing is longer than a single line. |
20:16:03 | * | xtagon joined #nimrod |
20:16:13 | Mat3 | hello xtagon |
20:16:26 | xtagon | Hey Mat3 |
20:17:02 | Varriount | Hi xtagon, make any progress on that macro? |
20:17:16 | Mat3 | see yozu later guys |
20:17:19 | Mat3 | ^you |
20:17:20 | xtagon | Varriount, haven't given it a go yet. I still need to read the manual on macros |
20:17:44 | * | Mat3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
20:17:55 | Varriount | xtagon: Here's a procedure that might help you: http://nimrod-lang.org/system.html#705 |
20:17:57 | wat_ | https://gist.github.com/anonymous/6bb1f9b90cc957480b67 |
20:19:54 | xtagon | Varriount, it says that proc returns something other than the documented return type. How is that possible in a type safe language? |
20:20:39 | Varriount | xtagon: TObject is a base object type |
20:20:58 | xtagon | Oh, right. |
20:20:59 | Varriount | xtagon: Nimrod isn't so typesafe that you can't break out or go around |
20:21:10 | wat_ | I noticed that there were finalizers for gc references, are there finalizers for raw ptrs like destructors / smart pointers in c++? |
20:22:02 | wat_ | I have to run so I won't be able to reply, but nimrod is pretty interesting, keep up the good work! |
20:22:03 | Varriount | xtagon: Locals can also do that because it is a magic proc, and likely a compile time one as well |
20:22:19 | * | foxcub joined #nimrod |
20:22:28 | Varriount | 'magic' meaning that it's built into the compiler |
20:22:46 | xtagon | Ah |
20:26:55 | Varriount | wat_: When the compiler cannot infer whether you need to dereference a ref, you must use the dereference operator, '[]' next to the reference identifier. |
20:27:25 | tdc | dom96: fyi - adding SSL_MODE_AUTO_RETRY appears to fix the problem |
20:27:46 | Varriount | foxcub: Araq told me that he explained your problem? |
20:27:51 | tdc | I have created an issue on github for it |
20:27:53 | * | aftersha_ quit (Quit: Computer has gone to sleep.) |
20:27:59 | xtagon | Varriount, so a macro take in an AST object, and returns a modified AST object, yes? |
20:28:16 | Varriount | xtagon: Yes |
20:28:28 | foxcub | Varriount: yeah, he already knew about this bug. He explained the solution you proposed, but also fixing the call to []= |
20:28:40 | foxcub | Varriount: we were basically on the right track, but got confused by something. |
20:28:53 | foxcub | Anyway, it was good to get him to look at it. |
20:28:55 | Varriount | foxcub: I'm not surprised. I get confused all the time. |
20:29:33 | foxcub | Well, you were exactly on the right track. I don't even remember why we didn't get []= yesterday. I thought I tried exactly what I have there now. |
20:31:20 | Varriount | xtagon: For your macro, the macro would probably take in an ast, check that the only node in it is a string literal node, turn the string literal node into a string, and parse it |
20:32:26 | xtagon | Varriount, I'm reading the part about "Term rewriting macros" right now. Is that what I need? |
20:33:46 | xtagon | I'm a little confused on how the macros are ran. If I write a macro that checks that the only node in it is a string literal node, does the compiler try to run the macro on every expression until it finds one with just a string literal? |
20:34:01 | Varriount | xtagon: Yes, *if* you want your macro to work globally |
20:34:15 | xtagon | That sounds expensive, is it? |
20:34:21 | Varriount | I have no idea. |
20:34:35 | xtagon | I'll find out :) |
20:35:07 | xtagon | So in my check, if it is not only a string literal node, what's the proper way to bail out? Return the AST as is? |
20:35:12 | Varriount | xtagon: Another route to take is to create a macro with a short name (such as 'af' for auto-format) and use it as a string prefix |
20:35:44 | Varriount | xtagon: Probably. Or error, since then you know something went wrong with your targeting pattern. |
20:35:48 | xtagon | Varriount, I like that idea better, because then you only use it when you need it. |
20:35:56 | Varriount | xtagon: I do as well. |
20:37:39 | renesac | oh, if I declare "var result = x" I mess up with the magic |
20:38:05 | * | renesac took a long time to understand why it wasn't working |
20:38:37 | renesac | a note about this should be added to the tutorial or manual |
20:39:04 | xtagon | Varriount, I can't find in the manual the syntax for making a string prefix macro. |
20:39:25 | xtagon | I assume it needs a pragma or something |
20:39:56 | renesac | 'proc test(): int = var result = 2' returns 0, but if I take the 'var' off it works |
20:40:28 | Varriount | xtagon: No pragma needed |
20:41:14 | Varriount | any procedure/macro/template which takes a string can be used as a prefix (I think) |
20:41:40 | Varriount | I know that procs can be used, I haven't tried it on macros or templates |
21:03:06 | * | [1]Endy quit (Ping timeout: 265 seconds) |
21:05:07 | * | jcrubino quit (Ping timeout: 272 seconds) |
21:07:11 | xtagon | Varriount, I am having a real hard time writing a basic macro that changes a string to another string literal |
21:08:11 | xtagon | Varriount, what's the best way to debug the value of and AST node? AFAIK there is no REPL since it is compiled, and I can't just print the repr because it's in a macro, not runtime |
21:10:47 | * | tdc quit (Quit: Leaving) |
21:11:33 | * | jcrubino joined #nimrod |
21:12:35 | * | foxcub quit (Quit: foxcub) |
21:19:16 | dom96 | xtagon: Use treeRepr |
21:19:25 | EXetoC | bacon |
21:19:29 | xtagon | dom96, thanks |
21:20:25 | EXetoC | dom96: are you two part of the dota elite yet? |
21:20:40 | dom96 | EXetoC: We haven't played in a while. |
21:26:24 | Araq | xtagon: tut2 on master contains an excessive tutorial of how to approach creating macros |
21:26:41 | Araq | hi wat_ welcome |
21:26:45 | xtagon | Araq, great I'll check that out. |
21:28:29 | Araq | Varriount: thinking about it, you only need to modify 'replace' to get the 'split' you want |
21:33:45 | Araq | ping zielmicha-cloud_ |
21:34:27 | zielmicha-cloud_ | Pong |
21:34:40 | Araq | oh yay |
21:34:50 | Araq | did I miss a PR for osproc? |
21:35:11 | zielmicha-cloud_ | Yes. |
21:35:26 | Araq | damn |
21:36:14 | zielmicha-cloud_ | (It probably won't merge now.) |
21:38:27 | * | foxcub joined #nimrod |
21:38:49 | Araq | well since it's somewhat risky please do the PR against the devel branch |
21:39:03 | * | Varriount quit (Ping timeout: 272 seconds) |
21:39:06 | Araq | "master" is now supposed to be "stable" |
21:39:35 | Araq | where "stable" looks like a synonym for "dead" but oh well |
21:42:16 | zielmicha-cloud_ | Ok |
21:46:01 | foxcub | Araq: what's the ETA for user-defined type classes? |
21:46:26 | * | Varriount joined #nimrod |
21:46:37 | Araq | that's zahary1's business and we don't have a new ETA for 0.9.4 either |
21:47:19 | foxcub | Ok, cool. I'll ping him. But are you saying user-defined type classes are due in 0.9.4? |
21:48:49 | Araq | no, I don't know |
21:50:39 | Varriount | Araq, dom96: The builder hub is down. |
21:51:39 | dom96 | Fixed |
21:55:26 | Araq | hmm supporting f g(a, b) is rather simple to do |
21:55:34 | Araq | I wonder if it's a good idea |
21:56:01 | Araq | let a = await f(a, b) # sweet, hu? |
21:56:40 | zahary1 | but isn't this already suppoerted? |
21:56:59 | Araq | I don't think so let me check |
21:57:19 | * | foxcub quit (Quit: foxcub) |
21:57:39 | zahary1 | I'm using stuff like "accept foo(x, y)" in the test suite |
21:57:54 | dom96 | It's not. |
21:58:05 | Araq | do you use let a = accept foo(x, y) ? |
21:58:08 | dom96 | Not when you're assigning the result to something. |
21:58:19 | Araq | nkCommand is currently limited |
21:58:29 | zahary1 | yeah, I see |
21:59:03 | Araq | proc foo(x: int): int = discard |
21:59:05 | OrionPK | how come i cant pass this char* from C into my cstring :\ |
21:59:05 | Araq | let x = foo foo(1) |
21:59:11 | OrionPK | i keep getting a sigsegv |
21:59:19 | Araq | --> invalid indentation |
22:00:19 | Araq | OrionPK: my bet: the cause is entirely different |
22:00:53 | OrionPK | i've got char key[len] |
22:01:00 | OrionPK | filling it |
22:01:02 | OrionPK | printf("%s", key) works |
22:01:18 | OrionPK | then I pass it to append_header(client, key) |
22:01:24 | OrionPK | append_header is an exportc'd proc |
22:01:34 | OrionPK | 2nd param is a cstring |
22:01:44 | OrionPK | when I try to echo it, I get a sigsegv |
22:03:38 | Varriount | zahary1: Did you design the caas code for the compiler? |
22:03:50 | zahary1 | foxcub: I'll try to have a more stable version of the type classes in 0.9.4, but you should know that they are not completely unusable at the moment. if you want to start some kind of library based on them, now may be a good time - you should be able to navigate past the occasional limitations |
22:04:31 | zahary1 | Varriount: I wouldn't use "designed it". I've spent around a month getting it to work to its current broken state |
22:05:01 | Varriount | zahary1: Any reason why 'resetMemory' isn't called after every command? |
22:05:12 | zahary1 | there are a lot of places in the compiler that are not prepared for perpetual execution, but gradually things will get better |
22:06:46 | xtagon | Araq, I read the tut2 on master and tried to write a macro that should return the statement "Hello, $#!" % ["World"] |
22:06:55 | xtagon | Araq, but it doesn't work. Mind taking a look? https://gist.github.com/xtagon/7358e7f963526a0ef954 |
22:07:13 | xtagon | Araq, I get (6, 26) Error: value returned by statement has to be discarded |
22:07:23 | zahary1 | resetMemory is just an internal proc I used when I was chasing the old memory leaks of the GC. it tries to completely eradicate the effects of the previous compilation, in order for the GC to be required to free all the memory (it was failing to do so and the memory kept growing after each compilation) |
22:08:43 | Varriount | zahary1: Currently, in 'serve' mode, the compiler will partially repeat the output of the first command it was given, until the reset command is given. |
22:09:12 | zahary1 | it's no surprise that resetMemory fixes the problems (it brings the compiler to a completely fresh state), but also it defeats the purpose of the caas |
22:09:44 | Araq | xtagon: are you on master or on devel? |
22:09:46 | Varriount | zahary1: Not if you want to avoid spawning a new process for each keystroke in an ide, when using the idetools commands |
22:09:59 | xtagon | Araq, master |
22:10:09 | Araq | try devel then please |
22:10:13 | zahary1 | you want to avoid compiling all the code, not just spawning a process |
22:11:36 | xtagon | Araq, I was mistaken, I'm on devel. git ref 1aa0b8c |
22:11:55 | Araq | xtagon: bug report please |
22:12:14 | xtagon | Araq, will do |
22:12:22 | Araq | but try to add a "discard" somewhere |
22:12:45 | Varriount | I didn't know a macro could accept an argument type like a string. :/ |
22:13:28 | Araq | you should watch my talk then |
22:13:48 | Araq | however "s" is not a string within the body of the macro |
22:13:59 | zahary1 | it is now, I've fixed that |
22:14:08 | Araq | it's still an AST ... what? |
22:14:08 | zahary1 | as long as you use static[string] |
22:14:23 | Araq | -.- |
22:14:28 | Araq | that was no bug ... |
22:15:05 | zahary1 | we had this conversation once, most of the uses really need the string, not the AST tree |
22:15:13 | * | Varriount hands the Sacred Salmon of Slapping to Araq |
22:15:24 | zahary1 | we discussed it back when I implemented the compile-time rope formatting in the compiler |
22:15:31 | Araq | yeah but I liked the consistency |
22:17:01 | zahary1 | the problem is that the AST is only usable for built-in types |
22:17:20 | zahary1 | when you get static[TFoo], the AST is very inconvenient to navigate |
22:17:39 | Araq | not really |
22:18:01 | Araq | you get (1, "ab") for Foo = object a: int; b: string |
22:18:30 | dom96 | Isn't it simple to get the actual string from an AST node? |
22:18:52 | zahary1 | so, now dynamic typing is as nice as static typing? |
22:18:52 | Araq | yeah it is simple |
22:19:05 | * | foxcub joined #nimrod |
22:19:52 | zahary1 | and there is hardly point in having the AST if it's going to have the same structure each time (nkStrLit "foo"). it only makes sense to preserve it, if you get the AST of the call-site |
22:19:56 | xtagon | I'm not sure where I would add "discard" |
22:20:33 | Araq | xtagon: before every 'add' call |
22:20:39 | xtagon | Okay |
22:21:04 | Araq | zahary1: for static[string] you're right but otherwise it's not even guaranteed you get a string literal |
22:21:17 | xtagon | It didn't make a difference |
22:21:24 | zahary1 | yes, I'm discussing only static[string] here |
22:21:45 | Araq | oh ok, well static[string] has other problems |
22:21:52 | zahary1 | there is value in getting the AST of the call-site, but that's something I want in other situations |
22:22:10 | Araq | but automatic extraction of the value is indeed not one of those |
22:22:37 | zahary1 | what are the other problems you have in mind? |
22:23:49 | Araq | proc foo(x: static[string]) |
22:24:01 | Araq | proc foo(x: string) # overloaded |
22:24:22 | Araq | foo myVariable # crashes instead of calling foo(x: string) |
22:24:36 | zahary1 | why does it crash? |
22:24:57 | Araq | because myVariable can't be evaluated at compile time |
22:25:31 | Araq | maybe I misread your code though |
22:25:40 | zahary1 | yeah, but the old VM was able to handle it, so we just need to provide more graceful fallback for the new vm |
22:26:38 | zahary1 | the old VM returns nil when you try to evalConstExpr on a variable, so the first overload is not matched |
22:27:04 | Araq | yeah but I wasn't aware that parts of the compiler use that feature :P |
22:27:10 | zahary1 | :) |
22:27:18 | Araq | and I don't know whether it's a good idea |
22:28:07 | zahary1 | well, there must be a way to tell whether something is evaluatable or not. you have added to your to-do that you want implicitStatic to be the default |
22:28:24 | Araq | currently we have 'static' and 'const' and f(X) where X is a vector of constants and f has no side-effects as contexts for compile time evaluation |
22:29:10 | Araq | now we get 'foo X' where some "foo" can be overloaded to trigger a compile time evaluation |
22:29:42 | zahary1 | evaluation of X, right? |
22:30:00 | Araq | right |
22:30:14 | zahary1 | every param can be attempted for constant folding (that's what I thought you mean by implicitStatic by default) |
22:30:43 | Araq | implicitStatic is just an extension of constant folding |
22:30:52 | zahary1 | but anyway, there should be a way to tell if something is evaluatable or not. I don't see how you can call that a bad idea :) |
22:31:01 | Araq | and a rather natural extension |
22:31:26 | Araq | whereas your way might be better handled with a callsite 'static' but I'm not sure |
22:33:08 | zahary1 | meh, I don't see nothing wrong with it. I even have gone further with the semistatic type. have you noticed it? |
22:33:24 | zahary1 | type semistatic[T] = static[T] | T |
22:33:34 | Araq | yeah ... |
22:33:54 | Araq | saw it and decided to ignore it for now ;-) |
22:38:04 | zahary1 | btw, I also plan to experiment with more proper definition of "specificity" for the overloading. I've left some notes in typeRel. |
22:38:04 | zahary1 | static[int] is more specific than int, because every static[int] is also an int, but not every int is a static[int] |
22:38:45 | Araq | iirc sigmatch is performance sensitive |
22:38:59 | zahary1 | similar logic works for generic types as well. seq[seq[T]] is more specific than seq[T] |
22:38:59 | zahary1 | yes, I know. that's why I said "experiement" |
22:39:12 | Araq | you can try to build an array of function pointers instead of the initial case statement |
22:39:28 | Araq | that should speed up things |
22:39:39 | Araq | CPUs got stranger :P |
22:40:21 | Varriount | Could any of you spare some time to look at my winApi macro? I would like to make sure that I'm not missing any corner cases and such. |
22:40:33 | Araq | array of function pointers is now faster than computed goto, I think |
22:40:59 | zahary1 | hrm, that would surprise me |
22:42:43 | Araq | also you could try to get rid of the nkHiddenStdConv crap in sigmatch |
22:43:11 | Araq | and the crazy copyTree's that shouldn't be necessary since we keep the original ast anyway |
22:43:37 | zahary1 | what about the crazy idea with default arguments in non-last positions? |
22:43:57 | Araq | I'm fine with that, but don't build a state machine for that |
22:44:22 | Araq | don't go crazy and introduce regex-like matching |
22:44:28 | zahary1 | I wasn't planning. it will look at each proc individually |
22:44:33 | Araq | "hit or miss" should be enough |
22:48:40 | Araq | zahary1: one problem is that "evaluable at compile time" is not defined and things get hairy with -d:useFFI |
22:49:24 | Araq | IMHO you want full FFI power in a "static" section but in the other contexts a more conservative evaluation |
22:51:29 | zahary1 | I think most of the users will be happy with the conservative approach when it comes to static params. over time, we will annotate many of the FFI procs like `sqrt` to have noSideEffect and the situation will improve further |
22:52:31 | zahary1 | the way I see, static gives you one step in convenience over sting literals, because it enables things like concatenations, table lookups, etc |
22:52:58 | * | Icefoz joined #nimrod |
22:53:22 | zahary1 | I don't expect people to call into FFI-heavy things when using APIs expecting static params |
22:53:33 | * | Icefoz left #nimrod (#nimrod) |
22:54:01 | Araq | oh btw seq[seq[T]] already matches better than seq[T] |
22:54:33 | Araq | see complexDisambiguation :-) |
22:55:58 | xtagon | Araq, the macro thing works if I return expr instead of stmt (doh!) so I closed the bug |
22:56:14 | Araq | xtagon: ah, makes sense |
22:56:28 | Araq | but the line number is wrong then, right? |
22:57:44 | Araq | zahary1: works without constructing a witness, C++ requires witness construction afaik |
22:57:49 | * | darkf joined #nimrod |
22:58:07 | xtagon | Araq, yeah, looks like the line number is wrong |
22:58:34 | Araq | so reopen the bug ;-) |
22:58:38 | xtagon | Right-o |
22:58:57 | zahary1 | I've already committed some of the code. I'm defining subset relationships between the generic types and define "more specific" as "strict subset" |
22:59:26 | Araq | that's what C++ does, right? |
23:00:48 | Araq | the C# guys said they designed overloading resolution with their "components" goal in mind, aka "adding new code shouldn't break old code" but I never checked out how this can possibly work |
23:01:53 | Araq | ... overloading resolution is fundamentally at odds with this design principle |
23:05:38 | zahary1 | yes, it is at odds indeed. in generic code it's important to be able to change previously made selections |
23:06:10 | zahary1 | the C++ rules are similar in spirit, but I didn't bother to look at the implementations in clang/gcc |
23:06:57 | Araq | I looked at D's implementation years ago and at FPC's |
23:07:05 | * | foxcub quit (Quit: foxcub) |
23:07:11 | Araq | don't bother with these ;-) |
23:07:20 | Araq | but clang might be interesting |
23:14:08 | zahary1 | it's getting late, I'll be off to bed. |
23:14:45 | Araq | one more thing: are you fine with deprecating the "nil" statement? |
23:14:55 | zahary1 | sure |
23:15:48 | Araq | ok, good night |
23:15:54 | zahary1 | :) good night |
23:20:21 | xtagon | Is there a way to generate AST nodes in a macro in a more declarative way? i.e. not using add everywhere |
23:20:49 | Araq | xtagon: sure thing, there are 3 ways, but 1 of them is broken |
23:21:11 | Araq | 1. use macros.quote but it's broken |
23:21:33 | Araq | 2. use parseExpr/parseStmt and embed the ast in strings |
23:21:42 | Araq | 3. use helper templates and 'getAst' |
23:21:49 | Araq | I prefer (3) |
23:22:15 | xtagon | Cool, I'll look into that |
23:22:28 | xtagon | Where in the docs are the helper templates? |
23:23:21 | Araq | I think gradha wasn't aware of these when he wrote that part :P |
23:23:53 | xtagon | Ah |
23:26:16 | LordAndrew | Is there any sort of agreed upon style convention for Nimrod? |
23:27:13 | Araq | indent 2 spaces, TypesLikeThis, mostOtherStuffLikeThis |
23:27:48 | Araq | constants are special in that they can start with a lower or an upper case letter |
23:28:18 | Araq | old convention uses T for value types and P for pointer-like types but too many people complained |
23:29:09 | EXetoC | :< |
23:29:40 | Varriount | Araq: What do you think of window api overload procs that auto convert string parameters to widecstring or cstring parameters depending on useWinUnicode? |
23:30:39 | Varriount | Araq: Like this -> https://gist.github.com/Varriount/8512434 |
23:32:10 | Araq | Varriount: I don't mind it, but I think you should leave winlean alone, it's just some internal module really |
23:32:27 | Araq | instead you should split up windows.nim and clean up the cruft |
23:32:32 | Araq | nah, just kidding |
23:32:44 | Araq | translate the important headers with c2nim instead |
23:32:51 | Varriount | Erm. I've never split up windows.nim |
23:33:11 | Araq | we need better win API wrappers |
23:33:33 | Araq | windows.nim is old and absurdly large |
23:33:49 | Araq | I'm quite sure nobody needs even 10% of what's in there |
23:33:54 | Varriount | Araq: My mean goal is to have automatic conversion, and since you're against a string to WideCString converter.. this is the next best thing I could come up with |
23:33:58 | Varriount | *main |
23:34:09 | Varriount | *automatic string conversion |
23:34:13 | Araq | oh god no |
23:34:33 | Varriount | Araq: What's so bad about it? |
23:35:02 | Araq | so to avoid a converter you have 2 procs instead of 1 *everywhere*? I'd rather have the converter then instead |
23:35:09 | * | foxcub joined #nimrod |
23:35:34 | Varriount | Araq: Actually, 3. And the procs aren't *there*, they're dynamically generated with a macro |
23:35:49 | Araq | ah yeah |
23:35:58 | LordAndrew | automagic! |
23:36:04 | Araq | well you need this A vs W stuff in importc so a converter doesn't help anyway |
23:36:37 | Araq | why do we need 3 ? |
23:37:36 | Varriount | One is the proc without an 'a' or 'w' suffix, and no type conversion |
23:37:43 | * | jcrubino quit (Ping timeout: 260 seconds) |
23:37:55 | Varriount | One is the proc *with* an 'a' or 'w' suffix, and no type conversion |
23:38:11 | Araq | get rid of the suffixes, what's the point? |
23:38:15 | Varriount | One is the proc *without* an 'a' or 'w' suffix, and type conversion |
23:38:39 | Araq | 2 procs of the same name but one uses A version and the other W version |
23:39:57 | Varriount | Uh.. Yes? |
23:40:25 | dom96 | The 2 wrapper procs are exactly the same, except for the name? |
23:40:26 | Araq | no need for 3 procs? |
23:40:51 | Varriount | Well, they aren't wrappers, they are api imports |
23:41:00 | Varriount | But yes. |
23:42:42 | dom96 | yeah, you don't need 3 procs |
23:43:05 | dom96 | And converter looks more sane. |
23:43:08 | Varriount | One moment. |
23:43:16 | LordAndrew | Is there a procedure or such that will tell you what type something is? like istype(1) # int, etc |
23:43:20 | dom96 | This way you will generate twice as much code. |
23:43:47 | * | jcrubino joined #nimrod |
23:43:51 | Araq | dom96: converter can't work though |
23:44:07 | dom96 | LordAndrew: http://build.nimrod-lang.org/docs/manual.html#is-operator |
23:44:20 | Araq | as a converter can't inject the import: "FooA" vs import: "FooW" stuff, dom96 |
23:44:27 | dom96 | LordAndrew: Although you probably want type(1) |
23:44:48 | Varriount | Araq, dom96, look again at my gist |
23:45:50 | dom96 | Araq: Why are all the importc's importing the W version then in Varriount's gist? |
23:46:21 | Varriount | dom96: Because I have to have an example prefix. They could also be the "A" versions |
23:46:36 | * | io2 quit () |
23:46:54 | dom96 | So there is a define which determines this right? |
23:47:41 | dom96 | Can't you just declare a const importcSuffix = when defined(useWinASCII): "A" else: "W" ? |
23:48:11 | dom96 | And then concatenate the literal and the const? |
23:48:27 | Varriount | dom96: No, because I can't use that on identifiers, just strings. |
23:48:44 | Varriount | And that is what my macro does, when calculating the new identifiers. |
23:48:58 | Varriount | dom96: I updated the gist again |
23:48:59 | dom96 | Oh i see. |
23:49:59 | renesac | <Araq> I'm quite sure nobody needs even 10% of what's in there <-- the old openoffice problem: nobody uses even 10% of msoffice's features, but everybody uses a different 10% |
23:50:09 | dom96 | Right. Well I still don't understand why you need 3 procs. |
23:50:24 | Varriount | It gives those who want performance the ability to pass in WideCStrings (Araq) and those who want ease of use auto-conversion (me) |
23:50:44 | Varriount | dom96: Why? Which proc do you think could go or be replaced? |
23:50:55 | Araq | renesac: that's only a problem when you have lots of users ;-) |
23:51:02 | dom96 | Varriount: Either findFirstFile or findFirstFileW |
23:51:12 | dom96 | Varriount: Either the first proc or the second |
23:51:41 | renesac | be optimistic ^^" |
23:52:09 | dom96 | Varriount: Ahh, missed your explanation. That makes sense. |
23:52:23 | Varriount | dom96: If I pick the former, then you still have to use 'when useWinUnicode: ... else:...' in code using the findFirstFileW or findFirstFileA proc |
23:52:37 | Varriount | Which kinda defeats the purpose of the conversion |
23:52:46 | Varriount | Er, the conversion proc. |
23:54:02 | Varriount | If I pick the latter, then people complain about having no distinction between the two unicode/ansi versions of the procs when needed, and we lose backwards compatibility |
23:57:23 | Araq | just do it the way I suggested plus have a $? operator |
23:57:45 | Araq | $? either creates a wide string or a cstring depending on some -d:setting |
23:57:53 | Araq | problem solved |
23:58:28 | Araq | plus you can always call some other string constructor instead |
23:58:45 | Araq | if you don't want the setting to infere |
23:58:51 | Araq | *interfere |
23:59:33 | Varriount | Araq: I assume you're talking about the third proc, the conversion procedure generated for unicode api? |
23:59:40 | Varriount | *for the |