01:22:49 | * | Trixar_za is now known as Trix[a]r_za |
01:29:52 | * | q66 quit (Quit: Quit) |
08:20:05 | dom96 | hello |
08:53:08 | * | llm joined #nimrod |
09:28:09 | * | llm quit (Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]) |
09:52:26 | Araq | hi dom96 |
09:52:32 | dom96 | hello Araq |
09:52:42 | Araq | windows tester online again? yay |
09:52:57 | dom96 | yeah, I switched it on yesterday. I was curious :P |
09:54:21 | Araq | results are not too bad |
09:54:49 | dom96 | yeah |
09:55:30 | Araq | I came to the conclusion that 'bind' is wrongly designed :-/ |
09:55:41 | dom96 | how so? |
09:55:44 | Araq | it should be the default |
09:55:53 | Araq | and the other stuff should be listed |
09:56:09 | Araq | the "open" identifiers |
09:56:23 | dom96 | I agree :P |
09:56:30 | Araq | in fact we have: |
09:56:45 | dom96 | I have to list quite a lot of things in jester |
09:57:05 | Araq | 1) definition context (should be default) |
09:57:07 | Araq | 2) instantiation context ('inject'?) |
09:57:09 | Araq | 3) merged context (definition + module level scope of instantiation) |
09:57:57 | Araq | currently we do (3) in generics with the option to do (1) via 'bind' |
09:58:18 | Araq | and we do (2) in templates with the option to do (1) via 'bind' |
09:58:23 | Araq | that sucks |
09:59:29 | * | Trix[a]r_za is now known as Trixar_za |
09:59:56 | Araq | btw proc parseUrlQuery*(query: string, result: var PStringTable) in utils.nim |
10:00:04 | Araq | make that: proc parseUrlQuery*(query: string, result: PStringTable) |
10:00:16 | Araq | no need for 'var', it's already a "PStringTable" |
10:00:39 | Trixar_za | Hey dom96 and Araq |
10:01:00 | Araq | hi Trixar_za |
10:01:11 | dom96 | Araq: Will do |
10:02:38 | Araq | and parseContentDisposition should be a proc :P |
10:03:06 | dom96 | Araq: Aporia is gathering quite a few nice gtk utility functions. Would you like a gtk helper in Nimrod's stdlib? |
10:03:45 | Araq | sure |
10:03:53 | shevy | \o/ |
10:04:31 | Araq | parseMultiPart looks horribly inefficient :P |
10:04:56 | dom96 | Araq: Fix it and make a pull request then :P |
10:05:05 | Araq | he he, alright |
10:05:20 | Araq | result = initTable[string, tuple[fields: PStringTable, body: string]]() # omg :P |
10:05:27 | * | Trixar_za looks at his code |
10:05:36 | Trixar_za | When did I create these server modules? |
10:07:13 | dom96 | Trixar_za: Yesterday, at precisely 5am GMT+1. |
10:07:24 | Trixar_za | Probably |
10:07:29 | Trixar_za | Me and drunk coding :/ |
10:07:32 | dom96 | hehe |
10:08:02 | Araq | and parseMultiPart() should be part of the stdlib |
10:08:02 | Trixar_za | Seems I split it out of the TS6 module and made the TS6 module generic |
10:08:08 | Araq | it's way too useful |
10:08:32 | Trixar_za | Now I have 3 more IRCd modules |
10:08:42 | Trixar_za | Drinking is fun |
10:10:30 | Araq | TNodeType = enum |
10:10:32 | Araq | TNodeText, TNodeField |
10:10:41 | Araq | wtf? TNodeText ain't a type ... |
10:10:49 | Araq | confusing :P |
10:11:03 | dom96 | It technically is :P |
10:11:12 | dom96 | TNodeType |
10:11:18 | Araq | no it's a value |
10:11:26 | Araq | TNodeType is a type |
10:11:47 | * | dom96 shrugs |
10:11:56 | Araq | can you do: |
10:12:01 | Araq | var x: TNodeText |
10:12:09 | dom96 | Yeah, I get it |
10:12:09 | Araq | no you can't, so it's no type :P |
10:20:14 | * | q66 joined #nimrod |
10:31:48 | dom96 | I could really use a backwardFind function for strings |
10:32:21 | dom96 | Araq: How should I implement it? |
10:39:44 | fowl | countdown(str.len-1, 0) |
10:40:29 | fowl | :p |
10:41:37 | dom96 | hehe |
10:42:23 | dom96 | By the looks of Araq's find function, I bet he would deem 'countdown' too inefficient :P |
10:46:58 | dom96 | Argh, screw that. |
10:55:14 | dom96 | hrm, interesting algorithm |
10:58:46 | Araq | countdown has 0 overhead :P |
11:01:00 | dom96 | I tried adjusting your findAux function. |
11:01:12 | dom96 | Not very easy |
11:01:26 | Araq | you mean the one in strutils? |
11:01:35 | dom96 | yes |
11:01:40 | Araq | don't do that, the algorithm won't work backwards :P |
11:01:49 | dom96 | alright |
11:02:20 | Trixar_za | So it's a cow algorithm |
11:02:55 | Trixar_za | You can lead it up the spiral staircase, but you can't bring it back down (since it can't walk backwards) |
11:13:04 | Araq | lol |
11:13:40 | Araq | well you could do: s.len - find(s.reverse, x.reverse) |
11:13:44 | Araq | I think |
11:14:07 | Araq | except that 'reverse' breaks for utf-8 chars anyway ;-) |
11:15:53 | Araq | I have to go, see you later |
11:39:08 | Araq | back |
11:39:23 | Araq | damn if I break templates, I might as well do it properly and break them only once ... |
11:42:28 | Araq | dom96: does jester still compile with today's compiler? |
11:42:40 | Trixar_za | I sense a great disturbance in the force |
11:42:55 | dom96 | Araq: I'm not sure |
11:48:35 | shevy | Trixar_za have you been to the toilet already today? |
11:48:41 | Trixar_za | Yes |
11:48:46 | shevy | then I am out of ideas |
11:49:02 | Trixar_za | And thousands of souls were suddenly silenced |
11:56:43 | Araq | hm |
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:12 | dom96 | probably not |
11:59:34 | dom96 | Try it :P |
12:03:07 | Araq | later |
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:20 | Araq | so who's up for syntactic questions? |
14:14:41 | dom96 | I'm down |
14:14:59 | Araq | cool |
14:15:05 | dom96 | Also I just installed Cinnamon |
14:15:11 | Araq | what's that? |
14:15:22 | dom96 | A window manager |
14:16:32 | fowl | how do you like it |
14:16:37 | Araq | looks cool |
14:16:41 | dom96 | It's nice. |
14:16:46 | dom96 | I don't like any of the theme though |
14:16:48 | Araq | I like the "DarkCold" theme :P |
14:16:55 | dom96 | *themes |
14:17:19 | fowl | if 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:19 | dom96 | bleh |
14:17:54 | dom96 | I'm fine with how the windows look |
14:18:01 | dom96 | I don't like how the panel/scrollbars look though |
14:18:19 | Araq | hrm 1154 updates available ... |
14:18:25 | fowl | i use ICS for the panel |
14:18:52 | Araq | well we need a keyword for the opposite of "bind" |
14:18:55 | dom96 | ICS? |
14:19:03 | Araq | for now I can only think of "mixin" |
14:19:07 | dom96 | Araq: unbind? :P |
14:19:20 | Araq | "mixin" is cooler :P |
14:19:21 | fowl | yea its in the default themes i think |
14:20:14 | dom96 | fowl: The only theme that was there when I installed this was "Cinnamon" |
14:22:32 | dom96 | fowl: Are you talking about the Holo (Android inspired) theme? |
14:23:02 | dom96 | It's quite nice actually. |
14:24:45 | fowl | hmm ICS isnt on the website |
14:25:34 | fowl | do you have cinnamon-themes and mint-artwork-cinnamon? |
14:26:58 | dom96 | I just added another panel |
14:27:07 | dom96 | and moved the window list to the empty one |
14:27:14 | dom96 | Why is it not filling the full panel? |
14:31:33 | fowl | iunno, gnome? |
14:37:36 | dom96 | ok, I think I got it working now |
14:39:04 | fowl | dom96: how should i store user addresses in my server, should i just save the PAsyncSocket? |
14:39:31 | dom96 | hrm, you mean their IP address? |
14:40:04 | fowl | yeah their ip/port or just the socket so i can send to them later |
14:40:57 | dom96 | You're using UDP aren't you? |
14:41:16 | fowl | yes |
14:41:58 | dom96 | Saving the ip/port would be more efficient. |
14:42:11 | dom96 | It would probably be more convenient to save the PAsyncSocket though |
14:42:22 | dom96 | I'm not sure if you can retrieve the port. |
14:42:46 | dom96 | hrm. |
14:44:11 | dom96 | I don't have much experience with UDP server sockets i'm afraid |
14:44:37 | fowl | i think i'll be able to store the pasyncsocket |
14:45:08 | dom96 | What do you use to receive data from clients? |
14:45:21 | dom96 | You don't use accept(), or do you? |
14:45:45 | fowl | recvAsync() |
14:47:01 | dom96 | And you perform that on the server socket don't you? |
14:48:36 | fowl | no thats from handleRead() so its from whatever socket gets passed in |
14:52:39 | dom96 | Isn't that always the server socket? |
14:57:53 | fowl | i dunno :x |
14:57:56 | fowl | brb in a few |
15:10:13 | dom96 | oh look |
15:10:15 | dom96 | New Ludum Dare |
15:10:26 | dom96 | Looks like I'll have an excuse to try out nimgame :D |
15:13:01 | dom96 | hrm, I see. |
15:13:44 | dom96 | fowl: Saving just the IP address should be fine. And you can keep the port the same |
15:14:15 | dom96 | You don't even really need a socket |
15:14:26 | dom96 | You could just use sendTo and recvFrom |
16:08:59 | * | shevy quit (Ping timeout: 260 seconds) |
16:19:11 | Araq | dom96: does asyncio now use closures? |
16:19:18 | dom96 | yes |
16:19:37 | Araq | so you ported everything to use closures? o.O |
16:19:54 | Araq | got rid of the PObject param? |
16:20:04 | dom96 | I didn't port everything. |
16:20:10 | dom96 | Well, the stdlib should work |
16:20:22 | Araq | excellent |
16:20:23 | dom96 | I didn't port nimbuild etc though |
16:20:28 | Araq | lol, alright |
16:21:16 | * | shevy joined #nimrod |
16:22:04 | Araq | shevy! |
16:27:08 | dom96 | So... |
16:27:22 | dom96 | Babel or Aporia? |
16:27:23 | fowl | hey not fair i was going to start my sentence with 'so' |
16:28:01 | fowl | aporia! |
16:28:21 | dom96 | hehe |
16:29:05 | dom96 | The "bark" sound effect is funny :P |
16:51:11 | fowl | how do I get the IP from the socket? :) |
16:51:45 | * | Boscop joined #nimrod |
16:51:52 | Araq | hi Boscop |
16:52:11 | Araq | I noticed you pinged me :-) |
16:53:40 | Boscop | hi, yeah, I was curious how you went about the ADL / implicit arguments question |
16:55:06 | Araq | currently there is a c++-like Koenig's lookup |
16:55:28 | Araq | but it's really error prone and so I'm considering to change it |
16:55:38 | Boscop | ah |
16:56:17 | dom96 | fowl: Use recvFrom |
16:56:47 | Araq | I'm thinking about doing it this way: symbols are looked up in generics in the definition scope |
16:57:15 | Araq | and there is a 'mixin' keyword to get explicit scope injection from instantiation scopes |
16:58:33 | Boscop | you 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:36 | fowl | dom96: you mean recvFromAsync? |
16:58:45 | dom96 | fowl: yeah |
16:59:02 | Boscop | but then it's not visible from the outside which symbols are required to be in the instantiation scope |
17:00:18 | Araq | true and good documentation comments need to patch over that |
17:02:03 | Araq | to clarify: your $foo would be (mixin foo) as keywords work better in nimrod |
17:02:16 | Araq | as nimrod embraces user defined operators |
17:04:39 | Araq | and indeed it should work the same in macros |
17:11:26 | Boscop | ah |
17:30:27 | Araq | Boscop: in fact 'mixin' would consider both definition and instantiation scopes, but I wonder how useful that really is |
17:31:40 | Boscop | if 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:58 | Boscop | that's how nemerle implements string interpolation with the % operator IIRC |
17:33:10 | Araq | true but that wasn't the question, was it? |
17:34:51 | fowl | proc `&`(s: string, n: pnimrodnode): pnimrodnode = result = newidentnode(s & $n.ident) |
17:35:17 | fowl | whats wrong with that |
17:41:18 | Araq | fowl: I dunno, what's the error message? |
17:42:30 | Araq | Boscop: 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:25 | Boscop | right, but you can mix templates and mixins |
17:43:44 | Araq | you mean "string mixins"? |
17:43:51 | fowl | i use newIdentNode("read"& $typeName.ident) works fine |
17:44:03 | Boscop | also normal templates |
17:44:19 | Araq | ah I see |
17:44:24 | Boscop | they can contain mixin statements for other mixin templates, and mixin templates can instantiate normal templates |
17:54:35 | Araq | fowl: maybe 'n' is no identifier node |
17:57:35 | fowl | thats what assert is for |
17:58:49 | Araq | make the proc compiletime |
18:07:25 | Araq | Boscop: any idea why Go disallows closure comparisons? |
18:07:40 | Araq | afaic it only allows a test against nil |
18:08:10 | Boscop | you mean comparing their address? |
18:08:34 | Araq | I mean comparing higher order functions |
18:08:44 | Boscop | comparing in what way? |
18:08:49 | Araq | equality |
18:08:57 | Boscop | you can't compare whether they compute the same function |
18:09:00 | Araq | if f == g: |
18:09:18 | Araq | sure, but you can compare whether they point to the same function |
18:09:25 | Boscop | so their address |
18:09:29 | Araq | yeah |
18:09:41 | Araq | (sorry) |
18:10:07 | Boscop | I don't know their rationale behind it |
18:10:48 | Boscop | I guess it's because they are often inlined etc |
18:10:56 | Araq | the 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:41 | Boscop | there could be two comparison operators, one with and one without env |
18:11:41 | Araq | and so Go doesn't support it afaik |
18:11:54 | Araq | yeah that's what nimrod allows for |
18:11:59 | Boscop | nice |
18:17:24 | Araq | they also claim "tryLock" is racy and thus not in Go's stdlib |
18:17:32 | Araq | I couldn't find reasons for that either |
18:17:46 | Araq | tryLock is not racy at all |
18:21:22 | Araq | http://osdir.com/ml/go-language-discuss/2012-08/msg00013.html |
18:23:16 | Araq | "This is inherently racy. What if tryLock returns true, and then the |
18:23:18 | Araq | holder of the lock releases it immediately afterward?" <-- this makes no sense whatsoever to me |
18:23:56 | Araq | oh I see |
18:24:08 | Araq | they have no idea how tryLock works ... omg |
19:17:19 | fowl | dom96: it looks like sendTo is written specifically for TCP |
19:17:35 | dom96 | it's not |
19:18:03 | dom96 | in fact it's written specifically for UDP |
19:18:08 | dom96 | What makes you think it's written for TCP? |
19:18:37 | fowl | it uses IPPROTO_TCP and SOCK_STREAM |
19:20:47 | dom96 | That's just for looking up the hostname |
19:20:54 | dom96 | I don't think it really matters |
19:21:18 | dom96 | It could be a mistake. But it worked in my tests |
19:21:49 | dom96 | connect does the exact same thing |
19:31:11 | fowl | yup |
19:31:12 | fowl | it works |
19:35:06 | Araq | ugh ... the compiler itself does unhygienic macro stuff |
19:35:25 | Araq | and we have no pragmas for for loop variables so I can't annotate them |
19:35:37 | Araq | :-| |
19:40:37 | Araq | dom96: sorry, but your pragma highlighting sucks |
19:40:57 | Araq | {.warn: "ugh, not highlighted".} |
19:46:07 | dom96 | Araq: It is for me. |
19:46:26 | Araq | never mind, I'm still using some old version |
19:46:34 | dom96 | lol |
19:49:34 | dom96 | oh! |
19:49:47 | dom96 | This should be fun. `gorge` yay |
19:55:48 | Araq | dom96: where do you need 'gorge' for? |
19:57:15 | dom96 | Araq: Git head ref in version :P |
19:57:42 | Araq | in aporia? |
19:57:48 | dom96 | yes |
19:57:50 | Araq | omg |
19:57:58 | Araq | dont do that please |
19:58:03 | dom96 | why not? |
19:58:16 | Araq | because I say so |
19:58:51 | Araq | oh well |
19:59:03 | Araq | i dont care, go ahead |
19:59:21 | dom96 | Why do you care? |
20:00:03 | Araq | because it shouldn't matter |
20:00:24 | Araq | and because people may want to compile it with no ".git" directory |
20:00:52 | Araq | source code should compile on its own and not rely on some metadata about it |
20:01:25 | dom96 | Well I should be able to check for the existence of .git and 'git'? |
20:01:28 | dom96 | meh |
20:01:33 | dom96 | fine |
20:01:39 | dom96 | I won't add it |
20:01:45 | Araq | thanks |
21:18:28 | fowl | i changed defpacket() to generate normal object types and now repr() fails :( |
21:18:40 | Araq | known bug |
21:19:07 | Araq | RTTI for objects is broken for some reason |
21:39:42 | shevy | \o/ |
21:39:44 | dom96 | Good night |
21:41:00 | Araq | bye, dom96 |