Camelia, the Perl 6 bug

IRC log for #parrot, 2011-11-23

Parrot | source cross referenced

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:08 whiteknight cotto: ping
00:09 cotto whiteknight: pong
00:10 whiteknight cotto: in TT # 67, what should the commandline flag be called?
00:10 whiteknight I suggest --mem-limit=X
00:13 cotto whiteknight: that sounds unsurprising.  I'd suggest using what jvm does, but -Xmx1234m is lta.
00:20 jsut joined #parrot
00:29 whiteknight ...and it's a task
00:29 whiteknight at least, the first half of it
00:29 cotto bam
00:29 whiteknight parsing the value and passing it through to the GC
00:30 cotto that's a good gci-type task
00:30 trishume joined #parrot
00:37 whiteknight actually delving into the depths of the GC to add in the logic is more frightful
00:38 whiteknight Maybe O'bacek Kenobi can come save us
01:08 woosley joined #parrot
01:24 whiteknight We're up to 30 tasks
01:29 bacek_at_work whiteknight, it's kind of "impossible" to limit memory usage with current GC/guts design.
01:29 whiteknight Unfortunately, it's going to require a major refactor of *something* to do this
01:30 whiteknight bacek_at_work: yeah, I'm seeing that now. We either need to add an interp parameter to mem_sys_* functions, or weneed to use a global
01:30 bacek_at_work whiteknight, which is suck big time
01:41 whiteknight yes, big time
01:42 whiteknight so, for now we're just going to have a GCI student add the flag, and we can wire it in later, when we're drunk
01:44 Yuki`N drunk code is best code.
01:51 whiteknight msg dukeleto you have a pending Claim Request on a task you're mentoring. I don't want to accept it for you.
01:51 aloha OK. I'll deliver the message.
02:12 whiteknight cotto: what should the common function prefix be in src/interp/inter_misc.c? Parrot_interp_ or Parrot_int_ both seem fine to me
02:12 whiteknight I'm going to create a task to rename them
02:13 whiteknight I suppose src/interp/inter_create.c could have the same prefix
02:13 whiteknight I wonder if we should merge the files
02:15 whiteknight src/interp/api.c seems to follow conventions the best
02:15 cotto whiteknight: I like "interp".  "int" sounds too much like the C type.
02:16 whiteknight good to me. I'm making the task
02:16 Yuki`N In NQP what's the difference between pir::load_bytecode and ::load_bytecode__ps
02:18 whiteknight Yuki`N: the later tells which types of arguments the opcode takes.
02:18 whiteknight Yuki`N: the former tries to make an assumption, and may fail spectacularly
02:18 Yuki`N ah
02:18 Yuki`N hmm
02:19 whiteknight Yuki`N: there are two load_bytecode ops. One that takes a string, and the other takes a string and returns a PMC. the first letter is the return (p) and the rest of the letters are the arguments(s)
02:19 Yuki`N I'm trying to get Rosella to tell itself that it's in Rosella/rosella/**, not rosella/**
02:19 whiteknight Yuki`N: I think you can pass the -L option to winxed or parrot
02:19 whiteknight -LRosella should do it
02:20 whiteknight cotto: What's your opinion about merging inter_create.c and inter_misc.c into interp/api.c?
02:20 cotto whiteknight: sounds like a good gci task.
02:20 cotto +1
02:21 Yuki`N parrot-nqp doesn't accept -L
02:22 Yuki`N that's a pain.
02:22 whiteknight it doesn't? That suxxors. We're going to have to add that
02:22 whiteknight sounds like a new GCI task!
02:22 whiteknight :)
02:22 Yuki`N lol
02:22 Yuki`N I'm already doing dukeleto's though. :(
02:23 cotto There might be a better way to break up functions in that code, but moving both into a single file is an improvement.
02:28 Yuki`N Where's the actual source for NQP?
02:28 cotto aloha: nqp?
02:28 aloha cotto: nqp is perl6, not perl5, if that makes any difference or an option
02:28 Yuki`N I'm looking in ext/nqp-rx and all I see are what I suspect to be automatically generated .pir files.
02:28 cotto Yuki`N: https://github.com/perl6/nqp
02:28 cotto aloha: nqp is also https://github.com/perl6/nqp
02:28 aloha cotto: Okay.
02:29 Yuki`N Oh.
02:29 whiteknight Yuki`N: I don't think I understand what you are doing
02:29 whiteknight or, what problem you are having
02:30 Yuki`N Well, I'm adding Rosella as a submodule in dukeleto's libgit2 bindings
02:30 Yuki`N Because it's required to run the test library.
02:30 Yuki`N But since Rosella is cloned into /Rosella, the path to the library files becomes /Rosella/rosella
02:31 Yuki`N And dynamic loading fails.
02:31 whiteknight ah, okay. So the test harness needs to be modified?
02:31 Yuki`N I suppose so.
02:31 whiteknight let me look at it
02:31 Yuki`N The easiest fix would to be change the harness to winxed.
02:31 Yuki`N https://github.com/nol888/parro​t-libgit2/blob/master/t/harness
02:32 whiteknight Okay, yeah. I see it. Rosella::initialize_rosella assumes that things are in rosella/
02:32 whiteknight so, we need to change it to something like this:
02:33 whiteknight my $rosella := pir::load_bytecode__ps('rosella/core.pbc');
02:33 whiteknight Rosella::initialize_rosella();
02:33 whiteknight And then we need to load the harness library in manually:
02:34 whiteknight Rosella::load_bytecode_file("​Rosella/rosella/harness.pbc", "load");
02:34 whiteknight And I think that's all you need
02:39 Yuki`N What does initialize_rosella do?
02:40 whiteknight https://github.com/Whiteknight/Rosella/b​lob/master/src/core/Rosella.winxed#L139
02:40 whiteknight basically, it loads the library, and executes all the setup functions
02:42 Yuki`N meh
02:42 Yuki`N Even if the harness worked.
02:42 Yuki`N I tried rewriting the harness in winxed.
02:43 Yuki`N The Rosella harness library runs winxed code in its own environment, so it doesn't inherit library search paths.
02:43 Yuki`N Hence when the winxed test tries to load Rosella components, it fails too.
02:45 whiteknight oh crap, so every test is going to need to be updated with the same load preamble
02:45 whiteknight I don't know how to fix that in a general way, since the tests probably execute as separate processes
02:45 whiteknight so loading rosella in the harness won't cause it to be loaded correctly in each test
02:46 whiteknight you're really going to earn some points with this task :)
02:48 Yuki`N lol dukeleto's only got it as a 2-pointer.
02:48 Yuki`N I've got Rosella building with libgit2
02:48 whiteknight nice
02:48 Yuki`N The only issue now is trying to get it recognized
02:48 Yuki`N so the tests actually run.
02:48 whiteknight I can't see any way around it, I think you're going to have to edit every test file
02:49 whiteknight I don't think libgit2 has too many of them,but still it's tedious
02:49 Yuki`N There's only one test file, thankfull.
02:50 Yuki`N *thankfully
02:50 Yuki`N however, initialize_rosella() still tries to load 'rosella/core.pbc'
02:50 whiteknight Yuki`N: I can't change the points value on a task after it's been published
02:50 Yuki`N eh, I suppose it doesn't matter.
02:50 whiteknight okay, don't call initialize_rosella then
02:51 Yuki`N Can I call init_bytecode directly?
02:51 whiteknight Yeah, I think so. Pass in the return value from pir::load_bytecode__ps
02:52 whiteknight parrot-nqp not accepting the -L option is a bit of a drag
02:54 whiteknight okay, I'm heading to bed now. I'll be around in the morning for more questions and chat
02:54 Yuki`N Alright.
02:54 whiteknight goodnight, and goodluck
03:22 Yuki`N dukeleto, I've fixed up your build system for libgit2 quite a bit.
03:23 jsut_ joined #parrot
03:27 cotto ~~
04:05 contingencyplan joined #parrot
05:46 rfw joined #parrot
05:47 benabik joined #parrot
06:10 dafrito joined #parrot
06:39 cosimo2 joined #parrot
07:24 he_ joined #parrot
07:54 woosley left #parrot
08:17 mj41 joined #parrot
08:46 mj41 joined #parrot
08:55 schmooster joined #parrot
09:12 jsut joined #parrot
09:20 lucian joined #parrot
09:24 lucian joined #parrot
12:12 Psyche^ joined #parrot
12:23 contingencyplan joined #parrot
12:26 mj41 joined #parrot
12:45 whiteknight joined #parrot
12:46 whiteknight good morning, #parrot
12:49 tadzik good morning whiteknight
12:58 whiteknight hello tadzik, how are you doing today?
13:05 schmooster joined #parrot
13:19 bluescreen joined #parrot
13:30 mtk joined #parrot
13:49 mtk joined #parrot
13:53 dalek Rosella/gh-pages: 57dfe15 | (Blaise Ritchie)++ | nl.winxed:
13:53 dalek Rosella/gh-pages: Added nl clone
13:53 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/57dfe154f1
13:53 dalek Rosella/gh-pages: 18c5165 | (Blaise Ritchie)++ | ls.winxed:
13:53 dalek Rosella/gh-pages: ls
13:53 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/18c5165aef
13:53 dalek Rosella/gh-pages: 3390389 | Whiteknight++ | / (2 files):
13:53 dalek Rosella/gh-pages: Merge pull request #30 from rippinblaise/gh-pages
13:53 dalek Rosella/gh-pages:
13:53 dalek Rosella/gh-pages: Add in nl and ls utility clones from blaise++
13:53 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/3390389aa6
14:01 dalek Rosella/gh-pages: 5f2bdb2 | Whiteknight++ | / (2 files):
14:01 dalek Rosella/gh-pages: Add some forward declarations to the example programs to silence warnings
14:01 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/5f2bdb2930
14:01 dalek Rosella/gh-pages: 1139036 | Whiteknight++ | / (6 files):
14:01 dalek Rosella/gh-pages: Move the two example programs, use them as includes in a new examples page
14:01 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/1139036a9c
14:01 dalek Rosella: 6522f99 | Whiteknight++ | / (2 files):
14:01 dalek Rosella: A few tweaks to the sorting benchmark to clean up the display and make sure all the options are being compared.
14:01 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/6522f99053
14:01 dalek Rosella: 7e1c8d8 | Whiteknight++ | / (4 files):
14:01 dalek Rosella: Add a .sort_self method to Query.Queryable to sort the data in-place instead of sorting an array copy.
14:01 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/7e1c8d8f22
14:06 dalek Rosella/gh-pages: 2c2eec3 | Whiteknight++ | winxed/ (2 files):
14:06 dalek Rosella/gh-pages: Website fixes
14:06 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/2c2eec3f8d
14:55 jsut_ joined #parrot
15:02 dalek parrot: 0af3679 | mls++ | compilers/pct/src/PAST/Compiler.pir:
15:02 dalek parrot: PCT: also use pop_upto_eh in loop generation code, so we can use next/last in inlined blockes with block handlers
15:02 dalek parrot: review: https://github.com/parrot/parrot/commit/0af36791b3
15:23 dalek Rosella/gh-pages: 7cba405 | Whiteknight++ | / (2 files):
15:23 dalek Rosella/gh-pages: Start rewriting the ls code example, to start showing a more idiosyncratic approach, and demonstrating more pervasive use of Rosella functionality
15:23 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/7cba405eb0
15:23 dalek Rosella/gh-pages: c97b376 | Whiteknight++ | _includes/ls.winxed:
15:23 dalek Rosella/gh-pages: A few more cleanups for the ls example
15:23 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/c97b37614e
15:23 dalek Rosella/gh-pages: 7ce11b2 | Whiteknight++ | _includes/ls.winxed:
15:23 dalek Rosella/gh-pages: Rewrite the ls example to use a stream. Use the sort and tap enhancements from master to fix formatting.
15:23 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/7ce11b2e42
15:23 dalek Rosella/gh-pages: 1cca843 | Whiteknight++ | winxed/examples.md:
15:23 dalek Rosella/gh-pages: Update the ls description for the website
15:23 dalek Rosella/gh-pages: review: https://github.com/Whiteknig​ht/Rosella/commit/1cca843703
15:23 dalek Rosella: 300ea2c | Whiteknight++ | src/core/IteratorBase.winxed:
15:23 dalek Rosella: Implement a default, if naive, get_bool for IteratorBase
15:23 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/300ea2cf64
15:23 dalek Rosella: a0d8e21 | Whiteknight++ | src/query/St (2 files):
15:24 dalek Rosella: Add skip counts to the Tap and ForEach stream stages.
15:24 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/a0d8e21225
15:24 dalek Rosella: 019c767 | Whiteknight++ | src/query/ (3 files):
15:24 dalek Rosella: Add in a default sort comparer. Fix the qsort implementation so that it sorts things in the correct direction
15:24 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/019c767fdb
15:24 dalek Rosella: b6887f6 | Whiteknight++ | src/query/Stage.winxed:
15:24 dalek Rosella: We need to pop from the cache instead of shift from it in Stream.Stage.Sort to preserve the correct order
15:24 dalek Rosella: review: https://github.com/Whiteknig​ht/Rosella/commit/b6887f64f2
15:32 bluescreen joined #parrot
16:02 blaise joined #parrot
16:03 blaise wow, took the task "implement smoothsort algorithm in winxed for rosella" for GCI not realizing it was the least documented algorithm on the internet
16:04 whiteknight you can't find enough information? I can't say I've ever researched it too deeply
16:04 blaise I found information
16:04 blaise I looked into a couple other sorting algorithms, too
16:04 whiteknight is it enough to work with? We can pick a different algorithm if that one is too obscure
16:05 blaise this is the most complex andleast documented
16:05 blaise no, I can do it
16:05 whiteknight From the description I saw, it seemed like it was a straight-forward extension to heapsort, but with weirdly-sized heaps
16:06 whiteknight I suspect that I was mislead
16:06 blaise after you figure it out, it doesn't seem so hard
16:06 blaise it's definitely weird
16:06 dukeleto ~~
16:06 whiteknight good morning duke
16:06 blaise it uses multiple heaps
16:09 dukeleto whiteknight: mornin'. Looks like the GCI force is strong this morning.
16:10 whiteknight dukeleto: sure is. I know Yuki'N was pushing forward with that libgit2 task, which you need to claim. And blaise++ here is some sort of miracle worker going crazy on a smoothsort implementation
16:11 dukeleto whiteknight: just assigned the task to Yuki`N
16:11 whiteknight dukeleto++
16:12 dukeleto blaise: i think i recognize your nick from last year as well
16:12 blaise worst case scenario: I can translate a java or C implementation
16:12 blaise I wasn't in it last year
16:12 blaise only just heard about it a week ago or so
16:12 whiteknight blaise: Well, we're glad you did!
16:14 dukeleto blaise: huh. well, welcome anyway!
16:14 whiteknight blaise: I don't know if you saw this example: http://www.keithschwarz.com/in​teresting/code/?dir=smoothsort
16:15 whiteknight but there was an accompanying description on that website that was very informative
16:15 blaise I haven't seen that
16:15 whiteknight http://www.keithschwarz.com/smoothsort/
16:15 blaise reading that now
16:16 whiteknight yeah, looks like C++ code. NotFound, who wrote Winxed, is very influenced by C++ so a lot of the syntax should port over without too much effort
16:16 blaise probably the best description of smoothsort I found
16:16 whiteknight I'm surprised that it's so un-documented. Most of the work that Dijkstra did is usually celebrated and studied in detail
16:16 benabik Smoothsort visualization and python code: http://sortvis.org/algorithms/smoothsort.html
16:16 blaise winxed is dynamically typed, which makes making the algorithm applicable to many things pretty easy
16:17 blaise in C++ you have to use templates or void pointers or something like that
16:18 blaise I think I'll probably base it off of the python implementation
16:18 blaise if I end up not just writing my own from scratch
16:18 NotFound whiteknight: there you can see the problem with iterators. With better parrot iterators porting that kind of stuff will be a lot easier.
16:18 whiteknight NotFound: Write up a design, and we'll do it
16:19 NotFound whiteknight: I usually design while coding :D
16:19 whiteknight NotFound: Write up some code and we'll say it was designed
16:21 blaise *looks at the python implementation in more detail
16:21 blaise what's up with the trailingzeroes function?
16:21 NotFound An easy start can me just implementing increment, decrement and equal in current iterators.
16:21 NotFound s/me/be
16:21 tadzik whiteknight: not bad. A nice mix of hardcore classes and GCI reviews
16:23 dalek rakudo/nom: 939696a | mls++ | src/Perl6/ (2 files):
16:23 dalek rakudo/nom: use direct lexinfo access instead of calling get_lexinfo on the sub
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/939696a47c
16:23 dalek rakudo/nom: bbf207c | mls++ | src/ (2 files):
16:23 dalek rakudo/nom: Cleanup exception handling, so blocks with handlers can also be inlined.
16:23 dalek rakudo/nom:
16:23 dalek rakudo/nom: Instead of perl6_rethrow_skipnextctx op, we now have the much nicer
16:23 dalek rakudo/nom: perl6_based_rethrow, which rethrows an exception in the context of
16:23 dalek rakudo/nom: another exception. To make blocks with both CATCH and CONTROL handlers
16:23 dalek rakudo/nom: work, we need another op to skip the "outer" handler if an exception
16:23 dalek rakudo/nom: is caught in the exception handler. I.e. a die() in a CONTROL handler
16:23 dalek rakudo/nom: must not be caught with a "parallel" CATCH handler.
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bbf207caee
16:23 dalek rakudo/nom: 4aac1bb | mls++ | src/Perl6/ (2 files):
16:23 dalek rakudo/nom: Also inline blocks with exception handlers
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4aac1bbfa9
16:23 dalek rakudo/nom: 656ff52 | mls++ | src/ (3 files):
16:23 dalek rakudo/nom: Add "outer" control handler, make most uncaught control exceptions fatal. Make warn() throw a control exception, use CONTROL_OK for now.
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/656ff52a57
16:23 dalek rakudo/nom: a81cc6e | mls++ | src/Perl6/ (2 files):
16:23 dalek rakudo/nom: remove the do_not_inline hint, it doesn't seem to be needed. jnthn++
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a81cc6e291
16:23 dalek rakudo/nom: fec538b | tadzik++ | src/ (6 files):
16:23 dalek rakudo/nom: Merge pull request #41 from mlschroe/newexcept
16:23 dalek rakudo/nom:
16:23 dalek rakudo/nom: Newexcept
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fec538b059
16:24 RobertLJ joined #parrot
16:35 jsut joined #parrot
16:42 jsut_ joined #parrot
16:44 blaise "okay, this seems pretty straightforward, not too hard to implement. not sure why all those implementations looked so weird" *reads memory usage reduction optimizations* "oh..."
16:44 dmalcolm joined #parrot
16:45 whiteknight blaise: for this task, we don't need optimizations. Whatever is the most straight-foward implemenation of the algorithm is fine
16:45 tadzik what task is it?
16:45 whiteknight tadzik: implementing smoothsort in winxed for rosella
16:46 tadzik nice
16:47 whiteknight yeah, I'm excited about it.
16:49 whiteknight I plan for rosella to provide a handful of sort-related routines. There will be a quicksort default, but you'll be able to specify a different algorithm if you suspect the data has certain characteristics
16:49 whiteknight blaise made me a timsort implementation which is already about 90% faster than other alternatives if the array is mostly-sorted
16:50 blaise that was Yuki`N
16:50 whiteknight oh. Shit, right
16:50 whiteknight sorry
16:51 whiteknight of course, the timsort is about 15% slower than quicksort if the data is a jumble
16:52 blaise not according to wikipedia, it says quicksort's worst case is O(n^2) and timsort is O(n*lg(n))
16:52 whiteknight quicksort's worst case scenario happens when the data is mostly ordered already, and when the pivot is selected in the worst possible way
16:53 whiteknight if the data is random and the pivot is selected intellgently, quicksort is at it's best
16:53 whiteknight timsort, meanwhile, has a worst case scenario when the data is completely random, and a best case when the data is mostly sorted
16:55 whiteknight and actually, my quicksort cheats and switches to insertion sort for subarrays smaller than about 6 items, so the pathological behavior is eliminated
16:56 blaise so without memory optimizations, the smoothsort has O(lg(n)) memory usage, but with optimizations, has O(1)
16:56 dukeleto this early history of programming languages by Knuth looks to be a good read: https://twitter.com/#!/CompSci​Fact/status/139384015475048448
16:56 whiteknight that's fine.  a little memory usage isn't bad. We can optimize it later
16:57 whiteknight dukeleto: he better get his ass back to the typewriter and finish the last few volumes of taocp
16:57 blaise the optimization to eliminate that memory usage is pretty weird
16:57 whiteknight blaise: all optimizations are weird, just to different degrees :)
16:58 blaise bitwise operations instead of storing a few numbers in an array
16:59 blaise I think I could modify these optimizations a bit to make more sense, but I could be wrong
17:02 blaise oh, did my ls clone show hidden files and folders? I guess I didn't test it in directories with hidden files/folders
17:02 blaise wow, that would have been easy to fix if I knew it was there
17:12 whiteknight yeah, it's no big deal.
17:13 whiteknight I wanted to play around with that example this morning, so I was testing it and poking at it
17:23 whiteknight that python implementation does seem relatively short, even if it's not clear what the hell is happening
17:23 blaise yeah, I think they used the memory optimizations
17:24 blaise thus how the code makes no sense
17:24 whiteknight gotcha
17:26 whiteknight What I think we really need to do for that ls implementation is link to libcurses and start using some color codes
17:26 whiteknight I'm actually interested to see how far we can grow it
17:28 blaise tried the python implementation, it complained that lst has no member "log"
17:28 blaise because arrays/lists don't have a log function
17:28 blaise not sure what that's supposed to be
17:29 whiteknight I think that's the function he uses to sample the data and produce those graphs
17:29 whiteknight you probably need to connect to his visualization library to use that
17:29 blaise oh, that would be a problem
17:29 whiteknight yeah, so you can probably just take out the .log() calls
17:30 blaise yeah, that worked
17:32 whiteknight good
17:35 RobertLJ1 joined #parrot
17:36 blaise it's fast, too
17:37 blaise not quite as fast as the built-in sorting, but what can you expect?
17:40 whiteknight yeah, it's all a matter of the right data sets. Smoothsort is going to do well in some situations and bad in others.
17:40 blaise I'm randomly generating the list to test sorting
17:41 whiteknight yeah, smoothsort should still work, but it won't be super-fast in those cases
17:41 blaise I probably could directly translate the python implementation into winxed
17:41 blaise if there's bitwise operations and such
17:41 whiteknight if that's the easiest, go for it
17:41 whiteknight yeah, winxed has a complete set of bitwise ops
17:42 blaise I'll start with that, and then see if I can make it more comprehensible
17:42 whiteknight blaise++
17:56 blaise so no global variables?
17:58 zby_home joined #parrot
18:01 blaise nevermind, found const
18:09 RobertLJ1 joined #parrot
18:10 blaise "Value for const is not evaluable at compile time near LP"?
18:11 blaise code is: "const int LP = [1, 1, ... 535828591, 866988873];"
18:11 whiteknight what are you trying to const? I think it only works for strings, ints, and floats
18:11 blaise ints
18:11 whiteknight oh, an array of them
18:11 whiteknight I don't think you can const that
18:12 whiteknight Wrap your sorter in a class, and add an attribute to hold that array
18:26 dalek TT #1610 closed by whiteknight++: Parrot_compile_string does not properly catch errors thrown by causing ...
18:26 dalek TT #1610: http://trac.parrot.org/parrot/ticket/1610
18:28 blaise joined #parrot
18:29 blaise can arrays not be const?
18:29 sorear blaise: http://irclog.perlgeek.de/p​arrot/2011-11-23#i_4748864
18:30 blaise router got unplugged, so I timed out without noticing
18:30 blaise it is in a class
18:30 sorear yes, but we have logs you can read
18:31 blaise cool, anyway, it's in a class, and I removed the const
18:32 blaise and changed type to var, but I guess I need to initalize it somewhere else?
18:36 blaise "set_attr_str() not implemented in class 'ResizableStringArray'"
18:36 blaise wish it was giving me a line number for that error
18:36 blaise not compile-time, though
18:45 cotto ~~
18:47 blaise it is now, but I still have no idea how to fix that error, this should be using "ResizablePMCArray"
18:52 whiteknight blaise: nopaste your code?
18:52 blaise I just switched to using a temporary variable to store it in each function
18:52 blaise that can be dealt with later, currently just testing the implementation
18:54 ambs joined #parrot
18:59 blaise "too few positional arguments: 3 passed, 4 (or more) expected"
18:59 blaise for a call to a 3-argument function
19:04 whiteknight is it a function or a method?
19:04 whiteknight method expects obj.foo()
19:04 blaise function
19:04 whiteknight is it inside a class {} block?
19:04 blaise yes
19:04 whiteknight then it's a method
19:04 whiteknight it's confusing
19:04 blaise oh, that's strange
19:05 blaise http://pastebin.com/Cd1Q7vJJ
19:05 blaise ^ the code
19:10 whiteknight yeah, all calls to the trinkle and sift methods need to self.trinkle() and self.sift()
19:10 blaise ah, alright
19:10 whiteknight and self.trailingzeros
19:13 blaise okay, now no errors, it just doesn't sort correctly
19:18 whiteknight well, no errors is a big step!
19:19 blaise elements(lst) is the equivalent to len(lst) in python, right?
19:19 whiteknight elements([5, 6, 7, 8]) == 4
19:20 whiteknight I don't know what len(lst) does it python, exactly
19:20 blaise okay
19:21 blaise oh yeah, != is ~= in winxed, isn't it?
19:21 whiteknight nope, !=
19:21 blaise oh
19:21 blaise is it ~= in lua or something?
19:21 blaise I know I used ~= in a new language in the last few days
19:21 whiteknight perl?
19:21 blaise I didn't write any perl recently
19:21 atrodo perl is =~
19:21 whiteknight Then I don't know.
19:22 atrodo and means something completely different
19:23 NotFound In winxed ~ is bitwise not, ~= is nothing.
19:24 blaise wait, is ^ bitwise XOR?
19:25 NotFound blaise: yes
19:25 blaise okay, wonder what's wrong with this code, then...
19:26 NotFound blaise: better use int instead of var, some operators are not well tested for var.
19:26 blaise okay, I'll try to change all the ones necessary
19:26 whiteknight NotFound: ...you know, it would make a good GCI task to add tests for those operators...
19:27 NotFound whiteknight: not a bad idea.
19:28 blaise how much of this is pass by reference and how much is pass by value?
19:28 whiteknight if it's var, it's pass by reference.
19:28 whiteknight int are pass by value
19:28 blaise okay. I'll go see what python does
19:28 whiteknight of course, int is just integers
19:29 NotFound That depends on what you do with the var. If you assign to it, the reference to the original is lost.
19:30 whiteknight ah, right
19:30 NotFound But you can use the =: operator.
19:30 whiteknight I keep forgetting about that thing
19:31 blaise there, now only uses var when necessary
19:32 blaise works now :D
19:32 whiteknight awesome
19:32 whiteknight pull request! pull request!
19:33 whiteknight blaise: and you can tell your algorithms professor that you implemented a smoothsort, and he'll say "what's a smoothsort?"
19:33 blaise where should I put it? I ended up putting it in a new file, is that alright?
19:33 whiteknight blaise: can you add it to benchmarks/query/sort.winxed?
19:33 blaise also, I'll be implementing this in C and studying it further in the near future
19:33 whiteknight It's a large, comparative benchmark that I'm keeping track of various algorithms in
19:33 blaise sure, I'll just add the class to it
19:33 whiteknight awesome
19:34 whiteknight you can comment some other things out, or decrease the N value if you want to run it and not waste a lot of time
19:34 blaise oh yeah, wanted to get the class-wide variable thing working for LP and MultiplyDeBruijnBitPosition
19:35 blaise I'll just leave what I had for that commented out for now
19:37 dukeleto whiteknight++ # gci task whisperer
19:37 whiteknight dukeleto: We're at 35 now. I want 15 more in the next few days
19:37 whiteknight I think that's a very reasonable goal
19:38 dukeleto whiteknight: i don't have time to add more tasks now, but I will soon
19:38 dukeleto whiteknight: are you keeping a list of them in a repo somewhere?
19:38 dukeleto whiteknight: i can give you a commit bit on my gci.git if you want
19:39 whiteknight I haven't been keeping track of them separately, no
19:39 whiteknight we can csv export the list that's here
19:42 blaise pull requested
19:44 whiteknight awesome! Give me a minute to look over the code and i'll close the task
19:45 whiteknight mark the task ready for review
19:47 blaise marked as complete
19:47 whiteknight completed successfully. Congratulations
19:48 blaise how complex is the mersenne twister algorithm?
19:48 whiteknight blaise: not too bad, I don't think. Mostly algebra, integer operators, etc
19:49 whiteknight not nearly so complicated as a sort like smoothsort
19:49 blaise oh, it's already taken
19:51 blaise or has melange just stopped me from taking multiple tasks at once?
19:53 dukeleto whiteknight: are you on the smoothsort pull request?
19:54 whiteknight yeah
19:54 whiteknight I'm not going to merge it yet, I think I created some kind of conflict
19:55 whiteknight blaise: I think you can only have one task at a time
19:55 whiteknight blaise: the mersenne one is still open
19:55 cotto yes.  That's intentional in gci.
19:55 blaise oh, I could have more than one before
19:55 blaise I'll just go finish that other one, then see if the mersenne one is still open
20:03 davidfetter joined #parrot
20:13 blaise by the way, it is ~= in perl
20:13 blaise lua*
20:20 mj41 joined #parrot
20:27 dalek nqp/nci: a2d4ea1 | jnthn++ | src/ops/nqp_dyncall.ops:
20:27 dalek nqp/nci: Start to get string passing in place; support a choice of ways to encode the string being passed. Note that memory management not done yet.
20:27 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/a2d4ea1d91
21:06 lucian joined #parrot
21:09 dalek nqp/nci: 060905c | tadzik++ | 3rdparty/dyncall-0.6/dynload/dynload_syms_elf.c:
21:09 dalek nqp/nci: Fix some compilation issues on gcc
21:09 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/060905c776
21:18 dalek nqp/nci: cef885f | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Add a way to free any C strings we pass; always do it initially.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/cef885f7fe
21:18 dalek nqp/nci: c490223 | jnthn++ | src/6model/reprs/NativeCall.c:
21:18 dalek nqp/nci: Don't leak library names.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/c49022341e
21:18 dalek nqp/nci: 3255210 | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Enable control over whether we free strings after passing them.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/325521037e
21:18 dalek nqp/nci: 7b8dfa4 | jnthn++ | src/ops/nqp_dyncall.ops:
21:18 dalek nqp/nci: Avoid allocating 0 bytes on argumentless call.
21:18 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/7b8dfa4f6c
21:59 bluescreen_ joined #parrot
22:08 bluescreen joined #parrot
22:09 bluescreen_ joined #parrot
22:09 bluescreen_ joined #parrot
22:10 bluescreen joined #parrot
22:10 dalek rakudo/nom: e3246ea | jnthn++ | src/Perl6/Metamodel/ (2 files):
22:10 dalek rakudo/nom: Fix postcircumfix:<( )> overriding issue.
22:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e3246eab2a
22:12 dukeleto msg whiteknight melange somehow will not let me close a task that you are the sole mentor for, so I can't close http://www.google-melange.com/gci​/task/view/google/gci2011/7170203
22:12 aloha OK. I'll deliver the message.
22:12 dukeleto blarg
22:13 bluescreen_ joined #parrot
22:13 bluescreen joined #parrot
22:15 dukeleto all gci tasks going forward should just have all mentors listed
22:15 dukeleto so anybody can close a task. Sigh.
22:29 dalek nqp/nci: da7528a | jnthn++ | tools/build/Makefile.in:
22:29 dalek nqp/nci: Install the dyncall oplib.
22:29 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/da7528aab0
22:29 dalek nqp/nci: f7e601c | jnthn++ | src/ (2 files):
22:30 dalek nqp/nci: Little refactor - we now pass in the object already initialized to build the native call site in. More flexible.
22:30 dalek nqp/nci: review: https://github.com/perl6/nqp/commit/f7e601c3c1
22:46 dalek rakudo/nci: c4ae651 | jnthn++ | src/Perl6/SymbolTable.pm:
22:46 dalek rakudo/nci: Add loading code for native call ops.
22:46 dalek rakudo/nci: review: https://github.com/rakudo/rakudo/commit/c4ae651a21
22:46 dalek rakudo/nci: f50ef0e | jnthn++ | src/ (2 files):
22:46 dalek rakudo/nci: Add userland support for box_target trait, which we need for NCI module.
22:46 dalek rakudo/nci: review: https://github.com/rakudo/rakudo/commit/f50ef0e40a
23:03 bluescreen_ joined #parrot
23:03 bluescreen joined #parrot
23:31 Yuki`N joined #parrot
23:31 Yuki`N dukeleto, ping
23:32 dukeleto Yuki`N: pong but leaving soon
23:32 Yuki`N dukeleto, finished the task.
23:33 Yuki`N (before you accepted it, actually)
23:36 Yuki`N Review/accept at leisure. http://www.google-melange.com/gci​/task/view/google/gci2011/7132336
23:37 ingy joined #parrot

| Channels | #parrot index | Today | | Search | Google Search | Plain-Text | summary

Parrot | source cross referenced