<<20-06-2012>>

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:33SchalaZealI think I have an idea what TUInteger = uint8|uint16|uint32|uint64 does but to be certain, is that basically an OR statement?
04:34:53SchalaZealsimilar 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:10Trixar_zaMy answer to the Pegasus question: No, just a very very confused horse with wings
07:14:36Trixar_zaAlso, damn you Araq. I read the python style guide yesterday and SPACES ARE THE NORM.
07:37:00*SchalaZeal joined #nimrod
07:37:27SchalaZealI think doc gen might have a problem.
07:37:54SchalaZealThing is it's from the RTL's modules
07:40:51Trixar_zaRTL?
07:42:30*XAMPP quit (Ping timeout: 246 seconds)
07:43:11*XAMPP joined #nimrod
07:44:17*XAMPP[0] joined #nimrod
07:46:26Araqhi SchalaZeal
07:46:41Araqwhat's the problem with docgen?
07:47:44*XAMPP quit (Ping timeout: 246 seconds)
07:48:57SchalaZealuhm
07:49:22SchalaZealWell, 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:04SchalaZealNone of TDelegate's public fields are documented.
07:50:27Araqbecause it has none?
07:51:01SchalaZealWell I'm looking at the module's source and it has procedural variables with an asterisk in them
07:51:40Araqwell which docs do you look at?
07:51:49Trixar_zaI think half the fun of Nimrod is figuring out what does what
07:52:05SchalaZealThe website's, library documentation.
07:52:50Araqwell this is the up to date one: http://build.nimrod-code.org/docs/asyncio.html
07:52:53Araqand you're right
07:53:08Araqit's because TDelegate itself is not exported
07:53:32AraqI think it's just a typo of dom96
07:53:46Araqhe forgot to export it, will ask him when he's around
07:54:12SchalaZealThat's good
07:54:35Araqbut it should be rewritten to use closures instead :P
07:54:57SchalaZealAre closures documented yet?
07:55:02AraqTrixar_za: hey, that's unfair, I try my best to have the docs up to date
07:55:13AraqSchalaZeal: there is not much to document
07:55:31Araqthey just work (TM)
07:55:35Araqwell not really
07:55:40SchalaZealWell.. I honestly have no clue what they are.
07:56:32Araqa nested proc can access outer variables via a closure
07:56:40Araqthis is *very* powerful
07:56:43Trixar_zaAraq: 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:12Trixar_zaI 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:22SchalaZealJudging 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:47AraqSchalaZeal: no ...
08:00:52Araqobject of TBar, TBaz
08:01:05Araqthe | means "alternative"
08:01:14Araqdoesn't fit for multiple inheritance
08:01:14SchalaZealOh I see
08:01:57AraqTrixar_za: many modules contain example snippets, but we could certainly have more of them
08:02:15AraqI know it's all about examples
08:02:16*XAMPP[0] joined #nimrod
08:02:39Araqiirc einstein said that all learning is by examples
08:03:08SchalaZealIf I were to turn off the GC, would all refs act like ptrs?
08:03:43*XAMPP quit (Ping timeout: 264 seconds)
08:04:06AraqSchalaZeal: depends onto how you turn it off
08:04:33SchalaZealWasn't there a command line switch?
08:04:35Trixar_zaYeah, 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:52Trixar_zaThank God for Google :P
08:05:05Araqif you do via --gc:none then there is no code generated so they act like 'ptr' yes
08:05:24Araqbut 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:52AraqTrixar_za: IMHO nimrod's docs are already better than python's due to the type signatures everywhere
08:06:46Araqand next versions of the docgen will improve so that it works with macros
08:06:56Araqand will generate more cross references
08:07:07Araqand have a "show implementation" feature
08:07:39Trixar_zaSo it refers to other modules that have implemented the module?
08:07:42*XAMPP[0] quit (Ping timeout: 246 seconds)
08:07:53Trixar_zaWell, modules and examples files
08:09:24dom96hello
08:09:52SchalaZeal*waves*
08:11:04SchalaZealBy 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:40dom96Will do :)
08:12:40SchalaZealAlso 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:25Trixar_zaOo
08:14:36Trixar_zaArch user then
08:15:21SchalaZealYeah
08:15:23dom96That's pretty cool. Although i'm not sure how useful nael or cahbot are :P
08:16:01SchalaZealI would package Aporia but I've sucked with building it in the past.
08:16:29dom96Not to worry, I will package it as soon as the next version comes out.
08:16:53dom96SchalaZeal, Araq: Yeah, that is a typo. TDelegate should be exported, sorry.
08:16:58SchalaZealAlright. 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:17dom96KDE *shivers*
08:18:20SchalaZeallol why?
08:18:38SchalaZealWhat's wrong with it?
08:18:40dom96I'm just not a fan of KDE for some reason.
08:19:14dom96I should probably try it again though. I haven't used KDE in a long time.
08:20:05dom96SchalaZeal: btw what are you making with asyncio? anything interesting? :P
08:20:33SchalaZealWell, do you know about the Hotline protocol?
08:22:03*XAMPP_ quit (Ping timeout: 246 seconds)
08:22:04dom96nope
08:22:11SchalaZealhotline.wikia.com
08:23:33SchalaZealI'm trying to make a Hotline client, server, and tracker suite with Nimrod. Though, the protocol implementation is being... difficult.
08:24:09dom96i see
08:24:30SchalaZealTrying to make a simple client that sends the identification message, gets a server response and closes
08:25:43SchalaZealBeyond that, it looks like I need to find a way to make a byte buffer object
08:26:57AraqSchalaZeal: just use 'string' for that ;-)
08:27:19Araqa string is fine byte buffer
08:28:01Araqthanks to utf-8 and C's lack of abstraction we're stuck with this hack forever so I embrace it nowadays
08:29:09SchalaZealWell 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:14SchalaZealUnless... hmm...
08:29:30SchalaZealMaybe I have my old C++ swap functions for reference
08:30:39SchalaZealI suck at bit shifting so I did it using dereferenced pointers as bit arrays
08:33:14SchalaZealew...... http://pastebin.com/kG5VCmwE
08:33:15Araqer what? o.O
08:33:23SchalaZealDid I really type that crap?
08:34:09SchalaZealoops
08:34:11Araqresult = newString(length)
08:34:12SchalaZealwrong function
08:34:31AraqreadBuffer(socket, cstring(result), length)
08:34:34Araqor something like that
08:36:46SchalaZealAs 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:10Araqit's a hack around missing closures :P
08:37:22Araqif you don't need it, just ignore it
08:38:07SchalaZealAlright, because this bit got me: "Most (if not all) modules that use asyncio provide a userArg"
08:41:14SchalaZeal...oh nuts........ all the proc vars in TDelegate have a PObject parameter
08:43:09SchalaZealHmm... I think I need an example of asyncio to know what the heck I'd do
08:54:55Tasserdumdumdidum
08:55:05TasserI'm freakking coding in xml...
08:55:26AraqTasser: build.xml?
08:57:17SchalaZealHmm....apparently the compiler does not like comma separated lists of variable declarations that aren't on the same line.
08:58:41SchalaZealhttp://pastebin.com/HVsGidTn
08:59:13Araqit's the comment after 'object' that is misaligned I think
08:59:35TasserAraq, 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:59AraqTasser: use json :P
09:00:10TasserAraq, json doesn't have attributes
09:00:12Araqusing xml for data is braindead
09:00:18Tassernot in CL
09:00:37SchalaZealWell, the compiler points to 21,4, and line 21 is " name*,"
09:00:49Araqit's been designed for *documents* aka semi structured data
09:00:59AraqI bet you use it for structured data :P
09:01:25Tasserhttp://wiki.apertium.org/wiki/Monodix_basics
09:03:37SchalaZealHmm...looks like I'll need to break the page guide line for this
09:08:28SchalaZealoh
09:08:32SchalaZealI see
09:17:12TasserAraq, you think I could somehow abuse the nimrod compiler to generate XML? :-)
09:17:15Tasseror simply use YAML
09:17:57Araqhm you can use a macro to transform your code into a string containing XML
09:18:12Araqsounds like fun
09:18:20SchalaZealfixed
09:18:27SchalaZealtime to see the result
09:18:33Araqand you'd be busy with meta programming instead of doing actual productive work :-)
09:18:42Araqso go for it
09:19:59TasserAraq, nah, no fun
09:20:09TasserI'll generate enough of the XML
09:20:12Tassersoooo
09:23:18SchalaZealIs there a way to align ranges?
09:23:25SchalaZealsimilar to enums
09:23:42Araqwhat?
09:23:47Araqyou can align enums?
09:23:49Araqhow so?
09:23:57SchalaZealI thought there was a pragma?
09:24:15SchalaZealTEnum{.align: 1.} = enum
09:24:25SchalaZealor something
09:24:35Araqthat may compile :P
09:24:43Araqbut the compiler doesn't do anything with it
09:25:01SchalaZealWasn't there such a pragma earlier?
09:26:02Araqsure but it's for internal usage :P
09:26:14Araqas it doesn't do what you think it does
09:26:31Araqyou can use TEnum {.size: 4.} though
09:28:36SchalaZealoooh! THAT'S what I remember
09:28:59SchalaZealsilly me
09:30:41SchalaZealis the size pragma applicable to vars?
09:37:22Araqno
09:37:31Tasserwhat's align?
09:37:42SchalaZealnuts.... so types only?
09:37:47Araqyes
09:37:51SchalaZealok
09:38:01Araqand only for 'enum' and perhaps 'range'
09:38:11AraqI don't know about 'range' :P
09:38:16Araqcould work
09:40:13SchalaZealWould be convenient
09:42:57AraqI think what you really want is something like this: http://archive.adaic.com/standards/83lrm/html/lrm-13-04.html
09:43:22AraqI love that feature of Ada and wished Nimrod would have it, but it's lots of work to implement
09:44:00SchalaZealI'm drooling...
09:44:04SchalaZealhehe
09:44:51SchalaZealEh well, something for 2.0 I guess
09:45:01SchalaZealor possibly 1.0
09:45:05SchalaZeal*shrug*
09:52:04SchalaZealRange types can be sized btw
09:52:10SchalaZealjust 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:51Araqzahary: if I have:
16:21:59Araqvar x: withDestructor
16:22:02Araqresult = x
16:22:14AraqI suppose the destructor is invoked at scope exit?
16:31:28zaharyyep
16:42:06Araqso it's good we have named return value optimazion via 'result' :-)
16:51:45zaharywell, yeah. we have to be careful where that destroyed is not called before "returning" the variable in the generated code
16:52:02zaharyI thought you are going to ask about avoiding the destructor call which is also possible in theory
16:52:33zahary* careful that the destructor is not called *
17:24:33Araqdamn 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:52Araqso zahary please elaborate
20:15:06Araqhow would I prevent invokation of the destructor?
20:15:23Araqand what's up with the 'distinct int|...' stuff?
23:49:51*Trix[a]r_za is now known as Trixar_za