<<19-08-2012>>

01:22:49*Trixar_za is now known as Trix[a]r_za
01:29:52*q66 quit (Quit: Quit)
08:20:05dom96hello
08:53:08*llm joined #nimrod
09:28:09*llm quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347])
09:52:26Araqhi dom96
09:52:32dom96hello Araq
09:52:42Araqwindows tester online again? yay
09:52:57dom96yeah, I switched it on yesterday. I was curious :P
09:54:21Araqresults are not too bad
09:54:49dom96yeah
09:55:30AraqI came to the conclusion that 'bind' is wrongly designed :-/
09:55:41dom96how so?
09:55:44Araqit should be the default
09:55:53Araqand the other stuff should be listed
09:56:09Araqthe "open" identifiers
09:56:23dom96I agree :P
09:56:30Araqin fact we have:
09:56:45dom96I have to list quite a lot of things in jester
09:57:05Araq1) definition context (should be default)
09:57:07Araq2) instantiation context ('inject'?)
09:57:09Araq3) merged context (definition + module level scope of instantiation)
09:57:57Araqcurrently we do (3) in generics with the option to do (1) via 'bind'
09:58:18Araqand we do (2) in templates with the option to do (1) via 'bind'
09:58:23Araqthat sucks
09:59:29*Trix[a]r_za is now known as Trixar_za
09:59:56Araqbtw proc parseUrlQuery*(query: string, result: var PStringTable) in utils.nim
10:00:04Araqmake that: proc parseUrlQuery*(query: string, result: PStringTable)
10:00:16Araqno need for 'var', it's already a "PStringTable"
10:00:39Trixar_zaHey dom96 and Araq
10:01:00Araqhi Trixar_za
10:01:11dom96Araq: Will do
10:02:38Araqand parseContentDisposition should be a proc :P
10:03:06dom96Araq: Aporia is gathering quite a few nice gtk utility functions. Would you like a gtk helper in Nimrod's stdlib?
10:03:45Araqsure
10:03:53shevy\o/
10:04:31AraqparseMultiPart looks horribly inefficient :P
10:04:56dom96Araq: Fix it and make a pull request then :P
10:05:05Araqhe he, alright
10:05:20Araqresult = initTable[string, tuple[fields: PStringTable, body: string]]() # omg :P
10:05:27*Trixar_za looks at his code
10:05:36Trixar_zaWhen did I create these server modules?
10:07:13dom96Trixar_za: Yesterday, at precisely 5am GMT+1.
10:07:24Trixar_zaProbably
10:07:29Trixar_zaMe and drunk coding :/
10:07:32dom96hehe
10:08:02Araqand parseMultiPart() should be part of the stdlib
10:08:02Trixar_zaSeems I split it out of the TS6 module and made the TS6 module generic
10:08:08Araqit's way too useful
10:08:32Trixar_zaNow I have 3 more IRCd modules
10:08:42Trixar_zaDrinking is fun
10:10:30Araq TNodeType = enum
10:10:32Araq TNodeText, TNodeField
10:10:41Araqwtf? TNodeText ain't a type ...
10:10:49Araqconfusing :P
10:11:03dom96It technically is :P
10:11:12dom96TNodeType
10:11:18Araqno it's a value
10:11:26AraqTNodeType is a type
10:11:47*dom96 shrugs
10:11:56Araqcan you do:
10:12:01Araqvar x: TNodeText
10:12:09dom96Yeah, I get it
10:12:09Araqno you can't, so it's no type :P
10:20:14*q66 joined #nimrod
10:31:48dom96I could really use a backwardFind function for strings
10:32:21dom96Araq: How should I implement it?
10:39:44fowlcountdown(str.len-1, 0)
10:40:29fowl:p
10:41:37dom96hehe
10:42:23dom96By the looks of Araq's find function, I bet he would deem 'countdown' too inefficient :P
10:46:58dom96Argh, screw that.
10:55:14dom96hrm, interesting algorithm
10:58:46Araqcountdown has 0 overhead :P
11:01:00dom96I tried adjusting your findAux function.
11:01:12dom96Not very easy
11:01:26Araqyou mean the one in strutils?
11:01:35dom96yes
11:01:40Araqdon't do that, the algorithm won't work backwards :P
11:01:49dom96alright
11:02:20Trixar_zaSo it's a cow algorithm
11:02:55Trixar_zaYou can lead it up the spiral staircase, but you can't bring it back down (since it can't walk backwards)
11:13:04Araqlol
11:13:40Araqwell you could do: s.len - find(s.reverse, x.reverse)
11:13:44AraqI think
11:14:07Araqexcept that 'reverse' breaks for utf-8 chars anyway ;-)
11:15:53AraqI have to go, see you later
11:39:08Araqback
11:39:23Araqdamn if I break templates, I might as well do it properly and break them only once ...
11:42:28Araqdom96: does jester still compile with today's compiler?
11:42:40Trixar_zaI sense a great disturbance in the force
11:42:55dom96Araq: I'm not sure
11:48:35shevyTrixar_za have you been to the toilet already today?
11:48:41Trixar_zaYes
11:48:46shevythen I am out of ideas
11:49:02Trixar_zaAnd thousands of souls were suddenly silenced
11:56:43Araqhm
11:56:53*Araq needs to try the new aporia features
11:57:07*Trixar_za wonders if it compiles on 32bit yet
11:58:12dom96probably not
11:59:34dom96Try it :P
12:03:07Araqlater
12:25:28*Trixar_za is now known as Trix[a]r_za
13:30:49*comex quit (*.net *.split)
14:09:47*comex joined #nimrod
14:14:20Araqso who's up for syntactic questions?
14:14:41dom96I'm down
14:14:59Araqcool
14:15:05dom96Also I just installed Cinnamon
14:15:11Araqwhat's that?
14:15:22dom96A window manager
14:16:32fowlhow do you like it
14:16:37Araqlooks cool
14:16:41dom96It's nice.
14:16:46dom96I don't like any of the theme though
14:16:48AraqI like the "DarkCold" theme :P
14:16:55dom96*themes
14:17:19fowlif you want to change the window decorator, it doesnt tell you this, but you have to restart cinnamon for it to take effect
14:17:19dom96bleh
14:17:54dom96I'm fine with how the windows look
14:18:01dom96I don't like how the panel/scrollbars look though
14:18:19Araqhrm 1154 updates available ...
14:18:25fowli use ICS for the panel
14:18:52Araqwell we need a keyword for the opposite of "bind"
14:18:55dom96ICS?
14:19:03Araqfor now I can only think of "mixin"
14:19:07dom96Araq: unbind? :P
14:19:20Araq"mixin" is cooler :P
14:19:21fowlyea its in the default themes i think
14:20:14dom96fowl: The only theme that was there when I installed this was "Cinnamon"
14:22:32dom96fowl: Are you talking about the Holo (Android inspired) theme?
14:23:02dom96It's quite nice actually.
14:24:45fowlhmm ICS isnt on the website
14:25:34fowldo you have cinnamon-themes and mint-artwork-cinnamon?
14:26:58dom96I just added another panel
14:27:07dom96and moved the window list to the empty one
14:27:14dom96Why is it not filling the full panel?
14:31:33fowliunno, gnome?
14:37:36dom96ok, I think I got it working now
14:39:04fowldom96: how should i store user addresses in my server, should i just save the PAsyncSocket?
14:39:31dom96hrm, you mean their IP address?
14:40:04fowlyeah their ip/port or just the socket so i can send to them later
14:40:57dom96You're using UDP aren't you?
14:41:16fowlyes
14:41:58dom96Saving the ip/port would be more efficient.
14:42:11dom96It would probably be more convenient to save the PAsyncSocket though
14:42:22dom96I'm not sure if you can retrieve the port.
14:42:46dom96hrm.
14:44:11dom96I don't have much experience with UDP server sockets i'm afraid
14:44:37fowli think i'll be able to store the pasyncsocket
14:45:08dom96What do you use to receive data from clients?
14:45:21dom96You don't use accept(), or do you?
14:45:45fowlrecvAsync()
14:47:01dom96And you perform that on the server socket don't you?
14:48:36fowlno thats from handleRead() so its from whatever socket gets passed in
14:52:39dom96Isn't that always the server socket?
14:57:53fowli dunno :x
14:57:56fowlbrb in a few
15:10:13dom96oh look
15:10:15dom96New Ludum Dare
15:10:26dom96Looks like I'll have an excuse to try out nimgame :D
15:13:01dom96hrm, I see.
15:13:44dom96fowl: Saving just the IP address should be fine. And you can keep the port the same
15:14:15dom96You don't even really need a socket
15:14:26dom96You could just use sendTo and recvFrom
16:08:59*shevy quit (Ping timeout: 260 seconds)
16:19:11Araqdom96: does asyncio now use closures?
16:19:18dom96yes
16:19:37Araqso you ported everything to use closures? o.O
16:19:54Araqgot rid of the PObject param?
16:20:04dom96I didn't port everything.
16:20:10dom96Well, the stdlib should work
16:20:22Araqexcellent
16:20:23dom96I didn't port nimbuild etc though
16:20:28Araqlol, alright
16:21:16*shevy joined #nimrod
16:22:04Araqshevy!
16:27:08dom96So...
16:27:22dom96Babel or Aporia?
16:27:23fowlhey not fair i was going to start my sentence with 'so'
16:28:01fowlaporia!
16:28:21dom96hehe
16:29:05dom96The "bark" sound effect is funny :P
16:51:11fowlhow do I get the IP from the socket? :)
16:51:45*Boscop joined #nimrod
16:51:52Araqhi Boscop
16:52:11AraqI noticed you pinged me :-)
16:53:40Boscophi, yeah, I was curious how you went about the ADL / implicit arguments question
16:55:06Araqcurrently there is a c++-like Koenig's lookup
16:55:28Araqbut it's really error prone and so I'm considering to change it
16:55:38Boscopah
16:56:17dom96fowl: Use recvFrom
16:56:47AraqI'm thinking about doing it this way: symbols are looked up in generics in the definition scope
16:57:15Araqand there is a 'mixin' keyword to get explicit scope injection from instantiation scopes
16:58:33Boscopyou could have a keyword that causes a symbol to be looked up at isntantiation scope, like $foo, you could also use this in macros for unhygienic stuff like string interpolation
16:58:36fowldom96: you mean recvFromAsync?
16:58:45dom96fowl: yeah
16:59:02Boscopbut then it's not visible from the outside which symbols are required to be in the instantiation scope
17:00:18Araqtrue and good documentation comments need to patch over that
17:02:03Araqto clarify: your $foo would be (mixin foo) as keywords work better in nimrod
17:02:16Araqas nimrod embraces user defined operators
17:04:39Araqand indeed it should work the same in macros
17:11:26Boscopah
17:30:27AraqBoscop: in fact 'mixin' would consider both definition and instantiation scopes, but I wonder how useful that really is
17:31:40Boscopif you want to support unhygienic macros with that (e.g. for string interpolation) it would be useful to be able to lookup symbols in the instantiation scope given their name as string
17:31:58Boscopthat's how nemerle implements string interpolation with the % operator IIRC
17:33:10Araqtrue but that wasn't the question, was it?
17:34:51fowlproc `&`(s: string, n: pnimrodnode): pnimrodnode = result = newidentnode(s & $n.ident)
17:35:17fowlwhats wrong with that
17:41:18Araqfowl: I dunno, what's the error message?
17:42:30AraqBoscop: afaic D has templates and mixin templates which either perform lookup with definition scope (ordinary template) or with instantiation scope (mixin template). there is no "mixed mode". right?
17:43:25Boscopright, but you can mix templates and mixins
17:43:44Araqyou mean "string mixins"?
17:43:51fowl i use newIdentNode("read"& $typeName.ident) works fine
17:44:03Boscopalso normal templates
17:44:19Araqah I see
17:44:24Boscopthey can contain mixin statements for other mixin templates, and mixin templates can instantiate normal templates
17:54:35Araqfowl: maybe 'n' is no identifier node
17:57:35fowlthats what assert is for
17:58:49Araqmake the proc compiletime
18:07:25AraqBoscop: any idea why Go disallows closure comparisons?
18:07:40Araqafaic it only allows a test against nil
18:08:10Boscopyou mean comparing their address?
18:08:34AraqI mean comparing higher order functions
18:08:44Boscopcomparing in what way?
18:08:49Araqequality
18:08:57Boscopyou can't compare whether they compute the same function
18:09:00Araqif f == g:
18:09:18Araqsure, but you can compare whether they point to the same function
18:09:25Boscopso their address
18:09:29Araqyeah
18:09:41Araq(sorry)
18:10:07BoscopI don't know their rationale behind it
18:10:48BoscopI guess it's because they are often inlined etc
18:10:56Araqthe rationale was something like "equality for higher order functions is problemantic as it's not clear whether the environment pointer should be compared too"
18:11:41Boscopthere could be two comparison operators, one with and one without env
18:11:41Araqand so Go doesn't support it afaik
18:11:54Araqyeah that's what nimrod allows for
18:11:59Boscopnice
18:17:24Araqthey also claim "tryLock" is racy and thus not in Go's stdlib
18:17:32AraqI couldn't find reasons for that either
18:17:46AraqtryLock is not racy at all
18:21:22Araqhttp://osdir.com/ml/go-language-discuss/2012-08/msg00013.html
18:23:16Araq"This is inherently racy. What if tryLock returns true, and then the
18:23:18Araqholder of the lock releases it immediately afterward?" <-- this makes no sense whatsoever to me
18:23:56Araqoh I see
18:24:08Araqthey have no idea how tryLock works ... omg
19:17:19fowldom96: it looks like sendTo is written specifically for TCP
19:17:35dom96it's not
19:18:03dom96in fact it's written specifically for UDP
19:18:08dom96What makes you think it's written for TCP?
19:18:37fowlit uses IPPROTO_TCP and SOCK_STREAM
19:20:47dom96That's just for looking up the hostname
19:20:54dom96I don't think it really matters
19:21:18dom96It could be a mistake. But it worked in my tests
19:21:49dom96connect does the exact same thing
19:31:11fowlyup
19:31:12fowlit works
19:35:06Araqugh ... the compiler itself does unhygienic macro stuff
19:35:25Araqand we have no pragmas for for loop variables so I can't annotate them
19:35:37Araq:-|
19:40:37Araqdom96: sorry, but your pragma highlighting sucks
19:40:57Araq{.warn: "ugh, not highlighted".}
19:46:07dom96Araq: It is for me.
19:46:26Araqnever mind, I'm still using some old version
19:46:34dom96lol
19:49:34dom96oh!
19:49:47dom96This should be fun. `gorge` yay
19:55:48Araqdom96: where do you need 'gorge' for?
19:57:15dom96Araq: Git head ref in version :P
19:57:42Araqin aporia?
19:57:48dom96yes
19:57:50Araqomg
19:57:58Araqdont do that please
19:58:03dom96why not?
19:58:16Araqbecause I say so
19:58:51Araqoh well
19:59:03Araqi dont care, go ahead
19:59:21dom96Why do you care?
20:00:03Araqbecause it shouldn't matter
20:00:24Araqand because people may want to compile it with no ".git" directory
20:00:52Araqsource code should compile on its own and not rely on some metadata about it
20:01:25dom96Well I should be able to check for the existence of .git and 'git'?
20:01:28dom96meh
20:01:33dom96fine
20:01:39dom96I won't add it
20:01:45Araqthanks
21:18:28fowli changed defpacket() to generate normal object types and now repr() fails :(
21:18:40Araqknown bug
21:19:07AraqRTTI for objects is broken for some reason
21:39:42shevy\o/
21:39:44dom96Good night
21:41:00Araqbye, dom96