about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 3414Kartik K. Agaram2016-09-242-3/+3
|
* 3413Kartik K. Agaram2016-09-243-4/+10
|
* 3412Kartik K. Agaram2016-09-241-6/+8
| | | | Clean up a memory leak and a couple of other things.
* 3412Kartik K. Agaram2016-09-235-54/+88
|
* 3411Kartik K. Agaram2016-09-231-3/+0
|
* 3410Kartik K. Agaram2016-09-221-4/+5
|
* 3409Kartik K. Agaram2016-09-221-0/+4
| | | | | | | Support reloading the recipe side of the edit/ app when it includes type abbreviations. Thanks Ella Couch for reporting this problem.
* 3408Kartik K. Agaram2016-09-222-11/+5
|
* 3407Kartik K. Agaram2016-09-221-5/+2
|
* 3406Kartik K. Agaram2016-09-221-0/+13
| | | | Avoid spurious mutability errors due to index variables.
* 3405Kartik K. Agaram2016-09-221-6/+0
|
* 3404Kartik K. Agaram2016-09-221-5/+5
|
* 3403Stephen Malina2016-09-212-37/+64
| | | | | Wrap $read-from-socket in a channel and fix the socket example so that browser's display the response properly.
* 3402Kartik K. Agaram2016-09-191-1/+1
|
* 3401Kartik K. Agaram2016-09-187-24/+83
|
* 3400Kartik K. Agaram2016-09-185-0/+0
| | | | | | | | | Undo commit 3340. Let's standardize names of non-core files to only have dashes. That's also consistent with the edit/ and sandbox/ apps. Mu programmers will tend to pervasively use dashes, just like Lisp programmers. Scripts will continue to use underscores..
* 3399 - Update network primitives.Stephen Malina2016-09-182-19/+77
| | | | | | | $write-to-socket, $read-from-socket, and $accept now pass around references to socket pointers. $read-from-socket handles EOF explicitly.
* 3398Kartik K. Agaram2016-09-181-6/+11
|
* 3397Kartik K. Agaram2016-09-1712-916/+916
|
* 3396Kartik K. Agaram2016-09-1724-1663/+1663
|
* 3395Kartik K. Agaram2016-09-1797-4600/+4668
|
* 3394Kartik K. Agaram2016-09-179-43/+49
|
* 3393Kartik K. Agaram2016-09-179-24/+22
|
* 3392Kartik K. Agaram2016-09-174-7/+36
| | | | Bugfix for the "remaining bug" mentioned in commit 3391.
* 3391 - type abbreviations everywhereKartik K. Agaram2016-09-1724-3256/+3256
| | | | | | | | | Well, almost. I can't use them in some places in C++ where I'm just creating a temporary reagent without passing it through transforms. Like in some unit tests. I can't use them in memory-should-contain. And there's one remaining bug: I can't use abbreviations in a couple of places in 075channel.mu.
* 3390Kartik K. Agaram2016-09-1733-240/+240
|
* 3389Kartik K. Agaram2016-09-1745-713/+720
|
* 3388Kartik K. Agaram2016-09-176-56/+56
|
* 3387Kartik K. Agaram2016-09-171-31/+31
|
* 3386Kartik K. Agaram2016-09-177-93/+93
|
* 3385Kartik K. Agaram2016-09-1730-858/+858
|
* 3384Kartik K. Agaram2016-09-171-0/+14
|
* 3383Kartik K. Agaram2016-09-172-4/+4
| | | | Fix overzealous search-and-replace in commit 3380.
* 3382Kartik K. Agaram2016-09-171-5/+5
|
* 3381Kartik K. Agaram2016-09-1725-131/+131
|
* 3380Kartik K. Agaram2016-09-1743-854/+855
| | | | | One more place we were missing expanding type abbreviations: inside container definitions.
* 3379Kartik K. Agaram2016-09-1732-407/+407
| | | | Can't use type abbreviations inside 'memory-should-contain'.
* 3378Kartik K. Agaram2016-09-171-3/+2
|
* 3377Kartik K. Agaram2016-09-176-49/+49
|
* 3376 - start maximally using all type abbreviationsKartik K. Agaram2016-09-176-31/+31
| | | | | | It might be too much, particularly if students start peeking inside .mu files early. But worth a shot for not just to iron out the kinks in the abbreviation system.
* 3375Kartik K. Agaram2016-09-172-4/+5
|
* 3374Kartik K. Agaram2016-09-1615-62/+62
|
* 3373Kartik K. Agaram2016-09-161-1/+2
| | | | | | Commit 3370 fixed the memory leak but it still had print:character printing characters rather than numbers like it used to before 3365. Go back to the old, unambiguous trace.
* 3372Kartik K. Agaram2016-09-161-7/+9
|
* 3371Kartik K. Agaram2016-09-1612-89/+173
|
* 3370Kartik K. Agaram2016-09-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix CI. Figuring out this memory leak was an epic story. I was able to quickly track down that it was caused by commit 3365, in particular the overloading of to-text to support characters. But beyond that I was stumped. Why were layer 3's trace_stream::curr_stream objects being leaked in layer 81 by a change in layer 59?! Triaging through the layers, I found the following: layer 81 - leaks 2 blocks (in clear-line-erases-printed-characters) layer 83 - leaks 4 additional blocks (in clear-line-erases-printed-characters-2) I also figured out that the leaks were happening because of the call to 'trace' on a character inside print:character (that's the 'print' function called with a character argument) trace 90, [print-character], c So I tried to create a simple scenario: scenario trace-on-character-leaks [ 1:character <- copy 111/o trace 90, [print-character], 1:character ] But that triggered no leaks. Which made sense because there were plenty of calls to that 'trace' instruction in print:character. The leak only happened when print:character was called from clear-line. Oh, it happens only when tracing 0/nul characters. Tracing a Mu string with a nul character creates an empty C++ string, which is weird. But why should it leak memory?! Anyway, I tried a new scenario at layer 62 (when 'trace' starts auto-converting characters to text) scenario stashing-nul-character-leaks [ 1:character <- copy 0/nul trace 90, [dbg], 1:character ] But still, no leak! I played around with running layers until 70, 80. But then it didn't leak even at layer 82 where I'd seen it leak before. What had I done? Turns out it was only leaking if I used names for variables and not numeric addresses. Eventually I was able to get layer 59 to leak: scenario stashing-nul-character-leaks [ c:character <- copy 0/nul x:text <- to-text c trace 90, [dbg], x ] At that point I finally went to look at layer 3 (I'd been thinking about it before, but hadn't bothered to *actually go look*!) And the leak was obvious. In the end, all the information I needed was right there in the leak report. The reason this was hard to find was that I wasn't ready to believe there could be a bug in layer 3 after all these months. I had to go through the five stages of grief before I was ready for that realization. Final mystery: why was the memory leak not triggered by numeric variables? Because the transform to auto-convert ingredients to text only operated on named variables. Manually performing the transform did leak: scenario stashing-text-containing-nul-character-leaks [ 1:text <- new character:type, 1/capacity put-index *1:text, 0, 0/nul trace 90, [dbg], 1:text ]
* 3369Kartik K. Agaram2016-09-152-24/+0
| | | | Fix some tests and make them less fragile.
* 3368Kartik K. Agaram2016-09-152-15/+4
| | | | Decouple layer 61 test from layer 62 dependency.
* 3367Kartik K. Agaram2016-09-151-8/+24
| | | | | | | | | | | | | | | | | | | | | | Solution to a minor puzzle that came up during today's lesson with Ella: some sandboxes were showing the address of text results, while others were showing their contents. It took a while to realize that the distinction lay in whether the sandbox was saving the results in a text variable: new [abc] => <some address> x:text <- new [abc] => abc It took *much* longer to realize why I couldn't make the first case work like the second. Eventually I realized why: recipes were reclaiming their results if they weren't 'escaping' -- that is, being saved in a variable in the caller so they could be used later. Any solution to this would be a hack, so I'm going to just leave it alone. Type abbreviations should help minimize the extra typing needed to get sandboxes to show text contents.
* 3366Kartik K. Agaram2016-09-151-1/+1
| | | | | | Small bugfix in error messages for scenarios: we're trying to use read_mu_string() on an array of characters rather than an address to an array of characters. So we need to pretend we have a refcount.