00:03:47 | * | JStoker quit (Excess Flood) |
00:14:41 | * | JStoker joined #nimrod |
01:06:35 | * | Boscop is now known as Boscop|birthday |
04:31:16 | * | SchalaZeal joined #nimrod |
04:32:33 | SchalaZeal | I think I have an idea what TUInteger = uint8|uint16|uint32|uint64 does but to be certain, is that basically an OR statement? |
04:34:53 | SchalaZeal | similar to a pegasus is a horse OR a bird? |
06:09:16 | * | JStoker quit (Excess Flood) |
06:11:12 | * | JStoker joined #nimrod |
06:11:12 | * | JStoker quit (Changing host) |
06:11:12 | * | JStoker joined #nimrod |
06:32:46 | * | SchalaZeal quit () |
07:12:08 | * | Trix[a]r_za is now known as Trixar_za |
07:13:10 | Trixar_za | My answer to the Pegasus question: No, just a very very confused horse with wings |
07:14:36 | Trixar_za | Also, damn you Araq. I read the python style guide yesterday and SPACES ARE THE NORM. |
07:37:00 | * | SchalaZeal joined #nimrod |
07:37:27 | SchalaZeal | I think doc gen might have a problem. |
07:37:54 | SchalaZeal | Thing is it's from the RTL's modules |
07:40:51 | Trixar_za | RTL? |
07:42:30 | * | XAMPP quit (Ping timeout: 246 seconds) |
07:43:11 | * | XAMPP joined #nimrod |
07:44:17 | * | XAMPP[0] joined #nimrod |
07:46:26 | Araq | hi SchalaZeal |
07:46:41 | Araq | what's the problem with docgen? |
07:47:44 | * | XAMPP quit (Ping timeout: 246 seconds) |
07:48:57 | SchalaZeal | uhm |
07:49:22 | SchalaZeal | Well, I'm looking at asyncio's documentation and it seems to be misgenerated. |
07:49:51 | * | XAMPP[0] quit (Ping timeout: 246 seconds) |
07:50:04 | SchalaZeal | None of TDelegate's public fields are documented. |
07:50:27 | Araq | because it has none? |
07:51:01 | SchalaZeal | Well I'm looking at the module's source and it has procedural variables with an asterisk in them |
07:51:40 | Araq | well which docs do you look at? |
07:51:49 | Trixar_za | I think half the fun of Nimrod is figuring out what does what |
07:52:05 | SchalaZeal | The website's, library documentation. |
07:52:50 | Araq | well this is the up to date one: http://build.nimrod-code.org/docs/asyncio.html |
07:52:53 | Araq | and you're right |
07:53:08 | Araq | it's because TDelegate itself is not exported |
07:53:32 | Araq | I think it's just a typo of dom96 |
07:53:46 | Araq | he forgot to export it, will ask him when he's around |
07:54:12 | SchalaZeal | That's good |
07:54:35 | Araq | but it should be rewritten to use closures instead :P |
07:54:57 | SchalaZeal | Are closures documented yet? |
07:55:02 | Araq | Trixar_za: hey, that's unfair, I try my best to have the docs up to date |
07:55:13 | Araq | SchalaZeal: there is not much to document |
07:55:31 | Araq | they just work (TM) |
07:55:35 | Araq | well not really |
07:55:40 | SchalaZeal | Well.. I honestly have no clue what they are. |
07:56:32 | Araq | a nested proc can access outer variables via a closure |
07:56:40 | Araq | this is *very* powerful |
07:56:43 | Trixar_za | Araq: Yeah, but you document like Python does. Listing function names with what they do. It's great when you know what you're doing. Not so much if you have no clue what's going on. |
07:57:12 | Trixar_za | I had to learn about asyncio before I could use it, for example |
07:57:28 | * | XAMPP joined #nimrod |
07:57:28 | * | XAMPP quit (Changing host) |
07:57:28 | * | XAMPP joined #nimrod |
07:58:22 | SchalaZeal | Judging from stuff like "TNumber* = distinct TInteger | TReal", I think whenever you get around to multiple inheritence, have it in the form of "Tfoo = object of Tbar | TBaz" |
08:00:47 | Araq | SchalaZeal: no ... |
08:00:52 | Araq | object of TBar, TBaz |
08:01:05 | Araq | the | means "alternative" |
08:01:14 | Araq | doesn't fit for multiple inheritance |
08:01:14 | SchalaZeal | Oh I see |
08:01:57 | Araq | Trixar_za: many modules contain example snippets, but we could certainly have more of them |
08:02:15 | Araq | I know it's all about examples |
08:02:16 | * | XAMPP[0] joined #nimrod |
08:02:39 | Araq | iirc einstein said that all learning is by examples |
08:03:08 | SchalaZeal | If I were to turn off the GC, would all refs act like ptrs? |
08:03:43 | * | XAMPP quit (Ping timeout: 264 seconds) |
08:04:06 | Araq | SchalaZeal: depends onto how you turn it off |
08:04:33 | SchalaZeal | Wasn't there a command line switch? |
08:04:35 | Trixar_za | Yeah, examples are nice. Speaking of which, I've noticed a bad trend with Python doc examples. They in a word suck. They only show the least amount of functionality that the library can do - the rest you work out by trail and error. |
08:04:52 | Trixar_za | Thank God for Google :P |
08:05:05 | Araq | if you do via --gc:none then there is no code generated so they act like 'ptr' yes |
08:05:24 | Araq | but you can't really free them :P |
08:05:48 | * | XAMPP joined #nimrod |
08:05:48 | * | XAMPP quit (Changing host) |
08:05:48 | * | XAMPP joined #nimrod |
08:05:52 | Araq | Trixar_za: IMHO nimrod's docs are already better than python's due to the type signatures everywhere |
08:06:46 | Araq | and next versions of the docgen will improve so that it works with macros |
08:06:56 | Araq | and will generate more cross references |
08:07:07 | Araq | and have a "show implementation" feature |
08:07:39 | Trixar_za | So it refers to other modules that have implemented the module? |
08:07:42 | * | XAMPP[0] quit (Ping timeout: 246 seconds) |
08:07:53 | Trixar_za | Well, modules and examples files |
08:09:24 | dom96 | hello |
08:09:52 | SchalaZeal | *waves* |
08:11:04 | SchalaZeal | By the way, since adopting nimrod-git in the AUR I've fixed it up and added c2nim and pas2nim to the package. I thought perhaps you'd like to do the same with the nimrod package, Dom. |
08:11:40 | dom96 | Will do :) |
08:12:40 | SchalaZeal | Also I packaged nael and cahbot too. I'm not that smart to use them but they seemed interesting enough. |
08:13:25 | * | XAMPP[0] joined #nimrod |
08:13:25 | * | XAMPP quit (Ping timeout: 255 seconds) |
08:14:25 | Trixar_za | Oo |
08:14:36 | Trixar_za | Arch user then |
08:15:21 | SchalaZeal | Yeah |
08:15:23 | dom96 | That's pretty cool. Although i'm not sure how useful nael or cahbot are :P |
08:16:01 | SchalaZeal | I would package Aporia but I've sucked with building it in the past. |
08:16:29 | dom96 | Not to worry, I will package it as soon as the next version comes out. |
08:16:53 | dom96 | SchalaZeal, Araq: Yeah, that is a typo. TDelegate should be exported, sorry. |
08:16:58 | SchalaZeal | Alright. I'm currently coding in KWrite, heh. |
08:17:47 | * | XAMPP_ joined #nimrod |
08:18:06 | * | dom96 gets shivers every time he sees the name of an application which begins with a 'K' |
08:18:11 | * | XAMPP[0] quit (Ping timeout: 246 seconds) |
08:18:17 | dom96 | KDE *shivers* |
08:18:20 | SchalaZeal | lol why? |
08:18:38 | SchalaZeal | What's wrong with it? |
08:18:40 | dom96 | I'm just not a fan of KDE for some reason. |
08:19:14 | dom96 | I should probably try it again though. I haven't used KDE in a long time. |
08:20:05 | dom96 | SchalaZeal: btw what are you making with asyncio? anything interesting? :P |
08:20:33 | SchalaZeal | Well, do you know about the Hotline protocol? |
08:22:03 | * | XAMPP_ quit (Ping timeout: 246 seconds) |
08:22:04 | dom96 | nope |
08:22:11 | SchalaZeal | hotline.wikia.com |
08:23:33 | SchalaZeal | I'm trying to make a Hotline client, server, and tracker suite with Nimrod. Though, the protocol implementation is being... difficult. |
08:24:09 | dom96 | i see |
08:24:30 | SchalaZeal | Trying to make a simple client that sends the identification message, gets a server response and closes |
08:25:43 | SchalaZeal | Beyond that, it looks like I need to find a way to make a byte buffer object |
08:26:57 | Araq | SchalaZeal: just use 'string' for that ;-) |
08:27:19 | Araq | a string is fine byte buffer |
08:28:01 | Araq | thanks to utf-8 and C's lack of abstraction we're stuck with this hack forever so I embrace it nowadays |
08:29:09 | SchalaZeal | Well I tried looking at docs but I just don't know how a 2+ byte integer would be represented in a string in Nimrod other than the stringized value...... |
08:29:14 | SchalaZeal | Unless... hmm... |
08:29:30 | SchalaZeal | Maybe I have my old C++ swap functions for reference |
08:30:39 | SchalaZeal | I suck at bit shifting so I did it using dereferenced pointers as bit arrays |
08:33:14 | SchalaZeal | ew...... http://pastebin.com/kG5VCmwE |
08:33:15 | Araq | er what? o.O |
08:33:23 | SchalaZeal | Did I really type that crap? |
08:34:09 | SchalaZeal | oops |
08:34:11 | Araq | result = newString(length) |
08:34:12 | SchalaZeal | wrong function |
08:34:31 | Araq | readBuffer(socket, cstring(result), length) |
08:34:34 | Araq | or something like that |
08:36:46 | SchalaZeal | As for asyncio, the userArg bit I find very confusing. I don't know what it would do. I thought this was for TSocket |
08:37:10 | Araq | it's a hack around missing closures :P |
08:37:22 | Araq | if you don't need it, just ignore it |
08:38:07 | SchalaZeal | Alright, because this bit got me: "Most (if not all) modules that use asyncio provide a userArg" |
08:41:14 | SchalaZeal | ...oh nuts........ all the proc vars in TDelegate have a PObject parameter |
08:43:09 | SchalaZeal | Hmm... I think I need an example of asyncio to know what the heck I'd do |
08:54:55 | Tasser | dumdumdidum |
08:55:05 | Tasser | I'm freakking coding in xml... |
08:55:26 | Araq | Tasser: build.xml? |
08:57:17 | SchalaZeal | Hmm....apparently the compiler does not like comma separated lists of variable declarations that aren't on the same line. |
08:58:41 | SchalaZeal | http://pastebin.com/HVsGidTn |
08:59:13 | Araq | it's the comment after 'object' that is misaligned I think |
08:59:35 | Tasser | Araq, some part will be generated, but as there's logic in that XML, I'll write some by hand, as I'd have to think of another way to serialize that |
08:59:59 | Araq | Tasser: use json :P |
09:00:10 | Tasser | Araq, json doesn't have attributes |
09:00:12 | Araq | using xml for data is braindead |
09:00:18 | Tasser | not in CL |
09:00:37 | SchalaZeal | Well, the compiler points to 21,4, and line 21 is " name*," |
09:00:49 | Araq | it's been designed for *documents* aka semi structured data |
09:00:59 | Araq | I bet you use it for structured data :P |
09:01:25 | Tasser | http://wiki.apertium.org/wiki/Monodix_basics |
09:03:37 | SchalaZeal | Hmm...looks like I'll need to break the page guide line for this |
09:08:28 | SchalaZeal | oh |
09:08:32 | SchalaZeal | I see |
09:17:12 | Tasser | Araq, you think I could somehow abuse the nimrod compiler to generate XML? :-) |
09:17:15 | Tasser | or simply use YAML |
09:17:57 | Araq | hm you can use a macro to transform your code into a string containing XML |
09:18:12 | Araq | sounds like fun |
09:18:20 | SchalaZeal | fixed |
09:18:27 | SchalaZeal | time to see the result |
09:18:33 | Araq | and you'd be busy with meta programming instead of doing actual productive work :-) |
09:18:42 | Araq | so go for it |
09:19:59 | Tasser | Araq, nah, no fun |
09:20:09 | Tasser | I'll generate enough of the XML |
09:20:12 | Tasser | soooo |
09:23:18 | SchalaZeal | Is there a way to align ranges? |
09:23:25 | SchalaZeal | similar to enums |
09:23:42 | Araq | what? |
09:23:47 | Araq | you can align enums? |
09:23:49 | Araq | how so? |
09:23:57 | SchalaZeal | I thought there was a pragma? |
09:24:15 | SchalaZeal | TEnum{.align: 1.} = enum |
09:24:25 | SchalaZeal | or something |
09:24:35 | Araq | that may compile :P |
09:24:43 | Araq | but the compiler doesn't do anything with it |
09:25:01 | SchalaZeal | Wasn't there such a pragma earlier? |
09:26:02 | Araq | sure but it's for internal usage :P |
09:26:14 | Araq | as it doesn't do what you think it does |
09:26:31 | Araq | you can use TEnum {.size: 4.} though |
09:28:36 | SchalaZeal | oooh! THAT'S what I remember |
09:28:59 | SchalaZeal | silly me |
09:30:41 | SchalaZeal | is the size pragma applicable to vars? |
09:37:22 | Araq | no |
09:37:31 | Tasser | what's align? |
09:37:42 | SchalaZeal | nuts.... so types only? |
09:37:47 | Araq | yes |
09:37:51 | SchalaZeal | ok |
09:38:01 | Araq | and only for 'enum' and perhaps 'range' |
09:38:11 | Araq | I don't know about 'range' :P |
09:38:16 | Araq | could work |
09:40:13 | SchalaZeal | Would be convenient |
09:42:57 | Araq | I think what you really want is something like this: http://archive.adaic.com/standards/83lrm/html/lrm-13-04.html |
09:43:22 | Araq | I love that feature of Ada and wished Nimrod would have it, but it's lots of work to implement |
09:44:00 | SchalaZeal | I'm drooling... |
09:44:04 | SchalaZeal | hehe |
09:44:51 | SchalaZeal | Eh well, something for 2.0 I guess |
09:45:01 | SchalaZeal | or possibly 1.0 |
09:45:05 | SchalaZeal | *shrug* |
09:52:04 | SchalaZeal | Range types can be sized btw |
09:52:10 | SchalaZeal | just tested |
10:24:27 | * | SchalaZeal quit (Quit: Konversation terminated!) |
12:53:55 | * | Trixar_za is now known as Trix[a]r_za |
13:07:24 | * | Boscop|birthday is now known as Boscop |
14:09:38 | * | Trix[a]r_za is now known as Trixar_za |
16:20:08 | * | Trixar_za is now known as Trix[a]r_za |
16:21:51 | Araq | zahary: if I have: |
16:21:59 | Araq | var x: withDestructor |
16:22:02 | Araq | result = x |
16:22:14 | Araq | I suppose the destructor is invoked at scope exit? |
16:31:28 | zahary | yep |
16:42:06 | Araq | so it's good we have named return value optimazion via 'result' :-) |
16:51:45 | zahary | well, yeah. we have to be careful where that destroyed is not called before "returning" the variable in the generated code |
16:52:02 | zahary | I thought you are going to ask about avoiding the destructor call which is also possible in theory |
16:52:33 | zahary | * careful that the destructor is not called * |
17:24:33 | Araq | damn I have to go, see you later |
18:10:22 | * | Trix[a]r_za is now known as Trixar_za |
19:54:37 | * | Trixar_za is now known as Trix[a]r_za |
20:14:52 | Araq | so zahary please elaborate |
20:15:06 | Araq | how would I prevent invokation of the destructor? |
20:15:23 | Araq | and what's up with the 'distinct int|...' stuff? |
23:49:51 | * | Trix[a]r_za is now known as Trixar_za |