Skip to content

Commit

Permalink
fixed "relabel" for HOF primitives (MAP, FIND, KEEP, COMBINE)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Nov 24, 2023
1 parent daafe1a commit e705116
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
* updated "Just Words" library for the new "text" list selector, removed now redundant "append words" reporter
* experimental setting to let list indices wrap around bounds, e.g. 0 returns the last element, -1 the second last etc., turned off, probably not a good idea
* **Notable Fixes:**
* fixed "relabel" for HOF primitives (MAP, FIND, KEEP, COMBINE)
* optimized scanning variable memory for function dependencies - speed up editing custom blocks in projects with large lists
* **Translation Updates:**
* German

2023-11-24
* objects: optimized scanning variable memory for function dependencies - speeds up editing custom blocks in projects with large lists
* lists: turned off experimental list indices wrapping by default, not sure whether this is a good idea after all
* lists: turned off experimental list indices wrapping by default, not sure whether this is a good idea after all
* blocks: fixed "relabel" for HOF primitives (MAP, FIND, KEEP, COMBINE)

2023-11-23
* lists, gui: let list indices wrap around bounds, e.g. 0 returns the last element, -1 the second last etc.
Expand Down
2 changes: 1 addition & 1 deletion snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script src="src/morphic.js?version=2023-11-07"></script>
<script src="src/symbols.js?version=2023-07-13"></script>
<script src="src/widgets.js?version=2023-05-24"></script>
<script src="src/blocks.js?version=2023-11-22"></script>
<script src="src/blocks.js?version=2023-11-24"></script>
<script src="src/threads.js?version=2023-10-22"></script>
<script src="src/objects.js?version=2023-11-24"></script>
<script src="src/scenes.js?version=2022-10-25"></script>
Expand Down
11 changes: 6 additions & 5 deletions src/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ SVG_Costume, embedMetadataPNG, ThreadManager, snapEquals*/

// Global stuff ////////////////////////////////////////////////////////

modules.blocks = '2023-November-22';
modules.blocks = '2023-November-24';

var SyntaxElementMorph;
var BlockMorph;
Expand Down Expand Up @@ -3190,6 +3190,7 @@ BlockMorph.prototype.userMenu = function () {
slot,
mult,
alternatives,
compiledAlternatives,
field,
rcvr;

Expand Down Expand Up @@ -3412,15 +3413,15 @@ BlockMorph.prototype.userMenu = function () {
this.selector
)
) {
alternatives = {
compiledAlternatives = {
reportMap : 'reportAtomicMap',
reportKeep : 'reportAtomicKeep',
reportFindFirst: 'reportAtomicFindFirst',
reportCombine : 'reportAtomicCombine'
};
menu.addItem(
'compile',
() => this.setSelector(alternatives[this.selector]),
() => this.setSelector(compiledAlternatives[this.selector]),
'experimental!\nmake this reporter fast and uninterruptable\n' +
'CAUTION: Errors in the ring\ncan break your Snap! session!'
);
Expand All @@ -3435,15 +3436,15 @@ BlockMorph.prototype.userMenu = function () {
this.selector
)
) {
alternatives = {
compiledAlternatives = {
reportAtomicMap : 'reportMap',
reportAtomicKeep : 'reportKeep',
reportAtomicFindFirst: 'reportFindFirst',
reportAtomicCombine : 'reportCombine'
};
menu.addItem(
'uncompile',
() => this.setSelector(alternatives[this.selector])
() => this.setSelector(compiledAlternatives[this.selector])
);
} else if (
contains(
Expand Down

0 comments on commit e705116

Please sign in to comment.