<<05-03-2013>>

00:31:35*q66 quit (Remote host closed the connection)
00:32:04*q66 joined #nimrod
01:11:23*q66 quit (Remote host closed the connection)
04:56:02*Boscop quit (Read error: Connection reset by peer)
04:56:21*Boscop joined #nimrod
06:23:22*gour joined #nimrod
08:02:20*Araq_ joined #nimrod
08:22:40*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331])
11:49:24*fowl joined #nimrod
11:54:28*Araq_ joined #nimrod
12:03:25*Araq_ quit (Quit: ChatZilla 0.9.90 [Firefox 19.0/20130215130331])
12:07:32*fowl quit (Quit: Leaving)
12:51:21*fowl joined #nimrod
13:12:09*q66 joined #nimrod
14:23:20*Trix[a]r_za is now known as Trixar_za
14:58:01*gour quit (Disconnected by services)
14:58:03*gour_ joined #nimrod
15:54:03*Trixar_za is now known as Trix[a]r_za
19:54:04*gradha joined #nimrod
19:54:51Araqgradha: I have some ideas about the m&s bug you encountered but I'd like some remote access to the testing machine :P
19:55:11Araqbut not now, tbh I don't consider it that important ;-)
19:57:28gradhayuck, looks like I'll have to reconfigure the network to allow sshd
19:58:37gradhawhy don't we have ipv6 and have to keep using nat
19:59:30Araqwhy don't we have a module system for C and have to keep using #include?
20:00:24gradhawhich segways into the forum post http://forum.nimrod-code.org/t/134, asking about providing nimrod "binaries" or static libraries without source, I guess
20:01:27AraqI answered that multiple times already
20:01:57gradhaeasy then, point to the documentation
20:04:02Araqwhy does not nobody ask why Nimrod doesn't provide the Second Futamura Projection instead of a macro system?
20:04:26gradhathe second season of futurama? sign me in!
20:05:02gradhaok, that's niche, there's no wikipedia page for second futamura projection
20:06:41dom96http://en.wikipedia.org/wiki/Partial_evaluation#Futamura_projections
20:07:13gradhabut http://blog.sigfpe.com/2009/05/three-projections-of-doctor-futamura.html has pictures, it has to be better
20:10:45*FreeArtMan joined #nimrod
20:18:18gradhaAraq, after reading about futamura fishes I ask you this question: why would you ever want to do any futamura projection when you have macros?
20:19:52gradhameh, ignore this question, I'm more certain now I don't understand anything I've read in the last 10 minutes
20:19:58Araqfutamura projections lead to less code when you have a DSL that should work at runtime and at compile-time
20:20:30Araqyou only need to define the runtime version and some specialization rules
20:21:07Araqbut I think it can be done this way already because of Nimrod's awesomeness
20:21:25gradhaI'll have to meditate on the subject
20:21:33Araqso do I
20:22:12gradhaI'm really glad I have youtube, the world would be such a pain if I started to really think
20:25:16Araqgradha: tell me again what static methods look like in obj-c please
20:25:32AraqI mean the call syntax
20:25:51gradhathe syntax is [classname methodname:args]
20:26:15gradhathey are differentiated from instance methods by using a + instead of a - in their declaration
20:26:21Araqand args are named?
20:26:35gradhathere's no other difference with regards to instance methods
20:26:44gradhathey just replace the object with the class name
20:26:50Araq[classname methodname a:arg1 b:arg2] ?
20:27:05gradhathat would likely be [classname methodname:arg1 b:arg2]
20:27:15Araqah yeah
20:27:36Araqobjc's syntax is absurd crap
20:28:57gradhahere's a class prototype with both static and instance methods https://github.com/gradha/ELHASO-iOS-snippets/blob/master/src/EHActivityView.h
20:29:18AraqI came up with a pretty general solution for these things
20:29:19gradhathis one has a parameter, just like a normal instance method: https://github.com/gradha/ELHASO-iOS-snippets/blob/master/src/UIImageView%2BELHASO.h
20:29:30Araqturns out it doesn't work :-/
20:29:45Araqbecause objc's syntax is too hard to generalize over
20:30:01gradhaI think the self naming convention I described in the github ticket should be enough
20:30:21gradhabut why are you worrying about that? It's on my plate
20:30:30gradhaI only have to learn about futurama fishes first
20:30:42Araqyou mean you'll implement that in the compiler?
20:30:43gradhasorry, about macros
20:30:55gradhaI was planning to do that with a normal macro
20:31:04gradhaand when I was capable, look at the compiler one
20:31:13Araqdunno if it can be done with a macro
20:31:26Araqmacro emitting an 'emit' ... hrm
20:31:33gradhathat's a bad thing to say to a motivated person
20:31:46Araqok ok, it's possible :P
20:31:51gradhayay!
20:32:01gradhayou only have to wait, that's the worst part
20:32:47gradhayou could also implement it and say in the commit "minor cleanup fixes", so I don't see it
20:36:35NimBotAraq/Nimrod 2306e0e Araq [+0 ±2 -0]: bugfix: tvtable works again
20:36:35NimBotAraq/Nimrod cdb3453 Araq [+0 ±3 -0]: fixed some typos
20:36:44Araqthere you go, gradha ;-)
20:36:58gradhaI won't look at that
20:37:40gradhawhy is the objc syntax absurd crap? all in general or just for static methods? I guess both, since the only difference between one and the other is the use of self/classname
20:37:52Araqboth
20:38:47gradhaIIRC that syntax grew out of the need to not break existing C code, have any other languages done it in a different way also supporting C?
20:40:06gradhadon't know if the C++ broke any C in the process
20:41:30Araqiirc that syntax was copied from smalltalk with no consideration if it fits C's style or not
20:42:37Araqand it's weird anyway: [x foo: a withArg: b] # so a's parameter name is missing?
20:42:57reactormonkAraq, wikipedia says so anyway
20:43:28gradhayes, the first param name missing is why objc naming convention tells you to embed it in the method name
20:44:29Araqobjc fits macosx quite well
20:44:52reactormonklooks fancy and does the job somewhat?
20:45:14Araqunix + lay some bullshit on top that has a completely different philosophy
20:45:38reactormonklike NextStep?
20:45:47gradhaif they weren't different they wouldn't be another platform, just a unix variant
20:47:00gradhayou don't have to use the bullshit on top, though, so you get the unix philosphy
20:47:12Araqyay ...
20:47:37Araqbut I hate the unix stuff too ;-)
20:49:05gradhaI really dislike how the industry is trying to retrofit security into the current platforms instead of creating a new proper one from scratch
20:49:43Araqthe "new proper one from scratch" has been tried too; it's called "Java"
20:50:08gradhasurely you jest, is there a JavaOS
20:50:10gradha?
20:50:25gradhaoh, maybe inferno/limbo/what was that called?
20:50:32Araqthere have been a couple of JavaOSes
20:50:38Araqthey all failed
20:50:54Araqbut then the chance for an OS to succeed are tiny anyway
20:51:19gradhathe thing is, javaos doesn't mean anything at all with regards to security, just maybe an implementation detail, if your security model is wrong, it's still wrong
20:51:48Araqdon't let me rant about "security"
20:52:31gradhain my previous fluffy statement I was thinking how current OSes are top/down, which doesn't make sense and allows any bug to be a potential security risk
20:52:51Araqwhenever you do ./configure && make && make install the 40K configure script could easily upload all your home directory to some unknown server
20:53:06Araqor at least delete it
20:53:31gradhayes, that's why in a secure minded platform the configure would not be allowed to connect to the network or remove files outside it's reach
20:53:45gradhabut these things are implemented now in the top/down systems, so any bug allows everything
20:53:58Araqyou can prevent it already
20:54:02Araqbut nobody does so
20:54:39gradhaI recall software like apparmor for linux which did stuff like this, restrict access on a fine grained level
20:54:53reactormonkgradha, yeah, I think ubuntu uses some of it
20:55:13gradhamacs have been trying to force developers to use such "access profiles" too for some years
20:55:33Araqhey, why bother? at least it can't delete the stuff that was copied from the installation CD ... :P
20:55:40reactormonkwell, android and ios base on that
20:56:06gradhareactormonk: app store on macs does the same thing, if you allow it to
20:56:26reactormonkgradha, that's just the app store from the ios transitioned
20:56:40Araquseful thing that is ... so it can only damage my work
20:57:07Araqbut the admin doesn't have any work with it
20:57:52reactormonkAraq, yeah, *nix stuff comes from mainframes where user data wasn't overly important :-/
20:57:57gradhareactormonk: you could do so previous to the appstore too, at https://www.romab.com/ironsuite/ they had some "hardened" profiles for common apps using the basic OS support
20:58:56gradhain typical apple fashion this part of the security on the os was "poorly documented", until they released the actual app store
20:59:26reactormonkwhy document something they don't use
20:59:42gradhawhy implement something they don't use
21:01:41*FreeArtMan quit (Ping timeout: 245 seconds)
21:03:30Araqok attention please!
21:03:34gradhayes sir!
21:04:03Araqsyntax question: TObject(a: 1, b: 1) will be an object constructor
21:04:36Araqhowever: how to make a 'ref object' instead?
21:05:16gradhacan't that be done by looking at what you are assigning that to?
21:05:26AraqPObject(a: 1, b: 2) ? # requires type name
21:05:43Araqgradha: no that's too ambiguous
21:06:20AraqTObject.new(a: 1, b: 2) ?
21:07:08gradhahow about not having to declare Pobject variants? You could then use PObject without requring an explicit type
21:07:26Araqhow can that work?
21:07:50Araqtype TObject = object # compiler declares PObject for you?
21:07:58gradhayes
21:08:02Araqthat's too much magic
21:08:13gradhabut people love magic
21:08:28Araqplus a lot of people dislike T/P prefixes for types
21:08:43Araqso we'd better not hardcode them in the compiler
21:08:54gradhathey don't like them because they don't come with the magic, it's all manual now, which is the part they don't like
21:09:12Araqit's not all manual now
21:09:24Araqyou can do type PObject = ref object
21:09:44Araqor you can use a template to fight the boilerplate
21:09:53Araqthe manual even contains an example of how to do that
21:11:08reactormonkAraq, TObject.new(a:1) and TObject.newref(a:1) ?
21:11:27reactormonkor different keywords for value and ref?
21:11:32Araqreactormonk: nah that's confusing
21:11:48AraqTObject(a: 1) is already set in stone :P
21:11:54reactormonkAraq, or fuck it and go for ref TObject(a: 1, b: 1)
21:12:05gradhahmm... so if I have a TObject, and create a ref of TObject, am I creating an "anonymous ref TObject" at compile time?
21:12:41Araqreactormonk: 'ref TObject()' is worse than 'new TObject()'
21:12:47reactormonkAraq, why?
21:13:20Araqbecause you mean in fact: (ref TObject)(a: 1, b: 2)
21:13:33Araqbut of course you left out the ()
21:13:53Araqwhich doesn't parse well however
21:14:06reactormonkwouldn't ref TObject be PObject which would result in PObject(a: 1)
21:14:31reactormonkor create an anonymous object and create a reference to it
21:14:54Araq currently 'ref TObject(a: 1, b: 2)' is parsed as 'ref (TObject(a: 1, b: 2))'
21:15:28gradhause square brackets for the ref version TObject[a: 1, b: 2]
21:15:45gradhathat will make people love declaring their Pobjects and using PObject constructors
21:15:47Araqwell either you mean 'ref' as a sort of 'new' operator or you mean the type, reactormonk
21:16:07reactormonkAraq, Syntax would be mostly the same in most of the cases.
21:16:25Araqreactormonk: yeah that's why it's confusing :P
21:16:38reactormonkAraq, hm. which of the two paths would you prefer?
21:16:49gradhafor dereferencing you use [], so maybe TObject[](a: 1, b:2) implies a ref object returned
21:17:02AraqI am thinking of making 'new' a keyword and supporting 'new TObject(...)'
21:17:03reactormonkgradha, oh, I see
21:17:19reactormonkAraq, aww, factory pattern :-( ^^
21:17:32Araqreactormonk: yeah :-(
21:18:00reactormonkAraq, I'd prefer TObject(). Have you seen the way scala does it?
21:18:05reactormonkwith apply n stuff
21:18:24Araqhow does scala do it?
21:18:48Araqscala doesn't have ref object vs. object though
21:19:01reactormonkbesides the fact it's all reference they give you the ability to create companion objects where you can define apply so you have Object()
21:19:32reactormonkchange of location
21:23:11Araqhrm TObject.new(a: 1, b: 1) can be supported with some minor syntactic sugar
21:23:17dom96I like 'new TObject(...)' because it's quite similar to how it works currently. (We use new() for refs)
21:24:04AraqTObject.new(a: 1, b: 1) can be sugar for: TObject.new((a: 1, b: 2))
21:24:52Araqand then we have: proc new(typ: typedesc, tup: tuple)
21:25:56gradhawhy the need for a tuple, is there a problem if you called proc new(typ: typedesc, a, b: something)?
21:26:24Araqdom96: you can already use 'var x = TObject.new' btw
21:26:43Araqgradha: named parameters are with '=' in nimrod
21:27:28gradhadoes that mean I could call TObject.new() and not pass all parameters?
21:27:38Araqyou'd need a variadic argument with parameter names that correspond to the object's fields
21:27:52Araqgradha: yeah
21:28:16gradhaoh, so you don't like magic, but this is implementing magic for avoiding to write constructor methods?
21:29:05Araqit's not magic in the sense it injects arbitrary symbols into your scope
21:29:24Araqand it's not about avoiding to write constructor methods
21:29:44Araqthe current language NEEDS a constructor built-in for various reasons
21:30:32Araqthe most important reason is that 'case objects' cannot be made safe otherwise
21:31:09gradhahave you tried nested case objects?
21:31:23Araqno. have you?
21:31:45gradhaI saw it yesterday on my todo, might be good to consider it for these constructor syntaxes
21:32:29AraqI already have: TObject(discriminator: value, TSubObject(x: 1))
21:34:28gradhaTObject(discriminator: value, (ref TSubObject(x: 1)) sounds evil
21:34:54Araqnot really
21:35:08Araqbut I dislike 'ref' for 'new'
21:35:34Araqand I think I'll go with my TObject.new(a: 1, b: 2) idea
21:36:41Araqbut ugh
21:36:59Araqtype PObject = ref object
21:37:16AraqPObject.new(a: 1, b: 2) # creates a ref ref object? o.O
21:37:41Araqand with 'ref object' you can't access the value type necessary for 'new' :-/
21:37:41reactormonkAraq, why not simply PObject(a:1, b:2) ?
21:38:05Araqreactormonk: I guess that's better then, yeah
21:38:20gradhajust a moment ago you argued against that
21:38:42Araqyeah that's why I'm talking about it
21:38:56reactormonkand fuck with the precedence such that ref TObject(a:1, b:2) => (ref TObject)(a:1, b:2) ;-)
21:38:59AraqI wouldn't talk about it when I knew the solution
21:39:33Araqnah, introduce a type alias for 'ref TObject' instead :P
21:40:09reactormonkAraq, hmm, a shortcut would be nice. But TObject[] is a bit wierd
21:40:26reactormonkbecause it's dereference on values and reference on types
21:40:37gradhause C++ &: TObject&(a:1, b:2)
21:40:53AraqTObject[] is out of the discussion
21:41:03reactormonkgradha, no, & is string concat
21:41:22gradhacome on, we could grab some confused TCL programmers
21:41:39reactormonkno upval in nimrod
21:41:42Araqgradha: operator symbols don't work well for built-in syntaxes in nimrod
21:42:03Araqbecause all operator symbols are available for the users ;-)
21:42:18gradhaif you go with TObject.new(a:1, b:2) why not introduce TObject.ref(a:1, b:2)?
21:42:35Araqwhat would that mean?
21:42:48gradhathe first means construct a var, the second a ref var
21:43:06gradhaso you don't need PObject
21:43:10Araqbut 'new' should construct a ref for consistency
21:43:30Araqand how do you handle 'ref ref' anyway then?
21:43:39reactormonkAraq, double pointer?
21:43:50gradhacan you write ref ref object now?
21:43:50Araqreactormonk: yes
21:44:03AraqI dunno :-)
21:44:31Araqbut 'ref ref TOjbect' is definitely possible
21:45:04gradhaanother crazy one: normal constructor TObject.(a:1, b2), ref constructor TObject:(a:1, b:2)
21:45:18gradhaoh, that will lead to nasty bugs
21:45:23reactormonkgradha, likely.
21:45:29gradhaor maybe confused people confusing colons
21:45:33reactormonkAraq, so which solutions are you considering currently?
21:45:37Araqlooks perlish to me
21:46:23Araqreactormonk: TObject(x: 1, y: 2) and PObject(x: 1, y: 2)
21:47:02gradhaI like TObject(x:1, y:2) and TObject[x:1, y:2], but I've been brainwashed already by the brackets-are-what-god-wanted-you-to-write language
21:47:21reactormonkAraq, what would happen if (ref TObject)(x:1) aka ref TObject(x:1)?
21:47:24reactormonkgradha, objc?
21:47:31gradhareactormonk: yes
21:48:29gradhaoh, using <> would confuse C++ programmers: TObject(x:1, y:2) and TObject<x:1, y:2>
21:48:52Araqreactormonk: hard to tell, the grammar will barf about it
21:48:58dom96please stick with ()
21:49:06reactormonk^ sign
21:49:27AraqTObject<x: 1, y:2> is ambiguous
21:49:48Araqand a major reason why C++ is such pita to parse
21:49:51reactormonkAraq, I'd like ref TObject(a:1) to work as PObject(a:1) but otherwise that's fine with me.
21:50:40Araqbut then if you work with 'ref TObject', you likely work with it everywhere and want the PObject shortcut anyway
21:50:48reactormonkwould also solve #75 :-)
21:51:02reactormonkAraq, hm, true again.
21:51:05gradhaI think TObject[] is only out of the discussion because [] already feels wrong for dereferencing something, maybe change both and replace dereferencing with new syntax?
21:51:35Araqderef used to be ^ but I changed it to [] because
21:51:40reactormonkgradha, maybe that's because [] dereferences in C... :-/
21:51:42Araqa) it was a special case in the grammar
21:51:57Araqb) ^ is better left for exp
21:52:24reactormonkgradha, what to use for dereferencing iyo?
21:52:25Araqc) explicit deref is rare in nimrod anyway
21:52:41Araqno, I don't want to change it again
21:52:57reactormonkoke.
21:53:05gradhaI thought dereferencing in C is done with &, not []
21:53:16Araqgradha: it's done with *
21:53:16reactormonkgradha, an array with [] - more or less
21:53:30gradhaah, yes, wrong direction
21:54:03reactormonkAraq, how would I define initialization in () ?
21:55:55Araqreactormonk: TObject(...) already is an expression
21:56:25reactormonkAraq, rephrase: how would I redefine what happens in TObject(...) ?
21:56:25Araqdunno what you mean with "init in ()"
21:56:49Araqhrm good question
21:57:13reactormonkproc TObject() = {} ?
21:57:30AraqI guess you can't
21:57:56Araqbut then it's really supposed to not be exported
21:58:13Araqthe constructor procs the stdlib is full of are here to stay
21:58:31reactormonkwell, it's possible to name a proc the same as the object?
21:58:37Araqyes
21:58:43Araqbut the problem is:
21:58:50Araqf(a: 1, b: 2)
21:58:55Araqis no valid call syntax
21:59:15reactormonkcall-by-param?
21:59:21Araqf(a=1, b=2) is the valid syntax
21:59:35reactormonkso why not TObject(x=1) ?
21:59:51Araqhm
22:00:11AraqI liked the TObject(x: 1) better for consistency with tuple construction
22:00:20Araqwhich is (x: 1)
22:00:50reactormonkI guess I see a constructor like any other proc, given my ruby roots
22:01:13reactormonkAnd the syntax is also similar to what scala does
22:01:34Araqwell that's how it works today in nimrod, constructors are ordinary procs
22:01:57reactormonkauto-generate some default procs then
22:01:57Araqbut unfortunately it doesn't work for edge cases
22:03:09gradhaif you add constructors to make safe object variants, is the normal way going to be deprecated and later invalid?
22:03:23dom96How about something like this: init typedesc(...) = ...
22:03:26Araqgradha: yes
22:03:59dom96Not sure about how the params should work.
22:04:27Araqdom96: that doesn't solve anything
22:04:42Araqwe're discussing invokation syntax, not definition syntax
22:05:05Araqthere is no problem with a definition syntax because there is no definition in the first place
22:05:08gradhahrm, couldn't you define a constructor for an object variant which doesn't really define the variant and thus creates an unsafe object?
22:05:17dom96well what's the problem with TObject(x: 1, y: 2)?
22:05:46Araqdom96: you can't overload/redefine it
22:06:03Araqbut then that's kind of the point ...
22:06:38reactormonkAraq, edgecases like?
22:08:08reactormonkAraq, basically an allocate?
22:08:25reactormonkwould proc TObject() still work?
22:08:42reactormonkimho we should change the convention to that :-)
22:08:59Araqreactormonk: it would still work I think
22:11:29gradhaAraq: how will you guarantee that a constructor for an object variant defines the type?
22:11:44reactormonkgradha, huh?
22:12:17gradhapreviously Araq said constructors are to deprecate current object variant creation, which is unsafe
22:12:37gradhabut if you can write your own constructor, you could not initialise it properly and still have an unsafe object variant
22:12:43Araqgradha: let me elaborate:
22:13:05Araqproc ctor(): TCaseObj =
22:13:11Araq # old way:
22:13:21Araq result.kind = k
22:13:30Araq result.fieldA = 1
22:13:52reactormonkAraq, is ctor a "keyword"?
22:14:01Araq--> new way: forbid assignment to 'kind':
22:14:10gradhareactormonk: no
22:14:15reactormonkkk
22:14:39Araqproc ctor(): TCaseObj = return TCaseObj(kind: k, fieldA: 1)
22:14:49gradhaoh, so you basically disallow assigning to any kind variable and force it in the constructor?
22:14:58Araqyes
22:15:22reactormonkso you want to go with the semantics that objects are basically named tuples?
22:16:02Araqreactormonk: your question doesn't make sense
22:16:10Araqobjects stay the way they are
22:16:22Araqand yeah we haven't talked about inheritance yet
22:16:34AraqI think it'll be done like so:
22:16:35reactormonkAraq, yes, but the syntax somehow conveys how stuff should be understood.
22:16:59AraqTObject(TBaseObj(a: 1), b: 2)
22:19:47reactormonkAraq, what is TBaseObj?
22:20:16Araqoh come on, it's the super class of TObject in this example
22:20:33dom96Araq: I think it should simply be TObject(a: 1, b:2)
22:20:39reactormonk^ yes
22:21:56Araqhm, perhaps, yeah
22:22:35dom96In regards to redefining, it should be possible.
22:23:49dom96hrm, but then again. Perhaps we should keep it simple.
22:24:16reactormonkdom96, if objects are named tuples, nope.
22:24:24reactormonkthe syntax make sense too this way.
22:24:44reactormonkIf objects are meant to have constructors, go with TObject(foo=bar) and a default proc TObject()
22:25:18Araqreactormonk: ah that's what you mean
22:25:30Araqugh ... difficult decision
22:25:39reactormonkAraq, need to improve my communcation skillz :-/
22:26:09reactormonkAraq, why not both? ;-)
22:26:44Araqreactormonk: then some poor soul uses TObject(a: 1) and it can't be overridden
22:26:53reactormonkAraq, ... duh.
22:27:40Araqwell since I despise inheritance I guess I'll go with the tuple-like syntax/behaviour
22:27:44reactormonkAraq, implement both, do not export TFoo(a:1)
22:28:24Araqit's also easier to implement and 'proc TObject' is not what the stdlib now uses
22:29:04reactormonkdeprecation is evil, isn't it?
22:29:40Araqit is because we really like to see 1.0 some day
22:29:40reactormonkshouldn't be too hard to deprecate the old one imo
22:29:57reactormonkYes, but you can't change that once you reach 1.0
22:30:17AraqI can break whatever I want for 2.0
22:30:17gradhayou only need to develop 2.0 faster
22:30:39reactormonkgradha, 0.x is defined to not be as stable as 1.x
22:30:47gradhanimrod 3000, sounds right
22:30:49Araqthere are no plans for a 2.0 though
22:31:25reactormonkAraq, I'd change the whole stuff in stdlib and add deprecation if you so desire
22:31:49reactormonkfor implementing both and use proc TObject outside the file (as above)
22:32:05Araqreactormonk: I'd rather work on nimrod's concurrency design/implementation
22:32:46reactormonkAraq, how hard is it to attach a TObject() proc to each type?
22:32:57*gour_ quit (Quit: WeeChat 0.4.0)
22:33:39Araqreactormonk: more work than you think I bet :P
22:34:02reactormonkAraq, No, I consider it would require a substantional hack in the compiler.
22:34:50Araqnot really
22:35:07Araqwe'll get the necessary ingredients anyway
22:35:16reactormonkfrom?
22:36:30reactormonkAraq, imo, for now, implement tuple syntax, but do not export.
22:36:32dom96wait, so what's happening for constructors?
22:37:00reactormonkdom96, imo proc...
22:37:08Araqreactormonk: the required additions are also necessary for destructors and overloading of the assignment operator
22:37:08dom96still not decided?
22:37:44reactormonkmy vote is for tuple not export and default constructor proc TObject(a=1) export.
22:38:20reactormonkquestion: where does that break?
22:38:58dom96I'm not a big fan of having an implicit constructor for each proc.
22:39:05dom96er
22:39:09reactormonkdom96, s/proc/type/
22:39:11dom96s/proc/type/
22:39:12dom96yeah
22:39:25reactormonkdom96, what problems do you see?
22:40:10reactormonkbtw, what happens to a proc that returns a type that is not exported?
22:40:10dom96Lots of ambiguous errors.
22:40:43reactormonkdom96, so one type of proc you can't leave the () off?
22:41:11dom96huh?
22:41:14Araqreactormonk: why is that a problem? 'var x= p()' works then and 'var x: typ = p()' does not ;-)
22:41:27reactormonkAraq, just asking.
22:41:34Araq(if 'typ' is not exported)
22:41:48reactormonkAraq, I considered it to be a problem when you have default constructors that you could construct such an object... but you could anyway.
22:42:02dom96I think that the "tuple syntax" should be available for any types which are in scope.
22:42:31dom96So basically if the type is exported, so is the constructor.
22:42:35reactormonkI think that would lead to the problem of not being overwritable
22:42:57Araqdom96: I'll implement the TObject(a: 1), PObject(a: 1) stuff
22:43:25Araqcan't be overwritten but then you should export a constructor proc anyway if you're after information hiding
22:43:26dom96Well that depends on how you think of constructors.
22:43:57dom96Yeah, constructors should be a simple syntax sugar for obj.field1 = ...; obj.field2 = ...
22:47:53Araqyeah, dom96, I agree
22:49:49reactormonkso they aren't constructors but sugar :-)
22:50:25Araqyeah
22:57:05*gradha quit (Quit: bbl, have youtube videos to watch)
23:13:01dom96'night