<< 12-11-2013 >>

00:01:58*mflamer_ joined #nimrod
00:13:47*mflamer_ quit (Ping timeout: 268 seconds)
00:20:14*XAMPP-8 quit (Ping timeout: 240 seconds)
00:21:21*XAMPP-8 joined #nimrod
00:25:02VarriountYou know, it's so refreshing to have a compiler which takes only a minute or two to build itself, compared to the hour or so gcc takes.
00:25:29fowlhi
00:25:42Varriounthi
00:32:56*xenagi joined #nimrod
00:36:10filwitany chance the developer from the Leaf language stopped by at any point?
00:36:14*webskipper quit (Ping timeout: 240 seconds)
00:36:31filwitalso.. if only Phoronix would do an article on Nimrod..
00:36:38*webskipper joined #nimrod
00:36:48Varriountfilwit, Leaf language?
00:37:10Varriountfilwit, did you email him/her?
00:37:14filwitPhoronix did an article on it, it's new: http://leaflang.org/
00:37:37filwitand yes, i talked to the developer, and invited (him?) to come over here sometime
00:38:08Varriountfilwit, did you email Phoronix?
00:38:26filwitno, i used the contact message thing on the Leaf site
00:38:51filwiti've never contacted Phoronix, though it might be cool to write him and see if he would be willing to do an article on Nimrod
00:39:03filwitthough we'd probably need to supply said article
00:39:44Varriountfilwit, I like the site. The only think that turns me off is the "Join Us" button.
00:40:03filwitthe reason i contacted the Leaf guy was cause his language looks very similar to a language i was starting to write before, and his goals seem similar to Nimrod in general
00:40:21filwitVarriount: yeah, the site is well done
00:40:35filwitlanguage looks good (to me) as well.. mostly
00:40:46filwitthough it's still really new (not even modules yet)
00:42:16*brson joined #nimrod
00:42:21*brson quit (Client Quit)
00:42:30*brson joined #nimrod
00:42:38*mkb quit (Ping timeout: 240 seconds)
00:42:38xenagieh
00:42:46*mkb joined #nimrod
00:42:53xenagiaside from a nice syntax, i haven't found anything revolutionary or impressive about it
00:43:28filwitwell, there really arent many options out there if you want a language that does memory safety and runtime performance
00:43:38filwitand his syntax is pretty nice (mostly)
00:43:38VarriountIt's the downside of programmers, that they tend to all want to reinvent the wheel.
00:44:06xenagi^
00:44:07filwitand he compiles to LLVM, unlike D which tries it's own thing, so maybe it will move alone quicker
00:44:41xenagiVarriount, that could be the majority of people, not just programmers.
00:44:58filwitreally, for games, if you want to avoid C/C++ your only options are: D, Nimrod... maybe C#/Java if you can manage that
00:45:12filwitoh, and Rust
00:45:38VarriountWhile I like that new languages are being developed, when two languages (such as leaf and nimrod) with similar syntax crop up, I can't help but think how much more successful they would be to just combine and work together.
00:45:43*xenagi noticed how filwit neglected Go
00:45:46filwitbut D's implementation is poor and barely runs on ARM, and Rust is over complicated
00:45:58xenagiVarriount, agreed.
00:45:59filwitxenagi: Go isn't an option for games man
00:46:12filwitxenagi: Go's type system is gimped, and it's slow
00:46:25filwitxenagi: it's GC is horrible and causes memory leaks too
00:46:44xenagilol ok ok im starting to regret having mentioned it
00:46:54filwitxenagi: though i haven't tried it in awhile, so maybe thats out of date info
00:47:06filwitxenagi: lol
00:47:08*Varriount noticed how filwit neglected perl
00:47:12Varriount;3
00:47:14filwit^ LOL
00:47:16xenagii like it, but for different reasons than Nimrod
00:47:48xenagiThe way I see it, Go and Nimrod have their respective niches, much like you're typical Venn diagram with the typical intersection
00:49:04OrionPKmarshal.nim(242, 9) Error: internal error:
00:49:05OrionPK instantiateGenericParamList
00:49:06OrionPK:S
00:49:08xenagiVarriount, I know what you mean. Sometimes I think programmers invent languages for the sake of inventing languages, without offering anything new, and before you know it, PHP is born
00:49:09filwitnah, Nimrod's a league of it's own.. it's Macro's allow third parties to invent their own inheritance system, and once that's discovered by everyone (and the standard lib is cleaned up) then Nimrod will explode i think :)
00:49:58Varriountfilwit, you are forgetting the fact that it is not well known. Also, even though the main site looks pretty, the documentation pages could use some work.
00:50:19filwitVarriount: yes i agree
00:50:29filwitVarriount: both can be fixed though :)
00:50:30VarriountProgrammers also tend to forget that people, even other programmers, tend to judge a book by it's cover.
00:50:45xenagiyeah, i think the module docs in the stl could use more examples
00:51:02filwitVarriount: yes exactly, which is why having a good website is a first step, but only just a single step
00:51:03*Varriount points at GNU's html1.0 web pages.
00:51:27*xenagi is blind
00:51:53filwitNimrod needs a few things, but it's really the only good replacement for C++ for games, IMO, because it can be used for the engine code AND the scripts
00:52:02filwitmaybe Rust...
00:52:07filwiteventually D..
00:52:44VarriountI've not heard much about rust. D's stop-the-world gc, as well as lack of 64-bit window compilation, is a drawback.
00:52:59filwityeah exactly.
00:53:15filwitand Rust is kinda too complicated to be used for script kiddies too
00:53:31filwitso, yeah, Nimrod is it (and has the best tech anyways)
00:53:38filwitat least for now
00:53:40VarriountWith nimrod, I was surprised to actually get the compiler to bootstrap with relatively little fuss.
00:54:37VarriountI've never been able to get *any* other compiler to natively compile to a 64 bit binary on windows.
00:55:07filwityeah, i had the same experience when compiling Nimrod. it just worked without odd problems
00:55:25filwitbut Nimrod's fighting an uphill battle, because it's so alien to everything else
00:56:10filwitif the main website hadn't put "a soft real-time GC (with games in mind)" on the main page, i probably would have passed it up
00:57:35VarriountHuh, did you know that, if you don
00:58:00VarriountDid you know that if you don't give a procedure parameter a type, it defaults to 'expr'?
00:58:53filwityes
00:59:15filwitwhich is great, IMO
00:59:36Varriountfilwit, to my mind, it's too ambiguous
00:59:40filwitmakes writing code almost feel like a dynamic language, which you can then go tighten up
01:00:27Varriountbecause that trait also effects everything from lambdas to type declarations
01:00:52filwitVarriount: it's debatable, but I like the feature
01:01:18filwitdont really use it myself, but it's nice for advertisement at the very least
01:01:37Varriountfilwit, Well, it's what is causing bugs several bugs with accidental generics
01:02:17filwitVarriount: well i haven't looked at the issues list concerning it. maybe it's not worth it, idk
01:02:51filwitalthough i'd imagine it'd be the same as using 'expr' everywhere, so idk how it would really cause problems
01:02:52webskipperI am right: nimrod has not call-by-reference as default ?
01:03:16filwitwebskipper: no, nimrod has call-by-reference (if i understand you correctly)
01:03:25webskipperoh ok
01:03:27filwitwebskipper: type Foo = ref object ...
01:03:31Varriountcall by reference?
01:03:33webskipperand when I use var in the parameters list?
01:03:41webskipperits call by value ?
01:03:51filwitwebskipper: it's a ref
01:04:07filwitwebskipper: cause it modifies the original var, it has to be a ref
01:04:26filwitwebskiper: you can also do: type Foo {.byRef.} = object ...
01:04:35Varriountwebskipper, I believe that, by default, the compiler tries to infer automaticaly whether to pass function arguments as references or copies.
01:04:41filwitwebskipper: which will create a value type object, but always pass it by ref
01:04:43webskipperI mean proc(a : int, var b : int, c : int)
01:05:35filwitproc foo(a:int, b:var int, c:int) # a is value, b is ref, c is value
01:05:48webskipperah ok
01:05:59filwitproc bar(a:ref int) # a is ref
01:06:22*Varriount misses Araq
01:07:00filwitwebskipper: also: type myint = ref int; proc foo(a:myint) # a is ref
01:07:01webskipperwhy is a ref ? its similar to a:var int than ?
01:07:30webskipperuuuh
01:07:49webskipperso its a global ref, than its ref as parameter too.. ?
01:07:49filwitwebskipper: pass by ref means you have a reference to the instance. it's the same as: void foo(int& a) // C code
01:08:27filwitwebskipper: but (i believe) you can't modify the ref, it just passes by ref (for performance? idk..)
01:08:30webskipperThe & I know from PHP too.
01:08:56filwitwebskipper: where as pass by 'var' means the type can be modified
01:09:07filwitwebskipper: sorry, i made a mistake in my C code above
01:09:37filwitwebskipper: "a:ref int" == "const int& a"
01:09:59filwitwebskipper: or "int& a const" (i forget the correct C notation)
01:10:55Varriountfilwit, have you seen the code for the sockets and asyncio modules?
01:11:04filwitVarriount: no
01:11:09filwitVarriount: why?
01:11:18webskipperswitching to higher abstraction and than to lower back is a bit confusing me :D
01:11:46filwitwebskipper: i'm not sure what you mean
01:12:27VarriountThere's quite a bit of explicitly creating a reference type for each concrete type in those modules, and I want to know why, since I don't see why they're strictly necessary.
01:14:12*XAMPP-8 quit (Ping timeout: 246 seconds)
01:14:12filwitVarriount: they may have been written before 'ref object' was introduced as a language feature
01:14:43filwitVarriount: which I am proud to announce was a suggestion of mine :)
01:15:27Varriountby 'ref object', do you mean as part of parameter types?
01:15:53filwitVarriount: no, i mean "type Foo = ref object"
01:15:53webskipperfilwit: in dynamically typed languages like python its a bit less complex - that I mean.
01:16:18filwitVarriount: before, Nimrod didn't allow objects to be implicitly ref types
01:16:30Varriountfilwit -> http://nimrod-code.org/asyncio.html#102
01:17:49webskipperfilwit: from doc "Parameters are constant in the procedure body. Their value cannot be changed because this allows the compiler to implement parameter passing in the most efficient way. If the procedure needs to modify the argument for the caller, a var parameter can be used:"
01:19:00filwitwebskipper: correct. Like i said above, passing by 'ref' in nimrod is like passing by 'const &' in C
01:19:06webskipperk, ty
01:19:31filwitnp
01:19:43filwitVarriount: i'm not sure what you're trying to show me
01:20:30Varriountwebskipper, keep in mind though, you can still modify the attributes of the parameter's you're given, even without var or ref
01:20:37OrionPKhas anyone encountered errors with passing one generic parameter to another proc?
01:20:53Varriountfilwit, why all the explicit use of ref types?
01:21:05VarriountOrionPK, example?
01:21:59filwitVarriount: like i said, maybe the code was written before implicit ref objects where introduced, or maybe there's places where those types are used as stack objects a lot or something
01:22:40OrionPKVarriount i'm going to boil down a gist in a minute
01:28:07OrionPKVarriount check this out https://gist.github.com/onionhammer/7423812
01:29:39VarriountOrionPK, what am I supposed to see?
01:29:45OrionPKbah
01:29:49OrionPKhold on, i'll update it
01:30:06*Varriount knows the feeling
01:32:19webskipperc2nim: "for example duff's device cannot be translated to Nimrod" because we have no switch case statements ?
01:33:16filwitwebskipper: switch statements in nimrod look like: 'case.. of.. of.. else.."
01:33:26filwitwebskipper: http://nimrod-code.org/tut1.html#case-statement
01:33:31*Demos joined #nimrod
01:35:23Demosanyone here looked at pyret? I like nimrod more :D
01:36:17VarriountDemos, there's been some talk of it on the python mailing lists
01:36:24filwitLOL @ their extension types.. that's awesome
01:36:35Varriount?
01:36:55filwitlanguage is named "Pyret" (pirate) and extensions are '.arr'
01:37:37Demosso true
01:37:44filwitdo not like the syntax though..
01:38:03filwitalways hated VB-style languages
01:38:05Demosthe predicates are neat, but a bit of a hack, would prefer the math PhDs figure out dependent types
01:38:11Demoserm the refinements
01:38:27Demoshey you can end blocks with ; instead of end :D
01:38:35filwitmeh
01:38:43filwitbut that's a plus
01:38:54DemosI kid though
01:39:01Demosalso the .{} syntax is really wierd
01:39:30VarriountOrionPK, updated that gist yet?
01:39:34filwitits the language efficient?
01:39:37filwitis**
01:39:48Demosit is probably slower than ruby
01:39:57DemosI think the interpreter is implemented in racket
01:39:58filwitLOL
01:40:10OrionPKVarriount no... i'll get back to you lol. it's working in the gist but not my library
01:40:25Demosalthough cpython is written in c and it is still slow, when you are parsing strings all the time I doubt langage matter so much
01:41:09VarriountDemos, 'slow' is quite relative.
01:41:18filwityeah, it's just doesn't fit my goals
01:41:20VarriountAlso, pypy
01:42:15Demostrue
01:42:33Demosstill it is designed as a teaching language (I have no idea what that means)
01:43:12Demosheck my school gets away with teaching c++ to first year undergrads.... I am pretty sure c++ is not a teaching language but hey
01:43:52VarriountDemos, at least it's not php
01:43:54OrionPKVarriount, okay it's updated...
01:44:19Demosso true, for all c++'s strangeness it does not do anything where I am just like "WHYYYYYYYY"
01:44:55VarriountDemos, I will forever and for always hate include files, and autoconf.
01:45:10VarriountOrionPK, this better not explode all over my hard-drive
01:45:29OrionPK:P
01:46:16VarriountOrionPK, Ok, I got the error. Lessee...
01:46:27DemosVarriount: I will as well
01:46:49DemosI did a cloc on my c++ project last week and saw 1500 lines of cmake files....
01:47:31Demosand c++ will get real modules in 2017(or so)
01:47:35VarriountFor those interested in OrionPK's error -> https://gist.github.com/Varriount/7424009
01:47:53webskipperCpython IS slow :D
01:48:10Demosthat has some line numbers
01:49:56DemosCompareByID<decltype(_cont)>(cont) screw you too c++
01:50:03OrionPKvarriount is that from a debug build of nimrod?
01:50:18VarriountOrionPK, yep
01:51:04VarriountI always build nimrod in debug mode. Makes it so much easier to help with bugs. The slowdown isn't much, and the tracebacks are enormously helpful.
01:51:39filwiti have three Nimrod compilers
01:51:43VarriountOrionPK, it seems that you can't instanciate a generic with another generic.
01:51:57filwitthe one that's on the Arch repos, the git-HEAD, and my fork
01:52:02OrionPKVarriount sec..
01:52:16VarriountOrionPK, It's actually enforced by the compiler.
01:52:34OrionPKVarriount this is a compiler error..
01:52:37OrionPKtry this
01:52:39DemosI wish it was that easy on windows
01:52:45OrionPKline 37 replace with echo read[string](log)
01:52:50VarriountDemos, ?
01:52:55OrionPKisntaed of log.read[string]()
01:53:07Demoswindows installation and path handling is a pain
01:53:18Demosand you need to switch a crapton of stuff for each compiler
01:53:23Demosit is just annoying
01:53:31VarriountDemos, I have 2 main batch files I use, so that I can use either 32 or 64 bit compilers.
01:53:46Demossame, but I keep forgetting which is which
01:53:59VarriountI just named them 32 and 64
01:54:13OrionPKVarriount updated gist
01:54:16Demoshonestly I should probably invest more time into setting that stuff up
01:54:19VarriountOrionPK, it's an intentional compiler error
01:54:28Demostoo used to just cmake .. boot visual studio and go
01:55:38Demosbut yeah, I would think nimrod's debug mode in a VM running on javascript would be faster than a c++ compiler
01:56:06OrionPKlooks that wa
01:56:11OrionPKi submitted a bug, hopefully not a dupe
01:56:26VarriountOrionPK, https://gist.github.com/Varriount/7424009
01:57:11VarriountOrionPK, line 35 of seminst.nim is
01:57:13Varriount elif t.kind == tyGenericParam:
01:57:13Varriount InternalError(a.info, "instantiateGenericParamList: " & q.name.s)
01:58:20VarriountWhere 't' is a node retrieved from some sort of type table
01:58:52OrionPKi dont understand why soemthing(obj) works and obj.something() fails
01:58:59OrionPKit shouldnt be that way
01:59:28VarriountOrionPK, it's the order in which types are inferred.
01:59:42VarriountI think
01:59:46OrionPKthere is no inference necessary, I'm explcitly stating the generic type
02:00:34VarriountLet me look at the code a bit.
02:02:15VarriountOrionPK, it might be related to why obj.toSeq and toSeq(obj) sometimes work/don't work
02:04:59VarriountAST-Wise, the two expressions are different.
02:11:34OrionPKhm
02:12:41VarriountI'm thinking that the call is being evaluated before the generic type can be spread throughout, though that's a guess, since I have no clue as to how nimrod calculates generic call types and such
02:16:55OrionPKim sure araq could tell us why it's impossible to fix and correct the way it is in a few seconds anyway :)
02:17:19VarriountOrionPK, Araq isn't here. His internet is down.
02:17:31OrionPKi know he isnt, it's also in the wee hours in germany
02:24:07*Varriount misses Germany
02:25:09VarriountOrionPK, why don't you have nimrod built in debug mode?
02:28:03OrionPKbecause i got sick of waiting for it to build
02:28:14OrionPKtakes a lot longer to koch without release mode
02:29:45VarriountIt takes, like, less than 2 minutes for me :/
02:30:13VarriountHint: operation successful (65828 lines compiled; 44.252 sec total; 274.280MB) [SuccessX]
02:40:48*mflamer_ joined #nimrod
02:45:12VarriountHi MFlamer
02:49:00*MFlamer quit (Ping timeout: 244 seconds)
03:22:37VarriountOrionPK, Thank you
03:29:47*brson quit (Ping timeout: 260 seconds)
03:33:01fowlOrionPK, are you talking about templates
03:33:07fowlobj.foo() vs foo(obj)
03:34:05Varriountfowl, it's a generic
03:34:35VarriountThough a generic is, conceptually, a kind of template
03:35:49fowl?
03:35:54fowlis there problem with it or not
03:36:52Varriountfowl, there is, but it has something to do with the compiler internals
03:37:34VarriountThe problem is that I am unable to determine where two similar statements deviate when they are being semantically processed.
03:39:32*Demos quit (Quit: Konversation terminated!)
04:10:20VarriountOrionPK, if you're still up, I've kinda identified the problem, or at least, the general reason what you want won't work.
04:11:31OrionPKyah im still around
04:11:35OrionPKin and out though
04:11:39VarriountOrionPK, Here's my theory. Your first call, which the compiler sees as this:
04:11:56VarriountCall
04:11:56Varriount BracketExpr
04:11:56Varriount Ident !"readLog"
04:11:56Varriount Ident !"string"
04:11:56Varriount Ident !"log"
04:12:57VarriountThe compiler looks at readLog, a generic proc, and it's paired type, string. It creates a concrete proc with all the types filled with string
04:13:32VarriountIt then fills out the remaining argument, the log type.
04:13:54VarriountOrionPK, Here is what the second call looks like to the compiler:
04:14:14VarriountBracketExpr
04:14:15Varriount DotExpr
04:14:15Varriount Ident !"log"
04:14:15Varriount Ident !"readLog"
04:14:15Varriount Ident !"string"
04:14:28OrionPKinteresting..
04:15:13OrionPKbut how that information is treated is at issue, isn't it?
04:15:32VarriountIn this case, the compiler sees that readLog, a generic procedure, is being called with log, a concrete type, as it's argument.
04:16:16VarriountBut it hasn't *filled out* readLog to become a concrete procedure, it still has that generic return type
04:16:59VarriountAfter that, I'm a bit unsure, but guessing from the traceback, it thinks that you're trying to access the result via []
04:18:27VarriountOrionPK, see, your second call could also be interpreted as, say, a function accepting a log, and returning an array.
04:18:53VarriountOrionPK, In any case, the type isn't being filled out for you read proc
04:18:54OrionPKshouldnt be
04:19:18OrionPKwell, maybe araq will have some thoughts next time he's about
04:19:55VarriountOrionPK, I have to go to bed now (exam tomorrow) but I'll continue to dig into this problem.
04:20:18fowlinstantiating a generic like this: obj.f[ty] does not work right now
04:20:21VarriountI may not be able to fix it, but I might be able to dig up enough information to help Araq
04:20:42fowlif you have to explicitly say the type then you have to call it like f[ty](obj)
04:23:50OrionPKokay, thanks for taking a look Varriount
04:24:16OrionPKfowl yeah thats what I've noticed
04:24:18OrionPKthis is a known issue?
04:24:33fowlknown behavior, im not sure i'd call it an issue
04:24:39OrionPKfigures
04:24:42OrionPKwhy isnt it an issue?
04:24:52fowli'd definitely like it to work with dot syntax
04:24:57VarriountOrionPK, my please. It's helped me get better acquainted with the compiler internals.
04:25:02Varriount*pleasure
04:25:18OrionPKglad it was productive for you :)
04:27:39VarriountIf anyone is interested, look in semexpr, line 1923
04:27:50xenagiwhat is it?
04:28:10VarriountThat is where the decision is made to either treat something as a generic instanciation, or an array access
04:28:54VarriountNimrod is surprisingly readable, unlike *some* languages I know *cough*c++*cough*
04:28:57OrionPKsuppose it's too early to check
04:29:01OrionPKif it's a type
04:29:12OrionPKnot an variable identifier or const
04:29:26VarriountOrionPK, look at those AST parts I printed above
04:29:49OrionPKI'm running out of time tonight
04:30:32VarriountGoodnight guys
04:31:40OrionPKnight
04:34:44*brson joined #nimrod
04:43:16*brson quit (Ping timeout: 268 seconds)
04:47:15*brson joined #nimrod
04:49:12*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
05:02:15*ics joined #nimrod
05:19:56*OrionPK quit (Read error: Connection reset by peer)
05:32:51*webskipper quit (Ping timeout: 246 seconds)
05:40:35*xenagi quit (Quit: Leaving)
05:59:03*filwit quit (Quit: Leaving)
07:11:55*dymk quit (Ping timeout: 260 seconds)
07:31:24*brson quit (Read error: Connection reset by peer)
07:31:35*brson joined #nimrod
07:43:21*dyu joined #nimrod
07:52:26*dymk joined #nimrod
07:59:32*delian2 quit (Remote host closed the connection)
08:01:03*delian2 joined #nimrod
09:03:47*NimBot joined #nimrod
09:15:51*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:16:24*capisce_ quit (Ping timeout: 272 seconds)
09:17:10*capisce joined #nimrod
09:23:14*mflamer_ quit (Ping timeout: 268 seconds)
09:27:57*BitPuffin joined #nimrod
09:30:07BitPuffingood morning guys!
09:33:21*CarpNet joined #nimrod
09:46:46*Jackneill joined #nimrod
09:54:51BitPuffinping zahary
10:02:38*BitPuffin quit (Ping timeout: 240 seconds)
10:08:40*Araq_ joined #nimrod
10:13:26*mkb quit (Ping timeout: 240 seconds)
10:14:00*mkb joined #nimrod
10:22:44*EXetoC joined #nimrod
10:38:35*Araq_ quit (Read error: Connection timed out)
10:39:56*Araq_ joined #nimrod
10:49:52*musicalchair joined #nimrod
11:52:04*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332])
11:59:01*BitPuffin joined #nimrod
12:28:35*eigenlicht joined #nimrod
12:28:41*brson joined #nimrod
12:29:57BitPuffinmy god imagine the ddos github would experience if nimrod suddenly exploaded in popularity and everybody clones the compiler repo
12:34:23*dyu quit (Disconnected by services)
12:35:00*dyu_ joined #nimrod
12:39:01eigenlichtwould be shame if someone...did a git push --force before that ;)
12:44:03*Phil joined #nimrod
12:46:26PhilHi, just wondering if anyone can give me some pointers. I'm trying out nimrod, currently trying to get the httpserver2.nim example to work, however when I run it, I get "accept: ./index.html" or what ever I request, and the connection hangs indefinately and no page is served.
12:46:26*EXetoC quit (Read error: Connection reset by peer)
12:48:16BitPuffinPhil: code? errors?
12:50:58PhilIt's the httpserver2.nim file in the "examples" directory of the nimrod source distribution, and unfourtunately there is no error emited, if you open a web browser and point it at the http server you see output in the console "accept: ./index.html" so you know it's found the server, but the connection hangs from that point, nothing is reveived back
12:50:58Phil by the browser, and it never times out.
12:51:53BitPuffinhmm interesting
12:52:13BitPuffinPhil: you should use the latest git version of nimrod though
12:52:56PhilOk, I can try that, are there many changed since the 0.9.2 release?
12:54:00BitPuffinPhil: yep
12:54:11BitPuffinnot many libs are compatible with 0.9.2 even anymore :P
12:54:18BitPuffinbecause most nimrod users use the git version
12:54:26BitPuffinwell okay many libs are compatible
12:54:32BitPuffinbut a lot of them aren't
12:55:09Philoh right, didn't know that, I presume the main branch is kept in a good working state then
12:55:21BitPuffinPhil: for the most part yes
12:56:10PhilI'll check that out then and see how that goes first.
12:58:06*CarpNet quit (Remote host closed the connection)
12:58:11PhilThanks for the tips.
12:58:56BitPuffinno problem
13:04:47*EXetoC joined #nimrod
13:04:56BitPuffinhey EXetoC!
13:07:32EXetoChi
13:09:34*Ricky_Ricardo joined #nimrod
13:09:37BitPuffinEXetoC: do you know what it means when there is a ! in front of a string
13:11:22EXetoCBitPuffin: grep "\`!\`" **/*.nim
13:11:28EXetoCuser-defined operators. nothing else I think
13:11:37EXetoCin macros.nim and pegs.nim
13:12:53BitPuffinEXetoC: really? operators?
13:12:56BitPuffinhttp://nimrod-code.org/macros.html
13:13:06BitPuffinnnkAddr(nnkIdent(!"x"))
13:13:11BitPuffinx is not an operator there
13:14:24EXetoCno but '!' is
13:15:00BitPuffinEXetoC: sure but that doesn't say what it does when it is in front of a string
13:15:09BitPuffinconstructs an identifier from the string s
13:15:11BitPuffinah
13:15:13BitPuffinokay
13:22:19*webskipper joined #nimrod
13:22:37*CarpNet joined #nimrod
14:01:17PhilStill having the same problem with the examples/httpserver2.nim file, it never serves a page, it just hangs when you make a GET request.
14:02:20BitPuffinPhil: why don't you have a look at jester instead?
14:02:51BitPuffinEXetoC: why don't you teach yourself ack? :P
14:03:26PhilWorth a try, I was just looking for a good bit of example code to test out the possibilities
14:03:43BitPuffinPhil: there are plenty :)
14:04:08Philis it a seperate package I can find somewhere?
14:06:41*Ricky_Ricardo quit (Quit: Ricky_Ricardo)
14:09:50*EXetoC quit (Ping timeout: 240 seconds)
14:11:10BitPuffinPhil: you mean jester?
14:11:29*EXetoC joined #nimrod
14:11:41Philyes, I've been looking around, I presume I install babel and then use that to get it?
14:12:09BitPuffinPhil: yeah it's a babel package
14:12:15Philcool
14:12:42EXetoCBitPuffin: I don't think I've needed it
14:18:32BitPuffinEXetoC: well of course you don't *need* it but it's a lot nicer
14:18:57BitPuffinack --nimrod foo
14:18:59BitPuffin:P
14:19:14BitPuffinno more **/*.nim biz
14:19:30BitPuffinthat --nimrod flag is user defined so you can make it --nim etc
14:19:41BitPuffinso now when I do ack --nimrod it searcher .nim and .tmpl
14:22:04*BitPuffin quit (Quit: WeeChat 0.4.2)
14:22:36*BitPuffin joined #nimrod
14:25:38EXetoCI've aliased my most common glob expression
14:26:22EXetoC*expressions
14:28:34*OrionPK joined #nimrod
14:30:12EXetoCgrpi foo ggni
14:34:51webskipperI asked about call-by-* yesterday in #python. Its more about call-by-object than call-by-value or call-by-reference as default behaviour. And it depend on what yo do with your objects within the function.
14:40:58EXetoCare you referring to the fact that assigning to the object won't affect the caller, but modifying one of the fields of said parameter will?
14:43:38webskipperEXEtoC: y I mean the semantics. For example you have a list as parameter. pop() from it and its state is viewable after the function ist terminated.
14:48:47EXetoCright
15:07:45*BitPuffin quit (Ping timeout: 252 seconds)
15:09:49VarriountIn python, everything is passed as a reference.
15:10:50Varriountwebskipper, whether a list is modified after pop() is a case of function design, not semantics
15:16:04webskipperVarriount: funny, say that in #python. Lot of guys there said its call-by-value. Other said call-by-object.
15:17:05webskipperVarriount: call-by-* its more a concept for the programmer than the concrete implementation.
15:17:21VarriountI don't know what the official term is, but I do know this: Arguments passed to a function act as if whatever is passed to the function is assigned to a local variable
15:17:41EXetoCis call by reference accurate? because the caller isn't affected by a del or an assignment
15:19:00VarriountThus, in python, if you assign a new value to an argument via =, and the left side is not an attribute of the argument, but the argument itself, then only the local variable is overwritten.
15:20:33Varriount"def foo(a, b): a = b" will not, in fact, do anything, as the assignment only affects the local variable "a". "def foo(a, b): a.c = b" on the other hand, does do something, as it affects the attributes of the object referred to by the variable
15:22:10EXetoCthat's what we said, yes
15:22:41VarriountEXetoC, again, I don't know the terms, just the behavior.
15:23:02VarriountAlso, I tend towards the verbose. It's a bad habit, I know.
15:28:14*Endy joined #nimrod
15:29:27EXetoCso it's neither one of those, and I don't know if pass-by-object has an official meaning
15:45:49PhilI noticed you discussion above. With python everything is passed by reference, but certain types of object are imuatable, e.g. int, bool, tuple where as others are mutable, e.g. lists, dicts, so if you assign to an imutable you'll actually get a new object and any thing which referenced the old one will still point at the old thing.
15:47:58*[1]Endy joined #nimrod
15:48:04*mflamer joined #nimrod
15:49:49EXetoCI've read twice that it's not pass-by-reference, but if you're correct, then it's a fairly fuzzy term
15:50:10VarriountPass-By-Python
15:51:23*Endy quit (Ping timeout: 245 seconds)
15:51:23*[1]Endy is now known as Endy
15:51:47PhilYou can see what's going on if you use the id() function. I'll do an quick example...
15:52:59PhilTry this out: def fn(b): return id(b); a = 1; assert id(a) == fn(a)
15:58:17*mflamer quit (Ping timeout: 272 seconds)
16:05:38PhilCan anyone point me towards any large self-contained example programs witten in nimrod?
16:05:41*brson quit (Ping timeout: 252 seconds)
16:08:27*[1]Endy joined #nimrod
16:11:17*Endy quit (Ping timeout: 248 seconds)
16:11:18*[1]Endy is now known as Endy
16:12:06EXetoCI don't know what that proves. I still see it as some kind of value/reference hybrid
16:19:48PhilIt's probably not a good fit for either term, since everything is an object in python it is just passing those objects around and each object has a unique id, so by code above proves you are dealing with the very same object inside the function that you were dealing with outside the function.
16:20:09webskipperPhil: pass-by-python I like :D
16:21:17*MFlamer joined #nimrod
16:23:45PhilMost accurately term I can think of is "pass-by-assignment" since that is what happens internally, it's just like you did "b = a" in my example above, in which case both a and b point to the same object in memory, but if you were to do b = 2 since the object b was point to is imutable you'll get a new object (and id()) and b will reference it, whic
16:23:45Philh a still references the original object which hasn't changed in value.
16:24:43webskipperfine - we should close this topic now :D
16:27:41*XAMPP-8 joined #nimrod
16:28:27*XAMPP_8 joined #nimrod
16:28:58*[1]Endy joined #nimrod
16:30:38EXetoC:-)
16:31:50*XAMPP-8 quit (Ping timeout: 240 seconds)
16:32:07*Endy quit (Ping timeout: 272 seconds)
16:32:08*[1]Endy is now known as Endy
16:36:05dom96hey Phil. The httpserver2 example is most likely pretty broken. Look at the httpserver module instead.
16:36:42Phildom96: ok thanks
16:38:06Phildom96: I got jester working in the end, but I'm still looking for a good self contained example of a large program that I can use to test out on a small embedded linux system.
16:38:31dom96babel sounds like a good candidate for that
16:39:51Philnot sure about the dependancies though does it need anything, like git, I'd need to cross-compile a load of other stuff, was hoping to find something mainly self-contained
16:40:27dom96hrm, it needs openssl too.
16:40:59*XAMPP_8 quit (Ping timeout: 240 seconds)
16:42:24*MFlamer quit (Remote host closed the connection)
16:44:33*[1]Endy joined #nimrod
16:46:59*Endy quit (Ping timeout: 240 seconds)
16:47:00*[1]Endy is now known as Endy
16:58:24*Phil left #nimrod (#nimrod)
17:04:56*[1]Endy joined #nimrod
17:08:35*Endy quit (Ping timeout: 272 seconds)
17:08:36*[1]Endy is now known as Endy
17:25:25*[1]Endy joined #nimrod
17:27:44*Varriount wonders why nimrod can echo() faster than python
17:28:11*Endy quit (Ping timeout: 252 seconds)
17:28:12*[1]Endy is now known as Endy
17:30:55*shodan45 joined #nimrod
17:45:38*[1]Endy joined #nimrod
17:48:45*Endy quit (Ping timeout: 245 seconds)
17:48:45*[1]Endy is now known as Endy
17:50:58*[1]Endy joined #nimrod
17:53:51*Endy quit (Ping timeout: 252 seconds)
17:53:52*[1]Endy is now known as Endy
18:02:47*EXetoC quit (Ping timeout: 246 seconds)
18:05:20*MFlamer joined #nimrod
18:08:33*Araq0 joined #nimrod
18:09:45*dyu_ quit (Quit: Leaving)
18:10:39Araq0dom96: pm me please
18:11:36*[1]Endy joined #nimrod
18:14:20*Endy quit (Ping timeout: 246 seconds)
18:14:21*[1]Endy is now known as Endy
18:18:50VarriountAraq0, you're alive!
18:20:07Araq0Yeah but typing on this device sucks
18:20:43VarriountYou could always USB Tether to your laptop or desktop
18:21:05Araq0I guess i could
18:21:11*Mat2 joined #nimrod
18:21:13Varriount:3
18:21:16Mat2hi all
18:21:26VarriountHello!
18:21:28Araq0Hi mat2
18:21:47Mat2hi Araq and Varriount
18:22:01VarriountSo, Araq0, how is the no-internet thing going?
18:22:45Araq0Very well i also have no tv so all i can do is drinking
18:22:56Mat2??
18:24:12VarriountAraq0, while you've been away, I fixed generic lambdas crashing the compiler, and am investigating how to fix object.genericProc[T]
18:24:54Araq0That only needs a proper error msg
18:25:46VarriountBhy not fix it so that the generic actually works? Right now, nimrod just thinks that the [] is an array access
18:26:19Araq0A.b[i] is clearly oh wait nevermind
18:26:59*OrionPK quit (Ping timeout: 250 seconds)
18:27:04VarriountOrionPK and I dug into it a bit.
18:28:45Araq0Great
18:29:17VarriountIt's because when semExpr is called, when trying to determine if a BracketExpr refers to a generic, it uses qualifiedLookup on the first child node
18:29:32VarriountAnd in that case, the child node is a dotExpr
18:30:13Araq0Told ya. Every usage of *lookup is suspicious
18:30:31VarriountI've been trying to get qualifiedLookup to accept the last child of the dotExpr - an Ident node that holds the name of the generic Param
18:30:54Araq0Argh
18:30:58VarriountHowever I get a wierd error in system.nim, in some branching procedure
18:31:13Araq0Dont patch lookup
18:31:26VarriountI'm not. I'm trying to modify semExpr
18:31:36Araq0Good
18:31:59*[1]Endy joined #nimrod
18:32:15VarriountAraq0, any idea why a call to qualifiedLookup would yield an attribute error for the name "son" in system.nim?
18:32:51VarriountSpecifically, c:\64\nimrod\lib\system.nim(2203, 19) Error: undeclared identifier: 'sons'
18:33:36Araq0You cant lookup a field via lookups
18:34:20*ics joined #nimrod
18:34:31MFlamerI've been digging deep in the compiler lately. I'm getting pretty familiar with how it all works and should be able to start helping with some of these problems soon.
18:34:45*Varriount hi-fives MFlamer
18:35:01*Endy quit (Ping timeout: 244 seconds)
18:35:01*[1]Endy is now known as Endy
18:35:38Araq0I will have more time and perhaps even internet by the end of the week
18:35:56Mat2just beside: How complex you guys want to get with the compiler ? (I mean, at some stage the intrinsic complexity can lead to chaotic behaviour and as result maybe only psychological analysis will help undestand it's nature)
18:36:15VarriountMat2, I want to compiler to work.
18:36:34*webskipper quit (Ping timeout: 244 seconds)
18:36:44VarriountIn this case, I will likely be adding less than 20 lines of code, most of it conditions
18:36:49VarriountWith comments
18:37:26*filwit joined #nimrod
18:37:27Araq0Expect me to rewrite it
18:37:59*CarpNet quit (Quit: Leaving)
18:38:20VarriountI always do. I've learned that no matter what I write, someone will always write it in a better way. The point is to make a start.
18:39:07Araq0Sure. Your doing great work anyway
18:39:24VarriountAraq, does the prefix "sk" mean anything in particular?
18:39:35filwitsymbole-kind
18:39:40filwitsymbol*
18:39:44VarriountAh, thanks
18:41:29filwitnp :)
18:42:13Araq0Btw do you guys prefer suffixes instead? Procsym?
18:42:56filwiti want 5 layers of nested hierarchy + 3 prefixs and 2 post-fixes
18:43:14reactormonkAraq0, where are the tests for the idetools?
18:43:19VarriountAraq, as long as the prefixes are explained somewhere, I'm fine with them.
18:43:22filwit(in reality, not sure what exactly you're asking)
18:43:39VarriountAnyway, got to go, I have class in 15 minutes, and need to print out a paper.
18:43:52filwitbye, Varriount
18:44:18VarriountBefore I go , anyone care to explain why this doesn't work?
18:44:20Varriount if not isNil(n.sons[0]) and n.sons[0].kind in {nkDotExpr}:
18:44:20Varriount var g = qualifiedLookup(c, n.sons[0].sons[1])
18:44:39filwitwhat is there to explain?
18:44:40Araq0Reactormonk: tests/caas
18:44:50VarriountIt gives me an error in system.nim
18:44:59filwitwhich line?
18:45:21Varriount2203
18:45:32filwitno i mean above, first or second?
18:45:33reactormonkAraq0, sweet
18:45:57filwitVarriount: i'm not sure what error it's giving you is all i'm saying
18:46:02Araq0I told you qualifiedlookup doesnt supprt arbitrary nkdotexpr
18:46:14filwitahh..
18:48:28filwitAraq0: i'm not sure if I was included in your question back there, but honestly I probably do prefer 'ProcSym' to 'SymProc'. Just my opinion.
18:49:39Araq0I meant skproc vs procsym
18:50:29dom96The latter is more descriptive than the former.
18:51:20filwitAraq0: nevermind then. personally i would prefer: SymKind.Proc here, but otherwise i prefer the 'sk' prefix cause it's common among all of those enums
18:51:39Araq0Alright. Might keep it in mind the next time i start from scratch
18:52:16Araq0(Which is never)
18:52:30*[1]Endy joined #nimrod
18:52:50filwitAraq0: not sure what you're talking about (but i assume it's my 'something.somethingelse' preference :)
18:53:54Araq0Yeah of course. Who doesnt
18:55:15filwitAraq0: .. i'm confused by that last comments. but regardless, i state my preference to start a debate or try and convince you you should add it or anything.
18:55:28filwitAraq0: sorry, i DIDN"T**
18:55:33*Endy quit (Ping timeout: 248 seconds)
18:55:34*[1]Endy is now known as Endy
18:55:36filwitAraq: typo
18:55:59*OrionPK joined #nimrod
18:56:22Araq0I know. I asked for your opinion
18:57:17filwitAraq0: ah, okay. Sorry for the confusion. Like I said, in terms of realistic Nimrod options, i prefer the way Nimrod currently does it (with the 'sk' prefix)
18:57:36Araq0And that last comment was subtle sacarsm, sorry
18:57:45MFlamerThe C generator creates some functions in the C scoure like "reprEnum" & "reprInt". For some reason I can't find where these are defined.
18:58:05MFlamerI like the sk, ty, nk prefix
18:58:17filwitAraq0: yeah i got it now. sometimes the subtle comments don't translate over the web correctly, my mistake.
18:59:00VarriountAraq, but I'm giving qualifiedLookup an nkIdent node
18:59:56Araq0Mflamer compilerprocs are not mangled
18:59:59filwitVarriount: "... and n.sons[0].kind in {nkDotExpr}:" only allows nkDotExpr through
19:00:22Araq0Varriount the worse
19:01:26*Endy quit (Ping timeout: 240 seconds)
19:01:34*Varriount is rewriting
19:01:43MFlamerAraq0: I'm not sure what that means here
19:02:26MFlamerwhat is this line doing? N_NIMCALL(NimStringDesc*, reprEnum)(NI e_69477, TNimType* typ);
19:02:26Mat2filwit: What's your native language ?
19:02:44filwitMat2: programming or IRL ?
19:03:20filwitMat2: i dont' really have a "native" programming language, but I'm from the US and only speak English
19:04:04filwithey folks, if anyone named something like "edA-qa mort-ora-y" shows up, it's probably the Leaf Language developer
19:05:00Araq0Ok. I am sure i can convince him to work on nimrod instead
19:05:13filwitI've been talking to him a little, (he's interested in Nimrod's GC design), and invited him to stop by and chat sometime.
19:05:30Mat2filwit: programming
19:05:46filwitAraq0: that would be cool :) lol, but i'm really just giving you a heads-up in case he comes around
19:06:16*BitPuffin joined #nimrod
19:06:27filwitMat2: I've used mostly Javascript (HTML, etc..), D, & C#
19:06:30VarriountHi BitPuffin!
19:07:12Mat2hi BitPuffin
19:07:23Araq0Mat2: about the complexity... there is no way going back. As soon as you have static typing you want generics etc
19:08:09filwitAraq0: I have been arguing some of the benefits of Nimrod's features to him (the leaf guy), and I think he was interested in knowing more about Nimrod, so he might show.
19:08:23Mat2Araq0: I know, the price to pay if you start this route
19:08:32Araq0And now people kind of expect dependent typing
19:08:44VarriountWhat is dependant typing>
19:08:47Varriount*?
19:08:49filwit^ ?
19:09:28filwitgive Varriount, filwit: http://en.wikipedia.org/wiki/Dependent_type
19:09:52Araq0what used to novel and complex is now common
19:09:54dom96!seen mortoray
19:09:54NimBotI have not seen mortoray
19:10:06dom96Looks like he has not been here yet.
19:10:09Mat2hi dom96
19:10:17Araq0And thus not regarded as complex anymore
19:10:21dom96hi Mat2
19:11:09filwitdom96: okay thanks. Just wanted to know.
19:11:29dom96of course my guess of his nick could be wrong heh
19:11:31VarriountAraq0, -> https://gist.github.com/Varriount/7436886
19:12:24VarriountEven though I check that the kind of node passed to lookupQualified is a nkIdent node, it still errors. :/
19:12:35filwitdom96: i'm worried he's going to show up, then Araq is going to tell him how crap he thinks Leaf is or something, and then the guy will hate us all. lol
19:12:51Varriount^ Programmers are not known for their tact.
19:13:04filwitlol, true enough
19:13:11dom96filwit: Come onnn, Araq would never do such a thing... surely... :P
19:13:12Mat2what mean tact ?
19:13:22OrionPKAraq especially
19:13:31filwitdom96: lol
19:14:21filwitMat2: tact means sensitivity to others feelings
19:14:37filwitMat2: basically
19:15:07Araq0I dont know leaf
19:15:25filwitAraq0: you don't read Phoronix?
19:15:28Araq0That helps to stay polite i guess
19:15:35filwitLOL
19:16:17Mat2filwit: ah, this kind of tactic !
19:16:33filwitAraq0: Phoronix did a story on Leaf "Soon to be great programming language".. i was thinking "damn, too bad we can't get him to write about Nimrod"
19:17:04filwitAraq0: http://leaflang.org/
19:17:54filwitfor some reason, i anticipate you will really hate the language..
19:17:55dom96We just need to bribe phoronix.
19:18:34Trixar_zaFinally a use for the surplus goat whores
19:18:41Trixar_zaOnly works on the Welsh, but still
19:18:50filwitdom96: we could just write a good article on how Nimrod's macros allow you to build your own type-hierarchy or something, then submit it to Phoronix
19:18:51dom96Araq0: Remember when reactormonk wanted to give you a bitcoin for something? You should see how much one is worth now :P
19:19:29dom96Well I think that what I discussed with BitPuffin is a good idea. We need an article per week.
19:19:44dom96Doesn't matter where, as long as someone writes something about Nimrod and gets it to reddit/HN.
19:21:10*webskipper joined #nimrod
19:21:10Mat2I can write about my progress if this would help (somehow I fear most readers wouldn't understand what I write however)
19:21:22filwitdom96: actually, i was thinking about what factors limit Nimrod's popularity recently, and I'm thinking docs is big area that could be cleaned up. Also, Nimrod simply needs better IDE tools, that takes a lot of work, but perhaps building Aporia and distributing the bins would help.
19:21:46dom96filwit: You're our designer, design nicer docs :P
19:22:02VarriountUse the same theme as the main website.
19:22:24Mat2as complexity seem to be favoured, how about a Eclipse plugin ?
19:22:27dom96hrm, I dunno. I think the design should be different.
19:22:34dom96Mat2: Bleh.
19:23:23filwitdom96, Varriount: well It's not just about visuals.. the docgen needs to be updated to have better category searching.
19:23:56filwitdom96, Varriount: for instance, often i want to find "all procs that modify a <someType>"
19:24:09Araq0Mat2: complexity doesnt mean "broken", though the correlation is high
19:24:22filwitdom96, Varriount: but I have to hunt through a giant list of procs which are often duplicated names and stuff
19:25:06dom96filwit: You can certainly figure out how to get the docgen to do that.
19:25:07filwitdom96, Varriount: i can design the visuals for the docs quickly, but I've never looked at the docgen at all
19:25:28filwitdom96: yeah, i figure it's probably not hard. I'll take a look later.
19:26:39reactormonkdom96, now we're talking about bitcents ^^
19:26:49dom96filwit: I think you should do a mock up of how you want it to look and then we can decide whether it will be easy to do.
19:27:40Mat2Araq0: A SM way of programming is always, ehm "broken" (there like it)
19:27:48filwitdom96: yeah that's my plan. I'll try and make something later this week.
19:33:18filwitdom96: btw, I like the code-highlighting on your blog. You can bring that to the docs?
19:34:07dom96filwit: Sure. It's one of Pygment's themes transformed to work with Nimrod's highlighting engine.
19:34:12Araq0Varriount i read your gist but your solution is wrong
19:34:33Araq0Fundamentally wrong
19:34:38filwitdom96: k great.
19:35:00BitPuffinI WAS PINGED BY SO MANY
19:35:05Araq0You cant lookup the identifier like this
19:35:19dom96BitPuffin: THE PINGS ARE TOO DAMN HIGH
19:35:31BitPuffinIT IS fowl'S FAULT
19:35:37BitPuffinhey Mat2 and Varriount
19:35:39BitPuffin!
19:35:43BitPuffinand not dom96
19:36:04dom96no hi for me!? </3
19:36:09BitPuffinnope
19:36:12BitPuffinyou get:
19:36:20BitPuffinhi hi dom96!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
19:36:27dom96yayayayya
19:36:37dom96hello BitPuffin!!!!!!! :)
19:39:22BitPuffinI hope that I get my website up this week
19:39:42BitPuffinthe annoying thing is that I wanted to write about linagl but compiler bugs are in the way
19:42:38VarriountAraq, is there a non-fundamentally wrong way?
19:42:50Varriount*Araq0
19:47:16OrionPKfilwit dom96 we need code highlighting for source code filters :)
19:47:48filwitOrionPK: source code filters?
19:48:02OrionPKfilwit http://nimrod-code.org/filters.html
19:48:16filwitOrionPK: my Kate language scheme is awesome, btw. It color codes things based on how they're used.. and Nimrod looks pretty
19:48:35Varriountfilwit, Kate?
19:48:57filwitVarriount: it's KDE's text editor. Kinda like GEdit, only much better :)
19:49:56Varriountfilwit, what do the file(s) that define the highlight scheme look like? Depending on what format they're in, I might be able to update the sublime text plugin
19:50:58filwitVarriount: it's something unique to KDE tools (i think), but it's pretty much the same a .lang file
19:51:17Varriountfilwit, can you post it somewhere?
19:51:21filwitVarriount: i was planning on porting it to .lang eventually, for use with Aporia
19:51:46filwitVarriount: sure. it's not done yet though (still some bugs in the regex on some places)
19:52:24Varriountfilwit, if it uses regex, then I can probably get it.
19:52:56filwitVarriount: https://gist.github.com/PhilipWitte/7437510
19:52:57Varriount(Btw, why is it that editor use regex for such things, and not something designed for language parsing, like EBNF, or PEG?)
19:53:51VarriountAraq0, you there?
19:53:53filwitVarriount: actually, I think Kate allows for more than just Regex (unlike .lang files?)
19:54:04*enurlyx joined #nimrod
19:54:33filwitVarriount: if you notice, there are a couple of places i "beginRegion" (also, there's some 'hymn' specific stuff in there that's not Nimrod)
19:57:21BitPuffinping zahary
19:57:32BitPuffinzahary seesm to be MIA
19:58:09VarriountSo, where to implement this fix...
19:58:27filwitVarriount: the resulting syntax looks something like this: http://reign-studios.net/philipwitte/screenshots/arch-win-mac2.png
19:58:49BitPuffinVarriount: by the way I think I'm gonna have time to finish the bug
19:58:57filwitVarriount: though i've changed the scheme slightly since that screen was taken
20:00:08*zahary quit (Ping timeout: 260 seconds)
20:03:10Mat2hi BitPuffin
20:03:40Mat2get some sleep, ciao
20:03:44*Mat2 quit (Quit: Verlassend)
20:03:49VarriountBitPuffin, I have found that bug from last night
20:03:59VarriountAnd know of *a* way to fix it.
20:04:52VarriountThough, Araq0 has hinted that my way is fundamentally wrong, he hasn't told me what the right way is, so I'm gonna go ahead.
20:09:28BitPuffinVarriount: Well I think I know where Araq0 wanted me to fix it
20:09:31BitPuffinand almost how
20:09:43BitPuffinVarriount: the *a* way you found was probably the same thing I initially did
20:10:13VarriountWhere/how? I'm looking at semexpr.semexpr, in the nkBrace case
20:10:40BitPuffinVarriount: I don't think we are talking about the same bug
20:11:16BitPuffinVarriount: how are you getting to know the compiler? just by hacking on it or by reading its code first
20:11:34VarriountI'm talking about the bug from last night - "obj.genericProc[type]()"
20:11:42VarriountBitPuffin, both.
20:11:56BitPuffinBecause I tried by just starting hacking but felt that I was fundamentally missing an understanding of how it works so I didn't know what to do
20:11:58VarriountIt helps that I know a litle bit about things like abstract syntax trees.
20:12:12BitPuffinVarriount: ah well then it isn't the same bug :
20:12:14BitPuffinp
20:14:36BitPuffinAraq0: did the golang people assassinate zahary?
20:18:22webskipperIs there a doc how to wrap ? For example wrappers / mysql.nim not really clear for me
20:19:11Araq0The golang people are too busy writing "if error { return err }" :p
20:20:37VarriountAraq0, what is fundamentally wrong with my approach of checking that a nkBracket node contains a nkDotExpr node with it's last child being a generic procedure?
20:22:02Araq0The last part
20:22:50Araq0You cant check for the generic proc in a.b without lookimg at a
20:24:21VarriountBecause...?
20:24:43Araq0 Also your rule is arbitrary
20:25:07Araq0What about (a.b)[c] ?
20:25:45Araq0You need to fix semarrayaccess or whatever its called
20:27:06Araq0General Semexpr for the x in x [y] is not wrong afaict
20:27:27filwitwebskipper: Nimrod supports a lot of 'c-types' in it's system module ('cint', 'clong', 'cstring', etc). These are useful for wrapping C.
20:27:38webskipper"cint{.stdcall, dynlib: lib, importc: "mysql_stmt_execute".}"
20:30:55BitPuffinAraq0: hehehe :P
20:31:15VarriountAraq0, so modify semArrayAccess to do... what? That calls semSubscript (and uses it if there's no overloaded subscript operator)
20:31:29BitPuffinAraq0: what have you written in nimrod except nimrod?
20:31:46VarriountAraq0, does semSubscript "unwrap" the expression part of the array?
20:35:01Araq0I think so yes
20:35:21Araq0Not sure what unwraps means here
20:35:40VarriountAh, yeah, skipTypes
20:36:19webskipperthis "*" is ugly
20:36:32webskipperhave to think about pointers every time lol
20:37:05Araq0Bitpuffin: nothing. Its obviously only good for compilers or gcs or vms or web stuff or scientific computing
20:37:35BitPuffinwebskipper: well it's better than public I think
20:37:58BitPuffinAraq0: people use it for scientific computing?
20:38:47VarriountBitPuffin, I believe Araq0 wrote nimgrep, among other things
20:39:23BitPuffinVarriount: and endb etc
20:39:29webskipperbtw: is the nimrod fixed or is it planed to change some syntax things (like this '*')
20:39:43BitPuffinbut I meant if he uses it to solve problems for personal projects
20:40:50VarriountHm. What would people expect (obj.genericProc)[type] to do..?
20:41:37BitPuffinVarriount: not compile?
20:41:55fowlVarriount, call `[]`(genericProc(obj), type)
20:42:34BitPuffinyeah true
20:42:37Araq0Webskipper some things will change; * will stay as nobody ever came up with something better
20:43:11BitPuffinAraq0: things will change? But what happened to the whole let's make it stable and 1.0 thing that we seem to be approaching
20:43:17webskipperexport proc() for example ?
20:43:51Araq0Bitpuffin *sigh*
20:44:14Araq0There is no contradiction here
20:44:43BitPuffinchange and stability is a bit contradictory
20:44:46BitPuffinbut whatever! :D
20:45:14BitPuffinall I want is competitive concurrency and working fleshed out generics and I'll be a happy man
20:45:21webskipperon other side I like the ref and ptr statements. Makes sense !
20:45:26BitPuffinand ofc the macro stuff but imagine that already works quite well >.<
20:45:26*fredmorcos joined #nimrod
20:45:35VarriountBitPuffin, a light can be stable, in the sense that it's brightness never changes, and yet can still change colors.
20:45:50Araq0Webskipper sucks too verbose and the name of the proc is too much in the middle if you know what i mean
20:46:05VarriountA molecule can be stable, and yet still undergo physical change.
20:46:09BitPuffinambiguous start of a sentence there
20:46:29BitPuffinVarriount: look at mr physicist here :P
20:47:18BitPuffinAraq0: ref and ptr is too verbose?
20:47:27BitPuffinhave you ever used java?
20:47:38webskipperexport he means
20:47:44BitPuffinexprt
20:47:45Araq0Webskipper: when i started with c i saw multiplications everywhere
20:47:46BitPuffin:P
20:47:50BitPuffinxprt
20:48:04Araq0Turned out ..
20:48:15VarriountAraq0, I share your viewpoint on * in C
20:48:23BitPuffinAraq0: but what about import and include, they are verbose too
20:48:32BitPuffinif export is verbose that is
20:48:41VarriountBitPuffin, but they are not used nearly as often as procs are.
20:48:57BitPuffinimp, inc, xprt
20:49:05BitPuffinVarriount: prc?
20:49:32BitPuffinI think inc and dec should have been incr and decr
20:49:35webskipperAraq0: sure but C is like a zombie - will never die. So a lot of people associate '*' with pointers
20:49:57BitPuffinbecause inc is slightly ambiguous, could mean include or whatever. dec can be declare or something
20:49:59Varriountwebskipper, for those zombies that still work with pointers >_>
20:50:21VarriountBitPuffin, I didn't choose the names. Though, I do agree with you.
20:50:37BitPuffinwhat about ª
20:50:43BitPuffinnobody associates that to anything
20:50:44VarriountIf you want, make a source code filter that transforms them, or aliased functions
20:50:46BitPuffincould be public :P
20:51:21BitPuffinVarriount: but then nimrodders reading my code won't be able to live
20:51:43BitPuffinnimrodders is too awkward to say. I'm gonna stick with nimbros
20:52:03*BitPuffin has a feeling that Araq0 despises the word nimbro
20:52:19Araq0Webskipper: fair enough but i dislike c enough to care about that
20:53:04Araq0Not to care? Well you know what i mean
20:53:20BitPuffinyeah to not care
20:53:33Araq0Ah yeah
20:54:17BitPuffinI don't really think it's a wise decision to design a language on the basis that this is what people coming from other languages will expect this to mean
20:54:23BitPuffinyou should take what is gooda
20:54:32BitPuffinand leave what is bad and pick what seems best
20:54:37BitPuffinor something :D
20:55:07BitPuffinAraq0: but C is at least better than C++ right?
20:55:25webskipperC++ is shit (in my view)
20:55:28Araq0Wrong imho
20:55:33BitPuffinwhaaaaaat
20:55:41BitPuffinI did not expect that
20:55:51BitPuffinplease justify :P
20:56:06BitPuffindom96: I am never leaving arch again
20:56:52fowlmost peoples complaints against c/++ is only syntax
20:57:04dom96hrm, I may have found a security hole in Northern Ireland's school thingy.
20:57:19dom96So hard not to abuse this :P
20:57:25BitPuffinsure the syntax sucks but that's not why the language sucks
20:57:32Araq0Imo c++'s problems nearly all come from c
20:57:34BitPuffindom96: abuse it and then do responsible disclosure
20:57:50BitPuffinBut not much of C is left in C++ imo
20:57:56BitPuffinexpect maybe pre processor
20:58:05BitPuffinand sure you can still include the C stuff
20:58:14BitPuffinbut it's sort of walled off in a way from the language
20:58:36BitPuffinand what remains is a pile of rotten diarrhea
20:59:03BitPuffinbut at least it's a fresh summer smoothie compared to java
20:59:11*Jackneill quit (Remote host closed the connection)
21:01:16webskipperjava has other concepts
21:01:40webskipperthe main concept is dictatorship
21:02:52Araq0The main concept is focus on the wrong paradigm, implemented poorly
21:02:56BitPuffinI vomit when I either have to force something that isn't an object into an object or write it in a class and put static on everything
21:03:14fowlforst crass functors
21:03:15BitPuffinAraq0: what's the right paradigm?
21:03:39fowlsubject oriented
21:03:42fowlfuck objects
21:03:56webskippersubject orientied - lol
21:04:06BitPuffinis that a thing?
21:04:08webskipperits orientied on ME ^^
21:04:19BitPuffinyeah wtf
21:04:23Araq0I'd like to call it "procedural on steroids"
21:04:29BitPuffin"Subject-Oriented Programming is an object-oriented software paradigm"
21:04:42BitPuffinfowl: what was that about objects again?
21:04:44Araq0But thats clearly bad for marketing
21:04:54BitPuffinAraq0: metaprogramming?
21:05:00fowlmetalprogramming*
21:05:05BitPuffinfuck yeah
21:05:09Araq0Lol
21:05:26BitPuffintech death metalprogramming
21:05:32webskipperanalprogramming
21:05:42fowlanalprobegramming*
21:06:06BitPuffinAraq0: what's the steroids in nimrod?
21:06:10fowlAraq0, do you get this joke? http://i.imgur.com/sggIZd3.jpg
21:06:31VarriountAraq, what exactly should I do in the semSubscript proc? Use skipTypes on the given node until I get a nkDotExpr, taking the last node of that, checking if it's an ident node and a type that's possibly a generic, and then instanciating the generic?
21:07:14Araq0Fowl: i think i do
21:07:15BitPuffinfowl: sounds like a rammstein song
21:08:31Araq0Bitpuffin: the syntactic flexibility and the metaprogramming
21:08:32Araq0Perhaps
21:09:46BitPuffinyeah I guess
21:09:52BitPuffinwell I guess flexibility in general
21:11:48VarriountThe real problem here is that you can't partially instanciate generics, can you?
21:12:11*CarpNet joined #nimrod
21:13:56Araq0Varriount: check out line 1929
21:15:30Araq0It does a shitty check whether its a generic invocation
21:16:33VarriountAraq0, that's where I was working before. It messes up if n.sons[0] is wrapped in something like a nkDotExpr or nkPar
21:17:14Araq0Better would be to check in semsubscript imdeed
21:18:07VarriountAnd add a check to go through parens and dotExprs?
21:18:24Araq0Hell no
21:20:10Araq0Add a typroc case to semsubscript
21:20:58Araq0And call explicitgenericinstantiation
21:21:50VarriountIt will have to be before the initial call on line ~1020 - "n.sons[0] = semExprWithType(c, n.sons[0])"
21:22:10Araq0Why?
21:22:19VarriountThats the part where the compiler crashes.
21:22:52*zahary joined #nimrod
21:22:53Araq0Thats what you need to fix too then
21:24:17VarriountThat would mean modifying... instanciateGenericParamList in types.nim
21:24:46Araq0Why?
21:25:37VarriountBecause that is where the root error is raised. There's a case in instanciateGenericParam list where, if the passed parameter list contains any generic types, an error is intentionally raised.
21:26:46VarriountSorry, that proc is in semcall, my bad.
21:26:58VarriountAnd semint
21:27:00Araq0Well you invoke semexprs for a.b so i dont get it
21:27:02Varriount*seminst
21:27:16VarriountHere, I'll post the traceback.
21:28:05Varriounthttps://gist.github.com/Varriount/7439073
21:31:04Varriountsemexpr is called with an nkBracket node, which in turn calls semArrayAccess, which calls semSubscript.
21:32:11VarriountsemSubscript calls passes the son of the nkBracket node to semExprWithType. In this case, the son is a nkDotExpr.
21:32:27*EXetoC joined #nimrod
21:32:29Araq0The problem is the generated nkdotcall
21:32:58Araq0Which transforms a.b into b (a)
21:33:19Araq0Which is wrong for your use case
21:33:50VarriountYes. It doesn't have the concrete types needed to instanciate the generic.
21:34:23Araq0Well but it doesnt have to
21:34:47Araq0It only needs to lookup, right?
21:37:25VarriountWell, wherever the generic is being instanciated, it's not being passes the concrete type needed.
21:37:31Varriount*passed
21:39:30Araq0Yes because builtinfieldaccess fails but shouldnt
21:40:15Araq0What is the example code again?
21:40:28Araq0That fails to compile
21:40:34VarriountBitPuffin gave it to me, one sec
21:42:09VarriountAraq0, -> https://gist.github.com/Varriount/7439309
21:43:01VarriountOrionPK was doing something with marshalling
21:44:13BitPuffinI did what?
21:44:38VarriountBitPuffin, sorry, I got you confused with OrionPK
21:44:46BitPuffinI have never seen that code in my life ;_;
21:44:47VarriountIt was late, and I was tired.
21:44:50BitPuffinprobably
21:48:45VarriountIt's too bad that I can't "rewind" the action of a program. A perfect debug tool would be one that records all function calls made, and lets you filter out trivial ones, until you get a "timeline" of a program's execution.
21:49:41VarriountWith function calls rising and falling on the graph as they are called by sub, and sub-sub* functions
21:50:51Araq0Er...
21:51:02Araq0This cant work
21:51:11Araq0It makes no sense
21:51:27MFlamerAraq0: I demand you stop what your doing and tell me what the fuck N_NIMCALL(NimStringDesc*, reprEnum)(NI e_69477, TNimType* typ); is doing
21:51:28Araq0Log is not a module name here
21:51:57Araq0Mflamer it declares reprenum
21:51:57MFlamerit was worth a try anyway
21:52:17Araq0Its a fucking prototype
21:52:26MFlamerwhere is the definition of the function then?
21:52:40OrionPKlog is a variable araq0
21:52:47OrionPKvar log = openLog("log2.db")
21:52:51Araq0Ind
21:52:57Araq0Eed
21:53:02Araq0I know
21:53:17Araq0Hence it cant work
21:53:44VarriountHuh?
21:53:50OrionPKit cant transform log.call[T]() to call[T](log) automatically?
21:54:00Araq0No sir
21:54:21OrionPKVarriount, see up where I told you what araq would tell us about this ;)
21:54:56OrionPKFowl told us this was a known issue and wouldnt work, but I think it's definitely a nice-to-have
21:55:00VarriountBecause when the log.call expression is parsed, it's not given the type.
21:55:04OrionPKor known behavior, not a known issue
21:55:11Araq0Its ambiguous like fuck as we experts like to say
21:55:22*fredmorcos quit (Quit: Leaving)
21:55:24OrionPKyou dont know the type of log?
21:56:05Araq0No
21:56:26OrionPKyou dont know the [string] generic?
21:56:53Araq0But log.call is looked up in log
21:57:07Araq0Log has no call field
21:57:32Araq0So its transformed into call (log)
21:58:01OrionPKwhy wouldn't it realize it's a proc not a field
21:58:21MFlamerOK, my search was bunk. I found reprEnum. my bad
21:58:32Araq0--> call has beem given no types
21:58:59OrionPKmaybe generics should be changed to <T> instead of [T] :P
21:59:27VarriountAraq, which is why we need to give it types beforehand, or allow semi-instanciated generics (which sound's painful)
21:59:33Araq0That doesnt affect your problem at all
21:59:49Araq0Its really simple
21:59:49OrionPKit knows that <T> is generic not index, so it knows it's a call not a field
22:00:28OrionPKyeah I havent looked at the source code in the compiler where the compiler is crashing
22:00:29fowlOrionPK, but thats a PITA because < and > are operators
22:00:44Araq0(Call (log))[t](...)
22:00:52OrionPKmaybe, it wouldnt be the first language to use <> for generics fowl
22:01:08Araq0Can you see the problem now?
22:01:48Araq0The choice of [] is irrelevant here
22:01:49OrionPKI would have thoguht [t] would be attached to Call
22:02:09VarriountOrionPK, remember the AST nodes I showed you?
22:02:16OrionPKvaguely
22:02:20Araq0Yeah well its not
22:03:03OrionPKanyway
22:03:11OrionPKVarriount, I told you :P
22:03:14VarriountCall
22:03:14Varriount BracketExpr
22:03:14Varriount Ident !"readLog"
22:03:14Varriount Ident !"string"
22:03:14Varriount Ident !"log"
22:03:15VarriountCall
22:03:17Varriount BracketExpr
22:03:19Varriount DotExpr
22:03:19Araq0And its consistent with obj.f[i]
22:03:21Varriount Ident !"log"
22:03:23Varriount Ident !"readLog"
22:03:25Varriount Ident !"string"
22:03:56VarriountThe first block is the one that works.
22:04:07OrionPKyeah
22:05:19OrionPKit's not ambiguous to me as a human, but araq is a computer so it is ambiguous :)
22:05:42VarriountThough, I still don't see why it can't be fixed *quickly* I don't see why it can't be fixed *at all*
22:06:14OrionPKmy guess is because it doesnt make any sense to fix
22:06:15*eigenlicht quit (Quit: WeeChat 0.3.2)
22:06:19OrionPKerm
22:06:22OrionPKI mean, to change
22:06:39OrionPKdoesnt make any sense to change it, because it works how god intended
22:07:53Araq0And fyi <> causes enormous problems for c++ and cripples generics in csharp and java
22:08:13OrionPKinteresting
22:08:25Araq0So "other langs do it" is a bs argument
22:10:54Araq0Either a.b[i] is parsed as (a
22:11:08BitPuffinD solved that with !()
22:11:28Araq0.b)[i]
22:11:47fowlBitPuffin, almost afraid to ask, wtf is !()
22:12:01VarriountAnd since nimrod can't partially instanciate generic procs, it fails.
22:12:17Araq0Or as a.(b[i])
22:12:55Araq0You cant have both just because you feel it is not ambiguous
22:12:59BitPuffinfowl: void foo!(T)(T a) { bar(a); }
22:13:15OrionPKif it's a [i] it should be (a.b)[i], if it's [T] it should be a.(b[T])
22:13:33OrionPKthats why I threw out the <> vs [] thing
22:14:34Araq0Good point but <> are operators
22:14:38OrionPKI know
22:14:44OrionPKif it's too early to tell whether you're trying to use [i] or [T]
22:15:05OrionPKbased on what's in between [ and ]
22:15:12Araq0Actually i plan to have [. ]
22:15:21OrionPKthat might work..
22:15:53Araq0But people already dislike {. }
22:15:59OrionPKyeah..
22:16:05OrionPKpeople like me ;)
22:16:28OrionPKbut some way to differentiate between [i] and [T] seems important at this stage of parsing
22:17:27VarriountI still have hope that it can be fixed without any major language changes.
22:17:28fowlOrionPK, especially when you can have a `[]`() that takes a typedesc as second param
22:17:36OrionPK:S
22:18:12VarriountCan't 'b' be checked to see if it's a generic proc?
22:18:21OrionPKyeah
22:18:37OrionPKif the identifier is already declared, it'd have to look at other modules potentially
22:19:33VarriountWhich can be done.
22:22:29*Araq0 quit (Ping timeout: 248 seconds)
22:24:40Varriount:<
22:25:01*Varriount is sorry for bothering Araq...
22:27:44OrionPKso wonder why it cant just try both :P
22:28:21OrionPK(a.b)[i] wasnt found, so instead of crashing it could try a.(b[i])
22:28:21VarriountOrionPK, I think it can, it's just too much of a hack.
22:29:03VarriountActually, I just commented out the part where the compiler throws the error, and now it just gives a regular type error
22:29:40OrionPKweird
22:37:23*gradha joined #nimrod
22:37:51VarriountI still don't understand why a.b wouldn't just evaluate to a partially generic function
22:52:56zaharybtw, most of the gripes with generics not having support for partial application or suffering from ambiguous syntax are resolved when you use typedesc params instead
22:54:29OrionPKzahary example?
22:54:40*p0nce left #nimrod (#nimrod)
22:55:07zaharyinstead of mycast[T](x), have mycast(T, x)
22:56:18OrionPKcan you then pass the typedesc into a generic [ ]?
22:56:22zaharylog.call(T) if we use the example from the current discussion
22:56:30zaharyyes
22:56:41OrionPKyeah, thanks I'll give that a shot later tonight
22:56:46zaharyprocs with typedesc params are generic too
22:57:18OrionPKgotcha
22:57:29OrionPKit's not a really huge deal for my purposes
22:57:56OrionPKit was just a pain in the ass for me to track down why it wasnt compiling
22:58:01BitPuffinzahary: does that solve my problems?
22:58:14zaharyBitPuffin, what are your problems?
22:58:19OrionPKtoo many to count
22:58:36BitPuffinzahary: everything generics basically
22:58:38BitPuffinno but
22:59:15BitPuffinzahary: you know passing values other than ranges to generics, referring to foo.type.T etc
22:59:30BitPuffinboth those are needed for my implementation of submatrices
22:59:44BitPuffinwhich are needed for my implementation of N-dimensional matrix determinants
23:00:13*OrionPK quit (Quit: Page closed)
23:01:08zaharywell, have you bugged me before for these. have you filled some bugs already? I missed a lot of messages
23:01:57zaharythings like foo.type.T should work, but they are not related to the typedesc params discussed here
23:02:47*Amrykid quit (Excess Flood)
23:04:06*Amrykid_ joined #nimrod
23:04:29BitPuffinzahary: foo.type.T does not work. There is a bug report for it 618, I even began fixing it but might continue tomorrow
23:04:33BitPuffin#618
23:04:51BitPuffinzahary: I'm not sure if there is a bug report for the passing int values to generics
23:04:53*Amrykid_ is now known as Amrykid
23:04:57*Amrykid quit (Changing host)
23:04:57*Amrykid joined #nimrod
23:05:59*CarpNet quit (Quit: Leaving)
23:07:01zaharyThis is complicated to fix, the bug happens when the dot syntax is used within the return type of the proc
23:07:58zaharythe problem is that the signature is read too early, before the generic is being instantiated - then after instantiation, the return type must be corrected in semtypinst
23:09:30BitPuffinzahary: guess my fixing process was entirely off then :P
23:09:41*enurlyx quit (Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332])
23:10:10BitPuffinI was kind of blindly doing what Araq told me to https://github.com/BitPuffin/Nimrod/commits/bug-618
23:10:12zaharywell, did you fix some crash that was happening early on? that could be useful
23:10:22BitPuffinfor the first part
23:10:27BitPuffinzahary: crash?
23:10:58BitPuffinbefore those commits I managed to get the error message from saying invalid type '' to invalid type 'T' lol :P
23:15:09zaharywell, have fun with the compiler, but this will take you on a long journey
23:16:40BitPuffin:/
23:16:55BitPuffinis this stuff baggage from being generated from pascal?
23:17:04BitPuffinI mean maybe not this particular thing
23:17:35BitPuffinbut I mean are there a lot of errors that come from not being written from scratch in nimrod to be a good poster child for good nimrod code
23:18:21BitPuffinor is it just that it would never get done if it was written to be the best possible nimrod code :P
23:24:10zaharywell, what do you mean exactly? part of the complexity comes from that fact that you are implementing a freaking compiler
23:24:59BitPuffinzahary: would a possible solution be to say that during the first pass of reading the signature, if a return type is undefined and spotted as being a nkDotExpr, store a reference to those parts of the code and if generic instantiation "has the answer" set the correct return type otherwise commit compiler suicide?
23:25:38BitPuffinzahary: Yeah I almost wrote that maybe it's just because compiler programming is the messiest kind of programming but didn't :P
23:25:59BitPuffinit feels like a kind of hacky way to do it though
23:26:24*OrionPK joined #nimrod
23:26:50*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=mcyhZEXwfh0 again)
23:28:48zaharyyes, that's the outline of the solution. you leave parts of the tyGenericBody dot expression unresolved and then later when you know the real type of the tyGenericBody, you get the final type in seminst/generateInstance
23:29:42BitPuffinzahary: so you think that's the solution to shoot for. Or is there some better more ideal solution?
23:29:47zaharybut to fix this properly would be quite complicated. there are other types of expressions that should get similar treatment
23:29:59zaharythings like macro calls and when statements
23:30:46zaharyproc foo(x: T): select_return_type(T) =
23:31:07*brson joined #nimrod
23:31:08BitPuffinzahary: so it's more or less a deeper problem with an aspect of the compiler architecture
23:31:10BitPuffin?
23:33:46VarriountBitPuffin, zahary, sounds like my generic problem :p
23:34:24BitPuffinVarriount, zahary: sounds like something crucial to fix :/
23:34:37zaharyyes, it's one of the harder problems in the compiler right now. Varriount, are you working on a language too or you have a similar problem in NImrod?
23:35:03Varriountzahary, obj.genericProc[type]() doesn't work.
23:35:36zaharyyou missed my previous message where I suggested that typedesc params are the recommended solution nowadays
23:35:38Varriountthe dotExpr is resolved without knowledge of the type, and the generic fails
23:35:51zaharymake that obj.genericProc(type) and you won't have problems
23:36:32zaharytypedesc params are currently much more capable, because they participate in the overload resolution process more properly
23:36:35BitPuffinzahary: any chance you can write something somewhere (I suggest the nimrod wiki on github) what needs to be done to fix it? I mean the proper fix other than this workaround
23:37:02BitPuffinjust so that we have some guidlines
23:37:05BitPuffinguidelines*
23:37:37VarriountBitPuffin, warning in the tutorial and/or the manual
23:39:28BitPuffinar actually, a really well written bug report detailing what the problem is and what is the ideal solution
23:40:02Varriountzahary, you mean arguments without types?
23:41:00zaharyVarriount, no. take a look at the section in the manual about typedesc params:
23:41:00zaharyhttp://build.nimrod-code.org/docs/manual.html#typedesc
23:41:31VarriountAh, thanks
23:41:59zaharyproc genericProc(obj: MyType, T: typedesc) is a way to define a proc that will accept a type (it will be a generic proc under the hood and T could be used a generic parameter)
23:42:35VarriountUnfortunately, new users coming from almost any other language will still use generics, instead of typedesc.
23:42:37BitPuffinanyways that would be nice because at the place I'm interning at at the moment I've got fuck all to do so maybe poking around in the compiler is a proper way to spend my time
23:43:11OrionPKzahary that typedesc solution doesnt seem to work w/ iterators
23:43:30zaharyBitPuffin, just try to study the code in seminst/generateInstance and see what's going on there (also semtypinst)
23:43:46zaharybut you could also try some other easier bug first :)
23:44:01BitPuffinyeah probably
23:44:03zaharyOrionPK: what's the example?
23:44:21BitPuffinbut this is basically the bug that is stopping me from getting stuff done :P
23:44:24OrionPKa.b(T) where b = iterator (A, T: typedesc): T
23:44:54zaharyI'll put in front of my todo list
23:45:26BitPuffinzahary: your todo list must be the longest scroll ever conceived :P
23:45:53BitPuffinwell and Araq's
23:48:38*brson quit (Ping timeout: 244 seconds)
23:55:55zaharyOrionPK: iterators with typedesc params work for me
23:55:55zaharyhttps://gist.github.com/zah/7440962