00:33:40 | * | brson joined #nimrod |
00:34:16 | EXetoC | mepp |
00:35:43 | * | OrionPK quit (Remote host closed the connection) |
00:40:16 | * | OrionPK joined #nimrod |
01:02:13 | * | OrionPK quit (Remote host closed the connection) |
01:03:03 | * | OrionPK joined #nimrod |
01:10:25 | BitPuffin | EXetoC: ppem |
01:16:29 | * | brson quit (Ping timeout: 252 seconds) |
01:18:43 | Varriount | Araq, where would I place a test program for the stdlib that requires root privleges to run properly? |
01:22:55 | * | brson joined #nimrod |
02:27:01 | * | zielmicha1 joined #nimrod |
02:28:20 | * | zielmicha quit (Ping timeout: 245 seconds) |
04:04:53 | * | BitPuffin quit (Ping timeout: 272 seconds) |
04:06:16 | OrionPK | woot |
04:06:22 | OrionPK | I just beat string concat |
04:06:32 | OrionPK | 0.9670 vs 1.116 seconds |
04:07:38 | OrionPK | 0.9670 vs 1.116 seconds |
04:07:43 | OrionPK | oops |
04:15:59 | * | ics joined #nimrod |
04:21:01 | * | EXetoC quit (Quit: WeeChat 0.4.2) |
04:38:22 | * | Demos quit (Remote host closed the connection) |
05:29:01 | * | brson quit (Quit: leaving) |
05:56:10 | * | xenagi quit (Quit: Leaving) |
05:57:35 | * | ics quit (Quit: Textual IRC Client: www.textualapp.com) |
07:42:04 | * | OrionPK quit (Remote host closed the connection) |
07:46:53 | * | OrionPK joined #nimrod |
07:50:01 | * | shodan45 joined #nimrod |
08:51:50 | * | jpoirier quit (Quit: Leaving...) |
10:19:18 | * | Araq_ joined #nimrod |
10:32:19 | * | io2 joined #nimrod |
10:40:14 | * | Mordecai joined #nimrod |
10:40:58 | * | psquid quit (Ping timeout: 245 seconds) |
11:03:35 | * | gradha joined #nimrod |
11:03:44 | * | olahol joined #nimrod |
11:06:25 | NimBot | Araq/Nimrod master d3a0194 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds example to locals() docstring. |
11:06:25 | NimBot | Araq/Nimrod master b6cdee4 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds docstring to rstgen.defaultConfig. |
11:06:25 | NimBot | Araq/Nimrod master 43d12ef Grzegorz Adam Hankiewicz [+0 ±2 -0]: Merge pull request #776 from gradha/pr_docs... 2 more lines |
11:30:00 | * | achim joined #nimrod |
11:36:25 | * | achim quit (Quit: Computer has gone to sleep.) |
11:40:33 | * | Mordecai quit (Ping timeout: 245 seconds) |
11:45:34 | * | io2 quit (Ping timeout: 246 seconds) |
11:46:33 | * | faassen joined #nimrod |
11:48:46 | * | BitPuffin joined #nimrod |
11:58:03 | * | BitPuffin quit (Ping timeout: 245 seconds) |
12:05:05 | * | gradha_ joined #nimrod |
12:06:37 | * | gradha quit (Ping timeout: 272 seconds) |
12:06:38 | * | Raynes quit (Ping timeout: 272 seconds) |
12:06:38 | * | fowl quit (Ping timeout: 272 seconds) |
12:06:40 | * | p0nce is now known as ponce |
12:06:59 | * | Raynes joined #nimrod |
12:07:02 | * | fowl joined #nimrod |
12:07:21 | * | fowl quit (Changing host) |
12:07:21 | * | fowl joined #nimrod |
12:07:46 | * | Raynes is now known as Guest57142 |
12:10:51 | * | psquid joined #nimrod |
12:11:17 | * | achim joined #nimrod |
12:14:58 | * | Mordecai joined #nimrod |
12:15:46 | * | psquid quit (Disconnected by services) |
12:15:48 | * | Mordecai is now known as psqui |
12:15:50 | * | psqui is now known as psquid |
12:22:06 | * | BitPuffin joined #nimrod |
12:22:36 | * | Araq_ quit (Read error: Connection timed out) |
12:22:49 | * | achim quit (Quit: Textual IRC Client: http://www.textualapp.com/) |
12:24:58 | * | Araq_ joined #nimrod |
12:31:28 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
12:31:45 | * | BitPuffin joined #nimrod |
12:41:32 | * | ponce is now known as Guest45223 |
12:48:49 | BitPuffin | hmm |
12:49:04 | BitPuffin | can objects have constants? |
12:49:40 | BitPuffin | or bah, I guess I could just create a proc or method that returns a value |
12:50:10 | gradha_ | why would you attach a constant to a runtime object requiring some kind of runtime indirection access? |
12:51:21 | BitPuffin | gradha_: because I want to be able to use polymorphism with multiple object types for the same proc, but I want them to have a value for what table they are in that is constant and shared across objects instead of setting one per object |
12:53:55 | gradha_ | create a 'proc getConstant(type): int = myConstant' for each type, that can be used at compile time |
12:54:44 | gradha_ | oh, unless you need runtime methods and stuff, then it can't be constant |
12:55:32 | BitPuffin | gradha_: yes, see what I wrote above |
12:55:35 | BitPuffin | or bah, I guess I could just create a proc or method that returns a value |
12:57:00 | * | EXetoC joined #nimrod |
13:01:31 | * | darkf quit (Quit: Leaving) |
13:03:50 | BitPuffin | uh |
13:03:56 | BitPuffin | is it legal to just have an empty object? |
13:04:06 | BitPuffin | type TFoo = object of TObject |
13:04:09 | BitPuffin | and that's it? |
13:05:48 | Kooda | `type TFoo = object` seems valid as well |
13:05:59 | BitPuffin | cool |
13:11:36 | BitPuffin | hmm tricky |
13:17:35 | * | Araq_ quit (Read error: Connection timed out) |
13:18:37 | * | Araq_ joined #nimrod |
13:24:05 | * | gradha_ quit (Ping timeout: 245 seconds) |
13:47:19 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]) |
14:40:57 | * | Araq_ joined #nimrod |
14:44:48 | * | psquid quit (*.net *.split) |
14:50:15 | * | psquid joined #nimrod |
14:51:05 | dom96 | sup |
14:59:51 | * | achim joined #nimrod |
15:01:47 | * | Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]) |
15:02:19 | * | achim quit (Client Quit) |
15:21:15 | * | gradha joined #nimrod |
15:42:05 | * | Guest45223 is now known as ponce__ |
15:57:19 | * | gradha quit (Ping timeout: 260 seconds) |
16:10:07 | * | gradha joined #nimrod |
16:14:18 | * | achim joined #nimrod |
16:18:07 | * | achim quit (Client Quit) |
16:19:39 | * | Mordecai joined #nimrod |
16:21:11 | * | psquid quit (Ping timeout: 246 seconds) |
16:21:41 | * | Mordecai is now known as psquid |
16:41:39 | * | OrionPK quit (Remote host closed the connection) |
16:46:00 | * | OrionPK joined #nimrod |
16:59:22 | NimBot | Araq/Nimrod master 5141f3e Grzegorz Adam Hankiewicz [+0 ±1 -1]: Removes generated .dot file uploaded by mistake. |
16:59:22 | NimBot | Araq/Nimrod master 84a878f Grzegorz Adam Hankiewicz [+0 ±1 -1]: Merge pull request #791 from gradha/pr_removes_generated_file... 2 more lines |
17:13:20 | NimBot | Araq/Nimrod master 43dd889 Michał Zieliński [+0 ±1 -0]: httpclient: strip trailing whitespace from headers.... 3 more lines |
17:13:20 | NimBot | Araq/Nimrod master ebab484 Dominik Picheta [+0 ±1 -0]: Merge pull request #788 from zielmicha/httpclient-fix... 2 more lines |
17:17:35 | Varriount | Good morning! |
17:18:51 | gradha | yoo hooooo |
17:19:51 | Varriount | The hiiiiiillllsss are aliiiiiivveee!!!! |
17:20:09 | Varriount | Wiiiitth the sooouuunnd of muuuusiiiic! |
17:20:34 | gradha | right |
17:20:52 | dom96 | I've heard that in Friends. What does that reference? |
17:21:16 | Varriount | dom96, It's from the musical "The Sound of Music" |
17:21:46 | Varriount | Starring Julie Andrews (Actress from Mary Poppins) |
17:21:59 | dom96 | never heard of it heh |
17:22:26 | dom96 | I don't really enjoy musicals though |
17:22:59 | Varriount | Hey dom96, can I get you to test something for me? |
17:23:41 | dom96 | ehh sure. But i'm not on linux atm (I presume you want me to test it on linux?) |
17:23:46 | Varriount | Oh, yes. |
17:24:26 | Varriount | I need to get these additions to os.nim tested |
17:24:39 | dom96 | which ones? I can test them later. |
17:24:47 | Varriount | I'd like to be sure that I haven't broken something, seeing as os.nim is a core lib |
17:25:00 | Varriount | dom96, It's a branch on my fork of nimrod |
17:25:14 | Varriount | 'os/add-linkprocs' |
17:26:02 | Varriount | And here's the test script - https://gist.github.com/Varriount/8185073 |
17:26:33 | Varriount | dom96, just so you know, the test script needs root priveleges, or at least, the ability to create symlinks and hardlinks |
17:26:54 | dom96 | I don't think symlinks require root privs. |
17:26:59 | dom96 | not sure about hardlinks |
17:27:08 | Varriount | Hardlinks do, on Linux |
17:27:16 | Varriount | Symlinks, depends on the distro |
17:27:40 | Varriount | On Windows, both symlinks and hardlink creation require admin rights |
17:29:12 | * | Demos joined #nimrod |
17:30:08 | Varriount | Hi Demos . Made progress on that visual studio extension? |
17:32:08 | Demos | not much, been away from a windows computer. And it is going slow besides as it is a side project. |
17:41:15 | * | Demos quit (Remote host closed the connection) |
17:46:06 | Kooda | Hardlinks do not require root privileges under unix-like systems |
17:47:36 | Araq | Varriount: just put the test under tests/admin or something like that |
17:48:00 | Varriount | Kooda, well in that case, if you are running a unix-like system at this time, would you do me the favor of running the test script with the aforementioned branch? |
17:50:45 | Kooda | Will do, just let me get into my train |
17:54:27 | gradha | Kooda: transport tycoon FTW |
17:57:02 | Araq | oh btw I remembered the tester has a plugin system, Varriount :-) |
17:57:43 | Varriount | Huh. Odd design choice - walkDirRec only yields files, not files/directories/links |
17:58:25 | gradha | bbl |
17:58:27 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again) |
17:59:05 | Araq | well you can splitFile on the file to get the path but if you traverse the directory recursively, why would you ever want the directories? |
17:59:28 | Varriount | Araq, to copy the directories? |
18:00:19 | Varriount | Create a list of all the directories, files, links, etc in a target directory? |
18:00:24 | Varriount | *To create |
18:00:31 | Araq | use walkdir for that |
18:00:53 | Varriount | But walkDir isn't recursive |
18:01:13 | Araq | so use recursion lol |
18:01:28 | Varriount | Araq, I just find it.. unexpected |
18:02:12 | Varriount | I would have thought that a procedure whose name is the same as that of "walkDir", with "Rec" as an addition, would yield the same kind of type. |
18:03:10 | Varriount | I mean, seeing the two procedures in name only, I would have thought that the only marked difference between the two would be that one is recursive, while the other is not. |
18:05:06 | * | DAddYE joined #nimrod |
18:06:33 | Araq | that's a good point Varriount, however |
18:06:50 | Araq | walkDirRec is only for convenience and as such should handle the common case |
18:07:14 | Araq | the common case as far as I can see it, is that you want to yield over every file |
18:07:24 | * | jpoirier joined #nimrod |
18:07:54 | Araq | as soon as you have a case statement to distinguish the different kinds you might as well code the recursion explicitly |
18:08:13 | Varriount | Wait, what? Explain? |
18:10:50 | Araq | sorry bbl |
18:14:49 | * | igorkot joined #nimrod |
18:17:37 | * | OrionPK quit (Remote host closed the connection) |
18:18:34 | Araq | hi igorkot welcome |
18:19:39 | Araq | Varriount: well if you have: |
18:19:51 | Araq | for k, f in walkDirRec("..."): |
18:19:54 | * | igorkot quit (Remote host closed the connection) |
18:19:55 | Araq | case k |
18:20:02 | Araq | of ... |
18:20:25 | Araq | it's a small step to put it into a proc and invoke it recursively for pcDir |
18:20:46 | Araq | so it provides nothing over walkDir |
18:21:22 | Araq | so I chose to make walkDirRec yield only filenames |
18:26:57 | Varriount | Araq: But on the other hand, if walkDirRec were to accept filter arguments, it would be trivial to simply ignore the kind returned by the iterator and still give the same functionality. |
18:27:32 | Araq | yeah I guess :P |
18:29:25 | Varriount | My main concern here is with flexability. walkDirRec intentionally witholds information gained from walkDir. From the view of a user of the standard library, that's irritating, as it either means that the user has to write what is, in essence, a copy of walkDirRec with one or two lines changes, or work around the information withheld by walkDirRec by determining the kind of the path returned. |
18:29:49 | Araq | well the thing is |
18:31:50 | Araq | lets just deprecate waldDirRec |
18:32:19 | Araq | afterwards we can change its interface |
18:34:37 | Araq | there is also walkFiles which can be used for the same anyway |
18:35:44 | Araq | and I think the 'rec' part is a bit misguided as it encourages to iterate over files in .git directories for instance, in other words it's common to trim the tree traversal but *Rec doesn't support this |
18:37:00 | Varriount | Araq: Maybe I'm just too used to designing a couple of very flexible/powerful 'root' procedures, and then splitting up their functionality via simple 'child' procedures. :/ |
18:37:47 | NimBot | nimrod-code/babel master 64164e9 Dominik Picheta [+0 ±2 -0]: Version 0.2 |
18:39:38 | Araq | well koch.nim uses walkDir and walkFiles but not walkDirRec :P |
18:40:15 | Araq | and we all know a sample set of size 1 is representative ;-) |
18:40:52 | * | Varriount is glad he took an advanced statistics course in high-school |
18:41:30 | Varriount | Or in German terms, in.. Gymnasium, I think? |
18:41:50 | Araq | hmm not sure, I think so |
18:42:51 | Araq | yeah, high school graduation is comparable to the Abitur according to the internet |
18:43:28 | dom96 | First official babel release! yay! |
18:43:34 | Varriount | :D |
18:44:07 | Araq | dom96: congratulations |
18:44:47 | dom96 | thank you |
18:45:52 | * | OrionPK joined #nimrod |
18:50:02 | dom96 | Damn it. |
18:50:23 | dom96 | Found a bug that I missed lol |
18:50:36 | Araq | releases are hard |
18:50:50 | dom96 | yep |
18:51:27 | Araq | that's why we don't have any anymore :-/ |
18:51:54 | Varriount | Hm. Why is it that, when nimbuild runs the tester, it uses the nimrod lib found in the system nimrod installation, instead of nimbuild's version of nimrod? |
18:52:27 | Araq | dom96 doesn't know about --lib I guess :P |
18:53:44 | Varriount | Well, it's playing havok with my attempts to develop parts of the stdlib. |
18:54:36 | Araq | well so please fix it |
18:55:10 | Varriount | Yes mother. |
18:55:16 | Araq | oh I wanted to tell you a story about a plugin system |
18:56:53 | Araq | when I wrote the tester I had the problem that I had lots of tests that need to do special things, for instance the symbolFiles tests need to clear the nimcache at startup |
18:57:18 | Araq | so I wanted to run scripts from the tester |
18:57:51 | Araq | and these scripts should be in nimrod too of course but need to access some internal objects in the tester |
18:59:04 | Araq | so I needed a proper scripting layer and some support to inject data types and operations in the scripts' scope |
19:00:28 | Araq | however I had no such scripting engine. So what should I do? I can't wait for it to arrive, tests are too important |
19:00:48 | Araq | I came up with a much simpler solution instead |
19:01:32 | Araq | instead of scripts I made specials.nim an include file |
19:01:52 | Araq | and tada all the features I wanted where already there |
19:02:52 | Varriount | Ok, interesting. |
19:02:53 | Araq | the only downside is that you have to recompile the tester when you change the "scripts" |
19:03:19 | Araq | but I couldn't care less about that, compile times are fast enough |
19:05:09 | dom96 | http://forum.nimrod-lang.org/t/331 |
19:07:05 | * | io2 joined #nimrod |
19:08:17 | OrionPK | yay |
19:12:56 | Varriount | Araq, what's the policy for using assertions? |
19:13:13 | Varriount | I mean, when should assertions be used in place of raising exceptions? |
19:13:39 | Araq | to tell the programmer that you screwed up API usage asserts should be used, not exceptions |
19:13:49 | * | DAddYE_ joined #nimrod |
19:14:03 | Varriount | Ok. Gotcha. |
19:15:14 | Araq | don't introduce ArgumentException or some stupid stuff, it doesn't play nice with the effect system, assert pretends to not raise any exceptions |
19:15:31 | Araq | for this reason |
19:17:31 | * | DAddYE quit (Ping timeout: 260 seconds) |
19:19:47 | * | DAddYE_ quit (Remote host closed the connection) |
19:20:20 | * | DAddYE joined #nimrod |
19:31:50 | Varriount | Araq, does 'koch tests' accept the --lib argument? |
19:34:14 | Araq | yup |
19:35:04 | Varriount | so 'koch tests --lib:.\lib' should work? |
19:36:02 | Araq | sorry I misread koch.nim |
19:36:10 | Araq | nah it doesn't work |
19:36:25 | * | Varriount goes to open another branch |
19:37:38 | dom96 | hah. No wonder I don't know about it, when it doesn't exist for koch tests :P |
19:37:48 | Varriount | Also, how do I use the boolean 'and' on a set? |
19:39:04 | Araq | if flags * {foo, bar} == {foo, bar}: |
19:50:00 | * | faassen quit (Quit: Leaving.) |
19:51:10 | * | Guest57142 is now known as Raynes |
19:51:11 | * | Raynes quit (Changing host) |
19:51:11 | * | Raynes joined #nimrod |
19:53:01 | Varriount | Araq, how do you want walkDirRec to be deprecated? Do you want me to modify the behavior now, add a 'when defined(compatAPI)', create a new procedure..? |
19:53:12 | Varriount | * or create a |
19:53:38 | Araq | just mark it {.deprecated.} |
19:53:49 | Varriount | Ok. |
19:54:32 | BitPuffin | dom96: diddely doddely |
19:54:39 | BitPuffin | Araq: wanna play dota later? |
19:54:42 | Varriount | You know, it occurs to me that the new procedure could actually subsume walkDir's implementation |
19:54:46 | BitPuffin | We'll play single draft for ze balance |
19:54:53 | BitPuffin | dom96 can't join us |
19:55:43 | Varriount | Araq, what do you think? -> https://gist.github.com/Varriount/8187182 |
19:57:19 | * | gradha joined #nimrod |
19:57:29 | BitPuffin | dom96: just kidding, ofc you can |
19:57:38 | Araq | BitPuffin: nope. will never play it again, it's stupid |
19:57:51 | Varriount | If you add pcDir and pcLinkToDir to the yieldFilter args, and take them out of the followFilter args, you get walkDir |
19:58:15 | BitPuffin | Araq: well with single draft it is much less stupid |
19:58:31 | BitPuffin | Araq: it let's each player select only between three random heroes |
19:58:38 | BitPuffin | so people don't pick lame combos as easily |
19:59:02 | BitPuffin | Araq: be a good dragon |
20:04:37 | gradha | dom96: does it make sense to distribute babel binaries? babel depends on the compiler, so if you install only the babel binary it won't help much |
20:05:35 | dom96 | gradha: Indeed. The archive for windows which I created rebuilds babel anyway. |
20:06:34 | * | Demos joined #nimrod |
20:07:14 | gradha | in the future an ouroboros compiler could help with that |
20:07:48 | Demos | so I think I will have syntax highlighting working if I can get visual studio to actually recognise that my extension depends on a native DLL |
20:08:10 | Araq | Varriount: it's ok ... :P |
20:08:32 | Varriount | Araq, only ok?... *goes off and cries* |
20:09:04 | * | DAddYE_ joined #nimrod |
20:09:11 | Araq | btw pathPair should be PathPair and constants are in UpperCaseMode too |
20:09:46 | Araq | yay for --cs:partial now we need to make people adhere to a naming convention |
20:10:25 | Varriount | I'm still not sure if PathPair is a good name for a path and it's kind, but I have yet to think of any beteer name. |
20:10:28 | Varriount | *beter |
20:10:31 | Varriount | *better |
20:10:41 | OrionPK | cool demos |
20:10:53 | Araq | nice Demos |
20:11:31 | Demos | well that is a big if, I am not even sure how MS feels about distributing native code with language extensions |
20:11:41 | * | DAddYE quit (Ping timeout: 252 seconds) |
20:12:21 | Araq | Varriount: since it's a tuple there is no need to name the type |
20:12:54 | Varriount | Araq, well yes, but have you seen the length of the entire type description? |
20:13:17 | Araq | yes that's why you only got an "ok" |
20:13:18 | Varriount | "tuple[kind: TPathComponent, path: string]" is 41 characters long |
20:13:57 | Varriount | The only way I could shorten it is to use the new PathKind enum types |
20:15:50 | Varriount | Araq, any possible ways to improve it then? |
20:16:21 | Araq | nah, but I still like walkDir better :P |
20:16:31 | Araq | what's the new PathKind enum type? |
20:17:19 | Varriount | TPathComponent with an extra member, pkNone |
20:17:30 | Varriount | It's for the path classification procedure. |
20:18:38 | Araq | ah yeah |
20:19:07 | * | DAddYE_ quit (Remote host closed the connection) |
20:19:43 | * | DAddYE joined #nimrod |
20:22:03 | EXetoC | "when defined(isMainModule)" works? |
20:22:22 | Araq | no it's always defined |
20:22:26 | EXetoC | it's a bool. I've only seen "when isMainModule" |
20:22:29 | EXetoC | right |
20:22:30 | Araq | when isMainModule |
20:22:36 | Varriount | Oh. My bad. |
20:23:01 | Araq | oh I see, yeah missed that |
20:23:03 | Varriount | Araq, would you prefer that I shorten the argument names to 'follows |
20:23:20 | Varriount | * `follows` and `gives`? |
20:25:10 | Araq | fine with me |
20:25:14 | EXetoC | includes/yields? |
20:25:28 | Araq | follows/yields |
20:28:48 | EXetoC | yeah |
20:43:03 | dom96 | BitPuffin: sooo, shall we? |
20:51:40 | Varriount | Araq, dom96, My computer, including the builders, are going to be offline for a bit - I'm installing a Linux distro onto a secondary hard drive |
20:51:53 | * | Varriount quit (Quit: Leaving) |
21:16:48 | dom96 | BitPuffin: HELLO?!? |
21:37:06 | * | Demos_ joined #nimrod |
21:41:17 | * | Demos quit (Ping timeout: 272 seconds) |
21:46:23 | OrionPK | woot |
21:46:26 | OrionPK | just got my chemex |
21:47:06 | dom96 | your what? |
21:47:19 | OrionPK | http://graphics8.nytimes.com/images/2010/04/22/t-magazine/22strand-chemex/22strand-chemex-custom1.jpg |
21:47:50 | gradha | needs a nimrod wrapper |
21:48:16 | OrionPK | https://github.com/onionhammer/onion-nimrod/blob/master/stringbuilder/stringbuilder.nim |
21:48:29 | OrionPK | anyone care to suggest any ways I can improve the performance of this |
21:50:12 | Araq | do not use 'nostackframe' for fuck's sake! |
21:50:23 | OrionPK | will that improve the performance? |
21:51:14 | OrionPK | araq this is the noodle phase, where I am just throwing shit at the wall and seeing what sticks :p |
21:51:47 | Araq | stringbuilder is offensive, use a string instead |
21:51:53 | dom96 | Is that string builder significantly faster than a normal string? |
21:51:59 | OrionPK | yes |
21:52:03 | dom96 | By how much? |
21:52:04 | Araq | no |
21:52:06 | OrionPK | yes |
21:52:23 | Araq | preallocated with 'setlen' or newStringOfCap ? |
21:52:25 | gradha | OrionPK: var result = newStringOfCap(10_000 * 80) |
21:52:33 | gradha | OrionPK: that makes both tests practically the same |
21:52:36 | OrionPK | String Concatenation Operation took 4.020s StringBuilder Concatenation Operation took 2.687s |
21:53:11 | gradha | String Concatenation Operation took 1.722s |
21:53:12 | gradha | StringBuilder Concatenation Operation took 1.652s |
21:53:43 | gradha | without preallocation the normal concatenation takes 3s due to reallocations I presume |
21:53:51 | OrionPK | that improves the performance of string allocation gradha |
21:54:01 | OrionPK | not what Im really aiming to improve |
21:54:02 | OrionPK | :p |
21:54:30 | gradha | I think it shows that you only get marginal optimization from then on |
21:54:55 | OrionPK | how do I know the capacity in the first place |
21:55:02 | OrionPK | I dont |
21:55:16 | OrionPK | if I knew the capacity to make the string before a dynamic operation, all my problems would be solved |
21:55:42 | gradha | so strings are being added while you are looping? can't you loop first and add all the len() calls? |
21:56:25 | OrionPK | I want a drop in replacement for use in my template module |
21:56:37 | OrionPK | where basically it calls result.add("") a bunch |
21:56:45 | OrionPK | and then renders to a string at the end of the procedure |
21:57:02 | dom96 | Doesn't the compiler just optimise the 'discard $result' away? |
21:57:31 | OrionPK | dont think so.. |
21:57:49 | OrionPK | the results are very different w/o that line dom96 |
21:58:03 | OrionPK | String Concatenation Operation took 4.043s StringBuilder Concatenation Operation took 1.971s |
21:58:13 | OrionPK | the bulk of the work is the calls to "add" |
21:58:21 | gradha | OrionPK: if the buffer reallocations are the problem you could create a seq of pointers to those strings, and at the end when you concatenate look up first the total len() |
21:58:23 | OrionPK | the tostring is actually pretty cheap by comparison |
21:58:46 | OrionPK | so basically what I'm doing? |
21:59:38 | Araq | your template module needs what source code filters already provide: a way to write to some file/socket/whatever directly |
21:59:54 | gradha | OrionPK: maybe instead of concatenating all strings into a buffer there is a way to implement an iterator using yield? |
22:00:01 | OrionPK | araq it just calls "result.add" |
22:00:06 | OrionPK | "result" can be anything |
22:00:12 | Araq | true I guess |
22:00:14 | OrionPK | as long as it conforms to that interface |
22:00:20 | Araq | ok |
22:00:34 | Araq | so make it output to a file directly and call it a day |
22:00:46 | OrionPK | huh? |
22:00:47 | dom96 | hrm, I think Araq may be right. You are constructing a huge string and then sending it all in one big go to the socket. |
22:01:15 | OrionPK | in this case |
22:01:32 | OrionPK | that's a good point |
22:01:41 | dom96 | But I don't Jester allows you to do it any other way. |
22:01:42 | OrionPK | but I wouldnt be able to use jester as it is |
22:01:48 | dom96 | *don't think |
22:01:52 | OrionPK | right |
22:02:15 | OrionPK | jester just needs a few more hooks for lower level access I guess |
22:02:56 | OrionPK | I'm really just trying to get this faster on my raspberry pi |
22:03:16 | OrionPK | on a nice powerful CPU irc familiar is already pretty damn quick |
22:03:34 | Araq | OrionPK: that's fine and your stringbuilder has some good ideas in it |
22:03:57 | Araq | but I don't think we should make it part of the stdlib or encourage its use |
22:04:09 | OrionPK | I wasnt proposing it for the stdlib by any means |
22:04:14 | Araq | yeah ok |
22:04:15 | OrionPK | it'll be a babel package |
22:04:22 | gradha | OrionPK: how about paging? can't you subdivide whatever you are scrolling into smaller chunks? |
22:04:26 | Araq | bah :P |
22:04:28 | OrionPK | :) |
22:04:50 | OrionPK | definitely a lot faster than ropes |
22:05:06 | Araq | yup |
22:05:09 | OrionPK | I had a ropes benchmark in there as well, took it out because it wasnt worth waiting for it to end |
22:05:24 | dom96 | Araq: Can't we somehow abstract this so that the string implementation uses OrionPK's code? |
22:05:37 | OrionPK | gradha I had thought of that actually |
22:05:46 | OrionPK | gradha but that just makes the "add" call even slower, IMO |
22:05:49 | OrionPK | and that's the slow part already |
22:06:04 | Araq | dom96: for yester perhaps in general no |
22:06:14 | Araq | bbl |
22:06:43 | gradha | OrionPK: I mean, instead of concatenating all 10000 lines, do work incrementally until the visible lines are displayed, and until the user scrolls, don't bother about the rest |
22:06:47 | OrionPK | did he mean jester? |
22:07:06 | OrionPK | ooohhh |
22:07:09 | jpoirier | question, is Pointer == pointer? |
22:07:15 | OrionPK | yeah I thought of that as well gradha |
22:07:24 | OrionPK | I would probably do it a bit differently |
22:07:43 | OrionPK | rather than waiting for them to scroll, just load the last x lines, then after the DOM is loaded load the rest asynchronously |
22:07:51 | OrionPK | but I tend to dislike those sorts of shenanigans :) |
22:08:03 | OrionPK | jpoirier nimrod isnt really case sensitive atm |
22:08:30 | jpoirier | okay, thanks |
22:09:12 | OrionPK | gradha actually for requests from mobile browsers I'm limiting it to the last 100 (150?) or so events in the log |
22:09:25 | OrionPK | because scrolling on my phone is subjectively a bit chunky |
22:09:42 | jpoirier | ...any plans to make it case-sensitive in the future? |
22:10:09 | gradha | OrionPK: isn't the keyword DOM the problem? why are you using a browser component to render text instead of drawing the string? |
22:10:09 | OrionPK | jpoirier I believe so, but there will be a compiler switch to switch back to classic iirc |
22:10:30 | OrionPK | gradha what? |
22:10:47 | OrionPK | jpoirier there was some discussion on the forum about this |
22:11:00 | gradha | OrionPK: you said "after the DOM is loaded", that suggests you are using a webview or something like that to display the log |
22:11:30 | jpoirier | i'll go browse the forum threads, cheers |
22:11:46 | OrionPK | gradha it's a web app |
22:12:09 | gradha | OrionPK: oh, ok, I thought you are implementing that android irc thingy |
22:12:21 | OrionPK | https://dl.dropboxusercontent.com/u/417554/Screenshot_2013-12-29-12-30-58.png |
22:12:42 | OrionPK | that is inside chrome for android, but I have a meta-tag that lets you pop it out into a sort of standalone app |
22:13:06 | OrionPK | it's called "Add to Homescreen" |
22:13:11 | OrionPK | https://developers.google.com/chrome/mobile/docs/installtohomescreen |
22:13:21 | gradha | ah, well, that's your performance problem then, it's a web app |
22:13:34 | OrionPK | nah |
22:13:44 | OrionPK | that's my issue w/ scrolling performance |
22:13:51 | OrionPK | not my issue w/ request time performance from RBPI |
22:14:24 | OrionPK | I might write native wrappers for it at some point... but it would be a lot of work |
22:14:34 | OrionPK | there is a lot of client-side code |
22:15:58 | gradha | aren't both problems related? if your client doesn't request the whole thing, your RBPI doesn't have to add that huge buffer, so basically you are reimplementing SELECT LIMIT on http |
22:16:48 | OrionPK | not really, one issue is client side the other is server side |
22:17:21 | OrionPK | the server side issue is that it takes something like 50 milliseconds to render a full IRC log (like 700 events, capped) |
22:17:38 | OrionPK | the client side issue is that on chrome for android the scrolling isnt completely smooth |
22:17:58 | OrionPK | and the server recognizes that the request comes from a mobile device and cuts it down from 700 max to 150 max events |
22:18:17 | OrionPK | the server will only actually RENDER 150, it doesnt render all 700 and cut it down |
22:20:58 | dom96 | OrionPK: From a quick look at the code I think I can expose the socket for you. |
22:21:41 | OrionPK | cool |
22:21:55 | OrionPK | all for me :) |
22:22:51 | OrionPK | dom96 maybe you should have a kind of 'socketwriter' object, |
22:23:02 | OrionPK | available upon request |
22:23:06 | dom96 | OrionPK: Why? |
22:23:20 | dom96 | Why don't I just give you a TSocket/PAsyncSocket? |
22:23:31 | OrionPK | in addition to that, I mean |
22:23:59 | OrionPK | i.e. get "/": var result = responswriter(response) |
22:24:06 | OrionPK | then result has ".add" |
22:24:15 | OrionPK | and it automatically gets sent out straight away |
22:24:26 | Araq | no, just no |
22:24:33 | OrionPK | yes, just yes |
22:24:37 | Araq | add "add" to socket instead |
22:24:37 | OrionPK | you're too opinionated |
22:24:38 | dom96 | Just pass the socket to your template stuff |
22:24:53 | Araq | or make your template slightly more flexible |
22:24:55 | dom96 | I am not adding 'add' to socket. |
22:25:02 | Araq | gah |
22:25:04 | dom96 | He can do that if he wishes. |
22:25:10 | Araq | everybody disagrees with me these days |
22:25:10 | dom96 | Perhaps that's what you mean heh |
22:25:15 | OrionPK | lol |
22:25:27 | OrionPK | just a thin layer so that it all conforms to the same interface |
22:25:43 | OrionPK | hell |
22:25:51 | OrionPK | even "add" on a socket as a proc in jester would be enough :P |
22:25:55 | dom96 | You can write it yourself then. |
22:25:59 | OrionPK | lol |
22:26:07 | OrionPK | synergy dom96 |
22:26:11 | OrionPK | synnerrrgyyyyy |
22:26:19 | dom96 | proc add(sock: TSocket | PAsyncSocket, data: string) = sock.send(data) |
22:26:20 | Araq | I like "add" for sockets though I wonder if we perhaps should have used an operator instead |
22:26:41 | Araq | like C++'s << |
22:26:45 | OrionPK | yeah |
22:26:49 | OrionPK | I agree |
22:26:55 | dom96 | I can live with an operator. |
22:26:57 | OrionPK | there should be one pattern to follow |
22:26:57 | dom96 | But not 'add' |
22:27:11 | dom96 | 'add' is strictly for appending or adding items. |
22:27:17 | dom96 | You don't append to a socket. |
22:27:19 | OrionPK | I kind of agree with you there dom |
22:27:29 | OrionPK | I dont think you should add it to a socket, I think you should add to a response |
22:27:41 | OrionPK | an HTTP response that jester gives you |
22:27:43 | OrionPK | not part of the std lib |
22:27:45 | dom96 | In fact, an operator is risky. |
22:27:49 | Araq | "add" and "len" are very generic in nimrod |
22:27:57 | dom96 | Because you won't notice the extra exceptions that can be raised when sending to a socket. |
22:29:03 | Araq | well lets add something << and make '<<' an alias for add for strings and seqs |
22:29:18 | dom96 | I in fact should just follow zahary's advice: https://github.com/dom96/jester/issues/1 |
22:29:29 | OrionPK | I like this idea |
22:30:08 | Araq | so "add" is still append but strings can be considered an output stream easily |
22:30:45 | OrionPK | << is alias for "add" on strings, an alias for "write" on sockets/files |
22:31:10 | Araq | yeah exactly |
22:31:21 | OrionPK | yeah, im convinced |
22:31:40 | dom96 | yay, we're turning into C++ |
22:31:43 | OrionPK | :D |
22:31:59 | Araq | well obviously we need something better than << |
22:32:00 | OrionPK | I dont care for the << syntax personally, but I do like consistency |
22:32:22 | Araq | &= :P |
22:32:31 | OrionPK | 'add" :P |
22:32:36 | dom96 | lol |
22:32:52 | OrionPK | &= isnt terrible |
22:32:56 | Araq | let's use &= |
22:32:59 | Araq | it already exists |
22:33:07 | Araq | and it already is an alias for string.add iirc |
22:33:09 | dom96 | I think it's in the spirit of Nimrod to use words... |
22:33:09 | OrionPK | & == "and" though |
22:33:18 | dom96 | inc vs. ++ |
22:33:28 | Araq | no & == "concat" |
22:33:37 | OrionPK | I know, but & means "and" in english |
22:33:46 | OrionPK | ampersand is an "and" symbol |
22:33:52 | Araq | english is irrelevant |
22:33:54 | OrionPK | lol |
22:33:59 | OrionPK | is it irrelephant? |
22:34:36 | OrionPK | result.put("something") |
22:34:40 | Araq | dom96: symbols sometimes help to not confuse people |
22:35:00 | EXetoC | yes we already have &=. nothing wrong with that |
22:35:03 | dom96 | Let's just come up with a symbol for everything then. |
22:35:04 | Araq | &= is actually a pretty good example for this, it's add, put, send, write |
22:35:14 | dom96 | put it all in a 'brainfuck' module and call it a day |
22:35:20 | OrionPK | :P |
22:35:41 | OrionPK | dom96 dont be such a contrarian |
22:36:19 | Araq | dom96: user defined operators are a feature that's embraced by nimrod whether you like it or not, $ comes to mind |
22:36:57 | Araq | important ops deserve an operator symbol |
22:37:25 | dom96 | They are? |
22:37:37 | dom96 | Well I disagree with this philosophy! How did I never realise! |
22:37:45 | dom96 | Time to go back to brainfuck. |
22:37:54 | dom96 | Certainly less operators there. |
22:38:04 | dom96 | >>>+++...>>>>!! |
22:38:25 | Araq | Haskell has user definable operators so it must be good :P |
22:38:35 | dom96 | That's true. |
22:39:17 | Araq | and you know I wanted # to mean "len" but unfortunately it's already used for comments |
22:40:11 | EXetoC | I often define `?` for various C libs, as a concise way to throw on errors. I also have ==? and ~=? for unit testing (the unittest module was broken at the time) |
22:40:39 | OrionPK | you're a monster |
22:40:46 | Araq | I like ==? for case insensitive comparisons :-) |
22:41:20 | Araq | didn't make it into strutils because I feared the complaints about it being not unicode aware for performance reasons. lol |
22:42:42 | * | darkf joined #nimrod |
22:43:20 | Araq | turns out ... it doesn't matter. people blame me for everything that I did include anyway. |
22:43:27 | EXetoC | tell them about profiling then |
22:44:46 | Araq | it's also not only about performance but also about code size and sanity. for example, the HTTP protocol requires case insensitive comparisons but only uses ascii in its headers |
22:45:25 | EXetoC | ok |
22:45:33 | Araq | so if ==? only cares about ascii that's all that matters |
22:45:36 | gradha | Araq: you wrote libsvm? |
22:45:47 | gradha | Araq: git says so, but just checking |
22:45:53 | Araq | I wrapped it with c2nim yeah |
22:46:20 | gradha | Araq: you forgot to add it to http://www.csie.ntu.edu.tw/~cjlin/libsvm/, now it's there |
22:47:14 | Araq | yay I guess that means nimrod is alive and kicking |
22:51:39 | Araq | so ... the decision has been made. We all love &= |
22:52:07 | dom96 | I don't but no one cares about me sooooo |
22:52:29 | EXetoC | :/ |
22:52:59 | Araq | we really need a ministry of love here ... |
22:54:39 | gradha | maybe instead of KILLALLHUMANS I should change my life objective to KILLALLGOOGLE+ |
22:54:43 | EXetoC | the operators are common, and we don't have over >9000 of them, so it's fine with me |
22:55:20 | * | dom96 gets that reference |
22:57:58 | * | Varriount joined #nimrod |
22:58:03 | EXetoC | google<3 |
23:02:45 | * | brson joined #nimrod |
23:07:22 | Varriount | I'm currently using virtualbox to install a linux distro onto a non-virtual hard disk. Isn't technology wonderful? |
23:08:03 | * | shevy joined #nimrod |
23:13:05 | OrionPK | I'll make sure to add &= to string builder just for you araq |
23:13:59 | Araq | That's nothing. I made Nimrod just for you, OrionPK |
23:14:26 | Varriount | Aww. Such brotherly love. I think I might shed a tear. |
23:15:03 | Araq | Varriount: tried SteamOS already? |
23:15:44 | OrionPK | obviously araq, since all of you are just figments of my own personality |
23:17:01 | Araq | you're damn right, Mr Anderson |
23:17:46 | Varriount | Araq, I'm leery of any super-large software projects headed by Valve |
23:18:22 | OrionPK | I'd like to try steam os |
23:18:29 | OrionPK | but I |
23:18:37 | OrionPK | don't want to put it on my main box |
23:19:17 | Araq | btw do the twins die in the explosion? |
23:21:36 | OrionPK | I don't believe in the sequels |
23:22:49 | * | XAMPP-8 joined #nimrod |
23:24:18 | gradha | they all die |
23:24:39 | * | Varriount quit (Read error: Connection reset by peer) |
23:32:25 | gradha | should 'echo "foo"[3]' work (it does now) or should it raise EInvalidIndex in debug builds? |
23:33:05 | Araq | accessing the trailing \0 is valid |
23:48:00 | dom96 | Araq: I think we should create a Nimrod twitter account. |
23:48:20 | Araq | perhaps |
23:50:12 | gradha | create a nimrod google+ account |
23:51:17 | dom96 | I'll create @nimrodlang |
23:51:23 | * | PortableEXetoC joined #nimrod |
23:53:22 | gradha | good night, honey badgers |
23:53:27 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again) |
23:56:58 | * | PortableEXetoC quit (Quit: cake) |
23:58:37 | BitPuffin | dom96: dota? |
23:58:44 | dom96 | BitPuffin: YEAH! |
23:58:46 | dom96 | Just sec |
23:58:56 | dom96 | Setting up the official Nimrod twitter! |
23:59:35 | BitPuffin | dom96: amagadwit |
23:59:42 | BitPuffin | I can has write access? |